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1O,SAAS,CAACT,MAAV,CAAiB+mB,GAAjB;UACH;QACJ,CARD;MASH,CAXD;IAYH;;IACD,IAAIjqB,MAAM,CAAC,uBAAD,CAAV,EAAqC;MACjCU,IAAI,CAAC0M,UAAU,CAAC,kCAAD,CAAX,CAAJ,GACI0c,2BAA2B,CAAC,oBAAD,CAD/B;MAEAppB,IAAI,CAAC0M,UAAU,CAAC,yBAAD,CAAX,CAAJ,GACI0c,2BAA2B,CAAC,kBAAD,CAD/B;IAEH;EACJ,CAtBD;AAuBH,CA74GA,CAAD","sources":["./src/polyfills.ts","./node_modules/zone.js/dist/zone.js"],"sourcesContent":["/**\r\n * This file includes polyfills needed by Angular and is loaded before the app.\r\n * You can add your own extra polyfills to this file.\r\n *\r\n * This file is divided into 2 sections:\r\n * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.\r\n * 2. Application imports. Files imported after ZoneJS that should be loaded before your main\r\n * file.\r\n *\r\n * The current setup is for so-called \"evergreen\" browsers; the last versions of browsers that\r\n * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),\r\n * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.\r\n *\r\n * Learn more in https://angular.io/guide/browser-support\r\n */\r\n\r\n/***************************************************************************************************\r\n * BROWSER POLYFILLS\r\n */\r\n\r\n/**\r\n * IE11 requires the following for NgClass support on SVG elements\r\n */\r\n// import 'classlist.js'; // Run `npm install --save classlist.js`.\r\n\r\n/**\r\n * Web Animations `@angular/platform-browser/animations`\r\n * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.\r\n * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).\r\n */\r\n// import 'web-animations-js'; // Run `npm install --save web-animations-js`.\r\n\r\n/**\r\n * By default, zone.js will patch all possible macroTask and DomEvents\r\n * user can disable parts of macroTask/DomEvents patch by setting following flags\r\n * because those flags need to be set before `zone.js` being loaded, and webpack\r\n * will put import in the top of bundle, so user need to create a separate file\r\n * in this directory (for example: zone-flags.ts), and put the following flags\r\n * into that file, and then add the following code before importing zone.js.\r\n * import './zone-flags';\r\n *\r\n * The flags allowed in zone-flags.ts are listed here.\r\n *\r\n * The following flags will work for all browsers.\r\n *\r\n * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame\r\n * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick\r\n * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames\r\n *\r\n * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js\r\n * with the following flag, it will bypass `zone.js` patch for IE/Edge\r\n *\r\n * (window as any).__Zone_enable_cross_context_check = true;\r\n *\r\n */\r\n\r\n/***************************************************************************************************\r\n * Zone JS is required by default for Angular itself.\r\n */\r\nimport 'zone.js/dist/zone'; // Included with Angular CLI.\r\n\r\n\r\n/***************************************************************************************************\r\n * APPLICATION IMPORTS\r\n */\r\n","'use strict';\n/**\n * @license Angular v12.0.0-next.0\n * (c) 2010-2020 Google LLC. https://angular.io/\n * License: MIT\n */\n(function (factory) {\n typeof define === 'function' && define.amd ? define(factory) :\n factory();\n}((function () {\n 'use strict';\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var Zone$1 = (function (global) {\n var performance = global['performance'];\n function mark(name) {\n performance && performance['mark'] && performance['mark'](name);\n }\n function performanceMeasure(name, label) {\n performance && performance['measure'] && performance['measure'](name, label);\n }\n mark('Zone');\n // Initialize before it's accessed below.\n // __Zone_symbol_prefix global can be used to override the default zone\n // symbol prefix with a custom one if needed.\n var symbolPrefix = global['__Zone_symbol_prefix'] || '__zone_symbol__';\n function __symbol__(name) {\n return symbolPrefix + name;\n }\n var checkDuplicate = global[__symbol__('forceDuplicateZoneCheck')] === true;\n if (global['Zone']) {\n // if global['Zone'] already exists (maybe zone.js was already loaded or\n // some other lib also registered a global object named Zone), we may need\n // to throw an error, but sometimes user may not want this error.\n // For example,\n // we have two web pages, page1 includes zone.js, page2 doesn't.\n // and the 1st time user load page1 and page2, everything work fine,\n // but when user load page2 again, error occurs because global['Zone'] already exists.\n // so we add a flag to let user choose whether to throw this error or not.\n // By default, if existing Zone is from zone.js, we will not throw the error.\n if (checkDuplicate || typeof global['Zone'].__symbol__ !== 'function') {\n throw new Error('Zone already loaded.');\n }\n else {\n return global['Zone'];\n }\n }\n var Zone = /** @class */ (function () {\n function Zone(parent, zoneSpec) {\n this._parent = parent;\n this._name = zoneSpec ? zoneSpec.name || 'unnamed' : '';\n this._properties = zoneSpec && zoneSpec.properties || {};\n this._zoneDelegate =\n new ZoneDelegate(this, this._parent && this._parent._zoneDelegate, zoneSpec);\n }\n Zone.assertZonePatched = function () {\n if (global['Promise'] !== patches['ZoneAwarePromise']) {\n throw new Error('Zone.js has detected that ZoneAwarePromise `(window|global).Promise` ' +\n 'has been overwritten.\\n' +\n 'Most likely cause is that a Promise polyfill has been loaded ' +\n 'after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. ' +\n 'If you must load one, do so before loading zone.js.)');\n }\n };\n Object.defineProperty(Zone, \"root\", {\n get: function () {\n var zone = Zone.current;\n while (zone.parent) {\n zone = zone.parent;\n }\n return zone;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Zone, \"current\", {\n get: function () {\n return _currentZoneFrame.zone;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Zone, \"currentTask\", {\n get: function () {\n return _currentTask;\n },\n enumerable: false,\n configurable: true\n });\n // tslint:disable-next-line:require-internal-with-underscore\n Zone.__load_patch = function (name, fn, ignoreDuplicate) {\n if (ignoreDuplicate === void 0) { ignoreDuplicate = false; }\n if (patches.hasOwnProperty(name)) {\n // `checkDuplicate` option is defined from global variable\n // so it works for all modules.\n // `ignoreDuplicate` can work for the specified module\n if (!ignoreDuplicate && checkDuplicate) {\n throw Error('Already loaded patch: ' + name);\n }\n }\n else if (!global['__Zone_disable_' + name]) {\n var perfName = 'Zone:' + name;\n mark(perfName);\n patches[name] = fn(global, Zone, _api);\n performanceMeasure(perfName, perfName);\n }\n };\n Object.defineProperty(Zone.prototype, \"parent\", {\n get: function () {\n return this._parent;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Zone.prototype, \"name\", {\n get: function () {\n return this._name;\n },\n enumerable: false,\n configurable: true\n });\n Zone.prototype.get = function (key) {\n var zone = this.getZoneWith(key);\n if (zone)\n return zone._properties[key];\n };\n Zone.prototype.getZoneWith = function (key) {\n var current = this;\n while (current) {\n if (current._properties.hasOwnProperty(key)) {\n return current;\n }\n current = current._parent;\n }\n return null;\n };\n Zone.prototype.fork = function (zoneSpec) {\n if (!zoneSpec)\n throw new Error('ZoneSpec required!');\n return this._zoneDelegate.fork(this, zoneSpec);\n };\n Zone.prototype.wrap = function (callback, source) {\n if (typeof callback !== 'function') {\n throw new Error('Expecting function got: ' + callback);\n }\n var _callback = this._zoneDelegate.intercept(this, callback, source);\n var zone = this;\n return function () {\n return zone.runGuarded(_callback, this, arguments, source);\n };\n };\n Zone.prototype.run = function (callback, applyThis, applyArgs, source) {\n _currentZoneFrame = { parent: _currentZoneFrame, zone: this };\n try {\n return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source);\n }\n finally {\n _currentZoneFrame = _currentZoneFrame.parent;\n }\n };\n Zone.prototype.runGuarded = function (callback, applyThis, applyArgs, source) {\n if (applyThis === void 0) { applyThis = null; }\n _currentZoneFrame = { parent: _currentZoneFrame, zone: this };\n try {\n try {\n return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source);\n }\n catch (error) {\n if (this._zoneDelegate.handleError(this, error)) {\n throw error;\n }\n }\n }\n finally {\n _currentZoneFrame = _currentZoneFrame.parent;\n }\n };\n Zone.prototype.runTask = function (task, applyThis, applyArgs) {\n if (task.zone != this) {\n throw new Error('A task can only be run in the zone of creation! (Creation: ' +\n (task.zone || NO_ZONE).name + '; Execution: ' + this.name + ')');\n }\n // https://github.com/angular/zone.js/issues/778, sometimes eventTask\n // will run in notScheduled(canceled) state, we should not try to\n // run such kind of task but just return\n if (task.state === notScheduled && (task.type === eventTask || task.type === macroTask)) {\n return;\n }\n var reEntryGuard = task.state != running;\n reEntryGuard && task._transitionTo(running, scheduled);\n task.runCount++;\n var previousTask = _currentTask;\n _currentTask = task;\n _currentZoneFrame = { parent: _currentZoneFrame, zone: this };\n try {\n if (task.type == macroTask && task.data && !task.data.isPeriodic) {\n task.cancelFn = undefined;\n }\n try {\n return this._zoneDelegate.invokeTask(this, task, applyThis, applyArgs);\n }\n catch (error) {\n if (this._zoneDelegate.handleError(this, error)) {\n throw error;\n }\n }\n }\n finally {\n // if the task's state is notScheduled or unknown, then it has already been cancelled\n // we should not reset the state to scheduled\n if (task.state !== notScheduled && task.state !== unknown) {\n if (task.type == eventTask || (task.data && task.data.isPeriodic)) {\n reEntryGuard && task._transitionTo(scheduled, running);\n }\n else {\n task.runCount = 0;\n this._updateTaskCount(task, -1);\n reEntryGuard &&\n task._transitionTo(notScheduled, running, notScheduled);\n }\n }\n _currentZoneFrame = _currentZoneFrame.parent;\n _currentTask = previousTask;\n }\n };\n Zone.prototype.scheduleTask = function (task) {\n if (task.zone && task.zone !== this) {\n // check if the task was rescheduled, the newZone\n // should not be the children of the original zone\n var newZone = this;\n while (newZone) {\n if (newZone === task.zone) {\n throw Error(\"can not reschedule task to \" + this.name + \" which is descendants of the original zone \" + task.zone.name);\n }\n newZone = newZone.parent;\n }\n }\n task._transitionTo(scheduling, notScheduled);\n var zoneDelegates = [];\n task._zoneDelegates = zoneDelegates;\n task._zone = this;\n try {\n task = this._zoneDelegate.scheduleTask(this, task);\n }\n catch (err) {\n // should set task's state to unknown when scheduleTask throw error\n // because the err may from reschedule, so the fromState maybe notScheduled\n task._transitionTo(unknown, scheduling, notScheduled);\n // TODO: @JiaLiPassion, should we check the result from handleError?\n this._zoneDelegate.handleError(this, err);\n throw err;\n }\n if (task._zoneDelegates === zoneDelegates) {\n // we have to check because internally the delegate can reschedule the task.\n this._updateTaskCount(task, 1);\n }\n if (task.state == scheduling) {\n task._transitionTo(scheduled, scheduling);\n }\n return task;\n };\n Zone.prototype.scheduleMicroTask = function (source, callback, data, customSchedule) {\n return this.scheduleTask(new ZoneTask(microTask, source, callback, data, customSchedule, undefined));\n };\n Zone.prototype.scheduleMacroTask = function (source, callback, data, customSchedule, customCancel) {\n return this.scheduleTask(new ZoneTask(macroTask, source, callback, data, customSchedule, customCancel));\n };\n Zone.prototype.scheduleEventTask = function (source, callback, data, customSchedule, customCancel) {\n return this.scheduleTask(new ZoneTask(eventTask, source, callback, data, customSchedule, customCancel));\n };\n Zone.prototype.cancelTask = function (task) {\n if (task.zone != this)\n throw new Error('A task can only be cancelled in the zone of creation! (Creation: ' +\n (task.zone || NO_ZONE).name + '; Execution: ' + this.name + ')');\n task._transitionTo(canceling, scheduled, running);\n try {\n this._zoneDelegate.cancelTask(this, task);\n }\n catch (err) {\n // if error occurs when cancelTask, transit the state to unknown\n task._transitionTo(unknown, canceling);\n this._zoneDelegate.handleError(this, err);\n throw err;\n }\n this._updateTaskCount(task, -1);\n task._transitionTo(notScheduled, canceling);\n task.runCount = 0;\n return task;\n };\n Zone.prototype._updateTaskCount = function (task, count) {\n var zoneDelegates = task._zoneDelegates;\n if (count == -1) {\n task._zoneDelegates = null;\n }\n for (var i = 0; i < zoneDelegates.length; i++) {\n zoneDelegates[i]._updateTaskCount(task.type, count);\n }\n };\n return Zone;\n }());\n // tslint:disable-next-line:require-internal-with-underscore\n Zone.__symbol__ = __symbol__;\n var DELEGATE_ZS = {\n name: '',\n onHasTask: function (delegate, _, target, hasTaskState) { return delegate.hasTask(target, hasTaskState); },\n onScheduleTask: function (delegate, _, target, task) { return delegate.scheduleTask(target, task); },\n onInvokeTask: function (delegate, _, target, task, applyThis, applyArgs) { return delegate.invokeTask(target, task, applyThis, applyArgs); },\n onCancelTask: function (delegate, _, target, task) { return delegate.cancelTask(target, task); }\n };\n var ZoneDelegate = /** @class */ (function () {\n function ZoneDelegate(zone, parentDelegate, zoneSpec) {\n this._taskCounts = { 'microTask': 0, 'macroTask': 0, 'eventTask': 0 };\n this.zone = zone;\n this._parentDelegate = parentDelegate;\n this._forkZS = zoneSpec && (zoneSpec && zoneSpec.onFork ? zoneSpec : parentDelegate._forkZS);\n this._forkDlgt = zoneSpec && (zoneSpec.onFork ? parentDelegate : parentDelegate._forkDlgt);\n this._forkCurrZone =\n zoneSpec && (zoneSpec.onFork ? this.zone : parentDelegate._forkCurrZone);\n this._interceptZS =\n zoneSpec && (zoneSpec.onIntercept ? zoneSpec : parentDelegate._interceptZS);\n this._interceptDlgt =\n zoneSpec && (zoneSpec.onIntercept ? parentDelegate : parentDelegate._interceptDlgt);\n this._interceptCurrZone =\n zoneSpec && (zoneSpec.onIntercept ? this.zone : parentDelegate._interceptCurrZone);\n this._invokeZS = zoneSpec && (zoneSpec.onInvoke ? zoneSpec : parentDelegate._invokeZS);\n this._invokeDlgt =\n zoneSpec && (zoneSpec.onInvoke ? parentDelegate : parentDelegate._invokeDlgt);\n this._invokeCurrZone =\n zoneSpec && (zoneSpec.onInvoke ? this.zone : parentDelegate._invokeCurrZone);\n this._handleErrorZS =\n zoneSpec && (zoneSpec.onHandleError ? zoneSpec : parentDelegate._handleErrorZS);\n this._handleErrorDlgt =\n zoneSpec && (zoneSpec.onHandleError ? parentDelegate : parentDelegate._handleErrorDlgt);\n this._handleErrorCurrZone =\n zoneSpec && (zoneSpec.onHandleError ? this.zone : parentDelegate._handleErrorCurrZone);\n this._scheduleTaskZS =\n zoneSpec && (zoneSpec.onScheduleTask ? zoneSpec : parentDelegate._scheduleTaskZS);\n this._scheduleTaskDlgt = zoneSpec &&\n (zoneSpec.onScheduleTask ? parentDelegate : parentDelegate._scheduleTaskDlgt);\n this._scheduleTaskCurrZone =\n zoneSpec && (zoneSpec.onScheduleTask ? this.zone : parentDelegate._scheduleTaskCurrZone);\n this._invokeTaskZS =\n zoneSpec && (zoneSpec.onInvokeTask ? zoneSpec : parentDelegate._invokeTaskZS);\n this._invokeTaskDlgt =\n zoneSpec && (zoneSpec.onInvokeTask ? parentDelegate : parentDelegate._invokeTaskDlgt);\n this._invokeTaskCurrZone =\n zoneSpec && (zoneSpec.onInvokeTask ? this.zone : parentDelegate._invokeTaskCurrZone);\n this._cancelTaskZS =\n zoneSpec && (zoneSpec.onCancelTask ? zoneSpec : parentDelegate._cancelTaskZS);\n this._cancelTaskDlgt =\n zoneSpec && (zoneSpec.onCancelTask ? parentDelegate : parentDelegate._cancelTaskDlgt);\n this._cancelTaskCurrZone =\n zoneSpec && (zoneSpec.onCancelTask ? this.zone : parentDelegate._cancelTaskCurrZone);\n this._hasTaskZS = null;\n this._hasTaskDlgt = null;\n this._hasTaskDlgtOwner = null;\n this._hasTaskCurrZone = null;\n var zoneSpecHasTask = zoneSpec && zoneSpec.onHasTask;\n var parentHasTask = parentDelegate && parentDelegate._hasTaskZS;\n if (zoneSpecHasTask || parentHasTask) {\n // If we need to report hasTask, than this ZS needs to do ref counting on tasks. In such\n // a case all task related interceptors must go through this ZD. We can't short circuit it.\n this._hasTaskZS = zoneSpecHasTask ? zoneSpec : DELEGATE_ZS;\n this._hasTaskDlgt = parentDelegate;\n this._hasTaskDlgtOwner = this;\n this._hasTaskCurrZone = zone;\n if (!zoneSpec.onScheduleTask) {\n this._scheduleTaskZS = DELEGATE_ZS;\n this._scheduleTaskDlgt = parentDelegate;\n this._scheduleTaskCurrZone = this.zone;\n }\n if (!zoneSpec.onInvokeTask) {\n this._invokeTaskZS = DELEGATE_ZS;\n this._invokeTaskDlgt = parentDelegate;\n this._invokeTaskCurrZone = this.zone;\n }\n if (!zoneSpec.onCancelTask) {\n this._cancelTaskZS = DELEGATE_ZS;\n this._cancelTaskDlgt = parentDelegate;\n this._cancelTaskCurrZone = this.zone;\n }\n }\n }\n ZoneDelegate.prototype.fork = function (targetZone, zoneSpec) {\n return this._forkZS ? this._forkZS.onFork(this._forkDlgt, this.zone, targetZone, zoneSpec) :\n new Zone(targetZone, zoneSpec);\n };\n ZoneDelegate.prototype.intercept = function (targetZone, callback, source) {\n return this._interceptZS ?\n this._interceptZS.onIntercept(this._interceptDlgt, this._interceptCurrZone, targetZone, callback, source) :\n callback;\n };\n ZoneDelegate.prototype.invoke = function (targetZone, callback, applyThis, applyArgs, source) {\n return this._invokeZS ? this._invokeZS.onInvoke(this._invokeDlgt, this._invokeCurrZone, targetZone, callback, applyThis, applyArgs, source) :\n callback.apply(applyThis, applyArgs);\n };\n ZoneDelegate.prototype.handleError = function (targetZone, error) {\n return this._handleErrorZS ?\n this._handleErrorZS.onHandleError(this._handleErrorDlgt, this._handleErrorCurrZone, targetZone, error) :\n true;\n };\n ZoneDelegate.prototype.scheduleTask = function (targetZone, task) {\n var returnTask = task;\n if (this._scheduleTaskZS) {\n if (this._hasTaskZS) {\n returnTask._zoneDelegates.push(this._hasTaskDlgtOwner);\n }\n // clang-format off\n returnTask = this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt, this._scheduleTaskCurrZone, targetZone, task);\n // clang-format on\n if (!returnTask)\n returnTask = task;\n }\n else {\n if (task.scheduleFn) {\n task.scheduleFn(task);\n }\n else if (task.type == microTask) {\n scheduleMicroTask(task);\n }\n else {\n throw new Error('Task is missing scheduleFn.');\n }\n }\n return returnTask;\n };\n ZoneDelegate.prototype.invokeTask = function (targetZone, task, applyThis, applyArgs) {\n return this._invokeTaskZS ? this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt, this._invokeTaskCurrZone, targetZone, task, applyThis, applyArgs) :\n task.callback.apply(applyThis, applyArgs);\n };\n ZoneDelegate.prototype.cancelTask = function (targetZone, task) {\n var value;\n if (this._cancelTaskZS) {\n value = this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt, this._cancelTaskCurrZone, targetZone, task);\n }\n else {\n if (!task.cancelFn) {\n throw Error('Task is not cancelable');\n }\n value = task.cancelFn(task);\n }\n return value;\n };\n ZoneDelegate.prototype.hasTask = function (targetZone, isEmpty) {\n // hasTask should not throw error so other ZoneDelegate\n // can still trigger hasTask callback\n try {\n this._hasTaskZS &&\n this._hasTaskZS.onHasTask(this._hasTaskDlgt, this._hasTaskCurrZone, targetZone, isEmpty);\n }\n catch (err) {\n this.handleError(targetZone, err);\n }\n };\n // tslint:disable-next-line:require-internal-with-underscore\n ZoneDelegate.prototype._updateTaskCount = function (type, count) {\n var counts = this._taskCounts;\n var prev = counts[type];\n var next = counts[type] = prev + count;\n if (next < 0) {\n throw new Error('More tasks executed then were scheduled.');\n }\n if (prev == 0 || next == 0) {\n var isEmpty = {\n microTask: counts['microTask'] > 0,\n macroTask: counts['macroTask'] > 0,\n eventTask: counts['eventTask'] > 0,\n change: type\n };\n this.hasTask(this.zone, isEmpty);\n }\n };\n return ZoneDelegate;\n }());\n var ZoneTask = /** @class */ (function () {\n function ZoneTask(type, source, callback, options, scheduleFn, cancelFn) {\n // tslint:disable-next-line:require-internal-with-underscore\n this._zone = null;\n this.runCount = 0;\n // tslint:disable-next-line:require-internal-with-underscore\n this._zoneDelegates = null;\n // tslint:disable-next-line:require-internal-with-underscore\n this._state = 'notScheduled';\n this.type = type;\n this.source = source;\n this.data = options;\n this.scheduleFn = scheduleFn;\n this.cancelFn = cancelFn;\n if (!callback) {\n throw new Error('callback is not defined');\n }\n this.callback = callback;\n var self = this;\n // TODO: @JiaLiPassion options should have interface\n if (type === eventTask && options && options.useG) {\n this.invoke = ZoneTask.invokeTask;\n }\n else {\n this.invoke = function () {\n return ZoneTask.invokeTask.call(global, self, this, arguments);\n };\n }\n }\n ZoneTask.invokeTask = function (task, target, args) {\n if (!task) {\n task = this;\n }\n _numberOfNestedTaskFrames++;\n try {\n task.runCount++;\n return task.zone.runTask(task, target, args);\n }\n finally {\n if (_numberOfNestedTaskFrames == 1) {\n drainMicroTaskQueue();\n }\n _numberOfNestedTaskFrames--;\n }\n };\n Object.defineProperty(ZoneTask.prototype, \"zone\", {\n get: function () {\n return this._zone;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ZoneTask.prototype, \"state\", {\n get: function () {\n return this._state;\n },\n enumerable: false,\n configurable: true\n });\n ZoneTask.prototype.cancelScheduleRequest = function () {\n this._transitionTo(notScheduled, scheduling);\n };\n // tslint:disable-next-line:require-internal-with-underscore\n ZoneTask.prototype._transitionTo = function (toState, fromState1, fromState2) {\n if (this._state === fromState1 || this._state === fromState2) {\n this._state = toState;\n if (toState == notScheduled) {\n this._zoneDelegates = null;\n }\n }\n else {\n throw new Error(this.type + \" '\" + this.source + \"': can not transition to '\" + toState + \"', expecting state '\" + fromState1 + \"'\" + (fromState2 ? ' or \\'' + fromState2 + '\\'' : '') + \", was '\" + this._state + \"'.\");\n }\n };\n ZoneTask.prototype.toString = function () {\n if (this.data && typeof this.data.handleId !== 'undefined') {\n return this.data.handleId.toString();\n }\n else {\n return Object.prototype.toString.call(this);\n }\n };\n // add toJSON method to prevent cyclic error when\n // call JSON.stringify(zoneTask)\n ZoneTask.prototype.toJSON = function () {\n return {\n type: this.type,\n state: this.state,\n source: this.source,\n zone: this.zone.name,\n runCount: this.runCount\n };\n };\n return ZoneTask;\n }());\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n /// MICROTASK QUEUE\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n var symbolSetTimeout = __symbol__('setTimeout');\n var symbolPromise = __symbol__('Promise');\n var symbolThen = __symbol__('then');\n var _microTaskQueue = [];\n var _isDrainingMicrotaskQueue = false;\n var nativeMicroTaskQueuePromise;\n function scheduleMicroTask(task) {\n // if we are not running in any task, and there has not been anything scheduled\n // we must bootstrap the initial task creation by manually scheduling the drain\n if (_numberOfNestedTaskFrames === 0 && _microTaskQueue.length === 0) {\n // We are not running in Task, so we need to kickstart the microtask queue.\n if (!nativeMicroTaskQueuePromise) {\n if (global[symbolPromise]) {\n nativeMicroTaskQueuePromise = global[symbolPromise].resolve(0);\n }\n }\n if (nativeMicroTaskQueuePromise) {\n var nativeThen = nativeMicroTaskQueuePromise[symbolThen];\n if (!nativeThen) {\n // native Promise is not patchable, we need to use `then` directly\n // issue 1078\n nativeThen = nativeMicroTaskQueuePromise['then'];\n }\n nativeThen.call(nativeMicroTaskQueuePromise, drainMicroTaskQueue);\n }\n else {\n global[symbolSetTimeout](drainMicroTaskQueue, 0);\n }\n }\n task && _microTaskQueue.push(task);\n }\n function drainMicroTaskQueue() {\n if (!_isDrainingMicrotaskQueue) {\n _isDrainingMicrotaskQueue = true;\n while (_microTaskQueue.length) {\n var queue = _microTaskQueue;\n _microTaskQueue = [];\n for (var i = 0; i < queue.length; i++) {\n var task = queue[i];\n try {\n task.zone.runTask(task, null, null);\n }\n catch (error) {\n _api.onUnhandledError(error);\n }\n }\n }\n _api.microtaskDrainDone();\n _isDrainingMicrotaskQueue = false;\n }\n }\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n /// BOOTSTRAP\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n var NO_ZONE = { name: 'NO ZONE' };\n var notScheduled = 'notScheduled', scheduling = 'scheduling', scheduled = 'scheduled', running = 'running', canceling = 'canceling', unknown = 'unknown';\n var microTask = 'microTask', macroTask = 'macroTask', eventTask = 'eventTask';\n var patches = {};\n var _api = {\n symbol: __symbol__,\n currentZoneFrame: function () { return _currentZoneFrame; },\n onUnhandledError: noop,\n microtaskDrainDone: noop,\n scheduleMicroTask: scheduleMicroTask,\n showUncaughtError: function () { return !Zone[__symbol__('ignoreConsoleErrorUncaughtError')]; },\n patchEventTarget: function () { return []; },\n patchOnProperties: noop,\n patchMethod: function () { return noop; },\n bindArguments: function () { return []; },\n patchThen: function () { return noop; },\n patchMacroTask: function () { return noop; },\n patchEventPrototype: function () { return noop; },\n isIEOrEdge: function () { return false; },\n getGlobalObjects: function () { return undefined; },\n ObjectDefineProperty: function () { return noop; },\n ObjectGetOwnPropertyDescriptor: function () { return undefined; },\n ObjectCreate: function () { return undefined; },\n ArraySlice: function () { return []; },\n patchClass: function () { return noop; },\n wrapWithCurrentZone: function () { return noop; },\n filterProperties: function () { return []; },\n attachOriginToPatched: function () { return noop; },\n _redefineProperty: function () { return noop; },\n patchCallbacks: function () { return noop; }\n };\n var _currentZoneFrame = { parent: null, zone: new Zone(null, null) };\n var _currentTask = null;\n var _numberOfNestedTaskFrames = 0;\n function noop() { }\n performanceMeasure('Zone', 'Zone');\n return global['Zone'] = Zone;\n })(typeof window !== 'undefined' && window || typeof self !== 'undefined' && self || global);\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Suppress closure compiler errors about unknown 'Zone' variable\n * @fileoverview\n * @suppress {undefinedVars,globalThis,missingRequire}\n */\n /// \n // issue #989, to reduce bundle size, use short name\n /** Object.getOwnPropertyDescriptor */\n var ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n /** Object.defineProperty */\n var ObjectDefineProperty = Object.defineProperty;\n /** Object.getPrototypeOf */\n var ObjectGetPrototypeOf = Object.getPrototypeOf;\n /** Object.create */\n var ObjectCreate = Object.create;\n /** Array.prototype.slice */\n var ArraySlice = Array.prototype.slice;\n /** addEventListener string const */\n var ADD_EVENT_LISTENER_STR = 'addEventListener';\n /** removeEventListener string const */\n var REMOVE_EVENT_LISTENER_STR = 'removeEventListener';\n /** zoneSymbol addEventListener */\n var ZONE_SYMBOL_ADD_EVENT_LISTENER = Zone.__symbol__(ADD_EVENT_LISTENER_STR);\n /** zoneSymbol removeEventListener */\n var ZONE_SYMBOL_REMOVE_EVENT_LISTENER = Zone.__symbol__(REMOVE_EVENT_LISTENER_STR);\n /** true string const */\n var TRUE_STR = 'true';\n /** false string const */\n var FALSE_STR = 'false';\n /** Zone symbol prefix string const. */\n var ZONE_SYMBOL_PREFIX = Zone.__symbol__('');\n function wrapWithCurrentZone(callback, source) {\n return Zone.current.wrap(callback, source);\n }\n function scheduleMacroTaskWithCurrentZone(source, callback, data, customSchedule, customCancel) {\n return Zone.current.scheduleMacroTask(source, callback, data, customSchedule, customCancel);\n }\n var zoneSymbol = Zone.__symbol__;\n var isWindowExists = typeof window !== 'undefined';\n var internalWindow = isWindowExists ? window : undefined;\n var _global = isWindowExists && internalWindow || typeof self === 'object' && self || global;\n var REMOVE_ATTRIBUTE = 'removeAttribute';\n var NULL_ON_PROP_VALUE = [null];\n function bindArguments(args, source) {\n for (var i = args.length - 1; i >= 0; i--) {\n if (typeof args[i] === 'function') {\n args[i] = wrapWithCurrentZone(args[i], source + '_' + i);\n }\n }\n return args;\n }\n function patchPrototype(prototype, fnNames) {\n var source = prototype.constructor['name'];\n var _loop_1 = function (i) {\n var name_1 = fnNames[i];\n var delegate = prototype[name_1];\n if (delegate) {\n var prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, name_1);\n if (!isPropertyWritable(prototypeDesc)) {\n return \"continue\";\n }\n prototype[name_1] = (function (delegate) {\n var patched = function () {\n return delegate.apply(this, bindArguments(arguments, source + '.' + name_1));\n };\n attachOriginToPatched(patched, delegate);\n return patched;\n })(delegate);\n }\n };\n for (var i = 0; i < fnNames.length; i++) {\n _loop_1(i);\n }\n }\n function isPropertyWritable(propertyDesc) {\n if (!propertyDesc) {\n return true;\n }\n if (propertyDesc.writable === false) {\n return false;\n }\n return !(typeof propertyDesc.get === 'function' && typeof propertyDesc.set === 'undefined');\n }\n var isWebWorker = (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope);\n // Make sure to access `process` through `_global` so that WebPack does not accidentally browserify\n // this code.\n var isNode = (!('nw' in _global) && typeof _global.process !== 'undefined' &&\n {}.toString.call(_global.process) === '[object process]');\n var isBrowser = !isNode && !isWebWorker && !!(isWindowExists && internalWindow['HTMLElement']);\n // we are in electron of nw, so we are both browser and nodejs\n // Make sure to access `process` through `_global` so that WebPack does not accidentally browserify\n // this code.\n var isMix = typeof _global.process !== 'undefined' &&\n {}.toString.call(_global.process) === '[object process]' && !isWebWorker &&\n !!(isWindowExists && internalWindow['HTMLElement']);\n var zoneSymbolEventNames = {};\n var wrapFn = function (event) {\n // https://github.com/angular/zone.js/issues/911, in IE, sometimes\n // event will be undefined, so we need to use window.event\n event = event || _global.event;\n if (!event) {\n return;\n }\n var eventNameSymbol = zoneSymbolEventNames[event.type];\n if (!eventNameSymbol) {\n eventNameSymbol = zoneSymbolEventNames[event.type] = zoneSymbol('ON_PROPERTY' + event.type);\n }\n var target = this || event.target || _global;\n var listener = target[eventNameSymbol];\n var result;\n if (isBrowser && target === internalWindow && event.type === 'error') {\n // window.onerror have different signiture\n // https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror#window.onerror\n // and onerror callback will prevent default when callback return true\n var errorEvent = event;\n result = listener &&\n listener.call(this, errorEvent.message, errorEvent.filename, errorEvent.lineno, errorEvent.colno, errorEvent.error);\n if (result === true) {\n event.preventDefault();\n }\n }\n else {\n result = listener && listener.apply(this, arguments);\n if (result != undefined && !result) {\n event.preventDefault();\n }\n }\n return result;\n };\n function patchProperty(obj, prop, prototype) {\n var desc = ObjectGetOwnPropertyDescriptor(obj, prop);\n if (!desc && prototype) {\n // when patch window object, use prototype to check prop exist or not\n var prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, prop);\n if (prototypeDesc) {\n desc = { enumerable: true, configurable: true };\n }\n }\n // if the descriptor not exists or is not configurable\n // just return\n if (!desc || !desc.configurable) {\n return;\n }\n var onPropPatchedSymbol = zoneSymbol('on' + prop + 'patched');\n if (obj.hasOwnProperty(onPropPatchedSymbol) && obj[onPropPatchedSymbol]) {\n return;\n }\n // A property descriptor cannot have getter/setter and be writable\n // deleting the writable and value properties avoids this error:\n //\n // TypeError: property descriptors must not specify a value or be writable when a\n // getter or setter has been specified\n delete desc.writable;\n delete desc.value;\n var originalDescGet = desc.get;\n var originalDescSet = desc.set;\n // substr(2) cuz 'onclick' -> 'click', etc\n var eventName = prop.substr(2);\n var eventNameSymbol = zoneSymbolEventNames[eventName];\n if (!eventNameSymbol) {\n eventNameSymbol = zoneSymbolEventNames[eventName] = zoneSymbol('ON_PROPERTY' + eventName);\n }\n desc.set = function (newValue) {\n // in some of windows's onproperty callback, this is undefined\n // so we need to check it\n var target = this;\n if (!target && obj === _global) {\n target = _global;\n }\n if (!target) {\n return;\n }\n var previousValue = target[eventNameSymbol];\n if (previousValue) {\n target.removeEventListener(eventName, wrapFn);\n }\n // issue #978, when onload handler was added before loading zone.js\n // we should remove it with originalDescSet\n if (originalDescSet) {\n originalDescSet.apply(target, NULL_ON_PROP_VALUE);\n }\n if (typeof newValue === 'function') {\n target[eventNameSymbol] = newValue;\n target.addEventListener(eventName, wrapFn, false);\n }\n else {\n target[eventNameSymbol] = null;\n }\n };\n // The getter would return undefined for unassigned properties but the default value of an\n // unassigned property is null\n desc.get = function () {\n // in some of windows's onproperty callback, this is undefined\n // so we need to check it\n var target = this;\n if (!target && obj === _global) {\n target = _global;\n }\n if (!target) {\n return null;\n }\n var listener = target[eventNameSymbol];\n if (listener) {\n return listener;\n }\n else if (originalDescGet) {\n // result will be null when use inline event attribute,\n // such as \n // because the onclick function is internal raw uncompiled handler\n // the onclick will be evaluated when first time event was triggered or\n // the property is accessed, https://github.com/angular/zone.js/issues/525\n // so we should use original native get to retrieve the handler\n var value = originalDescGet && originalDescGet.call(this);\n if (value) {\n desc.set.call(this, value);\n if (typeof target[REMOVE_ATTRIBUTE] === 'function') {\n target.removeAttribute(prop);\n }\n return value;\n }\n }\n return null;\n };\n ObjectDefineProperty(obj, prop, desc);\n obj[onPropPatchedSymbol] = true;\n }\n function patchOnProperties(obj, properties, prototype) {\n if (properties) {\n for (var i = 0; i < properties.length; i++) {\n patchProperty(obj, 'on' + properties[i], prototype);\n }\n }\n else {\n var onProperties = [];\n for (var prop in obj) {\n if (prop.substr(0, 2) == 'on') {\n onProperties.push(prop);\n }\n }\n for (var j = 0; j < onProperties.length; j++) {\n patchProperty(obj, onProperties[j], prototype);\n }\n }\n }\n var originalInstanceKey = zoneSymbol('originalInstance');\n // wrap some native API on `window`\n function patchClass(className) {\n var OriginalClass = _global[className];\n if (!OriginalClass)\n return;\n // keep original class in global\n _global[zoneSymbol(className)] = OriginalClass;\n _global[className] = function () {\n var a = bindArguments(arguments, className);\n switch (a.length) {\n case 0:\n this[originalInstanceKey] = new OriginalClass();\n break;\n case 1:\n this[originalInstanceKey] = new OriginalClass(a[0]);\n break;\n case 2:\n this[originalInstanceKey] = new OriginalClass(a[0], a[1]);\n break;\n case 3:\n this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2]);\n break;\n case 4:\n this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2], a[3]);\n break;\n default:\n throw new Error('Arg list too long.');\n }\n };\n // attach original delegate to patched function\n attachOriginToPatched(_global[className], OriginalClass);\n var instance = new OriginalClass(function () { });\n var prop;\n for (prop in instance) {\n // https://bugs.webkit.org/show_bug.cgi?id=44721\n if (className === 'XMLHttpRequest' && prop === 'responseBlob')\n continue;\n (function (prop) {\n if (typeof instance[prop] === 'function') {\n _global[className].prototype[prop] = function () {\n return this[originalInstanceKey][prop].apply(this[originalInstanceKey], arguments);\n };\n }\n else {\n ObjectDefineProperty(_global[className].prototype, prop, {\n set: function (fn) {\n if (typeof fn === 'function') {\n this[originalInstanceKey][prop] = wrapWithCurrentZone(fn, className + '.' + prop);\n // keep callback in wrapped function so we can\n // use it in Function.prototype.toString to return\n // the native one.\n attachOriginToPatched(this[originalInstanceKey][prop], fn);\n }\n else {\n this[originalInstanceKey][prop] = fn;\n }\n },\n get: function () {\n return this[originalInstanceKey][prop];\n }\n });\n }\n }(prop));\n }\n for (prop in OriginalClass) {\n if (prop !== 'prototype' && OriginalClass.hasOwnProperty(prop)) {\n _global[className][prop] = OriginalClass[prop];\n }\n }\n }\n function patchMethod(target, name, patchFn) {\n var proto = target;\n while (proto && !proto.hasOwnProperty(name)) {\n proto = ObjectGetPrototypeOf(proto);\n }\n if (!proto && target[name]) {\n // somehow we did not find it, but we can see it. This happens on IE for Window properties.\n proto = target;\n }\n var delegateName = zoneSymbol(name);\n var delegate = null;\n if (proto && (!(delegate = proto[delegateName]) || !proto.hasOwnProperty(delegateName))) {\n delegate = proto[delegateName] = proto[name];\n // check whether proto[name] is writable\n // some property is readonly in safari, such as HtmlCanvasElement.prototype.toBlob\n var desc = proto && ObjectGetOwnPropertyDescriptor(proto, name);\n if (isPropertyWritable(desc)) {\n var patchDelegate_1 = patchFn(delegate, delegateName, name);\n proto[name] = function () {\n return patchDelegate_1(this, arguments);\n };\n attachOriginToPatched(proto[name], delegate);\n }\n }\n return delegate;\n }\n // TODO: @JiaLiPassion, support cancel task later if necessary\n function patchMacroTask(obj, funcName, metaCreator) {\n var setNative = null;\n function scheduleTask(task) {\n var data = task.data;\n data.args[data.cbIdx] = function () {\n task.invoke.apply(this, arguments);\n };\n setNative.apply(data.target, data.args);\n return task;\n }\n setNative = patchMethod(obj, funcName, function (delegate) { return function (self, args) {\n var meta = metaCreator(self, args);\n if (meta.cbIdx >= 0 && typeof args[meta.cbIdx] === 'function') {\n return scheduleMacroTaskWithCurrentZone(meta.name, args[meta.cbIdx], meta, scheduleTask);\n }\n else {\n // cause an error by calling it directly.\n return delegate.apply(self, args);\n }\n }; });\n }\n function attachOriginToPatched(patched, original) {\n patched[zoneSymbol('OriginalDelegate')] = original;\n }\n var isDetectedIEOrEdge = false;\n var ieOrEdge = false;\n function isIE() {\n try {\n var ua = internalWindow.navigator.userAgent;\n if (ua.indexOf('MSIE ') !== -1 || ua.indexOf('Trident/') !== -1) {\n return true;\n }\n }\n catch (error) {\n }\n return false;\n }\n function isIEOrEdge() {\n if (isDetectedIEOrEdge) {\n return ieOrEdge;\n }\n isDetectedIEOrEdge = true;\n try {\n var ua = internalWindow.navigator.userAgent;\n if (ua.indexOf('MSIE ') !== -1 || ua.indexOf('Trident/') !== -1 || ua.indexOf('Edge/') !== -1) {\n ieOrEdge = true;\n }\n }\n catch (error) {\n }\n return ieOrEdge;\n }\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n Zone.__load_patch('ZoneAwarePromise', function (global, Zone, api) {\n var ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n var ObjectDefineProperty = Object.defineProperty;\n function readableObjectToString(obj) {\n if (obj && obj.toString === Object.prototype.toString) {\n var className = obj.constructor && obj.constructor.name;\n return (className ? className : '') + ': ' + JSON.stringify(obj);\n }\n return obj ? obj.toString() : Object.prototype.toString.call(obj);\n }\n var __symbol__ = api.symbol;\n var _uncaughtPromiseErrors = [];\n var isDisableWrappingUncaughtPromiseRejection = global[__symbol__('DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION')] === true;\n var symbolPromise = __symbol__('Promise');\n var symbolThen = __symbol__('then');\n var creationTrace = '__creationTrace__';\n api.onUnhandledError = function (e) {\n if (api.showUncaughtError()) {\n var rejection = e && e.rejection;\n if (rejection) {\n console.error('Unhandled Promise rejection:', rejection instanceof Error ? rejection.message : rejection, '; Zone:', e.zone.name, '; Task:', e.task && e.task.source, '; Value:', rejection, rejection instanceof Error ? rejection.stack : undefined);\n }\n else {\n console.error(e);\n }\n }\n };\n api.microtaskDrainDone = function () {\n var _loop_2 = function () {\n var uncaughtPromiseError = _uncaughtPromiseErrors.shift();\n try {\n uncaughtPromiseError.zone.runGuarded(function () {\n if (uncaughtPromiseError.throwOriginal) {\n throw uncaughtPromiseError.rejection;\n }\n throw uncaughtPromiseError;\n });\n }\n catch (error) {\n handleUnhandledRejection(error);\n }\n };\n while (_uncaughtPromiseErrors.length) {\n _loop_2();\n }\n };\n var UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL = __symbol__('unhandledPromiseRejectionHandler');\n function handleUnhandledRejection(e) {\n api.onUnhandledError(e);\n try {\n var handler = Zone[UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL];\n if (typeof handler === 'function') {\n handler.call(this, e);\n }\n }\n catch (err) {\n }\n }\n function isThenable(value) {\n return value && value.then;\n }\n function forwardResolution(value) {\n return value;\n }\n function forwardRejection(rejection) {\n return ZoneAwarePromise.reject(rejection);\n }\n var symbolState = __symbol__('state');\n var symbolValue = __symbol__('value');\n var symbolFinally = __symbol__('finally');\n var symbolParentPromiseValue = __symbol__('parentPromiseValue');\n var symbolParentPromiseState = __symbol__('parentPromiseState');\n var source = 'Promise.then';\n var UNRESOLVED = null;\n var RESOLVED = true;\n var REJECTED = false;\n var REJECTED_NO_CATCH = 0;\n function makeResolver(promise, state) {\n return function (v) {\n try {\n resolvePromise(promise, state, v);\n }\n catch (err) {\n resolvePromise(promise, false, err);\n }\n // Do not return value or you will break the Promise spec.\n };\n }\n var once = function () {\n var wasCalled = false;\n return function wrapper(wrappedFunction) {\n return function () {\n if (wasCalled) {\n return;\n }\n wasCalled = true;\n wrappedFunction.apply(null, arguments);\n };\n };\n };\n var TYPE_ERROR = 'Promise resolved with itself';\n var CURRENT_TASK_TRACE_SYMBOL = __symbol__('currentTaskTrace');\n // Promise Resolution\n function resolvePromise(promise, state, value) {\n var onceWrapper = once();\n if (promise === value) {\n throw new TypeError(TYPE_ERROR);\n }\n if (promise[symbolState] === UNRESOLVED) {\n // should only get value.then once based on promise spec.\n var then = null;\n try {\n if (typeof value === 'object' || typeof value === 'function') {\n then = value && value.then;\n }\n }\n catch (err) {\n onceWrapper(function () {\n resolvePromise(promise, false, err);\n })();\n return promise;\n }\n // if (value instanceof ZoneAwarePromise) {\n if (state !== REJECTED && value instanceof ZoneAwarePromise &&\n value.hasOwnProperty(symbolState) && value.hasOwnProperty(symbolValue) &&\n value[symbolState] !== UNRESOLVED) {\n clearRejectedNoCatch(value);\n resolvePromise(promise, value[symbolState], value[symbolValue]);\n }\n else if (state !== REJECTED && typeof then === 'function') {\n try {\n then.call(value, onceWrapper(makeResolver(promise, state)), onceWrapper(makeResolver(promise, false)));\n }\n catch (err) {\n onceWrapper(function () {\n resolvePromise(promise, false, err);\n })();\n }\n }\n else {\n promise[symbolState] = state;\n var queue = promise[symbolValue];\n promise[symbolValue] = value;\n if (promise[symbolFinally] === symbolFinally) {\n // the promise is generated by Promise.prototype.finally\n if (state === RESOLVED) {\n // the state is resolved, should ignore the value\n // and use parent promise value\n promise[symbolState] = promise[symbolParentPromiseState];\n promise[symbolValue] = promise[symbolParentPromiseValue];\n }\n }\n // record task information in value when error occurs, so we can\n // do some additional work such as render longStackTrace\n if (state === REJECTED && value instanceof Error) {\n // check if longStackTraceZone is here\n var trace = Zone.currentTask && Zone.currentTask.data &&\n Zone.currentTask.data[creationTrace];\n if (trace) {\n // only keep the long stack trace into error when in longStackTraceZone\n ObjectDefineProperty(value, CURRENT_TASK_TRACE_SYMBOL, { configurable: true, enumerable: false, writable: true, value: trace });\n }\n }\n for (var i = 0; i < queue.length;) {\n scheduleResolveOrReject(promise, queue[i++], queue[i++], queue[i++], queue[i++]);\n }\n if (queue.length == 0 && state == REJECTED) {\n promise[symbolState] = REJECTED_NO_CATCH;\n var uncaughtPromiseError = value;\n try {\n // Here we throws a new Error to print more readable error log\n // and if the value is not an error, zone.js builds an `Error`\n // Object here to attach the stack information.\n throw new Error('Uncaught (in promise): ' + readableObjectToString(value) +\n (value && value.stack ? '\\n' + value.stack : ''));\n }\n catch (err) {\n uncaughtPromiseError = err;\n }\n if (isDisableWrappingUncaughtPromiseRejection) {\n // If disable wrapping uncaught promise reject\n // use the value instead of wrapping it.\n uncaughtPromiseError.throwOriginal = true;\n }\n uncaughtPromiseError.rejection = value;\n uncaughtPromiseError.promise = promise;\n uncaughtPromiseError.zone = Zone.current;\n uncaughtPromiseError.task = Zone.currentTask;\n _uncaughtPromiseErrors.push(uncaughtPromiseError);\n api.scheduleMicroTask(); // to make sure that it is running\n }\n }\n }\n // Resolving an already resolved promise is a noop.\n return promise;\n }\n var REJECTION_HANDLED_HANDLER = __symbol__('rejectionHandledHandler');\n function clearRejectedNoCatch(promise) {\n if (promise[symbolState] === REJECTED_NO_CATCH) {\n // if the promise is rejected no catch status\n // and queue.length > 0, means there is a error handler\n // here to handle the rejected promise, we should trigger\n // windows.rejectionhandled eventHandler or nodejs rejectionHandled\n // eventHandler\n try {\n var handler = Zone[REJECTION_HANDLED_HANDLER];\n if (handler && typeof handler === 'function') {\n handler.call(this, { rejection: promise[symbolValue], promise: promise });\n }\n }\n catch (err) {\n }\n promise[symbolState] = REJECTED;\n for (var i = 0; i < _uncaughtPromiseErrors.length; i++) {\n if (promise === _uncaughtPromiseErrors[i].promise) {\n _uncaughtPromiseErrors.splice(i, 1);\n }\n }\n }\n }\n function scheduleResolveOrReject(promise, zone, chainPromise, onFulfilled, onRejected) {\n clearRejectedNoCatch(promise);\n var promiseState = promise[symbolState];\n var delegate = promiseState ?\n (typeof onFulfilled === 'function') ? onFulfilled : forwardResolution :\n (typeof onRejected === 'function') ? onRejected : forwardRejection;\n zone.scheduleMicroTask(source, function () {\n try {\n var parentPromiseValue = promise[symbolValue];\n var isFinallyPromise = !!chainPromise && symbolFinally === chainPromise[symbolFinally];\n if (isFinallyPromise) {\n // if the promise is generated from finally call, keep parent promise's state and value\n chainPromise[symbolParentPromiseValue] = parentPromiseValue;\n chainPromise[symbolParentPromiseState] = promiseState;\n }\n // should not pass value to finally callback\n var value = zone.run(delegate, undefined, isFinallyPromise && delegate !== forwardRejection && delegate !== forwardResolution ?\n [] :\n [parentPromiseValue]);\n resolvePromise(chainPromise, true, value);\n }\n catch (error) {\n // if error occurs, should always return this error\n resolvePromise(chainPromise, false, error);\n }\n }, chainPromise);\n }\n var ZONE_AWARE_PROMISE_TO_STRING = 'function ZoneAwarePromise() { [native code] }';\n var noop = function () { };\n var ZoneAwarePromise = /** @class */ (function () {\n function ZoneAwarePromise(executor) {\n var promise = this;\n if (!(promise instanceof ZoneAwarePromise)) {\n throw new Error('Must be an instanceof Promise.');\n }\n promise[symbolState] = UNRESOLVED;\n promise[symbolValue] = []; // queue;\n try {\n executor && executor(makeResolver(promise, RESOLVED), makeResolver(promise, REJECTED));\n }\n catch (error) {\n resolvePromise(promise, false, error);\n }\n }\n ZoneAwarePromise.toString = function () {\n return ZONE_AWARE_PROMISE_TO_STRING;\n };\n ZoneAwarePromise.resolve = function (value) {\n return resolvePromise(new this(null), RESOLVED, value);\n };\n ZoneAwarePromise.reject = function (error) {\n return resolvePromise(new this(null), REJECTED, error);\n };\n ZoneAwarePromise.race = function (values) {\n var resolve;\n var reject;\n var promise = new this(function (res, rej) {\n resolve = res;\n reject = rej;\n });\n function onResolve(value) {\n resolve(value);\n }\n function onReject(error) {\n reject(error);\n }\n for (var _i = 0, values_1 = values; _i < values_1.length; _i++) {\n var value = values_1[_i];\n if (!isThenable(value)) {\n value = this.resolve(value);\n }\n value.then(onResolve, onReject);\n }\n return promise;\n };\n ZoneAwarePromise.all = function (values) {\n return ZoneAwarePromise.allWithCallback(values);\n };\n ZoneAwarePromise.allSettled = function (values) {\n var P = this && this.prototype instanceof ZoneAwarePromise ? this : ZoneAwarePromise;\n return P.allWithCallback(values, {\n thenCallback: function (value) { return ({ status: 'fulfilled', value: value }); },\n errorCallback: function (err) { return ({ status: 'rejected', reason: err }); }\n });\n };\n ZoneAwarePromise.allWithCallback = function (values, callback) {\n var resolve;\n var reject;\n var promise = new this(function (res, rej) {\n resolve = res;\n reject = rej;\n });\n // Start at 2 to prevent prematurely resolving if .then is called immediately.\n var unresolvedCount = 2;\n var valueIndex = 0;\n var resolvedValues = [];\n var _loop_3 = function (value) {\n if (!isThenable(value)) {\n value = this_1.resolve(value);\n }\n var curValueIndex = valueIndex;\n try {\n value.then(function (value) {\n resolvedValues[curValueIndex] = callback ? callback.thenCallback(value) : value;\n unresolvedCount--;\n if (unresolvedCount === 0) {\n resolve(resolvedValues);\n }\n }, function (err) {\n if (!callback) {\n reject(err);\n }\n else {\n resolvedValues[curValueIndex] = callback.errorCallback(err);\n unresolvedCount--;\n if (unresolvedCount === 0) {\n resolve(resolvedValues);\n }\n }\n });\n }\n catch (thenErr) {\n reject(thenErr);\n }\n unresolvedCount++;\n valueIndex++;\n };\n var this_1 = this;\n for (var _i = 0, values_2 = values; _i < values_2.length; _i++) {\n var value = values_2[_i];\n _loop_3(value);\n }\n // Make the unresolvedCount zero-based again.\n unresolvedCount -= 2;\n if (unresolvedCount === 0) {\n resolve(resolvedValues);\n }\n return promise;\n };\n Object.defineProperty(ZoneAwarePromise.prototype, Symbol.toStringTag, {\n get: function () {\n return 'Promise';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ZoneAwarePromise.prototype, Symbol.species, {\n get: function () {\n return ZoneAwarePromise;\n },\n enumerable: false,\n configurable: true\n });\n ZoneAwarePromise.prototype.then = function (onFulfilled, onRejected) {\n var C = this.constructor[Symbol.species];\n if (!C || typeof C !== 'function') {\n C = this.constructor || ZoneAwarePromise;\n }\n var chainPromise = new C(noop);\n var zone = Zone.current;\n if (this[symbolState] == UNRESOLVED) {\n this[symbolValue].push(zone, chainPromise, onFulfilled, onRejected);\n }\n else {\n scheduleResolveOrReject(this, zone, chainPromise, onFulfilled, onRejected);\n }\n return chainPromise;\n };\n ZoneAwarePromise.prototype.catch = function (onRejected) {\n return this.then(null, onRejected);\n };\n ZoneAwarePromise.prototype.finally = function (onFinally) {\n var C = this.constructor[Symbol.species];\n if (!C || typeof C !== 'function') {\n C = ZoneAwarePromise;\n }\n var chainPromise = new C(noop);\n chainPromise[symbolFinally] = symbolFinally;\n var zone = Zone.current;\n if (this[symbolState] == UNRESOLVED) {\n this[symbolValue].push(zone, chainPromise, onFinally, onFinally);\n }\n else {\n scheduleResolveOrReject(this, zone, chainPromise, onFinally, onFinally);\n }\n return chainPromise;\n };\n return ZoneAwarePromise;\n }());\n // Protect against aggressive optimizers dropping seemingly unused properties.\n // E.g. Closure Compiler in advanced mode.\n ZoneAwarePromise['resolve'] = ZoneAwarePromise.resolve;\n ZoneAwarePromise['reject'] = ZoneAwarePromise.reject;\n ZoneAwarePromise['race'] = ZoneAwarePromise.race;\n ZoneAwarePromise['all'] = ZoneAwarePromise.all;\n var NativePromise = global[symbolPromise] = global['Promise'];\n global['Promise'] = ZoneAwarePromise;\n var symbolThenPatched = __symbol__('thenPatched');\n function patchThen(Ctor) {\n var proto = Ctor.prototype;\n var prop = ObjectGetOwnPropertyDescriptor(proto, 'then');\n if (prop && (prop.writable === false || !prop.configurable)) {\n // check Ctor.prototype.then propertyDescriptor is writable or not\n // in meteor env, writable is false, we should ignore such case\n return;\n }\n var originalThen = proto.then;\n // Keep a reference to the original method.\n proto[symbolThen] = originalThen;\n Ctor.prototype.then = function (onResolve, onReject) {\n var _this = this;\n var wrapped = new ZoneAwarePromise(function (resolve, reject) {\n originalThen.call(_this, resolve, reject);\n });\n return wrapped.then(onResolve, onReject);\n };\n Ctor[symbolThenPatched] = true;\n }\n api.patchThen = patchThen;\n function zoneify(fn) {\n return function (self, args) {\n var resultPromise = fn.apply(self, args);\n if (resultPromise instanceof ZoneAwarePromise) {\n return resultPromise;\n }\n var ctor = resultPromise.constructor;\n if (!ctor[symbolThenPatched]) {\n patchThen(ctor);\n }\n return resultPromise;\n };\n }\n if (NativePromise) {\n patchThen(NativePromise);\n patchMethod(global, 'fetch', function (delegate) { return zoneify(delegate); });\n }\n // This is not part of public API, but it is useful for tests, so we expose it.\n Promise[Zone.__symbol__('uncaughtPromiseErrors')] = _uncaughtPromiseErrors;\n return ZoneAwarePromise;\n });\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n // override Function.prototype.toString to make zone.js patched function\n // look like native function\n Zone.__load_patch('toString', function (global) {\n // patch Func.prototype.toString to let them look like native\n var originalFunctionToString = Function.prototype.toString;\n var ORIGINAL_DELEGATE_SYMBOL = zoneSymbol('OriginalDelegate');\n var PROMISE_SYMBOL = zoneSymbol('Promise');\n var ERROR_SYMBOL = zoneSymbol('Error');\n var newFunctionToString = function toString() {\n if (typeof this === 'function') {\n var originalDelegate = this[ORIGINAL_DELEGATE_SYMBOL];\n if (originalDelegate) {\n if (typeof originalDelegate === 'function') {\n return originalFunctionToString.call(originalDelegate);\n }\n else {\n return Object.prototype.toString.call(originalDelegate);\n }\n }\n if (this === Promise) {\n var nativePromise = global[PROMISE_SYMBOL];\n if (nativePromise) {\n return originalFunctionToString.call(nativePromise);\n }\n }\n if (this === Error) {\n var nativeError = global[ERROR_SYMBOL];\n if (nativeError) {\n return originalFunctionToString.call(nativeError);\n }\n }\n }\n return originalFunctionToString.call(this);\n };\n newFunctionToString[ORIGINAL_DELEGATE_SYMBOL] = originalFunctionToString;\n Function.prototype.toString = newFunctionToString;\n // patch Object.prototype.toString to let them look like native\n var originalObjectToString = Object.prototype.toString;\n var PROMISE_OBJECT_TO_STRING = '[object Promise]';\n Object.prototype.toString = function () {\n if (typeof Promise === 'function' && this instanceof Promise) {\n return PROMISE_OBJECT_TO_STRING;\n }\n return originalObjectToString.call(this);\n };\n });\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var passiveSupported = false;\n if (typeof window !== 'undefined') {\n try {\n var options = Object.defineProperty({}, 'passive', {\n get: function () {\n passiveSupported = true;\n }\n });\n window.addEventListener('test', options, options);\n window.removeEventListener('test', options, options);\n }\n catch (err) {\n passiveSupported = false;\n }\n }\n // an identifier to tell ZoneTask do not create a new invoke closure\n var OPTIMIZED_ZONE_EVENT_TASK_DATA = {\n useG: true\n };\n var zoneSymbolEventNames$1 = {};\n var globalSources = {};\n var EVENT_NAME_SYMBOL_REGX = new RegExp('^' + ZONE_SYMBOL_PREFIX + '(\\\\w+)(true|false)$');\n var IMMEDIATE_PROPAGATION_SYMBOL = zoneSymbol('propagationStopped');\n function prepareEventNames(eventName, eventNameToString) {\n var falseEventName = (eventNameToString ? eventNameToString(eventName) : eventName) + FALSE_STR;\n var trueEventName = (eventNameToString ? eventNameToString(eventName) : eventName) + TRUE_STR;\n var symbol = ZONE_SYMBOL_PREFIX + falseEventName;\n var symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;\n zoneSymbolEventNames$1[eventName] = {};\n zoneSymbolEventNames$1[eventName][FALSE_STR] = symbol;\n zoneSymbolEventNames$1[eventName][TRUE_STR] = symbolCapture;\n }\n function patchEventTarget(_global, apis, patchOptions) {\n var ADD_EVENT_LISTENER = (patchOptions && patchOptions.add) || ADD_EVENT_LISTENER_STR;\n var REMOVE_EVENT_LISTENER = (patchOptions && patchOptions.rm) || REMOVE_EVENT_LISTENER_STR;\n var LISTENERS_EVENT_LISTENER = (patchOptions && patchOptions.listeners) || 'eventListeners';\n var REMOVE_ALL_LISTENERS_EVENT_LISTENER = (patchOptions && patchOptions.rmAll) || 'removeAllListeners';\n var zoneSymbolAddEventListener = zoneSymbol(ADD_EVENT_LISTENER);\n var ADD_EVENT_LISTENER_SOURCE = '.' + ADD_EVENT_LISTENER + ':';\n var PREPEND_EVENT_LISTENER = 'prependListener';\n var PREPEND_EVENT_LISTENER_SOURCE = '.' + PREPEND_EVENT_LISTENER + ':';\n var invokeTask = function (task, target, event) {\n // for better performance, check isRemoved which is set\n // by removeEventListener\n if (task.isRemoved) {\n return;\n }\n var delegate = task.callback;\n if (typeof delegate === 'object' && delegate.handleEvent) {\n // create the bind version of handleEvent when invoke\n task.callback = function (event) { return delegate.handleEvent(event); };\n task.originalDelegate = delegate;\n }\n // invoke static task.invoke\n task.invoke(task, target, [event]);\n var options = task.options;\n if (options && typeof options === 'object' && options.once) {\n // if options.once is true, after invoke once remove listener here\n // only browser need to do this, nodejs eventEmitter will cal removeListener\n // inside EventEmitter.once\n var delegate_1 = task.originalDelegate ? task.originalDelegate : task.callback;\n target[REMOVE_EVENT_LISTENER].call(target, event.type, delegate_1, options);\n }\n };\n // global shared zoneAwareCallback to handle all event callback with capture = false\n var globalZoneAwareCallback = function (event) {\n // https://github.com/angular/zone.js/issues/911, in IE, sometimes\n // event will be undefined, so we need to use window.event\n event = event || _global.event;\n if (!event) {\n return;\n }\n // event.target is needed for Samsung TV and SourceBuffer\n // || global is needed https://github.com/angular/zone.js/issues/190\n var target = this || event.target || _global;\n var tasks = target[zoneSymbolEventNames$1[event.type][FALSE_STR]];\n if (tasks) {\n // invoke all tasks which attached to current target with given event.type and capture = false\n // for performance concern, if task.length === 1, just invoke\n if (tasks.length === 1) {\n invokeTask(tasks[0], target, event);\n }\n else {\n // https://github.com/angular/zone.js/issues/836\n // copy the tasks array before invoke, to avoid\n // the callback will remove itself or other listener\n var copyTasks = tasks.slice();\n for (var i = 0; i < copyTasks.length; i++) {\n if (event && event[IMMEDIATE_PROPAGATION_SYMBOL] === true) {\n break;\n }\n invokeTask(copyTasks[i], target, event);\n }\n }\n }\n };\n // global shared zoneAwareCallback to handle all event callback with capture = true\n var globalZoneAwareCaptureCallback = function (event) {\n // https://github.com/angular/zone.js/issues/911, in IE, sometimes\n // event will be undefined, so we need to use window.event\n event = event || _global.event;\n if (!event) {\n return;\n }\n // event.target is needed for Samsung TV and SourceBuffer\n // || global is needed https://github.com/angular/zone.js/issues/190\n var target = this || event.target || _global;\n var tasks = target[zoneSymbolEventNames$1[event.type][TRUE_STR]];\n if (tasks) {\n // invoke all tasks which attached to current target with given event.type and capture = false\n // for performance concern, if task.length === 1, just invoke\n if (tasks.length === 1) {\n invokeTask(tasks[0], target, event);\n }\n else {\n // https://github.com/angular/zone.js/issues/836\n // copy the tasks array before invoke, to avoid\n // the callback will remove itself or other listener\n var copyTasks = tasks.slice();\n for (var i = 0; i < copyTasks.length; i++) {\n if (event && event[IMMEDIATE_PROPAGATION_SYMBOL] === true) {\n break;\n }\n invokeTask(copyTasks[i], target, event);\n }\n }\n }\n };\n function patchEventTargetMethods(obj, patchOptions) {\n if (!obj) {\n return false;\n }\n var useGlobalCallback = true;\n if (patchOptions && patchOptions.useG !== undefined) {\n useGlobalCallback = patchOptions.useG;\n }\n var validateHandler = patchOptions && patchOptions.vh;\n var checkDuplicate = true;\n if (patchOptions && patchOptions.chkDup !== undefined) {\n checkDuplicate = patchOptions.chkDup;\n }\n var returnTarget = false;\n if (patchOptions && patchOptions.rt !== undefined) {\n returnTarget = patchOptions.rt;\n }\n var proto = obj;\n while (proto && !proto.hasOwnProperty(ADD_EVENT_LISTENER)) {\n proto = ObjectGetPrototypeOf(proto);\n }\n if (!proto && obj[ADD_EVENT_LISTENER]) {\n // somehow we did not find it, but we can see it. This happens on IE for Window properties.\n proto = obj;\n }\n if (!proto) {\n return false;\n }\n if (proto[zoneSymbolAddEventListener]) {\n return false;\n }\n var eventNameToString = patchOptions && patchOptions.eventNameToString;\n // a shared global taskData to pass data for scheduleEventTask\n // so we do not need to create a new object just for pass some data\n var taskData = {};\n var nativeAddEventListener = proto[zoneSymbolAddEventListener] = proto[ADD_EVENT_LISTENER];\n var nativeRemoveEventListener = proto[zoneSymbol(REMOVE_EVENT_LISTENER)] =\n proto[REMOVE_EVENT_LISTENER];\n var nativeListeners = proto[zoneSymbol(LISTENERS_EVENT_LISTENER)] =\n proto[LISTENERS_EVENT_LISTENER];\n var nativeRemoveAllListeners = proto[zoneSymbol(REMOVE_ALL_LISTENERS_EVENT_LISTENER)] =\n proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER];\n var nativePrependEventListener;\n if (patchOptions && patchOptions.prepend) {\n nativePrependEventListener = proto[zoneSymbol(patchOptions.prepend)] =\n proto[patchOptions.prepend];\n }\n /**\n * This util function will build an option object with passive option\n * to handle all possible input from the user.\n */\n function buildEventListenerOptions(options, passive) {\n if (!passiveSupported && typeof options === 'object' && options) {\n // doesn't support passive but user want to pass an object as options.\n // this will not work on some old browser, so we just pass a boolean\n // as useCapture parameter\n return !!options.capture;\n }\n if (!passiveSupported || !passive) {\n return options;\n }\n if (typeof options === 'boolean') {\n return { capture: options, passive: true };\n }\n if (!options) {\n return { passive: true };\n }\n if (typeof options === 'object' && options.passive !== false) {\n return Object.assign(Object.assign({}, options), { passive: true });\n }\n return options;\n }\n var customScheduleGlobal = function (task) {\n // if there is already a task for the eventName + capture,\n // just return, because we use the shared globalZoneAwareCallback here.\n if (taskData.isExisting) {\n return;\n }\n return nativeAddEventListener.call(taskData.target, taskData.eventName, taskData.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, taskData.options);\n };\n var customCancelGlobal = function (task) {\n // if task is not marked as isRemoved, this call is directly\n // from Zone.prototype.cancelTask, we should remove the task\n // from tasksList of target first\n if (!task.isRemoved) {\n var symbolEventNames = zoneSymbolEventNames$1[task.eventName];\n var symbolEventName = void 0;\n if (symbolEventNames) {\n symbolEventName = symbolEventNames[task.capture ? TRUE_STR : FALSE_STR];\n }\n var existingTasks = symbolEventName && task.target[symbolEventName];\n if (existingTasks) {\n for (var i = 0; i < existingTasks.length; i++) {\n var existingTask = existingTasks[i];\n if (existingTask === task) {\n existingTasks.splice(i, 1);\n // set isRemoved to data for faster invokeTask check\n task.isRemoved = true;\n if (existingTasks.length === 0) {\n // all tasks for the eventName + capture have gone,\n // remove globalZoneAwareCallback and remove the task cache from target\n task.allRemoved = true;\n task.target[symbolEventName] = null;\n }\n break;\n }\n }\n }\n }\n // if all tasks for the eventName + capture have gone,\n // we will really remove the global event callback,\n // if not, return\n if (!task.allRemoved) {\n return;\n }\n return nativeRemoveEventListener.call(task.target, task.eventName, task.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, task.options);\n };\n var customScheduleNonGlobal = function (task) {\n return nativeAddEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options);\n };\n var customSchedulePrepend = function (task) {\n return nativePrependEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options);\n };\n var customCancelNonGlobal = function (task) {\n return nativeRemoveEventListener.call(task.target, task.eventName, task.invoke, task.options);\n };\n var customSchedule = useGlobalCallback ? customScheduleGlobal : customScheduleNonGlobal;\n var customCancel = useGlobalCallback ? customCancelGlobal : customCancelNonGlobal;\n var compareTaskCallbackVsDelegate = function (task, delegate) {\n var typeOfDelegate = typeof delegate;\n return (typeOfDelegate === 'function' && task.callback === delegate) ||\n (typeOfDelegate === 'object' && task.originalDelegate === delegate);\n };\n var compare = (patchOptions && patchOptions.diff) ? patchOptions.diff : compareTaskCallbackVsDelegate;\n var unpatchedEvents = Zone[zoneSymbol('UNPATCHED_EVENTS')];\n var passiveEvents = _global[zoneSymbol('PASSIVE_EVENTS')];\n var makeAddListener = function (nativeListener, addSource, customScheduleFn, customCancelFn, returnTarget, prepend) {\n if (returnTarget === void 0) { returnTarget = false; }\n if (prepend === void 0) { prepend = false; }\n return function () {\n var target = this || _global;\n var eventName = arguments[0];\n if (patchOptions && patchOptions.transferEventName) {\n eventName = patchOptions.transferEventName(eventName);\n }\n var delegate = arguments[1];\n if (!delegate) {\n return nativeListener.apply(this, arguments);\n }\n if (isNode && eventName === 'uncaughtException') {\n // don't patch uncaughtException of nodejs to prevent endless loop\n return nativeListener.apply(this, arguments);\n }\n // don't create the bind delegate function for handleEvent\n // case here to improve addEventListener performance\n // we will create the bind delegate when invoke\n var isHandleEvent = false;\n if (typeof delegate !== 'function') {\n if (!delegate.handleEvent) {\n return nativeListener.apply(this, arguments);\n }\n isHandleEvent = true;\n }\n if (validateHandler && !validateHandler(nativeListener, delegate, target, arguments)) {\n return;\n }\n var passive = passiveSupported && !!passiveEvents && passiveEvents.indexOf(eventName) !== -1;\n var options = buildEventListenerOptions(arguments[2], passive);\n if (unpatchedEvents) {\n // check upatched list\n for (var i = 0; i < unpatchedEvents.length; i++) {\n if (eventName === unpatchedEvents[i]) {\n if (passive) {\n return nativeListener.call(target, eventName, delegate, options);\n }\n else {\n return nativeListener.apply(this, arguments);\n }\n }\n }\n }\n var capture = !options ? false : typeof options === 'boolean' ? true : options.capture;\n var once = options && typeof options === 'object' ? options.once : false;\n var zone = Zone.current;\n var symbolEventNames = zoneSymbolEventNames$1[eventName];\n if (!symbolEventNames) {\n prepareEventNames(eventName, eventNameToString);\n symbolEventNames = zoneSymbolEventNames$1[eventName];\n }\n var symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR];\n var existingTasks = target[symbolEventName];\n var isExisting = false;\n if (existingTasks) {\n // already have task registered\n isExisting = true;\n if (checkDuplicate) {\n for (var i = 0; i < existingTasks.length; i++) {\n if (compare(existingTasks[i], delegate)) {\n // same callback, same capture, same event name, just return\n return;\n }\n }\n }\n }\n else {\n existingTasks = target[symbolEventName] = [];\n }\n var source;\n var constructorName = target.constructor['name'];\n var targetSource = globalSources[constructorName];\n if (targetSource) {\n source = targetSource[eventName];\n }\n if (!source) {\n source = constructorName + addSource +\n (eventNameToString ? eventNameToString(eventName) : eventName);\n }\n // do not create a new object as task.data to pass those things\n // just use the global shared one\n taskData.options = options;\n if (once) {\n // if addEventListener with once options, we don't pass it to\n // native addEventListener, instead we keep the once setting\n // and handle ourselves.\n taskData.options.once = false;\n }\n taskData.target = target;\n taskData.capture = capture;\n taskData.eventName = eventName;\n taskData.isExisting = isExisting;\n var data = useGlobalCallback ? OPTIMIZED_ZONE_EVENT_TASK_DATA : undefined;\n // keep taskData into data to allow onScheduleEventTask to access the task information\n if (data) {\n data.taskData = taskData;\n }\n var task = zone.scheduleEventTask(source, delegate, data, customScheduleFn, customCancelFn);\n // should clear taskData.target to avoid memory leak\n // issue, https://github.com/angular/angular/issues/20442\n taskData.target = null;\n // need to clear up taskData because it is a global object\n if (data) {\n data.taskData = null;\n }\n // have to save those information to task in case\n // application may call task.zone.cancelTask() directly\n if (once) {\n options.once = true;\n }\n if (!(!passiveSupported && typeof task.options === 'boolean')) {\n // if not support passive, and we pass an option object\n // to addEventListener, we should save the options to task\n task.options = options;\n }\n task.target = target;\n task.capture = capture;\n task.eventName = eventName;\n if (isHandleEvent) {\n // save original delegate for compare to check duplicate\n task.originalDelegate = delegate;\n }\n if (!prepend) {\n existingTasks.push(task);\n }\n else {\n existingTasks.unshift(task);\n }\n if (returnTarget) {\n return target;\n }\n };\n };\n proto[ADD_EVENT_LISTENER] = makeAddListener(nativeAddEventListener, ADD_EVENT_LISTENER_SOURCE, customSchedule, customCancel, returnTarget);\n if (nativePrependEventListener) {\n proto[PREPEND_EVENT_LISTENER] = makeAddListener(nativePrependEventListener, PREPEND_EVENT_LISTENER_SOURCE, customSchedulePrepend, customCancel, returnTarget, true);\n }\n proto[REMOVE_EVENT_LISTENER] = function () {\n var target = this || _global;\n var eventName = arguments[0];\n if (patchOptions && patchOptions.transferEventName) {\n eventName = patchOptions.transferEventName(eventName);\n }\n var options = arguments[2];\n var capture = !options ? false : typeof options === 'boolean' ? true : options.capture;\n var delegate = arguments[1];\n if (!delegate) {\n return nativeRemoveEventListener.apply(this, arguments);\n }\n if (validateHandler &&\n !validateHandler(nativeRemoveEventListener, delegate, target, arguments)) {\n return;\n }\n var symbolEventNames = zoneSymbolEventNames$1[eventName];\n var symbolEventName;\n if (symbolEventNames) {\n symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR];\n }\n var existingTasks = symbolEventName && target[symbolEventName];\n if (existingTasks) {\n for (var i = 0; i < existingTasks.length; i++) {\n var existingTask = existingTasks[i];\n if (compare(existingTask, delegate)) {\n existingTasks.splice(i, 1);\n // set isRemoved to data for faster invokeTask check\n existingTask.isRemoved = true;\n if (existingTasks.length === 0) {\n // all tasks for the eventName + capture have gone,\n // remove globalZoneAwareCallback and remove the task cache from target\n existingTask.allRemoved = true;\n target[symbolEventName] = null;\n // in the target, we have an event listener which is added by on_property\n // such as target.onclick = function() {}, so we need to clear this internal\n // property too if all delegates all removed\n if (typeof eventName === 'string') {\n var onPropertySymbol = ZONE_SYMBOL_PREFIX + 'ON_PROPERTY' + eventName;\n target[onPropertySymbol] = null;\n }\n }\n existingTask.zone.cancelTask(existingTask);\n if (returnTarget) {\n return target;\n }\n return;\n }\n }\n }\n // issue 930, didn't find the event name or callback\n // from zone kept existingTasks, the callback maybe\n // added outside of zone, we need to call native removeEventListener\n // to try to remove it.\n return nativeRemoveEventListener.apply(this, arguments);\n };\n proto[LISTENERS_EVENT_LISTENER] = function () {\n var target = this || _global;\n var eventName = arguments[0];\n if (patchOptions && patchOptions.transferEventName) {\n eventName = patchOptions.transferEventName(eventName);\n }\n var listeners = [];\n var tasks = findEventTasks(target, eventNameToString ? eventNameToString(eventName) : eventName);\n for (var i = 0; i < tasks.length; i++) {\n var task = tasks[i];\n var delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n listeners.push(delegate);\n }\n return listeners;\n };\n proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER] = function () {\n var target = this || _global;\n var eventName = arguments[0];\n if (!eventName) {\n var keys = Object.keys(target);\n for (var i = 0; i < keys.length; i++) {\n var prop = keys[i];\n var match = EVENT_NAME_SYMBOL_REGX.exec(prop);\n var evtName = match && match[1];\n // in nodejs EventEmitter, removeListener event is\n // used for monitoring the removeListener call,\n // so just keep removeListener eventListener until\n // all other eventListeners are removed\n if (evtName && evtName !== 'removeListener') {\n this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, evtName);\n }\n }\n // remove removeListener listener finally\n this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, 'removeListener');\n }\n else {\n if (patchOptions && patchOptions.transferEventName) {\n eventName = patchOptions.transferEventName(eventName);\n }\n var symbolEventNames = zoneSymbolEventNames$1[eventName];\n if (symbolEventNames) {\n var symbolEventName = symbolEventNames[FALSE_STR];\n var symbolCaptureEventName = symbolEventNames[TRUE_STR];\n var tasks = target[symbolEventName];\n var captureTasks = target[symbolCaptureEventName];\n if (tasks) {\n var removeTasks = tasks.slice();\n for (var i = 0; i < removeTasks.length; i++) {\n var task = removeTasks[i];\n var delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options);\n }\n }\n if (captureTasks) {\n var removeTasks = captureTasks.slice();\n for (var i = 0; i < removeTasks.length; i++) {\n var task = removeTasks[i];\n var delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options);\n }\n }\n }\n }\n if (returnTarget) {\n return this;\n }\n };\n // for native toString patch\n attachOriginToPatched(proto[ADD_EVENT_LISTENER], nativeAddEventListener);\n attachOriginToPatched(proto[REMOVE_EVENT_LISTENER], nativeRemoveEventListener);\n if (nativeRemoveAllListeners) {\n attachOriginToPatched(proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER], nativeRemoveAllListeners);\n }\n if (nativeListeners) {\n attachOriginToPatched(proto[LISTENERS_EVENT_LISTENER], nativeListeners);\n }\n return true;\n }\n var results = [];\n for (var i = 0; i < apis.length; i++) {\n results[i] = patchEventTargetMethods(apis[i], patchOptions);\n }\n return results;\n }\n function findEventTasks(target, eventName) {\n if (!eventName) {\n var foundTasks = [];\n for (var prop in target) {\n var match = EVENT_NAME_SYMBOL_REGX.exec(prop);\n var evtName = match && match[1];\n if (evtName && (!eventName || evtName === eventName)) {\n var tasks = target[prop];\n if (tasks) {\n for (var i = 0; i < tasks.length; i++) {\n foundTasks.push(tasks[i]);\n }\n }\n }\n }\n return foundTasks;\n }\n var symbolEventName = zoneSymbolEventNames$1[eventName];\n if (!symbolEventName) {\n prepareEventNames(eventName);\n symbolEventName = zoneSymbolEventNames$1[eventName];\n }\n var captureFalseTasks = target[symbolEventName[FALSE_STR]];\n var captureTrueTasks = target[symbolEventName[TRUE_STR]];\n if (!captureFalseTasks) {\n return captureTrueTasks ? captureTrueTasks.slice() : [];\n }\n else {\n return captureTrueTasks ? captureFalseTasks.concat(captureTrueTasks) :\n captureFalseTasks.slice();\n }\n }\n function patchEventPrototype(global, api) {\n var Event = global['Event'];\n if (Event && Event.prototype) {\n api.patchMethod(Event.prototype, 'stopImmediatePropagation', function (delegate) { return function (self, args) {\n self[IMMEDIATE_PROPAGATION_SYMBOL] = true;\n // we need to call the native stopImmediatePropagation\n // in case in some hybrid application, some part of\n // application will be controlled by zone, some are not\n delegate && delegate.apply(self, args);\n }; });\n }\n }\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function patchCallbacks(api, target, targetName, method, callbacks) {\n var symbol = Zone.__symbol__(method);\n if (target[symbol]) {\n return;\n }\n var nativeDelegate = target[symbol] = target[method];\n target[method] = function (name, opts, options) {\n if (opts && opts.prototype) {\n callbacks.forEach(function (callback) {\n var source = targetName + \".\" + method + \"::\" + callback;\n var prototype = opts.prototype;\n if (prototype.hasOwnProperty(callback)) {\n var descriptor = api.ObjectGetOwnPropertyDescriptor(prototype, callback);\n if (descriptor && descriptor.value) {\n descriptor.value = api.wrapWithCurrentZone(descriptor.value, source);\n api._redefineProperty(opts.prototype, callback, descriptor);\n }\n else if (prototype[callback]) {\n prototype[callback] = api.wrapWithCurrentZone(prototype[callback], source);\n }\n }\n else if (prototype[callback]) {\n prototype[callback] = api.wrapWithCurrentZone(prototype[callback], source);\n }\n });\n }\n return nativeDelegate.call(target, name, opts, options);\n };\n api.attachOriginToPatched(target[method], nativeDelegate);\n }\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var globalEventHandlersEventNames = [\n 'abort',\n 'animationcancel',\n 'animationend',\n 'animationiteration',\n 'auxclick',\n 'beforeinput',\n 'blur',\n 'cancel',\n 'canplay',\n 'canplaythrough',\n 'change',\n 'compositionstart',\n 'compositionupdate',\n 'compositionend',\n 'cuechange',\n 'click',\n 'close',\n 'contextmenu',\n 'curechange',\n 'dblclick',\n 'drag',\n 'dragend',\n 'dragenter',\n 'dragexit',\n 'dragleave',\n 'dragover',\n 'drop',\n 'durationchange',\n 'emptied',\n 'ended',\n 'error',\n 'focus',\n 'focusin',\n 'focusout',\n 'gotpointercapture',\n 'input',\n 'invalid',\n 'keydown',\n 'keypress',\n 'keyup',\n 'load',\n 'loadstart',\n 'loadeddata',\n 'loadedmetadata',\n 'lostpointercapture',\n 'mousedown',\n 'mouseenter',\n 'mouseleave',\n 'mousemove',\n 'mouseout',\n 'mouseover',\n 'mouseup',\n 'mousewheel',\n 'orientationchange',\n 'pause',\n 'play',\n 'playing',\n 'pointercancel',\n 'pointerdown',\n 'pointerenter',\n 'pointerleave',\n 'pointerlockchange',\n 'mozpointerlockchange',\n 'webkitpointerlockerchange',\n 'pointerlockerror',\n 'mozpointerlockerror',\n 'webkitpointerlockerror',\n 'pointermove',\n 'pointout',\n 'pointerover',\n 'pointerup',\n 'progress',\n 'ratechange',\n 'reset',\n 'resize',\n 'scroll',\n 'seeked',\n 'seeking',\n 'select',\n 'selectionchange',\n 'selectstart',\n 'show',\n 'sort',\n 'stalled',\n 'submit',\n 'suspend',\n 'timeupdate',\n 'volumechange',\n 'touchcancel',\n 'touchmove',\n 'touchstart',\n 'touchend',\n 'transitioncancel',\n 'transitionend',\n 'waiting',\n 'wheel'\n ];\n var documentEventNames = [\n 'afterscriptexecute', 'beforescriptexecute', 'DOMContentLoaded', 'freeze', 'fullscreenchange',\n 'mozfullscreenchange', 'webkitfullscreenchange', 'msfullscreenchange', 'fullscreenerror',\n 'mozfullscreenerror', 'webkitfullscreenerror', 'msfullscreenerror', 'readystatechange',\n 'visibilitychange', 'resume'\n ];\n var windowEventNames = [\n 'absolutedeviceorientation',\n 'afterinput',\n 'afterprint',\n 'appinstalled',\n 'beforeinstallprompt',\n 'beforeprint',\n 'beforeunload',\n 'devicelight',\n 'devicemotion',\n 'deviceorientation',\n 'deviceorientationabsolute',\n 'deviceproximity',\n 'hashchange',\n 'languagechange',\n 'message',\n 'mozbeforepaint',\n 'offline',\n 'online',\n 'paint',\n 'pageshow',\n 'pagehide',\n 'popstate',\n 'rejectionhandled',\n 'storage',\n 'unhandledrejection',\n 'unload',\n 'userproximity',\n 'vrdisplayconnected',\n 'vrdisplaydisconnected',\n 'vrdisplaypresentchange'\n ];\n var htmlElementEventNames = [\n 'beforecopy', 'beforecut', 'beforepaste', 'copy', 'cut', 'paste', 'dragstart', 'loadend',\n 'animationstart', 'search', 'transitionrun', 'transitionstart', 'webkitanimationend',\n 'webkitanimationiteration', 'webkitanimationstart', 'webkittransitionend'\n ];\n var mediaElementEventNames = ['encrypted', 'waitingforkey', 'msneedkey', 'mozinterruptbegin', 'mozinterruptend'];\n var ieElementEventNames = [\n 'activate',\n 'afterupdate',\n 'ariarequest',\n 'beforeactivate',\n 'beforedeactivate',\n 'beforeeditfocus',\n 'beforeupdate',\n 'cellchange',\n 'controlselect',\n 'dataavailable',\n 'datasetchanged',\n 'datasetcomplete',\n 'errorupdate',\n 'filterchange',\n 'layoutcomplete',\n 'losecapture',\n 'move',\n 'moveend',\n 'movestart',\n 'propertychange',\n 'resizeend',\n 'resizestart',\n 'rowenter',\n 'rowexit',\n 'rowsdelete',\n 'rowsinserted',\n 'command',\n 'compassneedscalibration',\n 'deactivate',\n 'help',\n 'mscontentzoom',\n 'msmanipulationstatechanged',\n 'msgesturechange',\n 'msgesturedoubletap',\n 'msgestureend',\n 'msgesturehold',\n 'msgesturestart',\n 'msgesturetap',\n 'msgotpointercapture',\n 'msinertiastart',\n 'mslostpointercapture',\n 'mspointercancel',\n 'mspointerdown',\n 'mspointerenter',\n 'mspointerhover',\n 'mspointerleave',\n 'mspointermove',\n 'mspointerout',\n 'mspointerover',\n 'mspointerup',\n 'pointerout',\n 'mssitemodejumplistitemremoved',\n 'msthumbnailclick',\n 'stop',\n 'storagecommit'\n ];\n var webglEventNames = ['webglcontextrestored', 'webglcontextlost', 'webglcontextcreationerror'];\n var formEventNames = ['autocomplete', 'autocompleteerror'];\n var detailEventNames = ['toggle'];\n var frameEventNames = ['load'];\n var frameSetEventNames = ['blur', 'error', 'focus', 'load', 'resize', 'scroll', 'messageerror'];\n var marqueeEventNames = ['bounce', 'finish', 'start'];\n var XMLHttpRequestEventNames = [\n 'loadstart', 'progress', 'abort', 'error', 'load', 'progress', 'timeout', 'loadend',\n 'readystatechange'\n ];\n var IDBIndexEventNames = ['upgradeneeded', 'complete', 'abort', 'success', 'error', 'blocked', 'versionchange', 'close'];\n var websocketEventNames = ['close', 'error', 'open', 'message'];\n var workerEventNames = ['error', 'message'];\n var eventNames = globalEventHandlersEventNames.concat(webglEventNames, formEventNames, detailEventNames, documentEventNames, windowEventNames, htmlElementEventNames, ieElementEventNames);\n function filterProperties(target, onProperties, ignoreProperties) {\n if (!ignoreProperties || ignoreProperties.length === 0) {\n return onProperties;\n }\n var tip = ignoreProperties.filter(function (ip) { return ip.target === target; });\n if (!tip || tip.length === 0) {\n return onProperties;\n }\n var targetIgnoreProperties = tip[0].ignoreProperties;\n return onProperties.filter(function (op) { return targetIgnoreProperties.indexOf(op) === -1; });\n }\n function patchFilteredProperties(target, onProperties, ignoreProperties, prototype) {\n // check whether target is available, sometimes target will be undefined\n // because different browser or some 3rd party plugin.\n if (!target) {\n return;\n }\n var filteredProperties = filterProperties(target, onProperties, ignoreProperties);\n patchOnProperties(target, filteredProperties, prototype);\n }\n function propertyDescriptorPatch(api, _global) {\n if (isNode && !isMix) {\n return;\n }\n if (Zone[api.symbol('patchEvents')]) {\n // events are already been patched by legacy patch.\n return;\n }\n var supportsWebSocket = typeof WebSocket !== 'undefined';\n var ignoreProperties = _global['__Zone_ignore_on_properties'];\n // for browsers that we can patch the descriptor: Chrome & Firefox\n if (isBrowser) {\n var internalWindow_1 = window;\n var ignoreErrorProperties = isIE() ? [{ target: internalWindow_1, ignoreProperties: ['error'] }] : [];\n // in IE/Edge, onProp not exist in window object, but in WindowPrototype\n // so we need to pass WindowPrototype to check onProp exist or not\n patchFilteredProperties(internalWindow_1, eventNames.concat(['messageerror']), ignoreProperties ? ignoreProperties.concat(ignoreErrorProperties) : ignoreProperties, ObjectGetPrototypeOf(internalWindow_1));\n patchFilteredProperties(Document.prototype, eventNames, ignoreProperties);\n if (typeof internalWindow_1['SVGElement'] !== 'undefined') {\n patchFilteredProperties(internalWindow_1['SVGElement'].prototype, eventNames, ignoreProperties);\n }\n patchFilteredProperties(Element.prototype, eventNames, ignoreProperties);\n patchFilteredProperties(HTMLElement.prototype, eventNames, ignoreProperties);\n patchFilteredProperties(HTMLMediaElement.prototype, mediaElementEventNames, ignoreProperties);\n patchFilteredProperties(HTMLFrameSetElement.prototype, windowEventNames.concat(frameSetEventNames), ignoreProperties);\n patchFilteredProperties(HTMLBodyElement.prototype, windowEventNames.concat(frameSetEventNames), ignoreProperties);\n patchFilteredProperties(HTMLFrameElement.prototype, frameEventNames, ignoreProperties);\n patchFilteredProperties(HTMLIFrameElement.prototype, frameEventNames, ignoreProperties);\n var HTMLMarqueeElement_1 = internalWindow_1['HTMLMarqueeElement'];\n if (HTMLMarqueeElement_1) {\n patchFilteredProperties(HTMLMarqueeElement_1.prototype, marqueeEventNames, ignoreProperties);\n }\n var Worker_1 = internalWindow_1['Worker'];\n if (Worker_1) {\n patchFilteredProperties(Worker_1.prototype, workerEventNames, ignoreProperties);\n }\n }\n var XMLHttpRequest = _global['XMLHttpRequest'];\n if (XMLHttpRequest) {\n // XMLHttpRequest is not available in ServiceWorker, so we need to check here\n patchFilteredProperties(XMLHttpRequest.prototype, XMLHttpRequestEventNames, ignoreProperties);\n }\n var XMLHttpRequestEventTarget = _global['XMLHttpRequestEventTarget'];\n if (XMLHttpRequestEventTarget) {\n patchFilteredProperties(XMLHttpRequestEventTarget && XMLHttpRequestEventTarget.prototype, XMLHttpRequestEventNames, ignoreProperties);\n }\n if (typeof IDBIndex !== 'undefined') {\n patchFilteredProperties(IDBIndex.prototype, IDBIndexEventNames, ignoreProperties);\n patchFilteredProperties(IDBRequest.prototype, IDBIndexEventNames, ignoreProperties);\n patchFilteredProperties(IDBOpenDBRequest.prototype, IDBIndexEventNames, ignoreProperties);\n patchFilteredProperties(IDBDatabase.prototype, IDBIndexEventNames, ignoreProperties);\n patchFilteredProperties(IDBTransaction.prototype, IDBIndexEventNames, ignoreProperties);\n patchFilteredProperties(IDBCursor.prototype, IDBIndexEventNames, ignoreProperties);\n }\n if (supportsWebSocket) {\n patchFilteredProperties(WebSocket.prototype, websocketEventNames, ignoreProperties);\n }\n }\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n Zone.__load_patch('util', function (global, Zone, api) {\n api.patchOnProperties = patchOnProperties;\n api.patchMethod = patchMethod;\n api.bindArguments = bindArguments;\n api.patchMacroTask = patchMacroTask;\n // In earlier version of zone.js (<0.9.0), we use env name `__zone_symbol__BLACK_LISTED_EVENTS` to\n // define which events will not be patched by `Zone.js`.\n // In newer version (>=0.9.0), we change the env name to `__zone_symbol__UNPATCHED_EVENTS` to keep\n // the name consistent with angular repo.\n // The `__zone_symbol__BLACK_LISTED_EVENTS` is deprecated, but it is still be supported for\n // backwards compatibility.\n var SYMBOL_BLACK_LISTED_EVENTS = Zone.__symbol__('BLACK_LISTED_EVENTS');\n var SYMBOL_UNPATCHED_EVENTS = Zone.__symbol__('UNPATCHED_EVENTS');\n if (global[SYMBOL_UNPATCHED_EVENTS]) {\n global[SYMBOL_BLACK_LISTED_EVENTS] = global[SYMBOL_UNPATCHED_EVENTS];\n }\n if (global[SYMBOL_BLACK_LISTED_EVENTS]) {\n Zone[SYMBOL_BLACK_LISTED_EVENTS] = Zone[SYMBOL_UNPATCHED_EVENTS] =\n global[SYMBOL_BLACK_LISTED_EVENTS];\n }\n api.patchEventPrototype = patchEventPrototype;\n api.patchEventTarget = patchEventTarget;\n api.isIEOrEdge = isIEOrEdge;\n api.ObjectDefineProperty = ObjectDefineProperty;\n api.ObjectGetOwnPropertyDescriptor = ObjectGetOwnPropertyDescriptor;\n api.ObjectCreate = ObjectCreate;\n api.ArraySlice = ArraySlice;\n api.patchClass = patchClass;\n api.wrapWithCurrentZone = wrapWithCurrentZone;\n api.filterProperties = filterProperties;\n api.attachOriginToPatched = attachOriginToPatched;\n api._redefineProperty = Object.defineProperty;\n api.patchCallbacks = patchCallbacks;\n api.getGlobalObjects = function () { return ({\n globalSources: globalSources,\n zoneSymbolEventNames: zoneSymbolEventNames$1,\n eventNames: eventNames,\n isBrowser: isBrowser,\n isMix: isMix,\n isNode: isNode,\n TRUE_STR: TRUE_STR,\n FALSE_STR: FALSE_STR,\n ZONE_SYMBOL_PREFIX: ZONE_SYMBOL_PREFIX,\n ADD_EVENT_LISTENER_STR: ADD_EVENT_LISTENER_STR,\n REMOVE_EVENT_LISTENER_STR: REMOVE_EVENT_LISTENER_STR\n }); };\n });\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /*\n * This is necessary for Chrome and Chrome mobile, to enable\n * things like redefining `createdCallback` on an element.\n */\n var zoneSymbol$1;\n var _defineProperty;\n var _getOwnPropertyDescriptor;\n var _create;\n var unconfigurablesKey;\n function propertyPatch() {\n zoneSymbol$1 = Zone.__symbol__;\n _defineProperty = Object[zoneSymbol$1('defineProperty')] = Object.defineProperty;\n _getOwnPropertyDescriptor = Object[zoneSymbol$1('getOwnPropertyDescriptor')] =\n Object.getOwnPropertyDescriptor;\n _create = Object.create;\n unconfigurablesKey = zoneSymbol$1('unconfigurables');\n Object.defineProperty = function (obj, prop, desc) {\n if (isUnconfigurable(obj, prop)) {\n throw new TypeError('Cannot assign to read only property \\'' + prop + '\\' of ' + obj);\n }\n var originalConfigurableFlag = desc.configurable;\n if (prop !== 'prototype') {\n desc = rewriteDescriptor(obj, prop, desc);\n }\n return _tryDefineProperty(obj, prop, desc, originalConfigurableFlag);\n };\n Object.defineProperties = function (obj, props) {\n Object.keys(props).forEach(function (prop) {\n Object.defineProperty(obj, prop, props[prop]);\n });\n return obj;\n };\n Object.create = function (obj, proto) {\n if (typeof proto === 'object' && !Object.isFrozen(proto)) {\n Object.keys(proto).forEach(function (prop) {\n proto[prop] = rewriteDescriptor(obj, prop, proto[prop]);\n });\n }\n return _create(obj, proto);\n };\n Object.getOwnPropertyDescriptor = function (obj, prop) {\n var desc = _getOwnPropertyDescriptor(obj, prop);\n if (desc && isUnconfigurable(obj, prop)) {\n desc.configurable = false;\n }\n return desc;\n };\n }\n function _redefineProperty(obj, prop, desc) {\n var originalConfigurableFlag = desc.configurable;\n desc = rewriteDescriptor(obj, prop, desc);\n return _tryDefineProperty(obj, prop, desc, originalConfigurableFlag);\n }\n function isUnconfigurable(obj, prop) {\n return obj && obj[unconfigurablesKey] && obj[unconfigurablesKey][prop];\n }\n function rewriteDescriptor(obj, prop, desc) {\n // issue-927, if the desc is frozen, don't try to change the desc\n if (!Object.isFrozen(desc)) {\n desc.configurable = true;\n }\n if (!desc.configurable) {\n // issue-927, if the obj is frozen, don't try to set the desc to obj\n if (!obj[unconfigurablesKey] && !Object.isFrozen(obj)) {\n _defineProperty(obj, unconfigurablesKey, { writable: true, value: {} });\n }\n if (obj[unconfigurablesKey]) {\n obj[unconfigurablesKey][prop] = true;\n }\n }\n return desc;\n }\n function _tryDefineProperty(obj, prop, desc, originalConfigurableFlag) {\n try {\n return _defineProperty(obj, prop, desc);\n }\n catch (error) {\n if (desc.configurable) {\n // In case of errors, when the configurable flag was likely set by rewriteDescriptor(), let's\n // retry with the original flag value\n if (typeof originalConfigurableFlag == 'undefined') {\n delete desc.configurable;\n }\n else {\n desc.configurable = originalConfigurableFlag;\n }\n try {\n return _defineProperty(obj, prop, desc);\n }\n catch (error) {\n var swallowError = false;\n if (prop === 'createdCallback' || prop === 'attachedCallback' ||\n prop === 'detachedCallback' || prop === 'attributeChangedCallback') {\n // We only swallow the error in registerElement patch\n // this is the work around since some applications\n // fail if we throw the error\n swallowError = true;\n }\n if (!swallowError) {\n throw error;\n }\n // TODO: @JiaLiPassion, Some application such as `registerElement` patch\n // still need to swallow the error, in the future after these applications\n // are updated, the following logic can be removed.\n var descJson = null;\n try {\n descJson = JSON.stringify(desc);\n }\n catch (error) {\n descJson = desc.toString();\n }\n console.log(\"Attempting to configure '\" + prop + \"' with descriptor '\" + descJson + \"' on object '\" + obj + \"' and got error, giving up: \" + error);\n }\n }\n else {\n throw error;\n }\n }\n }\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function eventTargetLegacyPatch(_global, api) {\n var _a = api.getGlobalObjects(), eventNames = _a.eventNames, globalSources = _a.globalSources, zoneSymbolEventNames = _a.zoneSymbolEventNames, TRUE_STR = _a.TRUE_STR, FALSE_STR = _a.FALSE_STR, ZONE_SYMBOL_PREFIX = _a.ZONE_SYMBOL_PREFIX;\n var WTF_ISSUE_555 = 'Anchor,Area,Audio,BR,Base,BaseFont,Body,Button,Canvas,Content,DList,Directory,Div,Embed,FieldSet,Font,Form,Frame,FrameSet,HR,Head,Heading,Html,IFrame,Image,Input,Keygen,LI,Label,Legend,Link,Map,Marquee,Media,Menu,Meta,Meter,Mod,OList,Object,OptGroup,Option,Output,Paragraph,Pre,Progress,Quote,Script,Select,Source,Span,Style,TableCaption,TableCell,TableCol,Table,TableRow,TableSection,TextArea,Title,Track,UList,Unknown,Video';\n var NO_EVENT_TARGET = 'ApplicationCache,EventSource,FileReader,InputMethodContext,MediaController,MessagePort,Node,Performance,SVGElementInstance,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebKitNamedFlow,Window,Worker,WorkerGlobalScope,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload,IDBRequest,IDBOpenDBRequest,IDBDatabase,IDBTransaction,IDBCursor,DBIndex,WebSocket'\n .split(',');\n var EVENT_TARGET = 'EventTarget';\n var apis = [];\n var isWtf = _global['wtf'];\n var WTF_ISSUE_555_ARRAY = WTF_ISSUE_555.split(',');\n if (isWtf) {\n // Workaround for: https://github.com/google/tracing-framework/issues/555\n apis = WTF_ISSUE_555_ARRAY.map(function (v) { return 'HTML' + v + 'Element'; }).concat(NO_EVENT_TARGET);\n }\n else if (_global[EVENT_TARGET]) {\n apis.push(EVENT_TARGET);\n }\n else {\n // Note: EventTarget is not available in all browsers,\n // if it's not available, we instead patch the APIs in the IDL that inherit from EventTarget\n apis = NO_EVENT_TARGET;\n }\n var isDisableIECheck = _global['__Zone_disable_IE_check'] || false;\n var isEnableCrossContextCheck = _global['__Zone_enable_cross_context_check'] || false;\n var ieOrEdge = api.isIEOrEdge();\n var ADD_EVENT_LISTENER_SOURCE = '.addEventListener:';\n var FUNCTION_WRAPPER = '[object FunctionWrapper]';\n var BROWSER_TOOLS = 'function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] }';\n var pointerEventsMap = {\n 'MSPointerCancel': 'pointercancel',\n 'MSPointerDown': 'pointerdown',\n 'MSPointerEnter': 'pointerenter',\n 'MSPointerHover': 'pointerhover',\n 'MSPointerLeave': 'pointerleave',\n 'MSPointerMove': 'pointermove',\n 'MSPointerOut': 'pointerout',\n 'MSPointerOver': 'pointerover',\n 'MSPointerUp': 'pointerup'\n };\n // predefine all __zone_symbol__ + eventName + true/false string\n for (var i = 0; i < eventNames.length; i++) {\n var eventName = eventNames[i];\n var falseEventName = eventName + FALSE_STR;\n var trueEventName = eventName + TRUE_STR;\n var symbol = ZONE_SYMBOL_PREFIX + falseEventName;\n var symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;\n zoneSymbolEventNames[eventName] = {};\n zoneSymbolEventNames[eventName][FALSE_STR] = symbol;\n zoneSymbolEventNames[eventName][TRUE_STR] = symbolCapture;\n }\n // predefine all task.source string\n for (var i = 0; i < WTF_ISSUE_555_ARRAY.length; i++) {\n var target = WTF_ISSUE_555_ARRAY[i];\n var targets = globalSources[target] = {};\n for (var j = 0; j < eventNames.length; j++) {\n var eventName = eventNames[j];\n targets[eventName] = target + ADD_EVENT_LISTENER_SOURCE + eventName;\n }\n }\n var checkIEAndCrossContext = function (nativeDelegate, delegate, target, args) {\n if (!isDisableIECheck && ieOrEdge) {\n if (isEnableCrossContextCheck) {\n try {\n var testString = delegate.toString();\n if ((testString === FUNCTION_WRAPPER || testString == BROWSER_TOOLS)) {\n nativeDelegate.apply(target, args);\n return false;\n }\n }\n catch (error) {\n nativeDelegate.apply(target, args);\n return false;\n }\n }\n else {\n var testString = delegate.toString();\n if ((testString === FUNCTION_WRAPPER || testString == BROWSER_TOOLS)) {\n nativeDelegate.apply(target, args);\n return false;\n }\n }\n }\n else if (isEnableCrossContextCheck) {\n try {\n delegate.toString();\n }\n catch (error) {\n nativeDelegate.apply(target, args);\n return false;\n }\n }\n return true;\n };\n var apiTypes = [];\n for (var i = 0; i < apis.length; i++) {\n var type = _global[apis[i]];\n apiTypes.push(type && type.prototype);\n }\n // vh is validateHandler to check event handler\n // is valid or not(for security check)\n api.patchEventTarget(_global, apiTypes, {\n vh: checkIEAndCrossContext,\n transferEventName: function (eventName) {\n var pointerEventName = pointerEventsMap[eventName];\n return pointerEventName || eventName;\n }\n });\n Zone[api.symbol('patchEventTarget')] = !!_global[EVENT_TARGET];\n return true;\n }\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n // we have to patch the instance since the proto is non-configurable\n function apply(api, _global) {\n var _a = api.getGlobalObjects(), ADD_EVENT_LISTENER_STR = _a.ADD_EVENT_LISTENER_STR, REMOVE_EVENT_LISTENER_STR = _a.REMOVE_EVENT_LISTENER_STR;\n var WS = _global.WebSocket;\n // On Safari window.EventTarget doesn't exist so need to patch WS add/removeEventListener\n // On older Chrome, no need since EventTarget was already patched\n if (!_global.EventTarget) {\n api.patchEventTarget(_global, [WS.prototype]);\n }\n _global.WebSocket = function (x, y) {\n var socket = arguments.length > 1 ? new WS(x, y) : new WS(x);\n var proxySocket;\n var proxySocketProto;\n // Safari 7.0 has non-configurable own 'onmessage' and friends properties on the socket instance\n var onmessageDesc = api.ObjectGetOwnPropertyDescriptor(socket, 'onmessage');\n if (onmessageDesc && onmessageDesc.configurable === false) {\n proxySocket = api.ObjectCreate(socket);\n // socket have own property descriptor 'onopen', 'onmessage', 'onclose', 'onerror'\n // but proxySocket not, so we will keep socket as prototype and pass it to\n // patchOnProperties method\n proxySocketProto = socket;\n [ADD_EVENT_LISTENER_STR, REMOVE_EVENT_LISTENER_STR, 'send', 'close'].forEach(function (propName) {\n proxySocket[propName] = function () {\n var args = api.ArraySlice.call(arguments);\n if (propName === ADD_EVENT_LISTENER_STR || propName === REMOVE_EVENT_LISTENER_STR) {\n var eventName = args.length > 0 ? args[0] : undefined;\n if (eventName) {\n var propertySymbol = Zone.__symbol__('ON_PROPERTY' + eventName);\n socket[propertySymbol] = proxySocket[propertySymbol];\n }\n }\n return socket[propName].apply(socket, args);\n };\n });\n }\n else {\n // we can patch the real socket\n proxySocket = socket;\n }\n api.patchOnProperties(proxySocket, ['close', 'error', 'message', 'open'], proxySocketProto);\n return proxySocket;\n };\n var globalWebSocket = _global['WebSocket'];\n for (var prop in WS) {\n globalWebSocket[prop] = WS[prop];\n }\n }\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function propertyDescriptorLegacyPatch(api, _global) {\n var _a = api.getGlobalObjects(), isNode = _a.isNode, isMix = _a.isMix;\n if (isNode && !isMix) {\n return;\n }\n if (!canPatchViaPropertyDescriptor(api, _global)) {\n var supportsWebSocket = typeof WebSocket !== 'undefined';\n // Safari, Android browsers (Jelly Bean)\n patchViaCapturingAllTheEvents(api);\n api.patchClass('XMLHttpRequest');\n if (supportsWebSocket) {\n apply(api, _global);\n }\n Zone[api.symbol('patchEvents')] = true;\n }\n }\n function canPatchViaPropertyDescriptor(api, _global) {\n var _a = api.getGlobalObjects(), isBrowser = _a.isBrowser, isMix = _a.isMix;\n if ((isBrowser || isMix) &&\n !api.ObjectGetOwnPropertyDescriptor(HTMLElement.prototype, 'onclick') &&\n typeof Element !== 'undefined') {\n // WebKit https://bugs.webkit.org/show_bug.cgi?id=134364\n // IDL interface attributes are not configurable\n var desc = api.ObjectGetOwnPropertyDescriptor(Element.prototype, 'onclick');\n if (desc && !desc.configurable)\n return false;\n // try to use onclick to detect whether we can patch via propertyDescriptor\n // because XMLHttpRequest is not available in service worker\n if (desc) {\n api.ObjectDefineProperty(Element.prototype, 'onclick', {\n enumerable: true,\n configurable: true,\n get: function () {\n return true;\n }\n });\n var div = document.createElement('div');\n var result = !!div.onclick;\n api.ObjectDefineProperty(Element.prototype, 'onclick', desc);\n return result;\n }\n }\n var XMLHttpRequest = _global['XMLHttpRequest'];\n if (!XMLHttpRequest) {\n // XMLHttpRequest is not available in service worker\n return false;\n }\n var ON_READY_STATE_CHANGE = 'onreadystatechange';\n var XMLHttpRequestPrototype = XMLHttpRequest.prototype;\n var xhrDesc = api.ObjectGetOwnPropertyDescriptor(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE);\n // add enumerable and configurable here because in opera\n // by default XMLHttpRequest.prototype.onreadystatechange is undefined\n // without adding enumerable and configurable will cause onreadystatechange\n // non-configurable\n // and if XMLHttpRequest.prototype.onreadystatechange is undefined,\n // we should set a real desc instead a fake one\n if (xhrDesc) {\n api.ObjectDefineProperty(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE, {\n enumerable: true,\n configurable: true,\n get: function () {\n return true;\n }\n });\n var req = new XMLHttpRequest();\n var result = !!req.onreadystatechange;\n // restore original desc\n api.ObjectDefineProperty(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE, xhrDesc || {});\n return result;\n }\n else {\n var SYMBOL_FAKE_ONREADYSTATECHANGE_1 = api.symbol('fake');\n api.ObjectDefineProperty(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE, {\n enumerable: true,\n configurable: true,\n get: function () {\n return this[SYMBOL_FAKE_ONREADYSTATECHANGE_1];\n },\n set: function (value) {\n this[SYMBOL_FAKE_ONREADYSTATECHANGE_1] = value;\n }\n });\n var req = new XMLHttpRequest();\n var detectFunc = function () { };\n req.onreadystatechange = detectFunc;\n var result = req[SYMBOL_FAKE_ONREADYSTATECHANGE_1] === detectFunc;\n req.onreadystatechange = null;\n return result;\n }\n }\n // Whenever any eventListener fires, we check the eventListener target and all parents\n // for `onwhatever` properties and replace them with zone-bound functions\n // - Chrome (for now)\n function patchViaCapturingAllTheEvents(api) {\n var eventNames = api.getGlobalObjects().eventNames;\n var unboundKey = api.symbol('unbound');\n var _loop_4 = function (i) {\n var property = eventNames[i];\n var onproperty = 'on' + property;\n self.addEventListener(property, function (event) {\n var elt = event.target, bound, source;\n if (elt) {\n source = elt.constructor['name'] + '.' + onproperty;\n }\n else {\n source = 'unknown.' + onproperty;\n }\n while (elt) {\n if (elt[onproperty] && !elt[onproperty][unboundKey]) {\n bound = api.wrapWithCurrentZone(elt[onproperty], source);\n bound[unboundKey] = elt[onproperty];\n elt[onproperty] = bound;\n }\n elt = elt.parentElement;\n }\n }, true);\n };\n for (var i = 0; i < eventNames.length; i++) {\n _loop_4(i);\n }\n }\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function registerElementPatch(_global, api) {\n var _a = api.getGlobalObjects(), isBrowser = _a.isBrowser, isMix = _a.isMix;\n if ((!isBrowser && !isMix) || !('registerElement' in _global.document)) {\n return;\n }\n var callbacks = ['createdCallback', 'attachedCallback', 'detachedCallback', 'attributeChangedCallback'];\n api.patchCallbacks(api, document, 'Document', 'registerElement', callbacks);\n }\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n (function (_global) {\n var symbolPrefix = _global['__Zone_symbol_prefix'] || '__zone_symbol__';\n function __symbol__(name) {\n return symbolPrefix + name;\n }\n _global[__symbol__('legacyPatch')] = function () {\n var Zone = _global['Zone'];\n Zone.__load_patch('defineProperty', function (global, Zone, api) {\n api._redefineProperty = _redefineProperty;\n propertyPatch();\n });\n Zone.__load_patch('registerElement', function (global, Zone, api) {\n registerElementPatch(global, api);\n });\n Zone.__load_patch('EventTargetLegacy', function (global, Zone, api) {\n eventTargetLegacyPatch(global, api);\n propertyDescriptorLegacyPatch(api, global);\n });\n };\n })(typeof window !== 'undefined' ?\n window :\n typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {});\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var taskSymbol = zoneSymbol('zoneTask');\n function patchTimer(window, setName, cancelName, nameSuffix) {\n var setNative = null;\n var clearNative = null;\n setName += nameSuffix;\n cancelName += nameSuffix;\n var tasksByHandleId = {};\n function scheduleTask(task) {\n var data = task.data;\n data.args[0] = function () {\n return task.invoke.apply(this, arguments);\n };\n data.handleId = setNative.apply(window, data.args);\n return task;\n }\n function clearTask(task) {\n return clearNative.call(window, task.data.handleId);\n }\n setNative =\n patchMethod(window, setName, function (delegate) { return function (self, args) {\n if (typeof args[0] === 'function') {\n var options_1 = {\n isPeriodic: nameSuffix === 'Interval',\n delay: (nameSuffix === 'Timeout' || nameSuffix === 'Interval') ? args[1] || 0 :\n undefined,\n args: args\n };\n var callback_1 = args[0];\n args[0] = function timer() {\n try {\n return callback_1.apply(this, arguments);\n }\n finally {\n // issue-934, task will be cancelled\n // even it is a periodic task such as\n // setInterval\n // https://github.com/angular/angular/issues/40387\n // Cleanup tasksByHandleId should be handled before scheduleTask\n // Since some zoneSpec may intercept and doesn't trigger\n // scheduleFn(scheduleTask) provided here.\n if (!(options_1.isPeriodic)) {\n if (typeof options_1.handleId === 'number') {\n // in non-nodejs env, we remove timerId\n // from local cache\n delete tasksByHandleId[options_1.handleId];\n }\n else if (options_1.handleId) {\n // Node returns complex objects as handleIds\n // we remove task reference from timer object\n options_1.handleId[taskSymbol] = null;\n }\n }\n }\n };\n var task = scheduleMacroTaskWithCurrentZone(setName, args[0], options_1, scheduleTask, clearTask);\n if (!task) {\n return task;\n }\n // Node.js must additionally support the ref and unref functions.\n var handle = task.data.handleId;\n if (typeof handle === 'number') {\n // for non nodejs env, we save handleId: task\n // mapping in local cache for clearTimeout\n tasksByHandleId[handle] = task;\n }\n else if (handle) {\n // for nodejs env, we save task\n // reference in timerId Object for clearTimeout\n handle[taskSymbol] = task;\n }\n // check whether handle is null, because some polyfill or browser\n // may return undefined from setTimeout/setInterval/setImmediate/requestAnimationFrame\n if (handle && handle.ref && handle.unref && typeof handle.ref === 'function' &&\n typeof handle.unref === 'function') {\n task.ref = handle.ref.bind(handle);\n task.unref = handle.unref.bind(handle);\n }\n if (typeof handle === 'number' || handle) {\n return handle;\n }\n return task;\n }\n else {\n // cause an error by calling it directly.\n return delegate.apply(window, args);\n }\n }; });\n clearNative =\n patchMethod(window, cancelName, function (delegate) { return function (self, args) {\n var id = args[0];\n var task;\n if (typeof id === 'number') {\n // non nodejs env.\n task = tasksByHandleId[id];\n }\n else {\n // nodejs env.\n task = id && id[taskSymbol];\n // other environments.\n if (!task) {\n task = id;\n }\n }\n if (task && typeof task.type === 'string') {\n if (task.state !== 'notScheduled' &&\n (task.cancelFn && task.data.isPeriodic || task.runCount === 0)) {\n if (typeof id === 'number') {\n delete tasksByHandleId[id];\n }\n else if (id) {\n id[taskSymbol] = null;\n }\n // Do not cancel already canceled functions\n task.zone.cancelTask(task);\n }\n }\n else {\n // cause an error by calling it directly.\n delegate.apply(window, args);\n }\n }; });\n }\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function patchCustomElements(_global, api) {\n var _a = api.getGlobalObjects(), isBrowser = _a.isBrowser, isMix = _a.isMix;\n if ((!isBrowser && !isMix) || !_global['customElements'] || !('customElements' in _global)) {\n return;\n }\n var callbacks = ['connectedCallback', 'disconnectedCallback', 'adoptedCallback', 'attributeChangedCallback'];\n api.patchCallbacks(api, _global.customElements, 'customElements', 'define', callbacks);\n }\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function eventTargetPatch(_global, api) {\n if (Zone[api.symbol('patchEventTarget')]) {\n // EventTarget is already patched.\n return;\n }\n var _a = api.getGlobalObjects(), eventNames = _a.eventNames, zoneSymbolEventNames = _a.zoneSymbolEventNames, TRUE_STR = _a.TRUE_STR, FALSE_STR = _a.FALSE_STR, ZONE_SYMBOL_PREFIX = _a.ZONE_SYMBOL_PREFIX;\n // predefine all __zone_symbol__ + eventName + true/false string\n for (var i = 0; i < eventNames.length; i++) {\n var eventName = eventNames[i];\n var falseEventName = eventName + FALSE_STR;\n var trueEventName = eventName + TRUE_STR;\n var symbol = ZONE_SYMBOL_PREFIX + falseEventName;\n var symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;\n zoneSymbolEventNames[eventName] = {};\n zoneSymbolEventNames[eventName][FALSE_STR] = symbol;\n zoneSymbolEventNames[eventName][TRUE_STR] = symbolCapture;\n }\n var EVENT_TARGET = _global['EventTarget'];\n if (!EVENT_TARGET || !EVENT_TARGET.prototype) {\n return;\n }\n api.patchEventTarget(_global, [EVENT_TARGET && EVENT_TARGET.prototype]);\n return true;\n }\n function patchEvent(global, api) {\n api.patchEventPrototype(global, api);\n }\n /**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n Zone.__load_patch('legacy', function (global) {\n var legacyPatch = global[Zone.__symbol__('legacyPatch')];\n if (legacyPatch) {\n legacyPatch();\n }\n });\n Zone.__load_patch('queueMicrotask', function (global, Zone, api) {\n api.patchMethod(global, 'queueMicrotask', function (delegate) {\n return function (self, args) {\n Zone.current.scheduleMicroTask('queueMicrotask', args[0]);\n };\n });\n });\n Zone.__load_patch('timers', function (global) {\n var set = 'set';\n var clear = 'clear';\n patchTimer(global, set, clear, 'Timeout');\n patchTimer(global, set, clear, 'Interval');\n patchTimer(global, set, clear, 'Immediate');\n });\n Zone.__load_patch('requestAnimationFrame', function (global) {\n patchTimer(global, 'request', 'cancel', 'AnimationFrame');\n patchTimer(global, 'mozRequest', 'mozCancel', 'AnimationFrame');\n patchTimer(global, 'webkitRequest', 'webkitCancel', 'AnimationFrame');\n });\n Zone.__load_patch('blocking', function (global, Zone) {\n var blockingMethods = ['alert', 'prompt', 'confirm'];\n for (var i = 0; i < blockingMethods.length; i++) {\n var name_2 = blockingMethods[i];\n patchMethod(global, name_2, function (delegate, symbol, name) {\n return function (s, args) {\n return Zone.current.run(delegate, global, args, name);\n };\n });\n }\n });\n Zone.__load_patch('EventTarget', function (global, Zone, api) {\n patchEvent(global, api);\n eventTargetPatch(global, api);\n // patch XMLHttpRequestEventTarget's addEventListener/removeEventListener\n var XMLHttpRequestEventTarget = global['XMLHttpRequestEventTarget'];\n if (XMLHttpRequestEventTarget && XMLHttpRequestEventTarget.prototype) {\n api.patchEventTarget(global, [XMLHttpRequestEventTarget.prototype]);\n }\n });\n Zone.__load_patch('MutationObserver', function (global, Zone, api) {\n patchClass('MutationObserver');\n patchClass('WebKitMutationObserver');\n });\n Zone.__load_patch('IntersectionObserver', function (global, Zone, api) {\n patchClass('IntersectionObserver');\n });\n Zone.__load_patch('FileReader', function (global, Zone, api) {\n patchClass('FileReader');\n });\n Zone.__load_patch('on_property', function (global, Zone, api) {\n propertyDescriptorPatch(api, global);\n });\n Zone.__load_patch('customElements', function (global, Zone, api) {\n patchCustomElements(global, api);\n });\n Zone.__load_patch('XHR', function (global, Zone) {\n // Treat XMLHttpRequest as a macrotask.\n patchXHR(global);\n var XHR_TASK = zoneSymbol('xhrTask');\n var XHR_SYNC = zoneSymbol('xhrSync');\n var XHR_LISTENER = zoneSymbol('xhrListener');\n var XHR_SCHEDULED = zoneSymbol('xhrScheduled');\n var XHR_URL = zoneSymbol('xhrURL');\n var XHR_ERROR_BEFORE_SCHEDULED = zoneSymbol('xhrErrorBeforeScheduled');\n function patchXHR(window) {\n var XMLHttpRequest = window['XMLHttpRequest'];\n if (!XMLHttpRequest) {\n // XMLHttpRequest is not available in service worker\n return;\n }\n var XMLHttpRequestPrototype = XMLHttpRequest.prototype;\n function findPendingTask(target) {\n return target[XHR_TASK];\n }\n var oriAddListener = XMLHttpRequestPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER];\n var oriRemoveListener = XMLHttpRequestPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];\n if (!oriAddListener) {\n var XMLHttpRequestEventTarget_1 = window['XMLHttpRequestEventTarget'];\n if (XMLHttpRequestEventTarget_1) {\n var XMLHttpRequestEventTargetPrototype = XMLHttpRequestEventTarget_1.prototype;\n oriAddListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER];\n oriRemoveListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];\n }\n }\n var READY_STATE_CHANGE = 'readystatechange';\n var SCHEDULED = 'scheduled';\n function scheduleTask(task) {\n var data = task.data;\n var target = data.target;\n target[XHR_SCHEDULED] = false;\n target[XHR_ERROR_BEFORE_SCHEDULED] = false;\n // remove existing event listener\n var listener = target[XHR_LISTENER];\n if (!oriAddListener) {\n oriAddListener = target[ZONE_SYMBOL_ADD_EVENT_LISTENER];\n oriRemoveListener = target[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];\n }\n if (listener) {\n oriRemoveListener.call(target, READY_STATE_CHANGE, listener);\n }\n var newListener = target[XHR_LISTENER] = function () {\n if (target.readyState === target.DONE) {\n // sometimes on some browsers XMLHttpRequest will fire onreadystatechange with\n // readyState=4 multiple times, so we need to check task state here\n if (!data.aborted && target[XHR_SCHEDULED] && task.state === SCHEDULED) {\n // check whether the xhr has registered onload listener\n // if that is the case, the task should invoke after all\n // onload listeners finish.\n // Also if the request failed without response (status = 0), the load event handler\n // will not be triggered, in that case, we should also invoke the placeholder callback\n // to close the XMLHttpRequest::send macroTask.\n // https://github.com/angular/angular/issues/38795\n var loadTasks = target[Zone.__symbol__('loadfalse')];\n if (target.status !== 0 && loadTasks && loadTasks.length > 0) {\n var oriInvoke_1 = task.invoke;\n task.invoke = function () {\n // need to load the tasks again, because in other\n // load listener, they may remove themselves\n var loadTasks = target[Zone.__symbol__('loadfalse')];\n for (var i = 0; i < loadTasks.length; i++) {\n if (loadTasks[i] === task) {\n loadTasks.splice(i, 1);\n }\n }\n if (!data.aborted && task.state === SCHEDULED) {\n oriInvoke_1.call(task);\n }\n };\n loadTasks.push(task);\n }\n else {\n task.invoke();\n }\n }\n else if (!data.aborted && target[XHR_SCHEDULED] === false) {\n // error occurs when xhr.send()\n target[XHR_ERROR_BEFORE_SCHEDULED] = true;\n }\n }\n };\n oriAddListener.call(target, READY_STATE_CHANGE, newListener);\n var storedTask = target[XHR_TASK];\n if (!storedTask) {\n target[XHR_TASK] = task;\n }\n sendNative.apply(target, data.args);\n target[XHR_SCHEDULED] = true;\n return task;\n }\n function placeholderCallback() { }\n function clearTask(task) {\n var data = task.data;\n // Note - ideally, we would call data.target.removeEventListener here, but it's too late\n // to prevent it from firing. So instead, we store info for the event listener.\n data.aborted = true;\n return abortNative.apply(data.target, data.args);\n }\n var openNative = patchMethod(XMLHttpRequestPrototype, 'open', function () { return function (self, args) {\n self[XHR_SYNC] = args[2] == false;\n self[XHR_URL] = args[1];\n return openNative.apply(self, args);\n }; });\n var XMLHTTPREQUEST_SOURCE = 'XMLHttpRequest.send';\n var fetchTaskAborting = zoneSymbol('fetchTaskAborting');\n var fetchTaskScheduling = zoneSymbol('fetchTaskScheduling');\n var sendNative = patchMethod(XMLHttpRequestPrototype, 'send', function () { return function (self, args) {\n if (Zone.current[fetchTaskScheduling] === true) {\n // a fetch is scheduling, so we are using xhr to polyfill fetch\n // and because we already schedule macroTask for fetch, we should\n // not schedule a macroTask for xhr again\n return sendNative.apply(self, args);\n }\n if (self[XHR_SYNC]) {\n // if the XHR is sync there is no task to schedule, just execute the code.\n return sendNative.apply(self, args);\n }\n else {\n var options = { target: self, url: self[XHR_URL], isPeriodic: false, args: args, aborted: false };\n var task = scheduleMacroTaskWithCurrentZone(XMLHTTPREQUEST_SOURCE, placeholderCallback, options, scheduleTask, clearTask);\n if (self && self[XHR_ERROR_BEFORE_SCHEDULED] === true && !options.aborted &&\n task.state === SCHEDULED) {\n // xhr request throw error when send\n // we should invoke task instead of leaving a scheduled\n // pending macroTask\n task.invoke();\n }\n }\n }; });\n var abortNative = patchMethod(XMLHttpRequestPrototype, 'abort', function () { return function (self, args) {\n var task = findPendingTask(self);\n if (task && typeof task.type == 'string') {\n // If the XHR has already completed, do nothing.\n // If the XHR has already been aborted, do nothing.\n // Fix #569, call abort multiple times before done will cause\n // macroTask task count be negative number\n if (task.cancelFn == null || (task.data && task.data.aborted)) {\n return;\n }\n task.zone.cancelTask(task);\n }\n else if (Zone.current[fetchTaskAborting] === true) {\n // the abort is called from fetch polyfill, we need to call native abort of XHR.\n return abortNative.apply(self, args);\n }\n // Otherwise, we are trying to abort an XHR which has not yet been sent, so there is no\n // task\n // to cancel. Do nothing.\n }; });\n }\n });\n Zone.__load_patch('geolocation', function (global) {\n /// GEO_LOCATION\n if (global['navigator'] && global['navigator'].geolocation) {\n patchPrototype(global['navigator'].geolocation, ['getCurrentPosition', 'watchPosition']);\n }\n });\n Zone.__load_patch('PromiseRejectionEvent', function (global, Zone) {\n // handle unhandled promise rejection\n function findPromiseRejectionHandler(evtName) {\n return function (e) {\n var eventTasks = findEventTasks(global, evtName);\n eventTasks.forEach(function (eventTask) {\n // windows has added unhandledrejection event listener\n // trigger the event listener\n var PromiseRejectionEvent = global['PromiseRejectionEvent'];\n if (PromiseRejectionEvent) {\n var evt = new PromiseRejectionEvent(evtName, { promise: e.promise, reason: e.rejection });\n eventTask.invoke(evt);\n }\n });\n };\n }\n if (global['PromiseRejectionEvent']) {\n Zone[zoneSymbol('unhandledPromiseRejectionHandler')] =\n findPromiseRejectionHandler('unhandledrejection');\n Zone[zoneSymbol('rejectionHandledHandler')] =\n findPromiseRejectionHandler('rejectionhandled');\n }\n });\n})));\n"],"names":["factory","define","amd","Zone$1","global","performance","mark","name","performanceMeasure","label","symbolPrefix","__symbol__","checkDuplicate","Error","Zone","parent","zoneSpec","_parent","_name","_properties","properties","_zoneDelegate","ZoneDelegate","assertZonePatched","patches","Object","defineProperty","get","zone","current","enumerable","configurable","_currentZoneFrame","_currentTask","__load_patch","fn","ignoreDuplicate","hasOwnProperty","perfName","_api","prototype","key","getZoneWith","fork","wrap","callback","source","_callback","intercept","runGuarded","arguments","run","applyThis","applyArgs","invoke","error","handleError","runTask","task","NO_ZONE","state","notScheduled","type","eventTask","macroTask","reEntryGuard","running","_transitionTo","scheduled","runCount","previousTask","data","isPeriodic","cancelFn","undefined","invokeTask","unknown","_updateTaskCount","scheduleTask","newZone","scheduling","zoneDelegates","_zoneDelegates","_zone","err","scheduleMicroTask","customSchedule","ZoneTask","microTask","scheduleMacroTask","customCancel","scheduleEventTask","cancelTask","canceling","count","i","length","DELEGATE_ZS","onHasTask","delegate","_","target","hasTaskState","hasTask","onScheduleTask","onInvokeTask","onCancelTask","parentDelegate","_taskCounts","_parentDelegate","_forkZS","onFork","_forkDlgt","_forkCurrZone","_interceptZS","onIntercept","_interceptDlgt","_interceptCurrZone","_invokeZS","onInvoke","_invokeDlgt","_invokeCurrZone","_handleErrorZS","onHandleError","_handleErrorDlgt","_handleErrorCurrZone","_scheduleTaskZS","_scheduleTaskDlgt","_scheduleTaskCurrZone","_invokeTaskZS","_invokeTaskDlgt","_invokeTaskCurrZone","_cancelTaskZS","_cancelTaskDlgt","_cancelTaskCurrZone","_hasTaskZS","_hasTaskDlgt","_hasTaskDlgtOwner","_hasTaskCurrZone","zoneSpecHasTask","parentHasTask","targetZone","apply","returnTask","push","scheduleFn","value","isEmpty","counts","prev","next","change","options","_state","self","useG","call","args","_numberOfNestedTaskFrames","drainMicroTaskQueue","cancelScheduleRequest","toState","fromState1","fromState2","toString","handleId","toJSON","symbolSetTimeout","symbolPromise","symbolThen","_microTaskQueue","_isDrainingMicrotaskQueue","nativeMicroTaskQueuePromise","resolve","nativeThen","queue","onUnhandledError","microtaskDrainDone","symbol","currentZoneFrame","noop","showUncaughtError","patchEventTarget","patchOnProperties","patchMethod","bindArguments","patchThen","patchMacroTask","patchEventPrototype","isIEOrEdge","getGlobalObjects","ObjectDefineProperty","ObjectGetOwnPropertyDescriptor","ObjectCreate","ArraySlice","patchClass","wrapWithCurrentZone","filterProperties","attachOriginToPatched","_redefineProperty","patchCallbacks","window","getOwnPropertyDescriptor","ObjectGetPrototypeOf","getPrototypeOf","create","Array","slice","ADD_EVENT_LISTENER_STR","REMOVE_EVENT_LISTENER_STR","ZONE_SYMBOL_ADD_EVENT_LISTENER","ZONE_SYMBOL_REMOVE_EVENT_LISTENER","TRUE_STR","FALSE_STR","ZONE_SYMBOL_PREFIX","scheduleMacroTaskWithCurrentZone","zoneSymbol","isWindowExists","internalWindow","_global","REMOVE_ATTRIBUTE","NULL_ON_PROP_VALUE","patchPrototype","fnNames","constructor","_loop_1","name_1","prototypeDesc","isPropertyWritable","patched","propertyDesc","writable","set","isWebWorker","WorkerGlobalScope","isNode","process","isBrowser","isMix","zoneSymbolEventNames","wrapFn","event","eventNameSymbol","listener","result","errorEvent","message","filename","lineno","colno","preventDefault","patchProperty","obj","prop","desc","onPropPatchedSymbol","originalDescGet","originalDescSet","eventName","substr","newValue","previousValue","removeEventListener","addEventListener","removeAttribute","onProperties","j","originalInstanceKey","className","OriginalClass","a","instance","patchFn","proto","delegateName","patchDelegate_1","funcName","metaCreator","setNative","cbIdx","meta","original","isDetectedIEOrEdge","ieOrEdge","isIE","ua","navigator","userAgent","indexOf","api","readableObjectToString","JSON","stringify","_uncaughtPromiseErrors","isDisableWrappingUncaughtPromiseRejection","creationTrace","e","rejection","console","stack","_loop_2","uncaughtPromiseError","shift","throwOriginal","handleUnhandledRejection","UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL","handler","isThenable","then","forwardResolution","forwardRejection","ZoneAwarePromise","reject","symbolState","symbolValue","symbolFinally","symbolParentPromiseValue","symbolParentPromiseState","UNRESOLVED","RESOLVED","REJECTED","REJECTED_NO_CATCH","makeResolver","promise","v","resolvePromise","once","wasCalled","wrapper","wrappedFunction","TYPE_ERROR","CURRENT_TASK_TRACE_SYMBOL","onceWrapper","TypeError","clearRejectedNoCatch","trace","currentTask","scheduleResolveOrReject","REJECTION_HANDLED_HANDLER","splice","chainPromise","onFulfilled","onRejected","promiseState","parentPromiseValue","isFinallyPromise","ZONE_AWARE_PROMISE_TO_STRING","executor","race","values","res","rej","onResolve","onReject","_i","values_1","all","allWithCallback","allSettled","P","thenCallback","status","errorCallback","reason","unresolvedCount","valueIndex","resolvedValues","_loop_3","this_1","curValueIndex","thenErr","values_2","Symbol","toStringTag","species","C","catch","finally","onFinally","NativePromise","symbolThenPatched","Ctor","originalThen","_this","wrapped","zoneify","resultPromise","ctor","Promise","originalFunctionToString","Function","ORIGINAL_DELEGATE_SYMBOL","PROMISE_SYMBOL","ERROR_SYMBOL","newFunctionToString","originalDelegate","nativePromise","nativeError","originalObjectToString","PROMISE_OBJECT_TO_STRING","passiveSupported","OPTIMIZED_ZONE_EVENT_TASK_DATA","zoneSymbolEventNames$1","globalSources","EVENT_NAME_SYMBOL_REGX","RegExp","IMMEDIATE_PROPAGATION_SYMBOL","prepareEventNames","eventNameToString","falseEventName","trueEventName","symbolCapture","apis","patchOptions","ADD_EVENT_LISTENER","add","REMOVE_EVENT_LISTENER","rm","LISTENERS_EVENT_LISTENER","listeners","REMOVE_ALL_LISTENERS_EVENT_LISTENER","rmAll","zoneSymbolAddEventListener","ADD_EVENT_LISTENER_SOURCE","PREPEND_EVENT_LISTENER","PREPEND_EVENT_LISTENER_SOURCE","isRemoved","handleEvent","delegate_1","globalZoneAwareCallback","tasks","copyTasks","globalZoneAwareCaptureCallback","patchEventTargetMethods","useGlobalCallback","validateHandler","vh","chkDup","returnTarget","rt","taskData","nativeAddEventListener","nativeRemoveEventListener","nativeListeners","nativeRemoveAllListeners","nativePrependEventListener","prepend","buildEventListenerOptions","passive","capture","assign","customScheduleGlobal","isExisting","customCancelGlobal","symbolEventNames","symbolEventName","existingTasks","existingTask","allRemoved","customScheduleNonGlobal","customSchedulePrepend","customCancelNonGlobal","compareTaskCallbackVsDelegate","typeOfDelegate","compare","diff","unpatchedEvents","passiveEvents","makeAddListener","nativeListener","addSource","customScheduleFn","customCancelFn","transferEventName","isHandleEvent","constructorName","targetSource","unshift","onPropertySymbol","findEventTasks","keys","match","exec","evtName","symbolCaptureEventName","captureTasks","removeTasks","results","foundTasks","captureFalseTasks","captureTrueTasks","concat","Event","targetName","method","callbacks","nativeDelegate","opts","forEach","descriptor","globalEventHandlersEventNames","documentEventNames","windowEventNames","htmlElementEventNames","mediaElementEventNames","ieElementEventNames","webglEventNames","formEventNames","detailEventNames","frameEventNames","frameSetEventNames","marqueeEventNames","XMLHttpRequestEventNames","IDBIndexEventNames","websocketEventNames","workerEventNames","eventNames","ignoreProperties","tip","filter","ip","targetIgnoreProperties","op","patchFilteredProperties","filteredProperties","propertyDescriptorPatch","supportsWebSocket","WebSocket","internalWindow_1","ignoreErrorProperties","Document","Element","HTMLElement","HTMLMediaElement","HTMLFrameSetElement","HTMLBodyElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement_1","Worker_1","XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","SYMBOL_BLACK_LISTED_EVENTS","SYMBOL_UNPATCHED_EVENTS","zoneSymbol$1","_defineProperty","_getOwnPropertyDescriptor","_create","unconfigurablesKey","propertyPatch","isUnconfigurable","originalConfigurableFlag","rewriteDescriptor","_tryDefineProperty","defineProperties","props","isFrozen","swallowError","descJson","log","eventTargetLegacyPatch","_a","WTF_ISSUE_555","NO_EVENT_TARGET","split","EVENT_TARGET","isWtf","WTF_ISSUE_555_ARRAY","map","isDisableIECheck","isEnableCrossContextCheck","FUNCTION_WRAPPER","BROWSER_TOOLS","pointerEventsMap","targets","checkIEAndCrossContext","testString","apiTypes","pointerEventName","WS","EventTarget","x","y","socket","proxySocket","proxySocketProto","onmessageDesc","propName","propertySymbol","globalWebSocket","propertyDescriptorLegacyPatch","canPatchViaPropertyDescriptor","patchViaCapturingAllTheEvents","div","document","createElement","onclick","ON_READY_STATE_CHANGE","XMLHttpRequestPrototype","xhrDesc","req","onreadystatechange","SYMBOL_FAKE_ONREADYSTATECHANGE_1","detectFunc","unboundKey","_loop_4","property","onproperty","elt","bound","parentElement","registerElementPatch","taskSymbol","patchTimer","setName","cancelName","nameSuffix","clearNative","tasksByHandleId","clearTask","options_1","delay","callback_1","timer","handle","ref","unref","bind","id","patchCustomElements","customElements","eventTargetPatch","patchEvent","legacyPatch","clear","blockingMethods","name_2","s","patchXHR","XHR_TASK","XHR_SYNC","XHR_LISTENER","XHR_SCHEDULED","XHR_URL","XHR_ERROR_BEFORE_SCHEDULED","findPendingTask","oriAddListener","oriRemoveListener","XMLHttpRequestEventTarget_1","XMLHttpRequestEventTargetPrototype","READY_STATE_CHANGE","SCHEDULED","newListener","readyState","DONE","aborted","loadTasks","oriInvoke_1","storedTask","sendNative","placeholderCallback","abortNative","openNative","XMLHTTPREQUEST_SOURCE","fetchTaskAborting","fetchTaskScheduling","url","geolocation","findPromiseRejectionHandler","eventTasks","PromiseRejectionEvent","evt"],"sourceRoot":"webpack:///","x_google_ignoreList":[1]}