a zip code crypto-currency system good for red ONLY

zone-patch-cordova.js 2.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /**
  2. * @license
  3. * Copyright Google Inc. All Rights Reserved.
  4. *
  5. * Use of this source code is governed by an MIT-style license that can be
  6. * found in the LICENSE file at https://angular.io/license
  7. */
  8. (function (global, factory) {
  9. typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
  10. typeof define === 'function' && define.amd ? define(factory) :
  11. (factory());
  12. }(this, (function () { 'use strict';
  13. /**
  14. * @license
  15. * Copyright Google Inc. All Rights Reserved.
  16. *
  17. * Use of this source code is governed by an MIT-style license that can be
  18. * found in the LICENSE file at https://angular.io/license
  19. */
  20. Zone.__load_patch('cordova', function (global, Zone, api) {
  21. if (global.cordova) {
  22. var SUCCESS_SOURCE_1 = 'cordova.exec.success';
  23. var ERROR_SOURCE_1 = 'cordova.exec.error';
  24. var FUNCTION_1 = 'function';
  25. var nativeExec_1 = api.patchMethod(global.cordova, 'exec', function () { return function (self, args) {
  26. if (args.length > 0 && typeof args[0] === FUNCTION_1) {
  27. args[0] = Zone.current.wrap(args[0], SUCCESS_SOURCE_1);
  28. }
  29. if (args.length > 1 && typeof args[1] === FUNCTION_1) {
  30. args[1] = Zone.current.wrap(args[1], ERROR_SOURCE_1);
  31. }
  32. return nativeExec_1.apply(self, args);
  33. }; });
  34. }
  35. });
  36. Zone.__load_patch('cordova.FileReader', function (global, Zone) {
  37. if (global.cordova && typeof global['FileReader'] !== 'undefined') {
  38. document.addEventListener('deviceReady', function () {
  39. var FileReader = global['FileReader'];
  40. ['abort', 'error', 'load', 'loadstart', 'loadend', 'progress'].forEach(function (prop) {
  41. var eventNameSymbol = Zone.__symbol__('ON_PROPERTY' + prop);
  42. Object.defineProperty(FileReader.prototype, eventNameSymbol, {
  43. configurable: true,
  44. get: function () {
  45. return this._realReader && this._realReader[eventNameSymbol];
  46. }
  47. });
  48. });
  49. });
  50. }
  51. });
  52. })));