Socket
Socket
Sign inDemoInstall

zone.js

Package Overview
Dependencies
1
Maintainers
2
Versions
121
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.14.4 to 0.14.5

lib/zone-impl.d.ts

505

bundles/async-test.umd.js
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT

@@ -12,262 +12,277 @@ */

'use strict';
(function (_global) {
var _a;
var AsyncTestZoneSpec = /** @class */ (function () {
function AsyncTestZoneSpec(finishCallback, failCallback, namePrefix) {
this.finishCallback = finishCallback;
this.failCallback = failCallback;
this._pendingMicroTasks = false;
this._pendingMacroTasks = false;
this._alreadyErrored = false;
this._isSync = false;
var global$1 = globalThis;
// __Zone_symbol_prefix global can be used to override the default zone
// symbol prefix with a custom one if needed.
function __symbol__(name) {
var symbolPrefix = global$1['__Zone_symbol_prefix'] || '__zone_symbol__';
return symbolPrefix + name;
}
var __global = (typeof window !== 'undefined' && window) || (typeof self !== 'undefined' && self) || global;
var AsyncTestZoneSpec = /** @class */ (function () {
function AsyncTestZoneSpec(finishCallback, failCallback, namePrefix) {
this.finishCallback = finishCallback;
this.failCallback = failCallback;
this._pendingMicroTasks = false;
this._pendingMacroTasks = false;
this._alreadyErrored = false;
this._isSync = false;
this._existingFinishTimer = null;
this.entryFunction = null;
this.runZone = Zone.current;
this.unresolvedChainedPromiseCount = 0;
this.supportWaitUnresolvedChainedPromise = false;
this.name = 'asyncTestZone for ' + namePrefix;
this.properties = { 'AsyncTestZoneSpec': this };
this.supportWaitUnresolvedChainedPromise =
__global[__symbol__('supportWaitUnResolvedChainedPromise')] === true;
}
Object.defineProperty(AsyncTestZoneSpec, "symbolParentUnresolved", {
// Needs to be a getter and not a plain property in order run this just-in-time. Otherwise
// `__symbol__` would be evaluated during top-level execution prior to the Zone prefix being
// changed for tests.
get: function () {
return __symbol__('parentUnresolved');
},
enumerable: false,
configurable: true
});
AsyncTestZoneSpec.prototype.isUnresolvedChainedPromisePending = function () {
return this.unresolvedChainedPromiseCount > 0;
};
AsyncTestZoneSpec.prototype._finishCallbackIfDone = function () {
var _this = this;
// NOTE: Technically the `onHasTask` could fire together with the initial synchronous
// completion in `onInvoke`. `onHasTask` might call this method when it captured e.g.
// microtasks in the proxy zone that now complete as part of this async zone run.
// Consider the following scenario:
// 1. A test `beforeEach` schedules a microtask in the ProxyZone.
// 2. An actual empty `it` spec executes in the AsyncTestZone` (using e.g. `waitForAsync`).
// 3. The `onInvoke` invokes `_finishCallbackIfDone` because the spec runs synchronously.
// 4. We wait the scheduled timeout (see below) to account for unhandled promises.
// 5. The microtask from (1) finishes and `onHasTask` is invoked.
// --> We register a second `_finishCallbackIfDone` even though we have scheduled a timeout.
// If the finish timeout from below is already scheduled, terminate the existing scheduled
// finish invocation, avoiding calling `jasmine` `done` multiple times. *Note* that we would
// want to schedule a new finish callback in case the task state changes again.
if (this._existingFinishTimer !== null) {
clearTimeout(this._existingFinishTimer);
this._existingFinishTimer = null;
this.entryFunction = null;
this.runZone = Zone.current;
this.unresolvedChainedPromiseCount = 0;
this.supportWaitUnresolvedChainedPromise = false;
this.name = 'asyncTestZone for ' + namePrefix;
this.properties = { 'AsyncTestZoneSpec': this };
this.supportWaitUnresolvedChainedPromise =
_global[Zone.__symbol__('supportWaitUnResolvedChainedPromise')] === true;
}
AsyncTestZoneSpec.prototype.isUnresolvedChainedPromisePending = function () {
return this.unresolvedChainedPromiseCount > 0;
};
AsyncTestZoneSpec.prototype._finishCallbackIfDone = function () {
var _this = this;
// NOTE: Technically the `onHasTask` could fire together with the initial synchronous
// completion in `onInvoke`. `onHasTask` might call this method when it captured e.g.
// microtasks in the proxy zone that now complete as part of this async zone run.
// Consider the following scenario:
// 1. A test `beforeEach` schedules a microtask in the ProxyZone.
// 2. An actual empty `it` spec executes in the AsyncTestZone` (using e.g. `waitForAsync`).
// 3. The `onInvoke` invokes `_finishCallbackIfDone` because the spec runs synchronously.
// 4. We wait the scheduled timeout (see below) to account for unhandled promises.
// 5. The microtask from (1) finishes and `onHasTask` is invoked.
// --> We register a second `_finishCallbackIfDone` even though we have scheduled a timeout.
// If the finish timeout from below is already scheduled, terminate the existing scheduled
// finish invocation, avoiding calling `jasmine` `done` multiple times. *Note* that we would
// want to schedule a new finish callback in case the task state changes again.
if (this._existingFinishTimer !== null) {
clearTimeout(this._existingFinishTimer);
this._existingFinishTimer = null;
if (!(this._pendingMicroTasks ||
this._pendingMacroTasks ||
(this.supportWaitUnresolvedChainedPromise && this.isUnresolvedChainedPromisePending()))) {
// We wait until the next tick because we would like to catch unhandled promises which could
// cause test logic to be executed. In such cases we cannot finish with tasks pending then.
this.runZone.run(function () {
_this._existingFinishTimer = setTimeout(function () {
if (!_this._alreadyErrored && !(_this._pendingMicroTasks || _this._pendingMacroTasks)) {
_this.finishCallback();
}
}, 0);
});
}
};
AsyncTestZoneSpec.prototype.patchPromiseForTest = function () {
if (!this.supportWaitUnresolvedChainedPromise) {
return;
}
var patchPromiseForTest = Promise[Zone.__symbol__('patchPromiseForTest')];
if (patchPromiseForTest) {
patchPromiseForTest();
}
};
AsyncTestZoneSpec.prototype.unPatchPromiseForTest = function () {
if (!this.supportWaitUnresolvedChainedPromise) {
return;
}
var unPatchPromiseForTest = Promise[Zone.__symbol__('unPatchPromiseForTest')];
if (unPatchPromiseForTest) {
unPatchPromiseForTest();
}
};
AsyncTestZoneSpec.prototype.onScheduleTask = function (delegate, current, target, task) {
if (task.type !== 'eventTask') {
this._isSync = false;
}
if (task.type === 'microTask' && task.data && task.data instanceof Promise) {
// check whether the promise is a chained promise
if (task.data[AsyncTestZoneSpec.symbolParentUnresolved] === true) {
// chained promise is being scheduled
this.unresolvedChainedPromiseCount--;
}
if (!(this._pendingMicroTasks || this._pendingMacroTasks ||
(this.supportWaitUnresolvedChainedPromise && this.isUnresolvedChainedPromisePending()))) {
// We wait until the next tick because we would like to catch unhandled promises which could
// cause test logic to be executed. In such cases we cannot finish with tasks pending then.
this.runZone.run(function () {
_this._existingFinishTimer = setTimeout(function () {
if (!_this._alreadyErrored && !(_this._pendingMicroTasks || _this._pendingMacroTasks)) {
_this.finishCallback();
}
}, 0);
});
}
};
AsyncTestZoneSpec.prototype.patchPromiseForTest = function () {
if (!this.supportWaitUnresolvedChainedPromise) {
return;
}
var patchPromiseForTest = Promise[Zone.__symbol__('patchPromiseForTest')];
if (patchPromiseForTest) {
patchPromiseForTest();
}
};
AsyncTestZoneSpec.prototype.unPatchPromiseForTest = function () {
if (!this.supportWaitUnresolvedChainedPromise) {
return;
}
var unPatchPromiseForTest = Promise[Zone.__symbol__('unPatchPromiseForTest')];
if (unPatchPromiseForTest) {
unPatchPromiseForTest();
}
};
AsyncTestZoneSpec.prototype.onScheduleTask = function (delegate, current, target, task) {
if (task.type !== 'eventTask') {
this._isSync = false;
}
if (task.type === 'microTask' && task.data && task.data instanceof Promise) {
// check whether the promise is a chained promise
if (task.data[_a.symbolParentUnresolved] === true) {
// chained promise is being scheduled
this.unresolvedChainedPromiseCount--;
}
}
return delegate.scheduleTask(target, task);
};
AsyncTestZoneSpec.prototype.onInvokeTask = function (delegate, current, target, task, applyThis, applyArgs) {
if (task.type !== 'eventTask') {
this._isSync = false;
}
return delegate.invokeTask(target, task, applyThis, applyArgs);
};
AsyncTestZoneSpec.prototype.onCancelTask = function (delegate, current, target, task) {
if (task.type !== 'eventTask') {
this._isSync = false;
}
return delegate.cancelTask(target, task);
};
// Note - we need to use onInvoke at the moment to call finish when a test is
// fully synchronous. TODO(juliemr): remove this when the logic for
// onHasTask changes and it calls whenever the task queues are dirty.
// updated by(JiaLiPassion), only call finish callback when no task
// was scheduled/invoked/canceled.
AsyncTestZoneSpec.prototype.onInvoke = function (parentZoneDelegate, currentZone, targetZone, delegate, applyThis, applyArgs, source) {
if (!this.entryFunction) {
this.entryFunction = delegate;
}
try {
this._isSync = true;
return parentZoneDelegate.invoke(targetZone, delegate, applyThis, applyArgs, source);
}
finally {
// We need to check the delegate is the same as entryFunction or not.
// Consider the following case.
//
// asyncTestZone.run(() => { // Here the delegate will be the entryFunction
// Zone.current.run(() => { // Here the delegate will not be the entryFunction
// });
// });
//
// We only want to check whether there are async tasks scheduled
// for the entry function.
if (this._isSync && this.entryFunction === delegate) {
this._finishCallbackIfDone();
}
}
};
AsyncTestZoneSpec.prototype.onHandleError = function (parentZoneDelegate, currentZone, targetZone, error) {
// Let the parent try to handle the error.
var result = parentZoneDelegate.handleError(targetZone, error);
if (result) {
this.failCallback(error);
this._alreadyErrored = true;
}
return false;
};
AsyncTestZoneSpec.prototype.onHasTask = function (delegate, current, target, hasTaskState) {
delegate.hasTask(target, hasTaskState);
// We should only trigger finishCallback when the target zone is the AsyncTestZone
// Consider the following cases.
}
return delegate.scheduleTask(target, task);
};
AsyncTestZoneSpec.prototype.onInvokeTask = function (delegate, current, target, task, applyThis, applyArgs) {
if (task.type !== 'eventTask') {
this._isSync = false;
}
return delegate.invokeTask(target, task, applyThis, applyArgs);
};
AsyncTestZoneSpec.prototype.onCancelTask = function (delegate, current, target, task) {
if (task.type !== 'eventTask') {
this._isSync = false;
}
return delegate.cancelTask(target, task);
};
// Note - we need to use onInvoke at the moment to call finish when a test is
// fully synchronous. TODO(juliemr): remove this when the logic for
// onHasTask changes and it calls whenever the task queues are dirty.
// updated by(JiaLiPassion), only call finish callback when no task
// was scheduled/invoked/canceled.
AsyncTestZoneSpec.prototype.onInvoke = function (parentZoneDelegate, currentZone, targetZone, delegate, applyThis, applyArgs, source) {
if (!this.entryFunction) {
this.entryFunction = delegate;
}
try {
this._isSync = true;
return parentZoneDelegate.invoke(targetZone, delegate, applyThis, applyArgs, source);
}
finally {
// We need to check the delegate is the same as entryFunction or not.
// Consider the following case.
//
// const childZone = asyncTestZone.fork({
// name: 'child',
// onHasTask: ...
// asyncTestZone.run(() => { // Here the delegate will be the entryFunction
// Zone.current.run(() => { // Here the delegate will not be the entryFunction
// });
// });
//
// So we have nested zones declared the onHasTask hook, in this case,
// the onHasTask will be triggered twice, and cause the finishCallbackIfDone()
// is also be invoked twice. So we need to only trigger the finishCallbackIfDone()
// when the current zone is the same as the target zone.
if (current !== target) {
return;
}
if (hasTaskState.change == 'microTask') {
this._pendingMicroTasks = hasTaskState.microTask;
// We only want to check whether there are async tasks scheduled
// for the entry function.
if (this._isSync && this.entryFunction === delegate) {
this._finishCallbackIfDone();
}
else if (hasTaskState.change == 'macroTask') {
this._pendingMacroTasks = hasTaskState.macroTask;
this._finishCallbackIfDone();
}
};
return AsyncTestZoneSpec;
}());
_a = AsyncTestZoneSpec;
(function () {
_a.symbolParentUnresolved = Zone.__symbol__('parentUnresolved');
})();
}
};
AsyncTestZoneSpec.prototype.onHandleError = function (parentZoneDelegate, currentZone, targetZone, error) {
// Let the parent try to handle the error.
var result = parentZoneDelegate.handleError(targetZone, error);
if (result) {
this.failCallback(error);
this._alreadyErrored = true;
}
return false;
};
AsyncTestZoneSpec.prototype.onHasTask = function (delegate, current, target, hasTaskState) {
delegate.hasTask(target, hasTaskState);
// We should only trigger finishCallback when the target zone is the AsyncTestZone
// Consider the following cases.
//
// const childZone = asyncTestZone.fork({
// name: 'child',
// onHasTask: ...
// });
//
// So we have nested zones declared the onHasTask hook, in this case,
// the onHasTask will be triggered twice, and cause the finishCallbackIfDone()
// is also be invoked twice. So we need to only trigger the finishCallbackIfDone()
// when the current zone is the same as the target zone.
if (current !== target) {
return;
}
if (hasTaskState.change == 'microTask') {
this._pendingMicroTasks = hasTaskState.microTask;
this._finishCallbackIfDone();
}
else if (hasTaskState.change == 'macroTask') {
this._pendingMacroTasks = hasTaskState.macroTask;
this._finishCallbackIfDone();
}
};
return AsyncTestZoneSpec;
}());
function patchAsyncTest(Zone) {
// Export the class so that new instances can be created with proper
// constructor params.
Zone['AsyncTestZoneSpec'] = AsyncTestZoneSpec;
})(typeof window !== 'undefined' && window || typeof self !== 'undefined' && self || global);
Zone.__load_patch('asynctest', function (global, Zone, api) {
/**
* Wraps a test function in an asynchronous test zone. The test will automatically
* complete when all asynchronous calls within this zone are done.
*/
Zone[api.symbol('asyncTest')] = function asyncTest(fn) {
// If we're running using the Jasmine test framework, adapt to call the 'done'
// function when asynchronous activity is finished.
if (global.jasmine) {
Zone.__load_patch('asynctest', function (global, Zone, api) {
/**
* Wraps a test function in an asynchronous test zone. The test will automatically
* complete when all asynchronous calls within this zone are done.
*/
Zone[api.symbol('asyncTest')] = function asyncTest(fn) {
// If we're running using the Jasmine test framework, adapt to call the 'done'
// function when asynchronous activity is finished.
if (global.jasmine) {
// Not using an arrow function to preserve context passed from call site
return function (done) {
if (!done) {
// if we run beforeEach in @angular/core/testing/testing_internal then we get no done
// fake it here and assume sync.
done = function () { };
done.fail = function (e) {
throw e;
};
}
runInTestZone(fn, this, done, function (err) {
if (typeof err === 'string') {
return done.fail(new Error(err));
}
else {
done.fail(err);
}
});
};
}
// Otherwise, return a promise which will resolve when asynchronous activity
// is finished. This will be correctly consumed by the Mocha framework with
// it('...', async(myFn)); or can be used in a custom framework.
// Not using an arrow function to preserve context passed from call site
return function (done) {
if (!done) {
// if we run beforeEach in @angular/core/testing/testing_internal then we get no done
// fake it here and assume sync.
done = function () { };
done.fail = function (e) {
throw e;
};
}
runInTestZone(fn, this, done, function (err) {
if (typeof err === 'string') {
return done.fail(new Error(err));
return function () {
var _this = this;
return new Promise(function (finishCallback, failCallback) {
runInTestZone(fn, _this, finishCallback, failCallback);
});
};
};
function runInTestZone(fn, context, finishCallback, failCallback) {
var currentZone = Zone.current;
var AsyncTestZoneSpec = Zone['AsyncTestZoneSpec'];
if (AsyncTestZoneSpec === undefined) {
throw new Error('AsyncTestZoneSpec is needed for the async() test helper but could not be found. ' +
'Please make sure that your environment includes zone.js/plugins/async-test');
}
var ProxyZoneSpec = Zone['ProxyZoneSpec'];
if (!ProxyZoneSpec) {
throw new Error('ProxyZoneSpec is needed for the async() test helper but could not be found. ' +
'Please make sure that your environment includes zone.js/plugins/proxy');
}
var proxyZoneSpec = ProxyZoneSpec.get();
ProxyZoneSpec.assertPresent();
// We need to create the AsyncTestZoneSpec outside the ProxyZone.
// If we do it in ProxyZone then we will get to infinite recursion.
var proxyZone = Zone.current.getZoneWith('ProxyZoneSpec');
var previousDelegate = proxyZoneSpec.getDelegate();
proxyZone.parent.run(function () {
var testZoneSpec = new AsyncTestZoneSpec(function () {
// Need to restore the original zone.
if (proxyZoneSpec.getDelegate() == testZoneSpec) {
// Only reset the zone spec if it's
// still this one. Otherwise, assume
// it's OK.
proxyZoneSpec.setDelegate(previousDelegate);
}
else {
done.fail(err);
testZoneSpec.unPatchPromiseForTest();
currentZone.run(function () {
finishCallback();
});
}, function (error) {
// Need to restore the original zone.
if (proxyZoneSpec.getDelegate() == testZoneSpec) {
// Only reset the zone spec if it's sill this one. Otherwise, assume it's OK.
proxyZoneSpec.setDelegate(previousDelegate);
}
});
};
}
// Otherwise, return a promise which will resolve when asynchronous activity
// is finished. This will be correctly consumed by the Mocha framework with
// it('...', async(myFn)); or can be used in a custom framework.
// Not using an arrow function to preserve context passed from call site
return function () {
var _this = this;
return new Promise(function (finishCallback, failCallback) {
runInTestZone(fn, _this, finishCallback, failCallback);
testZoneSpec.unPatchPromiseForTest();
currentZone.run(function () {
failCallback(error);
});
}, 'test');
proxyZoneSpec.setDelegate(testZoneSpec);
testZoneSpec.patchPromiseForTest();
});
};
};
function runInTestZone(fn, context, finishCallback, failCallback) {
var currentZone = Zone.current;
var AsyncTestZoneSpec = Zone['AsyncTestZoneSpec'];
if (AsyncTestZoneSpec === undefined) {
throw new Error('AsyncTestZoneSpec is needed for the async() test helper but could not be found. ' +
'Please make sure that your environment includes zone.js/plugins/async-test');
return Zone.current.runGuarded(fn, context);
}
var ProxyZoneSpec = Zone['ProxyZoneSpec'];
if (!ProxyZoneSpec) {
throw new Error('ProxyZoneSpec is needed for the async() test helper but could not be found. ' +
'Please make sure that your environment includes zone.js/plugins/proxy');
}
var proxyZoneSpec = ProxyZoneSpec.get();
ProxyZoneSpec.assertPresent();
// We need to create the AsyncTestZoneSpec outside the ProxyZone.
// If we do it in ProxyZone then we will get to infinite recursion.
var proxyZone = Zone.current.getZoneWith('ProxyZoneSpec');
var previousDelegate = proxyZoneSpec.getDelegate();
proxyZone.parent.run(function () {
var testZoneSpec = new AsyncTestZoneSpec(function () {
// Need to restore the original zone.
if (proxyZoneSpec.getDelegate() == testZoneSpec) {
// Only reset the zone spec if it's
// still this one. Otherwise, assume
// it's OK.
proxyZoneSpec.setDelegate(previousDelegate);
}
testZoneSpec.unPatchPromiseForTest();
currentZone.run(function () {
finishCallback();
});
}, function (error) {
// Need to restore the original zone.
if (proxyZoneSpec.getDelegate() == testZoneSpec) {
// Only reset the zone spec if it's sill this one. Otherwise, assume it's OK.
proxyZoneSpec.setDelegate(previousDelegate);
}
testZoneSpec.unPatchPromiseForTest();
currentZone.run(function () {
failCallback(error);
});
}, 'test');
proxyZoneSpec.setDelegate(testZoneSpec);
testZoneSpec.patchPromiseForTest();
});
return Zone.current.runGuarded(fn, context);
}
});
});
}
patchAsyncTest(Zone);
}));
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){var e,n,t;e="undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global,t=function(){function t(n,t,i){this.finishCallback=n,this.failCallback=t,this._pendingMicroTasks=!1,this._pendingMacroTasks=!1,this._alreadyErrored=!1,this._isSync=!1,this._existingFinishTimer=null,this.entryFunction=null,this.runZone=Zone.current,this.unresolvedChainedPromiseCount=0,this.supportWaitUnresolvedChainedPromise=!1,this.name="asyncTestZone for "+i,this.properties={AsyncTestZoneSpec:this},this.supportWaitUnresolvedChainedPromise=!0===e[Zone.__symbol__("supportWaitUnResolvedChainedPromise")]}return t.prototype.isUnresolvedChainedPromisePending=function(){return this.unresolvedChainedPromiseCount>0},t.prototype._finishCallbackIfDone=function(){var e=this;null!==this._existingFinishTimer&&(clearTimeout(this._existingFinishTimer),this._existingFinishTimer=null),this._pendingMicroTasks||this._pendingMacroTasks||this.supportWaitUnresolvedChainedPromise&&this.isUnresolvedChainedPromisePending()||this.runZone.run((function(){e._existingFinishTimer=setTimeout((function(){e._alreadyErrored||e._pendingMicroTasks||e._pendingMacroTasks||e.finishCallback()}),0)}))},t.prototype.patchPromiseForTest=function(){if(this.supportWaitUnresolvedChainedPromise){var e=Promise[Zone.__symbol__("patchPromiseForTest")];e&&e()}},t.prototype.unPatchPromiseForTest=function(){if(this.supportWaitUnresolvedChainedPromise){var e=Promise[Zone.__symbol__("unPatchPromiseForTest")];e&&e()}},t.prototype.onScheduleTask=function(e,t,i,s){return"eventTask"!==s.type&&(this._isSync=!1),"microTask"===s.type&&s.data&&s.data instanceof Promise&&!0===s.data[n.symbolParentUnresolved]&&this.unresolvedChainedPromiseCount--,e.scheduleTask(i,s)},t.prototype.onInvokeTask=function(e,n,t,i,s,o){return"eventTask"!==i.type&&(this._isSync=!1),e.invokeTask(t,i,s,o)},t.prototype.onCancelTask=function(e,n,t,i){return"eventTask"!==i.type&&(this._isSync=!1),e.cancelTask(t,i)},t.prototype.onInvoke=function(e,n,t,i,s,o,r){this.entryFunction||(this.entryFunction=i);try{return this._isSync=!0,e.invoke(t,i,s,o,r)}finally{this._isSync&&this.entryFunction===i&&this._finishCallbackIfDone()}},t.prototype.onHandleError=function(e,n,t,i){return e.handleError(t,i)&&(this.failCallback(i),this._alreadyErrored=!0),!1},t.prototype.onHasTask=function(e,n,t,i){e.hasTask(t,i),n===t&&("microTask"==i.change?(this._pendingMicroTasks=i.microTask,this._finishCallbackIfDone()):"macroTask"==i.change&&(this._pendingMacroTasks=i.macroTask,this._finishCallbackIfDone()))},t}(),(n=t).symbolParentUnresolved=Zone.__symbol__("parentUnresolved"),Zone.AsyncTestZoneSpec=t,Zone.__load_patch("asynctest",(function(e,n,t){function i(e,t,i,s){var o=n.current,r=n.AsyncTestZoneSpec;if(void 0===r)throw new Error("AsyncTestZoneSpec is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/plugins/async-test");var a=n.ProxyZoneSpec;if(!a)throw new Error("ProxyZoneSpec is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/plugins/proxy");var c=a.get();a.assertPresent();var u=n.current.getZoneWith("ProxyZoneSpec"),h=c.getDelegate();return u.parent.run((function(){var e=new r((function(){c.getDelegate()==e&&c.setDelegate(h),e.unPatchPromiseForTest(),o.run((function(){i()}))}),(function(n){c.getDelegate()==e&&c.setDelegate(h),e.unPatchPromiseForTest(),o.run((function(){s(n)}))}),"test");c.setDelegate(e),e.patchPromiseForTest()})),n.current.runGuarded(e,t)}n[t.symbol("asyncTest")]=function n(t){return e.jasmine?function(e){e||((e=function(){}).fail=function(e){throw e}),i(t,this,e,(function(n){if("string"==typeof n)return e.fail(new Error(n));e.fail(n)}))}:function(){var e=this;return new Promise((function(n,s){i(t,e,n,s)}))}}}))}));
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){var e=globalThis;function n(n){return(e.__Zone_symbol_prefix||"__zone_symbol__")+n}var t="undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global,i=function(){function e(e,i,s){this.finishCallback=e,this.failCallback=i,this._pendingMicroTasks=!1,this._pendingMacroTasks=!1,this._alreadyErrored=!1,this._isSync=!1,this._existingFinishTimer=null,this.entryFunction=null,this.runZone=Zone.current,this.unresolvedChainedPromiseCount=0,this.supportWaitUnresolvedChainedPromise=!1,this.name="asyncTestZone for "+s,this.properties={AsyncTestZoneSpec:this},this.supportWaitUnresolvedChainedPromise=!0===t[n("supportWaitUnResolvedChainedPromise")]}return Object.defineProperty(e,"symbolParentUnresolved",{get:function(){return n("parentUnresolved")},enumerable:!1,configurable:!0}),e.prototype.isUnresolvedChainedPromisePending=function(){return this.unresolvedChainedPromiseCount>0},e.prototype._finishCallbackIfDone=function(){var e=this;null!==this._existingFinishTimer&&(clearTimeout(this._existingFinishTimer),this._existingFinishTimer=null),this._pendingMicroTasks||this._pendingMacroTasks||this.supportWaitUnresolvedChainedPromise&&this.isUnresolvedChainedPromisePending()||this.runZone.run((function(){e._existingFinishTimer=setTimeout((function(){e._alreadyErrored||e._pendingMicroTasks||e._pendingMacroTasks||e.finishCallback()}),0)}))},e.prototype.patchPromiseForTest=function(){if(this.supportWaitUnresolvedChainedPromise){var e=Promise[Zone.__symbol__("patchPromiseForTest")];e&&e()}},e.prototype.unPatchPromiseForTest=function(){if(this.supportWaitUnresolvedChainedPromise){var e=Promise[Zone.__symbol__("unPatchPromiseForTest")];e&&e()}},e.prototype.onScheduleTask=function(n,t,i,s){return"eventTask"!==s.type&&(this._isSync=!1),"microTask"===s.type&&s.data&&s.data instanceof Promise&&!0===s.data[e.symbolParentUnresolved]&&this.unresolvedChainedPromiseCount--,n.scheduleTask(i,s)},e.prototype.onInvokeTask=function(e,n,t,i,s,o){return"eventTask"!==i.type&&(this._isSync=!1),e.invokeTask(t,i,s,o)},e.prototype.onCancelTask=function(e,n,t,i){return"eventTask"!==i.type&&(this._isSync=!1),e.cancelTask(t,i)},e.prototype.onInvoke=function(e,n,t,i,s,o,r){this.entryFunction||(this.entryFunction=i);try{return this._isSync=!0,e.invoke(t,i,s,o,r)}finally{this._isSync&&this.entryFunction===i&&this._finishCallbackIfDone()}},e.prototype.onHandleError=function(e,n,t,i){return e.handleError(t,i)&&(this.failCallback(i),this._alreadyErrored=!0),!1},e.prototype.onHasTask=function(e,n,t,i){e.hasTask(t,i),n===t&&("microTask"==i.change?(this._pendingMicroTasks=i.microTask,this._finishCallbackIfDone()):"macroTask"==i.change&&(this._pendingMacroTasks=i.macroTask,this._finishCallbackIfDone()))},e}();!function s(e){e.AsyncTestZoneSpec=i,e.__load_patch("asynctest",(function(e,n,t){function i(e,t,i,s){var o=n.current,r=n.AsyncTestZoneSpec;if(void 0===r)throw new Error("AsyncTestZoneSpec is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/plugins/async-test");var a=n.ProxyZoneSpec;if(!a)throw new Error("ProxyZoneSpec is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/plugins/proxy");var c=a.get();a.assertPresent();var u=n.current.getZoneWith("ProxyZoneSpec"),h=c.getDelegate();return u.parent.run((function(){var e=new r((function(){c.getDelegate()==e&&c.setDelegate(h),e.unPatchPromiseForTest(),o.run((function(){i()}))}),(function(n){c.getDelegate()==e&&c.setDelegate(h),e.unPatchPromiseForTest(),o.run((function(){s(n)}))}),"test");c.setDelegate(e),e.patchPromiseForTest()})),n.current.runGuarded(e,t)}n[t.symbol("asyncTest")]=function n(t){return e.jasmine?function(e){e||((e=function(){}).fail=function(e){throw e}),i(t,this,e,(function(n){if("string"==typeof n)return e.fail(new Error(n));e.fail(n)}))}:function(){var e=this;return new Promise((function(n,s){i(t,e,n,s)}))}}}))}(Zone)}));

@@ -24,3 +24,3 @@ 'use strict';

* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT

@@ -33,237 +33,162 @@ */

'use strict';
(function (global) {
var _a;
var OriginalDate = global.Date;
// Since when we compile this file to `es2015`, and if we define
// this `FakeDate` as `class FakeDate`, and then set `FakeDate.prototype`
// there will be an error which is `Cannot assign to read only property 'prototype'`
// so we need to use function implementation here.
function FakeDate() {
if (arguments.length === 0) {
var d = new OriginalDate();
d.setTime(FakeDate.now());
return d;
}
else {
var args = Array.prototype.slice.call(arguments);
return new (OriginalDate.bind.apply(OriginalDate, __spreadArray([void 0], args, false)))();
}
var _a;
var global = (typeof window === 'object' && window) || (typeof self === 'object' && self) || globalThis.global;
var OriginalDate = global.Date;
// Since when we compile this file to `es2015`, and if we define
// this `FakeDate` as `class FakeDate`, and then set `FakeDate.prototype`
// there will be an error which is `Cannot assign to read only property 'prototype'`
// so we need to use function implementation here.
function FakeDate() {
if (arguments.length === 0) {
var d = new OriginalDate();
d.setTime(FakeDate.now());
return d;
}
FakeDate.now = function () {
var fakeAsyncTestZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');
if (fakeAsyncTestZoneSpec) {
return fakeAsyncTestZoneSpec.getFakeSystemTime();
else {
var args = Array.prototype.slice.call(arguments);
return new (OriginalDate.bind.apply(OriginalDate, __spreadArray([void 0], args, false)))();
}
}
FakeDate.now = function () {
var fakeAsyncTestZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');
if (fakeAsyncTestZoneSpec) {
return fakeAsyncTestZoneSpec.getFakeSystemTime();
}
return OriginalDate.now.apply(this, arguments);
};
FakeDate.UTC = OriginalDate.UTC;
FakeDate.parse = OriginalDate.parse;
// keep a reference for zone patched timer function
var patchedTimers;
var timeoutCallback = function () { };
var Scheduler = /** @class */ (function () {
function Scheduler() {
// Scheduler queue with the tuple of end time and callback function - sorted by end time.
this._schedulerQueue = [];
// Current simulated time in millis.
this._currentTickTime = 0;
// Current fake system base time in millis.
this._currentFakeBaseSystemTime = OriginalDate.now();
// track requeuePeriodicTimer
this._currentTickRequeuePeriodicEntries = [];
}
Scheduler.getNextId = function () {
var id = patchedTimers.nativeSetTimeout.call(global, timeoutCallback, 0);
patchedTimers.nativeClearTimeout.call(global, id);
if (typeof id === 'number') {
return id;
}
return OriginalDate.now.apply(this, arguments);
// in NodeJS, we just use a number for fakeAsync, since it will not
// conflict with native TimeoutId
return _a.nextNodeJSId++;
};
FakeDate.UTC = OriginalDate.UTC;
FakeDate.parse = OriginalDate.parse;
// keep a reference for zone patched timer function
var timers = {
setTimeout: global.setTimeout,
setInterval: global.setInterval,
clearTimeout: global.clearTimeout,
clearInterval: global.clearInterval
Scheduler.prototype.getCurrentTickTime = function () {
return this._currentTickTime;
};
var Scheduler = /** @class */ (function () {
function Scheduler() {
// Scheduler queue with the tuple of end time and callback function - sorted by end time.
this._schedulerQueue = [];
// Current simulated time in millis.
this._currentTickTime = 0;
// Current fake system base time in millis.
this._currentFakeBaseSystemTime = OriginalDate.now();
// track requeuePeriodicTimer
this._currentTickRequeuePeriodicEntries = [];
Scheduler.prototype.getFakeSystemTime = function () {
return this._currentFakeBaseSystemTime + this._currentTickTime;
};
Scheduler.prototype.setFakeBaseSystemTime = function (fakeBaseSystemTime) {
this._currentFakeBaseSystemTime = fakeBaseSystemTime;
};
Scheduler.prototype.getRealSystemTime = function () {
return OriginalDate.now();
};
Scheduler.prototype.scheduleFunction = function (cb, delay, options) {
options = __assign({
args: [],
isPeriodic: false,
isRequestAnimationFrame: false,
id: -1,
isRequeuePeriodic: false,
}, options);
var currentId = options.id < 0 ? _a.nextId : options.id;
_a.nextId = _a.getNextId();
var endTime = this._currentTickTime + delay;
// Insert so that scheduler queue remains sorted by end time.
var newEntry = {
endTime: endTime,
id: currentId,
func: cb,
args: options.args,
delay: delay,
isPeriodic: options.isPeriodic,
isRequestAnimationFrame: options.isRequestAnimationFrame,
};
if (options.isRequeuePeriodic) {
this._currentTickRequeuePeriodicEntries.push(newEntry);
}
Scheduler.prototype.getCurrentTickTime = function () {
return this._currentTickTime;
};
Scheduler.prototype.getFakeSystemTime = function () {
return this._currentFakeBaseSystemTime + this._currentTickTime;
};
Scheduler.prototype.setFakeBaseSystemTime = function (fakeBaseSystemTime) {
this._currentFakeBaseSystemTime = fakeBaseSystemTime;
};
Scheduler.prototype.getRealSystemTime = function () {
return OriginalDate.now();
};
Scheduler.prototype.scheduleFunction = function (cb, delay, options) {
options = __assign({
args: [],
isPeriodic: false,
isRequestAnimationFrame: false,
id: -1,
isRequeuePeriodic: false
}, options);
var currentId = options.id < 0 ? _a.nextId++ : options.id;
var endTime = this._currentTickTime + delay;
// Insert so that scheduler queue remains sorted by end time.
var newEntry = {
endTime: endTime,
id: currentId,
func: cb,
args: options.args,
delay: delay,
isPeriodic: options.isPeriodic,
isRequestAnimationFrame: options.isRequestAnimationFrame
};
if (options.isRequeuePeriodic) {
this._currentTickRequeuePeriodicEntries.push(newEntry);
var i = 0;
for (; i < this._schedulerQueue.length; i++) {
var currentEntry = this._schedulerQueue[i];
if (newEntry.endTime < currentEntry.endTime) {
break;
}
var i = 0;
for (; i < this._schedulerQueue.length; i++) {
var currentEntry = this._schedulerQueue[i];
if (newEntry.endTime < currentEntry.endTime) {
break;
}
}
this._schedulerQueue.splice(i, 0, newEntry);
return currentId;
};
Scheduler.prototype.removeScheduledFunctionWithId = function (id) {
for (var i = 0; i < this._schedulerQueue.length; i++) {
if (this._schedulerQueue[i].id == id) {
this._schedulerQueue.splice(i, 1);
break;
}
this._schedulerQueue.splice(i, 0, newEntry);
return currentId;
};
Scheduler.prototype.removeScheduledFunctionWithId = function (id) {
for (var i = 0; i < this._schedulerQueue.length; i++) {
if (this._schedulerQueue[i].id == id) {
this._schedulerQueue.splice(i, 1);
break;
}
}
};
Scheduler.prototype.removeAll = function () {
this._schedulerQueue = [];
};
Scheduler.prototype.getTimerCount = function () {
return this._schedulerQueue.length;
};
Scheduler.prototype.tickToNext = function (step, doTick, tickOptions) {
if (step === void 0) { step = 1; }
if (this._schedulerQueue.length < step) {
return;
}
// Find the last task currently queued in the scheduler queue and tick
// till that time.
var startTime = this._currentTickTime;
var targetTask = this._schedulerQueue[step - 1];
this.tick(targetTask.endTime - startTime, doTick, tickOptions);
};
Scheduler.prototype.tick = function (millis, doTick, tickOptions) {
if (millis === void 0) { millis = 0; }
var finalTime = this._currentTickTime + millis;
var lastCurrentTime = 0;
tickOptions = Object.assign({ processNewMacroTasksSynchronously: true }, tickOptions);
// we need to copy the schedulerQueue so nested timeout
// will not be wrongly called in the current tick
// https://github.com/angular/angular/issues/33799
var schedulerQueue = tickOptions.processNewMacroTasksSynchronously
? this._schedulerQueue
: this._schedulerQueue.slice();
if (schedulerQueue.length === 0 && doTick) {
doTick(millis);
return;
}
while (schedulerQueue.length > 0) {
// clear requeueEntries before each loop
this._currentTickRequeuePeriodicEntries = [];
var current = schedulerQueue[0];
if (finalTime < current.endTime) {
// Done processing the queue since it's sorted by endTime.
break;
}
};
Scheduler.prototype.removeAll = function () {
this._schedulerQueue = [];
};
Scheduler.prototype.getTimerCount = function () {
return this._schedulerQueue.length;
};
Scheduler.prototype.tickToNext = function (step, doTick, tickOptions) {
if (step === void 0) { step = 1; }
if (this._schedulerQueue.length < step) {
return;
}
// Find the last task currently queued in the scheduler queue and tick
// till that time.
var startTime = this._currentTickTime;
var targetTask = this._schedulerQueue[step - 1];
this.tick(targetTask.endTime - startTime, doTick, tickOptions);
};
Scheduler.prototype.tick = function (millis, doTick, tickOptions) {
if (millis === void 0) { millis = 0; }
var finalTime = this._currentTickTime + millis;
var lastCurrentTime = 0;
tickOptions = Object.assign({ processNewMacroTasksSynchronously: true }, tickOptions);
// we need to copy the schedulerQueue so nested timeout
// will not be wrongly called in the current tick
// https://github.com/angular/angular/issues/33799
var schedulerQueue = tickOptions.processNewMacroTasksSynchronously ?
this._schedulerQueue :
this._schedulerQueue.slice();
if (schedulerQueue.length === 0 && doTick) {
doTick(millis);
return;
}
while (schedulerQueue.length > 0) {
// clear requeueEntries before each loop
this._currentTickRequeuePeriodicEntries = [];
var current = schedulerQueue[0];
if (finalTime < current.endTime) {
// Done processing the queue since it's sorted by endTime.
break;
}
else {
// Time to run scheduled function. Remove it from the head of queue.
var current_1 = schedulerQueue.shift();
if (!tickOptions.processNewMacroTasksSynchronously) {
var idx = this._schedulerQueue.indexOf(current_1);
if (idx >= 0) {
this._schedulerQueue.splice(idx, 1);
}
else {
// Time to run scheduled function. Remove it from the head of queue.
var current_1 = schedulerQueue.shift();
if (!tickOptions.processNewMacroTasksSynchronously) {
var idx = this._schedulerQueue.indexOf(current_1);
if (idx >= 0) {
this._schedulerQueue.splice(idx, 1);
}
lastCurrentTime = this._currentTickTime;
this._currentTickTime = current_1.endTime;
if (doTick) {
doTick(this._currentTickTime - lastCurrentTime);
}
var retval = current_1.func.apply(global, current_1.isRequestAnimationFrame ? [this._currentTickTime] : current_1.args);
if (!retval) {
// Uncaught exception in the current scheduled function. Stop processing the queue.
break;
}
// check is there any requeue periodic entry is added in
// current loop, if there is, we need to add to current loop
if (!tickOptions.processNewMacroTasksSynchronously) {
this._currentTickRequeuePeriodicEntries.forEach(function (newEntry) {
var i = 0;
for (; i < schedulerQueue.length; i++) {
var currentEntry = schedulerQueue[i];
if (newEntry.endTime < currentEntry.endTime) {
break;
}
}
schedulerQueue.splice(i, 0, newEntry);
});
}
}
}
lastCurrentTime = this._currentTickTime;
this._currentTickTime = finalTime;
if (doTick) {
doTick(this._currentTickTime - lastCurrentTime);
}
};
Scheduler.prototype.flushOnlyPendingTimers = function (doTick) {
if (this._schedulerQueue.length === 0) {
return 0;
}
// Find the last task currently queued in the scheduler queue and tick
// till that time.
var startTime = this._currentTickTime;
var lastTask = this._schedulerQueue[this._schedulerQueue.length - 1];
this.tick(lastTask.endTime - startTime, doTick, { processNewMacroTasksSynchronously: false });
return this._currentTickTime - startTime;
};
Scheduler.prototype.flush = function (limit, flushPeriodic, doTick) {
if (limit === void 0) { limit = 20; }
if (flushPeriodic === void 0) { flushPeriodic = false; }
if (flushPeriodic) {
return this.flushPeriodic(doTick);
}
else {
return this.flushNonPeriodic(limit, doTick);
}
};
Scheduler.prototype.flushPeriodic = function (doTick) {
if (this._schedulerQueue.length === 0) {
return 0;
}
// Find the last task currently queued in the scheduler queue and tick
// till that time.
var startTime = this._currentTickTime;
var lastTask = this._schedulerQueue[this._schedulerQueue.length - 1];
this.tick(lastTask.endTime - startTime, doTick);
return this._currentTickTime - startTime;
};
Scheduler.prototype.flushNonPeriodic = function (limit, doTick) {
var startTime = this._currentTickTime;
var lastCurrentTime = 0;
var count = 0;
while (this._schedulerQueue.length > 0) {
count++;
if (count > limit) {
throw new Error('flush failed after reaching the limit of ' + limit +
' tasks. Does your code use a polling timeout?');
}
// flush only non-periodic timers.
// If the only remaining tasks are periodic(or requestAnimationFrame), finish flushing.
if (this._schedulerQueue.filter(function (task) { return !task.isPeriodic && !task.isRequestAnimationFrame; })
.length === 0) {
break;
}
var current = this._schedulerQueue.shift();
lastCurrentTime = this._currentTickTime;
this._currentTickTime = current.endTime;
this._currentTickTime = current_1.endTime;
if (doTick) {
// Update any secondary schedulers like Jasmine mock Date.
doTick(this._currentTickTime - lastCurrentTime);
}
var retval = current.func.apply(global, current.args);
var retval = current_1.func.apply(global, current_1.isRequestAnimationFrame ? [this._currentTickTime] : current_1.args);
if (!retval) {

@@ -273,516 +198,630 @@ // Uncaught exception in the current scheduled function. Stop processing the queue.

}
// check is there any requeue periodic entry is added in
// current loop, if there is, we need to add to current loop
if (!tickOptions.processNewMacroTasksSynchronously) {
this._currentTickRequeuePeriodicEntries.forEach(function (newEntry) {
var i = 0;
for (; i < schedulerQueue.length; i++) {
var currentEntry = schedulerQueue[i];
if (newEntry.endTime < currentEntry.endTime) {
break;
}
}
schedulerQueue.splice(i, 0, newEntry);
});
}
}
return this._currentTickTime - startTime;
};
return Scheduler;
}());
_a = Scheduler;
// Next scheduler id.
(function () {
_a.nextId = 1;
})();
var FakeAsyncTestZoneSpec = /** @class */ (function () {
function FakeAsyncTestZoneSpec(namePrefix, trackPendingRequestAnimationFrame, macroTaskOptions) {
if (trackPendingRequestAnimationFrame === void 0) { trackPendingRequestAnimationFrame = false; }
this.trackPendingRequestAnimationFrame = trackPendingRequestAnimationFrame;
this.macroTaskOptions = macroTaskOptions;
this._scheduler = new Scheduler();
this._microtasks = [];
this._lastError = null;
this._uncaughtPromiseErrors = Promise[Zone.__symbol__('uncaughtPromiseErrors')];
this.pendingPeriodicTimers = [];
this.pendingTimers = [];
this.patchDateLocked = false;
this.properties = { 'FakeAsyncTestZoneSpec': this };
this.name = 'fakeAsyncTestZone for ' + namePrefix;
// in case user can't access the construction of FakeAsyncTestSpec
// user can also define macroTaskOptions by define a global variable.
if (!this.macroTaskOptions) {
this.macroTaskOptions = global[Zone.__symbol__('FakeAsyncTestMacroTask')];
}
}
FakeAsyncTestZoneSpec.assertInZone = function () {
if (Zone.current.get('FakeAsyncTestZoneSpec') == null) {
throw new Error('The code should be running in the fakeAsync zone to call this function');
lastCurrentTime = this._currentTickTime;
this._currentTickTime = finalTime;
if (doTick) {
doTick(this._currentTickTime - lastCurrentTime);
}
};
Scheduler.prototype.flushOnlyPendingTimers = function (doTick) {
if (this._schedulerQueue.length === 0) {
return 0;
}
// Find the last task currently queued in the scheduler queue and tick
// till that time.
var startTime = this._currentTickTime;
var lastTask = this._schedulerQueue[this._schedulerQueue.length - 1];
this.tick(lastTask.endTime - startTime, doTick, { processNewMacroTasksSynchronously: false });
return this._currentTickTime - startTime;
};
Scheduler.prototype.flush = function (limit, flushPeriodic, doTick) {
if (limit === void 0) { limit = 20; }
if (flushPeriodic === void 0) { flushPeriodic = false; }
if (flushPeriodic) {
return this.flushPeriodic(doTick);
}
else {
return this.flushNonPeriodic(limit, doTick);
}
};
Scheduler.prototype.flushPeriodic = function (doTick) {
if (this._schedulerQueue.length === 0) {
return 0;
}
// Find the last task currently queued in the scheduler queue and tick
// till that time.
var startTime = this._currentTickTime;
var lastTask = this._schedulerQueue[this._schedulerQueue.length - 1];
this.tick(lastTask.endTime - startTime, doTick);
return this._currentTickTime - startTime;
};
Scheduler.prototype.flushNonPeriodic = function (limit, doTick) {
var startTime = this._currentTickTime;
var lastCurrentTime = 0;
var count = 0;
while (this._schedulerQueue.length > 0) {
count++;
if (count > limit) {
throw new Error('flush failed after reaching the limit of ' +
limit +
' tasks. Does your code use a polling timeout?');
}
};
FakeAsyncTestZoneSpec.prototype._fnAndFlush = function (fn, completers) {
var _this = this;
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
fn.apply(global, args);
if (_this._lastError === null) { // Success
if (completers.onSuccess != null) {
completers.onSuccess.apply(global);
}
// Flush microtasks only on success.
_this.flushMicrotasks();
}
else { // Failure
if (completers.onError != null) {
completers.onError.apply(global);
}
}
// Return true if there were no errors, false otherwise.
return _this._lastError === null;
};
};
FakeAsyncTestZoneSpec._removeTimer = function (timers, id) {
var index = timers.indexOf(id);
if (index > -1) {
timers.splice(index, 1);
// flush only non-periodic timers.
// If the only remaining tasks are periodic(or requestAnimationFrame), finish flushing.
if (this._schedulerQueue.filter(function (task) { return !task.isPeriodic && !task.isRequestAnimationFrame; })
.length === 0) {
break;
}
};
FakeAsyncTestZoneSpec.prototype._dequeueTimer = function (id) {
var _this = this;
return function () {
FakeAsyncTestZoneSpec._removeTimer(_this.pendingTimers, id);
};
};
FakeAsyncTestZoneSpec.prototype._requeuePeriodicTimer = function (fn, interval, args, id) {
var _this = this;
return function () {
// Requeue the timer callback if it's not been canceled.
if (_this.pendingPeriodicTimers.indexOf(id) !== -1) {
_this._scheduler.scheduleFunction(fn, interval, { args: args, isPeriodic: true, id: id, isRequeuePeriodic: true });
}
};
};
FakeAsyncTestZoneSpec.prototype._dequeuePeriodicTimer = function (id) {
var _this = this;
return function () {
FakeAsyncTestZoneSpec._removeTimer(_this.pendingPeriodicTimers, id);
};
};
FakeAsyncTestZoneSpec.prototype._setTimeout = function (fn, delay, args, isTimer) {
if (isTimer === void 0) { isTimer = true; }
var removeTimerFn = this._dequeueTimer(Scheduler.nextId);
// Queue the callback and dequeue the timer on success and error.
var cb = this._fnAndFlush(fn, { onSuccess: removeTimerFn, onError: removeTimerFn });
var id = this._scheduler.scheduleFunction(cb, delay, { args: args, isRequestAnimationFrame: !isTimer });
if (isTimer) {
this.pendingTimers.push(id);
var current = this._schedulerQueue.shift();
lastCurrentTime = this._currentTickTime;
this._currentTickTime = current.endTime;
if (doTick) {
// Update any secondary schedulers like Jasmine mock Date.
doTick(this._currentTickTime - lastCurrentTime);
}
return id;
};
FakeAsyncTestZoneSpec.prototype._clearTimeout = function (id) {
FakeAsyncTestZoneSpec._removeTimer(this.pendingTimers, id);
this._scheduler.removeScheduledFunctionWithId(id);
};
FakeAsyncTestZoneSpec.prototype._setInterval = function (fn, interval, args) {
var id = Scheduler.nextId;
var completers = { onSuccess: null, onError: this._dequeuePeriodicTimer(id) };
var cb = this._fnAndFlush(fn, completers);
// Use the callback created above to requeue on success.
completers.onSuccess = this._requeuePeriodicTimer(cb, interval, args, id);
// Queue the callback and dequeue the periodic timer only on error.
this._scheduler.scheduleFunction(cb, interval, { args: args, isPeriodic: true });
this.pendingPeriodicTimers.push(id);
return id;
};
FakeAsyncTestZoneSpec.prototype._clearInterval = function (id) {
FakeAsyncTestZoneSpec._removeTimer(this.pendingPeriodicTimers, id);
this._scheduler.removeScheduledFunctionWithId(id);
};
FakeAsyncTestZoneSpec.prototype._resetLastErrorAndThrow = function () {
var error = this._lastError || this._uncaughtPromiseErrors[0];
this._uncaughtPromiseErrors.length = 0;
this._lastError = null;
throw error;
};
FakeAsyncTestZoneSpec.prototype.getCurrentTickTime = function () {
return this._scheduler.getCurrentTickTime();
};
FakeAsyncTestZoneSpec.prototype.getFakeSystemTime = function () {
return this._scheduler.getFakeSystemTime();
};
FakeAsyncTestZoneSpec.prototype.setFakeBaseSystemTime = function (realTime) {
this._scheduler.setFakeBaseSystemTime(realTime);
};
FakeAsyncTestZoneSpec.prototype.getRealSystemTime = function () {
return this._scheduler.getRealSystemTime();
};
FakeAsyncTestZoneSpec.patchDate = function () {
if (!!global[Zone.__symbol__('disableDatePatching')]) {
// we don't want to patch global Date
// because in some case, global Date
// is already being patched, we need to provide
// an option to let user still use their
// own version of Date.
return;
var retval = current.func.apply(global, current.args);
if (!retval) {
// Uncaught exception in the current scheduled function. Stop processing the queue.
break;
}
if (global['Date'] === FakeDate) {
// already patched
return;
}
return this._currentTickTime - startTime;
};
return Scheduler;
}());
_a = Scheduler;
// Next scheduler id.
(function () {
_a.nextNodeJSId = 1;
})();
(function () {
_a.nextId = -1;
})();
var FakeAsyncTestZoneSpec = /** @class */ (function () {
function FakeAsyncTestZoneSpec(namePrefix, trackPendingRequestAnimationFrame, macroTaskOptions) {
if (trackPendingRequestAnimationFrame === void 0) { trackPendingRequestAnimationFrame = false; }
this.trackPendingRequestAnimationFrame = trackPendingRequestAnimationFrame;
this.macroTaskOptions = macroTaskOptions;
this._scheduler = new Scheduler();
this._microtasks = [];
this._lastError = null;
this._uncaughtPromiseErrors = Promise[Zone.__symbol__('uncaughtPromiseErrors')];
this.pendingPeriodicTimers = [];
this.pendingTimers = [];
this.patchDateLocked = false;
this.properties = { 'FakeAsyncTestZoneSpec': this };
this.name = 'fakeAsyncTestZone for ' + namePrefix;
// in case user can't access the construction of FakeAsyncTestSpec
// user can also define macroTaskOptions by define a global variable.
if (!this.macroTaskOptions) {
this.macroTaskOptions = global[Zone.__symbol__('FakeAsyncTestMacroTask')];
}
}
FakeAsyncTestZoneSpec.assertInZone = function () {
if (Zone.current.get('FakeAsyncTestZoneSpec') == null) {
throw new Error('The code should be running in the fakeAsync zone to call this function');
}
};
FakeAsyncTestZoneSpec.prototype._fnAndFlush = function (fn, completers) {
var _this = this;
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
global['Date'] = FakeDate;
FakeDate.prototype = OriginalDate.prototype;
// try check and reset timers
// because jasmine.clock().install() may
// have replaced the global timer
FakeAsyncTestZoneSpec.checkTimerPatch();
};
FakeAsyncTestZoneSpec.resetDate = function () {
if (global['Date'] === FakeDate) {
global['Date'] = OriginalDate;
fn.apply(global, args);
if (_this._lastError === null) {
// Success
if (completers.onSuccess != null) {
completers.onSuccess.apply(global);
}
// Flush microtasks only on success.
_this.flushMicrotasks();
}
};
FakeAsyncTestZoneSpec.checkTimerPatch = function () {
if (global.setTimeout !== timers.setTimeout) {
global.setTimeout = timers.setTimeout;
global.clearTimeout = timers.clearTimeout;
}
if (global.setInterval !== timers.setInterval) {
global.setInterval = timers.setInterval;
global.clearInterval = timers.clearInterval;
}
};
FakeAsyncTestZoneSpec.prototype.lockDatePatch = function () {
this.patchDateLocked = true;
FakeAsyncTestZoneSpec.patchDate();
};
FakeAsyncTestZoneSpec.prototype.unlockDatePatch = function () {
this.patchDateLocked = false;
FakeAsyncTestZoneSpec.resetDate();
};
FakeAsyncTestZoneSpec.prototype.tickToNext = function (steps, doTick, tickOptions) {
if (steps === void 0) { steps = 1; }
if (tickOptions === void 0) { tickOptions = { processNewMacroTasksSynchronously: true }; }
if (steps <= 0) {
return;
}
FakeAsyncTestZoneSpec.assertInZone();
this.flushMicrotasks();
this._scheduler.tickToNext(steps, doTick, tickOptions);
if (this._lastError !== null) {
this._resetLastErrorAndThrow();
}
};
FakeAsyncTestZoneSpec.prototype.tick = function (millis, doTick, tickOptions) {
if (millis === void 0) { millis = 0; }
if (tickOptions === void 0) { tickOptions = { processNewMacroTasksSynchronously: true }; }
FakeAsyncTestZoneSpec.assertInZone();
this.flushMicrotasks();
this._scheduler.tick(millis, doTick, tickOptions);
if (this._lastError !== null) {
this._resetLastErrorAndThrow();
}
};
FakeAsyncTestZoneSpec.prototype.flushMicrotasks = function () {
var _this = this;
FakeAsyncTestZoneSpec.assertInZone();
var flushErrors = function () {
if (_this._lastError !== null || _this._uncaughtPromiseErrors.length) {
// If there is an error stop processing the microtask queue and rethrow the error.
_this._resetLastErrorAndThrow();
else {
// Failure
if (completers.onError != null) {
completers.onError.apply(global);
}
};
while (this._microtasks.length > 0) {
var microtask = this._microtasks.shift();
microtask.func.apply(microtask.target, microtask.args);
}
flushErrors();
// Return true if there were no errors, false otherwise.
return _this._lastError === null;
};
FakeAsyncTestZoneSpec.prototype.flush = function (limit, flushPeriodic, doTick) {
FakeAsyncTestZoneSpec.assertInZone();
this.flushMicrotasks();
var elapsed = this._scheduler.flush(limit, flushPeriodic, doTick);
if (this._lastError !== null) {
this._resetLastErrorAndThrow();
}
return elapsed;
};
FakeAsyncTestZoneSpec._removeTimer = function (timers, id) {
var index = timers.indexOf(id);
if (index > -1) {
timers.splice(index, 1);
}
};
FakeAsyncTestZoneSpec.prototype._dequeueTimer = function (id) {
var _this = this;
return function () {
FakeAsyncTestZoneSpec._removeTimer(_this.pendingTimers, id);
};
FakeAsyncTestZoneSpec.prototype.flushOnlyPendingTimers = function (doTick) {
FakeAsyncTestZoneSpec.assertInZone();
this.flushMicrotasks();
var elapsed = this._scheduler.flushOnlyPendingTimers(doTick);
if (this._lastError !== null) {
this._resetLastErrorAndThrow();
};
FakeAsyncTestZoneSpec.prototype._requeuePeriodicTimer = function (fn, interval, args, id) {
var _this = this;
return function () {
// Requeue the timer callback if it's not been canceled.
if (_this.pendingPeriodicTimers.indexOf(id) !== -1) {
_this._scheduler.scheduleFunction(fn, interval, {
args: args,
isPeriodic: true,
id: id,
isRequeuePeriodic: true,
});
}
return elapsed;
};
FakeAsyncTestZoneSpec.prototype.removeAllTimers = function () {
FakeAsyncTestZoneSpec.assertInZone();
this._scheduler.removeAll();
this.pendingPeriodicTimers = [];
this.pendingTimers = [];
};
FakeAsyncTestZoneSpec.prototype._dequeuePeriodicTimer = function (id) {
var _this = this;
return function () {
FakeAsyncTestZoneSpec._removeTimer(_this.pendingPeriodicTimers, id);
};
FakeAsyncTestZoneSpec.prototype.getTimerCount = function () {
return this._scheduler.getTimerCount() + this._microtasks.length;
};
FakeAsyncTestZoneSpec.prototype.onScheduleTask = function (delegate, current, target, task) {
switch (task.type) {
case 'microTask':
var args = task.data && task.data.args;
// should pass additional arguments to callback if have any
// currently we know process.nextTick will have such additional
// arguments
var additionalArgs = void 0;
if (args) {
var callbackIndex = task.data.cbIdx;
if (typeof args.length === 'number' && args.length > callbackIndex + 1) {
additionalArgs = Array.prototype.slice.call(args, callbackIndex + 1);
}
}
this._microtasks.push({
func: task.invoke,
args: additionalArgs,
target: task.data && task.data.target
});
break;
case 'macroTask':
switch (task.source) {
case 'setTimeout':
task.data['handleId'] = this._setTimeout(task.invoke, task.data['delay'], Array.prototype.slice.call(task.data['args'], 2));
break;
case 'setImmediate':
task.data['handleId'] = this._setTimeout(task.invoke, 0, Array.prototype.slice.call(task.data['args'], 1));
break;
case 'setInterval':
task.data['handleId'] = this._setInterval(task.invoke, task.data['delay'], Array.prototype.slice.call(task.data['args'], 2));
break;
case 'XMLHttpRequest.send':
throw new Error('Cannot make XHRs from within a fake async test. Request URL: ' +
task.data['url']);
case 'requestAnimationFrame':
case 'webkitRequestAnimationFrame':
case 'mozRequestAnimationFrame':
// Simulate a requestAnimationFrame by using a setTimeout with 16 ms.
// (60 frames per second)
task.data['handleId'] = this._setTimeout(task.invoke, 16, task.data['args'], this.trackPendingRequestAnimationFrame);
break;
default:
// user can define which macroTask they want to support by passing
// macroTaskOptions
var macroTaskOption = this.findMacroTaskOption(task);
if (macroTaskOption) {
var args_1 = task.data && task.data['args'];
var delay = args_1 && args_1.length > 1 ? args_1[1] : 0;
var callbackArgs = macroTaskOption.callbackArgs ? macroTaskOption.callbackArgs : args_1;
if (!!macroTaskOption.isPeriodic) {
// periodic macroTask, use setInterval to simulate
task.data['handleId'] = this._setInterval(task.invoke, delay, callbackArgs);
task.data.isPeriodic = true;
}
else {
// not periodic, use setTimeout to simulate
task.data['handleId'] = this._setTimeout(task.invoke, delay, callbackArgs);
}
break;
}
throw new Error('Unknown macroTask scheduled in fake async test: ' + task.source);
}
break;
case 'eventTask':
task = delegate.scheduleTask(target, task);
break;
};
FakeAsyncTestZoneSpec.prototype._setTimeout = function (fn, delay, args, isTimer) {
if (isTimer === void 0) { isTimer = true; }
var removeTimerFn = this._dequeueTimer(Scheduler.nextId);
// Queue the callback and dequeue the timer on success and error.
var cb = this._fnAndFlush(fn, { onSuccess: removeTimerFn, onError: removeTimerFn });
var id = this._scheduler.scheduleFunction(cb, delay, { args: args, isRequestAnimationFrame: !isTimer });
if (isTimer) {
this.pendingTimers.push(id);
}
return id;
};
FakeAsyncTestZoneSpec.prototype._clearTimeout = function (id) {
FakeAsyncTestZoneSpec._removeTimer(this.pendingTimers, id);
this._scheduler.removeScheduledFunctionWithId(id);
};
FakeAsyncTestZoneSpec.prototype._setInterval = function (fn, interval, args) {
var id = Scheduler.nextId;
var completers = { onSuccess: null, onError: this._dequeuePeriodicTimer(id) };
var cb = this._fnAndFlush(fn, completers);
// Use the callback created above to requeue on success.
completers.onSuccess = this._requeuePeriodicTimer(cb, interval, args, id);
// Queue the callback and dequeue the periodic timer only on error.
this._scheduler.scheduleFunction(cb, interval, { args: args, isPeriodic: true });
this.pendingPeriodicTimers.push(id);
return id;
};
FakeAsyncTestZoneSpec.prototype._clearInterval = function (id) {
FakeAsyncTestZoneSpec._removeTimer(this.pendingPeriodicTimers, id);
this._scheduler.removeScheduledFunctionWithId(id);
};
FakeAsyncTestZoneSpec.prototype._resetLastErrorAndThrow = function () {
var error = this._lastError || this._uncaughtPromiseErrors[0];
this._uncaughtPromiseErrors.length = 0;
this._lastError = null;
throw error;
};
FakeAsyncTestZoneSpec.prototype.getCurrentTickTime = function () {
return this._scheduler.getCurrentTickTime();
};
FakeAsyncTestZoneSpec.prototype.getFakeSystemTime = function () {
return this._scheduler.getFakeSystemTime();
};
FakeAsyncTestZoneSpec.prototype.setFakeBaseSystemTime = function (realTime) {
this._scheduler.setFakeBaseSystemTime(realTime);
};
FakeAsyncTestZoneSpec.prototype.getRealSystemTime = function () {
return this._scheduler.getRealSystemTime();
};
FakeAsyncTestZoneSpec.patchDate = function () {
if (!!global[Zone.__symbol__('disableDatePatching')]) {
// we don't want to patch global Date
// because in some case, global Date
// is already being patched, we need to provide
// an option to let user still use their
// own version of Date.
return;
}
if (global['Date'] === FakeDate) {
// already patched
return;
}
global['Date'] = FakeDate;
FakeDate.prototype = OriginalDate.prototype;
// try check and reset timers
// because jasmine.clock().install() may
// have replaced the global timer
FakeAsyncTestZoneSpec.checkTimerPatch();
};
FakeAsyncTestZoneSpec.resetDate = function () {
if (global['Date'] === FakeDate) {
global['Date'] = OriginalDate;
}
};
FakeAsyncTestZoneSpec.checkTimerPatch = function () {
if (!patchedTimers) {
throw new Error('Expected timers to have been patched.');
}
if (global.setTimeout !== patchedTimers.setTimeout) {
global.setTimeout = patchedTimers.setTimeout;
global.clearTimeout = patchedTimers.clearTimeout;
}
if (global.setInterval !== patchedTimers.setInterval) {
global.setInterval = patchedTimers.setInterval;
global.clearInterval = patchedTimers.clearInterval;
}
};
FakeAsyncTestZoneSpec.prototype.lockDatePatch = function () {
this.patchDateLocked = true;
FakeAsyncTestZoneSpec.patchDate();
};
FakeAsyncTestZoneSpec.prototype.unlockDatePatch = function () {
this.patchDateLocked = false;
FakeAsyncTestZoneSpec.resetDate();
};
FakeAsyncTestZoneSpec.prototype.tickToNext = function (steps, doTick, tickOptions) {
if (steps === void 0) { steps = 1; }
if (tickOptions === void 0) { tickOptions = { processNewMacroTasksSynchronously: true }; }
if (steps <= 0) {
return;
}
FakeAsyncTestZoneSpec.assertInZone();
this.flushMicrotasks();
this._scheduler.tickToNext(steps, doTick, tickOptions);
if (this._lastError !== null) {
this._resetLastErrorAndThrow();
}
};
FakeAsyncTestZoneSpec.prototype.tick = function (millis, doTick, tickOptions) {
if (millis === void 0) { millis = 0; }
if (tickOptions === void 0) { tickOptions = { processNewMacroTasksSynchronously: true }; }
FakeAsyncTestZoneSpec.assertInZone();
this.flushMicrotasks();
this._scheduler.tick(millis, doTick, tickOptions);
if (this._lastError !== null) {
this._resetLastErrorAndThrow();
}
};
FakeAsyncTestZoneSpec.prototype.flushMicrotasks = function () {
var _this = this;
FakeAsyncTestZoneSpec.assertInZone();
var flushErrors = function () {
if (_this._lastError !== null || _this._uncaughtPromiseErrors.length) {
// If there is an error stop processing the microtask queue and rethrow the error.
_this._resetLastErrorAndThrow();
}
return task;
};
FakeAsyncTestZoneSpec.prototype.onCancelTask = function (delegate, current, target, task) {
switch (task.source) {
case 'setTimeout':
case 'requestAnimationFrame':
case 'webkitRequestAnimationFrame':
case 'mozRequestAnimationFrame':
return this._clearTimeout(task.data['handleId']);
case 'setInterval':
return this._clearInterval(task.data['handleId']);
default:
// user can define which macroTask they want to support by passing
// macroTaskOptions
var macroTaskOption = this.findMacroTaskOption(task);
if (macroTaskOption) {
var handleId = task.data['handleId'];
return macroTaskOption.isPeriodic ? this._clearInterval(handleId) :
this._clearTimeout(handleId);
while (this._microtasks.length > 0) {
var microtask = this._microtasks.shift();
microtask.func.apply(microtask.target, microtask.args);
}
flushErrors();
};
FakeAsyncTestZoneSpec.prototype.flush = function (limit, flushPeriodic, doTick) {
FakeAsyncTestZoneSpec.assertInZone();
this.flushMicrotasks();
var elapsed = this._scheduler.flush(limit, flushPeriodic, doTick);
if (this._lastError !== null) {
this._resetLastErrorAndThrow();
}
return elapsed;
};
FakeAsyncTestZoneSpec.prototype.flushOnlyPendingTimers = function (doTick) {
FakeAsyncTestZoneSpec.assertInZone();
this.flushMicrotasks();
var elapsed = this._scheduler.flushOnlyPendingTimers(doTick);
if (this._lastError !== null) {
this._resetLastErrorAndThrow();
}
return elapsed;
};
FakeAsyncTestZoneSpec.prototype.removeAllTimers = function () {
FakeAsyncTestZoneSpec.assertInZone();
this._scheduler.removeAll();
this.pendingPeriodicTimers = [];
this.pendingTimers = [];
};
FakeAsyncTestZoneSpec.prototype.getTimerCount = function () {
return this._scheduler.getTimerCount() + this._microtasks.length;
};
FakeAsyncTestZoneSpec.prototype.onScheduleTask = function (delegate, current, target, task) {
switch (task.type) {
case 'microTask':
var args = task.data && task.data.args;
// should pass additional arguments to callback if have any
// currently we know process.nextTick will have such additional
// arguments
var additionalArgs = void 0;
if (args) {
var callbackIndex = task.data.cbIdx;
if (typeof args.length === 'number' && args.length > callbackIndex + 1) {
additionalArgs = Array.prototype.slice.call(args, callbackIndex + 1);
}
return delegate.cancelTask(target, task);
}
};
FakeAsyncTestZoneSpec.prototype.onInvoke = function (delegate, current, target, callback, applyThis, applyArgs, source) {
try {
FakeAsyncTestZoneSpec.patchDate();
return delegate.invoke(target, callback, applyThis, applyArgs, source);
}
finally {
if (!this.patchDateLocked) {
FakeAsyncTestZoneSpec.resetDate();
}
}
};
FakeAsyncTestZoneSpec.prototype.findMacroTaskOption = function (task) {
if (!this.macroTaskOptions) {
return null;
}
for (var i = 0; i < this.macroTaskOptions.length; i++) {
var macroTaskOption = this.macroTaskOptions[i];
if (macroTaskOption.source === task.source) {
return macroTaskOption;
this._microtasks.push({
func: task.invoke,
args: additionalArgs,
target: task.data && task.data.target,
});
break;
case 'macroTask':
switch (task.source) {
case 'setTimeout':
task.data['handleId'] = this._setTimeout(task.invoke, task.data['delay'], Array.prototype.slice.call(task.data['args'], 2));
break;
case 'setImmediate':
task.data['handleId'] = this._setTimeout(task.invoke, 0, Array.prototype.slice.call(task.data['args'], 1));
break;
case 'setInterval':
task.data['handleId'] = this._setInterval(task.invoke, task.data['delay'], Array.prototype.slice.call(task.data['args'], 2));
break;
case 'XMLHttpRequest.send':
throw new Error('Cannot make XHRs from within a fake async test. Request URL: ' +
task.data['url']);
case 'requestAnimationFrame':
case 'webkitRequestAnimationFrame':
case 'mozRequestAnimationFrame':
// Simulate a requestAnimationFrame by using a setTimeout with 16 ms.
// (60 frames per second)
task.data['handleId'] = this._setTimeout(task.invoke, 16, task.data['args'], this.trackPendingRequestAnimationFrame);
break;
default:
// user can define which macroTask they want to support by passing
// macroTaskOptions
var macroTaskOption = this.findMacroTaskOption(task);
if (macroTaskOption) {
var args_1 = task.data && task.data['args'];
var delay = args_1 && args_1.length > 1 ? args_1[1] : 0;
var callbackArgs = macroTaskOption.callbackArgs ? macroTaskOption.callbackArgs : args_1;
if (!!macroTaskOption.isPeriodic) {
// periodic macroTask, use setInterval to simulate
task.data['handleId'] = this._setInterval(task.invoke, delay, callbackArgs);
task.data.isPeriodic = true;
}
else {
// not periodic, use setTimeout to simulate
task.data['handleId'] = this._setTimeout(task.invoke, delay, callbackArgs);
}
break;
}
throw new Error('Unknown macroTask scheduled in fake async test: ' + task.source);
}
break;
case 'eventTask':
task = delegate.scheduleTask(target, task);
break;
}
return task;
};
FakeAsyncTestZoneSpec.prototype.onCancelTask = function (delegate, current, target, task) {
switch (task.source) {
case 'setTimeout':
case 'requestAnimationFrame':
case 'webkitRequestAnimationFrame':
case 'mozRequestAnimationFrame':
return this._clearTimeout(task.data['handleId']);
case 'setInterval':
return this._clearInterval(task.data['handleId']);
default:
// user can define which macroTask they want to support by passing
// macroTaskOptions
var macroTaskOption = this.findMacroTaskOption(task);
if (macroTaskOption) {
var handleId = task.data['handleId'];
return macroTaskOption.isPeriodic
? this._clearInterval(handleId)
: this._clearTimeout(handleId);
}
return delegate.cancelTask(target, task);
}
};
FakeAsyncTestZoneSpec.prototype.onInvoke = function (delegate, current, target, callback, applyThis, applyArgs, source) {
try {
FakeAsyncTestZoneSpec.patchDate();
return delegate.invoke(target, callback, applyThis, applyArgs, source);
}
finally {
if (!this.patchDateLocked) {
FakeAsyncTestZoneSpec.resetDate();
}
}
};
FakeAsyncTestZoneSpec.prototype.findMacroTaskOption = function (task) {
if (!this.macroTaskOptions) {
return null;
};
FakeAsyncTestZoneSpec.prototype.onHandleError = function (parentZoneDelegate, currentZone, targetZone, error) {
this._lastError = error;
return false; // Don't propagate error to parent zone.
};
return FakeAsyncTestZoneSpec;
}());
// Export the class so that new instances can be created with proper
// constructor params.
Zone['FakeAsyncTestZoneSpec'] = FakeAsyncTestZoneSpec;
})(typeof window === 'object' && window || typeof self === 'object' && self || global);
Zone.__load_patch('fakeasync', function (global, Zone, api) {
var FakeAsyncTestZoneSpec = Zone && Zone['FakeAsyncTestZoneSpec'];
function getProxyZoneSpec() {
return Zone && Zone['ProxyZoneSpec'];
}
for (var i = 0; i < this.macroTaskOptions.length; i++) {
var macroTaskOption = this.macroTaskOptions[i];
if (macroTaskOption.source === task.source) {
return macroTaskOption;
}
}
return null;
};
FakeAsyncTestZoneSpec.prototype.onHandleError = function (parentZoneDelegate, currentZone, targetZone, error) {
this._lastError = error;
return false; // Don't propagate error to parent zone.
};
return FakeAsyncTestZoneSpec;
}());
var _fakeAsyncTestZoneSpec = null;
function getProxyZoneSpec() {
return Zone && Zone['ProxyZoneSpec'];
}
/**
* Clears out the shared fake async zone for a test.
* To be called in a global `beforeEach`.
*
* @experimental
*/
function resetFakeAsyncZone() {
if (_fakeAsyncTestZoneSpec) {
_fakeAsyncTestZoneSpec.unlockDatePatch();
}
var _fakeAsyncTestZoneSpec = null;
/**
* Clears out the shared fake async zone for a test.
* To be called in a global `beforeEach`.
*
* @experimental
*/
function resetFakeAsyncZone() {
if (_fakeAsyncTestZoneSpec) {
_fakeAsyncTestZoneSpec.unlockDatePatch();
_fakeAsyncTestZoneSpec = null;
// in node.js testing we may not have ProxyZoneSpec in which case there is nothing to reset.
getProxyZoneSpec() && getProxyZoneSpec().assertPresent().resetDelegate();
}
/**
* Wraps a function to be executed in the fakeAsync zone:
* - microtasks are manually executed by calling `flushMicrotasks()`,
* - timers are synchronous, `tick()` simulates the asynchronous passage of time.
*
* If there are any pending timers at the end of the function, an exception will be thrown.
*
* Can be used to wrap inject() calls.
*
* ## Example
*
* {@example core/testing/ts/fake_async.ts region='basic'}
*
* @param fn
* @returns The function wrapped to be executed in the fakeAsync zone
*
* @experimental
*/
function fakeAsync(fn) {
// Not using an arrow function to preserve context passed from call site
var fakeAsyncFn = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
_fakeAsyncTestZoneSpec = null;
// in node.js testing we may not have ProxyZoneSpec in which case there is nothing to reset.
getProxyZoneSpec() && getProxyZoneSpec().assertPresent().resetDelegate();
}
/**
* Wraps a function to be executed in the fakeAsync zone:
* - microtasks are manually executed by calling `flushMicrotasks()`,
* - timers are synchronous, `tick()` simulates the asynchronous passage of time.
*
* If there are any pending timers at the end of the function, an exception will be thrown.
*
* Can be used to wrap inject() calls.
*
* ## Example
*
* {@example core/testing/ts/fake_async.ts region='basic'}
*
* @param fn
* @returns The function wrapped to be executed in the fakeAsync zone
*
* @experimental
*/
function fakeAsync(fn) {
// Not using an arrow function to preserve context passed from call site
var fakeAsyncFn = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
var ProxyZoneSpec = getProxyZoneSpec();
if (!ProxyZoneSpec) {
throw new Error('ProxyZoneSpec is needed for the async() test helper but could not be found. ' +
'Please make sure that your environment includes zone.js/plugins/proxy');
}
var proxyZoneSpec = ProxyZoneSpec.assertPresent();
if (Zone.current.get('FakeAsyncTestZoneSpec')) {
throw new Error('fakeAsync() calls can not be nested');
}
try {
// in case jasmine.clock init a fakeAsyncTestZoneSpec
if (!_fakeAsyncTestZoneSpec) {
var FakeAsyncTestZoneSpec_1 = Zone && Zone['FakeAsyncTestZoneSpec'];
if (proxyZoneSpec.getDelegate() instanceof FakeAsyncTestZoneSpec_1) {
throw new Error('fakeAsync() calls can not be nested');
}
_fakeAsyncTestZoneSpec = new FakeAsyncTestZoneSpec_1();
}
var ProxyZoneSpec = getProxyZoneSpec();
if (!ProxyZoneSpec) {
throw new Error('ProxyZoneSpec is needed for the async() test helper but could not be found. ' +
'Please make sure that your environment includes zone.js/plugins/proxy');
}
var proxyZoneSpec = ProxyZoneSpec.assertPresent();
if (Zone.current.get('FakeAsyncTestZoneSpec')) {
throw new Error('fakeAsync() calls can not be nested');
}
var res = void 0;
var lastProxyZoneSpec = proxyZoneSpec.getDelegate();
proxyZoneSpec.setDelegate(_fakeAsyncTestZoneSpec);
_fakeAsyncTestZoneSpec.lockDatePatch();
try {
// in case jasmine.clock init a fakeAsyncTestZoneSpec
if (!_fakeAsyncTestZoneSpec) {
if (proxyZoneSpec.getDelegate() instanceof FakeAsyncTestZoneSpec) {
throw new Error('fakeAsync() calls can not be nested');
}
_fakeAsyncTestZoneSpec = new FakeAsyncTestZoneSpec();
}
var res = void 0;
var lastProxyZoneSpec = proxyZoneSpec.getDelegate();
proxyZoneSpec.setDelegate(_fakeAsyncTestZoneSpec);
_fakeAsyncTestZoneSpec.lockDatePatch();
try {
res = fn.apply(this, args);
flushMicrotasks();
}
finally {
proxyZoneSpec.setDelegate(lastProxyZoneSpec);
}
if (_fakeAsyncTestZoneSpec.pendingPeriodicTimers.length > 0) {
throw new Error("".concat(_fakeAsyncTestZoneSpec.pendingPeriodicTimers.length, " ") +
"periodic timer(s) still in the queue.");
}
if (_fakeAsyncTestZoneSpec.pendingTimers.length > 0) {
throw new Error("".concat(_fakeAsyncTestZoneSpec.pendingTimers.length, " timer(s) still in the queue."));
}
return res;
res = fn.apply(this, args);
flushMicrotasks();
}
finally {
resetFakeAsyncZone();
proxyZoneSpec.setDelegate(lastProxyZoneSpec);
}
};
fakeAsyncFn.isFakeAsync = true;
return fakeAsyncFn;
}
function _getFakeAsyncZoneSpec() {
if (_fakeAsyncTestZoneSpec == null) {
_fakeAsyncTestZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');
if (_fakeAsyncTestZoneSpec == null) {
throw new Error('The code should be running in the fakeAsync zone to call this function');
if (_fakeAsyncTestZoneSpec.pendingPeriodicTimers.length > 0) {
throw new Error("".concat(_fakeAsyncTestZoneSpec.pendingPeriodicTimers.length, " ") +
"periodic timer(s) still in the queue.");
}
if (_fakeAsyncTestZoneSpec.pendingTimers.length > 0) {
throw new Error("".concat(_fakeAsyncTestZoneSpec.pendingTimers.length, " timer(s) still in the queue."));
}
return res;
}
return _fakeAsyncTestZoneSpec;
finally {
resetFakeAsyncZone();
}
};
fakeAsyncFn.isFakeAsync = true;
return fakeAsyncFn;
}
function _getFakeAsyncZoneSpec() {
if (_fakeAsyncTestZoneSpec == null) {
_fakeAsyncTestZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');
if (_fakeAsyncTestZoneSpec == null) {
throw new Error('The code should be running in the fakeAsync zone to call this function');
}
}
/**
* Simulates the asynchronous passage of time for the timers in the fakeAsync zone.
*
* The microtasks queue is drained at the very start of this function and after any timer callback
* has been executed.
*
* ## Example
*
* {@example core/testing/ts/fake_async.ts region='basic'}
*
* @experimental
*/
function tick(millis, ignoreNestedTimeout) {
if (millis === void 0) { millis = 0; }
if (ignoreNestedTimeout === void 0) { ignoreNestedTimeout = false; }
_getFakeAsyncZoneSpec().tick(millis, null, ignoreNestedTimeout);
}
/**
* Simulates the asynchronous passage of time for the timers in the fakeAsync zone by
* draining the macrotask queue until it is empty. The returned value is the milliseconds
* of time that would have been elapsed.
*
* @param maxTurns
* @returns The simulated time elapsed, in millis.
*
* @experimental
*/
function flush(maxTurns) {
return _getFakeAsyncZoneSpec().flush(maxTurns);
}
/**
* Discard all remaining periodic tasks.
*
* @experimental
*/
function discardPeriodicTasks() {
var zoneSpec = _getFakeAsyncZoneSpec();
zoneSpec.pendingPeriodicTimers;
zoneSpec.pendingPeriodicTimers.length = 0;
}
/**
* Flush any pending microtasks.
*
* @experimental
*/
function flushMicrotasks() {
_getFakeAsyncZoneSpec().flushMicrotasks();
}
Zone[api.symbol('fakeAsyncTest')] =
{ resetFakeAsyncZone: resetFakeAsyncZone, flushMicrotasks: flushMicrotasks, discardPeriodicTasks: discardPeriodicTasks, tick: tick, flush: flush, fakeAsync: fakeAsync };
}, true);
return _fakeAsyncTestZoneSpec;
}
/**
* Simulates the asynchronous passage of time for the timers in the fakeAsync zone.
*
* The microtasks queue is drained at the very start of this function and after any timer
* callback has been executed.
*
* ## Example
*
* {@example core/testing/ts/fake_async.ts region='basic'}
*
* @experimental
*/
function tick(millis, ignoreNestedTimeout) {
if (millis === void 0) { millis = 0; }
if (ignoreNestedTimeout === void 0) { ignoreNestedTimeout = false; }
_getFakeAsyncZoneSpec().tick(millis, null, ignoreNestedTimeout);
}
/**
* Simulates the asynchronous passage of time for the timers in the fakeAsync zone by
* draining the macrotask queue until it is empty. The returned value is the milliseconds
* of time that would have been elapsed.
*
* @param maxTurns
* @returns The simulated time elapsed, in millis.
*
* @experimental
*/
function flush(maxTurns) {
return _getFakeAsyncZoneSpec().flush(maxTurns);
}
/**
* Discard all remaining periodic tasks.
*
* @experimental
*/
function discardPeriodicTasks() {
var zoneSpec = _getFakeAsyncZoneSpec();
zoneSpec.pendingPeriodicTimers;
zoneSpec.pendingPeriodicTimers.length = 0;
}
/**
* Flush any pending microtasks.
*
* @experimental
*/
function flushMicrotasks() {
_getFakeAsyncZoneSpec().flushMicrotasks();
}
function patchFakeAsyncTest(Zone) {
// Export the class so that new instances can be created with proper
// constructor params.
Zone['FakeAsyncTestZoneSpec'] = FakeAsyncTestZoneSpec;
Zone.__load_patch('fakeasync', function (global, Zone, api) {
Zone[api.symbol('fakeAsyncTest')] = {
resetFakeAsyncZone: resetFakeAsyncZone,
flushMicrotasks: flushMicrotasks,
discardPeriodicTasks: discardPeriodicTasks,
tick: tick,
flush: flush,
fakeAsync: fakeAsync,
};
}, true);
patchedTimers = {
setTimeout: global.setTimeout,
setInterval: global.setInterval,
clearTimeout: global.clearTimeout,
clearInterval: global.clearInterval,
nativeSetTimeout: global[Zone.__symbol__('setTimeout')],
nativeClearTimeout: global[Zone.__symbol__('clearTimeout')],
};
Scheduler.nextId = Scheduler.getNextId();
}
patchFakeAsyncTest(Zone);
}));
"use strict";var __assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},__assign.apply(this,arguments)},__spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var i,n=0,s=t.length;n<s;n++)!i&&n in t||(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))};
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/
!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){!function(e){var t,r=e.Date;function i(){if(0===arguments.length){var e=new r;return e.setTime(i.now()),e}var t=Array.prototype.slice.call(arguments);return new(r.bind.apply(r,__spreadArray([void 0],t,!1)))}i.now=function(){var e=Zone.current.get("FakeAsyncTestZoneSpec");return e?e.getFakeSystemTime():r.now.apply(this,arguments)},i.UTC=r.UTC,i.parse=r.parse;var n={setTimeout:e.setTimeout,setInterval:e.setInterval,clearTimeout:e.clearTimeout,clearInterval:e.clearInterval},s=function(){function i(){this._schedulerQueue=[],this._currentTickTime=0,this._currentFakeBaseSystemTime=r.now(),this._currentTickRequeuePeriodicEntries=[]}return i.prototype.getCurrentTickTime=function(){return this._currentTickTime},i.prototype.getFakeSystemTime=function(){return this._currentFakeBaseSystemTime+this._currentTickTime},i.prototype.setFakeBaseSystemTime=function(e){this._currentFakeBaseSystemTime=e},i.prototype.getRealSystemTime=function(){return r.now()},i.prototype.scheduleFunction=function(e,r,i){var n=(i=__assign({args:[],isPeriodic:!1,isRequestAnimationFrame:!1,id:-1,isRequeuePeriodic:!1},i)).id<0?t.nextId++:i.id,s={endTime:this._currentTickTime+r,id:n,func:e,args:i.args,delay:r,isPeriodic:i.isPeriodic,isRequestAnimationFrame:i.isRequestAnimationFrame};i.isRequeuePeriodic&&this._currentTickRequeuePeriodicEntries.push(s);for(var o=0;o<this._schedulerQueue.length&&!(s.endTime<this._schedulerQueue[o].endTime);o++);return this._schedulerQueue.splice(o,0,s),n},i.prototype.removeScheduledFunctionWithId=function(e){for(var t=0;t<this._schedulerQueue.length;t++)if(this._schedulerQueue[t].id==e){this._schedulerQueue.splice(t,1);break}},i.prototype.removeAll=function(){this._schedulerQueue=[]},i.prototype.getTimerCount=function(){return this._schedulerQueue.length},i.prototype.tickToNext=function(e,t,r){void 0===e&&(e=1),this._schedulerQueue.length<e||this.tick(this._schedulerQueue[e-1].endTime-this._currentTickTime,t,r)},i.prototype.tick=function(t,r,i){void 0===t&&(t=0);var n=this._currentTickTime+t,s=0,o=(i=Object.assign({processNewMacroTasksSynchronously:!0},i)).processNewMacroTasksSynchronously?this._schedulerQueue:this._schedulerQueue.slice();if(0===o.length&&r)r(t);else{for(;o.length>0&&(this._currentTickRequeuePeriodicEntries=[],!(n<o[0].endTime));){var a=o.shift();if(!i.processNewMacroTasksSynchronously){var c=this._schedulerQueue.indexOf(a);c>=0&&this._schedulerQueue.splice(c,1)}if(s=this._currentTickTime,this._currentTickTime=a.endTime,r&&r(this._currentTickTime-s),!a.func.apply(e,a.isRequestAnimationFrame?[this._currentTickTime]:a.args))break;i.processNewMacroTasksSynchronously||this._currentTickRequeuePeriodicEntries.forEach((function(e){for(var t=0;t<o.length&&!(e.endTime<o[t].endTime);t++);o.splice(t,0,e)}))}s=this._currentTickTime,this._currentTickTime=n,r&&r(this._currentTickTime-s)}},i.prototype.flushOnlyPendingTimers=function(e){if(0===this._schedulerQueue.length)return 0;var t=this._currentTickTime;return this.tick(this._schedulerQueue[this._schedulerQueue.length-1].endTime-t,e,{processNewMacroTasksSynchronously:!1}),this._currentTickTime-t},i.prototype.flush=function(e,t,r){return void 0===e&&(e=20),void 0===t&&(t=!1),t?this.flushPeriodic(r):this.flushNonPeriodic(e,r)},i.prototype.flushPeriodic=function(e){if(0===this._schedulerQueue.length)return 0;var t=this._currentTickTime;return this.tick(this._schedulerQueue[this._schedulerQueue.length-1].endTime-t,e),this._currentTickTime-t},i.prototype.flushNonPeriodic=function(t,r){for(var i=this._currentTickTime,n=0,s=0;this._schedulerQueue.length>0;){if(++s>t)throw new Error("flush failed after reaching the limit of "+t+" tasks. Does your code use a polling timeout?");if(0===this._schedulerQueue.filter((function(e){return!e.isPeriodic&&!e.isRequestAnimationFrame})).length)break;var o=this._schedulerQueue.shift();if(n=this._currentTickTime,this._currentTickTime=o.endTime,r&&r(this._currentTickTime-n),!o.func.apply(e,o.args))break}return this._currentTickTime-i},i}();(t=s).nextId=1;var o=function(){function t(t,r,i){void 0===r&&(r=!1),this.trackPendingRequestAnimationFrame=r,this.macroTaskOptions=i,this._scheduler=new s,this._microtasks=[],this._lastError=null,this._uncaughtPromiseErrors=Promise[Zone.__symbol__("uncaughtPromiseErrors")],this.pendingPeriodicTimers=[],this.pendingTimers=[],this.patchDateLocked=!1,this.properties={FakeAsyncTestZoneSpec:this},this.name="fakeAsyncTestZone for "+t,this.macroTaskOptions||(this.macroTaskOptions=e[Zone.__symbol__("FakeAsyncTestMacroTask")])}return t.assertInZone=function(){if(null==Zone.current.get("FakeAsyncTestZoneSpec"))throw new Error("The code should be running in the fakeAsync zone to call this function")},t.prototype._fnAndFlush=function(t,r){var i=this;return function(){for(var n=[],s=0;s<arguments.length;s++)n[s]=arguments[s];return t.apply(e,n),null===i._lastError?(null!=r.onSuccess&&r.onSuccess.apply(e),i.flushMicrotasks()):null!=r.onError&&r.onError.apply(e),null===i._lastError}},t._removeTimer=function(e,t){var r=e.indexOf(t);r>-1&&e.splice(r,1)},t.prototype._dequeueTimer=function(e){var r=this;return function(){t._removeTimer(r.pendingTimers,e)}},t.prototype._requeuePeriodicTimer=function(e,t,r,i){var n=this;return function(){-1!==n.pendingPeriodicTimers.indexOf(i)&&n._scheduler.scheduleFunction(e,t,{args:r,isPeriodic:!0,id:i,isRequeuePeriodic:!0})}},t.prototype._dequeuePeriodicTimer=function(e){var r=this;return function(){t._removeTimer(r.pendingPeriodicTimers,e)}},t.prototype._setTimeout=function(e,t,r,i){void 0===i&&(i=!0);var n=this._dequeueTimer(s.nextId),o=this._fnAndFlush(e,{onSuccess:n,onError:n}),a=this._scheduler.scheduleFunction(o,t,{args:r,isRequestAnimationFrame:!i});return i&&this.pendingTimers.push(a),a},t.prototype._clearTimeout=function(e){t._removeTimer(this.pendingTimers,e),this._scheduler.removeScheduledFunctionWithId(e)},t.prototype._setInterval=function(e,t,r){var i=s.nextId,n={onSuccess:null,onError:this._dequeuePeriodicTimer(i)},o=this._fnAndFlush(e,n);return n.onSuccess=this._requeuePeriodicTimer(o,t,r,i),this._scheduler.scheduleFunction(o,t,{args:r,isPeriodic:!0}),this.pendingPeriodicTimers.push(i),i},t.prototype._clearInterval=function(e){t._removeTimer(this.pendingPeriodicTimers,e),this._scheduler.removeScheduledFunctionWithId(e)},t.prototype._resetLastErrorAndThrow=function(){var e=this._lastError||this._uncaughtPromiseErrors[0];throw this._uncaughtPromiseErrors.length=0,this._lastError=null,e},t.prototype.getCurrentTickTime=function(){return this._scheduler.getCurrentTickTime()},t.prototype.getFakeSystemTime=function(){return this._scheduler.getFakeSystemTime()},t.prototype.setFakeBaseSystemTime=function(e){this._scheduler.setFakeBaseSystemTime(e)},t.prototype.getRealSystemTime=function(){return this._scheduler.getRealSystemTime()},t.patchDate=function(){e[Zone.__symbol__("disableDatePatching")]||e.Date!==i&&(e.Date=i,i.prototype=r.prototype,t.checkTimerPatch())},t.resetDate=function(){e.Date===i&&(e.Date=r)},t.checkTimerPatch=function(){e.setTimeout!==n.setTimeout&&(e.setTimeout=n.setTimeout,e.clearTimeout=n.clearTimeout),e.setInterval!==n.setInterval&&(e.setInterval=n.setInterval,e.clearInterval=n.clearInterval)},t.prototype.lockDatePatch=function(){this.patchDateLocked=!0,t.patchDate()},t.prototype.unlockDatePatch=function(){this.patchDateLocked=!1,t.resetDate()},t.prototype.tickToNext=function(e,r,i){void 0===e&&(e=1),void 0===i&&(i={processNewMacroTasksSynchronously:!0}),e<=0||(t.assertInZone(),this.flushMicrotasks(),this._scheduler.tickToNext(e,r,i),null!==this._lastError&&this._resetLastErrorAndThrow())},t.prototype.tick=function(e,r,i){void 0===e&&(e=0),void 0===i&&(i={processNewMacroTasksSynchronously:!0}),t.assertInZone(),this.flushMicrotasks(),this._scheduler.tick(e,r,i),null!==this._lastError&&this._resetLastErrorAndThrow()},t.prototype.flushMicrotasks=function(){var e=this;for(t.assertInZone();this._microtasks.length>0;){var r=this._microtasks.shift();r.func.apply(r.target,r.args)}(null!==e._lastError||e._uncaughtPromiseErrors.length)&&e._resetLastErrorAndThrow()},t.prototype.flush=function(e,r,i){t.assertInZone(),this.flushMicrotasks();var n=this._scheduler.flush(e,r,i);return null!==this._lastError&&this._resetLastErrorAndThrow(),n},t.prototype.flushOnlyPendingTimers=function(e){t.assertInZone(),this.flushMicrotasks();var r=this._scheduler.flushOnlyPendingTimers(e);return null!==this._lastError&&this._resetLastErrorAndThrow(),r},t.prototype.removeAllTimers=function(){t.assertInZone(),this._scheduler.removeAll(),this.pendingPeriodicTimers=[],this.pendingTimers=[]},t.prototype.getTimerCount=function(){return this._scheduler.getTimerCount()+this._microtasks.length},t.prototype.onScheduleTask=function(e,t,r,i){switch(i.type){case"microTask":var n=i.data&&i.data.args,s=void 0;if(n){var o=i.data.cbIdx;"number"==typeof n.length&&n.length>o+1&&(s=Array.prototype.slice.call(n,o+1))}this._microtasks.push({func:i.invoke,args:s,target:i.data&&i.data.target});break;case"macroTask":switch(i.source){case"setTimeout":i.data.handleId=this._setTimeout(i.invoke,i.data.delay,Array.prototype.slice.call(i.data.args,2));break;case"setImmediate":i.data.handleId=this._setTimeout(i.invoke,0,Array.prototype.slice.call(i.data.args,1));break;case"setInterval":i.data.handleId=this._setInterval(i.invoke,i.data.delay,Array.prototype.slice.call(i.data.args,2));break;case"XMLHttpRequest.send":throw new Error("Cannot make XHRs from within a fake async test. Request URL: "+i.data.url);case"requestAnimationFrame":case"webkitRequestAnimationFrame":case"mozRequestAnimationFrame":i.data.handleId=this._setTimeout(i.invoke,16,i.data.args,this.trackPendingRequestAnimationFrame);break;default:var a=this.findMacroTaskOption(i);if(a){var c=i.data&&i.data.args,u=c&&c.length>1?c[1]:0,h=a.callbackArgs?a.callbackArgs:c;a.isPeriodic?(i.data.handleId=this._setInterval(i.invoke,u,h),i.data.isPeriodic=!0):i.data.handleId=this._setTimeout(i.invoke,u,h);break}throw new Error("Unknown macroTask scheduled in fake async test: "+i.source)}break;case"eventTask":i=e.scheduleTask(r,i)}return i},t.prototype.onCancelTask=function(e,t,r,i){switch(i.source){case"setTimeout":case"requestAnimationFrame":case"webkitRequestAnimationFrame":case"mozRequestAnimationFrame":return this._clearTimeout(i.data.handleId);case"setInterval":return this._clearInterval(i.data.handleId);default:var n=this.findMacroTaskOption(i);if(n){var s=i.data.handleId;return n.isPeriodic?this._clearInterval(s):this._clearTimeout(s)}return e.cancelTask(r,i)}},t.prototype.onInvoke=function(e,r,i,n,s,o,a){try{return t.patchDate(),e.invoke(i,n,s,o,a)}finally{this.patchDateLocked||t.resetDate()}},t.prototype.findMacroTaskOption=function(e){if(!this.macroTaskOptions)return null;for(var t=0;t<this.macroTaskOptions.length;t++){var r=this.macroTaskOptions[t];if(r.source===e.source)return r}return null},t.prototype.onHandleError=function(e,t,r,i){return this._lastError=i,!1},t}();Zone.FakeAsyncTestZoneSpec=o}("object"==typeof window&&window||"object"==typeof self&&self||global),Zone.__load_patch("fakeasync",(function(e,t,r){var i=t&&t.FakeAsyncTestZoneSpec;function n(){return t&&t.ProxyZoneSpec}var s=null;function o(){s&&s.unlockDatePatch(),s=null,n()&&n().assertPresent().resetDelegate()}function a(){if(null==s&&null==(s=t.current.get("FakeAsyncTestZoneSpec")))throw new Error("The code should be running in the fakeAsync zone to call this function");return s}function c(){a().flushMicrotasks()}t[r.symbol("fakeAsyncTest")]={resetFakeAsyncZone:o,flushMicrotasks:c,discardPeriodicTasks:function u(){a().pendingPeriodicTimers.length=0},tick:function h(e,t){void 0===e&&(e=0),void 0===t&&(t=!1),a().tick(e,null,t)},flush:function l(e){return a().flush(e)},fakeAsync:function d(e){var r=function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];var u=n();if(!u)throw new Error("ProxyZoneSpec is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/plugins/proxy");var h=u.assertPresent();if(t.current.get("FakeAsyncTestZoneSpec"))throw new Error("fakeAsync() calls can not be nested");try{if(!s){if(h.getDelegate()instanceof i)throw new Error("fakeAsync() calls can not be nested");s=new i}var l=void 0,d=h.getDelegate();h.setDelegate(s),s.lockDatePatch();try{l=e.apply(this,r),c()}finally{h.setDelegate(d)}if(s.pendingPeriodicTimers.length>0)throw new Error("".concat(s.pendingPeriodicTimers.length," ")+"periodic timer(s) still in the queue.");if(s.pendingTimers.length>0)throw new Error("".concat(s.pendingTimers.length," timer(s) still in the queue."));return l}finally{o()}};return r.isFakeAsync=!0,r}}}),!0)}));
!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){var e,t,r="object"==typeof window&&window||"object"==typeof self&&self||globalThis.global,i=r.Date;function n(){if(0===arguments.length){var e=new i;return e.setTime(n.now()),e}var t=Array.prototype.slice.call(arguments);return new(i.bind.apply(i,__spreadArray([void 0],t,!1)))}n.now=function(){var e=Zone.current.get("FakeAsyncTestZoneSpec");return e?e.getFakeSystemTime():i.now.apply(this,arguments)},n.UTC=i.UTC,n.parse=i.parse;var s=function(){},o=function(){function n(){this._schedulerQueue=[],this._currentTickTime=0,this._currentFakeBaseSystemTime=i.now(),this._currentTickRequeuePeriodicEntries=[]}return n.getNextId=function(){var i=t.nativeSetTimeout.call(r,s,0);return t.nativeClearTimeout.call(r,i),"number"==typeof i?i:e.nextNodeJSId++},n.prototype.getCurrentTickTime=function(){return this._currentTickTime},n.prototype.getFakeSystemTime=function(){return this._currentFakeBaseSystemTime+this._currentTickTime},n.prototype.setFakeBaseSystemTime=function(e){this._currentFakeBaseSystemTime=e},n.prototype.getRealSystemTime=function(){return i.now()},n.prototype.scheduleFunction=function(t,r,i){var n=(i=__assign({args:[],isPeriodic:!1,isRequestAnimationFrame:!1,id:-1,isRequeuePeriodic:!1},i)).id<0?e.nextId:i.id;e.nextId=e.getNextId();var s={endTime:this._currentTickTime+r,id:n,func:t,args:i.args,delay:r,isPeriodic:i.isPeriodic,isRequestAnimationFrame:i.isRequestAnimationFrame};i.isRequeuePeriodic&&this._currentTickRequeuePeriodicEntries.push(s);for(var o=0;o<this._schedulerQueue.length&&!(s.endTime<this._schedulerQueue[o].endTime);o++);return this._schedulerQueue.splice(o,0,s),n},n.prototype.removeScheduledFunctionWithId=function(e){for(var t=0;t<this._schedulerQueue.length;t++)if(this._schedulerQueue[t].id==e){this._schedulerQueue.splice(t,1);break}},n.prototype.removeAll=function(){this._schedulerQueue=[]},n.prototype.getTimerCount=function(){return this._schedulerQueue.length},n.prototype.tickToNext=function(e,t,r){void 0===e&&(e=1),this._schedulerQueue.length<e||this.tick(this._schedulerQueue[e-1].endTime-this._currentTickTime,t,r)},n.prototype.tick=function(e,t,i){void 0===e&&(e=0);var n=this._currentTickTime+e,s=0,o=(i=Object.assign({processNewMacroTasksSynchronously:!0},i)).processNewMacroTasksSynchronously?this._schedulerQueue:this._schedulerQueue.slice();if(0===o.length&&t)t(e);else{for(;o.length>0&&(this._currentTickRequeuePeriodicEntries=[],!(n<o[0].endTime));){var a=o.shift();if(!i.processNewMacroTasksSynchronously){var c=this._schedulerQueue.indexOf(a);c>=0&&this._schedulerQueue.splice(c,1)}if(s=this._currentTickTime,this._currentTickTime=a.endTime,t&&t(this._currentTickTime-s),!a.func.apply(r,a.isRequestAnimationFrame?[this._currentTickTime]:a.args))break;i.processNewMacroTasksSynchronously||this._currentTickRequeuePeriodicEntries.forEach((function(e){for(var t=0;t<o.length&&!(e.endTime<o[t].endTime);t++);o.splice(t,0,e)}))}s=this._currentTickTime,this._currentTickTime=n,t&&t(this._currentTickTime-s)}},n.prototype.flushOnlyPendingTimers=function(e){if(0===this._schedulerQueue.length)return 0;var t=this._currentTickTime;return this.tick(this._schedulerQueue[this._schedulerQueue.length-1].endTime-t,e,{processNewMacroTasksSynchronously:!1}),this._currentTickTime-t},n.prototype.flush=function(e,t,r){return void 0===e&&(e=20),void 0===t&&(t=!1),t?this.flushPeriodic(r):this.flushNonPeriodic(e,r)},n.prototype.flushPeriodic=function(e){if(0===this._schedulerQueue.length)return 0;var t=this._currentTickTime;return this.tick(this._schedulerQueue[this._schedulerQueue.length-1].endTime-t,e),this._currentTickTime-t},n.prototype.flushNonPeriodic=function(e,t){for(var i=this._currentTickTime,n=0,s=0;this._schedulerQueue.length>0;){if(++s>e)throw new Error("flush failed after reaching the limit of "+e+" tasks. Does your code use a polling timeout?");if(0===this._schedulerQueue.filter((function(e){return!e.isPeriodic&&!e.isRequestAnimationFrame})).length)break;var o=this._schedulerQueue.shift();if(n=this._currentTickTime,this._currentTickTime=o.endTime,t&&t(this._currentTickTime-n),!o.func.apply(r,o.args))break}return this._currentTickTime-i},n}();(e=o).nextNodeJSId=1,e.nextId=-1;var a=function(){function e(e,t,i){void 0===t&&(t=!1),this.trackPendingRequestAnimationFrame=t,this.macroTaskOptions=i,this._scheduler=new o,this._microtasks=[],this._lastError=null,this._uncaughtPromiseErrors=Promise[Zone.__symbol__("uncaughtPromiseErrors")],this.pendingPeriodicTimers=[],this.pendingTimers=[],this.patchDateLocked=!1,this.properties={FakeAsyncTestZoneSpec:this},this.name="fakeAsyncTestZone for "+e,this.macroTaskOptions||(this.macroTaskOptions=r[Zone.__symbol__("FakeAsyncTestMacroTask")])}return e.assertInZone=function(){if(null==Zone.current.get("FakeAsyncTestZoneSpec"))throw new Error("The code should be running in the fakeAsync zone to call this function")},e.prototype._fnAndFlush=function(e,t){var i=this;return function(){for(var n=[],s=0;s<arguments.length;s++)n[s]=arguments[s];return e.apply(r,n),null===i._lastError?(null!=t.onSuccess&&t.onSuccess.apply(r),i.flushMicrotasks()):null!=t.onError&&t.onError.apply(r),null===i._lastError}},e._removeTimer=function(e,t){var r=e.indexOf(t);r>-1&&e.splice(r,1)},e.prototype._dequeueTimer=function(t){var r=this;return function(){e._removeTimer(r.pendingTimers,t)}},e.prototype._requeuePeriodicTimer=function(e,t,r,i){var n=this;return function(){-1!==n.pendingPeriodicTimers.indexOf(i)&&n._scheduler.scheduleFunction(e,t,{args:r,isPeriodic:!0,id:i,isRequeuePeriodic:!0})}},e.prototype._dequeuePeriodicTimer=function(t){var r=this;return function(){e._removeTimer(r.pendingPeriodicTimers,t)}},e.prototype._setTimeout=function(e,t,r,i){void 0===i&&(i=!0);var n=this._dequeueTimer(o.nextId),s=this._fnAndFlush(e,{onSuccess:n,onError:n}),a=this._scheduler.scheduleFunction(s,t,{args:r,isRequestAnimationFrame:!i});return i&&this.pendingTimers.push(a),a},e.prototype._clearTimeout=function(t){e._removeTimer(this.pendingTimers,t),this._scheduler.removeScheduledFunctionWithId(t)},e.prototype._setInterval=function(e,t,r){var i=o.nextId,n={onSuccess:null,onError:this._dequeuePeriodicTimer(i)},s=this._fnAndFlush(e,n);return n.onSuccess=this._requeuePeriodicTimer(s,t,r,i),this._scheduler.scheduleFunction(s,t,{args:r,isPeriodic:!0}),this.pendingPeriodicTimers.push(i),i},e.prototype._clearInterval=function(t){e._removeTimer(this.pendingPeriodicTimers,t),this._scheduler.removeScheduledFunctionWithId(t)},e.prototype._resetLastErrorAndThrow=function(){var e=this._lastError||this._uncaughtPromiseErrors[0];throw this._uncaughtPromiseErrors.length=0,this._lastError=null,e},e.prototype.getCurrentTickTime=function(){return this._scheduler.getCurrentTickTime()},e.prototype.getFakeSystemTime=function(){return this._scheduler.getFakeSystemTime()},e.prototype.setFakeBaseSystemTime=function(e){this._scheduler.setFakeBaseSystemTime(e)},e.prototype.getRealSystemTime=function(){return this._scheduler.getRealSystemTime()},e.patchDate=function(){r[Zone.__symbol__("disableDatePatching")]||r.Date!==n&&(r.Date=n,n.prototype=i.prototype,e.checkTimerPatch())},e.resetDate=function(){r.Date===n&&(r.Date=i)},e.checkTimerPatch=function(){if(!t)throw new Error("Expected timers to have been patched.");r.setTimeout!==t.setTimeout&&(r.setTimeout=t.setTimeout,r.clearTimeout=t.clearTimeout),r.setInterval!==t.setInterval&&(r.setInterval=t.setInterval,r.clearInterval=t.clearInterval)},e.prototype.lockDatePatch=function(){this.patchDateLocked=!0,e.patchDate()},e.prototype.unlockDatePatch=function(){this.patchDateLocked=!1,e.resetDate()},e.prototype.tickToNext=function(t,r,i){void 0===t&&(t=1),void 0===i&&(i={processNewMacroTasksSynchronously:!0}),t<=0||(e.assertInZone(),this.flushMicrotasks(),this._scheduler.tickToNext(t,r,i),null!==this._lastError&&this._resetLastErrorAndThrow())},e.prototype.tick=function(t,r,i){void 0===t&&(t=0),void 0===i&&(i={processNewMacroTasksSynchronously:!0}),e.assertInZone(),this.flushMicrotasks(),this._scheduler.tick(t,r,i),null!==this._lastError&&this._resetLastErrorAndThrow()},e.prototype.flushMicrotasks=function(){var t=this;for(e.assertInZone();this._microtasks.length>0;){var r=this._microtasks.shift();r.func.apply(r.target,r.args)}(null!==t._lastError||t._uncaughtPromiseErrors.length)&&t._resetLastErrorAndThrow()},e.prototype.flush=function(t,r,i){e.assertInZone(),this.flushMicrotasks();var n=this._scheduler.flush(t,r,i);return null!==this._lastError&&this._resetLastErrorAndThrow(),n},e.prototype.flushOnlyPendingTimers=function(t){e.assertInZone(),this.flushMicrotasks();var r=this._scheduler.flushOnlyPendingTimers(t);return null!==this._lastError&&this._resetLastErrorAndThrow(),r},e.prototype.removeAllTimers=function(){e.assertInZone(),this._scheduler.removeAll(),this.pendingPeriodicTimers=[],this.pendingTimers=[]},e.prototype.getTimerCount=function(){return this._scheduler.getTimerCount()+this._microtasks.length},e.prototype.onScheduleTask=function(e,t,r,i){switch(i.type){case"microTask":var n=i.data&&i.data.args,s=void 0;if(n){var o=i.data.cbIdx;"number"==typeof n.length&&n.length>o+1&&(s=Array.prototype.slice.call(n,o+1))}this._microtasks.push({func:i.invoke,args:s,target:i.data&&i.data.target});break;case"macroTask":switch(i.source){case"setTimeout":i.data.handleId=this._setTimeout(i.invoke,i.data.delay,Array.prototype.slice.call(i.data.args,2));break;case"setImmediate":i.data.handleId=this._setTimeout(i.invoke,0,Array.prototype.slice.call(i.data.args,1));break;case"setInterval":i.data.handleId=this._setInterval(i.invoke,i.data.delay,Array.prototype.slice.call(i.data.args,2));break;case"XMLHttpRequest.send":throw new Error("Cannot make XHRs from within a fake async test. Request URL: "+i.data.url);case"requestAnimationFrame":case"webkitRequestAnimationFrame":case"mozRequestAnimationFrame":i.data.handleId=this._setTimeout(i.invoke,16,i.data.args,this.trackPendingRequestAnimationFrame);break;default:var a=this.findMacroTaskOption(i);if(a){var c=i.data&&i.data.args,u=c&&c.length>1?c[1]:0,h=a.callbackArgs?a.callbackArgs:c;a.isPeriodic?(i.data.handleId=this._setInterval(i.invoke,u,h),i.data.isPeriodic=!0):i.data.handleId=this._setTimeout(i.invoke,u,h);break}throw new Error("Unknown macroTask scheduled in fake async test: "+i.source)}break;case"eventTask":i=e.scheduleTask(r,i)}return i},e.prototype.onCancelTask=function(e,t,r,i){switch(i.source){case"setTimeout":case"requestAnimationFrame":case"webkitRequestAnimationFrame":case"mozRequestAnimationFrame":return this._clearTimeout(i.data.handleId);case"setInterval":return this._clearInterval(i.data.handleId);default:var n=this.findMacroTaskOption(i);if(n){var s=i.data.handleId;return n.isPeriodic?this._clearInterval(s):this._clearTimeout(s)}return e.cancelTask(r,i)}},e.prototype.onInvoke=function(t,r,i,n,s,o,a){try{return e.patchDate(),t.invoke(i,n,s,o,a)}finally{this.patchDateLocked||e.resetDate()}},e.prototype.findMacroTaskOption=function(e){if(!this.macroTaskOptions)return null;for(var t=0;t<this.macroTaskOptions.length;t++){var r=this.macroTaskOptions[t];if(r.source===e.source)return r}return null},e.prototype.onHandleError=function(e,t,r,i){return this._lastError=i,!1},e}(),c=null;function u(){return Zone&&Zone.ProxyZoneSpec}function h(){c&&c.unlockDatePatch(),c=null,u()&&u().assertPresent().resetDelegate()}function l(e){var t=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=u();if(!i)throw new Error("ProxyZoneSpec is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/plugins/proxy");var n=i.assertPresent();if(Zone.current.get("FakeAsyncTestZoneSpec"))throw new Error("fakeAsync() calls can not be nested");try{if(!c){var s=Zone&&Zone.FakeAsyncTestZoneSpec;if(n.getDelegate()instanceof s)throw new Error("fakeAsync() calls can not be nested");c=new s}var o=void 0,a=n.getDelegate();n.setDelegate(c),c.lockDatePatch();try{o=e.apply(this,t),f()}finally{n.setDelegate(a)}if(c.pendingPeriodicTimers.length>0)throw new Error("".concat(c.pendingPeriodicTimers.length," ")+"periodic timer(s) still in the queue.");if(c.pendingTimers.length>0)throw new Error("".concat(c.pendingTimers.length," timer(s) still in the queue."));return o}finally{h()}};return t.isFakeAsync=!0,t}function d(){if(null==c&&null==(c=Zone.current.get("FakeAsyncTestZoneSpec")))throw new Error("The code should be running in the fakeAsync zone to call this function");return c}function m(e,t){void 0===e&&(e=0),void 0===t&&(t=!1),d().tick(e,null,t)}function p(e){return d().flush(e)}function T(){d().pendingPeriodicTimers.length=0}function f(){d().flushMicrotasks()}!function _(e){e.FakeAsyncTestZoneSpec=a,e.__load_patch("fakeasync",(function(e,t,r){t[r.symbol("fakeAsyncTest")]={resetFakeAsyncZone:h,flushMicrotasks:f,discardPeriodicTasks:T,tick:m,flush:p,fakeAsync:l}}),!0),t={setTimeout:r.setTimeout,setInterval:r.setInterval,clearTimeout:r.clearTimeout,clearInterval:r.clearInterval,nativeSetTimeout:r[e.__symbol__("setTimeout")],nativeClearTimeout:r[e.__symbol__("clearTimeout")]},o.nextId=o.getNextId()}(Zone)}));

@@ -15,3 +15,3 @@ 'use strict';

* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT

@@ -24,321 +24,329 @@ */

'use strict';
/// <reference types="jasmine"/>
Zone.__load_patch('jasmine', function (global, Zone, api) {
var __extends = function (d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
function patchJasmine(Zone) {
Zone.__load_patch('jasmine', function (global, Zone, api) {
var __extends = function (d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype =
b === null ? Object.create(b) : ((__.prototype = b.prototype), new __());
};
// Patch jasmine's describe/it/beforeEach/afterEach functions so test code always runs
// in a testZone (ProxyZone). (See: angular/zone.js#91 & angular/angular#10503)
if (!Zone)
throw new Error('Missing: zone.js');
if (typeof jest !== 'undefined') {
// return if jasmine is a light implementation inside jest
// in this case, we are running inside jest not jasmine
return;
}
d.prototype = b === null ? Object.create(b) : ((__.prototype = b.prototype), new __());
};
// Patch jasmine's describe/it/beforeEach/afterEach functions so test code always runs
// in a testZone (ProxyZone). (See: angular/zone.js#91 & angular/angular#10503)
if (!Zone)
throw new Error('Missing: zone.js');
if (typeof jest !== 'undefined') {
// return if jasmine is a light implementation inside jest
// in this case, we are running inside jest not jasmine
return;
}
if (typeof jasmine == 'undefined' || jasmine['__zone_patch__']) {
return;
}
jasmine['__zone_patch__'] = true;
var SyncTestZoneSpec = Zone['SyncTestZoneSpec'];
var ProxyZoneSpec = Zone['ProxyZoneSpec'];
if (!SyncTestZoneSpec)
throw new Error('Missing: SyncTestZoneSpec');
if (!ProxyZoneSpec)
throw new Error('Missing: ProxyZoneSpec');
var ambientZone = Zone.current;
var symbol = Zone.__symbol__;
// whether patch jasmine clock when in fakeAsync
var disablePatchingJasmineClock = global[symbol('fakeAsyncDisablePatchingClock')] === true;
// the original variable name fakeAsyncPatchLock is not accurate, so the name will be
// fakeAsyncAutoFakeAsyncWhenClockPatched and if this enablePatchingJasmineClock is false, we also
// automatically disable the auto jump into fakeAsync feature
var enableAutoFakeAsyncWhenClockPatched = !disablePatchingJasmineClock &&
((global[symbol('fakeAsyncPatchLock')] === true) ||
(global[symbol('fakeAsyncAutoFakeAsyncWhenClockPatched')] === true));
var ignoreUnhandledRejection = global[symbol('ignoreUnhandledRejection')] === true;
if (!ignoreUnhandledRejection) {
var globalErrors_1 = jasmine.GlobalErrors;
if (globalErrors_1 && !jasmine[symbol('GlobalErrors')]) {
jasmine[symbol('GlobalErrors')] = globalErrors_1;
jasmine.GlobalErrors = function () {
var instance = new globalErrors_1();
var originalInstall = instance.install;
if (originalInstall && !instance[symbol('install')]) {
instance[symbol('install')] = originalInstall;
instance.install = function () {
var isNode = typeof process !== 'undefined' && !!process.on;
// Note: Jasmine checks internally if `process` and `process.on` is defined. Otherwise,
// it installs the browser rejection handler through the `global.addEventListener`.
// This code may be run in the browser environment where `process` is not defined, and
// this will lead to a runtime exception since Webpack 5 removed automatic Node.js
// polyfills. Note, that events are named differently, it's `unhandledRejection` in
// Node.js and `unhandledrejection` in the browser.
var originalHandlers = isNode ? process.listeners('unhandledRejection') :
global.eventListeners('unhandledrejection');
var result = originalInstall.apply(this, arguments);
isNode ? process.removeAllListeners('unhandledRejection') :
global.removeAllListeners('unhandledrejection');
if (originalHandlers) {
originalHandlers.forEach(function (handler) {
if (isNode) {
process.on('unhandledRejection', handler);
}
else {
global.addEventListener('unhandledrejection', handler);
}
});
if (typeof jasmine == 'undefined' || jasmine['__zone_patch__']) {
return;
}
jasmine['__zone_patch__'] = true;
var SyncTestZoneSpec = Zone['SyncTestZoneSpec'];
var ProxyZoneSpec = Zone['ProxyZoneSpec'];
if (!SyncTestZoneSpec)
throw new Error('Missing: SyncTestZoneSpec');
if (!ProxyZoneSpec)
throw new Error('Missing: ProxyZoneSpec');
var ambientZone = Zone.current;
var symbol = Zone.__symbol__;
// whether patch jasmine clock when in fakeAsync
var disablePatchingJasmineClock = global[symbol('fakeAsyncDisablePatchingClock')] === true;
// the original variable name fakeAsyncPatchLock is not accurate, so the name will be
// fakeAsyncAutoFakeAsyncWhenClockPatched and if this enablePatchingJasmineClock is false, we
// also automatically disable the auto jump into fakeAsync feature
var enableAutoFakeAsyncWhenClockPatched = !disablePatchingJasmineClock &&
(global[symbol('fakeAsyncPatchLock')] === true ||
global[symbol('fakeAsyncAutoFakeAsyncWhenClockPatched')] === true);
var ignoreUnhandledRejection = global[symbol('ignoreUnhandledRejection')] === true;
if (!ignoreUnhandledRejection) {
var globalErrors_1 = jasmine.GlobalErrors;
if (globalErrors_1 && !jasmine[symbol('GlobalErrors')]) {
jasmine[symbol('GlobalErrors')] = globalErrors_1;
jasmine.GlobalErrors = function () {
var instance = new globalErrors_1();
var originalInstall = instance.install;
if (originalInstall && !instance[symbol('install')]) {
instance[symbol('install')] = originalInstall;
instance.install = function () {
var isNode = typeof process !== 'undefined' && !!process.on;
// Note: Jasmine checks internally if `process` and `process.on` is defined.
// Otherwise, it installs the browser rejection handler through the
// `global.addEventListener`. This code may be run in the browser environment where
// `process` is not defined, and this will lead to a runtime exception since Webpack 5
// removed automatic Node.js polyfills. Note, that events are named differently, it's
// `unhandledRejection` in Node.js and `unhandledrejection` in the browser.
var originalHandlers = isNode
? process.listeners('unhandledRejection')
: global.eventListeners('unhandledrejection');
var result = originalInstall.apply(this, arguments);
isNode
? process.removeAllListeners('unhandledRejection')
: global.removeAllListeners('unhandledrejection');
if (originalHandlers) {
originalHandlers.forEach(function (handler) {
if (isNode) {
process.on('unhandledRejection', handler);
}
else {
global.addEventListener('unhandledrejection', handler);
}
});
}
return result;
};
}
return instance;
};
}
}
// Monkey patch all of the jasmine DSL so that each function runs in appropriate zone.
var jasmineEnv = jasmine.getEnv();
['describe', 'xdescribe', 'fdescribe'].forEach(function (methodName) {
var originalJasmineFn = jasmineEnv[methodName];
jasmineEnv[methodName] = function (description, specDefinitions) {
return originalJasmineFn.call(this, description, wrapDescribeInZone(description, specDefinitions));
};
});
['it', 'xit', 'fit'].forEach(function (methodName) {
var originalJasmineFn = jasmineEnv[methodName];
jasmineEnv[symbol(methodName)] = originalJasmineFn;
jasmineEnv[methodName] = function (description, specDefinitions, timeout) {
arguments[1] = wrapTestInZone(specDefinitions);
return originalJasmineFn.apply(this, arguments);
};
});
['beforeEach', 'afterEach', 'beforeAll', 'afterAll'].forEach(function (methodName) {
var originalJasmineFn = jasmineEnv[methodName];
jasmineEnv[symbol(methodName)] = originalJasmineFn;
jasmineEnv[methodName] = function (specDefinitions, timeout) {
arguments[0] = wrapTestInZone(specDefinitions);
return originalJasmineFn.apply(this, arguments);
};
});
if (!disablePatchingJasmineClock) {
// need to patch jasmine.clock().mockDate and jasmine.clock().tick() so
// they can work properly in FakeAsyncTest
var originalClockFn_1 = (jasmine[symbol('clock')] = jasmine['clock']);
jasmine['clock'] = function () {
var clock = originalClockFn_1.apply(this, arguments);
if (!clock[symbol('patched')]) {
clock[symbol('patched')] = symbol('patched');
var originalTick_1 = (clock[symbol('tick')] = clock.tick);
clock.tick = function () {
var fakeAsyncZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');
if (fakeAsyncZoneSpec) {
return fakeAsyncZoneSpec.tick.apply(fakeAsyncZoneSpec, arguments);
}
return result;
return originalTick_1.apply(this, arguments);
};
var originalMockDate_1 = (clock[symbol('mockDate')] = clock.mockDate);
clock.mockDate = function () {
var fakeAsyncZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');
if (fakeAsyncZoneSpec) {
var dateTime = arguments.length > 0 ? arguments[0] : new Date();
return fakeAsyncZoneSpec.setFakeBaseSystemTime.apply(fakeAsyncZoneSpec, dateTime && typeof dateTime.getTime === 'function'
? [dateTime.getTime()]
: arguments);
}
return originalMockDate_1.apply(this, arguments);
};
// for auto go into fakeAsync feature, we need the flag to enable it
if (enableAutoFakeAsyncWhenClockPatched) {
['install', 'uninstall'].forEach(function (methodName) {
var originalClockFn = (clock[symbol(methodName)] = clock[methodName]);
clock[methodName] = function () {
var FakeAsyncTestZoneSpec = Zone['FakeAsyncTestZoneSpec'];
if (FakeAsyncTestZoneSpec) {
jasmine[symbol('clockInstalled')] = 'install' === methodName;
return;
}
return originalClockFn.apply(this, arguments);
};
});
}
}
return instance;
return clock;
};
}
}
// Monkey patch all of the jasmine DSL so that each function runs in appropriate zone.
var jasmineEnv = jasmine.getEnv();
['describe', 'xdescribe', 'fdescribe'].forEach(function (methodName) {
var originalJasmineFn = jasmineEnv[methodName];
jasmineEnv[methodName] = function (description, specDefinitions) {
return originalJasmineFn.call(this, description, wrapDescribeInZone(description, specDefinitions));
};
});
['it', 'xit', 'fit'].forEach(function (methodName) {
var originalJasmineFn = jasmineEnv[methodName];
jasmineEnv[symbol(methodName)] = originalJasmineFn;
jasmineEnv[methodName] = function (description, specDefinitions, timeout) {
arguments[1] = wrapTestInZone(specDefinitions);
return originalJasmineFn.apply(this, arguments);
};
});
['beforeEach', 'afterEach', 'beforeAll', 'afterAll'].forEach(function (methodName) {
var originalJasmineFn = jasmineEnv[methodName];
jasmineEnv[symbol(methodName)] = originalJasmineFn;
jasmineEnv[methodName] = function (specDefinitions, timeout) {
arguments[0] = wrapTestInZone(specDefinitions);
return originalJasmineFn.apply(this, arguments);
};
});
if (!disablePatchingJasmineClock) {
// need to patch jasmine.clock().mockDate and jasmine.clock().tick() so
// they can work properly in FakeAsyncTest
var originalClockFn_1 = (jasmine[symbol('clock')] = jasmine['clock']);
jasmine['clock'] = function () {
var clock = originalClockFn_1.apply(this, arguments);
if (!clock[symbol('patched')]) {
clock[symbol('patched')] = symbol('patched');
var originalTick_1 = (clock[symbol('tick')] = clock.tick);
clock.tick = function () {
var fakeAsyncZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');
if (fakeAsyncZoneSpec) {
return fakeAsyncZoneSpec.tick.apply(fakeAsyncZoneSpec, arguments);
// monkey patch createSpyObj to make properties enumerable to true
if (!jasmine[Zone.__symbol__('createSpyObj')]) {
var originalCreateSpyObj_1 = jasmine.createSpyObj;
jasmine[Zone.__symbol__('createSpyObj')] = originalCreateSpyObj_1;
jasmine.createSpyObj = function () {
var args = Array.prototype.slice.call(arguments);
var propertyNames = args.length >= 3 ? args[2] : null;
var spyObj;
if (propertyNames) {
var defineProperty_1 = Object.defineProperty;
Object.defineProperty = function (obj, p, attributes) {
return defineProperty_1.call(this, obj, p, __assign(__assign({}, attributes), { configurable: true, enumerable: true }));
};
try {
spyObj = originalCreateSpyObj_1.apply(this, args);
}
return originalTick_1.apply(this, arguments);
};
var originalMockDate_1 = (clock[symbol('mockDate')] = clock.mockDate);
clock.mockDate = function () {
var fakeAsyncZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');
if (fakeAsyncZoneSpec) {
var dateTime = arguments.length > 0 ? arguments[0] : new Date();
return fakeAsyncZoneSpec.setFakeBaseSystemTime.apply(fakeAsyncZoneSpec, dateTime && typeof dateTime.getTime === 'function' ? [dateTime.getTime()] :
arguments);
finally {
Object.defineProperty = defineProperty_1;
}
return originalMockDate_1.apply(this, arguments);
};
// for auto go into fakeAsync feature, we need the flag to enable it
if (enableAutoFakeAsyncWhenClockPatched) {
['install', 'uninstall'].forEach(function (methodName) {
var originalClockFn = (clock[symbol(methodName)] = clock[methodName]);
clock[methodName] = function () {
var FakeAsyncTestZoneSpec = Zone['FakeAsyncTestZoneSpec'];
if (FakeAsyncTestZoneSpec) {
jasmine[symbol('clockInstalled')] = 'install' === methodName;
return;
}
return originalClockFn.apply(this, arguments);
};
});
}
}
return clock;
};
}
// monkey patch createSpyObj to make properties enumerable to true
if (!jasmine[Zone.__symbol__('createSpyObj')]) {
var originalCreateSpyObj_1 = jasmine.createSpyObj;
jasmine[Zone.__symbol__('createSpyObj')] = originalCreateSpyObj_1;
jasmine.createSpyObj = function () {
var args = Array.prototype.slice.call(arguments);
var propertyNames = args.length >= 3 ? args[2] : null;
var spyObj;
if (propertyNames) {
var defineProperty_1 = Object.defineProperty;
Object.defineProperty = function (obj, p, attributes) {
return defineProperty_1.call(this, obj, p, __assign(__assign({}, attributes), { configurable: true, enumerable: true }));
};
try {
else {
spyObj = originalCreateSpyObj_1.apply(this, args);
}
finally {
Object.defineProperty = defineProperty_1;
return spyObj;
};
}
/**
* Gets a function wrapping the body of a Jasmine `describe` block to execute in a
* synchronous-only zone.
*/
function wrapDescribeInZone(description, describeBody) {
return function () {
// Create a synchronous-only zone in which to run `describe` blocks in order to raise an
// error if any asynchronous operations are attempted inside of a `describe`.
var syncZone = ambientZone.fork(new SyncTestZoneSpec("jasmine.describe#".concat(description)));
return syncZone.run(describeBody, this, arguments);
};
}
function runInTestZone(testBody, applyThis, queueRunner, done) {
var isClockInstalled = !!jasmine[symbol('clockInstalled')];
queueRunner.testProxyZoneSpec;
var testProxyZone = queueRunner.testProxyZone;
if (isClockInstalled && enableAutoFakeAsyncWhenClockPatched) {
// auto run a fakeAsync
var fakeAsyncModule = Zone[Zone.__symbol__('fakeAsyncTest')];
if (fakeAsyncModule && typeof fakeAsyncModule.fakeAsync === 'function') {
testBody = fakeAsyncModule.fakeAsync(testBody);
}
}
if (done) {
return testProxyZone.run(testBody, applyThis, [done]);
}
else {
spyObj = originalCreateSpyObj_1.apply(this, args);
return testProxyZone.run(testBody, applyThis);
}
return spyObj;
};
}
/**
* Gets a function wrapping the body of a Jasmine `describe` block to execute in a
* synchronous-only zone.
*/
function wrapDescribeInZone(description, describeBody) {
return function () {
// Create a synchronous-only zone in which to run `describe` blocks in order to raise an
// error if any asynchronous operations are attempted inside of a `describe`.
var syncZone = ambientZone.fork(new SyncTestZoneSpec("jasmine.describe#".concat(description)));
return syncZone.run(describeBody, this, arguments);
};
}
function runInTestZone(testBody, applyThis, queueRunner, done) {
var isClockInstalled = !!jasmine[symbol('clockInstalled')];
queueRunner.testProxyZoneSpec;
var testProxyZone = queueRunner.testProxyZone;
if (isClockInstalled && enableAutoFakeAsyncWhenClockPatched) {
// auto run a fakeAsync
var fakeAsyncModule = Zone[Zone.__symbol__('fakeAsyncTest')];
if (fakeAsyncModule && typeof fakeAsyncModule.fakeAsync === 'function') {
testBody = fakeAsyncModule.fakeAsync(testBody);
}
}
if (done) {
return testProxyZone.run(testBody, applyThis, [done]);
/**
* Gets a function wrapping the body of a Jasmine `it/beforeEach/afterEach` block to
* execute in a ProxyZone zone.
* This will run in `testProxyZone`. The `testProxyZone` will be reset by the `ZoneQueueRunner`
*/
function wrapTestInZone(testBody) {
// The `done` callback is only passed through if the function expects at least one argument.
// Note we have to make a function with correct number of arguments, otherwise jasmine will
// think that all functions are sync or async.
return (testBody &&
(testBody.length
? function (done) {
return runInTestZone(testBody, this, this.queueRunner, done);
}
: function () {
return runInTestZone(testBody, this, this.queueRunner);
}));
}
else {
return testProxyZone.run(testBody, applyThis);
}
}
/**
* Gets a function wrapping the body of a Jasmine `it/beforeEach/afterEach` block to
* execute in a ProxyZone zone.
* This will run in `testProxyZone`. The `testProxyZone` will be reset by the `ZoneQueueRunner`
*/
function wrapTestInZone(testBody) {
// The `done` callback is only passed through if the function expects at least one argument.
// Note we have to make a function with correct number of arguments, otherwise jasmine will
// think that all functions are sync or async.
return (testBody && (testBody.length ? function (done) {
return runInTestZone(testBody, this, this.queueRunner, done);
} : function () {
return runInTestZone(testBody, this, this.queueRunner);
}));
}
var QueueRunner = jasmine.QueueRunner;
jasmine.QueueRunner = (function (_super) {
__extends(ZoneQueueRunner, _super);
function ZoneQueueRunner(attrs) {
var _this = this;
if (attrs.onComplete) {
attrs.onComplete = (function (fn) { return function () {
// All functions are done, clear the test zone.
_this.testProxyZone = null;
_this.testProxyZoneSpec = null;
ambientZone.scheduleMicroTask('jasmine.onComplete', fn);
}; })(attrs.onComplete);
}
var nativeSetTimeout = global[Zone.__symbol__('setTimeout')];
var nativeClearTimeout = global[Zone.__symbol__('clearTimeout')];
if (nativeSetTimeout) {
// should run setTimeout inside jasmine outside of zone
attrs.timeout = {
setTimeout: nativeSetTimeout ? nativeSetTimeout : global.setTimeout,
clearTimeout: nativeClearTimeout ? nativeClearTimeout : global.clearTimeout
};
}
// create a userContext to hold the queueRunner itself
// so we can access the testProxy in it/xit/beforeEach ...
if (jasmine.UserContext) {
if (!attrs.userContext) {
attrs.userContext = new jasmine.UserContext();
var QueueRunner = jasmine.QueueRunner;
jasmine.QueueRunner = (function (_super) {
__extends(ZoneQueueRunner, _super);
function ZoneQueueRunner(attrs) {
var _this = this;
if (attrs.onComplete) {
attrs.onComplete = (function (fn) { return function () {
// All functions are done, clear the test zone.
_this.testProxyZone = null;
_this.testProxyZoneSpec = null;
ambientZone.scheduleMicroTask('jasmine.onComplete', fn);
}; })(attrs.onComplete);
}
attrs.userContext.queueRunner = this;
}
else {
if (!attrs.userContext) {
attrs.userContext = {};
var nativeSetTimeout = global[Zone.__symbol__('setTimeout')];
var nativeClearTimeout = global[Zone.__symbol__('clearTimeout')];
if (nativeSetTimeout) {
// should run setTimeout inside jasmine outside of zone
attrs.timeout = {
setTimeout: nativeSetTimeout ? nativeSetTimeout : global.setTimeout,
clearTimeout: nativeClearTimeout ? nativeClearTimeout : global.clearTimeout,
};
}
attrs.userContext.queueRunner = this;
}
// patch attrs.onException
var onException = attrs.onException;
attrs.onException = function (error) {
if (error &&
error.message ===
'Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.') {
// jasmine timeout, we can make the error message more
// reasonable to tell what tasks are pending
var proxyZoneSpec = this && this.testProxyZoneSpec;
if (proxyZoneSpec) {
var pendingTasksInfo = proxyZoneSpec.getAndClearPendingTasksInfo();
try {
// try catch here in case error.message is not writable
error.message += pendingTasksInfo;
// create a userContext to hold the queueRunner itself
// so we can access the testProxy in it/xit/beforeEach ...
if (jasmine.UserContext) {
if (!attrs.userContext) {
attrs.userContext = new jasmine.UserContext();
}
attrs.userContext.queueRunner = this;
}
else {
if (!attrs.userContext) {
attrs.userContext = {};
}
attrs.userContext.queueRunner = this;
}
// patch attrs.onException
var onException = attrs.onException;
attrs.onException = function (error) {
if (error &&
error.message ===
'Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.') {
// jasmine timeout, we can make the error message more
// reasonable to tell what tasks are pending
var proxyZoneSpec = this && this.testProxyZoneSpec;
if (proxyZoneSpec) {
var pendingTasksInfo = proxyZoneSpec.getAndClearPendingTasksInfo();
try {
// try catch here in case error.message is not writable
error.message += pendingTasksInfo;
}
catch (err) { }
}
catch (err) {
}
}
if (onException) {
onException.call(this, error);
}
};
_super.call(this, attrs);
}
ZoneQueueRunner.prototype.execute = function () {
var _this = this;
var zone = Zone.current;
var isChildOfAmbientZone = false;
while (zone) {
if (zone === ambientZone) {
isChildOfAmbientZone = true;
break;
}
zone = zone.parent;
}
if (onException) {
onException.call(this, error);
if (!isChildOfAmbientZone)
throw new Error('Unexpected Zone: ' + Zone.current.name);
// This is the zone which will be used for running individual tests.
// It will be a proxy zone, so that the tests function can retroactively install
// different zones.
// Example:
// - In beforeEach() do childZone = Zone.current.fork(...);
// - In it() try to do fakeAsync(). The issue is that because the beforeEach forked the
// zone outside of fakeAsync it will be able to escape the fakeAsync rules.
// - Because ProxyZone is parent fo `childZone` fakeAsync can retroactively add
// fakeAsync behavior to the childZone.
this.testProxyZoneSpec = new ProxyZoneSpec();
this.testProxyZone = ambientZone.fork(this.testProxyZoneSpec);
if (!Zone.currentTask) {
// if we are not running in a task then if someone would register a
// element.addEventListener and then calling element.click() the
// addEventListener callback would think that it is the top most task and would
// drain the microtask queue on element.click() which would be incorrect.
// For this reason we always force a task when running jasmine tests.
Zone.current.scheduleMicroTask('jasmine.execute().forceTask', function () { return QueueRunner.prototype.execute.call(_this); });
}
else {
_super.prototype.execute.call(this);
}
};
_super.call(this, attrs);
}
ZoneQueueRunner.prototype.execute = function () {
var _this = this;
var zone = Zone.current;
var isChildOfAmbientZone = false;
while (zone) {
if (zone === ambientZone) {
isChildOfAmbientZone = true;
break;
}
zone = zone.parent;
}
if (!isChildOfAmbientZone)
throw new Error('Unexpected Zone: ' + Zone.current.name);
// This is the zone which will be used for running individual tests.
// It will be a proxy zone, so that the tests function can retroactively install
// different zones.
// Example:
// - In beforeEach() do childZone = Zone.current.fork(...);
// - In it() try to do fakeAsync(). The issue is that because the beforeEach forked the
// zone outside of fakeAsync it will be able to escape the fakeAsync rules.
// - Because ProxyZone is parent fo `childZone` fakeAsync can retroactively add
// fakeAsync behavior to the childZone.
this.testProxyZoneSpec = new ProxyZoneSpec();
this.testProxyZone = ambientZone.fork(this.testProxyZoneSpec);
if (!Zone.currentTask) {
// if we are not running in a task then if someone would register a
// element.addEventListener and then calling element.click() the
// addEventListener callback would think that it is the top most task and would
// drain the microtask queue on element.click() which would be incorrect.
// For this reason we always force a task when running jasmine tests.
Zone.current.scheduleMicroTask('jasmine.execute().forceTask', function () { return QueueRunner.prototype.execute.call(_this); });
}
else {
_super.prototype.execute.call(this);
}
};
return ZoneQueueRunner;
})(QueueRunner);
});
return ZoneQueueRunner;
})(QueueRunner);
});
}
patchJasmine(Zone);
}));
"use strict";var __assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},__assign.apply(this,arguments)};
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){Zone.__load_patch("jasmine",(function(e,n,t){if(!n)throw new Error("Missing: zone.js");if("undefined"==typeof jest&&"undefined"!=typeof jasmine&&!jasmine.__zone_patch__){jasmine.__zone_patch__=!0;var r=n.SyncTestZoneSpec,o=n.ProxyZoneSpec;if(!r)throw new Error("Missing: SyncTestZoneSpec");if(!o)throw new Error("Missing: ProxyZoneSpec");var i=n.current,s=n.__symbol__,a=!0===e[s("fakeAsyncDisablePatchingClock")],c=!a&&(!0===e[s("fakeAsyncPatchLock")]||!0===e[s("fakeAsyncAutoFakeAsyncWhenClockPatched")]);if(!0!==e[s("ignoreUnhandledRejection")]){var u=jasmine.GlobalErrors;u&&!jasmine[s("GlobalErrors")]&&(jasmine[s("GlobalErrors")]=u,jasmine.GlobalErrors=function(){var n=new u,t=n.install;return t&&!n[s("install")]&&(n[s("install")]=t,n.install=function(){var n="undefined"!=typeof process&&!!process.on,r=n?process.listeners("unhandledRejection"):e.eventListeners("unhandledrejection"),o=t.apply(this,arguments);return n?process.removeAllListeners("unhandledRejection"):e.removeAllListeners("unhandledrejection"),r&&r.forEach((function(t){n?process.on("unhandledRejection",t):e.addEventListener("unhandledrejection",t)})),o}),n})}var l=jasmine.getEnv();if(["describe","xdescribe","fdescribe"].forEach((function(e){var n=l[e];l[e]=function(e,t){return n.call(this,e,function o(e,n){return function(){return i.fork(new r("jasmine.describe#".concat(e))).run(n,this,arguments)}}(e,t))}})),["it","xit","fit"].forEach((function(e){var n=l[e];l[s(e)]=n,l[e]=function(e,t,r){return arguments[1]=m(t),n.apply(this,arguments)}})),["beforeEach","afterEach","beforeAll","afterAll"].forEach((function(e){var n=l[e];l[s(e)]=n,l[e]=function(e,t){return arguments[0]=m(e),n.apply(this,arguments)}})),!a){var f=jasmine[s("clock")]=jasmine.clock;jasmine.clock=function(){var e=f.apply(this,arguments);if(!e[s("patched")]){e[s("patched")]=s("patched");var t=e[s("tick")]=e.tick;e.tick=function(){var e=n.current.get("FakeAsyncTestZoneSpec");return e?e.tick.apply(e,arguments):t.apply(this,arguments)};var r=e[s("mockDate")]=e.mockDate;e.mockDate=function(){var e=n.current.get("FakeAsyncTestZoneSpec");if(e){var t=arguments.length>0?arguments[0]:new Date;return e.setFakeBaseSystemTime.apply(e,t&&"function"==typeof t.getTime?[t.getTime()]:arguments)}return r.apply(this,arguments)},c&&["install","uninstall"].forEach((function(t){var r=e[s(t)]=e[t];e[t]=function(){if(!n.FakeAsyncTestZoneSpec)return r.apply(this,arguments);jasmine[s("clockInstalled")]="install"===t}}))}return e}}if(!jasmine[n.__symbol__("createSpyObj")]){var p=jasmine.createSpyObj;jasmine[n.__symbol__("createSpyObj")]=p,jasmine.createSpyObj=function(){var e,n=Array.prototype.slice.call(arguments);if(n.length>=3&&n[2]){var t=Object.defineProperty;Object.defineProperty=function(e,n,r){return t.call(this,e,n,__assign(__assign({},r),{configurable:!0,enumerable:!0}))};try{e=p.apply(this,n)}finally{Object.defineProperty=t}}else e=p.apply(this,n);return e}}var h=jasmine.QueueRunner;jasmine.QueueRunner=function(t){function r(r){var o,s=this;r.onComplete&&(r.onComplete=(o=r.onComplete,function(){s.testProxyZone=null,s.testProxyZoneSpec=null,i.scheduleMicroTask("jasmine.onComplete",o)}));var a=e[n.__symbol__("setTimeout")],c=e[n.__symbol__("clearTimeout")];a&&(r.timeout={setTimeout:a||e.setTimeout,clearTimeout:c||e.clearTimeout}),jasmine.UserContext?(r.userContext||(r.userContext=new jasmine.UserContext),r.userContext.queueRunner=this):(r.userContext||(r.userContext={}),r.userContext.queueRunner=this);var u=r.onException;r.onException=function(e){if(e&&"Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL."===e.message){var n=this&&this.testProxyZoneSpec;if(n){var t=n.getAndClearPendingTasksInfo();try{e.message+=t}catch(e){}}}u&&u.call(this,e)},t.call(this,r)}return function(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);function r(){this.constructor=e}e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}(r,t),r.prototype.execute=function(){for(var e=this,r=n.current,s=!1;r;){if(r===i){s=!0;break}r=r.parent}if(!s)throw new Error("Unexpected Zone: "+n.current.name);this.testProxyZoneSpec=new o,this.testProxyZone=i.fork(this.testProxyZoneSpec),n.currentTask?t.prototype.execute.call(this):n.current.scheduleMicroTask("jasmine.execute().forceTask",(function(){return h.prototype.execute.call(e)}))},r}(h)}function y(e,t,r,o){var i=!!jasmine[s("clockInstalled")],a=r.testProxyZone;if(i&&c){var u=n[n.__symbol__("fakeAsyncTest")];u&&"function"==typeof u.fakeAsync&&(e=u.fakeAsync(e))}return o?a.run(e,t,[o]):a.run(e,t)}function m(e){return e&&(e.length?function(n){return y(e,this,this.queueRunner,n)}:function(){return y(e,this,this.queueRunner)})}}))}));
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){!function e(n){n.__load_patch("jasmine",(function(e,n,t){if(!n)throw new Error("Missing: zone.js");if("undefined"==typeof jest&&"undefined"!=typeof jasmine&&!jasmine.__zone_patch__){jasmine.__zone_patch__=!0;var r=n.SyncTestZoneSpec,o=n.ProxyZoneSpec;if(!r)throw new Error("Missing: SyncTestZoneSpec");if(!o)throw new Error("Missing: ProxyZoneSpec");var i=n.current,s=n.__symbol__,a=!0===e[s("fakeAsyncDisablePatchingClock")],c=!a&&(!0===e[s("fakeAsyncPatchLock")]||!0===e[s("fakeAsyncAutoFakeAsyncWhenClockPatched")]);if(!0!==e[s("ignoreUnhandledRejection")]){var u=jasmine.GlobalErrors;u&&!jasmine[s("GlobalErrors")]&&(jasmine[s("GlobalErrors")]=u,jasmine.GlobalErrors=function(){var n=new u,t=n.install;return t&&!n[s("install")]&&(n[s("install")]=t,n.install=function(){var n="undefined"!=typeof process&&!!process.on,r=n?process.listeners("unhandledRejection"):e.eventListeners("unhandledrejection"),o=t.apply(this,arguments);return n?process.removeAllListeners("unhandledRejection"):e.removeAllListeners("unhandledrejection"),r&&r.forEach((function(t){n?process.on("unhandledRejection",t):e.addEventListener("unhandledrejection",t)})),o}),n})}var l=jasmine.getEnv();if(["describe","xdescribe","fdescribe"].forEach((function(e){var n=l[e];l[e]=function(e,t){return n.call(this,e,function o(e,n){return function(){return i.fork(new r("jasmine.describe#".concat(e))).run(n,this,arguments)}}(e,t))}})),["it","xit","fit"].forEach((function(e){var n=l[e];l[s(e)]=n,l[e]=function(e,t,r){return arguments[1]=m(t),n.apply(this,arguments)}})),["beforeEach","afterEach","beforeAll","afterAll"].forEach((function(e){var n=l[e];l[s(e)]=n,l[e]=function(e,t){return arguments[0]=m(e),n.apply(this,arguments)}})),!a){var f=jasmine[s("clock")]=jasmine.clock;jasmine.clock=function(){var e=f.apply(this,arguments);if(!e[s("patched")]){e[s("patched")]=s("patched");var t=e[s("tick")]=e.tick;e.tick=function(){var e=n.current.get("FakeAsyncTestZoneSpec");return e?e.tick.apply(e,arguments):t.apply(this,arguments)};var r=e[s("mockDate")]=e.mockDate;e.mockDate=function(){var e=n.current.get("FakeAsyncTestZoneSpec");if(e){var t=arguments.length>0?arguments[0]:new Date;return e.setFakeBaseSystemTime.apply(e,t&&"function"==typeof t.getTime?[t.getTime()]:arguments)}return r.apply(this,arguments)},c&&["install","uninstall"].forEach((function(t){var r=e[s(t)]=e[t];e[t]=function(){if(!n.FakeAsyncTestZoneSpec)return r.apply(this,arguments);jasmine[s("clockInstalled")]="install"===t}}))}return e}}if(!jasmine[n.__symbol__("createSpyObj")]){var p=jasmine.createSpyObj;jasmine[n.__symbol__("createSpyObj")]=p,jasmine.createSpyObj=function(){var e,n=Array.prototype.slice.call(arguments);if(n.length>=3&&n[2]){var t=Object.defineProperty;Object.defineProperty=function(e,n,r){return t.call(this,e,n,__assign(__assign({},r),{configurable:!0,enumerable:!0}))};try{e=p.apply(this,n)}finally{Object.defineProperty=t}}else e=p.apply(this,n);return e}}var h=jasmine.QueueRunner;jasmine.QueueRunner=function(t){function r(r){var o,s=this;r.onComplete&&(r.onComplete=(o=r.onComplete,function(){s.testProxyZone=null,s.testProxyZoneSpec=null,i.scheduleMicroTask("jasmine.onComplete",o)}));var a=e[n.__symbol__("setTimeout")],c=e[n.__symbol__("clearTimeout")];a&&(r.timeout={setTimeout:a||e.setTimeout,clearTimeout:c||e.clearTimeout}),jasmine.UserContext?(r.userContext||(r.userContext=new jasmine.UserContext),r.userContext.queueRunner=this):(r.userContext||(r.userContext={}),r.userContext.queueRunner=this);var u=r.onException;r.onException=function(e){if(e&&"Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL."===e.message){var n=this&&this.testProxyZoneSpec;if(n){var t=n.getAndClearPendingTasksInfo();try{e.message+=t}catch(e){}}}u&&u.call(this,e)},t.call(this,r)}return function(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);function r(){this.constructor=e}e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}(r,t),r.prototype.execute=function(){for(var e=this,r=n.current,s=!1;r;){if(r===i){s=!0;break}r=r.parent}if(!s)throw new Error("Unexpected Zone: "+n.current.name);this.testProxyZoneSpec=new o,this.testProxyZone=i.fork(this.testProxyZoneSpec),n.currentTask?t.prototype.execute.call(this):n.current.scheduleMicroTask("jasmine.execute().forceTask",(function(){return h.prototype.execute.call(e)}))},r}(h)}function y(e,t,r,o){var i=!!jasmine[s("clockInstalled")],a=r.testProxyZone;if(i&&c){var u=n[n.__symbol__("fakeAsyncTest")];u&&"function"==typeof u.fakeAsync&&(e=u.fakeAsync(e))}return o?a.run(e,t,[o]):a.run(e,t)}function m(e){return e&&(e.length?function(n){return y(e,this,this.queueRunner,n)}:function(){return y(e,this,this.queueRunner)})}}))}(Zone)}));

@@ -15,3 +15,3 @@ 'use strict';

* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT

@@ -28,143 +28,156 @@ */

*/
var NEWLINE = '\n';
var IGNORE_FRAMES = {};
var creationTrace = '__creationTrace__';
var ERROR_TAG = 'STACKTRACE TRACKING';
var SEP_TAG = '__SEP_TAG__';
var sepTemplate = SEP_TAG + '@[native]';
var LongStackTrace = /** @class */ (function () {
function LongStackTrace() {
this.error = getStacktrace();
this.timestamp = new Date();
function patchLongStackTrace(Zone) {
var NEWLINE = '\n';
var IGNORE_FRAMES = {};
var creationTrace = '__creationTrace__';
var ERROR_TAG = 'STACKTRACE TRACKING';
var SEP_TAG = '__SEP_TAG__';
var sepTemplate = SEP_TAG + '@[native]';
var LongStackTrace = /** @class */ (function () {
function LongStackTrace() {
this.error = getStacktrace();
this.timestamp = new Date();
}
return LongStackTrace;
}());
function getStacktraceWithUncaughtError() {
return new Error(ERROR_TAG);
}
return LongStackTrace;
}());
function getStacktraceWithUncaughtError() {
return new Error(ERROR_TAG);
}
function getStacktraceWithCaughtError() {
try {
throw getStacktraceWithUncaughtError();
function getStacktraceWithCaughtError() {
try {
throw getStacktraceWithUncaughtError();
}
catch (err) {
return err;
}
}
catch (err) {
return err;
// Some implementations of exception handling don't create a stack trace if the exception
// isn't thrown, however it's faster not to actually throw the exception.
var error = getStacktraceWithUncaughtError();
var caughtError = getStacktraceWithCaughtError();
var getStacktrace = error.stack
? getStacktraceWithUncaughtError
: caughtError.stack
? getStacktraceWithCaughtError
: getStacktraceWithUncaughtError;
function getFrames(error) {
return error.stack ? error.stack.split(NEWLINE) : [];
}
}
// Some implementations of exception handling don't create a stack trace if the exception
// isn't thrown, however it's faster not to actually throw the exception.
var error = getStacktraceWithUncaughtError();
var caughtError = getStacktraceWithCaughtError();
var getStacktrace = error.stack ?
getStacktraceWithUncaughtError :
(caughtError.stack ? getStacktraceWithCaughtError : getStacktraceWithUncaughtError);
function getFrames(error) {
return error.stack ? error.stack.split(NEWLINE) : [];
}
function addErrorStack(lines, error) {
var trace = getFrames(error);
for (var i = 0; i < trace.length; i++) {
var frame = trace[i];
// Filter out the Frames which are part of stack capturing.
if (!IGNORE_FRAMES.hasOwnProperty(frame)) {
lines.push(trace[i]);
function addErrorStack(lines, error) {
var trace = getFrames(error);
for (var i = 0; i < trace.length; i++) {
var frame = trace[i];
// Filter out the Frames which are part of stack capturing.
if (!IGNORE_FRAMES.hasOwnProperty(frame)) {
lines.push(trace[i]);
}
}
}
}
function renderLongStackTrace(frames, stack) {
var longTrace = [stack ? stack.trim() : ''];
if (frames) {
var timestamp = new Date().getTime();
for (var i = 0; i < frames.length; i++) {
var traceFrames = frames[i];
var lastTime = traceFrames.timestamp;
var separator = "____________________Elapsed ".concat(timestamp - lastTime.getTime(), " ms; At: ").concat(lastTime);
separator = separator.replace(/[^\w\d]/g, '_');
longTrace.push(sepTemplate.replace(SEP_TAG, separator));
addErrorStack(longTrace, traceFrames.error);
timestamp = lastTime.getTime();
function renderLongStackTrace(frames, stack) {
var longTrace = [stack ? stack.trim() : ''];
if (frames) {
var timestamp = new Date().getTime();
for (var i = 0; i < frames.length; i++) {
var traceFrames = frames[i];
var lastTime = traceFrames.timestamp;
var separator = "____________________Elapsed ".concat(timestamp - lastTime.getTime(), " ms; At: ").concat(lastTime);
separator = separator.replace(/[^\w\d]/g, '_');
longTrace.push(sepTemplate.replace(SEP_TAG, separator));
addErrorStack(longTrace, traceFrames.error);
timestamp = lastTime.getTime();
}
}
return longTrace.join(NEWLINE);
}
return longTrace.join(NEWLINE);
}
// if Error.stackTraceLimit is 0, means stack trace
// is disabled, so we don't need to generate long stack trace
// this will improve performance in some test(some test will
// set stackTraceLimit to 0, https://github.com/angular/zone.js/issues/698
function stackTracesEnabled() {
// Cast through any since this property only exists on Error in the nodejs
// typings.
return Error.stackTraceLimit > 0;
}
Zone['longStackTraceZoneSpec'] = {
name: 'long-stack-trace',
longStackTraceLimit: 10, // Max number of task to keep the stack trace for.
// add a getLongStackTrace method in spec to
// handle handled reject promise error.
getLongStackTrace: function (error) {
if (!error) {
return undefined;
}
var trace = error[Zone.__symbol__('currentTaskTrace')];
if (!trace) {
return error.stack;
}
return renderLongStackTrace(trace, error.stack);
},
onScheduleTask: function (parentZoneDelegate, currentZone, targetZone, task) {
if (stackTracesEnabled()) {
var currentTask = Zone.currentTask;
var trace = currentTask && currentTask.data && currentTask.data[creationTrace] || [];
trace = [new LongStackTrace()].concat(trace);
if (trace.length > this.longStackTraceLimit) {
trace.length = this.longStackTraceLimit;
// if Error.stackTraceLimit is 0, means stack trace
// is disabled, so we don't need to generate long stack trace
// this will improve performance in some test(some test will
// set stackTraceLimit to 0, https://github.com/angular/zone.js/issues/698
function stackTracesEnabled() {
// Cast through any since this property only exists on Error in the nodejs
// typings.
return Error.stackTraceLimit > 0;
}
Zone['longStackTraceZoneSpec'] = {
name: 'long-stack-trace',
longStackTraceLimit: 10, // Max number of task to keep the stack trace for.
// add a getLongStackTrace method in spec to
// handle handled reject promise error.
getLongStackTrace: function (error) {
if (!error) {
return undefined;
}
if (!task.data)
task.data = {};
if (task.type === 'eventTask') {
// Fix issue https://github.com/angular/zone.js/issues/1195,
// For event task of browser, by default, all task will share a
// singleton instance of data object, we should create a new one here
// The cast to `any` is required to workaround a closure bug which wrongly applies
// URL sanitization rules to .data access.
task.data = __assign({}, task.data);
var trace = error[Zone.__symbol__('currentTaskTrace')];
if (!trace) {
return error.stack;
}
task.data[creationTrace] = trace;
}
return parentZoneDelegate.scheduleTask(targetZone, task);
},
onHandleError: function (parentZoneDelegate, currentZone, targetZone, error) {
if (stackTracesEnabled()) {
var parentTask = Zone.currentTask || error.task;
if (error instanceof Error && parentTask) {
var longStack = renderLongStackTrace(parentTask.data && parentTask.data[creationTrace], error.stack);
try {
error.stack = error.longStack = longStack;
return renderLongStackTrace(trace, error.stack);
},
onScheduleTask: function (parentZoneDelegate, currentZone, targetZone, task) {
if (stackTracesEnabled()) {
var currentTask = Zone.currentTask;
var trace = (currentTask && currentTask.data && currentTask.data[creationTrace]) || [];
trace = [new LongStackTrace()].concat(trace);
if (trace.length > this.longStackTraceLimit) {
trace.length = this.longStackTraceLimit;
}
catch (err) {
if (!task.data)
task.data = {};
if (task.type === 'eventTask') {
// Fix issue https://github.com/angular/zone.js/issues/1195,
// For event task of browser, by default, all task will share a
// singleton instance of data object, we should create a new one here
// The cast to `any` is required to workaround a closure bug which wrongly applies
// URL sanitization rules to .data access.
task.data = __assign({}, task.data);
}
task.data[creationTrace] = trace;
}
return parentZoneDelegate.scheduleTask(targetZone, task);
},
onHandleError: function (parentZoneDelegate, currentZone, targetZone, error) {
if (stackTracesEnabled()) {
var parentTask = Zone.currentTask || error.task;
if (error instanceof Error && parentTask) {
var longStack = renderLongStackTrace(parentTask.data && parentTask.data[creationTrace], error.stack);
try {
error.stack = error.longStack = longStack;
}
catch (err) { }
}
}
return parentZoneDelegate.handleError(targetZone, error);
},
};
function captureStackTraces(stackTraces, count) {
if (count > 0) {
stackTraces.push(getFrames(new LongStackTrace().error));
captureStackTraces(stackTraces, count - 1);
}
return parentZoneDelegate.handleError(targetZone, error);
}
};
function captureStackTraces(stackTraces, count) {
if (count > 0) {
stackTraces.push(getFrames((new LongStackTrace()).error));
captureStackTraces(stackTraces, count - 1);
}
}
function computeIgnoreFrames() {
if (!stackTracesEnabled()) {
return;
}
var frames = [];
captureStackTraces(frames, 2);
var frames1 = frames[0];
var frames2 = frames[1];
for (var i = 0; i < frames1.length; i++) {
var frame1 = frames1[i];
if (frame1.indexOf(ERROR_TAG) == -1) {
var match = frame1.match(/^\s*at\s+/);
if (match) {
sepTemplate = match[0] + SEP_TAG + ' (http://localhost)';
function computeIgnoreFrames() {
if (!stackTracesEnabled()) {
return;
}
var frames = [];
captureStackTraces(frames, 2);
var frames1 = frames[0];
var frames2 = frames[1];
for (var i = 0; i < frames1.length; i++) {
var frame1 = frames1[i];
if (frame1.indexOf(ERROR_TAG) == -1) {
var match = frame1.match(/^\s*at\s+/);
if (match) {
sepTemplate = match[0] + SEP_TAG + ' (http://localhost)';
break;
}
}
}
for (var i = 0; i < frames1.length; i++) {
var frame1 = frames1[i];
var frame2 = frames2[i];
if (frame1 === frame2) {
IGNORE_FRAMES[frame1] = true;
}
else {
break;

@@ -174,14 +187,5 @@ }

}
for (var i = 0; i < frames1.length; i++) {
var frame1 = frames1[i];
var frame2 = frames2[i];
if (frame1 === frame2) {
IGNORE_FRAMES[frame1] = true;
}
else {
break;
}
}
computeIgnoreFrames();
}
computeIgnoreFrames();
patchLongStackTrace(Zone);
}));
"use strict";var __assign=this&&this.__assign||function(){return __assign=Object.assign||function(t){for(var a,n=1,r=arguments.length;n<r;n++)for(var e in a=arguments[n])Object.prototype.hasOwnProperty.call(a,e)&&(t[e]=a[e]);return t},__assign.apply(this,arguments)};
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){var t="\n",a={},n="__creationTrace__",r="STACKTRACE TRACKING",e="__SEP_TAG__",c=e+"@[native]",i=function i(){this.error=u(),this.timestamp=new Date};function o(){return new Error(r)}function s(){try{throw o()}catch(t){return t}}var _=o(),f=s(),u=_.stack?o:f.stack?s:o;function h(a){return a.stack?a.stack.split(t):[]}function l(t,n){for(var r=h(n),e=0;e<r.length;e++)a.hasOwnProperty(r[e])||t.push(r[e])}function g(a,n){var r=[n?n.trim():""];if(a)for(var i=(new Date).getTime(),o=0;o<a.length;o++){var s=a[o],_=s.timestamp,f="____________________Elapsed ".concat(i-_.getTime()," ms; At: ").concat(_);f=f.replace(/[^\w\d]/g,"_"),r.push(c.replace(e,f)),l(r,s.error),i=_.getTime()}return r.join(t)}function k(){return Error.stackTraceLimit>0}function T(t,a){a>0&&(t.push(h((new i).error)),T(t,a-1))}Zone.longStackTraceZoneSpec={name:"long-stack-trace",longStackTraceLimit:10,getLongStackTrace:function(t){if(t){var a=t[Zone.__symbol__("currentTaskTrace")];return a?g(a,t.stack):t.stack}},onScheduleTask:function(t,a,r,e){if(k()){var c=Zone.currentTask,o=c&&c.data&&c.data[n]||[];(o=[new i].concat(o)).length>this.longStackTraceLimit&&(o.length=this.longStackTraceLimit),e.data||(e.data={}),"eventTask"===e.type&&(e.data=__assign({},e.data)),e.data[n]=o}return t.scheduleTask(r,e)},onHandleError:function(t,a,r,e){if(k()){var c=Zone.currentTask||e.task;if(e instanceof Error&&c){var i=g(c.data&&c.data[n],e.stack);try{e.stack=e.longStack=i}catch(t){}}}return t.handleError(r,e)}},function d(){if(k()){var t=[];T(t,2);for(var n=t[0],i=t[1],o=0;o<n.length;o++)if(-1==(_=n[o]).indexOf(r)){var s=_.match(/^\s*at\s+/);if(s){c=s[0]+e+" (http://localhost)";break}}for(o=0;o<n.length;o++){var _;if((_=n[o])!==i[o])break;a[_]=!0}}}()}));
*/!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){!function t(a){var n="\n",r={},e="__creationTrace__",c="STACKTRACE TRACKING",i="__SEP_TAG__",o=i+"@[native]",s=function s(){this.error=l(),this.timestamp=new Date};function _(){return new Error(c)}function f(){try{throw _()}catch(t){return t}}var u=_(),h=f(),l=u.stack?_:h.stack?f:_;function g(t){return t.stack?t.stack.split(n):[]}function k(t,a){for(var n=g(a),e=0;e<n.length;e++)r.hasOwnProperty(n[e])||t.push(n[e])}function T(t,a){var r=[a?a.trim():""];if(t)for(var e=(new Date).getTime(),c=0;c<t.length;c++){var s=t[c],_=s.timestamp,f="____________________Elapsed ".concat(e-_.getTime()," ms; At: ").concat(_);f=f.replace(/[^\w\d]/g,"_"),r.push(o.replace(i,f)),k(r,s.error),e=_.getTime()}return r.join(n)}function d(){return Error.stackTraceLimit>0}function p(t,a){a>0&&(t.push(g((new s).error)),p(t,a-1))}a.longStackTraceZoneSpec={name:"long-stack-trace",longStackTraceLimit:10,getLongStackTrace:function(t){if(t){var n=t[a.__symbol__("currentTaskTrace")];return n?T(n,t.stack):t.stack}},onScheduleTask:function(t,n,r,c){if(d()){var i=a.currentTask,o=i&&i.data&&i.data[e]||[];(o=[new s].concat(o)).length>this.longStackTraceLimit&&(o.length=this.longStackTraceLimit),c.data||(c.data={}),"eventTask"===c.type&&(c.data=__assign({},c.data)),c.data[e]=o}return t.scheduleTask(r,c)},onHandleError:function(t,n,r,c){if(d()){var i=a.currentTask||c.task;if(c instanceof Error&&i){var o=T(i.data&&i.data[e],c.stack);try{c.stack=c.longStack=o}catch(t){}}}return t.handleError(r,c)}},function v(){if(d()){var t=[];p(t,2);for(var a=t[0],n=t[1],e=0;e<a.length;e++)if(-1==(_=a[e]).indexOf(c)){var s=_.match(/^\s*at\s+/);if(s){o=s[0]+i+" (http://localhost)";break}}for(e=0;e<a.length;e++){var _;if((_=a[e])!==n[e])break;r[_]=!0}}}()}(Zone)}));
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT

@@ -12,145 +12,156 @@ */

'use strict';
Zone.__load_patch('mocha', function (global, Zone) {
var Mocha = global.Mocha;
if (typeof Mocha === 'undefined') {
// return if Mocha is not available, because now zone-testing
// will load mocha patch with jasmine/jest patch
return;
}
if (typeof Zone === 'undefined') {
throw new Error('Missing Zone.js');
}
var ProxyZoneSpec = Zone['ProxyZoneSpec'];
var SyncTestZoneSpec = Zone['SyncTestZoneSpec'];
if (!ProxyZoneSpec) {
throw new Error('Missing ProxyZoneSpec');
}
if (Mocha['__zone_patch__']) {
throw new Error('"Mocha" has already been patched with "Zone".');
}
Mocha['__zone_patch__'] = true;
var rootZone = Zone.current;
var syncZone = rootZone.fork(new SyncTestZoneSpec('Mocha.describe'));
var testZone = null;
var suiteZone = rootZone.fork(new ProxyZoneSpec());
var mochaOriginal = {
after: global.after,
afterEach: global.afterEach,
before: global.before,
beforeEach: global.beforeEach,
describe: global.describe,
it: global.it
};
function modifyArguments(args, syncTest, asyncTest) {
var _loop_1 = function (i) {
var arg = args[i];
if (typeof arg === 'function') {
// The `done` callback is only passed through if the function expects at
// least one argument.
// Note we have to make a function with correct number of arguments,
// otherwise mocha will
// think that all functions are sync or async.
args[i] = (arg.length === 0) ? syncTest(arg) : asyncTest(arg);
// Mocha uses toString to view the test body in the result list, make sure we return the
// correct function body
args[i].toString = function () {
return arg.toString();
};
function patchMocha(Zone) {
Zone.__load_patch('mocha', function (global, Zone) {
var Mocha = global.Mocha;
if (typeof Mocha === 'undefined') {
// return if Mocha is not available, because now zone-testing
// will load mocha patch with jasmine/jest patch
return;
}
if (typeof Zone === 'undefined') {
throw new Error('Missing Zone.js');
}
var ProxyZoneSpec = Zone['ProxyZoneSpec'];
var SyncTestZoneSpec = Zone['SyncTestZoneSpec'];
if (!ProxyZoneSpec) {
throw new Error('Missing ProxyZoneSpec');
}
if (Mocha['__zone_patch__']) {
throw new Error('"Mocha" has already been patched with "Zone".');
}
Mocha['__zone_patch__'] = true;
var rootZone = Zone.current;
var syncZone = rootZone.fork(new SyncTestZoneSpec('Mocha.describe'));
var testZone = null;
var suiteZone = rootZone.fork(new ProxyZoneSpec());
var mochaOriginal = {
after: global.after,
afterEach: global.afterEach,
before: global.before,
beforeEach: global.beforeEach,
describe: global.describe,
it: global.it,
};
function modifyArguments(args, syncTest, asyncTest) {
var _loop_1 = function (i) {
var arg = args[i];
if (typeof arg === 'function') {
// The `done` callback is only passed through if the function expects at
// least one argument.
// Note we have to make a function with correct number of arguments,
// otherwise mocha will
// think that all functions are sync or async.
args[i] = arg.length === 0 ? syncTest(arg) : asyncTest(arg);
// Mocha uses toString to view the test body in the result list, make sure we return the
// correct function body
args[i].toString = function () {
return arg.toString();
};
}
};
for (var i = 0; i < args.length; i++) {
_loop_1(i);
}
};
for (var i = 0; i < args.length; i++) {
_loop_1(i);
return args;
}
return args;
}
function wrapDescribeInZone(args) {
var syncTest = function (fn) {
return function () {
return syncZone.run(fn, this, arguments);
function wrapDescribeInZone(args) {
var syncTest = function (fn) {
return function () {
return syncZone.run(fn, this, arguments);
};
};
};
return modifyArguments(args, syncTest);
}
function wrapTestInZone(args) {
var asyncTest = function (fn) {
return function (done) {
return testZone.run(fn, this, [done]);
return modifyArguments(args, syncTest);
}
function wrapTestInZone(args) {
var asyncTest = function (fn) {
return function (done) {
return testZone.run(fn, this, [done]);
};
};
};
var syncTest = function (fn) {
return function () {
return testZone.run(fn, this);
var syncTest = function (fn) {
return function () {
return testZone.run(fn, this);
};
};
};
return modifyArguments(args, syncTest, asyncTest);
}
function wrapSuiteInZone(args) {
var asyncTest = function (fn) {
return function (done) {
return suiteZone.run(fn, this, [done]);
return modifyArguments(args, syncTest, asyncTest);
}
function wrapSuiteInZone(args) {
var asyncTest = function (fn) {
return function (done) {
return suiteZone.run(fn, this, [done]);
};
};
};
var syncTest = function (fn) {
return function () {
return suiteZone.run(fn, this);
var syncTest = function (fn) {
return function () {
return suiteZone.run(fn, this);
};
};
return modifyArguments(args, syncTest, asyncTest);
}
global.describe = global.suite = function () {
return mochaOriginal.describe.apply(this, wrapDescribeInZone(arguments));
};
return modifyArguments(args, syncTest, asyncTest);
}
global.describe = global.suite = function () {
return mochaOriginal.describe.apply(this, wrapDescribeInZone(arguments));
};
global.xdescribe = global.suite.skip = global.describe.skip = function () {
return mochaOriginal.describe.skip.apply(this, wrapDescribeInZone(arguments));
};
global.describe.only = global.suite.only = function () {
return mochaOriginal.describe.only.apply(this, wrapDescribeInZone(arguments));
};
global.it = global.specify = global.test = function () {
return mochaOriginal.it.apply(this, wrapTestInZone(arguments));
};
global.xit = global.xspecify = global.it.skip = function () {
return mochaOriginal.it.skip.apply(this, wrapTestInZone(arguments));
};
global.it.only = global.test.only = function () {
return mochaOriginal.it.only.apply(this, wrapTestInZone(arguments));
};
global.after = global.suiteTeardown = function () {
return mochaOriginal.after.apply(this, wrapSuiteInZone(arguments));
};
global.afterEach = global.teardown = function () {
return mochaOriginal.afterEach.apply(this, wrapTestInZone(arguments));
};
global.before = global.suiteSetup = function () {
return mochaOriginal.before.apply(this, wrapSuiteInZone(arguments));
};
global.beforeEach = global.setup = function () {
return mochaOriginal.beforeEach.apply(this, wrapTestInZone(arguments));
};
(function (originalRunTest, originalRun) {
Mocha.Runner.prototype.runTest = function (fn) {
var _this = this;
Zone.current.scheduleMicroTask('mocha.forceTask', function () {
originalRunTest.call(_this, fn);
});
global.xdescribe =
global.suite.skip =
global.describe.skip =
function () {
return mochaOriginal.describe.skip.apply(this, wrapDescribeInZone(arguments));
};
global.describe.only = global.suite.only = function () {
return mochaOriginal.describe.only.apply(this, wrapDescribeInZone(arguments));
};
Mocha.Runner.prototype.run = function (fn) {
this.on('test', function (e) {
testZone = rootZone.fork(new ProxyZoneSpec());
});
this.on('fail', function (test, err) {
var proxyZoneSpec = testZone && testZone.get('ProxyZoneSpec');
if (proxyZoneSpec && err) {
try {
// try catch here in case err.message is not writable
err.message += proxyZoneSpec.getAndClearPendingTasksInfo();
global.it =
global.specify =
global.test =
function () {
return mochaOriginal.it.apply(this, wrapTestInZone(arguments));
};
global.xit =
global.xspecify =
global.it.skip =
function () {
return mochaOriginal.it.skip.apply(this, wrapTestInZone(arguments));
};
global.it.only = global.test.only = function () {
return mochaOriginal.it.only.apply(this, wrapTestInZone(arguments));
};
global.after = global.suiteTeardown = function () {
return mochaOriginal.after.apply(this, wrapSuiteInZone(arguments));
};
global.afterEach = global.teardown = function () {
return mochaOriginal.afterEach.apply(this, wrapTestInZone(arguments));
};
global.before = global.suiteSetup = function () {
return mochaOriginal.before.apply(this, wrapSuiteInZone(arguments));
};
global.beforeEach = global.setup = function () {
return mochaOriginal.beforeEach.apply(this, wrapTestInZone(arguments));
};
(function (originalRunTest, originalRun) {
Mocha.Runner.prototype.runTest = function (fn) {
var _this = this;
Zone.current.scheduleMicroTask('mocha.forceTask', function () {
originalRunTest.call(_this, fn);
});
};
Mocha.Runner.prototype.run = function (fn) {
this.on('test', function (e) {
testZone = rootZone.fork(new ProxyZoneSpec());
});
this.on('fail', function (test, err) {
var proxyZoneSpec = testZone && testZone.get('ProxyZoneSpec');
if (proxyZoneSpec && err) {
try {
// try catch here in case err.message is not writable
err.message += proxyZoneSpec.getAndClearPendingTasksInfo();
}
catch (error) { }
}
catch (error) {
}
}
});
return originalRun.call(this, fn);
};
})(Mocha.Runner.prototype.runTest, Mocha.Runner.prototype.run);
});
});
return originalRun.call(this, fn);
};
})(Mocha.Runner.prototype.runTest, Mocha.Runner.prototype.run);
});
}
patchMocha(Zone);
}));
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/!function(n){"function"==typeof define&&define.amd?define(n):n()}((function(){Zone.__load_patch("mocha",(function(n,t){var e=n.Mocha;if(void 0!==e){if(void 0===t)throw new Error("Missing Zone.js");var r=t.ProxyZoneSpec,i=t.SyncTestZoneSpec;if(!r)throw new Error("Missing ProxyZoneSpec");if(e.__zone_patch__)throw new Error('"Mocha" has already been patched with "Zone".');e.__zone_patch__=!0;var o,u,c=t.current,f=c.fork(new i("Mocha.describe")),s=null,a=c.fork(new r),p={after:n.after,afterEach:n.afterEach,before:n.before,beforeEach:n.beforeEach,describe:n.describe,it:n.it};n.describe=n.suite=function(){return p.describe.apply(this,y(arguments))},n.xdescribe=n.suite.skip=n.describe.skip=function(){return p.describe.skip.apply(this,y(arguments))},n.describe.only=n.suite.only=function(){return p.describe.only.apply(this,y(arguments))},n.it=n.specify=n.test=function(){return p.it.apply(this,l(arguments))},n.xit=n.xspecify=n.it.skip=function(){return p.it.skip.apply(this,l(arguments))},n.it.only=n.test.only=function(){return p.it.only.apply(this,l(arguments))},n.after=n.suiteTeardown=function(){return p.after.apply(this,d(arguments))},n.afterEach=n.teardown=function(){return p.afterEach.apply(this,l(arguments))},n.before=n.suiteSetup=function(){return p.before.apply(this,d(arguments))},n.beforeEach=n.setup=function(){return p.beforeEach.apply(this,l(arguments))},o=e.Runner.prototype.runTest,u=e.Runner.prototype.run,e.Runner.prototype.runTest=function(n){var e=this;t.current.scheduleMicroTask("mocha.forceTask",(function(){o.call(e,n)}))},e.Runner.prototype.run=function(n){return this.on("test",(function(n){s=c.fork(new r)})),this.on("fail",(function(n,t){var e=s&&s.get("ProxyZoneSpec");if(e&&t)try{t.message+=e.getAndClearPendingTasksInfo()}catch(n){}})),u.call(this,n)}}function h(n,t,e){for(var r=function(r){var i=n[r];"function"==typeof i&&(n[r]=0===i.length?t(i):e(i),n[r].toString=function(){return i.toString()})},i=0;i<n.length;i++)r(i);return n}function y(n){return h(n,(function(n){return function(){return f.run(n,this,arguments)}}))}function l(n){return h(n,(function(n){return function(){return s.run(n,this)}}),(function(n){return function(t){return s.run(n,this,[t])}}))}function d(n){return h(n,(function(n){return function(){return a.run(n,this)}}),(function(n){return function(t){return a.run(n,this,[t])}}))}}))}));
*/!function(n){"function"==typeof define&&define.amd?define(n):n()}((function(){!function n(t){t.__load_patch("mocha",(function(n,t){var e=n.Mocha;if(void 0!==e){if(void 0===t)throw new Error("Missing Zone.js");var r=t.ProxyZoneSpec,i=t.SyncTestZoneSpec;if(!r)throw new Error("Missing ProxyZoneSpec");if(e.__zone_patch__)throw new Error('"Mocha" has already been patched with "Zone".');e.__zone_patch__=!0;var o,u,c=t.current,f=c.fork(new i("Mocha.describe")),s=null,a=c.fork(new r),p={after:n.after,afterEach:n.afterEach,before:n.before,beforeEach:n.beforeEach,describe:n.describe,it:n.it};n.describe=n.suite=function(){return p.describe.apply(this,y(arguments))},n.xdescribe=n.suite.skip=n.describe.skip=function(){return p.describe.skip.apply(this,y(arguments))},n.describe.only=n.suite.only=function(){return p.describe.only.apply(this,y(arguments))},n.it=n.specify=n.test=function(){return p.it.apply(this,l(arguments))},n.xit=n.xspecify=n.it.skip=function(){return p.it.skip.apply(this,l(arguments))},n.it.only=n.test.only=function(){return p.it.only.apply(this,l(arguments))},n.after=n.suiteTeardown=function(){return p.after.apply(this,d(arguments))},n.afterEach=n.teardown=function(){return p.afterEach.apply(this,l(arguments))},n.before=n.suiteSetup=function(){return p.before.apply(this,d(arguments))},n.beforeEach=n.setup=function(){return p.beforeEach.apply(this,l(arguments))},o=e.Runner.prototype.runTest,u=e.Runner.prototype.run,e.Runner.prototype.runTest=function(n){var e=this;t.current.scheduleMicroTask("mocha.forceTask",(function(){o.call(e,n)}))},e.Runner.prototype.run=function(n){return this.on("test",(function(n){s=c.fork(new r)})),this.on("fail",(function(n,t){var e=s&&s.get("ProxyZoneSpec");if(e&&t)try{t.message+=e.getAndClearPendingTasksInfo()}catch(n){}})),u.call(this,n)}}function h(n,t,e){for(var r=function(r){var i=n[r];"function"==typeof i&&(n[r]=0===i.length?t(i):e(i),n[r].toString=function(){return i.toString()})},i=0;i<n.length;i++)r(i);return n}function y(n){return h(n,(function(n){return function(){return f.run(n,this,arguments)}}))}function l(n){return h(n,(function(n){return function(){return s.run(n,this)}}),(function(n){return function(t){return s.run(n,this,[t])}}))}function d(n){return h(n,(function(n){return function(){return a.run(n,this)}}),(function(n){return function(t){return a.run(n,this,[t])}}))}}))}(Zone)}));
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT

@@ -45,6 +45,7 @@ */

this.propertyKeys = Object.keys(delegateSpec.properties);
this.propertyKeys.forEach(function (k) { return _this.properties[k] = delegateSpec.properties[k]; });
this.propertyKeys.forEach(function (k) { return (_this.properties[k] = delegateSpec.properties[k]); });
}
// if a new delegateSpec was set, check if we need to trigger hasTask
if (isNewDelegate && this.lastTaskState &&
if (isNewDelegate &&
this.lastTaskState &&
(this.lastTaskState.macroTask || this.lastTaskState.microTask)) {

@@ -177,5 +178,8 @@ this.isNeedToTriggerHasTask = true;

}());
// Export the class so that new instances can be created with proper
// constructor params.
Zone['ProxyZoneSpec'] = ProxyZoneSpec;
function patchProxyZoneSpec(Zone) {
// Export the class so that new instances can be created with proper
// constructor params.
Zone['ProxyZoneSpec'] = ProxyZoneSpec;
}
patchProxyZoneSpec(Zone);
}));
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){var e=function(){function e(e){void 0===e&&(e=null),this.defaultSpecDelegate=e,this.name="ProxyZone",this._delegateSpec=null,this.properties={ProxyZoneSpec:this},this.propertyKeys=null,this.lastTaskState=null,this.isNeedToTriggerHasTask=!1,this.tasks=[],this.setDelegate(e)}return e.get=function(){return Zone.current.get("ProxyZoneSpec")},e.isLoaded=function(){return e.get()instanceof e},e.assertPresent=function(){if(!e.isLoaded())throw new Error("Expected to be running in 'ProxyZone', but it was not found.");return e.get()},e.prototype.setDelegate=function(e){var t=this,s=this._delegateSpec!==e;this._delegateSpec=e,this.propertyKeys&&this.propertyKeys.forEach((function(e){return delete t.properties[e]})),this.propertyKeys=null,e&&e.properties&&(this.propertyKeys=Object.keys(e.properties),this.propertyKeys.forEach((function(s){return t.properties[s]=e.properties[s]}))),s&&this.lastTaskState&&(this.lastTaskState.macroTask||this.lastTaskState.microTask)&&(this.isNeedToTriggerHasTask=!0)},e.prototype.getDelegate=function(){return this._delegateSpec},e.prototype.resetDelegate=function(){this.getDelegate(),this.setDelegate(this.defaultSpecDelegate)},e.prototype.tryTriggerHasTask=function(e,t,s){this.isNeedToTriggerHasTask&&this.lastTaskState&&(this.isNeedToTriggerHasTask=!1,this.onHasTask(e,t,s,this.lastTaskState))},e.prototype.removeFromTasks=function(e){if(this.tasks)for(var t=0;t<this.tasks.length;t++)if(this.tasks[t]===e)return void this.tasks.splice(t,1)},e.prototype.getAndClearPendingTasksInfo=function(){if(0===this.tasks.length)return"";var e="--Pending async tasks are: ["+this.tasks.map((function(e){var t=e.data&&Object.keys(e.data).map((function(t){return t+":"+e.data[t]})).join(",");return"type: ".concat(e.type,", source: ").concat(e.source,", args: {").concat(t,"}")}))+"]";return this.tasks=[],e},e.prototype.onFork=function(e,t,s,n){return this._delegateSpec&&this._delegateSpec.onFork?this._delegateSpec.onFork(e,t,s,n):e.fork(s,n)},e.prototype.onIntercept=function(e,t,s,n,a){return this._delegateSpec&&this._delegateSpec.onIntercept?this._delegateSpec.onIntercept(e,t,s,n,a):e.intercept(s,n,a)},e.prototype.onInvoke=function(e,t,s,n,a,r,o){return this.tryTriggerHasTask(e,t,s),this._delegateSpec&&this._delegateSpec.onInvoke?this._delegateSpec.onInvoke(e,t,s,n,a,r,o):e.invoke(s,n,a,r,o)},e.prototype.onHandleError=function(e,t,s,n){return this._delegateSpec&&this._delegateSpec.onHandleError?this._delegateSpec.onHandleError(e,t,s,n):e.handleError(s,n)},e.prototype.onScheduleTask=function(e,t,s,n){return"eventTask"!==n.type&&this.tasks.push(n),this._delegateSpec&&this._delegateSpec.onScheduleTask?this._delegateSpec.onScheduleTask(e,t,s,n):e.scheduleTask(s,n)},e.prototype.onInvokeTask=function(e,t,s,n,a,r){return"eventTask"!==n.type&&this.removeFromTasks(n),this.tryTriggerHasTask(e,t,s),this._delegateSpec&&this._delegateSpec.onInvokeTask?this._delegateSpec.onInvokeTask(e,t,s,n,a,r):e.invokeTask(s,n,a,r)},e.prototype.onCancelTask=function(e,t,s,n){return"eventTask"!==n.type&&this.removeFromTasks(n),this.tryTriggerHasTask(e,t,s),this._delegateSpec&&this._delegateSpec.onCancelTask?this._delegateSpec.onCancelTask(e,t,s,n):e.cancelTask(s,n)},e.prototype.onHasTask=function(e,t,s,n){this.lastTaskState=n,this._delegateSpec&&this._delegateSpec.onHasTask?this._delegateSpec.onHasTask(e,t,s,n):e.hasTask(s,n)},e}();Zone.ProxyZoneSpec=e}));
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){var e=function(){function e(e){void 0===e&&(e=null),this.defaultSpecDelegate=e,this.name="ProxyZone",this._delegateSpec=null,this.properties={ProxyZoneSpec:this},this.propertyKeys=null,this.lastTaskState=null,this.isNeedToTriggerHasTask=!1,this.tasks=[],this.setDelegate(e)}return e.get=function(){return Zone.current.get("ProxyZoneSpec")},e.isLoaded=function(){return e.get()instanceof e},e.assertPresent=function(){if(!e.isLoaded())throw new Error("Expected to be running in 'ProxyZone', but it was not found.");return e.get()},e.prototype.setDelegate=function(e){var t=this,s=this._delegateSpec!==e;this._delegateSpec=e,this.propertyKeys&&this.propertyKeys.forEach((function(e){return delete t.properties[e]})),this.propertyKeys=null,e&&e.properties&&(this.propertyKeys=Object.keys(e.properties),this.propertyKeys.forEach((function(s){return t.properties[s]=e.properties[s]}))),s&&this.lastTaskState&&(this.lastTaskState.macroTask||this.lastTaskState.microTask)&&(this.isNeedToTriggerHasTask=!0)},e.prototype.getDelegate=function(){return this._delegateSpec},e.prototype.resetDelegate=function(){this.getDelegate(),this.setDelegate(this.defaultSpecDelegate)},e.prototype.tryTriggerHasTask=function(e,t,s){this.isNeedToTriggerHasTask&&this.lastTaskState&&(this.isNeedToTriggerHasTask=!1,this.onHasTask(e,t,s,this.lastTaskState))},e.prototype.removeFromTasks=function(e){if(this.tasks)for(var t=0;t<this.tasks.length;t++)if(this.tasks[t]===e)return void this.tasks.splice(t,1)},e.prototype.getAndClearPendingTasksInfo=function(){if(0===this.tasks.length)return"";var e="--Pending async tasks are: ["+this.tasks.map((function(e){var t=e.data&&Object.keys(e.data).map((function(t){return t+":"+e.data[t]})).join(",");return"type: ".concat(e.type,", source: ").concat(e.source,", args: {").concat(t,"}")}))+"]";return this.tasks=[],e},e.prototype.onFork=function(e,t,s,n){return this._delegateSpec&&this._delegateSpec.onFork?this._delegateSpec.onFork(e,t,s,n):e.fork(s,n)},e.prototype.onIntercept=function(e,t,s,n,a){return this._delegateSpec&&this._delegateSpec.onIntercept?this._delegateSpec.onIntercept(e,t,s,n,a):e.intercept(s,n,a)},e.prototype.onInvoke=function(e,t,s,n,a,o,r){return this.tryTriggerHasTask(e,t,s),this._delegateSpec&&this._delegateSpec.onInvoke?this._delegateSpec.onInvoke(e,t,s,n,a,o,r):e.invoke(s,n,a,o,r)},e.prototype.onHandleError=function(e,t,s,n){return this._delegateSpec&&this._delegateSpec.onHandleError?this._delegateSpec.onHandleError(e,t,s,n):e.handleError(s,n)},e.prototype.onScheduleTask=function(e,t,s,n){return"eventTask"!==n.type&&this.tasks.push(n),this._delegateSpec&&this._delegateSpec.onScheduleTask?this._delegateSpec.onScheduleTask(e,t,s,n):e.scheduleTask(s,n)},e.prototype.onInvokeTask=function(e,t,s,n,a,o){return"eventTask"!==n.type&&this.removeFromTasks(n),this.tryTriggerHasTask(e,t,s),this._delegateSpec&&this._delegateSpec.onInvokeTask?this._delegateSpec.onInvokeTask(e,t,s,n,a,o):e.invokeTask(s,n,a,o)},e.prototype.onCancelTask=function(e,t,s,n){return"eventTask"!==n.type&&this.removeFromTasks(n),this.tryTriggerHasTask(e,t,s),this._delegateSpec&&this._delegateSpec.onCancelTask?this._delegateSpec.onCancelTask(e,t,s,n):e.cancelTask(s,n)},e.prototype.onHasTask=function(e,t,s,n){this.lastTaskState=n,this._delegateSpec&&this._delegateSpec.onHasTask?this._delegateSpec.onHasTask(e,t,s,n):e.hasTask(s,n)},e}();!function t(s){s.ProxyZoneSpec=e}(Zone)}));
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT

@@ -12,23 +12,26 @@ */

'use strict';
var SyncTestZoneSpec = /** @class */ (function () {
function SyncTestZoneSpec(namePrefix) {
this.runZone = Zone.current;
this.name = 'syncTestZone for ' + namePrefix;
}
SyncTestZoneSpec.prototype.onScheduleTask = function (delegate, current, target, task) {
switch (task.type) {
case 'microTask':
case 'macroTask':
throw new Error("Cannot call ".concat(task.source, " from within a sync test (").concat(this.name, ")."));
case 'eventTask':
task = delegate.scheduleTask(target, task);
break;
function patchSyncTest(Zone) {
var SyncTestZoneSpec = /** @class */ (function () {
function SyncTestZoneSpec(namePrefix) {
this.runZone = Zone.current;
this.name = 'syncTestZone for ' + namePrefix;
}
return task;
};
return SyncTestZoneSpec;
}());
// Export the class so that new instances can be created with proper
// constructor params.
Zone['SyncTestZoneSpec'] = SyncTestZoneSpec;
SyncTestZoneSpec.prototype.onScheduleTask = function (delegate, current, target, task) {
switch (task.type) {
case 'microTask':
case 'macroTask':
throw new Error("Cannot call ".concat(task.source, " from within a sync test (").concat(this.name, ")."));
case 'eventTask':
task = delegate.scheduleTask(target, task);
break;
}
return task;
};
return SyncTestZoneSpec;
}());
// Export the class so that new instances can be created with proper
// constructor params.
Zone['SyncTestZoneSpec'] = SyncTestZoneSpec;
}
patchSyncTest(Zone);
}));
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/!function(n){"function"==typeof define&&define.amd?define(n):n()}((function(){var n=function(){function n(n){this.runZone=Zone.current,this.name="syncTestZone for "+n}return n.prototype.onScheduleTask=function(n,e,t,c){switch(c.type){case"microTask":case"macroTask":throw new Error("Cannot call ".concat(c.source," from within a sync test (").concat(this.name,")."));case"eventTask":c=n.scheduleTask(t,c)}return c},n}();Zone.SyncTestZoneSpec=n}));
*/!function(n){"function"==typeof define&&define.amd?define(n):n()}((function(){!function n(e){var t=function(){function n(n){this.runZone=e.current,this.name="syncTestZone for "+n}return n.prototype.onScheduleTask=function(n,e,t,c){switch(c.type){case"microTask":case"macroTask":throw new Error("Cannot call ".concat(c.source," from within a sync test (").concat(this.name,")."));case"eventTask":c=n.scheduleTask(t,c)}return c},n}();e.SyncTestZoneSpec=t}(Zone)}));
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT

@@ -76,5 +76,8 @@ */

}());
// Export the class so that new instances can be created with proper
// constructor params.
Zone['TaskTrackingZoneSpec'] = TaskTrackingZoneSpec;
function patchTaskTracking(Zone) {
// Export the class so that new instances can be created with proper
// constructor params.
Zone['TaskTrackingZoneSpec'] = TaskTrackingZoneSpec;
}
patchTaskTracking(Zone);
}));
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){var e=function(){function e(){this.name="TaskTrackingZone",this.microTasks=[],this.macroTasks=[],this.eventTasks=[],this.properties={TaskTrackingZone:this}}return e.get=function(){return Zone.current.get("TaskTrackingZone")},e.prototype.getTasksFor=function(e){switch(e){case"microTask":return this.microTasks;case"macroTask":return this.macroTasks;case"eventTask":return this.eventTasks}throw new Error("Unknown task format: "+e)},e.prototype.onScheduleTask=function(e,t,n,s){return s.creationLocation=new Error("Task '".concat(s.type,"' from '").concat(s.source,"'.")),this.getTasksFor(s.type).push(s),e.scheduleTask(n,s)},e.prototype.onCancelTask=function(e,t,n,s){for(var r=this.getTasksFor(s.type),o=0;o<r.length;o++)if(r[o]==s){r.splice(o,1);break}return e.cancelTask(n,s)},e.prototype.onInvokeTask=function(e,t,n,s,r,o){var a;if("eventTask"===s.type||(null===(a=s.data)||void 0===a?void 0:a.isPeriodic))return e.invokeTask(n,s,r,o);for(var i=this.getTasksFor(s.type),c=0;c<i.length;c++)if(i[c]==s){i.splice(c,1);break}return e.invokeTask(n,s,r,o)},e.prototype.clearEvents=function(){for(;this.eventTasks.length;)Zone.current.cancelTask(this.eventTasks[0])},e}();Zone.TaskTrackingZoneSpec=e}));
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){var e=function(){function e(){this.name="TaskTrackingZone",this.microTasks=[],this.macroTasks=[],this.eventTasks=[],this.properties={TaskTrackingZone:this}}return e.get=function(){return Zone.current.get("TaskTrackingZone")},e.prototype.getTasksFor=function(e){switch(e){case"microTask":return this.microTasks;case"macroTask":return this.macroTasks;case"eventTask":return this.eventTasks}throw new Error("Unknown task format: "+e)},e.prototype.onScheduleTask=function(e,t,n,s){return s.creationLocation=new Error("Task '".concat(s.type,"' from '").concat(s.source,"'.")),this.getTasksFor(s.type).push(s),e.scheduleTask(n,s)},e.prototype.onCancelTask=function(e,t,n,s){for(var r=this.getTasksFor(s.type),o=0;o<r.length;o++)if(r[o]==s){r.splice(o,1);break}return e.cancelTask(n,s)},e.prototype.onInvokeTask=function(e,t,n,s,r,o){var a;if("eventTask"===s.type||(null===(a=s.data)||void 0===a?void 0:a.isPeriodic))return e.invokeTask(n,s,r,o);for(var i=this.getTasksFor(s.type),c=0;c<i.length;c++)if(i[c]==s){i.splice(c,1);break}return e.invokeTask(n,s,r,o)},e.prototype.clearEvents=function(){for(;this.eventTasks.length;)Zone.current.cancelTask(this.eventTasks[0])},e}();!function t(n){n.TaskTrackingZoneSpec=e}(Zone)}));
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT

@@ -12,22 +12,10 @@ */

'use strict';
Zone.__load_patch('mediaQuery', function (global, Zone, api) {
function patchAddListener(proto) {
api.patchMethod(proto, 'addListener', function (delegate) { return function (self, args) {
var callback = args.length > 0 ? args[0] : null;
if (typeof callback === 'function') {
var wrapperedCallback = Zone.current.wrap(callback, 'MediaQuery');
callback[api.symbol('mediaQueryCallback')] = wrapperedCallback;
return delegate.call(self, wrapperedCallback);
}
else {
return delegate.apply(self, args);
}
}; });
}
function patchRemoveListener(proto) {
api.patchMethod(proto, 'removeListener', function (delegate) { return function (self, args) {
var callback = args.length > 0 ? args[0] : null;
if (typeof callback === 'function') {
var wrapperedCallback = callback[api.symbol('mediaQueryCallback')];
if (wrapperedCallback) {
function patchMediaQuery(Zone) {
Zone.__load_patch('mediaQuery', function (global, Zone, api) {
function patchAddListener(proto) {
api.patchMethod(proto, 'addListener', function (delegate) { return function (self, args) {
var callback = args.length > 0 ? args[0] : null;
if (typeof callback === 'function') {
var wrapperedCallback = Zone.current.wrap(callback, 'MediaQuery');
callback[api.symbol('mediaQueryCallback')] = wrapperedCallback;
return delegate.call(self, wrapperedCallback);

@@ -38,38 +26,53 @@ }

}
}
else {
return delegate.apply(self, args);
}
}; });
}
if (global['MediaQueryList']) {
var proto = global['MediaQueryList'].prototype;
patchAddListener(proto);
patchRemoveListener(proto);
}
else if (global['matchMedia']) {
api.patchMethod(global, 'matchMedia', function (delegate) { return function (self, args) {
var mql = delegate.apply(self, args);
if (mql) {
// try to patch MediaQueryList.prototype
var proto = Object.getPrototypeOf(mql);
if (proto && proto['addListener']) {
// try to patch proto, don't need to worry about patch
// multiple times, because, api.patchEventTarget will check it
patchAddListener(proto);
patchRemoveListener(proto);
patchAddListener(mql);
patchRemoveListener(mql);
}; });
}
function patchRemoveListener(proto) {
api.patchMethod(proto, 'removeListener', function (delegate) { return function (self, args) {
var callback = args.length > 0 ? args[0] : null;
if (typeof callback === 'function') {
var wrapperedCallback = callback[api.symbol('mediaQueryCallback')];
if (wrapperedCallback) {
return delegate.call(self, wrapperedCallback);
}
else {
return delegate.apply(self, args);
}
}
else if (mql['addListener']) {
// proto not exists, or proto has no addListener method
// try to patch mql instance
patchAddListener(mql);
patchRemoveListener(mql);
else {
return delegate.apply(self, args);
}
}
return mql;
}; });
}
});
}; });
}
if (global['MediaQueryList']) {
var proto = global['MediaQueryList'].prototype;
patchAddListener(proto);
patchRemoveListener(proto);
}
else if (global['matchMedia']) {
api.patchMethod(global, 'matchMedia', function (delegate) { return function (self, args) {
var mql = delegate.apply(self, args);
if (mql) {
// try to patch MediaQueryList.prototype
var proto = Object.getPrototypeOf(mql);
if (proto && proto['addListener']) {
// try to patch proto, don't need to worry about patch
// multiple times, because, api.patchEventTarget will check it
patchAddListener(proto);
patchRemoveListener(proto);
patchAddListener(mql);
patchRemoveListener(mql);
}
else if (mql['addListener']) {
// proto not exists, or proto has no addListener method
// try to patch mql instance
patchAddListener(mql);
patchRemoveListener(mql);
}
}
return mql;
}; });
}
});
}
patchMediaQuery(Zone);
}));
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){Zone.__load_patch("mediaQuery",(function(e,t,n){function r(e){n.patchMethod(e,"addListener",(function(e){return function(r,a){var i=a.length>0?a[0]:null;if("function"==typeof i){var u=t.current.wrap(i,"MediaQuery");return i[n.symbol("mediaQueryCallback")]=u,e.call(r,u)}return e.apply(r,a)}}))}function a(e){n.patchMethod(e,"removeListener",(function(e){return function(t,r){var a=r.length>0?r[0]:null;if("function"==typeof a){var i=a[n.symbol("mediaQueryCallback")];return i?e.call(t,i):e.apply(t,r)}return e.apply(t,r)}}))}if(e.MediaQueryList){var i=e.MediaQueryList.prototype;r(i),a(i)}else e.matchMedia&&n.patchMethod(e,"matchMedia",(function(e){return function(t,n){var i=e.apply(t,n);if(i){var u=Object.getPrototypeOf(i);u&&u.addListener?(r(u),a(u),r(i),a(i)):i.addListener&&(r(i),a(i))}return i}}))}))}));
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){!function e(t){t.__load_patch("mediaQuery",(function(e,t,n){function r(e){n.patchMethod(e,"addListener",(function(e){return function(r,a){var i=a.length>0?a[0]:null;if("function"==typeof i){var u=t.current.wrap(i,"MediaQuery");return i[n.symbol("mediaQueryCallback")]=u,e.call(r,u)}return e.apply(r,a)}}))}function a(e){n.patchMethod(e,"removeListener",(function(e){return function(t,r){var a=r.length>0?r[0]:null;if("function"==typeof a){var i=a[n.symbol("mediaQueryCallback")];return i?e.call(t,i):e.apply(t,r)}return e.apply(t,r)}}))}if(e.MediaQueryList){var i=e.MediaQueryList.prototype;r(i),a(i)}else e.matchMedia&&n.patchMethod(e,"matchMedia",(function(e){return function(t,n){var i=e.apply(t,n);if(i){var u=Object.getPrototypeOf(i);u&&u.addListener?(r(u),a(u),r(i),a(i)):i.addListener&&(r(i),a(i))}return i}}))}))}(Zone)}));
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT

@@ -12,13 +12,16 @@ */

'use strict';
Zone.__load_patch('notification', function (global, Zone, api) {
var Notification = global['Notification'];
if (!Notification || !Notification.prototype) {
return;
}
var desc = Object.getOwnPropertyDescriptor(Notification.prototype, 'onerror');
if (!desc || !desc.configurable) {
return;
}
api.patchOnProperties(Notification.prototype, null);
});
function patchNotifications(Zone) {
Zone.__load_patch('notification', function (global, Zone, api) {
var Notification = global['Notification'];
if (!Notification || !Notification.prototype) {
return;
}
var desc = Object.getOwnPropertyDescriptor(Notification.prototype, 'onerror');
if (!desc || !desc.configurable) {
return;
}
api.patchOnProperties(Notification.prototype, null);
});
}
patchNotifications(Zone);
}));
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){Zone.__load_patch("notification",(function(t,o,e){var n=t.Notification;if(n&&n.prototype){var i=Object.getOwnPropertyDescriptor(n.prototype,"onerror");i&&i.configurable&&e.patchOnProperties(n.prototype,null)}}))}));
*/!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){!function t(o){o.__load_patch("notification",(function(t,o,n){var e=t.Notification;if(e&&e.prototype){var i=Object.getOwnPropertyDescriptor(e.prototype,"onerror");i&&i.configurable&&n.patchOnProperties(e.prototype,null)}}))}(Zone)}));
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT

@@ -12,17 +12,20 @@ */

'use strict';
Zone.__load_patch('RTCPeerConnection', function (global, Zone, api) {
var RTCPeerConnection = global['RTCPeerConnection'];
if (!RTCPeerConnection) {
return;
}
var addSymbol = api.symbol('addEventListener');
var removeSymbol = api.symbol('removeEventListener');
RTCPeerConnection.prototype.addEventListener = RTCPeerConnection.prototype[addSymbol];
RTCPeerConnection.prototype.removeEventListener = RTCPeerConnection.prototype[removeSymbol];
// RTCPeerConnection extends EventTarget, so we must clear the symbol
// to allow patch RTCPeerConnection.prototype.addEventListener again
RTCPeerConnection.prototype[addSymbol] = null;
RTCPeerConnection.prototype[removeSymbol] = null;
api.patchEventTarget(global, api, [RTCPeerConnection.prototype], { useG: false });
});
function patchRtcPeerConnection(Zone) {
Zone.__load_patch('RTCPeerConnection', function (global, Zone, api) {
var RTCPeerConnection = global['RTCPeerConnection'];
if (!RTCPeerConnection) {
return;
}
var addSymbol = api.symbol('addEventListener');
var removeSymbol = api.symbol('removeEventListener');
RTCPeerConnection.prototype.addEventListener = RTCPeerConnection.prototype[addSymbol];
RTCPeerConnection.prototype.removeEventListener = RTCPeerConnection.prototype[removeSymbol];
// RTCPeerConnection extends EventTarget, so we must clear the symbol
// to allow patch RTCPeerConnection.prototype.addEventListener again
RTCPeerConnection.prototype[addSymbol] = null;
RTCPeerConnection.prototype[removeSymbol] = null;
api.patchEventTarget(global, api, [RTCPeerConnection.prototype], { useG: false });
});
}
patchRtcPeerConnection(Zone);
}));
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){Zone.__load_patch("RTCPeerConnection",(function(e,t,n){var o=e.RTCPeerConnection;if(o){var r=n.symbol("addEventListener"),p=n.symbol("removeEventListener");o.prototype.addEventListener=o.prototype[r],o.prototype.removeEventListener=o.prototype[p],o.prototype[r]=null,o.prototype[p]=null,n.patchEventTarget(e,n,[o.prototype],{useG:!1})}}))}));
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){!function e(t){t.__load_patch("RTCPeerConnection",(function(e,t,n){var o=e.RTCPeerConnection;if(o){var r=n.symbol("addEventListener"),p=n.symbol("removeEventListener");o.prototype.addEventListener=o.prototype[r],o.prototype.removeEventListener=o.prototype[p],o.prototype[r]=null,o.prototype[p]=null,n.patchEventTarget(e,n,[o.prototype],{useG:!1})}}))}(Zone)}));
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT

@@ -12,21 +12,29 @@ */

'use strict';
Zone.__load_patch('shadydom', function (global, Zone, api) {
// https://github.com/angular/zone.js/issues/782
// in web components, shadydom will patch addEventListener/removeEventListener of
// Node.prototype and WindowPrototype, this will have conflict with zone.js
// so zone.js need to patch them again.
var HTMLSlotElement = global.HTMLSlotElement;
var prototypes = [
Object.getPrototypeOf(window), Node.prototype, Text.prototype, Element.prototype,
HTMLElement.prototype, HTMLSlotElement && HTMLSlotElement.prototype, DocumentFragment.prototype,
Document.prototype
];
prototypes.forEach(function (proto) {
if (proto && proto.hasOwnProperty('addEventListener')) {
proto[Zone.__symbol__('addEventListener')] = null;
proto[Zone.__symbol__('removeEventListener')] = null;
api.patchEventTarget(global, api, [proto]);
}
function patchShadyDom(Zone) {
Zone.__load_patch('shadydom', function (global, Zone, api) {
// https://github.com/angular/zone.js/issues/782
// in web components, shadydom will patch addEventListener/removeEventListener of
// Node.prototype and WindowPrototype, this will have conflict with zone.js
// so zone.js need to patch them again.
var HTMLSlotElement = global.HTMLSlotElement;
var prototypes = [
Object.getPrototypeOf(window),
Node.prototype,
Text.prototype,
Element.prototype,
HTMLElement.prototype,
HTMLSlotElement && HTMLSlotElement.prototype,
DocumentFragment.prototype,
Document.prototype,
];
prototypes.forEach(function (proto) {
if (proto && proto.hasOwnProperty('addEventListener')) {
proto[Zone.__symbol__('addEventListener')] = null;
proto[Zone.__symbol__('removeEventListener')] = null;
api.patchEventTarget(global, api, [proto]);
}
});
});
});
}
patchShadyDom(Zone);
}));
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){Zone.__load_patch("shadydom",(function(t,e,o){var n=t.HTMLSlotElement;[Object.getPrototypeOf(window),Node.prototype,Text.prototype,Element.prototype,HTMLElement.prototype,n&&n.prototype,DocumentFragment.prototype,Document.prototype].forEach((function(n){n&&n.hasOwnProperty("addEventListener")&&(n[e.__symbol__("addEventListener")]=null,n[e.__symbol__("removeEventListener")]=null,o.patchEventTarget(t,o,[n]))}))}))}));
*/!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){!function t(e){e.__load_patch("shadydom",(function(t,e,o){var n=t.HTMLSlotElement;[Object.getPrototypeOf(window),Node.prototype,Text.prototype,Element.prototype,HTMLElement.prototype,n&&n.prototype,DocumentFragment.prototype,Document.prototype].forEach((function(n){n&&n.hasOwnProperty("addEventListener")&&(n[e.__symbol__("addEventListener")]=null,n[e.__symbol__("removeEventListener")]=null,o.patchEventTarget(t,o,[n]))}))}))}(Zone)}));
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT

@@ -16,3 +16,4 @@ */

*/
(function (global) {
var _global = (typeof window === 'object' && window) || (typeof self === 'object' && self) || global;
function patchWtf(Zone) {
var _a;

@@ -23,3 +24,3 @@ // Detect and setup WTF.

var wtfEnabled = (function () {
var wtf = global['wtf'];
var wtf = _global['wtf'];
if (wtf) {

@@ -47,4 +48,3 @@ wtfTrace = wtf.trace;

if (!scope) {
scope = _a.invokeScope[src] =
wtfEvents.createScope("Zone:invoke:".concat(source, "(ascii zone)"));
scope = _a.invokeScope[src] = wtfEvents.createScope("Zone:invoke:".concat(source, "(ascii zone)"));
}

@@ -60,4 +60,3 @@ return wtfTrace.leaveScope(scope(zonePathName(targetZone)), parentZoneDelegate.invoke(targetZone, delegate, applyThis, applyArgs, source));

if (!instance) {
instance = _a.scheduleInstance[key] =
wtfEvents.createInstance("Zone:schedule:".concat(key, "(ascii zone, any data)"));
instance = _a.scheduleInstance[key] = wtfEvents.createInstance("Zone:schedule:".concat(key, "(ascii zone, any data)"));
}

@@ -72,4 +71,3 @@ var retValue = parentZoneDelegate.scheduleTask(targetZone, task);

if (!scope) {
scope = _a.invokeTaskScope[source] =
wtfEvents.createScope("Zone:invokeTask:".concat(source, "(ascii zone)"));
scope = _a.invokeTaskScope[source] = wtfEvents.createScope("Zone:invokeTask:".concat(source, "(ascii zone)"));
}

@@ -82,4 +80,3 @@ return wtfTrace.leaveScope(scope(zonePathName(targetZone)), parentZoneDelegate.invokeTask(targetZone, task, applyThis, applyArgs));

if (!instance) {
instance = _a.cancelInstance[key] =
wtfEvents.createInstance("Zone:cancel:".concat(key, "(ascii zone, any options)"));
instance = _a.cancelInstance[key] = wtfEvents.createInstance("Zone:cancel:".concat(key, "(ascii zone, any options)"));
}

@@ -94,3 +91,5 @@ var retValue = parentZoneDelegate.cancelTask(targetZone, task);

(function () {
_a.forkInstance = wtfEnabled ? wtfEvents.createInstance('Zone:fork(ascii zone, ascii newZone)') : null;
_a.forkInstance = wtfEnabled
? wtfEvents.createInstance('Zone:fork(ascii zone, ascii newZone)')
: null;
})();

@@ -141,3 +140,4 @@ (function () {

Zone['wtfZoneSpec'] = !wtfEnabled ? null : new WtfZoneSpec();
})(typeof window === 'object' && window || typeof self === 'object' && self || global);
}
patchWtf(Zone);
}));
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/!function(n){"function"==typeof define&&define.amd?define(n):n()}((function(){!function(n){var e,o,c=null,t=null,a=!(!(o=n.wtf)||!(c=o.trace)||(t=c.events,0)),r=function(){function n(){this.name="WTF"}return n.prototype.onFork=function(n,o,c,t){var a=n.fork(c,t);return e.forkInstance(s(c),a.name),a},n.prototype.onInvoke=function(n,o,a,r,i,u,f){var l=f||"unknown",p=e.invokeScope[l];return p||(p=e.invokeScope[l]=t.createScope("Zone:invoke:".concat(f,"(ascii zone)"))),c.leaveScope(p(s(a)),n.invoke(a,r,i,u,f))},n.prototype.onHandleError=function(n,e,o,c){return n.handleError(o,c)},n.prototype.onScheduleTask=function(n,o,c,a){var r=a.type+":"+a.source,u=e.scheduleInstance[r];u||(u=e.scheduleInstance[r]=t.createInstance("Zone:schedule:".concat(r,"(ascii zone, any data)")));var f=n.scheduleTask(c,a);return u(s(c),i(a.data,2)),f},n.prototype.onInvokeTask=function(n,o,a,r,i,u){var f=r.source,l=e.invokeTaskScope[f];return l||(l=e.invokeTaskScope[f]=t.createScope("Zone:invokeTask:".concat(f,"(ascii zone)"))),c.leaveScope(l(s(a)),n.invokeTask(a,r,i,u))},n.prototype.onCancelTask=function(n,o,c,a){var r=a.source,u=e.cancelInstance[r];u||(u=e.cancelInstance[r]=t.createInstance("Zone:cancel:".concat(r,"(ascii zone, any options)")));var f=n.cancelTask(c,a);return u(s(c),i(a.data,2)),f},n}();function i(n,e){if(!n||!e)return null;var o={};for(var c in n)if(n.hasOwnProperty(c)){var t=n[c];switch(typeof t){case"object":var a=t&&t.constructor&&t.constructor.name;t=a==Object.name?i(t,e-1):a;break;case"function":t=t.name||void 0}o[c]=t}return o}function s(n){for(var e=n.name,o=n.parent;null!=o;)e=o.name+"::"+e,o=o.parent;return e}(e=r).forkInstance=a?t.createInstance("Zone:fork(ascii zone, ascii newZone)"):null,e.scheduleInstance={},e.cancelInstance={},e.invokeScope={},e.invokeTaskScope={},Zone.wtfZoneSpec=a?new r:null}("object"==typeof window&&window||"object"==typeof self&&self||global)}));
*/!function(n){"function"==typeof define&&define.amd?define(n):n()}((function(){var n="object"==typeof window&&window||"object"==typeof self&&self||global;!function e(o){var c,t,a=null,r=null,i=!(!(t=n.wtf)||!(a=t.trace)||(r=a.events,0)),s=function(){function n(){this.name="WTF"}return n.prototype.onFork=function(n,e,o,t){var a=n.fork(o,t);return c.forkInstance(f(o),a.name),a},n.prototype.onInvoke=function(n,e,o,t,i,s,u){var l=u||"unknown",p=c.invokeScope[l];return p||(p=c.invokeScope[l]=r.createScope("Zone:invoke:".concat(u,"(ascii zone)"))),a.leaveScope(p(f(o)),n.invoke(o,t,i,s,u))},n.prototype.onHandleError=function(n,e,o,c){return n.handleError(o,c)},n.prototype.onScheduleTask=function(n,e,o,t){var a=t.type+":"+t.source,i=c.scheduleInstance[a];i||(i=c.scheduleInstance[a]=r.createInstance("Zone:schedule:".concat(a,"(ascii zone, any data)")));var s=n.scheduleTask(o,t);return i(f(o),u(t.data,2)),s},n.prototype.onInvokeTask=function(n,e,o,t,i,s){var u=t.source,l=c.invokeTaskScope[u];return l||(l=c.invokeTaskScope[u]=r.createScope("Zone:invokeTask:".concat(u,"(ascii zone)"))),a.leaveScope(l(f(o)),n.invokeTask(o,t,i,s))},n.prototype.onCancelTask=function(n,e,o,t){var a=t.source,i=c.cancelInstance[a];i||(i=c.cancelInstance[a]=r.createInstance("Zone:cancel:".concat(a,"(ascii zone, any options)")));var s=n.cancelTask(o,t);return i(f(o),u(t.data,2)),s},n}();function u(n,e){if(!n||!e)return null;var o={};for(var c in n)if(n.hasOwnProperty(c)){var t=n[c];switch(typeof t){case"object":var a=t&&t.constructor&&t.constructor.name;t=a==Object.name?u(t,e-1):a;break;case"function":t=t.name||void 0}o[c]=t}return o}function f(n){for(var e=n.name,o=n.parent;null!=o;)e=o.name+"::"+e,o=o.parent;return e}(c=s).forkInstance=i?r.createInstance("Zone:fork(ascii zone, ascii newZone)"):null,c.scheduleInstance={},c.cancelInstance={},c.invokeScope={},c.invokeTaskScope={},o.wtfZoneSpec=i?new s:null}(Zone)}));
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT

@@ -12,82 +12,85 @@ */

'use strict';
Zone.__load_patch('bluebird', function (global, Zone, api) {
// TODO: @JiaLiPassion, we can automatically patch bluebird
// if global.Promise = Bluebird, but sometimes in nodejs,
// global.Promise is not Bluebird, and Bluebird is just be
// used by other libraries such as sequelize, so I think it is
// safe to just expose a method to patch Bluebird explicitly
var BLUEBIRD = 'bluebird';
Zone[Zone.__symbol__(BLUEBIRD)] = function patchBluebird(Bluebird) {
// patch method of Bluebird.prototype which not using `then` internally
var bluebirdApis = ['then', 'spread', 'finally'];
bluebirdApis.forEach(function (bapi) {
api.patchMethod(Bluebird.prototype, bapi, function (delegate) { return function (self, args) {
var zone = Zone.current;
var _loop_1 = function (i) {
var func = args[i];
if (typeof func === 'function') {
args[i] = function () {
var argSelf = this;
var argArgs = arguments;
return new Bluebird(function (res, rej) {
zone.scheduleMicroTask('Promise.then', function () {
try {
res(func.apply(argSelf, argArgs));
}
catch (error) {
rej(error);
}
function patchBluebird(Zone) {
Zone.__load_patch('bluebird', function (global, Zone, api) {
// TODO: @JiaLiPassion, we can automatically patch bluebird
// if global.Promise = Bluebird, but sometimes in nodejs,
// global.Promise is not Bluebird, and Bluebird is just be
// used by other libraries such as sequelize, so I think it is
// safe to just expose a method to patch Bluebird explicitly
var BLUEBIRD = 'bluebird';
Zone[Zone.__symbol__(BLUEBIRD)] = function patchBluebird(Bluebird) {
// patch method of Bluebird.prototype which not using `then` internally
var bluebirdApis = ['then', 'spread', 'finally'];
bluebirdApis.forEach(function (bapi) {
api.patchMethod(Bluebird.prototype, bapi, function (delegate) { return function (self, args) {
var zone = Zone.current;
var _loop_1 = function (i) {
var func = args[i];
if (typeof func === 'function') {
args[i] = function () {
var argSelf = this;
var argArgs = arguments;
return new Bluebird(function (res, rej) {
zone.scheduleMicroTask('Promise.then', function () {
try {
res(func.apply(argSelf, argArgs));
}
catch (error) {
rej(error);
}
});
});
});
};
};
}
};
for (var i = 0; i < args.length; i++) {
_loop_1(i);
}
};
for (var i = 0; i < args.length; i++) {
_loop_1(i);
}
return delegate.apply(self, args);
}; });
});
if (typeof window !== 'undefined') {
window.addEventListener('unhandledrejection', function (event) {
var error = event.detail && event.detail.reason;
if (error && error.isHandledByZone) {
event.preventDefault();
if (typeof event.stopImmediatePropagation === 'function') {
event.stopImmediatePropagation();
}
}
return delegate.apply(self, args);
}; });
});
}
else if (typeof process !== 'undefined') {
process.on('unhandledRejection', function (reason, p) {
if (reason && reason.isHandledByZone) {
var listeners_1 = process.listeners('unhandledRejection');
if (listeners_1) {
// remove unhandledRejection listeners so the callback
// will not be triggered.
process.removeAllListeners('unhandledRejection');
process.nextTick(function () {
listeners_1.forEach(function (listener) { return process.on('unhandledRejection', listener); });
});
if (typeof window !== 'undefined') {
window.addEventListener('unhandledrejection', function (event) {
var error = event.detail && event.detail.reason;
if (error && error.isHandledByZone) {
event.preventDefault();
if (typeof event.stopImmediatePropagation === 'function') {
event.stopImmediatePropagation();
}
}
}
});
}
Bluebird.onPossiblyUnhandledRejection(function (e, promise) {
try {
Zone.current.runGuarded(function () {
e.isHandledByZone = true;
throw e;
});
}
catch (err) {
err.isHandledByZone = false;
api.onUnhandledError(err);
else if (typeof process !== 'undefined') {
process.on('unhandledRejection', function (reason, p) {
if (reason && reason.isHandledByZone) {
var listeners_1 = process.listeners('unhandledRejection');
if (listeners_1) {
// remove unhandledRejection listeners so the callback
// will not be triggered.
process.removeAllListeners('unhandledRejection');
process.nextTick(function () {
listeners_1.forEach(function (listener) { return process.on('unhandledRejection', listener); });
});
}
}
});
}
});
// override global promise
global.Promise = Bluebird;
};
});
Bluebird.onPossiblyUnhandledRejection(function (e, promise) {
try {
Zone.current.runGuarded(function () {
e.isHandledByZone = true;
throw e;
});
}
catch (err) {
err.isHandledByZone = false;
api.onUnhandledError(err);
}
});
// override global promise
global.Promise = Bluebird;
};
});
}
patchBluebird(Zone);
}));
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/!function(n){"function"==typeof define&&define.amd?define(n):n()}((function(){Zone.__load_patch("bluebird",(function(n,e,o){e[e.__symbol__("bluebird")]=function t(i){["then","spread","finally"].forEach((function(n){o.patchMethod(i.prototype,n,(function(n){return function(o,t){for(var r=e.current,c=function(n){var e=t[n];"function"==typeof e&&(t[n]=function(){var n=this,o=arguments;return new i((function(t,i){r.scheduleMicroTask("Promise.then",(function(){try{t(e.apply(n,o))}catch(n){i(n)}}))}))})},d=0;d<t.length;d++)c(d);return n.apply(o,t)}}))})),"undefined"!=typeof window?window.addEventListener("unhandledrejection",(function(n){var e=n.detail&&n.detail.reason;e&&e.isHandledByZone&&(n.preventDefault(),"function"==typeof n.stopImmediatePropagation&&n.stopImmediatePropagation())})):"undefined"!=typeof process&&process.on("unhandledRejection",(function(n,e){if(n&&n.isHandledByZone){var o=process.listeners("unhandledRejection");o&&(process.removeAllListeners("unhandledRejection"),process.nextTick((function(){o.forEach((function(n){return process.on("unhandledRejection",n)}))})))}})),i.onPossiblyUnhandledRejection((function(n,t){try{e.current.runGuarded((function(){throw n.isHandledByZone=!0,n}))}catch(n){n.isHandledByZone=!1,o.onUnhandledError(n)}})),n.Promise=i}}))}));
*/!function(n){"function"==typeof define&&define.amd?define(n):n()}((function(){!function n(e){e.__load_patch("bluebird",(function(n,e,o){e[e.__symbol__("bluebird")]=function t(i){["then","spread","finally"].forEach((function(n){o.patchMethod(i.prototype,n,(function(n){return function(o,t){for(var r=e.current,c=function(n){var e=t[n];"function"==typeof e&&(t[n]=function(){var n=this,o=arguments;return new i((function(t,i){r.scheduleMicroTask("Promise.then",(function(){try{t(e.apply(n,o))}catch(n){i(n)}}))}))})},d=0;d<t.length;d++)c(d);return n.apply(o,t)}}))})),"undefined"!=typeof window?window.addEventListener("unhandledrejection",(function(n){var e=n.detail&&n.detail.reason;e&&e.isHandledByZone&&(n.preventDefault(),"function"==typeof n.stopImmediatePropagation&&n.stopImmediatePropagation())})):"undefined"!=typeof process&&process.on("unhandledRejection",(function(n,e){if(n&&n.isHandledByZone){var o=process.listeners("unhandledRejection");o&&(process.removeAllListeners("unhandledRejection"),process.nextTick((function(){o.forEach((function(n){return process.on("unhandledRejection",n)}))})))}})),i.onPossiblyUnhandledRejection((function(n,t){try{e.current.runGuarded((function(){throw n.isHandledByZone=!0,n}))}catch(n){n.isHandledByZone=!1,o.onUnhandledError(n)}})),n.Promise=i}}))}(Zone)}));
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT

@@ -16,312 +16,322 @@ */

*/
Zone.__load_patch('Error', function (global, Zone, api) {
/*
* This code patches Error so that:
* - It ignores un-needed stack frames.
* - It Shows the associated Zone for reach frame.
*/
var zoneJsInternalStackFramesSymbol = api.symbol('zoneJsInternalStackFrames');
var NativeError = global[api.symbol('Error')] = global['Error'];
// Store the frames which should be removed from the stack frames
var zoneJsInternalStackFrames = {};
// We must find the frame where Error was created, otherwise we assume we don't understand stack
var zoneAwareFrame1;
var zoneAwareFrame2;
var zoneAwareFrame1WithoutNew;
var zoneAwareFrame2WithoutNew;
var zoneAwareFrame3WithoutNew;
global['Error'] = ZoneAwareError;
var stackRewrite = 'stackRewrite';
var zoneJsInternalStackFramesPolicy = global['__Zone_Error_BlacklistedStackFrames_policy'] ||
global['__Zone_Error_ZoneJsInternalStackFrames_policy'] || 'default';
function buildZoneFrameNames(zoneFrame) {
var zoneFrameName = { zoneName: zoneFrame.zone.name };
var result = zoneFrameName;
while (zoneFrame.parent) {
zoneFrame = zoneFrame.parent;
var parentZoneFrameName = { zoneName: zoneFrame.zone.name };
zoneFrameName.parent = parentZoneFrameName;
zoneFrameName = parentZoneFrameName;
}
return result;
}
function buildZoneAwareStackFrames(originalStack, zoneFrame, isZoneFrame) {
if (isZoneFrame === void 0) { isZoneFrame = true; }
var frames = originalStack.split('\n');
var i = 0;
// Find the first frame
while (!(frames[i] === zoneAwareFrame1 || frames[i] === zoneAwareFrame2 ||
frames[i] === zoneAwareFrame1WithoutNew || frames[i] === zoneAwareFrame2WithoutNew ||
frames[i] === zoneAwareFrame3WithoutNew) &&
i < frames.length) {
i++;
}
for (; i < frames.length && zoneFrame; i++) {
var frame = frames[i];
if (frame.trim()) {
switch (zoneJsInternalStackFrames[frame]) {
case 0 /* FrameType.zoneJsInternal */:
frames.splice(i, 1);
i--;
break;
case 1 /* FrameType.transition */:
if (zoneFrame.parent) {
// This is the special frame where zone changed. Print and process it accordingly
zoneFrame = zoneFrame.parent;
}
else {
zoneFrame = null;
}
frames.splice(i, 1);
i--;
break;
default:
frames[i] += isZoneFrame ? " [".concat(zoneFrame.zone.name, "]") :
" [".concat(zoneFrame.zoneName, "]");
}
function patchError(Zone) {
Zone.__load_patch('Error', function (global, Zone, api) {
/*
* This code patches Error so that:
* - It ignores un-needed stack frames.
* - It Shows the associated Zone for reach frame.
*/
var zoneJsInternalStackFramesSymbol = api.symbol('zoneJsInternalStackFrames');
var NativeError = (global[api.symbol('Error')] = global['Error']);
// Store the frames which should be removed from the stack frames
var zoneJsInternalStackFrames = {};
// We must find the frame where Error was created, otherwise we assume we don't understand stack
var zoneAwareFrame1;
var zoneAwareFrame2;
var zoneAwareFrame1WithoutNew;
var zoneAwareFrame2WithoutNew;
var zoneAwareFrame3WithoutNew;
global['Error'] = ZoneAwareError;
var stackRewrite = 'stackRewrite';
var zoneJsInternalStackFramesPolicy = global['__Zone_Error_BlacklistedStackFrames_policy'] ||
global['__Zone_Error_ZoneJsInternalStackFrames_policy'] ||
'default';
function buildZoneFrameNames(zoneFrame) {
var zoneFrameName = { zoneName: zoneFrame.zone.name };
var result = zoneFrameName;
while (zoneFrame.parent) {
zoneFrame = zoneFrame.parent;
var parentZoneFrameName = { zoneName: zoneFrame.zone.name };
zoneFrameName.parent = parentZoneFrameName;
zoneFrameName = parentZoneFrameName;
}
return result;
}
return frames.join('\n');
}
/**
* This is ZoneAwareError which processes the stack frame and cleans up extra frames as well as
* adds zone information to it.
*/
function ZoneAwareError() {
var _this = this;
// We always have to return native error otherwise the browser console will not work.
var error = NativeError.apply(this, arguments);
// Save original stack trace
var originalStack = error['originalStack'] = error.stack;
// Process the stack trace and rewrite the frames.
if (ZoneAwareError[stackRewrite] && originalStack) {
var zoneFrame = api.currentZoneFrame();
if (zoneJsInternalStackFramesPolicy === 'lazy') {
// don't handle stack trace now
error[api.symbol('zoneFrameNames')] = buildZoneFrameNames(zoneFrame);
function buildZoneAwareStackFrames(originalStack, zoneFrame, isZoneFrame) {
if (isZoneFrame === void 0) { isZoneFrame = true; }
var frames = originalStack.split('\n');
var i = 0;
// Find the first frame
while (!(frames[i] === zoneAwareFrame1 ||
frames[i] === zoneAwareFrame2 ||
frames[i] === zoneAwareFrame1WithoutNew ||
frames[i] === zoneAwareFrame2WithoutNew ||
frames[i] === zoneAwareFrame3WithoutNew) &&
i < frames.length) {
i++;
}
else if (zoneJsInternalStackFramesPolicy === 'default') {
try {
error.stack = error.zoneAwareStack = buildZoneAwareStackFrames(originalStack, zoneFrame);
for (; i < frames.length && zoneFrame; i++) {
var frame = frames[i];
if (frame.trim()) {
switch (zoneJsInternalStackFrames[frame]) {
case 0 /* FrameType.zoneJsInternal */:
frames.splice(i, 1);
i--;
break;
case 1 /* FrameType.transition */:
if (zoneFrame.parent) {
// This is the special frame where zone changed. Print and process it accordingly
zoneFrame = zoneFrame.parent;
}
else {
zoneFrame = null;
}
frames.splice(i, 1);
i--;
break;
default:
frames[i] += isZoneFrame
? " [".concat(zoneFrame.zone.name, "]")
: " [".concat(zoneFrame.zoneName, "]");
}
}
catch (e) {
// ignore as some browsers don't allow overriding of stack
}
}
return frames.join('\n');
}
if (this instanceof NativeError && this.constructor != NativeError) {
// We got called with a `new` operator AND we are subclass of ZoneAwareError
// in that case we have to copy all of our properties to `this`.
Object.keys(error).concat('stack', 'message').forEach(function (key) {
var value = error[key];
if (value !== undefined) {
/**
* This is ZoneAwareError which processes the stack frame and cleans up extra frames as well as
* adds zone information to it.
*/
function ZoneAwareError() {
var _this = this;
// We always have to return native error otherwise the browser console will not work.
var error = NativeError.apply(this, arguments);
// Save original stack trace
var originalStack = (error['originalStack'] = error.stack);
// Process the stack trace and rewrite the frames.
if (ZoneAwareError[stackRewrite] && originalStack) {
var zoneFrame = api.currentZoneFrame();
if (zoneJsInternalStackFramesPolicy === 'lazy') {
// don't handle stack trace now
error[api.symbol('zoneFrameNames')] = buildZoneFrameNames(zoneFrame);
}
else if (zoneJsInternalStackFramesPolicy === 'default') {
try {
_this[key] = value;
error.stack = error.zoneAwareStack = buildZoneAwareStackFrames(originalStack, zoneFrame);
}
catch (e) {
// ignore the assignment in case it is a setter and it throws.
// ignore as some browsers don't allow overriding of stack
}
}
});
return this;
}
return error;
}
// Copy the prototype so that instanceof operator works as expected
ZoneAwareError.prototype = NativeError.prototype;
ZoneAwareError[zoneJsInternalStackFramesSymbol] = zoneJsInternalStackFrames;
ZoneAwareError[stackRewrite] = false;
var zoneAwareStackSymbol = api.symbol('zoneAwareStack');
// try to define zoneAwareStack property when zoneJsInternal frames policy is delay
if (zoneJsInternalStackFramesPolicy === 'lazy') {
Object.defineProperty(ZoneAwareError.prototype, 'zoneAwareStack', {
configurable: true,
enumerable: true,
get: function () {
if (!this[zoneAwareStackSymbol]) {
this[zoneAwareStackSymbol] = buildZoneAwareStackFrames(this.originalStack, this[api.symbol('zoneFrameNames')], false);
}
return this[zoneAwareStackSymbol];
},
set: function (newStack) {
this.originalStack = newStack;
this[zoneAwareStackSymbol] = buildZoneAwareStackFrames(this.originalStack, this[api.symbol('zoneFrameNames')], false);
}
});
}
// those properties need special handling
var specialPropertyNames = ['stackTraceLimit', 'captureStackTrace', 'prepareStackTrace'];
// those properties of NativeError should be set to ZoneAwareError
var nativeErrorProperties = Object.keys(NativeError);
if (nativeErrorProperties) {
nativeErrorProperties.forEach(function (prop) {
if (specialPropertyNames.filter(function (sp) { return sp === prop; }).length === 0) {
Object.defineProperty(ZoneAwareError, prop, {
get: function () {
return NativeError[prop];
},
set: function (value) {
NativeError[prop] = value;
if (this instanceof NativeError && this.constructor != NativeError) {
// We got called with a `new` operator AND we are subclass of ZoneAwareError
// in that case we have to copy all of our properties to `this`.
Object.keys(error)
.concat('stack', 'message')
.forEach(function (key) {
var value = error[key];
if (value !== undefined) {
try {
_this[key] = value;
}
catch (e) {
// ignore the assignment in case it is a setter and it throws.
}
}
});
return this;
}
});
}
if (NativeError.hasOwnProperty('stackTraceLimit')) {
// Extend default stack limit as we will be removing few frames.
NativeError.stackTraceLimit = Math.max(NativeError.stackTraceLimit, 15);
// make sure that ZoneAwareError has the same property which forwards to NativeError.
Object.defineProperty(ZoneAwareError, 'stackTraceLimit', {
return error;
}
// Copy the prototype so that instanceof operator works as expected
ZoneAwareError.prototype = NativeError.prototype;
ZoneAwareError[zoneJsInternalStackFramesSymbol] = zoneJsInternalStackFrames;
ZoneAwareError[stackRewrite] = false;
var zoneAwareStackSymbol = api.symbol('zoneAwareStack');
// try to define zoneAwareStack property when zoneJsInternal frames policy is delay
if (zoneJsInternalStackFramesPolicy === 'lazy') {
Object.defineProperty(ZoneAwareError.prototype, 'zoneAwareStack', {
configurable: true,
enumerable: true,
get: function () {
if (!this[zoneAwareStackSymbol]) {
this[zoneAwareStackSymbol] = buildZoneAwareStackFrames(this.originalStack, this[api.symbol('zoneFrameNames')], false);
}
return this[zoneAwareStackSymbol];
},
set: function (newStack) {
this.originalStack = newStack;
this[zoneAwareStackSymbol] = buildZoneAwareStackFrames(this.originalStack, this[api.symbol('zoneFrameNames')], false);
},
});
}
// those properties need special handling
var specialPropertyNames = ['stackTraceLimit', 'captureStackTrace', 'prepareStackTrace'];
// those properties of NativeError should be set to ZoneAwareError
var nativeErrorProperties = Object.keys(NativeError);
if (nativeErrorProperties) {
nativeErrorProperties.forEach(function (prop) {
if (specialPropertyNames.filter(function (sp) { return sp === prop; }).length === 0) {
Object.defineProperty(ZoneAwareError, prop, {
get: function () {
return NativeError[prop];
},
set: function (value) {
NativeError[prop] = value;
},
});
}
});
}
if (NativeError.hasOwnProperty('stackTraceLimit')) {
// Extend default stack limit as we will be removing few frames.
NativeError.stackTraceLimit = Math.max(NativeError.stackTraceLimit, 15);
// make sure that ZoneAwareError has the same property which forwards to NativeError.
Object.defineProperty(ZoneAwareError, 'stackTraceLimit', {
get: function () {
return NativeError.stackTraceLimit;
},
set: function (value) {
return (NativeError.stackTraceLimit = value);
},
});
}
if (NativeError.hasOwnProperty('captureStackTrace')) {
Object.defineProperty(ZoneAwareError, 'captureStackTrace', {
// add named function here because we need to remove this
// stack frame when prepareStackTrace below
value: function zoneCaptureStackTrace(targetObject, constructorOpt) {
NativeError.captureStackTrace(targetObject, constructorOpt);
},
});
}
var ZONE_CAPTURESTACKTRACE = 'zoneCaptureStackTrace';
Object.defineProperty(ZoneAwareError, 'prepareStackTrace', {
get: function () {
return NativeError.stackTraceLimit;
return NativeError.prepareStackTrace;
},
set: function (value) {
return NativeError.stackTraceLimit = value;
}
});
}
if (NativeError.hasOwnProperty('captureStackTrace')) {
Object.defineProperty(ZoneAwareError, 'captureStackTrace', {
// add named function here because we need to remove this
// stack frame when prepareStackTrace below
value: function zoneCaptureStackTrace(targetObject, constructorOpt) {
NativeError.captureStackTrace(targetObject, constructorOpt);
}
});
}
var ZONE_CAPTURESTACKTRACE = 'zoneCaptureStackTrace';
Object.defineProperty(ZoneAwareError, 'prepareStackTrace', {
get: function () {
return NativeError.prepareStackTrace;
},
set: function (value) {
if (!value || typeof value !== 'function') {
return NativeError.prepareStackTrace = value;
}
return NativeError.prepareStackTrace = function (error, structuredStackTrace) {
// remove additional stack information from ZoneAwareError.captureStackTrace
if (structuredStackTrace) {
for (var i = 0; i < structuredStackTrace.length; i++) {
var st = structuredStackTrace[i];
// remove the first function which name is zoneCaptureStackTrace
if (st.getFunctionName() === ZONE_CAPTURESTACKTRACE) {
structuredStackTrace.splice(i, 1);
break;
if (!value || typeof value !== 'function') {
return (NativeError.prepareStackTrace = value);
}
return (NativeError.prepareStackTrace = function (error, structuredStackTrace) {
// remove additional stack information from ZoneAwareError.captureStackTrace
if (structuredStackTrace) {
for (var i = 0; i < structuredStackTrace.length; i++) {
var st = structuredStackTrace[i];
// remove the first function which name is zoneCaptureStackTrace
if (st.getFunctionName() === ZONE_CAPTURESTACKTRACE) {
structuredStackTrace.splice(i, 1);
break;
}
}
}
}
return value.call(this, error, structuredStackTrace);
};
return value.call(this, error, structuredStackTrace);
});
},
});
if (zoneJsInternalStackFramesPolicy === 'disable') {
// don't need to run detectZone to populate zoneJs internal stack frames
return;
}
});
if (zoneJsInternalStackFramesPolicy === 'disable') {
// don't need to run detectZone to populate zoneJs internal stack frames
return;
}
// Now we need to populate the `zoneJsInternalStackFrames` as well as find the
// run/runGuarded/runTask frames. This is done by creating a detect zone and then threading
// the execution through all of the above methods so that we can look at the stack trace and
// find the frames of interest.
var detectZone = Zone.current.fork({
name: 'detect',
onHandleError: function (parentZD, current, target, error) {
if (error.originalStack && Error === ZoneAwareError) {
var frames_1 = error.originalStack.split(/\n/);
var runFrame = false, runGuardedFrame = false, runTaskFrame = false;
while (frames_1.length) {
var frame = frames_1.shift();
// On safari it is possible to have stack frame with no line number.
// This check makes sure that we don't filter frames on name only (must have
// line number or exact equals to `ZoneAwareError`)
if (/:\d+:\d+/.test(frame) || frame === 'ZoneAwareError') {
// Get rid of the path so that we don't accidentally find function name in path.
// In chrome the separator is `(` and `@` in FF and safari
// Chrome: at Zone.run (zone.js:100)
// Chrome: at Zone.run (http://localhost:9876/base/build/lib/zone.js:100:24)
// FireFox: Zone.prototype.run@http://localhost:9876/base/build/lib/zone.js:101:24
// Safari: run@http://localhost:9876/base/build/lib/zone.js:101:24
var fnName = frame.split('(')[0].split('@')[0];
var frameType = 1 /* FrameType.transition */;
if (fnName.indexOf('ZoneAwareError') !== -1) {
if (fnName.indexOf('new ZoneAwareError') !== -1) {
zoneAwareFrame1 = frame;
zoneAwareFrame2 = frame.replace('new ZoneAwareError', 'new Error.ZoneAwareError');
// Now we need to populate the `zoneJsInternalStackFrames` as well as find the
// run/runGuarded/runTask frames. This is done by creating a detect zone and then threading
// the execution through all of the above methods so that we can look at the stack trace and
// find the frames of interest.
var detectZone = Zone.current.fork({
name: 'detect',
onHandleError: function (parentZD, current, target, error) {
if (error.originalStack && Error === ZoneAwareError) {
var frames_1 = error.originalStack.split(/\n/);
var runFrame = false, runGuardedFrame = false, runTaskFrame = false;
while (frames_1.length) {
var frame = frames_1.shift();
// On safari it is possible to have stack frame with no line number.
// This check makes sure that we don't filter frames on name only (must have
// line number or exact equals to `ZoneAwareError`)
if (/:\d+:\d+/.test(frame) || frame === 'ZoneAwareError') {
// Get rid of the path so that we don't accidentally find function name in path.
// In chrome the separator is `(` and `@` in FF and safari
// Chrome: at Zone.run (zone.js:100)
// Chrome: at Zone.run (http://localhost:9876/base/build/lib/zone.js:100:24)
// FireFox: Zone.prototype.run@http://localhost:9876/base/build/lib/zone.js:101:24
// Safari: run@http://localhost:9876/base/build/lib/zone.js:101:24
var fnName = frame.split('(')[0].split('@')[0];
var frameType = 1 /* FrameType.transition */;
if (fnName.indexOf('ZoneAwareError') !== -1) {
if (fnName.indexOf('new ZoneAwareError') !== -1) {
zoneAwareFrame1 = frame;
zoneAwareFrame2 = frame.replace('new ZoneAwareError', 'new Error.ZoneAwareError');
}
else {
zoneAwareFrame1WithoutNew = frame;
zoneAwareFrame2WithoutNew = frame.replace('Error.', '');
if (frame.indexOf('Error.ZoneAwareError') === -1) {
zoneAwareFrame3WithoutNew = frame.replace('ZoneAwareError', 'Error.ZoneAwareError');
}
}
zoneJsInternalStackFrames[zoneAwareFrame2] = 0 /* FrameType.zoneJsInternal */;
}
if (fnName.indexOf('runGuarded') !== -1) {
runGuardedFrame = true;
}
else if (fnName.indexOf('runTask') !== -1) {
runTaskFrame = true;
}
else if (fnName.indexOf('run') !== -1) {
runFrame = true;
}
else {
zoneAwareFrame1WithoutNew = frame;
zoneAwareFrame2WithoutNew = frame.replace('Error.', '');
if (frame.indexOf('Error.ZoneAwareError') === -1) {
zoneAwareFrame3WithoutNew =
frame.replace('ZoneAwareError', 'Error.ZoneAwareError');
}
frameType = 0 /* FrameType.zoneJsInternal */;
}
zoneJsInternalStackFrames[zoneAwareFrame2] = 0 /* FrameType.zoneJsInternal */;
zoneJsInternalStackFrames[frame] = frameType;
// Once we find all of the frames we can stop looking.
if (runFrame && runGuardedFrame && runTaskFrame) {
ZoneAwareError[stackRewrite] = true;
break;
}
}
if (fnName.indexOf('runGuarded') !== -1) {
runGuardedFrame = true;
}
else if (fnName.indexOf('runTask') !== -1) {
runTaskFrame = true;
}
else if (fnName.indexOf('run') !== -1) {
runFrame = true;
}
else {
frameType = 0 /* FrameType.zoneJsInternal */;
}
zoneJsInternalStackFrames[frame] = frameType;
// Once we find all of the frames we can stop looking.
if (runFrame && runGuardedFrame && runTaskFrame) {
ZoneAwareError[stackRewrite] = true;
break;
}
}
}
}
return false;
}
});
// carefully constructor a stack frame which contains all of the frames of interest which
// need to be detected and marked as an internal zoneJs frame.
var childDetectZone = detectZone.fork({
name: 'child',
onScheduleTask: function (delegate, curr, target, task) {
return delegate.scheduleTask(target, task);
},
onInvokeTask: function (delegate, curr, target, task, applyThis, applyArgs) {
return delegate.invokeTask(target, task, applyThis, applyArgs);
},
onCancelTask: function (delegate, curr, target, task) {
return delegate.cancelTask(target, task);
},
onInvoke: function (delegate, curr, target, callback, applyThis, applyArgs, source) {
return delegate.invoke(target, callback, applyThis, applyArgs, source);
}
});
// we need to detect all zone related frames, it will
// exceed default stackTraceLimit, so we set it to
// larger number here, and restore it after detect finish.
// We cast through any so we don't need to depend on nodejs typings.
var originalStackTraceLimit = Error.stackTraceLimit;
Error.stackTraceLimit = 100;
// we schedule event/micro/macro task, and invoke them
// when onSchedule, so we can get all stack traces for
// all kinds of tasks with one error thrown.
childDetectZone.run(function () {
childDetectZone.runGuarded(function () {
var fakeTransitionTo = function () { };
childDetectZone.scheduleEventTask(zoneJsInternalStackFramesSymbol, function () {
childDetectZone.scheduleMacroTask(zoneJsInternalStackFramesSymbol, function () {
childDetectZone.scheduleMicroTask(zoneJsInternalStackFramesSymbol, function () {
throw new Error();
return false;
},
});
// carefully constructor a stack frame which contains all of the frames of interest which
// need to be detected and marked as an internal zoneJs frame.
var childDetectZone = detectZone.fork({
name: 'child',
onScheduleTask: function (delegate, curr, target, task) {
return delegate.scheduleTask(target, task);
},
onInvokeTask: function (delegate, curr, target, task, applyThis, applyArgs) {
return delegate.invokeTask(target, task, applyThis, applyArgs);
},
onCancelTask: function (delegate, curr, target, task) {
return delegate.cancelTask(target, task);
},
onInvoke: function (delegate, curr, target, callback, applyThis, applyArgs, source) {
return delegate.invoke(target, callback, applyThis, applyArgs, source);
},
});
// we need to detect all zone related frames, it will
// exceed default stackTraceLimit, so we set it to
// larger number here, and restore it after detect finish.
// We cast through any so we don't need to depend on nodejs typings.
var originalStackTraceLimit = Error.stackTraceLimit;
Error.stackTraceLimit = 100;
// we schedule event/micro/macro task, and invoke them
// when onSchedule, so we can get all stack traces for
// all kinds of tasks with one error thrown.
childDetectZone.run(function () {
childDetectZone.runGuarded(function () {
var fakeTransitionTo = function () { };
childDetectZone.scheduleEventTask(zoneJsInternalStackFramesSymbol, function () {
childDetectZone.scheduleMacroTask(zoneJsInternalStackFramesSymbol, function () {
childDetectZone.scheduleMicroTask(zoneJsInternalStackFramesSymbol, function () {
throw new Error();
}, undefined, function (t) {
t._transitionTo = fakeTransitionTo;
t.invoke();
});
childDetectZone.scheduleMicroTask(zoneJsInternalStackFramesSymbol, function () {
throw Error();
}, undefined, function (t) {
t._transitionTo = fakeTransitionTo;
t.invoke();
});
}, undefined, function (t) {
t._transitionTo = fakeTransitionTo;
t.invoke();
});
childDetectZone.scheduleMicroTask(zoneJsInternalStackFramesSymbol, function () {
throw Error();
}, undefined, function (t) {
t._transitionTo = fakeTransitionTo;
t.invoke();
});
}, function () { });
}, undefined, function (t) {

@@ -331,10 +341,8 @@ t._transitionTo = fakeTransitionTo;

}, function () { });
}, undefined, function (t) {
t._transitionTo = fakeTransitionTo;
t.invoke();
}, function () { });
});
});
Error.stackTraceLimit = originalStackTraceLimit;
});
Error.stackTraceLimit = originalStackTraceLimit;
});
}
patchError(Zone);
}));
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/!function(r){"function"==typeof define&&define.amd?define(r):r()}((function(){Zone.__load_patch("Error",(function(r,e,n){var t,a,o,i,c,s=n.symbol("zoneJsInternalStackFrames"),u=r[n.symbol("Error")]=r.Error,f={};r.Error=d;var k="stackRewrite",l=r.__Zone_Error_BlacklistedStackFrames_policy||r.__Zone_Error_ZoneJsInternalStackFrames_policy||"default";function p(r,e,n){void 0===n&&(n=!0);for(var s=r.split("\n"),u=0;s[u]!==t&&s[u]!==a&&s[u]!==o&&s[u]!==i&&s[u]!==c&&u<s.length;)u++;for(;u<s.length&&e;u++){var k=s[u];if(k.trim())switch(f[k]){case 0:s.splice(u,1),u--;break;case 1:e=e.parent?e.parent:null,s.splice(u,1),u--;break;default:s[u]+=" [".concat(n?e.zone.name:e.zoneName,"]")}}return s.join("\n")}function d(){var r=this,e=u.apply(this,arguments),t=e.originalStack=e.stack;if(d[k]&&t){var a=n.currentZoneFrame();if("lazy"===l)e[n.symbol("zoneFrameNames")]=function r(e){for(var n={zoneName:e.zone.name},t=n;e.parent;){var a={zoneName:(e=e.parent).zone.name};n.parent=a,n=a}return t}(a);else if("default"===l)try{e.stack=e.zoneAwareStack=p(t,a)}catch(r){}}return this instanceof u&&this.constructor!=u?(Object.keys(e).concat("stack","message").forEach((function(n){var t=e[n];if(void 0!==t)try{r[n]=t}catch(r){}})),this):e}d.prototype=u.prototype,d[s]=f,d[k]=!1;var m=n.symbol("zoneAwareStack");"lazy"===l&&Object.defineProperty(d.prototype,"zoneAwareStack",{configurable:!0,enumerable:!0,get:function(){return this[m]||(this[m]=p(this.originalStack,this[n.symbol("zoneFrameNames")],!1)),this[m]},set:function(r){this.originalStack=r,this[m]=p(this.originalStack,this[n.symbol("zoneFrameNames")],!1)}});var h=["stackTraceLimit","captureStackTrace","prepareStackTrace"],T=Object.keys(u);if(T&&T.forEach((function(r){0===h.filter((function(e){return e===r})).length&&Object.defineProperty(d,r,{get:function(){return u[r]},set:function(e){u[r]=e}})})),u.hasOwnProperty("stackTraceLimit")&&(u.stackTraceLimit=Math.max(u.stackTraceLimit,15),Object.defineProperty(d,"stackTraceLimit",{get:function(){return u.stackTraceLimit},set:function(r){return u.stackTraceLimit=r}})),u.hasOwnProperty("captureStackTrace")&&Object.defineProperty(d,"captureStackTrace",{value:function r(e,n){u.captureStackTrace(e,n)}}),Object.defineProperty(d,"prepareStackTrace",{get:function(){return u.prepareStackTrace},set:function(r){return u.prepareStackTrace=r&&"function"==typeof r?function(e,n){if(n)for(var t=0;t<n.length;t++)if("zoneCaptureStackTrace"===n[t].getFunctionName()){n.splice(t,1);break}return r.call(this,e,n)}:r}}),"disable"!==l){var v=e.current.fork({name:"detect",onHandleError:function(r,e,n,s){if(s.originalStack&&Error===d)for(var u=s.originalStack.split(/\n/),l=!1,p=!1,m=!1;u.length;){var h=u.shift();if(/:\d+:\d+/.test(h)||"ZoneAwareError"===h){var T=h.split("(")[0].split("@")[0],v=1;if(-1!==T.indexOf("ZoneAwareError")&&(-1!==T.indexOf("new ZoneAwareError")?(t=h,a=h.replace("new ZoneAwareError","new Error.ZoneAwareError")):(o=h,i=h.replace("Error.",""),-1===h.indexOf("Error.ZoneAwareError")&&(c=h.replace("ZoneAwareError","Error.ZoneAwareError"))),f[a]=0),-1!==T.indexOf("runGuarded")?p=!0:-1!==T.indexOf("runTask")?m=!0:-1!==T.indexOf("run")?l=!0:v=0,f[h]=v,l&&p&&m){d[k]=!0;break}}}return!1}}).fork({name:"child",onScheduleTask:function(r,e,n,t){return r.scheduleTask(n,t)},onInvokeTask:function(r,e,n,t,a,o){return r.invokeTask(n,t,a,o)},onCancelTask:function(r,e,n,t){return r.cancelTask(n,t)},onInvoke:function(r,e,n,t,a,o,i){return r.invoke(n,t,a,o,i)}}),E=Error.stackTraceLimit;Error.stackTraceLimit=100,v.run((function(){v.runGuarded((function(){var r=function(){};v.scheduleEventTask(s,(function(){v.scheduleMacroTask(s,(function(){v.scheduleMicroTask(s,(function(){throw new Error}),void 0,(function(e){e._transitionTo=r,e.invoke()})),v.scheduleMicroTask(s,(function(){throw Error()}),void 0,(function(e){e._transitionTo=r,e.invoke()}))}),void 0,(function(e){e._transitionTo=r,e.invoke()}),(function(){}))}),void 0,(function(e){e._transitionTo=r,e.invoke()}),(function(){}))}))})),Error.stackTraceLimit=E}}))}));
*/!function(r){"function"==typeof define&&define.amd?define(r):r()}((function(){!function r(e){e.__load_patch("Error",(function(r,e,n){var t,a,o,i,c,s=n.symbol("zoneJsInternalStackFrames"),u=r[n.symbol("Error")]=r.Error,f={};r.Error=d;var k="stackRewrite",l=r.__Zone_Error_BlacklistedStackFrames_policy||r.__Zone_Error_ZoneJsInternalStackFrames_policy||"default";function p(r,e,n){void 0===n&&(n=!0);for(var s=r.split("\n"),u=0;s[u]!==t&&s[u]!==a&&s[u]!==o&&s[u]!==i&&s[u]!==c&&u<s.length;)u++;for(;u<s.length&&e;u++){var k=s[u];if(k.trim())switch(f[k]){case 0:s.splice(u,1),u--;break;case 1:e=e.parent?e.parent:null,s.splice(u,1),u--;break;default:s[u]+=" [".concat(n?e.zone.name:e.zoneName,"]")}}return s.join("\n")}function d(){var r=this,e=u.apply(this,arguments),t=e.originalStack=e.stack;if(d[k]&&t){var a=n.currentZoneFrame();if("lazy"===l)e[n.symbol("zoneFrameNames")]=function r(e){for(var n={zoneName:e.zone.name},t=n;e.parent;){var a={zoneName:(e=e.parent).zone.name};n.parent=a,n=a}return t}(a);else if("default"===l)try{e.stack=e.zoneAwareStack=p(t,a)}catch(r){}}return this instanceof u&&this.constructor!=u?(Object.keys(e).concat("stack","message").forEach((function(n){var t=e[n];if(void 0!==t)try{r[n]=t}catch(r){}})),this):e}d.prototype=u.prototype,d[s]=f,d[k]=!1;var m=n.symbol("zoneAwareStack");"lazy"===l&&Object.defineProperty(d.prototype,"zoneAwareStack",{configurable:!0,enumerable:!0,get:function(){return this[m]||(this[m]=p(this.originalStack,this[n.symbol("zoneFrameNames")],!1)),this[m]},set:function(r){this.originalStack=r,this[m]=p(this.originalStack,this[n.symbol("zoneFrameNames")],!1)}});var h=["stackTraceLimit","captureStackTrace","prepareStackTrace"],T=Object.keys(u);if(T&&T.forEach((function(r){0===h.filter((function(e){return e===r})).length&&Object.defineProperty(d,r,{get:function(){return u[r]},set:function(e){u[r]=e}})})),u.hasOwnProperty("stackTraceLimit")&&(u.stackTraceLimit=Math.max(u.stackTraceLimit,15),Object.defineProperty(d,"stackTraceLimit",{get:function(){return u.stackTraceLimit},set:function(r){return u.stackTraceLimit=r}})),u.hasOwnProperty("captureStackTrace")&&Object.defineProperty(d,"captureStackTrace",{value:function r(e,n){u.captureStackTrace(e,n)}}),Object.defineProperty(d,"prepareStackTrace",{get:function(){return u.prepareStackTrace},set:function(r){return u.prepareStackTrace=r&&"function"==typeof r?function(e,n){if(n)for(var t=0;t<n.length;t++)if("zoneCaptureStackTrace"===n[t].getFunctionName()){n.splice(t,1);break}return r.call(this,e,n)}:r}}),"disable"!==l){var v=e.current.fork({name:"detect",onHandleError:function(r,e,n,s){if(s.originalStack&&Error===d)for(var u=s.originalStack.split(/\n/),l=!1,p=!1,m=!1;u.length;){var h=u.shift();if(/:\d+:\d+/.test(h)||"ZoneAwareError"===h){var T=h.split("(")[0].split("@")[0],v=1;if(-1!==T.indexOf("ZoneAwareError")&&(-1!==T.indexOf("new ZoneAwareError")?(t=h,a=h.replace("new ZoneAwareError","new Error.ZoneAwareError")):(o=h,i=h.replace("Error.",""),-1===h.indexOf("Error.ZoneAwareError")&&(c=h.replace("ZoneAwareError","Error.ZoneAwareError"))),f[a]=0),-1!==T.indexOf("runGuarded")?p=!0:-1!==T.indexOf("runTask")?m=!0:-1!==T.indexOf("run")?l=!0:v=0,f[h]=v,l&&p&&m){d[k]=!0;break}}}return!1}}).fork({name:"child",onScheduleTask:function(r,e,n,t){return r.scheduleTask(n,t)},onInvokeTask:function(r,e,n,t,a,o){return r.invokeTask(n,t,a,o)},onCancelTask:function(r,e,n,t){return r.cancelTask(n,t)},onInvoke:function(r,e,n,t,a,o,i){return r.invoke(n,t,a,o,i)}}),E=Error.stackTraceLimit;Error.stackTraceLimit=100,v.run((function(){v.runGuarded((function(){var r=function(){};v.scheduleEventTask(s,(function(){v.scheduleMacroTask(s,(function(){v.scheduleMicroTask(s,(function(){throw new Error}),void 0,(function(e){e._transitionTo=r,e.invoke()})),v.scheduleMicroTask(s,(function(){throw Error()}),void 0,(function(e){e._transitionTo=r,e.invoke()}))}),void 0,(function(e){e._transitionTo=r,e.invoke()}),(function(){}))}),void 0,(function(e){e._transitionTo=r,e.invoke()}),(function(){}))}))})),Error.stackTraceLimit=E}}))}(Zone)}));

@@ -13,3 +13,3 @@ 'use strict';

* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT

@@ -40,3 +40,3 @@ */

if (isUnconfigurable(obj, prop)) {
throw new TypeError('Cannot assign to read only property \'' + prop + '\' of ' + obj);
throw new TypeError("Cannot assign to read only property '" + prop + "' of " + obj);
}

@@ -128,4 +128,6 @@ var originalConfigurableFlag = desc.configurable;

var swallowError = false;
if (prop === 'createdCallback' || prop === 'attachedCallback' ||
prop === 'detachedCallback' || prop === 'attributeChangedCallback') {
if (prop === 'createdCallback' ||
prop === 'attachedCallback' ||
prop === 'detachedCallback' ||
prop === 'attributeChangedCallback') {
// We only swallow the error in registerElement patch

@@ -160,4 +162,3 @@ // this is the work around since some applications

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';
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'
.split(',');
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'.split(',');
var EVENT_TARGET = 'EventTarget';

@@ -194,3 +195,3 @@ var apis = [];

'MSPointerOver': 'pointerover',
'MSPointerUp': 'pointerup'
'MSPointerUp': 'pointerup',
};

@@ -211,3 +212,3 @@ // predefine all __zone_symbol__ + eventName + true/false string

var target = WTF_ISSUE_555_ARRAY[i];
var targets = globalSources[target] = {};
var targets = (globalSources[target] = {});
for (var j = 0; j < eventNames.length; j++) {

@@ -223,3 +224,3 @@ var eventName = eventNames[j];

var testString = delegate.toString();
if ((testString === FUNCTION_WRAPPER || testString == BROWSER_TOOLS)) {
if (testString === FUNCTION_WRAPPER || testString == BROWSER_TOOLS) {
nativeDelegate.apply(target, args);

@@ -236,3 +237,3 @@ return false;

var testString = delegate.toString();
if ((testString === FUNCTION_WRAPPER || testString == BROWSER_TOOLS)) {
if (testString === FUNCTION_WRAPPER || testString == BROWSER_TOOLS) {
nativeDelegate.apply(target, args);

@@ -266,3 +267,3 @@ return false;

return pointerEventName || eventName;
}
},
});

@@ -357,3 +358,3 @@ Zone[api.symbol('patchEventTarget')] = !!_global[EVENT_TARGET];

return true;
}
},
});

@@ -386,3 +387,3 @@ var div = document.createElement('div');

return true;
}
},
});

@@ -405,3 +406,3 @@ var req = new XMLHttpRequest();

this[SYMBOL_FAKE_ONREADYSTATECHANGE_1] = value;
}
},
});

@@ -512,9 +513,20 @@ var req = new XMLHttpRequest();

'waiting',
'wheel'
'wheel',
];
var documentEventNames = [
'afterscriptexecute', 'beforescriptexecute', 'DOMContentLoaded', 'freeze', 'fullscreenchange',
'mozfullscreenchange', 'webkitfullscreenchange', 'msfullscreenchange', 'fullscreenerror',
'mozfullscreenerror', 'webkitfullscreenerror', 'msfullscreenerror', 'readystatechange',
'visibilitychange', 'resume'
'afterscriptexecute',
'beforescriptexecute',
'DOMContentLoaded',
'freeze',
'fullscreenchange',
'mozfullscreenchange',
'webkitfullscreenchange',
'msfullscreenchange',
'fullscreenerror',
'mozfullscreenerror',
'webkitfullscreenerror',
'msfullscreenerror',
'readystatechange',
'visibilitychange',
'resume',
];

@@ -551,8 +563,21 @@ var windowEventNames = [

'vrdisplaydisconnected',
'vrdisplaypresentchange'
'vrdisplaypresentchange',
];
var htmlElementEventNames = [
'beforecopy', 'beforecut', 'beforepaste', 'copy', 'cut', 'paste', 'dragstart', 'loadend',
'animationstart', 'search', 'transitionrun', 'transitionstart', 'webkitanimationend',
'webkitanimationiteration', 'webkitanimationstart', 'webkittransitionend'
'beforecopy',
'beforecut',
'beforepaste',
'copy',
'cut',
'paste',
'dragstart',
'loadend',
'animationstart',
'search',
'transitionrun',
'transitionstart',
'webkitanimationend',
'webkitanimationiteration',
'webkitanimationstart',
'webkittransitionend',
];

@@ -614,3 +639,3 @@ var ieElementEventNames = [

'stop',
'storagecommit'
'storagecommit',
];

@@ -656,3 +681,8 @@ var webglEventNames = ['webglcontextrestored', 'webglcontextlost', 'webglcontextcreationerror'];

}
var callbacks = ['createdCallback', 'attachedCallback', 'detachedCallback', 'attributeChangedCallback'];
var callbacks = [
'createdCallback',
'attachedCallback',
'detachedCallback',
'attributeChangedCallback',
];
api.patchCallbacks(api, document, 'Document', 'registerElement', callbacks);

@@ -664,3 +694,10 @@ }

*/
(function (_global) {
function patchBrowserLegacy() {
var _global = typeof window !== 'undefined'
? window
: typeof global !== 'undefined'
? global
: typeof self !== 'undefined'
? self
: {};
var symbolPrefix = _global['__Zone_symbol_prefix'] || '__zone_symbol__';

@@ -684,5 +721,4 @@ function __symbol__(name) {

};
})(typeof window !== 'undefined' ?
window :
typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {});
}
patchBrowserLegacy();
}));
"use strict";var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){var e,t,r,n,o;function a(){e=Zone.__symbol__,t=Object[e("defineProperty")]=Object.defineProperty,r=Object[e("getOwnPropertyDescriptor")]=Object.getOwnPropertyDescriptor,n=Object.create,o=e("unconfigurables"),Object.defineProperty=function(e,t,r){if(c(e,t))throw new TypeError("Cannot assign to read only property '"+t+"' of "+e);var n=r.configurable;return"prototype"!==t&&(r=l(e,t,r)),s(e,t,r,n)},Object.defineProperties=function(e,t){Object.keys(t).forEach((function(r){Object.defineProperty(e,r,t[r])}));for(var r=0,n=Object.getOwnPropertySymbols(t);r<n.length;r++){var o=n[r],a=Object.getOwnPropertyDescriptor(t,o);(null==a?void 0:a.enumerable)&&Object.defineProperty(e,o,t[o])}return e},Object.create=function(e,t){return"object"!=typeof t||Object.isFrozen(t)||Object.keys(t).forEach((function(r){t[r]=l(e,r,t[r])})),n(e,t)},Object.getOwnPropertyDescriptor=function(e,t){var n=r(e,t);return n&&c(e,t)&&(n.configurable=!1),n}}function i(e,t,r){var n=r.configurable;return s(e,t,r=l(e,t,r),n)}function c(e,t){return e&&e[o]&&e[o][t]}function l(e,r,n){return Object.isFrozen(n)||(n.configurable=!0),n.configurable||(e[o]||Object.isFrozen(e)||t(e,o,{writable:!0,value:{}}),e[o]&&(e[o][r]=!0)),n}function s(e,r,n,o){try{return t(e,r,n)}catch(c){if(!n.configurable)throw c;void 0===o?delete n.configurable:n.configurable=o;try{return t(e,r,n)}catch(t){var a=!1;if("createdCallback"!==r&&"attachedCallback"!==r&&"detachedCallback"!==r&&"attributeChangedCallback"!==r||(a=!0),!a)throw t;var i=null;try{i=JSON.stringify(n)}catch(e){i=n.toString()}console.log("Attempting to configure '".concat(r,"' with descriptor '").concat(i,"' on object '").concat(e,"' and got error, giving up: ").concat(t))}}}function p(e,t){var r=t.getGlobalObjects(),n=r.eventNames,o=r.globalSources,a=r.zoneSymbolEventNames,i=r.TRUE_STR,c=r.FALSE_STR,l=r.ZONE_SYMBOL_PREFIX,s="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".split(","),p="EventTarget",u=[],d=e.wtf,f="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".split(",");d?u=f.map((function(e){return"HTML"+e+"Element"})).concat(s):e[p]?u.push(p):u=s;for(var g=e.__Zone_disable_IE_check||!1,b=e.__Zone_enable_cross_context_check||!1,m=t.isIEOrEdge(),h="[object FunctionWrapper]",v="function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] }",y={MSPointerCancel:"pointercancel",MSPointerDown:"pointerdown",MSPointerEnter:"pointerenter",MSPointerHover:"pointerhover",MSPointerLeave:"pointerleave",MSPointerMove:"pointermove",MSPointerOut:"pointerout",MSPointerOver:"pointerover",MSPointerUp:"pointerup"},_=0;_<n.length;_++){var O=l+((P=n[_])+c),w=l+(P+i);a[P]={},a[P][c]=O,a[P][i]=w}for(_=0;_<f.length;_++)for(var k=f[_],E=o[k]={},S=0;S<n.length;S++){var P;E[P=n[S]]=k+".addEventListener:"+P}var j=[];for(_=0;_<u.length;_++){var T=e[u[_]];j.push(T&&T.prototype)}return t.patchEventTarget(e,t,j,{vh:function(e,t,r,n){if(!g&&m){if(b)try{var o;if((o=t.toString())===h||o==v)return e.apply(r,n),!1}catch(t){return e.apply(r,n),!1}else if((o=t.toString())===h||o==v)return e.apply(r,n),!1}else if(b)try{t.toString()}catch(t){return e.apply(r,n),!1}return!0},transferEventName:function(e){return y[e]||e}}),Zone[t.symbol("patchEventTarget")]=!!e[p],!0}function u(e,t){var r=e.getGlobalObjects();if((!r.isNode||r.isMix)&&!function n(e,t){var r=e.getGlobalObjects();if((r.isBrowser||r.isMix)&&!e.ObjectGetOwnPropertyDescriptor(HTMLElement.prototype,"onclick")&&"undefined"!=typeof Element){var n=e.ObjectGetOwnPropertyDescriptor(Element.prototype,"onclick");if(n&&!n.configurable)return!1;if(n){e.ObjectDefineProperty(Element.prototype,"onclick",{enumerable:!0,configurable:!0,get:function(){return!0}});var o=!!document.createElement("div").onclick;return e.ObjectDefineProperty(Element.prototype,"onclick",n),o}}var a=t.XMLHttpRequest;if(!a)return!1;var i="onreadystatechange",c=a.prototype,l=e.ObjectGetOwnPropertyDescriptor(c,i);if(l)return e.ObjectDefineProperty(c,i,{enumerable:!0,configurable:!0,get:function(){return!0}}),o=!!(p=new a).onreadystatechange,e.ObjectDefineProperty(c,i,l||{}),o;var s=e.symbol("fake");e.ObjectDefineProperty(c,i,{enumerable:!0,configurable:!0,get:function(){return this[s]},set:function(e){this[s]=e}});var p,u=function(){};return(p=new a).onreadystatechange=u,o=p[s]===u,p.onreadystatechange=null,o}(e,t)){var o="undefined"!=typeof WebSocket;!function r(e){for(var t=e.symbol("unbound"),r=function(r){var n=g[r],o="on"+n;self.addEventListener(n,(function(r){var n,a,i=r.target;for(a=i?i.constructor.name+"."+o:"unknown."+o;i;)i[o]&&!i[o][t]&&((n=e.wrapWithCurrentZone(i[o],a))[t]=i[o],i[o]=n),i=i.parentElement}),!0)},n=0;n<g.length;n++)r(n)}(e),e.patchClass("XMLHttpRequest"),o&&function n(e,t){var r=e.getGlobalObjects(),n=r.ADD_EVENT_LISTENER_STR,o=r.REMOVE_EVENT_LISTENER_STR,a=t.WebSocket;t.EventTarget||e.patchEventTarget(t,e,[a.prototype]),t.WebSocket=function(t,r){var i,c,l=arguments.length>1?new a(t,r):new a(t),s=e.ObjectGetOwnPropertyDescriptor(l,"onmessage");return s&&!1===s.configurable?(i=e.ObjectCreate(l),c=l,[n,o,"send","close"].forEach((function(t){i[t]=function(){var r=e.ArraySlice.call(arguments);if(t===n||t===o){var a=r.length>0?r[0]:void 0;if(a){var c=Zone.__symbol__("ON_PROPERTY"+a);l[c]=i[c]}}return l[t].apply(l,r)}}))):i=l,e.patchOnProperties(i,["close","error","message","open"],c),i};var i=t.WebSocket;for(var c in a)i[c]=a[c]}(e,t),Zone[e.symbol("patchEvents")]=!0}}var d,f,g=__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([],["abort","animationcancel","animationend","animationiteration","auxclick","beforeinput","blur","cancel","canplay","canplaythrough","change","compositionstart","compositionupdate","compositionend","cuechange","click","close","contextmenu","curechange","dblclick","drag","dragend","dragenter","dragexit","dragleave","dragover","drop","durationchange","emptied","ended","error","focus","focusin","focusout","gotpointercapture","input","invalid","keydown","keypress","keyup","load","loadstart","loadeddata","loadedmetadata","lostpointercapture","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","mousewheel","orientationchange","pause","play","playing","pointercancel","pointerdown","pointerenter","pointerleave","pointerlockchange","mozpointerlockchange","webkitpointerlockerchange","pointerlockerror","mozpointerlockerror","webkitpointerlockerror","pointermove","pointout","pointerover","pointerup","progress","ratechange","reset","resize","scroll","seeked","seeking","select","selectionchange","selectstart","show","sort","stalled","submit","suspend","timeupdate","volumechange","touchcancel","touchmove","touchstart","touchend","transitioncancel","transitionend","waiting","wheel"],!0),["webglcontextrestored","webglcontextlost","webglcontextcreationerror"],!0),["autocomplete","autocompleteerror"],!0),["toggle"],!0),["afterscriptexecute","beforescriptexecute","DOMContentLoaded","freeze","fullscreenchange","mozfullscreenchange","webkitfullscreenchange","msfullscreenchange","fullscreenerror","mozfullscreenerror","webkitfullscreenerror","msfullscreenerror","readystatechange","visibilitychange","resume"],!0),["absolutedeviceorientation","afterinput","afterprint","appinstalled","beforeinstallprompt","beforeprint","beforeunload","devicelight","devicemotion","deviceorientation","deviceorientationabsolute","deviceproximity","hashchange","languagechange","message","mozbeforepaint","offline","online","paint","pageshow","pagehide","popstate","rejectionhandled","storage","unhandledrejection","unload","userproximity","vrdisplayconnected","vrdisplaydisconnected","vrdisplaypresentchange"],!0),["beforecopy","beforecut","beforepaste","copy","cut","paste","dragstart","loadend","animationstart","search","transitionrun","transitionstart","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend"],!0),["activate","afterupdate","ariarequest","beforeactivate","beforedeactivate","beforeeditfocus","beforeupdate","cellchange","controlselect","dataavailable","datasetchanged","datasetcomplete","errorupdate","filterchange","layoutcomplete","losecapture","move","moveend","movestart","propertychange","resizeend","resizestart","rowenter","rowexit","rowsdelete","rowsinserted","command","compassneedscalibration","deactivate","help","mscontentzoom","msmanipulationstatechanged","msgesturechange","msgesturedoubletap","msgestureend","msgesturehold","msgesturestart","msgesturetap","msgotpointercapture","msinertiastart","mslostpointercapture","mspointercancel","mspointerdown","mspointerenter","mspointerhover","mspointerleave","mspointermove","mspointerout","mspointerover","mspointerup","pointerout","mssitemodejumplistitemremoved","msthumbnailclick","stop","storagecommit"],!0);d="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},f=d.__Zone_symbol_prefix||"__zone_symbol__",d[function b(e){return f+e}("legacyPatch")]=function(){var e=d.Zone;e.__load_patch("defineProperty",(function(e,t,r){r._redefineProperty=i,a()})),e.__load_patch("registerElement",(function(e,t,r){!function n(e,t){var r=t.getGlobalObjects();(r.isBrowser||r.isMix)&&"registerElement"in e.document&&t.patchCallbacks(t,document,"Document","registerElement",["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"])}(e,r)})),e.__load_patch("EventTargetLegacy",(function(e,t,r){p(e,r),u(r,e)}))}}));
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){var e,t,r,n,o;function a(){e=Zone.__symbol__,t=Object[e("defineProperty")]=Object.defineProperty,r=Object[e("getOwnPropertyDescriptor")]=Object.getOwnPropertyDescriptor,n=Object.create,o=e("unconfigurables"),Object.defineProperty=function(e,t,r){if(c(e,t))throw new TypeError("Cannot assign to read only property '"+t+"' of "+e);var n=r.configurable;return"prototype"!==t&&(r=l(e,t,r)),s(e,t,r,n)},Object.defineProperties=function(e,t){Object.keys(t).forEach((function(r){Object.defineProperty(e,r,t[r])}));for(var r=0,n=Object.getOwnPropertySymbols(t);r<n.length;r++){var o=n[r],a=Object.getOwnPropertyDescriptor(t,o);(null==a?void 0:a.enumerable)&&Object.defineProperty(e,o,t[o])}return e},Object.create=function(e,t){return"object"!=typeof t||Object.isFrozen(t)||Object.keys(t).forEach((function(r){t[r]=l(e,r,t[r])})),n(e,t)},Object.getOwnPropertyDescriptor=function(e,t){var n=r(e,t);return n&&c(e,t)&&(n.configurable=!1),n}}function i(e,t,r){var n=r.configurable;return s(e,t,r=l(e,t,r),n)}function c(e,t){return e&&e[o]&&e[o][t]}function l(e,r,n){return Object.isFrozen(n)||(n.configurable=!0),n.configurable||(e[o]||Object.isFrozen(e)||t(e,o,{writable:!0,value:{}}),e[o]&&(e[o][r]=!0)),n}function s(e,r,n,o){try{return t(e,r,n)}catch(c){if(!n.configurable)throw c;void 0===o?delete n.configurable:n.configurable=o;try{return t(e,r,n)}catch(t){var a=!1;if("createdCallback"!==r&&"attachedCallback"!==r&&"detachedCallback"!==r&&"attributeChangedCallback"!==r||(a=!0),!a)throw t;var i=null;try{i=JSON.stringify(n)}catch(e){i=n.toString()}console.log("Attempting to configure '".concat(r,"' with descriptor '").concat(i,"' on object '").concat(e,"' and got error, giving up: ").concat(t))}}}function p(e,t){var r=t.getGlobalObjects(),n=r.eventNames,o=r.globalSources,a=r.zoneSymbolEventNames,i=r.TRUE_STR,c=r.FALSE_STR,l=r.ZONE_SYMBOL_PREFIX,s="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".split(","),p="EventTarget",u=[],d=e.wtf,f="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".split(",");d?u=f.map((function(e){return"HTML"+e+"Element"})).concat(s):e[p]?u.push(p):u=s;for(var g=e.__Zone_disable_IE_check||!1,b=e.__Zone_enable_cross_context_check||!1,m=t.isIEOrEdge(),v="[object FunctionWrapper]",h="function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] }",y={MSPointerCancel:"pointercancel",MSPointerDown:"pointerdown",MSPointerEnter:"pointerenter",MSPointerHover:"pointerhover",MSPointerLeave:"pointerleave",MSPointerMove:"pointermove",MSPointerOut:"pointerout",MSPointerOver:"pointerover",MSPointerUp:"pointerup"},_=0;_<n.length;_++){var O=l+((P=n[_])+c),w=l+(P+i);a[P]={},a[P][c]=O,a[P][i]=w}for(_=0;_<f.length;_++)for(var k=f[_],E=o[k]={},S=0;S<n.length;S++){var P;E[P=n[S]]=k+".addEventListener:"+P}var j=[];for(_=0;_<u.length;_++){var T=e[u[_]];j.push(T&&T.prototype)}return t.patchEventTarget(e,t,j,{vh:function(e,t,r,n){if(!g&&m){if(b)try{var o;if((o=t.toString())===v||o==h)return e.apply(r,n),!1}catch(t){return e.apply(r,n),!1}else if((o=t.toString())===v||o==h)return e.apply(r,n),!1}else if(b)try{t.toString()}catch(t){return e.apply(r,n),!1}return!0},transferEventName:function(e){return y[e]||e}}),Zone[t.symbol("patchEventTarget")]=!!e[p],!0}function u(e,t){var r=e.getGlobalObjects();if((!r.isNode||r.isMix)&&!function n(e,t){var r=e.getGlobalObjects();if((r.isBrowser||r.isMix)&&!e.ObjectGetOwnPropertyDescriptor(HTMLElement.prototype,"onclick")&&"undefined"!=typeof Element){var n=e.ObjectGetOwnPropertyDescriptor(Element.prototype,"onclick");if(n&&!n.configurable)return!1;if(n){e.ObjectDefineProperty(Element.prototype,"onclick",{enumerable:!0,configurable:!0,get:function(){return!0}});var o=!!document.createElement("div").onclick;return e.ObjectDefineProperty(Element.prototype,"onclick",n),o}}var a=t.XMLHttpRequest;if(!a)return!1;var i="onreadystatechange",c=a.prototype,l=e.ObjectGetOwnPropertyDescriptor(c,i);if(l)return e.ObjectDefineProperty(c,i,{enumerable:!0,configurable:!0,get:function(){return!0}}),o=!!(p=new a).onreadystatechange,e.ObjectDefineProperty(c,i,l||{}),o;var s=e.symbol("fake");e.ObjectDefineProperty(c,i,{enumerable:!0,configurable:!0,get:function(){return this[s]},set:function(e){this[s]=e}});var p,u=function(){};return(p=new a).onreadystatechange=u,o=p[s]===u,p.onreadystatechange=null,o}(e,t)){var o="undefined"!=typeof WebSocket;!function r(e){for(var t=e.symbol("unbound"),r=function(r){var n=d[r],o="on"+n;self.addEventListener(n,(function(r){var n,a,i=r.target;for(a=i?i.constructor.name+"."+o:"unknown."+o;i;)i[o]&&!i[o][t]&&((n=e.wrapWithCurrentZone(i[o],a))[t]=i[o],i[o]=n),i=i.parentElement}),!0)},n=0;n<d.length;n++)r(n)}(e),e.patchClass("XMLHttpRequest"),o&&function n(e,t){var r=e.getGlobalObjects(),n=r.ADD_EVENT_LISTENER_STR,o=r.REMOVE_EVENT_LISTENER_STR,a=t.WebSocket;t.EventTarget||e.patchEventTarget(t,e,[a.prototype]),t.WebSocket=function(t,r){var i,c,l=arguments.length>1?new a(t,r):new a(t),s=e.ObjectGetOwnPropertyDescriptor(l,"onmessage");return s&&!1===s.configurable?(i=e.ObjectCreate(l),c=l,[n,o,"send","close"].forEach((function(t){i[t]=function(){var r=e.ArraySlice.call(arguments);if(t===n||t===o){var a=r.length>0?r[0]:void 0;if(a){var c=Zone.__symbol__("ON_PROPERTY"+a);l[c]=i[c]}}return l[t].apply(l,r)}}))):i=l,e.patchOnProperties(i,["close","error","message","open"],c),i};var i=t.WebSocket;for(var c in a)i[c]=a[c]}(e,t),Zone[e.symbol("patchEvents")]=!0}}var d=__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([],["abort","animationcancel","animationend","animationiteration","auxclick","beforeinput","blur","cancel","canplay","canplaythrough","change","compositionstart","compositionupdate","compositionend","cuechange","click","close","contextmenu","curechange","dblclick","drag","dragend","dragenter","dragexit","dragleave","dragover","drop","durationchange","emptied","ended","error","focus","focusin","focusout","gotpointercapture","input","invalid","keydown","keypress","keyup","load","loadstart","loadeddata","loadedmetadata","lostpointercapture","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","mousewheel","orientationchange","pause","play","playing","pointercancel","pointerdown","pointerenter","pointerleave","pointerlockchange","mozpointerlockchange","webkitpointerlockerchange","pointerlockerror","mozpointerlockerror","webkitpointerlockerror","pointermove","pointout","pointerover","pointerup","progress","ratechange","reset","resize","scroll","seeked","seeking","select","selectionchange","selectstart","show","sort","stalled","submit","suspend","timeupdate","volumechange","touchcancel","touchmove","touchstart","touchend","transitioncancel","transitionend","waiting","wheel"],!0),["webglcontextrestored","webglcontextlost","webglcontextcreationerror"],!0),["autocomplete","autocompleteerror"],!0),["toggle"],!0),["afterscriptexecute","beforescriptexecute","DOMContentLoaded","freeze","fullscreenchange","mozfullscreenchange","webkitfullscreenchange","msfullscreenchange","fullscreenerror","mozfullscreenerror","webkitfullscreenerror","msfullscreenerror","readystatechange","visibilitychange","resume"],!0),["absolutedeviceorientation","afterinput","afterprint","appinstalled","beforeinstallprompt","beforeprint","beforeunload","devicelight","devicemotion","deviceorientation","deviceorientationabsolute","deviceproximity","hashchange","languagechange","message","mozbeforepaint","offline","online","paint","pageshow","pagehide","popstate","rejectionhandled","storage","unhandledrejection","unload","userproximity","vrdisplayconnected","vrdisplaydisconnected","vrdisplaypresentchange"],!0),["beforecopy","beforecut","beforepaste","copy","cut","paste","dragstart","loadend","animationstart","search","transitionrun","transitionstart","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend"],!0),["activate","afterupdate","ariarequest","beforeactivate","beforedeactivate","beforeeditfocus","beforeupdate","cellchange","controlselect","dataavailable","datasetchanged","datasetcomplete","errorupdate","filterchange","layoutcomplete","losecapture","move","moveend","movestart","propertychange","resizeend","resizestart","rowenter","rowexit","rowsdelete","rowsinserted","command","compassneedscalibration","deactivate","help","mscontentzoom","msmanipulationstatechanged","msgesturechange","msgesturedoubletap","msgestureend","msgesturehold","msgesturestart","msgesturetap","msgotpointercapture","msinertiastart","mslostpointercapture","mspointercancel","mspointerdown","mspointerenter","mspointerhover","mspointerleave","mspointermove","mspointerout","mspointerover","mspointerup","pointerout","mssitemodejumplistitemremoved","msthumbnailclick","stop","storagecommit"],!0);!function f(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=e.__Zone_symbol_prefix||"__zone_symbol__";e[function r(e){return t+e}("legacyPatch")]=function(){var t=e.Zone;t.__load_patch("defineProperty",(function(e,t,r){r._redefineProperty=i,a()})),t.__load_patch("registerElement",(function(e,t,r){!function n(e,t){var r=t.getGlobalObjects();(r.isBrowser||r.isMix)&&"registerElement"in e.document&&t.patchCallbacks(t,document,"Document","registerElement",["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"])}(e,r)})),t.__load_patch("EventTargetLegacy",(function(e,t,r){p(e,r),u(r,e)}))}}()}));
"use strict";var __assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},__assign.apply(this,arguments)};
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){!function(e){var t,n=e.performance;function r(e){n&&n.mark&&n.mark(e)}function o(e,t){n&&n.measure&&n.measure(e,t)}r("Zone");var a=e.__Zone_symbol_prefix||"__zone_symbol__";function i(e){return a+e}var c=!0===e[i("forceDuplicateZoneCheck")];if(e.Zone){if(c||"function"!=typeof e.Zone.__symbol__)throw new Error("Zone already loaded.");return e.Zone}var s=function(){function n(e,t){this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new f(this,this._parent&&this._parent._zoneDelegate,t)}return n.assertZonePatched=function(){if(e.Promise!==C.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")},Object.defineProperty(n,"root",{get:function(){for(var e=t.current;e.parent;)e=e.parent;return e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"current",{get:function(){return z.zone},enumerable:!1,configurable:!0}),Object.defineProperty(n,"currentTask",{get:function(){return R},enumerable:!1,configurable:!0}),n.__load_patch=function(n,a,i){if(void 0===i&&(i=!1),C.hasOwnProperty(n)){if(!i&&c)throw Error("Already loaded patch: "+n)}else if(!e["__Zone_disable_"+n]){var s="Zone:"+n;r(s),C[n]=a(e,t,I),o(s,s)}},Object.defineProperty(n.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),n.prototype.get=function(e){var t=this.getZoneWith(e);if(t)return t._properties[e]},n.prototype.getZoneWith=function(e){for(var t=this;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null},n.prototype.fork=function(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)},n.prototype.wrap=function(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);var n=this._zoneDelegate.intercept(this,e,t),r=this;return function(){return r.runGuarded(n,this,arguments,t)}},n.prototype.run=function(e,t,n,r){z={parent:z,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{z=z.parent}},n.prototype.runGuarded=function(e,t,n,r){void 0===t&&(t=null),z={parent:z,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{z=z.parent}},n.prototype.runTask=function(e,t,n){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||T).name+"; Execution: "+this.name+")");if(e.state!==b||e.type!==j&&e.type!==D){var r=e.state!=Z;r&&e._transitionTo(Z,w),e.runCount++;var o=R;R=e,z={parent:z,zone:this};try{e.type==D&&e.data&&!e.data.isPeriodic&&(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,e,t,n)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{e.state!==b&&e.state!==P&&(e.type==j||e.data&&e.data.isPeriodic?r&&e._transitionTo(w,Z):(e.runCount=0,this._updateTaskCount(e,-1),r&&e._transitionTo(b,Z,b))),z=z.parent,R=o}}},n.prototype.scheduleTask=function(e){if(e.zone&&e.zone!==this)for(var t=this;t;){if(t===e.zone)throw Error("can not reschedule task to ".concat(this.name," which is descendants of the original zone ").concat(e.zone.name));t=t.parent}e._transitionTo(E,b);var n=[];e._zoneDelegates=n,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(t){throw e._transitionTo(P,E,b),this._zoneDelegate.handleError(this,t),t}return e._zoneDelegates===n&&this._updateTaskCount(e,1),e.state==E&&e._transitionTo(w,E),e},n.prototype.scheduleMicroTask=function(e,t,n,r){return this.scheduleTask(new h(O,e,t,n,r,void 0))},n.prototype.scheduleMacroTask=function(e,t,n,r,o){return this.scheduleTask(new h(D,e,t,n,r,o))},n.prototype.scheduleEventTask=function(e,t,n,r,o){return this.scheduleTask(new h(j,e,t,n,r,o))},n.prototype.cancelTask=function(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||T).name+"; Execution: "+this.name+")");if(e.state===w||e.state===Z){e._transitionTo(S,w,Z);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(P,S),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(b,S),e.runCount=0,e}},n.prototype._updateTaskCount=function(e,t){var n=e._zoneDelegates;-1==t&&(e._zoneDelegates=null);for(var r=0;r<n.length;r++)n[r]._updateTaskCount(e.type,t)},n}();(t=s).__symbol__=i;var u,l={name:"",onHasTask:function(e,t,n,r){return e.hasTask(n,r)},onScheduleTask:function(e,t,n,r){return e.scheduleTask(n,r)},onInvokeTask:function(e,t,n,r,o,a){return e.invokeTask(n,r,o,a)},onCancelTask:function(e,t,n,r){return e.cancelTask(n,r)}},f=function(){function e(e,t,n){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=e,this._parentDelegate=t,this._forkZS=n&&(n&&n.onFork?n:t._forkZS),this._forkDlgt=n&&(n.onFork?t:t._forkDlgt),this._forkCurrZone=n&&(n.onFork?this.zone:t._forkCurrZone),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this.zone:t._interceptCurrZone),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this.zone:t._invokeCurrZone),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this.zone:t._handleErrorCurrZone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this.zone:t._scheduleTaskCurrZone),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this.zone:t._invokeTaskCurrZone),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this.zone:t._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;var r=n&&n.onHasTask;(r||t&&t._hasTaskZS)&&(this._hasTaskZS=r?n:l,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=e,n.onScheduleTask||(this._scheduleTaskZS=l,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this.zone),n.onInvokeTask||(this._invokeTaskZS=l,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this.zone),n.onCancelTask||(this._cancelTaskZS=l,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this.zone))}return e.prototype.fork=function(e,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,t):new s(e,t)},e.prototype.intercept=function(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,e,t,n):t},e.prototype.invoke=function(e,t,n,r,o){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,e,t,n,r,o):t.apply(n,r)},e.prototype.handleError=function(e,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,e,t)},e.prototype.scheduleTask=function(e,t){var n=t;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),(n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,e,t))||(n=t);else if(t.scheduleFn)t.scheduleFn(t);else{if(t.type!=O)throw new Error("Task is missing scheduleFn.");k(t)}return n},e.prototype.invokeTask=function(e,t,n,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,e,t,n,r):t.callback.apply(n,r)},e.prototype.cancelTask=function(e,t){var n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,e,t);else{if(!t.cancelFn)throw Error("Task is not cancelable");n=t.cancelFn(t)}return n},e.prototype.hasTask=function(e,t){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,e,t)}catch(t){this.handleError(e,t)}},e.prototype._updateTaskCount=function(e,t){var n=this._taskCounts,r=n[e],o=n[e]=r+t;if(o<0)throw new Error("More tasks executed then were scheduled.");0!=r&&0!=o||this.hasTask(this.zone,{microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e})},e}(),h=function(){function t(n,r,o,a,i,c){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=n,this.source=r,this.data=a,this.scheduleFn=i,this.cancelFn=c,!o)throw new Error("callback is not defined");this.callback=o;var s=this;this.invoke=n===j&&a&&a.useG?t.invokeTask:function(){return t.invokeTask.call(e,s,this,arguments)}}return t.invokeTask=function(e,t,n){e||(e=this),M++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{1==M&&m(),M--}},Object.defineProperty(t.prototype,"zone",{get:function(){return this._zone},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),t.prototype.cancelScheduleRequest=function(){this._transitionTo(b,E)},t.prototype._transitionTo=function(e,t,n){if(this._state!==t&&this._state!==n)throw new Error("".concat(this.type," '").concat(this.source,"': can not transition to '").concat(e,"', expecting state '").concat(t,"'").concat(n?" or '"+n+"'":"",", was '").concat(this._state,"'."));this._state=e,e==b&&(this._zoneDelegates=null)},t.prototype.toString=function(){return this.data&&void 0!==this.data.handleId?this.data.handleId.toString():Object.prototype.toString.call(this)},t.prototype.toJSON=function(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}},t}(),p=i("setTimeout"),v=i("Promise"),d=i("then"),_=[],g=!1;function y(t){if(u||e[v]&&(u=e[v].resolve(0)),u){var n=u[d];n||(n=u.then),n.call(u,t)}else e[p](t,0)}function k(e){0===M&&0===_.length&&y(m),e&&_.push(e)}function m(){if(!g){for(g=!0;_.length;){var e=_;_=[];for(var t=0;t<e.length;t++){var n=e[t];try{n.zone.runTask(n,null,null)}catch(e){I.onUnhandledError(e)}}}I.microtaskDrainDone(),g=!1}}var T={name:"NO ZONE"},b="notScheduled",E="scheduling",w="scheduled",Z="running",S="canceling",P="unknown",O="microTask",D="macroTask",j="eventTask",C={},I={symbol:i,currentZoneFrame:function(){return z},onUnhandledError:N,microtaskDrainDone:N,scheduleMicroTask:k,showUncaughtError:function(){return!s[i("ignoreConsoleErrorUncaughtError")]},patchEventTarget:function(){return[]},patchOnProperties:N,patchMethod:function(){return N},bindArguments:function(){return[]},patchThen:function(){return N},patchMacroTask:function(){return N},patchEventPrototype:function(){return N},isIEOrEdge:function(){return!1},getGlobalObjects:function(){},ObjectDefineProperty:function(){return N},ObjectGetOwnPropertyDescriptor:function(){},ObjectCreate:function(){},ArraySlice:function(){return[]},patchClass:function(){return N},wrapWithCurrentZone:function(){return N},filterProperties:function(){return[]},attachOriginToPatched:function(){return N},_redefineProperty:function(){return N},patchCallbacks:function(){return N},nativeScheduleMicroTask:y},z={parent:null,zone:new s(null,null)},R=null,M=0;function N(){}o("Zone","Zone"),e.Zone=s}(globalThis);var e=Object.getOwnPropertyDescriptor,t=Object.defineProperty,n=Object.getPrototypeOf,r=Object.create,o=Array.prototype.slice,a="addEventListener",i="removeEventListener",c=Zone.__symbol__(a),s=Zone.__symbol__(i),u="true",l="false",f=Zone.__symbol__("");function h(e,t){return Zone.current.wrap(e,t)}function p(e,t,n,r,o){return Zone.current.scheduleMacroTask(e,t,n,r,o)}var v=Zone.__symbol__,d="undefined"!=typeof window,_=d?window:void 0,g=d&&_||globalThis,y="removeAttribute";function k(e,t){for(var n=e.length-1;n>=0;n--)"function"==typeof e[n]&&(e[n]=h(e[n],t+"_"+n));return e}function m(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&void 0===e.set)}var T="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,b=!("nw"in g)&&void 0!==g.process&&"[object process]"==={}.toString.call(g.process),E=!b&&!T&&!(!d||!_.HTMLElement),w=void 0!==g.process&&"[object process]"==={}.toString.call(g.process)&&!T&&!(!d||!_.HTMLElement),Z={},S=function(e){if(e=e||g.event){var t=Z[e.type];t||(t=Z[e.type]=v("ON_PROPERTY"+e.type));var n,r=this||e.target||g,o=r[t];return E&&r===_&&"error"===e.type?!0===(n=o&&o.call(this,e.message,e.filename,e.lineno,e.colno,e.error))&&e.preventDefault():null==(n=o&&o.apply(this,arguments))||n||e.preventDefault(),n}};function P(n,r,o){var a=e(n,r);if(!a&&o&&e(o,r)&&(a={enumerable:!0,configurable:!0}),a&&a.configurable){var i=v("on"+r+"patched");if(!n.hasOwnProperty(i)||!n[i]){delete a.writable,delete a.value;var c=a.get,s=a.set,u=r.slice(2),l=Z[u];l||(l=Z[u]=v("ON_PROPERTY"+u)),a.set=function(e){var t=this;t||n!==g||(t=g),t&&("function"==typeof t[l]&&t.removeEventListener(u,S),s&&s.call(t,null),t[l]=e,"function"==typeof e&&t.addEventListener(u,S,!1))},a.get=function(){var e=this;if(e||n!==g||(e=g),!e)return null;var t=e[l];if(t)return t;if(c){var o=c.call(this);if(o)return a.set.call(this,o),"function"==typeof e[y]&&e.removeAttribute(r),o}return null},t(n,r,a),n[i]=!0}}}function O(e,t,n){if(t)for(var r=0;r<t.length;r++)P(e,"on"+t[r],n);else{var o=[];for(var a in e)"on"==a.slice(0,2)&&o.push(a);for(var i=0;i<o.length;i++)P(e,o[i],n)}}var D=v("originalInstance");function j(e){var n=g[e];if(n){g[v(e)]=n,g[e]=function(){var t=k(arguments,e);switch(t.length){case 0:this[D]=new n;break;case 1:this[D]=new n(t[0]);break;case 2:this[D]=new n(t[0],t[1]);break;case 3:this[D]=new n(t[0],t[1],t[2]);break;case 4:this[D]=new n(t[0],t[1],t[2],t[3]);break;default:throw new Error("Arg list too long.")}},R(g[e],n);var r,o=new n((function(){}));for(r in o)"XMLHttpRequest"===e&&"responseBlob"===r||function(n){"function"==typeof o[n]?g[e].prototype[n]=function(){return this[D][n].apply(this[D],arguments)}:t(g[e].prototype,n,{set:function(t){"function"==typeof t?(this[D][n]=h(t,e+"."+n),R(this[D][n],t)):this[D][n]=t},get:function(){return this[D][n]}})}(r);for(r in n)"prototype"!==r&&n.hasOwnProperty(r)&&(g[e][r]=n[r])}}var C=!1;function I(t,r,o){for(var a=t;a&&!a.hasOwnProperty(r);)a=n(a);!a&&t[r]&&(a=t);var i=v(r),c=null;if(a&&(!(c=a[i])||!a.hasOwnProperty(i))&&(c=a[i]=a[r],m(a&&e(a,r)))){var s=o(c,i,r);a[r]=function(){return s(this,arguments)},R(a[r],c),C&&function e(t,n){"function"==typeof Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach((function(e){var r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,{get:function(){return t[e]},set:function(n){(!r||r.writable&&"function"==typeof r.set)&&(t[e]=n)},enumerable:!r||r.enumerable,configurable:!r||r.configurable})}))}(c,a[r])}return c}function z(e,t,n){var r=null;function o(e){var t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},r.apply(t.target,t.args),e}r=I(e,t,(function(e){return function(t,r){var a=n(t,r);return a.cbIdx>=0&&"function"==typeof r[a.cbIdx]?p(a.name,r[a.cbIdx],a,o):e.apply(t,r)}}))}function R(e,t){e[v("OriginalDelegate")]=t}var M=!1,N=!1;function x(){if(M)return N;M=!0;try{var e=_.navigator.userAgent;-1===e.indexOf("MSIE ")&&-1===e.indexOf("Trident/")&&-1===e.indexOf("Edge/")||(N=!0)}catch(e){}return N}Zone.__load_patch("ZoneAwarePromise",(function(e,t,n){var r=Object.getOwnPropertyDescriptor,o=Object.defineProperty,a=n.symbol,i=[],c=!1!==e[a("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],s=a("Promise"),u=a("then"),l="__creationTrace__";n.onUnhandledError=function(e){if(n.showUncaughtError()){var t=e&&e.rejection;t?console.error("Unhandled Promise rejection:",t instanceof Error?t.message:t,"; Zone:",e.zone.name,"; Task:",e.task&&e.task.source,"; Value:",t,t instanceof Error?t.stack:void 0):console.error(e)}},n.microtaskDrainDone=function(){for(var e=function(){var e=i.shift();try{e.zone.runGuarded((function(){if(e.throwOriginal)throw e.rejection;throw e}))}catch(e){!function r(e){n.onUnhandledError(e);try{var r=t[f];"function"==typeof r&&r.call(this,e)}catch(e){}}(e)}};i.length;)e()};var f=a("unhandledPromiseRejectionHandler");function h(e){return e&&e.then}function p(e){return e}function v(e){return N.reject(e)}var d=a("state"),_=a("value"),g=a("finally"),y=a("parentPromiseValue"),k=a("parentPromiseState"),m="Promise.then",T=null,b=!0,E=!1,w=0;function Z(e,t){return function(n){try{D(e,t,n)}catch(t){D(e,!1,t)}}}var S=function(){var e=!1;return function t(n){return function(){e||(e=!0,n.apply(null,arguments))}}},P="Promise resolved with itself",O=a("currentTaskTrace");function D(e,r,a){var s=S();if(e===a)throw new TypeError(P);if(e[d]===T){var u=null;try{"object"!=typeof a&&"function"!=typeof a||(u=a&&a.then)}catch(t){return s((function(){D(e,!1,t)}))(),e}if(r!==E&&a instanceof N&&a.hasOwnProperty(d)&&a.hasOwnProperty(_)&&a[d]!==T)C(a),D(e,a[d],a[_]);else if(r!==E&&"function"==typeof u)try{u.call(a,s(Z(e,r)),s(Z(e,!1)))}catch(t){s((function(){D(e,!1,t)}))()}else{e[d]=r;var f=e[_];if(e[_]=a,e[g]===g&&r===b&&(e[d]=e[k],e[_]=e[y]),r===E&&a instanceof Error){var h=t.currentTask&&t.currentTask.data&&t.currentTask.data[l];h&&o(a,O,{configurable:!0,enumerable:!1,writable:!0,value:h})}for(var p=0;p<f.length;)z(e,f[p++],f[p++],f[p++],f[p++]);if(0==f.length&&r==E){e[d]=w;var v=a;try{throw new Error("Uncaught (in promise): "+function e(t){return t&&t.toString===Object.prototype.toString?(t.constructor&&t.constructor.name||"")+": "+JSON.stringify(t):t?t.toString():Object.prototype.toString.call(t)}(a)+(a&&a.stack?"\n"+a.stack:""))}catch(e){v=e}c&&(v.throwOriginal=!0),v.rejection=a,v.promise=e,v.zone=t.current,v.task=t.currentTask,i.push(v),n.scheduleMicroTask()}}}return e}var j=a("rejectionHandledHandler");function C(e){if(e[d]===w){try{var n=t[j];n&&"function"==typeof n&&n.call(this,{rejection:e[_],promise:e})}catch(e){}e[d]=E;for(var r=0;r<i.length;r++)e===i[r].promise&&i.splice(r,1)}}function z(e,t,n,r,o){C(e);var a=e[d],i=a?"function"==typeof r?r:p:"function"==typeof o?o:v;t.scheduleMicroTask(m,(function(){try{var r=e[_],o=!!n&&g===n[g];o&&(n[y]=r,n[k]=a);var c=t.run(i,void 0,o&&i!==v&&i!==p?[]:[r]);D(n,!0,c)}catch(e){D(n,!1,e)}}),n)}var R=function(){},M=e.AggregateError,N=function(){function e(t){var n=this;if(!(n instanceof e))throw new Error("Must be an instanceof Promise.");n[d]=T,n[_]=[];try{var r=S();t&&t(r(Z(n,b)),r(Z(n,E)))}catch(e){D(n,!1,e)}}return e.toString=function(){return"function ZoneAwarePromise() { [native code] }"},e.resolve=function(t){return t instanceof e?t:D(new this(null),b,t)},e.reject=function(e){return D(new this(null),E,e)},e.withResolvers=function(){var t={};return t.promise=new e((function(e,n){t.resolve=e,t.reject=n})),t},e.any=function(t){if(!t||"function"!=typeof t[Symbol.iterator])return Promise.reject(new M([],"All promises were rejected"));var n=[],r=0;try{for(var o=0,a=t;o<a.length;o++)r++,n.push(e.resolve(a[o]))}catch(e){return Promise.reject(new M([],"All promises were rejected"))}if(0===r)return Promise.reject(new M([],"All promises were rejected"));var i=!1,c=[];return new e((function(e,t){for(var o=0;o<n.length;o++)n[o].then((function(t){i||(i=!0,e(t))}),(function(e){c.push(e),0==--r&&(i=!0,t(new M(c,"All promises were rejected")))}))}))},e.race=function(e){var t,n,r=new this((function(e,r){t=e,n=r}));function o(e){t(e)}function a(e){n(e)}for(var i=0,c=e;i<c.length;i++){var s=c[i];h(s)||(s=this.resolve(s)),s.then(o,a)}return r},e.all=function(t){return e.allWithCallback(t)},e.allSettled=function(t){return(this&&this.prototype instanceof e?this:e).allWithCallback(t,{thenCallback:function(e){return{status:"fulfilled",value:e}},errorCallback:function(e){return{status:"rejected",reason:e}}})},e.allWithCallback=function(e,t){for(var n,r,o=new this((function(e,t){n=e,r=t})),a=2,i=0,c=[],s=function(e){h(e)||(e=u.resolve(e));var o=i;try{e.then((function(e){c[o]=t?t.thenCallback(e):e,0==--a&&n(c)}),(function(e){t?(c[o]=t.errorCallback(e),0==--a&&n(c)):r(e)}))}catch(e){r(e)}a++,i++},u=this,l=0,f=e;l<f.length;l++)s(f[l]);return 0==(a-=2)&&n(c),o},Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"Promise"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.then=function(n,r){var o,a=null===(o=this.constructor)||void 0===o?void 0:o[Symbol.species];a&&"function"==typeof a||(a=this.constructor||e);var i=new a(R),c=t.current;return this[d]==T?this[_].push(c,i,n,r):z(this,c,i,n,r),i},e.prototype.catch=function(e){return this.then(null,e)},e.prototype.finally=function(n){var r,o=null===(r=this.constructor)||void 0===r?void 0:r[Symbol.species];o&&"function"==typeof o||(o=e);var a=new o(R);a[g]=g;var i=t.current;return this[d]==T?this[_].push(i,a,n,n):z(this,i,a,n,n),a},e}();N.resolve=N.resolve,N.reject=N.reject,N.race=N.race,N.all=N.all;var x=e[s]=e.Promise;e.Promise=N;var A=a("thenPatched");function L(e){var t=e.prototype,n=r(t,"then");if(!n||!1!==n.writable&&n.configurable){var o=t.then;t[u]=o,e.prototype.then=function(e,t){var n=this;return new N((function(e,t){o.call(n,e,t)})).then(e,t)},e[A]=!0}}return n.patchThen=L,x&&(L(x),I(e,"fetch",(function(e){return function t(e){return function(t,n){var r=e.apply(t,n);if(r instanceof N)return r;var o=r.constructor;return o[A]||L(o),r}}(e)}))),Promise[t.__symbol__("uncaughtPromiseErrors")]=i,N})),Zone.__load_patch("toString",(function(e){var t=Function.prototype.toString,n=v("OriginalDelegate"),r=v("Promise"),o=v("Error"),a=function a(){if("function"==typeof this){var i=this[n];if(i)return"function"==typeof i?t.call(i):Object.prototype.toString.call(i);if(this===Promise){var c=e[r];if(c)return t.call(c)}if(this===Error){var s=e[o];if(s)return t.call(s)}}return t.call(this)};a[n]=t,Function.prototype.toString=a;var i=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":i.call(this)}}));var A=!1;if("undefined"!=typeof window)try{var L=Object.defineProperty({},"passive",{get:function(){A=!0}});window.addEventListener("test",L,L),window.removeEventListener("test",L,L)}catch(e){A=!1}var H={useG:!0},F={},q={},G=new RegExp("^"+f+"(\\w+)(true|false)$"),B=v("propagationStopped");function U(e,t){var n=(t?t(e):e)+l,r=(t?t(e):e)+u,o=f+n,a=f+r;F[e]={},F[e][l]=o,F[e][u]=a}function W(e,t,r,o){var c=o&&o.add||a,s=o&&o.rm||i,h=o&&o.listeners||"eventListeners",p=o&&o.rmAll||"removeAllListeners",d=v(c),_="."+c+":",g="prependListener",y="."+g+":",k=function(e,t,n){if(!e.isRemoved){var r,o=e.callback;"object"==typeof o&&o.handleEvent&&(e.callback=function(e){return o.handleEvent(e)},e.originalDelegate=o);try{e.invoke(e,t,[n])}catch(e){r=e}var a=e.options;return a&&"object"==typeof a&&a.once&&t[s].call(t,n.type,e.originalDelegate?e.originalDelegate:e.callback,a),r}};function m(n,r,o){if(r=r||e.event){var a=n||r.target||e,i=a[F[r.type][o?u:l]];if(i){var c=[];if(1===i.length)(h=k(i[0],a,r))&&c.push(h);else for(var s=i.slice(),f=0;f<s.length&&(!r||!0!==r[B]);f++){var h;(h=k(s[f],a,r))&&c.push(h)}if(1===c.length)throw c[0];var p=function(e){var n=c[e];t.nativeScheduleMicroTask((function(){throw n}))};for(f=0;f<c.length;f++)p(f)}}}var T=function(e){return m(this,e,!1)},E=function(e){return m(this,e,!0)};function w(t,r){if(!t)return!1;var o=!0;r&&void 0!==r.useG&&(o=r.useG);var a=r&&r.vh,i=!0;r&&void 0!==r.chkDup&&(i=r.chkDup);var k=!1;r&&void 0!==r.rt&&(k=r.rt);for(var m=t;m&&!m.hasOwnProperty(c);)m=n(m);if(!m&&t[c]&&(m=t),!m)return!1;if(m[d])return!1;var w,Z=r&&r.eventNameToString,S={},P=m[d]=m[c],O=m[v(s)]=m[s],D=m[v(h)]=m[h],j=m[v(p)]=m[p];r&&r.prepend&&(w=m[v(r.prepend)]=m[r.prepend]);var C=o?function(e){if(!S.isExisting)return P.call(S.target,S.eventName,S.capture?E:T,S.options)}:function(e){return P.call(S.target,S.eventName,e.invoke,S.options)},I=o?function(e){if(!e.isRemoved){var t=F[e.eventName],n=void 0;t&&(n=t[e.capture?u:l]);var r=n&&e.target[n];if(r)for(var o=0;o<r.length;o++)if(r[o]===e){r.splice(o,1),e.isRemoved=!0,0===r.length&&(e.allRemoved=!0,e.target[n]=null);break}}if(e.allRemoved)return O.call(e.target,e.eventName,e.capture?E:T,e.options)}:function(e){return O.call(e.target,e.eventName,e.invoke,e.options)},z=r&&r.diff?r.diff:function(e,t){var n=typeof t;return"function"===n&&e.callback===t||"object"===n&&e.originalDelegate===t},M=Zone[v("UNPATCHED_EVENTS")],N=e[v("PASSIVE_EVENTS")],x=function(t,n,c,s,f,h){return void 0===f&&(f=!1),void 0===h&&(h=!1),function(){var p=this||e,v=arguments[0];r&&r.transferEventName&&(v=r.transferEventName(v));var d=arguments[1];if(!d)return t.apply(this,arguments);if(b&&"uncaughtException"===v)return t.apply(this,arguments);var _=!1;if("function"!=typeof d){if(!d.handleEvent)return t.apply(this,arguments);_=!0}if(!a||a(t,d,p,arguments)){var g=A&&!!N&&-1!==N.indexOf(v),y=function e(t,n){return!A&&"object"==typeof t&&t?!!t.capture:A&&n?"boolean"==typeof t?{capture:t,passive:!0}:t?"object"==typeof t&&!1!==t.passive?__assign(__assign({},t),{passive:!0}):t:{passive:!0}:t}(arguments[2],g),k=y&&"object"==typeof y&&y.signal&&"object"==typeof y.signal?y.signal:void 0;if(!(null==k?void 0:k.aborted)){if(M)for(var m=0;m<M.length;m++)if(v===M[m])return g?t.call(p,v,d,y):t.apply(this,arguments);var T=!!y&&("boolean"==typeof y||y.capture),E=!(!y||"object"!=typeof y)&&y.once,w=Zone.current,P=F[v];P||(U(v,Z),P=F[v]);var O,D=P[T?u:l],j=p[D],C=!1;if(j){if(C=!0,i)for(m=0;m<j.length;m++)if(z(j[m],d))return}else j=p[D]=[];var I=p.constructor.name,R=q[I];R&&(O=R[v]),O||(O=I+n+(Z?Z(v):v)),S.options=y,E&&(S.options.once=!1),S.target=p,S.capture=T,S.eventName=v,S.isExisting=C;var x=o?H:void 0;x&&(x.taskData=S),k&&(S.options.signal=void 0);var L=w.scheduleEventTask(O,d,x,c,s);return k&&(S.options.signal=k,t.call(k,"abort",(function(){L.zone.cancelTask(L)}),{once:!0})),S.target=null,x&&(x.taskData=null),E&&(y.once=!0),(A||"boolean"!=typeof L.options)&&(L.options=y),L.target=p,L.capture=T,L.eventName=v,_&&(L.originalDelegate=d),h?j.unshift(L):j.push(L),f?p:void 0}}}};return m[c]=x(P,_,C,I,k),w&&(m[g]=x(w,y,(function(e){return w.call(S.target,S.eventName,e.invoke,S.options)}),I,k,!0)),m[s]=function(){var t=this||e,n=arguments[0];r&&r.transferEventName&&(n=r.transferEventName(n));var o=arguments[2],i=!!o&&("boolean"==typeof o||o.capture),c=arguments[1];if(!c)return O.apply(this,arguments);if(!a||a(O,c,t,arguments)){var s,h=F[n];h&&(s=h[i?u:l]);var p=s&&t[s];if(p)for(var v=0;v<p.length;v++){var d=p[v];if(z(d,c))return p.splice(v,1),d.isRemoved=!0,0===p.length&&(d.allRemoved=!0,t[s]=null,"string"==typeof n&&(t[f+"ON_PROPERTY"+n]=null)),d.zone.cancelTask(d),k?t:void 0}return O.apply(this,arguments)}},m[h]=function(){var t=this||e,n=arguments[0];r&&r.transferEventName&&(n=r.transferEventName(n));for(var o=[],a=V(t,Z?Z(n):n),i=0;i<a.length;i++){var c=a[i];o.push(c.originalDelegate?c.originalDelegate:c.callback)}return o},m[p]=function(){var t=this||e,n=arguments[0];if(n){r&&r.transferEventName&&(n=r.transferEventName(n));var o=F[n];if(o){var a=t[o[l]],i=t[o[u]];if(a){var c=a.slice();for(v=0;v<c.length;v++)this[s].call(this,n,(f=c[v]).originalDelegate?f.originalDelegate:f.callback,f.options)}if(i)for(c=i.slice(),v=0;v<c.length;v++){var f;this[s].call(this,n,(f=c[v]).originalDelegate?f.originalDelegate:f.callback,f.options)}}}else{for(var h=Object.keys(t),v=0;v<h.length;v++){var d=G.exec(h[v]),_=d&&d[1];_&&"removeListener"!==_&&this[p].call(this,_)}this[p].call(this,"removeListener")}if(k)return this},R(m[c],P),R(m[s],O),j&&R(m[p],j),D&&R(m[h],D),!0}for(var Z=[],S=0;S<r.length;S++)Z[S]=w(r[S],o);return Z}function V(e,t){if(!t){var n=[];for(var r in e){var o=G.exec(r),a=o&&o[1];if(a&&(!t||a===t)){var i=e[r];if(i)for(var c=0;c<i.length;c++)n.push(i[c])}}return n}var s=F[t];s||(U(t),s=F[t]);var f=e[s[l]],h=e[s[u]];return f?h?f.concat(h):f.slice():h?h.slice():[]}function X(e,t){var n=e.Event;n&&n.prototype&&t.patchMethod(n.prototype,"stopImmediatePropagation",(function(e){return function(t,n){t[B]=!0,e&&e.apply(t,n)}}))}function Y(e,t,n,r,o){var a=Zone.__symbol__(r);if(!t[a]){var i=t[a]=t[r];t[r]=function(a,c,s){return c&&c.prototype&&o.forEach((function(t){var o="".concat(n,".").concat(r,"::")+t,a=c.prototype;try{if(a.hasOwnProperty(t)){var i=e.ObjectGetOwnPropertyDescriptor(a,t);i&&i.value?(i.value=e.wrapWithCurrentZone(i.value,o),e._redefineProperty(c.prototype,t,i)):a[t]&&(a[t]=e.wrapWithCurrentZone(a[t],o))}else a[t]&&(a[t]=e.wrapWithCurrentZone(a[t],o))}catch(e){}})),i.call(t,a,c,s)},e.attachOriginToPatched(t[r],i)}}function J(e,t,n){if(!n||0===n.length)return t;var r=n.filter((function(t){return t.target===e}));if(!r||0===r.length)return t;var o=r[0].ignoreProperties;return t.filter((function(e){return-1===o.indexOf(e)}))}function K(e,t,n,r){e&&O(e,J(e,t,n),r)}function $(e){return Object.getOwnPropertyNames(e).filter((function(e){return e.startsWith("on")&&e.length>2})).map((function(e){return e.substring(2)}))}function Q(e,t){if((!b||w)&&!Zone[e.symbol("patchEvents")]){var r=t.__Zone_ignore_on_properties,o=[];if(E){var a=window;o=o.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);var i=function e(){try{var e=_.navigator.userAgent;if(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/"))return!0}catch(e){}return!1}()?[{target:a,ignoreProperties:["error"]}]:[];K(a,$(a),r?r.concat(i):r,n(a))}o=o.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(var c=0;c<o.length;c++){var s=t[o[c]];s&&s.prototype&&K(s.prototype,$(s.prototype),r)}}}function ee(e,t){t.patchMethod(e,"queueMicrotask",(function(e){return function(e,t){Zone.current.scheduleMicroTask("queueMicrotask",t[0])}}))}Zone.__load_patch("util",(function(n,c,s){var p=$(n);s.patchOnProperties=O,s.patchMethod=I,s.bindArguments=k,s.patchMacroTask=z;var v=c.__symbol__("BLACK_LISTED_EVENTS"),d=c.__symbol__("UNPATCHED_EVENTS");n[d]&&(n[v]=n[d]),n[v]&&(c[v]=c[d]=n[v]),s.patchEventPrototype=X,s.patchEventTarget=W,s.isIEOrEdge=x,s.ObjectDefineProperty=t,s.ObjectGetOwnPropertyDescriptor=e,s.ObjectCreate=r,s.ArraySlice=o,s.patchClass=j,s.wrapWithCurrentZone=h,s.filterProperties=J,s.attachOriginToPatched=R,s._redefineProperty=Object.defineProperty,s.patchCallbacks=Y,s.getGlobalObjects=function(){return{globalSources:q,zoneSymbolEventNames:F,eventNames:p,isBrowser:E,isMix:w,isNode:b,TRUE_STR:u,FALSE_STR:l,ZONE_SYMBOL_PREFIX:f,ADD_EVENT_LISTENER_STR:a,REMOVE_EVENT_LISTENER_STR:i}}}));var te=v("zoneTask");function ne(e,t,n,r){var o=null,a=null;n+=r;var i={};function c(t){var n=t.data;return n.args[0]=function(){return t.invoke.apply(this,arguments)},n.handleId=o.apply(e,n.args),t}function s(t){return a.call(e,t.data.handleId)}o=I(e,t+=r,(function(n){return function(o,a){if("function"==typeof a[0]){var u={isPeriodic:"Interval"===r,delay:"Timeout"===r||"Interval"===r?a[1]||0:void 0,args:a},l=a[0];a[0]=function e(){try{return l.apply(this,arguments)}finally{u.isPeriodic||("number"==typeof u.handleId?delete i[u.handleId]:u.handleId&&(u.handleId[te]=null))}};var f=p(t,a[0],u,c,s);if(!f)return f;var h=f.data.handleId;return"number"==typeof h?i[h]=f:h&&(h[te]=f),h&&h.ref&&h.unref&&"function"==typeof h.ref&&"function"==typeof h.unref&&(f.ref=h.ref.bind(h),f.unref=h.unref.bind(h)),"number"==typeof h||h?h:f}return n.apply(e,a)}})),a=I(e,n,(function(t){return function(n,r){var o,a=r[0];"number"==typeof a?o=i[a]:(o=a&&a[te])||(o=a),o&&"string"==typeof o.type?"notScheduled"!==o.state&&(o.cancelFn&&o.data.isPeriodic||0===o.runCount)&&("number"==typeof a?delete i[a]:a&&(a[te]=null),o.zone.cancelTask(o)):t.apply(e,r)}}))}function re(e,t){if(!Zone[t.symbol("patchEventTarget")]){for(var n=t.getGlobalObjects(),r=n.eventNames,o=n.zoneSymbolEventNames,a=n.TRUE_STR,i=n.FALSE_STR,c=n.ZONE_SYMBOL_PREFIX,s=0;s<r.length;s++){var u=r[s],l=c+(u+i),f=c+(u+a);o[u]={},o[u][i]=l,o[u][a]=f}var h=e.EventTarget;if(h&&h.prototype)return t.patchEventTarget(e,t,[h&&h.prototype]),!0}}Zone.__load_patch("legacy",(function(e){var t=e[Zone.__symbol__("legacyPatch")];t&&t()})),Zone.__load_patch("timers",(function(e){var t="set",n="clear";ne(e,t,n,"Timeout"),ne(e,t,n,"Interval"),ne(e,t,n,"Immediate")})),Zone.__load_patch("requestAnimationFrame",(function(e){ne(e,"request","cancel","AnimationFrame"),ne(e,"mozRequest","mozCancel","AnimationFrame"),ne(e,"webkitRequest","webkitCancel","AnimationFrame")})),Zone.__load_patch("blocking",(function(e,t){for(var n=["alert","prompt","confirm"],r=0;r<n.length;r++)I(e,n[r],(function(n,r,o){return function(r,a){return t.current.run(n,e,a,o)}}))})),Zone.__load_patch("EventTarget",(function(e,t,n){!function r(e,t){t.patchEventPrototype(e,t)}(e,n),re(e,n);var o=e.XMLHttpRequestEventTarget;o&&o.prototype&&n.patchEventTarget(e,n,[o.prototype])})),Zone.__load_patch("MutationObserver",(function(e,t,n){j("MutationObserver"),j("WebKitMutationObserver")})),Zone.__load_patch("IntersectionObserver",(function(e,t,n){j("IntersectionObserver")})),Zone.__load_patch("FileReader",(function(e,t,n){j("FileReader")})),Zone.__load_patch("on_property",(function(e,t,n){Q(n,e)})),Zone.__load_patch("customElements",(function(e,t,n){!function r(e,t){var n=t.getGlobalObjects();(n.isBrowser||n.isMix)&&e.customElements&&"customElements"in e&&t.patchCallbacks(t,e.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback","formAssociatedCallback","formDisabledCallback","formResetCallback","formStateRestoreCallback"])}(e,n)})),Zone.__load_patch("XHR",(function(e,t){!function n(e){var n=e.XMLHttpRequest;if(n){var f=n.prototype,h=f[c],d=f[s];if(!h){var _=e.XMLHttpRequestEventTarget;if(_){var g=_.prototype;h=g[c],d=g[s]}}var y="readystatechange",k="scheduled",m=I(f,"open",(function(){return function(e,t){return e[o]=0==t[2],e[u]=t[1],m.apply(e,t)}})),T=v("fetchTaskAborting"),b=v("fetchTaskScheduling"),E=I(f,"send",(function(){return function(e,n){if(!0===t.current[b])return E.apply(e,n);if(e[o])return E.apply(e,n);var r={target:e,url:e[u],isPeriodic:!1,args:n,aborted:!1},a=p("XMLHttpRequest.send",S,r,Z,P);e&&!0===e[l]&&!r.aborted&&a.state===k&&a.invoke()}})),w=I(f,"abort",(function(){return function(e,n){var o=function a(e){return e[r]}(e);if(o&&"string"==typeof o.type){if(null==o.cancelFn||o.data&&o.data.aborted)return;o.zone.cancelTask(o)}else if(!0===t.current[T])return w.apply(e,n)}}))}function Z(e){var n=e.data,o=n.target;o[i]=!1,o[l]=!1;var u=o[a];h||(h=o[c],d=o[s]),u&&d.call(o,y,u);var f=o[a]=function(){if(o.readyState===o.DONE)if(!n.aborted&&o[i]&&e.state===k){var r=o[t.__symbol__("loadfalse")];if(0!==o.status&&r&&r.length>0){var a=e.invoke;e.invoke=function(){for(var r=o[t.__symbol__("loadfalse")],i=0;i<r.length;i++)r[i]===e&&r.splice(i,1);n.aborted||e.state!==k||a.call(e)},r.push(e)}else e.invoke()}else n.aborted||!1!==o[i]||(o[l]=!0)};return h.call(o,y,f),o[r]||(o[r]=e),E.apply(o,n.args),o[i]=!0,e}function S(){}function P(e){var t=e.data;return t.aborted=!0,w.apply(t.target,t.args)}}(e);var r=v("xhrTask"),o=v("xhrSync"),a=v("xhrListener"),i=v("xhrScheduled"),u=v("xhrURL"),l=v("xhrErrorBeforeScheduled")})),Zone.__load_patch("geolocation",(function(t){t.navigator&&t.navigator.geolocation&&function n(t,r){for(var o=t.constructor.name,a=function(n){var a=r[n],i=t[a];if(i){if(!m(e(t,a)))return"continue";t[a]=function(e){var t=function(){return e.apply(this,k(arguments,o+"."+a))};return R(t,e),t}(i)}},i=0;i<r.length;i++)a(i)}(t.navigator.geolocation,["getCurrentPosition","watchPosition"])})),Zone.__load_patch("PromiseRejectionEvent",(function(e,t){function n(t){return function(n){V(e,t).forEach((function(r){var o=e.PromiseRejectionEvent;if(o){var a=new o(t,{promise:n.promise,reason:n.rejection});r.invoke(a)}}))}}e.PromiseRejectionEvent&&(t[v("unhandledPromiseRejectionHandler")]=n("unhandledrejection"),t[v("rejectionHandledHandler")]=n("rejectionhandled"))})),Zone.__load_patch("queueMicrotask",(function(e,t,n){ee(e,n)})),Zone.__load_patch("node_util",(function(e,t,n){n.patchOnProperties=O,n.patchMethod=I,n.bindArguments=k,n.patchMacroTask=z,function r(e){C=e}(!0)})),Zone.__load_patch("EventEmitter",(function(e,t,n){var r,o="addListener",a="removeListener",i=function(e,t){return e.callback===t||e.callback.listener===t},c=function(e){return"string"==typeof e?e:e?e.toString().replace("(","_").replace(")","_"):""};try{r=require("events")}catch(e){}r&&r.EventEmitter&&function s(t){var r=W(e,n,[t],{useG:!1,add:o,rm:a,prepend:"prependListener",rmAll:"removeAllListeners",listeners:"listeners",chkDup:!1,rt:!0,diff:i,eventNameToString:c});r&&r[0]&&(t.on=t[o],t.off=t[a])}(r.EventEmitter.prototype)})),Zone.__load_patch("fs",(function(e,t,n){var r,o;try{o=require("fs")}catch(e){}if(o){["access","appendFile","chmod","chown","close","exists","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","read","readdir","readFile","readlink","realpath","rename","rmdir","stat","symlink","truncate","unlink","utimes","write","writeFile"].filter((function(e){return!!o[e]&&"function"==typeof o[e]})).forEach((function(e){z(o,e,(function(t,n){return{name:"fs."+e,args:n,cbIdx:n.length>0?n.length-1:-1,target:t}}))}));var a=null===(r=o.realpath)||void 0===r?void 0:r[n.symbol("OriginalDelegate")];(null==a?void 0:a.native)&&(o.realpath.native=a.native,z(o.realpath,"native",(function(e,t){return{args:t,target:e,cbIdx:t.length>0?t.length-1:-1,name:"fs.realpath.native"}})))}}));var oe="set",ae="clear";Zone.__load_patch("node_timers",(function(e,t){var n=!1;try{var r=require("timers");if(e.setTimeout!==r.setTimeout&&!w){var o=r.setTimeout;r.setTimeout=function(){return n=!0,o.apply(this,arguments)};var a=e.setTimeout((function(){}),100);clearTimeout(a),r.setTimeout=o}ne(r,oe,ae,"Timeout"),ne(r,oe,ae,"Interval"),ne(r,oe,ae,"Immediate")}catch(e){}w||(n?(e[t.__symbol__("setTimeout")]=e.setTimeout,e[t.__symbol__("setInterval")]=e.setInterval,e[t.__symbol__("setImmediate")]=e.setImmediate):(ne(e,oe,ae,"Timeout"),ne(e,oe,ae,"Interval"),ne(e,oe,ae,"Immediate")))})),Zone.__load_patch("nextTick",(function(){!function e(t,n,r){var o=null;function a(e){var t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},o.apply(t.target,t.args),e}o=I(t,n,(function(e){return function(t,n){var o=r(t,n);return o.cbIdx>=0&&"function"==typeof n[o.cbIdx]?Zone.current.scheduleMicroTask(o.name,n[o.cbIdx],o,a):e.apply(t,n)}}))}(process,"nextTick",(function(e,t){return{name:"process.nextTick",args:t,cbIdx:t.length>0&&"function"==typeof t[0]?0:-1,target:process}}))})),Zone.__load_patch("handleUnhandledPromiseRejection",(function(e,t,n){function r(e){return function(t){V(process,e).forEach((function(n){"unhandledRejection"===e?n.invoke(t.rejection,t.promise):"rejectionHandled"===e&&n.invoke(t.promise)}))}}t[n.symbol("unhandledPromiseRejectionHandler")]=r("unhandledRejection"),t[n.symbol("rejectionHandledHandler")]=r("rejectionHandled")})),Zone.__load_patch("crypto",(function(){var e;try{e=require("crypto")}catch(e){}e&&["randomBytes","pbkdf2"].forEach((function(t){z(e,t,(function(n,r){return{name:"crypto."+t,args:r,cbIdx:r.length>0&&"function"==typeof r[r.length-1]?r.length-1:-1,target:e}}))}))})),Zone.__load_patch("console",(function(e,t){["dir","log","info","error","warn","assert","debug","timeEnd","trace"].forEach((function(e){var n=console[t.__symbol__(e)]=console[e];n&&(console[e]=function(){var e=o.call(arguments);return t.current===t.root?n.apply(this,e):t.root.run(n,this,e)})}))})),Zone.__load_patch("queueMicrotask",(function(e,t,n){ee(e,n)}))}));
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){var e=globalThis;function t(t){return(e.__Zone_symbol_prefix||"__zone_symbol__")+t}function n(){var n,r=e.performance;function o(e){r&&r.mark&&r.mark(e)}function a(e,t){r&&r.measure&&r.measure(e,t)}o("Zone");var i=function(){function r(e,t){this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new u(this,this._parent&&this._parent._zoneDelegate,t)}return r.assertZonePatched=function(){if(e.Promise!==D.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")},Object.defineProperty(r,"root",{get:function(){for(var e=n.current;e.parent;)e=e.parent;return e},enumerable:!1,configurable:!0}),Object.defineProperty(r,"current",{get:function(){return C.zone},enumerable:!1,configurable:!0}),Object.defineProperty(r,"currentTask",{get:function(){return z},enumerable:!1,configurable:!0}),r.__load_patch=function(r,i,c){if(void 0===c&&(c=!1),D.hasOwnProperty(r)){var s=!0===e[t("forceDuplicateZoneCheck")];if(!c&&s)throw Error("Already loaded patch: "+r)}else if(!e["__Zone_disable_"+r]){var u="Zone:"+r;o(u),D[r]=i(e,n,j),a(u,u)}},Object.defineProperty(r.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),r.prototype.get=function(e){var t=this.getZoneWith(e);if(t)return t._properties[e]},r.prototype.getZoneWith=function(e){for(var t=this;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null},r.prototype.fork=function(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)},r.prototype.wrap=function(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);var n=this._zoneDelegate.intercept(this,e,t),r=this;return function(){return r.runGuarded(n,this,arguments,t)}},r.prototype.run=function(e,t,n,r){C={parent:C,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{C=C.parent}},r.prototype.runGuarded=function(e,t,n,r){void 0===t&&(t=null),C={parent:C,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{C=C.parent}},r.prototype.runTask=function(e,t,n){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||k).name+"; Execution: "+this.name+")");if(e.state!==m||e.type!==Z&&e.type!==O){var r=e.state!=E;r&&e._transitionTo(E,b),e.runCount++;var o=z;z=e,C={parent:C,zone:this};try{e.type==O&&e.data&&!e.data.isPeriodic&&(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,e,t,n)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{e.state!==m&&e.state!==S&&(e.type==Z||e.data&&e.data.isPeriodic?r&&e._transitionTo(b,E):(e.runCount=0,this._updateTaskCount(e,-1),r&&e._transitionTo(m,E,m))),C=C.parent,z=o}}},r.prototype.scheduleTask=function(e){if(e.zone&&e.zone!==this)for(var t=this;t;){if(t===e.zone)throw Error("can not reschedule task to ".concat(this.name," which is descendants of the original zone ").concat(e.zone.name));t=t.parent}e._transitionTo(T,m);var n=[];e._zoneDelegates=n,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(t){throw e._transitionTo(S,T,m),this._zoneDelegate.handleError(this,t),t}return e._zoneDelegates===n&&this._updateTaskCount(e,1),e.state==T&&e._transitionTo(b,T),e},r.prototype.scheduleMicroTask=function(e,t,n,r){return this.scheduleTask(new l(P,e,t,n,r,void 0))},r.prototype.scheduleMacroTask=function(e,t,n,r,o){return this.scheduleTask(new l(O,e,t,n,r,o))},r.prototype.scheduleEventTask=function(e,t,n,r,o){return this.scheduleTask(new l(Z,e,t,n,r,o))},r.prototype.cancelTask=function(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||k).name+"; Execution: "+this.name+")");if(e.state===b||e.state===E){e._transitionTo(w,b,E);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(S,w),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(m,w),e.runCount=0,e}},r.prototype._updateTaskCount=function(e,t){var n=e._zoneDelegates;-1==t&&(e._zoneDelegates=null);for(var r=0;r<n.length;r++)n[r]._updateTaskCount(e.type,t)},r}();(n=i).__symbol__=t;var c,s={name:"",onHasTask:function(e,t,n,r){return e.hasTask(n,r)},onScheduleTask:function(e,t,n,r){return e.scheduleTask(n,r)},onInvokeTask:function(e,t,n,r,o,a){return e.invokeTask(n,r,o,a)},onCancelTask:function(e,t,n,r){return e.cancelTask(n,r)}},u=function(){function e(e,t,n){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this._zone=e,this._parentDelegate=t,this._forkZS=n&&(n&&n.onFork?n:t._forkZS),this._forkDlgt=n&&(n.onFork?t:t._forkDlgt),this._forkCurrZone=n&&(n.onFork?this._zone:t._forkCurrZone),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this._zone:t._interceptCurrZone),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this._zone:t._invokeCurrZone),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this._zone:t._handleErrorCurrZone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this._zone:t._scheduleTaskCurrZone),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this._zone:t._invokeTaskCurrZone),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this._zone:t._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;var r=n&&n.onHasTask;(r||t&&t._hasTaskZS)&&(this._hasTaskZS=r?n:s,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=this._zone,n.onScheduleTask||(this._scheduleTaskZS=s,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this._zone),n.onInvokeTask||(this._invokeTaskZS=s,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this._zone),n.onCancelTask||(this._cancelTaskZS=s,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this._zone))}return Object.defineProperty(e.prototype,"zone",{get:function(){return this._zone},enumerable:!1,configurable:!0}),e.prototype.fork=function(e,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,t):new i(e,t)},e.prototype.intercept=function(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,e,t,n):t},e.prototype.invoke=function(e,t,n,r,o){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,e,t,n,r,o):t.apply(n,r)},e.prototype.handleError=function(e,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,e,t)},e.prototype.scheduleTask=function(e,t){var n=t;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),(n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,e,t))||(n=t);else if(t.scheduleFn)t.scheduleFn(t);else{if(t.type!=P)throw new Error("Task is missing scheduleFn.");g(t)}return n},e.prototype.invokeTask=function(e,t,n,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,e,t,n,r):t.callback.apply(n,r)},e.prototype.cancelTask=function(e,t){var n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,e,t);else{if(!t.cancelFn)throw Error("Task is not cancelable");n=t.cancelFn(t)}return n},e.prototype.hasTask=function(e,t){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,e,t)}catch(t){this.handleError(e,t)}},e.prototype._updateTaskCount=function(e,t){var n=this._taskCounts,r=n[e],o=n[e]=r+t;if(o<0)throw new Error("More tasks executed then were scheduled.");0!=r&&0!=o||this.hasTask(this._zone,{microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e})},e}(),l=function(){function t(n,r,o,a,i,c){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=n,this.source=r,this.data=a,this.scheduleFn=i,this.cancelFn=c,!o)throw new Error("callback is not defined");this.callback=o;var s=this;this.invoke=n===Z&&a&&a.useG?t.invokeTask:function(){return t.invokeTask.call(e,s,this,arguments)}}return t.invokeTask=function(e,t,n){e||(e=this),I++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{1==I&&y(),I--}},Object.defineProperty(t.prototype,"zone",{get:function(){return this._zone},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),t.prototype.cancelScheduleRequest=function(){this._transitionTo(m,T)},t.prototype._transitionTo=function(e,t,n){if(this._state!==t&&this._state!==n)throw new Error("".concat(this.type," '").concat(this.source,"': can not transition to '").concat(e,"', expecting state '").concat(t,"'").concat(n?" or '"+n+"'":"",", was '").concat(this._state,"'."));this._state=e,e==m&&(this._zoneDelegates=null)},t.prototype.toString=function(){return this.data&&void 0!==this.data.handleId?this.data.handleId.toString():Object.prototype.toString.call(this)},t.prototype.toJSON=function(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}},t}(),f=t("setTimeout"),h=t("Promise"),p=t("then"),v=[],d=!1;function _(t){if(c||e[h]&&(c=e[h].resolve(0)),c){var n=c[p];n||(n=c.then),n.call(c,t)}else e[f](t,0)}function g(e){0===I&&0===v.length&&_(y),e&&v.push(e)}function y(){if(!d){for(d=!0;v.length;){var e=v;v=[];for(var t=0;t<e.length;t++){var n=e[t];try{n.zone.runTask(n,null,null)}catch(e){j.onUnhandledError(e)}}}j.microtaskDrainDone(),d=!1}}var k={name:"NO ZONE"},m="notScheduled",T="scheduling",b="scheduled",E="running",w="canceling",S="unknown",P="microTask",O="macroTask",Z="eventTask",D={},j={symbol:t,currentZoneFrame:function(){return C},onUnhandledError:R,microtaskDrainDone:R,scheduleMicroTask:g,showUncaughtError:function(){return!i[t("ignoreConsoleErrorUncaughtError")]},patchEventTarget:function(){return[]},patchOnProperties:R,patchMethod:function(){return R},bindArguments:function(){return[]},patchThen:function(){return R},patchMacroTask:function(){return R},patchEventPrototype:function(){return R},isIEOrEdge:function(){return!1},getGlobalObjects:function(){},ObjectDefineProperty:function(){return R},ObjectGetOwnPropertyDescriptor:function(){},ObjectCreate:function(){},ArraySlice:function(){return[]},patchClass:function(){return R},wrapWithCurrentZone:function(){return R},filterProperties:function(){return[]},attachOriginToPatched:function(){return R},_redefineProperty:function(){return R},patchCallbacks:function(){return R},nativeScheduleMicroTask:_},C={parent:null,zone:new i(null,null)},z=null,I=0;function R(){}return a("Zone","Zone"),i}var r=Object.getOwnPropertyDescriptor,o=Object.defineProperty,a=Object.getPrototypeOf,i=Object.create,c=Array.prototype.slice,s="addEventListener",u="removeEventListener",l=t(s),f=t(u),h="true",p="false",v=t("");function d(e,t){return Zone.current.wrap(e,t)}function _(e,t,n,r,o){return Zone.current.scheduleMacroTask(e,t,n,r,o)}var g=t,y="undefined"!=typeof window,k=y?window:void 0,m=y&&k||globalThis,T="removeAttribute";function b(e,t){for(var n=e.length-1;n>=0;n--)"function"==typeof e[n]&&(e[n]=d(e[n],t+"_"+n));return e}function E(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&void 0===e.set)}var w="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,S=!("nw"in m)&&void 0!==m.process&&"[object process]"==={}.toString.call(m.process),P=!S&&!w&&!(!y||!k.HTMLElement),O=void 0!==m.process&&"[object process]"==={}.toString.call(m.process)&&!w&&!(!y||!k.HTMLElement),Z={},D=function(e){if(e=e||m.event){var t=Z[e.type];t||(t=Z[e.type]=g("ON_PROPERTY"+e.type));var n,r=this||e.target||m,o=r[t];return P&&r===k&&"error"===e.type?!0===(n=o&&o.call(this,e.message,e.filename,e.lineno,e.colno,e.error))&&e.preventDefault():null==(n=o&&o.apply(this,arguments))||n||e.preventDefault(),n}};function j(e,t,n){var a=r(e,t);if(!a&&n&&r(n,t)&&(a={enumerable:!0,configurable:!0}),a&&a.configurable){var i=g("on"+t+"patched");if(!e.hasOwnProperty(i)||!e[i]){delete a.writable,delete a.value;var c=a.get,s=a.set,u=t.slice(2),l=Z[u];l||(l=Z[u]=g("ON_PROPERTY"+u)),a.set=function(t){var n=this;n||e!==m||(n=m),n&&("function"==typeof n[l]&&n.removeEventListener(u,D),s&&s.call(n,null),n[l]=t,"function"==typeof t&&n.addEventListener(u,D,!1))},a.get=function(){var n=this;if(n||e!==m||(n=m),!n)return null;var r=n[l];if(r)return r;if(c){var o=c.call(this);if(o)return a.set.call(this,o),"function"==typeof n[T]&&n.removeAttribute(t),o}return null},o(e,t,a),e[i]=!0}}}function C(e,t,n){if(t)for(var r=0;r<t.length;r++)j(e,"on"+t[r],n);else{var o=[];for(var a in e)"on"==a.slice(0,2)&&o.push(a);for(var i=0;i<o.length;i++)j(e,o[i],n)}}var z=g("originalInstance");function I(e){var t=m[e];if(t){m[g(e)]=t,m[e]=function(){var n=b(arguments,e);switch(n.length){case 0:this[z]=new t;break;case 1:this[z]=new t(n[0]);break;case 2:this[z]=new t(n[0],n[1]);break;case 3:this[z]=new t(n[0],n[1],n[2]);break;case 4:this[z]=new t(n[0],n[1],n[2],n[3]);break;default:throw new Error("Arg list too long.")}},A(m[e],t);var n,r=new t((function(){}));for(n in r)"XMLHttpRequest"===e&&"responseBlob"===n||function(t){"function"==typeof r[t]?m[e].prototype[t]=function(){return this[z][t].apply(this[z],arguments)}:o(m[e].prototype,t,{set:function(n){"function"==typeof n?(this[z][t]=d(n,e+"."+t),A(this[z][t],n)):this[z][t]=n},get:function(){return this[z][t]}})}(n);for(n in t)"prototype"!==n&&t.hasOwnProperty(n)&&(m[e][n]=t[n])}}var R=!1;function M(e,t,n){for(var o=e;o&&!o.hasOwnProperty(t);)o=a(o);!o&&e[t]&&(o=e);var i=g(t),c=null;if(o&&(!(c=o[i])||!o.hasOwnProperty(i))&&(c=o[i]=o[t],E(o&&r(o,t)))){var s=n(c,i,t);o[t]=function(){return s(this,arguments)},A(o[t],c),R&&function e(t,n){"function"==typeof Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach((function(e){var r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,{get:function(){return t[e]},set:function(n){(!r||r.writable&&"function"==typeof r.set)&&(t[e]=n)},enumerable:!r||r.enumerable,configurable:!r||r.configurable})}))}(c,o[t])}return c}function N(e,t,n){var r=null;function o(e){var t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},r.apply(t.target,t.args),e}r=M(e,t,(function(e){return function(t,r){var a=n(t,r);return a.cbIdx>=0&&"function"==typeof r[a.cbIdx]?_(a.name,r[a.cbIdx],a,o):e.apply(t,r)}}))}function x(e,t,n){var r=null;function o(e){var t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},r.apply(t.target,t.args),e}r=M(e,t,(function(e){return function(t,r){var a=n(t,r);return a.cbIdx>=0&&"function"==typeof r[a.cbIdx]?Zone.current.scheduleMicroTask(a.name,r[a.cbIdx],a,o):e.apply(t,r)}}))}function A(e,t){e[g("OriginalDelegate")]=t}var L=!1,H=!1;function F(){if(L)return H;L=!0;try{var e=k.navigator.userAgent;-1===e.indexOf("MSIE ")&&-1===e.indexOf("Trident/")&&-1===e.indexOf("Edge/")||(H=!0)}catch(e){}return H}var q=!1;if("undefined"!=typeof window)try{var G=Object.defineProperty({},"passive",{get:function(){q=!0}});window.addEventListener("test",G,G),window.removeEventListener("test",G,G)}catch(e){q=!1}var B={useG:!0},U={},W={},V=new RegExp("^"+v+"(\\w+)(true|false)$"),X=g("propagationStopped");function Y(e,t){var n=(t?t(e):e)+p,r=(t?t(e):e)+h,o=v+n,a=v+r;U[e]={},U[e][p]=o,U[e][h]=a}function J(e,t,n,r){var o=r&&r.add||s,i=r&&r.rm||u,c=r&&r.listeners||"eventListeners",l=r&&r.rmAll||"removeAllListeners",f=g(o),d="."+o+":",_="prependListener",y="."+_+":",k=function(e,t,n){if(!e.isRemoved){var r,o=e.callback;"object"==typeof o&&o.handleEvent&&(e.callback=function(e){return o.handleEvent(e)},e.originalDelegate=o);try{e.invoke(e,t,[n])}catch(e){r=e}var a=e.options;return a&&"object"==typeof a&&a.once&&t[i].call(t,n.type,e.originalDelegate?e.originalDelegate:e.callback,a),r}};function m(n,r,o){if(r=r||e.event){var a=n||r.target||e,i=a[U[r.type][o?h:p]];if(i){var c=[];if(1===i.length)(l=k(i[0],a,r))&&c.push(l);else for(var s=i.slice(),u=0;u<s.length&&(!r||!0!==r[X]);u++){var l;(l=k(s[u],a,r))&&c.push(l)}if(1===c.length)throw c[0];var f=function(e){var n=c[e];t.nativeScheduleMicroTask((function(){throw n}))};for(u=0;u<c.length;u++)f(u)}}}var T=function(e){return m(this,e,!1)},b=function(e){return m(this,e,!0)};function E(t,n){if(!t)return!1;var r=!0;n&&void 0!==n.useG&&(r=n.useG);var s=n&&n.vh,u=!0;n&&void 0!==n.chkDup&&(u=n.chkDup);var k=!1;n&&void 0!==n.rt&&(k=n.rt);for(var m=t;m&&!m.hasOwnProperty(o);)m=a(m);if(!m&&t[o]&&(m=t),!m)return!1;if(m[f])return!1;var E,w=n&&n.eventNameToString,P={},O=m[f]=m[o],Z=m[g(i)]=m[i],D=m[g(c)]=m[c],j=m[g(l)]=m[l];n&&n.prepend&&(E=m[g(n.prepend)]=m[n.prepend]);var C=r?function(e){if(!P.isExisting)return O.call(P.target,P.eventName,P.capture?b:T,P.options)}:function(e){return O.call(P.target,P.eventName,e.invoke,P.options)},z=r?function(e){if(!e.isRemoved){var t=U[e.eventName],n=void 0;t&&(n=t[e.capture?h:p]);var r=n&&e.target[n];if(r)for(var o=0;o<r.length;o++)if(r[o]===e){r.splice(o,1),e.isRemoved=!0,0===r.length&&(e.allRemoved=!0,e.target[n]=null);break}}if(e.allRemoved)return Z.call(e.target,e.eventName,e.capture?b:T,e.options)}:function(e){return Z.call(e.target,e.eventName,e.invoke,e.options)},I=n&&n.diff?n.diff:function(e,t){var n=typeof t;return"function"===n&&e.callback===t||"object"===n&&e.originalDelegate===t},R=Zone[g("UNPATCHED_EVENTS")],M=e[g("PASSIVE_EVENTS")],N=function(t,o,a,i,c,l){return void 0===c&&(c=!1),void 0===l&&(l=!1),function(){var f=this||e,v=arguments[0];n&&n.transferEventName&&(v=n.transferEventName(v));var d=arguments[1];if(!d)return t.apply(this,arguments);if(S&&"uncaughtException"===v)return t.apply(this,arguments);var _=!1;if("function"!=typeof d){if(!d.handleEvent)return t.apply(this,arguments);_=!0}if(!s||s(t,d,f,arguments)){var g=q&&!!M&&-1!==M.indexOf(v),y=function e(t,n){return!q&&"object"==typeof t&&t?!!t.capture:q&&n?"boolean"==typeof t?{capture:t,passive:!0}:t?"object"==typeof t&&!1!==t.passive?__assign(__assign({},t),{passive:!0}):t:{passive:!0}:t}(arguments[2],g),k=y&&"object"==typeof y&&y.signal&&"object"==typeof y.signal?y.signal:void 0;if(!(null==k?void 0:k.aborted)){if(R)for(var m=0;m<R.length;m++)if(v===R[m])return g?t.call(f,v,d,y):t.apply(this,arguments);var T=!!y&&("boolean"==typeof y||y.capture),b=!(!y||"object"!=typeof y)&&y.once,E=Zone.current,O=U[v];O||(Y(v,w),O=U[v]);var Z,D=O[T?h:p],j=f[D],C=!1;if(j){if(C=!0,u)for(m=0;m<j.length;m++)if(I(j[m],d))return}else j=f[D]=[];var z=f.constructor.name,N=W[z];N&&(Z=N[v]),Z||(Z=z+o+(w?w(v):v)),P.options=y,b&&(P.options.once=!1),P.target=f,P.capture=T,P.eventName=v,P.isExisting=C;var x=r?B:void 0;x&&(x.taskData=P),k&&(P.options.signal=void 0);var A=E.scheduleEventTask(Z,d,x,a,i);return k&&(P.options.signal=k,t.call(k,"abort",(function(){A.zone.cancelTask(A)}),{once:!0})),P.target=null,x&&(x.taskData=null),b&&(y.once=!0),(q||"boolean"!=typeof A.options)&&(A.options=y),A.target=f,A.capture=T,A.eventName=v,_&&(A.originalDelegate=d),l?j.unshift(A):j.push(A),c?f:void 0}}}};return m[o]=N(O,d,C,z,k),E&&(m[_]=N(E,y,(function(e){return E.call(P.target,P.eventName,e.invoke,P.options)}),z,k,!0)),m[i]=function(){var t=this||e,r=arguments[0];n&&n.transferEventName&&(r=n.transferEventName(r));var o=arguments[2],a=!!o&&("boolean"==typeof o||o.capture),i=arguments[1];if(!i)return Z.apply(this,arguments);if(!s||s(Z,i,t,arguments)){var c,u=U[r];u&&(c=u[a?h:p]);var l=c&&t[c];if(l)for(var f=0;f<l.length;f++){var d=l[f];if(I(d,i))return l.splice(f,1),d.isRemoved=!0,0===l.length&&(d.allRemoved=!0,t[c]=null,a||"string"!=typeof r||(t[v+"ON_PROPERTY"+r]=null)),d.zone.cancelTask(d),k?t:void 0}return Z.apply(this,arguments)}},m[c]=function(){var t=this||e,r=arguments[0];n&&n.transferEventName&&(r=n.transferEventName(r));for(var o=[],a=K(t,w?w(r):r),i=0;i<a.length;i++){var c=a[i];o.push(c.originalDelegate?c.originalDelegate:c.callback)}return o},m[l]=function(){var t=this||e,r=arguments[0];if(r){n&&n.transferEventName&&(r=n.transferEventName(r));var o=U[r];if(o){var a=t[o[p]],c=t[o[h]];if(a){var s=a.slice();for(v=0;v<s.length;v++)this[i].call(this,r,(u=s[v]).originalDelegate?u.originalDelegate:u.callback,u.options)}if(c)for(s=c.slice(),v=0;v<s.length;v++){var u;this[i].call(this,r,(u=s[v]).originalDelegate?u.originalDelegate:u.callback,u.options)}}}else{for(var f=Object.keys(t),v=0;v<f.length;v++){var d=V.exec(f[v]),_=d&&d[1];_&&"removeListener"!==_&&this[l].call(this,_)}this[l].call(this,"removeListener")}if(k)return this},A(m[o],O),A(m[i],Z),j&&A(m[l],j),D&&A(m[c],D),!0}for(var w=[],P=0;P<n.length;P++)w[P]=E(n[P],r);return w}function K(e,t){if(!t){var n=[];for(var r in e){var o=V.exec(r),a=o&&o[1];if(a&&(!t||a===t)){var i=e[r];if(i)for(var c=0;c<i.length;c++)n.push(i[c])}}return n}var s=U[t];s||(Y(t),s=U[t]);var u=e[s[p]],l=e[s[h]];return u?l?u.concat(l):u.slice():l?l.slice():[]}function $(e,t){var n=e.Event;n&&n.prototype&&t.patchMethod(n.prototype,"stopImmediatePropagation",(function(e){return function(t,n){t[X]=!0,e&&e.apply(t,n)}}))}function Q(e,t){t.patchMethod(e,"queueMicrotask",(function(e){return function(e,t){Zone.current.scheduleMicroTask("queueMicrotask",t[0])}}))}var ee=g("zoneTask");function te(e,t,n,r){var o=null,a=null;n+=r;var i={};function c(t){var n=t.data;return n.args[0]=function(){return t.invoke.apply(this,arguments)},n.handleId=o.apply(e,n.args),t}function s(t){return a.call(e,t.data.handleId)}o=M(e,t+=r,(function(n){return function(o,a){if("function"==typeof a[0]){var u={isPeriodic:"Interval"===r,delay:"Timeout"===r||"Interval"===r?a[1]||0:void 0,args:a},l=a[0];a[0]=function e(){try{return l.apply(this,arguments)}finally{u.isPeriodic||("number"==typeof u.handleId?delete i[u.handleId]:u.handleId&&(u.handleId[ee]=null))}};var f=_(t,a[0],u,c,s);if(!f)return f;var h=f.data.handleId;return"number"==typeof h?i[h]=f:h&&(h[ee]=f),h&&h.ref&&h.unref&&"function"==typeof h.ref&&"function"==typeof h.unref&&(f.ref=h.ref.bind(h),f.unref=h.unref.bind(h)),"number"==typeof h||h?h:f}return n.apply(e,a)}})),a=M(e,n,(function(t){return function(n,r){var o,a=r[0];"number"==typeof a?o=i[a]:(o=a&&a[ee])||(o=a),o&&"string"==typeof o.type?"notScheduled"!==o.state&&(o.cancelFn&&o.data.isPeriodic||0===o.runCount)&&("number"==typeof a?delete i[a]:a&&(a[ee]=null),o.zone.cancelTask(o)):t.apply(e,r)}}))}function ne(e,t){if(!Zone[t.symbol("patchEventTarget")]){for(var n=t.getGlobalObjects(),r=n.eventNames,o=n.zoneSymbolEventNames,a=n.TRUE_STR,i=n.FALSE_STR,c=n.ZONE_SYMBOL_PREFIX,s=0;s<r.length;s++){var u=r[s],l=c+(u+i),f=c+(u+a);o[u]={},o[u][i]=l,o[u][a]=f}var h=e.EventTarget;if(h&&h.prototype)return t.patchEventTarget(e,t,[h&&h.prototype]),!0}}function re(e,t,n){if(!n||0===n.length)return t;var r=n.filter((function(t){return t.target===e}));if(!r||0===r.length)return t;var o=r[0].ignoreProperties;return t.filter((function(e){return-1===o.indexOf(e)}))}function oe(e,t,n,r){e&&C(e,re(e,t,n),r)}function ae(e){return Object.getOwnPropertyNames(e).filter((function(e){return e.startsWith("on")&&e.length>2})).map((function(e){return e.substring(2)}))}function ie(e,t){if((!S||O)&&!Zone[e.symbol("patchEvents")]){var n=t.__Zone_ignore_on_properties,r=[];if(P){var o=window;r=r.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);var i=function e(){try{var e=k.navigator.userAgent;if(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/"))return!0}catch(e){}return!1}()?[{target:o,ignoreProperties:["error"]}]:[];oe(o,ae(o),n?n.concat(i):n,a(o))}r=r.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(var c=0;c<r.length;c++){var s=t[r[c]];s&&s.prototype&&oe(s.prototype,ae(s.prototype),n)}}}function ce(e,t,n,r,o){var a=Zone.__symbol__(r);if(!t[a]){var i=t[a]=t[r];t[r]=function(a,c,s){return c&&c.prototype&&o.forEach((function(t){var o="".concat(n,".").concat(r,"::")+t,a=c.prototype;try{if(a.hasOwnProperty(t)){var i=e.ObjectGetOwnPropertyDescriptor(a,t);i&&i.value?(i.value=e.wrapWithCurrentZone(i.value,o),e._redefineProperty(c.prototype,t,i)):a[t]&&(a[t]=e.wrapWithCurrentZone(a[t],o))}else a[t]&&(a[t]=e.wrapWithCurrentZone(a[t],o))}catch(e){}})),i.call(t,a,c,s)},e.attachOriginToPatched(t[r],i)}}var se="set",ue="clear",le=function fe(){var e,r=globalThis,o=!0===r[t("forceDuplicateZoneCheck")];if(r.Zone&&(o||"function"!=typeof r.Zone.__symbol__))throw new Error("Zone already loaded.");return null!==(e=r.Zone)&&void 0!==e||(r.Zone=n()),r.Zone}();!function he(e){(function t(e){e.__load_patch("ZoneAwarePromise",(function(e,t,n){var r=Object.getOwnPropertyDescriptor,o=Object.defineProperty,a=n.symbol,i=[],c=!1!==e[a("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],s=a("Promise"),u=a("then"),l="__creationTrace__";n.onUnhandledError=function(e){if(n.showUncaughtError()){var t=e&&e.rejection;t?console.error("Unhandled Promise rejection:",t instanceof Error?t.message:t,"; Zone:",e.zone.name,"; Task:",e.task&&e.task.source,"; Value:",t,t instanceof Error?t.stack:void 0):console.error(e)}},n.microtaskDrainDone=function(){for(var e=function(){var e=i.shift();try{e.zone.runGuarded((function(){if(e.throwOriginal)throw e.rejection;throw e}))}catch(e){!function r(e){n.onUnhandledError(e);try{var r=t[f];"function"==typeof r&&r.call(this,e)}catch(e){}}(e)}};i.length;)e()};var f=a("unhandledPromiseRejectionHandler");function h(e){return e&&e.then}function p(e){return e}function v(e){return N.reject(e)}var d=a("state"),_=a("value"),g=a("finally"),y=a("parentPromiseValue"),k=a("parentPromiseState"),m="Promise.then",T=null,b=!0,E=!1,w=0;function S(e,t){return function(n){try{D(e,t,n)}catch(t){D(e,!1,t)}}}var P=function(){var e=!1;return function t(n){return function(){e||(e=!0,n.apply(null,arguments))}}},O="Promise resolved with itself",Z=a("currentTaskTrace");function D(e,r,a){var s=P();if(e===a)throw new TypeError(O);if(e[d]===T){var u=null;try{"object"!=typeof a&&"function"!=typeof a||(u=a&&a.then)}catch(t){return s((function(){D(e,!1,t)}))(),e}if(r!==E&&a instanceof N&&a.hasOwnProperty(d)&&a.hasOwnProperty(_)&&a[d]!==T)C(a),D(e,a[d],a[_]);else if(r!==E&&"function"==typeof u)try{u.call(a,s(S(e,r)),s(S(e,!1)))}catch(t){s((function(){D(e,!1,t)}))()}else{e[d]=r;var f=e[_];if(e[_]=a,e[g]===g&&r===b&&(e[d]=e[k],e[_]=e[y]),r===E&&a instanceof Error){var h=t.currentTask&&t.currentTask.data&&t.currentTask.data[l];h&&o(a,Z,{configurable:!0,enumerable:!1,writable:!0,value:h})}for(var p=0;p<f.length;)z(e,f[p++],f[p++],f[p++],f[p++]);if(0==f.length&&r==E){e[d]=w;var v=a;try{throw new Error("Uncaught (in promise): "+function e(t){return t&&t.toString===Object.prototype.toString?(t.constructor&&t.constructor.name||"")+": "+JSON.stringify(t):t?t.toString():Object.prototype.toString.call(t)}(a)+(a&&a.stack?"\n"+a.stack:""))}catch(e){v=e}c&&(v.throwOriginal=!0),v.rejection=a,v.promise=e,v.zone=t.current,v.task=t.currentTask,i.push(v),n.scheduleMicroTask()}}}return e}var j=a("rejectionHandledHandler");function C(e){if(e[d]===w){try{var n=t[j];n&&"function"==typeof n&&n.call(this,{rejection:e[_],promise:e})}catch(e){}e[d]=E;for(var r=0;r<i.length;r++)e===i[r].promise&&i.splice(r,1)}}function z(e,t,n,r,o){C(e);var a=e[d],i=a?"function"==typeof r?r:p:"function"==typeof o?o:v;t.scheduleMicroTask(m,(function(){try{var r=e[_],o=!!n&&g===n[g];o&&(n[y]=r,n[k]=a);var c=t.run(i,void 0,o&&i!==v&&i!==p?[]:[r]);D(n,!0,c)}catch(e){D(n,!1,e)}}),n)}var I=function(){},R=e.AggregateError,N=function(){function e(t){var n=this;if(!(n instanceof e))throw new Error("Must be an instanceof Promise.");n[d]=T,n[_]=[];try{var r=P();t&&t(r(S(n,b)),r(S(n,E)))}catch(e){D(n,!1,e)}}return e.toString=function(){return"function ZoneAwarePromise() { [native code] }"},e.resolve=function(t){return t instanceof e?t:D(new this(null),b,t)},e.reject=function(e){return D(new this(null),E,e)},e.withResolvers=function(){var t={};return t.promise=new e((function(e,n){t.resolve=e,t.reject=n})),t},e.any=function(t){if(!t||"function"!=typeof t[Symbol.iterator])return Promise.reject(new R([],"All promises were rejected"));var n=[],r=0;try{for(var o=0,a=t;o<a.length;o++)r++,n.push(e.resolve(a[o]))}catch(e){return Promise.reject(new R([],"All promises were rejected"))}if(0===r)return Promise.reject(new R([],"All promises were rejected"));var i=!1,c=[];return new e((function(e,t){for(var o=0;o<n.length;o++)n[o].then((function(t){i||(i=!0,e(t))}),(function(e){c.push(e),0==--r&&(i=!0,t(new R(c,"All promises were rejected")))}))}))},e.race=function(e){var t,n,r=new this((function(e,r){t=e,n=r}));function o(e){t(e)}function a(e){n(e)}for(var i=0,c=e;i<c.length;i++){var s=c[i];h(s)||(s=this.resolve(s)),s.then(o,a)}return r},e.all=function(t){return e.allWithCallback(t)},e.allSettled=function(t){return(this&&this.prototype instanceof e?this:e).allWithCallback(t,{thenCallback:function(e){return{status:"fulfilled",value:e}},errorCallback:function(e){return{status:"rejected",reason:e}}})},e.allWithCallback=function(e,t){for(var n,r,o=new this((function(e,t){n=e,r=t})),a=2,i=0,c=[],s=function(e){h(e)||(e=u.resolve(e));var o=i;try{e.then((function(e){c[o]=t?t.thenCallback(e):e,0==--a&&n(c)}),(function(e){t?(c[o]=t.errorCallback(e),0==--a&&n(c)):r(e)}))}catch(e){r(e)}a++,i++},u=this,l=0,f=e;l<f.length;l++)s(f[l]);return 0==(a-=2)&&n(c),o},Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"Promise"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.then=function(n,r){var o,a=null===(o=this.constructor)||void 0===o?void 0:o[Symbol.species];a&&"function"==typeof a||(a=this.constructor||e);var i=new a(I),c=t.current;return this[d]==T?this[_].push(c,i,n,r):z(this,c,i,n,r),i},e.prototype.catch=function(e){return this.then(null,e)},e.prototype.finally=function(n){var r,o=null===(r=this.constructor)||void 0===r?void 0:r[Symbol.species];o&&"function"==typeof o||(o=e);var a=new o(I);a[g]=g;var i=t.current;return this[d]==T?this[_].push(i,a,n,n):z(this,i,a,n,n),a},e}();N.resolve=N.resolve,N.reject=N.reject,N.race=N.race,N.all=N.all;var x=e[s]=e.Promise;e.Promise=N;var A=a("thenPatched");function L(e){var t=e.prototype,n=r(t,"then");if(!n||!1!==n.writable&&n.configurable){var o=t.then;t[u]=o,e.prototype.then=function(e,t){var n=this;return new N((function(e,t){o.call(n,e,t)})).then(e,t)},e[A]=!0}}return n.patchThen=L,x&&(L(x),M(e,"fetch",(function(e){return function t(e){return function(t,n){var r=e.apply(t,n);if(r instanceof N)return r;var o=r.constructor;return o[A]||L(o),r}}(e)}))),Promise[t.__symbol__("uncaughtPromiseErrors")]=i,N}))})(e),function n(e){e.__load_patch("toString",(function(e){var t=Function.prototype.toString,n=g("OriginalDelegate"),r=g("Promise"),o=g("Error"),a=function a(){if("function"==typeof this){var i=this[n];if(i)return"function"==typeof i?t.call(i):Object.prototype.toString.call(i);if(this===Promise){var c=e[r];if(c)return t.call(c)}if(this===Error){var s=e[o];if(s)return t.call(s)}}return t.call(this)};a[n]=t,Function.prototype.toString=a;var i=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":i.call(this)}}))}(e),function a(e){e.__load_patch("util",(function(e,t,n){var a=ae(e);n.patchOnProperties=C,n.patchMethod=M,n.bindArguments=b,n.patchMacroTask=N;var l=t.__symbol__("BLACK_LISTED_EVENTS"),f=t.__symbol__("UNPATCHED_EVENTS");e[f]&&(e[l]=e[f]),e[l]&&(t[l]=t[f]=e[l]),n.patchEventPrototype=$,n.patchEventTarget=J,n.isIEOrEdge=F,n.ObjectDefineProperty=o,n.ObjectGetOwnPropertyDescriptor=r,n.ObjectCreate=i,n.ArraySlice=c,n.patchClass=I,n.wrapWithCurrentZone=d,n.filterProperties=re,n.attachOriginToPatched=A,n._redefineProperty=Object.defineProperty,n.patchCallbacks=ce,n.getGlobalObjects=function(){return{globalSources:W,zoneSymbolEventNames:U,eventNames:a,isBrowser:P,isMix:O,isNode:S,TRUE_STR:h,FALSE_STR:p,ZONE_SYMBOL_PREFIX:v,ADD_EVENT_LISTENER_STR:s,REMOVE_EVENT_LISTENER_STR:u}}}))}(e)}(le),function pe(e){e.__load_patch("legacy",(function(t){var n=t[e.__symbol__("legacyPatch")];n&&n()})),e.__load_patch("timers",(function(e){var t="set",n="clear";te(e,t,n,"Timeout"),te(e,t,n,"Interval"),te(e,t,n,"Immediate")})),e.__load_patch("requestAnimationFrame",(function(e){te(e,"request","cancel","AnimationFrame"),te(e,"mozRequest","mozCancel","AnimationFrame"),te(e,"webkitRequest","webkitCancel","AnimationFrame")})),e.__load_patch("blocking",(function(e,t){for(var n=["alert","prompt","confirm"],r=0;r<n.length;r++)M(e,n[r],(function(n,r,o){return function(r,a){return t.current.run(n,e,a,o)}}))})),e.__load_patch("EventTarget",(function(e,t,n){!function r(e,t){t.patchEventPrototype(e,t)}(e,n),ne(e,n);var o=e.XMLHttpRequestEventTarget;o&&o.prototype&&n.patchEventTarget(e,n,[o.prototype])})),e.__load_patch("MutationObserver",(function(e,t,n){I("MutationObserver"),I("WebKitMutationObserver")})),e.__load_patch("IntersectionObserver",(function(e,t,n){I("IntersectionObserver")})),e.__load_patch("FileReader",(function(e,t,n){I("FileReader")})),e.__load_patch("on_property",(function(e,t,n){ie(n,e)})),e.__load_patch("customElements",(function(e,t,n){!function r(e,t){var n=t.getGlobalObjects();(n.isBrowser||n.isMix)&&e.customElements&&"customElements"in e&&t.patchCallbacks(t,e.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback","formAssociatedCallback","formDisabledCallback","formResetCallback","formStateRestoreCallback"])}(e,n)})),e.__load_patch("XHR",(function(e,t){!function n(e){var n=e.XMLHttpRequest;if(n){var u=n.prototype,h=u[l],p=u[f];if(!h){var v=e.XMLHttpRequestEventTarget;if(v){var d=v.prototype;h=d[l],p=d[f]}}var y="readystatechange",k="scheduled",m=M(u,"open",(function(){return function(e,t){return e[o]=0==t[2],e[c]=t[1],m.apply(e,t)}})),T=g("fetchTaskAborting"),b=g("fetchTaskScheduling"),E=M(u,"send",(function(){return function(e,n){if(!0===t.current[b])return E.apply(e,n);if(e[o])return E.apply(e,n);var r={target:e,url:e[c],isPeriodic:!1,args:n,aborted:!1},a=_("XMLHttpRequest.send",P,r,S,O);e&&!0===e[s]&&!r.aborted&&a.state===k&&a.invoke()}})),w=M(u,"abort",(function(){return function(e,n){var o=function a(e){return e[r]}(e);if(o&&"string"==typeof o.type){if(null==o.cancelFn||o.data&&o.data.aborted)return;o.zone.cancelTask(o)}else if(!0===t.current[T])return w.apply(e,n)}}))}function S(e){var n=e.data,o=n.target;o[i]=!1,o[s]=!1;var c=o[a];h||(h=o[l],p=o[f]),c&&p.call(o,y,c);var u=o[a]=function(){if(o.readyState===o.DONE)if(!n.aborted&&o[i]&&e.state===k){var r=o[t.__symbol__("loadfalse")];if(0!==o.status&&r&&r.length>0){var a=e.invoke;e.invoke=function(){for(var r=o[t.__symbol__("loadfalse")],i=0;i<r.length;i++)r[i]===e&&r.splice(i,1);n.aborted||e.state!==k||a.call(e)},r.push(e)}else e.invoke()}else n.aborted||!1!==o[i]||(o[s]=!0)};return h.call(o,y,u),o[r]||(o[r]=e),E.apply(o,n.args),o[i]=!0,e}function P(){}function O(e){var t=e.data;return t.aborted=!0,w.apply(t.target,t.args)}}(e);var r=g("xhrTask"),o=g("xhrSync"),a=g("xhrListener"),i=g("xhrScheduled"),c=g("xhrURL"),s=g("xhrErrorBeforeScheduled")})),e.__load_patch("geolocation",(function(e){e.navigator&&e.navigator.geolocation&&function t(e,n){for(var o=e.constructor.name,a=function(t){var a=n[t],i=e[a];if(i){if(!E(r(e,a)))return"continue";e[a]=function(e){var t=function(){return e.apply(this,b(arguments,o+"."+a))};return A(t,e),t}(i)}},i=0;i<n.length;i++)a(i)}(e.navigator.geolocation,["getCurrentPosition","watchPosition"])})),e.__load_patch("PromiseRejectionEvent",(function(e,t){function n(t){return function(n){K(e,t).forEach((function(r){var o=e.PromiseRejectionEvent;if(o){var a=new o(t,{promise:n.promise,reason:n.rejection});r.invoke(a)}}))}}e.PromiseRejectionEvent&&(t[g("unhandledPromiseRejectionHandler")]=n("unhandledrejection"),t[g("rejectionHandledHandler")]=n("rejectionhandled"))})),e.__load_patch("queueMicrotask",(function(e,t,n){Q(e,n)}))}(le),function ve(e){(function t(e){e.__load_patch("node_util",(function(e,t,n){n.patchOnProperties=C,n.patchMethod=M,n.bindArguments=b,n.patchMacroTask=N,function r(e){R=e}(!0)}))})(e),function n(e){e.__load_patch("EventEmitter",(function(e,t,n){var r,o="addListener",a="removeListener",i=function(e,t){return e.callback===t||e.callback.listener===t},c=function(e){return"string"==typeof e?e:e?e.toString().replace("(","_").replace(")","_"):""};try{r=require("events")}catch(e){}r&&r.EventEmitter&&function s(t){var r=J(e,n,[t],{useG:!1,add:o,rm:a,prepend:"prependListener",rmAll:"removeAllListeners",listeners:"listeners",chkDup:!1,rt:!0,diff:i,eventNameToString:c});r&&r[0]&&(t.on=t[o],t.off=t[a])}(r.EventEmitter.prototype)}))}(e),function r(e){e.__load_patch("fs",(function(e,t,n){var r,o;try{o=require("fs")}catch(e){}if(o){["access","appendFile","chmod","chown","close","exists","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","read","readdir","readFile","readlink","realpath","rename","rmdir","stat","symlink","truncate","unlink","utimes","write","writeFile"].filter((function(e){return!!o[e]&&"function"==typeof o[e]})).forEach((function(e){N(o,e,(function(t,n){return{name:"fs."+e,args:n,cbIdx:n.length>0?n.length-1:-1,target:t}}))}));var a=null===(r=o.realpath)||void 0===r?void 0:r[n.symbol("OriginalDelegate")];(null==a?void 0:a.native)&&(o.realpath.native=a.native,N(o.realpath,"native",(function(e,t){return{args:t,target:e,cbIdx:t.length>0?t.length-1:-1,name:"fs.realpath.native"}})))}}))}(e),e.__load_patch("node_timers",(function(e,t){var n=!1;try{var r=require("timers");if(e.setTimeout!==r.setTimeout&&!O){var o=r.setTimeout;r.setTimeout=function(){return n=!0,o.apply(this,arguments)};var a=e.setTimeout((function(){}),100);clearTimeout(a),r.setTimeout=o}te(r,se,ue,"Timeout"),te(r,se,ue,"Interval"),te(r,se,ue,"Immediate")}catch(e){}O||(n?(e[t.__symbol__("setTimeout")]=e.setTimeout,e[t.__symbol__("setInterval")]=e.setInterval,e[t.__symbol__("setImmediate")]=e.setImmediate):(te(e,se,ue,"Timeout"),te(e,se,ue,"Interval"),te(e,se,ue,"Immediate")))})),e.__load_patch("nextTick",(function(){x(process,"nextTick",(function(e,t){return{name:"process.nextTick",args:t,cbIdx:t.length>0&&"function"==typeof t[0]?0:-1,target:process}}))})),e.__load_patch("handleUnhandledPromiseRejection",(function(e,t,n){function r(e){return function(t){K(process,e).forEach((function(n){"unhandledRejection"===e?n.invoke(t.rejection,t.promise):"rejectionHandled"===e&&n.invoke(t.promise)}))}}t[n.symbol("unhandledPromiseRejectionHandler")]=r("unhandledRejection"),t[n.symbol("rejectionHandledHandler")]=r("rejectionHandled")})),e.__load_patch("crypto",(function(){var e;try{e=require("crypto")}catch(e){}e&&["randomBytes","pbkdf2"].forEach((function(t){N(e,t,(function(n,r){return{name:"crypto."+t,args:r,cbIdx:r.length>0&&"function"==typeof r[r.length-1]?r.length-1:-1,target:e}}))}))})),e.__load_patch("console",(function(e,t){["dir","log","info","error","warn","assert","debug","timeEnd","trace"].forEach((function(e){var n=console[t.__symbol__(e)]=console[e];n&&(console[e]=function(){var e=c.call(arguments);return t.current===t.root?n.apply(this,e):t.root.run(n,this,e)})}))})),e.__load_patch("queueMicrotask",(function(e,t,n){Q(e,n)}))}(le)}));
"use strict";var __assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},__assign.apply(this,arguments)};
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){!function(e){var t,n=e.performance;function r(e){n&&n.mark&&n.mark(e)}function o(e,t){n&&n.measure&&n.measure(e,t)}r("Zone");var i=e.__Zone_symbol_prefix||"__zone_symbol__";function a(e){return i+e}var s=!0===e[a("forceDuplicateZoneCheck")];if(e.Zone){if(s||"function"!=typeof e.Zone.__symbol__)throw new Error("Zone already loaded.");return e.Zone}var c=function(){function n(e,t){this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new f(this,this._parent&&this._parent._zoneDelegate,t)}return n.assertZonePatched=function(){if(e.Promise!==z.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")},Object.defineProperty(n,"root",{get:function(){for(var e=t.current;e.parent;)e=e.parent;return e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"current",{get:function(){return I.zone},enumerable:!1,configurable:!0}),Object.defineProperty(n,"currentTask",{get:function(){return N},enumerable:!1,configurable:!0}),n.__load_patch=function(n,i,a){if(void 0===a&&(a=!1),z.hasOwnProperty(n)){if(!a&&s)throw Error("Already loaded patch: "+n)}else if(!e["__Zone_disable_"+n]){var c="Zone:"+n;r(c),z[n]=i(e,t,C),o(c,c)}},Object.defineProperty(n.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),n.prototype.get=function(e){var t=this.getZoneWith(e);if(t)return t._properties[e]},n.prototype.getZoneWith=function(e){for(var t=this;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null},n.prototype.fork=function(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)},n.prototype.wrap=function(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);var n=this._zoneDelegate.intercept(this,e,t),r=this;return function(){return r.runGuarded(n,this,arguments,t)}},n.prototype.run=function(e,t,n,r){I={parent:I,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{I=I.parent}},n.prototype.runGuarded=function(e,t,n,r){void 0===t&&(t=null),I={parent:I,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{I=I.parent}},n.prototype.runTask=function(e,t,n){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||T).name+"; Execution: "+this.name+")");if(e.state!==b||e.type!==O&&e.type!==j){var r=e.state!=E;r&&e._transitionTo(E,Z),e.runCount++;var o=N;N=e,I={parent:I,zone:this};try{e.type==j&&e.data&&!e.data.isPeriodic&&(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,e,t,n)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{e.state!==b&&e.state!==P&&(e.type==O||e.data&&e.data.isPeriodic?r&&e._transitionTo(Z,E):(e.runCount=0,this._updateTaskCount(e,-1),r&&e._transitionTo(b,E,b))),I=I.parent,N=o}}},n.prototype.scheduleTask=function(e){if(e.zone&&e.zone!==this)for(var t=this;t;){if(t===e.zone)throw Error("can not reschedule task to ".concat(this.name," which is descendants of the original zone ").concat(e.zone.name));t=t.parent}e._transitionTo(w,b);var n=[];e._zoneDelegates=n,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(t){throw e._transitionTo(P,w,b),this._zoneDelegate.handleError(this,t),t}return e._zoneDelegates===n&&this._updateTaskCount(e,1),e.state==w&&e._transitionTo(Z,w),e},n.prototype.scheduleMicroTask=function(e,t,n,r){return this.scheduleTask(new h(D,e,t,n,r,void 0))},n.prototype.scheduleMacroTask=function(e,t,n,r,o){return this.scheduleTask(new h(j,e,t,n,r,o))},n.prototype.scheduleEventTask=function(e,t,n,r,o){return this.scheduleTask(new h(O,e,t,n,r,o))},n.prototype.cancelTask=function(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||T).name+"; Execution: "+this.name+")");if(e.state===Z||e.state===E){e._transitionTo(S,Z,E);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(P,S),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(b,S),e.runCount=0,e}},n.prototype._updateTaskCount=function(e,t){var n=e._zoneDelegates;-1==t&&(e._zoneDelegates=null);for(var r=0;r<n.length;r++)n[r]._updateTaskCount(e.type,t)},n}();(t=c).__symbol__=a;var u,l={name:"",onHasTask:function(e,t,n,r){return e.hasTask(n,r)},onScheduleTask:function(e,t,n,r){return e.scheduleTask(n,r)},onInvokeTask:function(e,t,n,r,o,i){return e.invokeTask(n,r,o,i)},onCancelTask:function(e,t,n,r){return e.cancelTask(n,r)}},f=function(){function e(e,t,n){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=e,this._parentDelegate=t,this._forkZS=n&&(n&&n.onFork?n:t._forkZS),this._forkDlgt=n&&(n.onFork?t:t._forkDlgt),this._forkCurrZone=n&&(n.onFork?this.zone:t._forkCurrZone),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this.zone:t._interceptCurrZone),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this.zone:t._invokeCurrZone),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this.zone:t._handleErrorCurrZone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this.zone:t._scheduleTaskCurrZone),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this.zone:t._invokeTaskCurrZone),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this.zone:t._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;var r=n&&n.onHasTask;(r||t&&t._hasTaskZS)&&(this._hasTaskZS=r?n:l,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=e,n.onScheduleTask||(this._scheduleTaskZS=l,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this.zone),n.onInvokeTask||(this._invokeTaskZS=l,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this.zone),n.onCancelTask||(this._cancelTaskZS=l,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this.zone))}return e.prototype.fork=function(e,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,t):new c(e,t)},e.prototype.intercept=function(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,e,t,n):t},e.prototype.invoke=function(e,t,n,r,o){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,e,t,n,r,o):t.apply(n,r)},e.prototype.handleError=function(e,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,e,t)},e.prototype.scheduleTask=function(e,t){var n=t;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),(n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,e,t))||(n=t);else if(t.scheduleFn)t.scheduleFn(t);else{if(t.type!=D)throw new Error("Task is missing scheduleFn.");y(t)}return n},e.prototype.invokeTask=function(e,t,n,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,e,t,n,r):t.callback.apply(n,r)},e.prototype.cancelTask=function(e,t){var n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,e,t);else{if(!t.cancelFn)throw Error("Task is not cancelable");n=t.cancelFn(t)}return n},e.prototype.hasTask=function(e,t){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,e,t)}catch(t){this.handleError(e,t)}},e.prototype._updateTaskCount=function(e,t){var n=this._taskCounts,r=n[e],o=n[e]=r+t;if(o<0)throw new Error("More tasks executed then were scheduled.");0!=r&&0!=o||this.hasTask(this.zone,{microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e})},e}(),h=function(){function t(n,r,o,i,a,s){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=n,this.source=r,this.data=i,this.scheduleFn=a,this.cancelFn=s,!o)throw new Error("callback is not defined");this.callback=o;var c=this;this.invoke=n===O&&i&&i.useG?t.invokeTask:function(){return t.invokeTask.call(e,c,this,arguments)}}return t.invokeTask=function(e,t,n){e||(e=this),x++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{1==x&&m(),x--}},Object.defineProperty(t.prototype,"zone",{get:function(){return this._zone},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),t.prototype.cancelScheduleRequest=function(){this._transitionTo(b,w)},t.prototype._transitionTo=function(e,t,n){if(this._state!==t&&this._state!==n)throw new Error("".concat(this.type," '").concat(this.source,"': can not transition to '").concat(e,"', expecting state '").concat(t,"'").concat(n?" or '"+n+"'":"",", was '").concat(this._state,"'."));this._state=e,e==b&&(this._zoneDelegates=null)},t.prototype.toString=function(){return this.data&&void 0!==this.data.handleId?this.data.handleId.toString():Object.prototype.toString.call(this)},t.prototype.toJSON=function(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}},t}(),p=a("setTimeout"),v=a("Promise"),d=a("then"),_=[],k=!1;function g(t){if(u||e[v]&&(u=e[v].resolve(0)),u){var n=u[d];n||(n=u.then),n.call(u,t)}else e[p](t,0)}function y(e){0===x&&0===_.length&&g(m),e&&_.push(e)}function m(){if(!k){for(k=!0;_.length;){var e=_;_=[];for(var t=0;t<e.length;t++){var n=e[t];try{n.zone.runTask(n,null,null)}catch(e){C.onUnhandledError(e)}}}C.microtaskDrainDone(),k=!1}}var T={name:"NO ZONE"},b="notScheduled",w="scheduling",Z="scheduled",E="running",S="canceling",P="unknown",D="microTask",j="macroTask",O="eventTask",z={},C={symbol:a,currentZoneFrame:function(){return I},onUnhandledError:A,microtaskDrainDone:A,scheduleMicroTask:y,showUncaughtError:function(){return!c[a("ignoreConsoleErrorUncaughtError")]},patchEventTarget:function(){return[]},patchOnProperties:A,patchMethod:function(){return A},bindArguments:function(){return[]},patchThen:function(){return A},patchMacroTask:function(){return A},patchEventPrototype:function(){return A},isIEOrEdge:function(){return!1},getGlobalObjects:function(){},ObjectDefineProperty:function(){return A},ObjectGetOwnPropertyDescriptor:function(){},ObjectCreate:function(){},ArraySlice:function(){return[]},patchClass:function(){return A},wrapWithCurrentZone:function(){return A},filterProperties:function(){return[]},attachOriginToPatched:function(){return A},_redefineProperty:function(){return A},patchCallbacks:function(){return A},nativeScheduleMicroTask:g},I={parent:null,zone:new c(null,null)},N=null,x=0;function A(){}o("Zone","Zone"),e.Zone=c}(globalThis);var e=Object.getOwnPropertyDescriptor,t=Object.defineProperty,n=Object.getPrototypeOf,r=Array.prototype.slice,o="addEventListener",i="removeEventListener";Zone.__symbol__(o),Zone.__symbol__(i);var a="true",s="false",c=Zone.__symbol__("");function u(e,t){return Zone.current.wrap(e,t)}function l(e,t,n,r,o){return Zone.current.scheduleMacroTask(e,t,n,r,o)}var f=Zone.__symbol__,h="undefined"!=typeof window,p=h?window:void 0,v=h&&p||globalThis,d="removeAttribute";function _(e,t){for(var n=e.length-1;n>=0;n--)"function"==typeof e[n]&&(e[n]=u(e[n],t+"_"+n));return e}var k="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,g=!("nw"in v)&&void 0!==v.process&&"[object process]"==={}.toString.call(v.process),y=!g&&!k&&!(!h||!p.HTMLElement),m=void 0!==v.process&&"[object process]"==={}.toString.call(v.process)&&!k&&!(!h||!p.HTMLElement),T={},b=function(e){if(e=e||v.event){var t=T[e.type];t||(t=T[e.type]=f("ON_PROPERTY"+e.type));var n,r=this||e.target||v,o=r[t];return y&&r===p&&"error"===e.type?!0===(n=o&&o.call(this,e.message,e.filename,e.lineno,e.colno,e.error))&&e.preventDefault():null==(n=o&&o.apply(this,arguments))||n||e.preventDefault(),n}};function w(n,r,o){var i=e(n,r);if(!i&&o&&e(o,r)&&(i={enumerable:!0,configurable:!0}),i&&i.configurable){var a=f("on"+r+"patched");if(!n.hasOwnProperty(a)||!n[a]){delete i.writable,delete i.value;var s=i.get,c=i.set,u=r.slice(2),l=T[u];l||(l=T[u]=f("ON_PROPERTY"+u)),i.set=function(e){var t=this;t||n!==v||(t=v),t&&("function"==typeof t[l]&&t.removeEventListener(u,b),c&&c.call(t,null),t[l]=e,"function"==typeof e&&t.addEventListener(u,b,!1))},i.get=function(){var e=this;if(e||n!==v||(e=v),!e)return null;var t=e[l];if(t)return t;if(s){var o=s.call(this);if(o)return i.set.call(this,o),"function"==typeof e[d]&&e.removeAttribute(r),o}return null},t(n,r,i),n[a]=!0}}}function Z(e,t,n){if(t)for(var r=0;r<t.length;r++)w(e,"on"+t[r],n);else{var o=[];for(var i in e)"on"==i.slice(0,2)&&o.push(i);for(var a=0;a<o.length;a++)w(e,o[a],n)}}f("originalInstance");var E=!1;function S(t,r,o){for(var i=t;i&&!i.hasOwnProperty(r);)i=n(i);!i&&t[r]&&(i=t);var a=f(r),s=null;if(i&&(!(s=i[a])||!i.hasOwnProperty(a))&&(s=i[a]=i[r],function c(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&void 0===e.set)}(i&&e(i,r)))){var u=o(s,a,r);i[r]=function(){return u(this,arguments)},D(i[r],s),E&&function e(t,n){"function"==typeof Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach((function(e){var r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,{get:function(){return t[e]},set:function(n){(!r||r.writable&&"function"==typeof r.set)&&(t[e]=n)},enumerable:!r||r.enumerable,configurable:!r||r.configurable})}))}(s,i[r])}return s}function P(e,t,n){var r=null;function o(e){var t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},r.apply(t.target,t.args),e}r=S(e,t,(function(e){return function(t,r){var i=n(t,r);return i.cbIdx>=0&&"function"==typeof r[i.cbIdx]?l(i.name,r[i.cbIdx],i,o):e.apply(t,r)}}))}function D(e,t){e[f("OriginalDelegate")]=t}Zone.__load_patch("ZoneAwarePromise",(function(e,t,n){var r=Object.getOwnPropertyDescriptor,o=Object.defineProperty,i=n.symbol,a=[],s=!1!==e[i("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],c=i("Promise"),u=i("then"),l="__creationTrace__";n.onUnhandledError=function(e){if(n.showUncaughtError()){var t=e&&e.rejection;t?console.error("Unhandled Promise rejection:",t instanceof Error?t.message:t,"; Zone:",e.zone.name,"; Task:",e.task&&e.task.source,"; Value:",t,t instanceof Error?t.stack:void 0):console.error(e)}},n.microtaskDrainDone=function(){for(var e=function(){var e=a.shift();try{e.zone.runGuarded((function(){if(e.throwOriginal)throw e.rejection;throw e}))}catch(e){!function r(e){n.onUnhandledError(e);try{var r=t[f];"function"==typeof r&&r.call(this,e)}catch(e){}}(e)}};a.length;)e()};var f=i("unhandledPromiseRejectionHandler");function h(e){return e&&e.then}function p(e){return e}function v(e){return A.reject(e)}var d=i("state"),_=i("value"),k=i("finally"),g=i("parentPromiseValue"),y=i("parentPromiseState"),m="Promise.then",T=null,b=!0,w=!1,Z=0;function E(e,t){return function(n){try{O(e,t,n)}catch(t){O(e,!1,t)}}}var P=function(){var e=!1;return function t(n){return function(){e||(e=!0,n.apply(null,arguments))}}},D="Promise resolved with itself",j=i("currentTaskTrace");function O(e,r,i){var c=P();if(e===i)throw new TypeError(D);if(e[d]===T){var u=null;try{"object"!=typeof i&&"function"!=typeof i||(u=i&&i.then)}catch(t){return c((function(){O(e,!1,t)}))(),e}if(r!==w&&i instanceof A&&i.hasOwnProperty(d)&&i.hasOwnProperty(_)&&i[d]!==T)C(i),O(e,i[d],i[_]);else if(r!==w&&"function"==typeof u)try{u.call(i,c(E(e,r)),c(E(e,!1)))}catch(t){c((function(){O(e,!1,t)}))()}else{e[d]=r;var f=e[_];if(e[_]=i,e[k]===k&&r===b&&(e[d]=e[y],e[_]=e[g]),r===w&&i instanceof Error){var h=t.currentTask&&t.currentTask.data&&t.currentTask.data[l];h&&o(i,j,{configurable:!0,enumerable:!1,writable:!0,value:h})}for(var p=0;p<f.length;)I(e,f[p++],f[p++],f[p++],f[p++]);if(0==f.length&&r==w){e[d]=Z;var v=i;try{throw new Error("Uncaught (in promise): "+function e(t){return t&&t.toString===Object.prototype.toString?(t.constructor&&t.constructor.name||"")+": "+JSON.stringify(t):t?t.toString():Object.prototype.toString.call(t)}(i)+(i&&i.stack?"\n"+i.stack:""))}catch(e){v=e}s&&(v.throwOriginal=!0),v.rejection=i,v.promise=e,v.zone=t.current,v.task=t.currentTask,a.push(v),n.scheduleMicroTask()}}}return e}var z=i("rejectionHandledHandler");function C(e){if(e[d]===Z){try{var n=t[z];n&&"function"==typeof n&&n.call(this,{rejection:e[_],promise:e})}catch(e){}e[d]=w;for(var r=0;r<a.length;r++)e===a[r].promise&&a.splice(r,1)}}function I(e,t,n,r,o){C(e);var i=e[d],a=i?"function"==typeof r?r:p:"function"==typeof o?o:v;t.scheduleMicroTask(m,(function(){try{var r=e[_],o=!!n&&k===n[k];o&&(n[g]=r,n[y]=i);var s=t.run(a,void 0,o&&a!==v&&a!==p?[]:[r]);O(n,!0,s)}catch(e){O(n,!1,e)}}),n)}var N=function(){},x=e.AggregateError,A=function(){function e(t){var n=this;if(!(n instanceof e))throw new Error("Must be an instanceof Promise.");n[d]=T,n[_]=[];try{var r=P();t&&t(r(E(n,b)),r(E(n,w)))}catch(e){O(n,!1,e)}}return e.toString=function(){return"function ZoneAwarePromise() { [native code] }"},e.resolve=function(t){return t instanceof e?t:O(new this(null),b,t)},e.reject=function(e){return O(new this(null),w,e)},e.withResolvers=function(){var t={};return t.promise=new e((function(e,n){t.resolve=e,t.reject=n})),t},e.any=function(t){if(!t||"function"!=typeof t[Symbol.iterator])return Promise.reject(new x([],"All promises were rejected"));var n=[],r=0;try{for(var o=0,i=t;o<i.length;o++)r++,n.push(e.resolve(i[o]))}catch(e){return Promise.reject(new x([],"All promises were rejected"))}if(0===r)return Promise.reject(new x([],"All promises were rejected"));var a=!1,s=[];return new e((function(e,t){for(var o=0;o<n.length;o++)n[o].then((function(t){a||(a=!0,e(t))}),(function(e){s.push(e),0==--r&&(a=!0,t(new x(s,"All promises were rejected")))}))}))},e.race=function(e){var t,n,r=new this((function(e,r){t=e,n=r}));function o(e){t(e)}function i(e){n(e)}for(var a=0,s=e;a<s.length;a++){var c=s[a];h(c)||(c=this.resolve(c)),c.then(o,i)}return r},e.all=function(t){return e.allWithCallback(t)},e.allSettled=function(t){return(this&&this.prototype instanceof e?this:e).allWithCallback(t,{thenCallback:function(e){return{status:"fulfilled",value:e}},errorCallback:function(e){return{status:"rejected",reason:e}}})},e.allWithCallback=function(e,t){for(var n,r,o=new this((function(e,t){n=e,r=t})),i=2,a=0,s=[],c=function(e){h(e)||(e=u.resolve(e));var o=a;try{e.then((function(e){s[o]=t?t.thenCallback(e):e,0==--i&&n(s)}),(function(e){t?(s[o]=t.errorCallback(e),0==--i&&n(s)):r(e)}))}catch(e){r(e)}i++,a++},u=this,l=0,f=e;l<f.length;l++)c(f[l]);return 0==(i-=2)&&n(s),o},Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"Promise"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.then=function(n,r){var o,i=null===(o=this.constructor)||void 0===o?void 0:o[Symbol.species];i&&"function"==typeof i||(i=this.constructor||e);var a=new i(N),s=t.current;return this[d]==T?this[_].push(s,a,n,r):I(this,s,a,n,r),a},e.prototype.catch=function(e){return this.then(null,e)},e.prototype.finally=function(n){var r,o=null===(r=this.constructor)||void 0===r?void 0:r[Symbol.species];o&&"function"==typeof o||(o=e);var i=new o(N);i[k]=k;var a=t.current;return this[d]==T?this[_].push(a,i,n,n):I(this,a,i,n,n),i},e}();A.resolve=A.resolve,A.reject=A.reject,A.race=A.race,A.all=A.all;var M=e[c]=e.Promise;e.Promise=A;var R=i("thenPatched");function F(e){var t=e.prototype,n=r(t,"then");if(!n||!1!==n.writable&&n.configurable){var o=t.then;t[u]=o,e.prototype.then=function(e,t){var n=this;return new A((function(e,t){o.call(n,e,t)})).then(e,t)},e[R]=!0}}return n.patchThen=F,M&&(F(M),S(e,"fetch",(function(e){return function t(e){return function(t,n){var r=e.apply(t,n);if(r instanceof A)return r;var o=r.constructor;return o[R]||F(o),r}}(e)}))),Promise[t.__symbol__("uncaughtPromiseErrors")]=a,A})),Zone.__load_patch("toString",(function(e){var t=Function.prototype.toString,n=f("OriginalDelegate"),r=f("Promise"),o=f("Error"),i=function i(){if("function"==typeof this){var a=this[n];if(a)return"function"==typeof a?t.call(a):Object.prototype.toString.call(a);if(this===Promise){var s=e[r];if(s)return t.call(s)}if(this===Error){var c=e[o];if(c)return t.call(c)}}return t.call(this)};i[n]=t,Function.prototype.toString=i;var a=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":a.call(this)}})),Zone.__load_patch("node_util",(function(e,t,n){n.patchOnProperties=Z,n.patchMethod=S,n.bindArguments=_,n.patchMacroTask=P,function r(e){E=e}(!0)}));var j=!1;if("undefined"!=typeof window)try{var O=Object.defineProperty({},"passive",{get:function(){j=!0}});window.addEventListener("test",O,O),window.removeEventListener("test",O,O)}catch(e){j=!1}var z={useG:!0},C={},I={},N=new RegExp("^"+c+"(\\w+)(true|false)$"),x=f("propagationStopped");function A(e,t){var n=(t?t(e):e)+s,r=(t?t(e):e)+a,o=c+n,i=c+r;C[e]={},C[e][s]=o,C[e][a]=i}function M(e,t,r,u){var l=u&&u.add||o,h=u&&u.rm||i,p=u&&u.listeners||"eventListeners",v=u&&u.rmAll||"removeAllListeners",d=f(l),_="."+l+":",k="prependListener",y="."+k+":",m=function(e,t,n){if(!e.isRemoved){var r,o=e.callback;"object"==typeof o&&o.handleEvent&&(e.callback=function(e){return o.handleEvent(e)},e.originalDelegate=o);try{e.invoke(e,t,[n])}catch(e){r=e}var i=e.options;return i&&"object"==typeof i&&i.once&&t[h].call(t,n.type,e.originalDelegate?e.originalDelegate:e.callback,i),r}};function T(n,r,o){if(r=r||e.event){var i=n||r.target||e,c=i[C[r.type][o?a:s]];if(c){var u=[];if(1===c.length)(h=m(c[0],i,r))&&u.push(h);else for(var l=c.slice(),f=0;f<l.length&&(!r||!0!==r[x]);f++){var h;(h=m(l[f],i,r))&&u.push(h)}if(1===u.length)throw u[0];var p=function(e){var n=u[e];t.nativeScheduleMicroTask((function(){throw n}))};for(f=0;f<u.length;f++)p(f)}}}var b=function(e){return T(this,e,!1)},w=function(e){return T(this,e,!0)};function Z(t,r){if(!t)return!1;var o=!0;r&&void 0!==r.useG&&(o=r.useG);var i=r&&r.vh,u=!0;r&&void 0!==r.chkDup&&(u=r.chkDup);var m=!1;r&&void 0!==r.rt&&(m=r.rt);for(var T=t;T&&!T.hasOwnProperty(l);)T=n(T);if(!T&&t[l]&&(T=t),!T)return!1;if(T[d])return!1;var Z,E=r&&r.eventNameToString,S={},P=T[d]=T[l],O=T[f(h)]=T[h],x=T[f(p)]=T[p],M=T[f(v)]=T[v];r&&r.prepend&&(Z=T[f(r.prepend)]=T[r.prepend]);var F=o?function(e){if(!S.isExisting)return P.call(S.target,S.eventName,S.capture?w:b,S.options)}:function(e){return P.call(S.target,S.eventName,e.invoke,S.options)},H=o?function(e){if(!e.isRemoved){var t=C[e.eventName],n=void 0;t&&(n=t[e.capture?a:s]);var r=n&&e.target[n];if(r)for(var o=0;o<r.length;o++)if(r[o]===e){r.splice(o,1),e.isRemoved=!0,0===r.length&&(e.allRemoved=!0,e.target[n]=null);break}}if(e.allRemoved)return O.call(e.target,e.eventName,e.capture?w:b,e.options)}:function(e){return O.call(e.target,e.eventName,e.invoke,e.options)},L=r&&r.diff?r.diff:function(e,t){var n=typeof t;return"function"===n&&e.callback===t||"object"===n&&e.originalDelegate===t},G=Zone[f("UNPATCHED_EVENTS")],U=e[f("PASSIVE_EVENTS")],q=function(t,n,c,l,f,h){return void 0===f&&(f=!1),void 0===h&&(h=!1),function(){var p=this||e,v=arguments[0];r&&r.transferEventName&&(v=r.transferEventName(v));var d=arguments[1];if(!d)return t.apply(this,arguments);if(g&&"uncaughtException"===v)return t.apply(this,arguments);var _=!1;if("function"!=typeof d){if(!d.handleEvent)return t.apply(this,arguments);_=!0}if(!i||i(t,d,p,arguments)){var k=j&&!!U&&-1!==U.indexOf(v),y=function e(t,n){return!j&&"object"==typeof t&&t?!!t.capture:j&&n?"boolean"==typeof t?{capture:t,passive:!0}:t?"object"==typeof t&&!1!==t.passive?__assign(__assign({},t),{passive:!0}):t:{passive:!0}:t}(arguments[2],k),m=y&&"object"==typeof y&&y.signal&&"object"==typeof y.signal?y.signal:void 0;if(!(null==m?void 0:m.aborted)){if(G)for(var T=0;T<G.length;T++)if(v===G[T])return k?t.call(p,v,d,y):t.apply(this,arguments);var b=!!y&&("boolean"==typeof y||y.capture),w=!(!y||"object"!=typeof y)&&y.once,Z=Zone.current,P=C[v];P||(A(v,E),P=C[v]);var D,O=P[b?a:s],N=p[O],x=!1;if(N){if(x=!0,u)for(T=0;T<N.length;T++)if(L(N[T],d))return}else N=p[O]=[];var M=p.constructor.name,R=I[M];R&&(D=R[v]),D||(D=M+n+(E?E(v):v)),S.options=y,w&&(S.options.once=!1),S.target=p,S.capture=b,S.eventName=v,S.isExisting=x;var F=o?z:void 0;F&&(F.taskData=S),m&&(S.options.signal=void 0);var H=Z.scheduleEventTask(D,d,F,c,l);return m&&(S.options.signal=m,t.call(m,"abort",(function(){H.zone.cancelTask(H)}),{once:!0})),S.target=null,F&&(F.taskData=null),w&&(y.once=!0),(j||"boolean"!=typeof H.options)&&(H.options=y),H.target=p,H.capture=b,H.eventName=v,_&&(H.originalDelegate=d),h?N.unshift(H):N.push(H),f?p:void 0}}}};return T[l]=q(P,_,F,H,m),Z&&(T[k]=q(Z,y,(function(e){return Z.call(S.target,S.eventName,e.invoke,S.options)}),H,m,!0)),T[h]=function(){var t=this||e,n=arguments[0];r&&r.transferEventName&&(n=r.transferEventName(n));var o=arguments[2],u=!!o&&("boolean"==typeof o||o.capture),l=arguments[1];if(!l)return O.apply(this,arguments);if(!i||i(O,l,t,arguments)){var f,h=C[n];h&&(f=h[u?a:s]);var p=f&&t[f];if(p)for(var v=0;v<p.length;v++){var d=p[v];if(L(d,l))return p.splice(v,1),d.isRemoved=!0,0===p.length&&(d.allRemoved=!0,t[f]=null,"string"==typeof n&&(t[c+"ON_PROPERTY"+n]=null)),d.zone.cancelTask(d),m?t:void 0}return O.apply(this,arguments)}},T[p]=function(){var t=this||e,n=arguments[0];r&&r.transferEventName&&(n=r.transferEventName(n));for(var o=[],i=R(t,E?E(n):n),a=0;a<i.length;a++){var s=i[a];o.push(s.originalDelegate?s.originalDelegate:s.callback)}return o},T[v]=function(){var t=this||e,n=arguments[0];if(n){r&&r.transferEventName&&(n=r.transferEventName(n));var o=C[n];if(o){var i=t[o[s]],c=t[o[a]];if(i){var u=i.slice();for(p=0;p<u.length;p++)this[h].call(this,n,(l=u[p]).originalDelegate?l.originalDelegate:l.callback,l.options)}if(c)for(u=c.slice(),p=0;p<u.length;p++){var l;this[h].call(this,n,(l=u[p]).originalDelegate?l.originalDelegate:l.callback,l.options)}}}else{for(var f=Object.keys(t),p=0;p<f.length;p++){var d=N.exec(f[p]),_=d&&d[1];_&&"removeListener"!==_&&this[v].call(this,_)}this[v].call(this,"removeListener")}if(m)return this},D(T[l],P),D(T[h],O),M&&D(T[v],M),x&&D(T[p],x),!0}for(var E=[],S=0;S<r.length;S++)E[S]=Z(r[S],u);return E}function R(e,t){if(!t){var n=[];for(var r in e){var o=N.exec(r),i=o&&o[1];if(i&&(!t||i===t)){var c=e[r];if(c)for(var u=0;u<c.length;u++)n.push(c[u])}}return n}var l=C[t];l||(A(t),l=C[t]);var f=e[l[s]],h=e[l[a]];return f?h?f.concat(h):f.slice():h?h.slice():[]}function F(e,t){t.patchMethod(e,"queueMicrotask",(function(e){return function(e,t){Zone.current.scheduleMicroTask("queueMicrotask",t[0])}}))}Zone.__load_patch("EventEmitter",(function(e,t,n){var r,o="addListener",i="removeListener",a=function(e,t){return e.callback===t||e.callback.listener===t},s=function(e){return"string"==typeof e?e:e?e.toString().replace("(","_").replace(")","_"):""};try{r=require("events")}catch(e){}r&&r.EventEmitter&&function c(t){var r=M(e,n,[t],{useG:!1,add:o,rm:i,prepend:"prependListener",rmAll:"removeAllListeners",listeners:"listeners",chkDup:!1,rt:!0,diff:a,eventNameToString:s});r&&r[0]&&(t.on=t[o],t.off=t[i])}(r.EventEmitter.prototype)})),Zone.__load_patch("fs",(function(e,t,n){var r,o;try{o=require("fs")}catch(e){}if(o){["access","appendFile","chmod","chown","close","exists","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","read","readdir","readFile","readlink","realpath","rename","rmdir","stat","symlink","truncate","unlink","utimes","write","writeFile"].filter((function(e){return!!o[e]&&"function"==typeof o[e]})).forEach((function(e){P(o,e,(function(t,n){return{name:"fs."+e,args:n,cbIdx:n.length>0?n.length-1:-1,target:t}}))}));var i=null===(r=o.realpath)||void 0===r?void 0:r[n.symbol("OriginalDelegate")];(null==i?void 0:i.native)&&(o.realpath.native=i.native,P(o.realpath,"native",(function(e,t){return{args:t,target:e,cbIdx:t.length>0?t.length-1:-1,name:"fs.realpath.native"}})))}}));var H=f("zoneTask");function L(e,t,n,r){var o=null,i=null;n+=r;var a={};function s(t){var n=t.data;return n.args[0]=function(){return t.invoke.apply(this,arguments)},n.handleId=o.apply(e,n.args),t}function c(t){return i.call(e,t.data.handleId)}o=S(e,t+=r,(function(n){return function(o,i){if("function"==typeof i[0]){var u={isPeriodic:"Interval"===r,delay:"Timeout"===r||"Interval"===r?i[1]||0:void 0,args:i},f=i[0];i[0]=function e(){try{return f.apply(this,arguments)}finally{u.isPeriodic||("number"==typeof u.handleId?delete a[u.handleId]:u.handleId&&(u.handleId[H]=null))}};var h=l(t,i[0],u,s,c);if(!h)return h;var p=h.data.handleId;return"number"==typeof p?a[p]=h:p&&(p[H]=h),p&&p.ref&&p.unref&&"function"==typeof p.ref&&"function"==typeof p.unref&&(h.ref=p.ref.bind(p),h.unref=p.unref.bind(p)),"number"==typeof p||p?p:h}return n.apply(e,i)}})),i=S(e,n,(function(t){return function(n,r){var o,i=r[0];"number"==typeof i?o=a[i]:(o=i&&i[H])||(o=i),o&&"string"==typeof o.type?"notScheduled"!==o.state&&(o.cancelFn&&o.data.isPeriodic||0===o.runCount)&&("number"==typeof i?delete a[i]:i&&(i[H]=null),o.zone.cancelTask(o)):t.apply(e,r)}}))}var G="set",U="clear";Zone.__load_patch("node_timers",(function(e,t){var n=!1;try{var r=require("timers");if(e.setTimeout!==r.setTimeout&&!m){var o=r.setTimeout;r.setTimeout=function(){return n=!0,o.apply(this,arguments)};var i=e.setTimeout((function(){}),100);clearTimeout(i),r.setTimeout=o}L(r,G,U,"Timeout"),L(r,G,U,"Interval"),L(r,G,U,"Immediate")}catch(e){}m||(n?(e[t.__symbol__("setTimeout")]=e.setTimeout,e[t.__symbol__("setInterval")]=e.setInterval,e[t.__symbol__("setImmediate")]=e.setImmediate):(L(e,G,U,"Timeout"),L(e,G,U,"Interval"),L(e,G,U,"Immediate")))})),Zone.__load_patch("nextTick",(function(){!function e(t,n,r){var o=null;function i(e){var t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},o.apply(t.target,t.args),e}o=S(t,n,(function(e){return function(t,n){var o=r(t,n);return o.cbIdx>=0&&"function"==typeof n[o.cbIdx]?Zone.current.scheduleMicroTask(o.name,n[o.cbIdx],o,i):e.apply(t,n)}}))}(process,"nextTick",(function(e,t){return{name:"process.nextTick",args:t,cbIdx:t.length>0&&"function"==typeof t[0]?0:-1,target:process}}))})),Zone.__load_patch("handleUnhandledPromiseRejection",(function(e,t,n){function r(e){return function(t){R(process,e).forEach((function(n){"unhandledRejection"===e?n.invoke(t.rejection,t.promise):"rejectionHandled"===e&&n.invoke(t.promise)}))}}t[n.symbol("unhandledPromiseRejectionHandler")]=r("unhandledRejection"),t[n.symbol("rejectionHandledHandler")]=r("rejectionHandled")})),Zone.__load_patch("crypto",(function(){var e;try{e=require("crypto")}catch(e){}e&&["randomBytes","pbkdf2"].forEach((function(t){P(e,t,(function(n,r){return{name:"crypto."+t,args:r,cbIdx:r.length>0&&"function"==typeof r[r.length-1]?r.length-1:-1,target:e}}))}))})),Zone.__load_patch("console",(function(e,t){["dir","log","info","error","warn","assert","debug","timeEnd","trace"].forEach((function(e){var n=console[t.__symbol__(e)]=console[e];n&&(console[e]=function(){var e=r.call(arguments);return t.current===t.root?n.apply(this,e):t.root.run(n,this,e)})}))})),Zone.__load_patch("queueMicrotask",(function(e,t,n){F(e,n)}))}));
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){var e=globalThis;function t(t){return(e.__Zone_symbol_prefix||"__zone_symbol__")+t}function n(){var n,r=e.performance;function o(e){r&&r.mark&&r.mark(e)}function i(e,t){r&&r.measure&&r.measure(e,t)}o("Zone");var a=function(){function r(e,t){this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new u(this,this._parent&&this._parent._zoneDelegate,t)}return r.assertZonePatched=function(){if(e.Promise!==j.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")},Object.defineProperty(r,"root",{get:function(){for(var e=n.current;e.parent;)e=e.parent;return e},enumerable:!1,configurable:!0}),Object.defineProperty(r,"current",{get:function(){return z.zone},enumerable:!1,configurable:!0}),Object.defineProperty(r,"currentTask",{get:function(){return C},enumerable:!1,configurable:!0}),r.__load_patch=function(r,a,s){if(void 0===s&&(s=!1),j.hasOwnProperty(r)){var c=!0===e[t("forceDuplicateZoneCheck")];if(!s&&c)throw Error("Already loaded patch: "+r)}else if(!e["__Zone_disable_"+r]){var u="Zone:"+r;o(u),j[r]=a(e,n,O),i(u,u)}},Object.defineProperty(r.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),r.prototype.get=function(e){var t=this.getZoneWith(e);if(t)return t._properties[e]},r.prototype.getZoneWith=function(e){for(var t=this;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null},r.prototype.fork=function(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)},r.prototype.wrap=function(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);var n=this._zoneDelegate.intercept(this,e,t),r=this;return function(){return r.runGuarded(n,this,arguments,t)}},r.prototype.run=function(e,t,n,r){z={parent:z,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{z=z.parent}},r.prototype.runGuarded=function(e,t,n,r){void 0===t&&(t=null),z={parent:z,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{z=z.parent}},r.prototype.runTask=function(e,t,n){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||y).name+"; Execution: "+this.name+")");if(e.state!==m||e.type!==D&&e.type!==P){var r=e.state!=w;r&&e._transitionTo(w,b),e.runCount++;var o=C;C=e,z={parent:z,zone:this};try{e.type==P&&e.data&&!e.data.isPeriodic&&(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,e,t,n)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{e.state!==m&&e.state!==Z&&(e.type==D||e.data&&e.data.isPeriodic?r&&e._transitionTo(b,w):(e.runCount=0,this._updateTaskCount(e,-1),r&&e._transitionTo(m,w,m))),z=z.parent,C=o}}},r.prototype.scheduleTask=function(e){if(e.zone&&e.zone!==this)for(var t=this;t;){if(t===e.zone)throw Error("can not reschedule task to ".concat(this.name," which is descendants of the original zone ").concat(e.zone.name));t=t.parent}e._transitionTo(T,m);var n=[];e._zoneDelegates=n,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(t){throw e._transitionTo(Z,T,m),this._zoneDelegate.handleError(this,t),t}return e._zoneDelegates===n&&this._updateTaskCount(e,1),e.state==T&&e._transitionTo(b,T),e},r.prototype.scheduleMicroTask=function(e,t,n,r){return this.scheduleTask(new l(S,e,t,n,r,void 0))},r.prototype.scheduleMacroTask=function(e,t,n,r,o){return this.scheduleTask(new l(P,e,t,n,r,o))},r.prototype.scheduleEventTask=function(e,t,n,r,o){return this.scheduleTask(new l(D,e,t,n,r,o))},r.prototype.cancelTask=function(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||y).name+"; Execution: "+this.name+")");if(e.state===b||e.state===w){e._transitionTo(E,b,w);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(Z,E),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(m,E),e.runCount=0,e}},r.prototype._updateTaskCount=function(e,t){var n=e._zoneDelegates;-1==t&&(e._zoneDelegates=null);for(var r=0;r<n.length;r++)n[r]._updateTaskCount(e.type,t)},r}();(n=a).__symbol__=t;var s,c={name:"",onHasTask:function(e,t,n,r){return e.hasTask(n,r)},onScheduleTask:function(e,t,n,r){return e.scheduleTask(n,r)},onInvokeTask:function(e,t,n,r,o,i){return e.invokeTask(n,r,o,i)},onCancelTask:function(e,t,n,r){return e.cancelTask(n,r)}},u=function(){function e(e,t,n){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this._zone=e,this._parentDelegate=t,this._forkZS=n&&(n&&n.onFork?n:t._forkZS),this._forkDlgt=n&&(n.onFork?t:t._forkDlgt),this._forkCurrZone=n&&(n.onFork?this._zone:t._forkCurrZone),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this._zone:t._interceptCurrZone),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this._zone:t._invokeCurrZone),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this._zone:t._handleErrorCurrZone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this._zone:t._scheduleTaskCurrZone),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this._zone:t._invokeTaskCurrZone),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this._zone:t._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;var r=n&&n.onHasTask;(r||t&&t._hasTaskZS)&&(this._hasTaskZS=r?n:c,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=this._zone,n.onScheduleTask||(this._scheduleTaskZS=c,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this._zone),n.onInvokeTask||(this._invokeTaskZS=c,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this._zone),n.onCancelTask||(this._cancelTaskZS=c,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this._zone))}return Object.defineProperty(e.prototype,"zone",{get:function(){return this._zone},enumerable:!1,configurable:!0}),e.prototype.fork=function(e,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,t):new a(e,t)},e.prototype.intercept=function(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,e,t,n):t},e.prototype.invoke=function(e,t,n,r,o){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,e,t,n,r,o):t.apply(n,r)},e.prototype.handleError=function(e,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,e,t)},e.prototype.scheduleTask=function(e,t){var n=t;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),(n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,e,t))||(n=t);else if(t.scheduleFn)t.scheduleFn(t);else{if(t.type!=S)throw new Error("Task is missing scheduleFn.");_(t)}return n},e.prototype.invokeTask=function(e,t,n,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,e,t,n,r):t.callback.apply(n,r)},e.prototype.cancelTask=function(e,t){var n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,e,t);else{if(!t.cancelFn)throw Error("Task is not cancelable");n=t.cancelFn(t)}return n},e.prototype.hasTask=function(e,t){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,e,t)}catch(t){this.handleError(e,t)}},e.prototype._updateTaskCount=function(e,t){var n=this._taskCounts,r=n[e],o=n[e]=r+t;if(o<0)throw new Error("More tasks executed then were scheduled.");0!=r&&0!=o||this.hasTask(this._zone,{microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e})},e}(),l=function(){function t(n,r,o,i,a,s){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=n,this.source=r,this.data=i,this.scheduleFn=a,this.cancelFn=s,!o)throw new Error("callback is not defined");this.callback=o;var c=this;this.invoke=n===D&&i&&i.useG?t.invokeTask:function(){return t.invokeTask.call(e,c,this,arguments)}}return t.invokeTask=function(e,t,n){e||(e=this),I++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{1==I&&g(),I--}},Object.defineProperty(t.prototype,"zone",{get:function(){return this._zone},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),t.prototype.cancelScheduleRequest=function(){this._transitionTo(m,T)},t.prototype._transitionTo=function(e,t,n){if(this._state!==t&&this._state!==n)throw new Error("".concat(this.type," '").concat(this.source,"': can not transition to '").concat(e,"', expecting state '").concat(t,"'").concat(n?" or '"+n+"'":"",", was '").concat(this._state,"'."));this._state=e,e==m&&(this._zoneDelegates=null)},t.prototype.toString=function(){return this.data&&void 0!==this.data.handleId?this.data.handleId.toString():Object.prototype.toString.call(this)},t.prototype.toJSON=function(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}},t}(),f=t("setTimeout"),h=t("Promise"),p=t("then"),v=[],d=!1;function k(t){if(s||e[h]&&(s=e[h].resolve(0)),s){var n=s[p];n||(n=s.then),n.call(s,t)}else e[f](t,0)}function _(e){0===I&&0===v.length&&k(g),e&&v.push(e)}function g(){if(!d){for(d=!0;v.length;){var e=v;v=[];for(var t=0;t<e.length;t++){var n=e[t];try{n.zone.runTask(n,null,null)}catch(e){O.onUnhandledError(e)}}}O.microtaskDrainDone(),d=!1}}var y={name:"NO ZONE"},m="notScheduled",T="scheduling",b="scheduled",w="running",E="canceling",Z="unknown",S="microTask",P="macroTask",D="eventTask",j={},O={symbol:t,currentZoneFrame:function(){return z},onUnhandledError:N,microtaskDrainDone:N,scheduleMicroTask:_,showUncaughtError:function(){return!a[t("ignoreConsoleErrorUncaughtError")]},patchEventTarget:function(){return[]},patchOnProperties:N,patchMethod:function(){return N},bindArguments:function(){return[]},patchThen:function(){return N},patchMacroTask:function(){return N},patchEventPrototype:function(){return N},isIEOrEdge:function(){return!1},getGlobalObjects:function(){},ObjectDefineProperty:function(){return N},ObjectGetOwnPropertyDescriptor:function(){},ObjectCreate:function(){},ArraySlice:function(){return[]},patchClass:function(){return N},wrapWithCurrentZone:function(){return N},filterProperties:function(){return[]},attachOriginToPatched:function(){return N},_redefineProperty:function(){return N},patchCallbacks:function(){return N},nativeScheduleMicroTask:k},z={parent:null,zone:new a(null,null)},C=null,I=0;function N(){}return i("Zone","Zone"),a}var r=Object.getOwnPropertyDescriptor,o=Object.defineProperty,i=Object.getPrototypeOf,a=Array.prototype.slice,s="addEventListener",c="removeEventListener",u="true",l="false",f=t("");function h(e,t){return Zone.current.wrap(e,t)}function p(e,t,n,r,o){return Zone.current.scheduleMacroTask(e,t,n,r,o)}var v=t,d="undefined"!=typeof window,k=d?window:void 0,_=d&&k||globalThis,g="removeAttribute";function y(e,t){for(var n=e.length-1;n>=0;n--)"function"==typeof e[n]&&(e[n]=h(e[n],t+"_"+n));return e}var m="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,T=!("nw"in _)&&void 0!==_.process&&"[object process]"==={}.toString.call(_.process),b=!T&&!m&&!(!d||!k.HTMLElement),w=void 0!==_.process&&"[object process]"==={}.toString.call(_.process)&&!m&&!(!d||!k.HTMLElement),E={},Z=function(e){if(e=e||_.event){var t=E[e.type];t||(t=E[e.type]=v("ON_PROPERTY"+e.type));var n,r=this||e.target||_,o=r[t];return b&&r===k&&"error"===e.type?!0===(n=o&&o.call(this,e.message,e.filename,e.lineno,e.colno,e.error))&&e.preventDefault():null==(n=o&&o.apply(this,arguments))||n||e.preventDefault(),n}};function S(e,t,n){var i=r(e,t);if(!i&&n&&r(n,t)&&(i={enumerable:!0,configurable:!0}),i&&i.configurable){var a=v("on"+t+"patched");if(!e.hasOwnProperty(a)||!e[a]){delete i.writable,delete i.value;var s=i.get,c=i.set,u=t.slice(2),l=E[u];l||(l=E[u]=v("ON_PROPERTY"+u)),i.set=function(t){var n=this;n||e!==_||(n=_),n&&("function"==typeof n[l]&&n.removeEventListener(u,Z),c&&c.call(n,null),n[l]=t,"function"==typeof t&&n.addEventListener(u,Z,!1))},i.get=function(){var n=this;if(n||e!==_||(n=_),!n)return null;var r=n[l];if(r)return r;if(s){var o=s.call(this);if(o)return i.set.call(this,o),"function"==typeof n[g]&&n.removeAttribute(t),o}return null},o(e,t,i),e[a]=!0}}}function P(e,t,n){if(t)for(var r=0;r<t.length;r++)S(e,"on"+t[r],n);else{var o=[];for(var i in e)"on"==i.slice(0,2)&&o.push(i);for(var a=0;a<o.length;a++)S(e,o[a],n)}}var D=!1;function j(e,t,n){for(var o=e;o&&!o.hasOwnProperty(t);)o=i(o);!o&&e[t]&&(o=e);var a=v(t),s=null;if(o&&(!(s=o[a])||!o.hasOwnProperty(a))&&(s=o[a]=o[t],function c(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&void 0===e.set)}(o&&r(o,t)))){var u=n(s,a,t);o[t]=function(){return u(this,arguments)},C(o[t],s),D&&function e(t,n){"function"==typeof Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach((function(e){var r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,{get:function(){return t[e]},set:function(n){(!r||r.writable&&"function"==typeof r.set)&&(t[e]=n)},enumerable:!r||r.enumerable,configurable:!r||r.configurable})}))}(s,o[t])}return s}function O(e,t,n){var r=null;function o(e){var t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},r.apply(t.target,t.args),e}r=j(e,t,(function(e){return function(t,r){var i=n(t,r);return i.cbIdx>=0&&"function"==typeof r[i.cbIdx]?p(i.name,r[i.cbIdx],i,o):e.apply(t,r)}}))}function z(e,t,n){var r=null;function o(e){var t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},r.apply(t.target,t.args),e}r=j(e,t,(function(e){return function(t,r){var i=n(t,r);return i.cbIdx>=0&&"function"==typeof r[i.cbIdx]?Zone.current.scheduleMicroTask(i.name,r[i.cbIdx],i,o):e.apply(t,r)}}))}function C(e,t){e[v("OriginalDelegate")]=t}var I=!1;if("undefined"!=typeof window)try{var N=Object.defineProperty({},"passive",{get:function(){I=!0}});window.addEventListener("test",N,N),window.removeEventListener("test",N,N)}catch(e){I=!1}var x={useG:!0},A={},M={},R=new RegExp("^"+f+"(\\w+)(true|false)$"),F=v("propagationStopped");function H(e,t){var n=(t?t(e):e)+l,r=(t?t(e):e)+u,o=f+n,i=f+r;A[e]={},A[e][l]=o,A[e][u]=i}function L(e,t,n,r){var o=r&&r.add||s,a=r&&r.rm||c,h=r&&r.listeners||"eventListeners",p=r&&r.rmAll||"removeAllListeners",d=v(o),k="."+o+":",_="prependListener",g="."+_+":",y=function(e,t,n){if(!e.isRemoved){var r,o=e.callback;"object"==typeof o&&o.handleEvent&&(e.callback=function(e){return o.handleEvent(e)},e.originalDelegate=o);try{e.invoke(e,t,[n])}catch(e){r=e}var i=e.options;return i&&"object"==typeof i&&i.once&&t[a].call(t,n.type,e.originalDelegate?e.originalDelegate:e.callback,i),r}};function m(n,r,o){if(r=r||e.event){var i=n||r.target||e,a=i[A[r.type][o?u:l]];if(a){var s=[];if(1===a.length)(h=y(a[0],i,r))&&s.push(h);else for(var c=a.slice(),f=0;f<c.length&&(!r||!0!==r[F]);f++){var h;(h=y(c[f],i,r))&&s.push(h)}if(1===s.length)throw s[0];var p=function(e){var n=s[e];t.nativeScheduleMicroTask((function(){throw n}))};for(f=0;f<s.length;f++)p(f)}}}var b=function(e){return m(this,e,!1)},w=function(e){return m(this,e,!0)};function E(t,n){if(!t)return!1;var r=!0;n&&void 0!==n.useG&&(r=n.useG);var s=n&&n.vh,c=!0;n&&void 0!==n.chkDup&&(c=n.chkDup);var y=!1;n&&void 0!==n.rt&&(y=n.rt);for(var m=t;m&&!m.hasOwnProperty(o);)m=i(m);if(!m&&t[o]&&(m=t),!m)return!1;if(m[d])return!1;var E,Z=n&&n.eventNameToString,S={},P=m[d]=m[o],D=m[v(a)]=m[a],j=m[v(h)]=m[h],O=m[v(p)]=m[p];n&&n.prepend&&(E=m[v(n.prepend)]=m[n.prepend]);var z=r?function(e){if(!S.isExisting)return P.call(S.target,S.eventName,S.capture?w:b,S.options)}:function(e){return P.call(S.target,S.eventName,e.invoke,S.options)},N=r?function(e){if(!e.isRemoved){var t=A[e.eventName],n=void 0;t&&(n=t[e.capture?u:l]);var r=n&&e.target[n];if(r)for(var o=0;o<r.length;o++)if(r[o]===e){r.splice(o,1),e.isRemoved=!0,0===r.length&&(e.allRemoved=!0,e.target[n]=null);break}}if(e.allRemoved)return D.call(e.target,e.eventName,e.capture?w:b,e.options)}:function(e){return D.call(e.target,e.eventName,e.invoke,e.options)},F=n&&n.diff?n.diff:function(e,t){var n=typeof t;return"function"===n&&e.callback===t||"object"===n&&e.originalDelegate===t},L=Zone[v("UNPATCHED_EVENTS")],U=e[v("PASSIVE_EVENTS")],q=function(t,o,i,a,f,h){return void 0===f&&(f=!1),void 0===h&&(h=!1),function(){var p=this||e,v=arguments[0];n&&n.transferEventName&&(v=n.transferEventName(v));var d=arguments[1];if(!d)return t.apply(this,arguments);if(T&&"uncaughtException"===v)return t.apply(this,arguments);var k=!1;if("function"!=typeof d){if(!d.handleEvent)return t.apply(this,arguments);k=!0}if(!s||s(t,d,p,arguments)){var _=I&&!!U&&-1!==U.indexOf(v),g=function e(t,n){return!I&&"object"==typeof t&&t?!!t.capture:I&&n?"boolean"==typeof t?{capture:t,passive:!0}:t?"object"==typeof t&&!1!==t.passive?__assign(__assign({},t),{passive:!0}):t:{passive:!0}:t}(arguments[2],_),y=g&&"object"==typeof g&&g.signal&&"object"==typeof g.signal?g.signal:void 0;if(!(null==y?void 0:y.aborted)){if(L)for(var m=0;m<L.length;m++)if(v===L[m])return _?t.call(p,v,d,g):t.apply(this,arguments);var b=!!g&&("boolean"==typeof g||g.capture),w=!(!g||"object"!=typeof g)&&g.once,E=Zone.current,P=A[v];P||(H(v,Z),P=A[v]);var D,j=P[b?u:l],O=p[j],z=!1;if(O){if(z=!0,c)for(m=0;m<O.length;m++)if(F(O[m],d))return}else O=p[j]=[];var C=p.constructor.name,N=M[C];N&&(D=N[v]),D||(D=C+o+(Z?Z(v):v)),S.options=g,w&&(S.options.once=!1),S.target=p,S.capture=b,S.eventName=v,S.isExisting=z;var R=r?x:void 0;R&&(R.taskData=S),y&&(S.options.signal=void 0);var G=E.scheduleEventTask(D,d,R,i,a);return y&&(S.options.signal=y,t.call(y,"abort",(function(){G.zone.cancelTask(G)}),{once:!0})),S.target=null,R&&(R.taskData=null),w&&(g.once=!0),(I||"boolean"!=typeof G.options)&&(G.options=g),G.target=p,G.capture=b,G.eventName=v,k&&(G.originalDelegate=d),h?O.unshift(G):O.push(G),f?p:void 0}}}};return m[o]=q(P,k,z,N,y),E&&(m[_]=q(E,g,(function(e){return E.call(S.target,S.eventName,e.invoke,S.options)}),N,y,!0)),m[a]=function(){var t=this||e,r=arguments[0];n&&n.transferEventName&&(r=n.transferEventName(r));var o=arguments[2],i=!!o&&("boolean"==typeof o||o.capture),a=arguments[1];if(!a)return D.apply(this,arguments);if(!s||s(D,a,t,arguments)){var c,h=A[r];h&&(c=h[i?u:l]);var p=c&&t[c];if(p)for(var v=0;v<p.length;v++){var d=p[v];if(F(d,a))return p.splice(v,1),d.isRemoved=!0,0===p.length&&(d.allRemoved=!0,t[c]=null,i||"string"!=typeof r||(t[f+"ON_PROPERTY"+r]=null)),d.zone.cancelTask(d),y?t:void 0}return D.apply(this,arguments)}},m[h]=function(){var t=this||e,r=arguments[0];n&&n.transferEventName&&(r=n.transferEventName(r));for(var o=[],i=G(t,Z?Z(r):r),a=0;a<i.length;a++){var s=i[a];o.push(s.originalDelegate?s.originalDelegate:s.callback)}return o},m[p]=function(){var t=this||e,r=arguments[0];if(r){n&&n.transferEventName&&(r=n.transferEventName(r));var o=A[r];if(o){var i=t[o[l]],s=t[o[u]];if(i){var c=i.slice();for(v=0;v<c.length;v++)this[a].call(this,r,(f=c[v]).originalDelegate?f.originalDelegate:f.callback,f.options)}if(s)for(c=s.slice(),v=0;v<c.length;v++){var f;this[a].call(this,r,(f=c[v]).originalDelegate?f.originalDelegate:f.callback,f.options)}}}else{for(var h=Object.keys(t),v=0;v<h.length;v++){var d=R.exec(h[v]),k=d&&d[1];k&&"removeListener"!==k&&this[p].call(this,k)}this[p].call(this,"removeListener")}if(y)return this},C(m[o],P),C(m[a],D),O&&C(m[p],O),j&&C(m[h],j),!0}for(var Z=[],S=0;S<n.length;S++)Z[S]=E(n[S],r);return Z}function G(e,t){if(!t){var n=[];for(var r in e){var o=R.exec(r),i=o&&o[1];if(i&&(!t||i===t)){var a=e[r];if(a)for(var s=0;s<a.length;s++)n.push(a[s])}}return n}var c=A[t];c||(H(t),c=A[t]);var f=e[c[l]],h=e[c[u]];return f?h?f.concat(h):f.slice():h?h.slice():[]}function U(e,t){t.patchMethod(e,"queueMicrotask",(function(e){return function(e,t){Zone.current.scheduleMicroTask("queueMicrotask",t[0])}}))}var q=v("zoneTask");function W(e,t,n,r){var o=null,i=null;n+=r;var a={};function s(t){var n=t.data;return n.args[0]=function(){return t.invoke.apply(this,arguments)},n.handleId=o.apply(e,n.args),t}function c(t){return i.call(e,t.data.handleId)}o=j(e,t+=r,(function(n){return function(o,i){if("function"==typeof i[0]){var u={isPeriodic:"Interval"===r,delay:"Timeout"===r||"Interval"===r?i[1]||0:void 0,args:i},l=i[0];i[0]=function e(){try{return l.apply(this,arguments)}finally{u.isPeriodic||("number"==typeof u.handleId?delete a[u.handleId]:u.handleId&&(u.handleId[q]=null))}};var f=p(t,i[0],u,s,c);if(!f)return f;var h=f.data.handleId;return"number"==typeof h?a[h]=f:h&&(h[q]=f),h&&h.ref&&h.unref&&"function"==typeof h.ref&&"function"==typeof h.unref&&(f.ref=h.ref.bind(h),f.unref=h.unref.bind(h)),"number"==typeof h||h?h:f}return n.apply(e,i)}})),i=j(e,n,(function(t){return function(n,r){var o,i=r[0];"number"==typeof i?o=a[i]:(o=i&&i[q])||(o=i),o&&"string"==typeof o.type?"notScheduled"!==o.state&&(o.cancelFn&&o.data.isPeriodic||0===o.runCount)&&("number"==typeof i?delete a[i]:i&&(i[q]=null),o.zone.cancelTask(o)):t.apply(e,r)}}))}var V="set",J="clear";!function Y(){var e=function r(){var e,r=globalThis,o=!0===r[t("forceDuplicateZoneCheck")];if(r.Zone&&(o||"function"!=typeof r.Zone.__symbol__))throw new Error("Zone already loaded.");return null!==(e=r.Zone)&&void 0!==e||(r.Zone=n()),r.Zone}();(function o(e){(function t(e){e.__load_patch("node_util",(function(e,t,n){n.patchOnProperties=P,n.patchMethod=j,n.bindArguments=y,n.patchMacroTask=O,function r(e){D=e}(!0)}))})(e),function n(e){e.__load_patch("EventEmitter",(function(e,t,n){var r,o="addListener",i="removeListener",a=function(e,t){return e.callback===t||e.callback.listener===t},s=function(e){return"string"==typeof e?e:e?e.toString().replace("(","_").replace(")","_"):""};try{r=require("events")}catch(e){}r&&r.EventEmitter&&function c(t){var r=L(e,n,[t],{useG:!1,add:o,rm:i,prepend:"prependListener",rmAll:"removeAllListeners",listeners:"listeners",chkDup:!1,rt:!0,diff:a,eventNameToString:s});r&&r[0]&&(t.on=t[o],t.off=t[i])}(r.EventEmitter.prototype)}))}(e),function r(e){e.__load_patch("fs",(function(e,t,n){var r,o;try{o=require("fs")}catch(e){}if(o){["access","appendFile","chmod","chown","close","exists","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","read","readdir","readFile","readlink","realpath","rename","rmdir","stat","symlink","truncate","unlink","utimes","write","writeFile"].filter((function(e){return!!o[e]&&"function"==typeof o[e]})).forEach((function(e){O(o,e,(function(t,n){return{name:"fs."+e,args:n,cbIdx:n.length>0?n.length-1:-1,target:t}}))}));var i=null===(r=o.realpath)||void 0===r?void 0:r[n.symbol("OriginalDelegate")];(null==i?void 0:i.native)&&(o.realpath.native=i.native,O(o.realpath,"native",(function(e,t){return{args:t,target:e,cbIdx:t.length>0?t.length-1:-1,name:"fs.realpath.native"}})))}}))}(e),e.__load_patch("node_timers",(function(e,t){var n=!1;try{var r=require("timers");if(e.setTimeout!==r.setTimeout&&!w){var o=r.setTimeout;r.setTimeout=function(){return n=!0,o.apply(this,arguments)};var i=e.setTimeout((function(){}),100);clearTimeout(i),r.setTimeout=o}W(r,V,J,"Timeout"),W(r,V,J,"Interval"),W(r,V,J,"Immediate")}catch(e){}w||(n?(e[t.__symbol__("setTimeout")]=e.setTimeout,e[t.__symbol__("setInterval")]=e.setInterval,e[t.__symbol__("setImmediate")]=e.setImmediate):(W(e,V,J,"Timeout"),W(e,V,J,"Interval"),W(e,V,J,"Immediate")))})),e.__load_patch("nextTick",(function(){z(process,"nextTick",(function(e,t){return{name:"process.nextTick",args:t,cbIdx:t.length>0&&"function"==typeof t[0]?0:-1,target:process}}))})),e.__load_patch("handleUnhandledPromiseRejection",(function(e,t,n){function r(e){return function(t){G(process,e).forEach((function(n){"unhandledRejection"===e?n.invoke(t.rejection,t.promise):"rejectionHandled"===e&&n.invoke(t.promise)}))}}t[n.symbol("unhandledPromiseRejectionHandler")]=r("unhandledRejection"),t[n.symbol("rejectionHandledHandler")]=r("rejectionHandled")})),e.__load_patch("crypto",(function(){var e;try{e=require("crypto")}catch(e){}e&&["randomBytes","pbkdf2"].forEach((function(t){O(e,t,(function(n,r){return{name:"crypto."+t,args:r,cbIdx:r.length>0&&"function"==typeof r[r.length-1]?r.length-1:-1,target:e}}))}))})),e.__load_patch("console",(function(e,t){["dir","log","info","error","warn","assert","debug","timeEnd","trace"].forEach((function(e){var n=console[t.__symbol__(e)]=console[e];n&&(console[e]=function(){var e=a.call(arguments);return t.current===t.root?n.apply(this,e):t.root.run(n,this,e)})}))})),e.__load_patch("queueMicrotask",(function(e,t,n){U(e,n)}))})(e),function i(e){e.__load_patch("ZoneAwarePromise",(function(e,t,n){var r=Object.getOwnPropertyDescriptor,o=Object.defineProperty,i=n.symbol,a=[],s=!1!==e[i("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],c=i("Promise"),u=i("then"),l="__creationTrace__";n.onUnhandledError=function(e){if(n.showUncaughtError()){var t=e&&e.rejection;t?console.error("Unhandled Promise rejection:",t instanceof Error?t.message:t,"; Zone:",e.zone.name,"; Task:",e.task&&e.task.source,"; Value:",t,t instanceof Error?t.stack:void 0):console.error(e)}},n.microtaskDrainDone=function(){for(var e=function(){var e=a.shift();try{e.zone.runGuarded((function(){if(e.throwOriginal)throw e.rejection;throw e}))}catch(e){!function r(e){n.onUnhandledError(e);try{var r=t[f];"function"==typeof r&&r.call(this,e)}catch(e){}}(e)}};a.length;)e()};var f=i("unhandledPromiseRejectionHandler");function h(e){return e&&e.then}function p(e){return e}function v(e){return A.reject(e)}var d=i("state"),k=i("value"),_=i("finally"),g=i("parentPromiseValue"),y=i("parentPromiseState"),m="Promise.then",T=null,b=!0,w=!1,E=0;function Z(e,t){return function(n){try{O(e,t,n)}catch(t){O(e,!1,t)}}}var S=function(){var e=!1;return function t(n){return function(){e||(e=!0,n.apply(null,arguments))}}},P="Promise resolved with itself",D=i("currentTaskTrace");function O(e,r,i){var c=S();if(e===i)throw new TypeError(P);if(e[d]===T){var u=null;try{"object"!=typeof i&&"function"!=typeof i||(u=i&&i.then)}catch(t){return c((function(){O(e,!1,t)}))(),e}if(r!==w&&i instanceof A&&i.hasOwnProperty(d)&&i.hasOwnProperty(k)&&i[d]!==T)C(i),O(e,i[d],i[k]);else if(r!==w&&"function"==typeof u)try{u.call(i,c(Z(e,r)),c(Z(e,!1)))}catch(t){c((function(){O(e,!1,t)}))()}else{e[d]=r;var f=e[k];if(e[k]=i,e[_]===_&&r===b&&(e[d]=e[y],e[k]=e[g]),r===w&&i instanceof Error){var h=t.currentTask&&t.currentTask.data&&t.currentTask.data[l];h&&o(i,D,{configurable:!0,enumerable:!1,writable:!0,value:h})}for(var p=0;p<f.length;)I(e,f[p++],f[p++],f[p++],f[p++]);if(0==f.length&&r==w){e[d]=E;var v=i;try{throw new Error("Uncaught (in promise): "+function e(t){return t&&t.toString===Object.prototype.toString?(t.constructor&&t.constructor.name||"")+": "+JSON.stringify(t):t?t.toString():Object.prototype.toString.call(t)}(i)+(i&&i.stack?"\n"+i.stack:""))}catch(e){v=e}s&&(v.throwOriginal=!0),v.rejection=i,v.promise=e,v.zone=t.current,v.task=t.currentTask,a.push(v),n.scheduleMicroTask()}}}return e}var z=i("rejectionHandledHandler");function C(e){if(e[d]===E){try{var n=t[z];n&&"function"==typeof n&&n.call(this,{rejection:e[k],promise:e})}catch(e){}e[d]=w;for(var r=0;r<a.length;r++)e===a[r].promise&&a.splice(r,1)}}function I(e,t,n,r,o){C(e);var i=e[d],a=i?"function"==typeof r?r:p:"function"==typeof o?o:v;t.scheduleMicroTask(m,(function(){try{var r=e[k],o=!!n&&_===n[_];o&&(n[g]=r,n[y]=i);var s=t.run(a,void 0,o&&a!==v&&a!==p?[]:[r]);O(n,!0,s)}catch(e){O(n,!1,e)}}),n)}var N=function(){},x=e.AggregateError,A=function(){function e(t){var n=this;if(!(n instanceof e))throw new Error("Must be an instanceof Promise.");n[d]=T,n[k]=[];try{var r=S();t&&t(r(Z(n,b)),r(Z(n,w)))}catch(e){O(n,!1,e)}}return e.toString=function(){return"function ZoneAwarePromise() { [native code] }"},e.resolve=function(t){return t instanceof e?t:O(new this(null),b,t)},e.reject=function(e){return O(new this(null),w,e)},e.withResolvers=function(){var t={};return t.promise=new e((function(e,n){t.resolve=e,t.reject=n})),t},e.any=function(t){if(!t||"function"!=typeof t[Symbol.iterator])return Promise.reject(new x([],"All promises were rejected"));var n=[],r=0;try{for(var o=0,i=t;o<i.length;o++)r++,n.push(e.resolve(i[o]))}catch(e){return Promise.reject(new x([],"All promises were rejected"))}if(0===r)return Promise.reject(new x([],"All promises were rejected"));var a=!1,s=[];return new e((function(e,t){for(var o=0;o<n.length;o++)n[o].then((function(t){a||(a=!0,e(t))}),(function(e){s.push(e),0==--r&&(a=!0,t(new x(s,"All promises were rejected")))}))}))},e.race=function(e){var t,n,r=new this((function(e,r){t=e,n=r}));function o(e){t(e)}function i(e){n(e)}for(var a=0,s=e;a<s.length;a++){var c=s[a];h(c)||(c=this.resolve(c)),c.then(o,i)}return r},e.all=function(t){return e.allWithCallback(t)},e.allSettled=function(t){return(this&&this.prototype instanceof e?this:e).allWithCallback(t,{thenCallback:function(e){return{status:"fulfilled",value:e}},errorCallback:function(e){return{status:"rejected",reason:e}}})},e.allWithCallback=function(e,t){for(var n,r,o=new this((function(e,t){n=e,r=t})),i=2,a=0,s=[],c=function(e){h(e)||(e=u.resolve(e));var o=a;try{e.then((function(e){s[o]=t?t.thenCallback(e):e,0==--i&&n(s)}),(function(e){t?(s[o]=t.errorCallback(e),0==--i&&n(s)):r(e)}))}catch(e){r(e)}i++,a++},u=this,l=0,f=e;l<f.length;l++)c(f[l]);return 0==(i-=2)&&n(s),o},Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"Promise"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.then=function(n,r){var o,i=null===(o=this.constructor)||void 0===o?void 0:o[Symbol.species];i&&"function"==typeof i||(i=this.constructor||e);var a=new i(N),s=t.current;return this[d]==T?this[k].push(s,a,n,r):I(this,s,a,n,r),a},e.prototype.catch=function(e){return this.then(null,e)},e.prototype.finally=function(n){var r,o=null===(r=this.constructor)||void 0===r?void 0:r[Symbol.species];o&&"function"==typeof o||(o=e);var i=new o(N);i[_]=_;var a=t.current;return this[d]==T?this[k].push(a,i,n,n):I(this,a,i,n,n),i},e}();A.resolve=A.resolve,A.reject=A.reject,A.race=A.race,A.all=A.all;var M=e[c]=e.Promise;e.Promise=A;var R=i("thenPatched");function F(e){var t=e.prototype,n=r(t,"then");if(!n||!1!==n.writable&&n.configurable){var o=t.then;t[u]=o,e.prototype.then=function(e,t){var n=this;return new A((function(e,t){o.call(n,e,t)})).then(e,t)},e[R]=!0}}return n.patchThen=F,M&&(F(M),j(e,"fetch",(function(e){return function t(e){return function(t,n){var r=e.apply(t,n);if(r instanceof A)return r;var o=r.constructor;return o[R]||F(o),r}}(e)}))),Promise[t.__symbol__("uncaughtPromiseErrors")]=a,A}))}(e),function s(e){e.__load_patch("toString",(function(e){var t=Function.prototype.toString,n=v("OriginalDelegate"),r=v("Promise"),o=v("Error"),i=function i(){if("function"==typeof this){var a=this[n];if(a)return"function"==typeof a?t.call(a):Object.prototype.toString.call(a);if(this===Promise){var s=e[r];if(s)return t.call(s)}if(this===Error){var c=e[o];if(c)return t.call(c)}}return t.call(this)};i[n]=t,Function.prototype.toString=i;var a=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":a.call(this)}}))}(e)}()}));
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT

@@ -12,11 +12,15 @@ */

'use strict';
Zone.__load_patch('canvas', function (global, Zone, api) {
var HTMLCanvasElement = global['HTMLCanvasElement'];
if (typeof HTMLCanvasElement !== 'undefined' && HTMLCanvasElement.prototype &&
HTMLCanvasElement.prototype.toBlob) {
api.patchMacroTask(HTMLCanvasElement.prototype, 'toBlob', function (self, args) {
return { name: 'HTMLCanvasElement.toBlob', target: self, cbIdx: 0, args: args };
});
}
});
function patchCanvas(Zone) {
Zone.__load_patch('canvas', function (global, Zone, api) {
var HTMLCanvasElement = global['HTMLCanvasElement'];
if (typeof HTMLCanvasElement !== 'undefined' &&
HTMLCanvasElement.prototype &&
HTMLCanvasElement.prototype.toBlob) {
api.patchMacroTask(HTMLCanvasElement.prototype, 'toBlob', function (self, args) {
return { name: 'HTMLCanvasElement.toBlob', target: self, cbIdx: 0, args: args };
});
}
});
}
patchCanvas(Zone);
}));
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){Zone.__load_patch("canvas",(function(t,o,n){var e=t.HTMLCanvasElement;void 0!==e&&e.prototype&&e.prototype.toBlob&&n.patchMacroTask(e.prototype,"toBlob",(function(t,o){return{name:"HTMLCanvasElement.toBlob",target:t,cbIdx:0,args:o}}))}))}));
*/!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){!function t(n){n.__load_patch("canvas",(function(t,n,o){var e=t.HTMLCanvasElement;void 0!==e&&e.prototype&&e.prototype.toBlob&&o.patchMacroTask(e.prototype,"toBlob",(function(t,n){return{name:"HTMLCanvasElement.toBlob",target:t,cbIdx:0,args:n}}))}))}(Zone)}));
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT

@@ -12,34 +12,37 @@ */

'use strict';
Zone.__load_patch('cordova', function (global, Zone, api) {
if (global.cordova) {
var SUCCESS_SOURCE_1 = 'cordova.exec.success';
var ERROR_SOURCE_1 = 'cordova.exec.error';
var FUNCTION_1 = 'function';
var nativeExec_1 = api.patchMethod(global.cordova, 'exec', function () { return function (self, args) {
if (args.length > 0 && typeof args[0] === FUNCTION_1) {
args[0] = Zone.current.wrap(args[0], SUCCESS_SOURCE_1);
}
if (args.length > 1 && typeof args[1] === FUNCTION_1) {
args[1] = Zone.current.wrap(args[1], ERROR_SOURCE_1);
}
return nativeExec_1.apply(self, args);
}; });
}
});
Zone.__load_patch('cordova.FileReader', function (global, Zone) {
if (global.cordova && typeof global['FileReader'] !== 'undefined') {
document.addEventListener('deviceReady', function () {
var FileReader = global['FileReader'];
['abort', 'error', 'load', 'loadstart', 'loadend', 'progress'].forEach(function (prop) {
var eventNameSymbol = Zone.__symbol__('ON_PROPERTY' + prop);
Object.defineProperty(FileReader.prototype, eventNameSymbol, {
configurable: true,
get: function () {
return this._realReader && this._realReader[eventNameSymbol];
}
function patchCordova(Zone) {
Zone.__load_patch('cordova', function (global, Zone, api) {
if (global.cordova) {
var SUCCESS_SOURCE_1 = 'cordova.exec.success';
var ERROR_SOURCE_1 = 'cordova.exec.error';
var FUNCTION_1 = 'function';
var nativeExec_1 = api.patchMethod(global.cordova, 'exec', function () { return function (self, args) {
if (args.length > 0 && typeof args[0] === FUNCTION_1) {
args[0] = Zone.current.wrap(args[0], SUCCESS_SOURCE_1);
}
if (args.length > 1 && typeof args[1] === FUNCTION_1) {
args[1] = Zone.current.wrap(args[1], ERROR_SOURCE_1);
}
return nativeExec_1.apply(self, args);
}; });
}
});
Zone.__load_patch('cordova.FileReader', function (global, Zone) {
if (global.cordova && typeof global['FileReader'] !== 'undefined') {
document.addEventListener('deviceReady', function () {
var FileReader = global['FileReader'];
['abort', 'error', 'load', 'loadstart', 'loadend', 'progress'].forEach(function (prop) {
var eventNameSymbol = Zone.__symbol__('ON_PROPERTY' + prop);
Object.defineProperty(FileReader.prototype, eventNameSymbol, {
configurable: true,
get: function () {
return this._realReader && this._realReader[eventNameSymbol];
},
});
});
});
});
}
});
}
});
}
patchCordova(Zone);
}));
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){Zone.__load_patch("cordova",(function(e,o,r){if(e.cordova)var n="function",t=r.patchMethod(e.cordova,"exec",(function(){return function(e,r){return r.length>0&&typeof r[0]===n&&(r[0]=o.current.wrap(r[0],"cordova.exec.success")),r.length>1&&typeof r[1]===n&&(r[1]=o.current.wrap(r[1],"cordova.exec.error")),t.apply(e,r)}}))})),Zone.__load_patch("cordova.FileReader",(function(e,o){e.cordova&&void 0!==e.FileReader&&document.addEventListener("deviceReady",(function(){var r=e.FileReader;["abort","error","load","loadstart","loadend","progress"].forEach((function(e){var n=o.__symbol__("ON_PROPERTY"+e);Object.defineProperty(r.prototype,n,{configurable:!0,get:function(){return this._realReader&&this._realReader[n]}})}))}))}))}));
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){!function e(o){o.__load_patch("cordova",(function(e,o,r){if(e.cordova)var n="function",t=r.patchMethod(e.cordova,"exec",(function(){return function(e,r){return r.length>0&&typeof r[0]===n&&(r[0]=o.current.wrap(r[0],"cordova.exec.success")),r.length>1&&typeof r[1]===n&&(r[1]=o.current.wrap(r[1],"cordova.exec.error")),t.apply(e,r)}}))})),o.__load_patch("cordova.FileReader",(function(e,o){e.cordova&&void 0!==e.FileReader&&document.addEventListener("deviceReady",(function(){var r=e.FileReader;["abort","error","load","loadstart","loadend","progress"].forEach((function(e){var n=o.__symbol__("ON_PROPERTY"+e);Object.defineProperty(r.prototype,n,{configurable:!0,get:function(){return this._realReader&&this._realReader[n]}})}))}))}))}(Zone)}));
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT

@@ -12,38 +12,40 @@ */

'use strict';
Zone.__load_patch('electron', function (global, Zone, api) {
function patchArguments(target, name, source) {
return api.patchMethod(target, name, function (delegate) { return function (self, args) {
return delegate && delegate.apply(self, api.bindArguments(args, source));
}; });
}
var _a = require('electron'), desktopCapturer = _a.desktopCapturer, shell = _a.shell, CallbacksRegistry = _a.CallbacksRegistry, ipcRenderer = _a.ipcRenderer;
if (!CallbacksRegistry) {
try {
// Try to load CallbacksRegistry class from @electron/remote src
// since from electron 14+, the CallbacksRegistry is moved to @electron/remote
// package and not exported to outside, so this is a hack to patch CallbacksRegistry.
CallbacksRegistry =
require('@electron/remote/dist/src/renderer/callbacks-registry').CallbacksRegistry;
function patchElectron(Zone) {
Zone.__load_patch('electron', function (global, Zone, api) {
function patchArguments(target, name, source) {
return api.patchMethod(target, name, function (delegate) { return function (self, args) {
return delegate && delegate.apply(self, api.bindArguments(args, source));
}; });
}
catch (err) {
var _a = require('electron'), desktopCapturer = _a.desktopCapturer, shell = _a.shell, CallbacksRegistry = _a.CallbacksRegistry, ipcRenderer = _a.ipcRenderer;
if (!CallbacksRegistry) {
try {
// Try to load CallbacksRegistry class from @electron/remote src
// since from electron 14+, the CallbacksRegistry is moved to @electron/remote
// package and not exported to outside, so this is a hack to patch CallbacksRegistry.
CallbacksRegistry =
require('@electron/remote/dist/src/renderer/callbacks-registry').CallbacksRegistry;
}
catch (err) { }
}
}
// patch api in renderer process directly
// desktopCapturer
if (desktopCapturer) {
patchArguments(desktopCapturer, 'getSources', 'electron.desktopCapturer.getSources');
}
// shell
if (shell) {
patchArguments(shell, 'openExternal', 'electron.shell.openExternal');
}
// patch api in main process through CallbackRegistry
if (!CallbacksRegistry) {
if (ipcRenderer) {
patchArguments(ipcRenderer, 'on', 'ipcRenderer.on');
// patch api in renderer process directly
// desktopCapturer
if (desktopCapturer) {
patchArguments(desktopCapturer, 'getSources', 'electron.desktopCapturer.getSources');
}
return;
}
patchArguments(CallbacksRegistry.prototype, 'add', 'CallbackRegistry.add');
});
// shell
if (shell) {
patchArguments(shell, 'openExternal', 'electron.shell.openExternal');
}
// patch api in main process through CallbackRegistry
if (!CallbacksRegistry) {
if (ipcRenderer) {
patchArguments(ipcRenderer, 'on', 'ipcRenderer.on');
}
return;
}
patchArguments(CallbacksRegistry.prototype, 'add', 'CallbackRegistry.add');
});
}
patchElectron(Zone);
}));
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){Zone.__load_patch("electron",(function(e,r,t){function n(e,r,n){return t.patchMethod(e,r,(function(e){return function(r,c){return e&&e.apply(r,t.bindArguments(c,n))}}))}var c=require("electron"),o=c.desktopCapturer,i=c.shell,a=c.CallbacksRegistry,l=c.ipcRenderer;if(!a)try{a=require("@electron/remote/dist/src/renderer/callbacks-registry").CallbacksRegistry}catch(e){}o&&n(o,"getSources","electron.desktopCapturer.getSources"),i&&n(i,"openExternal","electron.shell.openExternal"),a?n(a.prototype,"add","CallbackRegistry.add"):l&&n(l,"on","ipcRenderer.on")}))}));
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){!function e(r){r.__load_patch("electron",(function(e,r,t){function n(e,r,n){return t.patchMethod(e,r,(function(e){return function(r,c){return e&&e.apply(r,t.bindArguments(c,n))}}))}var c=require("electron"),o=c.desktopCapturer,i=c.shell,a=c.CallbacksRegistry,l=c.ipcRenderer;if(!a)try{a=require("@electron/remote/dist/src/renderer/callbacks-registry").CallbacksRegistry}catch(e){}o&&n(o,"getSources","electron.desktopCapturer.getSources"),i&&n(i,"openExternal","electron.shell.openExternal"),a?n(a.prototype,"add","CallbackRegistry.add"):l&&n(l,"on","ipcRenderer.on")}))}(Zone)}));
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT

@@ -16,83 +16,86 @@ */

*/
Zone.__load_patch('fetch', function (global, Zone, api) {
var fetch = global['fetch'];
if (typeof fetch !== 'function') {
return;
}
var originalFetch = global[api.symbol('fetch')];
if (originalFetch) {
// restore unpatched fetch first
fetch = originalFetch;
}
var ZoneAwarePromise = global.Promise;
var symbolThenPatched = api.symbol('thenPatched');
var fetchTaskScheduling = api.symbol('fetchTaskScheduling');
var OriginalResponse = global.Response;
var placeholder = function () { };
var createFetchTask = function (source, data, originalImpl, self, args, ac) { return new Promise(function (resolve, reject) {
var task = Zone.current.scheduleMacroTask(source, placeholder, data, function () {
// The promise object returned by the original implementation passed into the
// function. This might be a `fetch` promise, `Response.prototype.json` promise,
// etc.
var implPromise;
var zone = Zone.current;
try {
zone[fetchTaskScheduling] = true;
implPromise = originalImpl.apply(self, args);
}
catch (error) {
reject(error);
return;
}
finally {
zone[fetchTaskScheduling] = false;
}
if (!(implPromise instanceof ZoneAwarePromise)) {
var ctor = implPromise.constructor;
if (!ctor[symbolThenPatched]) {
api.patchThen(ctor);
function patchFetch(Zone) {
Zone.__load_patch('fetch', function (global, Zone, api) {
var fetch = global['fetch'];
if (typeof fetch !== 'function') {
return;
}
var originalFetch = global[api.symbol('fetch')];
if (originalFetch) {
// restore unpatched fetch first
fetch = originalFetch;
}
var ZoneAwarePromise = global.Promise;
var symbolThenPatched = api.symbol('thenPatched');
var fetchTaskScheduling = api.symbol('fetchTaskScheduling');
var OriginalResponse = global.Response;
var placeholder = function () { };
var createFetchTask = function (source, data, originalImpl, self, args, ac) { return new Promise(function (resolve, reject) {
var task = Zone.current.scheduleMacroTask(source, placeholder, data, function () {
// The promise object returned by the original implementation passed into the
// function. This might be a `fetch` promise, `Response.prototype.json` promise,
// etc.
var implPromise;
var zone = Zone.current;
try {
zone[fetchTaskScheduling] = true;
implPromise = originalImpl.apply(self, args);
}
}
implPromise.then(function (resource) {
if (task.state !== 'notScheduled') {
task.invoke();
catch (error) {
reject(error);
return;
}
resolve(resource);
}, function (error) {
if (task.state !== 'notScheduled') {
task.invoke();
finally {
zone[fetchTaskScheduling] = false;
}
reject(error);
if (!(implPromise instanceof ZoneAwarePromise)) {
var ctor = implPromise.constructor;
if (!ctor[symbolThenPatched]) {
api.patchThen(ctor);
}
}
implPromise.then(function (resource) {
if (task.state !== 'notScheduled') {
task.invoke();
}
resolve(resource);
}, function (error) {
if (task.state !== 'notScheduled') {
task.invoke();
}
reject(error);
});
}, function () {
ac === null || ac === void 0 ? void 0 : ac.abort();
});
}, function () {
ac === null || ac === void 0 ? void 0 : ac.abort();
});
}); };
global['fetch'] = function () {
var args = Array.prototype.slice.call(arguments);
var options = args.length > 1 ? args[1] : {};
var signal = options === null || options === void 0 ? void 0 : options.signal;
var ac = new AbortController();
var fetchSignal = ac.signal;
options.signal = fetchSignal;
args[1] = options;
if (signal) {
var nativeAddEventListener = signal[Zone.__symbol__('addEventListener')] ||
signal.addEventListener;
nativeAddEventListener.call(signal, 'abort', function () {
ac.abort();
}, { once: true });
}); };
global['fetch'] = function () {
var args = Array.prototype.slice.call(arguments);
var options = args.length > 1 ? args[1] : {};
var signal = options === null || options === void 0 ? void 0 : options.signal;
var ac = new AbortController();
var fetchSignal = ac.signal;
options.signal = fetchSignal;
args[1] = options;
if (signal) {
var nativeAddEventListener = signal[Zone.__symbol__('addEventListener')] ||
signal.addEventListener;
nativeAddEventListener.call(signal, 'abort', function () {
ac.abort();
}, { once: true });
}
return createFetchTask('fetch', { fetchArgs: args }, fetch, this, args, ac);
};
if (OriginalResponse === null || OriginalResponse === void 0 ? void 0 : OriginalResponse.prototype) {
// https://fetch.spec.whatwg.org/#body-mixin
['arrayBuffer', 'blob', 'formData', 'json', 'text']
// Safely check whether the method exists on the `Response` prototype before patching.
.filter(function (method) { return typeof OriginalResponse.prototype[method] === 'function'; })
.forEach(function (method) {
api.patchMethod(OriginalResponse.prototype, method, function (delegate) { return function (self, args) { return createFetchTask("Response.".concat(method), undefined, delegate, self, args, undefined); }; });
});
}
return createFetchTask('fetch', { fetchArgs: args }, fetch, this, args, ac);
};
if (OriginalResponse === null || OriginalResponse === void 0 ? void 0 : OriginalResponse.prototype) {
// https://fetch.spec.whatwg.org/#body-mixin
['arrayBuffer', 'blob', 'formData', 'json', 'text']
// Safely check whether the method exists on the `Response` prototype before patching.
.filter(function (method) { return typeof OriginalResponse.prototype[method] === 'function'; })
.forEach(function (method) {
api.patchMethod(OriginalResponse.prototype, method, function (delegate) { return function (self, args) { return createFetchTask("Response.".concat(method), undefined, delegate, self, args, undefined); }; });
});
}
});
});
}
patchFetch(Zone);
}));
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/!function(n){"function"==typeof define&&define.amd?define(n):n()}((function(){Zone.__load_patch("fetch",(function(n,t,e){var o=n.fetch;if("function"==typeof o){var r=n[e.symbol("fetch")];r&&(o=r);var c=n.Promise,i=e.symbol("thenPatched"),f=e.symbol("fetchTaskScheduling"),a=n.Response,u=function(){},l=function(n,o,r,a,l,s){return new Promise((function(h,d){var p=t.current.scheduleMacroTask(n,u,o,(function(){var n,o=t.current;try{o[f]=!0,n=r.apply(a,l)}catch(n){return void d(n)}finally{o[f]=!1}if(!(n instanceof c)){var u=n.constructor;u[i]||e.patchThen(u)}n.then((function(n){"notScheduled"!==p.state&&p.invoke(),h(n)}),(function(n){"notScheduled"!==p.state&&p.invoke(),d(n)}))}),(function(){null==s||s.abort()}))}))};n.fetch=function(){var n=Array.prototype.slice.call(arguments),e=n.length>1?n[1]:{},r=null==e?void 0:e.signal,c=new AbortController;return e.signal=c.signal,n[1]=e,r&&(r[t.__symbol__("addEventListener")]||r.addEventListener).call(r,"abort",(function(){c.abort()}),{once:!0}),l("fetch",{fetchArgs:n},o,this,n,c)},(null==a?void 0:a.prototype)&&["arrayBuffer","blob","formData","json","text"].filter((function(n){return"function"==typeof a.prototype[n]})).forEach((function(n){e.patchMethod(a.prototype,n,(function(t){return function(e,o){return l("Response.".concat(n),void 0,t,e,o,void 0)}}))}))}}))}));
*/!function(n){"function"==typeof define&&define.amd?define(n):n()}((function(){!function n(t){t.__load_patch("fetch",(function(n,t,e){var o=n.fetch;if("function"==typeof o){var c=n[e.symbol("fetch")];c&&(o=c);var r=n.Promise,i=e.symbol("thenPatched"),f=e.symbol("fetchTaskScheduling"),a=n.Response,u=function(){},l=function(n,o,c,a,l,s){return new Promise((function(h,d){var p=t.current.scheduleMacroTask(n,u,o,(function(){var n,o=t.current;try{o[f]=!0,n=c.apply(a,l)}catch(n){return void d(n)}finally{o[f]=!1}if(!(n instanceof r)){var u=n.constructor;u[i]||e.patchThen(u)}n.then((function(n){"notScheduled"!==p.state&&p.invoke(),h(n)}),(function(n){"notScheduled"!==p.state&&p.invoke(),d(n)}))}),(function(){null==s||s.abort()}))}))};n.fetch=function(){var n=Array.prototype.slice.call(arguments),e=n.length>1?n[1]:{},c=null==e?void 0:e.signal,r=new AbortController;return e.signal=r.signal,n[1]=e,c&&(c[t.__symbol__("addEventListener")]||c.addEventListener).call(c,"abort",(function(){r.abort()}),{once:!0}),l("fetch",{fetchArgs:n},o,this,n,r)},(null==a?void 0:a.prototype)&&["arrayBuffer","blob","formData","json","text"].filter((function(n){return"function"==typeof a.prototype[n]})).forEach((function(n){e.patchMethod(a.prototype,n,(function(t){return function(e,o){return l("Response.".concat(n),void 0,t,e,o,void 0)}}))}))}}))}(Zone)}));
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT

@@ -12,70 +12,72 @@ */

'use strict';
Zone.__load_patch('jsonp', function (global, Zone, api) {
// because jsonp is not a standard api, there are a lot of
// implementations, so zone.js just provide a helper util to
// patch the jsonp send and onSuccess/onError callback
// the options is an object which contains
// - jsonp, the jsonp object which hold the send function
// - sendFuncName, the name of the send function
// - successFuncName, success func name
// - failedFuncName, failed func name
Zone[Zone.__symbol__('jsonp')] = function patchJsonp(options) {
if (!options || !options.jsonp || !options.sendFuncName) {
return;
}
var noop = function () { };
[options.successFuncName, options.failedFuncName].forEach(function (methodName) {
if (!methodName) {
function patchJsonp(Zone) {
Zone.__load_patch('jsonp', function (global, Zone, api) {
// because jsonp is not a standard api, there are a lot of
// implementations, so zone.js just provide a helper util to
// patch the jsonp send and onSuccess/onError callback
// the options is an object which contains
// - jsonp, the jsonp object which hold the send function
// - sendFuncName, the name of the send function
// - successFuncName, success func name
// - failedFuncName, failed func name
Zone[Zone.__symbol__('jsonp')] = function patchJsonp(options) {
if (!options || !options.jsonp || !options.sendFuncName) {
return;
}
var oriFunc = global[methodName];
if (oriFunc) {
api.patchMethod(global, methodName, function (delegate) { return function (self, args) {
var task = global[api.symbol('jsonTask')];
if (task) {
task.callback = delegate;
return task.invoke.apply(self, args);
}
else {
return delegate.apply(self, args);
}
}; });
}
else {
Object.defineProperty(global, methodName, {
configurable: true,
enumerable: true,
get: function () {
return function () {
var task = global[api.symbol('jsonpTask')];
var delegate = global[api.symbol("jsonp".concat(methodName, "callback"))];
if (task) {
if (delegate) {
task.callback = delegate;
var noop = function () { };
[options.successFuncName, options.failedFuncName].forEach(function (methodName) {
if (!methodName) {
return;
}
var oriFunc = global[methodName];
if (oriFunc) {
api.patchMethod(global, methodName, function (delegate) { return function (self, args) {
var task = global[api.symbol('jsonTask')];
if (task) {
task.callback = delegate;
return task.invoke.apply(self, args);
}
else {
return delegate.apply(self, args);
}
}; });
}
else {
Object.defineProperty(global, methodName, {
configurable: true,
enumerable: true,
get: function () {
return function () {
var task = global[api.symbol('jsonpTask')];
var delegate = global[api.symbol("jsonp".concat(methodName, "callback"))];
if (task) {
if (delegate) {
task.callback = delegate;
}
global[api.symbol('jsonpTask')] = undefined;
return task.invoke.apply(this, arguments);
}
global[api.symbol('jsonpTask')] = undefined;
return task.invoke.apply(this, arguments);
}
else {
if (delegate) {
return delegate.apply(this, arguments);
else {
if (delegate) {
return delegate.apply(this, arguments);
}
}
}
return null;
};
},
set: function (callback) {
this[api.symbol("jsonp".concat(methodName, "callback"))] = callback;
}
});
}
});
api.patchMethod(options.jsonp, options.sendFuncName, function (delegate) { return function (self, args) {
global[api.symbol('jsonpTask')] =
Zone.current.scheduleMacroTask('jsonp', noop, {}, function (task) {
return null;
};
},
set: function (callback) {
this[api.symbol("jsonp".concat(methodName, "callback"))] = callback;
},
});
}
});
api.patchMethod(options.jsonp, options.sendFuncName, function (delegate) { return function (self, args) {
global[api.symbol('jsonpTask')] = Zone.current.scheduleMacroTask('jsonp', noop, {}, function (task) {
return delegate.apply(self, args);
}, noop);
}; });
};
});
}; });
};
});
}
patchJsonp(Zone);
}));
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/!function(n){"function"==typeof define&&define.amd?define(n):n()}((function(){Zone.__load_patch("jsonp",(function(n,o,c){o[o.__symbol__("jsonp")]=function e(t){if(t&&t.jsonp&&t.sendFuncName){var a=function(){};[t.successFuncName,t.failedFuncName].forEach((function(o){o&&(n[o]?c.patchMethod(n,o,(function(o){return function(e,t){var a=n[c.symbol("jsonTask")];return a?(a.callback=o,a.invoke.apply(e,t)):o.apply(e,t)}})):Object.defineProperty(n,o,{configurable:!0,enumerable:!0,get:function(){return function(){var e=n[c.symbol("jsonpTask")],t=n[c.symbol("jsonp".concat(o,"callback"))];return e?(t&&(e.callback=t),n[c.symbol("jsonpTask")]=void 0,e.invoke.apply(this,arguments)):t?t.apply(this,arguments):null}},set:function(n){this[c.symbol("jsonp".concat(o,"callback"))]=n}}))})),c.patchMethod(t.jsonp,t.sendFuncName,(function(e){return function(t,s){n[c.symbol("jsonpTask")]=o.current.scheduleMacroTask("jsonp",a,{},(function(n){return e.apply(t,s)}),a)}}))}}}))}));
*/!function(n){"function"==typeof define&&define.amd?define(n):n()}((function(){!function n(o){o.__load_patch("jsonp",(function(n,o,c){o[o.__symbol__("jsonp")]=function e(t){if(t&&t.jsonp&&t.sendFuncName){var a=function(){};[t.successFuncName,t.failedFuncName].forEach((function(o){o&&(n[o]?c.patchMethod(n,o,(function(o){return function(e,t){var a=n[c.symbol("jsonTask")];return a?(a.callback=o,a.invoke.apply(e,t)):o.apply(e,t)}})):Object.defineProperty(n,o,{configurable:!0,enumerable:!0,get:function(){return function(){var e=n[c.symbol("jsonpTask")],t=n[c.symbol("jsonp".concat(o,"callback"))];return e?(t&&(e.callback=t),n[c.symbol("jsonpTask")]=void 0,e.invoke.apply(this,arguments)):t?t.apply(this,arguments):null}},set:function(n){this[c.symbol("jsonp".concat(o,"callback"))]=n}}))})),c.patchMethod(t.jsonp,t.sendFuncName,(function(e){return function(t,s){n[c.symbol("jsonpTask")]=o.current.scheduleMacroTask("jsonp",a,{},(function(n){return e.apply(t,s)}),a)}}))}}}))}(Zone)}));
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT

@@ -12,12 +12,15 @@ */

'use strict';
/**
* Monkey patch `MessagePort.prototype.onmessage` and `MessagePort.prototype.onmessageerror`
* properties to make the callback in the zone when the value are set.
*/
Zone.__load_patch('MessagePort', function (global, Zone, api) {
var MessagePort = global['MessagePort'];
if (typeof MessagePort !== 'undefined' && MessagePort.prototype) {
api.patchOnProperties(MessagePort.prototype, ['message', 'messageerror']);
}
});
function patchMessagePort(Zone) {
/**
* Monkey patch `MessagePort.prototype.onmessage` and `MessagePort.prototype.onmessageerror`
* properties to make the callback in the zone when the value are set.
*/
Zone.__load_patch('MessagePort', function (global, Zone, api) {
var MessagePort = global['MessagePort'];
if (typeof MessagePort !== 'undefined' && MessagePort.prototype) {
api.patchOnProperties(MessagePort.prototype, ['message', 'messageerror']);
}
});
}
patchMessagePort(Zone);
}));
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){Zone.__load_patch("MessagePort",(function(e,o,t){var n=e.MessagePort;void 0!==n&&n.prototype&&t.patchOnProperties(n.prototype,["message","messageerror"])}))}));
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){!function e(o){o.__load_patch("MessagePort",(function(e,o,t){var n=e.MessagePort;void 0!==n&&n.prototype&&t.patchOnProperties(n.prototype,["message","messageerror"])}))}(Zone)}));
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT

@@ -12,60 +12,63 @@ */

'use strict';
/**
* Promise for async/fakeAsync zoneSpec test
* can support async operation which not supported by zone.js
* such as
* it ('test jsonp in AsyncZone', async() => {
* new Promise(res => {
* jsonp(url, (data) => {
* // success callback
* res(data);
* });
* }).then((jsonpResult) => {
* // get jsonp result.
*
* // user will expect AsyncZoneSpec wait for
* // then, but because jsonp is not zone aware
* // AsyncZone will finish before then is called.
* });
* });
*/
Zone.__load_patch('promisefortest', function (global, Zone, api) {
var symbolState = api.symbol('state');
var UNRESOLVED = null;
var symbolParentUnresolved = api.symbol('parentUnresolved');
// patch Promise.prototype.then to keep an internal
// number for tracking unresolved chained promise
// we will decrease this number when the parent promise
// being resolved/rejected and chained promise was
// scheduled as a microTask.
// so we can know such kind of chained promise still
// not resolved in AsyncTestZone
Promise[api.symbol('patchPromiseForTest')] = function patchPromiseForTest() {
var oriThen = Promise[Zone.__symbol__('ZonePromiseThen')];
if (oriThen) {
return;
}
oriThen = Promise[Zone.__symbol__('ZonePromiseThen')] = Promise.prototype.then;
Promise.prototype.then = function () {
var chained = oriThen.apply(this, arguments);
if (this[symbolState] === UNRESOLVED) {
// parent promise is unresolved.
var asyncTestZoneSpec = Zone.current.get('AsyncTestZoneSpec');
if (asyncTestZoneSpec) {
asyncTestZoneSpec.unresolvedChainedPromiseCount++;
chained[symbolParentUnresolved] = true;
function patchPromiseTesting(Zone) {
/**
* Promise for async/fakeAsync zoneSpec test
* can support async operation which not supported by zone.js
* such as
* it ('test jsonp in AsyncZone', async() => {
* new Promise(res => {
* jsonp(url, (data) => {
* // success callback
* res(data);
* });
* }).then((jsonpResult) => {
* // get jsonp result.
*
* // user will expect AsyncZoneSpec wait for
* // then, but because jsonp is not zone aware
* // AsyncZone will finish before then is called.
* });
* });
*/
Zone.__load_patch('promisefortest', function (global, Zone, api) {
var symbolState = api.symbol('state');
var UNRESOLVED = null;
var symbolParentUnresolved = api.symbol('parentUnresolved');
// patch Promise.prototype.then to keep an internal
// number for tracking unresolved chained promise
// we will decrease this number when the parent promise
// being resolved/rejected and chained promise was
// scheduled as a microTask.
// so we can know such kind of chained promise still
// not resolved in AsyncTestZone
Promise[api.symbol('patchPromiseForTest')] = function patchPromiseForTest() {
var oriThen = Promise[Zone.__symbol__('ZonePromiseThen')];
if (oriThen) {
return;
}
oriThen = Promise[Zone.__symbol__('ZonePromiseThen')] = Promise.prototype.then;
Promise.prototype.then = function () {
var chained = oriThen.apply(this, arguments);
if (this[symbolState] === UNRESOLVED) {
// parent promise is unresolved.
var asyncTestZoneSpec = Zone.current.get('AsyncTestZoneSpec');
if (asyncTestZoneSpec) {
asyncTestZoneSpec.unresolvedChainedPromiseCount++;
chained[symbolParentUnresolved] = true;
}
}
return chained;
};
};
Promise[api.symbol('unPatchPromiseForTest')] = function unpatchPromiseForTest() {
// restore origin then
var oriThen = Promise[Zone.__symbol__('ZonePromiseThen')];
if (oriThen) {
Promise.prototype.then = oriThen;
Promise[Zone.__symbol__('ZonePromiseThen')] = undefined;
}
return chained;
};
};
Promise[api.symbol('unPatchPromiseForTest')] = function unpatchPromiseForTest() {
// restore origin then
var oriThen = Promise[Zone.__symbol__('ZonePromiseThen')];
if (oriThen) {
Promise.prototype.then = oriThen;
Promise[Zone.__symbol__('ZonePromiseThen')] = undefined;
}
};
});
});
}
patchPromiseTesting(Zone);
}));
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){Zone.__load_patch("promisefortest",(function(e,o,n){var s=n.symbol("state"),r=n.symbol("parentUnresolved");Promise[n.symbol("patchPromiseForTest")]=function e(){var n=Promise[o.__symbol__("ZonePromiseThen")];n||(n=Promise[o.__symbol__("ZonePromiseThen")]=Promise.prototype.then,Promise.prototype.then=function(){var e=n.apply(this,arguments);if(null===this[s]){var t=o.current.get("AsyncTestZoneSpec");t&&(t.unresolvedChainedPromiseCount++,e[r]=!0)}return e})},Promise[n.symbol("unPatchPromiseForTest")]=function e(){var n=Promise[o.__symbol__("ZonePromiseThen")];n&&(Promise.prototype.then=n,Promise[o.__symbol__("ZonePromiseThen")]=void 0)}}))}));
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){!function e(o){o.__load_patch("promisefortest",(function(e,o,n){var s=n.symbol("state"),t=n.symbol("parentUnresolved");Promise[n.symbol("patchPromiseForTest")]=function e(){var n=Promise[o.__symbol__("ZonePromiseThen")];n||(n=Promise[o.__symbol__("ZonePromiseThen")]=Promise.prototype.then,Promise.prototype.then=function(){var e=n.apply(this,arguments);if(null===this[s]){var r=o.current.get("AsyncTestZoneSpec");r&&(r.unresolvedChainedPromiseCount++,e[t]=!0)}return e})},Promise[n.symbol("unPatchPromiseForTest")]=function e(){var n=Promise[o.__symbol__("ZonePromiseThen")];n&&(Promise.prototype.then=n,Promise[o.__symbol__("ZonePromiseThen")]=void 0)}}))}(Zone)}));
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT

@@ -12,81 +12,84 @@ */

'use strict';
Zone.__load_patch('ResizeObserver', function (global, Zone, api) {
var ResizeObserver = global['ResizeObserver'];
if (!ResizeObserver) {
return;
}
var resizeObserverSymbol = api.symbol('ResizeObserver');
api.patchMethod(global, 'ResizeObserver', function (delegate) { return function (self, args) {
var callback = args.length > 0 ? args[0] : null;
if (callback) {
args[0] = function (entries, observer) {
var _this = this;
var zones = {};
var currZone = Zone.current;
for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {
var entry = entries_1[_i];
var zone = entry.target[resizeObserverSymbol];
if (!zone) {
zone = currZone;
function patchResizeObserver(Zone) {
Zone.__load_patch('ResizeObserver', function (global, Zone, api) {
var ResizeObserver = global['ResizeObserver'];
if (!ResizeObserver) {
return;
}
var resizeObserverSymbol = api.symbol('ResizeObserver');
api.patchMethod(global, 'ResizeObserver', function (delegate) { return function (self, args) {
var callback = args.length > 0 ? args[0] : null;
if (callback) {
args[0] = function (entries, observer) {
var _this = this;
var zones = {};
var currZone = Zone.current;
for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {
var entry = entries_1[_i];
var zone = entry.target[resizeObserverSymbol];
if (!zone) {
zone = currZone;
}
var zoneEntriesInfo = zones[zone.name];
if (!zoneEntriesInfo) {
zones[zone.name] = zoneEntriesInfo = { entries: [], zone: zone };
}
zoneEntriesInfo.entries.push(entry);
}
var zoneEntriesInfo = zones[zone.name];
if (!zoneEntriesInfo) {
zones[zone.name] = zoneEntriesInfo = { entries: [], zone: zone };
Object.keys(zones).forEach(function (zoneName) {
var zoneEntriesInfo = zones[zoneName];
if (zoneEntriesInfo.zone !== Zone.current) {
zoneEntriesInfo.zone.run(callback, _this, [zoneEntriesInfo.entries, observer], 'ResizeObserver');
}
else {
callback.call(_this, zoneEntriesInfo.entries, observer);
}
});
};
}
return args.length > 0 ? new ResizeObserver(args[0]) : new ResizeObserver();
}; });
api.patchMethod(ResizeObserver.prototype, 'observe', function (delegate) { return function (self, args) {
var target = args.length > 0 ? args[0] : null;
if (!target) {
return delegate.apply(self, args);
}
var targets = self[resizeObserverSymbol];
if (!targets) {
targets = self[resizeObserverSymbol] = [];
}
targets.push(target);
target[resizeObserverSymbol] = Zone.current;
return delegate.apply(self, args);
}; });
api.patchMethod(ResizeObserver.prototype, 'unobserve', function (delegate) { return function (self, args) {
var target = args.length > 0 ? args[0] : null;
if (!target) {
return delegate.apply(self, args);
}
var targets = self[resizeObserverSymbol];
if (targets) {
for (var i = 0; i < targets.length; i++) {
if (targets[i] === target) {
targets.splice(i, 1);
break;
}
zoneEntriesInfo.entries.push(entry);
}
Object.keys(zones).forEach(function (zoneName) {
var zoneEntriesInfo = zones[zoneName];
if (zoneEntriesInfo.zone !== Zone.current) {
zoneEntriesInfo.zone.run(callback, _this, [zoneEntriesInfo.entries, observer], 'ResizeObserver');
}
else {
callback.call(_this, zoneEntriesInfo.entries, observer);
}
}
target[resizeObserverSymbol] = undefined;
return delegate.apply(self, args);
}; });
api.patchMethod(ResizeObserver.prototype, 'disconnect', function (delegate) { return function (self, args) {
var targets = self[resizeObserverSymbol];
if (targets) {
targets.forEach(function (target) {
target[resizeObserverSymbol] = undefined;
});
};
}
return args.length > 0 ? new ResizeObserver(args[0]) : new ResizeObserver();
}; });
api.patchMethod(ResizeObserver.prototype, 'observe', function (delegate) { return function (self, args) {
var target = args.length > 0 ? args[0] : null;
if (!target) {
self[resizeObserverSymbol] = undefined;
}
return delegate.apply(self, args);
}
var targets = self[resizeObserverSymbol];
if (!targets) {
targets = self[resizeObserverSymbol] = [];
}
targets.push(target);
target[resizeObserverSymbol] = Zone.current;
return delegate.apply(self, args);
}; });
api.patchMethod(ResizeObserver.prototype, 'unobserve', function (delegate) { return function (self, args) {
var target = args.length > 0 ? args[0] : null;
if (!target) {
return delegate.apply(self, args);
}
var targets = self[resizeObserverSymbol];
if (targets) {
for (var i = 0; i < targets.length; i++) {
if (targets[i] === target) {
targets.splice(i, 1);
break;
}
}
}
target[resizeObserverSymbol] = undefined;
return delegate.apply(self, args);
}; });
api.patchMethod(ResizeObserver.prototype, 'disconnect', function (delegate) { return function (self, args) {
var targets = self[resizeObserverSymbol];
if (targets) {
targets.forEach(function (target) {
target[resizeObserverSymbol] = undefined;
});
self[resizeObserverSymbol] = undefined;
}
return delegate.apply(self, args);
}; });
});
}; });
});
}
patchResizeObserver(Zone);
}));
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){Zone.__load_patch("ResizeObserver",(function(e,n,r){var t=e.ResizeObserver;if(t){var o=r.symbol("ResizeObserver");r.patchMethod(e,"ResizeObserver",(function(e){return function(e,r){var i=r.length>0?r[0]:null;return i&&(r[0]=function(e,r){for(var t=this,u={},a=n.current,c=0,f=e;c<f.length;c++){var p=f[c],s=p.target[o];s||(s=a);var v=u[s.name];v||(u[s.name]=v={entries:[],zone:s}),v.entries.push(p)}Object.keys(u).forEach((function(e){var o=u[e];o.zone!==n.current?o.zone.run(i,t,[o.entries,r],"ResizeObserver"):i.call(t,o.entries,r)}))}),r.length>0?new t(r[0]):new t}})),r.patchMethod(t.prototype,"observe",(function(e){return function(r,t){var i=t.length>0?t[0]:null;if(!i)return e.apply(r,t);var u=r[o];return u||(u=r[o]=[]),u.push(i),i[o]=n.current,e.apply(r,t)}})),r.patchMethod(t.prototype,"unobserve",(function(e){return function(n,r){var t=r.length>0?r[0]:null;if(!t)return e.apply(n,r);var i=n[o];if(i)for(var u=0;u<i.length;u++)if(i[u]===t){i.splice(u,1);break}return t[o]=void 0,e.apply(n,r)}})),r.patchMethod(t.prototype,"disconnect",(function(e){return function(n,r){var t=n[o];return t&&(t.forEach((function(e){e[o]=void 0})),n[o]=void 0),e.apply(n,r)}}))}}))}));
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){!function e(n){n.__load_patch("ResizeObserver",(function(e,n,r){var t=e.ResizeObserver;if(t){var o=r.symbol("ResizeObserver");r.patchMethod(e,"ResizeObserver",(function(e){return function(e,r){var i=r.length>0?r[0]:null;return i&&(r[0]=function(e,r){for(var t=this,u={},a=n.current,c=0,f=e;c<f.length;c++){var p=f[c],s=p.target[o];s||(s=a);var v=u[s.name];v||(u[s.name]=v={entries:[],zone:s}),v.entries.push(p)}Object.keys(u).forEach((function(e){var o=u[e];o.zone!==n.current?o.zone.run(i,t,[o.entries,r],"ResizeObserver"):i.call(t,o.entries,r)}))}),r.length>0?new t(r[0]):new t}})),r.patchMethod(t.prototype,"observe",(function(e){return function(r,t){var i=t.length>0?t[0]:null;if(!i)return e.apply(r,t);var u=r[o];return u||(u=r[o]=[]),u.push(i),i[o]=n.current,e.apply(r,t)}})),r.patchMethod(t.prototype,"unobserve",(function(e){return function(n,r){var t=r.length>0?r[0]:null;if(!t)return e.apply(n,r);var i=n[o];if(i)for(var u=0;u<i.length;u++)if(i[u]===t){i.splice(u,1);break}return t[o]=void 0,e.apply(n,r)}})),r.patchMethod(t.prototype,"disconnect",(function(e){return function(n,r){var t=n[o];return t&&(t.forEach((function(e){e[o]=void 0})),n[o]=void 0),e.apply(n,r)}}))}}))}(Zone)}));
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT

@@ -45,6 +45,7 @@ */

this.propertyKeys = Object.keys(delegateSpec.properties);
this.propertyKeys.forEach(function (k) { return _this.properties[k] = delegateSpec.properties[k]; });
this.propertyKeys.forEach(function (k) { return (_this.properties[k] = delegateSpec.properties[k]); });
}
// if a new delegateSpec was set, check if we need to trigger hasTask
if (isNewDelegate && this.lastTaskState &&
if (isNewDelegate &&
this.lastTaskState &&
(this.lastTaskState.macroTask || this.lastTaskState.microTask)) {

@@ -177,5 +178,8 @@ this.isNeedToTriggerHasTask = true;

}());
// Export the class so that new instances can be created with proper
// constructor params.
Zone['ProxyZoneSpec'] = ProxyZoneSpec;
function patchProxyZoneSpec(Zone) {
// Export the class so that new instances can be created with proper
// constructor params.
Zone['ProxyZoneSpec'] = ProxyZoneSpec;
}
patchProxyZoneSpec(Zone);
}));
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){var e=function(){function e(e){void 0===e&&(e=null),this.defaultSpecDelegate=e,this.name="ProxyZone",this._delegateSpec=null,this.properties={ProxyZoneSpec:this},this.propertyKeys=null,this.lastTaskState=null,this.isNeedToTriggerHasTask=!1,this.tasks=[],this.setDelegate(e)}return e.get=function(){return Zone.current.get("ProxyZoneSpec")},e.isLoaded=function(){return e.get()instanceof e},e.assertPresent=function(){if(!e.isLoaded())throw new Error("Expected to be running in 'ProxyZone', but it was not found.");return e.get()},e.prototype.setDelegate=function(e){var t=this,s=this._delegateSpec!==e;this._delegateSpec=e,this.propertyKeys&&this.propertyKeys.forEach((function(e){return delete t.properties[e]})),this.propertyKeys=null,e&&e.properties&&(this.propertyKeys=Object.keys(e.properties),this.propertyKeys.forEach((function(s){return t.properties[s]=e.properties[s]}))),s&&this.lastTaskState&&(this.lastTaskState.macroTask||this.lastTaskState.microTask)&&(this.isNeedToTriggerHasTask=!0)},e.prototype.getDelegate=function(){return this._delegateSpec},e.prototype.resetDelegate=function(){this.getDelegate(),this.setDelegate(this.defaultSpecDelegate)},e.prototype.tryTriggerHasTask=function(e,t,s){this.isNeedToTriggerHasTask&&this.lastTaskState&&(this.isNeedToTriggerHasTask=!1,this.onHasTask(e,t,s,this.lastTaskState))},e.prototype.removeFromTasks=function(e){if(this.tasks)for(var t=0;t<this.tasks.length;t++)if(this.tasks[t]===e)return void this.tasks.splice(t,1)},e.prototype.getAndClearPendingTasksInfo=function(){if(0===this.tasks.length)return"";var e="--Pending async tasks are: ["+this.tasks.map((function(e){var t=e.data&&Object.keys(e.data).map((function(t){return t+":"+e.data[t]})).join(",");return"type: ".concat(e.type,", source: ").concat(e.source,", args: {").concat(t,"}")}))+"]";return this.tasks=[],e},e.prototype.onFork=function(e,t,s,n){return this._delegateSpec&&this._delegateSpec.onFork?this._delegateSpec.onFork(e,t,s,n):e.fork(s,n)},e.prototype.onIntercept=function(e,t,s,n,a){return this._delegateSpec&&this._delegateSpec.onIntercept?this._delegateSpec.onIntercept(e,t,s,n,a):e.intercept(s,n,a)},e.prototype.onInvoke=function(e,t,s,n,a,r,o){return this.tryTriggerHasTask(e,t,s),this._delegateSpec&&this._delegateSpec.onInvoke?this._delegateSpec.onInvoke(e,t,s,n,a,r,o):e.invoke(s,n,a,r,o)},e.prototype.onHandleError=function(e,t,s,n){return this._delegateSpec&&this._delegateSpec.onHandleError?this._delegateSpec.onHandleError(e,t,s,n):e.handleError(s,n)},e.prototype.onScheduleTask=function(e,t,s,n){return"eventTask"!==n.type&&this.tasks.push(n),this._delegateSpec&&this._delegateSpec.onScheduleTask?this._delegateSpec.onScheduleTask(e,t,s,n):e.scheduleTask(s,n)},e.prototype.onInvokeTask=function(e,t,s,n,a,r){return"eventTask"!==n.type&&this.removeFromTasks(n),this.tryTriggerHasTask(e,t,s),this._delegateSpec&&this._delegateSpec.onInvokeTask?this._delegateSpec.onInvokeTask(e,t,s,n,a,r):e.invokeTask(s,n,a,r)},e.prototype.onCancelTask=function(e,t,s,n){return"eventTask"!==n.type&&this.removeFromTasks(n),this.tryTriggerHasTask(e,t,s),this._delegateSpec&&this._delegateSpec.onCancelTask?this._delegateSpec.onCancelTask(e,t,s,n):e.cancelTask(s,n)},e.prototype.onHasTask=function(e,t,s,n){this.lastTaskState=n,this._delegateSpec&&this._delegateSpec.onHasTask?this._delegateSpec.onHasTask(e,t,s,n):e.hasTask(s,n)},e}();Zone.ProxyZoneSpec=e}));
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){var e=function(){function e(e){void 0===e&&(e=null),this.defaultSpecDelegate=e,this.name="ProxyZone",this._delegateSpec=null,this.properties={ProxyZoneSpec:this},this.propertyKeys=null,this.lastTaskState=null,this.isNeedToTriggerHasTask=!1,this.tasks=[],this.setDelegate(e)}return e.get=function(){return Zone.current.get("ProxyZoneSpec")},e.isLoaded=function(){return e.get()instanceof e},e.assertPresent=function(){if(!e.isLoaded())throw new Error("Expected to be running in 'ProxyZone', but it was not found.");return e.get()},e.prototype.setDelegate=function(e){var t=this,s=this._delegateSpec!==e;this._delegateSpec=e,this.propertyKeys&&this.propertyKeys.forEach((function(e){return delete t.properties[e]})),this.propertyKeys=null,e&&e.properties&&(this.propertyKeys=Object.keys(e.properties),this.propertyKeys.forEach((function(s){return t.properties[s]=e.properties[s]}))),s&&this.lastTaskState&&(this.lastTaskState.macroTask||this.lastTaskState.microTask)&&(this.isNeedToTriggerHasTask=!0)},e.prototype.getDelegate=function(){return this._delegateSpec},e.prototype.resetDelegate=function(){this.getDelegate(),this.setDelegate(this.defaultSpecDelegate)},e.prototype.tryTriggerHasTask=function(e,t,s){this.isNeedToTriggerHasTask&&this.lastTaskState&&(this.isNeedToTriggerHasTask=!1,this.onHasTask(e,t,s,this.lastTaskState))},e.prototype.removeFromTasks=function(e){if(this.tasks)for(var t=0;t<this.tasks.length;t++)if(this.tasks[t]===e)return void this.tasks.splice(t,1)},e.prototype.getAndClearPendingTasksInfo=function(){if(0===this.tasks.length)return"";var e="--Pending async tasks are: ["+this.tasks.map((function(e){var t=e.data&&Object.keys(e.data).map((function(t){return t+":"+e.data[t]})).join(",");return"type: ".concat(e.type,", source: ").concat(e.source,", args: {").concat(t,"}")}))+"]";return this.tasks=[],e},e.prototype.onFork=function(e,t,s,n){return this._delegateSpec&&this._delegateSpec.onFork?this._delegateSpec.onFork(e,t,s,n):e.fork(s,n)},e.prototype.onIntercept=function(e,t,s,n,a){return this._delegateSpec&&this._delegateSpec.onIntercept?this._delegateSpec.onIntercept(e,t,s,n,a):e.intercept(s,n,a)},e.prototype.onInvoke=function(e,t,s,n,a,o,r){return this.tryTriggerHasTask(e,t,s),this._delegateSpec&&this._delegateSpec.onInvoke?this._delegateSpec.onInvoke(e,t,s,n,a,o,r):e.invoke(s,n,a,o,r)},e.prototype.onHandleError=function(e,t,s,n){return this._delegateSpec&&this._delegateSpec.onHandleError?this._delegateSpec.onHandleError(e,t,s,n):e.handleError(s,n)},e.prototype.onScheduleTask=function(e,t,s,n){return"eventTask"!==n.type&&this.tasks.push(n),this._delegateSpec&&this._delegateSpec.onScheduleTask?this._delegateSpec.onScheduleTask(e,t,s,n):e.scheduleTask(s,n)},e.prototype.onInvokeTask=function(e,t,s,n,a,o){return"eventTask"!==n.type&&this.removeFromTasks(n),this.tryTriggerHasTask(e,t,s),this._delegateSpec&&this._delegateSpec.onInvokeTask?this._delegateSpec.onInvokeTask(e,t,s,n,a,o):e.invokeTask(s,n,a,o)},e.prototype.onCancelTask=function(e,t,s,n){return"eventTask"!==n.type&&this.removeFromTasks(n),this.tryTriggerHasTask(e,t,s),this._delegateSpec&&this._delegateSpec.onCancelTask?this._delegateSpec.onCancelTask(e,t,s,n):e.cancelTask(s,n)},e.prototype.onHasTask=function(e,t,s,n){this.lastTaskState=n,this._delegateSpec&&this._delegateSpec.onHasTask?this._delegateSpec.onHasTask(e,t,s,n):e.hasTask(s,n)},e}();!function t(s){s.ProxyZoneSpec=e}(Zone)}));
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('rxjs')) :
typeof define === 'function' && define.amd ? define(['rxjs'], factory) :
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('./rxjs')) :
typeof define === 'function' && define.amd ? define(['./rxjs'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.rxjs));
})(this, (function (rxjs) {
'use strict';
Zone.__load_patch('rxjs', function (global, Zone, api) {
var symbol = Zone.__symbol__;
var nextSource = 'rxjs.Subscriber.next';
var errorSource = 'rxjs.Subscriber.error';
var completeSource = 'rxjs.Subscriber.complete';
var ObjectDefineProperties = Object.defineProperties;
var patchObservable = function () {
var ObservablePrototype = rxjs.Observable.prototype;
var _symbolSubscribe = symbol('_subscribe');
var _subscribe = ObservablePrototype[_symbolSubscribe] = ObservablePrototype._subscribe;
ObjectDefineProperties(rxjs.Observable.prototype, {
_zone: { value: null, writable: true, configurable: true },
_zoneSource: { value: null, writable: true, configurable: true },
_zoneSubscribe: { value: null, writable: true, configurable: true },
source: {
configurable: true,
get: function () {
return this._zoneSource;
},
set: function (source) {
this._zone = Zone.current;
this._zoneSource = source;
}
},
_subscribe: {
configurable: true,
get: function () {
if (this._zoneSubscribe) {
return this._zoneSubscribe;
}
else if (this.constructor === rxjs.Observable) {
return _subscribe;
}
var proto = Object.getPrototypeOf(this);
return proto && proto._subscribe;
},
set: function (subscribe) {
this._zone = Zone.current;
if (!subscribe) {
this._zoneSubscribe = subscribe;
}
else {
this._zoneSubscribe = function () {
if (this._zone && this._zone !== Zone.current) {
var tearDown_1 = this._zone.run(subscribe, this, arguments);
if (typeof tearDown_1 === 'function') {
var zone_1 = this._zone;
return function () {
if (zone_1 !== Zone.current) {
return zone_1.run(tearDown_1, this, arguments);
}
return tearDown_1.apply(this, arguments);
};
}
else {
return tearDown_1;
}
}
else {
return subscribe.apply(this, arguments);
}
};
}
}
},
subjectFactory: {
get: function () {
return this._zoneSubjectFactory;
},
set: function (factory) {
var zone = this._zone;
this._zoneSubjectFactory = function () {
if (zone && zone !== Zone.current) {
return zone.run(factory, this, arguments);
}
return factory.apply(this, arguments);
};
}
}
});
};
api.patchMethod(rxjs.Observable.prototype, 'lift', function (delegate) { return function (self, args) {
var observable = delegate.apply(self, args);
if (observable.operator) {
observable.operator._zone = Zone.current;
api.patchMethod(observable.operator, 'call', function (operatorDelegate) { return function (operatorSelf, operatorArgs) {
if (operatorSelf._zone && operatorSelf._zone !== Zone.current) {
return operatorSelf._zone.run(operatorDelegate, operatorSelf, operatorArgs);
}
return operatorDelegate.apply(operatorSelf, operatorArgs);
}; });
}
return observable;
}; });
var patchSubscription = function () {
ObjectDefineProperties(rxjs.Subscription.prototype, {
_zone: { value: null, writable: true, configurable: true },
_zoneUnsubscribe: { value: null, writable: true, configurable: true },
_unsubscribe: {
get: function () {
if (this._zoneUnsubscribe || this._zoneUnsubscribeCleared) {
return this._zoneUnsubscribe;
}
var proto = Object.getPrototypeOf(this);
return proto && proto._unsubscribe;
},
set: function (unsubscribe) {
this._zone = Zone.current;
if (!unsubscribe) {
this._zoneUnsubscribe = unsubscribe;
// In some operator such as `retryWhen`, the _unsubscribe
// method will be set to null, so we need to set another flag
// to tell that we should return null instead of finding
// in the prototype chain.
this._zoneUnsubscribeCleared = true;
}
else {
this._zoneUnsubscribeCleared = false;
this._zoneUnsubscribe = function () {
if (this._zone && this._zone !== Zone.current) {
return this._zone.run(unsubscribe, this, arguments);
}
else {
return unsubscribe.apply(this, arguments);
}
};
}
}
}
});
};
var patchSubscriber = function () {
var next = rxjs.Subscriber.prototype.next;
var error = rxjs.Subscriber.prototype.error;
var complete = rxjs.Subscriber.prototype.complete;
Object.defineProperty(rxjs.Subscriber.prototype, 'destination', {
configurable: true,
get: function () {
return this._zoneDestination;
},
set: function (destination) {
this._zone = Zone.current;
this._zoneDestination = destination;
}
});
// patch Subscriber.next to make sure it run
// into SubscriptionZone
rxjs.Subscriber.prototype.next = function () {
var currentZone = Zone.current;
var subscriptionZone = this._zone;
// for performance concern, check Zone.current
// equal with this._zone(SubscriptionZone) or not
if (subscriptionZone && subscriptionZone !== currentZone) {
return subscriptionZone.run(next, this, arguments, nextSource);
}
else {
return next.apply(this, arguments);
}
};
rxjs.Subscriber.prototype.error = function () {
var currentZone = Zone.current;
var subscriptionZone = this._zone;
// for performance concern, check Zone.current
// equal with this._zone(SubscriptionZone) or not
if (subscriptionZone && subscriptionZone !== currentZone) {
return subscriptionZone.run(error, this, arguments, errorSource);
}
else {
return error.apply(this, arguments);
}
};
rxjs.Subscriber.prototype.complete = function () {
var currentZone = Zone.current;
var subscriptionZone = this._zone;
// for performance concern, check Zone.current
// equal with this._zone(SubscriptionZone) or not
if (subscriptionZone && subscriptionZone !== currentZone) {
return subscriptionZone.run(complete, this, arguments, completeSource);
}
else {
return complete.call(this);
}
};
};
patchObservable();
patchSubscription();
patchSubscriber();
});
rxjs.patchRxJs(Zone);
}));
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(require("rxjs")):"function"==typeof define&&define.amd?define(["rxjs"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).rxjs)}(this,(function(e){Zone.__load_patch("rxjs",(function(r,t,n){var i,o,u,s,c,b=t.__symbol__,a=Object.defineProperties;n.patchMethod(e.Observable.prototype,"lift",(function(e){return function(r,i){var o=e.apply(r,i);return o.operator&&(o.operator._zone=t.current,n.patchMethod(o.operator,"call",(function(e){return function(r,n){return r._zone&&r._zone!==t.current?r._zone.run(e,r,n):e.apply(r,n)}}))),o}})),o=(i=e.Observable.prototype)[b("_subscribe")]=i._subscribe,a(e.Observable.prototype,{_zone:{value:null,writable:!0,configurable:!0},_zoneSource:{value:null,writable:!0,configurable:!0},_zoneSubscribe:{value:null,writable:!0,configurable:!0},source:{configurable:!0,get:function(){return this._zoneSource},set:function(e){this._zone=t.current,this._zoneSource=e}},_subscribe:{configurable:!0,get:function(){if(this._zoneSubscribe)return this._zoneSubscribe;if(this.constructor===e.Observable)return o;var r=Object.getPrototypeOf(this);return r&&r._subscribe},set:function(e){this._zone=t.current,this._zoneSubscribe=e?function(){if(this._zone&&this._zone!==t.current){var r=this._zone.run(e,this,arguments);if("function"==typeof r){var n=this._zone;return function(){return n!==t.current?n.run(r,this,arguments):r.apply(this,arguments)}}return r}return e.apply(this,arguments)}:e}},subjectFactory:{get:function(){return this._zoneSubjectFactory},set:function(e){var r=this._zone;this._zoneSubjectFactory=function(){return r&&r!==t.current?r.run(e,this,arguments):e.apply(this,arguments)}}}}),a(e.Subscription.prototype,{_zone:{value:null,writable:!0,configurable:!0},_zoneUnsubscribe:{value:null,writable:!0,configurable:!0},_unsubscribe:{get:function(){if(this._zoneUnsubscribe||this._zoneUnsubscribeCleared)return this._zoneUnsubscribe;var e=Object.getPrototypeOf(this);return e&&e._unsubscribe},set:function(e){this._zone=t.current,e?(this._zoneUnsubscribeCleared=!1,this._zoneUnsubscribe=function(){return this._zone&&this._zone!==t.current?this._zone.run(e,this,arguments):e.apply(this,arguments)}):(this._zoneUnsubscribe=e,this._zoneUnsubscribeCleared=!0)}}}),u=e.Subscriber.prototype.next,s=e.Subscriber.prototype.error,c=e.Subscriber.prototype.complete,Object.defineProperty(e.Subscriber.prototype,"destination",{configurable:!0,get:function(){return this._zoneDestination},set:function(e){this._zone=t.current,this._zoneDestination=e}}),e.Subscriber.prototype.next=function(){var e=this._zone;return e&&e!==t.current?e.run(u,this,arguments,"rxjs.Subscriber.next"):u.apply(this,arguments)},e.Subscriber.prototype.error=function(){var e=this._zone;return e&&e!==t.current?e.run(s,this,arguments,"rxjs.Subscriber.error"):s.apply(this,arguments)},e.Subscriber.prototype.complete=function(){var e=this._zone;return e&&e!==t.current?e.run(c,this,arguments,"rxjs.Subscriber.complete"):c.call(this)}}))}));
*/!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(require("./rxjs")):"function"==typeof define&&define.amd?define(["./rxjs"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).rxjs)}(this,(function(e){e.patchRxJs(Zone)}));
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT

@@ -12,19 +12,24 @@ */

'use strict';
Zone.__load_patch('socketio', function (global, Zone, api) {
Zone[Zone.__symbol__('socketio')] = function patchSocketIO(io) {
// patch io.Socket.prototype event listener related method
api.patchEventTarget(global, api, [io.Socket.prototype], {
useG: false,
chkDup: false,
rt: true,
diff: function (task, delegate) {
return task.callback === delegate;
}
});
// also patch io.Socket.prototype.on/off/removeListener/removeAllListeners
io.Socket.prototype.on = io.Socket.prototype.addEventListener;
io.Socket.prototype.off = io.Socket.prototype.removeListener =
io.Socket.prototype.removeAllListeners = io.Socket.prototype.removeEventListener;
};
});
function patchSocketIo(Zone) {
Zone.__load_patch('socketio', function (global, Zone, api) {
Zone[Zone.__symbol__('socketio')] = function patchSocketIO(io) {
// patch io.Socket.prototype event listener related method
api.patchEventTarget(global, api, [io.Socket.prototype], {
useG: false,
chkDup: false,
rt: true,
diff: function (task, delegate) {
return task.callback === delegate;
},
});
// also patch io.Socket.prototype.on/off/removeListener/removeAllListeners
io.Socket.prototype.on = io.Socket.prototype.addEventListener;
io.Socket.prototype.off =
io.Socket.prototype.removeListener =
io.Socket.prototype.removeAllListeners =
io.Socket.prototype.removeEventListener;
};
});
}
patchSocketIo(Zone);
}));
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){Zone.__load_patch("socketio",(function(e,t,o){t[t.__symbol__("socketio")]=function t(n){o.patchEventTarget(e,o,[n.Socket.prototype],{useG:!1,chkDup:!1,rt:!0,diff:function(e,t){return e.callback===t}}),n.Socket.prototype.on=n.Socket.prototype.addEventListener,n.Socket.prototype.off=n.Socket.prototype.removeListener=n.Socket.prototype.removeAllListeners=n.Socket.prototype.removeEventListener}}))}));
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){!function e(t){t.__load_patch("socketio",(function(e,t,o){t[t.__symbol__("socketio")]=function t(n){o.patchEventTarget(e,o,[n.Socket.prototype],{useG:!1,chkDup:!1,rt:!0,diff:function(e,t){return e.callback===t}}),n.Socket.prototype.on=n.Socket.prototype.addEventListener,n.Socket.prototype.off=n.Socket.prototype.removeListener=n.Socket.prototype.removeAllListeners=n.Socket.prototype.removeEventListener}}))}(Zone)}));
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT

@@ -12,15 +12,18 @@ */

'use strict';
Zone.__load_patch('getUserMedia', function (global, Zone, api) {
function wrapFunctionArgs(func, source) {
return function () {
var args = Array.prototype.slice.call(arguments);
var wrappedArgs = api.bindArguments(args, source ? source : func.name);
return func.apply(this, wrappedArgs);
};
}
var navigator = global['navigator'];
if (navigator && navigator.getUserMedia) {
navigator.getUserMedia = wrapFunctionArgs(navigator.getUserMedia);
}
});
function patchUserMedia(Zone) {
Zone.__load_patch('getUserMedia', function (global, Zone, api) {
function wrapFunctionArgs(func, source) {
return function () {
var args = Array.prototype.slice.call(arguments);
var wrappedArgs = api.bindArguments(args, source ? source : func.name);
return func.apply(this, wrappedArgs);
};
}
var navigator = global['navigator'];
if (navigator && navigator.getUserMedia) {
navigator.getUserMedia = wrapFunctionArgs(navigator.getUserMedia);
}
});
}
patchUserMedia(Zone);
}));
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){Zone.__load_patch("getUserMedia",(function(e,n,t){var i=e.navigator;i&&i.getUserMedia&&(i.getUserMedia=function r(e,n){return function(){var i=Array.prototype.slice.call(arguments),r=t.bindArguments(i,n||e.name);return e.apply(this,r)}}(i.getUserMedia))}))}));
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){!function e(n){n.__load_patch("getUserMedia",(function(e,n,t){var i=e.navigator;i&&i.getUserMedia&&(i.getUserMedia=function r(e,n){return function(){var i=Array.prototype.slice.call(arguments),r=t.bindArguments(i,n||e.name);return e.apply(this,r)}}(i.getUserMedia))}))}(Zone)}));
"use strict";var __assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign.apply(this,arguments)},__spreadArray=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,s=t.length;i<s;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/
!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){var e="\n",t={},n="__creationTrace__",r="STACKTRACE TRACKING",i="__SEP_TAG__",s=i+"@[native]",o=function o(){this.error=h(),this.timestamp=new Date};function a(){return new Error(r)}function c(){try{throw a()}catch(e){return e}}var u=a(),l=c(),h=u.stack?a:l.stack?c:a;function p(t){return t.stack?t.stack.split(e):[]}function f(e,n){for(var r=p(n),i=0;i<r.length;i++)t.hasOwnProperty(r[i])||e.push(r[i])}function d(t,n){var r=[n?n.trim():""];if(t)for(var o=(new Date).getTime(),a=0;a<t.length;a++){var c=t[a],u=c.timestamp,l="____________________Elapsed ".concat(o-u.getTime()," ms; At: ").concat(u);l=l.replace(/[^\w\d]/g,"_"),r.push(s.replace(i,l)),f(r,c.error),o=u.getTime()}return r.join(e)}function y(){return Error.stackTraceLimit>0}function m(e,t){t>0&&(e.push(p((new o).error)),m(e,t-1))}Zone.longStackTraceZoneSpec={name:"long-stack-trace",longStackTraceLimit:10,getLongStackTrace:function(e){if(e){var t=e[Zone.__symbol__("currentTaskTrace")];return t?d(t,e.stack):e.stack}},onScheduleTask:function(e,t,r,i){if(y()){var s=Zone.currentTask,a=s&&s.data&&s.data[n]||[];(a=[new o].concat(a)).length>this.longStackTraceLimit&&(a.length=this.longStackTraceLimit),i.data||(i.data={}),"eventTask"===i.type&&(i.data=__assign({},i.data)),i.data[n]=a}return e.scheduleTask(r,i)},onHandleError:function(e,t,r,i){if(y()){var s=Zone.currentTask||i.task;if(i instanceof Error&&s){var o=d(s.data&&s.data[n],i.stack);try{i.stack=i.longStack=o}catch(e){}}}return e.handleError(r,i)}},function T(){if(y()){var e=[];m(e,2);for(var n=e[0],o=e[1],a=0;a<n.length;a++)if(-1==(u=n[a]).indexOf(r)){var c=u.match(/^\s*at\s+/);if(c){s=c[0]+i+" (http://localhost)";break}}for(a=0;a<n.length;a++){var u;if((u=n[a])!==o[a])break;t[u]=!0}}}();var _=function(){function e(e){void 0===e&&(e=null),this.defaultSpecDelegate=e,this.name="ProxyZone",this._delegateSpec=null,this.properties={ProxyZoneSpec:this},this.propertyKeys=null,this.lastTaskState=null,this.isNeedToTriggerHasTask=!1,this.tasks=[],this.setDelegate(e)}return e.get=function(){return Zone.current.get("ProxyZoneSpec")},e.isLoaded=function(){return e.get()instanceof e},e.assertPresent=function(){if(!e.isLoaded())throw new Error("Expected to be running in 'ProxyZone', but it was not found.");return e.get()},e.prototype.setDelegate=function(e){var t=this,n=this._delegateSpec!==e;this._delegateSpec=e,this.propertyKeys&&this.propertyKeys.forEach((function(e){return delete t.properties[e]})),this.propertyKeys=null,e&&e.properties&&(this.propertyKeys=Object.keys(e.properties),this.propertyKeys.forEach((function(n){return t.properties[n]=e.properties[n]}))),n&&this.lastTaskState&&(this.lastTaskState.macroTask||this.lastTaskState.microTask)&&(this.isNeedToTriggerHasTask=!0)},e.prototype.getDelegate=function(){return this._delegateSpec},e.prototype.resetDelegate=function(){this.getDelegate(),this.setDelegate(this.defaultSpecDelegate)},e.prototype.tryTriggerHasTask=function(e,t,n){this.isNeedToTriggerHasTask&&this.lastTaskState&&(this.isNeedToTriggerHasTask=!1,this.onHasTask(e,t,n,this.lastTaskState))},e.prototype.removeFromTasks=function(e){if(this.tasks)for(var t=0;t<this.tasks.length;t++)if(this.tasks[t]===e)return void this.tasks.splice(t,1)},e.prototype.getAndClearPendingTasksInfo=function(){if(0===this.tasks.length)return"";var e="--Pending async tasks are: ["+this.tasks.map((function(e){var t=e.data&&Object.keys(e.data).map((function(t){return t+":"+e.data[t]})).join(",");return"type: ".concat(e.type,", source: ").concat(e.source,", args: {").concat(t,"}")}))+"]";return this.tasks=[],e},e.prototype.onFork=function(e,t,n,r){return this._delegateSpec&&this._delegateSpec.onFork?this._delegateSpec.onFork(e,t,n,r):e.fork(n,r)},e.prototype.onIntercept=function(e,t,n,r,i){return this._delegateSpec&&this._delegateSpec.onIntercept?this._delegateSpec.onIntercept(e,t,n,r,i):e.intercept(n,r,i)},e.prototype.onInvoke=function(e,t,n,r,i,s,o){return this.tryTriggerHasTask(e,t,n),this._delegateSpec&&this._delegateSpec.onInvoke?this._delegateSpec.onInvoke(e,t,n,r,i,s,o):e.invoke(n,r,i,s,o)},e.prototype.onHandleError=function(e,t,n,r){return this._delegateSpec&&this._delegateSpec.onHandleError?this._delegateSpec.onHandleError(e,t,n,r):e.handleError(n,r)},e.prototype.onScheduleTask=function(e,t,n,r){return"eventTask"!==r.type&&this.tasks.push(r),this._delegateSpec&&this._delegateSpec.onScheduleTask?this._delegateSpec.onScheduleTask(e,t,n,r):e.scheduleTask(n,r)},e.prototype.onInvokeTask=function(e,t,n,r,i,s){return"eventTask"!==r.type&&this.removeFromTasks(r),this.tryTriggerHasTask(e,t,n),this._delegateSpec&&this._delegateSpec.onInvokeTask?this._delegateSpec.onInvokeTask(e,t,n,r,i,s):e.invokeTask(n,r,i,s)},e.prototype.onCancelTask=function(e,t,n,r){return"eventTask"!==r.type&&this.removeFromTasks(r),this.tryTriggerHasTask(e,t,n),this._delegateSpec&&this._delegateSpec.onCancelTask?this._delegateSpec.onCancelTask(e,t,n,r):e.cancelTask(n,r)},e.prototype.onHasTask=function(e,t,n,r){this.lastTaskState=r,this._delegateSpec&&this._delegateSpec.onHasTask?this._delegateSpec.onHasTask(e,t,n,r):e.hasTask(n,r)},e}();Zone.ProxyZoneSpec=_;var k,g,v,S=function(){function e(e){this.runZone=Zone.current,this.name="syncTestZone for "+e}return e.prototype.onScheduleTask=function(e,t,n,r){switch(r.type){case"microTask":case"macroTask":throw new Error("Cannot call ".concat(r.source," from within a sync test (").concat(this.name,")."));case"eventTask":r=e.scheduleTask(n,r)}return r},e}();Zone.SyncTestZoneSpec=S,Zone.__load_patch("jasmine",(function(e,t,n){if(!t)throw new Error("Missing: zone.js");if("undefined"==typeof jest&&"undefined"!=typeof jasmine&&!jasmine.__zone_patch__){jasmine.__zone_patch__=!0;var r=t.SyncTestZoneSpec,i=t.ProxyZoneSpec;if(!r)throw new Error("Missing: SyncTestZoneSpec");if(!i)throw new Error("Missing: ProxyZoneSpec");var s=t.current,o=t.__symbol__,a=!0===e[o("fakeAsyncDisablePatchingClock")],c=!a&&(!0===e[o("fakeAsyncPatchLock")]||!0===e[o("fakeAsyncAutoFakeAsyncWhenClockPatched")]);if(!0!==e[o("ignoreUnhandledRejection")]){var u=jasmine.GlobalErrors;u&&!jasmine[o("GlobalErrors")]&&(jasmine[o("GlobalErrors")]=u,jasmine.GlobalErrors=function(){var t=new u,n=t.install;return n&&!t[o("install")]&&(t[o("install")]=n,t.install=function(){var t="undefined"!=typeof process&&!!process.on,r=t?process.listeners("unhandledRejection"):e.eventListeners("unhandledrejection"),i=n.apply(this,arguments);return t?process.removeAllListeners("unhandledRejection"):e.removeAllListeners("unhandledrejection"),r&&r.forEach((function(n){t?process.on("unhandledRejection",n):e.addEventListener("unhandledrejection",n)})),i}),t})}var l=jasmine.getEnv();if(["describe","xdescribe","fdescribe"].forEach((function(e){var t=l[e];l[e]=function(e,n){return t.call(this,e,function i(e,t){return function(){return s.fork(new r("jasmine.describe#".concat(e))).run(t,this,arguments)}}(e,n))}})),["it","xit","fit"].forEach((function(e){var t=l[e];l[o(e)]=t,l[e]=function(e,n,r){return arguments[1]=y(n),t.apply(this,arguments)}})),["beforeEach","afterEach","beforeAll","afterAll"].forEach((function(e){var t=l[e];l[o(e)]=t,l[e]=function(e,n){return arguments[0]=y(e),t.apply(this,arguments)}})),!a){var h=jasmine[o("clock")]=jasmine.clock;jasmine.clock=function(){var e=h.apply(this,arguments);if(!e[o("patched")]){e[o("patched")]=o("patched");var n=e[o("tick")]=e.tick;e.tick=function(){var e=t.current.get("FakeAsyncTestZoneSpec");return e?e.tick.apply(e,arguments):n.apply(this,arguments)};var r=e[o("mockDate")]=e.mockDate;e.mockDate=function(){var e=t.current.get("FakeAsyncTestZoneSpec");if(e){var n=arguments.length>0?arguments[0]:new Date;return e.setFakeBaseSystemTime.apply(e,n&&"function"==typeof n.getTime?[n.getTime()]:arguments)}return r.apply(this,arguments)},c&&["install","uninstall"].forEach((function(n){var r=e[o(n)]=e[n];e[n]=function(){if(!t.FakeAsyncTestZoneSpec)return r.apply(this,arguments);jasmine[o("clockInstalled")]="install"===n}}))}return e}}if(!jasmine[t.__symbol__("createSpyObj")]){var p=jasmine.createSpyObj;jasmine[t.__symbol__("createSpyObj")]=p,jasmine.createSpyObj=function(){var e,t=Array.prototype.slice.call(arguments);if(t.length>=3&&t[2]){var n=Object.defineProperty;Object.defineProperty=function(e,t,r){return n.call(this,e,t,__assign(__assign({},r),{configurable:!0,enumerable:!0}))};try{e=p.apply(this,t)}finally{Object.defineProperty=n}}else e=p.apply(this,t);return e}}var f=jasmine.QueueRunner;jasmine.QueueRunner=function(n){function r(r){var i,o=this;r.onComplete&&(r.onComplete=(i=r.onComplete,function(){o.testProxyZone=null,o.testProxyZoneSpec=null,s.scheduleMicroTask("jasmine.onComplete",i)}));var a=e[t.__symbol__("setTimeout")],c=e[t.__symbol__("clearTimeout")];a&&(r.timeout={setTimeout:a||e.setTimeout,clearTimeout:c||e.clearTimeout}),jasmine.UserContext?(r.userContext||(r.userContext=new jasmine.UserContext),r.userContext.queueRunner=this):(r.userContext||(r.userContext={}),r.userContext.queueRunner=this);var u=r.onException;r.onException=function(e){if(e&&"Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL."===e.message){var t=this&&this.testProxyZoneSpec;if(t){var n=t.getAndClearPendingTasksInfo();try{e.message+=n}catch(e){}}}u&&u.call(this,e)},n.call(this,r)}return function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);function r(){this.constructor=e}e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}(r,n),r.prototype.execute=function(){for(var e=this,r=t.current,o=!1;r;){if(r===s){o=!0;break}r=r.parent}if(!o)throw new Error("Unexpected Zone: "+t.current.name);this.testProxyZoneSpec=new i,this.testProxyZone=s.fork(this.testProxyZoneSpec),t.currentTask?n.prototype.execute.call(this):t.current.scheduleMicroTask("jasmine.execute().forceTask",(function(){return f.prototype.execute.call(e)}))},r}(f)}function d(e,n,r,i){var s=!!jasmine[o("clockInstalled")],a=r.testProxyZone;if(s&&c){var u=t[t.__symbol__("fakeAsyncTest")];u&&"function"==typeof u.fakeAsync&&(e=u.fakeAsync(e))}return i?a.run(e,n,[i]):a.run(e,n)}function y(e){return e&&(e.length?function(t){return d(e,this,this.queueRunner,t)}:function(){return d(e,this,this.queueRunner)})}})),Zone.__load_patch("jest",(function(e,t,n){if("undefined"!=typeof jest&&!jest.__zone_patch__){t[n.symbol("ignoreConsoleErrorUncaughtError")]=!0,jest.__zone_patch__=!0;var r=t.ProxyZoneSpec,i=t.SyncTestZoneSpec;if(!r)throw new Error("Missing ProxyZoneSpec");var s=t.current,o=s.fork(new i("jest.describe")),a=new r,c=s.fork(a);["describe","xdescribe","fdescribe"].forEach((function(n){var r=e[n];e[t.__symbol__(n)]||(e[t.__symbol__(n)]=r,e[n]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e[1]=u(e[1]),r.apply(this,e)},e[n].each=function i(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=e.apply(this,t);return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e[1]=u(e[1]),r.apply(this,e)}}}(r.each))})),e.describe.only=e.fdescribe,e.describe.skip=e.xdescribe,["it","xit","fit","test","xtest"].forEach((function(n){var r=e[n];e[t.__symbol__(n)]||(e[t.__symbol__(n)]=r,e[n]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e[1]=l(e[1],!0),r.apply(this,e)},e[n].each=function i(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n[1]=l(n[1]),e.apply(this,t).apply(this,n)}}}(r.each),e[n].todo=r.todo)})),e.it.only=e.fit,e.it.skip=e.xit,e.test.only=e.fit,e.test.skip=e.xit,["beforeEach","afterEach","beforeAll","afterAll"].forEach((function(n){var r=e[n];e[t.__symbol__(n)]||(e[t.__symbol__(n)]=r,e[n]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e[0]=l(e[0]),r.apply(this,e)})})),t.patchJestObject=function e(r,i){function s(){return!!t.current.get("FakeAsyncTestZoneSpec")}function o(){var e=t.current.get("ProxyZoneSpec");return e&&e.isTestFunc}void 0===i&&(i=!1),r[n.symbol("fakeTimers")]||(r[n.symbol("fakeTimers")]=!0,n.patchMethod(r,"_checkFakeTimers",(function(e){return function(t,n){return!!s()||e.apply(t,n)}})),n.patchMethod(r,"useFakeTimers",(function(e){return function(r,s){return t[n.symbol("useFakeTimersCalled")]=!0,i||o()?e.apply(r,s):r}})),n.patchMethod(r,"useRealTimers",(function(e){return function(r,s){return t[n.symbol("useFakeTimersCalled")]=!1,i||o()?e.apply(r,s):r}})),n.patchMethod(r,"setSystemTime",(function(e){return function(n,r){var i=t.current.get("FakeAsyncTestZoneSpec");if(!i||!s())return e.apply(n,r);i.setFakeBaseSystemTime(r[0])}})),n.patchMethod(r,"getRealSystemTime",(function(e){return function(n,r){var i=t.current.get("FakeAsyncTestZoneSpec");return i&&s()?i.getRealSystemTime():e.apply(n,r)}})),n.patchMethod(r,"runAllTicks",(function(e){return function(n,r){var i=t.current.get("FakeAsyncTestZoneSpec");if(!i)return e.apply(n,r);i.flushMicrotasks()}})),n.patchMethod(r,"runAllTimers",(function(e){return function(n,r){var i=t.current.get("FakeAsyncTestZoneSpec");if(!i)return e.apply(n,r);i.flush(100,!0)}})),n.patchMethod(r,"advanceTimersByTime",(function(e){return function(n,r){var i=t.current.get("FakeAsyncTestZoneSpec");if(!i)return e.apply(n,r);i.tick(r[0])}})),n.patchMethod(r,"runOnlyPendingTimers",(function(e){return function(n,r){var i=t.current.get("FakeAsyncTestZoneSpec");if(!i)return e.apply(n,r);i.flushOnlyPendingTimers()}})),n.patchMethod(r,"advanceTimersToNextTimer",(function(e){return function(n,r){var i=t.current.get("FakeAsyncTestZoneSpec");if(!i)return e.apply(n,r);i.tickToNext(r[0])}})),n.patchMethod(r,"clearAllTimers",(function(e){return function(n,r){var i=t.current.get("FakeAsyncTestZoneSpec");if(!i)return e.apply(n,r);i.removeAllTimers()}})),n.patchMethod(r,"getTimerCount",(function(e){return function(n,r){var i=t.current.get("FakeAsyncTestZoneSpec");return i?i.getTimerCount():e.apply(n,r)}})))}}function u(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return o.run(e,this,t)}}function l(e,r){if(void 0===r&&(r=!1),"function"!=typeof e)return e;var i=function(){if(!0===t[n.symbol("useFakeTimersCalled")]&&e&&!e.isFakeAsync){var i=t[t.__symbol__("fakeAsyncTest")];i&&"function"==typeof i.fakeAsync&&(e=i.fakeAsync(e))}return a.isTestFunc=r,c.run(e,null,arguments)};return Object.defineProperty(i,"length",{configurable:!0,writable:!0,enumerable:!1}),i.length=e.length,i}})),Zone.__load_patch("mocha",(function(e,t){var n=e.Mocha;if(void 0!==n){if(void 0===t)throw new Error("Missing Zone.js");var r=t.ProxyZoneSpec,i=t.SyncTestZoneSpec;if(!r)throw new Error("Missing ProxyZoneSpec");if(n.__zone_patch__)throw new Error('"Mocha" has already been patched with "Zone".');n.__zone_patch__=!0;var s,o,a=t.current,c=a.fork(new i("Mocha.describe")),u=null,l=a.fork(new r),h={after:e.after,afterEach:e.afterEach,before:e.before,beforeEach:e.beforeEach,describe:e.describe,it:e.it};e.describe=e.suite=function(){return h.describe.apply(this,f(arguments))},e.xdescribe=e.suite.skip=e.describe.skip=function(){return h.describe.skip.apply(this,f(arguments))},e.describe.only=e.suite.only=function(){return h.describe.only.apply(this,f(arguments))},e.it=e.specify=e.test=function(){return h.it.apply(this,d(arguments))},e.xit=e.xspecify=e.it.skip=function(){return h.it.skip.apply(this,d(arguments))},e.it.only=e.test.only=function(){return h.it.only.apply(this,d(arguments))},e.after=e.suiteTeardown=function(){return h.after.apply(this,y(arguments))},e.afterEach=e.teardown=function(){return h.afterEach.apply(this,d(arguments))},e.before=e.suiteSetup=function(){return h.before.apply(this,y(arguments))},e.beforeEach=e.setup=function(){return h.beforeEach.apply(this,d(arguments))},s=n.Runner.prototype.runTest,o=n.Runner.prototype.run,n.Runner.prototype.runTest=function(e){var n=this;t.current.scheduleMicroTask("mocha.forceTask",(function(){s.call(n,e)}))},n.Runner.prototype.run=function(e){return this.on("test",(function(e){u=a.fork(new r)})),this.on("fail",(function(e,t){var n=u&&u.get("ProxyZoneSpec");if(n&&t)try{t.message+=n.getAndClearPendingTasksInfo()}catch(e){}})),o.call(this,e)}}function p(e,t,n){for(var r=function(r){var i=e[r];"function"==typeof i&&(e[r]=0===i.length?t(i):n(i),e[r].toString=function(){return i.toString()})},i=0;i<e.length;i++)r(i);return e}function f(e){return p(e,(function(e){return function(){return c.run(e,this,arguments)}}))}function d(e){return p(e,(function(e){return function(){return u.run(e,this)}}),(function(e){return function(t){return u.run(e,this,[t])}}))}function y(e){return p(e,(function(e){return function(){return l.run(e,this)}}),(function(e){return function(t){return l.run(e,this,[t])}}))}})),k="undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global,v=function(){function e(e,t,n){this.finishCallback=e,this.failCallback=t,this._pendingMicroTasks=!1,this._pendingMacroTasks=!1,this._alreadyErrored=!1,this._isSync=!1,this._existingFinishTimer=null,this.entryFunction=null,this.runZone=Zone.current,this.unresolvedChainedPromiseCount=0,this.supportWaitUnresolvedChainedPromise=!1,this.name="asyncTestZone for "+n,this.properties={AsyncTestZoneSpec:this},this.supportWaitUnresolvedChainedPromise=!0===k[Zone.__symbol__("supportWaitUnResolvedChainedPromise")]}return e.prototype.isUnresolvedChainedPromisePending=function(){return this.unresolvedChainedPromiseCount>0},e.prototype._finishCallbackIfDone=function(){var e=this;null!==this._existingFinishTimer&&(clearTimeout(this._existingFinishTimer),this._existingFinishTimer=null),this._pendingMicroTasks||this._pendingMacroTasks||this.supportWaitUnresolvedChainedPromise&&this.isUnresolvedChainedPromisePending()||this.runZone.run((function(){e._existingFinishTimer=setTimeout((function(){e._alreadyErrored||e._pendingMicroTasks||e._pendingMacroTasks||e.finishCallback()}),0)}))},e.prototype.patchPromiseForTest=function(){if(this.supportWaitUnresolvedChainedPromise){var e=Promise[Zone.__symbol__("patchPromiseForTest")];e&&e()}},e.prototype.unPatchPromiseForTest=function(){if(this.supportWaitUnresolvedChainedPromise){var e=Promise[Zone.__symbol__("unPatchPromiseForTest")];e&&e()}},e.prototype.onScheduleTask=function(e,t,n,r){return"eventTask"!==r.type&&(this._isSync=!1),"microTask"===r.type&&r.data&&r.data instanceof Promise&&!0===r.data[g.symbolParentUnresolved]&&this.unresolvedChainedPromiseCount--,e.scheduleTask(n,r)},e.prototype.onInvokeTask=function(e,t,n,r,i,s){return"eventTask"!==r.type&&(this._isSync=!1),e.invokeTask(n,r,i,s)},e.prototype.onCancelTask=function(e,t,n,r){return"eventTask"!==r.type&&(this._isSync=!1),e.cancelTask(n,r)},e.prototype.onInvoke=function(e,t,n,r,i,s,o){this.entryFunction||(this.entryFunction=r);try{return this._isSync=!0,e.invoke(n,r,i,s,o)}finally{this._isSync&&this.entryFunction===r&&this._finishCallbackIfDone()}},e.prototype.onHandleError=function(e,t,n,r){return e.handleError(n,r)&&(this.failCallback(r),this._alreadyErrored=!0),!1},e.prototype.onHasTask=function(e,t,n,r){e.hasTask(n,r),t===n&&("microTask"==r.change?(this._pendingMicroTasks=r.microTask,this._finishCallbackIfDone()):"macroTask"==r.change&&(this._pendingMacroTasks=r.macroTask,this._finishCallbackIfDone()))},e}(),(g=v).symbolParentUnresolved=Zone.__symbol__("parentUnresolved"),Zone.AsyncTestZoneSpec=v,Zone.__load_patch("asynctest",(function(e,t,n){function r(e,n,r,i){var s=t.current,o=t.AsyncTestZoneSpec;if(void 0===o)throw new Error("AsyncTestZoneSpec is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/plugins/async-test");var a=t.ProxyZoneSpec;if(!a)throw new Error("ProxyZoneSpec is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/plugins/proxy");var c=a.get();a.assertPresent();var u=t.current.getZoneWith("ProxyZoneSpec"),l=c.getDelegate();return u.parent.run((function(){var e=new o((function(){c.getDelegate()==e&&c.setDelegate(l),e.unPatchPromiseForTest(),s.run((function(){r()}))}),(function(t){c.getDelegate()==e&&c.setDelegate(l),e.unPatchPromiseForTest(),s.run((function(){i(t)}))}),"test");c.setDelegate(e),e.patchPromiseForTest()})),t.current.runGuarded(e,n)}t[n.symbol("asyncTest")]=function t(n){return e.jasmine?function(e){e||((e=function(){}).fail=function(e){throw e}),r(n,this,e,(function(t){if("string"==typeof t)return e.fail(new Error(t));e.fail(t)}))}:function(){var e=this;return new Promise((function(t,i){r(n,e,t,i)}))}}})),function(e){var t,n=e.Date;function r(){if(0===arguments.length){var e=new n;return e.setTime(r.now()),e}var t=Array.prototype.slice.call(arguments);return new(n.bind.apply(n,__spreadArray([void 0],t,!1)))}r.now=function(){var e=Zone.current.get("FakeAsyncTestZoneSpec");return e?e.getFakeSystemTime():n.now.apply(this,arguments)},r.UTC=n.UTC,r.parse=n.parse;var i={setTimeout:e.setTimeout,setInterval:e.setInterval,clearTimeout:e.clearTimeout,clearInterval:e.clearInterval},s=function(){function r(){this._schedulerQueue=[],this._currentTickTime=0,this._currentFakeBaseSystemTime=n.now(),this._currentTickRequeuePeriodicEntries=[]}return r.prototype.getCurrentTickTime=function(){return this._currentTickTime},r.prototype.getFakeSystemTime=function(){return this._currentFakeBaseSystemTime+this._currentTickTime},r.prototype.setFakeBaseSystemTime=function(e){this._currentFakeBaseSystemTime=e},r.prototype.getRealSystemTime=function(){return n.now()},r.prototype.scheduleFunction=function(e,n,r){var i=(r=__assign({args:[],isPeriodic:!1,isRequestAnimationFrame:!1,id:-1,isRequeuePeriodic:!1},r)).id<0?t.nextId++:r.id,s={endTime:this._currentTickTime+n,id:i,func:e,args:r.args,delay:n,isPeriodic:r.isPeriodic,isRequestAnimationFrame:r.isRequestAnimationFrame};r.isRequeuePeriodic&&this._currentTickRequeuePeriodicEntries.push(s);for(var o=0;o<this._schedulerQueue.length&&!(s.endTime<this._schedulerQueue[o].endTime);o++);return this._schedulerQueue.splice(o,0,s),i},r.prototype.removeScheduledFunctionWithId=function(e){for(var t=0;t<this._schedulerQueue.length;t++)if(this._schedulerQueue[t].id==e){this._schedulerQueue.splice(t,1);break}},r.prototype.removeAll=function(){this._schedulerQueue=[]},r.prototype.getTimerCount=function(){return this._schedulerQueue.length},r.prototype.tickToNext=function(e,t,n){void 0===e&&(e=1),this._schedulerQueue.length<e||this.tick(this._schedulerQueue[e-1].endTime-this._currentTickTime,t,n)},r.prototype.tick=function(t,n,r){void 0===t&&(t=0);var i=this._currentTickTime+t,s=0,o=(r=Object.assign({processNewMacroTasksSynchronously:!0},r)).processNewMacroTasksSynchronously?this._schedulerQueue:this._schedulerQueue.slice();if(0===o.length&&n)n(t);else{for(;o.length>0&&(this._currentTickRequeuePeriodicEntries=[],!(i<o[0].endTime));){var a=o.shift();if(!r.processNewMacroTasksSynchronously){var c=this._schedulerQueue.indexOf(a);c>=0&&this._schedulerQueue.splice(c,1)}if(s=this._currentTickTime,this._currentTickTime=a.endTime,n&&n(this._currentTickTime-s),!a.func.apply(e,a.isRequestAnimationFrame?[this._currentTickTime]:a.args))break;r.processNewMacroTasksSynchronously||this._currentTickRequeuePeriodicEntries.forEach((function(e){for(var t=0;t<o.length&&!(e.endTime<o[t].endTime);t++);o.splice(t,0,e)}))}s=this._currentTickTime,this._currentTickTime=i,n&&n(this._currentTickTime-s)}},r.prototype.flushOnlyPendingTimers=function(e){if(0===this._schedulerQueue.length)return 0;var t=this._currentTickTime;return this.tick(this._schedulerQueue[this._schedulerQueue.length-1].endTime-t,e,{processNewMacroTasksSynchronously:!1}),this._currentTickTime-t},r.prototype.flush=function(e,t,n){return void 0===e&&(e=20),void 0===t&&(t=!1),t?this.flushPeriodic(n):this.flushNonPeriodic(e,n)},r.prototype.flushPeriodic=function(e){if(0===this._schedulerQueue.length)return 0;var t=this._currentTickTime;return this.tick(this._schedulerQueue[this._schedulerQueue.length-1].endTime-t,e),this._currentTickTime-t},r.prototype.flushNonPeriodic=function(t,n){for(var r=this._currentTickTime,i=0,s=0;this._schedulerQueue.length>0;){if(++s>t)throw new Error("flush failed after reaching the limit of "+t+" tasks. Does your code use a polling timeout?");if(0===this._schedulerQueue.filter((function(e){return!e.isPeriodic&&!e.isRequestAnimationFrame})).length)break;var o=this._schedulerQueue.shift();if(i=this._currentTickTime,this._currentTickTime=o.endTime,n&&n(this._currentTickTime-i),!o.func.apply(e,o.args))break}return this._currentTickTime-r},r}();(t=s).nextId=1;var o=function(){function t(t,n,r){void 0===n&&(n=!1),this.trackPendingRequestAnimationFrame=n,this.macroTaskOptions=r,this._scheduler=new s,this._microtasks=[],this._lastError=null,this._uncaughtPromiseErrors=Promise[Zone.__symbol__("uncaughtPromiseErrors")],this.pendingPeriodicTimers=[],this.pendingTimers=[],this.patchDateLocked=!1,this.properties={FakeAsyncTestZoneSpec:this},this.name="fakeAsyncTestZone for "+t,this.macroTaskOptions||(this.macroTaskOptions=e[Zone.__symbol__("FakeAsyncTestMacroTask")])}return t.assertInZone=function(){if(null==Zone.current.get("FakeAsyncTestZoneSpec"))throw new Error("The code should be running in the fakeAsync zone to call this function")},t.prototype._fnAndFlush=function(t,n){var r=this;return function(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];return t.apply(e,i),null===r._lastError?(null!=n.onSuccess&&n.onSuccess.apply(e),r.flushMicrotasks()):null!=n.onError&&n.onError.apply(e),null===r._lastError}},t._removeTimer=function(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)},t.prototype._dequeueTimer=function(e){var n=this;return function(){t._removeTimer(n.pendingTimers,e)}},t.prototype._requeuePeriodicTimer=function(e,t,n,r){var i=this;return function(){-1!==i.pendingPeriodicTimers.indexOf(r)&&i._scheduler.scheduleFunction(e,t,{args:n,isPeriodic:!0,id:r,isRequeuePeriodic:!0})}},t.prototype._dequeuePeriodicTimer=function(e){var n=this;return function(){t._removeTimer(n.pendingPeriodicTimers,e)}},t.prototype._setTimeout=function(e,t,n,r){void 0===r&&(r=!0);var i=this._dequeueTimer(s.nextId),o=this._fnAndFlush(e,{onSuccess:i,onError:i}),a=this._scheduler.scheduleFunction(o,t,{args:n,isRequestAnimationFrame:!r});return r&&this.pendingTimers.push(a),a},t.prototype._clearTimeout=function(e){t._removeTimer(this.pendingTimers,e),this._scheduler.removeScheduledFunctionWithId(e)},t.prototype._setInterval=function(e,t,n){var r=s.nextId,i={onSuccess:null,onError:this._dequeuePeriodicTimer(r)},o=this._fnAndFlush(e,i);return i.onSuccess=this._requeuePeriodicTimer(o,t,n,r),this._scheduler.scheduleFunction(o,t,{args:n,isPeriodic:!0}),this.pendingPeriodicTimers.push(r),r},t.prototype._clearInterval=function(e){t._removeTimer(this.pendingPeriodicTimers,e),this._scheduler.removeScheduledFunctionWithId(e)},t.prototype._resetLastErrorAndThrow=function(){var e=this._lastError||this._uncaughtPromiseErrors[0];throw this._uncaughtPromiseErrors.length=0,this._lastError=null,e},t.prototype.getCurrentTickTime=function(){return this._scheduler.getCurrentTickTime()},t.prototype.getFakeSystemTime=function(){return this._scheduler.getFakeSystemTime()},t.prototype.setFakeBaseSystemTime=function(e){this._scheduler.setFakeBaseSystemTime(e)},t.prototype.getRealSystemTime=function(){return this._scheduler.getRealSystemTime()},t.patchDate=function(){e[Zone.__symbol__("disableDatePatching")]||e.Date!==r&&(e.Date=r,r.prototype=n.prototype,t.checkTimerPatch())},t.resetDate=function(){e.Date===r&&(e.Date=n)},t.checkTimerPatch=function(){e.setTimeout!==i.setTimeout&&(e.setTimeout=i.setTimeout,e.clearTimeout=i.clearTimeout),e.setInterval!==i.setInterval&&(e.setInterval=i.setInterval,e.clearInterval=i.clearInterval)},t.prototype.lockDatePatch=function(){this.patchDateLocked=!0,t.patchDate()},t.prototype.unlockDatePatch=function(){this.patchDateLocked=!1,t.resetDate()},t.prototype.tickToNext=function(e,n,r){void 0===e&&(e=1),void 0===r&&(r={processNewMacroTasksSynchronously:!0}),e<=0||(t.assertInZone(),this.flushMicrotasks(),this._scheduler.tickToNext(e,n,r),null!==this._lastError&&this._resetLastErrorAndThrow())},t.prototype.tick=function(e,n,r){void 0===e&&(e=0),void 0===r&&(r={processNewMacroTasksSynchronously:!0}),t.assertInZone(),this.flushMicrotasks(),this._scheduler.tick(e,n,r),null!==this._lastError&&this._resetLastErrorAndThrow()},t.prototype.flushMicrotasks=function(){var e=this;for(t.assertInZone();this._microtasks.length>0;){var n=this._microtasks.shift();n.func.apply(n.target,n.args)}(null!==e._lastError||e._uncaughtPromiseErrors.length)&&e._resetLastErrorAndThrow()},t.prototype.flush=function(e,n,r){t.assertInZone(),this.flushMicrotasks();var i=this._scheduler.flush(e,n,r);return null!==this._lastError&&this._resetLastErrorAndThrow(),i},t.prototype.flushOnlyPendingTimers=function(e){t.assertInZone(),this.flushMicrotasks();var n=this._scheduler.flushOnlyPendingTimers(e);return null!==this._lastError&&this._resetLastErrorAndThrow(),n},t.prototype.removeAllTimers=function(){t.assertInZone(),this._scheduler.removeAll(),this.pendingPeriodicTimers=[],this.pendingTimers=[]},t.prototype.getTimerCount=function(){return this._scheduler.getTimerCount()+this._microtasks.length},t.prototype.onScheduleTask=function(e,t,n,r){switch(r.type){case"microTask":var i=r.data&&r.data.args,s=void 0;if(i){var o=r.data.cbIdx;"number"==typeof i.length&&i.length>o+1&&(s=Array.prototype.slice.call(i,o+1))}this._microtasks.push({func:r.invoke,args:s,target:r.data&&r.data.target});break;case"macroTask":switch(r.source){case"setTimeout":r.data.handleId=this._setTimeout(r.invoke,r.data.delay,Array.prototype.slice.call(r.data.args,2));break;case"setImmediate":r.data.handleId=this._setTimeout(r.invoke,0,Array.prototype.slice.call(r.data.args,1));break;case"setInterval":r.data.handleId=this._setInterval(r.invoke,r.data.delay,Array.prototype.slice.call(r.data.args,2));break;case"XMLHttpRequest.send":throw new Error("Cannot make XHRs from within a fake async test. Request URL: "+r.data.url);case"requestAnimationFrame":case"webkitRequestAnimationFrame":case"mozRequestAnimationFrame":r.data.handleId=this._setTimeout(r.invoke,16,r.data.args,this.trackPendingRequestAnimationFrame);break;default:var a=this.findMacroTaskOption(r);if(a){var c=r.data&&r.data.args,u=c&&c.length>1?c[1]:0,l=a.callbackArgs?a.callbackArgs:c;a.isPeriodic?(r.data.handleId=this._setInterval(r.invoke,u,l),r.data.isPeriodic=!0):r.data.handleId=this._setTimeout(r.invoke,u,l);break}throw new Error("Unknown macroTask scheduled in fake async test: "+r.source)}break;case"eventTask":r=e.scheduleTask(n,r)}return r},t.prototype.onCancelTask=function(e,t,n,r){switch(r.source){case"setTimeout":case"requestAnimationFrame":case"webkitRequestAnimationFrame":case"mozRequestAnimationFrame":return this._clearTimeout(r.data.handleId);case"setInterval":return this._clearInterval(r.data.handleId);default:var i=this.findMacroTaskOption(r);if(i){var s=r.data.handleId;return i.isPeriodic?this._clearInterval(s):this._clearTimeout(s)}return e.cancelTask(n,r)}},t.prototype.onInvoke=function(e,n,r,i,s,o,a){try{return t.patchDate(),e.invoke(r,i,s,o,a)}finally{this.patchDateLocked||t.resetDate()}},t.prototype.findMacroTaskOption=function(e){if(!this.macroTaskOptions)return null;for(var t=0;t<this.macroTaskOptions.length;t++){var n=this.macroTaskOptions[t];if(n.source===e.source)return n}return null},t.prototype.onHandleError=function(e,t,n,r){return this._lastError=r,!1},t}();Zone.FakeAsyncTestZoneSpec=o}("object"==typeof window&&window||"object"==typeof self&&self||global),Zone.__load_patch("fakeasync",(function(e,t,n){var r=t&&t.FakeAsyncTestZoneSpec;function i(){return t&&t.ProxyZoneSpec}var s=null;function o(){s&&s.unlockDatePatch(),s=null,i()&&i().assertPresent().resetDelegate()}function a(){if(null==s&&null==(s=t.current.get("FakeAsyncTestZoneSpec")))throw new Error("The code should be running in the fakeAsync zone to call this function");return s}function c(){a().flushMicrotasks()}t[n.symbol("fakeAsyncTest")]={resetFakeAsyncZone:o,flushMicrotasks:c,discardPeriodicTasks:function u(){a().pendingPeriodicTimers.length=0},tick:function l(e,t){void 0===e&&(e=0),void 0===t&&(t=!1),a().tick(e,null,t)},flush:function h(e){return a().flush(e)},fakeAsync:function p(e){var n=function(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];var u=i();if(!u)throw new Error("ProxyZoneSpec is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/plugins/proxy");var l=u.assertPresent();if(t.current.get("FakeAsyncTestZoneSpec"))throw new Error("fakeAsync() calls can not be nested");try{if(!s){if(l.getDelegate()instanceof r)throw new Error("fakeAsync() calls can not be nested");s=new r}var h=void 0,p=l.getDelegate();l.setDelegate(s),s.lockDatePatch();try{h=e.apply(this,n),c()}finally{l.setDelegate(p)}if(s.pendingPeriodicTimers.length>0)throw new Error("".concat(s.pendingPeriodicTimers.length," ")+"periodic timer(s) still in the queue.");if(s.pendingTimers.length>0)throw new Error("".concat(s.pendingTimers.length," timer(s) still in the queue."));return h}finally{o()}};return n.isFakeAsync=!0,n}}}),!0),Zone.__load_patch("promisefortest",(function(e,t,n){var r=n.symbol("state"),i=n.symbol("parentUnresolved");Promise[n.symbol("patchPromiseForTest")]=function e(){var n=Promise[t.__symbol__("ZonePromiseThen")];n||(n=Promise[t.__symbol__("ZonePromiseThen")]=Promise.prototype.then,Promise.prototype.then=function(){var e=n.apply(this,arguments);if(null===this[r]){var s=t.current.get("AsyncTestZoneSpec");s&&(s.unresolvedChainedPromiseCount++,e[i]=!0)}return e})},Promise[n.symbol("unPatchPromiseForTest")]=function e(){var n=Promise[t.__symbol__("ZonePromiseThen")];n&&(Promise.prototype.then=n,Promise[t.__symbol__("ZonePromiseThen")]=void 0)}}))}));
!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){var e,t=globalThis;function n(e){return(t.__Zone_symbol_prefix||"__zone_symbol__")+e}var r,i="undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global,s=function(){function e(e,t,r){this.finishCallback=e,this.failCallback=t,this._pendingMicroTasks=!1,this._pendingMacroTasks=!1,this._alreadyErrored=!1,this._isSync=!1,this._existingFinishTimer=null,this.entryFunction=null,this.runZone=Zone.current,this.unresolvedChainedPromiseCount=0,this.supportWaitUnresolvedChainedPromise=!1,this.name="asyncTestZone for "+r,this.properties={AsyncTestZoneSpec:this},this.supportWaitUnresolvedChainedPromise=!0===i[n("supportWaitUnResolvedChainedPromise")]}return Object.defineProperty(e,"symbolParentUnresolved",{get:function(){return n("parentUnresolved")},enumerable:!1,configurable:!0}),e.prototype.isUnresolvedChainedPromisePending=function(){return this.unresolvedChainedPromiseCount>0},e.prototype._finishCallbackIfDone=function(){var e=this;null!==this._existingFinishTimer&&(clearTimeout(this._existingFinishTimer),this._existingFinishTimer=null),this._pendingMicroTasks||this._pendingMacroTasks||this.supportWaitUnresolvedChainedPromise&&this.isUnresolvedChainedPromisePending()||this.runZone.run((function(){e._existingFinishTimer=setTimeout((function(){e._alreadyErrored||e._pendingMicroTasks||e._pendingMacroTasks||e.finishCallback()}),0)}))},e.prototype.patchPromiseForTest=function(){if(this.supportWaitUnresolvedChainedPromise){var e=Promise[Zone.__symbol__("patchPromiseForTest")];e&&e()}},e.prototype.unPatchPromiseForTest=function(){if(this.supportWaitUnresolvedChainedPromise){var e=Promise[Zone.__symbol__("unPatchPromiseForTest")];e&&e()}},e.prototype.onScheduleTask=function(t,n,r,i){return"eventTask"!==i.type&&(this._isSync=!1),"microTask"===i.type&&i.data&&i.data instanceof Promise&&!0===i.data[e.symbolParentUnresolved]&&this.unresolvedChainedPromiseCount--,t.scheduleTask(r,i)},e.prototype.onInvokeTask=function(e,t,n,r,i,s){return"eventTask"!==r.type&&(this._isSync=!1),e.invokeTask(n,r,i,s)},e.prototype.onCancelTask=function(e,t,n,r){return"eventTask"!==r.type&&(this._isSync=!1),e.cancelTask(n,r)},e.prototype.onInvoke=function(e,t,n,r,i,s,o){this.entryFunction||(this.entryFunction=r);try{return this._isSync=!0,e.invoke(n,r,i,s,o)}finally{this._isSync&&this.entryFunction===r&&this._finishCallbackIfDone()}},e.prototype.onHandleError=function(e,t,n,r){return e.handleError(n,r)&&(this.failCallback(r),this._alreadyErrored=!0),!1},e.prototype.onHasTask=function(e,t,n,r){e.hasTask(n,r),t===n&&("microTask"==r.change?(this._pendingMicroTasks=r.microTask,this._finishCallbackIfDone()):"macroTask"==r.change&&(this._pendingMacroTasks=r.macroTask,this._finishCallbackIfDone()))},e}(),o="object"==typeof window&&window||"object"==typeof self&&self||globalThis.global,a=o.Date;function c(){if(0===arguments.length){var e=new a;return e.setTime(c.now()),e}var t=Array.prototype.slice.call(arguments);return new(a.bind.apply(a,__spreadArray([void 0],t,!1)))}c.now=function(){var e=Zone.current.get("FakeAsyncTestZoneSpec");return e?e.getFakeSystemTime():a.now.apply(this,arguments)},c.UTC=a.UTC,c.parse=a.parse;var u=function(){},l=function(){function t(){this._schedulerQueue=[],this._currentTickTime=0,this._currentFakeBaseSystemTime=a.now(),this._currentTickRequeuePeriodicEntries=[]}return t.getNextId=function(){var t=r.nativeSetTimeout.call(o,u,0);return r.nativeClearTimeout.call(o,t),"number"==typeof t?t:e.nextNodeJSId++},t.prototype.getCurrentTickTime=function(){return this._currentTickTime},t.prototype.getFakeSystemTime=function(){return this._currentFakeBaseSystemTime+this._currentTickTime},t.prototype.setFakeBaseSystemTime=function(e){this._currentFakeBaseSystemTime=e},t.prototype.getRealSystemTime=function(){return a.now()},t.prototype.scheduleFunction=function(t,n,r){var i=(r=__assign({args:[],isPeriodic:!1,isRequestAnimationFrame:!1,id:-1,isRequeuePeriodic:!1},r)).id<0?e.nextId:r.id;e.nextId=e.getNextId();var s={endTime:this._currentTickTime+n,id:i,func:t,args:r.args,delay:n,isPeriodic:r.isPeriodic,isRequestAnimationFrame:r.isRequestAnimationFrame};r.isRequeuePeriodic&&this._currentTickRequeuePeriodicEntries.push(s);for(var o=0;o<this._schedulerQueue.length&&!(s.endTime<this._schedulerQueue[o].endTime);o++);return this._schedulerQueue.splice(o,0,s),i},t.prototype.removeScheduledFunctionWithId=function(e){for(var t=0;t<this._schedulerQueue.length;t++)if(this._schedulerQueue[t].id==e){this._schedulerQueue.splice(t,1);break}},t.prototype.removeAll=function(){this._schedulerQueue=[]},t.prototype.getTimerCount=function(){return this._schedulerQueue.length},t.prototype.tickToNext=function(e,t,n){void 0===e&&(e=1),this._schedulerQueue.length<e||this.tick(this._schedulerQueue[e-1].endTime-this._currentTickTime,t,n)},t.prototype.tick=function(e,t,n){void 0===e&&(e=0);var r=this._currentTickTime+e,i=0,s=(n=Object.assign({processNewMacroTasksSynchronously:!0},n)).processNewMacroTasksSynchronously?this._schedulerQueue:this._schedulerQueue.slice();if(0===s.length&&t)t(e);else{for(;s.length>0&&(this._currentTickRequeuePeriodicEntries=[],!(r<s[0].endTime));){var a=s.shift();if(!n.processNewMacroTasksSynchronously){var c=this._schedulerQueue.indexOf(a);c>=0&&this._schedulerQueue.splice(c,1)}if(i=this._currentTickTime,this._currentTickTime=a.endTime,t&&t(this._currentTickTime-i),!a.func.apply(o,a.isRequestAnimationFrame?[this._currentTickTime]:a.args))break;n.processNewMacroTasksSynchronously||this._currentTickRequeuePeriodicEntries.forEach((function(e){for(var t=0;t<s.length&&!(e.endTime<s[t].endTime);t++);s.splice(t,0,e)}))}i=this._currentTickTime,this._currentTickTime=r,t&&t(this._currentTickTime-i)}},t.prototype.flushOnlyPendingTimers=function(e){if(0===this._schedulerQueue.length)return 0;var t=this._currentTickTime;return this.tick(this._schedulerQueue[this._schedulerQueue.length-1].endTime-t,e,{processNewMacroTasksSynchronously:!1}),this._currentTickTime-t},t.prototype.flush=function(e,t,n){return void 0===e&&(e=20),void 0===t&&(t=!1),t?this.flushPeriodic(n):this.flushNonPeriodic(e,n)},t.prototype.flushPeriodic=function(e){if(0===this._schedulerQueue.length)return 0;var t=this._currentTickTime;return this.tick(this._schedulerQueue[this._schedulerQueue.length-1].endTime-t,e),this._currentTickTime-t},t.prototype.flushNonPeriodic=function(e,t){for(var n=this._currentTickTime,r=0,i=0;this._schedulerQueue.length>0;){if(++i>e)throw new Error("flush failed after reaching the limit of "+e+" tasks. Does your code use a polling timeout?");if(0===this._schedulerQueue.filter((function(e){return!e.isPeriodic&&!e.isRequestAnimationFrame})).length)break;var s=this._schedulerQueue.shift();if(r=this._currentTickTime,this._currentTickTime=s.endTime,t&&t(this._currentTickTime-r),!s.func.apply(o,s.args))break}return this._currentTickTime-n},t}();(e=l).nextNodeJSId=1,e.nextId=-1;var h=function(){function e(e,t,n){void 0===t&&(t=!1),this.trackPendingRequestAnimationFrame=t,this.macroTaskOptions=n,this._scheduler=new l,this._microtasks=[],this._lastError=null,this._uncaughtPromiseErrors=Promise[Zone.__symbol__("uncaughtPromiseErrors")],this.pendingPeriodicTimers=[],this.pendingTimers=[],this.patchDateLocked=!1,this.properties={FakeAsyncTestZoneSpec:this},this.name="fakeAsyncTestZone for "+e,this.macroTaskOptions||(this.macroTaskOptions=o[Zone.__symbol__("FakeAsyncTestMacroTask")])}return e.assertInZone=function(){if(null==Zone.current.get("FakeAsyncTestZoneSpec"))throw new Error("The code should be running in the fakeAsync zone to call this function")},e.prototype._fnAndFlush=function(e,t){var n=this;return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return e.apply(o,r),null===n._lastError?(null!=t.onSuccess&&t.onSuccess.apply(o),n.flushMicrotasks()):null!=t.onError&&t.onError.apply(o),null===n._lastError}},e._removeTimer=function(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)},e.prototype._dequeueTimer=function(t){var n=this;return function(){e._removeTimer(n.pendingTimers,t)}},e.prototype._requeuePeriodicTimer=function(e,t,n,r){var i=this;return function(){-1!==i.pendingPeriodicTimers.indexOf(r)&&i._scheduler.scheduleFunction(e,t,{args:n,isPeriodic:!0,id:r,isRequeuePeriodic:!0})}},e.prototype._dequeuePeriodicTimer=function(t){var n=this;return function(){e._removeTimer(n.pendingPeriodicTimers,t)}},e.prototype._setTimeout=function(e,t,n,r){void 0===r&&(r=!0);var i=this._dequeueTimer(l.nextId),s=this._fnAndFlush(e,{onSuccess:i,onError:i}),o=this._scheduler.scheduleFunction(s,t,{args:n,isRequestAnimationFrame:!r});return r&&this.pendingTimers.push(o),o},e.prototype._clearTimeout=function(t){e._removeTimer(this.pendingTimers,t),this._scheduler.removeScheduledFunctionWithId(t)},e.prototype._setInterval=function(e,t,n){var r=l.nextId,i={onSuccess:null,onError:this._dequeuePeriodicTimer(r)},s=this._fnAndFlush(e,i);return i.onSuccess=this._requeuePeriodicTimer(s,t,n,r),this._scheduler.scheduleFunction(s,t,{args:n,isPeriodic:!0}),this.pendingPeriodicTimers.push(r),r},e.prototype._clearInterval=function(t){e._removeTimer(this.pendingPeriodicTimers,t),this._scheduler.removeScheduledFunctionWithId(t)},e.prototype._resetLastErrorAndThrow=function(){var e=this._lastError||this._uncaughtPromiseErrors[0];throw this._uncaughtPromiseErrors.length=0,this._lastError=null,e},e.prototype.getCurrentTickTime=function(){return this._scheduler.getCurrentTickTime()},e.prototype.getFakeSystemTime=function(){return this._scheduler.getFakeSystemTime()},e.prototype.setFakeBaseSystemTime=function(e){this._scheduler.setFakeBaseSystemTime(e)},e.prototype.getRealSystemTime=function(){return this._scheduler.getRealSystemTime()},e.patchDate=function(){o[Zone.__symbol__("disableDatePatching")]||o.Date!==c&&(o.Date=c,c.prototype=a.prototype,e.checkTimerPatch())},e.resetDate=function(){o.Date===c&&(o.Date=a)},e.checkTimerPatch=function(){if(!r)throw new Error("Expected timers to have been patched.");o.setTimeout!==r.setTimeout&&(o.setTimeout=r.setTimeout,o.clearTimeout=r.clearTimeout),o.setInterval!==r.setInterval&&(o.setInterval=r.setInterval,o.clearInterval=r.clearInterval)},e.prototype.lockDatePatch=function(){this.patchDateLocked=!0,e.patchDate()},e.prototype.unlockDatePatch=function(){this.patchDateLocked=!1,e.resetDate()},e.prototype.tickToNext=function(t,n,r){void 0===t&&(t=1),void 0===r&&(r={processNewMacroTasksSynchronously:!0}),t<=0||(e.assertInZone(),this.flushMicrotasks(),this._scheduler.tickToNext(t,n,r),null!==this._lastError&&this._resetLastErrorAndThrow())},e.prototype.tick=function(t,n,r){void 0===t&&(t=0),void 0===r&&(r={processNewMacroTasksSynchronously:!0}),e.assertInZone(),this.flushMicrotasks(),this._scheduler.tick(t,n,r),null!==this._lastError&&this._resetLastErrorAndThrow()},e.prototype.flushMicrotasks=function(){var t=this;for(e.assertInZone();this._microtasks.length>0;){var n=this._microtasks.shift();n.func.apply(n.target,n.args)}(null!==t._lastError||t._uncaughtPromiseErrors.length)&&t._resetLastErrorAndThrow()},e.prototype.flush=function(t,n,r){e.assertInZone(),this.flushMicrotasks();var i=this._scheduler.flush(t,n,r);return null!==this._lastError&&this._resetLastErrorAndThrow(),i},e.prototype.flushOnlyPendingTimers=function(t){e.assertInZone(),this.flushMicrotasks();var n=this._scheduler.flushOnlyPendingTimers(t);return null!==this._lastError&&this._resetLastErrorAndThrow(),n},e.prototype.removeAllTimers=function(){e.assertInZone(),this._scheduler.removeAll(),this.pendingPeriodicTimers=[],this.pendingTimers=[]},e.prototype.getTimerCount=function(){return this._scheduler.getTimerCount()+this._microtasks.length},e.prototype.onScheduleTask=function(e,t,n,r){switch(r.type){case"microTask":var i=r.data&&r.data.args,s=void 0;if(i){var o=r.data.cbIdx;"number"==typeof i.length&&i.length>o+1&&(s=Array.prototype.slice.call(i,o+1))}this._microtasks.push({func:r.invoke,args:s,target:r.data&&r.data.target});break;case"macroTask":switch(r.source){case"setTimeout":r.data.handleId=this._setTimeout(r.invoke,r.data.delay,Array.prototype.slice.call(r.data.args,2));break;case"setImmediate":r.data.handleId=this._setTimeout(r.invoke,0,Array.prototype.slice.call(r.data.args,1));break;case"setInterval":r.data.handleId=this._setInterval(r.invoke,r.data.delay,Array.prototype.slice.call(r.data.args,2));break;case"XMLHttpRequest.send":throw new Error("Cannot make XHRs from within a fake async test. Request URL: "+r.data.url);case"requestAnimationFrame":case"webkitRequestAnimationFrame":case"mozRequestAnimationFrame":r.data.handleId=this._setTimeout(r.invoke,16,r.data.args,this.trackPendingRequestAnimationFrame);break;default:var a=this.findMacroTaskOption(r);if(a){var c=r.data&&r.data.args,u=c&&c.length>1?c[1]:0,l=a.callbackArgs?a.callbackArgs:c;a.isPeriodic?(r.data.handleId=this._setInterval(r.invoke,u,l),r.data.isPeriodic=!0):r.data.handleId=this._setTimeout(r.invoke,u,l);break}throw new Error("Unknown macroTask scheduled in fake async test: "+r.source)}break;case"eventTask":r=e.scheduleTask(n,r)}return r},e.prototype.onCancelTask=function(e,t,n,r){switch(r.source){case"setTimeout":case"requestAnimationFrame":case"webkitRequestAnimationFrame":case"mozRequestAnimationFrame":return this._clearTimeout(r.data.handleId);case"setInterval":return this._clearInterval(r.data.handleId);default:var i=this.findMacroTaskOption(r);if(i){var s=r.data.handleId;return i.isPeriodic?this._clearInterval(s):this._clearTimeout(s)}return e.cancelTask(n,r)}},e.prototype.onInvoke=function(t,n,r,i,s,o,a){try{return e.patchDate(),t.invoke(r,i,s,o,a)}finally{this.patchDateLocked||e.resetDate()}},e.prototype.findMacroTaskOption=function(e){if(!this.macroTaskOptions)return null;for(var t=0;t<this.macroTaskOptions.length;t++){var n=this.macroTaskOptions[t];if(n.source===e.source)return n}return null},e.prototype.onHandleError=function(e,t,n,r){return this._lastError=r,!1},e}(),p=null;function f(){return Zone&&Zone.ProxyZoneSpec}function d(){p&&p.unlockDatePatch(),p=null,f()&&f().assertPresent().resetDelegate()}function y(e){var t=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=f();if(!r)throw new Error("ProxyZoneSpec is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/plugins/proxy");var i=r.assertPresent();if(Zone.current.get("FakeAsyncTestZoneSpec"))throw new Error("fakeAsync() calls can not be nested");try{if(!p){var s=Zone&&Zone.FakeAsyncTestZoneSpec;if(i.getDelegate()instanceof s)throw new Error("fakeAsync() calls can not be nested");p=new s}var o=void 0,a=i.getDelegate();i.setDelegate(p),p.lockDatePatch();try{o=e.apply(this,t),g()}finally{i.setDelegate(a)}if(p.pendingPeriodicTimers.length>0)throw new Error("".concat(p.pendingPeriodicTimers.length," ")+"periodic timer(s) still in the queue.");if(p.pendingTimers.length>0)throw new Error("".concat(p.pendingTimers.length," timer(s) still in the queue."));return o}finally{d()}};return t.isFakeAsync=!0,t}function m(){if(null==p&&null==(p=Zone.current.get("FakeAsyncTestZoneSpec")))throw new Error("The code should be running in the fakeAsync zone to call this function");return p}function T(e,t){void 0===e&&(e=0),void 0===t&&(t=!1),m().tick(e,null,t)}function _(e){return m().flush(e)}function k(){m().pendingPeriodicTimers.length=0}function g(){m().flushMicrotasks()}function v(e){var t="\n",n={},r="__creationTrace__",i="STACKTRACE TRACKING",s="__SEP_TAG__",o=s+"@[native]",a=function a(){this.error=p(),this.timestamp=new Date};function c(){return new Error(i)}function u(){try{throw c()}catch(e){return e}}var l=c(),h=u(),p=l.stack?c:h.stack?u:c;function f(e){return e.stack?e.stack.split(t):[]}function d(e,t){for(var r=f(t),i=0;i<r.length;i++)n.hasOwnProperty(r[i])||e.push(r[i])}function y(e,n){var r=[n?n.trim():""];if(e)for(var i=(new Date).getTime(),a=0;a<e.length;a++){var c=e[a],u=c.timestamp,l="____________________Elapsed ".concat(i-u.getTime()," ms; At: ").concat(u);l=l.replace(/[^\w\d]/g,"_"),r.push(o.replace(s,l)),d(r,c.error),i=u.getTime()}return r.join(t)}function m(){return Error.stackTraceLimit>0}function T(e,t){t>0&&(e.push(f((new a).error)),T(e,t-1))}e.longStackTraceZoneSpec={name:"long-stack-trace",longStackTraceLimit:10,getLongStackTrace:function(t){if(t){var n=t[e.__symbol__("currentTaskTrace")];return n?y(n,t.stack):t.stack}},onScheduleTask:function(t,n,i,s){if(m()){var o=e.currentTask,c=o&&o.data&&o.data[r]||[];(c=[new a].concat(c)).length>this.longStackTraceLimit&&(c.length=this.longStackTraceLimit),s.data||(s.data={}),"eventTask"===s.type&&(s.data=__assign({},s.data)),s.data[r]=c}return t.scheduleTask(i,s)},onHandleError:function(t,n,i,s){if(m()){var o=e.currentTask||s.task;if(s instanceof Error&&o){var a=y(o.data&&o.data[r],s.stack);try{s.stack=s.longStack=a}catch(e){}}}return t.handleError(i,s)}},function _(){if(m()){var e=[];T(e,2);for(var t=e[0],r=e[1],a=0;a<t.length;a++)if(-1==(u=t[a]).indexOf(i)){var c=u.match(/^\s*at\s+/);if(c){o=c[0]+s+" (http://localhost)";break}}for(a=0;a<t.length;a++){var u;if((u=t[a])!==r[a])break;n[u]=!0}}}()}var S=function(){function e(e){void 0===e&&(e=null),this.defaultSpecDelegate=e,this.name="ProxyZone",this._delegateSpec=null,this.properties={ProxyZoneSpec:this},this.propertyKeys=null,this.lastTaskState=null,this.isNeedToTriggerHasTask=!1,this.tasks=[],this.setDelegate(e)}return e.get=function(){return Zone.current.get("ProxyZoneSpec")},e.isLoaded=function(){return e.get()instanceof e},e.assertPresent=function(){if(!e.isLoaded())throw new Error("Expected to be running in 'ProxyZone', but it was not found.");return e.get()},e.prototype.setDelegate=function(e){var t=this,n=this._delegateSpec!==e;this._delegateSpec=e,this.propertyKeys&&this.propertyKeys.forEach((function(e){return delete t.properties[e]})),this.propertyKeys=null,e&&e.properties&&(this.propertyKeys=Object.keys(e.properties),this.propertyKeys.forEach((function(n){return t.properties[n]=e.properties[n]}))),n&&this.lastTaskState&&(this.lastTaskState.macroTask||this.lastTaskState.microTask)&&(this.isNeedToTriggerHasTask=!0)},e.prototype.getDelegate=function(){return this._delegateSpec},e.prototype.resetDelegate=function(){this.getDelegate(),this.setDelegate(this.defaultSpecDelegate)},e.prototype.tryTriggerHasTask=function(e,t,n){this.isNeedToTriggerHasTask&&this.lastTaskState&&(this.isNeedToTriggerHasTask=!1,this.onHasTask(e,t,n,this.lastTaskState))},e.prototype.removeFromTasks=function(e){if(this.tasks)for(var t=0;t<this.tasks.length;t++)if(this.tasks[t]===e)return void this.tasks.splice(t,1)},e.prototype.getAndClearPendingTasksInfo=function(){if(0===this.tasks.length)return"";var e="--Pending async tasks are: ["+this.tasks.map((function(e){var t=e.data&&Object.keys(e.data).map((function(t){return t+":"+e.data[t]})).join(",");return"type: ".concat(e.type,", source: ").concat(e.source,", args: {").concat(t,"}")}))+"]";return this.tasks=[],e},e.prototype.onFork=function(e,t,n,r){return this._delegateSpec&&this._delegateSpec.onFork?this._delegateSpec.onFork(e,t,n,r):e.fork(n,r)},e.prototype.onIntercept=function(e,t,n,r,i){return this._delegateSpec&&this._delegateSpec.onIntercept?this._delegateSpec.onIntercept(e,t,n,r,i):e.intercept(n,r,i)},e.prototype.onInvoke=function(e,t,n,r,i,s,o){return this.tryTriggerHasTask(e,t,n),this._delegateSpec&&this._delegateSpec.onInvoke?this._delegateSpec.onInvoke(e,t,n,r,i,s,o):e.invoke(n,r,i,s,o)},e.prototype.onHandleError=function(e,t,n,r){return this._delegateSpec&&this._delegateSpec.onHandleError?this._delegateSpec.onHandleError(e,t,n,r):e.handleError(n,r)},e.prototype.onScheduleTask=function(e,t,n,r){return"eventTask"!==r.type&&this.tasks.push(r),this._delegateSpec&&this._delegateSpec.onScheduleTask?this._delegateSpec.onScheduleTask(e,t,n,r):e.scheduleTask(n,r)},e.prototype.onInvokeTask=function(e,t,n,r,i,s){return"eventTask"!==r.type&&this.removeFromTasks(r),this.tryTriggerHasTask(e,t,n),this._delegateSpec&&this._delegateSpec.onInvokeTask?this._delegateSpec.onInvokeTask(e,t,n,r,i,s):e.invokeTask(n,r,i,s)},e.prototype.onCancelTask=function(e,t,n,r){return"eventTask"!==r.type&&this.removeFromTasks(r),this.tryTriggerHasTask(e,t,n),this._delegateSpec&&this._delegateSpec.onCancelTask?this._delegateSpec.onCancelTask(e,t,n,r):e.cancelTask(n,r)},e.prototype.onHasTask=function(e,t,n,r){this.lastTaskState=r,this._delegateSpec&&this._delegateSpec.onHasTask?this._delegateSpec.onHasTask(e,t,n,r):e.hasTask(n,r)},e}();!function b(e){v(e),function t(e){e.ProxyZoneSpec=S}(e),function n(e){var t=function(){function t(t){this.runZone=e.current,this.name="syncTestZone for "+t}return t.prototype.onScheduleTask=function(e,t,n,r){switch(r.type){case"microTask":case"macroTask":throw new Error("Cannot call ".concat(r.source," from within a sync test (").concat(this.name,")."));case"eventTask":r=e.scheduleTask(n,r)}return r},t}();e.SyncTestZoneSpec=t}(e),function i(e){e.__load_patch("jasmine",(function(e,t,n){if(!t)throw new Error("Missing: zone.js");if("undefined"==typeof jest&&"undefined"!=typeof jasmine&&!jasmine.__zone_patch__){jasmine.__zone_patch__=!0;var r=t.SyncTestZoneSpec,i=t.ProxyZoneSpec;if(!r)throw new Error("Missing: SyncTestZoneSpec");if(!i)throw new Error("Missing: ProxyZoneSpec");var s=t.current,o=t.__symbol__,a=!0===e[o("fakeAsyncDisablePatchingClock")],c=!a&&(!0===e[o("fakeAsyncPatchLock")]||!0===e[o("fakeAsyncAutoFakeAsyncWhenClockPatched")]);if(!0!==e[o("ignoreUnhandledRejection")]){var u=jasmine.GlobalErrors;u&&!jasmine[o("GlobalErrors")]&&(jasmine[o("GlobalErrors")]=u,jasmine.GlobalErrors=function(){var t=new u,n=t.install;return n&&!t[o("install")]&&(t[o("install")]=n,t.install=function(){var t="undefined"!=typeof process&&!!process.on,r=t?process.listeners("unhandledRejection"):e.eventListeners("unhandledrejection"),i=n.apply(this,arguments);return t?process.removeAllListeners("unhandledRejection"):e.removeAllListeners("unhandledrejection"),r&&r.forEach((function(n){t?process.on("unhandledRejection",n):e.addEventListener("unhandledrejection",n)})),i}),t})}var l=jasmine.getEnv();if(["describe","xdescribe","fdescribe"].forEach((function(e){var t=l[e];l[e]=function(e,n){return t.call(this,e,function i(e,t){return function(){return s.fork(new r("jasmine.describe#".concat(e))).run(t,this,arguments)}}(e,n))}})),["it","xit","fit"].forEach((function(e){var t=l[e];l[o(e)]=t,l[e]=function(e,n,r){return arguments[1]=y(n),t.apply(this,arguments)}})),["beforeEach","afterEach","beforeAll","afterAll"].forEach((function(e){var t=l[e];l[o(e)]=t,l[e]=function(e,n){return arguments[0]=y(e),t.apply(this,arguments)}})),!a){var h=jasmine[o("clock")]=jasmine.clock;jasmine.clock=function(){var e=h.apply(this,arguments);if(!e[o("patched")]){e[o("patched")]=o("patched");var n=e[o("tick")]=e.tick;e.tick=function(){var e=t.current.get("FakeAsyncTestZoneSpec");return e?e.tick.apply(e,arguments):n.apply(this,arguments)};var r=e[o("mockDate")]=e.mockDate;e.mockDate=function(){var e=t.current.get("FakeAsyncTestZoneSpec");if(e){var n=arguments.length>0?arguments[0]:new Date;return e.setFakeBaseSystemTime.apply(e,n&&"function"==typeof n.getTime?[n.getTime()]:arguments)}return r.apply(this,arguments)},c&&["install","uninstall"].forEach((function(n){var r=e[o(n)]=e[n];e[n]=function(){if(!t.FakeAsyncTestZoneSpec)return r.apply(this,arguments);jasmine[o("clockInstalled")]="install"===n}}))}return e}}if(!jasmine[t.__symbol__("createSpyObj")]){var p=jasmine.createSpyObj;jasmine[t.__symbol__("createSpyObj")]=p,jasmine.createSpyObj=function(){var e,t=Array.prototype.slice.call(arguments);if(t.length>=3&&t[2]){var n=Object.defineProperty;Object.defineProperty=function(e,t,r){return n.call(this,e,t,__assign(__assign({},r),{configurable:!0,enumerable:!0}))};try{e=p.apply(this,t)}finally{Object.defineProperty=n}}else e=p.apply(this,t);return e}}var f=jasmine.QueueRunner;jasmine.QueueRunner=function(n){function r(r){var i,o=this;r.onComplete&&(r.onComplete=(i=r.onComplete,function(){o.testProxyZone=null,o.testProxyZoneSpec=null,s.scheduleMicroTask("jasmine.onComplete",i)}));var a=e[t.__symbol__("setTimeout")],c=e[t.__symbol__("clearTimeout")];a&&(r.timeout={setTimeout:a||e.setTimeout,clearTimeout:c||e.clearTimeout}),jasmine.UserContext?(r.userContext||(r.userContext=new jasmine.UserContext),r.userContext.queueRunner=this):(r.userContext||(r.userContext={}),r.userContext.queueRunner=this);var u=r.onException;r.onException=function(e){if(e&&"Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL."===e.message){var t=this&&this.testProxyZoneSpec;if(t){var n=t.getAndClearPendingTasksInfo();try{e.message+=n}catch(e){}}}u&&u.call(this,e)},n.call(this,r)}return function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);function r(){this.constructor=e}e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}(r,n),r.prototype.execute=function(){for(var e=this,r=t.current,o=!1;r;){if(r===s){o=!0;break}r=r.parent}if(!o)throw new Error("Unexpected Zone: "+t.current.name);this.testProxyZoneSpec=new i,this.testProxyZone=s.fork(this.testProxyZoneSpec),t.currentTask?n.prototype.execute.call(this):t.current.scheduleMicroTask("jasmine.execute().forceTask",(function(){return f.prototype.execute.call(e)}))},r}(f)}function d(e,n,r,i){var s=!!jasmine[o("clockInstalled")],a=r.testProxyZone;if(s&&c){var u=t[t.__symbol__("fakeAsyncTest")];u&&"function"==typeof u.fakeAsync&&(e=u.fakeAsync(e))}return i?a.run(e,n,[i]):a.run(e,n)}function y(e){return e&&(e.length?function(t){return d(e,this,this.queueRunner,t)}:function(){return d(e,this,this.queueRunner)})}}))}(e),function a(e){e.__load_patch("jest",(function(e,t,n){if("undefined"!=typeof jest&&!jest.__zone_patch__){t[n.symbol("ignoreConsoleErrorUncaughtError")]=!0,jest.__zone_patch__=!0;var r=t.ProxyZoneSpec,i=t.SyncTestZoneSpec;if(!r)throw new Error("Missing ProxyZoneSpec");var s=t.current,o=s.fork(new i("jest.describe")),a=new r,c=s.fork(a);["describe","xdescribe","fdescribe"].forEach((function(n){var r=e[n];e[t.__symbol__(n)]||(e[t.__symbol__(n)]=r,e[n]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e[1]=u(e[1]),r.apply(this,e)},e[n].each=function i(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=e.apply(this,t);return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e[1]=u(e[1]),r.apply(this,e)}}}(r.each))})),e.describe.only=e.fdescribe,e.describe.skip=e.xdescribe,["it","xit","fit","test","xtest"].forEach((function(n){var r=e[n];e[t.__symbol__(n)]||(e[t.__symbol__(n)]=r,e[n]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e[1]=l(e[1],!0),r.apply(this,e)},e[n].each=function i(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n[1]=l(n[1]),e.apply(this,t).apply(this,n)}}}(r.each),e[n].todo=r.todo)})),e.it.only=e.fit,e.it.skip=e.xit,e.test.only=e.fit,e.test.skip=e.xit,["beforeEach","afterEach","beforeAll","afterAll"].forEach((function(n){var r=e[n];e[t.__symbol__(n)]||(e[t.__symbol__(n)]=r,e[n]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e[0]=l(e[0]),r.apply(this,e)})})),t.patchJestObject=function e(r,i){function s(){return!!t.current.get("FakeAsyncTestZoneSpec")}function o(){var e=t.current.get("ProxyZoneSpec");return e&&e.isTestFunc}void 0===i&&(i=!1),r[n.symbol("fakeTimers")]||(r[n.symbol("fakeTimers")]=!0,n.patchMethod(r,"_checkFakeTimers",(function(e){return function(t,n){return!!s()||e.apply(t,n)}})),n.patchMethod(r,"useFakeTimers",(function(e){return function(r,s){return t[n.symbol("useFakeTimersCalled")]=!0,i||o()?e.apply(r,s):r}})),n.patchMethod(r,"useRealTimers",(function(e){return function(r,s){return t[n.symbol("useFakeTimersCalled")]=!1,i||o()?e.apply(r,s):r}})),n.patchMethod(r,"setSystemTime",(function(e){return function(n,r){var i=t.current.get("FakeAsyncTestZoneSpec");if(!i||!s())return e.apply(n,r);i.setFakeBaseSystemTime(r[0])}})),n.patchMethod(r,"getRealSystemTime",(function(e){return function(n,r){var i=t.current.get("FakeAsyncTestZoneSpec");return i&&s()?i.getRealSystemTime():e.apply(n,r)}})),n.patchMethod(r,"runAllTicks",(function(e){return function(n,r){var i=t.current.get("FakeAsyncTestZoneSpec");if(!i)return e.apply(n,r);i.flushMicrotasks()}})),n.patchMethod(r,"runAllTimers",(function(e){return function(n,r){var i=t.current.get("FakeAsyncTestZoneSpec");if(!i)return e.apply(n,r);i.flush(100,!0)}})),n.patchMethod(r,"advanceTimersByTime",(function(e){return function(n,r){var i=t.current.get("FakeAsyncTestZoneSpec");if(!i)return e.apply(n,r);i.tick(r[0])}})),n.patchMethod(r,"runOnlyPendingTimers",(function(e){return function(n,r){var i=t.current.get("FakeAsyncTestZoneSpec");if(!i)return e.apply(n,r);i.flushOnlyPendingTimers()}})),n.patchMethod(r,"advanceTimersToNextTimer",(function(e){return function(n,r){var i=t.current.get("FakeAsyncTestZoneSpec");if(!i)return e.apply(n,r);i.tickToNext(r[0])}})),n.patchMethod(r,"clearAllTimers",(function(e){return function(n,r){var i=t.current.get("FakeAsyncTestZoneSpec");if(!i)return e.apply(n,r);i.removeAllTimers()}})),n.patchMethod(r,"getTimerCount",(function(e){return function(n,r){var i=t.current.get("FakeAsyncTestZoneSpec");return i?i.getTimerCount():e.apply(n,r)}})))}}function u(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return o.run(e,this,t)}}function l(e,r){if(void 0===r&&(r=!1),"function"!=typeof e)return e;var i=function(){if(!0===t[n.symbol("useFakeTimersCalled")]&&e&&!e.isFakeAsync){var i=t[t.__symbol__("fakeAsyncTest")];i&&"function"==typeof i.fakeAsync&&(e=i.fakeAsync(e))}return a.isTestFunc=r,c.run(e,null,arguments)};return Object.defineProperty(i,"length",{configurable:!0,writable:!0,enumerable:!1}),i.length=e.length,i}}))}(e),function c(e){e.__load_patch("mocha",(function(e,t){var n=e.Mocha;if(void 0!==n){if(void 0===t)throw new Error("Missing Zone.js");var r=t.ProxyZoneSpec,i=t.SyncTestZoneSpec;if(!r)throw new Error("Missing ProxyZoneSpec");if(n.__zone_patch__)throw new Error('"Mocha" has already been patched with "Zone".');n.__zone_patch__=!0;var s,o,a=t.current,c=a.fork(new i("Mocha.describe")),u=null,l=a.fork(new r),h={after:e.after,afterEach:e.afterEach,before:e.before,beforeEach:e.beforeEach,describe:e.describe,it:e.it};e.describe=e.suite=function(){return h.describe.apply(this,f(arguments))},e.xdescribe=e.suite.skip=e.describe.skip=function(){return h.describe.skip.apply(this,f(arguments))},e.describe.only=e.suite.only=function(){return h.describe.only.apply(this,f(arguments))},e.it=e.specify=e.test=function(){return h.it.apply(this,d(arguments))},e.xit=e.xspecify=e.it.skip=function(){return h.it.skip.apply(this,d(arguments))},e.it.only=e.test.only=function(){return h.it.only.apply(this,d(arguments))},e.after=e.suiteTeardown=function(){return h.after.apply(this,y(arguments))},e.afterEach=e.teardown=function(){return h.afterEach.apply(this,d(arguments))},e.before=e.suiteSetup=function(){return h.before.apply(this,y(arguments))},e.beforeEach=e.setup=function(){return h.beforeEach.apply(this,d(arguments))},s=n.Runner.prototype.runTest,o=n.Runner.prototype.run,n.Runner.prototype.runTest=function(e){var n=this;t.current.scheduleMicroTask("mocha.forceTask",(function(){s.call(n,e)}))},n.Runner.prototype.run=function(e){return this.on("test",(function(e){u=a.fork(new r)})),this.on("fail",(function(e,t){var n=u&&u.get("ProxyZoneSpec");if(n&&t)try{t.message+=n.getAndClearPendingTasksInfo()}catch(e){}})),o.call(this,e)}}function p(e,t,n){for(var r=function(r){var i=e[r];"function"==typeof i&&(e[r]=0===i.length?t(i):n(i),e[r].toString=function(){return i.toString()})},i=0;i<e.length;i++)r(i);return e}function f(e){return p(e,(function(e){return function(){return c.run(e,this,arguments)}}))}function d(e){return p(e,(function(e){return function(){return u.run(e,this)}}),(function(e){return function(t){return u.run(e,this,[t])}}))}function y(e){return p(e,(function(e){return function(){return l.run(e,this)}}),(function(e){return function(t){return l.run(e,this,[t])}}))}}))}(e),function u(e){e.AsyncTestZoneSpec=s,e.__load_patch("asynctest",(function(e,t,n){function r(e,n,r,i){var s=t.current,o=t.AsyncTestZoneSpec;if(void 0===o)throw new Error("AsyncTestZoneSpec is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/plugins/async-test");var a=t.ProxyZoneSpec;if(!a)throw new Error("ProxyZoneSpec is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/plugins/proxy");var c=a.get();a.assertPresent();var u=t.current.getZoneWith("ProxyZoneSpec"),l=c.getDelegate();return u.parent.run((function(){var e=new o((function(){c.getDelegate()==e&&c.setDelegate(l),e.unPatchPromiseForTest(),s.run((function(){r()}))}),(function(t){c.getDelegate()==e&&c.setDelegate(l),e.unPatchPromiseForTest(),s.run((function(){i(t)}))}),"test");c.setDelegate(e),e.patchPromiseForTest()})),t.current.runGuarded(e,n)}t[n.symbol("asyncTest")]=function t(n){return e.jasmine?function(e){e||((e=function(){}).fail=function(e){throw e}),r(n,this,e,(function(t){if("string"==typeof t)return e.fail(new Error(t));e.fail(t)}))}:function(){var e=this;return new Promise((function(t,i){r(n,e,t,i)}))}}}))}(e),function p(e){e.FakeAsyncTestZoneSpec=h,e.__load_patch("fakeasync",(function(e,t,n){t[n.symbol("fakeAsyncTest")]={resetFakeAsyncZone:d,flushMicrotasks:g,discardPeriodicTasks:k,tick:T,flush:_,fakeAsync:y}}),!0),r={setTimeout:o.setTimeout,setInterval:o.setInterval,clearTimeout:o.clearTimeout,clearInterval:o.clearInterval,nativeSetTimeout:o[e.__symbol__("setTimeout")],nativeClearTimeout:o[e.__symbol__("clearTimeout")]},l.nextId=l.getNextId()}(e),function f(e){e.__load_patch("promisefortest",(function(e,t,n){var r=n.symbol("state"),i=n.symbol("parentUnresolved");Promise[n.symbol("patchPromiseForTest")]=function e(){var n=Promise[t.__symbol__("ZonePromiseThen")];n||(n=Promise[t.__symbol__("ZonePromiseThen")]=Promise.prototype.then,Promise.prototype.then=function(){var e=n.apply(this,arguments);if(null===this[r]){var s=t.current.get("AsyncTestZoneSpec");s&&(s.unresolvedChainedPromiseCount++,e[i]=!0)}return e})},Promise[n.symbol("unPatchPromiseForTest")]=function e(){var n=Promise[t.__symbol__("ZonePromiseThen")];n&&(Promise.prototype.then=n,Promise[t.__symbol__("ZonePromiseThen")]=void 0)}}))}(e)}(Zone)}));
"use strict";var __assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},__assign.apply(this,arguments)};
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){!function(e){var t,n=e.performance;function r(e){n&&n.mark&&n.mark(e)}function o(e,t){n&&n.measure&&n.measure(e,t)}r("Zone");var a=e.__Zone_symbol_prefix||"__zone_symbol__";function i(e){return a+e}var s=!0===e[i("forceDuplicateZoneCheck")];if(e.Zone){if(s||"function"!=typeof e.Zone.__symbol__)throw new Error("Zone already loaded.");return e.Zone}var c=function(){function n(e,t){this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new f(this,this._parent&&this._parent._zoneDelegate,t)}return n.assertZonePatched=function(){if(e.Promise!==j.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")},Object.defineProperty(n,"root",{get:function(){for(var e=t.current;e.parent;)e=e.parent;return e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"current",{get:function(){return I.zone},enumerable:!1,configurable:!0}),Object.defineProperty(n,"currentTask",{get:function(){return R},enumerable:!1,configurable:!0}),n.__load_patch=function(n,a,i){if(void 0===i&&(i=!1),j.hasOwnProperty(n)){if(!i&&s)throw Error("Already loaded patch: "+n)}else if(!e["__Zone_disable_"+n]){var c="Zone:"+n;r(c),j[n]=a(e,t,z),o(c,c)}},Object.defineProperty(n.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),n.prototype.get=function(e){var t=this.getZoneWith(e);if(t)return t._properties[e]},n.prototype.getZoneWith=function(e){for(var t=this;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null},n.prototype.fork=function(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)},n.prototype.wrap=function(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);var n=this._zoneDelegate.intercept(this,e,t),r=this;return function(){return r.runGuarded(n,this,arguments,t)}},n.prototype.run=function(e,t,n,r){I={parent:I,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{I=I.parent}},n.prototype.runGuarded=function(e,t,n,r){void 0===t&&(t=null),I={parent:I,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{I=I.parent}},n.prototype.runTask=function(e,t,n){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||T).name+"; Execution: "+this.name+")");if(e.state!==b||e.type!==C&&e.type!==O){var r=e.state!=Z;r&&e._transitionTo(Z,w),e.runCount++;var o=R;R=e,I={parent:I,zone:this};try{e.type==O&&e.data&&!e.data.isPeriodic&&(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,e,t,n)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{e.state!==b&&e.state!==P&&(e.type==C||e.data&&e.data.isPeriodic?r&&e._transitionTo(w,Z):(e.runCount=0,this._updateTaskCount(e,-1),r&&e._transitionTo(b,Z,b))),I=I.parent,R=o}}},n.prototype.scheduleTask=function(e){if(e.zone&&e.zone!==this)for(var t=this;t;){if(t===e.zone)throw Error("can not reschedule task to ".concat(this.name," which is descendants of the original zone ").concat(e.zone.name));t=t.parent}e._transitionTo(E,b);var n=[];e._zoneDelegates=n,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(t){throw e._transitionTo(P,E,b),this._zoneDelegate.handleError(this,t),t}return e._zoneDelegates===n&&this._updateTaskCount(e,1),e.state==E&&e._transitionTo(w,E),e},n.prototype.scheduleMicroTask=function(e,t,n,r){return this.scheduleTask(new h(D,e,t,n,r,void 0))},n.prototype.scheduleMacroTask=function(e,t,n,r,o){return this.scheduleTask(new h(O,e,t,n,r,o))},n.prototype.scheduleEventTask=function(e,t,n,r,o){return this.scheduleTask(new h(C,e,t,n,r,o))},n.prototype.cancelTask=function(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||T).name+"; Execution: "+this.name+")");if(e.state===w||e.state===Z){e._transitionTo(S,w,Z);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(P,S),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(b,S),e.runCount=0,e}},n.prototype._updateTaskCount=function(e,t){var n=e._zoneDelegates;-1==t&&(e._zoneDelegates=null);for(var r=0;r<n.length;r++)n[r]._updateTaskCount(e.type,t)},n}();(t=c).__symbol__=i;var u,l={name:"",onHasTask:function(e,t,n,r){return e.hasTask(n,r)},onScheduleTask:function(e,t,n,r){return e.scheduleTask(n,r)},onInvokeTask:function(e,t,n,r,o,a){return e.invokeTask(n,r,o,a)},onCancelTask:function(e,t,n,r){return e.cancelTask(n,r)}},f=function(){function e(e,t,n){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=e,this._parentDelegate=t,this._forkZS=n&&(n&&n.onFork?n:t._forkZS),this._forkDlgt=n&&(n.onFork?t:t._forkDlgt),this._forkCurrZone=n&&(n.onFork?this.zone:t._forkCurrZone),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this.zone:t._interceptCurrZone),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this.zone:t._invokeCurrZone),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this.zone:t._handleErrorCurrZone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this.zone:t._scheduleTaskCurrZone),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this.zone:t._invokeTaskCurrZone),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this.zone:t._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;var r=n&&n.onHasTask;(r||t&&t._hasTaskZS)&&(this._hasTaskZS=r?n:l,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=e,n.onScheduleTask||(this._scheduleTaskZS=l,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this.zone),n.onInvokeTask||(this._invokeTaskZS=l,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this.zone),n.onCancelTask||(this._cancelTaskZS=l,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this.zone))}return e.prototype.fork=function(e,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,t):new c(e,t)},e.prototype.intercept=function(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,e,t,n):t},e.prototype.invoke=function(e,t,n,r,o){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,e,t,n,r,o):t.apply(n,r)},e.prototype.handleError=function(e,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,e,t)},e.prototype.scheduleTask=function(e,t){var n=t;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),(n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,e,t))||(n=t);else if(t.scheduleFn)t.scheduleFn(t);else{if(t.type!=D)throw new Error("Task is missing scheduleFn.");k(t)}return n},e.prototype.invokeTask=function(e,t,n,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,e,t,n,r):t.callback.apply(n,r)},e.prototype.cancelTask=function(e,t){var n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,e,t);else{if(!t.cancelFn)throw Error("Task is not cancelable");n=t.cancelFn(t)}return n},e.prototype.hasTask=function(e,t){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,e,t)}catch(t){this.handleError(e,t)}},e.prototype._updateTaskCount=function(e,t){var n=this._taskCounts,r=n[e],o=n[e]=r+t;if(o<0)throw new Error("More tasks executed then were scheduled.");0!=r&&0!=o||this.hasTask(this.zone,{microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e})},e}(),h=function(){function t(n,r,o,a,i,s){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=n,this.source=r,this.data=a,this.scheduleFn=i,this.cancelFn=s,!o)throw new Error("callback is not defined");this.callback=o;var c=this;this.invoke=n===C&&a&&a.useG?t.invokeTask:function(){return t.invokeTask.call(e,c,this,arguments)}}return t.invokeTask=function(e,t,n){e||(e=this),M++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{1==M&&m(),M--}},Object.defineProperty(t.prototype,"zone",{get:function(){return this._zone},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),t.prototype.cancelScheduleRequest=function(){this._transitionTo(b,E)},t.prototype._transitionTo=function(e,t,n){if(this._state!==t&&this._state!==n)throw new Error("".concat(this.type," '").concat(this.source,"': can not transition to '").concat(e,"', expecting state '").concat(t,"'").concat(n?" or '"+n+"'":"",", was '").concat(this._state,"'."));this._state=e,e==b&&(this._zoneDelegates=null)},t.prototype.toString=function(){return this.data&&void 0!==this.data.handleId?this.data.handleId.toString():Object.prototype.toString.call(this)},t.prototype.toJSON=function(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}},t}(),p=i("setTimeout"),v=i("Promise"),d=i("then"),_=[],g=!1;function y(t){if(u||e[v]&&(u=e[v].resolve(0)),u){var n=u[d];n||(n=u.then),n.call(u,t)}else e[p](t,0)}function k(e){0===M&&0===_.length&&y(m),e&&_.push(e)}function m(){if(!g){for(g=!0;_.length;){var e=_;_=[];for(var t=0;t<e.length;t++){var n=e[t];try{n.zone.runTask(n,null,null)}catch(e){z.onUnhandledError(e)}}}z.microtaskDrainDone(),g=!1}}var T={name:"NO ZONE"},b="notScheduled",E="scheduling",w="scheduled",Z="running",S="canceling",P="unknown",D="microTask",O="macroTask",C="eventTask",j={},z={symbol:i,currentZoneFrame:function(){return I},onUnhandledError:N,microtaskDrainDone:N,scheduleMicroTask:k,showUncaughtError:function(){return!c[i("ignoreConsoleErrorUncaughtError")]},patchEventTarget:function(){return[]},patchOnProperties:N,patchMethod:function(){return N},bindArguments:function(){return[]},patchThen:function(){return N},patchMacroTask:function(){return N},patchEventPrototype:function(){return N},isIEOrEdge:function(){return!1},getGlobalObjects:function(){},ObjectDefineProperty:function(){return N},ObjectGetOwnPropertyDescriptor:function(){},ObjectCreate:function(){},ArraySlice:function(){return[]},patchClass:function(){return N},wrapWithCurrentZone:function(){return N},filterProperties:function(){return[]},attachOriginToPatched:function(){return N},_redefineProperty:function(){return N},patchCallbacks:function(){return N},nativeScheduleMicroTask:y},I={parent:null,zone:new c(null,null)},R=null,M=0;function N(){}o("Zone","Zone"),e.Zone=c}(globalThis);var e=Object.getOwnPropertyDescriptor,t=Object.defineProperty,n=Object.getPrototypeOf,r=Object.create,o=Array.prototype.slice,a="addEventListener",i="removeEventListener",s=Zone.__symbol__(a),c=Zone.__symbol__(i),u="true",l="false",f=Zone.__symbol__("");function h(e,t){return Zone.current.wrap(e,t)}function p(e,t,n,r,o){return Zone.current.scheduleMacroTask(e,t,n,r,o)}var v=Zone.__symbol__,d="undefined"!=typeof window,_=d?window:void 0,g=d&&_||globalThis,y="removeAttribute";function k(e,t){for(var n=e.length-1;n>=0;n--)"function"==typeof e[n]&&(e[n]=h(e[n],t+"_"+n));return e}function m(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&void 0===e.set)}var T="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,b=!("nw"in g)&&void 0!==g.process&&"[object process]"==={}.toString.call(g.process),E=!b&&!T&&!(!d||!_.HTMLElement),w=void 0!==g.process&&"[object process]"==={}.toString.call(g.process)&&!T&&!(!d||!_.HTMLElement),Z={},S=function(e){if(e=e||g.event){var t=Z[e.type];t||(t=Z[e.type]=v("ON_PROPERTY"+e.type));var n,r=this||e.target||g,o=r[t];return E&&r===_&&"error"===e.type?!0===(n=o&&o.call(this,e.message,e.filename,e.lineno,e.colno,e.error))&&e.preventDefault():null==(n=o&&o.apply(this,arguments))||n||e.preventDefault(),n}};function P(n,r,o){var a=e(n,r);if(!a&&o&&e(o,r)&&(a={enumerable:!0,configurable:!0}),a&&a.configurable){var i=v("on"+r+"patched");if(!n.hasOwnProperty(i)||!n[i]){delete a.writable,delete a.value;var s=a.get,c=a.set,u=r.slice(2),l=Z[u];l||(l=Z[u]=v("ON_PROPERTY"+u)),a.set=function(e){var t=this;t||n!==g||(t=g),t&&("function"==typeof t[l]&&t.removeEventListener(u,S),c&&c.call(t,null),t[l]=e,"function"==typeof e&&t.addEventListener(u,S,!1))},a.get=function(){var e=this;if(e||n!==g||(e=g),!e)return null;var t=e[l];if(t)return t;if(s){var o=s.call(this);if(o)return a.set.call(this,o),"function"==typeof e[y]&&e.removeAttribute(r),o}return null},t(n,r,a),n[i]=!0}}}function D(e,t,n){if(t)for(var r=0;r<t.length;r++)P(e,"on"+t[r],n);else{var o=[];for(var a in e)"on"==a.slice(0,2)&&o.push(a);for(var i=0;i<o.length;i++)P(e,o[i],n)}}var O=v("originalInstance");function C(e){var n=g[e];if(n){g[v(e)]=n,g[e]=function(){var t=k(arguments,e);switch(t.length){case 0:this[O]=new n;break;case 1:this[O]=new n(t[0]);break;case 2:this[O]=new n(t[0],t[1]);break;case 3:this[O]=new n(t[0],t[1],t[2]);break;case 4:this[O]=new n(t[0],t[1],t[2],t[3]);break;default:throw new Error("Arg list too long.")}},I(g[e],n);var r,o=new n((function(){}));for(r in o)"XMLHttpRequest"===e&&"responseBlob"===r||function(n){"function"==typeof o[n]?g[e].prototype[n]=function(){return this[O][n].apply(this[O],arguments)}:t(g[e].prototype,n,{set:function(t){"function"==typeof t?(this[O][n]=h(t,e+"."+n),I(this[O][n],t)):this[O][n]=t},get:function(){return this[O][n]}})}(r);for(r in n)"prototype"!==r&&n.hasOwnProperty(r)&&(g[e][r]=n[r])}}function j(t,r,o){for(var a=t;a&&!a.hasOwnProperty(r);)a=n(a);!a&&t[r]&&(a=t);var i=v(r),s=null;if(a&&(!(s=a[i])||!a.hasOwnProperty(i))&&(s=a[i]=a[r],m(a&&e(a,r)))){var c=o(s,i,r);a[r]=function(){return c(this,arguments)},I(a[r],s)}return s}function z(e,t,n){var r=null;function o(e){var t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},r.apply(t.target,t.args),e}r=j(e,t,(function(e){return function(t,r){var a=n(t,r);return a.cbIdx>=0&&"function"==typeof r[a.cbIdx]?p(a.name,r[a.cbIdx],a,o):e.apply(t,r)}}))}function I(e,t){e[v("OriginalDelegate")]=t}var R=!1,M=!1;function N(){if(R)return M;R=!0;try{var e=_.navigator.userAgent;-1===e.indexOf("MSIE ")&&-1===e.indexOf("Trident/")&&-1===e.indexOf("Edge/")||(M=!0)}catch(e){}return M}Zone.__load_patch("ZoneAwarePromise",(function(e,t,n){var r=Object.getOwnPropertyDescriptor,o=Object.defineProperty,a=n.symbol,i=[],s=!1!==e[a("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],c=a("Promise"),u=a("then"),l="__creationTrace__";n.onUnhandledError=function(e){if(n.showUncaughtError()){var t=e&&e.rejection;t?console.error("Unhandled Promise rejection:",t instanceof Error?t.message:t,"; Zone:",e.zone.name,"; Task:",e.task&&e.task.source,"; Value:",t,t instanceof Error?t.stack:void 0):console.error(e)}},n.microtaskDrainDone=function(){for(var e=function(){var e=i.shift();try{e.zone.runGuarded((function(){if(e.throwOriginal)throw e.rejection;throw e}))}catch(e){!function r(e){n.onUnhandledError(e);try{var r=t[f];"function"==typeof r&&r.call(this,e)}catch(e){}}(e)}};i.length;)e()};var f=a("unhandledPromiseRejectionHandler");function h(e){return e&&e.then}function p(e){return e}function v(e){return N.reject(e)}var d=a("state"),_=a("value"),g=a("finally"),y=a("parentPromiseValue"),k=a("parentPromiseState"),m="Promise.then",T=null,b=!0,E=!1,w=0;function Z(e,t){return function(n){try{O(e,t,n)}catch(t){O(e,!1,t)}}}var S=function(){var e=!1;return function t(n){return function(){e||(e=!0,n.apply(null,arguments))}}},P="Promise resolved with itself",D=a("currentTaskTrace");function O(e,r,a){var c=S();if(e===a)throw new TypeError(P);if(e[d]===T){var u=null;try{"object"!=typeof a&&"function"!=typeof a||(u=a&&a.then)}catch(t){return c((function(){O(e,!1,t)}))(),e}if(r!==E&&a instanceof N&&a.hasOwnProperty(d)&&a.hasOwnProperty(_)&&a[d]!==T)z(a),O(e,a[d],a[_]);else if(r!==E&&"function"==typeof u)try{u.call(a,c(Z(e,r)),c(Z(e,!1)))}catch(t){c((function(){O(e,!1,t)}))()}else{e[d]=r;var f=e[_];if(e[_]=a,e[g]===g&&r===b&&(e[d]=e[k],e[_]=e[y]),r===E&&a instanceof Error){var h=t.currentTask&&t.currentTask.data&&t.currentTask.data[l];h&&o(a,D,{configurable:!0,enumerable:!1,writable:!0,value:h})}for(var p=0;p<f.length;)I(e,f[p++],f[p++],f[p++],f[p++]);if(0==f.length&&r==E){e[d]=w;var v=a;try{throw new Error("Uncaught (in promise): "+function e(t){return t&&t.toString===Object.prototype.toString?(t.constructor&&t.constructor.name||"")+": "+JSON.stringify(t):t?t.toString():Object.prototype.toString.call(t)}(a)+(a&&a.stack?"\n"+a.stack:""))}catch(e){v=e}s&&(v.throwOriginal=!0),v.rejection=a,v.promise=e,v.zone=t.current,v.task=t.currentTask,i.push(v),n.scheduleMicroTask()}}}return e}var C=a("rejectionHandledHandler");function z(e){if(e[d]===w){try{var n=t[C];n&&"function"==typeof n&&n.call(this,{rejection:e[_],promise:e})}catch(e){}e[d]=E;for(var r=0;r<i.length;r++)e===i[r].promise&&i.splice(r,1)}}function I(e,t,n,r,o){z(e);var a=e[d],i=a?"function"==typeof r?r:p:"function"==typeof o?o:v;t.scheduleMicroTask(m,(function(){try{var r=e[_],o=!!n&&g===n[g];o&&(n[y]=r,n[k]=a);var s=t.run(i,void 0,o&&i!==v&&i!==p?[]:[r]);O(n,!0,s)}catch(e){O(n,!1,e)}}),n)}var R=function(){},M=e.AggregateError,N=function(){function e(t){var n=this;if(!(n instanceof e))throw new Error("Must be an instanceof Promise.");n[d]=T,n[_]=[];try{var r=S();t&&t(r(Z(n,b)),r(Z(n,E)))}catch(e){O(n,!1,e)}}return e.toString=function(){return"function ZoneAwarePromise() { [native code] }"},e.resolve=function(t){return t instanceof e?t:O(new this(null),b,t)},e.reject=function(e){return O(new this(null),E,e)},e.withResolvers=function(){var t={};return t.promise=new e((function(e,n){t.resolve=e,t.reject=n})),t},e.any=function(t){if(!t||"function"!=typeof t[Symbol.iterator])return Promise.reject(new M([],"All promises were rejected"));var n=[],r=0;try{for(var o=0,a=t;o<a.length;o++)r++,n.push(e.resolve(a[o]))}catch(e){return Promise.reject(new M([],"All promises were rejected"))}if(0===r)return Promise.reject(new M([],"All promises were rejected"));var i=!1,s=[];return new e((function(e,t){for(var o=0;o<n.length;o++)n[o].then((function(t){i||(i=!0,e(t))}),(function(e){s.push(e),0==--r&&(i=!0,t(new M(s,"All promises were rejected")))}))}))},e.race=function(e){var t,n,r=new this((function(e,r){t=e,n=r}));function o(e){t(e)}function a(e){n(e)}for(var i=0,s=e;i<s.length;i++){var c=s[i];h(c)||(c=this.resolve(c)),c.then(o,a)}return r},e.all=function(t){return e.allWithCallback(t)},e.allSettled=function(t){return(this&&this.prototype instanceof e?this:e).allWithCallback(t,{thenCallback:function(e){return{status:"fulfilled",value:e}},errorCallback:function(e){return{status:"rejected",reason:e}}})},e.allWithCallback=function(e,t){for(var n,r,o=new this((function(e,t){n=e,r=t})),a=2,i=0,s=[],c=function(e){h(e)||(e=u.resolve(e));var o=i;try{e.then((function(e){s[o]=t?t.thenCallback(e):e,0==--a&&n(s)}),(function(e){t?(s[o]=t.errorCallback(e),0==--a&&n(s)):r(e)}))}catch(e){r(e)}a++,i++},u=this,l=0,f=e;l<f.length;l++)c(f[l]);return 0==(a-=2)&&n(s),o},Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"Promise"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.then=function(n,r){var o,a=null===(o=this.constructor)||void 0===o?void 0:o[Symbol.species];a&&"function"==typeof a||(a=this.constructor||e);var i=new a(R),s=t.current;return this[d]==T?this[_].push(s,i,n,r):I(this,s,i,n,r),i},e.prototype.catch=function(e){return this.then(null,e)},e.prototype.finally=function(n){var r,o=null===(r=this.constructor)||void 0===r?void 0:r[Symbol.species];o&&"function"==typeof o||(o=e);var a=new o(R);a[g]=g;var i=t.current;return this[d]==T?this[_].push(i,a,n,n):I(this,i,a,n,n),a},e}();N.resolve=N.resolve,N.reject=N.reject,N.race=N.race,N.all=N.all;var A=e[c]=e.Promise;e.Promise=N;var L=a("thenPatched");function H(e){var t=e.prototype,n=r(t,"then");if(!n||!1!==n.writable&&n.configurable){var o=t.then;t[u]=o,e.prototype.then=function(e,t){var n=this;return new N((function(e,t){o.call(n,e,t)})).then(e,t)},e[L]=!0}}return n.patchThen=H,A&&(H(A),j(e,"fetch",(function(e){return function t(e){return function(t,n){var r=e.apply(t,n);if(r instanceof N)return r;var o=r.constructor;return o[L]||H(o),r}}(e)}))),Promise[t.__symbol__("uncaughtPromiseErrors")]=i,N})),Zone.__load_patch("toString",(function(e){var t=Function.prototype.toString,n=v("OriginalDelegate"),r=v("Promise"),o=v("Error"),a=function a(){if("function"==typeof this){var i=this[n];if(i)return"function"==typeof i?t.call(i):Object.prototype.toString.call(i);if(this===Promise){var s=e[r];if(s)return t.call(s)}if(this===Error){var c=e[o];if(c)return t.call(c)}}return t.call(this)};a[n]=t,Function.prototype.toString=a;var i=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":i.call(this)}}));var A=!1;if("undefined"!=typeof window)try{var L=Object.defineProperty({},"passive",{get:function(){A=!0}});window.addEventListener("test",L,L),window.removeEventListener("test",L,L)}catch(e){A=!1}var H={useG:!0},x={},F={},q=new RegExp("^"+f+"(\\w+)(true|false)$"),G=v("propagationStopped");function W(e,t){var n=(t?t(e):e)+l,r=(t?t(e):e)+u,o=f+n,a=f+r;x[e]={},x[e][l]=o,x[e][u]=a}function B(e,t,r,o){var s=o&&o.add||a,c=o&&o.rm||i,h=o&&o.listeners||"eventListeners",p=o&&o.rmAll||"removeAllListeners",d=v(s),_="."+s+":",g="prependListener",y="."+g+":",k=function(e,t,n){if(!e.isRemoved){var r,o=e.callback;"object"==typeof o&&o.handleEvent&&(e.callback=function(e){return o.handleEvent(e)},e.originalDelegate=o);try{e.invoke(e,t,[n])}catch(e){r=e}var a=e.options;return a&&"object"==typeof a&&a.once&&t[c].call(t,n.type,e.originalDelegate?e.originalDelegate:e.callback,a),r}};function m(n,r,o){if(r=r||e.event){var a=n||r.target||e,i=a[x[r.type][o?u:l]];if(i){var s=[];if(1===i.length)(h=k(i[0],a,r))&&s.push(h);else for(var c=i.slice(),f=0;f<c.length&&(!r||!0!==r[G]);f++){var h;(h=k(c[f],a,r))&&s.push(h)}if(1===s.length)throw s[0];var p=function(e){var n=s[e];t.nativeScheduleMicroTask((function(){throw n}))};for(f=0;f<s.length;f++)p(f)}}}var T=function(e){return m(this,e,!1)},E=function(e){return m(this,e,!0)};function w(t,r){if(!t)return!1;var o=!0;r&&void 0!==r.useG&&(o=r.useG);var a=r&&r.vh,i=!0;r&&void 0!==r.chkDup&&(i=r.chkDup);var k=!1;r&&void 0!==r.rt&&(k=r.rt);for(var m=t;m&&!m.hasOwnProperty(s);)m=n(m);if(!m&&t[s]&&(m=t),!m)return!1;if(m[d])return!1;var w,Z=r&&r.eventNameToString,S={},P=m[d]=m[s],D=m[v(c)]=m[c],O=m[v(h)]=m[h],C=m[v(p)]=m[p];r&&r.prepend&&(w=m[v(r.prepend)]=m[r.prepend]);var j=o?function(e){if(!S.isExisting)return P.call(S.target,S.eventName,S.capture?E:T,S.options)}:function(e){return P.call(S.target,S.eventName,e.invoke,S.options)},z=o?function(e){if(!e.isRemoved){var t=x[e.eventName],n=void 0;t&&(n=t[e.capture?u:l]);var r=n&&e.target[n];if(r)for(var o=0;o<r.length;o++)if(r[o]===e){r.splice(o,1),e.isRemoved=!0,0===r.length&&(e.allRemoved=!0,e.target[n]=null);break}}if(e.allRemoved)return D.call(e.target,e.eventName,e.capture?E:T,e.options)}:function(e){return D.call(e.target,e.eventName,e.invoke,e.options)},R=r&&r.diff?r.diff:function(e,t){var n=typeof t;return"function"===n&&e.callback===t||"object"===n&&e.originalDelegate===t},M=Zone[v("UNPATCHED_EVENTS")],N=e[v("PASSIVE_EVENTS")],L=function(t,n,s,c,f,h){return void 0===f&&(f=!1),void 0===h&&(h=!1),function(){var p=this||e,v=arguments[0];r&&r.transferEventName&&(v=r.transferEventName(v));var d=arguments[1];if(!d)return t.apply(this,arguments);if(b&&"uncaughtException"===v)return t.apply(this,arguments);var _=!1;if("function"!=typeof d){if(!d.handleEvent)return t.apply(this,arguments);_=!0}if(!a||a(t,d,p,arguments)){var g=A&&!!N&&-1!==N.indexOf(v),y=function e(t,n){return!A&&"object"==typeof t&&t?!!t.capture:A&&n?"boolean"==typeof t?{capture:t,passive:!0}:t?"object"==typeof t&&!1!==t.passive?__assign(__assign({},t),{passive:!0}):t:{passive:!0}:t}(arguments[2],g),k=y&&"object"==typeof y&&y.signal&&"object"==typeof y.signal?y.signal:void 0;if(!(null==k?void 0:k.aborted)){if(M)for(var m=0;m<M.length;m++)if(v===M[m])return g?t.call(p,v,d,y):t.apply(this,arguments);var T=!!y&&("boolean"==typeof y||y.capture),E=!(!y||"object"!=typeof y)&&y.once,w=Zone.current,P=x[v];P||(W(v,Z),P=x[v]);var D,O=P[T?u:l],C=p[O],j=!1;if(C){if(j=!0,i)for(m=0;m<C.length;m++)if(R(C[m],d))return}else C=p[O]=[];var z=p.constructor.name,I=F[z];I&&(D=I[v]),D||(D=z+n+(Z?Z(v):v)),S.options=y,E&&(S.options.once=!1),S.target=p,S.capture=T,S.eventName=v,S.isExisting=j;var L=o?H:void 0;L&&(L.taskData=S),k&&(S.options.signal=void 0);var q=w.scheduleEventTask(D,d,L,s,c);return k&&(S.options.signal=k,t.call(k,"abort",(function(){q.zone.cancelTask(q)}),{once:!0})),S.target=null,L&&(L.taskData=null),E&&(y.once=!0),(A||"boolean"!=typeof q.options)&&(q.options=y),q.target=p,q.capture=T,q.eventName=v,_&&(q.originalDelegate=d),h?C.unshift(q):C.push(q),f?p:void 0}}}};return m[s]=L(P,_,j,z,k),w&&(m[g]=L(w,y,(function(e){return w.call(S.target,S.eventName,e.invoke,S.options)}),z,k,!0)),m[c]=function(){var t=this||e,n=arguments[0];r&&r.transferEventName&&(n=r.transferEventName(n));var o=arguments[2],i=!!o&&("boolean"==typeof o||o.capture),s=arguments[1];if(!s)return D.apply(this,arguments);if(!a||a(D,s,t,arguments)){var c,h=x[n];h&&(c=h[i?u:l]);var p=c&&t[c];if(p)for(var v=0;v<p.length;v++){var d=p[v];if(R(d,s))return p.splice(v,1),d.isRemoved=!0,0===p.length&&(d.allRemoved=!0,t[c]=null,"string"==typeof n&&(t[f+"ON_PROPERTY"+n]=null)),d.zone.cancelTask(d),k?t:void 0}return D.apply(this,arguments)}},m[h]=function(){var t=this||e,n=arguments[0];r&&r.transferEventName&&(n=r.transferEventName(n));for(var o=[],a=U(t,Z?Z(n):n),i=0;i<a.length;i++){var s=a[i];o.push(s.originalDelegate?s.originalDelegate:s.callback)}return o},m[p]=function(){var t=this||e,n=arguments[0];if(n){r&&r.transferEventName&&(n=r.transferEventName(n));var o=x[n];if(o){var a=t[o[l]],i=t[o[u]];if(a){var s=a.slice();for(v=0;v<s.length;v++)this[c].call(this,n,(f=s[v]).originalDelegate?f.originalDelegate:f.callback,f.options)}if(i)for(s=i.slice(),v=0;v<s.length;v++){var f;this[c].call(this,n,(f=s[v]).originalDelegate?f.originalDelegate:f.callback,f.options)}}}else{for(var h=Object.keys(t),v=0;v<h.length;v++){var d=q.exec(h[v]),_=d&&d[1];_&&"removeListener"!==_&&this[p].call(this,_)}this[p].call(this,"removeListener")}if(k)return this},I(m[s],P),I(m[c],D),C&&I(m[p],C),O&&I(m[h],O),!0}for(var Z=[],S=0;S<r.length;S++)Z[S]=w(r[S],o);return Z}function U(e,t){if(!t){var n=[];for(var r in e){var o=q.exec(r),a=o&&o[1];if(a&&(!t||a===t)){var i=e[r];if(i)for(var s=0;s<i.length;s++)n.push(i[s])}}return n}var c=x[t];c||(W(t),c=x[t]);var f=e[c[l]],h=e[c[u]];return f?h?f.concat(h):f.slice():h?h.slice():[]}function V(e,t){var n=e.Event;n&&n.prototype&&t.patchMethod(n.prototype,"stopImmediatePropagation",(function(e){return function(t,n){t[G]=!0,e&&e.apply(t,n)}}))}function X(e,t,n,r,o){var a=Zone.__symbol__(r);if(!t[a]){var i=t[a]=t[r];t[r]=function(a,s,c){return s&&s.prototype&&o.forEach((function(t){var o="".concat(n,".").concat(r,"::")+t,a=s.prototype;try{if(a.hasOwnProperty(t)){var i=e.ObjectGetOwnPropertyDescriptor(a,t);i&&i.value?(i.value=e.wrapWithCurrentZone(i.value,o),e._redefineProperty(s.prototype,t,i)):a[t]&&(a[t]=e.wrapWithCurrentZone(a[t],o))}else a[t]&&(a[t]=e.wrapWithCurrentZone(a[t],o))}catch(e){}})),i.call(t,a,s,c)},e.attachOriginToPatched(t[r],i)}}function Y(e,t,n){if(!n||0===n.length)return t;var r=n.filter((function(t){return t.target===e}));if(!r||0===r.length)return t;var o=r[0].ignoreProperties;return t.filter((function(e){return-1===o.indexOf(e)}))}function J(e,t,n,r){e&&D(e,Y(e,t,n),r)}function K(e){return Object.getOwnPropertyNames(e).filter((function(e){return e.startsWith("on")&&e.length>2})).map((function(e){return e.substring(2)}))}function $(e,t){if((!b||w)&&!Zone[e.symbol("patchEvents")]){var r=t.__Zone_ignore_on_properties,o=[];if(E){var a=window;o=o.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);var i=function e(){try{var e=_.navigator.userAgent;if(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/"))return!0}catch(e){}return!1}()?[{target:a,ignoreProperties:["error"]}]:[];J(a,K(a),r?r.concat(i):r,n(a))}o=o.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(var s=0;s<o.length;s++){var c=t[o[s]];c&&c.prototype&&J(c.prototype,K(c.prototype),r)}}}function Q(e,t){t.patchMethod(e,"queueMicrotask",(function(e){return function(e,t){Zone.current.scheduleMicroTask("queueMicrotask",t[0])}}))}Zone.__load_patch("util",(function(n,s,c){var p=K(n);c.patchOnProperties=D,c.patchMethod=j,c.bindArguments=k,c.patchMacroTask=z;var v=s.__symbol__("BLACK_LISTED_EVENTS"),d=s.__symbol__("UNPATCHED_EVENTS");n[d]&&(n[v]=n[d]),n[v]&&(s[v]=s[d]=n[v]),c.patchEventPrototype=V,c.patchEventTarget=B,c.isIEOrEdge=N,c.ObjectDefineProperty=t,c.ObjectGetOwnPropertyDescriptor=e,c.ObjectCreate=r,c.ArraySlice=o,c.patchClass=C,c.wrapWithCurrentZone=h,c.filterProperties=Y,c.attachOriginToPatched=I,c._redefineProperty=Object.defineProperty,c.patchCallbacks=X,c.getGlobalObjects=function(){return{globalSources:F,zoneSymbolEventNames:x,eventNames:p,isBrowser:E,isMix:w,isNode:b,TRUE_STR:u,FALSE_STR:l,ZONE_SYMBOL_PREFIX:f,ADD_EVENT_LISTENER_STR:a,REMOVE_EVENT_LISTENER_STR:i}}}));var ee=v("zoneTask");function te(e,t,n,r){var o=null,a=null;n+=r;var i={};function s(t){var n=t.data;return n.args[0]=function(){return t.invoke.apply(this,arguments)},n.handleId=o.apply(e,n.args),t}function c(t){return a.call(e,t.data.handleId)}o=j(e,t+=r,(function(n){return function(o,a){if("function"==typeof a[0]){var u={isPeriodic:"Interval"===r,delay:"Timeout"===r||"Interval"===r?a[1]||0:void 0,args:a},l=a[0];a[0]=function e(){try{return l.apply(this,arguments)}finally{u.isPeriodic||("number"==typeof u.handleId?delete i[u.handleId]:u.handleId&&(u.handleId[ee]=null))}};var f=p(t,a[0],u,s,c);if(!f)return f;var h=f.data.handleId;return"number"==typeof h?i[h]=f:h&&(h[ee]=f),h&&h.ref&&h.unref&&"function"==typeof h.ref&&"function"==typeof h.unref&&(f.ref=h.ref.bind(h),f.unref=h.unref.bind(h)),"number"==typeof h||h?h:f}return n.apply(e,a)}})),a=j(e,n,(function(t){return function(n,r){var o,a=r[0];"number"==typeof a?o=i[a]:(o=a&&a[ee])||(o=a),o&&"string"==typeof o.type?"notScheduled"!==o.state&&(o.cancelFn&&o.data.isPeriodic||0===o.runCount)&&("number"==typeof a?delete i[a]:a&&(a[ee]=null),o.zone.cancelTask(o)):t.apply(e,r)}}))}function ne(e,t){if(!Zone[t.symbol("patchEventTarget")]){for(var n=t.getGlobalObjects(),r=n.eventNames,o=n.zoneSymbolEventNames,a=n.TRUE_STR,i=n.FALSE_STR,s=n.ZONE_SYMBOL_PREFIX,c=0;c<r.length;c++){var u=r[c],l=s+(u+i),f=s+(u+a);o[u]={},o[u][i]=l,o[u][a]=f}var h=e.EventTarget;if(h&&h.prototype)return t.patchEventTarget(e,t,[h&&h.prototype]),!0}}Zone.__load_patch("legacy",(function(e){var t=e[Zone.__symbol__("legacyPatch")];t&&t()})),Zone.__load_patch("timers",(function(e){var t="set",n="clear";te(e,t,n,"Timeout"),te(e,t,n,"Interval"),te(e,t,n,"Immediate")})),Zone.__load_patch("requestAnimationFrame",(function(e){te(e,"request","cancel","AnimationFrame"),te(e,"mozRequest","mozCancel","AnimationFrame"),te(e,"webkitRequest","webkitCancel","AnimationFrame")})),Zone.__load_patch("blocking",(function(e,t){for(var n=["alert","prompt","confirm"],r=0;r<n.length;r++)j(e,n[r],(function(n,r,o){return function(r,a){return t.current.run(n,e,a,o)}}))})),Zone.__load_patch("EventTarget",(function(e,t,n){!function r(e,t){t.patchEventPrototype(e,t)}(e,n),ne(e,n);var o=e.XMLHttpRequestEventTarget;o&&o.prototype&&n.patchEventTarget(e,n,[o.prototype])})),Zone.__load_patch("MutationObserver",(function(e,t,n){C("MutationObserver"),C("WebKitMutationObserver")})),Zone.__load_patch("IntersectionObserver",(function(e,t,n){C("IntersectionObserver")})),Zone.__load_patch("FileReader",(function(e,t,n){C("FileReader")})),Zone.__load_patch("on_property",(function(e,t,n){$(n,e)})),Zone.__load_patch("customElements",(function(e,t,n){!function r(e,t){var n=t.getGlobalObjects();(n.isBrowser||n.isMix)&&e.customElements&&"customElements"in e&&t.patchCallbacks(t,e.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback","formAssociatedCallback","formDisabledCallback","formResetCallback","formStateRestoreCallback"])}(e,n)})),Zone.__load_patch("XHR",(function(e,t){!function n(e){var n=e.XMLHttpRequest;if(n){var f=n.prototype,h=f[s],d=f[c];if(!h){var _=e.XMLHttpRequestEventTarget;if(_){var g=_.prototype;h=g[s],d=g[c]}}var y="readystatechange",k="scheduled",m=j(f,"open",(function(){return function(e,t){return e[o]=0==t[2],e[u]=t[1],m.apply(e,t)}})),T=v("fetchTaskAborting"),b=v("fetchTaskScheduling"),E=j(f,"send",(function(){return function(e,n){if(!0===t.current[b])return E.apply(e,n);if(e[o])return E.apply(e,n);var r={target:e,url:e[u],isPeriodic:!1,args:n,aborted:!1},a=p("XMLHttpRequest.send",S,r,Z,P);e&&!0===e[l]&&!r.aborted&&a.state===k&&a.invoke()}})),w=j(f,"abort",(function(){return function(e,n){var o=function a(e){return e[r]}(e);if(o&&"string"==typeof o.type){if(null==o.cancelFn||o.data&&o.data.aborted)return;o.zone.cancelTask(o)}else if(!0===t.current[T])return w.apply(e,n)}}))}function Z(e){var n=e.data,o=n.target;o[i]=!1,o[l]=!1;var u=o[a];h||(h=o[s],d=o[c]),u&&d.call(o,y,u);var f=o[a]=function(){if(o.readyState===o.DONE)if(!n.aborted&&o[i]&&e.state===k){var r=o[t.__symbol__("loadfalse")];if(0!==o.status&&r&&r.length>0){var a=e.invoke;e.invoke=function(){for(var r=o[t.__symbol__("loadfalse")],i=0;i<r.length;i++)r[i]===e&&r.splice(i,1);n.aborted||e.state!==k||a.call(e)},r.push(e)}else e.invoke()}else n.aborted||!1!==o[i]||(o[l]=!0)};return h.call(o,y,f),o[r]||(o[r]=e),E.apply(o,n.args),o[i]=!0,e}function S(){}function P(e){var t=e.data;return t.aborted=!0,w.apply(t.target,t.args)}}(e);var r=v("xhrTask"),o=v("xhrSync"),a=v("xhrListener"),i=v("xhrScheduled"),u=v("xhrURL"),l=v("xhrErrorBeforeScheduled")})),Zone.__load_patch("geolocation",(function(t){t.navigator&&t.navigator.geolocation&&function n(t,r){for(var o=t.constructor.name,a=function(n){var a=r[n],i=t[a];if(i){if(!m(e(t,a)))return"continue";t[a]=function(e){var t=function(){return e.apply(this,k(arguments,o+"."+a))};return I(t,e),t}(i)}},i=0;i<r.length;i++)a(i)}(t.navigator.geolocation,["getCurrentPosition","watchPosition"])})),Zone.__load_patch("PromiseRejectionEvent",(function(e,t){function n(t){return function(n){U(e,t).forEach((function(r){var o=e.PromiseRejectionEvent;if(o){var a=new o(t,{promise:n.promise,reason:n.rejection});r.invoke(a)}}))}}e.PromiseRejectionEvent&&(t[v("unhandledPromiseRejectionHandler")]=n("unhandledrejection"),t[v("rejectionHandledHandler")]=n("rejectionhandled"))})),Zone.__load_patch("queueMicrotask",(function(e,t,n){Q(e,n)}))}));
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){var e=globalThis;function t(t){return(e.__Zone_symbol_prefix||"__zone_symbol__")+t}function n(){var n,r=e.performance;function o(e){r&&r.mark&&r.mark(e)}function a(e,t){r&&r.measure&&r.measure(e,t)}o("Zone");var i=function(){function r(e,t){this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new u(this,this._parent&&this._parent._zoneDelegate,t)}return r.assertZonePatched=function(){if(e.Promise!==O.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")},Object.defineProperty(r,"root",{get:function(){for(var e=n.current;e.parent;)e=e.parent;return e},enumerable:!1,configurable:!0}),Object.defineProperty(r,"current",{get:function(){return j.zone},enumerable:!1,configurable:!0}),Object.defineProperty(r,"currentTask",{get:function(){return z},enumerable:!1,configurable:!0}),r.__load_patch=function(r,i,s){if(void 0===s&&(s=!1),O.hasOwnProperty(r)){var c=!0===e[t("forceDuplicateZoneCheck")];if(!s&&c)throw Error("Already loaded patch: "+r)}else if(!e["__Zone_disable_"+r]){var u="Zone:"+r;o(u),O[r]=i(e,n,C),a(u,u)}},Object.defineProperty(r.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),r.prototype.get=function(e){var t=this.getZoneWith(e);if(t)return t._properties[e]},r.prototype.getZoneWith=function(e){for(var t=this;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null},r.prototype.fork=function(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)},r.prototype.wrap=function(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);var n=this._zoneDelegate.intercept(this,e,t),r=this;return function(){return r.runGuarded(n,this,arguments,t)}},r.prototype.run=function(e,t,n,r){j={parent:j,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{j=j.parent}},r.prototype.runGuarded=function(e,t,n,r){void 0===t&&(t=null),j={parent:j,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{j=j.parent}},r.prototype.runTask=function(e,t,n){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||y).name+"; Execution: "+this.name+")");if(e.state!==T||e.type!==D&&e.type!==Z){var r=e.state!=E;r&&e._transitionTo(E,b),e.runCount++;var o=z;z=e,j={parent:j,zone:this};try{e.type==Z&&e.data&&!e.data.isPeriodic&&(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,e,t,n)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{e.state!==T&&e.state!==S&&(e.type==D||e.data&&e.data.isPeriodic?r&&e._transitionTo(b,E):(e.runCount=0,this._updateTaskCount(e,-1),r&&e._transitionTo(T,E,T))),j=j.parent,z=o}}},r.prototype.scheduleTask=function(e){if(e.zone&&e.zone!==this)for(var t=this;t;){if(t===e.zone)throw Error("can not reschedule task to ".concat(this.name," which is descendants of the original zone ").concat(e.zone.name));t=t.parent}e._transitionTo(m,T);var n=[];e._zoneDelegates=n,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(t){throw e._transitionTo(S,m,T),this._zoneDelegate.handleError(this,t),t}return e._zoneDelegates===n&&this._updateTaskCount(e,1),e.state==m&&e._transitionTo(b,m),e},r.prototype.scheduleMicroTask=function(e,t,n,r){return this.scheduleTask(new l(P,e,t,n,r,void 0))},r.prototype.scheduleMacroTask=function(e,t,n,r,o){return this.scheduleTask(new l(Z,e,t,n,r,o))},r.prototype.scheduleEventTask=function(e,t,n,r,o){return this.scheduleTask(new l(D,e,t,n,r,o))},r.prototype.cancelTask=function(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||y).name+"; Execution: "+this.name+")");if(e.state===b||e.state===E){e._transitionTo(w,b,E);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(S,w),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(T,w),e.runCount=0,e}},r.prototype._updateTaskCount=function(e,t){var n=e._zoneDelegates;-1==t&&(e._zoneDelegates=null);for(var r=0;r<n.length;r++)n[r]._updateTaskCount(e.type,t)},r}();(n=i).__symbol__=t;var s,c={name:"",onHasTask:function(e,t,n,r){return e.hasTask(n,r)},onScheduleTask:function(e,t,n,r){return e.scheduleTask(n,r)},onInvokeTask:function(e,t,n,r,o,a){return e.invokeTask(n,r,o,a)},onCancelTask:function(e,t,n,r){return e.cancelTask(n,r)}},u=function(){function e(e,t,n){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this._zone=e,this._parentDelegate=t,this._forkZS=n&&(n&&n.onFork?n:t._forkZS),this._forkDlgt=n&&(n.onFork?t:t._forkDlgt),this._forkCurrZone=n&&(n.onFork?this._zone:t._forkCurrZone),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this._zone:t._interceptCurrZone),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this._zone:t._invokeCurrZone),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this._zone:t._handleErrorCurrZone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this._zone:t._scheduleTaskCurrZone),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this._zone:t._invokeTaskCurrZone),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this._zone:t._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;var r=n&&n.onHasTask;(r||t&&t._hasTaskZS)&&(this._hasTaskZS=r?n:c,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=this._zone,n.onScheduleTask||(this._scheduleTaskZS=c,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this._zone),n.onInvokeTask||(this._invokeTaskZS=c,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this._zone),n.onCancelTask||(this._cancelTaskZS=c,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this._zone))}return Object.defineProperty(e.prototype,"zone",{get:function(){return this._zone},enumerable:!1,configurable:!0}),e.prototype.fork=function(e,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,t):new i(e,t)},e.prototype.intercept=function(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,e,t,n):t},e.prototype.invoke=function(e,t,n,r,o){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,e,t,n,r,o):t.apply(n,r)},e.prototype.handleError=function(e,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,e,t)},e.prototype.scheduleTask=function(e,t){var n=t;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),(n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,e,t))||(n=t);else if(t.scheduleFn)t.scheduleFn(t);else{if(t.type!=P)throw new Error("Task is missing scheduleFn.");g(t)}return n},e.prototype.invokeTask=function(e,t,n,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,e,t,n,r):t.callback.apply(n,r)},e.prototype.cancelTask=function(e,t){var n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,e,t);else{if(!t.cancelFn)throw Error("Task is not cancelable");n=t.cancelFn(t)}return n},e.prototype.hasTask=function(e,t){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,e,t)}catch(t){this.handleError(e,t)}},e.prototype._updateTaskCount=function(e,t){var n=this._taskCounts,r=n[e],o=n[e]=r+t;if(o<0)throw new Error("More tasks executed then were scheduled.");0!=r&&0!=o||this.hasTask(this._zone,{microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e})},e}(),l=function(){function t(n,r,o,a,i,s){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=n,this.source=r,this.data=a,this.scheduleFn=i,this.cancelFn=s,!o)throw new Error("callback is not defined");this.callback=o;var c=this;this.invoke=n===D&&a&&a.useG?t.invokeTask:function(){return t.invokeTask.call(e,c,this,arguments)}}return t.invokeTask=function(e,t,n){e||(e=this),I++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{1==I&&k(),I--}},Object.defineProperty(t.prototype,"zone",{get:function(){return this._zone},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),t.prototype.cancelScheduleRequest=function(){this._transitionTo(T,m)},t.prototype._transitionTo=function(e,t,n){if(this._state!==t&&this._state!==n)throw new Error("".concat(this.type," '").concat(this.source,"': can not transition to '").concat(e,"', expecting state '").concat(t,"'").concat(n?" or '"+n+"'":"",", was '").concat(this._state,"'."));this._state=e,e==T&&(this._zoneDelegates=null)},t.prototype.toString=function(){return this.data&&void 0!==this.data.handleId?this.data.handleId.toString():Object.prototype.toString.call(this)},t.prototype.toJSON=function(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}},t}(),f=t("setTimeout"),h=t("Promise"),p=t("then"),v=[],d=!1;function _(t){if(s||e[h]&&(s=e[h].resolve(0)),s){var n=s[p];n||(n=s.then),n.call(s,t)}else e[f](t,0)}function g(e){0===I&&0===v.length&&_(k),e&&v.push(e)}function k(){if(!d){for(d=!0;v.length;){var e=v;v=[];for(var t=0;t<e.length;t++){var n=e[t];try{n.zone.runTask(n,null,null)}catch(e){C.onUnhandledError(e)}}}C.microtaskDrainDone(),d=!1}}var y={name:"NO ZONE"},T="notScheduled",m="scheduling",b="scheduled",E="running",w="canceling",S="unknown",P="microTask",Z="macroTask",D="eventTask",O={},C={symbol:t,currentZoneFrame:function(){return j},onUnhandledError:R,microtaskDrainDone:R,scheduleMicroTask:g,showUncaughtError:function(){return!i[t("ignoreConsoleErrorUncaughtError")]},patchEventTarget:function(){return[]},patchOnProperties:R,patchMethod:function(){return R},bindArguments:function(){return[]},patchThen:function(){return R},patchMacroTask:function(){return R},patchEventPrototype:function(){return R},isIEOrEdge:function(){return!1},getGlobalObjects:function(){},ObjectDefineProperty:function(){return R},ObjectGetOwnPropertyDescriptor:function(){},ObjectCreate:function(){},ArraySlice:function(){return[]},patchClass:function(){return R},wrapWithCurrentZone:function(){return R},filterProperties:function(){return[]},attachOriginToPatched:function(){return R},_redefineProperty:function(){return R},patchCallbacks:function(){return R},nativeScheduleMicroTask:_},j={parent:null,zone:new i(null,null)},z=null,I=0;function R(){}return a("Zone","Zone"),i}var r=Object.getOwnPropertyDescriptor,o=Object.defineProperty,a=Object.getPrototypeOf,i=Object.create,s=Array.prototype.slice,c="addEventListener",u="removeEventListener",l=t(c),f=t(u),h="true",p="false",v=t("");function d(e,t){return Zone.current.wrap(e,t)}function _(e,t,n,r,o){return Zone.current.scheduleMacroTask(e,t,n,r,o)}var g=t,k="undefined"!=typeof window,y=k?window:void 0,T=k&&y||globalThis,m="removeAttribute";function b(e,t){for(var n=e.length-1;n>=0;n--)"function"==typeof e[n]&&(e[n]=d(e[n],t+"_"+n));return e}function E(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&void 0===e.set)}var w="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,S=!("nw"in T)&&void 0!==T.process&&"[object process]"==={}.toString.call(T.process),P=!S&&!w&&!(!k||!y.HTMLElement),Z=void 0!==T.process&&"[object process]"==={}.toString.call(T.process)&&!w&&!(!k||!y.HTMLElement),D={},O=function(e){if(e=e||T.event){var t=D[e.type];t||(t=D[e.type]=g("ON_PROPERTY"+e.type));var n,r=this||e.target||T,o=r[t];return P&&r===y&&"error"===e.type?!0===(n=o&&o.call(this,e.message,e.filename,e.lineno,e.colno,e.error))&&e.preventDefault():null==(n=o&&o.apply(this,arguments))||n||e.preventDefault(),n}};function C(e,t,n){var a=r(e,t);if(!a&&n&&r(n,t)&&(a={enumerable:!0,configurable:!0}),a&&a.configurable){var i=g("on"+t+"patched");if(!e.hasOwnProperty(i)||!e[i]){delete a.writable,delete a.value;var s=a.get,c=a.set,u=t.slice(2),l=D[u];l||(l=D[u]=g("ON_PROPERTY"+u)),a.set=function(t){var n=this;n||e!==T||(n=T),n&&("function"==typeof n[l]&&n.removeEventListener(u,O),c&&c.call(n,null),n[l]=t,"function"==typeof t&&n.addEventListener(u,O,!1))},a.get=function(){var n=this;if(n||e!==T||(n=T),!n)return null;var r=n[l];if(r)return r;if(s){var o=s.call(this);if(o)return a.set.call(this,o),"function"==typeof n[m]&&n.removeAttribute(t),o}return null},o(e,t,a),e[i]=!0}}}function j(e,t,n){if(t)for(var r=0;r<t.length;r++)C(e,"on"+t[r],n);else{var o=[];for(var a in e)"on"==a.slice(0,2)&&o.push(a);for(var i=0;i<o.length;i++)C(e,o[i],n)}}var z=g("originalInstance");function I(e){var t=T[e];if(t){T[g(e)]=t,T[e]=function(){var n=b(arguments,e);switch(n.length){case 0:this[z]=new t;break;case 1:this[z]=new t(n[0]);break;case 2:this[z]=new t(n[0],n[1]);break;case 3:this[z]=new t(n[0],n[1],n[2]);break;case 4:this[z]=new t(n[0],n[1],n[2],n[3]);break;default:throw new Error("Arg list too long.")}},N(T[e],t);var n,r=new t((function(){}));for(n in r)"XMLHttpRequest"===e&&"responseBlob"===n||function(t){"function"==typeof r[t]?T[e].prototype[t]=function(){return this[z][t].apply(this[z],arguments)}:o(T[e].prototype,t,{set:function(n){"function"==typeof n?(this[z][t]=d(n,e+"."+t),N(this[z][t],n)):this[z][t]=n},get:function(){return this[z][t]}})}(n);for(n in t)"prototype"!==n&&t.hasOwnProperty(n)&&(T[e][n]=t[n])}}function R(e,t,n){for(var o=e;o&&!o.hasOwnProperty(t);)o=a(o);!o&&e[t]&&(o=e);var i=g(t),s=null;if(o&&(!(s=o[i])||!o.hasOwnProperty(i))&&(s=o[i]=o[t],E(o&&r(o,t)))){var c=n(s,i,t);o[t]=function(){return c(this,arguments)},N(o[t],s)}return s}function M(e,t,n){var r=null;function o(e){var t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},r.apply(t.target,t.args),e}r=R(e,t,(function(e){return function(t,r){var a=n(t,r);return a.cbIdx>=0&&"function"==typeof r[a.cbIdx]?_(a.name,r[a.cbIdx],a,o):e.apply(t,r)}}))}function N(e,t){e[g("OriginalDelegate")]=t}var A=!1,L=!1;function H(){if(A)return L;A=!0;try{var e=y.navigator.userAgent;-1===e.indexOf("MSIE ")&&-1===e.indexOf("Trident/")&&-1===e.indexOf("Edge/")||(L=!0)}catch(e){}return L}var x=!1;if("undefined"!=typeof window)try{var F=Object.defineProperty({},"passive",{get:function(){x=!0}});window.addEventListener("test",F,F),window.removeEventListener("test",F,F)}catch(e){x=!1}var q={useG:!0},G={},W={},B=new RegExp("^"+v+"(\\w+)(true|false)$"),U=g("propagationStopped");function V(e,t){var n=(t?t(e):e)+p,r=(t?t(e):e)+h,o=v+n,a=v+r;G[e]={},G[e][p]=o,G[e][h]=a}function X(e,t,n,r){var o=r&&r.add||c,i=r&&r.rm||u,s=r&&r.listeners||"eventListeners",l=r&&r.rmAll||"removeAllListeners",f=g(o),d="."+o+":",_="prependListener",k="."+_+":",y=function(e,t,n){if(!e.isRemoved){var r,o=e.callback;"object"==typeof o&&o.handleEvent&&(e.callback=function(e){return o.handleEvent(e)},e.originalDelegate=o);try{e.invoke(e,t,[n])}catch(e){r=e}var a=e.options;return a&&"object"==typeof a&&a.once&&t[i].call(t,n.type,e.originalDelegate?e.originalDelegate:e.callback,a),r}};function T(n,r,o){if(r=r||e.event){var a=n||r.target||e,i=a[G[r.type][o?h:p]];if(i){var s=[];if(1===i.length)(l=y(i[0],a,r))&&s.push(l);else for(var c=i.slice(),u=0;u<c.length&&(!r||!0!==r[U]);u++){var l;(l=y(c[u],a,r))&&s.push(l)}if(1===s.length)throw s[0];var f=function(e){var n=s[e];t.nativeScheduleMicroTask((function(){throw n}))};for(u=0;u<s.length;u++)f(u)}}}var m=function(e){return T(this,e,!1)},b=function(e){return T(this,e,!0)};function E(t,n){if(!t)return!1;var r=!0;n&&void 0!==n.useG&&(r=n.useG);var c=n&&n.vh,u=!0;n&&void 0!==n.chkDup&&(u=n.chkDup);var y=!1;n&&void 0!==n.rt&&(y=n.rt);for(var T=t;T&&!T.hasOwnProperty(o);)T=a(T);if(!T&&t[o]&&(T=t),!T)return!1;if(T[f])return!1;var E,w=n&&n.eventNameToString,P={},Z=T[f]=T[o],D=T[g(i)]=T[i],O=T[g(s)]=T[s],C=T[g(l)]=T[l];n&&n.prepend&&(E=T[g(n.prepend)]=T[n.prepend]);var j=r?function(e){if(!P.isExisting)return Z.call(P.target,P.eventName,P.capture?b:m,P.options)}:function(e){return Z.call(P.target,P.eventName,e.invoke,P.options)},z=r?function(e){if(!e.isRemoved){var t=G[e.eventName],n=void 0;t&&(n=t[e.capture?h:p]);var r=n&&e.target[n];if(r)for(var o=0;o<r.length;o++)if(r[o]===e){r.splice(o,1),e.isRemoved=!0,0===r.length&&(e.allRemoved=!0,e.target[n]=null);break}}if(e.allRemoved)return D.call(e.target,e.eventName,e.capture?b:m,e.options)}:function(e){return D.call(e.target,e.eventName,e.invoke,e.options)},I=n&&n.diff?n.diff:function(e,t){var n=typeof t;return"function"===n&&e.callback===t||"object"===n&&e.originalDelegate===t},R=Zone[g("UNPATCHED_EVENTS")],M=e[g("PASSIVE_EVENTS")],A=function(t,o,a,i,s,l){return void 0===s&&(s=!1),void 0===l&&(l=!1),function(){var f=this||e,v=arguments[0];n&&n.transferEventName&&(v=n.transferEventName(v));var d=arguments[1];if(!d)return t.apply(this,arguments);if(S&&"uncaughtException"===v)return t.apply(this,arguments);var _=!1;if("function"!=typeof d){if(!d.handleEvent)return t.apply(this,arguments);_=!0}if(!c||c(t,d,f,arguments)){var g=x&&!!M&&-1!==M.indexOf(v),k=function e(t,n){return!x&&"object"==typeof t&&t?!!t.capture:x&&n?"boolean"==typeof t?{capture:t,passive:!0}:t?"object"==typeof t&&!1!==t.passive?__assign(__assign({},t),{passive:!0}):t:{passive:!0}:t}(arguments[2],g),y=k&&"object"==typeof k&&k.signal&&"object"==typeof k.signal?k.signal:void 0;if(!(null==y?void 0:y.aborted)){if(R)for(var T=0;T<R.length;T++)if(v===R[T])return g?t.call(f,v,d,k):t.apply(this,arguments);var m=!!k&&("boolean"==typeof k||k.capture),b=!(!k||"object"!=typeof k)&&k.once,E=Zone.current,Z=G[v];Z||(V(v,w),Z=G[v]);var D,O=Z[m?h:p],C=f[O],j=!1;if(C){if(j=!0,u)for(T=0;T<C.length;T++)if(I(C[T],d))return}else C=f[O]=[];var z=f.constructor.name,N=W[z];N&&(D=N[v]),D||(D=z+o+(w?w(v):v)),P.options=k,b&&(P.options.once=!1),P.target=f,P.capture=m,P.eventName=v,P.isExisting=j;var A=r?q:void 0;A&&(A.taskData=P),y&&(P.options.signal=void 0);var L=E.scheduleEventTask(D,d,A,a,i);return y&&(P.options.signal=y,t.call(y,"abort",(function(){L.zone.cancelTask(L)}),{once:!0})),P.target=null,A&&(A.taskData=null),b&&(k.once=!0),(x||"boolean"!=typeof L.options)&&(L.options=k),L.target=f,L.capture=m,L.eventName=v,_&&(L.originalDelegate=d),l?C.unshift(L):C.push(L),s?f:void 0}}}};return T[o]=A(Z,d,j,z,y),E&&(T[_]=A(E,k,(function(e){return E.call(P.target,P.eventName,e.invoke,P.options)}),z,y,!0)),T[i]=function(){var t=this||e,r=arguments[0];n&&n.transferEventName&&(r=n.transferEventName(r));var o=arguments[2],a=!!o&&("boolean"==typeof o||o.capture),i=arguments[1];if(!i)return D.apply(this,arguments);if(!c||c(D,i,t,arguments)){var s,u=G[r];u&&(s=u[a?h:p]);var l=s&&t[s];if(l)for(var f=0;f<l.length;f++){var d=l[f];if(I(d,i))return l.splice(f,1),d.isRemoved=!0,0===l.length&&(d.allRemoved=!0,t[s]=null,a||"string"!=typeof r||(t[v+"ON_PROPERTY"+r]=null)),d.zone.cancelTask(d),y?t:void 0}return D.apply(this,arguments)}},T[s]=function(){var t=this||e,r=arguments[0];n&&n.transferEventName&&(r=n.transferEventName(r));for(var o=[],a=Y(t,w?w(r):r),i=0;i<a.length;i++){var s=a[i];o.push(s.originalDelegate?s.originalDelegate:s.callback)}return o},T[l]=function(){var t=this||e,r=arguments[0];if(r){n&&n.transferEventName&&(r=n.transferEventName(r));var o=G[r];if(o){var a=t[o[p]],s=t[o[h]];if(a){var c=a.slice();for(v=0;v<c.length;v++)this[i].call(this,r,(u=c[v]).originalDelegate?u.originalDelegate:u.callback,u.options)}if(s)for(c=s.slice(),v=0;v<c.length;v++){var u;this[i].call(this,r,(u=c[v]).originalDelegate?u.originalDelegate:u.callback,u.options)}}}else{for(var f=Object.keys(t),v=0;v<f.length;v++){var d=B.exec(f[v]),_=d&&d[1];_&&"removeListener"!==_&&this[l].call(this,_)}this[l].call(this,"removeListener")}if(y)return this},N(T[o],Z),N(T[i],D),C&&N(T[l],C),O&&N(T[s],O),!0}for(var w=[],P=0;P<n.length;P++)w[P]=E(n[P],r);return w}function Y(e,t){if(!t){var n=[];for(var r in e){var o=B.exec(r),a=o&&o[1];if(a&&(!t||a===t)){var i=e[r];if(i)for(var s=0;s<i.length;s++)n.push(i[s])}}return n}var c=G[t];c||(V(t),c=G[t]);var u=e[c[p]],l=e[c[h]];return u?l?u.concat(l):u.slice():l?l.slice():[]}function J(e,t){var n=e.Event;n&&n.prototype&&t.patchMethod(n.prototype,"stopImmediatePropagation",(function(e){return function(t,n){t[U]=!0,e&&e.apply(t,n)}}))}function K(e,t){t.patchMethod(e,"queueMicrotask",(function(e){return function(e,t){Zone.current.scheduleMicroTask("queueMicrotask",t[0])}}))}var $=g("zoneTask");function Q(e,t,n,r){var o=null,a=null;n+=r;var i={};function s(t){var n=t.data;return n.args[0]=function(){return t.invoke.apply(this,arguments)},n.handleId=o.apply(e,n.args),t}function c(t){return a.call(e,t.data.handleId)}o=R(e,t+=r,(function(n){return function(o,a){if("function"==typeof a[0]){var u={isPeriodic:"Interval"===r,delay:"Timeout"===r||"Interval"===r?a[1]||0:void 0,args:a},l=a[0];a[0]=function e(){try{return l.apply(this,arguments)}finally{u.isPeriodic||("number"==typeof u.handleId?delete i[u.handleId]:u.handleId&&(u.handleId[$]=null))}};var f=_(t,a[0],u,s,c);if(!f)return f;var h=f.data.handleId;return"number"==typeof h?i[h]=f:h&&(h[$]=f),h&&h.ref&&h.unref&&"function"==typeof h.ref&&"function"==typeof h.unref&&(f.ref=h.ref.bind(h),f.unref=h.unref.bind(h)),"number"==typeof h||h?h:f}return n.apply(e,a)}})),a=R(e,n,(function(t){return function(n,r){var o,a=r[0];"number"==typeof a?o=i[a]:(o=a&&a[$])||(o=a),o&&"string"==typeof o.type?"notScheduled"!==o.state&&(o.cancelFn&&o.data.isPeriodic||0===o.runCount)&&("number"==typeof a?delete i[a]:a&&(a[$]=null),o.zone.cancelTask(o)):t.apply(e,r)}}))}function ee(e,t){if(!Zone[t.symbol("patchEventTarget")]){for(var n=t.getGlobalObjects(),r=n.eventNames,o=n.zoneSymbolEventNames,a=n.TRUE_STR,i=n.FALSE_STR,s=n.ZONE_SYMBOL_PREFIX,c=0;c<r.length;c++){var u=r[c],l=s+(u+i),f=s+(u+a);o[u]={},o[u][i]=l,o[u][a]=f}var h=e.EventTarget;if(h&&h.prototype)return t.patchEventTarget(e,t,[h&&h.prototype]),!0}}function te(e,t,n){if(!n||0===n.length)return t;var r=n.filter((function(t){return t.target===e}));if(!r||0===r.length)return t;var o=r[0].ignoreProperties;return t.filter((function(e){return-1===o.indexOf(e)}))}function ne(e,t,n,r){e&&j(e,te(e,t,n),r)}function re(e){return Object.getOwnPropertyNames(e).filter((function(e){return e.startsWith("on")&&e.length>2})).map((function(e){return e.substring(2)}))}function oe(e,t){if((!S||Z)&&!Zone[e.symbol("patchEvents")]){var n=t.__Zone_ignore_on_properties,r=[];if(P){var o=window;r=r.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);var i=function e(){try{var e=y.navigator.userAgent;if(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/"))return!0}catch(e){}return!1}()?[{target:o,ignoreProperties:["error"]}]:[];ne(o,re(o),n?n.concat(i):n,a(o))}r=r.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(var s=0;s<r.length;s++){var c=t[r[s]];c&&c.prototype&&ne(c.prototype,re(c.prototype),n)}}}function ae(e,t,n,r,o){var a=Zone.__symbol__(r);if(!t[a]){var i=t[a]=t[r];t[r]=function(a,s,c){return s&&s.prototype&&o.forEach((function(t){var o="".concat(n,".").concat(r,"::")+t,a=s.prototype;try{if(a.hasOwnProperty(t)){var i=e.ObjectGetOwnPropertyDescriptor(a,t);i&&i.value?(i.value=e.wrapWithCurrentZone(i.value,o),e._redefineProperty(s.prototype,t,i)):a[t]&&(a[t]=e.wrapWithCurrentZone(a[t],o))}else a[t]&&(a[t]=e.wrapWithCurrentZone(a[t],o))}catch(e){}})),i.call(t,a,s,c)},e.attachOriginToPatched(t[r],i)}}var ie=function se(){var e,r=globalThis,o=!0===r[t("forceDuplicateZoneCheck")];if(r.Zone&&(o||"function"!=typeof r.Zone.__symbol__))throw new Error("Zone already loaded.");return null!==(e=r.Zone)&&void 0!==e||(r.Zone=n()),r.Zone}();!function ce(e){(function t(e){e.__load_patch("ZoneAwarePromise",(function(e,t,n){var r=Object.getOwnPropertyDescriptor,o=Object.defineProperty,a=n.symbol,i=[],s=!1!==e[a("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],c=a("Promise"),u=a("then"),l="__creationTrace__";n.onUnhandledError=function(e){if(n.showUncaughtError()){var t=e&&e.rejection;t?console.error("Unhandled Promise rejection:",t instanceof Error?t.message:t,"; Zone:",e.zone.name,"; Task:",e.task&&e.task.source,"; Value:",t,t instanceof Error?t.stack:void 0):console.error(e)}},n.microtaskDrainDone=function(){for(var e=function(){var e=i.shift();try{e.zone.runGuarded((function(){if(e.throwOriginal)throw e.rejection;throw e}))}catch(e){!function r(e){n.onUnhandledError(e);try{var r=t[f];"function"==typeof r&&r.call(this,e)}catch(e){}}(e)}};i.length;)e()};var f=a("unhandledPromiseRejectionHandler");function h(e){return e&&e.then}function p(e){return e}function v(e){return N.reject(e)}var d=a("state"),_=a("value"),g=a("finally"),k=a("parentPromiseValue"),y=a("parentPromiseState"),T="Promise.then",m=null,b=!0,E=!1,w=0;function S(e,t){return function(n){try{O(e,t,n)}catch(t){O(e,!1,t)}}}var P=function(){var e=!1;return function t(n){return function(){e||(e=!0,n.apply(null,arguments))}}},Z="Promise resolved with itself",D=a("currentTaskTrace");function O(e,r,a){var c=P();if(e===a)throw new TypeError(Z);if(e[d]===m){var u=null;try{"object"!=typeof a&&"function"!=typeof a||(u=a&&a.then)}catch(t){return c((function(){O(e,!1,t)}))(),e}if(r!==E&&a instanceof N&&a.hasOwnProperty(d)&&a.hasOwnProperty(_)&&a[d]!==m)j(a),O(e,a[d],a[_]);else if(r!==E&&"function"==typeof u)try{u.call(a,c(S(e,r)),c(S(e,!1)))}catch(t){c((function(){O(e,!1,t)}))()}else{e[d]=r;var f=e[_];if(e[_]=a,e[g]===g&&r===b&&(e[d]=e[y],e[_]=e[k]),r===E&&a instanceof Error){var h=t.currentTask&&t.currentTask.data&&t.currentTask.data[l];h&&o(a,D,{configurable:!0,enumerable:!1,writable:!0,value:h})}for(var p=0;p<f.length;)z(e,f[p++],f[p++],f[p++],f[p++]);if(0==f.length&&r==E){e[d]=w;var v=a;try{throw new Error("Uncaught (in promise): "+function e(t){return t&&t.toString===Object.prototype.toString?(t.constructor&&t.constructor.name||"")+": "+JSON.stringify(t):t?t.toString():Object.prototype.toString.call(t)}(a)+(a&&a.stack?"\n"+a.stack:""))}catch(e){v=e}s&&(v.throwOriginal=!0),v.rejection=a,v.promise=e,v.zone=t.current,v.task=t.currentTask,i.push(v),n.scheduleMicroTask()}}}return e}var C=a("rejectionHandledHandler");function j(e){if(e[d]===w){try{var n=t[C];n&&"function"==typeof n&&n.call(this,{rejection:e[_],promise:e})}catch(e){}e[d]=E;for(var r=0;r<i.length;r++)e===i[r].promise&&i.splice(r,1)}}function z(e,t,n,r,o){j(e);var a=e[d],i=a?"function"==typeof r?r:p:"function"==typeof o?o:v;t.scheduleMicroTask(T,(function(){try{var r=e[_],o=!!n&&g===n[g];o&&(n[k]=r,n[y]=a);var s=t.run(i,void 0,o&&i!==v&&i!==p?[]:[r]);O(n,!0,s)}catch(e){O(n,!1,e)}}),n)}var I=function(){},M=e.AggregateError,N=function(){function e(t){var n=this;if(!(n instanceof e))throw new Error("Must be an instanceof Promise.");n[d]=m,n[_]=[];try{var r=P();t&&t(r(S(n,b)),r(S(n,E)))}catch(e){O(n,!1,e)}}return e.toString=function(){return"function ZoneAwarePromise() { [native code] }"},e.resolve=function(t){return t instanceof e?t:O(new this(null),b,t)},e.reject=function(e){return O(new this(null),E,e)},e.withResolvers=function(){var t={};return t.promise=new e((function(e,n){t.resolve=e,t.reject=n})),t},e.any=function(t){if(!t||"function"!=typeof t[Symbol.iterator])return Promise.reject(new M([],"All promises were rejected"));var n=[],r=0;try{for(var o=0,a=t;o<a.length;o++)r++,n.push(e.resolve(a[o]))}catch(e){return Promise.reject(new M([],"All promises were rejected"))}if(0===r)return Promise.reject(new M([],"All promises were rejected"));var i=!1,s=[];return new e((function(e,t){for(var o=0;o<n.length;o++)n[o].then((function(t){i||(i=!0,e(t))}),(function(e){s.push(e),0==--r&&(i=!0,t(new M(s,"All promises were rejected")))}))}))},e.race=function(e){var t,n,r=new this((function(e,r){t=e,n=r}));function o(e){t(e)}function a(e){n(e)}for(var i=0,s=e;i<s.length;i++){var c=s[i];h(c)||(c=this.resolve(c)),c.then(o,a)}return r},e.all=function(t){return e.allWithCallback(t)},e.allSettled=function(t){return(this&&this.prototype instanceof e?this:e).allWithCallback(t,{thenCallback:function(e){return{status:"fulfilled",value:e}},errorCallback:function(e){return{status:"rejected",reason:e}}})},e.allWithCallback=function(e,t){for(var n,r,o=new this((function(e,t){n=e,r=t})),a=2,i=0,s=[],c=function(e){h(e)||(e=u.resolve(e));var o=i;try{e.then((function(e){s[o]=t?t.thenCallback(e):e,0==--a&&n(s)}),(function(e){t?(s[o]=t.errorCallback(e),0==--a&&n(s)):r(e)}))}catch(e){r(e)}a++,i++},u=this,l=0,f=e;l<f.length;l++)c(f[l]);return 0==(a-=2)&&n(s),o},Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"Promise"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.then=function(n,r){var o,a=null===(o=this.constructor)||void 0===o?void 0:o[Symbol.species];a&&"function"==typeof a||(a=this.constructor||e);var i=new a(I),s=t.current;return this[d]==m?this[_].push(s,i,n,r):z(this,s,i,n,r),i},e.prototype.catch=function(e){return this.then(null,e)},e.prototype.finally=function(n){var r,o=null===(r=this.constructor)||void 0===r?void 0:r[Symbol.species];o&&"function"==typeof o||(o=e);var a=new o(I);a[g]=g;var i=t.current;return this[d]==m?this[_].push(i,a,n,n):z(this,i,a,n,n),a},e}();N.resolve=N.resolve,N.reject=N.reject,N.race=N.race,N.all=N.all;var A=e[c]=e.Promise;e.Promise=N;var L=a("thenPatched");function H(e){var t=e.prototype,n=r(t,"then");if(!n||!1!==n.writable&&n.configurable){var o=t.then;t[u]=o,e.prototype.then=function(e,t){var n=this;return new N((function(e,t){o.call(n,e,t)})).then(e,t)},e[L]=!0}}return n.patchThen=H,A&&(H(A),R(e,"fetch",(function(e){return function t(e){return function(t,n){var r=e.apply(t,n);if(r instanceof N)return r;var o=r.constructor;return o[L]||H(o),r}}(e)}))),Promise[t.__symbol__("uncaughtPromiseErrors")]=i,N}))})(e),function n(e){e.__load_patch("toString",(function(e){var t=Function.prototype.toString,n=g("OriginalDelegate"),r=g("Promise"),o=g("Error"),a=function a(){if("function"==typeof this){var i=this[n];if(i)return"function"==typeof i?t.call(i):Object.prototype.toString.call(i);if(this===Promise){var s=e[r];if(s)return t.call(s)}if(this===Error){var c=e[o];if(c)return t.call(c)}}return t.call(this)};a[n]=t,Function.prototype.toString=a;var i=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":i.call(this)}}))}(e),function a(e){e.__load_patch("util",(function(e,t,n){var a=re(e);n.patchOnProperties=j,n.patchMethod=R,n.bindArguments=b,n.patchMacroTask=M;var l=t.__symbol__("BLACK_LISTED_EVENTS"),f=t.__symbol__("UNPATCHED_EVENTS");e[f]&&(e[l]=e[f]),e[l]&&(t[l]=t[f]=e[l]),n.patchEventPrototype=J,n.patchEventTarget=X,n.isIEOrEdge=H,n.ObjectDefineProperty=o,n.ObjectGetOwnPropertyDescriptor=r,n.ObjectCreate=i,n.ArraySlice=s,n.patchClass=I,n.wrapWithCurrentZone=d,n.filterProperties=te,n.attachOriginToPatched=N,n._redefineProperty=Object.defineProperty,n.patchCallbacks=ae,n.getGlobalObjects=function(){return{globalSources:W,zoneSymbolEventNames:G,eventNames:a,isBrowser:P,isMix:Z,isNode:S,TRUE_STR:h,FALSE_STR:p,ZONE_SYMBOL_PREFIX:v,ADD_EVENT_LISTENER_STR:c,REMOVE_EVENT_LISTENER_STR:u}}}))}(e)}(ie),function ue(e){e.__load_patch("legacy",(function(t){var n=t[e.__symbol__("legacyPatch")];n&&n()})),e.__load_patch("timers",(function(e){var t="set",n="clear";Q(e,t,n,"Timeout"),Q(e,t,n,"Interval"),Q(e,t,n,"Immediate")})),e.__load_patch("requestAnimationFrame",(function(e){Q(e,"request","cancel","AnimationFrame"),Q(e,"mozRequest","mozCancel","AnimationFrame"),Q(e,"webkitRequest","webkitCancel","AnimationFrame")})),e.__load_patch("blocking",(function(e,t){for(var n=["alert","prompt","confirm"],r=0;r<n.length;r++)R(e,n[r],(function(n,r,o){return function(r,a){return t.current.run(n,e,a,o)}}))})),e.__load_patch("EventTarget",(function(e,t,n){!function r(e,t){t.patchEventPrototype(e,t)}(e,n),ee(e,n);var o=e.XMLHttpRequestEventTarget;o&&o.prototype&&n.patchEventTarget(e,n,[o.prototype])})),e.__load_patch("MutationObserver",(function(e,t,n){I("MutationObserver"),I("WebKitMutationObserver")})),e.__load_patch("IntersectionObserver",(function(e,t,n){I("IntersectionObserver")})),e.__load_patch("FileReader",(function(e,t,n){I("FileReader")})),e.__load_patch("on_property",(function(e,t,n){oe(n,e)})),e.__load_patch("customElements",(function(e,t,n){!function r(e,t){var n=t.getGlobalObjects();(n.isBrowser||n.isMix)&&e.customElements&&"customElements"in e&&t.patchCallbacks(t,e.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback","formAssociatedCallback","formDisabledCallback","formResetCallback","formStateRestoreCallback"])}(e,n)})),e.__load_patch("XHR",(function(e,t){!function n(e){var n=e.XMLHttpRequest;if(n){var u=n.prototype,h=u[l],p=u[f];if(!h){var v=e.XMLHttpRequestEventTarget;if(v){var d=v.prototype;h=d[l],p=d[f]}}var k="readystatechange",y="scheduled",T=R(u,"open",(function(){return function(e,t){return e[o]=0==t[2],e[s]=t[1],T.apply(e,t)}})),m=g("fetchTaskAborting"),b=g("fetchTaskScheduling"),E=R(u,"send",(function(){return function(e,n){if(!0===t.current[b])return E.apply(e,n);if(e[o])return E.apply(e,n);var r={target:e,url:e[s],isPeriodic:!1,args:n,aborted:!1},a=_("XMLHttpRequest.send",P,r,S,Z);e&&!0===e[c]&&!r.aborted&&a.state===y&&a.invoke()}})),w=R(u,"abort",(function(){return function(e,n){var o=function a(e){return e[r]}(e);if(o&&"string"==typeof o.type){if(null==o.cancelFn||o.data&&o.data.aborted)return;o.zone.cancelTask(o)}else if(!0===t.current[m])return w.apply(e,n)}}))}function S(e){var n=e.data,o=n.target;o[i]=!1,o[c]=!1;var s=o[a];h||(h=o[l],p=o[f]),s&&p.call(o,k,s);var u=o[a]=function(){if(o.readyState===o.DONE)if(!n.aborted&&o[i]&&e.state===y){var r=o[t.__symbol__("loadfalse")];if(0!==o.status&&r&&r.length>0){var a=e.invoke;e.invoke=function(){for(var r=o[t.__symbol__("loadfalse")],i=0;i<r.length;i++)r[i]===e&&r.splice(i,1);n.aborted||e.state!==y||a.call(e)},r.push(e)}else e.invoke()}else n.aborted||!1!==o[i]||(o[c]=!0)};return h.call(o,k,u),o[r]||(o[r]=e),E.apply(o,n.args),o[i]=!0,e}function P(){}function Z(e){var t=e.data;return t.aborted=!0,w.apply(t.target,t.args)}}(e);var r=g("xhrTask"),o=g("xhrSync"),a=g("xhrListener"),i=g("xhrScheduled"),s=g("xhrURL"),c=g("xhrErrorBeforeScheduled")})),e.__load_patch("geolocation",(function(e){e.navigator&&e.navigator.geolocation&&function t(e,n){for(var o=e.constructor.name,a=function(t){var a=n[t],i=e[a];if(i){if(!E(r(e,a)))return"continue";e[a]=function(e){var t=function(){return e.apply(this,b(arguments,o+"."+a))};return N(t,e),t}(i)}},i=0;i<n.length;i++)a(i)}(e.navigator.geolocation,["getCurrentPosition","watchPosition"])})),e.__load_patch("PromiseRejectionEvent",(function(e,t){function n(t){return function(n){Y(e,t).forEach((function(r){var o=e.PromiseRejectionEvent;if(o){var a=new o(t,{promise:n.promise,reason:n.rejection});r.invoke(a)}}))}}e.PromiseRejectionEvent&&(t[g("unhandledPromiseRejectionHandler")]=n("unhandledrejection"),t[g("rejectionHandledHandler")]=n("rejectionhandled"))})),e.__load_patch("queueMicrotask",(function(e,t,n){K(e,n)}))}(ie)}));
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/
(function (_global) {
class AsyncTestZoneSpec {
static { this.symbolParentUnresolved = Zone.__symbol__('parentUnresolved'); }
constructor(finishCallback, failCallback, namePrefix) {
this.finishCallback = finishCallback;
this.failCallback = failCallback;
this._pendingMicroTasks = false;
this._pendingMacroTasks = false;
this._alreadyErrored = false;
this._isSync = false;
const global$1 = globalThis;
// __Zone_symbol_prefix global can be used to override the default zone
// symbol prefix with a custom one if needed.
function __symbol__(name) {
const symbolPrefix = global$1['__Zone_symbol_prefix'] || '__zone_symbol__';
return symbolPrefix + name;
}
const __global = (typeof window !== 'undefined' && window) || (typeof self !== 'undefined' && self) || global;
class AsyncTestZoneSpec {
// Needs to be a getter and not a plain property in order run this just-in-time. Otherwise
// `__symbol__` would be evaluated during top-level execution prior to the Zone prefix being
// changed for tests.
static get symbolParentUnresolved() {
return __symbol__('parentUnresolved');
}
constructor(finishCallback, failCallback, namePrefix) {
this.finishCallback = finishCallback;
this.failCallback = failCallback;
this._pendingMicroTasks = false;
this._pendingMacroTasks = false;
this._alreadyErrored = false;
this._isSync = false;
this._existingFinishTimer = null;
this.entryFunction = null;
this.runZone = Zone.current;
this.unresolvedChainedPromiseCount = 0;
this.supportWaitUnresolvedChainedPromise = false;
this.name = 'asyncTestZone for ' + namePrefix;
this.properties = { 'AsyncTestZoneSpec': this };
this.supportWaitUnresolvedChainedPromise =
__global[__symbol__('supportWaitUnResolvedChainedPromise')] === true;
}
isUnresolvedChainedPromisePending() {
return this.unresolvedChainedPromiseCount > 0;
}
_finishCallbackIfDone() {
// NOTE: Technically the `onHasTask` could fire together with the initial synchronous
// completion in `onInvoke`. `onHasTask` might call this method when it captured e.g.
// microtasks in the proxy zone that now complete as part of this async zone run.
// Consider the following scenario:
// 1. A test `beforeEach` schedules a microtask in the ProxyZone.
// 2. An actual empty `it` spec executes in the AsyncTestZone` (using e.g. `waitForAsync`).
// 3. The `onInvoke` invokes `_finishCallbackIfDone` because the spec runs synchronously.
// 4. We wait the scheduled timeout (see below) to account for unhandled promises.
// 5. The microtask from (1) finishes and `onHasTask` is invoked.
// --> We register a second `_finishCallbackIfDone` even though we have scheduled a timeout.
// If the finish timeout from below is already scheduled, terminate the existing scheduled
// finish invocation, avoiding calling `jasmine` `done` multiple times. *Note* that we would
// want to schedule a new finish callback in case the task state changes again.
if (this._existingFinishTimer !== null) {
clearTimeout(this._existingFinishTimer);
this._existingFinishTimer = null;
this.entryFunction = null;
this.runZone = Zone.current;
this.unresolvedChainedPromiseCount = 0;
this.supportWaitUnresolvedChainedPromise = false;
this.name = 'asyncTestZone for ' + namePrefix;
this.properties = { 'AsyncTestZoneSpec': this };
this.supportWaitUnresolvedChainedPromise =
_global[Zone.__symbol__('supportWaitUnResolvedChainedPromise')] === true;
}
isUnresolvedChainedPromisePending() {
return this.unresolvedChainedPromiseCount > 0;
if (!(this._pendingMicroTasks ||
this._pendingMacroTasks ||
(this.supportWaitUnresolvedChainedPromise && this.isUnresolvedChainedPromisePending()))) {
// We wait until the next tick because we would like to catch unhandled promises which could
// cause test logic to be executed. In such cases we cannot finish with tasks pending then.
this.runZone.run(() => {
this._existingFinishTimer = setTimeout(() => {
if (!this._alreadyErrored && !(this._pendingMicroTasks || this._pendingMacroTasks)) {
this.finishCallback();
}
}, 0);
});
}
_finishCallbackIfDone() {
// NOTE: Technically the `onHasTask` could fire together with the initial synchronous
// completion in `onInvoke`. `onHasTask` might call this method when it captured e.g.
// microtasks in the proxy zone that now complete as part of this async zone run.
// Consider the following scenario:
// 1. A test `beforeEach` schedules a microtask in the ProxyZone.
// 2. An actual empty `it` spec executes in the AsyncTestZone` (using e.g. `waitForAsync`).
// 3. The `onInvoke` invokes `_finishCallbackIfDone` because the spec runs synchronously.
// 4. We wait the scheduled timeout (see below) to account for unhandled promises.
// 5. The microtask from (1) finishes and `onHasTask` is invoked.
// --> We register a second `_finishCallbackIfDone` even though we have scheduled a timeout.
// If the finish timeout from below is already scheduled, terminate the existing scheduled
// finish invocation, avoiding calling `jasmine` `done` multiple times. *Note* that we would
// want to schedule a new finish callback in case the task state changes again.
if (this._existingFinishTimer !== null) {
clearTimeout(this._existingFinishTimer);
this._existingFinishTimer = null;
}
if (!(this._pendingMicroTasks || this._pendingMacroTasks ||
(this.supportWaitUnresolvedChainedPromise && this.isUnresolvedChainedPromisePending()))) {
// We wait until the next tick because we would like to catch unhandled promises which could
// cause test logic to be executed. In such cases we cannot finish with tasks pending then.
this.runZone.run(() => {
this._existingFinishTimer = setTimeout(() => {
if (!this._alreadyErrored && !(this._pendingMicroTasks || this._pendingMacroTasks)) {
this.finishCallback();
}
}, 0);
});
}
}
patchPromiseForTest() {
if (!this.supportWaitUnresolvedChainedPromise) {
return;
}
patchPromiseForTest() {
if (!this.supportWaitUnresolvedChainedPromise) {
return;
}
const patchPromiseForTest = Promise[Zone.__symbol__('patchPromiseForTest')];
if (patchPromiseForTest) {
patchPromiseForTest();
}
const patchPromiseForTest = Promise[Zone.__symbol__('patchPromiseForTest')];
if (patchPromiseForTest) {
patchPromiseForTest();
}
unPatchPromiseForTest() {
if (!this.supportWaitUnresolvedChainedPromise) {
return;
}
const unPatchPromiseForTest = Promise[Zone.__symbol__('unPatchPromiseForTest')];
if (unPatchPromiseForTest) {
unPatchPromiseForTest();
}
}
unPatchPromiseForTest() {
if (!this.supportWaitUnresolvedChainedPromise) {
return;
}
onScheduleTask(delegate, current, target, task) {
if (task.type !== 'eventTask') {
this._isSync = false;
}
if (task.type === 'microTask' && task.data && task.data instanceof Promise) {
// check whether the promise is a chained promise
if (task.data[AsyncTestZoneSpec.symbolParentUnresolved] === true) {
// chained promise is being scheduled
this.unresolvedChainedPromiseCount--;
}
}
return delegate.scheduleTask(target, task);
const unPatchPromiseForTest = Promise[Zone.__symbol__('unPatchPromiseForTest')];
if (unPatchPromiseForTest) {
unPatchPromiseForTest();
}
onInvokeTask(delegate, current, target, task, applyThis, applyArgs) {
if (task.type !== 'eventTask') {
this._isSync = false;
}
return delegate.invokeTask(target, task, applyThis, applyArgs);
}
onScheduleTask(delegate, current, target, task) {
if (task.type !== 'eventTask') {
this._isSync = false;
}
onCancelTask(delegate, current, target, task) {
if (task.type !== 'eventTask') {
this._isSync = false;
if (task.type === 'microTask' && task.data && task.data instanceof Promise) {
// check whether the promise is a chained promise
if (task.data[AsyncTestZoneSpec.symbolParentUnresolved] === true) {
// chained promise is being scheduled
this.unresolvedChainedPromiseCount--;
}
return delegate.cancelTask(target, task);
}
// Note - we need to use onInvoke at the moment to call finish when a test is
// fully synchronous. TODO(juliemr): remove this when the logic for
// onHasTask changes and it calls whenever the task queues are dirty.
// updated by(JiaLiPassion), only call finish callback when no task
// was scheduled/invoked/canceled.
onInvoke(parentZoneDelegate, currentZone, targetZone, delegate, applyThis, applyArgs, source) {
if (!this.entryFunction) {
this.entryFunction = delegate;
}
try {
this._isSync = true;
return parentZoneDelegate.invoke(targetZone, delegate, applyThis, applyArgs, source);
}
finally {
// We need to check the delegate is the same as entryFunction or not.
// Consider the following case.
//
// asyncTestZone.run(() => { // Here the delegate will be the entryFunction
// Zone.current.run(() => { // Here the delegate will not be the entryFunction
// });
// });
//
// We only want to check whether there are async tasks scheduled
// for the entry function.
if (this._isSync && this.entryFunction === delegate) {
this._finishCallbackIfDone();
}
}
return delegate.scheduleTask(target, task);
}
onInvokeTask(delegate, current, target, task, applyThis, applyArgs) {
if (task.type !== 'eventTask') {
this._isSync = false;
}
onHandleError(parentZoneDelegate, currentZone, targetZone, error) {
// Let the parent try to handle the error.
const result = parentZoneDelegate.handleError(targetZone, error);
if (result) {
this.failCallback(error);
this._alreadyErrored = true;
}
return false;
return delegate.invokeTask(target, task, applyThis, applyArgs);
}
onCancelTask(delegate, current, target, task) {
if (task.type !== 'eventTask') {
this._isSync = false;
}
onHasTask(delegate, current, target, hasTaskState) {
delegate.hasTask(target, hasTaskState);
// We should only trigger finishCallback when the target zone is the AsyncTestZone
// Consider the following cases.
return delegate.cancelTask(target, task);
}
// Note - we need to use onInvoke at the moment to call finish when a test is
// fully synchronous. TODO(juliemr): remove this when the logic for
// onHasTask changes and it calls whenever the task queues are dirty.
// updated by(JiaLiPassion), only call finish callback when no task
// was scheduled/invoked/canceled.
onInvoke(parentZoneDelegate, currentZone, targetZone, delegate, applyThis, applyArgs, source) {
if (!this.entryFunction) {
this.entryFunction = delegate;
}
try {
this._isSync = true;
return parentZoneDelegate.invoke(targetZone, delegate, applyThis, applyArgs, source);
}
finally {
// We need to check the delegate is the same as entryFunction or not.
// Consider the following case.
//
// const childZone = asyncTestZone.fork({
// name: 'child',
// onHasTask: ...
// asyncTestZone.run(() => { // Here the delegate will be the entryFunction
// Zone.current.run(() => { // Here the delegate will not be the entryFunction
// });
// });
//
// So we have nested zones declared the onHasTask hook, in this case,
// the onHasTask will be triggered twice, and cause the finishCallbackIfDone()
// is also be invoked twice. So we need to only trigger the finishCallbackIfDone()
// when the current zone is the same as the target zone.
if (current !== target) {
return;
}
if (hasTaskState.change == 'microTask') {
this._pendingMicroTasks = hasTaskState.microTask;
// We only want to check whether there are async tasks scheduled
// for the entry function.
if (this._isSync && this.entryFunction === delegate) {
this._finishCallbackIfDone();
}
else if (hasTaskState.change == 'macroTask') {
this._pendingMacroTasks = hasTaskState.macroTask;
this._finishCallbackIfDone();
}
}
}
onHandleError(parentZoneDelegate, currentZone, targetZone, error) {
// Let the parent try to handle the error.
const result = parentZoneDelegate.handleError(targetZone, error);
if (result) {
this.failCallback(error);
this._alreadyErrored = true;
}
return false;
}
onHasTask(delegate, current, target, hasTaskState) {
delegate.hasTask(target, hasTaskState);
// We should only trigger finishCallback when the target zone is the AsyncTestZone
// Consider the following cases.
//
// const childZone = asyncTestZone.fork({
// name: 'child',
// onHasTask: ...
// });
//
// So we have nested zones declared the onHasTask hook, in this case,
// the onHasTask will be triggered twice, and cause the finishCallbackIfDone()
// is also be invoked twice. So we need to only trigger the finishCallbackIfDone()
// when the current zone is the same as the target zone.
if (current !== target) {
return;
}
if (hasTaskState.change == 'microTask') {
this._pendingMicroTasks = hasTaskState.microTask;
this._finishCallbackIfDone();
}
else if (hasTaskState.change == 'macroTask') {
this._pendingMacroTasks = hasTaskState.macroTask;
this._finishCallbackIfDone();
}
}
}
function patchAsyncTest(Zone) {
// Export the class so that new instances can be created with proper
// constructor params.
Zone['AsyncTestZoneSpec'] = AsyncTestZoneSpec;
})(typeof window !== 'undefined' && window || typeof self !== 'undefined' && self || global);
Zone.__load_patch('asynctest', (global, Zone, api) => {
/**
* Wraps a test function in an asynchronous test zone. The test will automatically
* complete when all asynchronous calls within this zone are done.
*/
Zone[api.symbol('asyncTest')] = function asyncTest(fn) {
// If we're running using the Jasmine test framework, adapt to call the 'done'
// function when asynchronous activity is finished.
if (global.jasmine) {
Zone.__load_patch('asynctest', (global, Zone, api) => {
/**
* Wraps a test function in an asynchronous test zone. The test will automatically
* complete when all asynchronous calls within this zone are done.
*/
Zone[api.symbol('asyncTest')] = function asyncTest(fn) {
// If we're running using the Jasmine test framework, adapt to call the 'done'
// function when asynchronous activity is finished.
if (global.jasmine) {
// Not using an arrow function to preserve context passed from call site
return function (done) {
if (!done) {
// if we run beforeEach in @angular/core/testing/testing_internal then we get no done
// fake it here and assume sync.
done = function () { };
done.fail = function (e) {
throw e;
};
}
runInTestZone(fn, this, done, (err) => {
if (typeof err === 'string') {
return done.fail(new Error(err));
}
else {
done.fail(err);
}
});
};
}
// Otherwise, return a promise which will resolve when asynchronous activity
// is finished. This will be correctly consumed by the Mocha framework with
// it('...', async(myFn)); or can be used in a custom framework.
// Not using an arrow function to preserve context passed from call site
return function (done) {
if (!done) {
// if we run beforeEach in @angular/core/testing/testing_internal then we get no done
// fake it here and assume sync.
done = function () { };
done.fail = function (e) {
throw e;
};
}
runInTestZone(fn, this, done, (err) => {
if (typeof err === 'string') {
return done.fail(new Error(err));
return function () {
return new Promise((finishCallback, failCallback) => {
runInTestZone(fn, this, finishCallback, failCallback);
});
};
};
function runInTestZone(fn, context, finishCallback, failCallback) {
const currentZone = Zone.current;
const AsyncTestZoneSpec = Zone['AsyncTestZoneSpec'];
if (AsyncTestZoneSpec === undefined) {
throw new Error('AsyncTestZoneSpec is needed for the async() test helper but could not be found. ' +
'Please make sure that your environment includes zone.js/plugins/async-test');
}
const ProxyZoneSpec = Zone['ProxyZoneSpec'];
if (!ProxyZoneSpec) {
throw new Error('ProxyZoneSpec is needed for the async() test helper but could not be found. ' +
'Please make sure that your environment includes zone.js/plugins/proxy');
}
const proxyZoneSpec = ProxyZoneSpec.get();
ProxyZoneSpec.assertPresent();
// We need to create the AsyncTestZoneSpec outside the ProxyZone.
// If we do it in ProxyZone then we will get to infinite recursion.
const proxyZone = Zone.current.getZoneWith('ProxyZoneSpec');
const previousDelegate = proxyZoneSpec.getDelegate();
proxyZone.parent.run(() => {
const testZoneSpec = new AsyncTestZoneSpec(() => {
// Need to restore the original zone.
if (proxyZoneSpec.getDelegate() == testZoneSpec) {
// Only reset the zone spec if it's
// still this one. Otherwise, assume
// it's OK.
proxyZoneSpec.setDelegate(previousDelegate);
}
else {
done.fail(err);
testZoneSpec.unPatchPromiseForTest();
currentZone.run(() => {
finishCallback();
});
}, (error) => {
// Need to restore the original zone.
if (proxyZoneSpec.getDelegate() == testZoneSpec) {
// Only reset the zone spec if it's sill this one. Otherwise, assume it's OK.
proxyZoneSpec.setDelegate(previousDelegate);
}
});
};
}
// Otherwise, return a promise which will resolve when asynchronous activity
// is finished. This will be correctly consumed by the Mocha framework with
// it('...', async(myFn)); or can be used in a custom framework.
// Not using an arrow function to preserve context passed from call site
return function () {
return new Promise((finishCallback, failCallback) => {
runInTestZone(fn, this, finishCallback, failCallback);
testZoneSpec.unPatchPromiseForTest();
currentZone.run(() => {
failCallback(error);
});
}, 'test');
proxyZoneSpec.setDelegate(testZoneSpec);
testZoneSpec.patchPromiseForTest();
});
};
};
function runInTestZone(fn, context, finishCallback, failCallback) {
const currentZone = Zone.current;
const AsyncTestZoneSpec = Zone['AsyncTestZoneSpec'];
if (AsyncTestZoneSpec === undefined) {
throw new Error('AsyncTestZoneSpec is needed for the async() test helper but could not be found. ' +
'Please make sure that your environment includes zone.js/plugins/async-test');
return Zone.current.runGuarded(fn, context);
}
const ProxyZoneSpec = Zone['ProxyZoneSpec'];
if (!ProxyZoneSpec) {
throw new Error('ProxyZoneSpec is needed for the async() test helper but could not be found. ' +
'Please make sure that your environment includes zone.js/plugins/proxy');
}
const proxyZoneSpec = ProxyZoneSpec.get();
ProxyZoneSpec.assertPresent();
// We need to create the AsyncTestZoneSpec outside the ProxyZone.
// If we do it in ProxyZone then we will get to infinite recursion.
const proxyZone = Zone.current.getZoneWith('ProxyZoneSpec');
const previousDelegate = proxyZoneSpec.getDelegate();
proxyZone.parent.run(() => {
const testZoneSpec = new AsyncTestZoneSpec(() => {
// Need to restore the original zone.
if (proxyZoneSpec.getDelegate() == testZoneSpec) {
// Only reset the zone spec if it's
// still this one. Otherwise, assume
// it's OK.
proxyZoneSpec.setDelegate(previousDelegate);
}
testZoneSpec.unPatchPromiseForTest();
currentZone.run(() => {
finishCallback();
});
}, (error) => {
// Need to restore the original zone.
if (proxyZoneSpec.getDelegate() == testZoneSpec) {
// Only reset the zone spec if it's sill this one. Otherwise, assume it's OK.
proxyZoneSpec.setDelegate(previousDelegate);
}
testZoneSpec.unPatchPromiseForTest();
currentZone.run(() => {
failCallback(error);
});
}, 'test');
proxyZoneSpec.setDelegate(testZoneSpec);
testZoneSpec.patchPromiseForTest();
});
return Zone.current.runGuarded(fn, context);
}
});
});
}
patchAsyncTest(Zone);
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/!function(e){class n{static{this.symbolParentUnresolved=Zone.__symbol__("parentUnresolved")}constructor(n,s,t){this.finishCallback=n,this.failCallback=s,this._pendingMicroTasks=!1,this._pendingMacroTasks=!1,this._alreadyErrored=!1,this._isSync=!1,this._existingFinishTimer=null,this.entryFunction=null,this.runZone=Zone.current,this.unresolvedChainedPromiseCount=0,this.supportWaitUnresolvedChainedPromise=!1,this.name="asyncTestZone for "+t,this.properties={AsyncTestZoneSpec:this},this.supportWaitUnresolvedChainedPromise=!0===e[Zone.__symbol__("supportWaitUnResolvedChainedPromise")]}isUnresolvedChainedPromisePending(){return this.unresolvedChainedPromiseCount>0}_finishCallbackIfDone(){null!==this._existingFinishTimer&&(clearTimeout(this._existingFinishTimer),this._existingFinishTimer=null),this._pendingMicroTasks||this._pendingMacroTasks||this.supportWaitUnresolvedChainedPromise&&this.isUnresolvedChainedPromisePending()||this.runZone.run((()=>{this._existingFinishTimer=setTimeout((()=>{this._alreadyErrored||this._pendingMicroTasks||this._pendingMacroTasks||this.finishCallback()}),0)}))}patchPromiseForTest(){if(!this.supportWaitUnresolvedChainedPromise)return;const e=Promise[Zone.__symbol__("patchPromiseForTest")];e&&e()}unPatchPromiseForTest(){if(!this.supportWaitUnresolvedChainedPromise)return;const e=Promise[Zone.__symbol__("unPatchPromiseForTest")];e&&e()}onScheduleTask(e,s,t,i){return"eventTask"!==i.type&&(this._isSync=!1),"microTask"===i.type&&i.data&&i.data instanceof Promise&&!0===i.data[n.symbolParentUnresolved]&&this.unresolvedChainedPromiseCount--,e.scheduleTask(t,i)}onInvokeTask(e,n,s,t,i,r){return"eventTask"!==t.type&&(this._isSync=!1),e.invokeTask(s,t,i,r)}onCancelTask(e,n,s,t){return"eventTask"!==t.type&&(this._isSync=!1),e.cancelTask(s,t)}onInvoke(e,n,s,t,i,r,o){this.entryFunction||(this.entryFunction=t);try{return this._isSync=!0,e.invoke(s,t,i,r,o)}finally{this._isSync&&this.entryFunction===t&&this._finishCallbackIfDone()}}onHandleError(e,n,s,t){return e.handleError(s,t)&&(this.failCallback(t),this._alreadyErrored=!0),!1}onHasTask(e,n,s,t){e.hasTask(s,t),n===s&&("microTask"==t.change?(this._pendingMicroTasks=t.microTask,this._finishCallbackIfDone()):"macroTask"==t.change&&(this._pendingMacroTasks=t.macroTask,this._finishCallbackIfDone()))}}Zone.AsyncTestZoneSpec=n}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global),Zone.__load_patch("asynctest",((e,n,s)=>{function t(e,s,t,i){const r=n.current,o=n.AsyncTestZoneSpec;if(void 0===o)throw new Error("AsyncTestZoneSpec is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/plugins/async-test");const a=n.ProxyZoneSpec;if(!a)throw new Error("ProxyZoneSpec is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/plugins/proxy");const h=a.get();a.assertPresent();const c=n.current.getZoneWith("ProxyZoneSpec"),l=h.getDelegate();return c.parent.run((()=>{const e=new o((()=>{h.getDelegate()==e&&h.setDelegate(l),e.unPatchPromiseForTest(),r.run((()=>{t()}))}),(n=>{h.getDelegate()==e&&h.setDelegate(l),e.unPatchPromiseForTest(),r.run((()=>{i(n)}))}),"test");h.setDelegate(e),e.patchPromiseForTest()})),n.current.runGuarded(e,s)}n[s.symbol("asyncTest")]=function n(s){return e.jasmine?function(e){e||((e=function(){}).fail=function(e){throw e}),t(s,this,e,(n=>{if("string"==typeof n)return e.fail(new Error(n));e.fail(n)}))}:function(){return new Promise(((e,n)=>{t(s,this,e,n)}))}}}));
*/const global$1=globalThis;function __symbol__(e){return(global$1.__Zone_symbol_prefix||"__zone_symbol__")+e}const __global="undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global;class AsyncTestZoneSpec{static get symbolParentUnresolved(){return __symbol__("parentUnresolved")}constructor(e,n,s){this.finishCallback=e,this.failCallback=n,this._pendingMicroTasks=!1,this._pendingMacroTasks=!1,this._alreadyErrored=!1,this._isSync=!1,this._existingFinishTimer=null,this.entryFunction=null,this.runZone=Zone.current,this.unresolvedChainedPromiseCount=0,this.supportWaitUnresolvedChainedPromise=!1,this.name="asyncTestZone for "+s,this.properties={AsyncTestZoneSpec:this},this.supportWaitUnresolvedChainedPromise=!0===__global[__symbol__("supportWaitUnResolvedChainedPromise")]}isUnresolvedChainedPromisePending(){return this.unresolvedChainedPromiseCount>0}_finishCallbackIfDone(){null!==this._existingFinishTimer&&(clearTimeout(this._existingFinishTimer),this._existingFinishTimer=null),this._pendingMicroTasks||this._pendingMacroTasks||this.supportWaitUnresolvedChainedPromise&&this.isUnresolvedChainedPromisePending()||this.runZone.run((()=>{this._existingFinishTimer=setTimeout((()=>{this._alreadyErrored||this._pendingMicroTasks||this._pendingMacroTasks||this.finishCallback()}),0)}))}patchPromiseForTest(){if(!this.supportWaitUnresolvedChainedPromise)return;const e=Promise[Zone.__symbol__("patchPromiseForTest")];e&&e()}unPatchPromiseForTest(){if(!this.supportWaitUnresolvedChainedPromise)return;const e=Promise[Zone.__symbol__("unPatchPromiseForTest")];e&&e()}onScheduleTask(e,n,s,t){return"eventTask"!==t.type&&(this._isSync=!1),"microTask"===t.type&&t.data&&t.data instanceof Promise&&!0===t.data[AsyncTestZoneSpec.symbolParentUnresolved]&&this.unresolvedChainedPromiseCount--,e.scheduleTask(s,t)}onInvokeTask(e,n,s,t,i,o){return"eventTask"!==t.type&&(this._isSync=!1),e.invokeTask(s,t,i,o)}onCancelTask(e,n,s,t){return"eventTask"!==t.type&&(this._isSync=!1),e.cancelTask(s,t)}onInvoke(e,n,s,t,i,o,r){this.entryFunction||(this.entryFunction=t);try{return this._isSync=!0,e.invoke(s,t,i,o,r)}finally{this._isSync&&this.entryFunction===t&&this._finishCallbackIfDone()}}onHandleError(e,n,s,t){return e.handleError(s,t)&&(this.failCallback(t),this._alreadyErrored=!0),!1}onHasTask(e,n,s,t){e.hasTask(s,t),n===s&&("microTask"==t.change?(this._pendingMicroTasks=t.microTask,this._finishCallbackIfDone()):"macroTask"==t.change&&(this._pendingMacroTasks=t.macroTask,this._finishCallbackIfDone()))}}function patchAsyncTest(e){e.AsyncTestZoneSpec=AsyncTestZoneSpec,e.__load_patch("asynctest",((e,n,s)=>{function t(e,s,t,i){const o=n.current,r=n.AsyncTestZoneSpec;if(void 0===r)throw new Error("AsyncTestZoneSpec is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/plugins/async-test");const a=n.ProxyZoneSpec;if(!a)throw new Error("ProxyZoneSpec is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/plugins/proxy");const c=a.get();a.assertPresent();const h=n.current.getZoneWith("ProxyZoneSpec"),l=c.getDelegate();return h.parent.run((()=>{const e=new r((()=>{c.getDelegate()==e&&c.setDelegate(l),e.unPatchPromiseForTest(),o.run((()=>{t()}))}),(n=>{c.getDelegate()==e&&c.setDelegate(l),e.unPatchPromiseForTest(),o.run((()=>{i(n)}))}),"test");c.setDelegate(e),e.patchPromiseForTest()})),n.current.runGuarded(e,s)}n[s.symbol("asyncTest")]=function n(s){return e.jasmine?function(e){e||((e=function(){}).fail=function(e){throw e}),t(s,this,e,(n=>{if("string"==typeof n)return e.fail(new Error(n));e.fail(n)}))}:function(){return new Promise(((e,n)=>{t(s,this,e,n)}))}}}))}patchAsyncTest(Zone);
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/
(function (global) {
const OriginalDate = global.Date;
// Since when we compile this file to `es2015`, and if we define
// this `FakeDate` as `class FakeDate`, and then set `FakeDate.prototype`
// there will be an error which is `Cannot assign to read only property 'prototype'`
// so we need to use function implementation here.
function FakeDate() {
if (arguments.length === 0) {
const d = new OriginalDate();
d.setTime(FakeDate.now());
return d;
const global = (typeof window === 'object' && window) || (typeof self === 'object' && self) || globalThis.global;
const OriginalDate = global.Date;
// Since when we compile this file to `es2015`, and if we define
// this `FakeDate` as `class FakeDate`, and then set `FakeDate.prototype`
// there will be an error which is `Cannot assign to read only property 'prototype'`
// so we need to use function implementation here.
function FakeDate() {
if (arguments.length === 0) {
const d = new OriginalDate();
d.setTime(FakeDate.now());
return d;
}
else {
const args = Array.prototype.slice.call(arguments);
return new OriginalDate(...args);
}
}
FakeDate.now = function () {
const fakeAsyncTestZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');
if (fakeAsyncTestZoneSpec) {
return fakeAsyncTestZoneSpec.getFakeSystemTime();
}
return OriginalDate.now.apply(this, arguments);
};
FakeDate.UTC = OriginalDate.UTC;
FakeDate.parse = OriginalDate.parse;
// keep a reference for zone patched timer function
let patchedTimers;
const timeoutCallback = function () { };
class Scheduler {
// Next scheduler id.
static { this.nextNodeJSId = 1; }
static { this.nextId = -1; }
constructor() {
// Scheduler queue with the tuple of end time and callback function - sorted by end time.
this._schedulerQueue = [];
// Current simulated time in millis.
this._currentTickTime = 0;
// Current fake system base time in millis.
this._currentFakeBaseSystemTime = OriginalDate.now();
// track requeuePeriodicTimer
this._currentTickRequeuePeriodicEntries = [];
}
static getNextId() {
const id = patchedTimers.nativeSetTimeout.call(global, timeoutCallback, 0);
patchedTimers.nativeClearTimeout.call(global, id);
if (typeof id === 'number') {
return id;
}
else {
const args = Array.prototype.slice.call(arguments);
return new OriginalDate(...args);
}
// in NodeJS, we just use a number for fakeAsync, since it will not
// conflict with native TimeoutId
return Scheduler.nextNodeJSId++;
}
FakeDate.now = function () {
const fakeAsyncTestZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');
if (fakeAsyncTestZoneSpec) {
return fakeAsyncTestZoneSpec.getFakeSystemTime();
getCurrentTickTime() {
return this._currentTickTime;
}
getFakeSystemTime() {
return this._currentFakeBaseSystemTime + this._currentTickTime;
}
setFakeBaseSystemTime(fakeBaseSystemTime) {
this._currentFakeBaseSystemTime = fakeBaseSystemTime;
}
getRealSystemTime() {
return OriginalDate.now();
}
scheduleFunction(cb, delay, options) {
options = {
...{
args: [],
isPeriodic: false,
isRequestAnimationFrame: false,
id: -1,
isRequeuePeriodic: false,
},
...options,
};
let currentId = options.id < 0 ? Scheduler.nextId : options.id;
Scheduler.nextId = Scheduler.getNextId();
let endTime = this._currentTickTime + delay;
// Insert so that scheduler queue remains sorted by end time.
let newEntry = {
endTime: endTime,
id: currentId,
func: cb,
args: options.args,
delay: delay,
isPeriodic: options.isPeriodic,
isRequestAnimationFrame: options.isRequestAnimationFrame,
};
if (options.isRequeuePeriodic) {
this._currentTickRequeuePeriodicEntries.push(newEntry);
}
return OriginalDate.now.apply(this, arguments);
};
FakeDate.UTC = OriginalDate.UTC;
FakeDate.parse = OriginalDate.parse;
// keep a reference for zone patched timer function
const timers = {
setTimeout: global.setTimeout,
setInterval: global.setInterval,
clearTimeout: global.clearTimeout,
clearInterval: global.clearInterval
};
class Scheduler {
// Next scheduler id.
static { this.nextId = 1; }
constructor() {
// Scheduler queue with the tuple of end time and callback function - sorted by end time.
this._schedulerQueue = [];
// Current simulated time in millis.
this._currentTickTime = 0;
// Current fake system base time in millis.
this._currentFakeBaseSystemTime = OriginalDate.now();
// track requeuePeriodicTimer
this._currentTickRequeuePeriodicEntries = [];
}
getCurrentTickTime() {
return this._currentTickTime;
}
getFakeSystemTime() {
return this._currentFakeBaseSystemTime + this._currentTickTime;
}
setFakeBaseSystemTime(fakeBaseSystemTime) {
this._currentFakeBaseSystemTime = fakeBaseSystemTime;
}
getRealSystemTime() {
return OriginalDate.now();
}
scheduleFunction(cb, delay, options) {
options = {
...{
args: [],
isPeriodic: false,
isRequestAnimationFrame: false,
id: -1,
isRequeuePeriodic: false
},
...options
};
let currentId = options.id < 0 ? Scheduler.nextId++ : options.id;
let endTime = this._currentTickTime + delay;
// Insert so that scheduler queue remains sorted by end time.
let newEntry = {
endTime: endTime,
id: currentId,
func: cb,
args: options.args,
delay: delay,
isPeriodic: options.isPeriodic,
isRequestAnimationFrame: options.isRequestAnimationFrame
};
if (options.isRequeuePeriodic) {
this._currentTickRequeuePeriodicEntries.push(newEntry);
let i = 0;
for (; i < this._schedulerQueue.length; i++) {
let currentEntry = this._schedulerQueue[i];
if (newEntry.endTime < currentEntry.endTime) {
break;
}
let i = 0;
for (; i < this._schedulerQueue.length; i++) {
let currentEntry = this._schedulerQueue[i];
if (newEntry.endTime < currentEntry.endTime) {
break;
}
}
this._schedulerQueue.splice(i, 0, newEntry);
return currentId;
}
removeScheduledFunctionWithId(id) {
for (let i = 0; i < this._schedulerQueue.length; i++) {
if (this._schedulerQueue[i].id == id) {
this._schedulerQueue.splice(i, 1);
break;
}
this._schedulerQueue.splice(i, 0, newEntry);
return currentId;
}
removeScheduledFunctionWithId(id) {
for (let i = 0; i < this._schedulerQueue.length; i++) {
if (this._schedulerQueue[i].id == id) {
this._schedulerQueue.splice(i, 1);
break;
}
}
removeAll() {
this._schedulerQueue = [];
}
removeAll() {
this._schedulerQueue = [];
}
getTimerCount() {
return this._schedulerQueue.length;
}
tickToNext(step = 1, doTick, tickOptions) {
if (this._schedulerQueue.length < step) {
return;
}
getTimerCount() {
return this._schedulerQueue.length;
// Find the last task currently queued in the scheduler queue and tick
// till that time.
const startTime = this._currentTickTime;
const targetTask = this._schedulerQueue[step - 1];
this.tick(targetTask.endTime - startTime, doTick, tickOptions);
}
tick(millis = 0, doTick, tickOptions) {
let finalTime = this._currentTickTime + millis;
let lastCurrentTime = 0;
tickOptions = Object.assign({ processNewMacroTasksSynchronously: true }, tickOptions);
// we need to copy the schedulerQueue so nested timeout
// will not be wrongly called in the current tick
// https://github.com/angular/angular/issues/33799
const schedulerQueue = tickOptions.processNewMacroTasksSynchronously
? this._schedulerQueue
: this._schedulerQueue.slice();
if (schedulerQueue.length === 0 && doTick) {
doTick(millis);
return;
}
tickToNext(step = 1, doTick, tickOptions) {
if (this._schedulerQueue.length < step) {
return;
while (schedulerQueue.length > 0) {
// clear requeueEntries before each loop
this._currentTickRequeuePeriodicEntries = [];
let current = schedulerQueue[0];
if (finalTime < current.endTime) {
// Done processing the queue since it's sorted by endTime.
break;
}
// Find the last task currently queued in the scheduler queue and tick
// till that time.
const startTime = this._currentTickTime;
const targetTask = this._schedulerQueue[step - 1];
this.tick(targetTask.endTime - startTime, doTick, tickOptions);
}
tick(millis = 0, doTick, tickOptions) {
let finalTime = this._currentTickTime + millis;
let lastCurrentTime = 0;
tickOptions = Object.assign({ processNewMacroTasksSynchronously: true }, tickOptions);
// we need to copy the schedulerQueue so nested timeout
// will not be wrongly called in the current tick
// https://github.com/angular/angular/issues/33799
const schedulerQueue = tickOptions.processNewMacroTasksSynchronously ?
this._schedulerQueue :
this._schedulerQueue.slice();
if (schedulerQueue.length === 0 && doTick) {
doTick(millis);
return;
}
while (schedulerQueue.length > 0) {
// clear requeueEntries before each loop
this._currentTickRequeuePeriodicEntries = [];
let current = schedulerQueue[0];
if (finalTime < current.endTime) {
// Done processing the queue since it's sorted by endTime.
break;
}
else {
// Time to run scheduled function. Remove it from the head of queue.
let current = schedulerQueue.shift();
if (!tickOptions.processNewMacroTasksSynchronously) {
const idx = this._schedulerQueue.indexOf(current);
if (idx >= 0) {
this._schedulerQueue.splice(idx, 1);
}
else {
// Time to run scheduled function. Remove it from the head of queue.
let current = schedulerQueue.shift();
if (!tickOptions.processNewMacroTasksSynchronously) {
const idx = this._schedulerQueue.indexOf(current);
if (idx >= 0) {
this._schedulerQueue.splice(idx, 1);
}
lastCurrentTime = this._currentTickTime;
this._currentTickTime = current.endTime;
if (doTick) {
doTick(this._currentTickTime - lastCurrentTime);
}
let retval = current.func.apply(global, current.isRequestAnimationFrame ? [this._currentTickTime] : current.args);
if (!retval) {
// Uncaught exception in the current scheduled function. Stop processing the queue.
break;
}
// check is there any requeue periodic entry is added in
// current loop, if there is, we need to add to current loop
if (!tickOptions.processNewMacroTasksSynchronously) {
this._currentTickRequeuePeriodicEntries.forEach(newEntry => {
let i = 0;
for (; i < schedulerQueue.length; i++) {
const currentEntry = schedulerQueue[i];
if (newEntry.endTime < currentEntry.endTime) {
break;
}
}
schedulerQueue.splice(i, 0, newEntry);
});
}
}
}
lastCurrentTime = this._currentTickTime;
this._currentTickTime = finalTime;
if (doTick) {
doTick(this._currentTickTime - lastCurrentTime);
}
}
flushOnlyPendingTimers(doTick) {
if (this._schedulerQueue.length === 0) {
return 0;
}
// Find the last task currently queued in the scheduler queue and tick
// till that time.
const startTime = this._currentTickTime;
const lastTask = this._schedulerQueue[this._schedulerQueue.length - 1];
this.tick(lastTask.endTime - startTime, doTick, { processNewMacroTasksSynchronously: false });
return this._currentTickTime - startTime;
}
flush(limit = 20, flushPeriodic = false, doTick) {
if (flushPeriodic) {
return this.flushPeriodic(doTick);
}
else {
return this.flushNonPeriodic(limit, doTick);
}
}
flushPeriodic(doTick) {
if (this._schedulerQueue.length === 0) {
return 0;
}
// Find the last task currently queued in the scheduler queue and tick
// till that time.
const startTime = this._currentTickTime;
const lastTask = this._schedulerQueue[this._schedulerQueue.length - 1];
this.tick(lastTask.endTime - startTime, doTick);
return this._currentTickTime - startTime;
}
flushNonPeriodic(limit, doTick) {
const startTime = this._currentTickTime;
let lastCurrentTime = 0;
let count = 0;
while (this._schedulerQueue.length > 0) {
count++;
if (count > limit) {
throw new Error('flush failed after reaching the limit of ' + limit +
' tasks. Does your code use a polling timeout?');
}
// flush only non-periodic timers.
// If the only remaining tasks are periodic(or requestAnimationFrame), finish flushing.
if (this._schedulerQueue.filter(task => !task.isPeriodic && !task.isRequestAnimationFrame)
.length === 0) {
break;
}
const current = this._schedulerQueue.shift();
lastCurrentTime = this._currentTickTime;
this._currentTickTime = current.endTime;
if (doTick) {
// Update any secondary schedulers like Jasmine mock Date.
doTick(this._currentTickTime - lastCurrentTime);
}
const retval = current.func.apply(global, current.args);
let retval = current.func.apply(global, current.isRequestAnimationFrame ? [this._currentTickTime] : current.args);
if (!retval) {

@@ -246,487 +174,597 @@ // Uncaught exception in the current scheduled function. Stop processing the queue.

}
// check is there any requeue periodic entry is added in
// current loop, if there is, we need to add to current loop
if (!tickOptions.processNewMacroTasksSynchronously) {
this._currentTickRequeuePeriodicEntries.forEach((newEntry) => {
let i = 0;
for (; i < schedulerQueue.length; i++) {
const currentEntry = schedulerQueue[i];
if (newEntry.endTime < currentEntry.endTime) {
break;
}
}
schedulerQueue.splice(i, 0, newEntry);
});
}
}
return this._currentTickTime - startTime;
}
lastCurrentTime = this._currentTickTime;
this._currentTickTime = finalTime;
if (doTick) {
doTick(this._currentTickTime - lastCurrentTime);
}
}
class FakeAsyncTestZoneSpec {
static assertInZone() {
if (Zone.current.get('FakeAsyncTestZoneSpec') == null) {
throw new Error('The code should be running in the fakeAsync zone to call this function');
}
flushOnlyPendingTimers(doTick) {
if (this._schedulerQueue.length === 0) {
return 0;
}
constructor(namePrefix, trackPendingRequestAnimationFrame = false, macroTaskOptions) {
this.trackPendingRequestAnimationFrame = trackPendingRequestAnimationFrame;
this.macroTaskOptions = macroTaskOptions;
this._scheduler = new Scheduler();
this._microtasks = [];
this._lastError = null;
this._uncaughtPromiseErrors = Promise[Zone.__symbol__('uncaughtPromiseErrors')];
this.pendingPeriodicTimers = [];
this.pendingTimers = [];
this.patchDateLocked = false;
this.properties = { 'FakeAsyncTestZoneSpec': this };
this.name = 'fakeAsyncTestZone for ' + namePrefix;
// in case user can't access the construction of FakeAsyncTestSpec
// user can also define macroTaskOptions by define a global variable.
if (!this.macroTaskOptions) {
this.macroTaskOptions = global[Zone.__symbol__('FakeAsyncTestMacroTask')];
}
// Find the last task currently queued in the scheduler queue and tick
// till that time.
const startTime = this._currentTickTime;
const lastTask = this._schedulerQueue[this._schedulerQueue.length - 1];
this.tick(lastTask.endTime - startTime, doTick, { processNewMacroTasksSynchronously: false });
return this._currentTickTime - startTime;
}
flush(limit = 20, flushPeriodic = false, doTick) {
if (flushPeriodic) {
return this.flushPeriodic(doTick);
}
_fnAndFlush(fn, completers) {
return (...args) => {
fn.apply(global, args);
if (this._lastError === null) { // Success
if (completers.onSuccess != null) {
completers.onSuccess.apply(global);
}
// Flush microtasks only on success.
this.flushMicrotasks();
}
else { // Failure
if (completers.onError != null) {
completers.onError.apply(global);
}
}
// Return true if there were no errors, false otherwise.
return this._lastError === null;
};
else {
return this.flushNonPeriodic(limit, doTick);
}
static _removeTimer(timers, id) {
let index = timers.indexOf(id);
if (index > -1) {
timers.splice(index, 1);
}
flushPeriodic(doTick) {
if (this._schedulerQueue.length === 0) {
return 0;
}
// Find the last task currently queued in the scheduler queue and tick
// till that time.
const startTime = this._currentTickTime;
const lastTask = this._schedulerQueue[this._schedulerQueue.length - 1];
this.tick(lastTask.endTime - startTime, doTick);
return this._currentTickTime - startTime;
}
flushNonPeriodic(limit, doTick) {
const startTime = this._currentTickTime;
let lastCurrentTime = 0;
let count = 0;
while (this._schedulerQueue.length > 0) {
count++;
if (count > limit) {
throw new Error('flush failed after reaching the limit of ' +
limit +
' tasks. Does your code use a polling timeout?');
}
// flush only non-periodic timers.
// If the only remaining tasks are periodic(or requestAnimationFrame), finish flushing.
if (this._schedulerQueue.filter((task) => !task.isPeriodic && !task.isRequestAnimationFrame)
.length === 0) {
break;
}
const current = this._schedulerQueue.shift();
lastCurrentTime = this._currentTickTime;
this._currentTickTime = current.endTime;
if (doTick) {
// Update any secondary schedulers like Jasmine mock Date.
doTick(this._currentTickTime - lastCurrentTime);
}
const retval = current.func.apply(global, current.args);
if (!retval) {
// Uncaught exception in the current scheduled function. Stop processing the queue.
break;
}
}
_dequeueTimer(id) {
return () => {
FakeAsyncTestZoneSpec._removeTimer(this.pendingTimers, id);
};
return this._currentTickTime - startTime;
}
}
class FakeAsyncTestZoneSpec {
static assertInZone() {
if (Zone.current.get('FakeAsyncTestZoneSpec') == null) {
throw new Error('The code should be running in the fakeAsync zone to call this function');
}
_requeuePeriodicTimer(fn, interval, args, id) {
return () => {
// Requeue the timer callback if it's not been canceled.
if (this.pendingPeriodicTimers.indexOf(id) !== -1) {
this._scheduler.scheduleFunction(fn, interval, { args, isPeriodic: true, id, isRequeuePeriodic: true });
}
constructor(namePrefix, trackPendingRequestAnimationFrame = false, macroTaskOptions) {
this.trackPendingRequestAnimationFrame = trackPendingRequestAnimationFrame;
this.macroTaskOptions = macroTaskOptions;
this._scheduler = new Scheduler();
this._microtasks = [];
this._lastError = null;
this._uncaughtPromiseErrors = Promise[Zone.__symbol__('uncaughtPromiseErrors')];
this.pendingPeriodicTimers = [];
this.pendingTimers = [];
this.patchDateLocked = false;
this.properties = { 'FakeAsyncTestZoneSpec': this };
this.name = 'fakeAsyncTestZone for ' + namePrefix;
// in case user can't access the construction of FakeAsyncTestSpec
// user can also define macroTaskOptions by define a global variable.
if (!this.macroTaskOptions) {
this.macroTaskOptions = global[Zone.__symbol__('FakeAsyncTestMacroTask')];
}
}
_fnAndFlush(fn, completers) {
return (...args) => {
fn.apply(global, args);
if (this._lastError === null) {
// Success
if (completers.onSuccess != null) {
completers.onSuccess.apply(global);
}
};
}
_dequeuePeriodicTimer(id) {
return () => {
FakeAsyncTestZoneSpec._removeTimer(this.pendingPeriodicTimers, id);
};
}
_setTimeout(fn, delay, args, isTimer = true) {
let removeTimerFn = this._dequeueTimer(Scheduler.nextId);
// Queue the callback and dequeue the timer on success and error.
let cb = this._fnAndFlush(fn, { onSuccess: removeTimerFn, onError: removeTimerFn });
let id = this._scheduler.scheduleFunction(cb, delay, { args, isRequestAnimationFrame: !isTimer });
if (isTimer) {
this.pendingTimers.push(id);
// Flush microtasks only on success.
this.flushMicrotasks();
}
return id;
else {
// Failure
if (completers.onError != null) {
completers.onError.apply(global);
}
}
// Return true if there were no errors, false otherwise.
return this._lastError === null;
};
}
static _removeTimer(timers, id) {
let index = timers.indexOf(id);
if (index > -1) {
timers.splice(index, 1);
}
_clearTimeout(id) {
}
_dequeueTimer(id) {
return () => {
FakeAsyncTestZoneSpec._removeTimer(this.pendingTimers, id);
this._scheduler.removeScheduledFunctionWithId(id);
}
_setInterval(fn, interval, args) {
let id = Scheduler.nextId;
let completers = { onSuccess: null, onError: this._dequeuePeriodicTimer(id) };
let cb = this._fnAndFlush(fn, completers);
// Use the callback created above to requeue on success.
completers.onSuccess = this._requeuePeriodicTimer(cb, interval, args, id);
// Queue the callback and dequeue the periodic timer only on error.
this._scheduler.scheduleFunction(cb, interval, { args, isPeriodic: true });
this.pendingPeriodicTimers.push(id);
return id;
}
_clearInterval(id) {
};
}
_requeuePeriodicTimer(fn, interval, args, id) {
return () => {
// Requeue the timer callback if it's not been canceled.
if (this.pendingPeriodicTimers.indexOf(id) !== -1) {
this._scheduler.scheduleFunction(fn, interval, {
args,
isPeriodic: true,
id,
isRequeuePeriodic: true,
});
}
};
}
_dequeuePeriodicTimer(id) {
return () => {
FakeAsyncTestZoneSpec._removeTimer(this.pendingPeriodicTimers, id);
this._scheduler.removeScheduledFunctionWithId(id);
};
}
_setTimeout(fn, delay, args, isTimer = true) {
let removeTimerFn = this._dequeueTimer(Scheduler.nextId);
// Queue the callback and dequeue the timer on success and error.
let cb = this._fnAndFlush(fn, { onSuccess: removeTimerFn, onError: removeTimerFn });
let id = this._scheduler.scheduleFunction(cb, delay, { args, isRequestAnimationFrame: !isTimer });
if (isTimer) {
this.pendingTimers.push(id);
}
_resetLastErrorAndThrow() {
let error = this._lastError || this._uncaughtPromiseErrors[0];
this._uncaughtPromiseErrors.length = 0;
this._lastError = null;
throw error;
return id;
}
_clearTimeout(id) {
FakeAsyncTestZoneSpec._removeTimer(this.pendingTimers, id);
this._scheduler.removeScheduledFunctionWithId(id);
}
_setInterval(fn, interval, args) {
let id = Scheduler.nextId;
let completers = { onSuccess: null, onError: this._dequeuePeriodicTimer(id) };
let cb = this._fnAndFlush(fn, completers);
// Use the callback created above to requeue on success.
completers.onSuccess = this._requeuePeriodicTimer(cb, interval, args, id);
// Queue the callback and dequeue the periodic timer only on error.
this._scheduler.scheduleFunction(cb, interval, { args, isPeriodic: true });
this.pendingPeriodicTimers.push(id);
return id;
}
_clearInterval(id) {
FakeAsyncTestZoneSpec._removeTimer(this.pendingPeriodicTimers, id);
this._scheduler.removeScheduledFunctionWithId(id);
}
_resetLastErrorAndThrow() {
let error = this._lastError || this._uncaughtPromiseErrors[0];
this._uncaughtPromiseErrors.length = 0;
this._lastError = null;
throw error;
}
getCurrentTickTime() {
return this._scheduler.getCurrentTickTime();
}
getFakeSystemTime() {
return this._scheduler.getFakeSystemTime();
}
setFakeBaseSystemTime(realTime) {
this._scheduler.setFakeBaseSystemTime(realTime);
}
getRealSystemTime() {
return this._scheduler.getRealSystemTime();
}
static patchDate() {
if (!!global[Zone.__symbol__('disableDatePatching')]) {
// we don't want to patch global Date
// because in some case, global Date
// is already being patched, we need to provide
// an option to let user still use their
// own version of Date.
return;
}
getCurrentTickTime() {
return this._scheduler.getCurrentTickTime();
if (global['Date'] === FakeDate) {
// already patched
return;
}
getFakeSystemTime() {
return this._scheduler.getFakeSystemTime();
global['Date'] = FakeDate;
FakeDate.prototype = OriginalDate.prototype;
// try check and reset timers
// because jasmine.clock().install() may
// have replaced the global timer
FakeAsyncTestZoneSpec.checkTimerPatch();
}
static resetDate() {
if (global['Date'] === FakeDate) {
global['Date'] = OriginalDate;
}
setFakeBaseSystemTime(realTime) {
this._scheduler.setFakeBaseSystemTime(realTime);
}
static checkTimerPatch() {
if (!patchedTimers) {
throw new Error('Expected timers to have been patched.');
}
getRealSystemTime() {
return this._scheduler.getRealSystemTime();
if (global.setTimeout !== patchedTimers.setTimeout) {
global.setTimeout = patchedTimers.setTimeout;
global.clearTimeout = patchedTimers.clearTimeout;
}
static patchDate() {
if (!!global[Zone.__symbol__('disableDatePatching')]) {
// we don't want to patch global Date
// because in some case, global Date
// is already being patched, we need to provide
// an option to let user still use their
// own version of Date.
return;
}
if (global['Date'] === FakeDate) {
// already patched
return;
}
global['Date'] = FakeDate;
FakeDate.prototype = OriginalDate.prototype;
// try check and reset timers
// because jasmine.clock().install() may
// have replaced the global timer
FakeAsyncTestZoneSpec.checkTimerPatch();
if (global.setInterval !== patchedTimers.setInterval) {
global.setInterval = patchedTimers.setInterval;
global.clearInterval = patchedTimers.clearInterval;
}
static resetDate() {
if (global['Date'] === FakeDate) {
global['Date'] = OriginalDate;
}
}
lockDatePatch() {
this.patchDateLocked = true;
FakeAsyncTestZoneSpec.patchDate();
}
unlockDatePatch() {
this.patchDateLocked = false;
FakeAsyncTestZoneSpec.resetDate();
}
tickToNext(steps = 1, doTick, tickOptions = { processNewMacroTasksSynchronously: true }) {
if (steps <= 0) {
return;
}
static checkTimerPatch() {
if (global.setTimeout !== timers.setTimeout) {
global.setTimeout = timers.setTimeout;
global.clearTimeout = timers.clearTimeout;
}
if (global.setInterval !== timers.setInterval) {
global.setInterval = timers.setInterval;
global.clearInterval = timers.clearInterval;
}
FakeAsyncTestZoneSpec.assertInZone();
this.flushMicrotasks();
this._scheduler.tickToNext(steps, doTick, tickOptions);
if (this._lastError !== null) {
this._resetLastErrorAndThrow();
}
lockDatePatch() {
this.patchDateLocked = true;
FakeAsyncTestZoneSpec.patchDate();
}
tick(millis = 0, doTick, tickOptions = { processNewMacroTasksSynchronously: true }) {
FakeAsyncTestZoneSpec.assertInZone();
this.flushMicrotasks();
this._scheduler.tick(millis, doTick, tickOptions);
if (this._lastError !== null) {
this._resetLastErrorAndThrow();
}
unlockDatePatch() {
this.patchDateLocked = false;
FakeAsyncTestZoneSpec.resetDate();
}
tickToNext(steps = 1, doTick, tickOptions = { processNewMacroTasksSynchronously: true }) {
if (steps <= 0) {
return;
}
FakeAsyncTestZoneSpec.assertInZone();
this.flushMicrotasks();
this._scheduler.tickToNext(steps, doTick, tickOptions);
if (this._lastError !== null) {
}
flushMicrotasks() {
FakeAsyncTestZoneSpec.assertInZone();
const flushErrors = () => {
if (this._lastError !== null || this._uncaughtPromiseErrors.length) {
// If there is an error stop processing the microtask queue and rethrow the error.
this._resetLastErrorAndThrow();
}
};
while (this._microtasks.length > 0) {
let microtask = this._microtasks.shift();
microtask.func.apply(microtask.target, microtask.args);
}
tick(millis = 0, doTick, tickOptions = { processNewMacroTasksSynchronously: true }) {
FakeAsyncTestZoneSpec.assertInZone();
this.flushMicrotasks();
this._scheduler.tick(millis, doTick, tickOptions);
if (this._lastError !== null) {
this._resetLastErrorAndThrow();
}
flushErrors();
}
flush(limit, flushPeriodic, doTick) {
FakeAsyncTestZoneSpec.assertInZone();
this.flushMicrotasks();
const elapsed = this._scheduler.flush(limit, flushPeriodic, doTick);
if (this._lastError !== null) {
this._resetLastErrorAndThrow();
}
flushMicrotasks() {
FakeAsyncTestZoneSpec.assertInZone();
const flushErrors = () => {
if (this._lastError !== null || this._uncaughtPromiseErrors.length) {
// If there is an error stop processing the microtask queue and rethrow the error.
this._resetLastErrorAndThrow();
return elapsed;
}
flushOnlyPendingTimers(doTick) {
FakeAsyncTestZoneSpec.assertInZone();
this.flushMicrotasks();
const elapsed = this._scheduler.flushOnlyPendingTimers(doTick);
if (this._lastError !== null) {
this._resetLastErrorAndThrow();
}
return elapsed;
}
removeAllTimers() {
FakeAsyncTestZoneSpec.assertInZone();
this._scheduler.removeAll();
this.pendingPeriodicTimers = [];
this.pendingTimers = [];
}
getTimerCount() {
return this._scheduler.getTimerCount() + this._microtasks.length;
}
onScheduleTask(delegate, current, target, task) {
switch (task.type) {
case 'microTask':
let args = task.data && task.data.args;
// should pass additional arguments to callback if have any
// currently we know process.nextTick will have such additional
// arguments
let additionalArgs;
if (args) {
let callbackIndex = task.data.cbIdx;
if (typeof args.length === 'number' && args.length > callbackIndex + 1) {
additionalArgs = Array.prototype.slice.call(args, callbackIndex + 1);
}
}
};
while (this._microtasks.length > 0) {
let microtask = this._microtasks.shift();
microtask.func.apply(microtask.target, microtask.args);
}
flushErrors();
this._microtasks.push({
func: task.invoke,
args: additionalArgs,
target: task.data && task.data.target,
});
break;
case 'macroTask':
switch (task.source) {
case 'setTimeout':
task.data['handleId'] = this._setTimeout(task.invoke, task.data['delay'], Array.prototype.slice.call(task.data['args'], 2));
break;
case 'setImmediate':
task.data['handleId'] = this._setTimeout(task.invoke, 0, Array.prototype.slice.call(task.data['args'], 1));
break;
case 'setInterval':
task.data['handleId'] = this._setInterval(task.invoke, task.data['delay'], Array.prototype.slice.call(task.data['args'], 2));
break;
case 'XMLHttpRequest.send':
throw new Error('Cannot make XHRs from within a fake async test. Request URL: ' +
task.data['url']);
case 'requestAnimationFrame':
case 'webkitRequestAnimationFrame':
case 'mozRequestAnimationFrame':
// Simulate a requestAnimationFrame by using a setTimeout with 16 ms.
// (60 frames per second)
task.data['handleId'] = this._setTimeout(task.invoke, 16, task.data['args'], this.trackPendingRequestAnimationFrame);
break;
default:
// user can define which macroTask they want to support by passing
// macroTaskOptions
const macroTaskOption = this.findMacroTaskOption(task);
if (macroTaskOption) {
const args = task.data && task.data['args'];
const delay = args && args.length > 1 ? args[1] : 0;
let callbackArgs = macroTaskOption.callbackArgs ? macroTaskOption.callbackArgs : args;
if (!!macroTaskOption.isPeriodic) {
// periodic macroTask, use setInterval to simulate
task.data['handleId'] = this._setInterval(task.invoke, delay, callbackArgs);
task.data.isPeriodic = true;
}
else {
// not periodic, use setTimeout to simulate
task.data['handleId'] = this._setTimeout(task.invoke, delay, callbackArgs);
}
break;
}
throw new Error('Unknown macroTask scheduled in fake async test: ' + task.source);
}
break;
case 'eventTask':
task = delegate.scheduleTask(target, task);
break;
}
flush(limit, flushPeriodic, doTick) {
FakeAsyncTestZoneSpec.assertInZone();
this.flushMicrotasks();
const elapsed = this._scheduler.flush(limit, flushPeriodic, doTick);
if (this._lastError !== null) {
this._resetLastErrorAndThrow();
return task;
}
onCancelTask(delegate, current, target, task) {
switch (task.source) {
case 'setTimeout':
case 'requestAnimationFrame':
case 'webkitRequestAnimationFrame':
case 'mozRequestAnimationFrame':
return this._clearTimeout(task.data['handleId']);
case 'setInterval':
return this._clearInterval(task.data['handleId']);
default:
// user can define which macroTask they want to support by passing
// macroTaskOptions
const macroTaskOption = this.findMacroTaskOption(task);
if (macroTaskOption) {
const handleId = task.data['handleId'];
return macroTaskOption.isPeriodic
? this._clearInterval(handleId)
: this._clearTimeout(handleId);
}
return delegate.cancelTask(target, task);
}
}
onInvoke(delegate, current, target, callback, applyThis, applyArgs, source) {
try {
FakeAsyncTestZoneSpec.patchDate();
return delegate.invoke(target, callback, applyThis, applyArgs, source);
}
finally {
if (!this.patchDateLocked) {
FakeAsyncTestZoneSpec.resetDate();
}
return elapsed;
}
flushOnlyPendingTimers(doTick) {
FakeAsyncTestZoneSpec.assertInZone();
this.flushMicrotasks();
const elapsed = this._scheduler.flushOnlyPendingTimers(doTick);
if (this._lastError !== null) {
this._resetLastErrorAndThrow();
}
findMacroTaskOption(task) {
if (!this.macroTaskOptions) {
return null;
}
for (let i = 0; i < this.macroTaskOptions.length; i++) {
const macroTaskOption = this.macroTaskOptions[i];
if (macroTaskOption.source === task.source) {
return macroTaskOption;
}
return elapsed;
}
removeAllTimers() {
FakeAsyncTestZoneSpec.assertInZone();
this._scheduler.removeAll();
this.pendingPeriodicTimers = [];
this.pendingTimers = [];
return null;
}
onHandleError(parentZoneDelegate, currentZone, targetZone, error) {
this._lastError = error;
return false; // Don't propagate error to parent zone.
}
}
let _fakeAsyncTestZoneSpec = null;
function getProxyZoneSpec() {
return Zone && Zone['ProxyZoneSpec'];
}
/**
* Clears out the shared fake async zone for a test.
* To be called in a global `beforeEach`.
*
* @experimental
*/
function resetFakeAsyncZone() {
if (_fakeAsyncTestZoneSpec) {
_fakeAsyncTestZoneSpec.unlockDatePatch();
}
_fakeAsyncTestZoneSpec = null;
// in node.js testing we may not have ProxyZoneSpec in which case there is nothing to reset.
getProxyZoneSpec() && getProxyZoneSpec().assertPresent().resetDelegate();
}
/**
* Wraps a function to be executed in the fakeAsync zone:
* - microtasks are manually executed by calling `flushMicrotasks()`,
* - timers are synchronous, `tick()` simulates the asynchronous passage of time.
*
* If there are any pending timers at the end of the function, an exception will be thrown.
*
* Can be used to wrap inject() calls.
*
* ## Example
*
* {@example core/testing/ts/fake_async.ts region='basic'}
*
* @param fn
* @returns The function wrapped to be executed in the fakeAsync zone
*
* @experimental
*/
function fakeAsync(fn) {
// Not using an arrow function to preserve context passed from call site
const fakeAsyncFn = function (...args) {
const ProxyZoneSpec = getProxyZoneSpec();
if (!ProxyZoneSpec) {
throw new Error('ProxyZoneSpec is needed for the async() test helper but could not be found. ' +
'Please make sure that your environment includes zone.js/plugins/proxy');
}
getTimerCount() {
return this._scheduler.getTimerCount() + this._microtasks.length;
const proxyZoneSpec = ProxyZoneSpec.assertPresent();
if (Zone.current.get('FakeAsyncTestZoneSpec')) {
throw new Error('fakeAsync() calls can not be nested');
}
onScheduleTask(delegate, current, target, task) {
switch (task.type) {
case 'microTask':
let args = task.data && task.data.args;
// should pass additional arguments to callback if have any
// currently we know process.nextTick will have such additional
// arguments
let additionalArgs;
if (args) {
let callbackIndex = task.data.cbIdx;
if (typeof args.length === 'number' && args.length > callbackIndex + 1) {
additionalArgs = Array.prototype.slice.call(args, callbackIndex + 1);
}
}
this._microtasks.push({
func: task.invoke,
args: additionalArgs,
target: task.data && task.data.target
});
break;
case 'macroTask':
switch (task.source) {
case 'setTimeout':
task.data['handleId'] = this._setTimeout(task.invoke, task.data['delay'], Array.prototype.slice.call(task.data['args'], 2));
break;
case 'setImmediate':
task.data['handleId'] = this._setTimeout(task.invoke, 0, Array.prototype.slice.call(task.data['args'], 1));
break;
case 'setInterval':
task.data['handleId'] = this._setInterval(task.invoke, task.data['delay'], Array.prototype.slice.call(task.data['args'], 2));
break;
case 'XMLHttpRequest.send':
throw new Error('Cannot make XHRs from within a fake async test. Request URL: ' +
task.data['url']);
case 'requestAnimationFrame':
case 'webkitRequestAnimationFrame':
case 'mozRequestAnimationFrame':
// Simulate a requestAnimationFrame by using a setTimeout with 16 ms.
// (60 frames per second)
task.data['handleId'] = this._setTimeout(task.invoke, 16, task.data['args'], this.trackPendingRequestAnimationFrame);
break;
default:
// user can define which macroTask they want to support by passing
// macroTaskOptions
const macroTaskOption = this.findMacroTaskOption(task);
if (macroTaskOption) {
const args = task.data && task.data['args'];
const delay = args && args.length > 1 ? args[1] : 0;
let callbackArgs = macroTaskOption.callbackArgs ? macroTaskOption.callbackArgs : args;
if (!!macroTaskOption.isPeriodic) {
// periodic macroTask, use setInterval to simulate
task.data['handleId'] = this._setInterval(task.invoke, delay, callbackArgs);
task.data.isPeriodic = true;
}
else {
// not periodic, use setTimeout to simulate
task.data['handleId'] = this._setTimeout(task.invoke, delay, callbackArgs);
}
break;
}
throw new Error('Unknown macroTask scheduled in fake async test: ' + task.source);
}
break;
case 'eventTask':
task = delegate.scheduleTask(target, task);
break;
try {
// in case jasmine.clock init a fakeAsyncTestZoneSpec
if (!_fakeAsyncTestZoneSpec) {
const FakeAsyncTestZoneSpec = Zone && Zone['FakeAsyncTestZoneSpec'];
if (proxyZoneSpec.getDelegate() instanceof FakeAsyncTestZoneSpec) {
throw new Error('fakeAsync() calls can not be nested');
}
_fakeAsyncTestZoneSpec = new FakeAsyncTestZoneSpec();
}
return task;
}
onCancelTask(delegate, current, target, task) {
switch (task.source) {
case 'setTimeout':
case 'requestAnimationFrame':
case 'webkitRequestAnimationFrame':
case 'mozRequestAnimationFrame':
return this._clearTimeout(task.data['handleId']);
case 'setInterval':
return this._clearInterval(task.data['handleId']);
default:
// user can define which macroTask they want to support by passing
// macroTaskOptions
const macroTaskOption = this.findMacroTaskOption(task);
if (macroTaskOption) {
const handleId = task.data['handleId'];
return macroTaskOption.isPeriodic ? this._clearInterval(handleId) :
this._clearTimeout(handleId);
}
return delegate.cancelTask(target, task);
}
}
onInvoke(delegate, current, target, callback, applyThis, applyArgs, source) {
let res;
const lastProxyZoneSpec = proxyZoneSpec.getDelegate();
proxyZoneSpec.setDelegate(_fakeAsyncTestZoneSpec);
_fakeAsyncTestZoneSpec.lockDatePatch();
try {
FakeAsyncTestZoneSpec.patchDate();
return delegate.invoke(target, callback, applyThis, applyArgs, source);
res = fn.apply(this, args);
flushMicrotasks();
}
finally {
if (!this.patchDateLocked) {
FakeAsyncTestZoneSpec.resetDate();
}
proxyZoneSpec.setDelegate(lastProxyZoneSpec);
}
}
findMacroTaskOption(task) {
if (!this.macroTaskOptions) {
return null;
if (_fakeAsyncTestZoneSpec.pendingPeriodicTimers.length > 0) {
throw new Error(`${_fakeAsyncTestZoneSpec.pendingPeriodicTimers.length} ` +
`periodic timer(s) still in the queue.`);
}
for (let i = 0; i < this.macroTaskOptions.length; i++) {
const macroTaskOption = this.macroTaskOptions[i];
if (macroTaskOption.source === task.source) {
return macroTaskOption;
}
if (_fakeAsyncTestZoneSpec.pendingTimers.length > 0) {
throw new Error(`${_fakeAsyncTestZoneSpec.pendingTimers.length} timer(s) still in the queue.`);
}
return null;
return res;
}
onHandleError(parentZoneDelegate, currentZone, targetZone, error) {
this._lastError = error;
return false; // Don't propagate error to parent zone.
finally {
resetFakeAsyncZone();
}
};
fakeAsyncFn.isFakeAsync = true;
return fakeAsyncFn;
}
function _getFakeAsyncZoneSpec() {
if (_fakeAsyncTestZoneSpec == null) {
_fakeAsyncTestZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');
if (_fakeAsyncTestZoneSpec == null) {
throw new Error('The code should be running in the fakeAsync zone to call this function');
}
}
return _fakeAsyncTestZoneSpec;
}
/**
* Simulates the asynchronous passage of time for the timers in the fakeAsync zone.
*
* The microtasks queue is drained at the very start of this function and after any timer
* callback has been executed.
*
* ## Example
*
* {@example core/testing/ts/fake_async.ts region='basic'}
*
* @experimental
*/
function tick(millis = 0, ignoreNestedTimeout = false) {
_getFakeAsyncZoneSpec().tick(millis, null, ignoreNestedTimeout);
}
/**
* Simulates the asynchronous passage of time for the timers in the fakeAsync zone by
* draining the macrotask queue until it is empty. The returned value is the milliseconds
* of time that would have been elapsed.
*
* @param maxTurns
* @returns The simulated time elapsed, in millis.
*
* @experimental
*/
function flush(maxTurns) {
return _getFakeAsyncZoneSpec().flush(maxTurns);
}
/**
* Discard all remaining periodic tasks.
*
* @experimental
*/
function discardPeriodicTasks() {
const zoneSpec = _getFakeAsyncZoneSpec();
zoneSpec.pendingPeriodicTimers;
zoneSpec.pendingPeriodicTimers.length = 0;
}
/**
* Flush any pending microtasks.
*
* @experimental
*/
function flushMicrotasks() {
_getFakeAsyncZoneSpec().flushMicrotasks();
}
function patchFakeAsyncTest(Zone) {
// Export the class so that new instances can be created with proper
// constructor params.
Zone['FakeAsyncTestZoneSpec'] = FakeAsyncTestZoneSpec;
})(typeof window === 'object' && window || typeof self === 'object' && self || global);
Zone.__load_patch('fakeasync', (global, Zone, api) => {
const FakeAsyncTestZoneSpec = Zone && Zone['FakeAsyncTestZoneSpec'];
function getProxyZoneSpec() {
return Zone && Zone['ProxyZoneSpec'];
}
let _fakeAsyncTestZoneSpec = null;
/**
* Clears out the shared fake async zone for a test.
* To be called in a global `beforeEach`.
*
* @experimental
*/
function resetFakeAsyncZone() {
if (_fakeAsyncTestZoneSpec) {
_fakeAsyncTestZoneSpec.unlockDatePatch();
}
_fakeAsyncTestZoneSpec = null;
// in node.js testing we may not have ProxyZoneSpec in which case there is nothing to reset.
getProxyZoneSpec() && getProxyZoneSpec().assertPresent().resetDelegate();
}
/**
* Wraps a function to be executed in the fakeAsync zone:
* - microtasks are manually executed by calling `flushMicrotasks()`,
* - timers are synchronous, `tick()` simulates the asynchronous passage of time.
*
* If there are any pending timers at the end of the function, an exception will be thrown.
*
* Can be used to wrap inject() calls.
*
* ## Example
*
* {@example core/testing/ts/fake_async.ts region='basic'}
*
* @param fn
* @returns The function wrapped to be executed in the fakeAsync zone
*
* @experimental
*/
function fakeAsync(fn) {
// Not using an arrow function to preserve context passed from call site
const fakeAsyncFn = function (...args) {
const ProxyZoneSpec = getProxyZoneSpec();
if (!ProxyZoneSpec) {
throw new Error('ProxyZoneSpec is needed for the async() test helper but could not be found. ' +
'Please make sure that your environment includes zone.js/plugins/proxy');
}
const proxyZoneSpec = ProxyZoneSpec.assertPresent();
if (Zone.current.get('FakeAsyncTestZoneSpec')) {
throw new Error('fakeAsync() calls can not be nested');
}
try {
// in case jasmine.clock init a fakeAsyncTestZoneSpec
if (!_fakeAsyncTestZoneSpec) {
if (proxyZoneSpec.getDelegate() instanceof FakeAsyncTestZoneSpec) {
throw new Error('fakeAsync() calls can not be nested');
}
_fakeAsyncTestZoneSpec = new FakeAsyncTestZoneSpec();
}
let res;
const lastProxyZoneSpec = proxyZoneSpec.getDelegate();
proxyZoneSpec.setDelegate(_fakeAsyncTestZoneSpec);
_fakeAsyncTestZoneSpec.lockDatePatch();
try {
res = fn.apply(this, args);
flushMicrotasks();
}
finally {
proxyZoneSpec.setDelegate(lastProxyZoneSpec);
}
if (_fakeAsyncTestZoneSpec.pendingPeriodicTimers.length > 0) {
throw new Error(`${_fakeAsyncTestZoneSpec.pendingPeriodicTimers.length} ` +
`periodic timer(s) still in the queue.`);
}
if (_fakeAsyncTestZoneSpec.pendingTimers.length > 0) {
throw new Error(`${_fakeAsyncTestZoneSpec.pendingTimers.length} timer(s) still in the queue.`);
}
return res;
}
finally {
resetFakeAsyncZone();
}
Zone.__load_patch('fakeasync', (global, Zone, api) => {
Zone[api.symbol('fakeAsyncTest')] = {
resetFakeAsyncZone,
flushMicrotasks,
discardPeriodicTasks,
tick,
flush,
fakeAsync,
};
fakeAsyncFn.isFakeAsync = true;
return fakeAsyncFn;
}
function _getFakeAsyncZoneSpec() {
if (_fakeAsyncTestZoneSpec == null) {
_fakeAsyncTestZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');
if (_fakeAsyncTestZoneSpec == null) {
throw new Error('The code should be running in the fakeAsync zone to call this function');
}
}
return _fakeAsyncTestZoneSpec;
}
/**
* Simulates the asynchronous passage of time for the timers in the fakeAsync zone.
*
* The microtasks queue is drained at the very start of this function and after any timer callback
* has been executed.
*
* ## Example
*
* {@example core/testing/ts/fake_async.ts region='basic'}
*
* @experimental
*/
function tick(millis = 0, ignoreNestedTimeout = false) {
_getFakeAsyncZoneSpec().tick(millis, null, ignoreNestedTimeout);
}
/**
* Simulates the asynchronous passage of time for the timers in the fakeAsync zone by
* draining the macrotask queue until it is empty. The returned value is the milliseconds
* of time that would have been elapsed.
*
* @param maxTurns
* @returns The simulated time elapsed, in millis.
*
* @experimental
*/
function flush(maxTurns) {
return _getFakeAsyncZoneSpec().flush(maxTurns);
}
/**
* Discard all remaining periodic tasks.
*
* @experimental
*/
function discardPeriodicTasks() {
const zoneSpec = _getFakeAsyncZoneSpec();
zoneSpec.pendingPeriodicTimers;
zoneSpec.pendingPeriodicTimers.length = 0;
}
/**
* Flush any pending microtasks.
*
* @experimental
*/
function flushMicrotasks() {
_getFakeAsyncZoneSpec().flushMicrotasks();
}
Zone[api.symbol('fakeAsyncTest')] =
{ resetFakeAsyncZone, flushMicrotasks, discardPeriodicTasks, tick, flush, fakeAsync };
}, true);
}, true);
patchedTimers = {
setTimeout: global.setTimeout,
setInterval: global.setInterval,
clearTimeout: global.clearTimeout,
clearInterval: global.clearInterval,
nativeSetTimeout: global[Zone.__symbol__('setTimeout')],
nativeClearTimeout: global[Zone.__symbol__('clearTimeout')],
};
Scheduler.nextId = Scheduler.getNextId();
}
patchFakeAsyncTest(Zone);
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/!function(e){const t=e.Date;function s(){if(0===arguments.length){const e=new t;return e.setTime(s.now()),e}{const e=Array.prototype.slice.call(arguments);return new t(...e)}}s.now=function(){const e=Zone.current.get("FakeAsyncTestZoneSpec");return e?e.getFakeSystemTime():t.now.apply(this,arguments)},s.UTC=t.UTC,s.parse=t.parse;const r={setTimeout:e.setTimeout,setInterval:e.setInterval,clearTimeout:e.clearTimeout,clearInterval:e.clearInterval};class i{static{this.nextId=1}constructor(){this._schedulerQueue=[],this._currentTickTime=0,this._currentFakeBaseSystemTime=t.now(),this._currentTickRequeuePeriodicEntries=[]}getCurrentTickTime(){return this._currentTickTime}getFakeSystemTime(){return this._currentFakeBaseSystemTime+this._currentTickTime}setFakeBaseSystemTime(e){this._currentFakeBaseSystemTime=e}getRealSystemTime(){return t.now()}scheduleFunction(e,t,s){let r=(s={args:[],isPeriodic:!1,isRequestAnimationFrame:!1,id:-1,isRequeuePeriodic:!1,...s}).id<0?i.nextId++:s.id,n={endTime:this._currentTickTime+t,id:r,func:e,args:s.args,delay:t,isPeriodic:s.isPeriodic,isRequestAnimationFrame:s.isRequestAnimationFrame};s.isRequeuePeriodic&&this._currentTickRequeuePeriodicEntries.push(n);let c=0;for(;c<this._schedulerQueue.length&&!(n.endTime<this._schedulerQueue[c].endTime);c++);return this._schedulerQueue.splice(c,0,n),r}removeScheduledFunctionWithId(e){for(let t=0;t<this._schedulerQueue.length;t++)if(this._schedulerQueue[t].id==e){this._schedulerQueue.splice(t,1);break}}removeAll(){this._schedulerQueue=[]}getTimerCount(){return this._schedulerQueue.length}tickToNext(e=1,t,s){this._schedulerQueue.length<e||this.tick(this._schedulerQueue[e-1].endTime-this._currentTickTime,t,s)}tick(t=0,s,r){let i=this._currentTickTime+t,n=0;const c=(r=Object.assign({processNewMacroTasksSynchronously:!0},r)).processNewMacroTasksSynchronously?this._schedulerQueue:this._schedulerQueue.slice();if(0===c.length&&s)s(t);else{for(;c.length>0&&(this._currentTickRequeuePeriodicEntries=[],!(i<c[0].endTime));){let t=c.shift();if(!r.processNewMacroTasksSynchronously){const e=this._schedulerQueue.indexOf(t);e>=0&&this._schedulerQueue.splice(e,1)}if(n=this._currentTickTime,this._currentTickTime=t.endTime,s&&s(this._currentTickTime-n),!t.func.apply(e,t.isRequestAnimationFrame?[this._currentTickTime]:t.args))break;r.processNewMacroTasksSynchronously||this._currentTickRequeuePeriodicEntries.forEach((e=>{let t=0;for(;t<c.length&&!(e.endTime<c[t].endTime);t++);c.splice(t,0,e)}))}n=this._currentTickTime,this._currentTickTime=i,s&&s(this._currentTickTime-n)}}flushOnlyPendingTimers(e){if(0===this._schedulerQueue.length)return 0;const t=this._currentTickTime;return this.tick(this._schedulerQueue[this._schedulerQueue.length-1].endTime-t,e,{processNewMacroTasksSynchronously:!1}),this._currentTickTime-t}flush(e=20,t=!1,s){return t?this.flushPeriodic(s):this.flushNonPeriodic(e,s)}flushPeriodic(e){if(0===this._schedulerQueue.length)return 0;const t=this._currentTickTime;return this.tick(this._schedulerQueue[this._schedulerQueue.length-1].endTime-t,e),this._currentTickTime-t}flushNonPeriodic(t,s){const r=this._currentTickTime;let i=0,n=0;for(;this._schedulerQueue.length>0;){if(n++,n>t)throw new Error("flush failed after reaching the limit of "+t+" tasks. Does your code use a polling timeout?");if(0===this._schedulerQueue.filter((e=>!e.isPeriodic&&!e.isRequestAnimationFrame)).length)break;const r=this._schedulerQueue.shift();if(i=this._currentTickTime,this._currentTickTime=r.endTime,s&&s(this._currentTickTime-i),!r.func.apply(e,r.args))break}return this._currentTickTime-r}}class n{static assertInZone(){if(null==Zone.current.get("FakeAsyncTestZoneSpec"))throw new Error("The code should be running in the fakeAsync zone to call this function")}constructor(t,s=!1,r){this.trackPendingRequestAnimationFrame=s,this.macroTaskOptions=r,this._scheduler=new i,this._microtasks=[],this._lastError=null,this._uncaughtPromiseErrors=Promise[Zone.__symbol__("uncaughtPromiseErrors")],this.pendingPeriodicTimers=[],this.pendingTimers=[],this.patchDateLocked=!1,this.properties={FakeAsyncTestZoneSpec:this},this.name="fakeAsyncTestZone for "+t,this.macroTaskOptions||(this.macroTaskOptions=e[Zone.__symbol__("FakeAsyncTestMacroTask")])}_fnAndFlush(t,s){return(...r)=>(t.apply(e,r),null===this._lastError?(null!=s.onSuccess&&s.onSuccess.apply(e),this.flushMicrotasks()):null!=s.onError&&s.onError.apply(e),null===this._lastError)}static _removeTimer(e,t){let s=e.indexOf(t);s>-1&&e.splice(s,1)}_dequeueTimer(e){return()=>{n._removeTimer(this.pendingTimers,e)}}_requeuePeriodicTimer(e,t,s,r){return()=>{-1!==this.pendingPeriodicTimers.indexOf(r)&&this._scheduler.scheduleFunction(e,t,{args:s,isPeriodic:!0,id:r,isRequeuePeriodic:!0})}}_dequeuePeriodicTimer(e){return()=>{n._removeTimer(this.pendingPeriodicTimers,e)}}_setTimeout(e,t,s,r=!0){let n=this._dequeueTimer(i.nextId),c=this._fnAndFlush(e,{onSuccess:n,onError:n}),a=this._scheduler.scheduleFunction(c,t,{args:s,isRequestAnimationFrame:!r});return r&&this.pendingTimers.push(a),a}_clearTimeout(e){n._removeTimer(this.pendingTimers,e),this._scheduler.removeScheduledFunctionWithId(e)}_setInterval(e,t,s){let r=i.nextId,n={onSuccess:null,onError:this._dequeuePeriodicTimer(r)},c=this._fnAndFlush(e,n);return n.onSuccess=this._requeuePeriodicTimer(c,t,s,r),this._scheduler.scheduleFunction(c,t,{args:s,isPeriodic:!0}),this.pendingPeriodicTimers.push(r),r}_clearInterval(e){n._removeTimer(this.pendingPeriodicTimers,e),this._scheduler.removeScheduledFunctionWithId(e)}_resetLastErrorAndThrow(){let e=this._lastError||this._uncaughtPromiseErrors[0];throw this._uncaughtPromiseErrors.length=0,this._lastError=null,e}getCurrentTickTime(){return this._scheduler.getCurrentTickTime()}getFakeSystemTime(){return this._scheduler.getFakeSystemTime()}setFakeBaseSystemTime(e){this._scheduler.setFakeBaseSystemTime(e)}getRealSystemTime(){return this._scheduler.getRealSystemTime()}static patchDate(){e[Zone.__symbol__("disableDatePatching")]||e.Date!==s&&(e.Date=s,s.prototype=t.prototype,n.checkTimerPatch())}static resetDate(){e.Date===s&&(e.Date=t)}static checkTimerPatch(){e.setTimeout!==r.setTimeout&&(e.setTimeout=r.setTimeout,e.clearTimeout=r.clearTimeout),e.setInterval!==r.setInterval&&(e.setInterval=r.setInterval,e.clearInterval=r.clearInterval)}lockDatePatch(){this.patchDateLocked=!0,n.patchDate()}unlockDatePatch(){this.patchDateLocked=!1,n.resetDate()}tickToNext(e=1,t,s={processNewMacroTasksSynchronously:!0}){e<=0||(n.assertInZone(),this.flushMicrotasks(),this._scheduler.tickToNext(e,t,s),null!==this._lastError&&this._resetLastErrorAndThrow())}tick(e=0,t,s={processNewMacroTasksSynchronously:!0}){n.assertInZone(),this.flushMicrotasks(),this._scheduler.tick(e,t,s),null!==this._lastError&&this._resetLastErrorAndThrow()}flushMicrotasks(){for(n.assertInZone();this._microtasks.length>0;){let e=this._microtasks.shift();e.func.apply(e.target,e.args)}(()=>{(null!==this._lastError||this._uncaughtPromiseErrors.length)&&this._resetLastErrorAndThrow()})()}flush(e,t,s){n.assertInZone(),this.flushMicrotasks();const r=this._scheduler.flush(e,t,s);return null!==this._lastError&&this._resetLastErrorAndThrow(),r}flushOnlyPendingTimers(e){n.assertInZone(),this.flushMicrotasks();const t=this._scheduler.flushOnlyPendingTimers(e);return null!==this._lastError&&this._resetLastErrorAndThrow(),t}removeAllTimers(){n.assertInZone(),this._scheduler.removeAll(),this.pendingPeriodicTimers=[],this.pendingTimers=[]}getTimerCount(){return this._scheduler.getTimerCount()+this._microtasks.length}onScheduleTask(e,t,s,r){switch(r.type){case"microTask":let t,i=r.data&&r.data.args;if(i){let e=r.data.cbIdx;"number"==typeof i.length&&i.length>e+1&&(t=Array.prototype.slice.call(i,e+1))}this._microtasks.push({func:r.invoke,args:t,target:r.data&&r.data.target});break;case"macroTask":switch(r.source){case"setTimeout":r.data.handleId=this._setTimeout(r.invoke,r.data.delay,Array.prototype.slice.call(r.data.args,2));break;case"setImmediate":r.data.handleId=this._setTimeout(r.invoke,0,Array.prototype.slice.call(r.data.args,1));break;case"setInterval":r.data.handleId=this._setInterval(r.invoke,r.data.delay,Array.prototype.slice.call(r.data.args,2));break;case"XMLHttpRequest.send":throw new Error("Cannot make XHRs from within a fake async test. Request URL: "+r.data.url);case"requestAnimationFrame":case"webkitRequestAnimationFrame":case"mozRequestAnimationFrame":r.data.handleId=this._setTimeout(r.invoke,16,r.data.args,this.trackPendingRequestAnimationFrame);break;default:const e=this.findMacroTaskOption(r);if(e){const t=r.data&&r.data.args,s=t&&t.length>1?t[1]:0;let i=e.callbackArgs?e.callbackArgs:t;e.isPeriodic?(r.data.handleId=this._setInterval(r.invoke,s,i),r.data.isPeriodic=!0):r.data.handleId=this._setTimeout(r.invoke,s,i);break}throw new Error("Unknown macroTask scheduled in fake async test: "+r.source)}break;case"eventTask":r=e.scheduleTask(s,r)}return r}onCancelTask(e,t,s,r){switch(r.source){case"setTimeout":case"requestAnimationFrame":case"webkitRequestAnimationFrame":case"mozRequestAnimationFrame":return this._clearTimeout(r.data.handleId);case"setInterval":return this._clearInterval(r.data.handleId);default:const t=this.findMacroTaskOption(r);if(t){const e=r.data.handleId;return t.isPeriodic?this._clearInterval(e):this._clearTimeout(e)}return e.cancelTask(s,r)}}onInvoke(e,t,s,r,i,c,a){try{return n.patchDate(),e.invoke(s,r,i,c,a)}finally{this.patchDateLocked||n.resetDate()}}findMacroTaskOption(e){if(!this.macroTaskOptions)return null;for(let t=0;t<this.macroTaskOptions.length;t++){const s=this.macroTaskOptions[t];if(s.source===e.source)return s}return null}onHandleError(e,t,s,r){return this._lastError=r,!1}}Zone.FakeAsyncTestZoneSpec=n}("object"==typeof window&&window||"object"==typeof self&&self||global),Zone.__load_patch("fakeasync",((e,t,s)=>{const r=t&&t.FakeAsyncTestZoneSpec;function i(){return t&&t.ProxyZoneSpec}let n=null;function c(){n&&n.unlockDatePatch(),n=null,i()&&i().assertPresent().resetDelegate()}function a(){if(null==n&&(n=t.current.get("FakeAsyncTestZoneSpec"),null==n))throw new Error("The code should be running in the fakeAsync zone to call this function");return n}function o(){a().flushMicrotasks()}t[s.symbol("fakeAsyncTest")]={resetFakeAsyncZone:c,flushMicrotasks:o,discardPeriodicTasks:function u(){a().pendingPeriodicTimers.length=0},tick:function h(e=0,t=!1){a().tick(e,null,t)},flush:function l(e){return a().flush(e)},fakeAsync:function d(e){const s=function(...s){const a=i();if(!a)throw new Error("ProxyZoneSpec is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/plugins/proxy");const u=a.assertPresent();if(t.current.get("FakeAsyncTestZoneSpec"))throw new Error("fakeAsync() calls can not be nested");try{if(!n){if(u.getDelegate()instanceof r)throw new Error("fakeAsync() calls can not be nested");n=new r}let t;const i=u.getDelegate();u.setDelegate(n),n.lockDatePatch();try{t=e.apply(this,s),o()}finally{u.setDelegate(i)}if(n.pendingPeriodicTimers.length>0)throw new Error(`${n.pendingPeriodicTimers.length} periodic timer(s) still in the queue.`);if(n.pendingTimers.length>0)throw new Error(`${n.pendingTimers.length} timer(s) still in the queue.`);return t}finally{c()}};return s.isFakeAsync=!0,s}}}),!0);
*/const global="object"==typeof window&&window||"object"==typeof self&&self||globalThis.global,OriginalDate=global.Date;function FakeDate(){if(0===arguments.length){const e=new OriginalDate;return e.setTime(FakeDate.now()),e}{const e=Array.prototype.slice.call(arguments);return new OriginalDate(...e)}}let patchedTimers;FakeDate.now=function(){const e=Zone.current.get("FakeAsyncTestZoneSpec");return e?e.getFakeSystemTime():OriginalDate.now.apply(this,arguments)},FakeDate.UTC=OriginalDate.UTC,FakeDate.parse=OriginalDate.parse;const timeoutCallback=function(){};class Scheduler{static{this.nextNodeJSId=1}static{this.nextId=-1}constructor(){this._schedulerQueue=[],this._currentTickTime=0,this._currentFakeBaseSystemTime=OriginalDate.now(),this._currentTickRequeuePeriodicEntries=[]}static getNextId(){const e=patchedTimers.nativeSetTimeout.call(global,timeoutCallback,0);return patchedTimers.nativeClearTimeout.call(global,e),"number"==typeof e?e:Scheduler.nextNodeJSId++}getCurrentTickTime(){return this._currentTickTime}getFakeSystemTime(){return this._currentFakeBaseSystemTime+this._currentTickTime}setFakeBaseSystemTime(e){this._currentFakeBaseSystemTime=e}getRealSystemTime(){return OriginalDate.now()}scheduleFunction(e,t,s){let r=(s={args:[],isPeriodic:!1,isRequestAnimationFrame:!1,id:-1,isRequeuePeriodic:!1,...s}).id<0?Scheduler.nextId:s.id;Scheduler.nextId=Scheduler.getNextId();let i={endTime:this._currentTickTime+t,id:r,func:e,args:s.args,delay:t,isPeriodic:s.isPeriodic,isRequestAnimationFrame:s.isRequestAnimationFrame};s.isRequeuePeriodic&&this._currentTickRequeuePeriodicEntries.push(i);let n=0;for(;n<this._schedulerQueue.length&&!(i.endTime<this._schedulerQueue[n].endTime);n++);return this._schedulerQueue.splice(n,0,i),r}removeScheduledFunctionWithId(e){for(let t=0;t<this._schedulerQueue.length;t++)if(this._schedulerQueue[t].id==e){this._schedulerQueue.splice(t,1);break}}removeAll(){this._schedulerQueue=[]}getTimerCount(){return this._schedulerQueue.length}tickToNext(e=1,t,s){this._schedulerQueue.length<e||this.tick(this._schedulerQueue[e-1].endTime-this._currentTickTime,t,s)}tick(e=0,t,s){let r=this._currentTickTime+e,i=0;const n=(s=Object.assign({processNewMacroTasksSynchronously:!0},s)).processNewMacroTasksSynchronously?this._schedulerQueue:this._schedulerQueue.slice();if(0===n.length&&t)t(e);else{for(;n.length>0&&(this._currentTickRequeuePeriodicEntries=[],!(r<n[0].endTime));){let e=n.shift();if(!s.processNewMacroTasksSynchronously){const t=this._schedulerQueue.indexOf(e);t>=0&&this._schedulerQueue.splice(t,1)}if(i=this._currentTickTime,this._currentTickTime=e.endTime,t&&t(this._currentTickTime-i),!e.func.apply(global,e.isRequestAnimationFrame?[this._currentTickTime]:e.args))break;s.processNewMacroTasksSynchronously||this._currentTickRequeuePeriodicEntries.forEach((e=>{let t=0;for(;t<n.length&&!(e.endTime<n[t].endTime);t++);n.splice(t,0,e)}))}i=this._currentTickTime,this._currentTickTime=r,t&&t(this._currentTickTime-i)}}flushOnlyPendingTimers(e){if(0===this._schedulerQueue.length)return 0;const t=this._currentTickTime;return this.tick(this._schedulerQueue[this._schedulerQueue.length-1].endTime-t,e,{processNewMacroTasksSynchronously:!1}),this._currentTickTime-t}flush(e=20,t=!1,s){return t?this.flushPeriodic(s):this.flushNonPeriodic(e,s)}flushPeriodic(e){if(0===this._schedulerQueue.length)return 0;const t=this._currentTickTime;return this.tick(this._schedulerQueue[this._schedulerQueue.length-1].endTime-t,e),this._currentTickTime-t}flushNonPeriodic(e,t){const s=this._currentTickTime;let r=0,i=0;for(;this._schedulerQueue.length>0;){if(i++,i>e)throw new Error("flush failed after reaching the limit of "+e+" tasks. Does your code use a polling timeout?");if(0===this._schedulerQueue.filter((e=>!e.isPeriodic&&!e.isRequestAnimationFrame)).length)break;const s=this._schedulerQueue.shift();if(r=this._currentTickTime,this._currentTickTime=s.endTime,t&&t(this._currentTickTime-r),!s.func.apply(global,s.args))break}return this._currentTickTime-s}}class FakeAsyncTestZoneSpec{static assertInZone(){if(null==Zone.current.get("FakeAsyncTestZoneSpec"))throw new Error("The code should be running in the fakeAsync zone to call this function")}constructor(e,t=!1,s){this.trackPendingRequestAnimationFrame=t,this.macroTaskOptions=s,this._scheduler=new Scheduler,this._microtasks=[],this._lastError=null,this._uncaughtPromiseErrors=Promise[Zone.__symbol__("uncaughtPromiseErrors")],this.pendingPeriodicTimers=[],this.pendingTimers=[],this.patchDateLocked=!1,this.properties={FakeAsyncTestZoneSpec:this},this.name="fakeAsyncTestZone for "+e,this.macroTaskOptions||(this.macroTaskOptions=global[Zone.__symbol__("FakeAsyncTestMacroTask")])}_fnAndFlush(e,t){return(...s)=>(e.apply(global,s),null===this._lastError?(null!=t.onSuccess&&t.onSuccess.apply(global),this.flushMicrotasks()):null!=t.onError&&t.onError.apply(global),null===this._lastError)}static _removeTimer(e,t){let s=e.indexOf(t);s>-1&&e.splice(s,1)}_dequeueTimer(e){return()=>{FakeAsyncTestZoneSpec._removeTimer(this.pendingTimers,e)}}_requeuePeriodicTimer(e,t,s,r){return()=>{-1!==this.pendingPeriodicTimers.indexOf(r)&&this._scheduler.scheduleFunction(e,t,{args:s,isPeriodic:!0,id:r,isRequeuePeriodic:!0})}}_dequeuePeriodicTimer(e){return()=>{FakeAsyncTestZoneSpec._removeTimer(this.pendingPeriodicTimers,e)}}_setTimeout(e,t,s,r=!0){let i=this._dequeueTimer(Scheduler.nextId),n=this._fnAndFlush(e,{onSuccess:i,onError:i}),a=this._scheduler.scheduleFunction(n,t,{args:s,isRequestAnimationFrame:!r});return r&&this.pendingTimers.push(a),a}_clearTimeout(e){FakeAsyncTestZoneSpec._removeTimer(this.pendingTimers,e),this._scheduler.removeScheduledFunctionWithId(e)}_setInterval(e,t,s){let r=Scheduler.nextId,i={onSuccess:null,onError:this._dequeuePeriodicTimer(r)},n=this._fnAndFlush(e,i);return i.onSuccess=this._requeuePeriodicTimer(n,t,s,r),this._scheduler.scheduleFunction(n,t,{args:s,isPeriodic:!0}),this.pendingPeriodicTimers.push(r),r}_clearInterval(e){FakeAsyncTestZoneSpec._removeTimer(this.pendingPeriodicTimers,e),this._scheduler.removeScheduledFunctionWithId(e)}_resetLastErrorAndThrow(){let e=this._lastError||this._uncaughtPromiseErrors[0];throw this._uncaughtPromiseErrors.length=0,this._lastError=null,e}getCurrentTickTime(){return this._scheduler.getCurrentTickTime()}getFakeSystemTime(){return this._scheduler.getFakeSystemTime()}setFakeBaseSystemTime(e){this._scheduler.setFakeBaseSystemTime(e)}getRealSystemTime(){return this._scheduler.getRealSystemTime()}static patchDate(){global[Zone.__symbol__("disableDatePatching")]||global.Date!==FakeDate&&(global.Date=FakeDate,FakeDate.prototype=OriginalDate.prototype,FakeAsyncTestZoneSpec.checkTimerPatch())}static resetDate(){global.Date===FakeDate&&(global.Date=OriginalDate)}static checkTimerPatch(){if(!patchedTimers)throw new Error("Expected timers to have been patched.");global.setTimeout!==patchedTimers.setTimeout&&(global.setTimeout=patchedTimers.setTimeout,global.clearTimeout=patchedTimers.clearTimeout),global.setInterval!==patchedTimers.setInterval&&(global.setInterval=patchedTimers.setInterval,global.clearInterval=patchedTimers.clearInterval)}lockDatePatch(){this.patchDateLocked=!0,FakeAsyncTestZoneSpec.patchDate()}unlockDatePatch(){this.patchDateLocked=!1,FakeAsyncTestZoneSpec.resetDate()}tickToNext(e=1,t,s={processNewMacroTasksSynchronously:!0}){e<=0||(FakeAsyncTestZoneSpec.assertInZone(),this.flushMicrotasks(),this._scheduler.tickToNext(e,t,s),null!==this._lastError&&this._resetLastErrorAndThrow())}tick(e=0,t,s={processNewMacroTasksSynchronously:!0}){FakeAsyncTestZoneSpec.assertInZone(),this.flushMicrotasks(),this._scheduler.tick(e,t,s),null!==this._lastError&&this._resetLastErrorAndThrow()}flushMicrotasks(){for(FakeAsyncTestZoneSpec.assertInZone();this._microtasks.length>0;){let e=this._microtasks.shift();e.func.apply(e.target,e.args)}(()=>{(null!==this._lastError||this._uncaughtPromiseErrors.length)&&this._resetLastErrorAndThrow()})()}flush(e,t,s){FakeAsyncTestZoneSpec.assertInZone(),this.flushMicrotasks();const r=this._scheduler.flush(e,t,s);return null!==this._lastError&&this._resetLastErrorAndThrow(),r}flushOnlyPendingTimers(e){FakeAsyncTestZoneSpec.assertInZone(),this.flushMicrotasks();const t=this._scheduler.flushOnlyPendingTimers(e);return null!==this._lastError&&this._resetLastErrorAndThrow(),t}removeAllTimers(){FakeAsyncTestZoneSpec.assertInZone(),this._scheduler.removeAll(),this.pendingPeriodicTimers=[],this.pendingTimers=[]}getTimerCount(){return this._scheduler.getTimerCount()+this._microtasks.length}onScheduleTask(e,t,s,r){switch(r.type){case"microTask":let t,i=r.data&&r.data.args;if(i){let e=r.data.cbIdx;"number"==typeof i.length&&i.length>e+1&&(t=Array.prototype.slice.call(i,e+1))}this._microtasks.push({func:r.invoke,args:t,target:r.data&&r.data.target});break;case"macroTask":switch(r.source){case"setTimeout":r.data.handleId=this._setTimeout(r.invoke,r.data.delay,Array.prototype.slice.call(r.data.args,2));break;case"setImmediate":r.data.handleId=this._setTimeout(r.invoke,0,Array.prototype.slice.call(r.data.args,1));break;case"setInterval":r.data.handleId=this._setInterval(r.invoke,r.data.delay,Array.prototype.slice.call(r.data.args,2));break;case"XMLHttpRequest.send":throw new Error("Cannot make XHRs from within a fake async test. Request URL: "+r.data.url);case"requestAnimationFrame":case"webkitRequestAnimationFrame":case"mozRequestAnimationFrame":r.data.handleId=this._setTimeout(r.invoke,16,r.data.args,this.trackPendingRequestAnimationFrame);break;default:const e=this.findMacroTaskOption(r);if(e){const t=r.data&&r.data.args,s=t&&t.length>1?t[1]:0;let i=e.callbackArgs?e.callbackArgs:t;e.isPeriodic?(r.data.handleId=this._setInterval(r.invoke,s,i),r.data.isPeriodic=!0):r.data.handleId=this._setTimeout(r.invoke,s,i);break}throw new Error("Unknown macroTask scheduled in fake async test: "+r.source)}break;case"eventTask":r=e.scheduleTask(s,r)}return r}onCancelTask(e,t,s,r){switch(r.source){case"setTimeout":case"requestAnimationFrame":case"webkitRequestAnimationFrame":case"mozRequestAnimationFrame":return this._clearTimeout(r.data.handleId);case"setInterval":return this._clearInterval(r.data.handleId);default:const t=this.findMacroTaskOption(r);if(t){const e=r.data.handleId;return t.isPeriodic?this._clearInterval(e):this._clearTimeout(e)}return e.cancelTask(s,r)}}onInvoke(e,t,s,r,i,n,a){try{return FakeAsyncTestZoneSpec.patchDate(),e.invoke(s,r,i,n,a)}finally{this.patchDateLocked||FakeAsyncTestZoneSpec.resetDate()}}findMacroTaskOption(e){if(!this.macroTaskOptions)return null;for(let t=0;t<this.macroTaskOptions.length;t++){const s=this.macroTaskOptions[t];if(s.source===e.source)return s}return null}onHandleError(e,t,s,r){return this._lastError=r,!1}}let _fakeAsyncTestZoneSpec=null;function getProxyZoneSpec(){return Zone&&Zone.ProxyZoneSpec}function resetFakeAsyncZone(){_fakeAsyncTestZoneSpec&&_fakeAsyncTestZoneSpec.unlockDatePatch(),_fakeAsyncTestZoneSpec=null,getProxyZoneSpec()&&getProxyZoneSpec().assertPresent().resetDelegate()}function fakeAsync(e){const t=function(...t){const s=getProxyZoneSpec();if(!s)throw new Error("ProxyZoneSpec is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/plugins/proxy");const r=s.assertPresent();if(Zone.current.get("FakeAsyncTestZoneSpec"))throw new Error("fakeAsync() calls can not be nested");try{if(!_fakeAsyncTestZoneSpec){const e=Zone&&Zone.FakeAsyncTestZoneSpec;if(r.getDelegate()instanceof e)throw new Error("fakeAsync() calls can not be nested");_fakeAsyncTestZoneSpec=new e}let s;const i=r.getDelegate();r.setDelegate(_fakeAsyncTestZoneSpec),_fakeAsyncTestZoneSpec.lockDatePatch();try{s=e.apply(this,t),flushMicrotasks()}finally{r.setDelegate(i)}if(_fakeAsyncTestZoneSpec.pendingPeriodicTimers.length>0)throw new Error(`${_fakeAsyncTestZoneSpec.pendingPeriodicTimers.length} periodic timer(s) still in the queue.`);if(_fakeAsyncTestZoneSpec.pendingTimers.length>0)throw new Error(`${_fakeAsyncTestZoneSpec.pendingTimers.length} timer(s) still in the queue.`);return s}finally{resetFakeAsyncZone()}};return t.isFakeAsync=!0,t}function _getFakeAsyncZoneSpec(){if(null==_fakeAsyncTestZoneSpec&&(_fakeAsyncTestZoneSpec=Zone.current.get("FakeAsyncTestZoneSpec"),null==_fakeAsyncTestZoneSpec))throw new Error("The code should be running in the fakeAsync zone to call this function");return _fakeAsyncTestZoneSpec}function tick(e=0,t=!1){_getFakeAsyncZoneSpec().tick(e,null,t)}function flush(e){return _getFakeAsyncZoneSpec().flush(e)}function discardPeriodicTasks(){_getFakeAsyncZoneSpec().pendingPeriodicTimers.length=0}function flushMicrotasks(){_getFakeAsyncZoneSpec().flushMicrotasks()}function patchFakeAsyncTest(e){e.FakeAsyncTestZoneSpec=FakeAsyncTestZoneSpec,e.__load_patch("fakeasync",((e,t,s)=>{t[s.symbol("fakeAsyncTest")]={resetFakeAsyncZone:resetFakeAsyncZone,flushMicrotasks:flushMicrotasks,discardPeriodicTasks:discardPeriodicTasks,tick:tick,flush:flush,fakeAsync:fakeAsync}}),!0),patchedTimers={setTimeout:global.setTimeout,setInterval:global.setInterval,clearTimeout:global.clearTimeout,clearInterval:global.clearInterval,nativeSetTimeout:global[e.__symbol__("setTimeout")],nativeClearTimeout:global[e.__symbol__("clearTimeout")]},Scheduler.nextId=Scheduler.getNextId()}patchFakeAsyncTest(Zone);
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/
/// <reference types="jasmine"/>
Zone.__load_patch('jasmine', (global, Zone, api) => {
const __extends = function (d, b) {
for (const p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
function patchJasmine(Zone) {
Zone.__load_patch('jasmine', (global, Zone, api) => {
const __extends = function (d, b) {
for (const p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype =
b === null ? Object.create(b) : ((__.prototype = b.prototype), new __());
};
// Patch jasmine's describe/it/beforeEach/afterEach functions so test code always runs
// in a testZone (ProxyZone). (See: angular/zone.js#91 & angular/angular#10503)
if (!Zone)
throw new Error('Missing: zone.js');
if (typeof jest !== 'undefined') {
// return if jasmine is a light implementation inside jest
// in this case, we are running inside jest not jasmine
return;
}
d.prototype = b === null ? Object.create(b) : ((__.prototype = b.prototype), new __());
};
// Patch jasmine's describe/it/beforeEach/afterEach functions so test code always runs
// in a testZone (ProxyZone). (See: angular/zone.js#91 & angular/angular#10503)
if (!Zone)
throw new Error('Missing: zone.js');
if (typeof jest !== 'undefined') {
// return if jasmine is a light implementation inside jest
// in this case, we are running inside jest not jasmine
return;
}
if (typeof jasmine == 'undefined' || jasmine['__zone_patch__']) {
return;
}
jasmine['__zone_patch__'] = true;
const SyncTestZoneSpec = Zone['SyncTestZoneSpec'];
const ProxyZoneSpec = Zone['ProxyZoneSpec'];
if (!SyncTestZoneSpec)
throw new Error('Missing: SyncTestZoneSpec');
if (!ProxyZoneSpec)
throw new Error('Missing: ProxyZoneSpec');
const ambientZone = Zone.current;
const symbol = Zone.__symbol__;
// whether patch jasmine clock when in fakeAsync
const disablePatchingJasmineClock = global[symbol('fakeAsyncDisablePatchingClock')] === true;
// the original variable name fakeAsyncPatchLock is not accurate, so the name will be
// fakeAsyncAutoFakeAsyncWhenClockPatched and if this enablePatchingJasmineClock is false, we also
// automatically disable the auto jump into fakeAsync feature
const enableAutoFakeAsyncWhenClockPatched = !disablePatchingJasmineClock &&
((global[symbol('fakeAsyncPatchLock')] === true) ||
(global[symbol('fakeAsyncAutoFakeAsyncWhenClockPatched')] === true));
const ignoreUnhandledRejection = global[symbol('ignoreUnhandledRejection')] === true;
if (!ignoreUnhandledRejection) {
const globalErrors = jasmine.GlobalErrors;
if (globalErrors && !jasmine[symbol('GlobalErrors')]) {
jasmine[symbol('GlobalErrors')] = globalErrors;
jasmine.GlobalErrors = function () {
const instance = new globalErrors();
const originalInstall = instance.install;
if (originalInstall && !instance[symbol('install')]) {
instance[symbol('install')] = originalInstall;
instance.install = function () {
const isNode = typeof process !== 'undefined' && !!process.on;
// Note: Jasmine checks internally if `process` and `process.on` is defined. Otherwise,
// it installs the browser rejection handler through the `global.addEventListener`.
// This code may be run in the browser environment where `process` is not defined, and
// this will lead to a runtime exception since Webpack 5 removed automatic Node.js
// polyfills. Note, that events are named differently, it's `unhandledRejection` in
// Node.js and `unhandledrejection` in the browser.
const originalHandlers = isNode ? process.listeners('unhandledRejection') :
global.eventListeners('unhandledrejection');
const result = originalInstall.apply(this, arguments);
isNode ? process.removeAllListeners('unhandledRejection') :
global.removeAllListeners('unhandledrejection');
if (originalHandlers) {
originalHandlers.forEach(handler => {
if (isNode) {
process.on('unhandledRejection', handler);
}
else {
global.addEventListener('unhandledrejection', handler);
}
});
if (typeof jasmine == 'undefined' || jasmine['__zone_patch__']) {
return;
}
jasmine['__zone_patch__'] = true;
const SyncTestZoneSpec = Zone['SyncTestZoneSpec'];
const ProxyZoneSpec = Zone['ProxyZoneSpec'];
if (!SyncTestZoneSpec)
throw new Error('Missing: SyncTestZoneSpec');
if (!ProxyZoneSpec)
throw new Error('Missing: ProxyZoneSpec');
const ambientZone = Zone.current;
const symbol = Zone.__symbol__;
// whether patch jasmine clock when in fakeAsync
const disablePatchingJasmineClock = global[symbol('fakeAsyncDisablePatchingClock')] === true;
// the original variable name fakeAsyncPatchLock is not accurate, so the name will be
// fakeAsyncAutoFakeAsyncWhenClockPatched and if this enablePatchingJasmineClock is false, we
// also automatically disable the auto jump into fakeAsync feature
const enableAutoFakeAsyncWhenClockPatched = !disablePatchingJasmineClock &&
(global[symbol('fakeAsyncPatchLock')] === true ||
global[symbol('fakeAsyncAutoFakeAsyncWhenClockPatched')] === true);
const ignoreUnhandledRejection = global[symbol('ignoreUnhandledRejection')] === true;
if (!ignoreUnhandledRejection) {
const globalErrors = jasmine.GlobalErrors;
if (globalErrors && !jasmine[symbol('GlobalErrors')]) {
jasmine[symbol('GlobalErrors')] = globalErrors;
jasmine.GlobalErrors = function () {
const instance = new globalErrors();
const originalInstall = instance.install;
if (originalInstall && !instance[symbol('install')]) {
instance[symbol('install')] = originalInstall;
instance.install = function () {
const isNode = typeof process !== 'undefined' && !!process.on;
// Note: Jasmine checks internally if `process` and `process.on` is defined.
// Otherwise, it installs the browser rejection handler through the
// `global.addEventListener`. This code may be run in the browser environment where
// `process` is not defined, and this will lead to a runtime exception since Webpack 5
// removed automatic Node.js polyfills. Note, that events are named differently, it's
// `unhandledRejection` in Node.js and `unhandledrejection` in the browser.
const originalHandlers = isNode
? process.listeners('unhandledRejection')
: global.eventListeners('unhandledrejection');
const result = originalInstall.apply(this, arguments);
isNode
? process.removeAllListeners('unhandledRejection')
: global.removeAllListeners('unhandledrejection');
if (originalHandlers) {
originalHandlers.forEach((handler) => {
if (isNode) {
process.on('unhandledRejection', handler);
}
else {
global.addEventListener('unhandledrejection', handler);
}
});
}
return result;
};
}
return instance;
};
}
}
// Monkey patch all of the jasmine DSL so that each function runs in appropriate zone.
const jasmineEnv = jasmine.getEnv();
['describe', 'xdescribe', 'fdescribe'].forEach((methodName) => {
let originalJasmineFn = jasmineEnv[methodName];
jasmineEnv[methodName] = function (description, specDefinitions) {
return originalJasmineFn.call(this, description, wrapDescribeInZone(description, specDefinitions));
};
});
['it', 'xit', 'fit'].forEach((methodName) => {
let originalJasmineFn = jasmineEnv[methodName];
jasmineEnv[symbol(methodName)] = originalJasmineFn;
jasmineEnv[methodName] = function (description, specDefinitions, timeout) {
arguments[1] = wrapTestInZone(specDefinitions);
return originalJasmineFn.apply(this, arguments);
};
});
['beforeEach', 'afterEach', 'beforeAll', 'afterAll'].forEach((methodName) => {
let originalJasmineFn = jasmineEnv[methodName];
jasmineEnv[symbol(methodName)] = originalJasmineFn;
jasmineEnv[methodName] = function (specDefinitions, timeout) {
arguments[0] = wrapTestInZone(specDefinitions);
return originalJasmineFn.apply(this, arguments);
};
});
if (!disablePatchingJasmineClock) {
// need to patch jasmine.clock().mockDate and jasmine.clock().tick() so
// they can work properly in FakeAsyncTest
const originalClockFn = (jasmine[symbol('clock')] = jasmine['clock']);
jasmine['clock'] = function () {
const clock = originalClockFn.apply(this, arguments);
if (!clock[symbol('patched')]) {
clock[symbol('patched')] = symbol('patched');
const originalTick = (clock[symbol('tick')] = clock.tick);
clock.tick = function () {
const fakeAsyncZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');
if (fakeAsyncZoneSpec) {
return fakeAsyncZoneSpec.tick.apply(fakeAsyncZoneSpec, arguments);
}
return result;
return originalTick.apply(this, arguments);
};
const originalMockDate = (clock[symbol('mockDate')] = clock.mockDate);
clock.mockDate = function () {
const fakeAsyncZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');
if (fakeAsyncZoneSpec) {
const dateTime = arguments.length > 0 ? arguments[0] : new Date();
return fakeAsyncZoneSpec.setFakeBaseSystemTime.apply(fakeAsyncZoneSpec, dateTime && typeof dateTime.getTime === 'function'
? [dateTime.getTime()]
: arguments);
}
return originalMockDate.apply(this, arguments);
};
// for auto go into fakeAsync feature, we need the flag to enable it
if (enableAutoFakeAsyncWhenClockPatched) {
['install', 'uninstall'].forEach((methodName) => {
const originalClockFn = (clock[symbol(methodName)] = clock[methodName]);
clock[methodName] = function () {
const FakeAsyncTestZoneSpec = Zone['FakeAsyncTestZoneSpec'];
if (FakeAsyncTestZoneSpec) {
jasmine[symbol('clockInstalled')] = 'install' === methodName;
return;
}
return originalClockFn.apply(this, arguments);
};
});
}
}
return instance;
return clock;
};
}
}
// Monkey patch all of the jasmine DSL so that each function runs in appropriate zone.
const jasmineEnv = jasmine.getEnv();
['describe', 'xdescribe', 'fdescribe'].forEach(methodName => {
let originalJasmineFn = jasmineEnv[methodName];
jasmineEnv[methodName] = function (description, specDefinitions) {
return originalJasmineFn.call(this, description, wrapDescribeInZone(description, specDefinitions));
};
});
['it', 'xit', 'fit'].forEach(methodName => {
let originalJasmineFn = jasmineEnv[methodName];
jasmineEnv[symbol(methodName)] = originalJasmineFn;
jasmineEnv[methodName] = function (description, specDefinitions, timeout) {
arguments[1] = wrapTestInZone(specDefinitions);
return originalJasmineFn.apply(this, arguments);
};
});
['beforeEach', 'afterEach', 'beforeAll', 'afterAll'].forEach(methodName => {
let originalJasmineFn = jasmineEnv[methodName];
jasmineEnv[symbol(methodName)] = originalJasmineFn;
jasmineEnv[methodName] = function (specDefinitions, timeout) {
arguments[0] = wrapTestInZone(specDefinitions);
return originalJasmineFn.apply(this, arguments);
};
});
if (!disablePatchingJasmineClock) {
// need to patch jasmine.clock().mockDate and jasmine.clock().tick() so
// they can work properly in FakeAsyncTest
const originalClockFn = (jasmine[symbol('clock')] = jasmine['clock']);
jasmine['clock'] = function () {
const clock = originalClockFn.apply(this, arguments);
if (!clock[symbol('patched')]) {
clock[symbol('patched')] = symbol('patched');
const originalTick = (clock[symbol('tick')] = clock.tick);
clock.tick = function () {
const fakeAsyncZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');
if (fakeAsyncZoneSpec) {
return fakeAsyncZoneSpec.tick.apply(fakeAsyncZoneSpec, arguments);
// monkey patch createSpyObj to make properties enumerable to true
if (!jasmine[Zone.__symbol__('createSpyObj')]) {
const originalCreateSpyObj = jasmine.createSpyObj;
jasmine[Zone.__symbol__('createSpyObj')] = originalCreateSpyObj;
jasmine.createSpyObj = function () {
const args = Array.prototype.slice.call(arguments);
const propertyNames = args.length >= 3 ? args[2] : null;
let spyObj;
if (propertyNames) {
const defineProperty = Object.defineProperty;
Object.defineProperty = function (obj, p, attributes) {
return defineProperty.call(this, obj, p, {
...attributes,
configurable: true,
enumerable: true,
});
};
try {
spyObj = originalCreateSpyObj.apply(this, args);
}
return originalTick.apply(this, arguments);
};
const originalMockDate = (clock[symbol('mockDate')] = clock.mockDate);
clock.mockDate = function () {
const fakeAsyncZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');
if (fakeAsyncZoneSpec) {
const dateTime = arguments.length > 0 ? arguments[0] : new Date();
return fakeAsyncZoneSpec.setFakeBaseSystemTime.apply(fakeAsyncZoneSpec, dateTime && typeof dateTime.getTime === 'function' ? [dateTime.getTime()] :
arguments);
finally {
Object.defineProperty = defineProperty;
}
return originalMockDate.apply(this, arguments);
};
// for auto go into fakeAsync feature, we need the flag to enable it
if (enableAutoFakeAsyncWhenClockPatched) {
['install', 'uninstall'].forEach(methodName => {
const originalClockFn = (clock[symbol(methodName)] = clock[methodName]);
clock[methodName] = function () {
const FakeAsyncTestZoneSpec = Zone['FakeAsyncTestZoneSpec'];
if (FakeAsyncTestZoneSpec) {
jasmine[symbol('clockInstalled')] = 'install' === methodName;
return;
}
return originalClockFn.apply(this, arguments);
};
});
}
}
return clock;
};
}
// monkey patch createSpyObj to make properties enumerable to true
if (!jasmine[Zone.__symbol__('createSpyObj')]) {
const originalCreateSpyObj = jasmine.createSpyObj;
jasmine[Zone.__symbol__('createSpyObj')] = originalCreateSpyObj;
jasmine.createSpyObj = function () {
const args = Array.prototype.slice.call(arguments);
const propertyNames = args.length >= 3 ? args[2] : null;
let spyObj;
if (propertyNames) {
const defineProperty = Object.defineProperty;
Object.defineProperty = function (obj, p, attributes) {
return defineProperty.call(this, obj, p, { ...attributes, configurable: true, enumerable: true });
};
try {
else {
spyObj = originalCreateSpyObj.apply(this, args);
}
finally {
Object.defineProperty = defineProperty;
return spyObj;
};
}
/**
* Gets a function wrapping the body of a Jasmine `describe` block to execute in a
* synchronous-only zone.
*/
function wrapDescribeInZone(description, describeBody) {
return function () {
// Create a synchronous-only zone in which to run `describe` blocks in order to raise an
// error if any asynchronous operations are attempted inside of a `describe`.
const syncZone = ambientZone.fork(new SyncTestZoneSpec(`jasmine.describe#${description}`));
return syncZone.run(describeBody, this, arguments);
};
}
function runInTestZone(testBody, applyThis, queueRunner, done) {
const isClockInstalled = !!jasmine[symbol('clockInstalled')];
queueRunner.testProxyZoneSpec;
const testProxyZone = queueRunner.testProxyZone;
if (isClockInstalled && enableAutoFakeAsyncWhenClockPatched) {
// auto run a fakeAsync
const fakeAsyncModule = Zone[Zone.__symbol__('fakeAsyncTest')];
if (fakeAsyncModule && typeof fakeAsyncModule.fakeAsync === 'function') {
testBody = fakeAsyncModule.fakeAsync(testBody);
}
}
if (done) {
return testProxyZone.run(testBody, applyThis, [done]);
}
else {
spyObj = originalCreateSpyObj.apply(this, args);
return testProxyZone.run(testBody, applyThis);
}
return spyObj;
};
}
/**
* Gets a function wrapping the body of a Jasmine `describe` block to execute in a
* synchronous-only zone.
*/
function wrapDescribeInZone(description, describeBody) {
return function () {
// Create a synchronous-only zone in which to run `describe` blocks in order to raise an
// error if any asynchronous operations are attempted inside of a `describe`.
const syncZone = ambientZone.fork(new SyncTestZoneSpec(`jasmine.describe#${description}`));
return syncZone.run(describeBody, this, arguments);
};
}
function runInTestZone(testBody, applyThis, queueRunner, done) {
const isClockInstalled = !!jasmine[symbol('clockInstalled')];
queueRunner.testProxyZoneSpec;
const testProxyZone = queueRunner.testProxyZone;
if (isClockInstalled && enableAutoFakeAsyncWhenClockPatched) {
// auto run a fakeAsync
const fakeAsyncModule = Zone[Zone.__symbol__('fakeAsyncTest')];
if (fakeAsyncModule && typeof fakeAsyncModule.fakeAsync === 'function') {
testBody = fakeAsyncModule.fakeAsync(testBody);
}
}
if (done) {
return testProxyZone.run(testBody, applyThis, [done]);
/**
* Gets a function wrapping the body of a Jasmine `it/beforeEach/afterEach` block to
* execute in a ProxyZone zone.
* This will run in `testProxyZone`. The `testProxyZone` will be reset by the `ZoneQueueRunner`
*/
function wrapTestInZone(testBody) {
// The `done` callback is only passed through if the function expects at least one argument.
// Note we have to make a function with correct number of arguments, otherwise jasmine will
// think that all functions are sync or async.
return (testBody &&
(testBody.length
? function (done) {
return runInTestZone(testBody, this, this.queueRunner, done);
}
: function () {
return runInTestZone(testBody, this, this.queueRunner);
}));
}
else {
return testProxyZone.run(testBody, applyThis);
}
}
/**
* Gets a function wrapping the body of a Jasmine `it/beforeEach/afterEach` block to
* execute in a ProxyZone zone.
* This will run in `testProxyZone`. The `testProxyZone` will be reset by the `ZoneQueueRunner`
*/
function wrapTestInZone(testBody) {
// The `done` callback is only passed through if the function expects at least one argument.
// Note we have to make a function with correct number of arguments, otherwise jasmine will
// think that all functions are sync or async.
return (testBody && (testBody.length ? function (done) {
return runInTestZone(testBody, this, this.queueRunner, done);
} : function () {
return runInTestZone(testBody, this, this.queueRunner);
}));
}
const QueueRunner = jasmine.QueueRunner;
jasmine.QueueRunner = (function (_super) {
__extends(ZoneQueueRunner, _super);
function ZoneQueueRunner(attrs) {
if (attrs.onComplete) {
attrs.onComplete = (fn => () => {
// All functions are done, clear the test zone.
this.testProxyZone = null;
this.testProxyZoneSpec = null;
ambientZone.scheduleMicroTask('jasmine.onComplete', fn);
})(attrs.onComplete);
}
const nativeSetTimeout = global[Zone.__symbol__('setTimeout')];
const nativeClearTimeout = global[Zone.__symbol__('clearTimeout')];
if (nativeSetTimeout) {
// should run setTimeout inside jasmine outside of zone
attrs.timeout = {
setTimeout: nativeSetTimeout ? nativeSetTimeout : global.setTimeout,
clearTimeout: nativeClearTimeout ? nativeClearTimeout : global.clearTimeout
};
}
// create a userContext to hold the queueRunner itself
// so we can access the testProxy in it/xit/beforeEach ...
if (jasmine.UserContext) {
if (!attrs.userContext) {
attrs.userContext = new jasmine.UserContext();
const QueueRunner = jasmine.QueueRunner;
jasmine.QueueRunner = (function (_super) {
__extends(ZoneQueueRunner, _super);
function ZoneQueueRunner(attrs) {
if (attrs.onComplete) {
attrs.onComplete = ((fn) => () => {
// All functions are done, clear the test zone.
this.testProxyZone = null;
this.testProxyZoneSpec = null;
ambientZone.scheduleMicroTask('jasmine.onComplete', fn);
})(attrs.onComplete);
}
attrs.userContext.queueRunner = this;
}
else {
if (!attrs.userContext) {
attrs.userContext = {};
const nativeSetTimeout = global[Zone.__symbol__('setTimeout')];
const nativeClearTimeout = global[Zone.__symbol__('clearTimeout')];
if (nativeSetTimeout) {
// should run setTimeout inside jasmine outside of zone
attrs.timeout = {
setTimeout: nativeSetTimeout ? nativeSetTimeout : global.setTimeout,
clearTimeout: nativeClearTimeout ? nativeClearTimeout : global.clearTimeout,
};
}
attrs.userContext.queueRunner = this;
}
// patch attrs.onException
const onException = attrs.onException;
attrs.onException = function (error) {
if (error &&
error.message ===
'Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.') {
// jasmine timeout, we can make the error message more
// reasonable to tell what tasks are pending
const proxyZoneSpec = this && this.testProxyZoneSpec;
if (proxyZoneSpec) {
const pendingTasksInfo = proxyZoneSpec.getAndClearPendingTasksInfo();
try {
// try catch here in case error.message is not writable
error.message += pendingTasksInfo;
// create a userContext to hold the queueRunner itself
// so we can access the testProxy in it/xit/beforeEach ...
if (jasmine.UserContext) {
if (!attrs.userContext) {
attrs.userContext = new jasmine.UserContext();
}
attrs.userContext.queueRunner = this;
}
else {
if (!attrs.userContext) {
attrs.userContext = {};
}
attrs.userContext.queueRunner = this;
}
// patch attrs.onException
const onException = attrs.onException;
attrs.onException = function (error) {
if (error &&
error.message ===
'Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.') {
// jasmine timeout, we can make the error message more
// reasonable to tell what tasks are pending
const proxyZoneSpec = this && this.testProxyZoneSpec;
if (proxyZoneSpec) {
const pendingTasksInfo = proxyZoneSpec.getAndClearPendingTasksInfo();
try {
// try catch here in case error.message is not writable
error.message += pendingTasksInfo;
}
catch (err) { }
}
catch (err) {
}
}
if (onException) {
onException.call(this, error);
}
};
_super.call(this, attrs);
}
ZoneQueueRunner.prototype.execute = function () {
let zone = Zone.current;
let isChildOfAmbientZone = false;
while (zone) {
if (zone === ambientZone) {
isChildOfAmbientZone = true;
break;
}
zone = zone.parent;
}
if (onException) {
onException.call(this, error);
if (!isChildOfAmbientZone)
throw new Error('Unexpected Zone: ' + Zone.current.name);
// This is the zone which will be used for running individual tests.
// It will be a proxy zone, so that the tests function can retroactively install
// different zones.
// Example:
// - In beforeEach() do childZone = Zone.current.fork(...);
// - In it() try to do fakeAsync(). The issue is that because the beforeEach forked the
// zone outside of fakeAsync it will be able to escape the fakeAsync rules.
// - Because ProxyZone is parent fo `childZone` fakeAsync can retroactively add
// fakeAsync behavior to the childZone.
this.testProxyZoneSpec = new ProxyZoneSpec();
this.testProxyZone = ambientZone.fork(this.testProxyZoneSpec);
if (!Zone.currentTask) {
// if we are not running in a task then if someone would register a
// element.addEventListener and then calling element.click() the
// addEventListener callback would think that it is the top most task and would
// drain the microtask queue on element.click() which would be incorrect.
// For this reason we always force a task when running jasmine tests.
Zone.current.scheduleMicroTask('jasmine.execute().forceTask', () => QueueRunner.prototype.execute.call(this));
}
else {
_super.prototype.execute.call(this);
}
};
_super.call(this, attrs);
}
ZoneQueueRunner.prototype.execute = function () {
let zone = Zone.current;
let isChildOfAmbientZone = false;
while (zone) {
if (zone === ambientZone) {
isChildOfAmbientZone = true;
break;
}
zone = zone.parent;
}
if (!isChildOfAmbientZone)
throw new Error('Unexpected Zone: ' + Zone.current.name);
// This is the zone which will be used for running individual tests.
// It will be a proxy zone, so that the tests function can retroactively install
// different zones.
// Example:
// - In beforeEach() do childZone = Zone.current.fork(...);
// - In it() try to do fakeAsync(). The issue is that because the beforeEach forked the
// zone outside of fakeAsync it will be able to escape the fakeAsync rules.
// - Because ProxyZone is parent fo `childZone` fakeAsync can retroactively add
// fakeAsync behavior to the childZone.
this.testProxyZoneSpec = new ProxyZoneSpec();
this.testProxyZone = ambientZone.fork(this.testProxyZoneSpec);
if (!Zone.currentTask) {
// if we are not running in a task then if someone would register a
// element.addEventListener and then calling element.click() the
// addEventListener callback would think that it is the top most task and would
// drain the microtask queue on element.click() which would be incorrect.
// For this reason we always force a task when running jasmine tests.
Zone.current.scheduleMicroTask('jasmine.execute().forceTask', () => QueueRunner.prototype.execute.call(this));
}
else {
_super.prototype.execute.call(this);
}
};
return ZoneQueueRunner;
})(QueueRunner);
});
return ZoneQueueRunner;
})(QueueRunner);
});
}
patchJasmine(Zone);
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/Zone.__load_patch("jasmine",((e,n,t)=>{if(!n)throw new Error("Missing: zone.js");if("undefined"!=typeof jest)return;if("undefined"==typeof jasmine||jasmine.__zone_patch__)return;jasmine.__zone_patch__=!0;const o=n.SyncTestZoneSpec,s=n.ProxyZoneSpec;if(!o)throw new Error("Missing: SyncTestZoneSpec");if(!s)throw new Error("Missing: ProxyZoneSpec");const r=n.current,c=n.__symbol__,i=!0===e[c("fakeAsyncDisablePatchingClock")],a=!i&&(!0===e[c("fakeAsyncPatchLock")]||!0===e[c("fakeAsyncAutoFakeAsyncWhenClockPatched")]);if(!0!==e[c("ignoreUnhandledRejection")]){const n=jasmine.GlobalErrors;n&&!jasmine[c("GlobalErrors")]&&(jasmine[c("GlobalErrors")]=n,jasmine.GlobalErrors=function(){const t=new n,o=t.install;return o&&!t[c("install")]&&(t[c("install")]=o,t.install=function(){const n="undefined"!=typeof process&&!!process.on,t=n?process.listeners("unhandledRejection"):e.eventListeners("unhandledrejection"),s=o.apply(this,arguments);return n?process.removeAllListeners("unhandledRejection"):e.removeAllListeners("unhandledrejection"),t&&t.forEach((t=>{n?process.on("unhandledRejection",t):e.addEventListener("unhandledrejection",t)})),s}),t})}const l=jasmine.getEnv();if(["describe","xdescribe","fdescribe"].forEach((e=>{let n=l[e];l[e]=function(e,t){return n.call(this,e,function s(e,n){return function(){return r.fork(new o(`jasmine.describe#${e}`)).run(n,this,arguments)}}(e,t))}})),["it","xit","fit"].forEach((e=>{let n=l[e];l[c(e)]=n,l[e]=function(e,t,o){return arguments[1]=p(t),n.apply(this,arguments)}})),["beforeEach","afterEach","beforeAll","afterAll"].forEach((e=>{let n=l[e];l[c(e)]=n,l[e]=function(e,t){return arguments[0]=p(e),n.apply(this,arguments)}})),!i){const e=jasmine[c("clock")]=jasmine.clock;jasmine.clock=function(){const t=e.apply(this,arguments);if(!t[c("patched")]){t[c("patched")]=c("patched");const e=t[c("tick")]=t.tick;t.tick=function(){const t=n.current.get("FakeAsyncTestZoneSpec");return t?t.tick.apply(t,arguments):e.apply(this,arguments)};const o=t[c("mockDate")]=t.mockDate;t.mockDate=function(){const e=n.current.get("FakeAsyncTestZoneSpec");if(e){const n=arguments.length>0?arguments[0]:new Date;return e.setFakeBaseSystemTime.apply(e,n&&"function"==typeof n.getTime?[n.getTime()]:arguments)}return o.apply(this,arguments)},a&&["install","uninstall"].forEach((e=>{const o=t[c(e)]=t[e];t[e]=function(){if(!n.FakeAsyncTestZoneSpec)return o.apply(this,arguments);jasmine[c("clockInstalled")]="install"===e}}))}return t}}if(!jasmine[n.__symbol__("createSpyObj")]){const e=jasmine.createSpyObj;jasmine[n.__symbol__("createSpyObj")]=e,jasmine.createSpyObj=function(){const n=Array.prototype.slice.call(arguments);let t;if(n.length>=3&&n[2]){const o=Object.defineProperty;Object.defineProperty=function(e,n,t){return o.call(this,e,n,{...t,configurable:!0,enumerable:!0})};try{t=e.apply(this,n)}finally{Object.defineProperty=o}}else t=e.apply(this,n);return t}}function u(e,t,o,s){const r=!!jasmine[c("clockInstalled")],i=o.testProxyZone;if(r&&a){const t=n[n.__symbol__("fakeAsyncTest")];t&&"function"==typeof t.fakeAsync&&(e=t.fakeAsync(e))}return s?i.run(e,t,[s]):i.run(e,t)}function p(e){return e&&(e.length?function(n){return u(e,this,this.queueRunner,n)}:function(){return u(e,this,this.queueRunner)})}const f=jasmine.QueueRunner;jasmine.QueueRunner=function(t){function o(o){o.onComplete&&(o.onComplete=(e=>()=>{this.testProxyZone=null,this.testProxyZoneSpec=null,r.scheduleMicroTask("jasmine.onComplete",e)})(o.onComplete));const s=e[n.__symbol__("setTimeout")],c=e[n.__symbol__("clearTimeout")];s&&(o.timeout={setTimeout:s||e.setTimeout,clearTimeout:c||e.clearTimeout}),jasmine.UserContext?(o.userContext||(o.userContext=new jasmine.UserContext),o.userContext.queueRunner=this):(o.userContext||(o.userContext={}),o.userContext.queueRunner=this);const i=o.onException;o.onException=function(e){if(e&&"Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL."===e.message){const n=this&&this.testProxyZoneSpec;if(n){const t=n.getAndClearPendingTasksInfo();try{e.message+=t}catch(e){}}}i&&i.call(this,e)},t.call(this,o)}return function(e,n){for(const t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);function t(){this.constructor=e}e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}(o,t),o.prototype.execute=function(){let e=n.current,o=!1;for(;e;){if(e===r){o=!0;break}e=e.parent}if(!o)throw new Error("Unexpected Zone: "+n.current.name);this.testProxyZoneSpec=new s,this.testProxyZone=r.fork(this.testProxyZoneSpec),n.currentTask?t.prototype.execute.call(this):n.current.scheduleMicroTask("jasmine.execute().forceTask",(()=>f.prototype.execute.call(this)))},o}(f)}));
*/function patchJasmine(e){e.__load_patch("jasmine",((e,n,t)=>{if(!n)throw new Error("Missing: zone.js");if("undefined"!=typeof jest)return;if("undefined"==typeof jasmine||jasmine.__zone_patch__)return;jasmine.__zone_patch__=!0;const o=n.SyncTestZoneSpec,s=n.ProxyZoneSpec;if(!o)throw new Error("Missing: SyncTestZoneSpec");if(!s)throw new Error("Missing: ProxyZoneSpec");const r=n.current,c=n.__symbol__,i=!0===e[c("fakeAsyncDisablePatchingClock")],a=!i&&(!0===e[c("fakeAsyncPatchLock")]||!0===e[c("fakeAsyncAutoFakeAsyncWhenClockPatched")]);if(!0!==e[c("ignoreUnhandledRejection")]){const n=jasmine.GlobalErrors;n&&!jasmine[c("GlobalErrors")]&&(jasmine[c("GlobalErrors")]=n,jasmine.GlobalErrors=function(){const t=new n,o=t.install;return o&&!t[c("install")]&&(t[c("install")]=o,t.install=function(){const n="undefined"!=typeof process&&!!process.on,t=n?process.listeners("unhandledRejection"):e.eventListeners("unhandledrejection"),s=o.apply(this,arguments);return n?process.removeAllListeners("unhandledRejection"):e.removeAllListeners("unhandledrejection"),t&&t.forEach((t=>{n?process.on("unhandledRejection",t):e.addEventListener("unhandledrejection",t)})),s}),t})}const l=jasmine.getEnv();if(["describe","xdescribe","fdescribe"].forEach((e=>{let n=l[e];l[e]=function(e,t){return n.call(this,e,function s(e,n){return function(){return r.fork(new o(`jasmine.describe#${e}`)).run(n,this,arguments)}}(e,t))}})),["it","xit","fit"].forEach((e=>{let n=l[e];l[c(e)]=n,l[e]=function(e,t,o){return arguments[1]=p(t),n.apply(this,arguments)}})),["beforeEach","afterEach","beforeAll","afterAll"].forEach((e=>{let n=l[e];l[c(e)]=n,l[e]=function(e,t){return arguments[0]=p(e),n.apply(this,arguments)}})),!i){const e=jasmine[c("clock")]=jasmine.clock;jasmine.clock=function(){const t=e.apply(this,arguments);if(!t[c("patched")]){t[c("patched")]=c("patched");const e=t[c("tick")]=t.tick;t.tick=function(){const t=n.current.get("FakeAsyncTestZoneSpec");return t?t.tick.apply(t,arguments):e.apply(this,arguments)};const o=t[c("mockDate")]=t.mockDate;t.mockDate=function(){const e=n.current.get("FakeAsyncTestZoneSpec");if(e){const n=arguments.length>0?arguments[0]:new Date;return e.setFakeBaseSystemTime.apply(e,n&&"function"==typeof n.getTime?[n.getTime()]:arguments)}return o.apply(this,arguments)},a&&["install","uninstall"].forEach((e=>{const o=t[c(e)]=t[e];t[e]=function(){if(!n.FakeAsyncTestZoneSpec)return o.apply(this,arguments);jasmine[c("clockInstalled")]="install"===e}}))}return t}}if(!jasmine[n.__symbol__("createSpyObj")]){const e=jasmine.createSpyObj;jasmine[n.__symbol__("createSpyObj")]=e,jasmine.createSpyObj=function(){const n=Array.prototype.slice.call(arguments);let t;if(n.length>=3&&n[2]){const o=Object.defineProperty;Object.defineProperty=function(e,n,t){return o.call(this,e,n,{...t,configurable:!0,enumerable:!0})};try{t=e.apply(this,n)}finally{Object.defineProperty=o}}else t=e.apply(this,n);return t}}function u(e,t,o,s){const r=!!jasmine[c("clockInstalled")],i=o.testProxyZone;if(r&&a){const t=n[n.__symbol__("fakeAsyncTest")];t&&"function"==typeof t.fakeAsync&&(e=t.fakeAsync(e))}return s?i.run(e,t,[s]):i.run(e,t)}function p(e){return e&&(e.length?function(n){return u(e,this,this.queueRunner,n)}:function(){return u(e,this,this.queueRunner)})}const f=jasmine.QueueRunner;jasmine.QueueRunner=function(t){function o(o){o.onComplete&&(o.onComplete=(e=>()=>{this.testProxyZone=null,this.testProxyZoneSpec=null,r.scheduleMicroTask("jasmine.onComplete",e)})(o.onComplete));const s=e[n.__symbol__("setTimeout")],c=e[n.__symbol__("clearTimeout")];s&&(o.timeout={setTimeout:s||e.setTimeout,clearTimeout:c||e.clearTimeout}),jasmine.UserContext?(o.userContext||(o.userContext=new jasmine.UserContext),o.userContext.queueRunner=this):(o.userContext||(o.userContext={}),o.userContext.queueRunner=this);const i=o.onException;o.onException=function(e){if(e&&"Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL."===e.message){const n=this&&this.testProxyZoneSpec;if(n){const t=n.getAndClearPendingTasksInfo();try{e.message+=t}catch(e){}}}i&&i.call(this,e)},t.call(this,o)}return function(e,n){for(const t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);function t(){this.constructor=e}e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}(o,t),o.prototype.execute=function(){let e=n.current,o=!1;for(;e;){if(e===r){o=!0;break}e=e.parent}if(!o)throw new Error("Unexpected Zone: "+n.current.name);this.testProxyZoneSpec=new s,this.testProxyZone=r.fork(this.testProxyZoneSpec),n.currentTask?t.prototype.execute.call(this):n.current.scheduleMicroTask("jasmine.execute().forceTask",(()=>f.prototype.execute.call(this)))},o}(f)}))}patchJasmine(Zone);
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT

@@ -11,142 +11,155 @@ */

*/
const NEWLINE = '\n';
const IGNORE_FRAMES = {};
const creationTrace = '__creationTrace__';
const ERROR_TAG = 'STACKTRACE TRACKING';
const SEP_TAG = '__SEP_TAG__';
let sepTemplate = SEP_TAG + '@[native]';
class LongStackTrace {
constructor() {
this.error = getStacktrace();
this.timestamp = new Date();
function patchLongStackTrace(Zone) {
const NEWLINE = '\n';
const IGNORE_FRAMES = {};
const creationTrace = '__creationTrace__';
const ERROR_TAG = 'STACKTRACE TRACKING';
const SEP_TAG = '__SEP_TAG__';
let sepTemplate = SEP_TAG + '@[native]';
class LongStackTrace {
constructor() {
this.error = getStacktrace();
this.timestamp = new Date();
}
}
}
function getStacktraceWithUncaughtError() {
return new Error(ERROR_TAG);
}
function getStacktraceWithCaughtError() {
try {
throw getStacktraceWithUncaughtError();
function getStacktraceWithUncaughtError() {
return new Error(ERROR_TAG);
}
catch (err) {
return err;
function getStacktraceWithCaughtError() {
try {
throw getStacktraceWithUncaughtError();
}
catch (err) {
return err;
}
}
}
// Some implementations of exception handling don't create a stack trace if the exception
// isn't thrown, however it's faster not to actually throw the exception.
const error = getStacktraceWithUncaughtError();
const caughtError = getStacktraceWithCaughtError();
const getStacktrace = error.stack ?
getStacktraceWithUncaughtError :
(caughtError.stack ? getStacktraceWithCaughtError : getStacktraceWithUncaughtError);
function getFrames(error) {
return error.stack ? error.stack.split(NEWLINE) : [];
}
function addErrorStack(lines, error) {
let trace = getFrames(error);
for (let i = 0; i < trace.length; i++) {
const frame = trace[i];
// Filter out the Frames which are part of stack capturing.
if (!IGNORE_FRAMES.hasOwnProperty(frame)) {
lines.push(trace[i]);
// Some implementations of exception handling don't create a stack trace if the exception
// isn't thrown, however it's faster not to actually throw the exception.
const error = getStacktraceWithUncaughtError();
const caughtError = getStacktraceWithCaughtError();
const getStacktrace = error.stack
? getStacktraceWithUncaughtError
: caughtError.stack
? getStacktraceWithCaughtError
: getStacktraceWithUncaughtError;
function getFrames(error) {
return error.stack ? error.stack.split(NEWLINE) : [];
}
function addErrorStack(lines, error) {
let trace = getFrames(error);
for (let i = 0; i < trace.length; i++) {
const frame = trace[i];
// Filter out the Frames which are part of stack capturing.
if (!IGNORE_FRAMES.hasOwnProperty(frame)) {
lines.push(trace[i]);
}
}
}
}
function renderLongStackTrace(frames, stack) {
const longTrace = [stack ? stack.trim() : ''];
if (frames) {
let timestamp = new Date().getTime();
for (let i = 0; i < frames.length; i++) {
const traceFrames = frames[i];
const lastTime = traceFrames.timestamp;
let separator = `____________________Elapsed ${timestamp - lastTime.getTime()} ms; At: ${lastTime}`;
separator = separator.replace(/[^\w\d]/g, '_');
longTrace.push(sepTemplate.replace(SEP_TAG, separator));
addErrorStack(longTrace, traceFrames.error);
timestamp = lastTime.getTime();
function renderLongStackTrace(frames, stack) {
const longTrace = [stack ? stack.trim() : ''];
if (frames) {
let timestamp = new Date().getTime();
for (let i = 0; i < frames.length; i++) {
const traceFrames = frames[i];
const lastTime = traceFrames.timestamp;
let separator = `____________________Elapsed ${timestamp - lastTime.getTime()} ms; At: ${lastTime}`;
separator = separator.replace(/[^\w\d]/g, '_');
longTrace.push(sepTemplate.replace(SEP_TAG, separator));
addErrorStack(longTrace, traceFrames.error);
timestamp = lastTime.getTime();
}
}
return longTrace.join(NEWLINE);
}
return longTrace.join(NEWLINE);
}
// if Error.stackTraceLimit is 0, means stack trace
// is disabled, so we don't need to generate long stack trace
// this will improve performance in some test(some test will
// set stackTraceLimit to 0, https://github.com/angular/zone.js/issues/698
function stackTracesEnabled() {
// Cast through any since this property only exists on Error in the nodejs
// typings.
return Error.stackTraceLimit > 0;
}
Zone['longStackTraceZoneSpec'] = {
name: 'long-stack-trace',
longStackTraceLimit: 10, // Max number of task to keep the stack trace for.
// add a getLongStackTrace method in spec to
// handle handled reject promise error.
getLongStackTrace: function (error) {
if (!error) {
return undefined;
}
const trace = error[Zone.__symbol__('currentTaskTrace')];
if (!trace) {
return error.stack;
}
return renderLongStackTrace(trace, error.stack);
},
onScheduleTask: function (parentZoneDelegate, currentZone, targetZone, task) {
if (stackTracesEnabled()) {
const currentTask = Zone.currentTask;
let trace = currentTask && currentTask.data && currentTask.data[creationTrace] || [];
trace = [new LongStackTrace()].concat(trace);
if (trace.length > this.longStackTraceLimit) {
trace.length = this.longStackTraceLimit;
// if Error.stackTraceLimit is 0, means stack trace
// is disabled, so we don't need to generate long stack trace
// this will improve performance in some test(some test will
// set stackTraceLimit to 0, https://github.com/angular/zone.js/issues/698
function stackTracesEnabled() {
// Cast through any since this property only exists on Error in the nodejs
// typings.
return Error.stackTraceLimit > 0;
}
Zone['longStackTraceZoneSpec'] = {
name: 'long-stack-trace',
longStackTraceLimit: 10, // Max number of task to keep the stack trace for.
// add a getLongStackTrace method in spec to
// handle handled reject promise error.
getLongStackTrace: function (error) {
if (!error) {
return undefined;
}
if (!task.data)
task.data = {};
if (task.type === 'eventTask') {
// Fix issue https://github.com/angular/zone.js/issues/1195,
// For event task of browser, by default, all task will share a
// singleton instance of data object, we should create a new one here
// The cast to `any` is required to workaround a closure bug which wrongly applies
// URL sanitization rules to .data access.
task.data = { ...task.data };
const trace = error[Zone.__symbol__('currentTaskTrace')];
if (!trace) {
return error.stack;
}
task.data[creationTrace] = trace;
}
return parentZoneDelegate.scheduleTask(targetZone, task);
},
onHandleError: function (parentZoneDelegate, currentZone, targetZone, error) {
if (stackTracesEnabled()) {
const parentTask = Zone.currentTask || error.task;
if (error instanceof Error && parentTask) {
const longStack = renderLongStackTrace(parentTask.data && parentTask.data[creationTrace], error.stack);
try {
error.stack = error.longStack = longStack;
return renderLongStackTrace(trace, error.stack);
},
onScheduleTask: function (parentZoneDelegate, currentZone, targetZone, task) {
if (stackTracesEnabled()) {
const currentTask = Zone.currentTask;
let trace = (currentTask && currentTask.data && currentTask.data[creationTrace]) || [];
trace = [new LongStackTrace()].concat(trace);
if (trace.length > this.longStackTraceLimit) {
trace.length = this.longStackTraceLimit;
}
catch (err) {
if (!task.data)
task.data = {};
if (task.type === 'eventTask') {
// Fix issue https://github.com/angular/zone.js/issues/1195,
// For event task of browser, by default, all task will share a
// singleton instance of data object, we should create a new one here
// The cast to `any` is required to workaround a closure bug which wrongly applies
// URL sanitization rules to .data access.
task.data = { ...task.data };
}
task.data[creationTrace] = trace;
}
return parentZoneDelegate.scheduleTask(targetZone, task);
},
onHandleError: function (parentZoneDelegate, currentZone, targetZone, error) {
if (stackTracesEnabled()) {
const parentTask = Zone.currentTask || error.task;
if (error instanceof Error && parentTask) {
const longStack = renderLongStackTrace(parentTask.data && parentTask.data[creationTrace], error.stack);
try {
error.stack = error.longStack = longStack;
}
catch (err) { }
}
}
return parentZoneDelegate.handleError(targetZone, error);
},
};
function captureStackTraces(stackTraces, count) {
if (count > 0) {
stackTraces.push(getFrames(new LongStackTrace().error));
captureStackTraces(stackTraces, count - 1);
}
return parentZoneDelegate.handleError(targetZone, error);
}
};
function captureStackTraces(stackTraces, count) {
if (count > 0) {
stackTraces.push(getFrames((new LongStackTrace()).error));
captureStackTraces(stackTraces, count - 1);
}
}
function computeIgnoreFrames() {
if (!stackTracesEnabled()) {
return;
}
const frames = [];
captureStackTraces(frames, 2);
const frames1 = frames[0];
const frames2 = frames[1];
for (let i = 0; i < frames1.length; i++) {
const frame1 = frames1[i];
if (frame1.indexOf(ERROR_TAG) == -1) {
let match = frame1.match(/^\s*at\s+/);
if (match) {
sepTemplate = match[0] + SEP_TAG + ' (http://localhost)';
function computeIgnoreFrames() {
if (!stackTracesEnabled()) {
return;
}
const frames = [];
captureStackTraces(frames, 2);
const frames1 = frames[0];
const frames2 = frames[1];
for (let i = 0; i < frames1.length; i++) {
const frame1 = frames1[i];
if (frame1.indexOf(ERROR_TAG) == -1) {
let match = frame1.match(/^\s*at\s+/);
if (match) {
sepTemplate = match[0] + SEP_TAG + ' (http://localhost)';
break;
}
}
}
for (let i = 0; i < frames1.length; i++) {
const frame1 = frames1[i];
const frame2 = frames2[i];
if (frame1 === frame2) {
IGNORE_FRAMES[frame1] = true;
}
else {
break;

@@ -156,13 +169,5 @@ }

}
for (let i = 0; i < frames1.length; i++) {
const frame1 = frames1[i];
const frame2 = frames2[i];
if (frame1 === frame2) {
IGNORE_FRAMES[frame1] = true;
}
else {
break;
}
}
computeIgnoreFrames();
}
computeIgnoreFrames();
patchLongStackTrace(Zone);
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/const NEWLINE="\n",IGNORE_FRAMES={},creationTrace="__creationTrace__",ERROR_TAG="STACKTRACE TRACKING",SEP_TAG="__SEP_TAG__";let sepTemplate=SEP_TAG+"@[native]";class LongStackTrace{constructor(){this.error=getStacktrace(),this.timestamp=new Date}}function getStacktraceWithUncaughtError(){return new Error(ERROR_TAG)}function getStacktraceWithCaughtError(){try{throw getStacktraceWithUncaughtError()}catch(t){return t}}const error=getStacktraceWithUncaughtError(),caughtError=getStacktraceWithCaughtError(),getStacktrace=error.stack?getStacktraceWithUncaughtError:caughtError.stack?getStacktraceWithCaughtError:getStacktraceWithUncaughtError;function getFrames(t){return t.stack?t.stack.split(NEWLINE):[]}function addErrorStack(t,r){let e=getFrames(r);for(let r=0;r<e.length;r++)IGNORE_FRAMES.hasOwnProperty(e[r])||t.push(e[r])}function renderLongStackTrace(t,r){const e=[r?r.trim():""];if(t){let r=(new Date).getTime();for(let a=0;a<t.length;a++){const c=t[a],n=c.timestamp;let o=`____________________Elapsed ${r-n.getTime()} ms; At: ${n}`;o=o.replace(/[^\w\d]/g,"_"),e.push(sepTemplate.replace(SEP_TAG,o)),addErrorStack(e,c.error),r=n.getTime()}}return e.join(NEWLINE)}function stackTracesEnabled(){return Error.stackTraceLimit>0}function captureStackTraces(t,r){r>0&&(t.push(getFrames((new LongStackTrace).error)),captureStackTraces(t,r-1))}function computeIgnoreFrames(){if(!stackTracesEnabled())return;const t=[];captureStackTraces(t,2);const r=t[0],e=t[1];for(let t=0;t<r.length;t++){const e=r[t];if(-1==e.indexOf(ERROR_TAG)){let t=e.match(/^\s*at\s+/);if(t){sepTemplate=t[0]+SEP_TAG+" (http://localhost)";break}}}for(let t=0;t<r.length;t++){const a=r[t];if(a!==e[t])break;IGNORE_FRAMES[a]=!0}}Zone.longStackTraceZoneSpec={name:"long-stack-trace",longStackTraceLimit:10,getLongStackTrace:function(t){if(!t)return;const r=t[Zone.__symbol__("currentTaskTrace")];return r?renderLongStackTrace(r,t.stack):t.stack},onScheduleTask:function(t,r,e,a){if(stackTracesEnabled()){const t=Zone.currentTask;let r=t&&t.data&&t.data[creationTrace]||[];r=[new LongStackTrace].concat(r),r.length>this.longStackTraceLimit&&(r.length=this.longStackTraceLimit),a.data||(a.data={}),"eventTask"===a.type&&(a.data={...a.data}),a.data[creationTrace]=r}return t.scheduleTask(e,a)},onHandleError:function(t,r,e,a){if(stackTracesEnabled()){const t=Zone.currentTask||a.task;if(a instanceof Error&&t){const r=renderLongStackTrace(t.data&&t.data[creationTrace],a.stack);try{a.stack=a.longStack=r}catch(t){}}}return t.handleError(e,a)}},computeIgnoreFrames();
*/function patchLongStackTrace(t){const n="\n",e={},a="__creationTrace__",r="STACKTRACE TRACKING",c="__SEP_TAG__";let o=c+"@[native]";class s{constructor(){this.error=f(),this.timestamp=new Date}}function i(){return new Error(r)}function l(){try{throw i()}catch(t){return t}}const _=i(),u=l(),f=_.stack?i:u.stack?l:i;function k(t){return t.stack?t.stack.split(n):[]}function h(t,n){let a=k(n);for(let n=0;n<a.length;n++)e.hasOwnProperty(a[n])||t.push(a[n])}function T(t,e){const a=[e?e.trim():""];if(t){let n=(new Date).getTime();for(let e=0;e<t.length;e++){const r=t[e],s=r.timestamp;let i=`____________________Elapsed ${n-s.getTime()} ms; At: ${s}`;i=i.replace(/[^\w\d]/g,"_"),a.push(o.replace(c,i)),h(a,r.error),n=s.getTime()}}return a.join(n)}function g(){return Error.stackTraceLimit>0}function d(t,n){n>0&&(t.push(k((new s).error)),d(t,n-1))}t.longStackTraceZoneSpec={name:"long-stack-trace",longStackTraceLimit:10,getLongStackTrace:function(n){if(!n)return;const e=n[t.__symbol__("currentTaskTrace")];return e?T(e,n.stack):n.stack},onScheduleTask:function(n,e,r,c){if(g()){const n=t.currentTask;let e=n&&n.data&&n.data[a]||[];e=[new s].concat(e),e.length>this.longStackTraceLimit&&(e.length=this.longStackTraceLimit),c.data||(c.data={}),"eventTask"===c.type&&(c.data={...c.data}),c.data[a]=e}return n.scheduleTask(r,c)},onHandleError:function(n,e,r,c){if(g()){const n=t.currentTask||c.task;if(c instanceof Error&&n){const t=T(n.data&&n.data[a],c.stack);try{c.stack=c.longStack=t}catch(t){}}}return n.handleError(r,c)}},function m(){if(!g())return;const t=[];d(t,2);const n=t[0],a=t[1];for(let t=0;t<n.length;t++){const e=n[t];if(-1==e.indexOf(r)){let t=e.match(/^\s*at\s+/);if(t){o=t[0]+c+" (http://localhost)";break}}}for(let t=0;t<n.length;t++){const r=n[t];if(r!==a[t])break;e[r]=!0}}()}patchLongStackTrace(Zone);
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/
Zone.__load_patch('mocha', (global, Zone) => {
const Mocha = global.Mocha;
if (typeof Mocha === 'undefined') {
// return if Mocha is not available, because now zone-testing
// will load mocha patch with jasmine/jest patch
return;
}
if (typeof Zone === 'undefined') {
throw new Error('Missing Zone.js');
}
const ProxyZoneSpec = Zone['ProxyZoneSpec'];
const SyncTestZoneSpec = Zone['SyncTestZoneSpec'];
if (!ProxyZoneSpec) {
throw new Error('Missing ProxyZoneSpec');
}
if (Mocha['__zone_patch__']) {
throw new Error('"Mocha" has already been patched with "Zone".');
}
Mocha['__zone_patch__'] = true;
const rootZone = Zone.current;
const syncZone = rootZone.fork(new SyncTestZoneSpec('Mocha.describe'));
let testZone = null;
const suiteZone = rootZone.fork(new ProxyZoneSpec());
const mochaOriginal = {
after: global.after,
afterEach: global.afterEach,
before: global.before,
beforeEach: global.beforeEach,
describe: global.describe,
it: global.it
};
function modifyArguments(args, syncTest, asyncTest) {
for (let i = 0; i < args.length; i++) {
let arg = args[i];
if (typeof arg === 'function') {
// The `done` callback is only passed through if the function expects at
// least one argument.
// Note we have to make a function with correct number of arguments,
// otherwise mocha will
// think that all functions are sync or async.
args[i] = (arg.length === 0) ? syncTest(arg) : asyncTest(arg);
// Mocha uses toString to view the test body in the result list, make sure we return the
// correct function body
args[i].toString = function () {
return arg.toString();
};
function patchMocha(Zone) {
Zone.__load_patch('mocha', (global, Zone) => {
const Mocha = global.Mocha;
if (typeof Mocha === 'undefined') {
// return if Mocha is not available, because now zone-testing
// will load mocha patch with jasmine/jest patch
return;
}
if (typeof Zone === 'undefined') {
throw new Error('Missing Zone.js');
}
const ProxyZoneSpec = Zone['ProxyZoneSpec'];
const SyncTestZoneSpec = Zone['SyncTestZoneSpec'];
if (!ProxyZoneSpec) {
throw new Error('Missing ProxyZoneSpec');
}
if (Mocha['__zone_patch__']) {
throw new Error('"Mocha" has already been patched with "Zone".');
}
Mocha['__zone_patch__'] = true;
const rootZone = Zone.current;
const syncZone = rootZone.fork(new SyncTestZoneSpec('Mocha.describe'));
let testZone = null;
const suiteZone = rootZone.fork(new ProxyZoneSpec());
const mochaOriginal = {
after: global.after,
afterEach: global.afterEach,
before: global.before,
beforeEach: global.beforeEach,
describe: global.describe,
it: global.it,
};
function modifyArguments(args, syncTest, asyncTest) {
for (let i = 0; i < args.length; i++) {
let arg = args[i];
if (typeof arg === 'function') {
// The `done` callback is only passed through if the function expects at
// least one argument.
// Note we have to make a function with correct number of arguments,
// otherwise mocha will
// think that all functions are sync or async.
args[i] = arg.length === 0 ? syncTest(arg) : asyncTest(arg);
// Mocha uses toString to view the test body in the result list, make sure we return the
// correct function body
args[i].toString = function () {
return arg.toString();
};
}
}
return args;
}
return args;
}
function wrapDescribeInZone(args) {
const syncTest = function (fn) {
return function () {
return syncZone.run(fn, this, arguments);
function wrapDescribeInZone(args) {
const syncTest = function (fn) {
return function () {
return syncZone.run(fn, this, arguments);
};
};
};
return modifyArguments(args, syncTest);
}
function wrapTestInZone(args) {
const asyncTest = function (fn) {
return function (done) {
return testZone.run(fn, this, [done]);
return modifyArguments(args, syncTest);
}
function wrapTestInZone(args) {
const asyncTest = function (fn) {
return function (done) {
return testZone.run(fn, this, [done]);
};
};
};
const syncTest = function (fn) {
return function () {
return testZone.run(fn, this);
const syncTest = function (fn) {
return function () {
return testZone.run(fn, this);
};
};
};
return modifyArguments(args, syncTest, asyncTest);
}
function wrapSuiteInZone(args) {
const asyncTest = function (fn) {
return function (done) {
return suiteZone.run(fn, this, [done]);
return modifyArguments(args, syncTest, asyncTest);
}
function wrapSuiteInZone(args) {
const asyncTest = function (fn) {
return function (done) {
return suiteZone.run(fn, this, [done]);
};
};
};
const syncTest = function (fn) {
return function () {
return suiteZone.run(fn, this);
const syncTest = function (fn) {
return function () {
return suiteZone.run(fn, this);
};
};
return modifyArguments(args, syncTest, asyncTest);
}
global.describe = global.suite = function () {
return mochaOriginal.describe.apply(this, wrapDescribeInZone(arguments));
};
return modifyArguments(args, syncTest, asyncTest);
}
global.describe = global.suite = function () {
return mochaOriginal.describe.apply(this, wrapDescribeInZone(arguments));
};
global.xdescribe = global.suite.skip = global.describe.skip = function () {
return mochaOriginal.describe.skip.apply(this, wrapDescribeInZone(arguments));
};
global.describe.only = global.suite.only = function () {
return mochaOriginal.describe.only.apply(this, wrapDescribeInZone(arguments));
};
global.it = global.specify = global.test = function () {
return mochaOriginal.it.apply(this, wrapTestInZone(arguments));
};
global.xit = global.xspecify = global.it.skip = function () {
return mochaOriginal.it.skip.apply(this, wrapTestInZone(arguments));
};
global.it.only = global.test.only = function () {
return mochaOriginal.it.only.apply(this, wrapTestInZone(arguments));
};
global.after = global.suiteTeardown = function () {
return mochaOriginal.after.apply(this, wrapSuiteInZone(arguments));
};
global.afterEach = global.teardown = function () {
return mochaOriginal.afterEach.apply(this, wrapTestInZone(arguments));
};
global.before = global.suiteSetup = function () {
return mochaOriginal.before.apply(this, wrapSuiteInZone(arguments));
};
global.beforeEach = global.setup = function () {
return mochaOriginal.beforeEach.apply(this, wrapTestInZone(arguments));
};
((originalRunTest, originalRun) => {
Mocha.Runner.prototype.runTest = function (fn) {
Zone.current.scheduleMicroTask('mocha.forceTask', () => {
originalRunTest.call(this, fn);
});
global.xdescribe =
global.suite.skip =
global.describe.skip =
function () {
return mochaOriginal.describe.skip.apply(this, wrapDescribeInZone(arguments));
};
global.describe.only = global.suite.only = function () {
return mochaOriginal.describe.only.apply(this, wrapDescribeInZone(arguments));
};
Mocha.Runner.prototype.run = function (fn) {
this.on('test', (e) => {
testZone = rootZone.fork(new ProxyZoneSpec());
});
this.on('fail', (test, err) => {
const proxyZoneSpec = testZone && testZone.get('ProxyZoneSpec');
if (proxyZoneSpec && err) {
try {
// try catch here in case err.message is not writable
err.message += proxyZoneSpec.getAndClearPendingTasksInfo();
global.it =
global.specify =
global.test =
function () {
return mochaOriginal.it.apply(this, wrapTestInZone(arguments));
};
global.xit =
global.xspecify =
global.it.skip =
function () {
return mochaOriginal.it.skip.apply(this, wrapTestInZone(arguments));
};
global.it.only = global.test.only = function () {
return mochaOriginal.it.only.apply(this, wrapTestInZone(arguments));
};
global.after = global.suiteTeardown = function () {
return mochaOriginal.after.apply(this, wrapSuiteInZone(arguments));
};
global.afterEach = global.teardown = function () {
return mochaOriginal.afterEach.apply(this, wrapTestInZone(arguments));
};
global.before = global.suiteSetup = function () {
return mochaOriginal.before.apply(this, wrapSuiteInZone(arguments));
};
global.beforeEach = global.setup = function () {
return mochaOriginal.beforeEach.apply(this, wrapTestInZone(arguments));
};
((originalRunTest, originalRun) => {
Mocha.Runner.prototype.runTest = function (fn) {
Zone.current.scheduleMicroTask('mocha.forceTask', () => {
originalRunTest.call(this, fn);
});
};
Mocha.Runner.prototype.run = function (fn) {
this.on('test', (e) => {
testZone = rootZone.fork(new ProxyZoneSpec());
});
this.on('fail', (test, err) => {
const proxyZoneSpec = testZone && testZone.get('ProxyZoneSpec');
if (proxyZoneSpec && err) {
try {
// try catch here in case err.message is not writable
err.message += proxyZoneSpec.getAndClearPendingTasksInfo();
}
catch (error) { }
}
catch (error) {
}
}
});
return originalRun.call(this, fn);
};
})(Mocha.Runner.prototype.runTest, Mocha.Runner.prototype.run);
});
});
return originalRun.call(this, fn);
};
})(Mocha.Runner.prototype.runTest, Mocha.Runner.prototype.run);
});
}
patchMocha(Zone);
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/Zone.__load_patch("mocha",((t,n)=>{const e=t.Mocha;if(void 0===e)return;if(void 0===n)throw new Error("Missing Zone.js");const r=n.ProxyZoneSpec,i=n.SyncTestZoneSpec;if(!r)throw new Error("Missing ProxyZoneSpec");if(e.__zone_patch__)throw new Error('"Mocha" has already been patched with "Zone".');e.__zone_patch__=!0;const o=n.current,u=o.fork(new i("Mocha.describe"));let c=null;const s=o.fork(new r),f={after:t.after,afterEach:t.afterEach,before:t.before,beforeEach:t.beforeEach,describe:t.describe,it:t.it};function a(t,n,e){for(let r=0;r<t.length;r++){let i=t[r];"function"==typeof i&&(t[r]=0===i.length?n(i):e(i),t[r].toString=function(){return i.toString()})}return t}function p(t){return a(t,(function(t){return function(){return u.run(t,this,arguments)}}))}function h(t){return a(t,(function(t){return function(){return c.run(t,this)}}),(function(t){return function(n){return c.run(t,this,[n])}}))}function l(t){return a(t,(function(t){return function(){return s.run(t,this)}}),(function(t){return function(n){return s.run(t,this,[n])}}))}var y,d;t.describe=t.suite=function(){return f.describe.apply(this,p(arguments))},t.xdescribe=t.suite.skip=t.describe.skip=function(){return f.describe.skip.apply(this,p(arguments))},t.describe.only=t.suite.only=function(){return f.describe.only.apply(this,p(arguments))},t.it=t.specify=t.test=function(){return f.it.apply(this,h(arguments))},t.xit=t.xspecify=t.it.skip=function(){return f.it.skip.apply(this,h(arguments))},t.it.only=t.test.only=function(){return f.it.only.apply(this,h(arguments))},t.after=t.suiteTeardown=function(){return f.after.apply(this,l(arguments))},t.afterEach=t.teardown=function(){return f.afterEach.apply(this,h(arguments))},t.before=t.suiteSetup=function(){return f.before.apply(this,l(arguments))},t.beforeEach=t.setup=function(){return f.beforeEach.apply(this,h(arguments))},y=e.Runner.prototype.runTest,d=e.Runner.prototype.run,e.Runner.prototype.runTest=function(t){n.current.scheduleMicroTask("mocha.forceTask",(()=>{y.call(this,t)}))},e.Runner.prototype.run=function(t){return this.on("test",(t=>{c=o.fork(new r)})),this.on("fail",((t,n)=>{const e=c&&c.get("ProxyZoneSpec");if(e&&n)try{n.message+=e.getAndClearPendingTasksInfo()}catch(t){}})),d.call(this,t)}}));
*/function patchMocha(t){t.__load_patch("mocha",((t,n)=>{const e=t.Mocha;if(void 0===e)return;if(void 0===n)throw new Error("Missing Zone.js");const r=n.ProxyZoneSpec,o=n.SyncTestZoneSpec;if(!r)throw new Error("Missing ProxyZoneSpec");if(e.__zone_patch__)throw new Error('"Mocha" has already been patched with "Zone".');e.__zone_patch__=!0;const i=n.current,c=i.fork(new o("Mocha.describe"));let u=null;const s=i.fork(new r),f={after:t.after,afterEach:t.afterEach,before:t.before,beforeEach:t.beforeEach,describe:t.describe,it:t.it};function a(t,n,e){for(let r=0;r<t.length;r++){let o=t[r];"function"==typeof o&&(t[r]=0===o.length?n(o):e(o),t[r].toString=function(){return o.toString()})}return t}function h(t){return a(t,(function(t){return function(){return c.run(t,this,arguments)}}))}function p(t){return a(t,(function(t){return function(){return u.run(t,this)}}),(function(t){return function(n){return u.run(t,this,[n])}}))}function l(t){return a(t,(function(t){return function(){return s.run(t,this)}}),(function(t){return function(n){return s.run(t,this,[n])}}))}var y,d;t.describe=t.suite=function(){return f.describe.apply(this,h(arguments))},t.xdescribe=t.suite.skip=t.describe.skip=function(){return f.describe.skip.apply(this,h(arguments))},t.describe.only=t.suite.only=function(){return f.describe.only.apply(this,h(arguments))},t.it=t.specify=t.test=function(){return f.it.apply(this,p(arguments))},t.xit=t.xspecify=t.it.skip=function(){return f.it.skip.apply(this,p(arguments))},t.it.only=t.test.only=function(){return f.it.only.apply(this,p(arguments))},t.after=t.suiteTeardown=function(){return f.after.apply(this,l(arguments))},t.afterEach=t.teardown=function(){return f.afterEach.apply(this,p(arguments))},t.before=t.suiteSetup=function(){return f.before.apply(this,l(arguments))},t.beforeEach=t.setup=function(){return f.beforeEach.apply(this,p(arguments))},y=e.Runner.prototype.runTest,d=e.Runner.prototype.run,e.Runner.prototype.runTest=function(t){n.current.scheduleMicroTask("mocha.forceTask",(()=>{y.call(this,t)}))},e.Runner.prototype.run=function(t){return this.on("test",(t=>{u=i.fork(new r)})),this.on("fail",((t,n)=>{const e=u&&u.get("ProxyZoneSpec");if(e&&n)try{n.message+=e.getAndClearPendingTasksInfo()}catch(t){}})),d.call(this,t)}}))}patchMocha(Zone);
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT

@@ -38,6 +38,7 @@ */

this.propertyKeys = Object.keys(delegateSpec.properties);
this.propertyKeys.forEach((k) => this.properties[k] = delegateSpec.properties[k]);
this.propertyKeys.forEach((k) => (this.properties[k] = delegateSpec.properties[k]));
}
// if a new delegateSpec was set, check if we need to trigger hasTask
if (isNewDelegate && this.lastTaskState &&
if (isNewDelegate &&
this.lastTaskState &&
(this.lastTaskState.macroTask || this.lastTaskState.microTask)) {

@@ -169,4 +170,8 @@ this.isNeedToTriggerHasTask = true;

}
// Export the class so that new instances can be created with proper
// constructor params.
Zone['ProxyZoneSpec'] = ProxyZoneSpec;
function patchProxyZoneSpec(Zone) {
// Export the class so that new instances can be created with proper
// constructor params.
Zone['ProxyZoneSpec'] = ProxyZoneSpec;
}
patchProxyZoneSpec(Zone);
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/class ProxyZoneSpec{static get(){return Zone.current.get("ProxyZoneSpec")}static isLoaded(){return ProxyZoneSpec.get()instanceof ProxyZoneSpec}static assertPresent(){if(!ProxyZoneSpec.isLoaded())throw new Error("Expected to be running in 'ProxyZone', but it was not found.");return ProxyZoneSpec.get()}constructor(e=null){this.defaultSpecDelegate=e,this.name="ProxyZone",this._delegateSpec=null,this.properties={ProxyZoneSpec:this},this.propertyKeys=null,this.lastTaskState=null,this.isNeedToTriggerHasTask=!1,this.tasks=[],this.setDelegate(e)}setDelegate(e){const t=this._delegateSpec!==e;this._delegateSpec=e,this.propertyKeys&&this.propertyKeys.forEach((e=>delete this.properties[e])),this.propertyKeys=null,e&&e.properties&&(this.propertyKeys=Object.keys(e.properties),this.propertyKeys.forEach((t=>this.properties[t]=e.properties[t]))),t&&this.lastTaskState&&(this.lastTaskState.macroTask||this.lastTaskState.microTask)&&(this.isNeedToTriggerHasTask=!0)}getDelegate(){return this._delegateSpec}resetDelegate(){this.getDelegate(),this.setDelegate(this.defaultSpecDelegate)}tryTriggerHasTask(e,t,s){this.isNeedToTriggerHasTask&&this.lastTaskState&&(this.isNeedToTriggerHasTask=!1,this.onHasTask(e,t,s,this.lastTaskState))}removeFromTasks(e){if(this.tasks)for(let t=0;t<this.tasks.length;t++)if(this.tasks[t]===e)return void this.tasks.splice(t,1)}getAndClearPendingTasksInfo(){if(0===this.tasks.length)return"";const e="--Pending async tasks are: ["+this.tasks.map((e=>{const t=e.data&&Object.keys(e.data).map((t=>t+":"+e.data[t])).join(",");return`type: ${e.type}, source: ${e.source}, args: {${t}}`}))+"]";return this.tasks=[],e}onFork(e,t,s,a){return this._delegateSpec&&this._delegateSpec.onFork?this._delegateSpec.onFork(e,t,s,a):e.fork(s,a)}onIntercept(e,t,s,a,r){return this._delegateSpec&&this._delegateSpec.onIntercept?this._delegateSpec.onIntercept(e,t,s,a,r):e.intercept(s,a,r)}onInvoke(e,t,s,a,r,i,o){return this.tryTriggerHasTask(e,t,s),this._delegateSpec&&this._delegateSpec.onInvoke?this._delegateSpec.onInvoke(e,t,s,a,r,i,o):e.invoke(s,a,r,i,o)}onHandleError(e,t,s,a){return this._delegateSpec&&this._delegateSpec.onHandleError?this._delegateSpec.onHandleError(e,t,s,a):e.handleError(s,a)}onScheduleTask(e,t,s,a){return"eventTask"!==a.type&&this.tasks.push(a),this._delegateSpec&&this._delegateSpec.onScheduleTask?this._delegateSpec.onScheduleTask(e,t,s,a):e.scheduleTask(s,a)}onInvokeTask(e,t,s,a,r,i){return"eventTask"!==a.type&&this.removeFromTasks(a),this.tryTriggerHasTask(e,t,s),this._delegateSpec&&this._delegateSpec.onInvokeTask?this._delegateSpec.onInvokeTask(e,t,s,a,r,i):e.invokeTask(s,a,r,i)}onCancelTask(e,t,s,a){return"eventTask"!==a.type&&this.removeFromTasks(a),this.tryTriggerHasTask(e,t,s),this._delegateSpec&&this._delegateSpec.onCancelTask?this._delegateSpec.onCancelTask(e,t,s,a):e.cancelTask(s,a)}onHasTask(e,t,s,a){this.lastTaskState=a,this._delegateSpec&&this._delegateSpec.onHasTask?this._delegateSpec.onHasTask(e,t,s,a):e.hasTask(s,a)}}Zone.ProxyZoneSpec=ProxyZoneSpec;
*/class ProxyZoneSpec{static get(){return Zone.current.get("ProxyZoneSpec")}static isLoaded(){return ProxyZoneSpec.get()instanceof ProxyZoneSpec}static assertPresent(){if(!ProxyZoneSpec.isLoaded())throw new Error("Expected to be running in 'ProxyZone', but it was not found.");return ProxyZoneSpec.get()}constructor(e=null){this.defaultSpecDelegate=e,this.name="ProxyZone",this._delegateSpec=null,this.properties={ProxyZoneSpec:this},this.propertyKeys=null,this.lastTaskState=null,this.isNeedToTriggerHasTask=!1,this.tasks=[],this.setDelegate(e)}setDelegate(e){const t=this._delegateSpec!==e;this._delegateSpec=e,this.propertyKeys&&this.propertyKeys.forEach((e=>delete this.properties[e])),this.propertyKeys=null,e&&e.properties&&(this.propertyKeys=Object.keys(e.properties),this.propertyKeys.forEach((t=>this.properties[t]=e.properties[t]))),t&&this.lastTaskState&&(this.lastTaskState.macroTask||this.lastTaskState.microTask)&&(this.isNeedToTriggerHasTask=!0)}getDelegate(){return this._delegateSpec}resetDelegate(){this.getDelegate(),this.setDelegate(this.defaultSpecDelegate)}tryTriggerHasTask(e,t,s){this.isNeedToTriggerHasTask&&this.lastTaskState&&(this.isNeedToTriggerHasTask=!1,this.onHasTask(e,t,s,this.lastTaskState))}removeFromTasks(e){if(this.tasks)for(let t=0;t<this.tasks.length;t++)if(this.tasks[t]===e)return void this.tasks.splice(t,1)}getAndClearPendingTasksInfo(){if(0===this.tasks.length)return"";const e="--Pending async tasks are: ["+this.tasks.map((e=>{const t=e.data&&Object.keys(e.data).map((t=>t+":"+e.data[t])).join(",");return`type: ${e.type}, source: ${e.source}, args: {${t}}`}))+"]";return this.tasks=[],e}onFork(e,t,s,a){return this._delegateSpec&&this._delegateSpec.onFork?this._delegateSpec.onFork(e,t,s,a):e.fork(s,a)}onIntercept(e,t,s,a,r){return this._delegateSpec&&this._delegateSpec.onIntercept?this._delegateSpec.onIntercept(e,t,s,a,r):e.intercept(s,a,r)}onInvoke(e,t,s,a,r,o,i){return this.tryTriggerHasTask(e,t,s),this._delegateSpec&&this._delegateSpec.onInvoke?this._delegateSpec.onInvoke(e,t,s,a,r,o,i):e.invoke(s,a,r,o,i)}onHandleError(e,t,s,a){return this._delegateSpec&&this._delegateSpec.onHandleError?this._delegateSpec.onHandleError(e,t,s,a):e.handleError(s,a)}onScheduleTask(e,t,s,a){return"eventTask"!==a.type&&this.tasks.push(a),this._delegateSpec&&this._delegateSpec.onScheduleTask?this._delegateSpec.onScheduleTask(e,t,s,a):e.scheduleTask(s,a)}onInvokeTask(e,t,s,a,r,o){return"eventTask"!==a.type&&this.removeFromTasks(a),this.tryTriggerHasTask(e,t,s),this._delegateSpec&&this._delegateSpec.onInvokeTask?this._delegateSpec.onInvokeTask(e,t,s,a,r,o):e.invokeTask(s,a,r,o)}onCancelTask(e,t,s,a){return"eventTask"!==a.type&&this.removeFromTasks(a),this.tryTriggerHasTask(e,t,s),this._delegateSpec&&this._delegateSpec.onCancelTask?this._delegateSpec.onCancelTask(e,t,s,a):e.cancelTask(s,a)}onHasTask(e,t,s,a){this.lastTaskState=a,this._delegateSpec&&this._delegateSpec.onHasTask?this._delegateSpec.onHasTask(e,t,s,a):e.hasTask(s,a)}}function patchProxyZoneSpec(e){e.ProxyZoneSpec=ProxyZoneSpec}patchProxyZoneSpec(Zone);
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/
class SyncTestZoneSpec {
constructor(namePrefix) {
this.runZone = Zone.current;
this.name = 'syncTestZone for ' + namePrefix;
}
onScheduleTask(delegate, current, target, task) {
switch (task.type) {
case 'microTask':
case 'macroTask':
throw new Error(`Cannot call ${task.source} from within a sync test (${this.name}).`);
case 'eventTask':
task = delegate.scheduleTask(target, task);
break;
function patchSyncTest(Zone) {
class SyncTestZoneSpec {
constructor(namePrefix) {
this.runZone = Zone.current;
this.name = 'syncTestZone for ' + namePrefix;
}
return task;
onScheduleTask(delegate, current, target, task) {
switch (task.type) {
case 'microTask':
case 'macroTask':
throw new Error(`Cannot call ${task.source} from within a sync test (${this.name}).`);
case 'eventTask':
task = delegate.scheduleTask(target, task);
break;
}
return task;
}
}
// Export the class so that new instances can be created with proper
// constructor params.
Zone['SyncTestZoneSpec'] = SyncTestZoneSpec;
}
// Export the class so that new instances can be created with proper
// constructor params.
Zone['SyncTestZoneSpec'] = SyncTestZoneSpec;
patchSyncTest(Zone);
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/class SyncTestZoneSpec{constructor(e){this.runZone=Zone.current,this.name="syncTestZone for "+e}onScheduleTask(e,s,n,c){switch(c.type){case"microTask":case"macroTask":throw new Error(`Cannot call ${c.source} from within a sync test (${this.name}).`);case"eventTask":c=e.scheduleTask(n,c)}return c}}Zone.SyncTestZoneSpec=SyncTestZoneSpec;
*/function patchSyncTest(e){e.SyncTestZoneSpec=class{constructor(s){this.runZone=e.current,this.name="syncTestZone for "+s}onScheduleTask(e,s,c,t){switch(t.type){case"microTask":case"macroTask":throw new Error(`Cannot call ${t.source} from within a sync test (${this.name}).`);case"eventTask":t=e.scheduleTask(c,t)}return t}}}patchSyncTest(Zone);
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT

@@ -69,4 +69,8 @@ */

}
// Export the class so that new instances can be created with proper
// constructor params.
Zone['TaskTrackingZoneSpec'] = TaskTrackingZoneSpec;
function patchTaskTracking(Zone) {
// Export the class so that new instances can be created with proper
// constructor params.
Zone['TaskTrackingZoneSpec'] = TaskTrackingZoneSpec;
}
patchTaskTracking(Zone);
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/class TaskTrackingZoneSpec{constructor(){this.name="TaskTrackingZone",this.microTasks=[],this.macroTasks=[],this.eventTasks=[],this.properties={TaskTrackingZone:this}}static get(){return Zone.current.get("TaskTrackingZone")}getTasksFor(e){switch(e){case"microTask":return this.microTasks;case"macroTask":return this.macroTasks;case"eventTask":return this.eventTasks}throw new Error("Unknown task format: "+e)}onScheduleTask(e,s,t,r){return r.creationLocation=new Error(`Task '${r.type}' from '${r.source}'.`),this.getTasksFor(r.type).push(r),e.scheduleTask(t,r)}onCancelTask(e,s,t,r){const a=this.getTasksFor(r.type);for(let e=0;e<a.length;e++)if(a[e]==r){a.splice(e,1);break}return e.cancelTask(t,r)}onInvokeTask(e,s,t,r,a,n){if("eventTask"===r.type||r.data?.isPeriodic)return e.invokeTask(t,r,a,n);const k=this.getTasksFor(r.type);for(let e=0;e<k.length;e++)if(k[e]==r){k.splice(e,1);break}return e.invokeTask(t,r,a,n)}clearEvents(){for(;this.eventTasks.length;)Zone.current.cancelTask(this.eventTasks[0])}}Zone.TaskTrackingZoneSpec=TaskTrackingZoneSpec;
*/class TaskTrackingZoneSpec{constructor(){this.name="TaskTrackingZone",this.microTasks=[],this.macroTasks=[],this.eventTasks=[],this.properties={TaskTrackingZone:this}}static get(){return Zone.current.get("TaskTrackingZone")}getTasksFor(s){switch(s){case"microTask":return this.microTasks;case"macroTask":return this.macroTasks;case"eventTask":return this.eventTasks}throw new Error("Unknown task format: "+s)}onScheduleTask(s,e,t,a){return a.creationLocation=new Error(`Task '${a.type}' from '${a.source}'.`),this.getTasksFor(a.type).push(a),s.scheduleTask(t,a)}onCancelTask(s,e,t,a){const r=this.getTasksFor(a.type);for(let s=0;s<r.length;s++)if(r[s]==a){r.splice(s,1);break}return s.cancelTask(t,a)}onInvokeTask(s,e,t,a,r,n){if("eventTask"===a.type||a.data?.isPeriodic)return s.invokeTask(t,a,r,n);const k=this.getTasksFor(a.type);for(let s=0;s<k.length;s++)if(k[s]==a){k.splice(s,1);break}return s.invokeTask(t,a,r,n)}clearEvents(){for(;this.eventTasks.length;)Zone.current.cancelTask(this.eventTasks[0])}}function patchTaskTracking(s){s.TaskTrackingZoneSpec=TaskTrackingZoneSpec}patchTaskTracking(Zone);
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/
Zone.__load_patch('mediaQuery', (global, Zone, api) => {
function patchAddListener(proto) {
api.patchMethod(proto, 'addListener', (delegate) => (self, args) => {
const callback = args.length > 0 ? args[0] : null;
if (typeof callback === 'function') {
const wrapperedCallback = Zone.current.wrap(callback, 'MediaQuery');
callback[api.symbol('mediaQueryCallback')] = wrapperedCallback;
return delegate.call(self, wrapperedCallback);
}
else {
return delegate.apply(self, args);
}
});
}
function patchRemoveListener(proto) {
api.patchMethod(proto, 'removeListener', (delegate) => (self, args) => {
const callback = args.length > 0 ? args[0] : null;
if (typeof callback === 'function') {
const wrapperedCallback = callback[api.symbol('mediaQueryCallback')];
if (wrapperedCallback) {
function patchMediaQuery(Zone) {
Zone.__load_patch('mediaQuery', (global, Zone, api) => {
function patchAddListener(proto) {
api.patchMethod(proto, 'addListener', (delegate) => (self, args) => {
const callback = args.length > 0 ? args[0] : null;
if (typeof callback === 'function') {
const wrapperedCallback = Zone.current.wrap(callback, 'MediaQuery');
callback[api.symbol('mediaQueryCallback')] = wrapperedCallback;
return delegate.call(self, wrapperedCallback);

@@ -32,37 +20,53 @@ }

}
}
else {
return delegate.apply(self, args);
}
});
}
if (global['MediaQueryList']) {
const proto = global['MediaQueryList'].prototype;
patchAddListener(proto);
patchRemoveListener(proto);
}
else if (global['matchMedia']) {
api.patchMethod(global, 'matchMedia', (delegate) => (self, args) => {
const mql = delegate.apply(self, args);
if (mql) {
// try to patch MediaQueryList.prototype
const proto = Object.getPrototypeOf(mql);
if (proto && proto['addListener']) {
// try to patch proto, don't need to worry about patch
// multiple times, because, api.patchEventTarget will check it
patchAddListener(proto);
patchRemoveListener(proto);
patchAddListener(mql);
patchRemoveListener(mql);
});
}
function patchRemoveListener(proto) {
api.patchMethod(proto, 'removeListener', (delegate) => (self, args) => {
const callback = args.length > 0 ? args[0] : null;
if (typeof callback === 'function') {
const wrapperedCallback = callback[api.symbol('mediaQueryCallback')];
if (wrapperedCallback) {
return delegate.call(self, wrapperedCallback);
}
else {
return delegate.apply(self, args);
}
}
else if (mql['addListener']) {
// proto not exists, or proto has no addListener method
// try to patch mql instance
patchAddListener(mql);
patchRemoveListener(mql);
else {
return delegate.apply(self, args);
}
}
return mql;
});
}
});
});
}
if (global['MediaQueryList']) {
const proto = global['MediaQueryList'].prototype;
patchAddListener(proto);
patchRemoveListener(proto);
}
else if (global['matchMedia']) {
api.patchMethod(global, 'matchMedia', (delegate) => (self, args) => {
const mql = delegate.apply(self, args);
if (mql) {
// try to patch MediaQueryList.prototype
const proto = Object.getPrototypeOf(mql);
if (proto && proto['addListener']) {
// try to patch proto, don't need to worry about patch
// multiple times, because, api.patchEventTarget will check it
patchAddListener(proto);
patchRemoveListener(proto);
patchAddListener(mql);
patchRemoveListener(mql);
}
else if (mql['addListener']) {
// proto not exists, or proto has no addListener method
// try to patch mql instance
patchAddListener(mql);
patchRemoveListener(mql);
}
}
return mql;
});
}
});
}
patchMediaQuery(Zone);
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/Zone.__load_patch("mediaQuery",((e,t,n)=>{function a(e){n.patchMethod(e,"addListener",(e=>(a,r)=>{const o=r.length>0?r[0]:null;if("function"==typeof o){const r=t.current.wrap(o,"MediaQuery");return o[n.symbol("mediaQueryCallback")]=r,e.call(a,r)}return e.apply(a,r)}))}function r(e){n.patchMethod(e,"removeListener",(e=>(t,a)=>{const r=a.length>0?a[0]:null;if("function"==typeof r){const o=r[n.symbol("mediaQueryCallback")];return o?e.call(t,o):e.apply(t,a)}return e.apply(t,a)}))}if(e.MediaQueryList){const t=e.MediaQueryList.prototype;a(t),r(t)}else e.matchMedia&&n.patchMethod(e,"matchMedia",(e=>(t,n)=>{const o=e.apply(t,n);if(o){const e=Object.getPrototypeOf(o);e&&e.addListener?(a(e),r(e),a(o),r(o)):o.addListener&&(a(o),r(o))}return o}))}));
*/function patchMediaQuery(e){e.__load_patch("mediaQuery",((e,t,a)=>{function n(e){a.patchMethod(e,"addListener",(e=>(n,r)=>{const c=r.length>0?r[0]:null;if("function"==typeof c){const r=t.current.wrap(c,"MediaQuery");return c[a.symbol("mediaQueryCallback")]=r,e.call(n,r)}return e.apply(n,r)}))}function r(e){a.patchMethod(e,"removeListener",(e=>(t,n)=>{const r=n.length>0?n[0]:null;if("function"==typeof r){const c=r[a.symbol("mediaQueryCallback")];return c?e.call(t,c):e.apply(t,n)}return e.apply(t,n)}))}if(e.MediaQueryList){const t=e.MediaQueryList.prototype;n(t),r(t)}else e.matchMedia&&a.patchMethod(e,"matchMedia",(e=>(t,a)=>{const c=e.apply(t,a);if(c){const e=Object.getPrototypeOf(c);e&&e.addListener?(n(e),r(e),n(c),r(c)):c.addListener&&(n(c),r(c))}return c}))}))}patchMediaQuery(Zone);
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/
Zone.__load_patch('notification', (global, Zone, api) => {
const Notification = global['Notification'];
if (!Notification || !Notification.prototype) {
return;
}
const desc = Object.getOwnPropertyDescriptor(Notification.prototype, 'onerror');
if (!desc || !desc.configurable) {
return;
}
api.patchOnProperties(Notification.prototype, null);
});
function patchNotifications(Zone) {
Zone.__load_patch('notification', (global, Zone, api) => {
const Notification = global['Notification'];
if (!Notification || !Notification.prototype) {
return;
}
const desc = Object.getOwnPropertyDescriptor(Notification.prototype, 'onerror');
if (!desc || !desc.configurable) {
return;
}
api.patchOnProperties(Notification.prototype, null);
});
}
patchNotifications(Zone);
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/Zone.__load_patch("notification",((t,o,r)=>{const e=t.Notification;if(!e||!e.prototype)return;const n=Object.getOwnPropertyDescriptor(e.prototype,"onerror");n&&n.configurable&&r.patchOnProperties(e.prototype,null)}));
*/function patchNotifications(t){t.__load_patch("notification",((t,o,i)=>{const n=t.Notification;if(!n||!n.prototype)return;const r=Object.getOwnPropertyDescriptor(n.prototype,"onerror");r&&r.configurable&&i.patchOnProperties(n.prototype,null)}))}patchNotifications(Zone);
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/
Zone.__load_patch('RTCPeerConnection', (global, Zone, api) => {
const RTCPeerConnection = global['RTCPeerConnection'];
if (!RTCPeerConnection) {
return;
}
const addSymbol = api.symbol('addEventListener');
const removeSymbol = api.symbol('removeEventListener');
RTCPeerConnection.prototype.addEventListener = RTCPeerConnection.prototype[addSymbol];
RTCPeerConnection.prototype.removeEventListener = RTCPeerConnection.prototype[removeSymbol];
// RTCPeerConnection extends EventTarget, so we must clear the symbol
// to allow patch RTCPeerConnection.prototype.addEventListener again
RTCPeerConnection.prototype[addSymbol] = null;
RTCPeerConnection.prototype[removeSymbol] = null;
api.patchEventTarget(global, api, [RTCPeerConnection.prototype], { useG: false });
});
function patchRtcPeerConnection(Zone) {
Zone.__load_patch('RTCPeerConnection', (global, Zone, api) => {
const RTCPeerConnection = global['RTCPeerConnection'];
if (!RTCPeerConnection) {
return;
}
const addSymbol = api.symbol('addEventListener');
const removeSymbol = api.symbol('removeEventListener');
RTCPeerConnection.prototype.addEventListener = RTCPeerConnection.prototype[addSymbol];
RTCPeerConnection.prototype.removeEventListener = RTCPeerConnection.prototype[removeSymbol];
// RTCPeerConnection extends EventTarget, so we must clear the symbol
// to allow patch RTCPeerConnection.prototype.addEventListener again
RTCPeerConnection.prototype[addSymbol] = null;
RTCPeerConnection.prototype[removeSymbol] = null;
api.patchEventTarget(global, api, [RTCPeerConnection.prototype], { useG: false });
});
}
patchRtcPeerConnection(Zone);
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/Zone.__load_patch("RTCPeerConnection",((e,t,o)=>{const n=e.RTCPeerConnection;if(!n)return;const r=o.symbol("addEventListener"),p=o.symbol("removeEventListener");n.prototype.addEventListener=n.prototype[r],n.prototype.removeEventListener=n.prototype[p],n.prototype[r]=null,n.prototype[p]=null,o.patchEventTarget(e,o,[n.prototype],{useG:!1})}));
*/function patchRtcPeerConnection(e){e.__load_patch("RTCPeerConnection",((e,t,o)=>{const n=e.RTCPeerConnection;if(!n)return;const r=o.symbol("addEventListener"),p=o.symbol("removeEventListener");n.prototype.addEventListener=n.prototype[r],n.prototype.removeEventListener=n.prototype[p],n.prototype[r]=null,n.prototype[p]=null,o.patchEventTarget(e,o,[n.prototype],{useG:!1})}))}patchRtcPeerConnection(Zone);
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/
Zone.__load_patch('shadydom', (global, Zone, api) => {
// https://github.com/angular/zone.js/issues/782
// in web components, shadydom will patch addEventListener/removeEventListener of
// Node.prototype and WindowPrototype, this will have conflict with zone.js
// so zone.js need to patch them again.
const HTMLSlotElement = global.HTMLSlotElement;
const prototypes = [
Object.getPrototypeOf(window), Node.prototype, Text.prototype, Element.prototype,
HTMLElement.prototype, HTMLSlotElement && HTMLSlotElement.prototype, DocumentFragment.prototype,
Document.prototype
];
prototypes.forEach(function (proto) {
if (proto && proto.hasOwnProperty('addEventListener')) {
proto[Zone.__symbol__('addEventListener')] = null;
proto[Zone.__symbol__('removeEventListener')] = null;
api.patchEventTarget(global, api, [proto]);
}
function patchShadyDom(Zone) {
Zone.__load_patch('shadydom', (global, Zone, api) => {
// https://github.com/angular/zone.js/issues/782
// in web components, shadydom will patch addEventListener/removeEventListener of
// Node.prototype and WindowPrototype, this will have conflict with zone.js
// so zone.js need to patch them again.
const HTMLSlotElement = global.HTMLSlotElement;
const prototypes = [
Object.getPrototypeOf(window),
Node.prototype,
Text.prototype,
Element.prototype,
HTMLElement.prototype,
HTMLSlotElement && HTMLSlotElement.prototype,
DocumentFragment.prototype,
Document.prototype,
];
prototypes.forEach(function (proto) {
if (proto && proto.hasOwnProperty('addEventListener')) {
proto[Zone.__symbol__('addEventListener')] = null;
proto[Zone.__symbol__('removeEventListener')] = null;
api.patchEventTarget(global, api, [proto]);
}
});
});
});
}
patchShadyDom(Zone);
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/Zone.__load_patch("shadydom",((t,e,o)=>{const n=t.HTMLSlotElement;[Object.getPrototypeOf(window),Node.prototype,Text.prototype,Element.prototype,HTMLElement.prototype,n&&n.prototype,DocumentFragment.prototype,Document.prototype].forEach((function(n){n&&n.hasOwnProperty("addEventListener")&&(n[e.__symbol__("addEventListener")]=null,n[e.__symbol__("removeEventListener")]=null,o.patchEventTarget(t,o,[n]))}))}));
*/function patchShadyDom(t){t.__load_patch("shadydom",((t,e,o)=>{const n=t.HTMLSlotElement;[Object.getPrototypeOf(window),Node.prototype,Text.prototype,Element.prototype,HTMLElement.prototype,n&&n.prototype,DocumentFragment.prototype,Document.prototype].forEach((function(n){n&&n.hasOwnProperty("addEventListener")&&(n[e.__symbol__("addEventListener")]=null,n[e.__symbol__("removeEventListener")]=null,o.patchEventTarget(t,o,[n]))}))}))}patchShadyDom(Zone);
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT

@@ -11,3 +11,4 @@ */

*/
(function (global) {
const _global = (typeof window === 'object' && window) || (typeof self === 'object' && self) || global;
function patchWtf(Zone) {
// Detect and setup WTF.

@@ -17,3 +18,3 @@ let wtfTrace = null;

const wtfEnabled = (function () {
const wtf = global['wtf'];
const wtf = _global['wtf'];
if (wtf) {

@@ -32,3 +33,5 @@ wtfTrace = wtf.trace;

}
static { this.forkInstance = wtfEnabled ? wtfEvents.createInstance('Zone:fork(ascii zone, ascii newZone)') : null; }
static { this.forkInstance = wtfEnabled
? wtfEvents.createInstance('Zone:fork(ascii zone, ascii newZone)')
: null; }
static { this.scheduleInstance = {}; }

@@ -47,4 +50,3 @@ static { this.cancelInstance = {}; }

if (!scope) {
scope = WtfZoneSpec.invokeScope[src] =
wtfEvents.createScope(`Zone:invoke:${source}(ascii zone)`);
scope = WtfZoneSpec.invokeScope[src] = wtfEvents.createScope(`Zone:invoke:${source}(ascii zone)`);
}

@@ -60,4 +62,3 @@ return wtfTrace.leaveScope(scope(zonePathName(targetZone)), parentZoneDelegate.invoke(targetZone, delegate, applyThis, applyArgs, source));

if (!instance) {
instance = WtfZoneSpec.scheduleInstance[key] =
wtfEvents.createInstance(`Zone:schedule:${key}(ascii zone, any data)`);
instance = WtfZoneSpec.scheduleInstance[key] = wtfEvents.createInstance(`Zone:schedule:${key}(ascii zone, any data)`);
}

@@ -72,4 +73,3 @@ const retValue = parentZoneDelegate.scheduleTask(targetZone, task);

if (!scope) {
scope = WtfZoneSpec.invokeTaskScope[source] =
wtfEvents.createScope(`Zone:invokeTask:${source}(ascii zone)`);
scope = WtfZoneSpec.invokeTaskScope[source] = wtfEvents.createScope(`Zone:invokeTask:${source}(ascii zone)`);
}

@@ -82,4 +82,3 @@ return wtfTrace.leaveScope(scope(zonePathName(targetZone)), parentZoneDelegate.invokeTask(targetZone, task, applyThis, applyArgs));

if (!instance) {
instance = WtfZoneSpec.cancelInstance[key] =
wtfEvents.createInstance(`Zone:cancel:${key}(ascii zone, any options)`);
instance = WtfZoneSpec.cancelInstance[key] = wtfEvents.createInstance(`Zone:cancel:${key}(ascii zone, any options)`);
}

@@ -123,2 +122,4 @@ const retValue = parentZoneDelegate.cancelTask(targetZone, task);

Zone['wtfZoneSpec'] = !wtfEnabled ? null : new WtfZoneSpec();
})(typeof window === 'object' && window || typeof self === 'object' && self || global);
}
patchWtf(Zone);
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/!function(e){let n=null,t=null;const c=function(){const c=e.wtf;return!(!c||(n=c.trace,!n)||(t=n.events,0))}();class o{constructor(){this.name="WTF"}static{this.forkInstance=c?t.createInstance("Zone:fork(ascii zone, ascii newZone)"):null}static{this.scheduleInstance={}}static{this.cancelInstance={}}static{this.invokeScope={}}static{this.invokeTaskScope={}}onFork(e,n,t,c){const s=e.fork(t,c);return o.forkInstance(a(t),s.name),s}onInvoke(e,c,s,r,i,l,u){const k=u||"unknown";let f=o.invokeScope[k];return f||(f=o.invokeScope[k]=t.createScope(`Zone:invoke:${u}(ascii zone)`)),n.leaveScope(f(a(s)),e.invoke(s,r,i,l,u))}onHandleError(e,n,t,c){return e.handleError(t,c)}onScheduleTask(e,n,c,r){const i=r.type+":"+r.source;let l=o.scheduleInstance[i];l||(l=o.scheduleInstance[i]=t.createInstance(`Zone:schedule:${i}(ascii zone, any data)`));const u=e.scheduleTask(c,r);return l(a(c),s(r.data,2)),u}onInvokeTask(e,c,s,r,i,l){const u=r.source;let k=o.invokeTaskScope[u];return k||(k=o.invokeTaskScope[u]=t.createScope(`Zone:invokeTask:${u}(ascii zone)`)),n.leaveScope(k(a(s)),e.invokeTask(s,r,i,l))}onCancelTask(e,n,c,r){const i=r.source;let l=o.cancelInstance[i];l||(l=o.cancelInstance[i]=t.createInstance(`Zone:cancel:${i}(ascii zone, any options)`));const u=e.cancelTask(c,r);return l(a(c),s(r.data,2)),u}}function s(e,n){if(!e||!n)return null;const t={};for(const c in e)if(e.hasOwnProperty(c)){let o=e[c];switch(typeof o){case"object":const e=o&&o.constructor&&o.constructor.name;o=e==Object.name?s(o,n-1):e;break;case"function":o=o.name||void 0}t[c]=o}return t}function a(e){let n=e.name,t=e.parent;for(;null!=t;)n=t.name+"::"+n,t=t.parent;return n}Zone.wtfZoneSpec=c?new o:null}("object"==typeof window&&window||"object"==typeof self&&self||global);
*/const _global="object"==typeof window&&window||"object"==typeof self&&self||global;function patchWtf(e){let n=null,t=null;const c=function(){const e=_global.wtf;return!(!e||(n=e.trace,!n)||(t=n.events,0))}();class o{constructor(){this.name="WTF"}static{this.forkInstance=c?t.createInstance("Zone:fork(ascii zone, ascii newZone)"):null}static{this.scheduleInstance={}}static{this.cancelInstance={}}static{this.invokeScope={}}static{this.invokeTaskScope={}}onFork(e,n,t,c){const a=e.fork(t,c);return o.forkInstance(s(t),a.name),a}onInvoke(e,c,a,r,i,l,u){const k=u||"unknown";let f=o.invokeScope[k];return f||(f=o.invokeScope[k]=t.createScope(`Zone:invoke:${u}(ascii zone)`)),n.leaveScope(f(s(a)),e.invoke(a,r,i,l,u))}onHandleError(e,n,t,c){return e.handleError(t,c)}onScheduleTask(e,n,c,r){const i=r.type+":"+r.source;let l=o.scheduleInstance[i];l||(l=o.scheduleInstance[i]=t.createInstance(`Zone:schedule:${i}(ascii zone, any data)`));const u=e.scheduleTask(c,r);return l(s(c),a(r.data,2)),u}onInvokeTask(e,c,a,r,i,l){const u=r.source;let k=o.invokeTaskScope[u];return k||(k=o.invokeTaskScope[u]=t.createScope(`Zone:invokeTask:${u}(ascii zone)`)),n.leaveScope(k(s(a)),e.invokeTask(a,r,i,l))}onCancelTask(e,n,c,r){const i=r.source;let l=o.cancelInstance[i];l||(l=o.cancelInstance[i]=t.createInstance(`Zone:cancel:${i}(ascii zone, any options)`));const u=e.cancelTask(c,r);return l(s(c),a(r.data,2)),u}}function a(e,n){if(!e||!n)return null;const t={};for(const c in e)if(e.hasOwnProperty(c)){let o=e[c];switch(typeof o){case"object":const e=o&&o.constructor&&o.constructor.name;o=e==Object.name?a(o,n-1):e;break;case"function":o=o.name||void 0}t[c]=o}return t}function s(e){let n=e.name,t=e.parent;for(;null!=t;)n=t.name+"::"+n,t=t.parent;return n}e.wtfZoneSpec=c?new o:null}patchWtf(Zone);
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/
Zone.__load_patch('bluebird', (global, Zone, api) => {
// TODO: @JiaLiPassion, we can automatically patch bluebird
// if global.Promise = Bluebird, but sometimes in nodejs,
// global.Promise is not Bluebird, and Bluebird is just be
// used by other libraries such as sequelize, so I think it is
// safe to just expose a method to patch Bluebird explicitly
const BLUEBIRD = 'bluebird';
Zone[Zone.__symbol__(BLUEBIRD)] = function patchBluebird(Bluebird) {
// patch method of Bluebird.prototype which not using `then` internally
const bluebirdApis = ['then', 'spread', 'finally'];
bluebirdApis.forEach(bapi => {
api.patchMethod(Bluebird.prototype, bapi, (delegate) => (self, args) => {
const zone = Zone.current;
for (let i = 0; i < args.length; i++) {
const func = args[i];
if (typeof func === 'function') {
args[i] = function () {
const argSelf = this;
const argArgs = arguments;
return new Bluebird((res, rej) => {
zone.scheduleMicroTask('Promise.then', () => {
try {
res(func.apply(argSelf, argArgs));
}
catch (error) {
rej(error);
}
function patchBluebird(Zone) {
Zone.__load_patch('bluebird', (global, Zone, api) => {
// TODO: @JiaLiPassion, we can automatically patch bluebird
// if global.Promise = Bluebird, but sometimes in nodejs,
// global.Promise is not Bluebird, and Bluebird is just be
// used by other libraries such as sequelize, so I think it is
// safe to just expose a method to patch Bluebird explicitly
const BLUEBIRD = 'bluebird';
Zone[Zone.__symbol__(BLUEBIRD)] = function patchBluebird(Bluebird) {
// patch method of Bluebird.prototype which not using `then` internally
const bluebirdApis = ['then', 'spread', 'finally'];
bluebirdApis.forEach((bapi) => {
api.patchMethod(Bluebird.prototype, bapi, (delegate) => (self, args) => {
const zone = Zone.current;
for (let i = 0; i < args.length; i++) {
const func = args[i];
if (typeof func === 'function') {
args[i] = function () {
const argSelf = this;
const argArgs = arguments;
return new Bluebird((res, rej) => {
zone.scheduleMicroTask('Promise.then', () => {
try {
res(func.apply(argSelf, argArgs));
}
catch (error) {
rej(error);
}
});
});
});
};
};
}
}
}
return delegate.apply(self, args);
return delegate.apply(self, args);
});
});
});
if (typeof window !== 'undefined') {
window.addEventListener('unhandledrejection', function (event) {
const error = event.detail && event.detail.reason;
if (error && error.isHandledByZone) {
event.preventDefault();
if (typeof event.stopImmediatePropagation === 'function') {
event.stopImmediatePropagation();
if (typeof window !== 'undefined') {
window.addEventListener('unhandledrejection', function (event) {
const error = event.detail && event.detail.reason;
if (error && error.isHandledByZone) {
event.preventDefault();
if (typeof event.stopImmediatePropagation === 'function') {
event.stopImmediatePropagation();
}
}
}
});
}
else if (typeof process !== 'undefined') {
process.on('unhandledRejection', (reason, p) => {
if (reason && reason.isHandledByZone) {
const listeners = process.listeners('unhandledRejection');
if (listeners) {
// remove unhandledRejection listeners so the callback
// will not be triggered.
process.removeAllListeners('unhandledRejection');
process.nextTick(() => {
listeners.forEach(listener => process.on('unhandledRejection', listener));
});
});
}
else if (typeof process !== 'undefined') {
process.on('unhandledRejection', (reason, p) => {
if (reason && reason.isHandledByZone) {
const listeners = process.listeners('unhandledRejection');
if (listeners) {
// remove unhandledRejection listeners so the callback
// will not be triggered.
process.removeAllListeners('unhandledRejection');
process.nextTick(() => {
listeners.forEach((listener) => process.on('unhandledRejection', listener));
});
}
}
});
}
Bluebird.onPossiblyUnhandledRejection(function (e, promise) {
try {
Zone.current.runGuarded(() => {
e.isHandledByZone = true;
throw e;
});
}
catch (err) {
err.isHandledByZone = false;
api.onUnhandledError(err);
}
});
}
Bluebird.onPossiblyUnhandledRejection(function (e, promise) {
try {
Zone.current.runGuarded(() => {
e.isHandledByZone = true;
throw e;
});
}
catch (err) {
err.isHandledByZone = false;
api.onUnhandledError(err);
}
});
// override global promise
global.Promise = Bluebird;
};
});
// override global promise
global.Promise = Bluebird;
};
});
}
patchBluebird(Zone);
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/Zone.__load_patch("bluebird",((e,n,o)=>{n[n.__symbol__("bluebird")]=function t(d){["then","spread","finally"].forEach((e=>{o.patchMethod(d.prototype,e,(e=>(o,t)=>{const r=n.current;for(let e=0;e<t.length;e++){const n=t[e];"function"==typeof n&&(t[e]=function(){const e=this,o=arguments;return new d(((t,d)=>{r.scheduleMicroTask("Promise.then",(()=>{try{t(n.apply(e,o))}catch(e){d(e)}}))}))})}return e.apply(o,t)}))})),"undefined"!=typeof window?window.addEventListener("unhandledrejection",(function(e){const n=e.detail&&e.detail.reason;n&&n.isHandledByZone&&(e.preventDefault(),"function"==typeof e.stopImmediatePropagation&&e.stopImmediatePropagation())})):"undefined"!=typeof process&&process.on("unhandledRejection",((e,n)=>{if(e&&e.isHandledByZone){const e=process.listeners("unhandledRejection");e&&(process.removeAllListeners("unhandledRejection"),process.nextTick((()=>{e.forEach((e=>process.on("unhandledRejection",e)))})))}})),d.onPossiblyUnhandledRejection((function(e,t){try{n.current.runGuarded((()=>{throw e.isHandledByZone=!0,e}))}catch(e){e.isHandledByZone=!1,o.onUnhandledError(e)}})),e.Promise=d}}));
*/function patchBluebird(e){e.__load_patch("bluebird",((e,n,o)=>{n[n.__symbol__("bluebird")]=function t(d){["then","spread","finally"].forEach((e=>{o.patchMethod(d.prototype,e,(e=>(o,t)=>{const r=n.current;for(let e=0;e<t.length;e++){const n=t[e];"function"==typeof n&&(t[e]=function(){const e=this,o=arguments;return new d(((t,d)=>{r.scheduleMicroTask("Promise.then",(()=>{try{t(n.apply(e,o))}catch(e){d(e)}}))}))})}return e.apply(o,t)}))})),"undefined"!=typeof window?window.addEventListener("unhandledrejection",(function(e){const n=e.detail&&e.detail.reason;n&&n.isHandledByZone&&(e.preventDefault(),"function"==typeof e.stopImmediatePropagation&&e.stopImmediatePropagation())})):"undefined"!=typeof process&&process.on("unhandledRejection",((e,n)=>{if(e&&e.isHandledByZone){const e=process.listeners("unhandledRejection");e&&(process.removeAllListeners("unhandledRejection"),process.nextTick((()=>{e.forEach((e=>process.on("unhandledRejection",e)))})))}})),d.onPossiblyUnhandledRejection((function(e,t){try{n.current.runGuarded((()=>{throw e.isHandledByZone=!0,e}))}catch(e){e.isHandledByZone=!1,o.onUnhandledError(e)}})),e.Promise=d}}))}patchBluebird(Zone);
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT

@@ -11,310 +11,320 @@ */

*/
Zone.__load_patch('Error', (global, Zone, api) => {
/*
* This code patches Error so that:
* - It ignores un-needed stack frames.
* - It Shows the associated Zone for reach frame.
*/
const zoneJsInternalStackFramesSymbol = api.symbol('zoneJsInternalStackFrames');
const NativeError = global[api.symbol('Error')] = global['Error'];
// Store the frames which should be removed from the stack frames
const zoneJsInternalStackFrames = {};
// We must find the frame where Error was created, otherwise we assume we don't understand stack
let zoneAwareFrame1;
let zoneAwareFrame2;
let zoneAwareFrame1WithoutNew;
let zoneAwareFrame2WithoutNew;
let zoneAwareFrame3WithoutNew;
global['Error'] = ZoneAwareError;
const stackRewrite = 'stackRewrite';
const zoneJsInternalStackFramesPolicy = global['__Zone_Error_BlacklistedStackFrames_policy'] ||
global['__Zone_Error_ZoneJsInternalStackFrames_policy'] || 'default';
function buildZoneFrameNames(zoneFrame) {
let zoneFrameName = { zoneName: zoneFrame.zone.name };
let result = zoneFrameName;
while (zoneFrame.parent) {
zoneFrame = zoneFrame.parent;
const parentZoneFrameName = { zoneName: zoneFrame.zone.name };
zoneFrameName.parent = parentZoneFrameName;
zoneFrameName = parentZoneFrameName;
}
return result;
}
function buildZoneAwareStackFrames(originalStack, zoneFrame, isZoneFrame = true) {
let frames = originalStack.split('\n');
let i = 0;
// Find the first frame
while (!(frames[i] === zoneAwareFrame1 || frames[i] === zoneAwareFrame2 ||
frames[i] === zoneAwareFrame1WithoutNew || frames[i] === zoneAwareFrame2WithoutNew ||
frames[i] === zoneAwareFrame3WithoutNew) &&
i < frames.length) {
i++;
}
for (; i < frames.length && zoneFrame; i++) {
let frame = frames[i];
if (frame.trim()) {
switch (zoneJsInternalStackFrames[frame]) {
case 0 /* FrameType.zoneJsInternal */:
frames.splice(i, 1);
i--;
break;
case 1 /* FrameType.transition */:
if (zoneFrame.parent) {
// This is the special frame where zone changed. Print and process it accordingly
zoneFrame = zoneFrame.parent;
}
else {
zoneFrame = null;
}
frames.splice(i, 1);
i--;
break;
default:
frames[i] += isZoneFrame ? ` [${zoneFrame.zone.name}]` :
` [${zoneFrame.zoneName}]`;
}
function patchError(Zone) {
Zone.__load_patch('Error', (global, Zone, api) => {
/*
* This code patches Error so that:
* - It ignores un-needed stack frames.
* - It Shows the associated Zone for reach frame.
*/
const zoneJsInternalStackFramesSymbol = api.symbol('zoneJsInternalStackFrames');
const NativeError = (global[api.symbol('Error')] = global['Error']);
// Store the frames which should be removed from the stack frames
const zoneJsInternalStackFrames = {};
// We must find the frame where Error was created, otherwise we assume we don't understand stack
let zoneAwareFrame1;
let zoneAwareFrame2;
let zoneAwareFrame1WithoutNew;
let zoneAwareFrame2WithoutNew;
let zoneAwareFrame3WithoutNew;
global['Error'] = ZoneAwareError;
const stackRewrite = 'stackRewrite';
const zoneJsInternalStackFramesPolicy = global['__Zone_Error_BlacklistedStackFrames_policy'] ||
global['__Zone_Error_ZoneJsInternalStackFrames_policy'] ||
'default';
function buildZoneFrameNames(zoneFrame) {
let zoneFrameName = { zoneName: zoneFrame.zone.name };
let result = zoneFrameName;
while (zoneFrame.parent) {
zoneFrame = zoneFrame.parent;
const parentZoneFrameName = { zoneName: zoneFrame.zone.name };
zoneFrameName.parent = parentZoneFrameName;
zoneFrameName = parentZoneFrameName;
}
return result;
}
return frames.join('\n');
}
/**
* This is ZoneAwareError which processes the stack frame and cleans up extra frames as well as
* adds zone information to it.
*/
function ZoneAwareError() {
// We always have to return native error otherwise the browser console will not work.
let error = NativeError.apply(this, arguments);
// Save original stack trace
const originalStack = error['originalStack'] = error.stack;
// Process the stack trace and rewrite the frames.
if (ZoneAwareError[stackRewrite] && originalStack) {
let zoneFrame = api.currentZoneFrame();
if (zoneJsInternalStackFramesPolicy === 'lazy') {
// don't handle stack trace now
error[api.symbol('zoneFrameNames')] = buildZoneFrameNames(zoneFrame);
function buildZoneAwareStackFrames(originalStack, zoneFrame, isZoneFrame = true) {
let frames = originalStack.split('\n');
let i = 0;
// Find the first frame
while (!(frames[i] === zoneAwareFrame1 ||
frames[i] === zoneAwareFrame2 ||
frames[i] === zoneAwareFrame1WithoutNew ||
frames[i] === zoneAwareFrame2WithoutNew ||
frames[i] === zoneAwareFrame3WithoutNew) &&
i < frames.length) {
i++;
}
else if (zoneJsInternalStackFramesPolicy === 'default') {
try {
error.stack = error.zoneAwareStack = buildZoneAwareStackFrames(originalStack, zoneFrame);
for (; i < frames.length && zoneFrame; i++) {
let frame = frames[i];
if (frame.trim()) {
switch (zoneJsInternalStackFrames[frame]) {
case 0 /* FrameType.zoneJsInternal */:
frames.splice(i, 1);
i--;
break;
case 1 /* FrameType.transition */:
if (zoneFrame.parent) {
// This is the special frame where zone changed. Print and process it accordingly
zoneFrame = zoneFrame.parent;
}
else {
zoneFrame = null;
}
frames.splice(i, 1);
i--;
break;
default:
frames[i] += isZoneFrame
? ` [${zoneFrame.zone.name}]`
: ` [${zoneFrame.zoneName}]`;
}
}
catch (e) {
// ignore as some browsers don't allow overriding of stack
}
}
return frames.join('\n');
}
if (this instanceof NativeError && this.constructor != NativeError) {
// We got called with a `new` operator AND we are subclass of ZoneAwareError
// in that case we have to copy all of our properties to `this`.
Object.keys(error).concat('stack', 'message').forEach((key) => {
const value = error[key];
if (value !== undefined) {
/**
* This is ZoneAwareError which processes the stack frame and cleans up extra frames as well as
* adds zone information to it.
*/
function ZoneAwareError() {
// We always have to return native error otherwise the browser console will not work.
let error = NativeError.apply(this, arguments);
// Save original stack trace
const originalStack = (error['originalStack'] = error.stack);
// Process the stack trace and rewrite the frames.
if (ZoneAwareError[stackRewrite] && originalStack) {
let zoneFrame = api.currentZoneFrame();
if (zoneJsInternalStackFramesPolicy === 'lazy') {
// don't handle stack trace now
error[api.symbol('zoneFrameNames')] = buildZoneFrameNames(zoneFrame);
}
else if (zoneJsInternalStackFramesPolicy === 'default') {
try {
this[key] = value;
error.stack = error.zoneAwareStack = buildZoneAwareStackFrames(originalStack, zoneFrame);
}
catch (e) {
// ignore the assignment in case it is a setter and it throws.
// ignore as some browsers don't allow overriding of stack
}
}
});
return this;
}
return error;
}
// Copy the prototype so that instanceof operator works as expected
ZoneAwareError.prototype = NativeError.prototype;
ZoneAwareError[zoneJsInternalStackFramesSymbol] = zoneJsInternalStackFrames;
ZoneAwareError[stackRewrite] = false;
const zoneAwareStackSymbol = api.symbol('zoneAwareStack');
// try to define zoneAwareStack property when zoneJsInternal frames policy is delay
if (zoneJsInternalStackFramesPolicy === 'lazy') {
Object.defineProperty(ZoneAwareError.prototype, 'zoneAwareStack', {
configurable: true,
enumerable: true,
get: function () {
if (!this[zoneAwareStackSymbol]) {
this[zoneAwareStackSymbol] = buildZoneAwareStackFrames(this.originalStack, this[api.symbol('zoneFrameNames')], false);
}
return this[zoneAwareStackSymbol];
},
set: function (newStack) {
this.originalStack = newStack;
this[zoneAwareStackSymbol] = buildZoneAwareStackFrames(this.originalStack, this[api.symbol('zoneFrameNames')], false);
}
});
}
// those properties need special handling
const specialPropertyNames = ['stackTraceLimit', 'captureStackTrace', 'prepareStackTrace'];
// those properties of NativeError should be set to ZoneAwareError
const nativeErrorProperties = Object.keys(NativeError);
if (nativeErrorProperties) {
nativeErrorProperties.forEach(prop => {
if (specialPropertyNames.filter(sp => sp === prop).length === 0) {
Object.defineProperty(ZoneAwareError, prop, {
get: function () {
return NativeError[prop];
},
set: function (value) {
NativeError[prop] = value;
if (this instanceof NativeError && this.constructor != NativeError) {
// We got called with a `new` operator AND we are subclass of ZoneAwareError
// in that case we have to copy all of our properties to `this`.
Object.keys(error)
.concat('stack', 'message')
.forEach((key) => {
const value = error[key];
if (value !== undefined) {
try {
this[key] = value;
}
catch (e) {
// ignore the assignment in case it is a setter and it throws.
}
}
});
return this;
}
});
}
if (NativeError.hasOwnProperty('stackTraceLimit')) {
// Extend default stack limit as we will be removing few frames.
NativeError.stackTraceLimit = Math.max(NativeError.stackTraceLimit, 15);
// make sure that ZoneAwareError has the same property which forwards to NativeError.
Object.defineProperty(ZoneAwareError, 'stackTraceLimit', {
return error;
}
// Copy the prototype so that instanceof operator works as expected
ZoneAwareError.prototype = NativeError.prototype;
ZoneAwareError[zoneJsInternalStackFramesSymbol] = zoneJsInternalStackFrames;
ZoneAwareError[stackRewrite] = false;
const zoneAwareStackSymbol = api.symbol('zoneAwareStack');
// try to define zoneAwareStack property when zoneJsInternal frames policy is delay
if (zoneJsInternalStackFramesPolicy === 'lazy') {
Object.defineProperty(ZoneAwareError.prototype, 'zoneAwareStack', {
configurable: true,
enumerable: true,
get: function () {
if (!this[zoneAwareStackSymbol]) {
this[zoneAwareStackSymbol] = buildZoneAwareStackFrames(this.originalStack, this[api.symbol('zoneFrameNames')], false);
}
return this[zoneAwareStackSymbol];
},
set: function (newStack) {
this.originalStack = newStack;
this[zoneAwareStackSymbol] = buildZoneAwareStackFrames(this.originalStack, this[api.symbol('zoneFrameNames')], false);
},
});
}
// those properties need special handling
const specialPropertyNames = ['stackTraceLimit', 'captureStackTrace', 'prepareStackTrace'];
// those properties of NativeError should be set to ZoneAwareError
const nativeErrorProperties = Object.keys(NativeError);
if (nativeErrorProperties) {
nativeErrorProperties.forEach((prop) => {
if (specialPropertyNames.filter((sp) => sp === prop).length === 0) {
Object.defineProperty(ZoneAwareError, prop, {
get: function () {
return NativeError[prop];
},
set: function (value) {
NativeError[prop] = value;
},
});
}
});
}
if (NativeError.hasOwnProperty('stackTraceLimit')) {
// Extend default stack limit as we will be removing few frames.
NativeError.stackTraceLimit = Math.max(NativeError.stackTraceLimit, 15);
// make sure that ZoneAwareError has the same property which forwards to NativeError.
Object.defineProperty(ZoneAwareError, 'stackTraceLimit', {
get: function () {
return NativeError.stackTraceLimit;
},
set: function (value) {
return (NativeError.stackTraceLimit = value);
},
});
}
if (NativeError.hasOwnProperty('captureStackTrace')) {
Object.defineProperty(ZoneAwareError, 'captureStackTrace', {
// add named function here because we need to remove this
// stack frame when prepareStackTrace below
value: function zoneCaptureStackTrace(targetObject, constructorOpt) {
NativeError.captureStackTrace(targetObject, constructorOpt);
},
});
}
const ZONE_CAPTURESTACKTRACE = 'zoneCaptureStackTrace';
Object.defineProperty(ZoneAwareError, 'prepareStackTrace', {
get: function () {
return NativeError.stackTraceLimit;
return NativeError.prepareStackTrace;
},
set: function (value) {
return NativeError.stackTraceLimit = value;
}
});
}
if (NativeError.hasOwnProperty('captureStackTrace')) {
Object.defineProperty(ZoneAwareError, 'captureStackTrace', {
// add named function here because we need to remove this
// stack frame when prepareStackTrace below
value: function zoneCaptureStackTrace(targetObject, constructorOpt) {
NativeError.captureStackTrace(targetObject, constructorOpt);
}
});
}
const ZONE_CAPTURESTACKTRACE = 'zoneCaptureStackTrace';
Object.defineProperty(ZoneAwareError, 'prepareStackTrace', {
get: function () {
return NativeError.prepareStackTrace;
},
set: function (value) {
if (!value || typeof value !== 'function') {
return NativeError.prepareStackTrace = value;
}
return NativeError.prepareStackTrace = function (error, structuredStackTrace) {
// remove additional stack information from ZoneAwareError.captureStackTrace
if (structuredStackTrace) {
for (let i = 0; i < structuredStackTrace.length; i++) {
const st = structuredStackTrace[i];
// remove the first function which name is zoneCaptureStackTrace
if (st.getFunctionName() === ZONE_CAPTURESTACKTRACE) {
structuredStackTrace.splice(i, 1);
break;
if (!value || typeof value !== 'function') {
return (NativeError.prepareStackTrace = value);
}
return (NativeError.prepareStackTrace = function (error, structuredStackTrace) {
// remove additional stack information from ZoneAwareError.captureStackTrace
if (structuredStackTrace) {
for (let i = 0; i < structuredStackTrace.length; i++) {
const st = structuredStackTrace[i];
// remove the first function which name is zoneCaptureStackTrace
if (st.getFunctionName() === ZONE_CAPTURESTACKTRACE) {
structuredStackTrace.splice(i, 1);
break;
}
}
}
}
return value.call(this, error, structuredStackTrace);
};
return value.call(this, error, structuredStackTrace);
});
},
});
if (zoneJsInternalStackFramesPolicy === 'disable') {
// don't need to run detectZone to populate zoneJs internal stack frames
return;
}
});
if (zoneJsInternalStackFramesPolicy === 'disable') {
// don't need to run detectZone to populate zoneJs internal stack frames
return;
}
// Now we need to populate the `zoneJsInternalStackFrames` as well as find the
// run/runGuarded/runTask frames. This is done by creating a detect zone and then threading
// the execution through all of the above methods so that we can look at the stack trace and
// find the frames of interest.
let detectZone = Zone.current.fork({
name: 'detect',
onHandleError: function (parentZD, current, target, error) {
if (error.originalStack && Error === ZoneAwareError) {
let frames = error.originalStack.split(/\n/);
let runFrame = false, runGuardedFrame = false, runTaskFrame = false;
while (frames.length) {
let frame = frames.shift();
// On safari it is possible to have stack frame with no line number.
// This check makes sure that we don't filter frames on name only (must have
// line number or exact equals to `ZoneAwareError`)
if (/:\d+:\d+/.test(frame) || frame === 'ZoneAwareError') {
// Get rid of the path so that we don't accidentally find function name in path.
// In chrome the separator is `(` and `@` in FF and safari
// Chrome: at Zone.run (zone.js:100)
// Chrome: at Zone.run (http://localhost:9876/base/build/lib/zone.js:100:24)
// FireFox: Zone.prototype.run@http://localhost:9876/base/build/lib/zone.js:101:24
// Safari: run@http://localhost:9876/base/build/lib/zone.js:101:24
let fnName = frame.split('(')[0].split('@')[0];
let frameType = 1 /* FrameType.transition */;
if (fnName.indexOf('ZoneAwareError') !== -1) {
if (fnName.indexOf('new ZoneAwareError') !== -1) {
zoneAwareFrame1 = frame;
zoneAwareFrame2 = frame.replace('new ZoneAwareError', 'new Error.ZoneAwareError');
// Now we need to populate the `zoneJsInternalStackFrames` as well as find the
// run/runGuarded/runTask frames. This is done by creating a detect zone and then threading
// the execution through all of the above methods so that we can look at the stack trace and
// find the frames of interest.
let detectZone = Zone.current.fork({
name: 'detect',
onHandleError: function (parentZD, current, target, error) {
if (error.originalStack && Error === ZoneAwareError) {
let frames = error.originalStack.split(/\n/);
let runFrame = false, runGuardedFrame = false, runTaskFrame = false;
while (frames.length) {
let frame = frames.shift();
// On safari it is possible to have stack frame with no line number.
// This check makes sure that we don't filter frames on name only (must have
// line number or exact equals to `ZoneAwareError`)
if (/:\d+:\d+/.test(frame) || frame === 'ZoneAwareError') {
// Get rid of the path so that we don't accidentally find function name in path.
// In chrome the separator is `(` and `@` in FF and safari
// Chrome: at Zone.run (zone.js:100)
// Chrome: at Zone.run (http://localhost:9876/base/build/lib/zone.js:100:24)
// FireFox: Zone.prototype.run@http://localhost:9876/base/build/lib/zone.js:101:24
// Safari: run@http://localhost:9876/base/build/lib/zone.js:101:24
let fnName = frame.split('(')[0].split('@')[0];
let frameType = 1 /* FrameType.transition */;
if (fnName.indexOf('ZoneAwareError') !== -1) {
if (fnName.indexOf('new ZoneAwareError') !== -1) {
zoneAwareFrame1 = frame;
zoneAwareFrame2 = frame.replace('new ZoneAwareError', 'new Error.ZoneAwareError');
}
else {
zoneAwareFrame1WithoutNew = frame;
zoneAwareFrame2WithoutNew = frame.replace('Error.', '');
if (frame.indexOf('Error.ZoneAwareError') === -1) {
zoneAwareFrame3WithoutNew = frame.replace('ZoneAwareError', 'Error.ZoneAwareError');
}
}
zoneJsInternalStackFrames[zoneAwareFrame2] = 0 /* FrameType.zoneJsInternal */;
}
if (fnName.indexOf('runGuarded') !== -1) {
runGuardedFrame = true;
}
else if (fnName.indexOf('runTask') !== -1) {
runTaskFrame = true;
}
else if (fnName.indexOf('run') !== -1) {
runFrame = true;
}
else {
zoneAwareFrame1WithoutNew = frame;
zoneAwareFrame2WithoutNew = frame.replace('Error.', '');
if (frame.indexOf('Error.ZoneAwareError') === -1) {
zoneAwareFrame3WithoutNew =
frame.replace('ZoneAwareError', 'Error.ZoneAwareError');
}
frameType = 0 /* FrameType.zoneJsInternal */;
}
zoneJsInternalStackFrames[zoneAwareFrame2] = 0 /* FrameType.zoneJsInternal */;
zoneJsInternalStackFrames[frame] = frameType;
// Once we find all of the frames we can stop looking.
if (runFrame && runGuardedFrame && runTaskFrame) {
ZoneAwareError[stackRewrite] = true;
break;
}
}
if (fnName.indexOf('runGuarded') !== -1) {
runGuardedFrame = true;
}
else if (fnName.indexOf('runTask') !== -1) {
runTaskFrame = true;
}
else if (fnName.indexOf('run') !== -1) {
runFrame = true;
}
else {
frameType = 0 /* FrameType.zoneJsInternal */;
}
zoneJsInternalStackFrames[frame] = frameType;
// Once we find all of the frames we can stop looking.
if (runFrame && runGuardedFrame && runTaskFrame) {
ZoneAwareError[stackRewrite] = true;
break;
}
}
}
}
return false;
}
});
// carefully constructor a stack frame which contains all of the frames of interest which
// need to be detected and marked as an internal zoneJs frame.
const childDetectZone = detectZone.fork({
name: 'child',
onScheduleTask: function (delegate, curr, target, task) {
return delegate.scheduleTask(target, task);
},
onInvokeTask: function (delegate, curr, target, task, applyThis, applyArgs) {
return delegate.invokeTask(target, task, applyThis, applyArgs);
},
onCancelTask: function (delegate, curr, target, task) {
return delegate.cancelTask(target, task);
},
onInvoke: function (delegate, curr, target, callback, applyThis, applyArgs, source) {
return delegate.invoke(target, callback, applyThis, applyArgs, source);
}
});
// we need to detect all zone related frames, it will
// exceed default stackTraceLimit, so we set it to
// larger number here, and restore it after detect finish.
// We cast through any so we don't need to depend on nodejs typings.
const originalStackTraceLimit = Error.stackTraceLimit;
Error.stackTraceLimit = 100;
// we schedule event/micro/macro task, and invoke them
// when onSchedule, so we can get all stack traces for
// all kinds of tasks with one error thrown.
childDetectZone.run(() => {
childDetectZone.runGuarded(() => {
const fakeTransitionTo = () => { };
childDetectZone.scheduleEventTask(zoneJsInternalStackFramesSymbol, () => {
childDetectZone.scheduleMacroTask(zoneJsInternalStackFramesSymbol, () => {
childDetectZone.scheduleMicroTask(zoneJsInternalStackFramesSymbol, () => {
throw new Error();
return false;
},
});
// carefully constructor a stack frame which contains all of the frames of interest which
// need to be detected and marked as an internal zoneJs frame.
const childDetectZone = detectZone.fork({
name: 'child',
onScheduleTask: function (delegate, curr, target, task) {
return delegate.scheduleTask(target, task);
},
onInvokeTask: function (delegate, curr, target, task, applyThis, applyArgs) {
return delegate.invokeTask(target, task, applyThis, applyArgs);
},
onCancelTask: function (delegate, curr, target, task) {
return delegate.cancelTask(target, task);
},
onInvoke: function (delegate, curr, target, callback, applyThis, applyArgs, source) {
return delegate.invoke(target, callback, applyThis, applyArgs, source);
},
});
// we need to detect all zone related frames, it will
// exceed default stackTraceLimit, so we set it to
// larger number here, and restore it after detect finish.
// We cast through any so we don't need to depend on nodejs typings.
const originalStackTraceLimit = Error.stackTraceLimit;
Error.stackTraceLimit = 100;
// we schedule event/micro/macro task, and invoke them
// when onSchedule, so we can get all stack traces for
// all kinds of tasks with one error thrown.
childDetectZone.run(() => {
childDetectZone.runGuarded(() => {
const fakeTransitionTo = () => { };
childDetectZone.scheduleEventTask(zoneJsInternalStackFramesSymbol, () => {
childDetectZone.scheduleMacroTask(zoneJsInternalStackFramesSymbol, () => {
childDetectZone.scheduleMicroTask(zoneJsInternalStackFramesSymbol, () => {
throw new Error();
}, undefined, (t) => {
t._transitionTo = fakeTransitionTo;
t.invoke();
});
childDetectZone.scheduleMicroTask(zoneJsInternalStackFramesSymbol, () => {
throw Error();
}, undefined, (t) => {
t._transitionTo = fakeTransitionTo;
t.invoke();
});
}, undefined, (t) => {
t._transitionTo = fakeTransitionTo;
t.invoke();
});
childDetectZone.scheduleMicroTask(zoneJsInternalStackFramesSymbol, () => {
throw Error();
}, undefined, (t) => {
t._transitionTo = fakeTransitionTo;
t.invoke();
});
}, () => { });
}, undefined, (t) => {

@@ -324,9 +334,8 @@ t._transitionTo = fakeTransitionTo;

}, () => { });
}, undefined, (t) => {
t._transitionTo = fakeTransitionTo;
t.invoke();
}, () => { });
});
});
Error.stackTraceLimit = originalStackTraceLimit;
});
Error.stackTraceLimit = originalStackTraceLimit;
});
}
patchError(Zone);
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/Zone.__load_patch("Error",((e,r,t)=>{const n=t.symbol("zoneJsInternalStackFrames"),a=e[t.symbol("Error")]=e.Error,o={};let c,i,s,l,u;e.Error=h;const k="stackRewrite",f=e.__Zone_Error_BlacklistedStackFrames_policy||e.__Zone_Error_ZoneJsInternalStackFrames_policy||"default";function p(e,r,t=!0){let n=e.split("\n"),a=0;for(;n[a]!==c&&n[a]!==i&&n[a]!==s&&n[a]!==l&&n[a]!==u&&a<n.length;)a++;for(;a<n.length&&r;a++){let e=n[a];if(e.trim())switch(o[e]){case 0:n.splice(a,1),a--;break;case 1:r=r.parent?r.parent:null,n.splice(a,1),a--;break;default:n[a]+=t?` [${r.zone.name}]`:` [${r.zoneName}]`}}return n.join("\n")}function h(){let e=a.apply(this,arguments);const r=e.originalStack=e.stack;if(h[k]&&r){let n=t.currentZoneFrame();if("lazy"===f)e[t.symbol("zoneFrameNames")]=function a(e){let r={zoneName:e.zone.name},t=r;for(;e.parent;){const t={zoneName:(e=e.parent).zone.name};r.parent=t,r=t}return t}(n);else if("default"===f)try{e.stack=e.zoneAwareStack=p(r,n)}catch(e){}}return this instanceof a&&this.constructor!=a?(Object.keys(e).concat("stack","message").forEach((r=>{const t=e[r];if(void 0!==t)try{this[r]=t}catch(e){}})),this):e}h.prototype=a.prototype,h[n]=o,h[k]=!1;const m=t.symbol("zoneAwareStack");"lazy"===f&&Object.defineProperty(h.prototype,"zoneAwareStack",{configurable:!0,enumerable:!0,get:function(){return this[m]||(this[m]=p(this.originalStack,this[t.symbol("zoneFrameNames")],!1)),this[m]},set:function(e){this.originalStack=e,this[m]=p(this.originalStack,this[t.symbol("zoneFrameNames")],!1)}});const d=["stackTraceLimit","captureStackTrace","prepareStackTrace"],T=Object.keys(a);if(T&&T.forEach((e=>{0===d.filter((r=>r===e)).length&&Object.defineProperty(h,e,{get:function(){return a[e]},set:function(r){a[e]=r}})})),a.hasOwnProperty("stackTraceLimit")&&(a.stackTraceLimit=Math.max(a.stackTraceLimit,15),Object.defineProperty(h,"stackTraceLimit",{get:function(){return a.stackTraceLimit},set:function(e){return a.stackTraceLimit=e}})),a.hasOwnProperty("captureStackTrace")&&Object.defineProperty(h,"captureStackTrace",{value:function e(r,t){a.captureStackTrace(r,t)}}),Object.defineProperty(h,"prepareStackTrace",{get:function(){return a.prepareStackTrace},set:function(e){return a.prepareStackTrace=e&&"function"==typeof e?function(r,t){if(t)for(let e=0;e<t.length;e++)if("zoneCaptureStackTrace"===t[e].getFunctionName()){t.splice(e,1);break}return e.call(this,r,t)}:e}}),"disable"===f)return;const E=r.current.fork({name:"detect",onHandleError:function(e,r,t,n){if(n.originalStack&&Error===h){let e=n.originalStack.split(/\n/),r=!1,t=!1,a=!1;for(;e.length;){let n=e.shift();if(/:\d+:\d+/.test(n)||"ZoneAwareError"===n){let e=n.split("(")[0].split("@")[0],f=1;if(-1!==e.indexOf("ZoneAwareError")&&(-1!==e.indexOf("new ZoneAwareError")?(c=n,i=n.replace("new ZoneAwareError","new Error.ZoneAwareError")):(s=n,l=n.replace("Error.",""),-1===n.indexOf("Error.ZoneAwareError")&&(u=n.replace("ZoneAwareError","Error.ZoneAwareError"))),o[i]=0),-1!==e.indexOf("runGuarded")?t=!0:-1!==e.indexOf("runTask")?a=!0:-1!==e.indexOf("run")?r=!0:f=0,o[n]=f,r&&t&&a){h[k]=!0;break}}}}return!1}}).fork({name:"child",onScheduleTask:function(e,r,t,n){return e.scheduleTask(t,n)},onInvokeTask:function(e,r,t,n,a,o){return e.invokeTask(t,n,a,o)},onCancelTask:function(e,r,t,n){return e.cancelTask(t,n)},onInvoke:function(e,r,t,n,a,o,c){return e.invoke(t,n,a,o,c)}}),y=Error.stackTraceLimit;Error.stackTraceLimit=100,E.run((()=>{E.runGuarded((()=>{const e=()=>{};E.scheduleEventTask(n,(()=>{E.scheduleMacroTask(n,(()=>{E.scheduleMicroTask(n,(()=>{throw new Error}),void 0,(r=>{r._transitionTo=e,r.invoke()})),E.scheduleMicroTask(n,(()=>{throw Error()}),void 0,(r=>{r._transitionTo=e,r.invoke()}))}),void 0,(r=>{r._transitionTo=e,r.invoke()}),(()=>{}))}),void 0,(r=>{r._transitionTo=e,r.invoke()}),(()=>{}))}))})),Error.stackTraceLimit=y}));
*/function patchError(e){e.__load_patch("Error",((e,r,t)=>{const n=t.symbol("zoneJsInternalStackFrames"),a=e[t.symbol("Error")]=e.Error,o={};let c,i,s,l,u;e.Error=h;const k="stackRewrite",f=e.__Zone_Error_BlacklistedStackFrames_policy||e.__Zone_Error_ZoneJsInternalStackFrames_policy||"default";function p(e,r,t=!0){let n=e.split("\n"),a=0;for(;n[a]!==c&&n[a]!==i&&n[a]!==s&&n[a]!==l&&n[a]!==u&&a<n.length;)a++;for(;a<n.length&&r;a++){let e=n[a];if(e.trim())switch(o[e]){case 0:n.splice(a,1),a--;break;case 1:r=r.parent?r.parent:null,n.splice(a,1),a--;break;default:n[a]+=t?` [${r.zone.name}]`:` [${r.zoneName}]`}}return n.join("\n")}function h(){let e=a.apply(this,arguments);const r=e.originalStack=e.stack;if(h[k]&&r){let n=t.currentZoneFrame();if("lazy"===f)e[t.symbol("zoneFrameNames")]=function a(e){let r={zoneName:e.zone.name},t=r;for(;e.parent;){const t={zoneName:(e=e.parent).zone.name};r.parent=t,r=t}return t}(n);else if("default"===f)try{e.stack=e.zoneAwareStack=p(r,n)}catch(e){}}return this instanceof a&&this.constructor!=a?(Object.keys(e).concat("stack","message").forEach((r=>{const t=e[r];if(void 0!==t)try{this[r]=t}catch(e){}})),this):e}h.prototype=a.prototype,h[n]=o,h[k]=!1;const m=t.symbol("zoneAwareStack");"lazy"===f&&Object.defineProperty(h.prototype,"zoneAwareStack",{configurable:!0,enumerable:!0,get:function(){return this[m]||(this[m]=p(this.originalStack,this[t.symbol("zoneFrameNames")],!1)),this[m]},set:function(e){this.originalStack=e,this[m]=p(this.originalStack,this[t.symbol("zoneFrameNames")],!1)}});const d=["stackTraceLimit","captureStackTrace","prepareStackTrace"],T=Object.keys(a);if(T&&T.forEach((e=>{0===d.filter((r=>r===e)).length&&Object.defineProperty(h,e,{get:function(){return a[e]},set:function(r){a[e]=r}})})),a.hasOwnProperty("stackTraceLimit")&&(a.stackTraceLimit=Math.max(a.stackTraceLimit,15),Object.defineProperty(h,"stackTraceLimit",{get:function(){return a.stackTraceLimit},set:function(e){return a.stackTraceLimit=e}})),a.hasOwnProperty("captureStackTrace")&&Object.defineProperty(h,"captureStackTrace",{value:function e(r,t){a.captureStackTrace(r,t)}}),Object.defineProperty(h,"prepareStackTrace",{get:function(){return a.prepareStackTrace},set:function(e){return a.prepareStackTrace=e&&"function"==typeof e?function(r,t){if(t)for(let e=0;e<t.length;e++)if("zoneCaptureStackTrace"===t[e].getFunctionName()){t.splice(e,1);break}return e.call(this,r,t)}:e}}),"disable"===f)return;const E=r.current.fork({name:"detect",onHandleError:function(e,r,t,n){if(n.originalStack&&Error===h){let e=n.originalStack.split(/\n/),r=!1,t=!1,a=!1;for(;e.length;){let n=e.shift();if(/:\d+:\d+/.test(n)||"ZoneAwareError"===n){let e=n.split("(")[0].split("@")[0],f=1;if(-1!==e.indexOf("ZoneAwareError")&&(-1!==e.indexOf("new ZoneAwareError")?(c=n,i=n.replace("new ZoneAwareError","new Error.ZoneAwareError")):(s=n,l=n.replace("Error.",""),-1===n.indexOf("Error.ZoneAwareError")&&(u=n.replace("ZoneAwareError","Error.ZoneAwareError"))),o[i]=0),-1!==e.indexOf("runGuarded")?t=!0:-1!==e.indexOf("runTask")?a=!0:-1!==e.indexOf("run")?r=!0:f=0,o[n]=f,r&&t&&a){h[k]=!0;break}}}}return!1}}).fork({name:"child",onScheduleTask:function(e,r,t,n){return e.scheduleTask(t,n)},onInvokeTask:function(e,r,t,n,a,o){return e.invokeTask(t,n,a,o)},onCancelTask:function(e,r,t,n){return e.cancelTask(t,n)},onInvoke:function(e,r,t,n,a,o,c){return e.invoke(t,n,a,o,c)}}),y=Error.stackTraceLimit;Error.stackTraceLimit=100,E.run((()=>{E.runGuarded((()=>{const e=()=>{};E.scheduleEventTask(n,(()=>{E.scheduleMacroTask(n,(()=>{E.scheduleMicroTask(n,(()=>{throw new Error}),void 0,(r=>{r._transitionTo=e,r.invoke()})),E.scheduleMicroTask(n,(()=>{throw Error()}),void 0,(r=>{r._transitionTo=e,r.invoke()}))}),void 0,(r=>{r._transitionTo=e,r.invoke()}),(()=>{}))}),void 0,(r=>{r._transitionTo=e,r.invoke()}),(()=>{}))}))})),Error.stackTraceLimit=y}))}patchError(Zone);
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT

@@ -25,3 +25,3 @@ */

if (isUnconfigurable(obj, prop)) {
throw new TypeError('Cannot assign to read only property \'' + prop + '\' of ' + obj);
throw new TypeError("Cannot assign to read only property '" + prop + "' of " + obj);
}

@@ -112,4 +112,6 @@ const originalConfigurableFlag = desc.configurable;

let swallowError = false;
if (prop === 'createdCallback' || prop === 'attachedCallback' ||
prop === 'detachedCallback' || prop === 'attributeChangedCallback') {
if (prop === 'createdCallback' ||
prop === 'attachedCallback' ||
prop === 'detachedCallback' ||
prop === 'attributeChangedCallback') {
// We only swallow the error in registerElement patch

@@ -145,4 +147,3 @@ // this is the work around since some applications

const 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';
const 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'
.split(',');
const 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'.split(',');
const EVENT_TARGET = 'EventTarget';

@@ -179,3 +180,3 @@ let apis = [];

'MSPointerOver': 'pointerover',
'MSPointerUp': 'pointerup'
'MSPointerUp': 'pointerup',
};

@@ -196,3 +197,3 @@ // predefine all __zone_symbol__ + eventName + true/false string

const target = WTF_ISSUE_555_ARRAY[i];
const targets = globalSources[target] = {};
const targets = (globalSources[target] = {});
for (let j = 0; j < eventNames.length; j++) {

@@ -208,3 +209,3 @@ const eventName = eventNames[j];

const testString = delegate.toString();
if ((testString === FUNCTION_WRAPPER || testString == BROWSER_TOOLS)) {
if (testString === FUNCTION_WRAPPER || testString == BROWSER_TOOLS) {
nativeDelegate.apply(target, args);

@@ -221,3 +222,3 @@ return false;

const testString = delegate.toString();
if ((testString === FUNCTION_WRAPPER || testString == BROWSER_TOOLS)) {
if (testString === FUNCTION_WRAPPER || testString == BROWSER_TOOLS) {
nativeDelegate.apply(target, args);

@@ -251,3 +252,3 @@ return false;

return pointerEventName || eventName;
}
},
});

@@ -344,3 +345,3 @@ Zone[api.symbol('patchEventTarget')] = !!_global[EVENT_TARGET];

return true;
}
},
});

@@ -373,3 +374,3 @@ const div = document.createElement('div');

return true;
}
},
});

@@ -392,3 +393,3 @@ const req = new XMLHttpRequest();

this[SYMBOL_FAKE_ONREADYSTATECHANGE] = value;
}
},
});

@@ -499,9 +500,20 @@ const req = new XMLHttpRequest();

'waiting',
'wheel'
'wheel',
];
const documentEventNames = [
'afterscriptexecute', 'beforescriptexecute', 'DOMContentLoaded', 'freeze', 'fullscreenchange',
'mozfullscreenchange', 'webkitfullscreenchange', 'msfullscreenchange', 'fullscreenerror',
'mozfullscreenerror', 'webkitfullscreenerror', 'msfullscreenerror', 'readystatechange',
'visibilitychange', 'resume'
'afterscriptexecute',
'beforescriptexecute',
'DOMContentLoaded',
'freeze',
'fullscreenchange',
'mozfullscreenchange',
'webkitfullscreenchange',
'msfullscreenchange',
'fullscreenerror',
'mozfullscreenerror',
'webkitfullscreenerror',
'msfullscreenerror',
'readystatechange',
'visibilitychange',
'resume',
];

@@ -538,8 +550,21 @@ const windowEventNames = [

'vrdisplaydisconnected',
'vrdisplaypresentchange'
'vrdisplaypresentchange',
];
const htmlElementEventNames = [
'beforecopy', 'beforecut', 'beforepaste', 'copy', 'cut', 'paste', 'dragstart', 'loadend',
'animationstart', 'search', 'transitionrun', 'transitionstart', 'webkitanimationend',
'webkitanimationiteration', 'webkitanimationstart', 'webkittransitionend'
'beforecopy',
'beforecut',
'beforepaste',
'copy',
'cut',
'paste',
'dragstart',
'loadend',
'animationstart',
'search',
'transitionrun',
'transitionstart',
'webkitanimationend',
'webkitanimationiteration',
'webkitanimationstart',
'webkittransitionend',
];

@@ -601,3 +626,3 @@ const ieElementEventNames = [

'stop',
'storagecommit'
'storagecommit',
];

@@ -608,4 +633,10 @@ const webglEventNames = ['webglcontextrestored', 'webglcontextlost', 'webglcontextcreationerror'];

const eventNames = [
...globalEventHandlersEventNames, ...webglEventNames, ...formEventNames, ...detailEventNames,
...documentEventNames, ...windowEventNames, ...htmlElementEventNames, ...ieElementEventNames
...globalEventHandlersEventNames,
...webglEventNames,
...formEventNames,
...detailEventNames,
...documentEventNames,
...windowEventNames,
...htmlElementEventNames,
...ieElementEventNames,
];

@@ -645,3 +676,8 @@ // Whenever any eventListener fires, we check the eventListener target and all parents

}
const callbacks = ['createdCallback', 'attachedCallback', 'detachedCallback', 'attributeChangedCallback'];
const callbacks = [
'createdCallback',
'attachedCallback',
'detachedCallback',
'attributeChangedCallback',
];
api.patchCallbacks(api, document, 'Document', 'registerElement', callbacks);

@@ -654,3 +690,10 @@ }

*/
(function (_global) {
function patchBrowserLegacy() {
const _global = typeof window !== 'undefined'
? window
: typeof global !== 'undefined'
? global
: typeof self !== 'undefined'
? self
: {};
const symbolPrefix = _global['__Zone_symbol_prefix'] || '__zone_symbol__';

@@ -674,4 +717,4 @@ function __symbol__(name) {

};
})(typeof window !== 'undefined' ?
window :
typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {});
}
patchBrowserLegacy();
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/let zoneSymbol,_defineProperty,_getOwnPropertyDescriptor,_create,unconfigurablesKey;function propertyPatch(){zoneSymbol=Zone.__symbol__,_defineProperty=Object[zoneSymbol("defineProperty")]=Object.defineProperty,_getOwnPropertyDescriptor=Object[zoneSymbol("getOwnPropertyDescriptor")]=Object.getOwnPropertyDescriptor,_create=Object.create,unconfigurablesKey=zoneSymbol("unconfigurables"),Object.defineProperty=function(e,t,n){if(isUnconfigurable(e,t))throw new TypeError("Cannot assign to read only property '"+t+"' of "+e);const r=n.configurable;return"prototype"!==t&&(n=rewriteDescriptor(e,t,n)),_tryDefineProperty(e,t,n,r)},Object.defineProperties=function(e,t){Object.keys(t).forEach((function(n){Object.defineProperty(e,n,t[n])}));for(const n of Object.getOwnPropertySymbols(t)){const r=Object.getOwnPropertyDescriptor(t,n);r?.enumerable&&Object.defineProperty(e,n,t[n])}return e},Object.create=function(e,t){return"object"!=typeof t||Object.isFrozen(t)||Object.keys(t).forEach((function(n){t[n]=rewriteDescriptor(e,n,t[n])})),_create(e,t)},Object.getOwnPropertyDescriptor=function(e,t){const n=_getOwnPropertyDescriptor(e,t);return n&&isUnconfigurable(e,t)&&(n.configurable=!1),n}}function _redefineProperty(e,t,n){const r=n.configurable;return _tryDefineProperty(e,t,n=rewriteDescriptor(e,t,n),r)}function isUnconfigurable(e,t){return e&&e[unconfigurablesKey]&&e[unconfigurablesKey][t]}function rewriteDescriptor(e,t,n){return Object.isFrozen(n)||(n.configurable=!0),n.configurable||(e[unconfigurablesKey]||Object.isFrozen(e)||_defineProperty(e,unconfigurablesKey,{writable:!0,value:{}}),e[unconfigurablesKey]&&(e[unconfigurablesKey][t]=!0)),n}function _tryDefineProperty(e,t,n,r){try{return _defineProperty(e,t,n)}catch(o){if(!n.configurable)throw o;void 0===r?delete n.configurable:n.configurable=r;try{return _defineProperty(e,t,n)}catch(r){let o=!1;if("createdCallback"!==t&&"attachedCallback"!==t&&"detachedCallback"!==t&&"attributeChangedCallback"!==t||(o=!0),!o)throw r;let a=null;try{a=JSON.stringify(n)}catch(e){a=n.toString()}console.log(`Attempting to configure '${t}' with descriptor '${a}' on object '${e}' and got error, giving up: ${r}`)}}}function eventTargetLegacyPatch(e,t){const{eventNames:n,globalSources:r,zoneSymbolEventNames:o,TRUE_STR:a,FALSE_STR:c,ZONE_SYMBOL_PREFIX:i}=t.getGlobalObjects(),s="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".split(","),l="EventTarget";let p=[];const u=e.wtf,d="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".split(",");u?p=d.map((e=>"HTML"+e+"Element")).concat(s):e[l]?p.push(l):p=s;const m=e.__Zone_disable_IE_check||!1,g=e.__Zone_enable_cross_context_check||!1,f=t.isIEOrEdge(),b="[object FunctionWrapper]",y="function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] }",h={MSPointerCancel:"pointercancel",MSPointerDown:"pointerdown",MSPointerEnter:"pointerenter",MSPointerHover:"pointerhover",MSPointerLeave:"pointerleave",MSPointerMove:"pointermove",MSPointerOut:"pointerout",MSPointerOver:"pointerover",MSPointerUp:"pointerup"};for(let e=0;e<n.length;e++){const t=n[e],r=i+(t+c),s=i+(t+a);o[t]={},o[t][c]=r,o[t][a]=s}for(let e=0;e<d.length;e++){const t=d[e],o=r[t]={};for(let e=0;e<n.length;e++){const r=n[e];o[r]=t+".addEventListener:"+r}}const v=[];for(let t=0;t<p.length;t++){const n=e[p[t]];v.push(n&&n.prototype)}return t.patchEventTarget(e,t,v,{vh:function(e,t,n,r){if(!m&&f)if(g)try{const o=t.toString();if(o===b||o==y)return e.apply(n,r),!1}catch(t){return e.apply(n,r),!1}else{const o=t.toString();if(o===b||o==y)return e.apply(n,r),!1}else if(g)try{t.toString()}catch(t){return e.apply(n,r),!1}return!0},transferEventName:e=>h[e]||e}),Zone[t.symbol("patchEventTarget")]=!!e[l],!0}function apply(e,t){const{ADD_EVENT_LISTENER_STR:n,REMOVE_EVENT_LISTENER_STR:r}=e.getGlobalObjects(),o=t.WebSocket;t.EventTarget||e.patchEventTarget(t,e,[o.prototype]),t.WebSocket=function(t,a){const c=arguments.length>1?new o(t,a):new o(t);let i,s;const l=e.ObjectGetOwnPropertyDescriptor(c,"onmessage");return l&&!1===l.configurable?(i=e.ObjectCreate(c),s=c,[n,r,"send","close"].forEach((function(t){i[t]=function(){const o=e.ArraySlice.call(arguments);if(t===n||t===r){const e=o.length>0?o[0]:void 0;if(e){const t=Zone.__symbol__("ON_PROPERTY"+e);c[t]=i[t]}}return c[t].apply(c,o)}}))):i=c,e.patchOnProperties(i,["close","error","message","open"],s),i};const a=t.WebSocket;for(const e in o)a[e]=o[e]}function propertyDescriptorLegacyPatch(e,t){const{isNode:n,isMix:r}=e.getGlobalObjects();if((!n||r)&&!canPatchViaPropertyDescriptor(e,t)){const n="undefined"!=typeof WebSocket;patchViaCapturingAllTheEvents(e),e.patchClass("XMLHttpRequest"),n&&apply(e,t),Zone[e.symbol("patchEvents")]=!0}}function canPatchViaPropertyDescriptor(e,t){const{isBrowser:n,isMix:r}=e.getGlobalObjects();if((n||r)&&!e.ObjectGetOwnPropertyDescriptor(HTMLElement.prototype,"onclick")&&"undefined"!=typeof Element){const t=e.ObjectGetOwnPropertyDescriptor(Element.prototype,"onclick");if(t&&!t.configurable)return!1;if(t){e.ObjectDefineProperty(Element.prototype,"onclick",{enumerable:!0,configurable:!0,get:function(){return!0}});const n=!!document.createElement("div").onclick;return e.ObjectDefineProperty(Element.prototype,"onclick",t),n}}const o=t.XMLHttpRequest;if(!o)return!1;const a="onreadystatechange",c=o.prototype,i=e.ObjectGetOwnPropertyDescriptor(c,a);if(i){e.ObjectDefineProperty(c,a,{enumerable:!0,configurable:!0,get:function(){return!0}});const t=!!(new o).onreadystatechange;return e.ObjectDefineProperty(c,a,i||{}),t}{const t=e.symbol("fake");e.ObjectDefineProperty(c,a,{enumerable:!0,configurable:!0,get:function(){return this[t]},set:function(e){this[t]=e}});const n=new o,r=()=>{};n.onreadystatechange=r;const i=n[t]===r;return n.onreadystatechange=null,i}}const globalEventHandlersEventNames=["abort","animationcancel","animationend","animationiteration","auxclick","beforeinput","blur","cancel","canplay","canplaythrough","change","compositionstart","compositionupdate","compositionend","cuechange","click","close","contextmenu","curechange","dblclick","drag","dragend","dragenter","dragexit","dragleave","dragover","drop","durationchange","emptied","ended","error","focus","focusin","focusout","gotpointercapture","input","invalid","keydown","keypress","keyup","load","loadstart","loadeddata","loadedmetadata","lostpointercapture","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","mousewheel","orientationchange","pause","play","playing","pointercancel","pointerdown","pointerenter","pointerleave","pointerlockchange","mozpointerlockchange","webkitpointerlockerchange","pointerlockerror","mozpointerlockerror","webkitpointerlockerror","pointermove","pointout","pointerover","pointerup","progress","ratechange","reset","resize","scroll","seeked","seeking","select","selectionchange","selectstart","show","sort","stalled","submit","suspend","timeupdate","volumechange","touchcancel","touchmove","touchstart","touchend","transitioncancel","transitionend","waiting","wheel"],documentEventNames=["afterscriptexecute","beforescriptexecute","DOMContentLoaded","freeze","fullscreenchange","mozfullscreenchange","webkitfullscreenchange","msfullscreenchange","fullscreenerror","mozfullscreenerror","webkitfullscreenerror","msfullscreenerror","readystatechange","visibilitychange","resume"],windowEventNames=["absolutedeviceorientation","afterinput","afterprint","appinstalled","beforeinstallprompt","beforeprint","beforeunload","devicelight","devicemotion","deviceorientation","deviceorientationabsolute","deviceproximity","hashchange","languagechange","message","mozbeforepaint","offline","online","paint","pageshow","pagehide","popstate","rejectionhandled","storage","unhandledrejection","unload","userproximity","vrdisplayconnected","vrdisplaydisconnected","vrdisplaypresentchange"],htmlElementEventNames=["beforecopy","beforecut","beforepaste","copy","cut","paste","dragstart","loadend","animationstart","search","transitionrun","transitionstart","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend"],ieElementEventNames=["activate","afterupdate","ariarequest","beforeactivate","beforedeactivate","beforeeditfocus","beforeupdate","cellchange","controlselect","dataavailable","datasetchanged","datasetcomplete","errorupdate","filterchange","layoutcomplete","losecapture","move","moveend","movestart","propertychange","resizeend","resizestart","rowenter","rowexit","rowsdelete","rowsinserted","command","compassneedscalibration","deactivate","help","mscontentzoom","msmanipulationstatechanged","msgesturechange","msgesturedoubletap","msgestureend","msgesturehold","msgesturestart","msgesturetap","msgotpointercapture","msinertiastart","mslostpointercapture","mspointercancel","mspointerdown","mspointerenter","mspointerhover","mspointerleave","mspointermove","mspointerout","mspointerover","mspointerup","pointerout","mssitemodejumplistitemremoved","msthumbnailclick","stop","storagecommit"],webglEventNames=["webglcontextrestored","webglcontextlost","webglcontextcreationerror"],formEventNames=["autocomplete","autocompleteerror"],detailEventNames=["toggle"],eventNames=[...globalEventHandlersEventNames,...webglEventNames,...formEventNames,...detailEventNames,...documentEventNames,...windowEventNames,...htmlElementEventNames,...ieElementEventNames];function patchViaCapturingAllTheEvents(e){const t=e.symbol("unbound");for(let n=0;n<eventNames.length;n++){const r=eventNames[n],o="on"+r;self.addEventListener(r,(function(n){let r,a,c=n.target;for(a=c?c.constructor.name+"."+o:"unknown."+o;c;)c[o]&&!c[o][t]&&(r=e.wrapWithCurrentZone(c[o],a),r[t]=c[o],c[o]=r),c=c.parentElement}),!0)}}function registerElementPatch(e,t){const{isBrowser:n,isMix:r}=t.getGlobalObjects();(n||r)&&"registerElement"in e.document&&t.patchCallbacks(t,document,"Document","registerElement",["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"])}!function(e){const t=e.__Zone_symbol_prefix||"__zone_symbol__";e[function n(e){return t+e}("legacyPatch")]=function(){const t=e.Zone;t.__load_patch("defineProperty",((e,t,n)=>{n._redefineProperty=_redefineProperty,propertyPatch()})),t.__load_patch("registerElement",((e,t,n)=>{registerElementPatch(e,n)})),t.__load_patch("EventTargetLegacy",((e,t,n)=>{eventTargetLegacyPatch(e,n),propertyDescriptorLegacyPatch(n,e)}))}}("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{});
*/let zoneSymbol,_defineProperty,_getOwnPropertyDescriptor,_create,unconfigurablesKey;function propertyPatch(){zoneSymbol=Zone.__symbol__,_defineProperty=Object[zoneSymbol("defineProperty")]=Object.defineProperty,_getOwnPropertyDescriptor=Object[zoneSymbol("getOwnPropertyDescriptor")]=Object.getOwnPropertyDescriptor,_create=Object.create,unconfigurablesKey=zoneSymbol("unconfigurables"),Object.defineProperty=function(e,t,n){if(isUnconfigurable(e,t))throw new TypeError("Cannot assign to read only property '"+t+"' of "+e);const r=n.configurable;return"prototype"!==t&&(n=rewriteDescriptor(e,t,n)),_tryDefineProperty(e,t,n,r)},Object.defineProperties=function(e,t){Object.keys(t).forEach((function(n){Object.defineProperty(e,n,t[n])}));for(const n of Object.getOwnPropertySymbols(t)){const r=Object.getOwnPropertyDescriptor(t,n);r?.enumerable&&Object.defineProperty(e,n,t[n])}return e},Object.create=function(e,t){return"object"!=typeof t||Object.isFrozen(t)||Object.keys(t).forEach((function(n){t[n]=rewriteDescriptor(e,n,t[n])})),_create(e,t)},Object.getOwnPropertyDescriptor=function(e,t){const n=_getOwnPropertyDescriptor(e,t);return n&&isUnconfigurable(e,t)&&(n.configurable=!1),n}}function _redefineProperty(e,t,n){const r=n.configurable;return _tryDefineProperty(e,t,n=rewriteDescriptor(e,t,n),r)}function isUnconfigurable(e,t){return e&&e[unconfigurablesKey]&&e[unconfigurablesKey][t]}function rewriteDescriptor(e,t,n){return Object.isFrozen(n)||(n.configurable=!0),n.configurable||(e[unconfigurablesKey]||Object.isFrozen(e)||_defineProperty(e,unconfigurablesKey,{writable:!0,value:{}}),e[unconfigurablesKey]&&(e[unconfigurablesKey][t]=!0)),n}function _tryDefineProperty(e,t,n,r){try{return _defineProperty(e,t,n)}catch(o){if(!n.configurable)throw o;void 0===r?delete n.configurable:n.configurable=r;try{return _defineProperty(e,t,n)}catch(r){let o=!1;if("createdCallback"!==t&&"attachedCallback"!==t&&"detachedCallback"!==t&&"attributeChangedCallback"!==t||(o=!0),!o)throw r;let a=null;try{a=JSON.stringify(n)}catch(e){a=n.toString()}console.log(`Attempting to configure '${t}' with descriptor '${a}' on object '${e}' and got error, giving up: ${r}`)}}}function eventTargetLegacyPatch(e,t){const{eventNames:n,globalSources:r,zoneSymbolEventNames:o,TRUE_STR:a,FALSE_STR:c,ZONE_SYMBOL_PREFIX:i}=t.getGlobalObjects(),s="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".split(","),l="EventTarget";let p=[];const u=e.wtf,d="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".split(",");u?p=d.map((e=>"HTML"+e+"Element")).concat(s):e[l]?p.push(l):p=s;const g=e.__Zone_disable_IE_check||!1,m=e.__Zone_enable_cross_context_check||!1,f=t.isIEOrEdge(),b="[object FunctionWrapper]",y="function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] }",h={MSPointerCancel:"pointercancel",MSPointerDown:"pointerdown",MSPointerEnter:"pointerenter",MSPointerHover:"pointerhover",MSPointerLeave:"pointerleave",MSPointerMove:"pointermove",MSPointerOut:"pointerout",MSPointerOver:"pointerover",MSPointerUp:"pointerup"};for(let e=0;e<n.length;e++){const t=n[e],r=i+(t+c),s=i+(t+a);o[t]={},o[t][c]=r,o[t][a]=s}for(let e=0;e<d.length;e++){const t=d[e],o=r[t]={};for(let e=0;e<n.length;e++){const r=n[e];o[r]=t+".addEventListener:"+r}}const v=[];for(let t=0;t<p.length;t++){const n=e[p[t]];v.push(n&&n.prototype)}return t.patchEventTarget(e,t,v,{vh:function(e,t,n,r){if(!g&&f)if(m)try{const o=t.toString();if(o===b||o==y)return e.apply(n,r),!1}catch(t){return e.apply(n,r),!1}else{const o=t.toString();if(o===b||o==y)return e.apply(n,r),!1}else if(m)try{t.toString()}catch(t){return e.apply(n,r),!1}return!0},transferEventName:e=>h[e]||e}),Zone[t.symbol("patchEventTarget")]=!!e[l],!0}function apply(e,t){const{ADD_EVENT_LISTENER_STR:n,REMOVE_EVENT_LISTENER_STR:r}=e.getGlobalObjects(),o=t.WebSocket;t.EventTarget||e.patchEventTarget(t,e,[o.prototype]),t.WebSocket=function(t,a){const c=arguments.length>1?new o(t,a):new o(t);let i,s;const l=e.ObjectGetOwnPropertyDescriptor(c,"onmessage");return l&&!1===l.configurable?(i=e.ObjectCreate(c),s=c,[n,r,"send","close"].forEach((function(t){i[t]=function(){const o=e.ArraySlice.call(arguments);if(t===n||t===r){const e=o.length>0?o[0]:void 0;if(e){const t=Zone.__symbol__("ON_PROPERTY"+e);c[t]=i[t]}}return c[t].apply(c,o)}}))):i=c,e.patchOnProperties(i,["close","error","message","open"],s),i};const a=t.WebSocket;for(const e in o)a[e]=o[e]}function propertyDescriptorLegacyPatch(e,t){const{isNode:n,isMix:r}=e.getGlobalObjects();if((!n||r)&&!canPatchViaPropertyDescriptor(e,t)){const n="undefined"!=typeof WebSocket;patchViaCapturingAllTheEvents(e),e.patchClass("XMLHttpRequest"),n&&apply(e,t),Zone[e.symbol("patchEvents")]=!0}}function canPatchViaPropertyDescriptor(e,t){const{isBrowser:n,isMix:r}=e.getGlobalObjects();if((n||r)&&!e.ObjectGetOwnPropertyDescriptor(HTMLElement.prototype,"onclick")&&"undefined"!=typeof Element){const t=e.ObjectGetOwnPropertyDescriptor(Element.prototype,"onclick");if(t&&!t.configurable)return!1;if(t){e.ObjectDefineProperty(Element.prototype,"onclick",{enumerable:!0,configurable:!0,get:function(){return!0}});const n=!!document.createElement("div").onclick;return e.ObjectDefineProperty(Element.prototype,"onclick",t),n}}const o=t.XMLHttpRequest;if(!o)return!1;const a="onreadystatechange",c=o.prototype,i=e.ObjectGetOwnPropertyDescriptor(c,a);if(i){e.ObjectDefineProperty(c,a,{enumerable:!0,configurable:!0,get:function(){return!0}});const t=!!(new o).onreadystatechange;return e.ObjectDefineProperty(c,a,i||{}),t}{const t=e.symbol("fake");e.ObjectDefineProperty(c,a,{enumerable:!0,configurable:!0,get:function(){return this[t]},set:function(e){this[t]=e}});const n=new o,r=()=>{};n.onreadystatechange=r;const i=n[t]===r;return n.onreadystatechange=null,i}}const globalEventHandlersEventNames=["abort","animationcancel","animationend","animationiteration","auxclick","beforeinput","blur","cancel","canplay","canplaythrough","change","compositionstart","compositionupdate","compositionend","cuechange","click","close","contextmenu","curechange","dblclick","drag","dragend","dragenter","dragexit","dragleave","dragover","drop","durationchange","emptied","ended","error","focus","focusin","focusout","gotpointercapture","input","invalid","keydown","keypress","keyup","load","loadstart","loadeddata","loadedmetadata","lostpointercapture","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","mousewheel","orientationchange","pause","play","playing","pointercancel","pointerdown","pointerenter","pointerleave","pointerlockchange","mozpointerlockchange","webkitpointerlockerchange","pointerlockerror","mozpointerlockerror","webkitpointerlockerror","pointermove","pointout","pointerover","pointerup","progress","ratechange","reset","resize","scroll","seeked","seeking","select","selectionchange","selectstart","show","sort","stalled","submit","suspend","timeupdate","volumechange","touchcancel","touchmove","touchstart","touchend","transitioncancel","transitionend","waiting","wheel"],documentEventNames=["afterscriptexecute","beforescriptexecute","DOMContentLoaded","freeze","fullscreenchange","mozfullscreenchange","webkitfullscreenchange","msfullscreenchange","fullscreenerror","mozfullscreenerror","webkitfullscreenerror","msfullscreenerror","readystatechange","visibilitychange","resume"],windowEventNames=["absolutedeviceorientation","afterinput","afterprint","appinstalled","beforeinstallprompt","beforeprint","beforeunload","devicelight","devicemotion","deviceorientation","deviceorientationabsolute","deviceproximity","hashchange","languagechange","message","mozbeforepaint","offline","online","paint","pageshow","pagehide","popstate","rejectionhandled","storage","unhandledrejection","unload","userproximity","vrdisplayconnected","vrdisplaydisconnected","vrdisplaypresentchange"],htmlElementEventNames=["beforecopy","beforecut","beforepaste","copy","cut","paste","dragstart","loadend","animationstart","search","transitionrun","transitionstart","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend"],ieElementEventNames=["activate","afterupdate","ariarequest","beforeactivate","beforedeactivate","beforeeditfocus","beforeupdate","cellchange","controlselect","dataavailable","datasetchanged","datasetcomplete","errorupdate","filterchange","layoutcomplete","losecapture","move","moveend","movestart","propertychange","resizeend","resizestart","rowenter","rowexit","rowsdelete","rowsinserted","command","compassneedscalibration","deactivate","help","mscontentzoom","msmanipulationstatechanged","msgesturechange","msgesturedoubletap","msgestureend","msgesturehold","msgesturestart","msgesturetap","msgotpointercapture","msinertiastart","mslostpointercapture","mspointercancel","mspointerdown","mspointerenter","mspointerhover","mspointerleave","mspointermove","mspointerout","mspointerover","mspointerup","pointerout","mssitemodejumplistitemremoved","msthumbnailclick","stop","storagecommit"],webglEventNames=["webglcontextrestored","webglcontextlost","webglcontextcreationerror"],formEventNames=["autocomplete","autocompleteerror"],detailEventNames=["toggle"],eventNames=[...globalEventHandlersEventNames,...webglEventNames,...formEventNames,...detailEventNames,...documentEventNames,...windowEventNames,...htmlElementEventNames,...ieElementEventNames];function patchViaCapturingAllTheEvents(e){const t=e.symbol("unbound");for(let n=0;n<eventNames.length;n++){const r=eventNames[n],o="on"+r;self.addEventListener(r,(function(n){let r,a,c=n.target;for(a=c?c.constructor.name+"."+o:"unknown."+o;c;)c[o]&&!c[o][t]&&(r=e.wrapWithCurrentZone(c[o],a),r[t]=c[o],c[o]=r),c=c.parentElement}),!0)}}function registerElementPatch(e,t){const{isBrowser:n,isMix:r}=t.getGlobalObjects();(n||r)&&"registerElement"in e.document&&t.patchCallbacks(t,document,"Document","registerElement",["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"])}function patchBrowserLegacy(){const e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=e.__Zone_symbol_prefix||"__zone_symbol__";e[function n(e){return t+e}("legacyPatch")]=function(){const t=e.Zone;t.__load_patch("defineProperty",((e,t,n)=>{n._redefineProperty=_redefineProperty,propertyPatch()})),t.__load_patch("registerElement",((e,t,n)=>{registerElementPatch(e,n)})),t.__load_patch("EventTargetLegacy",((e,t,n)=>{eventTargetLegacyPatch(e,n),propertyDescriptorLegacyPatch(n,e)}))}}patchBrowserLegacy();
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/!function(e){const t=e.performance;function n(e){t&&t.mark&&t.mark(e)}function o(e,n){t&&t.measure&&t.measure(e,n)}n("Zone");const r=e.__Zone_symbol_prefix||"__zone_symbol__";function s(e){return r+e}const a=!0===e[s("forceDuplicateZoneCheck")];if(e.Zone){if(a||"function"!=typeof e.Zone.__symbol__)throw new Error("Zone already loaded.");return e.Zone}class i{static{this.__symbol__=s}static assertZonePatched(){if(e.Promise!==I.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let e=i.current;for(;e.parent;)e=e.parent;return e}static get current(){return N.zone}static get currentTask(){return R}static __load_patch(t,r,s=!1){if(I.hasOwnProperty(t)){if(!s&&a)throw Error("Already loaded patch: "+t)}else if(!e["__Zone_disable_"+t]){const s="Zone:"+t;n(s),I[t]=r(e,i,M),o(s,s)}}get parent(){return this._parent}get name(){return this._name}constructor(e,t){this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new l(this,this._parent&&this._parent._zoneDelegate,t)}get(e){const t=this.getZoneWith(e);if(t)return t._properties[e]}getZoneWith(e){let t=this;for(;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null}fork(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)}wrap(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);const n=this._zoneDelegate.intercept(this,e,t),o=this;return function(){return o.runGuarded(n,this,arguments,t)}}run(e,t,n,o){N={parent:N,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,o)}finally{N=N.parent}}runGuarded(e,t=null,n,o){N={parent:N,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,o)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{N=N.parent}}runTask(e,t,n){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||T).name+"; Execution: "+this.name+")");if(e.state===k&&(e.type===D||e.type===Z))return;const o=e.state!=S;o&&e._transitionTo(S,v),e.runCount++;const r=R;R=e,N={parent:N,zone:this};try{e.type==Z&&e.data&&!e.data.isPeriodic&&(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,e,t,n)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{e.state!==k&&e.state!==w&&(e.type==D||e.data&&e.data.isPeriodic?o&&e._transitionTo(v,S):(e.runCount=0,this._updateTaskCount(e,-1),o&&e._transitionTo(k,S,k))),N=N.parent,R=r}}scheduleTask(e){if(e.zone&&e.zone!==this){let t=this;for(;t;){if(t===e.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${e.zone.name}`);t=t.parent}}e._transitionTo(b,k);const t=[];e._zoneDelegates=t,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(t){throw e._transitionTo(w,b,k),this._zoneDelegate.handleError(this,t),t}return e._zoneDelegates===t&&this._updateTaskCount(e,1),e.state==b&&e._transitionTo(v,b),e}scheduleMicroTask(e,t,n,o){return this.scheduleTask(new h(P,e,t,n,o,void 0))}scheduleMacroTask(e,t,n,o,r){return this.scheduleTask(new h(Z,e,t,n,o,r))}scheduleEventTask(e,t,n,o,r){return this.scheduleTask(new h(D,e,t,n,o,r))}cancelTask(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||T).name+"; Execution: "+this.name+")");if(e.state===v||e.state===S){e._transitionTo(O,v,S);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(w,O),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(k,O),e.runCount=0,e}}_updateTaskCount(e,t){const n=e._zoneDelegates;-1==t&&(e._zoneDelegates=null);for(let o=0;o<n.length;o++)n[o]._updateTaskCount(e.type,t)}}const c={name:"",onHasTask:(e,t,n,o)=>e.hasTask(n,o),onScheduleTask:(e,t,n,o)=>e.scheduleTask(n,o),onInvokeTask:(e,t,n,o,r,s)=>e.invokeTask(n,o,r,s),onCancelTask:(e,t,n,o)=>e.cancelTask(n,o)};class l{constructor(e,t,n){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=e,this._parentDelegate=t,this._forkZS=n&&(n&&n.onFork?n:t._forkZS),this._forkDlgt=n&&(n.onFork?t:t._forkDlgt),this._forkCurrZone=n&&(n.onFork?this.zone:t._forkCurrZone),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this.zone:t._interceptCurrZone),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this.zone:t._invokeCurrZone),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this.zone:t._handleErrorCurrZone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this.zone:t._scheduleTaskCurrZone),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this.zone:t._invokeTaskCurrZone),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this.zone:t._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const o=n&&n.onHasTask;(o||t&&t._hasTaskZS)&&(this._hasTaskZS=o?n:c,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=e,n.onScheduleTask||(this._scheduleTaskZS=c,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this.zone),n.onInvokeTask||(this._invokeTaskZS=c,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this.zone),n.onCancelTask||(this._cancelTaskZS=c,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this.zone))}fork(e,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,t):new i(e,t)}intercept(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,e,t,n):t}invoke(e,t,n,o,r){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,e,t,n,o,r):t.apply(n,o)}handleError(e,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,e,t)}scheduleTask(e,t){let n=t;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,e,t),n||(n=t);else if(t.scheduleFn)t.scheduleFn(t);else{if(t.type!=P)throw new Error("Task is missing scheduleFn.");g(t)}return n}invokeTask(e,t,n,o){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,e,t,n,o):t.callback.apply(n,o)}cancelTask(e,t){let n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,e,t);else{if(!t.cancelFn)throw Error("Task is not cancelable");n=t.cancelFn(t)}return n}hasTask(e,t){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,e,t)}catch(t){this.handleError(e,t)}}_updateTaskCount(e,t){const n=this._taskCounts,o=n[e],r=n[e]=o+t;if(r<0)throw new Error("More tasks executed then were scheduled.");0!=o&&0!=r||this.hasTask(this.zone,{microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e})}}class h{constructor(t,n,o,r,s,a){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=t,this.source=n,this.data=r,this.scheduleFn=s,this.cancelFn=a,!o)throw new Error("callback is not defined");this.callback=o;const i=this;this.invoke=t===D&&r&&r.useG?h.invokeTask:function(){return h.invokeTask.call(e,i,this,arguments)}}static invokeTask(e,t,n){e||(e=this),z++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{1==z&&E(),z--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(k,b)}_transitionTo(e,t,n){if(this._state!==t&&this._state!==n)throw new Error(`${this.type} '${this.source}': can not transition to '${e}', expecting state '${t}'${n?" or '"+n+"'":""}, was '${this._state}'.`);this._state=e,e==k&&(this._zoneDelegates=null)}toString(){return this.data&&void 0!==this.data.handleId?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}const u=s("setTimeout"),p=s("Promise"),f=s("then");let d,_=[],m=!1;function y(t){if(d||e[p]&&(d=e[p].resolve(0)),d){let e=d[f];e||(e=d.then),e.call(d,t)}else e[u](t,0)}function g(e){0===z&&0===_.length&&y(E),e&&_.push(e)}function E(){if(!m){for(m=!0;_.length;){const e=_;_=[];for(let t=0;t<e.length;t++){const n=e[t];try{n.zone.runTask(n,null,null)}catch(e){M.onUnhandledError(e)}}}M.microtaskDrainDone(),m=!1}}const T={name:"NO ZONE"},k="notScheduled",b="scheduling",v="scheduled",S="running",O="canceling",w="unknown",P="microTask",Z="macroTask",D="eventTask",I={},M={symbol:s,currentZoneFrame:()=>N,onUnhandledError:C,microtaskDrainDone:C,scheduleMicroTask:g,showUncaughtError:()=>!i[s("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:C,patchMethod:()=>C,bindArguments:()=>[],patchThen:()=>C,patchMacroTask:()=>C,patchEventPrototype:()=>C,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>C,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>C,wrapWithCurrentZone:()=>C,filterProperties:()=>[],attachOriginToPatched:()=>C,_redefineProperty:()=>C,patchCallbacks:()=>C,nativeScheduleMicroTask:y};let N={parent:null,zone:new i(null,null)},R=null,z=0;function C(){}o("Zone","Zone"),e.Zone=i}(globalThis);const ObjectGetOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,ObjectDefineProperty=Object.defineProperty,ObjectGetPrototypeOf=Object.getPrototypeOf,ObjectCreate=Object.create,ArraySlice=Array.prototype.slice,ADD_EVENT_LISTENER_STR="addEventListener",REMOVE_EVENT_LISTENER_STR="removeEventListener",ZONE_SYMBOL_ADD_EVENT_LISTENER=Zone.__symbol__("addEventListener"),ZONE_SYMBOL_REMOVE_EVENT_LISTENER=Zone.__symbol__("removeEventListener"),TRUE_STR="true",FALSE_STR="false",ZONE_SYMBOL_PREFIX=Zone.__symbol__("");function wrapWithCurrentZone(e,t){return Zone.current.wrap(e,t)}function scheduleMacroTaskWithCurrentZone(e,t,n,o,r){return Zone.current.scheduleMacroTask(e,t,n,o,r)}const zoneSymbol=Zone.__symbol__,isWindowExists="undefined"!=typeof window,internalWindow=isWindowExists?window:void 0,_global=isWindowExists&&internalWindow||globalThis,REMOVE_ATTRIBUTE="removeAttribute";function bindArguments(e,t){for(let n=e.length-1;n>=0;n--)"function"==typeof e[n]&&(e[n]=wrapWithCurrentZone(e[n],t+"_"+n));return e}function patchPrototype(e,t){const n=e.constructor.name;for(let o=0;o<t.length;o++){const r=t[o],s=e[r];if(s){if(!isPropertyWritable(ObjectGetOwnPropertyDescriptor(e,r)))continue;e[r]=(e=>{const t=function(){return e.apply(this,bindArguments(arguments,n+"."+r))};return attachOriginToPatched(t,e),t})(s)}}}function isPropertyWritable(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&void 0===e.set)}const isWebWorker="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,isNode=!("nw"in _global)&&void 0!==_global.process&&"[object process]"==={}.toString.call(_global.process),isBrowser=!isNode&&!isWebWorker&&!(!isWindowExists||!internalWindow.HTMLElement),isMix=void 0!==_global.process&&"[object process]"==={}.toString.call(_global.process)&&!isWebWorker&&!(!isWindowExists||!internalWindow.HTMLElement),zoneSymbolEventNames$1={},wrapFn=function(e){if(!(e=e||_global.event))return;let t=zoneSymbolEventNames$1[e.type];t||(t=zoneSymbolEventNames$1[e.type]=zoneSymbol("ON_PROPERTY"+e.type));const n=this||e.target||_global,o=n[t];let r;return isBrowser&&n===internalWindow&&"error"===e.type?(r=o&&o.call(this,e.message,e.filename,e.lineno,e.colno,e.error),!0===r&&e.preventDefault()):(r=o&&o.apply(this,arguments),null==r||r||e.preventDefault()),r};function patchProperty(e,t,n){let o=ObjectGetOwnPropertyDescriptor(e,t);if(!o&&n&&ObjectGetOwnPropertyDescriptor(n,t)&&(o={enumerable:!0,configurable:!0}),!o||!o.configurable)return;const r=zoneSymbol("on"+t+"patched");if(e.hasOwnProperty(r)&&e[r])return;delete o.writable,delete o.value;const s=o.get,a=o.set,i=t.slice(2);let c=zoneSymbolEventNames$1[i];c||(c=zoneSymbolEventNames$1[i]=zoneSymbol("ON_PROPERTY"+i)),o.set=function(t){let n=this;n||e!==_global||(n=_global),n&&("function"==typeof n[c]&&n.removeEventListener(i,wrapFn),a&&a.call(n,null),n[c]=t,"function"==typeof t&&n.addEventListener(i,wrapFn,!1))},o.get=function(){let n=this;if(n||e!==_global||(n=_global),!n)return null;const r=n[c];if(r)return r;if(s){let e=s.call(this);if(e)return o.set.call(this,e),"function"==typeof n[REMOVE_ATTRIBUTE]&&n.removeAttribute(t),e}return null},ObjectDefineProperty(e,t,o),e[r]=!0}function patchOnProperties(e,t,n){if(t)for(let o=0;o<t.length;o++)patchProperty(e,"on"+t[o],n);else{const t=[];for(const n in e)"on"==n.slice(0,2)&&t.push(n);for(let o=0;o<t.length;o++)patchProperty(e,t[o],n)}}const originalInstanceKey=zoneSymbol("originalInstance");function patchClass(e){const t=_global[e];if(!t)return;_global[zoneSymbol(e)]=t,_global[e]=function(){const n=bindArguments(arguments,e);switch(n.length){case 0:this[originalInstanceKey]=new t;break;case 1:this[originalInstanceKey]=new t(n[0]);break;case 2:this[originalInstanceKey]=new t(n[0],n[1]);break;case 3:this[originalInstanceKey]=new t(n[0],n[1],n[2]);break;case 4:this[originalInstanceKey]=new t(n[0],n[1],n[2],n[3]);break;default:throw new Error("Arg list too long.")}},attachOriginToPatched(_global[e],t);const n=new t((function(){}));let o;for(o in n)"XMLHttpRequest"===e&&"responseBlob"===o||function(t){"function"==typeof n[t]?_global[e].prototype[t]=function(){return this[originalInstanceKey][t].apply(this[originalInstanceKey],arguments)}:ObjectDefineProperty(_global[e].prototype,t,{set:function(n){"function"==typeof n?(this[originalInstanceKey][t]=wrapWithCurrentZone(n,e+"."+t),attachOriginToPatched(this[originalInstanceKey][t],n)):this[originalInstanceKey][t]=n},get:function(){return this[originalInstanceKey][t]}})}(o);for(o in t)"prototype"!==o&&t.hasOwnProperty(o)&&(_global[e][o]=t[o])}function copySymbolProperties(e,t){"function"==typeof Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach((n=>{const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,{get:function(){return e[n]},set:function(t){(!o||o.writable&&"function"==typeof o.set)&&(e[n]=t)},enumerable:!o||o.enumerable,configurable:!o||o.configurable})}))}let shouldCopySymbolProperties=!1;function setShouldCopySymbolProperties(e){shouldCopySymbolProperties=e}function patchMethod(e,t,n){let o=e;for(;o&&!o.hasOwnProperty(t);)o=ObjectGetPrototypeOf(o);!o&&e[t]&&(o=e);const r=zoneSymbol(t);let s=null;if(o&&(!(s=o[r])||!o.hasOwnProperty(r))&&(s=o[r]=o[t],isPropertyWritable(o&&ObjectGetOwnPropertyDescriptor(o,t)))){const e=n(s,r,t);o[t]=function(){return e(this,arguments)},attachOriginToPatched(o[t],s),shouldCopySymbolProperties&&copySymbolProperties(s,o[t])}return s}function patchMacroTask(e,t,n){let o=null;function r(e){const t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},o.apply(t.target,t.args),e}o=patchMethod(e,t,(e=>function(t,o){const s=n(t,o);return s.cbIdx>=0&&"function"==typeof o[s.cbIdx]?scheduleMacroTaskWithCurrentZone(s.name,o[s.cbIdx],s,r):e.apply(t,o)}))}function patchMicroTask(e,t,n){let o=null;function r(e){const t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},o.apply(t.target,t.args),e}o=patchMethod(e,t,(e=>function(t,o){const s=n(t,o);return s.cbIdx>=0&&"function"==typeof o[s.cbIdx]?Zone.current.scheduleMicroTask(s.name,o[s.cbIdx],s,r):e.apply(t,o)}))}function attachOriginToPatched(e,t){e[zoneSymbol("OriginalDelegate")]=t}let isDetectedIEOrEdge=!1,ieOrEdge=!1;function isIE(){try{const e=internalWindow.navigator.userAgent;if(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/"))return!0}catch(e){}return!1}function isIEOrEdge(){if(isDetectedIEOrEdge)return ieOrEdge;isDetectedIEOrEdge=!0;try{const e=internalWindow.navigator.userAgent;-1===e.indexOf("MSIE ")&&-1===e.indexOf("Trident/")&&-1===e.indexOf("Edge/")||(ieOrEdge=!0)}catch(e){}return ieOrEdge}Zone.__load_patch("ZoneAwarePromise",((e,t,n)=>{const o=Object.getOwnPropertyDescriptor,r=Object.defineProperty,s=n.symbol,a=[],i=!1!==e[s("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],c=s("Promise"),l=s("then"),h="__creationTrace__";n.onUnhandledError=e=>{if(n.showUncaughtError()){const t=e&&e.rejection;t?console.error("Unhandled Promise rejection:",t instanceof Error?t.message:t,"; Zone:",e.zone.name,"; Task:",e.task&&e.task.source,"; Value:",t,t instanceof Error?t.stack:void 0):console.error(e)}},n.microtaskDrainDone=()=>{for(;a.length;){const e=a.shift();try{e.zone.runGuarded((()=>{if(e.throwOriginal)throw e.rejection;throw e}))}catch(e){p(e)}}};const u=s("unhandledPromiseRejectionHandler");function p(e){n.onUnhandledError(e);try{const n=t[u];"function"==typeof n&&n.call(this,e)}catch(e){}}function f(e){return e&&e.then}function d(e){return e}function _(e){return j.reject(e)}const m=s("state"),y=s("value"),g=s("finally"),E=s("parentPromiseValue"),T=s("parentPromiseState"),k="Promise.then",b=null,v=!0,S=!1,O=0;function w(e,t){return n=>{try{I(e,t,n)}catch(t){I(e,!1,t)}}}const P=function(){let e=!1;return function t(n){return function(){e||(e=!0,n.apply(null,arguments))}}},Z="Promise resolved with itself",D=s("currentTaskTrace");function I(e,o,s){const c=P();if(e===s)throw new TypeError(Z);if(e[m]===b){let l=null;try{"object"!=typeof s&&"function"!=typeof s||(l=s&&s.then)}catch(t){return c((()=>{I(e,!1,t)}))(),e}if(o!==S&&s instanceof j&&s.hasOwnProperty(m)&&s.hasOwnProperty(y)&&s[m]!==b)N(s),I(e,s[m],s[y]);else if(o!==S&&"function"==typeof l)try{l.call(s,c(w(e,o)),c(w(e,!1)))}catch(t){c((()=>{I(e,!1,t)}))()}else{e[m]=o;const c=e[y];if(e[y]=s,e[g]===g&&o===v&&(e[m]=e[T],e[y]=e[E]),o===S&&s instanceof Error){const e=t.currentTask&&t.currentTask.data&&t.currentTask.data[h];e&&r(s,D,{configurable:!0,enumerable:!1,writable:!0,value:e})}for(let t=0;t<c.length;)R(e,c[t++],c[t++],c[t++],c[t++]);if(0==c.length&&o==S){e[m]=O;let o=s;try{throw new Error("Uncaught (in promise): "+function e(t){return t&&t.toString===Object.prototype.toString?(t.constructor&&t.constructor.name||"")+": "+JSON.stringify(t):t?t.toString():Object.prototype.toString.call(t)}(s)+(s&&s.stack?"\n"+s.stack:""))}catch(e){o=e}i&&(o.throwOriginal=!0),o.rejection=s,o.promise=e,o.zone=t.current,o.task=t.currentTask,a.push(o),n.scheduleMicroTask()}}}return e}const M=s("rejectionHandledHandler");function N(e){if(e[m]===O){try{const n=t[M];n&&"function"==typeof n&&n.call(this,{rejection:e[y],promise:e})}catch(e){}e[m]=S;for(let t=0;t<a.length;t++)e===a[t].promise&&a.splice(t,1)}}function R(e,t,n,o,r){N(e);const s=e[m],a=s?"function"==typeof o?o:d:"function"==typeof r?r:_;t.scheduleMicroTask(k,(()=>{try{const o=e[y],r=!!n&&g===n[g];r&&(n[E]=o,n[T]=s);const i=t.run(a,void 0,r&&a!==_&&a!==d?[]:[o]);I(n,!0,i)}catch(e){I(n,!1,e)}}),n)}const z=function(){},C=e.AggregateError;class j{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(e){return e instanceof j?e:I(new this(null),v,e)}static reject(e){return I(new this(null),S,e)}static withResolvers(){const e={};return e.promise=new j(((t,n)=>{e.resolve=t,e.reject=n})),e}static any(e){if(!e||"function"!=typeof e[Symbol.iterator])return Promise.reject(new C([],"All promises were rejected"));const t=[];let n=0;try{for(let o of e)n++,t.push(j.resolve(o))}catch(e){return Promise.reject(new C([],"All promises were rejected"))}if(0===n)return Promise.reject(new C([],"All promises were rejected"));let o=!1;const r=[];return new j(((e,s)=>{for(let a=0;a<t.length;a++)t[a].then((t=>{o||(o=!0,e(t))}),(e=>{r.push(e),n--,0===n&&(o=!0,s(new C(r,"All promises were rejected")))}))}))}static race(e){let t,n,o=new this(((e,o)=>{t=e,n=o}));function r(e){t(e)}function s(e){n(e)}for(let t of e)f(t)||(t=this.resolve(t)),t.then(r,s);return o}static all(e){return j.allWithCallback(e)}static allSettled(e){return(this&&this.prototype instanceof j?this:j).allWithCallback(e,{thenCallback:e=>({status:"fulfilled",value:e}),errorCallback:e=>({status:"rejected",reason:e})})}static allWithCallback(e,t){let n,o,r=new this(((e,t)=>{n=e,o=t})),s=2,a=0;const i=[];for(let r of e){f(r)||(r=this.resolve(r));const e=a;try{r.then((o=>{i[e]=t?t.thenCallback(o):o,s--,0===s&&n(i)}),(r=>{t?(i[e]=t.errorCallback(r),s--,0===s&&n(i)):o(r)}))}catch(e){o(e)}s++,a++}return s-=2,0===s&&n(i),r}constructor(e){const t=this;if(!(t instanceof j))throw new Error("Must be an instanceof Promise.");t[m]=b,t[y]=[];try{const n=P();e&&e(n(w(t,v)),n(w(t,S)))}catch(e){I(t,!1,e)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return j}then(e,n){let o=this.constructor?.[Symbol.species];o&&"function"==typeof o||(o=this.constructor||j);const r=new o(z),s=t.current;return this[m]==b?this[y].push(s,r,e,n):R(this,s,r,e,n),r}catch(e){return this.then(null,e)}finally(e){let n=this.constructor?.[Symbol.species];n&&"function"==typeof n||(n=j);const o=new n(z);o[g]=g;const r=t.current;return this[m]==b?this[y].push(r,o,e,e):R(this,r,o,e,e),o}}j.resolve=j.resolve,j.reject=j.reject,j.race=j.race,j.all=j.all;const L=e[c]=e.Promise;e.Promise=j;const A=s("thenPatched");function F(e){const t=e.prototype,n=o(t,"then");if(n&&(!1===n.writable||!n.configurable))return;const r=t.then;t[l]=r,e.prototype.then=function(e,t){return new j(((e,t)=>{r.call(this,e,t)})).then(e,t)},e[A]=!0}return n.patchThen=F,L&&(F(L),patchMethod(e,"fetch",(e=>function t(e){return function(t,n){let o=e.apply(t,n);if(o instanceof j)return o;let r=o.constructor;return r[A]||F(r),o}}(e)))),Promise[t.__symbol__("uncaughtPromiseErrors")]=a,j})),Zone.__load_patch("toString",(e=>{const t=Function.prototype.toString,n=zoneSymbol("OriginalDelegate"),o=zoneSymbol("Promise"),r=zoneSymbol("Error"),s=function s(){if("function"==typeof this){const s=this[n];if(s)return"function"==typeof s?t.call(s):Object.prototype.toString.call(s);if(this===Promise){const n=e[o];if(n)return t.call(n)}if(this===Error){const n=e[r];if(n)return t.call(n)}}return t.call(this)};s[n]=t,Function.prototype.toString=s;const a=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":a.call(this)}}));let passiveSupported=!1;if("undefined"!=typeof window)try{const e=Object.defineProperty({},"passive",{get:function(){passiveSupported=!0}});window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){passiveSupported=!1}const OPTIMIZED_ZONE_EVENT_TASK_DATA={useG:!0},zoneSymbolEventNames={},globalSources={},EVENT_NAME_SYMBOL_REGX=new RegExp("^"+ZONE_SYMBOL_PREFIX+"(\\w+)(true|false)$"),IMMEDIATE_PROPAGATION_SYMBOL=zoneSymbol("propagationStopped");function prepareEventNames(e,t){const n=(t?t(e):e)+FALSE_STR,o=(t?t(e):e)+TRUE_STR,r=ZONE_SYMBOL_PREFIX+n,s=ZONE_SYMBOL_PREFIX+o;zoneSymbolEventNames[e]={},zoneSymbolEventNames[e][FALSE_STR]=r,zoneSymbolEventNames[e][TRUE_STR]=s}function patchEventTarget(e,t,n,o){const r=o&&o.add||"addEventListener",s=o&&o.rm||"removeEventListener",a=o&&o.listeners||"eventListeners",i=o&&o.rmAll||"removeAllListeners",c=zoneSymbol(r),l="."+r+":",h="prependListener",u="."+h+":",p=function(e,t,n){if(e.isRemoved)return;const o=e.callback;let r;"object"==typeof o&&o.handleEvent&&(e.callback=e=>o.handleEvent(e),e.originalDelegate=o);try{e.invoke(e,t,[n])}catch(e){r=e}const a=e.options;return a&&"object"==typeof a&&a.once&&t[s].call(t,n.type,e.originalDelegate?e.originalDelegate:e.callback,a),r};function f(n,o,r){if(!(o=o||e.event))return;const s=n||o.target||e,a=s[zoneSymbolEventNames[o.type][r?TRUE_STR:FALSE_STR]];if(a){const e=[];if(1===a.length){const t=p(a[0],s,o);t&&e.push(t)}else{const t=a.slice();for(let n=0;n<t.length&&(!o||!0!==o[IMMEDIATE_PROPAGATION_SYMBOL]);n++){const r=p(t[n],s,o);r&&e.push(r)}}if(1===e.length)throw e[0];for(let n=0;n<e.length;n++){const o=e[n];t.nativeScheduleMicroTask((()=>{throw o}))}}}const d=function(e){return f(this,e,!1)},_=function(e){return f(this,e,!0)};function m(t,n){if(!t)return!1;let o=!0;n&&void 0!==n.useG&&(o=n.useG);const p=n&&n.vh;let f=!0;n&&void 0!==n.chkDup&&(f=n.chkDup);let m=!1;n&&void 0!==n.rt&&(m=n.rt);let y=t;for(;y&&!y.hasOwnProperty(r);)y=ObjectGetPrototypeOf(y);if(!y&&t[r]&&(y=t),!y)return!1;if(y[c])return!1;const g=n&&n.eventNameToString,E={},T=y[c]=y[r],k=y[zoneSymbol(s)]=y[s],b=y[zoneSymbol(a)]=y[a],v=y[zoneSymbol(i)]=y[i];let S;n&&n.prepend&&(S=y[zoneSymbol(n.prepend)]=y[n.prepend]);const O=o?function(e){if(!E.isExisting)return T.call(E.target,E.eventName,E.capture?_:d,E.options)}:function(e){return T.call(E.target,E.eventName,e.invoke,E.options)},w=o?function(e){if(!e.isRemoved){const t=zoneSymbolEventNames[e.eventName];let n;t&&(n=t[e.capture?TRUE_STR:FALSE_STR]);const o=n&&e.target[n];if(o)for(let t=0;t<o.length;t++)if(o[t]===e){o.splice(t,1),e.isRemoved=!0,0===o.length&&(e.allRemoved=!0,e.target[n]=null);break}}if(e.allRemoved)return k.call(e.target,e.eventName,e.capture?_:d,e.options)}:function(e){return k.call(e.target,e.eventName,e.invoke,e.options)},P=n&&n.diff?n.diff:function(e,t){const n=typeof t;return"function"===n&&e.callback===t||"object"===n&&e.originalDelegate===t},Z=Zone[zoneSymbol("UNPATCHED_EVENTS")],D=e[zoneSymbol("PASSIVE_EVENTS")],I=function(t,r,s,a,i=!1,c=!1){return function(){const l=this||e;let h=arguments[0];n&&n.transferEventName&&(h=n.transferEventName(h));let u=arguments[1];if(!u)return t.apply(this,arguments);if(isNode&&"uncaughtException"===h)return t.apply(this,arguments);let d=!1;if("function"!=typeof u){if(!u.handleEvent)return t.apply(this,arguments);d=!0}if(p&&!p(t,u,l,arguments))return;const _=passiveSupported&&!!D&&-1!==D.indexOf(h),m=function y(e,t){return!passiveSupported&&"object"==typeof e&&e?!!e.capture:passiveSupported&&t?"boolean"==typeof e?{capture:e,passive:!0}:e?"object"==typeof e&&!1!==e.passive?{...e,passive:!0}:e:{passive:!0}:e}(arguments[2],_),T=m&&"object"==typeof m&&m.signal&&"object"==typeof m.signal?m.signal:void 0;if(T?.aborted)return;if(Z)for(let e=0;e<Z.length;e++)if(h===Z[e])return _?t.call(l,h,u,m):t.apply(this,arguments);const k=!!m&&("boolean"==typeof m||m.capture),b=!(!m||"object"!=typeof m)&&m.once,v=Zone.current;let S=zoneSymbolEventNames[h];S||(prepareEventNames(h,g),S=zoneSymbolEventNames[h]);const O=S[k?TRUE_STR:FALSE_STR];let w,I=l[O],M=!1;if(I){if(M=!0,f)for(let e=0;e<I.length;e++)if(P(I[e],u))return}else I=l[O]=[];const N=l.constructor.name,R=globalSources[N];R&&(w=R[h]),w||(w=N+r+(g?g(h):h)),E.options=m,b&&(E.options.once=!1),E.target=l,E.capture=k,E.eventName=h,E.isExisting=M;const z=o?OPTIMIZED_ZONE_EVENT_TASK_DATA:void 0;z&&(z.taskData=E),T&&(E.options.signal=void 0);const C=v.scheduleEventTask(w,u,z,s,a);return T&&(E.options.signal=T,t.call(T,"abort",(()=>{C.zone.cancelTask(C)}),{once:!0})),E.target=null,z&&(z.taskData=null),b&&(m.once=!0),(passiveSupported||"boolean"!=typeof C.options)&&(C.options=m),C.target=l,C.capture=k,C.eventName=h,d&&(C.originalDelegate=u),c?I.unshift(C):I.push(C),i?l:void 0}};return y[r]=I(T,l,O,w,m),S&&(y[h]=I(S,u,(function(e){return S.call(E.target,E.eventName,e.invoke,E.options)}),w,m,!0)),y[s]=function(){const t=this||e;let o=arguments[0];n&&n.transferEventName&&(o=n.transferEventName(o));const r=arguments[2],s=!!r&&("boolean"==typeof r||r.capture),a=arguments[1];if(!a)return k.apply(this,arguments);if(p&&!p(k,a,t,arguments))return;const i=zoneSymbolEventNames[o];let c;i&&(c=i[s?TRUE_STR:FALSE_STR]);const l=c&&t[c];if(l)for(let e=0;e<l.length;e++){const n=l[e];if(P(n,a))return l.splice(e,1),n.isRemoved=!0,0===l.length&&(n.allRemoved=!0,t[c]=null,"string"==typeof o)&&(t[ZONE_SYMBOL_PREFIX+"ON_PROPERTY"+o]=null),n.zone.cancelTask(n),m?t:void 0}return k.apply(this,arguments)},y[a]=function(){const t=this||e;let o=arguments[0];n&&n.transferEventName&&(o=n.transferEventName(o));const r=[],s=findEventTasks(t,g?g(o):o);for(let e=0;e<s.length;e++){const t=s[e];r.push(t.originalDelegate?t.originalDelegate:t.callback)}return r},y[i]=function(){const t=this||e;let o=arguments[0];if(o){n&&n.transferEventName&&(o=n.transferEventName(o));const e=zoneSymbolEventNames[o];if(e){const n=t[e[FALSE_STR]],r=t[e[TRUE_STR]];if(n){const e=n.slice();for(let t=0;t<e.length;t++){const n=e[t];this[s].call(this,o,n.originalDelegate?n.originalDelegate:n.callback,n.options)}}if(r){const e=r.slice();for(let t=0;t<e.length;t++){const n=e[t];this[s].call(this,o,n.originalDelegate?n.originalDelegate:n.callback,n.options)}}}}else{const e=Object.keys(t);for(let t=0;t<e.length;t++){const n=EVENT_NAME_SYMBOL_REGX.exec(e[t]);let o=n&&n[1];o&&"removeListener"!==o&&this[i].call(this,o)}this[i].call(this,"removeListener")}if(m)return this},attachOriginToPatched(y[r],T),attachOriginToPatched(y[s],k),v&&attachOriginToPatched(y[i],v),b&&attachOriginToPatched(y[a],b),!0}let y=[];for(let e=0;e<n.length;e++)y[e]=m(n[e],o);return y}function findEventTasks(e,t){if(!t){const n=[];for(let o in e){const r=EVENT_NAME_SYMBOL_REGX.exec(o);let s=r&&r[1];if(s&&(!t||s===t)){const t=e[o];if(t)for(let e=0;e<t.length;e++)n.push(t[e])}}return n}let n=zoneSymbolEventNames[t];n||(prepareEventNames(t),n=zoneSymbolEventNames[t]);const o=e[n[FALSE_STR]],r=e[n[TRUE_STR]];return o?r?o.concat(r):o.slice():r?r.slice():[]}function patchEventPrototype(e,t){const n=e.Event;n&&n.prototype&&t.patchMethod(n.prototype,"stopImmediatePropagation",(e=>function(t,n){t[IMMEDIATE_PROPAGATION_SYMBOL]=!0,e&&e.apply(t,n)}))}function patchCallbacks(e,t,n,o,r){const s=Zone.__symbol__(o);if(t[s])return;const a=t[s]=t[o];t[o]=function(s,i,c){return i&&i.prototype&&r.forEach((function(t){const r=`${n}.${o}::`+t,s=i.prototype;try{if(s.hasOwnProperty(t)){const n=e.ObjectGetOwnPropertyDescriptor(s,t);n&&n.value?(n.value=e.wrapWithCurrentZone(n.value,r),e._redefineProperty(i.prototype,t,n)):s[t]&&(s[t]=e.wrapWithCurrentZone(s[t],r))}else s[t]&&(s[t]=e.wrapWithCurrentZone(s[t],r))}catch{}})),a.call(t,s,i,c)},e.attachOriginToPatched(t[o],a)}function filterProperties(e,t,n){if(!n||0===n.length)return t;const o=n.filter((t=>t.target===e));if(!o||0===o.length)return t;const r=o[0].ignoreProperties;return t.filter((e=>-1===r.indexOf(e)))}function patchFilteredProperties(e,t,n,o){e&&patchOnProperties(e,filterProperties(e,t,n),o)}function getOnEventNames(e){return Object.getOwnPropertyNames(e).filter((e=>e.startsWith("on")&&e.length>2)).map((e=>e.substring(2)))}function propertyDescriptorPatch(e,t){if(isNode&&!isMix)return;if(Zone[e.symbol("patchEvents")])return;const n=t.__Zone_ignore_on_properties;let o=[];if(isBrowser){const e=window;o=o.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);const t=isIE()?[{target:e,ignoreProperties:["error"]}]:[];patchFilteredProperties(e,getOnEventNames(e),n?n.concat(t):n,ObjectGetPrototypeOf(e))}o=o.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(let e=0;e<o.length;e++){const r=t[o[e]];r&&r.prototype&&patchFilteredProperties(r.prototype,getOnEventNames(r.prototype),n)}}function patchQueueMicrotask(e,t){t.patchMethod(e,"queueMicrotask",(e=>function(e,t){Zone.current.scheduleMicroTask("queueMicrotask",t[0])}))}Zone.__load_patch("util",((e,t,n)=>{const o=getOnEventNames(e);n.patchOnProperties=patchOnProperties,n.patchMethod=patchMethod,n.bindArguments=bindArguments,n.patchMacroTask=patchMacroTask;const r=t.__symbol__("BLACK_LISTED_EVENTS"),s=t.__symbol__("UNPATCHED_EVENTS");e[s]&&(e[r]=e[s]),e[r]&&(t[r]=t[s]=e[r]),n.patchEventPrototype=patchEventPrototype,n.patchEventTarget=patchEventTarget,n.isIEOrEdge=isIEOrEdge,n.ObjectDefineProperty=ObjectDefineProperty,n.ObjectGetOwnPropertyDescriptor=ObjectGetOwnPropertyDescriptor,n.ObjectCreate=ObjectCreate,n.ArraySlice=ArraySlice,n.patchClass=patchClass,n.wrapWithCurrentZone=wrapWithCurrentZone,n.filterProperties=filterProperties,n.attachOriginToPatched=attachOriginToPatched,n._redefineProperty=Object.defineProperty,n.patchCallbacks=patchCallbacks,n.getGlobalObjects=()=>({globalSources:globalSources,zoneSymbolEventNames:zoneSymbolEventNames,eventNames:o,isBrowser:isBrowser,isMix:isMix,isNode:isNode,TRUE_STR:TRUE_STR,FALSE_STR:FALSE_STR,ZONE_SYMBOL_PREFIX:ZONE_SYMBOL_PREFIX,ADD_EVENT_LISTENER_STR:"addEventListener",REMOVE_EVENT_LISTENER_STR:"removeEventListener"})}));const taskSymbol=zoneSymbol("zoneTask");function patchTimer(e,t,n,o){let r=null,s=null;n+=o;const a={};function i(t){const n=t.data;return n.args[0]=function(){return t.invoke.apply(this,arguments)},n.handleId=r.apply(e,n.args),t}function c(t){return s.call(e,t.data.handleId)}r=patchMethod(e,t+=o,(n=>function(r,s){if("function"==typeof s[0]){const e={isPeriodic:"Interval"===o,delay:"Timeout"===o||"Interval"===o?s[1]||0:void 0,args:s},n=s[0];s[0]=function t(){try{return n.apply(this,arguments)}finally{e.isPeriodic||("number"==typeof e.handleId?delete a[e.handleId]:e.handleId&&(e.handleId[taskSymbol]=null))}};const r=scheduleMacroTaskWithCurrentZone(t,s[0],e,i,c);if(!r)return r;const l=r.data.handleId;return"number"==typeof l?a[l]=r:l&&(l[taskSymbol]=r),l&&l.ref&&l.unref&&"function"==typeof l.ref&&"function"==typeof l.unref&&(r.ref=l.ref.bind(l),r.unref=l.unref.bind(l)),"number"==typeof l||l?l:r}return n.apply(e,s)})),s=patchMethod(e,n,(t=>function(n,o){const r=o[0];let s;"number"==typeof r?s=a[r]:(s=r&&r[taskSymbol],s||(s=r)),s&&"string"==typeof s.type?"notScheduled"!==s.state&&(s.cancelFn&&s.data.isPeriodic||0===s.runCount)&&("number"==typeof r?delete a[r]:r&&(r[taskSymbol]=null),s.zone.cancelTask(s)):t.apply(e,o)}))}function patchCustomElements(e,t){const{isBrowser:n,isMix:o}=t.getGlobalObjects();(n||o)&&e.customElements&&"customElements"in e&&t.patchCallbacks(t,e.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback","formAssociatedCallback","formDisabledCallback","formResetCallback","formStateRestoreCallback"])}function eventTargetPatch(e,t){if(Zone[t.symbol("patchEventTarget")])return;const{eventNames:n,zoneSymbolEventNames:o,TRUE_STR:r,FALSE_STR:s,ZONE_SYMBOL_PREFIX:a}=t.getGlobalObjects();for(let e=0;e<n.length;e++){const t=n[e],i=a+(t+s),c=a+(t+r);o[t]={},o[t][s]=i,o[t][r]=c}const i=e.EventTarget;return i&&i.prototype?(t.patchEventTarget(e,t,[i&&i.prototype]),!0):void 0}function patchEvent(e,t){t.patchEventPrototype(e,t)}Zone.__load_patch("legacy",(e=>{const t=e[Zone.__symbol__("legacyPatch")];t&&t()})),Zone.__load_patch("timers",(e=>{const t="set",n="clear";patchTimer(e,t,n,"Timeout"),patchTimer(e,t,n,"Interval"),patchTimer(e,t,n,"Immediate")})),Zone.__load_patch("requestAnimationFrame",(e=>{patchTimer(e,"request","cancel","AnimationFrame"),patchTimer(e,"mozRequest","mozCancel","AnimationFrame"),patchTimer(e,"webkitRequest","webkitCancel","AnimationFrame")})),Zone.__load_patch("blocking",((e,t)=>{const n=["alert","prompt","confirm"];for(let o=0;o<n.length;o++)patchMethod(e,n[o],((n,o,r)=>function(o,s){return t.current.run(n,e,s,r)}))})),Zone.__load_patch("EventTarget",((e,t,n)=>{patchEvent(e,n),eventTargetPatch(e,n);const o=e.XMLHttpRequestEventTarget;o&&o.prototype&&n.patchEventTarget(e,n,[o.prototype])})),Zone.__load_patch("MutationObserver",((e,t,n)=>{patchClass("MutationObserver"),patchClass("WebKitMutationObserver")})),Zone.__load_patch("IntersectionObserver",((e,t,n)=>{patchClass("IntersectionObserver")})),Zone.__load_patch("FileReader",((e,t,n)=>{patchClass("FileReader")})),Zone.__load_patch("on_property",((e,t,n)=>{propertyDescriptorPatch(n,e)})),Zone.__load_patch("customElements",((e,t,n)=>{patchCustomElements(e,n)})),Zone.__load_patch("XHR",((e,t)=>{!function n(e){const n=e.XMLHttpRequest;if(!n)return;const l=n.prototype;let h=l[ZONE_SYMBOL_ADD_EVENT_LISTENER],u=l[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];if(!h){const t=e.XMLHttpRequestEventTarget;if(t){const e=t.prototype;h=e[ZONE_SYMBOL_ADD_EVENT_LISTENER],u=e[ZONE_SYMBOL_REMOVE_EVENT_LISTENER]}}const p="readystatechange",f="scheduled";function d(e){const n=e.data,r=n.target;r[a]=!1,r[c]=!1;const i=r[s];h||(h=r[ZONE_SYMBOL_ADD_EVENT_LISTENER],u=r[ZONE_SYMBOL_REMOVE_EVENT_LISTENER]),i&&u.call(r,p,i);const l=r[s]=()=>{if(r.readyState===r.DONE)if(!n.aborted&&r[a]&&e.state===f){const o=r[t.__symbol__("loadfalse")];if(0!==r.status&&o&&o.length>0){const s=e.invoke;e.invoke=function(){const o=r[t.__symbol__("loadfalse")];for(let t=0;t<o.length;t++)o[t]===e&&o.splice(t,1);n.aborted||e.state!==f||s.call(e)},o.push(e)}else e.invoke()}else n.aborted||!1!==r[a]||(r[c]=!0)};return h.call(r,p,l),r[o]||(r[o]=e),T.apply(r,n.args),r[a]=!0,e}function _(){}function m(e){const t=e.data;return t.aborted=!0,k.apply(t.target,t.args)}const y=patchMethod(l,"open",(()=>function(e,t){return e[r]=0==t[2],e[i]=t[1],y.apply(e,t)})),g=zoneSymbol("fetchTaskAborting"),E=zoneSymbol("fetchTaskScheduling"),T=patchMethod(l,"send",(()=>function(e,n){if(!0===t.current[E])return T.apply(e,n);if(e[r])return T.apply(e,n);{const t={target:e,url:e[i],isPeriodic:!1,args:n,aborted:!1},o=scheduleMacroTaskWithCurrentZone("XMLHttpRequest.send",_,t,d,m);e&&!0===e[c]&&!t.aborted&&o.state===f&&o.invoke()}})),k=patchMethod(l,"abort",(()=>function(e,n){const r=function s(e){return e[o]}(e);if(r&&"string"==typeof r.type){if(null==r.cancelFn||r.data&&r.data.aborted)return;r.zone.cancelTask(r)}else if(!0===t.current[g])return k.apply(e,n)}))}(e);const o=zoneSymbol("xhrTask"),r=zoneSymbol("xhrSync"),s=zoneSymbol("xhrListener"),a=zoneSymbol("xhrScheduled"),i=zoneSymbol("xhrURL"),c=zoneSymbol("xhrErrorBeforeScheduled")})),Zone.__load_patch("geolocation",(e=>{e.navigator&&e.navigator.geolocation&&patchPrototype(e.navigator.geolocation,["getCurrentPosition","watchPosition"])})),Zone.__load_patch("PromiseRejectionEvent",((e,t)=>{function n(t){return function(n){findEventTasks(e,t).forEach((o=>{const r=e.PromiseRejectionEvent;if(r){const e=new r(t,{promise:n.promise,reason:n.rejection});o.invoke(e)}}))}}e.PromiseRejectionEvent&&(t[zoneSymbol("unhandledPromiseRejectionHandler")]=n("unhandledrejection"),t[zoneSymbol("rejectionHandledHandler")]=n("rejectionhandled"))})),Zone.__load_patch("queueMicrotask",((e,t,n)=>{patchQueueMicrotask(e,n)})),Zone.__load_patch("node_util",((e,t,n)=>{n.patchOnProperties=patchOnProperties,n.patchMethod=patchMethod,n.bindArguments=bindArguments,n.patchMacroTask=patchMacroTask,setShouldCopySymbolProperties(!0)})),Zone.__load_patch("EventEmitter",((e,t,n)=>{const o="addListener",r="removeListener",s=function(e,t){return e.callback===t||e.callback.listener===t},a=function(e){return"string"==typeof e?e:e?e.toString().replace("(","_").replace(")","_"):""};let i;try{i=require("events")}catch(e){}i&&i.EventEmitter&&function c(t){const i=patchEventTarget(e,n,[t],{useG:!1,add:o,rm:r,prepend:"prependListener",rmAll:"removeAllListeners",listeners:"listeners",chkDup:!1,rt:!0,diff:s,eventNameToString:a});i&&i[0]&&(t.on=t[o],t.off=t[r])}(i.EventEmitter.prototype)})),Zone.__load_patch("fs",((e,t,n)=>{let o;try{o=require("fs")}catch(e){}if(!o)return;["access","appendFile","chmod","chown","close","exists","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","read","readdir","readFile","readlink","realpath","rename","rmdir","stat","symlink","truncate","unlink","utimes","write","writeFile"].filter((e=>!!o[e]&&"function"==typeof o[e])).forEach((e=>{patchMacroTask(o,e,((t,n)=>({name:"fs."+e,args:n,cbIdx:n.length>0?n.length-1:-1,target:t})))}));const r=o.realpath?.[n.symbol("OriginalDelegate")];r?.native&&(o.realpath.native=r.native,patchMacroTask(o.realpath,"native",((e,t)=>({args:t,target:e,cbIdx:t.length>0?t.length-1:-1,name:"fs.realpath.native"}))))}));const set="set",clear="clear";Zone.__load_patch("node_timers",((e,t)=>{let n=!1;try{const t=require("timers");if(e.setTimeout!==t.setTimeout&&!isMix){const o=t.setTimeout;t.setTimeout=function(){return n=!0,o.apply(this,arguments)};const r=e.setTimeout((()=>{}),100);clearTimeout(r),t.setTimeout=o}patchTimer(t,set,clear,"Timeout"),patchTimer(t,set,clear,"Interval"),patchTimer(t,set,clear,"Immediate")}catch(e){}isMix||(n?(e[t.__symbol__("setTimeout")]=e.setTimeout,e[t.__symbol__("setInterval")]=e.setInterval,e[t.__symbol__("setImmediate")]=e.setImmediate):(patchTimer(e,set,clear,"Timeout"),patchTimer(e,set,clear,"Interval"),patchTimer(e,set,clear,"Immediate")))})),Zone.__load_patch("nextTick",(()=>{patchMicroTask(process,"nextTick",((e,t)=>({name:"process.nextTick",args:t,cbIdx:t.length>0&&"function"==typeof t[0]?0:-1,target:process})))})),Zone.__load_patch("handleUnhandledPromiseRejection",((e,t,n)=>{function o(e){return function(t){findEventTasks(process,e).forEach((n=>{"unhandledRejection"===e?n.invoke(t.rejection,t.promise):"rejectionHandled"===e&&n.invoke(t.promise)}))}}t[n.symbol("unhandledPromiseRejectionHandler")]=o("unhandledRejection"),t[n.symbol("rejectionHandledHandler")]=o("rejectionHandled")})),Zone.__load_patch("crypto",(()=>{let e;try{e=require("crypto")}catch(e){}e&&["randomBytes","pbkdf2"].forEach((t=>{patchMacroTask(e,t,((n,o)=>({name:"crypto."+t,args:o,cbIdx:o.length>0&&"function"==typeof o[o.length-1]?o.length-1:-1,target:e})))}))})),Zone.__load_patch("console",((e,t)=>{["dir","log","info","error","warn","assert","debug","timeEnd","trace"].forEach((e=>{const n=console[t.__symbol__(e)]=console[e];n&&(console[e]=function(){const e=ArraySlice.call(arguments);return t.current===t.root?n.apply(this,e):t.root.run(n,this,e)})}))})),Zone.__load_patch("queueMicrotask",((e,t,n)=>{patchQueueMicrotask(e,n)}));
*/const global=globalThis;function __symbol__(e){return(global.__Zone_symbol_prefix||"__zone_symbol__")+e}function initZone(){const e=global.performance;function t(t){e&&e.mark&&e.mark(t)}function n(t,n){e&&e.measure&&e.measure(t,n)}t("Zone");class o{static{this.__symbol__=__symbol__}static assertZonePatched(){if(global.Promise!==w.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let e=o.current;for(;e.parent;)e=e.parent;return e}static get current(){return D.zone}static get currentTask(){return N}static __load_patch(e,r,s=!1){if(w.hasOwnProperty(e)){const t=!0===global[__symbol__("forceDuplicateZoneCheck")];if(!s&&t)throw Error("Already loaded patch: "+e)}else if(!global["__Zone_disable_"+e]){const s="Zone:"+e;t(s),w[e]=r(global,o,P),n(s,s)}}get parent(){return this._parent}get name(){return this._name}constructor(e,t){this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new s(this,this._parent&&this._parent._zoneDelegate,t)}get(e){const t=this.getZoneWith(e);if(t)return t._properties[e]}getZoneWith(e){let t=this;for(;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null}fork(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)}wrap(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);const n=this._zoneDelegate.intercept(this,e,t),o=this;return function(){return o.runGuarded(n,this,arguments,t)}}run(e,t,n,o){D={parent:D,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,o)}finally{D=D.parent}}runGuarded(e,t=null,n,o){D={parent:D,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,o)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{D=D.parent}}runTask(e,t,n){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||m).name+"; Execution: "+this.name+")");if(e.state===y&&(e.type===O||e.type===v))return;const o=e.state!=T;o&&e._transitionTo(T,E),e.runCount++;const r=N;N=e,D={parent:D,zone:this};try{e.type==v&&e.data&&!e.data.isPeriodic&&(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,e,t,n)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{e.state!==y&&e.state!==k&&(e.type==O||e.data&&e.data.isPeriodic?o&&e._transitionTo(E,T):(e.runCount=0,this._updateTaskCount(e,-1),o&&e._transitionTo(y,T,y))),D=D.parent,N=r}}scheduleTask(e){if(e.zone&&e.zone!==this){let t=this;for(;t;){if(t===e.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${e.zone.name}`);t=t.parent}}e._transitionTo(g,y);const t=[];e._zoneDelegates=t,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(t){throw e._transitionTo(k,g,y),this._zoneDelegate.handleError(this,t),t}return e._zoneDelegates===t&&this._updateTaskCount(e,1),e.state==g&&e._transitionTo(E,g),e}scheduleMicroTask(e,t,n,o){return this.scheduleTask(new a(S,e,t,n,o,void 0))}scheduleMacroTask(e,t,n,o,r){return this.scheduleTask(new a(v,e,t,n,o,r))}scheduleEventTask(e,t,n,o,r){return this.scheduleTask(new a(O,e,t,n,o,r))}cancelTask(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||m).name+"; Execution: "+this.name+")");if(e.state===E||e.state===T){e._transitionTo(b,E,T);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(k,b),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(y,b),e.runCount=0,e}}_updateTaskCount(e,t){const n=e._zoneDelegates;-1==t&&(e._zoneDelegates=null);for(let o=0;o<n.length;o++)n[o]._updateTaskCount(e.type,t)}}const r={name:"",onHasTask:(e,t,n,o)=>e.hasTask(n,o),onScheduleTask:(e,t,n,o)=>e.scheduleTask(n,o),onInvokeTask:(e,t,n,o,r,s)=>e.invokeTask(n,o,r,s),onCancelTask:(e,t,n,o)=>e.cancelTask(n,o)};class s{get zone(){return this._zone}constructor(e,t,n){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this._zone=e,this._parentDelegate=t,this._forkZS=n&&(n&&n.onFork?n:t._forkZS),this._forkDlgt=n&&(n.onFork?t:t._forkDlgt),this._forkCurrZone=n&&(n.onFork?this._zone:t._forkCurrZone),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this._zone:t._interceptCurrZone),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this._zone:t._invokeCurrZone),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this._zone:t._handleErrorCurrZone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this._zone:t._scheduleTaskCurrZone),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this._zone:t._invokeTaskCurrZone),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this._zone:t._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const o=n&&n.onHasTask;(o||t&&t._hasTaskZS)&&(this._hasTaskZS=o?n:r,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=this._zone,n.onScheduleTask||(this._scheduleTaskZS=r,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this._zone),n.onInvokeTask||(this._invokeTaskZS=r,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this._zone),n.onCancelTask||(this._cancelTaskZS=r,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this._zone))}fork(e,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,t):new o(e,t)}intercept(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,e,t,n):t}invoke(e,t,n,o,r){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,e,t,n,o,r):t.apply(n,o)}handleError(e,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,e,t)}scheduleTask(e,t){let n=t;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,e,t),n||(n=t);else if(t.scheduleFn)t.scheduleFn(t);else{if(t.type!=S)throw new Error("Task is missing scheduleFn.");_(t)}return n}invokeTask(e,t,n,o){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,e,t,n,o):t.callback.apply(n,o)}cancelTask(e,t){let n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,e,t);else{if(!t.cancelFn)throw Error("Task is not cancelable");n=t.cancelFn(t)}return n}hasTask(e,t){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,e,t)}catch(t){this.handleError(e,t)}}_updateTaskCount(e,t){const n=this._taskCounts,o=n[e],r=n[e]=o+t;if(r<0)throw new Error("More tasks executed then were scheduled.");0!=o&&0!=r||this.hasTask(this._zone,{microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e})}}class a{constructor(e,t,n,o,r,s){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=e,this.source=t,this.data=o,this.scheduleFn=r,this.cancelFn=s,!n)throw new Error("callback is not defined");this.callback=n;const i=this;this.invoke=e===O&&o&&o.useG?a.invokeTask:function(){return a.invokeTask.call(global,i,this,arguments)}}static invokeTask(e,t,n){e||(e=this),Z++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{1==Z&&d(),Z--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(y,g)}_transitionTo(e,t,n){if(this._state!==t&&this._state!==n)throw new Error(`${this.type} '${this.source}': can not transition to '${e}', expecting state '${t}'${n?" or '"+n+"'":""}, was '${this._state}'.`);this._state=e,e==y&&(this._zoneDelegates=null)}toString(){return this.data&&void 0!==this.data.handleId?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}const i=__symbol__("setTimeout"),c=__symbol__("Promise"),l=__symbol__("then");let h,u=[],p=!1;function f(e){if(h||global[c]&&(h=global[c].resolve(0)),h){let t=h[l];t||(t=h.then),t.call(h,e)}else global[i](e,0)}function _(e){0===Z&&0===u.length&&f(d),e&&u.push(e)}function d(){if(!p){for(p=!0;u.length;){const e=u;u=[];for(let t=0;t<e.length;t++){const n=e[t];try{n.zone.runTask(n,null,null)}catch(e){P.onUnhandledError(e)}}}P.microtaskDrainDone(),p=!1}}const m={name:"NO ZONE"},y="notScheduled",g="scheduling",E="scheduled",T="running",b="canceling",k="unknown",S="microTask",v="macroTask",O="eventTask",w={},P={symbol:__symbol__,currentZoneFrame:()=>D,onUnhandledError:R,microtaskDrainDone:R,scheduleMicroTask:_,showUncaughtError:()=>!o[__symbol__("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:R,patchMethod:()=>R,bindArguments:()=>[],patchThen:()=>R,patchMacroTask:()=>R,patchEventPrototype:()=>R,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>R,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>R,wrapWithCurrentZone:()=>R,filterProperties:()=>[],attachOriginToPatched:()=>R,_redefineProperty:()=>R,patchCallbacks:()=>R,nativeScheduleMicroTask:f};let D={parent:null,zone:new o(null,null)},N=null,Z=0;function R(){}return n("Zone","Zone"),o}const ObjectGetOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,ObjectDefineProperty=Object.defineProperty,ObjectGetPrototypeOf=Object.getPrototypeOf,ObjectCreate=Object.create,ArraySlice=Array.prototype.slice,ADD_EVENT_LISTENER_STR="addEventListener",REMOVE_EVENT_LISTENER_STR="removeEventListener",ZONE_SYMBOL_ADD_EVENT_LISTENER=__symbol__(ADD_EVENT_LISTENER_STR),ZONE_SYMBOL_REMOVE_EVENT_LISTENER=__symbol__(REMOVE_EVENT_LISTENER_STR),TRUE_STR="true",FALSE_STR="false",ZONE_SYMBOL_PREFIX=__symbol__("");function wrapWithCurrentZone(e,t){return Zone.current.wrap(e,t)}function scheduleMacroTaskWithCurrentZone(e,t,n,o,r){return Zone.current.scheduleMacroTask(e,t,n,o,r)}const zoneSymbol=__symbol__,isWindowExists="undefined"!=typeof window,internalWindow=isWindowExists?window:void 0,_global=isWindowExists&&internalWindow||globalThis,REMOVE_ATTRIBUTE="removeAttribute";function bindArguments(e,t){for(let n=e.length-1;n>=0;n--)"function"==typeof e[n]&&(e[n]=wrapWithCurrentZone(e[n],t+"_"+n));return e}function patchPrototype(e,t){const n=e.constructor.name;for(let o=0;o<t.length;o++){const r=t[o],s=e[r];if(s){if(!isPropertyWritable(ObjectGetOwnPropertyDescriptor(e,r)))continue;e[r]=(e=>{const t=function(){return e.apply(this,bindArguments(arguments,n+"."+r))};return attachOriginToPatched(t,e),t})(s)}}}function isPropertyWritable(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&void 0===e.set)}const isWebWorker="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,isNode=!("nw"in _global)&&void 0!==_global.process&&"[object process]"==={}.toString.call(_global.process),isBrowser=!isNode&&!isWebWorker&&!(!isWindowExists||!internalWindow.HTMLElement),isMix=void 0!==_global.process&&"[object process]"==={}.toString.call(_global.process)&&!isWebWorker&&!(!isWindowExists||!internalWindow.HTMLElement),zoneSymbolEventNames$1={},wrapFn=function(e){if(!(e=e||_global.event))return;let t=zoneSymbolEventNames$1[e.type];t||(t=zoneSymbolEventNames$1[e.type]=zoneSymbol("ON_PROPERTY"+e.type));const n=this||e.target||_global,o=n[t];let r;return isBrowser&&n===internalWindow&&"error"===e.type?(r=o&&o.call(this,e.message,e.filename,e.lineno,e.colno,e.error),!0===r&&e.preventDefault()):(r=o&&o.apply(this,arguments),null==r||r||e.preventDefault()),r};function patchProperty(e,t,n){let o=ObjectGetOwnPropertyDescriptor(e,t);if(!o&&n&&ObjectGetOwnPropertyDescriptor(n,t)&&(o={enumerable:!0,configurable:!0}),!o||!o.configurable)return;const r=zoneSymbol("on"+t+"patched");if(e.hasOwnProperty(r)&&e[r])return;delete o.writable,delete o.value;const s=o.get,a=o.set,i=t.slice(2);let c=zoneSymbolEventNames$1[i];c||(c=zoneSymbolEventNames$1[i]=zoneSymbol("ON_PROPERTY"+i)),o.set=function(t){let n=this;n||e!==_global||(n=_global),n&&("function"==typeof n[c]&&n.removeEventListener(i,wrapFn),a&&a.call(n,null),n[c]=t,"function"==typeof t&&n.addEventListener(i,wrapFn,!1))},o.get=function(){let n=this;if(n||e!==_global||(n=_global),!n)return null;const r=n[c];if(r)return r;if(s){let e=s.call(this);if(e)return o.set.call(this,e),"function"==typeof n[REMOVE_ATTRIBUTE]&&n.removeAttribute(t),e}return null},ObjectDefineProperty(e,t,o),e[r]=!0}function patchOnProperties(e,t,n){if(t)for(let o=0;o<t.length;o++)patchProperty(e,"on"+t[o],n);else{const t=[];for(const n in e)"on"==n.slice(0,2)&&t.push(n);for(let o=0;o<t.length;o++)patchProperty(e,t[o],n)}}const originalInstanceKey=zoneSymbol("originalInstance");function patchClass(e){const t=_global[e];if(!t)return;_global[zoneSymbol(e)]=t,_global[e]=function(){const n=bindArguments(arguments,e);switch(n.length){case 0:this[originalInstanceKey]=new t;break;case 1:this[originalInstanceKey]=new t(n[0]);break;case 2:this[originalInstanceKey]=new t(n[0],n[1]);break;case 3:this[originalInstanceKey]=new t(n[0],n[1],n[2]);break;case 4:this[originalInstanceKey]=new t(n[0],n[1],n[2],n[3]);break;default:throw new Error("Arg list too long.")}},attachOriginToPatched(_global[e],t);const n=new t((function(){}));let o;for(o in n)"XMLHttpRequest"===e&&"responseBlob"===o||function(t){"function"==typeof n[t]?_global[e].prototype[t]=function(){return this[originalInstanceKey][t].apply(this[originalInstanceKey],arguments)}:ObjectDefineProperty(_global[e].prototype,t,{set:function(n){"function"==typeof n?(this[originalInstanceKey][t]=wrapWithCurrentZone(n,e+"."+t),attachOriginToPatched(this[originalInstanceKey][t],n)):this[originalInstanceKey][t]=n},get:function(){return this[originalInstanceKey][t]}})}(o);for(o in t)"prototype"!==o&&t.hasOwnProperty(o)&&(_global[e][o]=t[o])}function copySymbolProperties(e,t){"function"==typeof Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach((n=>{const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,{get:function(){return e[n]},set:function(t){(!o||o.writable&&"function"==typeof o.set)&&(e[n]=t)},enumerable:!o||o.enumerable,configurable:!o||o.configurable})}))}let shouldCopySymbolProperties=!1;function setShouldCopySymbolProperties(e){shouldCopySymbolProperties=e}function patchMethod(e,t,n){let o=e;for(;o&&!o.hasOwnProperty(t);)o=ObjectGetPrototypeOf(o);!o&&e[t]&&(o=e);const r=zoneSymbol(t);let s=null;if(o&&(!(s=o[r])||!o.hasOwnProperty(r))&&(s=o[r]=o[t],isPropertyWritable(o&&ObjectGetOwnPropertyDescriptor(o,t)))){const e=n(s,r,t);o[t]=function(){return e(this,arguments)},attachOriginToPatched(o[t],s),shouldCopySymbolProperties&&copySymbolProperties(s,o[t])}return s}function patchMacroTask(e,t,n){let o=null;function r(e){const t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},o.apply(t.target,t.args),e}o=patchMethod(e,t,(e=>function(t,o){const s=n(t,o);return s.cbIdx>=0&&"function"==typeof o[s.cbIdx]?scheduleMacroTaskWithCurrentZone(s.name,o[s.cbIdx],s,r):e.apply(t,o)}))}function patchMicroTask(e,t,n){let o=null;function r(e){const t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},o.apply(t.target,t.args),e}o=patchMethod(e,t,(e=>function(t,o){const s=n(t,o);return s.cbIdx>=0&&"function"==typeof o[s.cbIdx]?Zone.current.scheduleMicroTask(s.name,o[s.cbIdx],s,r):e.apply(t,o)}))}function attachOriginToPatched(e,t){e[zoneSymbol("OriginalDelegate")]=t}let isDetectedIEOrEdge=!1,ieOrEdge=!1;function isIE(){try{const e=internalWindow.navigator.userAgent;if(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/"))return!0}catch(e){}return!1}function isIEOrEdge(){if(isDetectedIEOrEdge)return ieOrEdge;isDetectedIEOrEdge=!0;try{const e=internalWindow.navigator.userAgent;-1===e.indexOf("MSIE ")&&-1===e.indexOf("Trident/")&&-1===e.indexOf("Edge/")||(ieOrEdge=!0)}catch(e){}return ieOrEdge}let passiveSupported=!1;if("undefined"!=typeof window)try{const e=Object.defineProperty({},"passive",{get:function(){passiveSupported=!0}});window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){passiveSupported=!1}const OPTIMIZED_ZONE_EVENT_TASK_DATA={useG:!0},zoneSymbolEventNames={},globalSources={},EVENT_NAME_SYMBOL_REGX=new RegExp("^"+ZONE_SYMBOL_PREFIX+"(\\w+)(true|false)$"),IMMEDIATE_PROPAGATION_SYMBOL=zoneSymbol("propagationStopped");function prepareEventNames(e,t){const n=(t?t(e):e)+FALSE_STR,o=(t?t(e):e)+TRUE_STR,r=ZONE_SYMBOL_PREFIX+n,s=ZONE_SYMBOL_PREFIX+o;zoneSymbolEventNames[e]={},zoneSymbolEventNames[e][FALSE_STR]=r,zoneSymbolEventNames[e][TRUE_STR]=s}function patchEventTarget(e,t,n,o){const r=o&&o.add||ADD_EVENT_LISTENER_STR,s=o&&o.rm||REMOVE_EVENT_LISTENER_STR,a=o&&o.listeners||"eventListeners",i=o&&o.rmAll||"removeAllListeners",c=zoneSymbol(r),l="."+r+":",h="prependListener",u="."+h+":",p=function(e,t,n){if(e.isRemoved)return;const o=e.callback;let r;"object"==typeof o&&o.handleEvent&&(e.callback=e=>o.handleEvent(e),e.originalDelegate=o);try{e.invoke(e,t,[n])}catch(e){r=e}const a=e.options;return a&&"object"==typeof a&&a.once&&t[s].call(t,n.type,e.originalDelegate?e.originalDelegate:e.callback,a),r};function f(n,o,r){if(!(o=o||e.event))return;const s=n||o.target||e,a=s[zoneSymbolEventNames[o.type][r?TRUE_STR:FALSE_STR]];if(a){const e=[];if(1===a.length){const t=p(a[0],s,o);t&&e.push(t)}else{const t=a.slice();for(let n=0;n<t.length&&(!o||!0!==o[IMMEDIATE_PROPAGATION_SYMBOL]);n++){const r=p(t[n],s,o);r&&e.push(r)}}if(1===e.length)throw e[0];for(let n=0;n<e.length;n++){const o=e[n];t.nativeScheduleMicroTask((()=>{throw o}))}}}const _=function(e){return f(this,e,!1)},d=function(e){return f(this,e,!0)};function m(t,n){if(!t)return!1;let o=!0;n&&void 0!==n.useG&&(o=n.useG);const p=n&&n.vh;let f=!0;n&&void 0!==n.chkDup&&(f=n.chkDup);let m=!1;n&&void 0!==n.rt&&(m=n.rt);let y=t;for(;y&&!y.hasOwnProperty(r);)y=ObjectGetPrototypeOf(y);if(!y&&t[r]&&(y=t),!y)return!1;if(y[c])return!1;const g=n&&n.eventNameToString,E={},T=y[c]=y[r],b=y[zoneSymbol(s)]=y[s],k=y[zoneSymbol(a)]=y[a],S=y[zoneSymbol(i)]=y[i];let v;n&&n.prepend&&(v=y[zoneSymbol(n.prepend)]=y[n.prepend]);const O=o?function(e){if(!E.isExisting)return T.call(E.target,E.eventName,E.capture?d:_,E.options)}:function(e){return T.call(E.target,E.eventName,e.invoke,E.options)},w=o?function(e){if(!e.isRemoved){const t=zoneSymbolEventNames[e.eventName];let n;t&&(n=t[e.capture?TRUE_STR:FALSE_STR]);const o=n&&e.target[n];if(o)for(let t=0;t<o.length;t++)if(o[t]===e){o.splice(t,1),e.isRemoved=!0,0===o.length&&(e.allRemoved=!0,e.target[n]=null);break}}if(e.allRemoved)return b.call(e.target,e.eventName,e.capture?d:_,e.options)}:function(e){return b.call(e.target,e.eventName,e.invoke,e.options)},P=n&&n.diff?n.diff:function(e,t){const n=typeof t;return"function"===n&&e.callback===t||"object"===n&&e.originalDelegate===t},D=Zone[zoneSymbol("UNPATCHED_EVENTS")],N=e[zoneSymbol("PASSIVE_EVENTS")],Z=function(t,r,s,a,i=!1,c=!1){return function(){const l=this||e;let h=arguments[0];n&&n.transferEventName&&(h=n.transferEventName(h));let u=arguments[1];if(!u)return t.apply(this,arguments);if(isNode&&"uncaughtException"===h)return t.apply(this,arguments);let _=!1;if("function"!=typeof u){if(!u.handleEvent)return t.apply(this,arguments);_=!0}if(p&&!p(t,u,l,arguments))return;const d=passiveSupported&&!!N&&-1!==N.indexOf(h),m=function y(e,t){return!passiveSupported&&"object"==typeof e&&e?!!e.capture:passiveSupported&&t?"boolean"==typeof e?{capture:e,passive:!0}:e?"object"==typeof e&&!1!==e.passive?{...e,passive:!0}:e:{passive:!0}:e}(arguments[2],d),T=m&&"object"==typeof m&&m.signal&&"object"==typeof m.signal?m.signal:void 0;if(T?.aborted)return;if(D)for(let e=0;e<D.length;e++)if(h===D[e])return d?t.call(l,h,u,m):t.apply(this,arguments);const b=!!m&&("boolean"==typeof m||m.capture),k=!(!m||"object"!=typeof m)&&m.once,S=Zone.current;let v=zoneSymbolEventNames[h];v||(prepareEventNames(h,g),v=zoneSymbolEventNames[h]);const O=v[b?TRUE_STR:FALSE_STR];let w,Z=l[O],R=!1;if(Z){if(R=!0,f)for(let e=0;e<Z.length;e++)if(P(Z[e],u))return}else Z=l[O]=[];const I=l.constructor.name,M=globalSources[I];M&&(w=M[h]),w||(w=I+r+(g?g(h):h)),E.options=m,k&&(E.options.once=!1),E.target=l,E.capture=b,E.eventName=h,E.isExisting=R;const z=o?OPTIMIZED_ZONE_EVENT_TASK_DATA:void 0;z&&(z.taskData=E),T&&(E.options.signal=void 0);const C=S.scheduleEventTask(w,u,z,s,a);return T&&(E.options.signal=T,t.call(T,"abort",(()=>{C.zone.cancelTask(C)}),{once:!0})),E.target=null,z&&(z.taskData=null),k&&(m.once=!0),(passiveSupported||"boolean"!=typeof C.options)&&(C.options=m),C.target=l,C.capture=b,C.eventName=h,_&&(C.originalDelegate=u),c?Z.unshift(C):Z.push(C),i?l:void 0}};return y[r]=Z(T,l,O,w,m),v&&(y[h]=Z(v,u,(function(e){return v.call(E.target,E.eventName,e.invoke,E.options)}),w,m,!0)),y[s]=function(){const t=this||e;let o=arguments[0];n&&n.transferEventName&&(o=n.transferEventName(o));const r=arguments[2],s=!!r&&("boolean"==typeof r||r.capture),a=arguments[1];if(!a)return b.apply(this,arguments);if(p&&!p(b,a,t,arguments))return;const i=zoneSymbolEventNames[o];let c;i&&(c=i[s?TRUE_STR:FALSE_STR]);const l=c&&t[c];if(l)for(let e=0;e<l.length;e++){const n=l[e];if(P(n,a))return l.splice(e,1),n.isRemoved=!0,0!==l.length||(n.allRemoved=!0,t[c]=null,s||"string"!=typeof o)||(t[ZONE_SYMBOL_PREFIX+"ON_PROPERTY"+o]=null),n.zone.cancelTask(n),m?t:void 0}return b.apply(this,arguments)},y[a]=function(){const t=this||e;let o=arguments[0];n&&n.transferEventName&&(o=n.transferEventName(o));const r=[],s=findEventTasks(t,g?g(o):o);for(let e=0;e<s.length;e++){const t=s[e];r.push(t.originalDelegate?t.originalDelegate:t.callback)}return r},y[i]=function(){const t=this||e;let o=arguments[0];if(o){n&&n.transferEventName&&(o=n.transferEventName(o));const e=zoneSymbolEventNames[o];if(e){const n=t[e[FALSE_STR]],r=t[e[TRUE_STR]];if(n){const e=n.slice();for(let t=0;t<e.length;t++){const n=e[t];this[s].call(this,o,n.originalDelegate?n.originalDelegate:n.callback,n.options)}}if(r){const e=r.slice();for(let t=0;t<e.length;t++){const n=e[t];this[s].call(this,o,n.originalDelegate?n.originalDelegate:n.callback,n.options)}}}}else{const e=Object.keys(t);for(let t=0;t<e.length;t++){const n=EVENT_NAME_SYMBOL_REGX.exec(e[t]);let o=n&&n[1];o&&"removeListener"!==o&&this[i].call(this,o)}this[i].call(this,"removeListener")}if(m)return this},attachOriginToPatched(y[r],T),attachOriginToPatched(y[s],b),S&&attachOriginToPatched(y[i],S),k&&attachOriginToPatched(y[a],k),!0}let y=[];for(let e=0;e<n.length;e++)y[e]=m(n[e],o);return y}function findEventTasks(e,t){if(!t){const n=[];for(let o in e){const r=EVENT_NAME_SYMBOL_REGX.exec(o);let s=r&&r[1];if(s&&(!t||s===t)){const t=e[o];if(t)for(let e=0;e<t.length;e++)n.push(t[e])}}return n}let n=zoneSymbolEventNames[t];n||(prepareEventNames(t),n=zoneSymbolEventNames[t]);const o=e[n[FALSE_STR]],r=e[n[TRUE_STR]];return o?r?o.concat(r):o.slice():r?r.slice():[]}function patchEventPrototype(e,t){const n=e.Event;n&&n.prototype&&t.patchMethod(n.prototype,"stopImmediatePropagation",(e=>function(t,n){t[IMMEDIATE_PROPAGATION_SYMBOL]=!0,e&&e.apply(t,n)}))}function patchQueueMicrotask(e,t){t.patchMethod(e,"queueMicrotask",(e=>function(e,t){Zone.current.scheduleMicroTask("queueMicrotask",t[0])}))}const taskSymbol=zoneSymbol("zoneTask");function patchTimer(e,t,n,o){let r=null,s=null;n+=o;const a={};function i(t){const n=t.data;return n.args[0]=function(){return t.invoke.apply(this,arguments)},n.handleId=r.apply(e,n.args),t}function c(t){return s.call(e,t.data.handleId)}r=patchMethod(e,t+=o,(n=>function(r,s){if("function"==typeof s[0]){const e={isPeriodic:"Interval"===o,delay:"Timeout"===o||"Interval"===o?s[1]||0:void 0,args:s},n=s[0];s[0]=function t(){try{return n.apply(this,arguments)}finally{e.isPeriodic||("number"==typeof e.handleId?delete a[e.handleId]:e.handleId&&(e.handleId[taskSymbol]=null))}};const r=scheduleMacroTaskWithCurrentZone(t,s[0],e,i,c);if(!r)return r;const l=r.data.handleId;return"number"==typeof l?a[l]=r:l&&(l[taskSymbol]=r),l&&l.ref&&l.unref&&"function"==typeof l.ref&&"function"==typeof l.unref&&(r.ref=l.ref.bind(l),r.unref=l.unref.bind(l)),"number"==typeof l||l?l:r}return n.apply(e,s)})),s=patchMethod(e,n,(t=>function(n,o){const r=o[0];let s;"number"==typeof r?s=a[r]:(s=r&&r[taskSymbol],s||(s=r)),s&&"string"==typeof s.type?"notScheduled"!==s.state&&(s.cancelFn&&s.data.isPeriodic||0===s.runCount)&&("number"==typeof r?delete a[r]:r&&(r[taskSymbol]=null),s.zone.cancelTask(s)):t.apply(e,o)}))}function patchCustomElements(e,t){const{isBrowser:n,isMix:o}=t.getGlobalObjects();(n||o)&&e.customElements&&"customElements"in e&&t.patchCallbacks(t,e.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback","formAssociatedCallback","formDisabledCallback","formResetCallback","formStateRestoreCallback"])}function eventTargetPatch(e,t){if(Zone[t.symbol("patchEventTarget")])return;const{eventNames:n,zoneSymbolEventNames:o,TRUE_STR:r,FALSE_STR:s,ZONE_SYMBOL_PREFIX:a}=t.getGlobalObjects();for(let e=0;e<n.length;e++){const t=n[e],i=a+(t+s),c=a+(t+r);o[t]={},o[t][s]=i,o[t][r]=c}const i=e.EventTarget;return i&&i.prototype?(t.patchEventTarget(e,t,[i&&i.prototype]),!0):void 0}function patchEvent(e,t){t.patchEventPrototype(e,t)}function filterProperties(e,t,n){if(!n||0===n.length)return t;const o=n.filter((t=>t.target===e));if(!o||0===o.length)return t;const r=o[0].ignoreProperties;return t.filter((e=>-1===r.indexOf(e)))}function patchFilteredProperties(e,t,n,o){e&&patchOnProperties(e,filterProperties(e,t,n),o)}function getOnEventNames(e){return Object.getOwnPropertyNames(e).filter((e=>e.startsWith("on")&&e.length>2)).map((e=>e.substring(2)))}function propertyDescriptorPatch(e,t){if(isNode&&!isMix)return;if(Zone[e.symbol("patchEvents")])return;const n=t.__Zone_ignore_on_properties;let o=[];if(isBrowser){const e=window;o=o.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);const t=isIE()?[{target:e,ignoreProperties:["error"]}]:[];patchFilteredProperties(e,getOnEventNames(e),n?n.concat(t):n,ObjectGetPrototypeOf(e))}o=o.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(let e=0;e<o.length;e++){const r=t[o[e]];r&&r.prototype&&patchFilteredProperties(r.prototype,getOnEventNames(r.prototype),n)}}function patchBrowser(e){e.__load_patch("legacy",(t=>{const n=t[e.__symbol__("legacyPatch")];n&&n()})),e.__load_patch("timers",(e=>{const t="set",n="clear";patchTimer(e,t,n,"Timeout"),patchTimer(e,t,n,"Interval"),patchTimer(e,t,n,"Immediate")})),e.__load_patch("requestAnimationFrame",(e=>{patchTimer(e,"request","cancel","AnimationFrame"),patchTimer(e,"mozRequest","mozCancel","AnimationFrame"),patchTimer(e,"webkitRequest","webkitCancel","AnimationFrame")})),e.__load_patch("blocking",((e,t)=>{const n=["alert","prompt","confirm"];for(let o=0;o<n.length;o++)patchMethod(e,n[o],((n,o,r)=>function(o,s){return t.current.run(n,e,s,r)}))})),e.__load_patch("EventTarget",((e,t,n)=>{patchEvent(e,n),eventTargetPatch(e,n);const o=e.XMLHttpRequestEventTarget;o&&o.prototype&&n.patchEventTarget(e,n,[o.prototype])})),e.__load_patch("MutationObserver",((e,t,n)=>{patchClass("MutationObserver"),patchClass("WebKitMutationObserver")})),e.__load_patch("IntersectionObserver",((e,t,n)=>{patchClass("IntersectionObserver")})),e.__load_patch("FileReader",((e,t,n)=>{patchClass("FileReader")})),e.__load_patch("on_property",((e,t,n)=>{propertyDescriptorPatch(n,e)})),e.__load_patch("customElements",((e,t,n)=>{patchCustomElements(e,n)})),e.__load_patch("XHR",((e,t)=>{!function n(e){const n=e.XMLHttpRequest;if(!n)return;const l=n.prototype;let h=l[ZONE_SYMBOL_ADD_EVENT_LISTENER],u=l[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];if(!h){const t=e.XMLHttpRequestEventTarget;if(t){const e=t.prototype;h=e[ZONE_SYMBOL_ADD_EVENT_LISTENER],u=e[ZONE_SYMBOL_REMOVE_EVENT_LISTENER]}}const p="readystatechange",f="scheduled";function _(e){const n=e.data,r=n.target;r[a]=!1,r[c]=!1;const i=r[s];h||(h=r[ZONE_SYMBOL_ADD_EVENT_LISTENER],u=r[ZONE_SYMBOL_REMOVE_EVENT_LISTENER]),i&&u.call(r,p,i);const l=r[s]=()=>{if(r.readyState===r.DONE)if(!n.aborted&&r[a]&&e.state===f){const o=r[t.__symbol__("loadfalse")];if(0!==r.status&&o&&o.length>0){const s=e.invoke;e.invoke=function(){const o=r[t.__symbol__("loadfalse")];for(let t=0;t<o.length;t++)o[t]===e&&o.splice(t,1);n.aborted||e.state!==f||s.call(e)},o.push(e)}else e.invoke()}else n.aborted||!1!==r[a]||(r[c]=!0)};return h.call(r,p,l),r[o]||(r[o]=e),T.apply(r,n.args),r[a]=!0,e}function d(){}function m(e){const t=e.data;return t.aborted=!0,b.apply(t.target,t.args)}const y=patchMethod(l,"open",(()=>function(e,t){return e[r]=0==t[2],e[i]=t[1],y.apply(e,t)})),g=zoneSymbol("fetchTaskAborting"),E=zoneSymbol("fetchTaskScheduling"),T=patchMethod(l,"send",(()=>function(e,n){if(!0===t.current[E])return T.apply(e,n);if(e[r])return T.apply(e,n);{const t={target:e,url:e[i],isPeriodic:!1,args:n,aborted:!1},o=scheduleMacroTaskWithCurrentZone("XMLHttpRequest.send",d,t,_,m);e&&!0===e[c]&&!t.aborted&&o.state===f&&o.invoke()}})),b=patchMethod(l,"abort",(()=>function(e,n){const r=function s(e){return e[o]}(e);if(r&&"string"==typeof r.type){if(null==r.cancelFn||r.data&&r.data.aborted)return;r.zone.cancelTask(r)}else if(!0===t.current[g])return b.apply(e,n)}))}(e);const o=zoneSymbol("xhrTask"),r=zoneSymbol("xhrSync"),s=zoneSymbol("xhrListener"),a=zoneSymbol("xhrScheduled"),i=zoneSymbol("xhrURL"),c=zoneSymbol("xhrErrorBeforeScheduled")})),e.__load_patch("geolocation",(e=>{e.navigator&&e.navigator.geolocation&&patchPrototype(e.navigator.geolocation,["getCurrentPosition","watchPosition"])})),e.__load_patch("PromiseRejectionEvent",((e,t)=>{function n(t){return function(n){findEventTasks(e,t).forEach((o=>{const r=e.PromiseRejectionEvent;if(r){const e=new r(t,{promise:n.promise,reason:n.rejection});o.invoke(e)}}))}}e.PromiseRejectionEvent&&(t[zoneSymbol("unhandledPromiseRejectionHandler")]=n("unhandledrejection"),t[zoneSymbol("rejectionHandledHandler")]=n("rejectionhandled"))})),e.__load_patch("queueMicrotask",((e,t,n)=>{patchQueueMicrotask(e,n)}))}function patchPromise(e){e.__load_patch("ZoneAwarePromise",((e,t,n)=>{const o=Object.getOwnPropertyDescriptor,r=Object.defineProperty,s=n.symbol,a=[],i=!1!==e[s("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],c=s("Promise"),l=s("then"),h="__creationTrace__";n.onUnhandledError=e=>{if(n.showUncaughtError()){const t=e&&e.rejection;t?console.error("Unhandled Promise rejection:",t instanceof Error?t.message:t,"; Zone:",e.zone.name,"; Task:",e.task&&e.task.source,"; Value:",t,t instanceof Error?t.stack:void 0):console.error(e)}},n.microtaskDrainDone=()=>{for(;a.length;){const e=a.shift();try{e.zone.runGuarded((()=>{if(e.throwOriginal)throw e.rejection;throw e}))}catch(e){p(e)}}};const u=s("unhandledPromiseRejectionHandler");function p(e){n.onUnhandledError(e);try{const n=t[u];"function"==typeof n&&n.call(this,e)}catch(e){}}function f(e){return e&&e.then}function _(e){return e}function d(e){return j.reject(e)}const m=s("state"),y=s("value"),g=s("finally"),E=s("parentPromiseValue"),T=s("parentPromiseState"),b="Promise.then",k=null,S=!0,v=!1,O=0;function w(e,t){return n=>{try{Z(e,t,n)}catch(t){Z(e,!1,t)}}}const P=function(){let e=!1;return function t(n){return function(){e||(e=!0,n.apply(null,arguments))}}},D="Promise resolved with itself",N=s("currentTaskTrace");function Z(e,o,s){const c=P();if(e===s)throw new TypeError(D);if(e[m]===k){let l=null;try{"object"!=typeof s&&"function"!=typeof s||(l=s&&s.then)}catch(t){return c((()=>{Z(e,!1,t)}))(),e}if(o!==v&&s instanceof j&&s.hasOwnProperty(m)&&s.hasOwnProperty(y)&&s[m]!==k)I(s),Z(e,s[m],s[y]);else if(o!==v&&"function"==typeof l)try{l.call(s,c(w(e,o)),c(w(e,!1)))}catch(t){c((()=>{Z(e,!1,t)}))()}else{e[m]=o;const c=e[y];if(e[y]=s,e[g]===g&&o===S&&(e[m]=e[T],e[y]=e[E]),o===v&&s instanceof Error){const e=t.currentTask&&t.currentTask.data&&t.currentTask.data[h];e&&r(s,N,{configurable:!0,enumerable:!1,writable:!0,value:e})}for(let t=0;t<c.length;)M(e,c[t++],c[t++],c[t++],c[t++]);if(0==c.length&&o==v){e[m]=O;let o=s;try{throw new Error("Uncaught (in promise): "+function e(t){return t&&t.toString===Object.prototype.toString?(t.constructor&&t.constructor.name||"")+": "+JSON.stringify(t):t?t.toString():Object.prototype.toString.call(t)}(s)+(s&&s.stack?"\n"+s.stack:""))}catch(e){o=e}i&&(o.throwOriginal=!0),o.rejection=s,o.promise=e,o.zone=t.current,o.task=t.currentTask,a.push(o),n.scheduleMicroTask()}}}return e}const R=s("rejectionHandledHandler");function I(e){if(e[m]===O){try{const n=t[R];n&&"function"==typeof n&&n.call(this,{rejection:e[y],promise:e})}catch(e){}e[m]=v;for(let t=0;t<a.length;t++)e===a[t].promise&&a.splice(t,1)}}function M(e,t,n,o,r){I(e);const s=e[m],a=s?"function"==typeof o?o:_:"function"==typeof r?r:d;t.scheduleMicroTask(b,(()=>{try{const o=e[y],r=!!n&&g===n[g];r&&(n[E]=o,n[T]=s);const i=t.run(a,void 0,r&&a!==d&&a!==_?[]:[o]);Z(n,!0,i)}catch(e){Z(n,!1,e)}}),n)}const z=function(){},C=e.AggregateError;class j{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(e){return e instanceof j?e:Z(new this(null),S,e)}static reject(e){return Z(new this(null),v,e)}static withResolvers(){const e={};return e.promise=new j(((t,n)=>{e.resolve=t,e.reject=n})),e}static any(e){if(!e||"function"!=typeof e[Symbol.iterator])return Promise.reject(new C([],"All promises were rejected"));const t=[];let n=0;try{for(let o of e)n++,t.push(j.resolve(o))}catch(e){return Promise.reject(new C([],"All promises were rejected"))}if(0===n)return Promise.reject(new C([],"All promises were rejected"));let o=!1;const r=[];return new j(((e,s)=>{for(let a=0;a<t.length;a++)t[a].then((t=>{o||(o=!0,e(t))}),(e=>{r.push(e),n--,0===n&&(o=!0,s(new C(r,"All promises were rejected")))}))}))}static race(e){let t,n,o=new this(((e,o)=>{t=e,n=o}));function r(e){t(e)}function s(e){n(e)}for(let t of e)f(t)||(t=this.resolve(t)),t.then(r,s);return o}static all(e){return j.allWithCallback(e)}static allSettled(e){return(this&&this.prototype instanceof j?this:j).allWithCallback(e,{thenCallback:e=>({status:"fulfilled",value:e}),errorCallback:e=>({status:"rejected",reason:e})})}static allWithCallback(e,t){let n,o,r=new this(((e,t)=>{n=e,o=t})),s=2,a=0;const i=[];for(let r of e){f(r)||(r=this.resolve(r));const e=a;try{r.then((o=>{i[e]=t?t.thenCallback(o):o,s--,0===s&&n(i)}),(r=>{t?(i[e]=t.errorCallback(r),s--,0===s&&n(i)):o(r)}))}catch(e){o(e)}s++,a++}return s-=2,0===s&&n(i),r}constructor(e){const t=this;if(!(t instanceof j))throw new Error("Must be an instanceof Promise.");t[m]=k,t[y]=[];try{const n=P();e&&e(n(w(t,S)),n(w(t,v)))}catch(e){Z(t,!1,e)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return j}then(e,n){let o=this.constructor?.[Symbol.species];o&&"function"==typeof o||(o=this.constructor||j);const r=new o(z),s=t.current;return this[m]==k?this[y].push(s,r,e,n):M(this,s,r,e,n),r}catch(e){return this.then(null,e)}finally(e){let n=this.constructor?.[Symbol.species];n&&"function"==typeof n||(n=j);const o=new n(z);o[g]=g;const r=t.current;return this[m]==k?this[y].push(r,o,e,e):M(this,r,o,e,e),o}}j.resolve=j.resolve,j.reject=j.reject,j.race=j.race,j.all=j.all;const A=e[c]=e.Promise;e.Promise=j;const L=s("thenPatched");function F(e){const t=e.prototype,n=o(t,"then");if(n&&(!1===n.writable||!n.configurable))return;const r=t.then;t[l]=r,e.prototype.then=function(e,t){return new j(((e,t)=>{r.call(this,e,t)})).then(e,t)},e[L]=!0}return n.patchThen=F,A&&(F(A),patchMethod(e,"fetch",(e=>function t(e){return function(t,n){let o=e.apply(t,n);if(o instanceof j)return o;let r=o.constructor;return r[L]||F(r),o}}(e)))),Promise[t.__symbol__("uncaughtPromiseErrors")]=a,j}))}function patchToString(e){e.__load_patch("toString",(e=>{const t=Function.prototype.toString,n=zoneSymbol("OriginalDelegate"),o=zoneSymbol("Promise"),r=zoneSymbol("Error"),s=function s(){if("function"==typeof this){const s=this[n];if(s)return"function"==typeof s?t.call(s):Object.prototype.toString.call(s);if(this===Promise){const n=e[o];if(n)return t.call(n)}if(this===Error){const n=e[r];if(n)return t.call(n)}}return t.call(this)};s[n]=t,Function.prototype.toString=s;const a=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":a.call(this)}}))}function patchCallbacks(e,t,n,o,r){const s=Zone.__symbol__(o);if(t[s])return;const a=t[s]=t[o];t[o]=function(s,i,c){return i&&i.prototype&&r.forEach((function(t){const r=`${n}.${o}::`+t,s=i.prototype;try{if(s.hasOwnProperty(t)){const n=e.ObjectGetOwnPropertyDescriptor(s,t);n&&n.value?(n.value=e.wrapWithCurrentZone(n.value,r),e._redefineProperty(i.prototype,t,n)):s[t]&&(s[t]=e.wrapWithCurrentZone(s[t],r))}else s[t]&&(s[t]=e.wrapWithCurrentZone(s[t],r))}catch{}})),a.call(t,s,i,c)},e.attachOriginToPatched(t[o],a)}function patchUtil(e){e.__load_patch("util",((e,t,n)=>{const o=getOnEventNames(e);n.patchOnProperties=patchOnProperties,n.patchMethod=patchMethod,n.bindArguments=bindArguments,n.patchMacroTask=patchMacroTask;const r=t.__symbol__("BLACK_LISTED_EVENTS"),s=t.__symbol__("UNPATCHED_EVENTS");e[s]&&(e[r]=e[s]),e[r]&&(t[r]=t[s]=e[r]),n.patchEventPrototype=patchEventPrototype,n.patchEventTarget=patchEventTarget,n.isIEOrEdge=isIEOrEdge,n.ObjectDefineProperty=ObjectDefineProperty,n.ObjectGetOwnPropertyDescriptor=ObjectGetOwnPropertyDescriptor,n.ObjectCreate=ObjectCreate,n.ArraySlice=ArraySlice,n.patchClass=patchClass,n.wrapWithCurrentZone=wrapWithCurrentZone,n.filterProperties=filterProperties,n.attachOriginToPatched=attachOriginToPatched,n._redefineProperty=Object.defineProperty,n.patchCallbacks=patchCallbacks,n.getGlobalObjects=()=>({globalSources:globalSources,zoneSymbolEventNames:zoneSymbolEventNames,eventNames:o,isBrowser:isBrowser,isMix:isMix,isNode:isNode,TRUE_STR:TRUE_STR,FALSE_STR:FALSE_STR,ZONE_SYMBOL_PREFIX:ZONE_SYMBOL_PREFIX,ADD_EVENT_LISTENER_STR:ADD_EVENT_LISTENER_STR,REMOVE_EVENT_LISTENER_STR:REMOVE_EVENT_LISTENER_STR})}))}function patchCommon(e){patchPromise(e),patchToString(e),patchUtil(e)}function patchEvents(e){e.__load_patch("EventEmitter",((e,t,n)=>{const o="addListener",r="removeListener",s=function(e,t){return e.callback===t||e.callback.listener===t},a=function(e){return"string"==typeof e?e:e?e.toString().replace("(","_").replace(")","_"):""};let i;try{i=require("events")}catch(e){}i&&i.EventEmitter&&function c(t){const i=patchEventTarget(e,n,[t],{useG:!1,add:o,rm:r,prepend:"prependListener",rmAll:"removeAllListeners",listeners:"listeners",chkDup:!1,rt:!0,diff:s,eventNameToString:a});i&&i[0]&&(t.on=t[o],t.off=t[r])}(i.EventEmitter.prototype)}))}function patchFs(e){e.__load_patch("fs",((e,t,n)=>{let o;try{o=require("fs")}catch(e){}if(!o)return;["access","appendFile","chmod","chown","close","exists","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","read","readdir","readFile","readlink","realpath","rename","rmdir","stat","symlink","truncate","unlink","utimes","write","writeFile"].filter((e=>!!o[e]&&"function"==typeof o[e])).forEach((e=>{patchMacroTask(o,e,((t,n)=>({name:"fs."+e,args:n,cbIdx:n.length>0?n.length-1:-1,target:t})))}));const r=o.realpath?.[n.symbol("OriginalDelegate")];r?.native&&(o.realpath.native=r.native,patchMacroTask(o.realpath,"native",((e,t)=>({args:t,target:e,cbIdx:t.length>0?t.length-1:-1,name:"fs.realpath.native"}))))}))}function patchNodeUtil(e){e.__load_patch("node_util",((e,t,n)=>{n.patchOnProperties=patchOnProperties,n.patchMethod=patchMethod,n.bindArguments=bindArguments,n.patchMacroTask=patchMacroTask,setShouldCopySymbolProperties(!0)}))}const set="set",clear="clear";function patchNode(e){patchNodeUtil(e),patchEvents(e),patchFs(e),e.__load_patch("node_timers",((e,t)=>{let n=!1;try{const t=require("timers");if(e.setTimeout!==t.setTimeout&&!isMix){const o=t.setTimeout;t.setTimeout=function(){return n=!0,o.apply(this,arguments)};const r=e.setTimeout((()=>{}),100);clearTimeout(r),t.setTimeout=o}patchTimer(t,set,clear,"Timeout"),patchTimer(t,set,clear,"Interval"),patchTimer(t,set,clear,"Immediate")}catch(e){}isMix||(n?(e[t.__symbol__("setTimeout")]=e.setTimeout,e[t.__symbol__("setInterval")]=e.setInterval,e[t.__symbol__("setImmediate")]=e.setImmediate):(patchTimer(e,set,clear,"Timeout"),patchTimer(e,set,clear,"Interval"),patchTimer(e,set,clear,"Immediate")))})),e.__load_patch("nextTick",(()=>{patchMicroTask(process,"nextTick",((e,t)=>({name:"process.nextTick",args:t,cbIdx:t.length>0&&"function"==typeof t[0]?0:-1,target:process})))})),e.__load_patch("handleUnhandledPromiseRejection",((e,t,n)=>{function o(e){return function(t){findEventTasks(process,e).forEach((n=>{"unhandledRejection"===e?n.invoke(t.rejection,t.promise):"rejectionHandled"===e&&n.invoke(t.promise)}))}}t[n.symbol("unhandledPromiseRejectionHandler")]=o("unhandledRejection"),t[n.symbol("rejectionHandledHandler")]=o("rejectionHandled")})),e.__load_patch("crypto",(()=>{let e;try{e=require("crypto")}catch(e){}e&&["randomBytes","pbkdf2"].forEach((t=>{patchMacroTask(e,t,((n,o)=>({name:"crypto."+t,args:o,cbIdx:o.length>0&&"function"==typeof o[o.length-1]?o.length-1:-1,target:e})))}))})),e.__load_patch("console",((e,t)=>{["dir","log","info","error","warn","assert","debug","timeEnd","trace"].forEach((e=>{const n=console[t.__symbol__(e)]=console[e];n&&(console[e]=function(){const e=ArraySlice.call(arguments);return t.current===t.root?n.apply(this,e):t.root.run(n,this,e)})}))})),e.__load_patch("queueMicrotask",((e,t,n)=>{patchQueueMicrotask(e,n)}))}function loadZone(){const e=globalThis,t=!0===e[__symbol__("forceDuplicateZoneCheck")];if(e.Zone&&(t||"function"!=typeof e.Zone.__symbol__))throw new Error("Zone already loaded.");return e.Zone??=initZone(),e.Zone}const Zone$1=loadZone();patchCommon(Zone$1),patchBrowser(Zone$1),patchNode(Zone$1);
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/!function(e){const t=e.performance;function n(e){t&&t.mark&&t.mark(e)}function o(e,n){t&&t.measure&&t.measure(e,n)}n("Zone");const r=e.__Zone_symbol_prefix||"__zone_symbol__";function s(e){return r+e}const i=!0===e[s("forceDuplicateZoneCheck")];if(e.Zone){if(i||"function"!=typeof e.Zone.__symbol__)throw new Error("Zone already loaded.");return e.Zone}class a{static{this.__symbol__=s}static assertZonePatched(){if(e.Promise!==D.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let e=a.current;for(;e.parent;)e=e.parent;return e}static get current(){return N.zone}static get currentTask(){return j}static __load_patch(t,r,s=!1){if(D.hasOwnProperty(t)){if(!s&&i)throw Error("Already loaded patch: "+t)}else if(!e["__Zone_disable_"+t]){const s="Zone:"+t;n(s),D[t]=r(e,a,C),o(s,s)}}get parent(){return this._parent}get name(){return this._name}constructor(e,t){this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new l(this,this._parent&&this._parent._zoneDelegate,t)}get(e){const t=this.getZoneWith(e);if(t)return t._properties[e]}getZoneWith(e){let t=this;for(;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null}fork(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)}wrap(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);const n=this._zoneDelegate.intercept(this,e,t),o=this;return function(){return o.runGuarded(n,this,arguments,t)}}run(e,t,n,o){N={parent:N,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,o)}finally{N=N.parent}}runGuarded(e,t=null,n,o){N={parent:N,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,o)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{N=N.parent}}runTask(e,t,n){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||g).name+"; Execution: "+this.name+")");if(e.state===b&&(e.type===z||e.type===O))return;const o=e.state!=S;o&&e._transitionTo(S,v),e.runCount++;const r=j;j=e,N={parent:N,zone:this};try{e.type==O&&e.data&&!e.data.isPeriodic&&(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,e,t,n)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{e.state!==b&&e.state!==Z&&(e.type==z||e.data&&e.data.isPeriodic?o&&e._transitionTo(v,S):(e.runCount=0,this._updateTaskCount(e,-1),o&&e._transitionTo(b,S,b))),N=N.parent,j=r}}scheduleTask(e){if(e.zone&&e.zone!==this){let t=this;for(;t;){if(t===e.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${e.zone.name}`);t=t.parent}}e._transitionTo(E,b);const t=[];e._zoneDelegates=t,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(t){throw e._transitionTo(Z,E,b),this._zoneDelegate.handleError(this,t),t}return e._zoneDelegates===t&&this._updateTaskCount(e,1),e.state==E&&e._transitionTo(v,E),e}scheduleMicroTask(e,t,n,o){return this.scheduleTask(new h(P,e,t,n,o,void 0))}scheduleMacroTask(e,t,n,o,r){return this.scheduleTask(new h(O,e,t,n,o,r))}scheduleEventTask(e,t,n,o,r){return this.scheduleTask(new h(z,e,t,n,o,r))}cancelTask(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||g).name+"; Execution: "+this.name+")");if(e.state===v||e.state===S){e._transitionTo(w,v,S);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(Z,w),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(b,w),e.runCount=0,e}}_updateTaskCount(e,t){const n=e._zoneDelegates;-1==t&&(e._zoneDelegates=null);for(let o=0;o<n.length;o++)n[o]._updateTaskCount(e.type,t)}}const c={name:"",onHasTask:(e,t,n,o)=>e.hasTask(n,o),onScheduleTask:(e,t,n,o)=>e.scheduleTask(n,o),onInvokeTask:(e,t,n,o,r,s)=>e.invokeTask(n,o,r,s),onCancelTask:(e,t,n,o)=>e.cancelTask(n,o)};class l{constructor(e,t,n){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=e,this._parentDelegate=t,this._forkZS=n&&(n&&n.onFork?n:t._forkZS),this._forkDlgt=n&&(n.onFork?t:t._forkDlgt),this._forkCurrZone=n&&(n.onFork?this.zone:t._forkCurrZone),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this.zone:t._interceptCurrZone),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this.zone:t._invokeCurrZone),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this.zone:t._handleErrorCurrZone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this.zone:t._scheduleTaskCurrZone),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this.zone:t._invokeTaskCurrZone),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this.zone:t._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const o=n&&n.onHasTask;(o||t&&t._hasTaskZS)&&(this._hasTaskZS=o?n:c,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=e,n.onScheduleTask||(this._scheduleTaskZS=c,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this.zone),n.onInvokeTask||(this._invokeTaskZS=c,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this.zone),n.onCancelTask||(this._cancelTaskZS=c,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this.zone))}fork(e,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,t):new a(e,t)}intercept(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,e,t,n):t}invoke(e,t,n,o,r){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,e,t,n,o,r):t.apply(n,o)}handleError(e,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,e,t)}scheduleTask(e,t){let n=t;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,e,t),n||(n=t);else if(t.scheduleFn)t.scheduleFn(t);else{if(t.type!=P)throw new Error("Task is missing scheduleFn.");m(t)}return n}invokeTask(e,t,n,o){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,e,t,n,o):t.callback.apply(n,o)}cancelTask(e,t){let n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,e,t);else{if(!t.cancelFn)throw Error("Task is not cancelable");n=t.cancelFn(t)}return n}hasTask(e,t){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,e,t)}catch(t){this.handleError(e,t)}}_updateTaskCount(e,t){const n=this._taskCounts,o=n[e],r=n[e]=o+t;if(r<0)throw new Error("More tasks executed then were scheduled.");0!=o&&0!=r||this.hasTask(this.zone,{microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e})}}class h{constructor(t,n,o,r,s,i){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=t,this.source=n,this.data=r,this.scheduleFn=s,this.cancelFn=i,!o)throw new Error("callback is not defined");this.callback=o;const a=this;this.invoke=t===z&&r&&r.useG?h.invokeTask:function(){return h.invokeTask.call(e,a,this,arguments)}}static invokeTask(e,t,n){e||(e=this),I++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{1==I&&T(),I--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(b,E)}_transitionTo(e,t,n){if(this._state!==t&&this._state!==n)throw new Error(`${this.type} '${this.source}': can not transition to '${e}', expecting state '${t}'${n?" or '"+n+"'":""}, was '${this._state}'.`);this._state=e,e==b&&(this._zoneDelegates=null)}toString(){return this.data&&void 0!==this.data.handleId?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}const u=s("setTimeout"),p=s("Promise"),f=s("then");let d,_=[],k=!1;function y(t){if(d||e[p]&&(d=e[p].resolve(0)),d){let e=d[f];e||(e=d.then),e.call(d,t)}else e[u](t,0)}function m(e){0===I&&0===_.length&&y(T),e&&_.push(e)}function T(){if(!k){for(k=!0;_.length;){const e=_;_=[];for(let t=0;t<e.length;t++){const n=e[t];try{n.zone.runTask(n,null,null)}catch(e){C.onUnhandledError(e)}}}C.microtaskDrainDone(),k=!1}}const g={name:"NO ZONE"},b="notScheduled",E="scheduling",v="scheduled",S="running",w="canceling",Z="unknown",P="microTask",O="macroTask",z="eventTask",D={},C={symbol:s,currentZoneFrame:()=>N,onUnhandledError:R,microtaskDrainDone:R,scheduleMicroTask:m,showUncaughtError:()=>!a[s("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:R,patchMethod:()=>R,bindArguments:()=>[],patchThen:()=>R,patchMacroTask:()=>R,patchEventPrototype:()=>R,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>R,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>R,wrapWithCurrentZone:()=>R,filterProperties:()=>[],attachOriginToPatched:()=>R,_redefineProperty:()=>R,patchCallbacks:()=>R,nativeScheduleMicroTask:y};let N={parent:null,zone:new a(null,null)},j=null,I=0;function R(){}o("Zone","Zone"),e.Zone=a}(globalThis);const ObjectGetOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,ObjectDefineProperty=Object.defineProperty,ObjectGetPrototypeOf=Object.getPrototypeOf,ArraySlice=Array.prototype.slice,ADD_EVENT_LISTENER_STR="addEventListener",REMOVE_EVENT_LISTENER_STR="removeEventListener";Zone.__symbol__("addEventListener"),Zone.__symbol__("removeEventListener");const TRUE_STR="true",FALSE_STR="false",ZONE_SYMBOL_PREFIX=Zone.__symbol__("");function wrapWithCurrentZone(e,t){return Zone.current.wrap(e,t)}function scheduleMacroTaskWithCurrentZone(e,t,n,o,r){return Zone.current.scheduleMacroTask(e,t,n,o,r)}const zoneSymbol=Zone.__symbol__,isWindowExists="undefined"!=typeof window,internalWindow=isWindowExists?window:void 0,_global=isWindowExists&&internalWindow||globalThis,REMOVE_ATTRIBUTE="removeAttribute";function bindArguments(e,t){for(let n=e.length-1;n>=0;n--)"function"==typeof e[n]&&(e[n]=wrapWithCurrentZone(e[n],t+"_"+n));return e}function isPropertyWritable(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&void 0===e.set)}const isWebWorker="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,isNode=!("nw"in _global)&&void 0!==_global.process&&"[object process]"==={}.toString.call(_global.process),isBrowser=!isNode&&!isWebWorker&&!(!isWindowExists||!internalWindow.HTMLElement),isMix=void 0!==_global.process&&"[object process]"==={}.toString.call(_global.process)&&!isWebWorker&&!(!isWindowExists||!internalWindow.HTMLElement),zoneSymbolEventNames$1={},wrapFn=function(e){if(!(e=e||_global.event))return;let t=zoneSymbolEventNames$1[e.type];t||(t=zoneSymbolEventNames$1[e.type]=zoneSymbol("ON_PROPERTY"+e.type));const n=this||e.target||_global,o=n[t];let r;return isBrowser&&n===internalWindow&&"error"===e.type?(r=o&&o.call(this,e.message,e.filename,e.lineno,e.colno,e.error),!0===r&&e.preventDefault()):(r=o&&o.apply(this,arguments),null==r||r||e.preventDefault()),r};function patchProperty(e,t,n){let o=ObjectGetOwnPropertyDescriptor(e,t);if(!o&&n&&ObjectGetOwnPropertyDescriptor(n,t)&&(o={enumerable:!0,configurable:!0}),!o||!o.configurable)return;const r=zoneSymbol("on"+t+"patched");if(e.hasOwnProperty(r)&&e[r])return;delete o.writable,delete o.value;const s=o.get,i=o.set,a=t.slice(2);let c=zoneSymbolEventNames$1[a];c||(c=zoneSymbolEventNames$1[a]=zoneSymbol("ON_PROPERTY"+a)),o.set=function(t){let n=this;n||e!==_global||(n=_global),n&&("function"==typeof n[c]&&n.removeEventListener(a,wrapFn),i&&i.call(n,null),n[c]=t,"function"==typeof t&&n.addEventListener(a,wrapFn,!1))},o.get=function(){let n=this;if(n||e!==_global||(n=_global),!n)return null;const r=n[c];if(r)return r;if(s){let e=s.call(this);if(e)return o.set.call(this,e),"function"==typeof n[REMOVE_ATTRIBUTE]&&n.removeAttribute(t),e}return null},ObjectDefineProperty(e,t,o),e[r]=!0}function patchOnProperties(e,t,n){if(t)for(let o=0;o<t.length;o++)patchProperty(e,"on"+t[o],n);else{const t=[];for(const n in e)"on"==n.slice(0,2)&&t.push(n);for(let o=0;o<t.length;o++)patchProperty(e,t[o],n)}}function copySymbolProperties(e,t){"function"==typeof Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach((n=>{const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,{get:function(){return e[n]},set:function(t){(!o||o.writable&&"function"==typeof o.set)&&(e[n]=t)},enumerable:!o||o.enumerable,configurable:!o||o.configurable})}))}zoneSymbol("originalInstance");let shouldCopySymbolProperties=!1;function setShouldCopySymbolProperties(e){shouldCopySymbolProperties=e}function patchMethod(e,t,n){let o=e;for(;o&&!o.hasOwnProperty(t);)o=ObjectGetPrototypeOf(o);!o&&e[t]&&(o=e);const r=zoneSymbol(t);let s=null;if(o&&(!(s=o[r])||!o.hasOwnProperty(r))&&(s=o[r]=o[t],isPropertyWritable(o&&ObjectGetOwnPropertyDescriptor(o,t)))){const e=n(s,r,t);o[t]=function(){return e(this,arguments)},attachOriginToPatched(o[t],s),shouldCopySymbolProperties&&copySymbolProperties(s,o[t])}return s}function patchMacroTask(e,t,n){let o=null;function r(e){const t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},o.apply(t.target,t.args),e}o=patchMethod(e,t,(e=>function(t,o){const s=n(t,o);return s.cbIdx>=0&&"function"==typeof o[s.cbIdx]?scheduleMacroTaskWithCurrentZone(s.name,o[s.cbIdx],s,r):e.apply(t,o)}))}function patchMicroTask(e,t,n){let o=null;function r(e){const t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},o.apply(t.target,t.args),e}o=patchMethod(e,t,(e=>function(t,o){const s=n(t,o);return s.cbIdx>=0&&"function"==typeof o[s.cbIdx]?Zone.current.scheduleMicroTask(s.name,o[s.cbIdx],s,r):e.apply(t,o)}))}function attachOriginToPatched(e,t){e[zoneSymbol("OriginalDelegate")]=t}Zone.__load_patch("ZoneAwarePromise",((e,t,n)=>{const o=Object.getOwnPropertyDescriptor,r=Object.defineProperty,s=n.symbol,i=[],a=!1!==e[s("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],c=s("Promise"),l=s("then"),h="__creationTrace__";n.onUnhandledError=e=>{if(n.showUncaughtError()){const t=e&&e.rejection;t?console.error("Unhandled Promise rejection:",t instanceof Error?t.message:t,"; Zone:",e.zone.name,"; Task:",e.task&&e.task.source,"; Value:",t,t instanceof Error?t.stack:void 0):console.error(e)}},n.microtaskDrainDone=()=>{for(;i.length;){const e=i.shift();try{e.zone.runGuarded((()=>{if(e.throwOriginal)throw e.rejection;throw e}))}catch(e){p(e)}}};const u=s("unhandledPromiseRejectionHandler");function p(e){n.onUnhandledError(e);try{const n=t[u];"function"==typeof n&&n.call(this,e)}catch(e){}}function f(e){return e&&e.then}function d(e){return e}function _(e){return M.reject(e)}const k=s("state"),y=s("value"),m=s("finally"),T=s("parentPromiseValue"),g=s("parentPromiseState"),b="Promise.then",E=null,v=!0,S=!1,w=0;function Z(e,t){return n=>{try{D(e,t,n)}catch(t){D(e,!1,t)}}}const P=function(){let e=!1;return function t(n){return function(){e||(e=!0,n.apply(null,arguments))}}},O="Promise resolved with itself",z=s("currentTaskTrace");function D(e,o,s){const c=P();if(e===s)throw new TypeError(O);if(e[k]===E){let l=null;try{"object"!=typeof s&&"function"!=typeof s||(l=s&&s.then)}catch(t){return c((()=>{D(e,!1,t)}))(),e}if(o!==S&&s instanceof M&&s.hasOwnProperty(k)&&s.hasOwnProperty(y)&&s[k]!==E)N(s),D(e,s[k],s[y]);else if(o!==S&&"function"==typeof l)try{l.call(s,c(Z(e,o)),c(Z(e,!1)))}catch(t){c((()=>{D(e,!1,t)}))()}else{e[k]=o;const c=e[y];if(e[y]=s,e[m]===m&&o===v&&(e[k]=e[g],e[y]=e[T]),o===S&&s instanceof Error){const e=t.currentTask&&t.currentTask.data&&t.currentTask.data[h];e&&r(s,z,{configurable:!0,enumerable:!1,writable:!0,value:e})}for(let t=0;t<c.length;)j(e,c[t++],c[t++],c[t++],c[t++]);if(0==c.length&&o==S){e[k]=w;let o=s;try{throw new Error("Uncaught (in promise): "+function e(t){return t&&t.toString===Object.prototype.toString?(t.constructor&&t.constructor.name||"")+": "+JSON.stringify(t):t?t.toString():Object.prototype.toString.call(t)}(s)+(s&&s.stack?"\n"+s.stack:""))}catch(e){o=e}a&&(o.throwOriginal=!0),o.rejection=s,o.promise=e,o.zone=t.current,o.task=t.currentTask,i.push(o),n.scheduleMicroTask()}}}return e}const C=s("rejectionHandledHandler");function N(e){if(e[k]===w){try{const n=t[C];n&&"function"==typeof n&&n.call(this,{rejection:e[y],promise:e})}catch(e){}e[k]=S;for(let t=0;t<i.length;t++)e===i[t].promise&&i.splice(t,1)}}function j(e,t,n,o,r){N(e);const s=e[k],i=s?"function"==typeof o?o:d:"function"==typeof r?r:_;t.scheduleMicroTask(b,(()=>{try{const o=e[y],r=!!n&&m===n[m];r&&(n[T]=o,n[g]=s);const a=t.run(i,void 0,r&&i!==_&&i!==d?[]:[o]);D(n,!0,a)}catch(e){D(n,!1,e)}}),n)}const I=function(){},R=e.AggregateError;class M{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(e){return e instanceof M?e:D(new this(null),v,e)}static reject(e){return D(new this(null),S,e)}static withResolvers(){const e={};return e.promise=new M(((t,n)=>{e.resolve=t,e.reject=n})),e}static any(e){if(!e||"function"!=typeof e[Symbol.iterator])return Promise.reject(new R([],"All promises were rejected"));const t=[];let n=0;try{for(let o of e)n++,t.push(M.resolve(o))}catch(e){return Promise.reject(new R([],"All promises were rejected"))}if(0===n)return Promise.reject(new R([],"All promises were rejected"));let o=!1;const r=[];return new M(((e,s)=>{for(let i=0;i<t.length;i++)t[i].then((t=>{o||(o=!0,e(t))}),(e=>{r.push(e),n--,0===n&&(o=!0,s(new R(r,"All promises were rejected")))}))}))}static race(e){let t,n,o=new this(((e,o)=>{t=e,n=o}));function r(e){t(e)}function s(e){n(e)}for(let t of e)f(t)||(t=this.resolve(t)),t.then(r,s);return o}static all(e){return M.allWithCallback(e)}static allSettled(e){return(this&&this.prototype instanceof M?this:M).allWithCallback(e,{thenCallback:e=>({status:"fulfilled",value:e}),errorCallback:e=>({status:"rejected",reason:e})})}static allWithCallback(e,t){let n,o,r=new this(((e,t)=>{n=e,o=t})),s=2,i=0;const a=[];for(let r of e){f(r)||(r=this.resolve(r));const e=i;try{r.then((o=>{a[e]=t?t.thenCallback(o):o,s--,0===s&&n(a)}),(r=>{t?(a[e]=t.errorCallback(r),s--,0===s&&n(a)):o(r)}))}catch(e){o(e)}s++,i++}return s-=2,0===s&&n(a),r}constructor(e){const t=this;if(!(t instanceof M))throw new Error("Must be an instanceof Promise.");t[k]=E,t[y]=[];try{const n=P();e&&e(n(Z(t,v)),n(Z(t,S)))}catch(e){D(t,!1,e)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return M}then(e,n){let o=this.constructor?.[Symbol.species];o&&"function"==typeof o||(o=this.constructor||M);const r=new o(I),s=t.current;return this[k]==E?this[y].push(s,r,e,n):j(this,s,r,e,n),r}catch(e){return this.then(null,e)}finally(e){let n=this.constructor?.[Symbol.species];n&&"function"==typeof n||(n=M);const o=new n(I);o[m]=m;const r=t.current;return this[k]==E?this[y].push(r,o,e,e):j(this,r,o,e,e),o}}M.resolve=M.resolve,M.reject=M.reject,M.race=M.race,M.all=M.all;const A=e[c]=e.Promise;e.Promise=M;const L=s("thenPatched");function x(e){const t=e.prototype,n=o(t,"then");if(n&&(!1===n.writable||!n.configurable))return;const r=t.then;t[l]=r,e.prototype.then=function(e,t){return new M(((e,t)=>{r.call(this,e,t)})).then(e,t)},e[L]=!0}return n.patchThen=x,A&&(x(A),patchMethod(e,"fetch",(e=>function t(e){return function(t,n){let o=e.apply(t,n);if(o instanceof M)return o;let r=o.constructor;return r[L]||x(r),o}}(e)))),Promise[t.__symbol__("uncaughtPromiseErrors")]=i,M})),Zone.__load_patch("toString",(e=>{const t=Function.prototype.toString,n=zoneSymbol("OriginalDelegate"),o=zoneSymbol("Promise"),r=zoneSymbol("Error"),s=function s(){if("function"==typeof this){const s=this[n];if(s)return"function"==typeof s?t.call(s):Object.prototype.toString.call(s);if(this===Promise){const n=e[o];if(n)return t.call(n)}if(this===Error){const n=e[r];if(n)return t.call(n)}}return t.call(this)};s[n]=t,Function.prototype.toString=s;const i=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":i.call(this)}})),Zone.__load_patch("node_util",((e,t,n)=>{n.patchOnProperties=patchOnProperties,n.patchMethod=patchMethod,n.bindArguments=bindArguments,n.patchMacroTask=patchMacroTask,setShouldCopySymbolProperties(!0)}));let passiveSupported=!1;if("undefined"!=typeof window)try{const e=Object.defineProperty({},"passive",{get:function(){passiveSupported=!0}});window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){passiveSupported=!1}const OPTIMIZED_ZONE_EVENT_TASK_DATA={useG:!0},zoneSymbolEventNames={},globalSources={},EVENT_NAME_SYMBOL_REGX=new RegExp("^"+ZONE_SYMBOL_PREFIX+"(\\w+)(true|false)$"),IMMEDIATE_PROPAGATION_SYMBOL=zoneSymbol("propagationStopped");function prepareEventNames(e,t){const n=(t?t(e):e)+FALSE_STR,o=(t?t(e):e)+TRUE_STR,r=ZONE_SYMBOL_PREFIX+n,s=ZONE_SYMBOL_PREFIX+o;zoneSymbolEventNames[e]={},zoneSymbolEventNames[e][FALSE_STR]=r,zoneSymbolEventNames[e][TRUE_STR]=s}function patchEventTarget(e,t,n,o){const r=o&&o.add||"addEventListener",s=o&&o.rm||"removeEventListener",i=o&&o.listeners||"eventListeners",a=o&&o.rmAll||"removeAllListeners",c=zoneSymbol(r),l="."+r+":",h="prependListener",u="."+h+":",p=function(e,t,n){if(e.isRemoved)return;const o=e.callback;let r;"object"==typeof o&&o.handleEvent&&(e.callback=e=>o.handleEvent(e),e.originalDelegate=o);try{e.invoke(e,t,[n])}catch(e){r=e}const i=e.options;return i&&"object"==typeof i&&i.once&&t[s].call(t,n.type,e.originalDelegate?e.originalDelegate:e.callback,i),r};function f(n,o,r){if(!(o=o||e.event))return;const s=n||o.target||e,i=s[zoneSymbolEventNames[o.type][r?TRUE_STR:FALSE_STR]];if(i){const e=[];if(1===i.length){const t=p(i[0],s,o);t&&e.push(t)}else{const t=i.slice();for(let n=0;n<t.length&&(!o||!0!==o[IMMEDIATE_PROPAGATION_SYMBOL]);n++){const r=p(t[n],s,o);r&&e.push(r)}}if(1===e.length)throw e[0];for(let n=0;n<e.length;n++){const o=e[n];t.nativeScheduleMicroTask((()=>{throw o}))}}}const d=function(e){return f(this,e,!1)},_=function(e){return f(this,e,!0)};function k(t,n){if(!t)return!1;let o=!0;n&&void 0!==n.useG&&(o=n.useG);const p=n&&n.vh;let f=!0;n&&void 0!==n.chkDup&&(f=n.chkDup);let k=!1;n&&void 0!==n.rt&&(k=n.rt);let y=t;for(;y&&!y.hasOwnProperty(r);)y=ObjectGetPrototypeOf(y);if(!y&&t[r]&&(y=t),!y)return!1;if(y[c])return!1;const m=n&&n.eventNameToString,T={},g=y[c]=y[r],b=y[zoneSymbol(s)]=y[s],E=y[zoneSymbol(i)]=y[i],v=y[zoneSymbol(a)]=y[a];let S;n&&n.prepend&&(S=y[zoneSymbol(n.prepend)]=y[n.prepend]);const w=o?function(e){if(!T.isExisting)return g.call(T.target,T.eventName,T.capture?_:d,T.options)}:function(e){return g.call(T.target,T.eventName,e.invoke,T.options)},Z=o?function(e){if(!e.isRemoved){const t=zoneSymbolEventNames[e.eventName];let n;t&&(n=t[e.capture?TRUE_STR:FALSE_STR]);const o=n&&e.target[n];if(o)for(let t=0;t<o.length;t++)if(o[t]===e){o.splice(t,1),e.isRemoved=!0,0===o.length&&(e.allRemoved=!0,e.target[n]=null);break}}if(e.allRemoved)return b.call(e.target,e.eventName,e.capture?_:d,e.options)}:function(e){return b.call(e.target,e.eventName,e.invoke,e.options)},P=n&&n.diff?n.diff:function(e,t){const n=typeof t;return"function"===n&&e.callback===t||"object"===n&&e.originalDelegate===t},O=Zone[zoneSymbol("UNPATCHED_EVENTS")],z=e[zoneSymbol("PASSIVE_EVENTS")],D=function(t,r,s,i,a=!1,c=!1){return function(){const l=this||e;let h=arguments[0];n&&n.transferEventName&&(h=n.transferEventName(h));let u=arguments[1];if(!u)return t.apply(this,arguments);if(isNode&&"uncaughtException"===h)return t.apply(this,arguments);let d=!1;if("function"!=typeof u){if(!u.handleEvent)return t.apply(this,arguments);d=!0}if(p&&!p(t,u,l,arguments))return;const _=passiveSupported&&!!z&&-1!==z.indexOf(h),k=function y(e,t){return!passiveSupported&&"object"==typeof e&&e?!!e.capture:passiveSupported&&t?"boolean"==typeof e?{capture:e,passive:!0}:e?"object"==typeof e&&!1!==e.passive?{...e,passive:!0}:e:{passive:!0}:e}(arguments[2],_),g=k&&"object"==typeof k&&k.signal&&"object"==typeof k.signal?k.signal:void 0;if(g?.aborted)return;if(O)for(let e=0;e<O.length;e++)if(h===O[e])return _?t.call(l,h,u,k):t.apply(this,arguments);const b=!!k&&("boolean"==typeof k||k.capture),E=!(!k||"object"!=typeof k)&&k.once,v=Zone.current;let S=zoneSymbolEventNames[h];S||(prepareEventNames(h,m),S=zoneSymbolEventNames[h]);const w=S[b?TRUE_STR:FALSE_STR];let Z,D=l[w],C=!1;if(D){if(C=!0,f)for(let e=0;e<D.length;e++)if(P(D[e],u))return}else D=l[w]=[];const N=l.constructor.name,j=globalSources[N];j&&(Z=j[h]),Z||(Z=N+r+(m?m(h):h)),T.options=k,E&&(T.options.once=!1),T.target=l,T.capture=b,T.eventName=h,T.isExisting=C;const I=o?OPTIMIZED_ZONE_EVENT_TASK_DATA:void 0;I&&(I.taskData=T),g&&(T.options.signal=void 0);const R=v.scheduleEventTask(Z,u,I,s,i);return g&&(T.options.signal=g,t.call(g,"abort",(()=>{R.zone.cancelTask(R)}),{once:!0})),T.target=null,I&&(I.taskData=null),E&&(k.once=!0),(passiveSupported||"boolean"!=typeof R.options)&&(R.options=k),R.target=l,R.capture=b,R.eventName=h,d&&(R.originalDelegate=u),c?D.unshift(R):D.push(R),a?l:void 0}};return y[r]=D(g,l,w,Z,k),S&&(y[h]=D(S,u,(function(e){return S.call(T.target,T.eventName,e.invoke,T.options)}),Z,k,!0)),y[s]=function(){const t=this||e;let o=arguments[0];n&&n.transferEventName&&(o=n.transferEventName(o));const r=arguments[2],s=!!r&&("boolean"==typeof r||r.capture),i=arguments[1];if(!i)return b.apply(this,arguments);if(p&&!p(b,i,t,arguments))return;const a=zoneSymbolEventNames[o];let c;a&&(c=a[s?TRUE_STR:FALSE_STR]);const l=c&&t[c];if(l)for(let e=0;e<l.length;e++){const n=l[e];if(P(n,i))return l.splice(e,1),n.isRemoved=!0,0===l.length&&(n.allRemoved=!0,t[c]=null,"string"==typeof o)&&(t[ZONE_SYMBOL_PREFIX+"ON_PROPERTY"+o]=null),n.zone.cancelTask(n),k?t:void 0}return b.apply(this,arguments)},y[i]=function(){const t=this||e;let o=arguments[0];n&&n.transferEventName&&(o=n.transferEventName(o));const r=[],s=findEventTasks(t,m?m(o):o);for(let e=0;e<s.length;e++){const t=s[e];r.push(t.originalDelegate?t.originalDelegate:t.callback)}return r},y[a]=function(){const t=this||e;let o=arguments[0];if(o){n&&n.transferEventName&&(o=n.transferEventName(o));const e=zoneSymbolEventNames[o];if(e){const n=t[e[FALSE_STR]],r=t[e[TRUE_STR]];if(n){const e=n.slice();for(let t=0;t<e.length;t++){const n=e[t];this[s].call(this,o,n.originalDelegate?n.originalDelegate:n.callback,n.options)}}if(r){const e=r.slice();for(let t=0;t<e.length;t++){const n=e[t];this[s].call(this,o,n.originalDelegate?n.originalDelegate:n.callback,n.options)}}}}else{const e=Object.keys(t);for(let t=0;t<e.length;t++){const n=EVENT_NAME_SYMBOL_REGX.exec(e[t]);let o=n&&n[1];o&&"removeListener"!==o&&this[a].call(this,o)}this[a].call(this,"removeListener")}if(k)return this},attachOriginToPatched(y[r],g),attachOriginToPatched(y[s],b),v&&attachOriginToPatched(y[a],v),E&&attachOriginToPatched(y[i],E),!0}let y=[];for(let e=0;e<n.length;e++)y[e]=k(n[e],o);return y}function findEventTasks(e,t){if(!t){const n=[];for(let o in e){const r=EVENT_NAME_SYMBOL_REGX.exec(o);let s=r&&r[1];if(s&&(!t||s===t)){const t=e[o];if(t)for(let e=0;e<t.length;e++)n.push(t[e])}}return n}let n=zoneSymbolEventNames[t];n||(prepareEventNames(t),n=zoneSymbolEventNames[t]);const o=e[n[FALSE_STR]],r=e[n[TRUE_STR]];return o?r?o.concat(r):o.slice():r?r.slice():[]}function patchQueueMicrotask(e,t){t.patchMethod(e,"queueMicrotask",(e=>function(e,t){Zone.current.scheduleMicroTask("queueMicrotask",t[0])}))}Zone.__load_patch("EventEmitter",((e,t,n)=>{const o="addListener",r="removeListener",s=function(e,t){return e.callback===t||e.callback.listener===t},i=function(e){return"string"==typeof e?e:e?e.toString().replace("(","_").replace(")","_"):""};let a;try{a=require("events")}catch(e){}a&&a.EventEmitter&&function c(t){const a=patchEventTarget(e,n,[t],{useG:!1,add:o,rm:r,prepend:"prependListener",rmAll:"removeAllListeners",listeners:"listeners",chkDup:!1,rt:!0,diff:s,eventNameToString:i});a&&a[0]&&(t.on=t[o],t.off=t[r])}(a.EventEmitter.prototype)})),Zone.__load_patch("fs",((e,t,n)=>{let o;try{o=require("fs")}catch(e){}if(!o)return;["access","appendFile","chmod","chown","close","exists","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","read","readdir","readFile","readlink","realpath","rename","rmdir","stat","symlink","truncate","unlink","utimes","write","writeFile"].filter((e=>!!o[e]&&"function"==typeof o[e])).forEach((e=>{patchMacroTask(o,e,((t,n)=>({name:"fs."+e,args:n,cbIdx:n.length>0?n.length-1:-1,target:t})))}));const r=o.realpath?.[n.symbol("OriginalDelegate")];r?.native&&(o.realpath.native=r.native,patchMacroTask(o.realpath,"native",((e,t)=>({args:t,target:e,cbIdx:t.length>0?t.length-1:-1,name:"fs.realpath.native"}))))}));const taskSymbol=zoneSymbol("zoneTask");function patchTimer(e,t,n,o){let r=null,s=null;n+=o;const i={};function a(t){const n=t.data;return n.args[0]=function(){return t.invoke.apply(this,arguments)},n.handleId=r.apply(e,n.args),t}function c(t){return s.call(e,t.data.handleId)}r=patchMethod(e,t+=o,(n=>function(r,s){if("function"==typeof s[0]){const e={isPeriodic:"Interval"===o,delay:"Timeout"===o||"Interval"===o?s[1]||0:void 0,args:s},n=s[0];s[0]=function t(){try{return n.apply(this,arguments)}finally{e.isPeriodic||("number"==typeof e.handleId?delete i[e.handleId]:e.handleId&&(e.handleId[taskSymbol]=null))}};const r=scheduleMacroTaskWithCurrentZone(t,s[0],e,a,c);if(!r)return r;const l=r.data.handleId;return"number"==typeof l?i[l]=r:l&&(l[taskSymbol]=r),l&&l.ref&&l.unref&&"function"==typeof l.ref&&"function"==typeof l.unref&&(r.ref=l.ref.bind(l),r.unref=l.unref.bind(l)),"number"==typeof l||l?l:r}return n.apply(e,s)})),s=patchMethod(e,n,(t=>function(n,o){const r=o[0];let s;"number"==typeof r?s=i[r]:(s=r&&r[taskSymbol],s||(s=r)),s&&"string"==typeof s.type?"notScheduled"!==s.state&&(s.cancelFn&&s.data.isPeriodic||0===s.runCount)&&("number"==typeof r?delete i[r]:r&&(r[taskSymbol]=null),s.zone.cancelTask(s)):t.apply(e,o)}))}const set="set",clear="clear";Zone.__load_patch("node_timers",((e,t)=>{let n=!1;try{const t=require("timers");if(e.setTimeout!==t.setTimeout&&!isMix){const o=t.setTimeout;t.setTimeout=function(){return n=!0,o.apply(this,arguments)};const r=e.setTimeout((()=>{}),100);clearTimeout(r),t.setTimeout=o}patchTimer(t,set,clear,"Timeout"),patchTimer(t,set,clear,"Interval"),patchTimer(t,set,clear,"Immediate")}catch(e){}isMix||(n?(e[t.__symbol__("setTimeout")]=e.setTimeout,e[t.__symbol__("setInterval")]=e.setInterval,e[t.__symbol__("setImmediate")]=e.setImmediate):(patchTimer(e,set,clear,"Timeout"),patchTimer(e,set,clear,"Interval"),patchTimer(e,set,clear,"Immediate")))})),Zone.__load_patch("nextTick",(()=>{patchMicroTask(process,"nextTick",((e,t)=>({name:"process.nextTick",args:t,cbIdx:t.length>0&&"function"==typeof t[0]?0:-1,target:process})))})),Zone.__load_patch("handleUnhandledPromiseRejection",((e,t,n)=>{function o(e){return function(t){findEventTasks(process,e).forEach((n=>{"unhandledRejection"===e?n.invoke(t.rejection,t.promise):"rejectionHandled"===e&&n.invoke(t.promise)}))}}t[n.symbol("unhandledPromiseRejectionHandler")]=o("unhandledRejection"),t[n.symbol("rejectionHandledHandler")]=o("rejectionHandled")})),Zone.__load_patch("crypto",(()=>{let e;try{e=require("crypto")}catch(e){}e&&["randomBytes","pbkdf2"].forEach((t=>{patchMacroTask(e,t,((n,o)=>({name:"crypto."+t,args:o,cbIdx:o.length>0&&"function"==typeof o[o.length-1]?o.length-1:-1,target:e})))}))})),Zone.__load_patch("console",((e,t)=>{["dir","log","info","error","warn","assert","debug","timeEnd","trace"].forEach((e=>{const n=console[t.__symbol__(e)]=console[e];n&&(console[e]=function(){const e=ArraySlice.call(arguments);return t.current===t.root?n.apply(this,e):t.root.run(n,this,e)})}))})),Zone.__load_patch("queueMicrotask",((e,t,n)=>{patchQueueMicrotask(e,n)}));
*/const global=globalThis;function __symbol__(e){return(global.__Zone_symbol_prefix||"__zone_symbol__")+e}function initZone(){const e=global.performance;function t(t){e&&e.mark&&e.mark(t)}function n(t,n){e&&e.measure&&e.measure(t,n)}t("Zone");class o{static{this.__symbol__=__symbol__}static assertZonePatched(){if(global.Promise!==P.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let e=o.current;for(;e.parent;)e=e.parent;return e}static get current(){return O.zone}static get currentTask(){return z}static __load_patch(e,r,s=!1){if(P.hasOwnProperty(e)){const t=!0===global[__symbol__("forceDuplicateZoneCheck")];if(!s&&t)throw Error("Already loaded patch: "+e)}else if(!global["__Zone_disable_"+e]){const s="Zone:"+e;t(s),P[e]=r(global,o,Z),n(s,s)}}get parent(){return this._parent}get name(){return this._name}constructor(e,t){this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new s(this,this._parent&&this._parent._zoneDelegate,t)}get(e){const t=this.getZoneWith(e);if(t)return t._properties[e]}getZoneWith(e){let t=this;for(;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null}fork(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)}wrap(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);const n=this._zoneDelegate.intercept(this,e,t),o=this;return function(){return o.runGuarded(n,this,arguments,t)}}run(e,t,n,o){O={parent:O,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,o)}finally{O=O.parent}}runGuarded(e,t=null,n,o){O={parent:O,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,o)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{O=O.parent}}runTask(e,t,n){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||k).name+"; Execution: "+this.name+")");if(e.state===y&&(e.type===w||e.type===S))return;const o=e.state!=g;o&&e._transitionTo(g,T),e.runCount++;const r=z;z=e,O={parent:O,zone:this};try{e.type==S&&e.data&&!e.data.isPeriodic&&(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,e,t,n)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{e.state!==y&&e.state!==E&&(e.type==w||e.data&&e.data.isPeriodic?o&&e._transitionTo(T,g):(e.runCount=0,this._updateTaskCount(e,-1),o&&e._transitionTo(y,g,y))),O=O.parent,z=r}}scheduleTask(e){if(e.zone&&e.zone!==this){let t=this;for(;t;){if(t===e.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${e.zone.name}`);t=t.parent}}e._transitionTo(m,y);const t=[];e._zoneDelegates=t,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(t){throw e._transitionTo(E,m,y),this._zoneDelegate.handleError(this,t),t}return e._zoneDelegates===t&&this._updateTaskCount(e,1),e.state==m&&e._transitionTo(T,m),e}scheduleMicroTask(e,t,n,o){return this.scheduleTask(new i(v,e,t,n,o,void 0))}scheduleMacroTask(e,t,n,o,r){return this.scheduleTask(new i(S,e,t,n,o,r))}scheduleEventTask(e,t,n,o,r){return this.scheduleTask(new i(w,e,t,n,o,r))}cancelTask(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||k).name+"; Execution: "+this.name+")");if(e.state===T||e.state===g){e._transitionTo(b,T,g);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(E,b),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(y,b),e.runCount=0,e}}_updateTaskCount(e,t){const n=e._zoneDelegates;-1==t&&(e._zoneDelegates=null);for(let o=0;o<n.length;o++)n[o]._updateTaskCount(e.type,t)}}const r={name:"",onHasTask:(e,t,n,o)=>e.hasTask(n,o),onScheduleTask:(e,t,n,o)=>e.scheduleTask(n,o),onInvokeTask:(e,t,n,o,r,s)=>e.invokeTask(n,o,r,s),onCancelTask:(e,t,n,o)=>e.cancelTask(n,o)};class s{get zone(){return this._zone}constructor(e,t,n){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this._zone=e,this._parentDelegate=t,this._forkZS=n&&(n&&n.onFork?n:t._forkZS),this._forkDlgt=n&&(n.onFork?t:t._forkDlgt),this._forkCurrZone=n&&(n.onFork?this._zone:t._forkCurrZone),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this._zone:t._interceptCurrZone),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this._zone:t._invokeCurrZone),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this._zone:t._handleErrorCurrZone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this._zone:t._scheduleTaskCurrZone),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this._zone:t._invokeTaskCurrZone),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this._zone:t._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const o=n&&n.onHasTask;(o||t&&t._hasTaskZS)&&(this._hasTaskZS=o?n:r,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=this._zone,n.onScheduleTask||(this._scheduleTaskZS=r,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this._zone),n.onInvokeTask||(this._invokeTaskZS=r,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this._zone),n.onCancelTask||(this._cancelTaskZS=r,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this._zone))}fork(e,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,t):new o(e,t)}intercept(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,e,t,n):t}invoke(e,t,n,o,r){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,e,t,n,o,r):t.apply(n,o)}handleError(e,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,e,t)}scheduleTask(e,t){let n=t;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,e,t),n||(n=t);else if(t.scheduleFn)t.scheduleFn(t);else{if(t.type!=v)throw new Error("Task is missing scheduleFn.");_(t)}return n}invokeTask(e,t,n,o){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,e,t,n,o):t.callback.apply(n,o)}cancelTask(e,t){let n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,e,t);else{if(!t.cancelFn)throw Error("Task is not cancelable");n=t.cancelFn(t)}return n}hasTask(e,t){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,e,t)}catch(t){this.handleError(e,t)}}_updateTaskCount(e,t){const n=this._taskCounts,o=n[e],r=n[e]=o+t;if(r<0)throw new Error("More tasks executed then were scheduled.");0!=o&&0!=r||this.hasTask(this._zone,{microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e})}}class i{constructor(e,t,n,o,r,s){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=e,this.source=t,this.data=o,this.scheduleFn=r,this.cancelFn=s,!n)throw new Error("callback is not defined");this.callback=n;const a=this;this.invoke=e===w&&o&&o.useG?i.invokeTask:function(){return i.invokeTask.call(global,a,this,arguments)}}static invokeTask(e,t,n){e||(e=this),D++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{1==D&&d(),D--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(y,m)}_transitionTo(e,t,n){if(this._state!==t&&this._state!==n)throw new Error(`${this.type} '${this.source}': can not transition to '${e}', expecting state '${t}'${n?" or '"+n+"'":""}, was '${this._state}'.`);this._state=e,e==y&&(this._zoneDelegates=null)}toString(){return this.data&&void 0!==this.data.handleId?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}const a=__symbol__("setTimeout"),c=__symbol__("Promise"),l=__symbol__("then");let h,u=[],p=!1;function f(e){if(h||global[c]&&(h=global[c].resolve(0)),h){let t=h[l];t||(t=h.then),t.call(h,e)}else global[a](e,0)}function _(e){0===D&&0===u.length&&f(d),e&&u.push(e)}function d(){if(!p){for(p=!0;u.length;){const e=u;u=[];for(let t=0;t<e.length;t++){const n=e[t];try{n.zone.runTask(n,null,null)}catch(e){Z.onUnhandledError(e)}}}Z.microtaskDrainDone(),p=!1}}const k={name:"NO ZONE"},y="notScheduled",m="scheduling",T="scheduled",g="running",b="canceling",E="unknown",v="microTask",S="macroTask",w="eventTask",P={},Z={symbol:__symbol__,currentZoneFrame:()=>O,onUnhandledError:N,microtaskDrainDone:N,scheduleMicroTask:_,showUncaughtError:()=>!o[__symbol__("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:N,patchMethod:()=>N,bindArguments:()=>[],patchThen:()=>N,patchMacroTask:()=>N,patchEventPrototype:()=>N,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>N,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>N,wrapWithCurrentZone:()=>N,filterProperties:()=>[],attachOriginToPatched:()=>N,_redefineProperty:()=>N,patchCallbacks:()=>N,nativeScheduleMicroTask:f};let O={parent:null,zone:new o(null,null)},z=null,D=0;function N(){}return n("Zone","Zone"),o}const ObjectGetOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,ObjectDefineProperty=Object.defineProperty,ObjectGetPrototypeOf=Object.getPrototypeOf,ArraySlice=Array.prototype.slice,ADD_EVENT_LISTENER_STR="addEventListener",REMOVE_EVENT_LISTENER_STR="removeEventListener",TRUE_STR="true",FALSE_STR="false",ZONE_SYMBOL_PREFIX=__symbol__("");function wrapWithCurrentZone(e,t){return Zone.current.wrap(e,t)}function scheduleMacroTaskWithCurrentZone(e,t,n,o,r){return Zone.current.scheduleMacroTask(e,t,n,o,r)}const zoneSymbol=__symbol__,isWindowExists="undefined"!=typeof window,internalWindow=isWindowExists?window:void 0,_global=isWindowExists&&internalWindow||globalThis,REMOVE_ATTRIBUTE="removeAttribute";function bindArguments(e,t){for(let n=e.length-1;n>=0;n--)"function"==typeof e[n]&&(e[n]=wrapWithCurrentZone(e[n],t+"_"+n));return e}function isPropertyWritable(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&void 0===e.set)}const isWebWorker="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,isNode=!("nw"in _global)&&void 0!==_global.process&&"[object process]"==={}.toString.call(_global.process),isBrowser=!isNode&&!isWebWorker&&!(!isWindowExists||!internalWindow.HTMLElement),isMix=void 0!==_global.process&&"[object process]"==={}.toString.call(_global.process)&&!isWebWorker&&!(!isWindowExists||!internalWindow.HTMLElement),zoneSymbolEventNames$1={},wrapFn=function(e){if(!(e=e||_global.event))return;let t=zoneSymbolEventNames$1[e.type];t||(t=zoneSymbolEventNames$1[e.type]=zoneSymbol("ON_PROPERTY"+e.type));const n=this||e.target||_global,o=n[t];let r;return isBrowser&&n===internalWindow&&"error"===e.type?(r=o&&o.call(this,e.message,e.filename,e.lineno,e.colno,e.error),!0===r&&e.preventDefault()):(r=o&&o.apply(this,arguments),null==r||r||e.preventDefault()),r};function patchProperty(e,t,n){let o=ObjectGetOwnPropertyDescriptor(e,t);if(!o&&n&&ObjectGetOwnPropertyDescriptor(n,t)&&(o={enumerable:!0,configurable:!0}),!o||!o.configurable)return;const r=zoneSymbol("on"+t+"patched");if(e.hasOwnProperty(r)&&e[r])return;delete o.writable,delete o.value;const s=o.get,i=o.set,a=t.slice(2);let c=zoneSymbolEventNames$1[a];c||(c=zoneSymbolEventNames$1[a]=zoneSymbol("ON_PROPERTY"+a)),o.set=function(t){let n=this;n||e!==_global||(n=_global),n&&("function"==typeof n[c]&&n.removeEventListener(a,wrapFn),i&&i.call(n,null),n[c]=t,"function"==typeof t&&n.addEventListener(a,wrapFn,!1))},o.get=function(){let n=this;if(n||e!==_global||(n=_global),!n)return null;const r=n[c];if(r)return r;if(s){let e=s.call(this);if(e)return o.set.call(this,e),"function"==typeof n[REMOVE_ATTRIBUTE]&&n.removeAttribute(t),e}return null},ObjectDefineProperty(e,t,o),e[r]=!0}function patchOnProperties(e,t,n){if(t)for(let o=0;o<t.length;o++)patchProperty(e,"on"+t[o],n);else{const t=[];for(const n in e)"on"==n.slice(0,2)&&t.push(n);for(let o=0;o<t.length;o++)patchProperty(e,t[o],n)}}function copySymbolProperties(e,t){"function"==typeof Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach((n=>{const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,{get:function(){return e[n]},set:function(t){(!o||o.writable&&"function"==typeof o.set)&&(e[n]=t)},enumerable:!o||o.enumerable,configurable:!o||o.configurable})}))}let shouldCopySymbolProperties=!1;function setShouldCopySymbolProperties(e){shouldCopySymbolProperties=e}function patchMethod(e,t,n){let o=e;for(;o&&!o.hasOwnProperty(t);)o=ObjectGetPrototypeOf(o);!o&&e[t]&&(o=e);const r=zoneSymbol(t);let s=null;if(o&&(!(s=o[r])||!o.hasOwnProperty(r))&&(s=o[r]=o[t],isPropertyWritable(o&&ObjectGetOwnPropertyDescriptor(o,t)))){const e=n(s,r,t);o[t]=function(){return e(this,arguments)},attachOriginToPatched(o[t],s),shouldCopySymbolProperties&&copySymbolProperties(s,o[t])}return s}function patchMacroTask(e,t,n){let o=null;function r(e){const t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},o.apply(t.target,t.args),e}o=patchMethod(e,t,(e=>function(t,o){const s=n(t,o);return s.cbIdx>=0&&"function"==typeof o[s.cbIdx]?scheduleMacroTaskWithCurrentZone(s.name,o[s.cbIdx],s,r):e.apply(t,o)}))}function patchMicroTask(e,t,n){let o=null;function r(e){const t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},o.apply(t.target,t.args),e}o=patchMethod(e,t,(e=>function(t,o){const s=n(t,o);return s.cbIdx>=0&&"function"==typeof o[s.cbIdx]?Zone.current.scheduleMicroTask(s.name,o[s.cbIdx],s,r):e.apply(t,o)}))}function attachOriginToPatched(e,t){e[zoneSymbol("OriginalDelegate")]=t}function patchPromise(e){e.__load_patch("ZoneAwarePromise",((e,t,n)=>{const o=Object.getOwnPropertyDescriptor,r=Object.defineProperty,s=n.symbol,i=[],a=!1!==e[s("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],c=s("Promise"),l=s("then"),h="__creationTrace__";n.onUnhandledError=e=>{if(n.showUncaughtError()){const t=e&&e.rejection;t?console.error("Unhandled Promise rejection:",t instanceof Error?t.message:t,"; Zone:",e.zone.name,"; Task:",e.task&&e.task.source,"; Value:",t,t instanceof Error?t.stack:void 0):console.error(e)}},n.microtaskDrainDone=()=>{for(;i.length;){const e=i.shift();try{e.zone.runGuarded((()=>{if(e.throwOriginal)throw e.rejection;throw e}))}catch(e){p(e)}}};const u=s("unhandledPromiseRejectionHandler");function p(e){n.onUnhandledError(e);try{const n=t[u];"function"==typeof n&&n.call(this,e)}catch(e){}}function f(e){return e&&e.then}function _(e){return e}function d(e){return M.reject(e)}const k=s("state"),y=s("value"),m=s("finally"),T=s("parentPromiseValue"),g=s("parentPromiseState"),b="Promise.then",E=null,v=!0,S=!1,w=0;function P(e,t){return n=>{try{D(e,t,n)}catch(t){D(e,!1,t)}}}const Z=function(){let e=!1;return function t(n){return function(){e||(e=!0,n.apply(null,arguments))}}},O="Promise resolved with itself",z=s("currentTaskTrace");function D(e,o,s){const c=Z();if(e===s)throw new TypeError(O);if(e[k]===E){let l=null;try{"object"!=typeof s&&"function"!=typeof s||(l=s&&s.then)}catch(t){return c((()=>{D(e,!1,t)}))(),e}if(o!==S&&s instanceof M&&s.hasOwnProperty(k)&&s.hasOwnProperty(y)&&s[k]!==E)C(s),D(e,s[k],s[y]);else if(o!==S&&"function"==typeof l)try{l.call(s,c(P(e,o)),c(P(e,!1)))}catch(t){c((()=>{D(e,!1,t)}))()}else{e[k]=o;const c=e[y];if(e[y]=s,e[m]===m&&o===v&&(e[k]=e[g],e[y]=e[T]),o===S&&s instanceof Error){const e=t.currentTask&&t.currentTask.data&&t.currentTask.data[h];e&&r(s,z,{configurable:!0,enumerable:!1,writable:!0,value:e})}for(let t=0;t<c.length;)R(e,c[t++],c[t++],c[t++],c[t++]);if(0==c.length&&o==S){e[k]=w;let o=s;try{throw new Error("Uncaught (in promise): "+function e(t){return t&&t.toString===Object.prototype.toString?(t.constructor&&t.constructor.name||"")+": "+JSON.stringify(t):t?t.toString():Object.prototype.toString.call(t)}(s)+(s&&s.stack?"\n"+s.stack:""))}catch(e){o=e}a&&(o.throwOriginal=!0),o.rejection=s,o.promise=e,o.zone=t.current,o.task=t.currentTask,i.push(o),n.scheduleMicroTask()}}}return e}const N=s("rejectionHandledHandler");function C(e){if(e[k]===w){try{const n=t[N];n&&"function"==typeof n&&n.call(this,{rejection:e[y],promise:e})}catch(e){}e[k]=S;for(let t=0;t<i.length;t++)e===i[t].promise&&i.splice(t,1)}}function R(e,t,n,o,r){C(e);const s=e[k],i=s?"function"==typeof o?o:_:"function"==typeof r?r:d;t.scheduleMicroTask(b,(()=>{try{const o=e[y],r=!!n&&m===n[m];r&&(n[T]=o,n[g]=s);const a=t.run(i,void 0,r&&i!==d&&i!==_?[]:[o]);D(n,!0,a)}catch(e){D(n,!1,e)}}),n)}const j=function(){},I=e.AggregateError;class M{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(e){return e instanceof M?e:D(new this(null),v,e)}static reject(e){return D(new this(null),S,e)}static withResolvers(){const e={};return e.promise=new M(((t,n)=>{e.resolve=t,e.reject=n})),e}static any(e){if(!e||"function"!=typeof e[Symbol.iterator])return Promise.reject(new I([],"All promises were rejected"));const t=[];let n=0;try{for(let o of e)n++,t.push(M.resolve(o))}catch(e){return Promise.reject(new I([],"All promises were rejected"))}if(0===n)return Promise.reject(new I([],"All promises were rejected"));let o=!1;const r=[];return new M(((e,s)=>{for(let i=0;i<t.length;i++)t[i].then((t=>{o||(o=!0,e(t))}),(e=>{r.push(e),n--,0===n&&(o=!0,s(new I(r,"All promises were rejected")))}))}))}static race(e){let t,n,o=new this(((e,o)=>{t=e,n=o}));function r(e){t(e)}function s(e){n(e)}for(let t of e)f(t)||(t=this.resolve(t)),t.then(r,s);return o}static all(e){return M.allWithCallback(e)}static allSettled(e){return(this&&this.prototype instanceof M?this:M).allWithCallback(e,{thenCallback:e=>({status:"fulfilled",value:e}),errorCallback:e=>({status:"rejected",reason:e})})}static allWithCallback(e,t){let n,o,r=new this(((e,t)=>{n=e,o=t})),s=2,i=0;const a=[];for(let r of e){f(r)||(r=this.resolve(r));const e=i;try{r.then((o=>{a[e]=t?t.thenCallback(o):o,s--,0===s&&n(a)}),(r=>{t?(a[e]=t.errorCallback(r),s--,0===s&&n(a)):o(r)}))}catch(e){o(e)}s++,i++}return s-=2,0===s&&n(a),r}constructor(e){const t=this;if(!(t instanceof M))throw new Error("Must be an instanceof Promise.");t[k]=E,t[y]=[];try{const n=Z();e&&e(n(P(t,v)),n(P(t,S)))}catch(e){D(t,!1,e)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return M}then(e,n){let o=this.constructor?.[Symbol.species];o&&"function"==typeof o||(o=this.constructor||M);const r=new o(j),s=t.current;return this[k]==E?this[y].push(s,r,e,n):R(this,s,r,e,n),r}catch(e){return this.then(null,e)}finally(e){let n=this.constructor?.[Symbol.species];n&&"function"==typeof n||(n=M);const o=new n(j);o[m]=m;const r=t.current;return this[k]==E?this[y].push(r,o,e,e):R(this,r,o,e,e),o}}M.resolve=M.resolve,M.reject=M.reject,M.race=M.race,M.all=M.all;const A=e[c]=e.Promise;e.Promise=M;const L=s("thenPatched");function F(e){const t=e.prototype,n=o(t,"then");if(n&&(!1===n.writable||!n.configurable))return;const r=t.then;t[l]=r,e.prototype.then=function(e,t){return new M(((e,t)=>{r.call(this,e,t)})).then(e,t)},e[L]=!0}return n.patchThen=F,A&&(F(A),patchMethod(e,"fetch",(e=>function t(e){return function(t,n){let o=e.apply(t,n);if(o instanceof M)return o;let r=o.constructor;return r[L]||F(r),o}}(e)))),Promise[t.__symbol__("uncaughtPromiseErrors")]=i,M}))}function patchToString(e){e.__load_patch("toString",(e=>{const t=Function.prototype.toString,n=zoneSymbol("OriginalDelegate"),o=zoneSymbol("Promise"),r=zoneSymbol("Error"),s=function s(){if("function"==typeof this){const s=this[n];if(s)return"function"==typeof s?t.call(s):Object.prototype.toString.call(s);if(this===Promise){const n=e[o];if(n)return t.call(n)}if(this===Error){const n=e[r];if(n)return t.call(n)}}return t.call(this)};s[n]=t,Function.prototype.toString=s;const i=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":i.call(this)}}))}function loadZone(){const e=globalThis,t=!0===e[__symbol__("forceDuplicateZoneCheck")];if(e.Zone&&(t||"function"!=typeof e.Zone.__symbol__))throw new Error("Zone already loaded.");return e.Zone??=initZone(),e.Zone}let passiveSupported=!1;if("undefined"!=typeof window)try{const e=Object.defineProperty({},"passive",{get:function(){passiveSupported=!0}});window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){passiveSupported=!1}const OPTIMIZED_ZONE_EVENT_TASK_DATA={useG:!0},zoneSymbolEventNames={},globalSources={},EVENT_NAME_SYMBOL_REGX=new RegExp("^"+ZONE_SYMBOL_PREFIX+"(\\w+)(true|false)$"),IMMEDIATE_PROPAGATION_SYMBOL=zoneSymbol("propagationStopped");function prepareEventNames(e,t){const n=(t?t(e):e)+FALSE_STR,o=(t?t(e):e)+TRUE_STR,r=ZONE_SYMBOL_PREFIX+n,s=ZONE_SYMBOL_PREFIX+o;zoneSymbolEventNames[e]={},zoneSymbolEventNames[e][FALSE_STR]=r,zoneSymbolEventNames[e][TRUE_STR]=s}function patchEventTarget(e,t,n,o){const r=o&&o.add||ADD_EVENT_LISTENER_STR,s=o&&o.rm||REMOVE_EVENT_LISTENER_STR,i=o&&o.listeners||"eventListeners",a=o&&o.rmAll||"removeAllListeners",c=zoneSymbol(r),l="."+r+":",h="prependListener",u="."+h+":",p=function(e,t,n){if(e.isRemoved)return;const o=e.callback;let r;"object"==typeof o&&o.handleEvent&&(e.callback=e=>o.handleEvent(e),e.originalDelegate=o);try{e.invoke(e,t,[n])}catch(e){r=e}const i=e.options;return i&&"object"==typeof i&&i.once&&t[s].call(t,n.type,e.originalDelegate?e.originalDelegate:e.callback,i),r};function f(n,o,r){if(!(o=o||e.event))return;const s=n||o.target||e,i=s[zoneSymbolEventNames[o.type][r?TRUE_STR:FALSE_STR]];if(i){const e=[];if(1===i.length){const t=p(i[0],s,o);t&&e.push(t)}else{const t=i.slice();for(let n=0;n<t.length&&(!o||!0!==o[IMMEDIATE_PROPAGATION_SYMBOL]);n++){const r=p(t[n],s,o);r&&e.push(r)}}if(1===e.length)throw e[0];for(let n=0;n<e.length;n++){const o=e[n];t.nativeScheduleMicroTask((()=>{throw o}))}}}const _=function(e){return f(this,e,!1)},d=function(e){return f(this,e,!0)};function k(t,n){if(!t)return!1;let o=!0;n&&void 0!==n.useG&&(o=n.useG);const p=n&&n.vh;let f=!0;n&&void 0!==n.chkDup&&(f=n.chkDup);let k=!1;n&&void 0!==n.rt&&(k=n.rt);let y=t;for(;y&&!y.hasOwnProperty(r);)y=ObjectGetPrototypeOf(y);if(!y&&t[r]&&(y=t),!y)return!1;if(y[c])return!1;const m=n&&n.eventNameToString,T={},g=y[c]=y[r],b=y[zoneSymbol(s)]=y[s],E=y[zoneSymbol(i)]=y[i],v=y[zoneSymbol(a)]=y[a];let S;n&&n.prepend&&(S=y[zoneSymbol(n.prepend)]=y[n.prepend]);const w=o?function(e){if(!T.isExisting)return g.call(T.target,T.eventName,T.capture?d:_,T.options)}:function(e){return g.call(T.target,T.eventName,e.invoke,T.options)},P=o?function(e){if(!e.isRemoved){const t=zoneSymbolEventNames[e.eventName];let n;t&&(n=t[e.capture?TRUE_STR:FALSE_STR]);const o=n&&e.target[n];if(o)for(let t=0;t<o.length;t++)if(o[t]===e){o.splice(t,1),e.isRemoved=!0,0===o.length&&(e.allRemoved=!0,e.target[n]=null);break}}if(e.allRemoved)return b.call(e.target,e.eventName,e.capture?d:_,e.options)}:function(e){return b.call(e.target,e.eventName,e.invoke,e.options)},Z=n&&n.diff?n.diff:function(e,t){const n=typeof t;return"function"===n&&e.callback===t||"object"===n&&e.originalDelegate===t},O=Zone[zoneSymbol("UNPATCHED_EVENTS")],z=e[zoneSymbol("PASSIVE_EVENTS")],D=function(t,r,s,i,a=!1,c=!1){return function(){const l=this||e;let h=arguments[0];n&&n.transferEventName&&(h=n.transferEventName(h));let u=arguments[1];if(!u)return t.apply(this,arguments);if(isNode&&"uncaughtException"===h)return t.apply(this,arguments);let _=!1;if("function"!=typeof u){if(!u.handleEvent)return t.apply(this,arguments);_=!0}if(p&&!p(t,u,l,arguments))return;const d=passiveSupported&&!!z&&-1!==z.indexOf(h),k=function y(e,t){return!passiveSupported&&"object"==typeof e&&e?!!e.capture:passiveSupported&&t?"boolean"==typeof e?{capture:e,passive:!0}:e?"object"==typeof e&&!1!==e.passive?{...e,passive:!0}:e:{passive:!0}:e}(arguments[2],d),g=k&&"object"==typeof k&&k.signal&&"object"==typeof k.signal?k.signal:void 0;if(g?.aborted)return;if(O)for(let e=0;e<O.length;e++)if(h===O[e])return d?t.call(l,h,u,k):t.apply(this,arguments);const b=!!k&&("boolean"==typeof k||k.capture),E=!(!k||"object"!=typeof k)&&k.once,v=Zone.current;let S=zoneSymbolEventNames[h];S||(prepareEventNames(h,m),S=zoneSymbolEventNames[h]);const w=S[b?TRUE_STR:FALSE_STR];let P,D=l[w],N=!1;if(D){if(N=!0,f)for(let e=0;e<D.length;e++)if(Z(D[e],u))return}else D=l[w]=[];const C=l.constructor.name,R=globalSources[C];R&&(P=R[h]),P||(P=C+r+(m?m(h):h)),T.options=k,E&&(T.options.once=!1),T.target=l,T.capture=b,T.eventName=h,T.isExisting=N;const j=o?OPTIMIZED_ZONE_EVENT_TASK_DATA:void 0;j&&(j.taskData=T),g&&(T.options.signal=void 0);const I=v.scheduleEventTask(P,u,j,s,i);return g&&(T.options.signal=g,t.call(g,"abort",(()=>{I.zone.cancelTask(I)}),{once:!0})),T.target=null,j&&(j.taskData=null),E&&(k.once=!0),(passiveSupported||"boolean"!=typeof I.options)&&(I.options=k),I.target=l,I.capture=b,I.eventName=h,_&&(I.originalDelegate=u),c?D.unshift(I):D.push(I),a?l:void 0}};return y[r]=D(g,l,w,P,k),S&&(y[h]=D(S,u,(function(e){return S.call(T.target,T.eventName,e.invoke,T.options)}),P,k,!0)),y[s]=function(){const t=this||e;let o=arguments[0];n&&n.transferEventName&&(o=n.transferEventName(o));const r=arguments[2],s=!!r&&("boolean"==typeof r||r.capture),i=arguments[1];if(!i)return b.apply(this,arguments);if(p&&!p(b,i,t,arguments))return;const a=zoneSymbolEventNames[o];let c;a&&(c=a[s?TRUE_STR:FALSE_STR]);const l=c&&t[c];if(l)for(let e=0;e<l.length;e++){const n=l[e];if(Z(n,i))return l.splice(e,1),n.isRemoved=!0,0!==l.length||(n.allRemoved=!0,t[c]=null,s||"string"!=typeof o)||(t[ZONE_SYMBOL_PREFIX+"ON_PROPERTY"+o]=null),n.zone.cancelTask(n),k?t:void 0}return b.apply(this,arguments)},y[i]=function(){const t=this||e;let o=arguments[0];n&&n.transferEventName&&(o=n.transferEventName(o));const r=[],s=findEventTasks(t,m?m(o):o);for(let e=0;e<s.length;e++){const t=s[e];r.push(t.originalDelegate?t.originalDelegate:t.callback)}return r},y[a]=function(){const t=this||e;let o=arguments[0];if(o){n&&n.transferEventName&&(o=n.transferEventName(o));const e=zoneSymbolEventNames[o];if(e){const n=t[e[FALSE_STR]],r=t[e[TRUE_STR]];if(n){const e=n.slice();for(let t=0;t<e.length;t++){const n=e[t];this[s].call(this,o,n.originalDelegate?n.originalDelegate:n.callback,n.options)}}if(r){const e=r.slice();for(let t=0;t<e.length;t++){const n=e[t];this[s].call(this,o,n.originalDelegate?n.originalDelegate:n.callback,n.options)}}}}else{const e=Object.keys(t);for(let t=0;t<e.length;t++){const n=EVENT_NAME_SYMBOL_REGX.exec(e[t]);let o=n&&n[1];o&&"removeListener"!==o&&this[a].call(this,o)}this[a].call(this,"removeListener")}if(k)return this},attachOriginToPatched(y[r],g),attachOriginToPatched(y[s],b),v&&attachOriginToPatched(y[a],v),E&&attachOriginToPatched(y[i],E),!0}let y=[];for(let e=0;e<n.length;e++)y[e]=k(n[e],o);return y}function findEventTasks(e,t){if(!t){const n=[];for(let o in e){const r=EVENT_NAME_SYMBOL_REGX.exec(o);let s=r&&r[1];if(s&&(!t||s===t)){const t=e[o];if(t)for(let e=0;e<t.length;e++)n.push(t[e])}}return n}let n=zoneSymbolEventNames[t];n||(prepareEventNames(t),n=zoneSymbolEventNames[t]);const o=e[n[FALSE_STR]],r=e[n[TRUE_STR]];return o?r?o.concat(r):o.slice():r?r.slice():[]}function patchQueueMicrotask(e,t){t.patchMethod(e,"queueMicrotask",(e=>function(e,t){Zone.current.scheduleMicroTask("queueMicrotask",t[0])}))}const taskSymbol=zoneSymbol("zoneTask");function patchTimer(e,t,n,o){let r=null,s=null;n+=o;const i={};function a(t){const n=t.data;return n.args[0]=function(){return t.invoke.apply(this,arguments)},n.handleId=r.apply(e,n.args),t}function c(t){return s.call(e,t.data.handleId)}r=patchMethod(e,t+=o,(n=>function(r,s){if("function"==typeof s[0]){const e={isPeriodic:"Interval"===o,delay:"Timeout"===o||"Interval"===o?s[1]||0:void 0,args:s},n=s[0];s[0]=function t(){try{return n.apply(this,arguments)}finally{e.isPeriodic||("number"==typeof e.handleId?delete i[e.handleId]:e.handleId&&(e.handleId[taskSymbol]=null))}};const r=scheduleMacroTaskWithCurrentZone(t,s[0],e,a,c);if(!r)return r;const l=r.data.handleId;return"number"==typeof l?i[l]=r:l&&(l[taskSymbol]=r),l&&l.ref&&l.unref&&"function"==typeof l.ref&&"function"==typeof l.unref&&(r.ref=l.ref.bind(l),r.unref=l.unref.bind(l)),"number"==typeof l||l?l:r}return n.apply(e,s)})),s=patchMethod(e,n,(t=>function(n,o){const r=o[0];let s;"number"==typeof r?s=i[r]:(s=r&&r[taskSymbol],s||(s=r)),s&&"string"==typeof s.type?"notScheduled"!==s.state&&(s.cancelFn&&s.data.isPeriodic||0===s.runCount)&&("number"==typeof r?delete i[r]:r&&(r[taskSymbol]=null),s.zone.cancelTask(s)):t.apply(e,o)}))}function patchEvents(e){e.__load_patch("EventEmitter",((e,t,n)=>{const o="addListener",r="removeListener",s=function(e,t){return e.callback===t||e.callback.listener===t},i=function(e){return"string"==typeof e?e:e?e.toString().replace("(","_").replace(")","_"):""};let a;try{a=require("events")}catch(e){}a&&a.EventEmitter&&function c(t){const a=patchEventTarget(e,n,[t],{useG:!1,add:o,rm:r,prepend:"prependListener",rmAll:"removeAllListeners",listeners:"listeners",chkDup:!1,rt:!0,diff:s,eventNameToString:i});a&&a[0]&&(t.on=t[o],t.off=t[r])}(a.EventEmitter.prototype)}))}function patchFs(e){e.__load_patch("fs",((e,t,n)=>{let o;try{o=require("fs")}catch(e){}if(!o)return;["access","appendFile","chmod","chown","close","exists","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","read","readdir","readFile","readlink","realpath","rename","rmdir","stat","symlink","truncate","unlink","utimes","write","writeFile"].filter((e=>!!o[e]&&"function"==typeof o[e])).forEach((e=>{patchMacroTask(o,e,((t,n)=>({name:"fs."+e,args:n,cbIdx:n.length>0?n.length-1:-1,target:t})))}));const r=o.realpath?.[n.symbol("OriginalDelegate")];r?.native&&(o.realpath.native=r.native,patchMacroTask(o.realpath,"native",((e,t)=>({args:t,target:e,cbIdx:t.length>0?t.length-1:-1,name:"fs.realpath.native"}))))}))}function patchNodeUtil(e){e.__load_patch("node_util",((e,t,n)=>{n.patchOnProperties=patchOnProperties,n.patchMethod=patchMethod,n.bindArguments=bindArguments,n.patchMacroTask=patchMacroTask,setShouldCopySymbolProperties(!0)}))}const set="set",clear="clear";function patchNode(e){patchNodeUtil(e),patchEvents(e),patchFs(e),e.__load_patch("node_timers",((e,t)=>{let n=!1;try{const t=require("timers");if(e.setTimeout!==t.setTimeout&&!isMix){const o=t.setTimeout;t.setTimeout=function(){return n=!0,o.apply(this,arguments)};const r=e.setTimeout((()=>{}),100);clearTimeout(r),t.setTimeout=o}patchTimer(t,set,clear,"Timeout"),patchTimer(t,set,clear,"Interval"),patchTimer(t,set,clear,"Immediate")}catch(e){}isMix||(n?(e[t.__symbol__("setTimeout")]=e.setTimeout,e[t.__symbol__("setInterval")]=e.setInterval,e[t.__symbol__("setImmediate")]=e.setImmediate):(patchTimer(e,set,clear,"Timeout"),patchTimer(e,set,clear,"Interval"),patchTimer(e,set,clear,"Immediate")))})),e.__load_patch("nextTick",(()=>{patchMicroTask(process,"nextTick",((e,t)=>({name:"process.nextTick",args:t,cbIdx:t.length>0&&"function"==typeof t[0]?0:-1,target:process})))})),e.__load_patch("handleUnhandledPromiseRejection",((e,t,n)=>{function o(e){return function(t){findEventTasks(process,e).forEach((n=>{"unhandledRejection"===e?n.invoke(t.rejection,t.promise):"rejectionHandled"===e&&n.invoke(t.promise)}))}}t[n.symbol("unhandledPromiseRejectionHandler")]=o("unhandledRejection"),t[n.symbol("rejectionHandledHandler")]=o("rejectionHandled")})),e.__load_patch("crypto",(()=>{let e;try{e=require("crypto")}catch(e){}e&&["randomBytes","pbkdf2"].forEach((t=>{patchMacroTask(e,t,((n,o)=>({name:"crypto."+t,args:o,cbIdx:o.length>0&&"function"==typeof o[o.length-1]?o.length-1:-1,target:e})))}))})),e.__load_patch("console",((e,t)=>{["dir","log","info","error","warn","assert","debug","timeEnd","trace"].forEach((e=>{const n=console[t.__symbol__(e)]=console[e];n&&(console[e]=function(){const e=ArraySlice.call(arguments);return t.current===t.root?n.apply(this,e):t.root.run(n,this,e)})}))})),e.__load_patch("queueMicrotask",((e,t,n)=>{patchQueueMicrotask(e,n)}))}function rollupMain(){const e=loadZone();return patchNode(e),patchPromise(e),patchToString(e),e}rollupMain();
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/
Zone.__load_patch('canvas', (global, Zone, api) => {
const HTMLCanvasElement = global['HTMLCanvasElement'];
if (typeof HTMLCanvasElement !== 'undefined' && HTMLCanvasElement.prototype &&
HTMLCanvasElement.prototype.toBlob) {
api.patchMacroTask(HTMLCanvasElement.prototype, 'toBlob', (self, args) => {
return { name: 'HTMLCanvasElement.toBlob', target: self, cbIdx: 0, args: args };
});
}
});
function patchCanvas(Zone) {
Zone.__load_patch('canvas', (global, Zone, api) => {
const HTMLCanvasElement = global['HTMLCanvasElement'];
if (typeof HTMLCanvasElement !== 'undefined' &&
HTMLCanvasElement.prototype &&
HTMLCanvasElement.prototype.toBlob) {
api.patchMacroTask(HTMLCanvasElement.prototype, 'toBlob', (self, args) => {
return { name: 'HTMLCanvasElement.toBlob', target: self, cbIdx: 0, args: args };
});
}
});
}
patchCanvas(Zone);
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/Zone.__load_patch("canvas",((t,o,a)=>{const e=t.HTMLCanvasElement;void 0!==e&&e.prototype&&e.prototype.toBlob&&a.patchMacroTask(e.prototype,"toBlob",((t,o)=>({name:"HTMLCanvasElement.toBlob",target:t,cbIdx:0,args:o})))}));
*/function patchCanvas(t){t.__load_patch("canvas",((t,a,o)=>{const n=t.HTMLCanvasElement;void 0!==n&&n.prototype&&n.prototype.toBlob&&o.patchMacroTask(n.prototype,"toBlob",((t,a)=>({name:"HTMLCanvasElement.toBlob",target:t,cbIdx:0,args:a})))}))}patchCanvas(Zone);
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/
Zone.__load_patch('cordova', (global, Zone, api) => {
if (global.cordova) {
const SUCCESS_SOURCE = 'cordova.exec.success';
const ERROR_SOURCE = 'cordova.exec.error';
const FUNCTION = 'function';
const nativeExec = api.patchMethod(global.cordova, 'exec', () => function (self, args) {
if (args.length > 0 && typeof args[0] === FUNCTION) {
args[0] = Zone.current.wrap(args[0], SUCCESS_SOURCE);
}
if (args.length > 1 && typeof args[1] === FUNCTION) {
args[1] = Zone.current.wrap(args[1], ERROR_SOURCE);
}
return nativeExec.apply(self, args);
});
}
});
Zone.__load_patch('cordova.FileReader', (global, Zone) => {
if (global.cordova && typeof global['FileReader'] !== 'undefined') {
document.addEventListener('deviceReady', () => {
const FileReader = global['FileReader'];
['abort', 'error', 'load', 'loadstart', 'loadend', 'progress'].forEach(prop => {
const eventNameSymbol = Zone.__symbol__('ON_PROPERTY' + prop);
Object.defineProperty(FileReader.prototype, eventNameSymbol, {
configurable: true,
get: function () {
return this._realReader && this._realReader[eventNameSymbol];
}
function patchCordova(Zone) {
Zone.__load_patch('cordova', (global, Zone, api) => {
if (global.cordova) {
const SUCCESS_SOURCE = 'cordova.exec.success';
const ERROR_SOURCE = 'cordova.exec.error';
const FUNCTION = 'function';
const nativeExec = api.patchMethod(global.cordova, 'exec', () => function (self, args) {
if (args.length > 0 && typeof args[0] === FUNCTION) {
args[0] = Zone.current.wrap(args[0], SUCCESS_SOURCE);
}
if (args.length > 1 && typeof args[1] === FUNCTION) {
args[1] = Zone.current.wrap(args[1], ERROR_SOURCE);
}
return nativeExec.apply(self, args);
});
}
});
Zone.__load_patch('cordova.FileReader', (global, Zone) => {
if (global.cordova && typeof global['FileReader'] !== 'undefined') {
document.addEventListener('deviceReady', () => {
const FileReader = global['FileReader'];
['abort', 'error', 'load', 'loadstart', 'loadend', 'progress'].forEach((prop) => {
const eventNameSymbol = Zone.__symbol__('ON_PROPERTY' + prop);
Object.defineProperty(FileReader.prototype, eventNameSymbol, {
configurable: true,
get: function () {
return this._realReader && this._realReader[eventNameSymbol];
},
});
});
});
});
}
});
}
});
}
patchCordova(Zone);
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/Zone.__load_patch("cordova",((e,o,r)=>{if(e.cordova){const t="cordova.exec.success",a="cordova.exec.error",c="function",d=r.patchMethod(e.cordova,"exec",(()=>function(e,r){return r.length>0&&typeof r[0]===c&&(r[0]=o.current.wrap(r[0],t)),r.length>1&&typeof r[1]===c&&(r[1]=o.current.wrap(r[1],a)),d.apply(e,r)}))}})),Zone.__load_patch("cordova.FileReader",((e,o)=>{e.cordova&&void 0!==e.FileReader&&document.addEventListener("deviceReady",(()=>{const r=e.FileReader;["abort","error","load","loadstart","loadend","progress"].forEach((e=>{const t=o.__symbol__("ON_PROPERTY"+e);Object.defineProperty(r.prototype,t,{configurable:!0,get:function(){return this._realReader&&this._realReader[t]}})}))}))}));
*/function patchCordova(e){e.__load_patch("cordova",((e,o,r)=>{if(e.cordova){const t="cordova.exec.success",a="cordova.exec.error",c="function",d=r.patchMethod(e.cordova,"exec",(()=>function(e,r){return r.length>0&&typeof r[0]===c&&(r[0]=o.current.wrap(r[0],t)),r.length>1&&typeof r[1]===c&&(r[1]=o.current.wrap(r[1],a)),d.apply(e,r)}))}})),e.__load_patch("cordova.FileReader",((e,o)=>{e.cordova&&void 0!==e.FileReader&&document.addEventListener("deviceReady",(()=>{const r=e.FileReader;["abort","error","load","loadstart","loadend","progress"].forEach((e=>{const t=o.__symbol__("ON_PROPERTY"+e);Object.defineProperty(r.prototype,t,{configurable:!0,get:function(){return this._realReader&&this._realReader[t]}})}))}))}))}patchCordova(Zone);
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/
Zone.__load_patch('electron', (global, Zone, api) => {
function patchArguments(target, name, source) {
return api.patchMethod(target, name, (delegate) => (self, args) => {
return delegate && delegate.apply(self, api.bindArguments(args, source));
});
}
let { desktopCapturer, shell, CallbacksRegistry, ipcRenderer } = require('electron');
if (!CallbacksRegistry) {
try {
// Try to load CallbacksRegistry class from @electron/remote src
// since from electron 14+, the CallbacksRegistry is moved to @electron/remote
// package and not exported to outside, so this is a hack to patch CallbacksRegistry.
CallbacksRegistry =
require('@electron/remote/dist/src/renderer/callbacks-registry').CallbacksRegistry;
function patchElectron(Zone) {
Zone.__load_patch('electron', (global, Zone, api) => {
function patchArguments(target, name, source) {
return api.patchMethod(target, name, (delegate) => (self, args) => {
return delegate && delegate.apply(self, api.bindArguments(args, source));
});
}
catch (err) {
let { desktopCapturer, shell, CallbacksRegistry, ipcRenderer } = require('electron');
if (!CallbacksRegistry) {
try {
// Try to load CallbacksRegistry class from @electron/remote src
// since from electron 14+, the CallbacksRegistry is moved to @electron/remote
// package and not exported to outside, so this is a hack to patch CallbacksRegistry.
CallbacksRegistry =
require('@electron/remote/dist/src/renderer/callbacks-registry').CallbacksRegistry;
}
catch (err) { }
}
}
// patch api in renderer process directly
// desktopCapturer
if (desktopCapturer) {
patchArguments(desktopCapturer, 'getSources', 'electron.desktopCapturer.getSources');
}
// shell
if (shell) {
patchArguments(shell, 'openExternal', 'electron.shell.openExternal');
}
// patch api in main process through CallbackRegistry
if (!CallbacksRegistry) {
if (ipcRenderer) {
patchArguments(ipcRenderer, 'on', 'ipcRenderer.on');
// patch api in renderer process directly
// desktopCapturer
if (desktopCapturer) {
patchArguments(desktopCapturer, 'getSources', 'electron.desktopCapturer.getSources');
}
return;
}
patchArguments(CallbacksRegistry.prototype, 'add', 'CallbackRegistry.add');
});
// shell
if (shell) {
patchArguments(shell, 'openExternal', 'electron.shell.openExternal');
}
// patch api in main process through CallbackRegistry
if (!CallbacksRegistry) {
if (ipcRenderer) {
patchArguments(ipcRenderer, 'on', 'ipcRenderer.on');
}
return;
}
patchArguments(CallbacksRegistry.prototype, 'add', 'CallbackRegistry.add');
});
}
patchElectron(Zone);
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/Zone.__load_patch("electron",((e,r,t)=>{function l(e,r,l){return t.patchMethod(e,r,(e=>(r,c)=>e&&e.apply(r,t.bindArguments(c,l))))}let{desktopCapturer:c,shell:n,CallbacksRegistry:o,ipcRenderer:a}=require("electron");if(!o)try{o=require("@electron/remote/dist/src/renderer/callbacks-registry").CallbacksRegistry}catch(e){}c&&l(c,"getSources","electron.desktopCapturer.getSources"),n&&l(n,"openExternal","electron.shell.openExternal"),o?l(o.prototype,"add","CallbackRegistry.add"):a&&l(a,"on","ipcRenderer.on")}));
*/function patchElectron(e){e.__load_patch("electron",((e,r,t)=>{function c(e,r,c){return t.patchMethod(e,r,(e=>(r,l)=>e&&e.apply(r,t.bindArguments(l,c))))}let{desktopCapturer:l,shell:n,CallbacksRegistry:o,ipcRenderer:a}=require("electron");if(!o)try{o=require("@electron/remote/dist/src/renderer/callbacks-registry").CallbacksRegistry}catch(e){}l&&c(l,"getSources","electron.desktopCapturer.getSources"),n&&c(n,"openExternal","electron.shell.openExternal"),o?c(o.prototype,"add","CallbackRegistry.add"):a&&c(a,"on","ipcRenderer.on")}))}patchElectron(Zone);
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT

@@ -11,82 +11,86 @@ */

*/
Zone.__load_patch('fetch', (global, Zone, api) => {
let fetch = global['fetch'];
if (typeof fetch !== 'function') {
return;
}
const originalFetch = global[api.symbol('fetch')];
if (originalFetch) {
// restore unpatched fetch first
fetch = originalFetch;
}
const ZoneAwarePromise = global.Promise;
const symbolThenPatched = api.symbol('thenPatched');
const fetchTaskScheduling = api.symbol('fetchTaskScheduling');
const OriginalResponse = global.Response;
const placeholder = function () { };
const createFetchTask = (source, data, originalImpl, self, args, ac) => new Promise((resolve, reject) => {
const task = Zone.current.scheduleMacroTask(source, placeholder, data, () => {
// The promise object returned by the original implementation passed into the
// function. This might be a `fetch` promise, `Response.prototype.json` promise,
// etc.
let implPromise;
let zone = Zone.current;
try {
zone[fetchTaskScheduling] = true;
implPromise = originalImpl.apply(self, args);
}
catch (error) {
reject(error);
return;
}
finally {
zone[fetchTaskScheduling] = false;
}
if (!(implPromise instanceof ZoneAwarePromise)) {
let ctor = implPromise.constructor;
if (!ctor[symbolThenPatched]) {
api.patchThen(ctor);
function patchFetch(Zone) {
Zone.__load_patch('fetch', (global, Zone, api) => {
let fetch = global['fetch'];
if (typeof fetch !== 'function') {
return;
}
const originalFetch = global[api.symbol('fetch')];
if (originalFetch) {
// restore unpatched fetch first
fetch = originalFetch;
}
const ZoneAwarePromise = global.Promise;
const symbolThenPatched = api.symbol('thenPatched');
const fetchTaskScheduling = api.symbol('fetchTaskScheduling');
const OriginalResponse = global.Response;
const placeholder = function () { };
const createFetchTask = (source, data, originalImpl, self, args, ac) => new Promise((resolve, reject) => {
const task = Zone.current.scheduleMacroTask(source, placeholder, data, () => {
// The promise object returned by the original implementation passed into the
// function. This might be a `fetch` promise, `Response.prototype.json` promise,
// etc.
let implPromise;
let zone = Zone.current;
try {
zone[fetchTaskScheduling] = true;
implPromise = originalImpl.apply(self, args);
}
}
implPromise.then((resource) => {
if (task.state !== 'notScheduled') {
task.invoke();
catch (error) {
reject(error);
return;
}
resolve(resource);
}, (error) => {
if (task.state !== 'notScheduled') {
task.invoke();
finally {
zone[fetchTaskScheduling] = false;
}
reject(error);
if (!(implPromise instanceof ZoneAwarePromise)) {
let ctor = implPromise.constructor;
if (!ctor[symbolThenPatched]) {
api.patchThen(ctor);
}
}
implPromise.then((resource) => {
if (task.state !== 'notScheduled') {
task.invoke();
}
resolve(resource);
}, (error) => {
if (task.state !== 'notScheduled') {
task.invoke();
}
reject(error);
});
}, () => {
ac?.abort();
});
}, () => {
ac?.abort();
});
global['fetch'] = function () {
const args = Array.prototype.slice.call(arguments);
const options = args.length > 1 ? args[1] : {};
const signal = options?.signal;
const ac = new AbortController();
const fetchSignal = ac.signal;
options.signal = fetchSignal;
args[1] = options;
if (signal) {
const nativeAddEventListener = signal[Zone.__symbol__('addEventListener')] ||
signal.addEventListener;
nativeAddEventListener.call(signal, 'abort', function () {
ac.abort();
}, { once: true });
}
return createFetchTask('fetch', { fetchArgs: args }, fetch, this, args, ac);
};
if (OriginalResponse?.prototype) {
// https://fetch.spec.whatwg.org/#body-mixin
['arrayBuffer', 'blob', 'formData', 'json', 'text']
// Safely check whether the method exists on the `Response` prototype before patching.
.filter((method) => typeof OriginalResponse.prototype[method] === 'function')
.forEach((method) => {
api.patchMethod(OriginalResponse.prototype, method, (delegate) => (self, args) => createFetchTask(`Response.${method}`, undefined, delegate, self, args, undefined));
});
}
});
global['fetch'] = function () {
const args = Array.prototype.slice.call(arguments);
const options = args.length > 1 ? args[1] : {};
const signal = options?.signal;
const ac = new AbortController();
const fetchSignal = ac.signal;
options.signal = fetchSignal;
args[1] = options;
if (signal) {
const nativeAddEventListener = signal[Zone.__symbol__('addEventListener')] ||
signal.addEventListener;
nativeAddEventListener.call(signal, 'abort', function () {
ac.abort();
}, { once: true });
}
return createFetchTask('fetch', { fetchArgs: args }, fetch, this, args, ac);
};
if (OriginalResponse?.prototype) {
// https://fetch.spec.whatwg.org/#body-mixin
['arrayBuffer', 'blob', 'formData', 'json', 'text']
// Safely check whether the method exists on the `Response` prototype before patching.
.filter(method => typeof OriginalResponse.prototype[method] === 'function')
.forEach(method => {
api.patchMethod(OriginalResponse.prototype, method, (delegate) => (self, args) => createFetchTask(`Response.${method}`, undefined, delegate, self, args, undefined));
});
}
});
}
patchFetch(Zone);
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/Zone.__load_patch("fetch",((t,e,o)=>{let n=t.fetch;if("function"!=typeof n)return;const c=t[o.symbol("fetch")];c&&(n=c);const r=t.Promise,s=o.symbol("thenPatched"),a=o.symbol("fetchTaskScheduling"),l=t.Response,i=function(){},f=(t,n,c,l,f,h)=>new Promise(((p,u)=>{const d=e.current.scheduleMacroTask(t,i,n,(()=>{let t,n=e.current;try{n[a]=!0,t=c.apply(l,f)}catch(t){return void u(t)}finally{n[a]=!1}if(!(t instanceof r)){let e=t.constructor;e[s]||o.patchThen(e)}t.then((t=>{"notScheduled"!==d.state&&d.invoke(),p(t)}),(t=>{"notScheduled"!==d.state&&d.invoke(),u(t)}))}),(()=>{h?.abort()}))}));t.fetch=function(){const t=Array.prototype.slice.call(arguments),o=t.length>1?t[1]:{},c=o?.signal,r=new AbortController;return o.signal=r.signal,t[1]=o,c&&(c[e.__symbol__("addEventListener")]||c.addEventListener).call(c,"abort",(function(){r.abort()}),{once:!0}),f("fetch",{fetchArgs:t},n,this,t,r)},l?.prototype&&["arrayBuffer","blob","formData","json","text"].filter((t=>"function"==typeof l.prototype[t])).forEach((t=>{o.patchMethod(l.prototype,t,(e=>(o,n)=>f(`Response.${t}`,void 0,e,o,n,void 0)))}))}));
*/function patchFetch(t){t.__load_patch("fetch",((t,e,o)=>{let n=t.fetch;if("function"!=typeof n)return;const c=t[o.symbol("fetch")];c&&(n=c);const r=t.Promise,a=o.symbol("thenPatched"),s=o.symbol("fetchTaskScheduling"),l=t.Response,h=function(){},i=(t,n,c,l,i,f)=>new Promise(((p,u)=>{const d=e.current.scheduleMacroTask(t,h,n,(()=>{let t,n=e.current;try{n[s]=!0,t=c.apply(l,i)}catch(t){return void u(t)}finally{n[s]=!1}if(!(t instanceof r)){let e=t.constructor;e[a]||o.patchThen(e)}t.then((t=>{"notScheduled"!==d.state&&d.invoke(),p(t)}),(t=>{"notScheduled"!==d.state&&d.invoke(),u(t)}))}),(()=>{f?.abort()}))}));t.fetch=function(){const t=Array.prototype.slice.call(arguments),o=t.length>1?t[1]:{},c=o?.signal,r=new AbortController;return o.signal=r.signal,t[1]=o,c&&(c[e.__symbol__("addEventListener")]||c.addEventListener).call(c,"abort",(function(){r.abort()}),{once:!0}),i("fetch",{fetchArgs:t},n,this,t,r)},l?.prototype&&["arrayBuffer","blob","formData","json","text"].filter((t=>"function"==typeof l.prototype[t])).forEach((t=>{o.patchMethod(l.prototype,t,(e=>(o,n)=>i(`Response.${t}`,void 0,e,o,n,void 0)))}))}))}patchFetch(Zone);
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/
Zone.__load_patch('jsonp', (global, Zone, api) => {
// because jsonp is not a standard api, there are a lot of
// implementations, so zone.js just provide a helper util to
// patch the jsonp send and onSuccess/onError callback
// the options is an object which contains
// - jsonp, the jsonp object which hold the send function
// - sendFuncName, the name of the send function
// - successFuncName, success func name
// - failedFuncName, failed func name
Zone[Zone.__symbol__('jsonp')] = function patchJsonp(options) {
if (!options || !options.jsonp || !options.sendFuncName) {
return;
}
const noop = function () { };
[options.successFuncName, options.failedFuncName].forEach(methodName => {
if (!methodName) {
function patchJsonp(Zone) {
Zone.__load_patch('jsonp', (global, Zone, api) => {
// because jsonp is not a standard api, there are a lot of
// implementations, so zone.js just provide a helper util to
// patch the jsonp send and onSuccess/onError callback
// the options is an object which contains
// - jsonp, the jsonp object which hold the send function
// - sendFuncName, the name of the send function
// - successFuncName, success func name
// - failedFuncName, failed func name
Zone[Zone.__symbol__('jsonp')] = function patchJsonp(options) {
if (!options || !options.jsonp || !options.sendFuncName) {
return;
}
const oriFunc = global[methodName];
if (oriFunc) {
api.patchMethod(global, methodName, (delegate) => (self, args) => {
const task = global[api.symbol('jsonTask')];
if (task) {
task.callback = delegate;
return task.invoke.apply(self, args);
}
else {
return delegate.apply(self, args);
}
});
}
else {
Object.defineProperty(global, methodName, {
configurable: true,
enumerable: true,
get: function () {
return function () {
const task = global[api.symbol('jsonpTask')];
const delegate = global[api.symbol(`jsonp${methodName}callback`)];
if (task) {
if (delegate) {
task.callback = delegate;
const noop = function () { };
[options.successFuncName, options.failedFuncName].forEach((methodName) => {
if (!methodName) {
return;
}
const oriFunc = global[methodName];
if (oriFunc) {
api.patchMethod(global, methodName, (delegate) => (self, args) => {
const task = global[api.symbol('jsonTask')];
if (task) {
task.callback = delegate;
return task.invoke.apply(self, args);
}
else {
return delegate.apply(self, args);
}
});
}
else {
Object.defineProperty(global, methodName, {
configurable: true,
enumerable: true,
get: function () {
return function () {
const task = global[api.symbol('jsonpTask')];
const delegate = global[api.symbol(`jsonp${methodName}callback`)];
if (task) {
if (delegate) {
task.callback = delegate;
}
global[api.symbol('jsonpTask')] = undefined;
return task.invoke.apply(this, arguments);
}
global[api.symbol('jsonpTask')] = undefined;
return task.invoke.apply(this, arguments);
}
else {
if (delegate) {
return delegate.apply(this, arguments);
else {
if (delegate) {
return delegate.apply(this, arguments);
}
}
}
return null;
};
},
set: function (callback) {
this[api.symbol(`jsonp${methodName}callback`)] = callback;
}
});
}
});
api.patchMethod(options.jsonp, options.sendFuncName, (delegate) => (self, args) => {
global[api.symbol('jsonpTask')] =
Zone.current.scheduleMacroTask('jsonp', noop, {}, (task) => {
return null;
};
},
set: function (callback) {
this[api.symbol(`jsonp${methodName}callback`)] = callback;
},
});
}
});
api.patchMethod(options.jsonp, options.sendFuncName, (delegate) => (self, args) => {
global[api.symbol('jsonpTask')] = Zone.current.scheduleMacroTask('jsonp', noop, {}, (task) => {
return delegate.apply(self, args);
}, noop);
});
};
});
});
};
});
}
patchJsonp(Zone);
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/Zone.__load_patch("jsonp",((n,s,o)=>{s[s.__symbol__("jsonp")]=function c(a){if(!a||!a.jsonp||!a.sendFuncName)return;const e=function(){};[a.successFuncName,a.failedFuncName].forEach((s=>{s&&(n[s]?o.patchMethod(n,s,(s=>(c,a)=>{const e=n[o.symbol("jsonTask")];return e?(e.callback=s,e.invoke.apply(c,a)):s.apply(c,a)})):Object.defineProperty(n,s,{configurable:!0,enumerable:!0,get:function(){return function(){const c=n[o.symbol("jsonpTask")],a=n[o.symbol(`jsonp${s}callback`)];return c?(a&&(c.callback=a),n[o.symbol("jsonpTask")]=void 0,c.invoke.apply(this,arguments)):a?a.apply(this,arguments):null}},set:function(n){this[o.symbol(`jsonp${s}callback`)]=n}}))})),o.patchMethod(a.jsonp,a.sendFuncName,(c=>(a,l)=>{n[o.symbol("jsonpTask")]=s.current.scheduleMacroTask("jsonp",e,{},(n=>c.apply(a,l)),e)}))}}));
*/function patchJsonp(n){n.__load_patch("jsonp",((n,o,s)=>{o[o.__symbol__("jsonp")]=function c(a){if(!a||!a.jsonp||!a.sendFuncName)return;const e=function(){};[a.successFuncName,a.failedFuncName].forEach((o=>{o&&(n[o]?s.patchMethod(n,o,(o=>(c,a)=>{const e=n[s.symbol("jsonTask")];return e?(e.callback=o,e.invoke.apply(c,a)):o.apply(c,a)})):Object.defineProperty(n,o,{configurable:!0,enumerable:!0,get:function(){return function(){const c=n[s.symbol("jsonpTask")],a=n[s.symbol(`jsonp${o}callback`)];return c?(a&&(c.callback=a),n[s.symbol("jsonpTask")]=void 0,c.invoke.apply(this,arguments)):a?a.apply(this,arguments):null}},set:function(n){this[s.symbol(`jsonp${o}callback`)]=n}}))})),s.patchMethod(a.jsonp,a.sendFuncName,(c=>(a,t)=>{n[s.symbol("jsonpTask")]=o.current.scheduleMacroTask("jsonp",e,{},(n=>c.apply(a,t)),e)}))}}))}patchJsonp(Zone);
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/
/**
* Monkey patch `MessagePort.prototype.onmessage` and `MessagePort.prototype.onmessageerror`
* properties to make the callback in the zone when the value are set.
*/
Zone.__load_patch('MessagePort', (global, Zone, api) => {
const MessagePort = global['MessagePort'];
if (typeof MessagePort !== 'undefined' && MessagePort.prototype) {
api.patchOnProperties(MessagePort.prototype, ['message', 'messageerror']);
}
});
function patchMessagePort(Zone) {
/**
* Monkey patch `MessagePort.prototype.onmessage` and `MessagePort.prototype.onmessageerror`
* properties to make the callback in the zone when the value are set.
*/
Zone.__load_patch('MessagePort', (global, Zone, api) => {
const MessagePort = global['MessagePort'];
if (typeof MessagePort !== 'undefined' && MessagePort.prototype) {
api.patchOnProperties(MessagePort.prototype, ['message', 'messageerror']);
}
});
}
patchMessagePort(Zone);
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/Zone.__load_patch("MessagePort",((e,o,s)=>{const t=e.MessagePort;void 0!==t&&t.prototype&&s.patchOnProperties(t.prototype,["message","messageerror"])}));
*/function patchMessagePort(e){e.__load_patch("MessagePort",((e,t,s)=>{const o=e.MessagePort;void 0!==o&&o.prototype&&s.patchOnProperties(o.prototype,["message","messageerror"])}))}patchMessagePort(Zone);
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/
/**
* Promise for async/fakeAsync zoneSpec test
* can support async operation which not supported by zone.js
* such as
* it ('test jsonp in AsyncZone', async() => {
* new Promise(res => {
* jsonp(url, (data) => {
* // success callback
* res(data);
* });
* }).then((jsonpResult) => {
* // get jsonp result.
*
* // user will expect AsyncZoneSpec wait for
* // then, but because jsonp is not zone aware
* // AsyncZone will finish before then is called.
* });
* });
*/
Zone.__load_patch('promisefortest', (global, Zone, api) => {
const symbolState = api.symbol('state');
const UNRESOLVED = null;
const symbolParentUnresolved = api.symbol('parentUnresolved');
// patch Promise.prototype.then to keep an internal
// number for tracking unresolved chained promise
// we will decrease this number when the parent promise
// being resolved/rejected and chained promise was
// scheduled as a microTask.
// so we can know such kind of chained promise still
// not resolved in AsyncTestZone
Promise[api.symbol('patchPromiseForTest')] = function patchPromiseForTest() {
let oriThen = Promise[Zone.__symbol__('ZonePromiseThen')];
if (oriThen) {
return;
}
oriThen = Promise[Zone.__symbol__('ZonePromiseThen')] = Promise.prototype.then;
Promise.prototype.then = function () {
const chained = oriThen.apply(this, arguments);
if (this[symbolState] === UNRESOLVED) {
// parent promise is unresolved.
const asyncTestZoneSpec = Zone.current.get('AsyncTestZoneSpec');
if (asyncTestZoneSpec) {
asyncTestZoneSpec.unresolvedChainedPromiseCount++;
chained[symbolParentUnresolved] = true;
function patchPromiseTesting(Zone) {
/**
* Promise for async/fakeAsync zoneSpec test
* can support async operation which not supported by zone.js
* such as
* it ('test jsonp in AsyncZone', async() => {
* new Promise(res => {
* jsonp(url, (data) => {
* // success callback
* res(data);
* });
* }).then((jsonpResult) => {
* // get jsonp result.
*
* // user will expect AsyncZoneSpec wait for
* // then, but because jsonp is not zone aware
* // AsyncZone will finish before then is called.
* });
* });
*/
Zone.__load_patch('promisefortest', (global, Zone, api) => {
const symbolState = api.symbol('state');
const UNRESOLVED = null;
const symbolParentUnresolved = api.symbol('parentUnresolved');
// patch Promise.prototype.then to keep an internal
// number for tracking unresolved chained promise
// we will decrease this number when the parent promise
// being resolved/rejected and chained promise was
// scheduled as a microTask.
// so we can know such kind of chained promise still
// not resolved in AsyncTestZone
Promise[api.symbol('patchPromiseForTest')] = function patchPromiseForTest() {
let oriThen = Promise[Zone.__symbol__('ZonePromiseThen')];
if (oriThen) {
return;
}
oriThen = Promise[Zone.__symbol__('ZonePromiseThen')] = Promise.prototype.then;
Promise.prototype.then = function () {
const chained = oriThen.apply(this, arguments);
if (this[symbolState] === UNRESOLVED) {
// parent promise is unresolved.
const asyncTestZoneSpec = Zone.current.get('AsyncTestZoneSpec');
if (asyncTestZoneSpec) {
asyncTestZoneSpec.unresolvedChainedPromiseCount++;
chained[symbolParentUnresolved] = true;
}
}
return chained;
};
};
Promise[api.symbol('unPatchPromiseForTest')] = function unpatchPromiseForTest() {
// restore origin then
const oriThen = Promise[Zone.__symbol__('ZonePromiseThen')];
if (oriThen) {
Promise.prototype.then = oriThen;
Promise[Zone.__symbol__('ZonePromiseThen')] = undefined;
}
return chained;
};
};
Promise[api.symbol('unPatchPromiseForTest')] = function unpatchPromiseForTest() {
// restore origin then
const oriThen = Promise[Zone.__symbol__('ZonePromiseThen')];
if (oriThen) {
Promise.prototype.then = oriThen;
Promise[Zone.__symbol__('ZonePromiseThen')] = undefined;
}
};
});
});
}
patchPromiseTesting(Zone);
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/Zone.__load_patch("promisefortest",((o,e,s)=>{const t=s.symbol("state"),n=s.symbol("parentUnresolved");Promise[s.symbol("patchPromiseForTest")]=function o(){let s=Promise[e.__symbol__("ZonePromiseThen")];s||(s=Promise[e.__symbol__("ZonePromiseThen")]=Promise.prototype.then,Promise.prototype.then=function(){const o=s.apply(this,arguments);if(null===this[t]){const s=e.current.get("AsyncTestZoneSpec");s&&(s.unresolvedChainedPromiseCount++,o[n]=!0)}return o})},Promise[s.symbol("unPatchPromiseForTest")]=function o(){const s=Promise[e.__symbol__("ZonePromiseThen")];s&&(Promise.prototype.then=s,Promise[e.__symbol__("ZonePromiseThen")]=void 0)}}));
*/function patchPromiseTesting(o){o.__load_patch("promisefortest",((o,e,s)=>{const t=s.symbol("state"),n=s.symbol("parentUnresolved");Promise[s.symbol("patchPromiseForTest")]=function o(){let s=Promise[e.__symbol__("ZonePromiseThen")];s||(s=Promise[e.__symbol__("ZonePromiseThen")]=Promise.prototype.then,Promise.prototype.then=function(){const o=s.apply(this,arguments);if(null===this[t]){const s=e.current.get("AsyncTestZoneSpec");s&&(s.unresolvedChainedPromiseCount++,o[n]=!0)}return o})},Promise[s.symbol("unPatchPromiseForTest")]=function o(){const s=Promise[e.__symbol__("ZonePromiseThen")];s&&(Promise.prototype.then=s,Promise[e.__symbol__("ZonePromiseThen")]=void 0)}}))}patchPromiseTesting(Zone);
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/
Zone.__load_patch('ResizeObserver', (global, Zone, api) => {
const ResizeObserver = global['ResizeObserver'];
if (!ResizeObserver) {
return;
}
const resizeObserverSymbol = api.symbol('ResizeObserver');
api.patchMethod(global, 'ResizeObserver', (delegate) => (self, args) => {
const callback = args.length > 0 ? args[0] : null;
if (callback) {
args[0] = function (entries, observer) {
const zones = {};
const currZone = Zone.current;
for (let entry of entries) {
let zone = entry.target[resizeObserverSymbol];
if (!zone) {
zone = currZone;
function patchResizeObserver(Zone) {
Zone.__load_patch('ResizeObserver', (global, Zone, api) => {
const ResizeObserver = global['ResizeObserver'];
if (!ResizeObserver) {
return;
}
const resizeObserverSymbol = api.symbol('ResizeObserver');
api.patchMethod(global, 'ResizeObserver', (delegate) => (self, args) => {
const callback = args.length > 0 ? args[0] : null;
if (callback) {
args[0] = function (entries, observer) {
const zones = {};
const currZone = Zone.current;
for (let entry of entries) {
let zone = entry.target[resizeObserverSymbol];
if (!zone) {
zone = currZone;
}
let zoneEntriesInfo = zones[zone.name];
if (!zoneEntriesInfo) {
zones[zone.name] = zoneEntriesInfo = { entries: [], zone: zone };
}
zoneEntriesInfo.entries.push(entry);
}
let zoneEntriesInfo = zones[zone.name];
if (!zoneEntriesInfo) {
zones[zone.name] = zoneEntriesInfo = { entries: [], zone: zone };
Object.keys(zones).forEach((zoneName) => {
const zoneEntriesInfo = zones[zoneName];
if (zoneEntriesInfo.zone !== Zone.current) {
zoneEntriesInfo.zone.run(callback, this, [zoneEntriesInfo.entries, observer], 'ResizeObserver');
}
else {
callback.call(this, zoneEntriesInfo.entries, observer);
}
});
};
}
return args.length > 0 ? new ResizeObserver(args[0]) : new ResizeObserver();
});
api.patchMethod(ResizeObserver.prototype, 'observe', (delegate) => (self, args) => {
const target = args.length > 0 ? args[0] : null;
if (!target) {
return delegate.apply(self, args);
}
let targets = self[resizeObserverSymbol];
if (!targets) {
targets = self[resizeObserverSymbol] = [];
}
targets.push(target);
target[resizeObserverSymbol] = Zone.current;
return delegate.apply(self, args);
});
api.patchMethod(ResizeObserver.prototype, 'unobserve', (delegate) => (self, args) => {
const target = args.length > 0 ? args[0] : null;
if (!target) {
return delegate.apply(self, args);
}
let targets = self[resizeObserverSymbol];
if (targets) {
for (let i = 0; i < targets.length; i++) {
if (targets[i] === target) {
targets.splice(i, 1);
break;
}
zoneEntriesInfo.entries.push(entry);
}
Object.keys(zones).forEach(zoneName => {
const zoneEntriesInfo = zones[zoneName];
if (zoneEntriesInfo.zone !== Zone.current) {
zoneEntriesInfo.zone.run(callback, this, [zoneEntriesInfo.entries, observer], 'ResizeObserver');
}
else {
callback.call(this, zoneEntriesInfo.entries, observer);
}
}
target[resizeObserverSymbol] = undefined;
return delegate.apply(self, args);
});
api.patchMethod(ResizeObserver.prototype, 'disconnect', (delegate) => (self, args) => {
const targets = self[resizeObserverSymbol];
if (targets) {
targets.forEach((target) => {
target[resizeObserverSymbol] = undefined;
});
};
}
return args.length > 0 ? new ResizeObserver(args[0]) : new ResizeObserver();
});
api.patchMethod(ResizeObserver.prototype, 'observe', (delegate) => (self, args) => {
const target = args.length > 0 ? args[0] : null;
if (!target) {
self[resizeObserverSymbol] = undefined;
}
return delegate.apply(self, args);
}
let targets = self[resizeObserverSymbol];
if (!targets) {
targets = self[resizeObserverSymbol] = [];
}
targets.push(target);
target[resizeObserverSymbol] = Zone.current;
return delegate.apply(self, args);
});
});
api.patchMethod(ResizeObserver.prototype, 'unobserve', (delegate) => (self, args) => {
const target = args.length > 0 ? args[0] : null;
if (!target) {
return delegate.apply(self, args);
}
let targets = self[resizeObserverSymbol];
if (targets) {
for (let i = 0; i < targets.length; i++) {
if (targets[i] === target) {
targets.splice(i, 1);
break;
}
}
}
target[resizeObserverSymbol] = undefined;
return delegate.apply(self, args);
});
api.patchMethod(ResizeObserver.prototype, 'disconnect', (delegate) => (self, args) => {
const targets = self[resizeObserverSymbol];
if (targets) {
targets.forEach((target) => {
target[resizeObserverSymbol] = undefined;
});
self[resizeObserverSymbol] = undefined;
}
return delegate.apply(self, args);
});
});
}
patchResizeObserver(Zone);
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/Zone.__load_patch("ResizeObserver",((e,t,r)=>{const n=e.ResizeObserver;if(!n)return;const o=r.symbol("ResizeObserver");r.patchMethod(e,"ResizeObserver",(e=>(e,r)=>{const s=r.length>0?r[0]:null;return s&&(r[0]=function(e,r){const n={},l=t.current;for(let t of e){let e=t.target[o];e||(e=l);let r=n[e.name];r||(n[e.name]=r={entries:[],zone:e}),r.entries.push(t)}Object.keys(n).forEach((e=>{const o=n[e];o.zone!==t.current?o.zone.run(s,this,[o.entries,r],"ResizeObserver"):s.call(this,o.entries,r)}))}),r.length>0?new n(r[0]):new n})),r.patchMethod(n.prototype,"observe",(e=>(r,n)=>{const s=n.length>0?n[0]:null;if(!s)return e.apply(r,n);let l=r[o];return l||(l=r[o]=[]),l.push(s),s[o]=t.current,e.apply(r,n)})),r.patchMethod(n.prototype,"unobserve",(e=>(t,r)=>{const n=r.length>0?r[0]:null;if(!n)return e.apply(t,r);let s=t[o];if(s)for(let e=0;e<s.length;e++)if(s[e]===n){s.splice(e,1);break}return n[o]=void 0,e.apply(t,r)})),r.patchMethod(n.prototype,"disconnect",(e=>(t,r)=>{const n=t[o];return n&&(n.forEach((e=>{e[o]=void 0})),t[o]=void 0),e.apply(t,r)}))}));
*/function patchResizeObserver(e){e.__load_patch("ResizeObserver",((e,t,r)=>{const n=e.ResizeObserver;if(!n)return;const s=r.symbol("ResizeObserver");r.patchMethod(e,"ResizeObserver",(e=>(e,r)=>{const o=r.length>0?r[0]:null;return o&&(r[0]=function(e,r){const n={},c=t.current;for(let t of e){let e=t.target[s];e||(e=c);let r=n[e.name];r||(n[e.name]=r={entries:[],zone:e}),r.entries.push(t)}Object.keys(n).forEach((e=>{const s=n[e];s.zone!==t.current?s.zone.run(o,this,[s.entries,r],"ResizeObserver"):o.call(this,s.entries,r)}))}),r.length>0?new n(r[0]):new n})),r.patchMethod(n.prototype,"observe",(e=>(r,n)=>{const o=n.length>0?n[0]:null;if(!o)return e.apply(r,n);let c=r[s];return c||(c=r[s]=[]),c.push(o),o[s]=t.current,e.apply(r,n)})),r.patchMethod(n.prototype,"unobserve",(e=>(t,r)=>{const n=r.length>0?r[0]:null;if(!n)return e.apply(t,r);let o=t[s];if(o)for(let e=0;e<o.length;e++)if(o[e]===n){o.splice(e,1);break}return n[s]=void 0,e.apply(t,r)})),r.patchMethod(n.prototype,"disconnect",(e=>(t,r)=>{const n=t[s];return n&&(n.forEach((e=>{e[s]=void 0})),t[s]=void 0),e.apply(t,r)}))}))}patchResizeObserver(Zone);
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT

@@ -38,6 +38,7 @@ */

this.propertyKeys = Object.keys(delegateSpec.properties);
this.propertyKeys.forEach((k) => this.properties[k] = delegateSpec.properties[k]);
this.propertyKeys.forEach((k) => (this.properties[k] = delegateSpec.properties[k]));
}
// if a new delegateSpec was set, check if we need to trigger hasTask
if (isNewDelegate && this.lastTaskState &&
if (isNewDelegate &&
this.lastTaskState &&
(this.lastTaskState.macroTask || this.lastTaskState.microTask)) {

@@ -169,4 +170,8 @@ this.isNeedToTriggerHasTask = true;

}
// Export the class so that new instances can be created with proper
// constructor params.
Zone['ProxyZoneSpec'] = ProxyZoneSpec;
function patchProxyZoneSpec(Zone) {
// Export the class so that new instances can be created with proper
// constructor params.
Zone['ProxyZoneSpec'] = ProxyZoneSpec;
}
patchProxyZoneSpec(Zone);
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/class ProxyZoneSpec{static get(){return Zone.current.get("ProxyZoneSpec")}static isLoaded(){return ProxyZoneSpec.get()instanceof ProxyZoneSpec}static assertPresent(){if(!ProxyZoneSpec.isLoaded())throw new Error("Expected to be running in 'ProxyZone', but it was not found.");return ProxyZoneSpec.get()}constructor(e=null){this.defaultSpecDelegate=e,this.name="ProxyZone",this._delegateSpec=null,this.properties={ProxyZoneSpec:this},this.propertyKeys=null,this.lastTaskState=null,this.isNeedToTriggerHasTask=!1,this.tasks=[],this.setDelegate(e)}setDelegate(e){const t=this._delegateSpec!==e;this._delegateSpec=e,this.propertyKeys&&this.propertyKeys.forEach((e=>delete this.properties[e])),this.propertyKeys=null,e&&e.properties&&(this.propertyKeys=Object.keys(e.properties),this.propertyKeys.forEach((t=>this.properties[t]=e.properties[t]))),t&&this.lastTaskState&&(this.lastTaskState.macroTask||this.lastTaskState.microTask)&&(this.isNeedToTriggerHasTask=!0)}getDelegate(){return this._delegateSpec}resetDelegate(){this.getDelegate(),this.setDelegate(this.defaultSpecDelegate)}tryTriggerHasTask(e,t,s){this.isNeedToTriggerHasTask&&this.lastTaskState&&(this.isNeedToTriggerHasTask=!1,this.onHasTask(e,t,s,this.lastTaskState))}removeFromTasks(e){if(this.tasks)for(let t=0;t<this.tasks.length;t++)if(this.tasks[t]===e)return void this.tasks.splice(t,1)}getAndClearPendingTasksInfo(){if(0===this.tasks.length)return"";const e="--Pending async tasks are: ["+this.tasks.map((e=>{const t=e.data&&Object.keys(e.data).map((t=>t+":"+e.data[t])).join(",");return`type: ${e.type}, source: ${e.source}, args: {${t}}`}))+"]";return this.tasks=[],e}onFork(e,t,s,a){return this._delegateSpec&&this._delegateSpec.onFork?this._delegateSpec.onFork(e,t,s,a):e.fork(s,a)}onIntercept(e,t,s,a,r){return this._delegateSpec&&this._delegateSpec.onIntercept?this._delegateSpec.onIntercept(e,t,s,a,r):e.intercept(s,a,r)}onInvoke(e,t,s,a,r,i,o){return this.tryTriggerHasTask(e,t,s),this._delegateSpec&&this._delegateSpec.onInvoke?this._delegateSpec.onInvoke(e,t,s,a,r,i,o):e.invoke(s,a,r,i,o)}onHandleError(e,t,s,a){return this._delegateSpec&&this._delegateSpec.onHandleError?this._delegateSpec.onHandleError(e,t,s,a):e.handleError(s,a)}onScheduleTask(e,t,s,a){return"eventTask"!==a.type&&this.tasks.push(a),this._delegateSpec&&this._delegateSpec.onScheduleTask?this._delegateSpec.onScheduleTask(e,t,s,a):e.scheduleTask(s,a)}onInvokeTask(e,t,s,a,r,i){return"eventTask"!==a.type&&this.removeFromTasks(a),this.tryTriggerHasTask(e,t,s),this._delegateSpec&&this._delegateSpec.onInvokeTask?this._delegateSpec.onInvokeTask(e,t,s,a,r,i):e.invokeTask(s,a,r,i)}onCancelTask(e,t,s,a){return"eventTask"!==a.type&&this.removeFromTasks(a),this.tryTriggerHasTask(e,t,s),this._delegateSpec&&this._delegateSpec.onCancelTask?this._delegateSpec.onCancelTask(e,t,s,a):e.cancelTask(s,a)}onHasTask(e,t,s,a){this.lastTaskState=a,this._delegateSpec&&this._delegateSpec.onHasTask?this._delegateSpec.onHasTask(e,t,s,a):e.hasTask(s,a)}}Zone.ProxyZoneSpec=ProxyZoneSpec;
*/class ProxyZoneSpec{static get(){return Zone.current.get("ProxyZoneSpec")}static isLoaded(){return ProxyZoneSpec.get()instanceof ProxyZoneSpec}static assertPresent(){if(!ProxyZoneSpec.isLoaded())throw new Error("Expected to be running in 'ProxyZone', but it was not found.");return ProxyZoneSpec.get()}constructor(e=null){this.defaultSpecDelegate=e,this.name="ProxyZone",this._delegateSpec=null,this.properties={ProxyZoneSpec:this},this.propertyKeys=null,this.lastTaskState=null,this.isNeedToTriggerHasTask=!1,this.tasks=[],this.setDelegate(e)}setDelegate(e){const t=this._delegateSpec!==e;this._delegateSpec=e,this.propertyKeys&&this.propertyKeys.forEach((e=>delete this.properties[e])),this.propertyKeys=null,e&&e.properties&&(this.propertyKeys=Object.keys(e.properties),this.propertyKeys.forEach((t=>this.properties[t]=e.properties[t]))),t&&this.lastTaskState&&(this.lastTaskState.macroTask||this.lastTaskState.microTask)&&(this.isNeedToTriggerHasTask=!0)}getDelegate(){return this._delegateSpec}resetDelegate(){this.getDelegate(),this.setDelegate(this.defaultSpecDelegate)}tryTriggerHasTask(e,t,s){this.isNeedToTriggerHasTask&&this.lastTaskState&&(this.isNeedToTriggerHasTask=!1,this.onHasTask(e,t,s,this.lastTaskState))}removeFromTasks(e){if(this.tasks)for(let t=0;t<this.tasks.length;t++)if(this.tasks[t]===e)return void this.tasks.splice(t,1)}getAndClearPendingTasksInfo(){if(0===this.tasks.length)return"";const e="--Pending async tasks are: ["+this.tasks.map((e=>{const t=e.data&&Object.keys(e.data).map((t=>t+":"+e.data[t])).join(",");return`type: ${e.type}, source: ${e.source}, args: {${t}}`}))+"]";return this.tasks=[],e}onFork(e,t,s,a){return this._delegateSpec&&this._delegateSpec.onFork?this._delegateSpec.onFork(e,t,s,a):e.fork(s,a)}onIntercept(e,t,s,a,r){return this._delegateSpec&&this._delegateSpec.onIntercept?this._delegateSpec.onIntercept(e,t,s,a,r):e.intercept(s,a,r)}onInvoke(e,t,s,a,r,o,i){return this.tryTriggerHasTask(e,t,s),this._delegateSpec&&this._delegateSpec.onInvoke?this._delegateSpec.onInvoke(e,t,s,a,r,o,i):e.invoke(s,a,r,o,i)}onHandleError(e,t,s,a){return this._delegateSpec&&this._delegateSpec.onHandleError?this._delegateSpec.onHandleError(e,t,s,a):e.handleError(s,a)}onScheduleTask(e,t,s,a){return"eventTask"!==a.type&&this.tasks.push(a),this._delegateSpec&&this._delegateSpec.onScheduleTask?this._delegateSpec.onScheduleTask(e,t,s,a):e.scheduleTask(s,a)}onInvokeTask(e,t,s,a,r,o){return"eventTask"!==a.type&&this.removeFromTasks(a),this.tryTriggerHasTask(e,t,s),this._delegateSpec&&this._delegateSpec.onInvokeTask?this._delegateSpec.onInvokeTask(e,t,s,a,r,o):e.invokeTask(s,a,r,o)}onCancelTask(e,t,s,a){return"eventTask"!==a.type&&this.removeFromTasks(a),this.tryTriggerHasTask(e,t,s),this._delegateSpec&&this._delegateSpec.onCancelTask?this._delegateSpec.onCancelTask(e,t,s,a):e.cancelTask(s,a)}onHasTask(e,t,s,a){this.lastTaskState=a,this._delegateSpec&&this._delegateSpec.onHasTask?this._delegateSpec.onHasTask(e,t,s,a):e.hasTask(s,a)}}function patchProxyZoneSpec(e){e.ProxyZoneSpec=ProxyZoneSpec}patchProxyZoneSpec(Zone);
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/
import { Observable, Subscription, Subscriber } from 'rxjs';
import { patchRxJs } from './rxjs';
Zone.__load_patch('rxjs', (global, Zone, api) => {
const symbol = Zone.__symbol__;
const nextSource = 'rxjs.Subscriber.next';
const errorSource = 'rxjs.Subscriber.error';
const completeSource = 'rxjs.Subscriber.complete';
const ObjectDefineProperties = Object.defineProperties;
const patchObservable = function () {
const ObservablePrototype = Observable.prototype;
const _symbolSubscribe = symbol('_subscribe');
const _subscribe = ObservablePrototype[_symbolSubscribe] = ObservablePrototype._subscribe;
ObjectDefineProperties(Observable.prototype, {
_zone: { value: null, writable: true, configurable: true },
_zoneSource: { value: null, writable: true, configurable: true },
_zoneSubscribe: { value: null, writable: true, configurable: true },
source: {
configurable: true,
get: function () {
return this._zoneSource;
},
set: function (source) {
this._zone = Zone.current;
this._zoneSource = source;
}
},
_subscribe: {
configurable: true,
get: function () {
if (this._zoneSubscribe) {
return this._zoneSubscribe;
}
else if (this.constructor === Observable) {
return _subscribe;
}
const proto = Object.getPrototypeOf(this);
return proto && proto._subscribe;
},
set: function (subscribe) {
this._zone = Zone.current;
if (!subscribe) {
this._zoneSubscribe = subscribe;
}
else {
this._zoneSubscribe = function () {
if (this._zone && this._zone !== Zone.current) {
const tearDown = this._zone.run(subscribe, this, arguments);
if (typeof tearDown === 'function') {
const zone = this._zone;
return function () {
if (zone !== Zone.current) {
return zone.run(tearDown, this, arguments);
}
return tearDown.apply(this, arguments);
};
}
else {
return tearDown;
}
}
else {
return subscribe.apply(this, arguments);
}
};
}
}
},
subjectFactory: {
get: function () {
return this._zoneSubjectFactory;
},
set: function (factory) {
const zone = this._zone;
this._zoneSubjectFactory = function () {
if (zone && zone !== Zone.current) {
return zone.run(factory, this, arguments);
}
return factory.apply(this, arguments);
};
}
}
});
};
api.patchMethod(Observable.prototype, 'lift', (delegate) => (self, args) => {
const observable = delegate.apply(self, args);
if (observable.operator) {
observable.operator._zone = Zone.current;
api.patchMethod(observable.operator, 'call', (operatorDelegate) => (operatorSelf, operatorArgs) => {
if (operatorSelf._zone && operatorSelf._zone !== Zone.current) {
return operatorSelf._zone.run(operatorDelegate, operatorSelf, operatorArgs);
}
return operatorDelegate.apply(operatorSelf, operatorArgs);
});
}
return observable;
});
const patchSubscription = function () {
ObjectDefineProperties(Subscription.prototype, {
_zone: { value: null, writable: true, configurable: true },
_zoneUnsubscribe: { value: null, writable: true, configurable: true },
_unsubscribe: {
get: function () {
if (this._zoneUnsubscribe || this._zoneUnsubscribeCleared) {
return this._zoneUnsubscribe;
}
const proto = Object.getPrototypeOf(this);
return proto && proto._unsubscribe;
},
set: function (unsubscribe) {
this._zone = Zone.current;
if (!unsubscribe) {
this._zoneUnsubscribe = unsubscribe;
// In some operator such as `retryWhen`, the _unsubscribe
// method will be set to null, so we need to set another flag
// to tell that we should return null instead of finding
// in the prototype chain.
this._zoneUnsubscribeCleared = true;
}
else {
this._zoneUnsubscribeCleared = false;
this._zoneUnsubscribe = function () {
if (this._zone && this._zone !== Zone.current) {
return this._zone.run(unsubscribe, this, arguments);
}
else {
return unsubscribe.apply(this, arguments);
}
};
}
}
}
});
};
const patchSubscriber = function () {
const next = Subscriber.prototype.next;
const error = Subscriber.prototype.error;
const complete = Subscriber.prototype.complete;
Object.defineProperty(Subscriber.prototype, 'destination', {
configurable: true,
get: function () {
return this._zoneDestination;
},
set: function (destination) {
this._zone = Zone.current;
this._zoneDestination = destination;
}
});
// patch Subscriber.next to make sure it run
// into SubscriptionZone
Subscriber.prototype.next = function () {
const currentZone = Zone.current;
const subscriptionZone = this._zone;
// for performance concern, check Zone.current
// equal with this._zone(SubscriptionZone) or not
if (subscriptionZone && subscriptionZone !== currentZone) {
return subscriptionZone.run(next, this, arguments, nextSource);
}
else {
return next.apply(this, arguments);
}
};
Subscriber.prototype.error = function () {
const currentZone = Zone.current;
const subscriptionZone = this._zone;
// for performance concern, check Zone.current
// equal with this._zone(SubscriptionZone) or not
if (subscriptionZone && subscriptionZone !== currentZone) {
return subscriptionZone.run(error, this, arguments, errorSource);
}
else {
return error.apply(this, arguments);
}
};
Subscriber.prototype.complete = function () {
const currentZone = Zone.current;
const subscriptionZone = this._zone;
// for performance concern, check Zone.current
// equal with this._zone(SubscriptionZone) or not
if (subscriptionZone && subscriptionZone !== currentZone) {
return subscriptionZone.run(complete, this, arguments, completeSource);
}
else {
return complete.call(this);
}
};
};
patchObservable();
patchSubscription();
patchSubscriber();
});
patchRxJs(Zone);
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/import{Observable,Subscription,Subscriber}from"rxjs";Zone.__load_patch("rxjs",((e,t,r)=>{const n=t.__symbol__,o=Object.defineProperties;r.patchMethod(Observable.prototype,"lift",(e=>(n,o)=>{const i=e.apply(n,o);return i.operator&&(i.operator._zone=t.current,r.patchMethod(i.operator,"call",(e=>(r,n)=>r._zone&&r._zone!==t.current?r._zone.run(e,r,n):e.apply(r,n)))),i})),function(){const e=Observable.prototype,r=e[n("_subscribe")]=e._subscribe;o(Observable.prototype,{_zone:{value:null,writable:!0,configurable:!0},_zoneSource:{value:null,writable:!0,configurable:!0},_zoneSubscribe:{value:null,writable:!0,configurable:!0},source:{configurable:!0,get:function(){return this._zoneSource},set:function(e){this._zone=t.current,this._zoneSource=e}},_subscribe:{configurable:!0,get:function(){if(this._zoneSubscribe)return this._zoneSubscribe;if(this.constructor===Observable)return r;const e=Object.getPrototypeOf(this);return e&&e._subscribe},set:function(e){this._zone=t.current,this._zoneSubscribe=e?function(){if(this._zone&&this._zone!==t.current){const r=this._zone.run(e,this,arguments);if("function"==typeof r){const e=this._zone;return function(){return e!==t.current?e.run(r,this,arguments):r.apply(this,arguments)}}return r}return e.apply(this,arguments)}:e}},subjectFactory:{get:function(){return this._zoneSubjectFactory},set:function(e){const r=this._zone;this._zoneSubjectFactory=function(){return r&&r!==t.current?r.run(e,this,arguments):e.apply(this,arguments)}}}})}(),o(Subscription.prototype,{_zone:{value:null,writable:!0,configurable:!0},_zoneUnsubscribe:{value:null,writable:!0,configurable:!0},_unsubscribe:{get:function(){if(this._zoneUnsubscribe||this._zoneUnsubscribeCleared)return this._zoneUnsubscribe;const e=Object.getPrototypeOf(this);return e&&e._unsubscribe},set:function(e){this._zone=t.current,e?(this._zoneUnsubscribeCleared=!1,this._zoneUnsubscribe=function(){return this._zone&&this._zone!==t.current?this._zone.run(e,this,arguments):e.apply(this,arguments)}):(this._zoneUnsubscribe=e,this._zoneUnsubscribeCleared=!0)}}}),function(){const e=Subscriber.prototype.next,r=Subscriber.prototype.error,n=Subscriber.prototype.complete;Object.defineProperty(Subscriber.prototype,"destination",{configurable:!0,get:function(){return this._zoneDestination},set:function(e){this._zone=t.current,this._zoneDestination=e}}),Subscriber.prototype.next=function(){const r=this._zone;return r&&r!==t.current?r.run(e,this,arguments,"rxjs.Subscriber.next"):e.apply(this,arguments)},Subscriber.prototype.error=function(){const e=this._zone;return e&&e!==t.current?e.run(r,this,arguments,"rxjs.Subscriber.error"):r.apply(this,arguments)},Subscriber.prototype.complete=function(){const e=this._zone;return e&&e!==t.current?e.run(n,this,arguments,"rxjs.Subscriber.complete"):n.call(this)}}()}));
*/import{patchRxJs}from"./rxjs";patchRxJs(Zone);
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/
Zone.__load_patch('socketio', (global, Zone, api) => {
Zone[Zone.__symbol__('socketio')] = function patchSocketIO(io) {
// patch io.Socket.prototype event listener related method
api.patchEventTarget(global, api, [io.Socket.prototype], {
useG: false,
chkDup: false,
rt: true,
diff: (task, delegate) => {
return task.callback === delegate;
}
});
// also patch io.Socket.prototype.on/off/removeListener/removeAllListeners
io.Socket.prototype.on = io.Socket.prototype.addEventListener;
io.Socket.prototype.off = io.Socket.prototype.removeListener =
io.Socket.prototype.removeAllListeners = io.Socket.prototype.removeEventListener;
};
});
function patchSocketIo(Zone) {
Zone.__load_patch('socketio', (global, Zone, api) => {
Zone[Zone.__symbol__('socketio')] = function patchSocketIO(io) {
// patch io.Socket.prototype event listener related method
api.patchEventTarget(global, api, [io.Socket.prototype], {
useG: false,
chkDup: false,
rt: true,
diff: (task, delegate) => {
return task.callback === delegate;
},
});
// also patch io.Socket.prototype.on/off/removeListener/removeAllListeners
io.Socket.prototype.on = io.Socket.prototype.addEventListener;
io.Socket.prototype.off =
io.Socket.prototype.removeListener =
io.Socket.prototype.removeAllListeners =
io.Socket.prototype.removeEventListener;
};
});
}
patchSocketIo(Zone);
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/Zone.__load_patch("socketio",((e,t,o)=>{t[t.__symbol__("socketio")]=function t(p){o.patchEventTarget(e,o,[p.Socket.prototype],{useG:!1,chkDup:!1,rt:!0,diff:(e,t)=>e.callback===t}),p.Socket.prototype.on=p.Socket.prototype.addEventListener,p.Socket.prototype.off=p.Socket.prototype.removeListener=p.Socket.prototype.removeAllListeners=p.Socket.prototype.removeEventListener}}));
*/function patchSocketIo(t){t.__load_patch("socketio",((t,e,o)=>{e[e.__symbol__("socketio")]=function e(c){o.patchEventTarget(t,o,[c.Socket.prototype],{useG:!1,chkDup:!1,rt:!0,diff:(t,e)=>t.callback===e}),c.Socket.prototype.on=c.Socket.prototype.addEventListener,c.Socket.prototype.off=c.Socket.prototype.removeListener=c.Socket.prototype.removeAllListeners=c.Socket.prototype.removeEventListener}}))}patchSocketIo(Zone);
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/
Zone.__load_patch('getUserMedia', (global, Zone, api) => {
function wrapFunctionArgs(func, source) {
return function () {
const args = Array.prototype.slice.call(arguments);
const wrappedArgs = api.bindArguments(args, source ? source : func.name);
return func.apply(this, wrappedArgs);
};
}
let navigator = global['navigator'];
if (navigator && navigator.getUserMedia) {
navigator.getUserMedia = wrapFunctionArgs(navigator.getUserMedia);
}
});
function patchUserMedia(Zone) {
Zone.__load_patch('getUserMedia', (global, Zone, api) => {
function wrapFunctionArgs(func, source) {
return function () {
const args = Array.prototype.slice.call(arguments);
const wrappedArgs = api.bindArguments(args, source ? source : func.name);
return func.apply(this, wrappedArgs);
};
}
let navigator = global['navigator'];
if (navigator && navigator.getUserMedia) {
navigator.getUserMedia = wrapFunctionArgs(navigator.getUserMedia);
}
});
}
patchUserMedia(Zone);
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/Zone.__load_patch("getUserMedia",((e,t,r)=>{let a=e.navigator;a&&a.getUserMedia&&(a.getUserMedia=function n(e,t){return function(){const a=Array.prototype.slice.call(arguments),n=r.bindArguments(a,t||e.name);return e.apply(this,n)}}(a.getUserMedia))}));
*/function patchUserMedia(e){e.__load_patch("getUserMedia",((e,t,a)=>{let r=e.navigator;r&&r.getUserMedia&&(r.getUserMedia=function i(e,t){return function(){const r=Array.prototype.slice.call(arguments),i=a.bindArguments(r,t||e.name);return e.apply(this,i)}}(r.getUserMedia))}))}patchUserMedia(Zone);
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/const NEWLINE="\n",IGNORE_FRAMES={},creationTrace="__creationTrace__",ERROR_TAG="STACKTRACE TRACKING",SEP_TAG="__SEP_TAG__";let sepTemplate=SEP_TAG+"@[native]";class LongStackTrace{constructor(){this.error=getStacktrace(),this.timestamp=new Date}}function getStacktraceWithUncaughtError(){return new Error(ERROR_TAG)}function getStacktraceWithCaughtError(){try{throw getStacktraceWithUncaughtError()}catch(e){return e}}const error=getStacktraceWithUncaughtError(),caughtError=getStacktraceWithCaughtError(),getStacktrace=error.stack?getStacktraceWithUncaughtError:caughtError.stack?getStacktraceWithCaughtError:getStacktraceWithUncaughtError;function getFrames(e){return e.stack?e.stack.split(NEWLINE):[]}function addErrorStack(e,t){let n=getFrames(t);for(let t=0;t<n.length;t++)IGNORE_FRAMES.hasOwnProperty(n[t])||e.push(n[t])}function renderLongStackTrace(e,t){const n=[t?t.trim():""];if(e){let t=(new Date).getTime();for(let r=0;r<e.length;r++){const s=e[r],i=s.timestamp;let o=`____________________Elapsed ${t-i.getTime()} ms; At: ${i}`;o=o.replace(/[^\w\d]/g,"_"),n.push(sepTemplate.replace(SEP_TAG,o)),addErrorStack(n,s.error),t=i.getTime()}}return n.join(NEWLINE)}function stackTracesEnabled(){return Error.stackTraceLimit>0}function captureStackTraces(e,t){t>0&&(e.push(getFrames((new LongStackTrace).error)),captureStackTraces(e,t-1))}function computeIgnoreFrames(){if(!stackTracesEnabled())return;const e=[];captureStackTraces(e,2);const t=e[0],n=e[1];for(let e=0;e<t.length;e++){const n=t[e];if(-1==n.indexOf(ERROR_TAG)){let e=n.match(/^\s*at\s+/);if(e){sepTemplate=e[0]+SEP_TAG+" (http://localhost)";break}}}for(let e=0;e<t.length;e++){const r=t[e];if(r!==n[e])break;IGNORE_FRAMES[r]=!0}}Zone.longStackTraceZoneSpec={name:"long-stack-trace",longStackTraceLimit:10,getLongStackTrace:function(e){if(!e)return;const t=e[Zone.__symbol__("currentTaskTrace")];return t?renderLongStackTrace(t,e.stack):e.stack},onScheduleTask:function(e,t,n,r){if(stackTracesEnabled()){const e=Zone.currentTask;let t=e&&e.data&&e.data[creationTrace]||[];t=[new LongStackTrace].concat(t),t.length>this.longStackTraceLimit&&(t.length=this.longStackTraceLimit),r.data||(r.data={}),"eventTask"===r.type&&(r.data={...r.data}),r.data[creationTrace]=t}return e.scheduleTask(n,r)},onHandleError:function(e,t,n,r){if(stackTracesEnabled()){const e=Zone.currentTask||r.task;if(r instanceof Error&&e){const t=renderLongStackTrace(e.data&&e.data[creationTrace],r.stack);try{r.stack=r.longStack=t}catch(e){}}}return e.handleError(n,r)}},computeIgnoreFrames();class ProxyZoneSpec{static get(){return Zone.current.get("ProxyZoneSpec")}static isLoaded(){return ProxyZoneSpec.get()instanceof ProxyZoneSpec}static assertPresent(){if(!ProxyZoneSpec.isLoaded())throw new Error("Expected to be running in 'ProxyZone', but it was not found.");return ProxyZoneSpec.get()}constructor(e=null){this.defaultSpecDelegate=e,this.name="ProxyZone",this._delegateSpec=null,this.properties={ProxyZoneSpec:this},this.propertyKeys=null,this.lastTaskState=null,this.isNeedToTriggerHasTask=!1,this.tasks=[],this.setDelegate(e)}setDelegate(e){const t=this._delegateSpec!==e;this._delegateSpec=e,this.propertyKeys&&this.propertyKeys.forEach((e=>delete this.properties[e])),this.propertyKeys=null,e&&e.properties&&(this.propertyKeys=Object.keys(e.properties),this.propertyKeys.forEach((t=>this.properties[t]=e.properties[t]))),t&&this.lastTaskState&&(this.lastTaskState.macroTask||this.lastTaskState.microTask)&&(this.isNeedToTriggerHasTask=!0)}getDelegate(){return this._delegateSpec}resetDelegate(){this.getDelegate(),this.setDelegate(this.defaultSpecDelegate)}tryTriggerHasTask(e,t,n){this.isNeedToTriggerHasTask&&this.lastTaskState&&(this.isNeedToTriggerHasTask=!1,this.onHasTask(e,t,n,this.lastTaskState))}removeFromTasks(e){if(this.tasks)for(let t=0;t<this.tasks.length;t++)if(this.tasks[t]===e)return void this.tasks.splice(t,1)}getAndClearPendingTasksInfo(){if(0===this.tasks.length)return"";const e="--Pending async tasks are: ["+this.tasks.map((e=>{const t=e.data&&Object.keys(e.data).map((t=>t+":"+e.data[t])).join(",");return`type: ${e.type}, source: ${e.source}, args: {${t}}`}))+"]";return this.tasks=[],e}onFork(e,t,n,r){return this._delegateSpec&&this._delegateSpec.onFork?this._delegateSpec.onFork(e,t,n,r):e.fork(n,r)}onIntercept(e,t,n,r,s){return this._delegateSpec&&this._delegateSpec.onIntercept?this._delegateSpec.onIntercept(e,t,n,r,s):e.intercept(n,r,s)}onInvoke(e,t,n,r,s,i,o){return this.tryTriggerHasTask(e,t,n),this._delegateSpec&&this._delegateSpec.onInvoke?this._delegateSpec.onInvoke(e,t,n,r,s,i,o):e.invoke(n,r,s,i,o)}onHandleError(e,t,n,r){return this._delegateSpec&&this._delegateSpec.onHandleError?this._delegateSpec.onHandleError(e,t,n,r):e.handleError(n,r)}onScheduleTask(e,t,n,r){return"eventTask"!==r.type&&this.tasks.push(r),this._delegateSpec&&this._delegateSpec.onScheduleTask?this._delegateSpec.onScheduleTask(e,t,n,r):e.scheduleTask(n,r)}onInvokeTask(e,t,n,r,s,i){return"eventTask"!==r.type&&this.removeFromTasks(r),this.tryTriggerHasTask(e,t,n),this._delegateSpec&&this._delegateSpec.onInvokeTask?this._delegateSpec.onInvokeTask(e,t,n,r,s,i):e.invokeTask(n,r,s,i)}onCancelTask(e,t,n,r){return"eventTask"!==r.type&&this.removeFromTasks(r),this.tryTriggerHasTask(e,t,n),this._delegateSpec&&this._delegateSpec.onCancelTask?this._delegateSpec.onCancelTask(e,t,n,r):e.cancelTask(n,r)}onHasTask(e,t,n,r){this.lastTaskState=r,this._delegateSpec&&this._delegateSpec.onHasTask?this._delegateSpec.onHasTask(e,t,n,r):e.hasTask(n,r)}}Zone.ProxyZoneSpec=ProxyZoneSpec;class SyncTestZoneSpec{constructor(e){this.runZone=Zone.current,this.name="syncTestZone for "+e}onScheduleTask(e,t,n,r){switch(r.type){case"microTask":case"macroTask":throw new Error(`Cannot call ${r.source} from within a sync test (${this.name}).`);case"eventTask":r=e.scheduleTask(n,r)}return r}}Zone.SyncTestZoneSpec=SyncTestZoneSpec,Zone.__load_patch("jasmine",((e,t,n)=>{if(!t)throw new Error("Missing: zone.js");if("undefined"!=typeof jest)return;if("undefined"==typeof jasmine||jasmine.__zone_patch__)return;jasmine.__zone_patch__=!0;const r=t.SyncTestZoneSpec,s=t.ProxyZoneSpec;if(!r)throw new Error("Missing: SyncTestZoneSpec");if(!s)throw new Error("Missing: ProxyZoneSpec");const i=t.current,o=t.__symbol__,c=!0===e[o("fakeAsyncDisablePatchingClock")],a=!c&&(!0===e[o("fakeAsyncPatchLock")]||!0===e[o("fakeAsyncAutoFakeAsyncWhenClockPatched")]);if(!0!==e[o("ignoreUnhandledRejection")]){const t=jasmine.GlobalErrors;t&&!jasmine[o("GlobalErrors")]&&(jasmine[o("GlobalErrors")]=t,jasmine.GlobalErrors=function(){const n=new t,r=n.install;return r&&!n[o("install")]&&(n[o("install")]=r,n.install=function(){const t="undefined"!=typeof process&&!!process.on,n=t?process.listeners("unhandledRejection"):e.eventListeners("unhandledrejection"),s=r.apply(this,arguments);return t?process.removeAllListeners("unhandledRejection"):e.removeAllListeners("unhandledrejection"),n&&n.forEach((n=>{t?process.on("unhandledRejection",n):e.addEventListener("unhandledrejection",n)})),s}),n})}const u=jasmine.getEnv();if(["describe","xdescribe","fdescribe"].forEach((e=>{let t=u[e];u[e]=function(e,n){return t.call(this,e,function s(e,t){return function(){return i.fork(new r(`jasmine.describe#${e}`)).run(t,this,arguments)}}(e,n))}})),["it","xit","fit"].forEach((e=>{let t=u[e];u[o(e)]=t,u[e]=function(e,n,r){return arguments[1]=h(n),t.apply(this,arguments)}})),["beforeEach","afterEach","beforeAll","afterAll"].forEach((e=>{let t=u[e];u[o(e)]=t,u[e]=function(e,n){return arguments[0]=h(e),t.apply(this,arguments)}})),!c){const e=jasmine[o("clock")]=jasmine.clock;jasmine.clock=function(){const n=e.apply(this,arguments);if(!n[o("patched")]){n[o("patched")]=o("patched");const e=n[o("tick")]=n.tick;n.tick=function(){const n=t.current.get("FakeAsyncTestZoneSpec");return n?n.tick.apply(n,arguments):e.apply(this,arguments)};const r=n[o("mockDate")]=n.mockDate;n.mockDate=function(){const e=t.current.get("FakeAsyncTestZoneSpec");if(e){const t=arguments.length>0?arguments[0]:new Date;return e.setFakeBaseSystemTime.apply(e,t&&"function"==typeof t.getTime?[t.getTime()]:arguments)}return r.apply(this,arguments)},a&&["install","uninstall"].forEach((e=>{const r=n[o(e)]=n[e];n[e]=function(){if(!t.FakeAsyncTestZoneSpec)return r.apply(this,arguments);jasmine[o("clockInstalled")]="install"===e}}))}return n}}if(!jasmine[t.__symbol__("createSpyObj")]){const e=jasmine.createSpyObj;jasmine[t.__symbol__("createSpyObj")]=e,jasmine.createSpyObj=function(){const t=Array.prototype.slice.call(arguments);let n;if(t.length>=3&&t[2]){const r=Object.defineProperty;Object.defineProperty=function(e,t,n){return r.call(this,e,t,{...n,configurable:!0,enumerable:!0})};try{n=e.apply(this,t)}finally{Object.defineProperty=r}}else n=e.apply(this,t);return n}}function l(e,n,r,s){const i=!!jasmine[o("clockInstalled")],c=r.testProxyZone;if(i&&a){const n=t[t.__symbol__("fakeAsyncTest")];n&&"function"==typeof n.fakeAsync&&(e=n.fakeAsync(e))}return s?c.run(e,n,[s]):c.run(e,n)}function h(e){return e&&(e.length?function(t){return l(e,this,this.queueRunner,t)}:function(){return l(e,this,this.queueRunner)})}const d=jasmine.QueueRunner;jasmine.QueueRunner=function(n){function r(r){r.onComplete&&(r.onComplete=(e=>()=>{this.testProxyZone=null,this.testProxyZoneSpec=null,i.scheduleMicroTask("jasmine.onComplete",e)})(r.onComplete));const s=e[t.__symbol__("setTimeout")],o=e[t.__symbol__("clearTimeout")];s&&(r.timeout={setTimeout:s||e.setTimeout,clearTimeout:o||e.clearTimeout}),jasmine.UserContext?(r.userContext||(r.userContext=new jasmine.UserContext),r.userContext.queueRunner=this):(r.userContext||(r.userContext={}),r.userContext.queueRunner=this);const c=r.onException;r.onException=function(e){if(e&&"Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL."===e.message){const t=this&&this.testProxyZoneSpec;if(t){const n=t.getAndClearPendingTasksInfo();try{e.message+=n}catch(e){}}}c&&c.call(this,e)},n.call(this,r)}return function(e,t){for(const n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);function n(){this.constructor=e}e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(r,n),r.prototype.execute=function(){let e=t.current,r=!1;for(;e;){if(e===i){r=!0;break}e=e.parent}if(!r)throw new Error("Unexpected Zone: "+t.current.name);this.testProxyZoneSpec=new s,this.testProxyZone=i.fork(this.testProxyZoneSpec),t.currentTask?n.prototype.execute.call(this):t.current.scheduleMicroTask("jasmine.execute().forceTask",(()=>d.prototype.execute.call(this)))},r}(d)})),Zone.__load_patch("jest",((e,t,n)=>{if("undefined"==typeof jest||jest.__zone_patch__)return;t[n.symbol("ignoreConsoleErrorUncaughtError")]=!0,jest.__zone_patch__=!0;const r=t.ProxyZoneSpec,s=t.SyncTestZoneSpec;if(!r)throw new Error("Missing ProxyZoneSpec");const i=t.current,o=i.fork(new s("jest.describe")),c=new r,a=i.fork(c);function u(e){return function(...t){return o.run(e,this,t)}}function l(e,r=!1){if("function"!=typeof e)return e;const s=function(){if(!0===t[n.symbol("useFakeTimersCalled")]&&e&&!e.isFakeAsync){const n=t[t.__symbol__("fakeAsyncTest")];n&&"function"==typeof n.fakeAsync&&(e=n.fakeAsync(e))}return c.isTestFunc=r,a.run(e,null,arguments)};return Object.defineProperty(s,"length",{configurable:!0,writable:!0,enumerable:!1}),s.length=e.length,s}["describe","xdescribe","fdescribe"].forEach((n=>{let r=e[n];e[t.__symbol__(n)]||(e[t.__symbol__(n)]=r,e[n]=function(...e){return e[1]=u(e[1]),r.apply(this,e)},e[n].each=function s(e){return function(...t){const n=e.apply(this,t);return function(...e){return e[1]=u(e[1]),n.apply(this,e)}}}(r.each))})),e.describe.only=e.fdescribe,e.describe.skip=e.xdescribe,["it","xit","fit","test","xtest"].forEach((n=>{let r=e[n];e[t.__symbol__(n)]||(e[t.__symbol__(n)]=r,e[n]=function(...e){return e[1]=l(e[1],!0),r.apply(this,e)},e[n].each=function s(e){return function(...t){return function(...n){return n[1]=l(n[1]),e.apply(this,t).apply(this,n)}}}(r.each),e[n].todo=r.todo)})),e.it.only=e.fit,e.it.skip=e.xit,e.test.only=e.fit,e.test.skip=e.xit,["beforeEach","afterEach","beforeAll","afterAll"].forEach((n=>{let r=e[n];e[t.__symbol__(n)]||(e[t.__symbol__(n)]=r,e[n]=function(...e){return e[0]=l(e[0]),r.apply(this,e)})})),t.patchJestObject=function e(r,s=!1){function i(){return!!t.current.get("FakeAsyncTestZoneSpec")}function o(){const e=t.current.get("ProxyZoneSpec");return e&&e.isTestFunc}r[n.symbol("fakeTimers")]||(r[n.symbol("fakeTimers")]=!0,n.patchMethod(r,"_checkFakeTimers",(e=>function(t,n){return!!i()||e.apply(t,n)})),n.patchMethod(r,"useFakeTimers",(e=>function(r,i){return t[n.symbol("useFakeTimersCalled")]=!0,s||o()?e.apply(r,i):r})),n.patchMethod(r,"useRealTimers",(e=>function(r,i){return t[n.symbol("useFakeTimersCalled")]=!1,s||o()?e.apply(r,i):r})),n.patchMethod(r,"setSystemTime",(e=>function(n,r){const s=t.current.get("FakeAsyncTestZoneSpec");if(!s||!i())return e.apply(n,r);s.setFakeBaseSystemTime(r[0])})),n.patchMethod(r,"getRealSystemTime",(e=>function(n,r){const s=t.current.get("FakeAsyncTestZoneSpec");return s&&i()?s.getRealSystemTime():e.apply(n,r)})),n.patchMethod(r,"runAllTicks",(e=>function(n,r){const s=t.current.get("FakeAsyncTestZoneSpec");if(!s)return e.apply(n,r);s.flushMicrotasks()})),n.patchMethod(r,"runAllTimers",(e=>function(n,r){const s=t.current.get("FakeAsyncTestZoneSpec");if(!s)return e.apply(n,r);s.flush(100,!0)})),n.patchMethod(r,"advanceTimersByTime",(e=>function(n,r){const s=t.current.get("FakeAsyncTestZoneSpec");if(!s)return e.apply(n,r);s.tick(r[0])})),n.patchMethod(r,"runOnlyPendingTimers",(e=>function(n,r){const s=t.current.get("FakeAsyncTestZoneSpec");if(!s)return e.apply(n,r);s.flushOnlyPendingTimers()})),n.patchMethod(r,"advanceTimersToNextTimer",(e=>function(n,r){const s=t.current.get("FakeAsyncTestZoneSpec");if(!s)return e.apply(n,r);s.tickToNext(r[0])})),n.patchMethod(r,"clearAllTimers",(e=>function(n,r){const s=t.current.get("FakeAsyncTestZoneSpec");if(!s)return e.apply(n,r);s.removeAllTimers()})),n.patchMethod(r,"getTimerCount",(e=>function(n,r){const s=t.current.get("FakeAsyncTestZoneSpec");return s?s.getTimerCount():e.apply(n,r)})))}})),Zone.__load_patch("mocha",((e,t)=>{const n=e.Mocha;if(void 0===n)return;if(void 0===t)throw new Error("Missing Zone.js");const r=t.ProxyZoneSpec,s=t.SyncTestZoneSpec;if(!r)throw new Error("Missing ProxyZoneSpec");if(n.__zone_patch__)throw new Error('"Mocha" has already been patched with "Zone".');n.__zone_patch__=!0;const i=t.current,o=i.fork(new s("Mocha.describe"));let c=null;const a=i.fork(new r),u={after:e.after,afterEach:e.afterEach,before:e.before,beforeEach:e.beforeEach,describe:e.describe,it:e.it};function l(e,t,n){for(let r=0;r<e.length;r++){let s=e[r];"function"==typeof s&&(e[r]=0===s.length?t(s):n(s),e[r].toString=function(){return s.toString()})}return e}function h(e){return l(e,(function(e){return function(){return o.run(e,this,arguments)}}))}function d(e){return l(e,(function(e){return function(){return c.run(e,this)}}),(function(e){return function(t){return c.run(e,this,[t])}}))}function p(e){return l(e,(function(e){return function(){return a.run(e,this)}}),(function(e){return function(t){return a.run(e,this,[t])}}))}var T,m;e.describe=e.suite=function(){return u.describe.apply(this,h(arguments))},e.xdescribe=e.suite.skip=e.describe.skip=function(){return u.describe.skip.apply(this,h(arguments))},e.describe.only=e.suite.only=function(){return u.describe.only.apply(this,h(arguments))},e.it=e.specify=e.test=function(){return u.it.apply(this,d(arguments))},e.xit=e.xspecify=e.it.skip=function(){return u.it.skip.apply(this,d(arguments))},e.it.only=e.test.only=function(){return u.it.only.apply(this,d(arguments))},e.after=e.suiteTeardown=function(){return u.after.apply(this,p(arguments))},e.afterEach=e.teardown=function(){return u.afterEach.apply(this,d(arguments))},e.before=e.suiteSetup=function(){return u.before.apply(this,p(arguments))},e.beforeEach=e.setup=function(){return u.beforeEach.apply(this,d(arguments))},T=n.Runner.prototype.runTest,m=n.Runner.prototype.run,n.Runner.prototype.runTest=function(e){t.current.scheduleMicroTask("mocha.forceTask",(()=>{T.call(this,e)}))},n.Runner.prototype.run=function(e){return this.on("test",(e=>{c=i.fork(new r)})),this.on("fail",((e,t)=>{const n=c&&c.get("ProxyZoneSpec");if(n&&t)try{t.message+=n.getAndClearPendingTasksInfo()}catch(e){}})),m.call(this,e)}})),function(e){class t{static{this.symbolParentUnresolved=Zone.__symbol__("parentUnresolved")}constructor(t,n,r){this.finishCallback=t,this.failCallback=n,this._pendingMicroTasks=!1,this._pendingMacroTasks=!1,this._alreadyErrored=!1,this._isSync=!1,this._existingFinishTimer=null,this.entryFunction=null,this.runZone=Zone.current,this.unresolvedChainedPromiseCount=0,this.supportWaitUnresolvedChainedPromise=!1,this.name="asyncTestZone for "+r,this.properties={AsyncTestZoneSpec:this},this.supportWaitUnresolvedChainedPromise=!0===e[Zone.__symbol__("supportWaitUnResolvedChainedPromise")]}isUnresolvedChainedPromisePending(){return this.unresolvedChainedPromiseCount>0}_finishCallbackIfDone(){null!==this._existingFinishTimer&&(clearTimeout(this._existingFinishTimer),this._existingFinishTimer=null),this._pendingMicroTasks||this._pendingMacroTasks||this.supportWaitUnresolvedChainedPromise&&this.isUnresolvedChainedPromisePending()||this.runZone.run((()=>{this._existingFinishTimer=setTimeout((()=>{this._alreadyErrored||this._pendingMicroTasks||this._pendingMacroTasks||this.finishCallback()}),0)}))}patchPromiseForTest(){if(!this.supportWaitUnresolvedChainedPromise)return;const e=Promise[Zone.__symbol__("patchPromiseForTest")];e&&e()}unPatchPromiseForTest(){if(!this.supportWaitUnresolvedChainedPromise)return;const e=Promise[Zone.__symbol__("unPatchPromiseForTest")];e&&e()}onScheduleTask(e,n,r,s){return"eventTask"!==s.type&&(this._isSync=!1),"microTask"===s.type&&s.data&&s.data instanceof Promise&&!0===s.data[t.symbolParentUnresolved]&&this.unresolvedChainedPromiseCount--,e.scheduleTask(r,s)}onInvokeTask(e,t,n,r,s,i){return"eventTask"!==r.type&&(this._isSync=!1),e.invokeTask(n,r,s,i)}onCancelTask(e,t,n,r){return"eventTask"!==r.type&&(this._isSync=!1),e.cancelTask(n,r)}onInvoke(e,t,n,r,s,i,o){this.entryFunction||(this.entryFunction=r);try{return this._isSync=!0,e.invoke(n,r,s,i,o)}finally{this._isSync&&this.entryFunction===r&&this._finishCallbackIfDone()}}onHandleError(e,t,n,r){return e.handleError(n,r)&&(this.failCallback(r),this._alreadyErrored=!0),!1}onHasTask(e,t,n,r){e.hasTask(n,r),t===n&&("microTask"==r.change?(this._pendingMicroTasks=r.microTask,this._finishCallbackIfDone()):"macroTask"==r.change&&(this._pendingMacroTasks=r.macroTask,this._finishCallbackIfDone()))}}Zone.AsyncTestZoneSpec=t}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global),Zone.__load_patch("asynctest",((e,t,n)=>{function r(e,n,r,s){const i=t.current,o=t.AsyncTestZoneSpec;if(void 0===o)throw new Error("AsyncTestZoneSpec is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/plugins/async-test");const c=t.ProxyZoneSpec;if(!c)throw new Error("ProxyZoneSpec is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/plugins/proxy");const a=c.get();c.assertPresent();const u=t.current.getZoneWith("ProxyZoneSpec"),l=a.getDelegate();return u.parent.run((()=>{const e=new o((()=>{a.getDelegate()==e&&a.setDelegate(l),e.unPatchPromiseForTest(),i.run((()=>{r()}))}),(t=>{a.getDelegate()==e&&a.setDelegate(l),e.unPatchPromiseForTest(),i.run((()=>{s(t)}))}),"test");a.setDelegate(e),e.patchPromiseForTest()})),t.current.runGuarded(e,n)}t[n.symbol("asyncTest")]=function t(n){return e.jasmine?function(e){e||((e=function(){}).fail=function(e){throw e}),r(n,this,e,(t=>{if("string"==typeof t)return e.fail(new Error(t));e.fail(t)}))}:function(){return new Promise(((e,t)=>{r(n,this,e,t)}))}}})),function(e){const t=e.Date;function n(){if(0===arguments.length){const e=new t;return e.setTime(n.now()),e}{const e=Array.prototype.slice.call(arguments);return new t(...e)}}n.now=function(){const e=Zone.current.get("FakeAsyncTestZoneSpec");return e?e.getFakeSystemTime():t.now.apply(this,arguments)},n.UTC=t.UTC,n.parse=t.parse;const r={setTimeout:e.setTimeout,setInterval:e.setInterval,clearTimeout:e.clearTimeout,clearInterval:e.clearInterval};class s{static{this.nextId=1}constructor(){this._schedulerQueue=[],this._currentTickTime=0,this._currentFakeBaseSystemTime=t.now(),this._currentTickRequeuePeriodicEntries=[]}getCurrentTickTime(){return this._currentTickTime}getFakeSystemTime(){return this._currentFakeBaseSystemTime+this._currentTickTime}setFakeBaseSystemTime(e){this._currentFakeBaseSystemTime=e}getRealSystemTime(){return t.now()}scheduleFunction(e,t,n){let r=(n={args:[],isPeriodic:!1,isRequestAnimationFrame:!1,id:-1,isRequeuePeriodic:!1,...n}).id<0?s.nextId++:n.id,i={endTime:this._currentTickTime+t,id:r,func:e,args:n.args,delay:t,isPeriodic:n.isPeriodic,isRequestAnimationFrame:n.isRequestAnimationFrame};n.isRequeuePeriodic&&this._currentTickRequeuePeriodicEntries.push(i);let o=0;for(;o<this._schedulerQueue.length&&!(i.endTime<this._schedulerQueue[o].endTime);o++);return this._schedulerQueue.splice(o,0,i),r}removeScheduledFunctionWithId(e){for(let t=0;t<this._schedulerQueue.length;t++)if(this._schedulerQueue[t].id==e){this._schedulerQueue.splice(t,1);break}}removeAll(){this._schedulerQueue=[]}getTimerCount(){return this._schedulerQueue.length}tickToNext(e=1,t,n){this._schedulerQueue.length<e||this.tick(this._schedulerQueue[e-1].endTime-this._currentTickTime,t,n)}tick(t=0,n,r){let s=this._currentTickTime+t,i=0;const o=(r=Object.assign({processNewMacroTasksSynchronously:!0},r)).processNewMacroTasksSynchronously?this._schedulerQueue:this._schedulerQueue.slice();if(0===o.length&&n)n(t);else{for(;o.length>0&&(this._currentTickRequeuePeriodicEntries=[],!(s<o[0].endTime));){let t=o.shift();if(!r.processNewMacroTasksSynchronously){const e=this._schedulerQueue.indexOf(t);e>=0&&this._schedulerQueue.splice(e,1)}if(i=this._currentTickTime,this._currentTickTime=t.endTime,n&&n(this._currentTickTime-i),!t.func.apply(e,t.isRequestAnimationFrame?[this._currentTickTime]:t.args))break;r.processNewMacroTasksSynchronously||this._currentTickRequeuePeriodicEntries.forEach((e=>{let t=0;for(;t<o.length&&!(e.endTime<o[t].endTime);t++);o.splice(t,0,e)}))}i=this._currentTickTime,this._currentTickTime=s,n&&n(this._currentTickTime-i)}}flushOnlyPendingTimers(e){if(0===this._schedulerQueue.length)return 0;const t=this._currentTickTime;return this.tick(this._schedulerQueue[this._schedulerQueue.length-1].endTime-t,e,{processNewMacroTasksSynchronously:!1}),this._currentTickTime-t}flush(e=20,t=!1,n){return t?this.flushPeriodic(n):this.flushNonPeriodic(e,n)}flushPeriodic(e){if(0===this._schedulerQueue.length)return 0;const t=this._currentTickTime;return this.tick(this._schedulerQueue[this._schedulerQueue.length-1].endTime-t,e),this._currentTickTime-t}flushNonPeriodic(t,n){const r=this._currentTickTime;let s=0,i=0;for(;this._schedulerQueue.length>0;){if(i++,i>t)throw new Error("flush failed after reaching the limit of "+t+" tasks. Does your code use a polling timeout?");if(0===this._schedulerQueue.filter((e=>!e.isPeriodic&&!e.isRequestAnimationFrame)).length)break;const r=this._schedulerQueue.shift();if(s=this._currentTickTime,this._currentTickTime=r.endTime,n&&n(this._currentTickTime-s),!r.func.apply(e,r.args))break}return this._currentTickTime-r}}class i{static assertInZone(){if(null==Zone.current.get("FakeAsyncTestZoneSpec"))throw new Error("The code should be running in the fakeAsync zone to call this function")}constructor(t,n=!1,r){this.trackPendingRequestAnimationFrame=n,this.macroTaskOptions=r,this._scheduler=new s,this._microtasks=[],this._lastError=null,this._uncaughtPromiseErrors=Promise[Zone.__symbol__("uncaughtPromiseErrors")],this.pendingPeriodicTimers=[],this.pendingTimers=[],this.patchDateLocked=!1,this.properties={FakeAsyncTestZoneSpec:this},this.name="fakeAsyncTestZone for "+t,this.macroTaskOptions||(this.macroTaskOptions=e[Zone.__symbol__("FakeAsyncTestMacroTask")])}_fnAndFlush(t,n){return(...r)=>(t.apply(e,r),null===this._lastError?(null!=n.onSuccess&&n.onSuccess.apply(e),this.flushMicrotasks()):null!=n.onError&&n.onError.apply(e),null===this._lastError)}static _removeTimer(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}_dequeueTimer(e){return()=>{i._removeTimer(this.pendingTimers,e)}}_requeuePeriodicTimer(e,t,n,r){return()=>{-1!==this.pendingPeriodicTimers.indexOf(r)&&this._scheduler.scheduleFunction(e,t,{args:n,isPeriodic:!0,id:r,isRequeuePeriodic:!0})}}_dequeuePeriodicTimer(e){return()=>{i._removeTimer(this.pendingPeriodicTimers,e)}}_setTimeout(e,t,n,r=!0){let i=this._dequeueTimer(s.nextId),o=this._fnAndFlush(e,{onSuccess:i,onError:i}),c=this._scheduler.scheduleFunction(o,t,{args:n,isRequestAnimationFrame:!r});return r&&this.pendingTimers.push(c),c}_clearTimeout(e){i._removeTimer(this.pendingTimers,e),this._scheduler.removeScheduledFunctionWithId(e)}_setInterval(e,t,n){let r=s.nextId,i={onSuccess:null,onError:this._dequeuePeriodicTimer(r)},o=this._fnAndFlush(e,i);return i.onSuccess=this._requeuePeriodicTimer(o,t,n,r),this._scheduler.scheduleFunction(o,t,{args:n,isPeriodic:!0}),this.pendingPeriodicTimers.push(r),r}_clearInterval(e){i._removeTimer(this.pendingPeriodicTimers,e),this._scheduler.removeScheduledFunctionWithId(e)}_resetLastErrorAndThrow(){let e=this._lastError||this._uncaughtPromiseErrors[0];throw this._uncaughtPromiseErrors.length=0,this._lastError=null,e}getCurrentTickTime(){return this._scheduler.getCurrentTickTime()}getFakeSystemTime(){return this._scheduler.getFakeSystemTime()}setFakeBaseSystemTime(e){this._scheduler.setFakeBaseSystemTime(e)}getRealSystemTime(){return this._scheduler.getRealSystemTime()}static patchDate(){e[Zone.__symbol__("disableDatePatching")]||e.Date!==n&&(e.Date=n,n.prototype=t.prototype,i.checkTimerPatch())}static resetDate(){e.Date===n&&(e.Date=t)}static checkTimerPatch(){e.setTimeout!==r.setTimeout&&(e.setTimeout=r.setTimeout,e.clearTimeout=r.clearTimeout),e.setInterval!==r.setInterval&&(e.setInterval=r.setInterval,e.clearInterval=r.clearInterval)}lockDatePatch(){this.patchDateLocked=!0,i.patchDate()}unlockDatePatch(){this.patchDateLocked=!1,i.resetDate()}tickToNext(e=1,t,n={processNewMacroTasksSynchronously:!0}){e<=0||(i.assertInZone(),this.flushMicrotasks(),this._scheduler.tickToNext(e,t,n),null!==this._lastError&&this._resetLastErrorAndThrow())}tick(e=0,t,n={processNewMacroTasksSynchronously:!0}){i.assertInZone(),this.flushMicrotasks(),this._scheduler.tick(e,t,n),null!==this._lastError&&this._resetLastErrorAndThrow()}flushMicrotasks(){for(i.assertInZone();this._microtasks.length>0;){let e=this._microtasks.shift();e.func.apply(e.target,e.args)}(()=>{(null!==this._lastError||this._uncaughtPromiseErrors.length)&&this._resetLastErrorAndThrow()})()}flush(e,t,n){i.assertInZone(),this.flushMicrotasks();const r=this._scheduler.flush(e,t,n);return null!==this._lastError&&this._resetLastErrorAndThrow(),r}flushOnlyPendingTimers(e){i.assertInZone(),this.flushMicrotasks();const t=this._scheduler.flushOnlyPendingTimers(e);return null!==this._lastError&&this._resetLastErrorAndThrow(),t}removeAllTimers(){i.assertInZone(),this._scheduler.removeAll(),this.pendingPeriodicTimers=[],this.pendingTimers=[]}getTimerCount(){return this._scheduler.getTimerCount()+this._microtasks.length}onScheduleTask(e,t,n,r){switch(r.type){case"microTask":let t,s=r.data&&r.data.args;if(s){let e=r.data.cbIdx;"number"==typeof s.length&&s.length>e+1&&(t=Array.prototype.slice.call(s,e+1))}this._microtasks.push({func:r.invoke,args:t,target:r.data&&r.data.target});break;case"macroTask":switch(r.source){case"setTimeout":r.data.handleId=this._setTimeout(r.invoke,r.data.delay,Array.prototype.slice.call(r.data.args,2));break;case"setImmediate":r.data.handleId=this._setTimeout(r.invoke,0,Array.prototype.slice.call(r.data.args,1));break;case"setInterval":r.data.handleId=this._setInterval(r.invoke,r.data.delay,Array.prototype.slice.call(r.data.args,2));break;case"XMLHttpRequest.send":throw new Error("Cannot make XHRs from within a fake async test. Request URL: "+r.data.url);case"requestAnimationFrame":case"webkitRequestAnimationFrame":case"mozRequestAnimationFrame":r.data.handleId=this._setTimeout(r.invoke,16,r.data.args,this.trackPendingRequestAnimationFrame);break;default:const e=this.findMacroTaskOption(r);if(e){const t=r.data&&r.data.args,n=t&&t.length>1?t[1]:0;let s=e.callbackArgs?e.callbackArgs:t;e.isPeriodic?(r.data.handleId=this._setInterval(r.invoke,n,s),r.data.isPeriodic=!0):r.data.handleId=this._setTimeout(r.invoke,n,s);break}throw new Error("Unknown macroTask scheduled in fake async test: "+r.source)}break;case"eventTask":r=e.scheduleTask(n,r)}return r}onCancelTask(e,t,n,r){switch(r.source){case"setTimeout":case"requestAnimationFrame":case"webkitRequestAnimationFrame":case"mozRequestAnimationFrame":return this._clearTimeout(r.data.handleId);case"setInterval":return this._clearInterval(r.data.handleId);default:const t=this.findMacroTaskOption(r);if(t){const e=r.data.handleId;return t.isPeriodic?this._clearInterval(e):this._clearTimeout(e)}return e.cancelTask(n,r)}}onInvoke(e,t,n,r,s,o,c){try{return i.patchDate(),e.invoke(n,r,s,o,c)}finally{this.patchDateLocked||i.resetDate()}}findMacroTaskOption(e){if(!this.macroTaskOptions)return null;for(let t=0;t<this.macroTaskOptions.length;t++){const n=this.macroTaskOptions[t];if(n.source===e.source)return n}return null}onHandleError(e,t,n,r){return this._lastError=r,!1}}Zone.FakeAsyncTestZoneSpec=i}("object"==typeof window&&window||"object"==typeof self&&self||global),Zone.__load_patch("fakeasync",((e,t,n)=>{const r=t&&t.FakeAsyncTestZoneSpec;function s(){return t&&t.ProxyZoneSpec}let i=null;function o(){i&&i.unlockDatePatch(),i=null,s()&&s().assertPresent().resetDelegate()}function c(){if(null==i&&(i=t.current.get("FakeAsyncTestZoneSpec"),null==i))throw new Error("The code should be running in the fakeAsync zone to call this function");return i}function a(){c().flushMicrotasks()}t[n.symbol("fakeAsyncTest")]={resetFakeAsyncZone:o,flushMicrotasks:a,discardPeriodicTasks:function u(){c().pendingPeriodicTimers.length=0},tick:function l(e=0,t=!1){c().tick(e,null,t)},flush:function h(e){return c().flush(e)},fakeAsync:function d(e){const n=function(...n){const c=s();if(!c)throw new Error("ProxyZoneSpec is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/plugins/proxy");const u=c.assertPresent();if(t.current.get("FakeAsyncTestZoneSpec"))throw new Error("fakeAsync() calls can not be nested");try{if(!i){if(u.getDelegate()instanceof r)throw new Error("fakeAsync() calls can not be nested");i=new r}let t;const s=u.getDelegate();u.setDelegate(i),i.lockDatePatch();try{t=e.apply(this,n),a()}finally{u.setDelegate(s)}if(i.pendingPeriodicTimers.length>0)throw new Error(`${i.pendingPeriodicTimers.length} periodic timer(s) still in the queue.`);if(i.pendingTimers.length>0)throw new Error(`${i.pendingTimers.length} timer(s) still in the queue.`);return t}finally{o()}};return n.isFakeAsync=!0,n}}}),!0),Zone.__load_patch("promisefortest",((e,t,n)=>{const r=n.symbol("state"),s=n.symbol("parentUnresolved");Promise[n.symbol("patchPromiseForTest")]=function e(){let n=Promise[t.__symbol__("ZonePromiseThen")];n||(n=Promise[t.__symbol__("ZonePromiseThen")]=Promise.prototype.then,Promise.prototype.then=function(){const e=n.apply(this,arguments);if(null===this[r]){const n=t.current.get("AsyncTestZoneSpec");n&&(n.unresolvedChainedPromiseCount++,e[s]=!0)}return e})},Promise[n.symbol("unPatchPromiseForTest")]=function e(){const n=Promise[t.__symbol__("ZonePromiseThen")];n&&(Promise.prototype.then=n,Promise[t.__symbol__("ZonePromiseThen")]=void 0)}}));
*/function patchJasmine(e){e.__load_patch("jasmine",((e,t,n)=>{if(!t)throw new Error("Missing: zone.js");if("undefined"!=typeof jest)return;if("undefined"==typeof jasmine||jasmine.__zone_patch__)return;jasmine.__zone_patch__=!0;const s=t.SyncTestZoneSpec,r=t.ProxyZoneSpec;if(!s)throw new Error("Missing: SyncTestZoneSpec");if(!r)throw new Error("Missing: ProxyZoneSpec");const i=t.current,o=t.__symbol__,c=!0===e[o("fakeAsyncDisablePatchingClock")],a=!c&&(!0===e[o("fakeAsyncPatchLock")]||!0===e[o("fakeAsyncAutoFakeAsyncWhenClockPatched")]);if(!0!==e[o("ignoreUnhandledRejection")]){const t=jasmine.GlobalErrors;t&&!jasmine[o("GlobalErrors")]&&(jasmine[o("GlobalErrors")]=t,jasmine.GlobalErrors=function(){const n=new t,s=n.install;return s&&!n[o("install")]&&(n[o("install")]=s,n.install=function(){const t="undefined"!=typeof process&&!!process.on,n=t?process.listeners("unhandledRejection"):e.eventListeners("unhandledrejection"),r=s.apply(this,arguments);return t?process.removeAllListeners("unhandledRejection"):e.removeAllListeners("unhandledrejection"),n&&n.forEach((n=>{t?process.on("unhandledRejection",n):e.addEventListener("unhandledrejection",n)})),r}),n})}const l=jasmine.getEnv();if(["describe","xdescribe","fdescribe"].forEach((e=>{let t=l[e];l[e]=function(e,n){return t.call(this,e,function r(e,t){return function(){return i.fork(new s(`jasmine.describe#${e}`)).run(t,this,arguments)}}(e,n))}})),["it","xit","fit"].forEach((e=>{let t=l[e];l[o(e)]=t,l[e]=function(e,n,s){return arguments[1]=h(n),t.apply(this,arguments)}})),["beforeEach","afterEach","beforeAll","afterAll"].forEach((e=>{let t=l[e];l[o(e)]=t,l[e]=function(e,n){return arguments[0]=h(e),t.apply(this,arguments)}})),!c){const e=jasmine[o("clock")]=jasmine.clock;jasmine.clock=function(){const n=e.apply(this,arguments);if(!n[o("patched")]){n[o("patched")]=o("patched");const e=n[o("tick")]=n.tick;n.tick=function(){const n=t.current.get("FakeAsyncTestZoneSpec");return n?n.tick.apply(n,arguments):e.apply(this,arguments)};const s=n[o("mockDate")]=n.mockDate;n.mockDate=function(){const e=t.current.get("FakeAsyncTestZoneSpec");if(e){const t=arguments.length>0?arguments[0]:new Date;return e.setFakeBaseSystemTime.apply(e,t&&"function"==typeof t.getTime?[t.getTime()]:arguments)}return s.apply(this,arguments)},a&&["install","uninstall"].forEach((e=>{const s=n[o(e)]=n[e];n[e]=function(){if(!t.FakeAsyncTestZoneSpec)return s.apply(this,arguments);jasmine[o("clockInstalled")]="install"===e}}))}return n}}if(!jasmine[t.__symbol__("createSpyObj")]){const e=jasmine.createSpyObj;jasmine[t.__symbol__("createSpyObj")]=e,jasmine.createSpyObj=function(){const t=Array.prototype.slice.call(arguments);let n;if(t.length>=3&&t[2]){const s=Object.defineProperty;Object.defineProperty=function(e,t,n){return s.call(this,e,t,{...n,configurable:!0,enumerable:!0})};try{n=e.apply(this,t)}finally{Object.defineProperty=s}}else n=e.apply(this,t);return n}}function u(e,n,s,r){const i=!!jasmine[o("clockInstalled")],c=s.testProxyZone;if(i&&a){const n=t[t.__symbol__("fakeAsyncTest")];n&&"function"==typeof n.fakeAsync&&(e=n.fakeAsync(e))}return r?c.run(e,n,[r]):c.run(e,n)}function h(e){return e&&(e.length?function(t){return u(e,this,this.queueRunner,t)}:function(){return u(e,this,this.queueRunner)})}const p=jasmine.QueueRunner;jasmine.QueueRunner=function(n){function s(s){s.onComplete&&(s.onComplete=(e=>()=>{this.testProxyZone=null,this.testProxyZoneSpec=null,i.scheduleMicroTask("jasmine.onComplete",e)})(s.onComplete));const r=e[t.__symbol__("setTimeout")],o=e[t.__symbol__("clearTimeout")];r&&(s.timeout={setTimeout:r||e.setTimeout,clearTimeout:o||e.clearTimeout}),jasmine.UserContext?(s.userContext||(s.userContext=new jasmine.UserContext),s.userContext.queueRunner=this):(s.userContext||(s.userContext={}),s.userContext.queueRunner=this);const c=s.onException;s.onException=function(e){if(e&&"Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL."===e.message){const t=this&&this.testProxyZoneSpec;if(t){const n=t.getAndClearPendingTasksInfo();try{e.message+=n}catch(e){}}}c&&c.call(this,e)},n.call(this,s)}return function(e,t){for(const n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);function n(){this.constructor=e}e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(s,n),s.prototype.execute=function(){let e=t.current,s=!1;for(;e;){if(e===i){s=!0;break}e=e.parent}if(!s)throw new Error("Unexpected Zone: "+t.current.name);this.testProxyZoneSpec=new r,this.testProxyZone=i.fork(this.testProxyZoneSpec),t.currentTask?n.prototype.execute.call(this):t.current.scheduleMicroTask("jasmine.execute().forceTask",(()=>p.prototype.execute.call(this)))},s}(p)}))}function patchJest(e){e.__load_patch("jest",((e,t,n)=>{if("undefined"==typeof jest||jest.__zone_patch__)return;t[n.symbol("ignoreConsoleErrorUncaughtError")]=!0,jest.__zone_patch__=!0;const s=t.ProxyZoneSpec,r=t.SyncTestZoneSpec;if(!s)throw new Error("Missing ProxyZoneSpec");const i=t.current,o=i.fork(new r("jest.describe")),c=new s,a=i.fork(c);function l(e){return function(...t){return o.run(e,this,t)}}function u(e,s=!1){if("function"!=typeof e)return e;const r=function(){if(!0===t[n.symbol("useFakeTimersCalled")]&&e&&!e.isFakeAsync){const n=t[t.__symbol__("fakeAsyncTest")];n&&"function"==typeof n.fakeAsync&&(e=n.fakeAsync(e))}return c.isTestFunc=s,a.run(e,null,arguments)};return Object.defineProperty(r,"length",{configurable:!0,writable:!0,enumerable:!1}),r.length=e.length,r}["describe","xdescribe","fdescribe"].forEach((n=>{let s=e[n];e[t.__symbol__(n)]||(e[t.__symbol__(n)]=s,e[n]=function(...e){return e[1]=l(e[1]),s.apply(this,e)},e[n].each=function r(e){return function(...t){const n=e.apply(this,t);return function(...e){return e[1]=l(e[1]),n.apply(this,e)}}}(s.each))})),e.describe.only=e.fdescribe,e.describe.skip=e.xdescribe,["it","xit","fit","test","xtest"].forEach((n=>{let s=e[n];e[t.__symbol__(n)]||(e[t.__symbol__(n)]=s,e[n]=function(...e){return e[1]=u(e[1],!0),s.apply(this,e)},e[n].each=function r(e){return function(...t){return function(...n){return n[1]=u(n[1]),e.apply(this,t).apply(this,n)}}}(s.each),e[n].todo=s.todo)})),e.it.only=e.fit,e.it.skip=e.xit,e.test.only=e.fit,e.test.skip=e.xit,["beforeEach","afterEach","beforeAll","afterAll"].forEach((n=>{let s=e[n];e[t.__symbol__(n)]||(e[t.__symbol__(n)]=s,e[n]=function(...e){return e[0]=u(e[0]),s.apply(this,e)})})),t.patchJestObject=function e(s,r=!1){function i(){return!!t.current.get("FakeAsyncTestZoneSpec")}function o(){const e=t.current.get("ProxyZoneSpec");return e&&e.isTestFunc}s[n.symbol("fakeTimers")]||(s[n.symbol("fakeTimers")]=!0,n.patchMethod(s,"_checkFakeTimers",(e=>function(t,n){return!!i()||e.apply(t,n)})),n.patchMethod(s,"useFakeTimers",(e=>function(s,i){return t[n.symbol("useFakeTimersCalled")]=!0,r||o()?e.apply(s,i):s})),n.patchMethod(s,"useRealTimers",(e=>function(s,i){return t[n.symbol("useFakeTimersCalled")]=!1,r||o()?e.apply(s,i):s})),n.patchMethod(s,"setSystemTime",(e=>function(n,s){const r=t.current.get("FakeAsyncTestZoneSpec");if(!r||!i())return e.apply(n,s);r.setFakeBaseSystemTime(s[0])})),n.patchMethod(s,"getRealSystemTime",(e=>function(n,s){const r=t.current.get("FakeAsyncTestZoneSpec");return r&&i()?r.getRealSystemTime():e.apply(n,s)})),n.patchMethod(s,"runAllTicks",(e=>function(n,s){const r=t.current.get("FakeAsyncTestZoneSpec");if(!r)return e.apply(n,s);r.flushMicrotasks()})),n.patchMethod(s,"runAllTimers",(e=>function(n,s){const r=t.current.get("FakeAsyncTestZoneSpec");if(!r)return e.apply(n,s);r.flush(100,!0)})),n.patchMethod(s,"advanceTimersByTime",(e=>function(n,s){const r=t.current.get("FakeAsyncTestZoneSpec");if(!r)return e.apply(n,s);r.tick(s[0])})),n.patchMethod(s,"runOnlyPendingTimers",(e=>function(n,s){const r=t.current.get("FakeAsyncTestZoneSpec");if(!r)return e.apply(n,s);r.flushOnlyPendingTimers()})),n.patchMethod(s,"advanceTimersToNextTimer",(e=>function(n,s){const r=t.current.get("FakeAsyncTestZoneSpec");if(!r)return e.apply(n,s);r.tickToNext(s[0])})),n.patchMethod(s,"clearAllTimers",(e=>function(n,s){const r=t.current.get("FakeAsyncTestZoneSpec");if(!r)return e.apply(n,s);r.removeAllTimers()})),n.patchMethod(s,"getTimerCount",(e=>function(n,s){const r=t.current.get("FakeAsyncTestZoneSpec");return r?r.getTimerCount():e.apply(n,s)})))}}))}function patchMocha(e){e.__load_patch("mocha",((e,t)=>{const n=e.Mocha;if(void 0===n)return;if(void 0===t)throw new Error("Missing Zone.js");const s=t.ProxyZoneSpec,r=t.SyncTestZoneSpec;if(!s)throw new Error("Missing ProxyZoneSpec");if(n.__zone_patch__)throw new Error('"Mocha" has already been patched with "Zone".');n.__zone_patch__=!0;const i=t.current,o=i.fork(new r("Mocha.describe"));let c=null;const a=i.fork(new s),l={after:e.after,afterEach:e.afterEach,before:e.before,beforeEach:e.beforeEach,describe:e.describe,it:e.it};function u(e,t,n){for(let s=0;s<e.length;s++){let r=e[s];"function"==typeof r&&(e[s]=0===r.length?t(r):n(r),e[s].toString=function(){return r.toString()})}return e}function h(e){return u(e,(function(e){return function(){return o.run(e,this,arguments)}}))}function p(e){return u(e,(function(e){return function(){return c.run(e,this)}}),(function(e){return function(t){return c.run(e,this,[t])}}))}function d(e){return u(e,(function(e){return function(){return a.run(e,this)}}),(function(e){return function(t){return a.run(e,this,[t])}}))}var T,f;e.describe=e.suite=function(){return l.describe.apply(this,h(arguments))},e.xdescribe=e.suite.skip=e.describe.skip=function(){return l.describe.skip.apply(this,h(arguments))},e.describe.only=e.suite.only=function(){return l.describe.only.apply(this,h(arguments))},e.it=e.specify=e.test=function(){return l.it.apply(this,p(arguments))},e.xit=e.xspecify=e.it.skip=function(){return l.it.skip.apply(this,p(arguments))},e.it.only=e.test.only=function(){return l.it.only.apply(this,p(arguments))},e.after=e.suiteTeardown=function(){return l.after.apply(this,d(arguments))},e.afterEach=e.teardown=function(){return l.afterEach.apply(this,p(arguments))},e.before=e.suiteSetup=function(){return l.before.apply(this,d(arguments))},e.beforeEach=e.setup=function(){return l.beforeEach.apply(this,p(arguments))},T=n.Runner.prototype.runTest,f=n.Runner.prototype.run,n.Runner.prototype.runTest=function(e){t.current.scheduleMicroTask("mocha.forceTask",(()=>{T.call(this,e)}))},n.Runner.prototype.run=function(e){return this.on("test",(e=>{c=i.fork(new s)})),this.on("fail",((e,t)=>{const n=c&&c.get("ProxyZoneSpec");if(n&&t)try{t.message+=n.getAndClearPendingTasksInfo()}catch(e){}})),f.call(this,e)}}))}const global$2=globalThis;function __symbol__(e){return(global$2.__Zone_symbol_prefix||"__zone_symbol__")+e}const __global="undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global;class AsyncTestZoneSpec{static get symbolParentUnresolved(){return __symbol__("parentUnresolved")}constructor(e,t,n){this.finishCallback=e,this.failCallback=t,this._pendingMicroTasks=!1,this._pendingMacroTasks=!1,this._alreadyErrored=!1,this._isSync=!1,this._existingFinishTimer=null,this.entryFunction=null,this.runZone=Zone.current,this.unresolvedChainedPromiseCount=0,this.supportWaitUnresolvedChainedPromise=!1,this.name="asyncTestZone for "+n,this.properties={AsyncTestZoneSpec:this},this.supportWaitUnresolvedChainedPromise=!0===__global[__symbol__("supportWaitUnResolvedChainedPromise")]}isUnresolvedChainedPromisePending(){return this.unresolvedChainedPromiseCount>0}_finishCallbackIfDone(){null!==this._existingFinishTimer&&(clearTimeout(this._existingFinishTimer),this._existingFinishTimer=null),this._pendingMicroTasks||this._pendingMacroTasks||this.supportWaitUnresolvedChainedPromise&&this.isUnresolvedChainedPromisePending()||this.runZone.run((()=>{this._existingFinishTimer=setTimeout((()=>{this._alreadyErrored||this._pendingMicroTasks||this._pendingMacroTasks||this.finishCallback()}),0)}))}patchPromiseForTest(){if(!this.supportWaitUnresolvedChainedPromise)return;const e=Promise[Zone.__symbol__("patchPromiseForTest")];e&&e()}unPatchPromiseForTest(){if(!this.supportWaitUnresolvedChainedPromise)return;const e=Promise[Zone.__symbol__("unPatchPromiseForTest")];e&&e()}onScheduleTask(e,t,n,s){return"eventTask"!==s.type&&(this._isSync=!1),"microTask"===s.type&&s.data&&s.data instanceof Promise&&!0===s.data[AsyncTestZoneSpec.symbolParentUnresolved]&&this.unresolvedChainedPromiseCount--,e.scheduleTask(n,s)}onInvokeTask(e,t,n,s,r,i){return"eventTask"!==s.type&&(this._isSync=!1),e.invokeTask(n,s,r,i)}onCancelTask(e,t,n,s){return"eventTask"!==s.type&&(this._isSync=!1),e.cancelTask(n,s)}onInvoke(e,t,n,s,r,i,o){this.entryFunction||(this.entryFunction=s);try{return this._isSync=!0,e.invoke(n,s,r,i,o)}finally{this._isSync&&this.entryFunction===s&&this._finishCallbackIfDone()}}onHandleError(e,t,n,s){return e.handleError(n,s)&&(this.failCallback(s),this._alreadyErrored=!0),!1}onHasTask(e,t,n,s){e.hasTask(n,s),t===n&&("microTask"==s.change?(this._pendingMicroTasks=s.microTask,this._finishCallbackIfDone()):"macroTask"==s.change&&(this._pendingMacroTasks=s.macroTask,this._finishCallbackIfDone()))}}function patchAsyncTest(e){e.AsyncTestZoneSpec=AsyncTestZoneSpec,e.__load_patch("asynctest",((e,t,n)=>{function s(e,n,s,r){const i=t.current,o=t.AsyncTestZoneSpec;if(void 0===o)throw new Error("AsyncTestZoneSpec is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/plugins/async-test");const c=t.ProxyZoneSpec;if(!c)throw new Error("ProxyZoneSpec is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/plugins/proxy");const a=c.get();c.assertPresent();const l=t.current.getZoneWith("ProxyZoneSpec"),u=a.getDelegate();return l.parent.run((()=>{const e=new o((()=>{a.getDelegate()==e&&a.setDelegate(u),e.unPatchPromiseForTest(),i.run((()=>{s()}))}),(t=>{a.getDelegate()==e&&a.setDelegate(u),e.unPatchPromiseForTest(),i.run((()=>{r(t)}))}),"test");a.setDelegate(e),e.patchPromiseForTest()})),t.current.runGuarded(e,n)}t[n.symbol("asyncTest")]=function t(n){return e.jasmine?function(e){e||((e=function(){}).fail=function(e){throw e}),s(n,this,e,(t=>{if("string"==typeof t)return e.fail(new Error(t));e.fail(t)}))}:function(){return new Promise(((e,t)=>{s(n,this,e,t)}))}}}))}const global$1="object"==typeof window&&window||"object"==typeof self&&self||globalThis.global,OriginalDate=global$1.Date;function FakeDate(){if(0===arguments.length){const e=new OriginalDate;return e.setTime(FakeDate.now()),e}{const e=Array.prototype.slice.call(arguments);return new OriginalDate(...e)}}let patchedTimers;FakeDate.now=function(){const e=Zone.current.get("FakeAsyncTestZoneSpec");return e?e.getFakeSystemTime():OriginalDate.now.apply(this,arguments)},FakeDate.UTC=OriginalDate.UTC,FakeDate.parse=OriginalDate.parse;const timeoutCallback=function(){};class Scheduler{static{this.nextNodeJSId=1}static{this.nextId=-1}constructor(){this._schedulerQueue=[],this._currentTickTime=0,this._currentFakeBaseSystemTime=OriginalDate.now(),this._currentTickRequeuePeriodicEntries=[]}static getNextId(){const e=patchedTimers.nativeSetTimeout.call(global$1,timeoutCallback,0);return patchedTimers.nativeClearTimeout.call(global$1,e),"number"==typeof e?e:Scheduler.nextNodeJSId++}getCurrentTickTime(){return this._currentTickTime}getFakeSystemTime(){return this._currentFakeBaseSystemTime+this._currentTickTime}setFakeBaseSystemTime(e){this._currentFakeBaseSystemTime=e}getRealSystemTime(){return OriginalDate.now()}scheduleFunction(e,t,n){let s=(n={args:[],isPeriodic:!1,isRequestAnimationFrame:!1,id:-1,isRequeuePeriodic:!1,...n}).id<0?Scheduler.nextId:n.id;Scheduler.nextId=Scheduler.getNextId();let r={endTime:this._currentTickTime+t,id:s,func:e,args:n.args,delay:t,isPeriodic:n.isPeriodic,isRequestAnimationFrame:n.isRequestAnimationFrame};n.isRequeuePeriodic&&this._currentTickRequeuePeriodicEntries.push(r);let i=0;for(;i<this._schedulerQueue.length&&!(r.endTime<this._schedulerQueue[i].endTime);i++);return this._schedulerQueue.splice(i,0,r),s}removeScheduledFunctionWithId(e){for(let t=0;t<this._schedulerQueue.length;t++)if(this._schedulerQueue[t].id==e){this._schedulerQueue.splice(t,1);break}}removeAll(){this._schedulerQueue=[]}getTimerCount(){return this._schedulerQueue.length}tickToNext(e=1,t,n){this._schedulerQueue.length<e||this.tick(this._schedulerQueue[e-1].endTime-this._currentTickTime,t,n)}tick(e=0,t,n){let s=this._currentTickTime+e,r=0;const i=(n=Object.assign({processNewMacroTasksSynchronously:!0},n)).processNewMacroTasksSynchronously?this._schedulerQueue:this._schedulerQueue.slice();if(0===i.length&&t)t(e);else{for(;i.length>0&&(this._currentTickRequeuePeriodicEntries=[],!(s<i[0].endTime));){let e=i.shift();if(!n.processNewMacroTasksSynchronously){const t=this._schedulerQueue.indexOf(e);t>=0&&this._schedulerQueue.splice(t,1)}if(r=this._currentTickTime,this._currentTickTime=e.endTime,t&&t(this._currentTickTime-r),!e.func.apply(global$1,e.isRequestAnimationFrame?[this._currentTickTime]:e.args))break;n.processNewMacroTasksSynchronously||this._currentTickRequeuePeriodicEntries.forEach((e=>{let t=0;for(;t<i.length&&!(e.endTime<i[t].endTime);t++);i.splice(t,0,e)}))}r=this._currentTickTime,this._currentTickTime=s,t&&t(this._currentTickTime-r)}}flushOnlyPendingTimers(e){if(0===this._schedulerQueue.length)return 0;const t=this._currentTickTime;return this.tick(this._schedulerQueue[this._schedulerQueue.length-1].endTime-t,e,{processNewMacroTasksSynchronously:!1}),this._currentTickTime-t}flush(e=20,t=!1,n){return t?this.flushPeriodic(n):this.flushNonPeriodic(e,n)}flushPeriodic(e){if(0===this._schedulerQueue.length)return 0;const t=this._currentTickTime;return this.tick(this._schedulerQueue[this._schedulerQueue.length-1].endTime-t,e),this._currentTickTime-t}flushNonPeriodic(e,t){const n=this._currentTickTime;let s=0,r=0;for(;this._schedulerQueue.length>0;){if(r++,r>e)throw new Error("flush failed after reaching the limit of "+e+" tasks. Does your code use a polling timeout?");if(0===this._schedulerQueue.filter((e=>!e.isPeriodic&&!e.isRequestAnimationFrame)).length)break;const n=this._schedulerQueue.shift();if(s=this._currentTickTime,this._currentTickTime=n.endTime,t&&t(this._currentTickTime-s),!n.func.apply(global$1,n.args))break}return this._currentTickTime-n}}class FakeAsyncTestZoneSpec{static assertInZone(){if(null==Zone.current.get("FakeAsyncTestZoneSpec"))throw new Error("The code should be running in the fakeAsync zone to call this function")}constructor(e,t=!1,n){this.trackPendingRequestAnimationFrame=t,this.macroTaskOptions=n,this._scheduler=new Scheduler,this._microtasks=[],this._lastError=null,this._uncaughtPromiseErrors=Promise[Zone.__symbol__("uncaughtPromiseErrors")],this.pendingPeriodicTimers=[],this.pendingTimers=[],this.patchDateLocked=!1,this.properties={FakeAsyncTestZoneSpec:this},this.name="fakeAsyncTestZone for "+e,this.macroTaskOptions||(this.macroTaskOptions=global$1[Zone.__symbol__("FakeAsyncTestMacroTask")])}_fnAndFlush(e,t){return(...n)=>(e.apply(global$1,n),null===this._lastError?(null!=t.onSuccess&&t.onSuccess.apply(global$1),this.flushMicrotasks()):null!=t.onError&&t.onError.apply(global$1),null===this._lastError)}static _removeTimer(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}_dequeueTimer(e){return()=>{FakeAsyncTestZoneSpec._removeTimer(this.pendingTimers,e)}}_requeuePeriodicTimer(e,t,n,s){return()=>{-1!==this.pendingPeriodicTimers.indexOf(s)&&this._scheduler.scheduleFunction(e,t,{args:n,isPeriodic:!0,id:s,isRequeuePeriodic:!0})}}_dequeuePeriodicTimer(e){return()=>{FakeAsyncTestZoneSpec._removeTimer(this.pendingPeriodicTimers,e)}}_setTimeout(e,t,n,s=!0){let r=this._dequeueTimer(Scheduler.nextId),i=this._fnAndFlush(e,{onSuccess:r,onError:r}),o=this._scheduler.scheduleFunction(i,t,{args:n,isRequestAnimationFrame:!s});return s&&this.pendingTimers.push(o),o}_clearTimeout(e){FakeAsyncTestZoneSpec._removeTimer(this.pendingTimers,e),this._scheduler.removeScheduledFunctionWithId(e)}_setInterval(e,t,n){let s=Scheduler.nextId,r={onSuccess:null,onError:this._dequeuePeriodicTimer(s)},i=this._fnAndFlush(e,r);return r.onSuccess=this._requeuePeriodicTimer(i,t,n,s),this._scheduler.scheduleFunction(i,t,{args:n,isPeriodic:!0}),this.pendingPeriodicTimers.push(s),s}_clearInterval(e){FakeAsyncTestZoneSpec._removeTimer(this.pendingPeriodicTimers,e),this._scheduler.removeScheduledFunctionWithId(e)}_resetLastErrorAndThrow(){let e=this._lastError||this._uncaughtPromiseErrors[0];throw this._uncaughtPromiseErrors.length=0,this._lastError=null,e}getCurrentTickTime(){return this._scheduler.getCurrentTickTime()}getFakeSystemTime(){return this._scheduler.getFakeSystemTime()}setFakeBaseSystemTime(e){this._scheduler.setFakeBaseSystemTime(e)}getRealSystemTime(){return this._scheduler.getRealSystemTime()}static patchDate(){global$1[Zone.__symbol__("disableDatePatching")]||global$1.Date!==FakeDate&&(global$1.Date=FakeDate,FakeDate.prototype=OriginalDate.prototype,FakeAsyncTestZoneSpec.checkTimerPatch())}static resetDate(){global$1.Date===FakeDate&&(global$1.Date=OriginalDate)}static checkTimerPatch(){if(!patchedTimers)throw new Error("Expected timers to have been patched.");global$1.setTimeout!==patchedTimers.setTimeout&&(global$1.setTimeout=patchedTimers.setTimeout,global$1.clearTimeout=patchedTimers.clearTimeout),global$1.setInterval!==patchedTimers.setInterval&&(global$1.setInterval=patchedTimers.setInterval,global$1.clearInterval=patchedTimers.clearInterval)}lockDatePatch(){this.patchDateLocked=!0,FakeAsyncTestZoneSpec.patchDate()}unlockDatePatch(){this.patchDateLocked=!1,FakeAsyncTestZoneSpec.resetDate()}tickToNext(e=1,t,n={processNewMacroTasksSynchronously:!0}){e<=0||(FakeAsyncTestZoneSpec.assertInZone(),this.flushMicrotasks(),this._scheduler.tickToNext(e,t,n),null!==this._lastError&&this._resetLastErrorAndThrow())}tick(e=0,t,n={processNewMacroTasksSynchronously:!0}){FakeAsyncTestZoneSpec.assertInZone(),this.flushMicrotasks(),this._scheduler.tick(e,t,n),null!==this._lastError&&this._resetLastErrorAndThrow()}flushMicrotasks(){for(FakeAsyncTestZoneSpec.assertInZone();this._microtasks.length>0;){let e=this._microtasks.shift();e.func.apply(e.target,e.args)}(()=>{(null!==this._lastError||this._uncaughtPromiseErrors.length)&&this._resetLastErrorAndThrow()})()}flush(e,t,n){FakeAsyncTestZoneSpec.assertInZone(),this.flushMicrotasks();const s=this._scheduler.flush(e,t,n);return null!==this._lastError&&this._resetLastErrorAndThrow(),s}flushOnlyPendingTimers(e){FakeAsyncTestZoneSpec.assertInZone(),this.flushMicrotasks();const t=this._scheduler.flushOnlyPendingTimers(e);return null!==this._lastError&&this._resetLastErrorAndThrow(),t}removeAllTimers(){FakeAsyncTestZoneSpec.assertInZone(),this._scheduler.removeAll(),this.pendingPeriodicTimers=[],this.pendingTimers=[]}getTimerCount(){return this._scheduler.getTimerCount()+this._microtasks.length}onScheduleTask(e,t,n,s){switch(s.type){case"microTask":let t,r=s.data&&s.data.args;if(r){let e=s.data.cbIdx;"number"==typeof r.length&&r.length>e+1&&(t=Array.prototype.slice.call(r,e+1))}this._microtasks.push({func:s.invoke,args:t,target:s.data&&s.data.target});break;case"macroTask":switch(s.source){case"setTimeout":s.data.handleId=this._setTimeout(s.invoke,s.data.delay,Array.prototype.slice.call(s.data.args,2));break;case"setImmediate":s.data.handleId=this._setTimeout(s.invoke,0,Array.prototype.slice.call(s.data.args,1));break;case"setInterval":s.data.handleId=this._setInterval(s.invoke,s.data.delay,Array.prototype.slice.call(s.data.args,2));break;case"XMLHttpRequest.send":throw new Error("Cannot make XHRs from within a fake async test. Request URL: "+s.data.url);case"requestAnimationFrame":case"webkitRequestAnimationFrame":case"mozRequestAnimationFrame":s.data.handleId=this._setTimeout(s.invoke,16,s.data.args,this.trackPendingRequestAnimationFrame);break;default:const e=this.findMacroTaskOption(s);if(e){const t=s.data&&s.data.args,n=t&&t.length>1?t[1]:0;let r=e.callbackArgs?e.callbackArgs:t;e.isPeriodic?(s.data.handleId=this._setInterval(s.invoke,n,r),s.data.isPeriodic=!0):s.data.handleId=this._setTimeout(s.invoke,n,r);break}throw new Error("Unknown macroTask scheduled in fake async test: "+s.source)}break;case"eventTask":s=e.scheduleTask(n,s)}return s}onCancelTask(e,t,n,s){switch(s.source){case"setTimeout":case"requestAnimationFrame":case"webkitRequestAnimationFrame":case"mozRequestAnimationFrame":return this._clearTimeout(s.data.handleId);case"setInterval":return this._clearInterval(s.data.handleId);default:const t=this.findMacroTaskOption(s);if(t){const e=s.data.handleId;return t.isPeriodic?this._clearInterval(e):this._clearTimeout(e)}return e.cancelTask(n,s)}}onInvoke(e,t,n,s,r,i,o){try{return FakeAsyncTestZoneSpec.patchDate(),e.invoke(n,s,r,i,o)}finally{this.patchDateLocked||FakeAsyncTestZoneSpec.resetDate()}}findMacroTaskOption(e){if(!this.macroTaskOptions)return null;for(let t=0;t<this.macroTaskOptions.length;t++){const n=this.macroTaskOptions[t];if(n.source===e.source)return n}return null}onHandleError(e,t,n,s){return this._lastError=s,!1}}let _fakeAsyncTestZoneSpec=null;function getProxyZoneSpec(){return Zone&&Zone.ProxyZoneSpec}function resetFakeAsyncZone(){_fakeAsyncTestZoneSpec&&_fakeAsyncTestZoneSpec.unlockDatePatch(),_fakeAsyncTestZoneSpec=null,getProxyZoneSpec()&&getProxyZoneSpec().assertPresent().resetDelegate()}function fakeAsync(e){const t=function(...t){const n=getProxyZoneSpec();if(!n)throw new Error("ProxyZoneSpec is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/plugins/proxy");const s=n.assertPresent();if(Zone.current.get("FakeAsyncTestZoneSpec"))throw new Error("fakeAsync() calls can not be nested");try{if(!_fakeAsyncTestZoneSpec){const e=Zone&&Zone.FakeAsyncTestZoneSpec;if(s.getDelegate()instanceof e)throw new Error("fakeAsync() calls can not be nested");_fakeAsyncTestZoneSpec=new e}let n;const r=s.getDelegate();s.setDelegate(_fakeAsyncTestZoneSpec),_fakeAsyncTestZoneSpec.lockDatePatch();try{n=e.apply(this,t),flushMicrotasks()}finally{s.setDelegate(r)}if(_fakeAsyncTestZoneSpec.pendingPeriodicTimers.length>0)throw new Error(`${_fakeAsyncTestZoneSpec.pendingPeriodicTimers.length} periodic timer(s) still in the queue.`);if(_fakeAsyncTestZoneSpec.pendingTimers.length>0)throw new Error(`${_fakeAsyncTestZoneSpec.pendingTimers.length} timer(s) still in the queue.`);return n}finally{resetFakeAsyncZone()}};return t.isFakeAsync=!0,t}function _getFakeAsyncZoneSpec(){if(null==_fakeAsyncTestZoneSpec&&(_fakeAsyncTestZoneSpec=Zone.current.get("FakeAsyncTestZoneSpec"),null==_fakeAsyncTestZoneSpec))throw new Error("The code should be running in the fakeAsync zone to call this function");return _fakeAsyncTestZoneSpec}function tick(e=0,t=!1){_getFakeAsyncZoneSpec().tick(e,null,t)}function flush(e){return _getFakeAsyncZoneSpec().flush(e)}function discardPeriodicTasks(){_getFakeAsyncZoneSpec().pendingPeriodicTimers.length=0}function flushMicrotasks(){_getFakeAsyncZoneSpec().flushMicrotasks()}function patchFakeAsyncTest(e){e.FakeAsyncTestZoneSpec=FakeAsyncTestZoneSpec,e.__load_patch("fakeasync",((e,t,n)=>{t[n.symbol("fakeAsyncTest")]={resetFakeAsyncZone:resetFakeAsyncZone,flushMicrotasks:flushMicrotasks,discardPeriodicTasks:discardPeriodicTasks,tick:tick,flush:flush,fakeAsync:fakeAsync}}),!0),patchedTimers={setTimeout:global$1.setTimeout,setInterval:global$1.setInterval,clearTimeout:global$1.clearTimeout,clearInterval:global$1.clearInterval,nativeSetTimeout:global$1[e.__symbol__("setTimeout")],nativeClearTimeout:global$1[e.__symbol__("clearTimeout")]},Scheduler.nextId=Scheduler.getNextId()}function patchLongStackTrace(e){const t="\n",n={},s="__creationTrace__",r="STACKTRACE TRACKING",i="__SEP_TAG__";let o=i+"@[native]";class c{constructor(){this.error=p(),this.timestamp=new Date}}function a(){return new Error(r)}function l(){try{throw a()}catch(e){return e}}const u=a(),h=l(),p=u.stack?a:h.stack?l:a;function d(e){return e.stack?e.stack.split(t):[]}function T(e,t){let s=d(t);for(let t=0;t<s.length;t++)n.hasOwnProperty(s[t])||e.push(s[t])}function f(e,n){const s=[n?n.trim():""];if(e){let t=(new Date).getTime();for(let n=0;n<e.length;n++){const r=e[n],c=r.timestamp;let a=`____________________Elapsed ${t-c.getTime()} ms; At: ${c}`;a=a.replace(/[^\w\d]/g,"_"),s.push(o.replace(i,a)),T(s,r.error),t=c.getTime()}}return s.join(t)}function m(){return Error.stackTraceLimit>0}function k(e,t){t>0&&(e.push(d((new c).error)),k(e,t-1))}e.longStackTraceZoneSpec={name:"long-stack-trace",longStackTraceLimit:10,getLongStackTrace:function(t){if(!t)return;const n=t[e.__symbol__("currentTaskTrace")];return n?f(n,t.stack):t.stack},onScheduleTask:function(t,n,r,i){if(m()){const t=e.currentTask;let n=t&&t.data&&t.data[s]||[];n=[new c].concat(n),n.length>this.longStackTraceLimit&&(n.length=this.longStackTraceLimit),i.data||(i.data={}),"eventTask"===i.type&&(i.data={...i.data}),i.data[s]=n}return t.scheduleTask(r,i)},onHandleError:function(t,n,r,i){if(m()){const t=e.currentTask||i.task;if(i instanceof Error&&t){const e=f(t.data&&t.data[s],i.stack);try{i.stack=i.longStack=e}catch(e){}}}return t.handleError(r,i)}},function y(){if(!m())return;const e=[];k(e,2);const t=e[0],s=e[1];for(let e=0;e<t.length;e++){const n=t[e];if(-1==n.indexOf(r)){let e=n.match(/^\s*at\s+/);if(e){o=e[0]+i+" (http://localhost)";break}}}for(let e=0;e<t.length;e++){const r=t[e];if(r!==s[e])break;n[r]=!0}}()}class ProxyZoneSpec{static get(){return Zone.current.get("ProxyZoneSpec")}static isLoaded(){return ProxyZoneSpec.get()instanceof ProxyZoneSpec}static assertPresent(){if(!ProxyZoneSpec.isLoaded())throw new Error("Expected to be running in 'ProxyZone', but it was not found.");return ProxyZoneSpec.get()}constructor(e=null){this.defaultSpecDelegate=e,this.name="ProxyZone",this._delegateSpec=null,this.properties={ProxyZoneSpec:this},this.propertyKeys=null,this.lastTaskState=null,this.isNeedToTriggerHasTask=!1,this.tasks=[],this.setDelegate(e)}setDelegate(e){const t=this._delegateSpec!==e;this._delegateSpec=e,this.propertyKeys&&this.propertyKeys.forEach((e=>delete this.properties[e])),this.propertyKeys=null,e&&e.properties&&(this.propertyKeys=Object.keys(e.properties),this.propertyKeys.forEach((t=>this.properties[t]=e.properties[t]))),t&&this.lastTaskState&&(this.lastTaskState.macroTask||this.lastTaskState.microTask)&&(this.isNeedToTriggerHasTask=!0)}getDelegate(){return this._delegateSpec}resetDelegate(){this.getDelegate(),this.setDelegate(this.defaultSpecDelegate)}tryTriggerHasTask(e,t,n){this.isNeedToTriggerHasTask&&this.lastTaskState&&(this.isNeedToTriggerHasTask=!1,this.onHasTask(e,t,n,this.lastTaskState))}removeFromTasks(e){if(this.tasks)for(let t=0;t<this.tasks.length;t++)if(this.tasks[t]===e)return void this.tasks.splice(t,1)}getAndClearPendingTasksInfo(){if(0===this.tasks.length)return"";const e="--Pending async tasks are: ["+this.tasks.map((e=>{const t=e.data&&Object.keys(e.data).map((t=>t+":"+e.data[t])).join(",");return`type: ${e.type}, source: ${e.source}, args: {${t}}`}))+"]";return this.tasks=[],e}onFork(e,t,n,s){return this._delegateSpec&&this._delegateSpec.onFork?this._delegateSpec.onFork(e,t,n,s):e.fork(n,s)}onIntercept(e,t,n,s,r){return this._delegateSpec&&this._delegateSpec.onIntercept?this._delegateSpec.onIntercept(e,t,n,s,r):e.intercept(n,s,r)}onInvoke(e,t,n,s,r,i,o){return this.tryTriggerHasTask(e,t,n),this._delegateSpec&&this._delegateSpec.onInvoke?this._delegateSpec.onInvoke(e,t,n,s,r,i,o):e.invoke(n,s,r,i,o)}onHandleError(e,t,n,s){return this._delegateSpec&&this._delegateSpec.onHandleError?this._delegateSpec.onHandleError(e,t,n,s):e.handleError(n,s)}onScheduleTask(e,t,n,s){return"eventTask"!==s.type&&this.tasks.push(s),this._delegateSpec&&this._delegateSpec.onScheduleTask?this._delegateSpec.onScheduleTask(e,t,n,s):e.scheduleTask(n,s)}onInvokeTask(e,t,n,s,r,i){return"eventTask"!==s.type&&this.removeFromTasks(s),this.tryTriggerHasTask(e,t,n),this._delegateSpec&&this._delegateSpec.onInvokeTask?this._delegateSpec.onInvokeTask(e,t,n,s,r,i):e.invokeTask(n,s,r,i)}onCancelTask(e,t,n,s){return"eventTask"!==s.type&&this.removeFromTasks(s),this.tryTriggerHasTask(e,t,n),this._delegateSpec&&this._delegateSpec.onCancelTask?this._delegateSpec.onCancelTask(e,t,n,s):e.cancelTask(n,s)}onHasTask(e,t,n,s){this.lastTaskState=s,this._delegateSpec&&this._delegateSpec.onHasTask?this._delegateSpec.onHasTask(e,t,n,s):e.hasTask(n,s)}}function patchProxyZoneSpec(e){e.ProxyZoneSpec=ProxyZoneSpec}function patchSyncTest(e){e.SyncTestZoneSpec=class{constructor(t){this.runZone=e.current,this.name="syncTestZone for "+t}onScheduleTask(e,t,n,s){switch(s.type){case"microTask":case"macroTask":throw new Error(`Cannot call ${s.source} from within a sync test (${this.name}).`);case"eventTask":s=e.scheduleTask(n,s)}return s}}}function patchPromiseTesting(e){e.__load_patch("promisefortest",((e,t,n)=>{const s=n.symbol("state"),r=n.symbol("parentUnresolved");Promise[n.symbol("patchPromiseForTest")]=function e(){let n=Promise[t.__symbol__("ZonePromiseThen")];n||(n=Promise[t.__symbol__("ZonePromiseThen")]=Promise.prototype.then,Promise.prototype.then=function(){const e=n.apply(this,arguments);if(null===this[s]){const n=t.current.get("AsyncTestZoneSpec");n&&(n.unresolvedChainedPromiseCount++,e[r]=!0)}return e})},Promise[n.symbol("unPatchPromiseForTest")]=function e(){const n=Promise[t.__symbol__("ZonePromiseThen")];n&&(Promise.prototype.then=n,Promise[t.__symbol__("ZonePromiseThen")]=void 0)}}))}function rollupTesting(e){patchLongStackTrace(e),patchProxyZoneSpec(e),patchSyncTest(e),patchJasmine(e),patchJest(e),patchMocha(e),patchAsyncTest(e),patchFakeAsyncTest(e),patchPromiseTesting(e)}rollupTesting(Zone);
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/!function(e){const t=e.performance;function n(e){t&&t.mark&&t.mark(e)}function o(e,n){t&&t.measure&&t.measure(e,n)}n("Zone");const r=e.__Zone_symbol_prefix||"__zone_symbol__";function s(e){return r+e}const a=!0===e[s("forceDuplicateZoneCheck")];if(e.Zone){if(a||"function"!=typeof e.Zone.__symbol__)throw new Error("Zone already loaded.");return e.Zone}class i{static{this.__symbol__=s}static assertZonePatched(){if(e.Promise!==N.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let e=i.current;for(;e.parent;)e=e.parent;return e}static get current(){return R.zone}static get currentTask(){return C}static __load_patch(t,r,s=!1){if(N.hasOwnProperty(t)){if(!s&&a)throw Error("Already loaded patch: "+t)}else if(!e["__Zone_disable_"+t]){const s="Zone:"+t;n(s),N[t]=r(e,i,z),o(s,s)}}get parent(){return this._parent}get name(){return this._name}constructor(e,t){this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new l(this,this._parent&&this._parent._zoneDelegate,t)}get(e){const t=this.getZoneWith(e);if(t)return t._properties[e]}getZoneWith(e){let t=this;for(;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null}fork(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)}wrap(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);const n=this._zoneDelegate.intercept(this,e,t),o=this;return function(){return o.runGuarded(n,this,arguments,t)}}run(e,t,n,o){R={parent:R,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,o)}finally{R=R.parent}}runGuarded(e,t=null,n,o){R={parent:R,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,o)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{R=R.parent}}runTask(e,t,n){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||k).name+"; Execution: "+this.name+")");if(e.state===m&&(e.type===D||e.type===Z))return;const o=e.state!=v;o&&e._transitionTo(v,S),e.runCount++;const r=C;C=e,R={parent:R,zone:this};try{e.type==Z&&e.data&&!e.data.isPeriodic&&(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,e,t,n)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{e.state!==m&&e.state!==w&&(e.type==D||e.data&&e.data.isPeriodic?o&&e._transitionTo(S,v):(e.runCount=0,this._updateTaskCount(e,-1),o&&e._transitionTo(m,v,m))),R=R.parent,C=r}}scheduleTask(e){if(e.zone&&e.zone!==this){let t=this;for(;t;){if(t===e.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${e.zone.name}`);t=t.parent}}e._transitionTo(b,m);const t=[];e._zoneDelegates=t,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(t){throw e._transitionTo(w,b,m),this._zoneDelegate.handleError(this,t),t}return e._zoneDelegates===t&&this._updateTaskCount(e,1),e.state==b&&e._transitionTo(S,b),e}scheduleMicroTask(e,t,n,o){return this.scheduleTask(new h(P,e,t,n,o,void 0))}scheduleMacroTask(e,t,n,o,r){return this.scheduleTask(new h(Z,e,t,n,o,r))}scheduleEventTask(e,t,n,o,r){return this.scheduleTask(new h(D,e,t,n,o,r))}cancelTask(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||k).name+"; Execution: "+this.name+")");if(e.state===S||e.state===v){e._transitionTo(O,S,v);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(w,O),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(m,O),e.runCount=0,e}}_updateTaskCount(e,t){const n=e._zoneDelegates;-1==t&&(e._zoneDelegates=null);for(let o=0;o<n.length;o++)n[o]._updateTaskCount(e.type,t)}}const c={name:"",onHasTask:(e,t,n,o)=>e.hasTask(n,o),onScheduleTask:(e,t,n,o)=>e.scheduleTask(n,o),onInvokeTask:(e,t,n,o,r,s)=>e.invokeTask(n,o,r,s),onCancelTask:(e,t,n,o)=>e.cancelTask(n,o)};class l{constructor(e,t,n){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=e,this._parentDelegate=t,this._forkZS=n&&(n&&n.onFork?n:t._forkZS),this._forkDlgt=n&&(n.onFork?t:t._forkDlgt),this._forkCurrZone=n&&(n.onFork?this.zone:t._forkCurrZone),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this.zone:t._interceptCurrZone),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this.zone:t._invokeCurrZone),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this.zone:t._handleErrorCurrZone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this.zone:t._scheduleTaskCurrZone),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this.zone:t._invokeTaskCurrZone),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this.zone:t._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const o=n&&n.onHasTask;(o||t&&t._hasTaskZS)&&(this._hasTaskZS=o?n:c,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=e,n.onScheduleTask||(this._scheduleTaskZS=c,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this.zone),n.onInvokeTask||(this._invokeTaskZS=c,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this.zone),n.onCancelTask||(this._cancelTaskZS=c,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this.zone))}fork(e,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,t):new i(e,t)}intercept(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,e,t,n):t}invoke(e,t,n,o,r){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,e,t,n,o,r):t.apply(n,o)}handleError(e,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,e,t)}scheduleTask(e,t){let n=t;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,e,t),n||(n=t);else if(t.scheduleFn)t.scheduleFn(t);else{if(t.type!=P)throw new Error("Task is missing scheduleFn.");y(t)}return n}invokeTask(e,t,n,o){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,e,t,n,o):t.callback.apply(n,o)}cancelTask(e,t){let n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,e,t);else{if(!t.cancelFn)throw Error("Task is not cancelable");n=t.cancelFn(t)}return n}hasTask(e,t){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,e,t)}catch(t){this.handleError(e,t)}}_updateTaskCount(e,t){const n=this._taskCounts,o=n[e],r=n[e]=o+t;if(r<0)throw new Error("More tasks executed then were scheduled.");0!=o&&0!=r||this.hasTask(this.zone,{microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e})}}class h{constructor(t,n,o,r,s,a){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=t,this.source=n,this.data=r,this.scheduleFn=s,this.cancelFn=a,!o)throw new Error("callback is not defined");this.callback=o;const i=this;this.invoke=t===D&&r&&r.useG?h.invokeTask:function(){return h.invokeTask.call(e,i,this,arguments)}}static invokeTask(e,t,n){e||(e=this),M++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{1==M&&T(),M--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(m,b)}_transitionTo(e,t,n){if(this._state!==t&&this._state!==n)throw new Error(`${this.type} '${this.source}': can not transition to '${e}', expecting state '${t}'${n?" or '"+n+"'":""}, was '${this._state}'.`);this._state=e,e==m&&(this._zoneDelegates=null)}toString(){return this.data&&void 0!==this.data.handleId?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}const u=s("setTimeout"),p=s("Promise"),f=s("then");let _,d=[],E=!1;function g(t){if(_||e[p]&&(_=e[p].resolve(0)),_){let e=_[f];e||(e=_.then),e.call(_,t)}else e[u](t,0)}function y(e){0===M&&0===d.length&&g(T),e&&d.push(e)}function T(){if(!E){for(E=!0;d.length;){const e=d;d=[];for(let t=0;t<e.length;t++){const n=e[t];try{n.zone.runTask(n,null,null)}catch(e){z.onUnhandledError(e)}}}z.microtaskDrainDone(),E=!1}}const k={name:"NO ZONE"},m="notScheduled",b="scheduling",S="scheduled",v="running",O="canceling",w="unknown",P="microTask",Z="macroTask",D="eventTask",N={},z={symbol:s,currentZoneFrame:()=>R,onUnhandledError:I,microtaskDrainDone:I,scheduleMicroTask:y,showUncaughtError:()=>!i[s("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:I,patchMethod:()=>I,bindArguments:()=>[],patchThen:()=>I,patchMacroTask:()=>I,patchEventPrototype:()=>I,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>I,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>I,wrapWithCurrentZone:()=>I,filterProperties:()=>[],attachOriginToPatched:()=>I,_redefineProperty:()=>I,patchCallbacks:()=>I,nativeScheduleMicroTask:g};let R={parent:null,zone:new i(null,null)},C=null,M=0;function I(){}o("Zone","Zone"),e.Zone=i}(globalThis);const ObjectGetOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,ObjectDefineProperty=Object.defineProperty,ObjectGetPrototypeOf=Object.getPrototypeOf,ObjectCreate=Object.create,ArraySlice=Array.prototype.slice,ADD_EVENT_LISTENER_STR="addEventListener",REMOVE_EVENT_LISTENER_STR="removeEventListener",ZONE_SYMBOL_ADD_EVENT_LISTENER=Zone.__symbol__("addEventListener"),ZONE_SYMBOL_REMOVE_EVENT_LISTENER=Zone.__symbol__("removeEventListener"),TRUE_STR="true",FALSE_STR="false",ZONE_SYMBOL_PREFIX=Zone.__symbol__("");function wrapWithCurrentZone(e,t){return Zone.current.wrap(e,t)}function scheduleMacroTaskWithCurrentZone(e,t,n,o,r){return Zone.current.scheduleMacroTask(e,t,n,o,r)}const zoneSymbol=Zone.__symbol__,isWindowExists="undefined"!=typeof window,internalWindow=isWindowExists?window:void 0,_global=isWindowExists&&internalWindow||globalThis,REMOVE_ATTRIBUTE="removeAttribute";function bindArguments(e,t){for(let n=e.length-1;n>=0;n--)"function"==typeof e[n]&&(e[n]=wrapWithCurrentZone(e[n],t+"_"+n));return e}function patchPrototype(e,t){const n=e.constructor.name;for(let o=0;o<t.length;o++){const r=t[o],s=e[r];if(s){if(!isPropertyWritable(ObjectGetOwnPropertyDescriptor(e,r)))continue;e[r]=(e=>{const t=function(){return e.apply(this,bindArguments(arguments,n+"."+r))};return attachOriginToPatched(t,e),t})(s)}}}function isPropertyWritable(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&void 0===e.set)}const isWebWorker="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,isNode=!("nw"in _global)&&void 0!==_global.process&&"[object process]"==={}.toString.call(_global.process),isBrowser=!isNode&&!isWebWorker&&!(!isWindowExists||!internalWindow.HTMLElement),isMix=void 0!==_global.process&&"[object process]"==={}.toString.call(_global.process)&&!isWebWorker&&!(!isWindowExists||!internalWindow.HTMLElement),zoneSymbolEventNames$1={},wrapFn=function(e){if(!(e=e||_global.event))return;let t=zoneSymbolEventNames$1[e.type];t||(t=zoneSymbolEventNames$1[e.type]=zoneSymbol("ON_PROPERTY"+e.type));const n=this||e.target||_global,o=n[t];let r;return isBrowser&&n===internalWindow&&"error"===e.type?(r=o&&o.call(this,e.message,e.filename,e.lineno,e.colno,e.error),!0===r&&e.preventDefault()):(r=o&&o.apply(this,arguments),null==r||r||e.preventDefault()),r};function patchProperty(e,t,n){let o=ObjectGetOwnPropertyDescriptor(e,t);if(!o&&n&&ObjectGetOwnPropertyDescriptor(n,t)&&(o={enumerable:!0,configurable:!0}),!o||!o.configurable)return;const r=zoneSymbol("on"+t+"patched");if(e.hasOwnProperty(r)&&e[r])return;delete o.writable,delete o.value;const s=o.get,a=o.set,i=t.slice(2);let c=zoneSymbolEventNames$1[i];c||(c=zoneSymbolEventNames$1[i]=zoneSymbol("ON_PROPERTY"+i)),o.set=function(t){let n=this;n||e!==_global||(n=_global),n&&("function"==typeof n[c]&&n.removeEventListener(i,wrapFn),a&&a.call(n,null),n[c]=t,"function"==typeof t&&n.addEventListener(i,wrapFn,!1))},o.get=function(){let n=this;if(n||e!==_global||(n=_global),!n)return null;const r=n[c];if(r)return r;if(s){let e=s.call(this);if(e)return o.set.call(this,e),"function"==typeof n[REMOVE_ATTRIBUTE]&&n.removeAttribute(t),e}return null},ObjectDefineProperty(e,t,o),e[r]=!0}function patchOnProperties(e,t,n){if(t)for(let o=0;o<t.length;o++)patchProperty(e,"on"+t[o],n);else{const t=[];for(const n in e)"on"==n.slice(0,2)&&t.push(n);for(let o=0;o<t.length;o++)patchProperty(e,t[o],n)}}const originalInstanceKey=zoneSymbol("originalInstance");function patchClass(e){const t=_global[e];if(!t)return;_global[zoneSymbol(e)]=t,_global[e]=function(){const n=bindArguments(arguments,e);switch(n.length){case 0:this[originalInstanceKey]=new t;break;case 1:this[originalInstanceKey]=new t(n[0]);break;case 2:this[originalInstanceKey]=new t(n[0],n[1]);break;case 3:this[originalInstanceKey]=new t(n[0],n[1],n[2]);break;case 4:this[originalInstanceKey]=new t(n[0],n[1],n[2],n[3]);break;default:throw new Error("Arg list too long.")}},attachOriginToPatched(_global[e],t);const n=new t((function(){}));let o;for(o in n)"XMLHttpRequest"===e&&"responseBlob"===o||function(t){"function"==typeof n[t]?_global[e].prototype[t]=function(){return this[originalInstanceKey][t].apply(this[originalInstanceKey],arguments)}:ObjectDefineProperty(_global[e].prototype,t,{set:function(n){"function"==typeof n?(this[originalInstanceKey][t]=wrapWithCurrentZone(n,e+"."+t),attachOriginToPatched(this[originalInstanceKey][t],n)):this[originalInstanceKey][t]=n},get:function(){return this[originalInstanceKey][t]}})}(o);for(o in t)"prototype"!==o&&t.hasOwnProperty(o)&&(_global[e][o]=t[o])}function patchMethod(e,t,n){let o=e;for(;o&&!o.hasOwnProperty(t);)o=ObjectGetPrototypeOf(o);!o&&e[t]&&(o=e);const r=zoneSymbol(t);let s=null;if(o&&(!(s=o[r])||!o.hasOwnProperty(r))&&(s=o[r]=o[t],isPropertyWritable(o&&ObjectGetOwnPropertyDescriptor(o,t)))){const e=n(s,r,t);o[t]=function(){return e(this,arguments)},attachOriginToPatched(o[t],s)}return s}function patchMacroTask(e,t,n){let o=null;function r(e){const t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},o.apply(t.target,t.args),e}o=patchMethod(e,t,(e=>function(t,o){const s=n(t,o);return s.cbIdx>=0&&"function"==typeof o[s.cbIdx]?scheduleMacroTaskWithCurrentZone(s.name,o[s.cbIdx],s,r):e.apply(t,o)}))}function attachOriginToPatched(e,t){e[zoneSymbol("OriginalDelegate")]=t}let isDetectedIEOrEdge=!1,ieOrEdge=!1;function isIE(){try{const e=internalWindow.navigator.userAgent;if(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/"))return!0}catch(e){}return!1}function isIEOrEdge(){if(isDetectedIEOrEdge)return ieOrEdge;isDetectedIEOrEdge=!0;try{const e=internalWindow.navigator.userAgent;-1===e.indexOf("MSIE ")&&-1===e.indexOf("Trident/")&&-1===e.indexOf("Edge/")||(ieOrEdge=!0)}catch(e){}return ieOrEdge}Zone.__load_patch("ZoneAwarePromise",((e,t,n)=>{const o=Object.getOwnPropertyDescriptor,r=Object.defineProperty,s=n.symbol,a=[],i=!1!==e[s("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],c=s("Promise"),l=s("then"),h="__creationTrace__";n.onUnhandledError=e=>{if(n.showUncaughtError()){const t=e&&e.rejection;t?console.error("Unhandled Promise rejection:",t instanceof Error?t.message:t,"; Zone:",e.zone.name,"; Task:",e.task&&e.task.source,"; Value:",t,t instanceof Error?t.stack:void 0):console.error(e)}},n.microtaskDrainDone=()=>{for(;a.length;){const e=a.shift();try{e.zone.runGuarded((()=>{if(e.throwOriginal)throw e.rejection;throw e}))}catch(e){p(e)}}};const u=s("unhandledPromiseRejectionHandler");function p(e){n.onUnhandledError(e);try{const n=t[u];"function"==typeof n&&n.call(this,e)}catch(e){}}function f(e){return e&&e.then}function _(e){return e}function d(e){return j.reject(e)}const E=s("state"),g=s("value"),y=s("finally"),T=s("parentPromiseValue"),k=s("parentPromiseState"),m="Promise.then",b=null,S=!0,v=!1,O=0;function w(e,t){return n=>{try{N(e,t,n)}catch(t){N(e,!1,t)}}}const P=function(){let e=!1;return function t(n){return function(){e||(e=!0,n.apply(null,arguments))}}},Z="Promise resolved with itself",D=s("currentTaskTrace");function N(e,o,s){const c=P();if(e===s)throw new TypeError(Z);if(e[E]===b){let l=null;try{"object"!=typeof s&&"function"!=typeof s||(l=s&&s.then)}catch(t){return c((()=>{N(e,!1,t)}))(),e}if(o!==v&&s instanceof j&&s.hasOwnProperty(E)&&s.hasOwnProperty(g)&&s[E]!==b)R(s),N(e,s[E],s[g]);else if(o!==v&&"function"==typeof l)try{l.call(s,c(w(e,o)),c(w(e,!1)))}catch(t){c((()=>{N(e,!1,t)}))()}else{e[E]=o;const c=e[g];if(e[g]=s,e[y]===y&&o===S&&(e[E]=e[k],e[g]=e[T]),o===v&&s instanceof Error){const e=t.currentTask&&t.currentTask.data&&t.currentTask.data[h];e&&r(s,D,{configurable:!0,enumerable:!1,writable:!0,value:e})}for(let t=0;t<c.length;)C(e,c[t++],c[t++],c[t++],c[t++]);if(0==c.length&&o==v){e[E]=O;let o=s;try{throw new Error("Uncaught (in promise): "+function e(t){return t&&t.toString===Object.prototype.toString?(t.constructor&&t.constructor.name||"")+": "+JSON.stringify(t):t?t.toString():Object.prototype.toString.call(t)}(s)+(s&&s.stack?"\n"+s.stack:""))}catch(e){o=e}i&&(o.throwOriginal=!0),o.rejection=s,o.promise=e,o.zone=t.current,o.task=t.currentTask,a.push(o),n.scheduleMicroTask()}}}return e}const z=s("rejectionHandledHandler");function R(e){if(e[E]===O){try{const n=t[z];n&&"function"==typeof n&&n.call(this,{rejection:e[g],promise:e})}catch(e){}e[E]=v;for(let t=0;t<a.length;t++)e===a[t].promise&&a.splice(t,1)}}function C(e,t,n,o,r){R(e);const s=e[E],a=s?"function"==typeof o?o:_:"function"==typeof r?r:d;t.scheduleMicroTask(m,(()=>{try{const o=e[g],r=!!n&&y===n[y];r&&(n[T]=o,n[k]=s);const i=t.run(a,void 0,r&&a!==d&&a!==_?[]:[o]);N(n,!0,i)}catch(e){N(n,!1,e)}}),n)}const M=function(){},I=e.AggregateError;class j{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(e){return e instanceof j?e:N(new this(null),S,e)}static reject(e){return N(new this(null),v,e)}static withResolvers(){const e={};return e.promise=new j(((t,n)=>{e.resolve=t,e.reject=n})),e}static any(e){if(!e||"function"!=typeof e[Symbol.iterator])return Promise.reject(new I([],"All promises were rejected"));const t=[];let n=0;try{for(let o of e)n++,t.push(j.resolve(o))}catch(e){return Promise.reject(new I([],"All promises were rejected"))}if(0===n)return Promise.reject(new I([],"All promises were rejected"));let o=!1;const r=[];return new j(((e,s)=>{for(let a=0;a<t.length;a++)t[a].then((t=>{o||(o=!0,e(t))}),(e=>{r.push(e),n--,0===n&&(o=!0,s(new I(r,"All promises were rejected")))}))}))}static race(e){let t,n,o=new this(((e,o)=>{t=e,n=o}));function r(e){t(e)}function s(e){n(e)}for(let t of e)f(t)||(t=this.resolve(t)),t.then(r,s);return o}static all(e){return j.allWithCallback(e)}static allSettled(e){return(this&&this.prototype instanceof j?this:j).allWithCallback(e,{thenCallback:e=>({status:"fulfilled",value:e}),errorCallback:e=>({status:"rejected",reason:e})})}static allWithCallback(e,t){let n,o,r=new this(((e,t)=>{n=e,o=t})),s=2,a=0;const i=[];for(let r of e){f(r)||(r=this.resolve(r));const e=a;try{r.then((o=>{i[e]=t?t.thenCallback(o):o,s--,0===s&&n(i)}),(r=>{t?(i[e]=t.errorCallback(r),s--,0===s&&n(i)):o(r)}))}catch(e){o(e)}s++,a++}return s-=2,0===s&&n(i),r}constructor(e){const t=this;if(!(t instanceof j))throw new Error("Must be an instanceof Promise.");t[E]=b,t[g]=[];try{const n=P();e&&e(n(w(t,S)),n(w(t,v)))}catch(e){N(t,!1,e)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return j}then(e,n){let o=this.constructor?.[Symbol.species];o&&"function"==typeof o||(o=this.constructor||j);const r=new o(M),s=t.current;return this[E]==b?this[g].push(s,r,e,n):C(this,s,r,e,n),r}catch(e){return this.then(null,e)}finally(e){let n=this.constructor?.[Symbol.species];n&&"function"==typeof n||(n=j);const o=new n(M);o[y]=y;const r=t.current;return this[E]==b?this[g].push(r,o,e,e):C(this,r,o,e,e),o}}j.resolve=j.resolve,j.reject=j.reject,j.race=j.race,j.all=j.all;const L=e[c]=e.Promise;e.Promise=j;const A=s("thenPatched");function F(e){const t=e.prototype,n=o(t,"then");if(n&&(!1===n.writable||!n.configurable))return;const r=t.then;t[l]=r,e.prototype.then=function(e,t){return new j(((e,t)=>{r.call(this,e,t)})).then(e,t)},e[A]=!0}return n.patchThen=F,L&&(F(L),patchMethod(e,"fetch",(e=>function t(e){return function(t,n){let o=e.apply(t,n);if(o instanceof j)return o;let r=o.constructor;return r[A]||F(r),o}}(e)))),Promise[t.__symbol__("uncaughtPromiseErrors")]=a,j})),Zone.__load_patch("toString",(e=>{const t=Function.prototype.toString,n=zoneSymbol("OriginalDelegate"),o=zoneSymbol("Promise"),r=zoneSymbol("Error"),s=function s(){if("function"==typeof this){const s=this[n];if(s)return"function"==typeof s?t.call(s):Object.prototype.toString.call(s);if(this===Promise){const n=e[o];if(n)return t.call(n)}if(this===Error){const n=e[r];if(n)return t.call(n)}}return t.call(this)};s[n]=t,Function.prototype.toString=s;const a=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":a.call(this)}}));let passiveSupported=!1;if("undefined"!=typeof window)try{const e=Object.defineProperty({},"passive",{get:function(){passiveSupported=!0}});window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){passiveSupported=!1}const OPTIMIZED_ZONE_EVENT_TASK_DATA={useG:!0},zoneSymbolEventNames={},globalSources={},EVENT_NAME_SYMBOL_REGX=new RegExp("^"+ZONE_SYMBOL_PREFIX+"(\\w+)(true|false)$"),IMMEDIATE_PROPAGATION_SYMBOL=zoneSymbol("propagationStopped");function prepareEventNames(e,t){const n=(t?t(e):e)+FALSE_STR,o=(t?t(e):e)+TRUE_STR,r=ZONE_SYMBOL_PREFIX+n,s=ZONE_SYMBOL_PREFIX+o;zoneSymbolEventNames[e]={},zoneSymbolEventNames[e][FALSE_STR]=r,zoneSymbolEventNames[e][TRUE_STR]=s}function patchEventTarget(e,t,n,o){const r=o&&o.add||"addEventListener",s=o&&o.rm||"removeEventListener",a=o&&o.listeners||"eventListeners",i=o&&o.rmAll||"removeAllListeners",c=zoneSymbol(r),l="."+r+":",h="prependListener",u="."+h+":",p=function(e,t,n){if(e.isRemoved)return;const o=e.callback;let r;"object"==typeof o&&o.handleEvent&&(e.callback=e=>o.handleEvent(e),e.originalDelegate=o);try{e.invoke(e,t,[n])}catch(e){r=e}const a=e.options;return a&&"object"==typeof a&&a.once&&t[s].call(t,n.type,e.originalDelegate?e.originalDelegate:e.callback,a),r};function f(n,o,r){if(!(o=o||e.event))return;const s=n||o.target||e,a=s[zoneSymbolEventNames[o.type][r?TRUE_STR:FALSE_STR]];if(a){const e=[];if(1===a.length){const t=p(a[0],s,o);t&&e.push(t)}else{const t=a.slice();for(let n=0;n<t.length&&(!o||!0!==o[IMMEDIATE_PROPAGATION_SYMBOL]);n++){const r=p(t[n],s,o);r&&e.push(r)}}if(1===e.length)throw e[0];for(let n=0;n<e.length;n++){const o=e[n];t.nativeScheduleMicroTask((()=>{throw o}))}}}const _=function(e){return f(this,e,!1)},d=function(e){return f(this,e,!0)};function E(t,n){if(!t)return!1;let o=!0;n&&void 0!==n.useG&&(o=n.useG);const p=n&&n.vh;let f=!0;n&&void 0!==n.chkDup&&(f=n.chkDup);let E=!1;n&&void 0!==n.rt&&(E=n.rt);let g=t;for(;g&&!g.hasOwnProperty(r);)g=ObjectGetPrototypeOf(g);if(!g&&t[r]&&(g=t),!g)return!1;if(g[c])return!1;const y=n&&n.eventNameToString,T={},k=g[c]=g[r],m=g[zoneSymbol(s)]=g[s],b=g[zoneSymbol(a)]=g[a],S=g[zoneSymbol(i)]=g[i];let v;n&&n.prepend&&(v=g[zoneSymbol(n.prepend)]=g[n.prepend]);const O=o?function(e){if(!T.isExisting)return k.call(T.target,T.eventName,T.capture?d:_,T.options)}:function(e){return k.call(T.target,T.eventName,e.invoke,T.options)},w=o?function(e){if(!e.isRemoved){const t=zoneSymbolEventNames[e.eventName];let n;t&&(n=t[e.capture?TRUE_STR:FALSE_STR]);const o=n&&e.target[n];if(o)for(let t=0;t<o.length;t++)if(o[t]===e){o.splice(t,1),e.isRemoved=!0,0===o.length&&(e.allRemoved=!0,e.target[n]=null);break}}if(e.allRemoved)return m.call(e.target,e.eventName,e.capture?d:_,e.options)}:function(e){return m.call(e.target,e.eventName,e.invoke,e.options)},P=n&&n.diff?n.diff:function(e,t){const n=typeof t;return"function"===n&&e.callback===t||"object"===n&&e.originalDelegate===t},Z=Zone[zoneSymbol("UNPATCHED_EVENTS")],D=e[zoneSymbol("PASSIVE_EVENTS")],N=function(t,r,s,a,i=!1,c=!1){return function(){const l=this||e;let h=arguments[0];n&&n.transferEventName&&(h=n.transferEventName(h));let u=arguments[1];if(!u)return t.apply(this,arguments);if(isNode&&"uncaughtException"===h)return t.apply(this,arguments);let _=!1;if("function"!=typeof u){if(!u.handleEvent)return t.apply(this,arguments);_=!0}if(p&&!p(t,u,l,arguments))return;const d=passiveSupported&&!!D&&-1!==D.indexOf(h),E=function g(e,t){return!passiveSupported&&"object"==typeof e&&e?!!e.capture:passiveSupported&&t?"boolean"==typeof e?{capture:e,passive:!0}:e?"object"==typeof e&&!1!==e.passive?{...e,passive:!0}:e:{passive:!0}:e}(arguments[2],d),k=E&&"object"==typeof E&&E.signal&&"object"==typeof E.signal?E.signal:void 0;if(k?.aborted)return;if(Z)for(let e=0;e<Z.length;e++)if(h===Z[e])return d?t.call(l,h,u,E):t.apply(this,arguments);const m=!!E&&("boolean"==typeof E||E.capture),b=!(!E||"object"!=typeof E)&&E.once,S=Zone.current;let v=zoneSymbolEventNames[h];v||(prepareEventNames(h,y),v=zoneSymbolEventNames[h]);const O=v[m?TRUE_STR:FALSE_STR];let w,N=l[O],z=!1;if(N){if(z=!0,f)for(let e=0;e<N.length;e++)if(P(N[e],u))return}else N=l[O]=[];const R=l.constructor.name,C=globalSources[R];C&&(w=C[h]),w||(w=R+r+(y?y(h):h)),T.options=E,b&&(T.options.once=!1),T.target=l,T.capture=m,T.eventName=h,T.isExisting=z;const M=o?OPTIMIZED_ZONE_EVENT_TASK_DATA:void 0;M&&(M.taskData=T),k&&(T.options.signal=void 0);const I=S.scheduleEventTask(w,u,M,s,a);return k&&(T.options.signal=k,t.call(k,"abort",(()=>{I.zone.cancelTask(I)}),{once:!0})),T.target=null,M&&(M.taskData=null),b&&(E.once=!0),(passiveSupported||"boolean"!=typeof I.options)&&(I.options=E),I.target=l,I.capture=m,I.eventName=h,_&&(I.originalDelegate=u),c?N.unshift(I):N.push(I),i?l:void 0}};return g[r]=N(k,l,O,w,E),v&&(g[h]=N(v,u,(function(e){return v.call(T.target,T.eventName,e.invoke,T.options)}),w,E,!0)),g[s]=function(){const t=this||e;let o=arguments[0];n&&n.transferEventName&&(o=n.transferEventName(o));const r=arguments[2],s=!!r&&("boolean"==typeof r||r.capture),a=arguments[1];if(!a)return m.apply(this,arguments);if(p&&!p(m,a,t,arguments))return;const i=zoneSymbolEventNames[o];let c;i&&(c=i[s?TRUE_STR:FALSE_STR]);const l=c&&t[c];if(l)for(let e=0;e<l.length;e++){const n=l[e];if(P(n,a))return l.splice(e,1),n.isRemoved=!0,0===l.length&&(n.allRemoved=!0,t[c]=null,"string"==typeof o)&&(t[ZONE_SYMBOL_PREFIX+"ON_PROPERTY"+o]=null),n.zone.cancelTask(n),E?t:void 0}return m.apply(this,arguments)},g[a]=function(){const t=this||e;let o=arguments[0];n&&n.transferEventName&&(o=n.transferEventName(o));const r=[],s=findEventTasks(t,y?y(o):o);for(let e=0;e<s.length;e++){const t=s[e];r.push(t.originalDelegate?t.originalDelegate:t.callback)}return r},g[i]=function(){const t=this||e;let o=arguments[0];if(o){n&&n.transferEventName&&(o=n.transferEventName(o));const e=zoneSymbolEventNames[o];if(e){const n=t[e[FALSE_STR]],r=t[e[TRUE_STR]];if(n){const e=n.slice();for(let t=0;t<e.length;t++){const n=e[t];this[s].call(this,o,n.originalDelegate?n.originalDelegate:n.callback,n.options)}}if(r){const e=r.slice();for(let t=0;t<e.length;t++){const n=e[t];this[s].call(this,o,n.originalDelegate?n.originalDelegate:n.callback,n.options)}}}}else{const e=Object.keys(t);for(let t=0;t<e.length;t++){const n=EVENT_NAME_SYMBOL_REGX.exec(e[t]);let o=n&&n[1];o&&"removeListener"!==o&&this[i].call(this,o)}this[i].call(this,"removeListener")}if(E)return this},attachOriginToPatched(g[r],k),attachOriginToPatched(g[s],m),S&&attachOriginToPatched(g[i],S),b&&attachOriginToPatched(g[a],b),!0}let g=[];for(let e=0;e<n.length;e++)g[e]=E(n[e],o);return g}function findEventTasks(e,t){if(!t){const n=[];for(let o in e){const r=EVENT_NAME_SYMBOL_REGX.exec(o);let s=r&&r[1];if(s&&(!t||s===t)){const t=e[o];if(t)for(let e=0;e<t.length;e++)n.push(t[e])}}return n}let n=zoneSymbolEventNames[t];n||(prepareEventNames(t),n=zoneSymbolEventNames[t]);const o=e[n[FALSE_STR]],r=e[n[TRUE_STR]];return o?r?o.concat(r):o.slice():r?r.slice():[]}function patchEventPrototype(e,t){const n=e.Event;n&&n.prototype&&t.patchMethod(n.prototype,"stopImmediatePropagation",(e=>function(t,n){t[IMMEDIATE_PROPAGATION_SYMBOL]=!0,e&&e.apply(t,n)}))}function patchCallbacks(e,t,n,o,r){const s=Zone.__symbol__(o);if(t[s])return;const a=t[s]=t[o];t[o]=function(s,i,c){return i&&i.prototype&&r.forEach((function(t){const r=`${n}.${o}::`+t,s=i.prototype;try{if(s.hasOwnProperty(t)){const n=e.ObjectGetOwnPropertyDescriptor(s,t);n&&n.value?(n.value=e.wrapWithCurrentZone(n.value,r),e._redefineProperty(i.prototype,t,n)):s[t]&&(s[t]=e.wrapWithCurrentZone(s[t],r))}else s[t]&&(s[t]=e.wrapWithCurrentZone(s[t],r))}catch{}})),a.call(t,s,i,c)},e.attachOriginToPatched(t[o],a)}function filterProperties(e,t,n){if(!n||0===n.length)return t;const o=n.filter((t=>t.target===e));if(!o||0===o.length)return t;const r=o[0].ignoreProperties;return t.filter((e=>-1===r.indexOf(e)))}function patchFilteredProperties(e,t,n,o){e&&patchOnProperties(e,filterProperties(e,t,n),o)}function getOnEventNames(e){return Object.getOwnPropertyNames(e).filter((e=>e.startsWith("on")&&e.length>2)).map((e=>e.substring(2)))}function propertyDescriptorPatch(e,t){if(isNode&&!isMix)return;if(Zone[e.symbol("patchEvents")])return;const n=t.__Zone_ignore_on_properties;let o=[];if(isBrowser){const e=window;o=o.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);const t=isIE()?[{target:e,ignoreProperties:["error"]}]:[];patchFilteredProperties(e,getOnEventNames(e),n?n.concat(t):n,ObjectGetPrototypeOf(e))}o=o.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(let e=0;e<o.length;e++){const r=t[o[e]];r&&r.prototype&&patchFilteredProperties(r.prototype,getOnEventNames(r.prototype),n)}}function patchQueueMicrotask(e,t){t.patchMethod(e,"queueMicrotask",(e=>function(e,t){Zone.current.scheduleMicroTask("queueMicrotask",t[0])}))}Zone.__load_patch("util",((e,t,n)=>{const o=getOnEventNames(e);n.patchOnProperties=patchOnProperties,n.patchMethod=patchMethod,n.bindArguments=bindArguments,n.patchMacroTask=patchMacroTask;const r=t.__symbol__("BLACK_LISTED_EVENTS"),s=t.__symbol__("UNPATCHED_EVENTS");e[s]&&(e[r]=e[s]),e[r]&&(t[r]=t[s]=e[r]),n.patchEventPrototype=patchEventPrototype,n.patchEventTarget=patchEventTarget,n.isIEOrEdge=isIEOrEdge,n.ObjectDefineProperty=ObjectDefineProperty,n.ObjectGetOwnPropertyDescriptor=ObjectGetOwnPropertyDescriptor,n.ObjectCreate=ObjectCreate,n.ArraySlice=ArraySlice,n.patchClass=patchClass,n.wrapWithCurrentZone=wrapWithCurrentZone,n.filterProperties=filterProperties,n.attachOriginToPatched=attachOriginToPatched,n._redefineProperty=Object.defineProperty,n.patchCallbacks=patchCallbacks,n.getGlobalObjects=()=>({globalSources:globalSources,zoneSymbolEventNames:zoneSymbolEventNames,eventNames:o,isBrowser:isBrowser,isMix:isMix,isNode:isNode,TRUE_STR:TRUE_STR,FALSE_STR:FALSE_STR,ZONE_SYMBOL_PREFIX:ZONE_SYMBOL_PREFIX,ADD_EVENT_LISTENER_STR:"addEventListener",REMOVE_EVENT_LISTENER_STR:"removeEventListener"})}));const taskSymbol=zoneSymbol("zoneTask");function patchTimer(e,t,n,o){let r=null,s=null;n+=o;const a={};function i(t){const n=t.data;return n.args[0]=function(){return t.invoke.apply(this,arguments)},n.handleId=r.apply(e,n.args),t}function c(t){return s.call(e,t.data.handleId)}r=patchMethod(e,t+=o,(n=>function(r,s){if("function"==typeof s[0]){const e={isPeriodic:"Interval"===o,delay:"Timeout"===o||"Interval"===o?s[1]||0:void 0,args:s},n=s[0];s[0]=function t(){try{return n.apply(this,arguments)}finally{e.isPeriodic||("number"==typeof e.handleId?delete a[e.handleId]:e.handleId&&(e.handleId[taskSymbol]=null))}};const r=scheduleMacroTaskWithCurrentZone(t,s[0],e,i,c);if(!r)return r;const l=r.data.handleId;return"number"==typeof l?a[l]=r:l&&(l[taskSymbol]=r),l&&l.ref&&l.unref&&"function"==typeof l.ref&&"function"==typeof l.unref&&(r.ref=l.ref.bind(l),r.unref=l.unref.bind(l)),"number"==typeof l||l?l:r}return n.apply(e,s)})),s=patchMethod(e,n,(t=>function(n,o){const r=o[0];let s;"number"==typeof r?s=a[r]:(s=r&&r[taskSymbol],s||(s=r)),s&&"string"==typeof s.type?"notScheduled"!==s.state&&(s.cancelFn&&s.data.isPeriodic||0===s.runCount)&&("number"==typeof r?delete a[r]:r&&(r[taskSymbol]=null),s.zone.cancelTask(s)):t.apply(e,o)}))}function patchCustomElements(e,t){const{isBrowser:n,isMix:o}=t.getGlobalObjects();(n||o)&&e.customElements&&"customElements"in e&&t.patchCallbacks(t,e.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback","formAssociatedCallback","formDisabledCallback","formResetCallback","formStateRestoreCallback"])}function eventTargetPatch(e,t){if(Zone[t.symbol("patchEventTarget")])return;const{eventNames:n,zoneSymbolEventNames:o,TRUE_STR:r,FALSE_STR:s,ZONE_SYMBOL_PREFIX:a}=t.getGlobalObjects();for(let e=0;e<n.length;e++){const t=n[e],i=a+(t+s),c=a+(t+r);o[t]={},o[t][s]=i,o[t][r]=c}const i=e.EventTarget;return i&&i.prototype?(t.patchEventTarget(e,t,[i&&i.prototype]),!0):void 0}function patchEvent(e,t){t.patchEventPrototype(e,t)}Zone.__load_patch("legacy",(e=>{const t=e[Zone.__symbol__("legacyPatch")];t&&t()})),Zone.__load_patch("timers",(e=>{const t="set",n="clear";patchTimer(e,t,n,"Timeout"),patchTimer(e,t,n,"Interval"),patchTimer(e,t,n,"Immediate")})),Zone.__load_patch("requestAnimationFrame",(e=>{patchTimer(e,"request","cancel","AnimationFrame"),patchTimer(e,"mozRequest","mozCancel","AnimationFrame"),patchTimer(e,"webkitRequest","webkitCancel","AnimationFrame")})),Zone.__load_patch("blocking",((e,t)=>{const n=["alert","prompt","confirm"];for(let o=0;o<n.length;o++)patchMethod(e,n[o],((n,o,r)=>function(o,s){return t.current.run(n,e,s,r)}))})),Zone.__load_patch("EventTarget",((e,t,n)=>{patchEvent(e,n),eventTargetPatch(e,n);const o=e.XMLHttpRequestEventTarget;o&&o.prototype&&n.patchEventTarget(e,n,[o.prototype])})),Zone.__load_patch("MutationObserver",((e,t,n)=>{patchClass("MutationObserver"),patchClass("WebKitMutationObserver")})),Zone.__load_patch("IntersectionObserver",((e,t,n)=>{patchClass("IntersectionObserver")})),Zone.__load_patch("FileReader",((e,t,n)=>{patchClass("FileReader")})),Zone.__load_patch("on_property",((e,t,n)=>{propertyDescriptorPatch(n,e)})),Zone.__load_patch("customElements",((e,t,n)=>{patchCustomElements(e,n)})),Zone.__load_patch("XHR",((e,t)=>{!function n(e){const n=e.XMLHttpRequest;if(!n)return;const l=n.prototype;let h=l[ZONE_SYMBOL_ADD_EVENT_LISTENER],u=l[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];if(!h){const t=e.XMLHttpRequestEventTarget;if(t){const e=t.prototype;h=e[ZONE_SYMBOL_ADD_EVENT_LISTENER],u=e[ZONE_SYMBOL_REMOVE_EVENT_LISTENER]}}const p="readystatechange",f="scheduled";function _(e){const n=e.data,r=n.target;r[a]=!1,r[c]=!1;const i=r[s];h||(h=r[ZONE_SYMBOL_ADD_EVENT_LISTENER],u=r[ZONE_SYMBOL_REMOVE_EVENT_LISTENER]),i&&u.call(r,p,i);const l=r[s]=()=>{if(r.readyState===r.DONE)if(!n.aborted&&r[a]&&e.state===f){const o=r[t.__symbol__("loadfalse")];if(0!==r.status&&o&&o.length>0){const s=e.invoke;e.invoke=function(){const o=r[t.__symbol__("loadfalse")];for(let t=0;t<o.length;t++)o[t]===e&&o.splice(t,1);n.aborted||e.state!==f||s.call(e)},o.push(e)}else e.invoke()}else n.aborted||!1!==r[a]||(r[c]=!0)};return h.call(r,p,l),r[o]||(r[o]=e),k.apply(r,n.args),r[a]=!0,e}function d(){}function E(e){const t=e.data;return t.aborted=!0,m.apply(t.target,t.args)}const g=patchMethod(l,"open",(()=>function(e,t){return e[r]=0==t[2],e[i]=t[1],g.apply(e,t)})),y=zoneSymbol("fetchTaskAborting"),T=zoneSymbol("fetchTaskScheduling"),k=patchMethod(l,"send",(()=>function(e,n){if(!0===t.current[T])return k.apply(e,n);if(e[r])return k.apply(e,n);{const t={target:e,url:e[i],isPeriodic:!1,args:n,aborted:!1},o=scheduleMacroTaskWithCurrentZone("XMLHttpRequest.send",d,t,_,E);e&&!0===e[c]&&!t.aborted&&o.state===f&&o.invoke()}})),m=patchMethod(l,"abort",(()=>function(e,n){const r=function s(e){return e[o]}(e);if(r&&"string"==typeof r.type){if(null==r.cancelFn||r.data&&r.data.aborted)return;r.zone.cancelTask(r)}else if(!0===t.current[y])return m.apply(e,n)}))}(e);const o=zoneSymbol("xhrTask"),r=zoneSymbol("xhrSync"),s=zoneSymbol("xhrListener"),a=zoneSymbol("xhrScheduled"),i=zoneSymbol("xhrURL"),c=zoneSymbol("xhrErrorBeforeScheduled")})),Zone.__load_patch("geolocation",(e=>{e.navigator&&e.navigator.geolocation&&patchPrototype(e.navigator.geolocation,["getCurrentPosition","watchPosition"])})),Zone.__load_patch("PromiseRejectionEvent",((e,t)=>{function n(t){return function(n){findEventTasks(e,t).forEach((o=>{const r=e.PromiseRejectionEvent;if(r){const e=new r(t,{promise:n.promise,reason:n.rejection});o.invoke(e)}}))}}e.PromiseRejectionEvent&&(t[zoneSymbol("unhandledPromiseRejectionHandler")]=n("unhandledrejection"),t[zoneSymbol("rejectionHandledHandler")]=n("rejectionhandled"))})),Zone.__load_patch("queueMicrotask",((e,t,n)=>{patchQueueMicrotask(e,n)}));
*/const global=globalThis;function __symbol__(e){return(global.__Zone_symbol_prefix||"__zone_symbol__")+e}function initZone(){const e=global.performance;function t(t){e&&e.mark&&e.mark(t)}function n(t,n){e&&e.measure&&e.measure(t,n)}t("Zone");class o{static{this.__symbol__=__symbol__}static assertZonePatched(){if(global.Promise!==w.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let e=o.current;for(;e.parent;)e=e.parent;return e}static get current(){return D.zone}static get currentTask(){return Z}static __load_patch(e,r,s=!1){if(w.hasOwnProperty(e)){const t=!0===global[__symbol__("forceDuplicateZoneCheck")];if(!s&&t)throw Error("Already loaded patch: "+e)}else if(!global["__Zone_disable_"+e]){const s="Zone:"+e;t(s),w[e]=r(global,o,P),n(s,s)}}get parent(){return this._parent}get name(){return this._name}constructor(e,t){this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new s(this,this._parent&&this._parent._zoneDelegate,t)}get(e){const t=this.getZoneWith(e);if(t)return t._properties[e]}getZoneWith(e){let t=this;for(;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null}fork(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)}wrap(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);const n=this._zoneDelegate.intercept(this,e,t),o=this;return function(){return o.runGuarded(n,this,arguments,t)}}run(e,t,n,o){D={parent:D,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,o)}finally{D=D.parent}}runGuarded(e,t=null,n,o){D={parent:D,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,o)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{D=D.parent}}runTask(e,t,n){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||E).name+"; Execution: "+this.name+")");if(e.state===g&&(e.type===O||e.type===v))return;const o=e.state!=m;o&&e._transitionTo(m,y),e.runCount++;const r=Z;Z=e,D={parent:D,zone:this};try{e.type==v&&e.data&&!e.data.isPeriodic&&(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,e,t,n)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{e.state!==g&&e.state!==b&&(e.type==O||e.data&&e.data.isPeriodic?o&&e._transitionTo(y,m):(e.runCount=0,this._updateTaskCount(e,-1),o&&e._transitionTo(g,m,g))),D=D.parent,Z=r}}scheduleTask(e){if(e.zone&&e.zone!==this){let t=this;for(;t;){if(t===e.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${e.zone.name}`);t=t.parent}}e._transitionTo(T,g);const t=[];e._zoneDelegates=t,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(t){throw e._transitionTo(b,T,g),this._zoneDelegate.handleError(this,t),t}return e._zoneDelegates===t&&this._updateTaskCount(e,1),e.state==T&&e._transitionTo(y,T),e}scheduleMicroTask(e,t,n,o){return this.scheduleTask(new a(S,e,t,n,o,void 0))}scheduleMacroTask(e,t,n,o,r){return this.scheduleTask(new a(v,e,t,n,o,r))}scheduleEventTask(e,t,n,o,r){return this.scheduleTask(new a(O,e,t,n,o,r))}cancelTask(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||E).name+"; Execution: "+this.name+")");if(e.state===y||e.state===m){e._transitionTo(k,y,m);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(b,k),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(g,k),e.runCount=0,e}}_updateTaskCount(e,t){const n=e._zoneDelegates;-1==t&&(e._zoneDelegates=null);for(let o=0;o<n.length;o++)n[o]._updateTaskCount(e.type,t)}}const r={name:"",onHasTask:(e,t,n,o)=>e.hasTask(n,o),onScheduleTask:(e,t,n,o)=>e.scheduleTask(n,o),onInvokeTask:(e,t,n,o,r,s)=>e.invokeTask(n,o,r,s),onCancelTask:(e,t,n,o)=>e.cancelTask(n,o)};class s{get zone(){return this._zone}constructor(e,t,n){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this._zone=e,this._parentDelegate=t,this._forkZS=n&&(n&&n.onFork?n:t._forkZS),this._forkDlgt=n&&(n.onFork?t:t._forkDlgt),this._forkCurrZone=n&&(n.onFork?this._zone:t._forkCurrZone),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this._zone:t._interceptCurrZone),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this._zone:t._invokeCurrZone),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this._zone:t._handleErrorCurrZone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this._zone:t._scheduleTaskCurrZone),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this._zone:t._invokeTaskCurrZone),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this._zone:t._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const o=n&&n.onHasTask;(o||t&&t._hasTaskZS)&&(this._hasTaskZS=o?n:r,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=this._zone,n.onScheduleTask||(this._scheduleTaskZS=r,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this._zone),n.onInvokeTask||(this._invokeTaskZS=r,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this._zone),n.onCancelTask||(this._cancelTaskZS=r,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this._zone))}fork(e,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,t):new o(e,t)}intercept(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,e,t,n):t}invoke(e,t,n,o,r){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,e,t,n,o,r):t.apply(n,o)}handleError(e,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,e,t)}scheduleTask(e,t){let n=t;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,e,t),n||(n=t);else if(t.scheduleFn)t.scheduleFn(t);else{if(t.type!=S)throw new Error("Task is missing scheduleFn.");f(t)}return n}invokeTask(e,t,n,o){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,e,t,n,o):t.callback.apply(n,o)}cancelTask(e,t){let n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,e,t);else{if(!t.cancelFn)throw Error("Task is not cancelable");n=t.cancelFn(t)}return n}hasTask(e,t){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,e,t)}catch(t){this.handleError(e,t)}}_updateTaskCount(e,t){const n=this._taskCounts,o=n[e],r=n[e]=o+t;if(r<0)throw new Error("More tasks executed then were scheduled.");0!=o&&0!=r||this.hasTask(this._zone,{microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e})}}class a{constructor(e,t,n,o,r,s){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=e,this.source=t,this.data=o,this.scheduleFn=r,this.cancelFn=s,!n)throw new Error("callback is not defined");this.callback=n;const i=this;this.invoke=e===O&&o&&o.useG?a.invokeTask:function(){return a.invokeTask.call(global,i,this,arguments)}}static invokeTask(e,t,n){e||(e=this),N++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{1==N&&d(),N--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(g,T)}_transitionTo(e,t,n){if(this._state!==t&&this._state!==n)throw new Error(`${this.type} '${this.source}': can not transition to '${e}', expecting state '${t}'${n?" or '"+n+"'":""}, was '${this._state}'.`);this._state=e,e==g&&(this._zoneDelegates=null)}toString(){return this.data&&void 0!==this.data.handleId?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}const i=__symbol__("setTimeout"),c=__symbol__("Promise"),l=__symbol__("then");let h,u=[],p=!1;function _(e){if(h||global[c]&&(h=global[c].resolve(0)),h){let t=h[l];t||(t=h.then),t.call(h,e)}else global[i](e,0)}function f(e){0===N&&0===u.length&&_(d),e&&u.push(e)}function d(){if(!p){for(p=!0;u.length;){const e=u;u=[];for(let t=0;t<e.length;t++){const n=e[t];try{n.zone.runTask(n,null,null)}catch(e){P.onUnhandledError(e)}}}P.microtaskDrainDone(),p=!1}}const E={name:"NO ZONE"},g="notScheduled",T="scheduling",y="scheduled",m="running",k="canceling",b="unknown",S="microTask",v="macroTask",O="eventTask",w={},P={symbol:__symbol__,currentZoneFrame:()=>D,onUnhandledError:R,microtaskDrainDone:R,scheduleMicroTask:f,showUncaughtError:()=>!o[__symbol__("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:R,patchMethod:()=>R,bindArguments:()=>[],patchThen:()=>R,patchMacroTask:()=>R,patchEventPrototype:()=>R,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>R,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>R,wrapWithCurrentZone:()=>R,filterProperties:()=>[],attachOriginToPatched:()=>R,_redefineProperty:()=>R,patchCallbacks:()=>R,nativeScheduleMicroTask:_};let D={parent:null,zone:new o(null,null)},Z=null,N=0;function R(){}return n("Zone","Zone"),o}function loadZone(){const e=globalThis,t=!0===e[__symbol__("forceDuplicateZoneCheck")];if(e.Zone&&(t||"function"!=typeof e.Zone.__symbol__))throw new Error("Zone already loaded.");return e.Zone??=initZone(),e.Zone}const ObjectGetOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,ObjectDefineProperty=Object.defineProperty,ObjectGetPrototypeOf=Object.getPrototypeOf,ObjectCreate=Object.create,ArraySlice=Array.prototype.slice,ADD_EVENT_LISTENER_STR="addEventListener",REMOVE_EVENT_LISTENER_STR="removeEventListener",ZONE_SYMBOL_ADD_EVENT_LISTENER=__symbol__(ADD_EVENT_LISTENER_STR),ZONE_SYMBOL_REMOVE_EVENT_LISTENER=__symbol__(REMOVE_EVENT_LISTENER_STR),TRUE_STR="true",FALSE_STR="false",ZONE_SYMBOL_PREFIX=__symbol__("");function wrapWithCurrentZone(e,t){return Zone.current.wrap(e,t)}function scheduleMacroTaskWithCurrentZone(e,t,n,o,r){return Zone.current.scheduleMacroTask(e,t,n,o,r)}const zoneSymbol=__symbol__,isWindowExists="undefined"!=typeof window,internalWindow=isWindowExists?window:void 0,_global=isWindowExists&&internalWindow||globalThis,REMOVE_ATTRIBUTE="removeAttribute";function bindArguments(e,t){for(let n=e.length-1;n>=0;n--)"function"==typeof e[n]&&(e[n]=wrapWithCurrentZone(e[n],t+"_"+n));return e}function patchPrototype(e,t){const n=e.constructor.name;for(let o=0;o<t.length;o++){const r=t[o],s=e[r];if(s){if(!isPropertyWritable(ObjectGetOwnPropertyDescriptor(e,r)))continue;e[r]=(e=>{const t=function(){return e.apply(this,bindArguments(arguments,n+"."+r))};return attachOriginToPatched(t,e),t})(s)}}}function isPropertyWritable(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&void 0===e.set)}const isWebWorker="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,isNode=!("nw"in _global)&&void 0!==_global.process&&"[object process]"==={}.toString.call(_global.process),isBrowser=!isNode&&!isWebWorker&&!(!isWindowExists||!internalWindow.HTMLElement),isMix=void 0!==_global.process&&"[object process]"==={}.toString.call(_global.process)&&!isWebWorker&&!(!isWindowExists||!internalWindow.HTMLElement),zoneSymbolEventNames$1={},wrapFn=function(e){if(!(e=e||_global.event))return;let t=zoneSymbolEventNames$1[e.type];t||(t=zoneSymbolEventNames$1[e.type]=zoneSymbol("ON_PROPERTY"+e.type));const n=this||e.target||_global,o=n[t];let r;return isBrowser&&n===internalWindow&&"error"===e.type?(r=o&&o.call(this,e.message,e.filename,e.lineno,e.colno,e.error),!0===r&&e.preventDefault()):(r=o&&o.apply(this,arguments),null==r||r||e.preventDefault()),r};function patchProperty(e,t,n){let o=ObjectGetOwnPropertyDescriptor(e,t);if(!o&&n&&ObjectGetOwnPropertyDescriptor(n,t)&&(o={enumerable:!0,configurable:!0}),!o||!o.configurable)return;const r=zoneSymbol("on"+t+"patched");if(e.hasOwnProperty(r)&&e[r])return;delete o.writable,delete o.value;const s=o.get,a=o.set,i=t.slice(2);let c=zoneSymbolEventNames$1[i];c||(c=zoneSymbolEventNames$1[i]=zoneSymbol("ON_PROPERTY"+i)),o.set=function(t){let n=this;n||e!==_global||(n=_global),n&&("function"==typeof n[c]&&n.removeEventListener(i,wrapFn),a&&a.call(n,null),n[c]=t,"function"==typeof t&&n.addEventListener(i,wrapFn,!1))},o.get=function(){let n=this;if(n||e!==_global||(n=_global),!n)return null;const r=n[c];if(r)return r;if(s){let e=s.call(this);if(e)return o.set.call(this,e),"function"==typeof n[REMOVE_ATTRIBUTE]&&n.removeAttribute(t),e}return null},ObjectDefineProperty(e,t,o),e[r]=!0}function patchOnProperties(e,t,n){if(t)for(let o=0;o<t.length;o++)patchProperty(e,"on"+t[o],n);else{const t=[];for(const n in e)"on"==n.slice(0,2)&&t.push(n);for(let o=0;o<t.length;o++)patchProperty(e,t[o],n)}}const originalInstanceKey=zoneSymbol("originalInstance");function patchClass(e){const t=_global[e];if(!t)return;_global[zoneSymbol(e)]=t,_global[e]=function(){const n=bindArguments(arguments,e);switch(n.length){case 0:this[originalInstanceKey]=new t;break;case 1:this[originalInstanceKey]=new t(n[0]);break;case 2:this[originalInstanceKey]=new t(n[0],n[1]);break;case 3:this[originalInstanceKey]=new t(n[0],n[1],n[2]);break;case 4:this[originalInstanceKey]=new t(n[0],n[1],n[2],n[3]);break;default:throw new Error("Arg list too long.")}},attachOriginToPatched(_global[e],t);const n=new t((function(){}));let o;for(o in n)"XMLHttpRequest"===e&&"responseBlob"===o||function(t){"function"==typeof n[t]?_global[e].prototype[t]=function(){return this[originalInstanceKey][t].apply(this[originalInstanceKey],arguments)}:ObjectDefineProperty(_global[e].prototype,t,{set:function(n){"function"==typeof n?(this[originalInstanceKey][t]=wrapWithCurrentZone(n,e+"."+t),attachOriginToPatched(this[originalInstanceKey][t],n)):this[originalInstanceKey][t]=n},get:function(){return this[originalInstanceKey][t]}})}(o);for(o in t)"prototype"!==o&&t.hasOwnProperty(o)&&(_global[e][o]=t[o])}function patchMethod(e,t,n){let o=e;for(;o&&!o.hasOwnProperty(t);)o=ObjectGetPrototypeOf(o);!o&&e[t]&&(o=e);const r=zoneSymbol(t);let s=null;if(o&&(!(s=o[r])||!o.hasOwnProperty(r))&&(s=o[r]=o[t],isPropertyWritable(o&&ObjectGetOwnPropertyDescriptor(o,t)))){const e=n(s,r,t);o[t]=function(){return e(this,arguments)},attachOriginToPatched(o[t],s)}return s}function patchMacroTask(e,t,n){let o=null;function r(e){const t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},o.apply(t.target,t.args),e}o=patchMethod(e,t,(e=>function(t,o){const s=n(t,o);return s.cbIdx>=0&&"function"==typeof o[s.cbIdx]?scheduleMacroTaskWithCurrentZone(s.name,o[s.cbIdx],s,r):e.apply(t,o)}))}function attachOriginToPatched(e,t){e[zoneSymbol("OriginalDelegate")]=t}let isDetectedIEOrEdge=!1,ieOrEdge=!1;function isIE(){try{const e=internalWindow.navigator.userAgent;if(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/"))return!0}catch(e){}return!1}function isIEOrEdge(){if(isDetectedIEOrEdge)return ieOrEdge;isDetectedIEOrEdge=!0;try{const e=internalWindow.navigator.userAgent;-1===e.indexOf("MSIE ")&&-1===e.indexOf("Trident/")&&-1===e.indexOf("Edge/")||(ieOrEdge=!0)}catch(e){}return ieOrEdge}let passiveSupported=!1;if("undefined"!=typeof window)try{const e=Object.defineProperty({},"passive",{get:function(){passiveSupported=!0}});window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){passiveSupported=!1}const OPTIMIZED_ZONE_EVENT_TASK_DATA={useG:!0},zoneSymbolEventNames={},globalSources={},EVENT_NAME_SYMBOL_REGX=new RegExp("^"+ZONE_SYMBOL_PREFIX+"(\\w+)(true|false)$"),IMMEDIATE_PROPAGATION_SYMBOL=zoneSymbol("propagationStopped");function prepareEventNames(e,t){const n=(t?t(e):e)+FALSE_STR,o=(t?t(e):e)+TRUE_STR,r=ZONE_SYMBOL_PREFIX+n,s=ZONE_SYMBOL_PREFIX+o;zoneSymbolEventNames[e]={},zoneSymbolEventNames[e][FALSE_STR]=r,zoneSymbolEventNames[e][TRUE_STR]=s}function patchEventTarget(e,t,n,o){const r=o&&o.add||ADD_EVENT_LISTENER_STR,s=o&&o.rm||REMOVE_EVENT_LISTENER_STR,a=o&&o.listeners||"eventListeners",i=o&&o.rmAll||"removeAllListeners",c=zoneSymbol(r),l="."+r+":",h="prependListener",u="."+h+":",p=function(e,t,n){if(e.isRemoved)return;const o=e.callback;let r;"object"==typeof o&&o.handleEvent&&(e.callback=e=>o.handleEvent(e),e.originalDelegate=o);try{e.invoke(e,t,[n])}catch(e){r=e}const a=e.options;return a&&"object"==typeof a&&a.once&&t[s].call(t,n.type,e.originalDelegate?e.originalDelegate:e.callback,a),r};function _(n,o,r){if(!(o=o||e.event))return;const s=n||o.target||e,a=s[zoneSymbolEventNames[o.type][r?TRUE_STR:FALSE_STR]];if(a){const e=[];if(1===a.length){const t=p(a[0],s,o);t&&e.push(t)}else{const t=a.slice();for(let n=0;n<t.length&&(!o||!0!==o[IMMEDIATE_PROPAGATION_SYMBOL]);n++){const r=p(t[n],s,o);r&&e.push(r)}}if(1===e.length)throw e[0];for(let n=0;n<e.length;n++){const o=e[n];t.nativeScheduleMicroTask((()=>{throw o}))}}}const f=function(e){return _(this,e,!1)},d=function(e){return _(this,e,!0)};function E(t,n){if(!t)return!1;let o=!0;n&&void 0!==n.useG&&(o=n.useG);const p=n&&n.vh;let _=!0;n&&void 0!==n.chkDup&&(_=n.chkDup);let E=!1;n&&void 0!==n.rt&&(E=n.rt);let g=t;for(;g&&!g.hasOwnProperty(r);)g=ObjectGetPrototypeOf(g);if(!g&&t[r]&&(g=t),!g)return!1;if(g[c])return!1;const T=n&&n.eventNameToString,y={},m=g[c]=g[r],k=g[zoneSymbol(s)]=g[s],b=g[zoneSymbol(a)]=g[a],S=g[zoneSymbol(i)]=g[i];let v;n&&n.prepend&&(v=g[zoneSymbol(n.prepend)]=g[n.prepend]);const O=o?function(e){if(!y.isExisting)return m.call(y.target,y.eventName,y.capture?d:f,y.options)}:function(e){return m.call(y.target,y.eventName,e.invoke,y.options)},w=o?function(e){if(!e.isRemoved){const t=zoneSymbolEventNames[e.eventName];let n;t&&(n=t[e.capture?TRUE_STR:FALSE_STR]);const o=n&&e.target[n];if(o)for(let t=0;t<o.length;t++)if(o[t]===e){o.splice(t,1),e.isRemoved=!0,0===o.length&&(e.allRemoved=!0,e.target[n]=null);break}}if(e.allRemoved)return k.call(e.target,e.eventName,e.capture?d:f,e.options)}:function(e){return k.call(e.target,e.eventName,e.invoke,e.options)},P=n&&n.diff?n.diff:function(e,t){const n=typeof t;return"function"===n&&e.callback===t||"object"===n&&e.originalDelegate===t},D=Zone[zoneSymbol("UNPATCHED_EVENTS")],Z=e[zoneSymbol("PASSIVE_EVENTS")],N=function(t,r,s,a,i=!1,c=!1){return function(){const l=this||e;let h=arguments[0];n&&n.transferEventName&&(h=n.transferEventName(h));let u=arguments[1];if(!u)return t.apply(this,arguments);if(isNode&&"uncaughtException"===h)return t.apply(this,arguments);let f=!1;if("function"!=typeof u){if(!u.handleEvent)return t.apply(this,arguments);f=!0}if(p&&!p(t,u,l,arguments))return;const d=passiveSupported&&!!Z&&-1!==Z.indexOf(h),E=function g(e,t){return!passiveSupported&&"object"==typeof e&&e?!!e.capture:passiveSupported&&t?"boolean"==typeof e?{capture:e,passive:!0}:e?"object"==typeof e&&!1!==e.passive?{...e,passive:!0}:e:{passive:!0}:e}(arguments[2],d),m=E&&"object"==typeof E&&E.signal&&"object"==typeof E.signal?E.signal:void 0;if(m?.aborted)return;if(D)for(let e=0;e<D.length;e++)if(h===D[e])return d?t.call(l,h,u,E):t.apply(this,arguments);const k=!!E&&("boolean"==typeof E||E.capture),b=!(!E||"object"!=typeof E)&&E.once,S=Zone.current;let v=zoneSymbolEventNames[h];v||(prepareEventNames(h,T),v=zoneSymbolEventNames[h]);const O=v[k?TRUE_STR:FALSE_STR];let w,N=l[O],R=!1;if(N){if(R=!0,_)for(let e=0;e<N.length;e++)if(P(N[e],u))return}else N=l[O]=[];const z=l.constructor.name,I=globalSources[z];I&&(w=I[h]),w||(w=z+r+(T?T(h):h)),y.options=E,b&&(y.options.once=!1),y.target=l,y.capture=k,y.eventName=h,y.isExisting=R;const C=o?OPTIMIZED_ZONE_EVENT_TASK_DATA:void 0;C&&(C.taskData=y),m&&(y.options.signal=void 0);const M=S.scheduleEventTask(w,u,C,s,a);return m&&(y.options.signal=m,t.call(m,"abort",(()=>{M.zone.cancelTask(M)}),{once:!0})),y.target=null,C&&(C.taskData=null),b&&(E.once=!0),(passiveSupported||"boolean"!=typeof M.options)&&(M.options=E),M.target=l,M.capture=k,M.eventName=h,f&&(M.originalDelegate=u),c?N.unshift(M):N.push(M),i?l:void 0}};return g[r]=N(m,l,O,w,E),v&&(g[h]=N(v,u,(function(e){return v.call(y.target,y.eventName,e.invoke,y.options)}),w,E,!0)),g[s]=function(){const t=this||e;let o=arguments[0];n&&n.transferEventName&&(o=n.transferEventName(o));const r=arguments[2],s=!!r&&("boolean"==typeof r||r.capture),a=arguments[1];if(!a)return k.apply(this,arguments);if(p&&!p(k,a,t,arguments))return;const i=zoneSymbolEventNames[o];let c;i&&(c=i[s?TRUE_STR:FALSE_STR]);const l=c&&t[c];if(l)for(let e=0;e<l.length;e++){const n=l[e];if(P(n,a))return l.splice(e,1),n.isRemoved=!0,0!==l.length||(n.allRemoved=!0,t[c]=null,s||"string"!=typeof o)||(t[ZONE_SYMBOL_PREFIX+"ON_PROPERTY"+o]=null),n.zone.cancelTask(n),E?t:void 0}return k.apply(this,arguments)},g[a]=function(){const t=this||e;let o=arguments[0];n&&n.transferEventName&&(o=n.transferEventName(o));const r=[],s=findEventTasks(t,T?T(o):o);for(let e=0;e<s.length;e++){const t=s[e];r.push(t.originalDelegate?t.originalDelegate:t.callback)}return r},g[i]=function(){const t=this||e;let o=arguments[0];if(o){n&&n.transferEventName&&(o=n.transferEventName(o));const e=zoneSymbolEventNames[o];if(e){const n=t[e[FALSE_STR]],r=t[e[TRUE_STR]];if(n){const e=n.slice();for(let t=0;t<e.length;t++){const n=e[t];this[s].call(this,o,n.originalDelegate?n.originalDelegate:n.callback,n.options)}}if(r){const e=r.slice();for(let t=0;t<e.length;t++){const n=e[t];this[s].call(this,o,n.originalDelegate?n.originalDelegate:n.callback,n.options)}}}}else{const e=Object.keys(t);for(let t=0;t<e.length;t++){const n=EVENT_NAME_SYMBOL_REGX.exec(e[t]);let o=n&&n[1];o&&"removeListener"!==o&&this[i].call(this,o)}this[i].call(this,"removeListener")}if(E)return this},attachOriginToPatched(g[r],m),attachOriginToPatched(g[s],k),S&&attachOriginToPatched(g[i],S),b&&attachOriginToPatched(g[a],b),!0}let g=[];for(let e=0;e<n.length;e++)g[e]=E(n[e],o);return g}function findEventTasks(e,t){if(!t){const n=[];for(let o in e){const r=EVENT_NAME_SYMBOL_REGX.exec(o);let s=r&&r[1];if(s&&(!t||s===t)){const t=e[o];if(t)for(let e=0;e<t.length;e++)n.push(t[e])}}return n}let n=zoneSymbolEventNames[t];n||(prepareEventNames(t),n=zoneSymbolEventNames[t]);const o=e[n[FALSE_STR]],r=e[n[TRUE_STR]];return o?r?o.concat(r):o.slice():r?r.slice():[]}function patchEventPrototype(e,t){const n=e.Event;n&&n.prototype&&t.patchMethod(n.prototype,"stopImmediatePropagation",(e=>function(t,n){t[IMMEDIATE_PROPAGATION_SYMBOL]=!0,e&&e.apply(t,n)}))}function patchQueueMicrotask(e,t){t.patchMethod(e,"queueMicrotask",(e=>function(e,t){Zone.current.scheduleMicroTask("queueMicrotask",t[0])}))}const taskSymbol=zoneSymbol("zoneTask");function patchTimer(e,t,n,o){let r=null,s=null;n+=o;const a={};function i(t){const n=t.data;return n.args[0]=function(){return t.invoke.apply(this,arguments)},n.handleId=r.apply(e,n.args),t}function c(t){return s.call(e,t.data.handleId)}r=patchMethod(e,t+=o,(n=>function(r,s){if("function"==typeof s[0]){const e={isPeriodic:"Interval"===o,delay:"Timeout"===o||"Interval"===o?s[1]||0:void 0,args:s},n=s[0];s[0]=function t(){try{return n.apply(this,arguments)}finally{e.isPeriodic||("number"==typeof e.handleId?delete a[e.handleId]:e.handleId&&(e.handleId[taskSymbol]=null))}};const r=scheduleMacroTaskWithCurrentZone(t,s[0],e,i,c);if(!r)return r;const l=r.data.handleId;return"number"==typeof l?a[l]=r:l&&(l[taskSymbol]=r),l&&l.ref&&l.unref&&"function"==typeof l.ref&&"function"==typeof l.unref&&(r.ref=l.ref.bind(l),r.unref=l.unref.bind(l)),"number"==typeof l||l?l:r}return n.apply(e,s)})),s=patchMethod(e,n,(t=>function(n,o){const r=o[0];let s;"number"==typeof r?s=a[r]:(s=r&&r[taskSymbol],s||(s=r)),s&&"string"==typeof s.type?"notScheduled"!==s.state&&(s.cancelFn&&s.data.isPeriodic||0===s.runCount)&&("number"==typeof r?delete a[r]:r&&(r[taskSymbol]=null),s.zone.cancelTask(s)):t.apply(e,o)}))}function patchCustomElements(e,t){const{isBrowser:n,isMix:o}=t.getGlobalObjects();(n||o)&&e.customElements&&"customElements"in e&&t.patchCallbacks(t,e.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback","formAssociatedCallback","formDisabledCallback","formResetCallback","formStateRestoreCallback"])}function eventTargetPatch(e,t){if(Zone[t.symbol("patchEventTarget")])return;const{eventNames:n,zoneSymbolEventNames:o,TRUE_STR:r,FALSE_STR:s,ZONE_SYMBOL_PREFIX:a}=t.getGlobalObjects();for(let e=0;e<n.length;e++){const t=n[e],i=a+(t+s),c=a+(t+r);o[t]={},o[t][s]=i,o[t][r]=c}const i=e.EventTarget;return i&&i.prototype?(t.patchEventTarget(e,t,[i&&i.prototype]),!0):void 0}function patchEvent(e,t){t.patchEventPrototype(e,t)}function filterProperties(e,t,n){if(!n||0===n.length)return t;const o=n.filter((t=>t.target===e));if(!o||0===o.length)return t;const r=o[0].ignoreProperties;return t.filter((e=>-1===r.indexOf(e)))}function patchFilteredProperties(e,t,n,o){e&&patchOnProperties(e,filterProperties(e,t,n),o)}function getOnEventNames(e){return Object.getOwnPropertyNames(e).filter((e=>e.startsWith("on")&&e.length>2)).map((e=>e.substring(2)))}function propertyDescriptorPatch(e,t){if(isNode&&!isMix)return;if(Zone[e.symbol("patchEvents")])return;const n=t.__Zone_ignore_on_properties;let o=[];if(isBrowser){const e=window;o=o.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);const t=isIE()?[{target:e,ignoreProperties:["error"]}]:[];patchFilteredProperties(e,getOnEventNames(e),n?n.concat(t):n,ObjectGetPrototypeOf(e))}o=o.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(let e=0;e<o.length;e++){const r=t[o[e]];r&&r.prototype&&patchFilteredProperties(r.prototype,getOnEventNames(r.prototype),n)}}function patchBrowser(e){e.__load_patch("legacy",(t=>{const n=t[e.__symbol__("legacyPatch")];n&&n()})),e.__load_patch("timers",(e=>{const t="set",n="clear";patchTimer(e,t,n,"Timeout"),patchTimer(e,t,n,"Interval"),patchTimer(e,t,n,"Immediate")})),e.__load_patch("requestAnimationFrame",(e=>{patchTimer(e,"request","cancel","AnimationFrame"),patchTimer(e,"mozRequest","mozCancel","AnimationFrame"),patchTimer(e,"webkitRequest","webkitCancel","AnimationFrame")})),e.__load_patch("blocking",((e,t)=>{const n=["alert","prompt","confirm"];for(let o=0;o<n.length;o++)patchMethod(e,n[o],((n,o,r)=>function(o,s){return t.current.run(n,e,s,r)}))})),e.__load_patch("EventTarget",((e,t,n)=>{patchEvent(e,n),eventTargetPatch(e,n);const o=e.XMLHttpRequestEventTarget;o&&o.prototype&&n.patchEventTarget(e,n,[o.prototype])})),e.__load_patch("MutationObserver",((e,t,n)=>{patchClass("MutationObserver"),patchClass("WebKitMutationObserver")})),e.__load_patch("IntersectionObserver",((e,t,n)=>{patchClass("IntersectionObserver")})),e.__load_patch("FileReader",((e,t,n)=>{patchClass("FileReader")})),e.__load_patch("on_property",((e,t,n)=>{propertyDescriptorPatch(n,e)})),e.__load_patch("customElements",((e,t,n)=>{patchCustomElements(e,n)})),e.__load_patch("XHR",((e,t)=>{!function n(e){const n=e.XMLHttpRequest;if(!n)return;const l=n.prototype;let h=l[ZONE_SYMBOL_ADD_EVENT_LISTENER],u=l[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];if(!h){const t=e.XMLHttpRequestEventTarget;if(t){const e=t.prototype;h=e[ZONE_SYMBOL_ADD_EVENT_LISTENER],u=e[ZONE_SYMBOL_REMOVE_EVENT_LISTENER]}}const p="readystatechange",_="scheduled";function f(e){const n=e.data,r=n.target;r[a]=!1,r[c]=!1;const i=r[s];h||(h=r[ZONE_SYMBOL_ADD_EVENT_LISTENER],u=r[ZONE_SYMBOL_REMOVE_EVENT_LISTENER]),i&&u.call(r,p,i);const l=r[s]=()=>{if(r.readyState===r.DONE)if(!n.aborted&&r[a]&&e.state===_){const o=r[t.__symbol__("loadfalse")];if(0!==r.status&&o&&o.length>0){const s=e.invoke;e.invoke=function(){const o=r[t.__symbol__("loadfalse")];for(let t=0;t<o.length;t++)o[t]===e&&o.splice(t,1);n.aborted||e.state!==_||s.call(e)},o.push(e)}else e.invoke()}else n.aborted||!1!==r[a]||(r[c]=!0)};return h.call(r,p,l),r[o]||(r[o]=e),m.apply(r,n.args),r[a]=!0,e}function d(){}function E(e){const t=e.data;return t.aborted=!0,k.apply(t.target,t.args)}const g=patchMethod(l,"open",(()=>function(e,t){return e[r]=0==t[2],e[i]=t[1],g.apply(e,t)})),T=zoneSymbol("fetchTaskAborting"),y=zoneSymbol("fetchTaskScheduling"),m=patchMethod(l,"send",(()=>function(e,n){if(!0===t.current[y])return m.apply(e,n);if(e[r])return m.apply(e,n);{const t={target:e,url:e[i],isPeriodic:!1,args:n,aborted:!1},o=scheduleMacroTaskWithCurrentZone("XMLHttpRequest.send",d,t,f,E);e&&!0===e[c]&&!t.aborted&&o.state===_&&o.invoke()}})),k=patchMethod(l,"abort",(()=>function(e,n){const r=function s(e){return e[o]}(e);if(r&&"string"==typeof r.type){if(null==r.cancelFn||r.data&&r.data.aborted)return;r.zone.cancelTask(r)}else if(!0===t.current[T])return k.apply(e,n)}))}(e);const o=zoneSymbol("xhrTask"),r=zoneSymbol("xhrSync"),s=zoneSymbol("xhrListener"),a=zoneSymbol("xhrScheduled"),i=zoneSymbol("xhrURL"),c=zoneSymbol("xhrErrorBeforeScheduled")})),e.__load_patch("geolocation",(e=>{e.navigator&&e.navigator.geolocation&&patchPrototype(e.navigator.geolocation,["getCurrentPosition","watchPosition"])})),e.__load_patch("PromiseRejectionEvent",((e,t)=>{function n(t){return function(n){findEventTasks(e,t).forEach((o=>{const r=e.PromiseRejectionEvent;if(r){const e=new r(t,{promise:n.promise,reason:n.rejection});o.invoke(e)}}))}}e.PromiseRejectionEvent&&(t[zoneSymbol("unhandledPromiseRejectionHandler")]=n("unhandledrejection"),t[zoneSymbol("rejectionHandledHandler")]=n("rejectionhandled"))})),e.__load_patch("queueMicrotask",((e,t,n)=>{patchQueueMicrotask(e,n)}))}function patchPromise(e){e.__load_patch("ZoneAwarePromise",((e,t,n)=>{const o=Object.getOwnPropertyDescriptor,r=Object.defineProperty,s=n.symbol,a=[],i=!1!==e[s("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],c=s("Promise"),l=s("then"),h="__creationTrace__";n.onUnhandledError=e=>{if(n.showUncaughtError()){const t=e&&e.rejection;t?console.error("Unhandled Promise rejection:",t instanceof Error?t.message:t,"; Zone:",e.zone.name,"; Task:",e.task&&e.task.source,"; Value:",t,t instanceof Error?t.stack:void 0):console.error(e)}},n.microtaskDrainDone=()=>{for(;a.length;){const e=a.shift();try{e.zone.runGuarded((()=>{if(e.throwOriginal)throw e.rejection;throw e}))}catch(e){p(e)}}};const u=s("unhandledPromiseRejectionHandler");function p(e){n.onUnhandledError(e);try{const n=t[u];"function"==typeof n&&n.call(this,e)}catch(e){}}function _(e){return e&&e.then}function f(e){return e}function d(e){return j.reject(e)}const E=s("state"),g=s("value"),T=s("finally"),y=s("parentPromiseValue"),m=s("parentPromiseState"),k="Promise.then",b=null,S=!0,v=!1,O=0;function w(e,t){return n=>{try{N(e,t,n)}catch(t){N(e,!1,t)}}}const P=function(){let e=!1;return function t(n){return function(){e||(e=!0,n.apply(null,arguments))}}},D="Promise resolved with itself",Z=s("currentTaskTrace");function N(e,o,s){const c=P();if(e===s)throw new TypeError(D);if(e[E]===b){let l=null;try{"object"!=typeof s&&"function"!=typeof s||(l=s&&s.then)}catch(t){return c((()=>{N(e,!1,t)}))(),e}if(o!==v&&s instanceof j&&s.hasOwnProperty(E)&&s.hasOwnProperty(g)&&s[E]!==b)z(s),N(e,s[E],s[g]);else if(o!==v&&"function"==typeof l)try{l.call(s,c(w(e,o)),c(w(e,!1)))}catch(t){c((()=>{N(e,!1,t)}))()}else{e[E]=o;const c=e[g];if(e[g]=s,e[T]===T&&o===S&&(e[E]=e[m],e[g]=e[y]),o===v&&s instanceof Error){const e=t.currentTask&&t.currentTask.data&&t.currentTask.data[h];e&&r(s,Z,{configurable:!0,enumerable:!1,writable:!0,value:e})}for(let t=0;t<c.length;)I(e,c[t++],c[t++],c[t++],c[t++]);if(0==c.length&&o==v){e[E]=O;let o=s;try{throw new Error("Uncaught (in promise): "+function e(t){return t&&t.toString===Object.prototype.toString?(t.constructor&&t.constructor.name||"")+": "+JSON.stringify(t):t?t.toString():Object.prototype.toString.call(t)}(s)+(s&&s.stack?"\n"+s.stack:""))}catch(e){o=e}i&&(o.throwOriginal=!0),o.rejection=s,o.promise=e,o.zone=t.current,o.task=t.currentTask,a.push(o),n.scheduleMicroTask()}}}return e}const R=s("rejectionHandledHandler");function z(e){if(e[E]===O){try{const n=t[R];n&&"function"==typeof n&&n.call(this,{rejection:e[g],promise:e})}catch(e){}e[E]=v;for(let t=0;t<a.length;t++)e===a[t].promise&&a.splice(t,1)}}function I(e,t,n,o,r){z(e);const s=e[E],a=s?"function"==typeof o?o:f:"function"==typeof r?r:d;t.scheduleMicroTask(k,(()=>{try{const o=e[g],r=!!n&&T===n[T];r&&(n[y]=o,n[m]=s);const i=t.run(a,void 0,r&&a!==d&&a!==f?[]:[o]);N(n,!0,i)}catch(e){N(n,!1,e)}}),n)}const C=function(){},M=e.AggregateError;class j{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(e){return e instanceof j?e:N(new this(null),S,e)}static reject(e){return N(new this(null),v,e)}static withResolvers(){const e={};return e.promise=new j(((t,n)=>{e.resolve=t,e.reject=n})),e}static any(e){if(!e||"function"!=typeof e[Symbol.iterator])return Promise.reject(new M([],"All promises were rejected"));const t=[];let n=0;try{for(let o of e)n++,t.push(j.resolve(o))}catch(e){return Promise.reject(new M([],"All promises were rejected"))}if(0===n)return Promise.reject(new M([],"All promises were rejected"));let o=!1;const r=[];return new j(((e,s)=>{for(let a=0;a<t.length;a++)t[a].then((t=>{o||(o=!0,e(t))}),(e=>{r.push(e),n--,0===n&&(o=!0,s(new M(r,"All promises were rejected")))}))}))}static race(e){let t,n,o=new this(((e,o)=>{t=e,n=o}));function r(e){t(e)}function s(e){n(e)}for(let t of e)_(t)||(t=this.resolve(t)),t.then(r,s);return o}static all(e){return j.allWithCallback(e)}static allSettled(e){return(this&&this.prototype instanceof j?this:j).allWithCallback(e,{thenCallback:e=>({status:"fulfilled",value:e}),errorCallback:e=>({status:"rejected",reason:e})})}static allWithCallback(e,t){let n,o,r=new this(((e,t)=>{n=e,o=t})),s=2,a=0;const i=[];for(let r of e){_(r)||(r=this.resolve(r));const e=a;try{r.then((o=>{i[e]=t?t.thenCallback(o):o,s--,0===s&&n(i)}),(r=>{t?(i[e]=t.errorCallback(r),s--,0===s&&n(i)):o(r)}))}catch(e){o(e)}s++,a++}return s-=2,0===s&&n(i),r}constructor(e){const t=this;if(!(t instanceof j))throw new Error("Must be an instanceof Promise.");t[E]=b,t[g]=[];try{const n=P();e&&e(n(w(t,S)),n(w(t,v)))}catch(e){N(t,!1,e)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return j}then(e,n){let o=this.constructor?.[Symbol.species];o&&"function"==typeof o||(o=this.constructor||j);const r=new o(C),s=t.current;return this[E]==b?this[g].push(s,r,e,n):I(this,s,r,e,n),r}catch(e){return this.then(null,e)}finally(e){let n=this.constructor?.[Symbol.species];n&&"function"==typeof n||(n=j);const o=new n(C);o[T]=T;const r=t.current;return this[E]==b?this[g].push(r,o,e,e):I(this,r,o,e,e),o}}j.resolve=j.resolve,j.reject=j.reject,j.race=j.race,j.all=j.all;const A=e[c]=e.Promise;e.Promise=j;const L=s("thenPatched");function F(e){const t=e.prototype,n=o(t,"then");if(n&&(!1===n.writable||!n.configurable))return;const r=t.then;t[l]=r,e.prototype.then=function(e,t){return new j(((e,t)=>{r.call(this,e,t)})).then(e,t)},e[L]=!0}return n.patchThen=F,A&&(F(A),patchMethod(e,"fetch",(e=>function t(e){return function(t,n){let o=e.apply(t,n);if(o instanceof j)return o;let r=o.constructor;return r[L]||F(r),o}}(e)))),Promise[t.__symbol__("uncaughtPromiseErrors")]=a,j}))}function patchToString(e){e.__load_patch("toString",(e=>{const t=Function.prototype.toString,n=zoneSymbol("OriginalDelegate"),o=zoneSymbol("Promise"),r=zoneSymbol("Error"),s=function s(){if("function"==typeof this){const s=this[n];if(s)return"function"==typeof s?t.call(s):Object.prototype.toString.call(s);if(this===Promise){const n=e[o];if(n)return t.call(n)}if(this===Error){const n=e[r];if(n)return t.call(n)}}return t.call(this)};s[n]=t,Function.prototype.toString=s;const a=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":a.call(this)}}))}function patchCallbacks(e,t,n,o,r){const s=Zone.__symbol__(o);if(t[s])return;const a=t[s]=t[o];t[o]=function(s,i,c){return i&&i.prototype&&r.forEach((function(t){const r=`${n}.${o}::`+t,s=i.prototype;try{if(s.hasOwnProperty(t)){const n=e.ObjectGetOwnPropertyDescriptor(s,t);n&&n.value?(n.value=e.wrapWithCurrentZone(n.value,r),e._redefineProperty(i.prototype,t,n)):s[t]&&(s[t]=e.wrapWithCurrentZone(s[t],r))}else s[t]&&(s[t]=e.wrapWithCurrentZone(s[t],r))}catch{}})),a.call(t,s,i,c)},e.attachOriginToPatched(t[o],a)}function patchUtil(e){e.__load_patch("util",((e,t,n)=>{const o=getOnEventNames(e);n.patchOnProperties=patchOnProperties,n.patchMethod=patchMethod,n.bindArguments=bindArguments,n.patchMacroTask=patchMacroTask;const r=t.__symbol__("BLACK_LISTED_EVENTS"),s=t.__symbol__("UNPATCHED_EVENTS");e[s]&&(e[r]=e[s]),e[r]&&(t[r]=t[s]=e[r]),n.patchEventPrototype=patchEventPrototype,n.patchEventTarget=patchEventTarget,n.isIEOrEdge=isIEOrEdge,n.ObjectDefineProperty=ObjectDefineProperty,n.ObjectGetOwnPropertyDescriptor=ObjectGetOwnPropertyDescriptor,n.ObjectCreate=ObjectCreate,n.ArraySlice=ArraySlice,n.patchClass=patchClass,n.wrapWithCurrentZone=wrapWithCurrentZone,n.filterProperties=filterProperties,n.attachOriginToPatched=attachOriginToPatched,n._redefineProperty=Object.defineProperty,n.patchCallbacks=patchCallbacks,n.getGlobalObjects=()=>({globalSources:globalSources,zoneSymbolEventNames:zoneSymbolEventNames,eventNames:o,isBrowser:isBrowser,isMix:isMix,isNode:isNode,TRUE_STR:TRUE_STR,FALSE_STR:FALSE_STR,ZONE_SYMBOL_PREFIX:ZONE_SYMBOL_PREFIX,ADD_EVENT_LISTENER_STR:ADD_EVENT_LISTENER_STR,REMOVE_EVENT_LISTENER_STR:REMOVE_EVENT_LISTENER_STR})}))}function patchCommon(e){patchPromise(e),patchToString(e),patchUtil(e)}const Zone$1=loadZone();patchCommon(Zone$1),patchBrowser(Zone$1);
{
"name": "zone.js",
"version": "0.14.4",
"version": "0.14.5",
"description": "Zones for JavaScript",

@@ -16,4 +16,4 @@ "main": "./bundles/zone.umd.js",

"@types/node": "^10.9.4",
"domino": "https://github.com/angular/domino.git#9e7881d2ac1e5977cefbc557f935931ec23f6658",
"google-closure-compiler": "^20230802.0.0",
"domino": "https://github.com/angular/domino.git#8f228f8862540c6ccd14f76b5a1d9bb5458618af",
"google-closure-compiler": "^20240317.0.0",
"jest": "^29.0",

@@ -20,0 +20,0 @@ "jest-environment-jsdom": "^29.0.3",

@@ -1,1498 +0,3 @@

/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Suppress closure compiler errors about unknown 'global' variable
* @fileoverview
* @suppress {undefinedVars}
*/
declare global {
/**
* Zone is a mechanism for intercepting and keeping track of asynchronous work.
*
* A Zone is a global object which is configured with rules about how to intercept and keep track
* of the asynchronous callbacks. Zone has these responsibilities:
*
* 1. Intercept asynchronous task scheduling
* 2. Wrap callbacks for error-handling and zone tracking across async operations.
* 3. Provide a way to attach data to zones
* 4. Provide a context specific last frame error handling
* 5. (Intercept blocking methods)
*
* A zone by itself does not do anything, instead it relies on some other code to route existing
* platform API through it. (The zone library ships with code which monkey patches all of the
* browsers's asynchronous API and redirects them through the zone for interception.)
*
* In its simplest form a zone allows one to intercept the scheduling and calling of asynchronous
* operations, and execute additional code before as well as after the asynchronous task. The
* rules of interception are configured using [ZoneConfig]. There can be many different zone
* instances in a system, but only one zone is active at any given time which can be retrieved
* using [Zone#current].
*
*
*
* ## Callback Wrapping
*
* An important aspect of the zones is that they should persist across asynchronous operations. To
* achieve this, when a future work is scheduled through async API, it is necessary to capture,
* and subsequently restore the current zone. For example if a code is running in zone `b` and it
* invokes `setTimeout` to scheduleTask work later, the `setTimeout` method needs to 1) capture
* the current zone and 2) wrap the `wrapCallback` in code which will restore the current zone `b`
* once the wrapCallback executes. In this way the rules which govern the current code are
* preserved in all future asynchronous tasks. There could be a different zone `c` which has
* different rules and is associated with different asynchronous tasks. As these tasks are
* processed, each asynchronous wrapCallback correctly restores the correct zone, as well as
* preserves the zone for future asynchronous callbacks.
*
* Example: Suppose a browser page consist of application code as well as third-party
* advertisement code. (These two code bases are independent, developed by different mutually
* unaware developers.) The application code may be interested in doing global error handling and
* so it configures the `app` zone to send all of the errors to the server for analysis, and then
* executes the application in the `app` zone. The advertising code is interested in the same
* error processing but it needs to send the errors to a different third-party. So it creates the
* `ads` zone with a different error handler. Now both advertising as well as application code
* create many asynchronous operations, but the [Zone] will ensure that all of the asynchronous
* operations created from the application code will execute in `app` zone with its error
* handler and all of the advertisement code will execute in the `ads` zone with its error
* handler. This will not only work for the async operations created directly, but also for all
* subsequent asynchronous operations.
*
* If you think of chain of asynchronous operations as a thread of execution (bit of a stretch)
* then [Zone#current] will act as a thread local variable.
*
*
*
* ## Asynchronous operation scheduling
*
* In addition to wrapping the callbacks to restore the zone, all operations which cause a
* scheduling of work for later are routed through the current zone which is allowed to intercept
* them by adding work before or after the wrapCallback as well as using different means of
* achieving the request. (Useful for unit testing, or tracking of requests). In some instances
* such as `setTimeout` the wrapping of the wrapCallback and scheduling is done in the same
* wrapCallback, but there are other examples such as `Promises` where the `then` wrapCallback is
* wrapped, but the execution of `then` is triggered by `Promise` scheduling `resolve` work.
*
* Fundamentally there are three kinds of tasks which can be scheduled:
*
* 1. [MicroTask] used for doing work right after the current task. This is non-cancelable which
* is guaranteed to run exactly once and immediately.
* 2. [MacroTask] used for doing work later. Such as `setTimeout`. This is typically cancelable
* which is guaranteed to execute at least once after some well understood delay.
* 3. [EventTask] used for listening on some future event. This may execute zero or more times,
* with an unknown delay.
*
* Each asynchronous API is modeled and routed through one of these APIs.
*
*
* ### [MicroTask]
*
* [MicroTask]s represent work which will be done in current VM turn as soon as possible, before
* VM yielding.
*
*
* ### [MacroTask]
*
* [MacroTask]s represent work which will be done after some delay. (Sometimes the delay is
* approximate such as on next available animation frame). Typically these methods include:
* `setTimeout`, `setImmediate`, `setInterval`, `requestAnimationFrame`, and all browser specific
* variants.
*
*
* ### [EventTask]
*
* [EventTask]s represent a request to create a listener on an event. Unlike the other task
* events they may never be executed, but typically execute more than once. There is no queue of
* events, rather their callbacks are unpredictable both in order and time.
*
*
* ## Global Error Handling
*
*
* ## Composability
*
* Zones can be composed together through [Zone.fork()]. A child zone may create its own set of
* rules. A child zone is expected to either:
*
* 1. Delegate the interception to a parent zone, and optionally add before and after wrapCallback
* hooks.
* 2. Process the request itself without delegation.
*
* Composability allows zones to keep their concerns clean. For example a top most zone may choose
* to handle error handling, while child zones may choose to do user action tracking.
*
*
* ## Root Zone
*
* At the start the browser will run in a special root zone, which is configured to behave exactly
* like the platform, making any existing code which is not zone-aware behave as expected. All
* zones are children of the root zone.
*
*/
interface Zone {
/**
*
* @returns {Zone} The parent Zone.
*/
parent: Zone | null;
/**
* @returns {string} The Zone name (useful for debugging)
*/
name: string;
/**
* Returns a value associated with the `key`.
*
* If the current zone does not have a key, the request is delegated to the parent zone. Use
* [ZoneSpec.properties] to configure the set of properties associated with the current zone.
*
* @param key The key to retrieve.
* @returns {any} The value for the key, or `undefined` if not found.
*/
get(key: string): any;
/**
* Returns a Zone which defines a `key`.
*
* Recursively search the parent Zone until a Zone which has a property `key` is found.
*
* @param key The key to use for identification of the returned zone.
* @returns {Zone} The Zone which defines the `key`, `null` if not found.
*/
getZoneWith(key: string): Zone | null;
/**
* Used to create a child zone.
*
* @param zoneSpec A set of rules which the child zone should follow.
* @returns {Zone} A new child zone.
*/
fork(zoneSpec: ZoneSpec): Zone;
/**
* Wraps a callback function in a new function which will properly restore the current zone upon
* invocation.
*
* The wrapped function will properly forward `this` as well as `arguments` to the `callback`.
*
* Before the function is wrapped the zone can intercept the `callback` by declaring
* [ZoneSpec.onIntercept].
*
* @param callback the function which will be wrapped in the zone.
* @param source A unique debug location of the API being wrapped.
* @returns {function(): *} A function which will invoke the `callback` through
* [Zone.runGuarded].
*/
wrap<F extends Function>(callback: F, source: string): F;
/**
* Invokes a function in a given zone.
*
* The invocation of `callback` can be intercepted by declaring [ZoneSpec.onInvoke].
*
* @param callback The function to invoke.
* @param applyThis
* @param applyArgs
* @param source A unique debug location of the API being invoked.
* @returns {any} Value from the `callback` function.
*/
run<T>(callback: Function, applyThis?: any, applyArgs?: any[], source?: string): T;
/**
* Invokes a function in a given zone and catches any exceptions.
*
* Any exceptions thrown will be forwarded to [Zone.HandleError].
*
* The invocation of `callback` can be intercepted by declaring [ZoneSpec.onInvoke]. The
* handling of exceptions can be intercepted by declaring [ZoneSpec.handleError].
*
* @param callback The function to invoke.
* @param applyThis
* @param applyArgs
* @param source A unique debug location of the API being invoked.
* @returns {any} Value from the `callback` function.
*/
runGuarded<T>(callback: Function, applyThis?: any, applyArgs?: any[], source?: string): T;
/**
* Execute the Task by restoring the [Zone.currentTask] in the Task's zone.
*
* @param task to run
* @param applyThis
* @param applyArgs
* @returns {any} Value from the `task.callback` function.
*/
runTask<T>(task: Task, applyThis?: any, applyArgs?: any): T;
/**
* Schedule a MicroTask.
*
* @param source
* @param callback
* @param data
* @param customSchedule
*/
scheduleMicroTask(source: string, callback: Function, data?: TaskData, customSchedule?: (task: Task) => void): MicroTask;
/**
* Schedule a MacroTask.
*
* @param source
* @param callback
* @param data
* @param customSchedule
* @param customCancel
*/
scheduleMacroTask(source: string, callback: Function, data?: TaskData, customSchedule?: (task: Task) => void, customCancel?: (task: Task) => void): MacroTask;
/**
* Schedule an EventTask.
*
* @param source
* @param callback
* @param data
* @param customSchedule
* @param customCancel
*/
scheduleEventTask(source: string, callback: Function, data?: TaskData, customSchedule?: (task: Task) => void, customCancel?: (task: Task) => void): EventTask;
/**
* Schedule an existing Task.
*
* Useful for rescheduling a task which was already canceled.
*
* @param task
*/
scheduleTask<T extends Task>(task: T): T;
/**
* Allows the zone to intercept canceling of scheduled Task.
*
* The interception is configured using [ZoneSpec.onCancelTask]. The default canceler invokes
* the [Task.cancelFn].
*
* @param task
* @returns {any}
*/
cancelTask(task: Task): any;
}
interface ZoneType {
/**
* @returns {Zone} Returns the current [Zone]. The only way to change
* the current zone is by invoking a run() method, which will update the current zone for the
* duration of the run method callback.
*/
current: Zone;
/**
* @returns {Task} The task associated with the current execution.
*/
currentTask: Task | null;
/**
* Verify that Zone has been correctly patched. Specifically that Promise is zone aware.
*/
assertZonePatched(): void;
/**
* Return the root zone.
*/
root: Zone;
/**
* load patch for specified native module, allow user to
* define their own patch, user can use this API after loading zone.js
*/
__load_patch(name: string, fn: _PatchFn, ignoreDuplicate?: boolean): void;
/**
* Zone symbol API to generate a string with __zone_symbol__ prefix
*/
__symbol__(name: string): string;
}
/**
* Patch Function to allow user define their own monkey patch module.
*/
type _PatchFn = (global: Window, Zone: ZoneType, api: _ZonePrivate) => void;
/**
* _ZonePrivate interface to provide helper method to help user implement
* their own monkey patch module.
*/
interface _ZonePrivate {
currentZoneFrame: () => _ZoneFrame;
symbol: (name: string) => string;
scheduleMicroTask: (task?: MicroTask) => void;
onUnhandledError: (error: Error) => void;
microtaskDrainDone: () => void;
showUncaughtError: () => boolean;
patchEventTarget: (global: any, api: _ZonePrivate, apis: any[], options?: any) => boolean[];
patchOnProperties: (obj: any, properties: string[] | null, prototype?: any) => void;
patchThen: (ctro: Function) => void;
patchMethod: (target: any, name: string, patchFn: (delegate: Function, delegateName: string, name: string) => (self: any, args: any[]) => any) => Function | null;
bindArguments: (args: any[], source: string) => any[];
patchMacroTask: (obj: any, funcName: string, metaCreator: (self: any, args: any[]) => any) => void;
patchEventPrototype: (_global: any, api: _ZonePrivate) => void;
isIEOrEdge: () => boolean;
ObjectDefineProperty: (o: any, p: PropertyKey, attributes: PropertyDescriptor & ThisType<any>) => any;
ObjectGetOwnPropertyDescriptor: (o: any, p: PropertyKey) => PropertyDescriptor | undefined;
ObjectCreate(o: object | null, properties?: PropertyDescriptorMap & ThisType<any>): any;
ArraySlice(start?: number, end?: number): any[];
patchClass: (className: string) => void;
wrapWithCurrentZone: (callback: any, source: string) => any;
filterProperties: (target: any, onProperties: string[], ignoreProperties: any[]) => string[];
attachOriginToPatched: (target: any, origin: any) => void;
_redefineProperty: (target: any, callback: string, desc: any) => void;
nativeScheduleMicroTask: (func: Function) => void;
patchCallbacks: (api: _ZonePrivate, target: any, targetName: string, method: string, callbacks: string[]) => void;
getGlobalObjects: () => {
globalSources: any;
zoneSymbolEventNames: any;
eventNames: string[];
isBrowser: boolean;
isMix: boolean;
isNode: boolean;
TRUE_STR: string;
FALSE_STR: string;
ZONE_SYMBOL_PREFIX: string;
ADD_EVENT_LISTENER_STR: string;
REMOVE_EVENT_LISTENER_STR: string;
} | undefined;
}
/**
* _ZoneFrame represents zone stack frame information
*/
interface _ZoneFrame {
parent: _ZoneFrame | null;
zone: Zone;
}
interface UncaughtPromiseError extends Error {
zone: Zone;
task: Task;
promise: Promise<any>;
rejection: any;
throwOriginal?: boolean;
}
/**
* Provides a way to configure the interception of zone events.
*
* Only the `name` property is required (all other are optional).
*/
interface ZoneSpec {
/**
* The name of the zone. Useful when debugging Zones.
*/
name: string;
/**
* A set of properties to be associated with Zone. Use [Zone.get] to retrieve them.
*/
properties?: {
[key: string]: any;
};
/**
* Allows the interception of zone forking.
*
* When the zone is being forked, the request is forwarded to this method for interception.
*
* @param parentZoneDelegate Delegate which performs the parent [ZoneSpec] operation.
* @param currentZone The current [Zone] where the current interceptor has been declared.
* @param targetZone The [Zone] which originally received the request.
* @param zoneSpec The argument passed into the `fork` method.
*/
onFork?: (parentZoneDelegate: ZoneDelegate, currentZone: Zone, targetZone: Zone, zoneSpec: ZoneSpec) => Zone;
/**
* Allows interception of the wrapping of the callback.
*
* @param parentZoneDelegate Delegate which performs the parent [ZoneSpec] operation.
* @param currentZone The current [Zone] where the current interceptor has been declared.
* @param targetZone The [Zone] which originally received the request.
* @param delegate The argument passed into the `wrap` method.
* @param source The argument passed into the `wrap` method.
*/
onIntercept?: (parentZoneDelegate: ZoneDelegate, currentZone: Zone, targetZone: Zone, delegate: Function, source: string) => Function;
/**
* Allows interception of the callback invocation.
*
* @param parentZoneDelegate Delegate which performs the parent [ZoneSpec] operation.
* @param currentZone The current [Zone] where the current interceptor has been declared.
* @param targetZone The [Zone] which originally received the request.
* @param delegate The argument passed into the `run` method.
* @param applyThis The argument passed into the `run` method.
* @param applyArgs The argument passed into the `run` method.
* @param source The argument passed into the `run` method.
*/
onInvoke?: (parentZoneDelegate: ZoneDelegate, currentZone: Zone, targetZone: Zone, delegate: Function, applyThis: any, applyArgs?: any[], source?: string) => any;
/**
* Allows interception of the error handling.
*
* @param parentZoneDelegate Delegate which performs the parent [ZoneSpec] operation.
* @param currentZone The current [Zone] where the current interceptor has been declared.
* @param targetZone The [Zone] which originally received the request.
* @param error The argument passed into the `handleError` method.
*/
onHandleError?: (parentZoneDelegate: ZoneDelegate, currentZone: Zone, targetZone: Zone, error: any) => boolean;
/**
* Allows interception of task scheduling.
*
* @param parentZoneDelegate Delegate which performs the parent [ZoneSpec] operation.
* @param currentZone The current [Zone] where the current interceptor has been declared.
* @param targetZone The [Zone] which originally received the request.
* @param task The argument passed into the `scheduleTask` method.
*/
onScheduleTask?: (parentZoneDelegate: ZoneDelegate, currentZone: Zone, targetZone: Zone, task: Task) => Task;
onInvokeTask?: (parentZoneDelegate: ZoneDelegate, currentZone: Zone, targetZone: Zone, task: Task, applyThis: any, applyArgs?: any[]) => any;
/**
* Allows interception of task cancellation.
*
* @param parentZoneDelegate Delegate which performs the parent [ZoneSpec] operation.
* @param currentZone The current [Zone] where the current interceptor has been declared.
* @param targetZone The [Zone] which originally received the request.
* @param task The argument passed into the `cancelTask` method.
*/
onCancelTask?: (parentZoneDelegate: ZoneDelegate, currentZone: Zone, targetZone: Zone, task: Task) => any;
/**
* Notifies of changes to the task queue empty status.
*
* @param parentZoneDelegate Delegate which performs the parent [ZoneSpec] operation.
* @param currentZone The current [Zone] where the current interceptor has been declared.
* @param targetZone The [Zone] which originally received the request.
* @param hasTaskState
*/
onHasTask?: (parentZoneDelegate: ZoneDelegate, currentZone: Zone, targetZone: Zone, hasTaskState: HasTaskState) => void;
}
/**
* A delegate when intercepting zone operations.
*
* A ZoneDelegate is needed because a child zone can't simply invoke a method on a parent zone.
* For example a child zone wrap can't just call parent zone wrap. Doing so would create a
* callback which is bound to the parent zone. What we are interested in is intercepting the
* callback before it is bound to any zone. Furthermore, we also need to pass the targetZone (zone
* which received the original request) to the delegate.
*
* The ZoneDelegate methods mirror those of Zone with an addition of extra targetZone argument in
* the method signature. (The original Zone which received the request.) Some methods are renamed
* to prevent confusion, because they have slightly different semantics and arguments.
*
* - `wrap` => `intercept`: The `wrap` method delegates to `intercept`. The `wrap` method returns
* a callback which will run in a given zone, where as intercept allows wrapping the callback
* so that additional code can be run before and after, but does not associate the callback
* with the zone.
* - `run` => `invoke`: The `run` method delegates to `invoke` to perform the actual execution of
* the callback. The `run` method switches to new zone; saves and restores the `Zone.current`;
* and optionally performs error handling. The invoke is not responsible for error handling,
* or zone management.
*
* Not every method is usually overwritten in the child zone, for this reason the ZoneDelegate
* stores the closest zone which overwrites this behavior along with the closest ZoneSpec.
*
* NOTE: We have tried to make this API analogous to Event bubbling with target and current
* properties.
*
* Note: The ZoneDelegate treats ZoneSpec as class. This allows the ZoneSpec to use its `this` to
* store internal state.
*/
interface ZoneDelegate {
zone: Zone;
fork(targetZone: Zone, zoneSpec: ZoneSpec): Zone;
intercept(targetZone: Zone, callback: Function, source: string): Function;
invoke(targetZone: Zone, callback: Function, applyThis?: any, applyArgs?: any[], source?: string): any;
handleError(targetZone: Zone, error: any): boolean;
scheduleTask(targetZone: Zone, task: Task): Task;
invokeTask(targetZone: Zone, task: Task, applyThis?: any, applyArgs?: any[]): any;
cancelTask(targetZone: Zone, task: Task): any;
hasTask(targetZone: Zone, isEmpty: HasTaskState): void;
}
type HasTaskState = {
microTask: boolean;
macroTask: boolean;
eventTask: boolean;
change: TaskType;
};
/**
* Task type: `microTask`, `macroTask`, `eventTask`.
*/
type TaskType = 'microTask' | 'macroTask' | 'eventTask';
/**
* Task type: `notScheduled`, `scheduling`, `scheduled`, `running`, `canceling`, 'unknown'.
*/
type TaskState = 'notScheduled' | 'scheduling' | 'scheduled' | 'running' | 'canceling' | 'unknown';
/**
*/
interface TaskData {
/**
* A periodic [MacroTask] is such which get automatically rescheduled after it is executed.
*/
isPeriodic?: boolean;
/**
* Delay in milliseconds when the Task will run.
*/
delay?: number;
/**
* identifier returned by the native setTimeout.
*/
handleId?: number;
}
/**
* Represents work which is executed with a clean stack.
*
* Tasks are used in Zones to mark work which is performed on clean stack frame. There are three
* kinds of task. [MicroTask], [MacroTask], and [EventTask].
*
* A JS VM can be modeled as a [MicroTask] queue, [MacroTask] queue, and [EventTask] set.
*
* - [MicroTask] queue represents a set of tasks which are executing right after the current stack
* frame becomes clean and before a VM yield. All [MicroTask]s execute in order of insertion
* before VM yield and the next [MacroTask] is executed.
* - [MacroTask] queue represents a set of tasks which are executed one at a time after each VM
* yield. The queue is ordered by time, and insertions can happen in any location.
* - [EventTask] is a set of tasks which can at any time be inserted to the end of the [MacroTask]
* queue. This happens when the event fires.
*
*/
interface Task {
/**
* Task type: `microTask`, `macroTask`, `eventTask`.
*/
type: TaskType;
/**
* Task state: `notScheduled`, `scheduling`, `scheduled`, `running`, `canceling`, `unknown`.
*/
state: TaskState;
/**
* Debug string representing the API which requested the scheduling of the task.
*/
source: string;
/**
* The Function to be used by the VM upon entering the [Task]. This function will delegate to
* [Zone.runTask] and delegate to `callback`.
*/
invoke: Function;
/**
* Function which needs to be executed by the Task after the [Zone.currentTask] has been set to
* the current task.
*/
callback: Function;
/**
* Task specific options associated with the current task. This is passed to the `scheduleFn`.
*/
data?: TaskData;
/**
* Represents the default work which needs to be done to schedule the Task by the VM.
*
* A zone may choose to intercept this function and perform its own scheduling.
*/
scheduleFn?: (task: Task) => void;
/**
* Represents the default work which needs to be done to un-schedule the Task from the VM. Not
* all Tasks are cancelable, and therefore this method is optional.
*
* A zone may chose to intercept this function and perform its own un-scheduling.
*/
cancelFn?: (task: Task) => void;
/**
* @type {Zone} The zone which will be used to invoke the `callback`. The Zone is captured
* at the time of Task creation.
*/
readonly zone: Zone;
/**
* Number of times the task has been executed, or -1 if canceled.
*/
runCount: number;
/**
* Cancel the scheduling request. This method can be called from `ZoneSpec.onScheduleTask` to
* cancel the current scheduling interception. Once canceled the task can be discarded or
* rescheduled using `Zone.scheduleTask` on a different zone.
*/
cancelScheduleRequest(): void;
}
interface MicroTask extends Task {
type: 'microTask';
}
interface MacroTask extends Task {
type: 'macroTask';
}
interface EventTask extends Task {
type: 'eventTask';
}
const Zone: ZoneType;
}
export {};
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
declare global {
/**
* Additional `EventTarget` methods added by `Zone.js`.
*
* 1. removeAllListeners, remove all event listeners of the given event name.
* 2. eventListeners, get all event listeners of the given event name.
*/
interface EventTarget {
/**
*
* Remove all event listeners by name for this event target.
*
* This method is optional because it may not be available if you use `noop zone` when
* bootstrapping Angular application or disable the `EventTarget` monkey patch by `zone.js`.
*
* If the `eventName` is provided, will remove event listeners of that name.
* If the `eventName` is not provided, will remove all event listeners associated with
* `EventTarget`.
*
* @param eventName the name of the event, such as `click`. This parameter is optional.
*/
removeAllListeners?(eventName?: string): void;
/**
*
* Retrieve all event listeners by name.
*
* This method is optional because it may not be available if you use `noop zone` when
* bootstrapping Angular application or disable the `EventTarget` monkey patch by `zone.js`.
*
* If the `eventName` is provided, will return an array of event handlers or event listener
* objects of the given event.
* If the `eventName` is not provided, will return all listeners.
*
* @param eventName the name of the event, such as click. This parameter is optional.
*/
eventListeners?(eventName?: string): EventListenerOrEventListenerObject[];
}
}
export {};
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
declare global {
/**
* Interface of `zone.js` configurations.
*
* You can define the following configurations on the `window/global` object before
* importing `zone.js` to change `zone.js` default behaviors.
*/
interface ZoneGlobalConfigurations {
/**
* Disable the monkey patch of the `Node.js` `EventEmitter` API.
*
* By default, `zone.js` monkey patches the `Node.js` `EventEmitter` APIs to make asynchronous
* callbacks of those APIs in the same zone when scheduled.
*
* Consider the following example:
*
* ```
* const EventEmitter = require('events');
* class MyEmitter extends EventEmitter {}
* const myEmitter = new MyEmitter();
*
* const zone = Zone.current.fork({name: 'myZone'});
* zone.run(() => {
* myEmitter.on('event', () => {
* console.log('an event occurs in the zone', Zone.current.name);
* // the callback runs in the zone when it is scheduled,
* // so the output is 'an event occurs in the zone myZone'.
* });
* });
* myEmitter.emit('event');
* ```
*
* If you set `__Zone_disable_EventEmitter = true` before importing `zone.js`,
* `zone.js` does not monkey patch the `EventEmitter` APIs and the above code
* outputs 'an event occurred <root>'.
*/
__Zone_disable_EventEmitter?: boolean;
/**
* Disable the monkey patch of the `Node.js` `fs` API.
*
* By default, `zone.js` monkey patches `Node.js` `fs` APIs to make asynchronous callbacks of
* those APIs in the same zone when scheduled.
*
* Consider the following example:
*
* ```
* const fs = require('fs');
*
* const zone = Zone.current.fork({name: 'myZone'});
* zone.run(() => {
* fs.stat('/tmp/world', (err, stats) => {
* console.log('fs.stats() callback is invoked in the zone', Zone.current.name);
* // since the callback of the `fs.stat()` runs in the same zone
* // when it is called, so the output is 'fs.stats() callback is invoked in the zone
* myZone'.
* });
* });
* ```
*
* If you set `__Zone_disable_fs = true` before importing `zone.js`,
* `zone.js` does not monkey patch the `fs` API and the above code
* outputs 'get stats occurred <root>'.
*/
__Zone_disable_fs?: boolean;
/**
* Disable the monkey patch of the `Node.js` `timer` API.
*
* By default, `zone.js` monkey patches the `Node.js` `timer` APIs to make asynchronous
* callbacks of those APIs in the same zone when scheduled.
*
* Consider the following example:
*
* ```
* const zone = Zone.current.fork({name: 'myZone'});
* zone.run(() => {
* setTimeout(() => {
* console.log('setTimeout() callback is invoked in the zone', Zone.current.name);
* // since the callback of `setTimeout()` runs in the same zone
* // when it is scheduled, so the output is 'setTimeout() callback is invoked in the zone
* // myZone'.
* });
* });
* ```
*
* If you set `__Zone_disable_timers = true` before importing `zone.js`,
* `zone.js` does not monkey patch the `timer` APIs and the above code
* outputs 'timeout <root>'.
*/
__Zone_disable_node_timers?: boolean;
/**
* Disable the monkey patch of the `Node.js` `process.nextTick()` API.
*
* By default, `zone.js` monkey patches the `Node.js` `process.nextTick()` API to make the
* callback in the same zone when calling `process.nextTick()`.
*
* Consider the following example:
*
* ```
* const zone = Zone.current.fork({name: 'myZone'});
* zone.run(() => {
* process.nextTick(() => {
* console.log('process.nextTick() callback is invoked in the zone', Zone.current.name);
* // since the callback of `process.nextTick()` runs in the same zone
* // when it is scheduled, so the output is 'process.nextTick() callback is invoked in the
* // zone myZone'.
* });
* });
* ```
*
* If you set `__Zone_disable_nextTick = true` before importing `zone.js`,
* `zone.js` does not monkey patch the `process.nextTick()` API and the above code
* outputs 'nextTick <root>'.
*/
__Zone_disable_nextTick?: boolean;
/**
* Disable the monkey patch of the `Node.js` `crypto` API.
*
* By default, `zone.js` monkey patches the `Node.js` `crypto` APIs to make asynchronous
* callbacks of those APIs in the same zone when called.
*
* Consider the following example:
*
* ```
* const crypto = require('crypto');
*
* const zone = Zone.current.fork({name: 'myZone'});
* zone.run(() => {
* crypto.randomBytes(() => {
* console.log('crypto.randomBytes() callback is invoked in the zone', Zone.current.name);
* // since the callback of `crypto.randomBytes()` runs in the same zone
* // when it is called, so the output is 'crypto.randomBytes() callback is invoked in the
* // zone myZone'.
* });
* });
* ```
*
* If you set `__Zone_disable_crypto = true` before importing `zone.js`,
* `zone.js` does not monkey patch the `crypto` API and the above code
* outputs 'crypto <root>'.
*/
__Zone_disable_crypto?: boolean;
/**
* Disable the monkey patch of the `Object.defineProperty()` API.
*
* Note: This configuration is available only in the legacy bundle (dist/zone.js). This module
* is not available in the evergreen bundle (zone-evergreen.js).
*
* In the legacy browser, the default behavior of `zone.js` is to monkey patch
* `Object.defineProperty()` and `Object.create()` to try to ensure PropertyDescriptor
* parameter's configurable property to be true. This patch is only needed in some old mobile
* browsers.
*
* If you set `__Zone_disable_defineProperty = true` before importing `zone.js`,
* `zone.js` does not monkey patch the `Object.defineProperty()` API and does not
* modify desc.configurable to true.
*
*/
__Zone_disable_defineProperty?: boolean;
/**
* Disable the monkey patch of the browser `registerElement()` API.
*
* NOTE: This configuration is only available in the legacy bundle (dist/zone.js), this
* module is not available in the evergreen bundle (zone-evergreen.js).
*
* In the legacy browser, the default behavior of `zone.js` is to monkey patch the
* `registerElement()` API to make asynchronous callbacks of the API in the same zone when
* `registerElement()` is called.
*
* Consider the following example:
*
* ```
* const proto = Object.create(HTMLElement.prototype);
* proto.createdCallback = function() {
* console.log('createdCallback is invoked in the zone', Zone.current.name);
* };
* proto.attachedCallback = function() {
* console.log('attachedCallback is invoked in the zone', Zone.current.name);
* };
* proto.detachedCallback = function() {
* console.log('detachedCallback is invoked in the zone', Zone.current.name);
* };
* proto.attributeChangedCallback = function() {
* console.log('attributeChangedCallback is invoked in the zone', Zone.current.name);
* };
*
* const zone = Zone.current.fork({name: 'myZone'});
* zone.run(() => {
* document.registerElement('x-elem', {prototype: proto});
* });
* ```
*
* When these callbacks are invoked, those callbacks will be in the zone when
* `registerElement()` is called.
*
* If you set `__Zone_disable_registerElement = true` before importing `zone.js`,
* `zone.js` does not monkey patch `registerElement()` API and the above code
* outputs '<root>'.
*/
__Zone_disable_registerElement?: boolean;
/**
* Disable the monkey patch of the browser legacy `EventTarget` API.
*
* NOTE: This configuration is only available in the legacy bundle (dist/zone.js), this module
* is not available in the evergreen bundle (zone-evergreen.js).
*
* In some old browsers, the `EventTarget` is not available, so `zone.js` cannot directly monkey
* patch the `EventTarget`. Instead, `zone.js` patches all known HTML elements' prototypes (such
* as `HtmlDivElement`). The callback of the `addEventListener()` will be in the same zone when
* the `addEventListener()` is called.
*
* Consider the following example:
*
* ```
* const zone = Zone.current.fork({name: 'myZone'});
* zone.run(() => {
* div.addEventListener('click', () => {
* console.log('div click event listener is invoked in the zone', Zone.current.name);
* // the output is 'div click event listener is invoked in the zone myZone'.
* });
* });
* ```
*
* If you set `__Zone_disable_EventTargetLegacy = true` before importing `zone.js`
* In some old browsers, where `EventTarget` is not available, if you set
* `__Zone_disable_EventTargetLegacy = true` before importing `zone.js`, `zone.js` does not
* monkey patch all HTML element APIs and the above code outputs 'clicked <root>'.
*/
__Zone_disable_EventTargetLegacy?: boolean;
/**
* Disable the monkey patch of the browser `timer` APIs.
*
* By default, `zone.js` monkey patches browser timer
* APIs (`setTimeout()`/`setInterval()`/`setImmediate()`) to make asynchronous callbacks of
* those APIs in the same zone when scheduled.
*
* Consider the following example:
*
* ```
* const zone = Zone.current.fork({name: 'myZone'});
* zone.run(() => {
* setTimeout(() => {
* console.log('setTimeout() callback is invoked in the zone', Zone.current.name);
* // since the callback of `setTimeout()` runs in the same zone
* // when it is scheduled, so the output is 'setTimeout() callback is invoked in the zone
* // myZone'.
* });
* });
* ```
*
* If you set `__Zone_disable_timers = true` before importing `zone.js`,
* `zone.js` does not monkey patch `timer` API and the above code
* outputs 'timeout <root>'.
*
*/
__Zone_disable_timers?: boolean;
/**
* Disable the monkey patch of the browser `requestAnimationFrame()` API.
*
* By default, `zone.js` monkey patches the browser `requestAnimationFrame()` API
* to make the asynchronous callback of the `requestAnimationFrame()` in the same zone when
* scheduled.
*
* Consider the following example:
*
* ```
* const zone = Zone.current.fork({name: 'myZone'});
* zone.run(() => {
* requestAnimationFrame(() => {
* console.log('requestAnimationFrame() callback is invoked in the zone',
* Zone.current.name);
* // since the callback of `requestAnimationFrame()` will be in the same zone
* // when it is scheduled, so the output will be 'requestAnimationFrame() callback is
* invoked
* // in the zone myZone'
* });
* });
* ```
*
* If you set `__Zone_disable_requestAnimationFrame = true` before importing `zone.js`,
* `zone.js` does not monkey patch the `requestAnimationFrame()` API and the above code
* outputs 'raf <root>'.
*/
__Zone_disable_requestAnimationFrame?: boolean;
/**
*
* Disable the monkey patching of the `queueMicrotask()` API.
*
* By default, `zone.js` monkey patches the `queueMicrotask()` API
* to ensure that `queueMicrotask()` callback is invoked in the same zone as zone used to invoke
* `queueMicrotask()`. And also the callback is running as `microTask` like
* `Promise.prototype.then()`.
*
* Consider the following example:
*
* ```
* const zone = Zone.current.fork({name: 'myZone'});
* zone.run(() => {
* queueMicrotask(() => {
* console.log('queueMicrotask() callback is invoked in the zone', Zone.current.name);
* // Since `queueMicrotask()` was invoked in `myZone`, same zone is restored
* // when 'queueMicrotask() callback is invoked, resulting in `myZone` being console
* logged.
* });
* });
* ```
*
* If you set `__Zone_disable_queueMicrotask = true` before importing `zone.js`,
* `zone.js` does not monkey patch the `queueMicrotask()` API and the above code
* output will change to: 'queueMicrotask() callback is invoked in the zone <root>'.
*/
__Zone_disable_queueMicrotask?: boolean;
/**
*
* Disable the monkey patch of the browser blocking APIs(`alert()`/`prompt()`/`confirm()`).
*/
__Zone_disable_blocking?: boolean;
/**
* Disable the monkey patch of the browser `EventTarget` APIs.
*
* By default, `zone.js` monkey patches EventTarget APIs. The callbacks of the
* `addEventListener()` run in the same zone when the `addEventListener()` is called.
*
* Consider the following example:
*
* ```
* const zone = Zone.current.fork({name: 'myZone'});
* zone.run(() => {
* div.addEventListener('click', () => {
* console.log('div event listener is invoked in the zone', Zone.current.name);
* // the output is 'div event listener is invoked in the zone myZone'.
* });
* });
* ```
*
* If you set `__Zone_disable_EventTarget = true` before importing `zone.js`,
* `zone.js` does not monkey patch EventTarget API and the above code
* outputs 'clicked <root>'.
*
*/
__Zone_disable_EventTarget?: boolean;
/**
* Disable the monkey patch of the browser `FileReader` APIs.
*/
__Zone_disable_FileReader?: boolean;
/**
* Disable the monkey patch of the browser `MutationObserver` APIs.
*/
__Zone_disable_MutationObserver?: boolean;
/**
* Disable the monkey patch of the browser `IntersectionObserver` APIs.
*/
__Zone_disable_IntersectionObserver?: boolean;
/**
* Disable the monkey patch of the browser onProperty APIs(such as onclick).
*
* By default, `zone.js` monkey patches onXXX properties (such as onclick). The callbacks of
* onXXX properties run in the same zone when the onXXX properties is set.
*
* Consider the following example:
*
* ```
* const zone = Zone.current.fork({name: 'myZone'});
* zone.run(() => {
* div.onclick = () => {
* console.log('div click event listener is invoked in the zone', Zone.current.name);
* // the output will be 'div click event listener is invoked in the zone myZone'
* }
* });
* ```
*
* If you set `__Zone_disable_on_property = true` before importing `zone.js`,
* `zone.js` does not monkey patch onXXX properties and the above code
* outputs 'clicked <root>'.
*
*/
__Zone_disable_on_property?: boolean;
/**
* Disable the monkey patch of the browser `customElements` APIs.
*
* By default, `zone.js` monkey patches `customElements` APIs to make callbacks run in the
* same zone when the `customElements.define()` is called.
*
* Consider the following example:
*
* ```
* class TestCustomElement extends HTMLElement {
* constructor() { super(); }
* connectedCallback() {}
* disconnectedCallback() {}
* attributeChangedCallback(attrName, oldVal, newVal) {}
* adoptedCallback() {}
* formAssociatedCallback(form) {}
* formDisabledCallback(isDisabled) {}
* formResetCallback() {}
* formStateRestoreCallback(state, reason) {}
* }
*
* const zone = Zone.fork({name: 'myZone'});
* zone.run(() => {
* customElements.define('x-elem', TestCustomElement);
* });
* ```
*
* All those callbacks defined in TestCustomElement runs in the zone when
* the `customElements.define()` is called.
*
* If you set `__Zone_disable_customElements = true` before importing `zone.js`,
* `zone.js` does not monkey patch `customElements` APIs and the above code
* runs inside <root> zone.
*/
__Zone_disable_customElements?: boolean;
/**
* Disable the monkey patch of the browser `XMLHttpRequest` APIs.
*
* By default, `zone.js` monkey patches `XMLHttpRequest` APIs to make XMLHttpRequest act
* as macroTask.
*
* Consider the following example:
*
* ```
* const zone = Zone.current.fork({
* name: 'myZone',
* onScheduleTask: (delegate, curr, target, task) => {
* console.log('task is scheduled', task.type, task.source, task.zone.name);
* return delegate.scheduleTask(target, task);
* }
* })
* const xhr = new XMLHttpRequest();
* zone.run(() => {
* xhr.onload = function() {};
* xhr.open('get', '/', true);
* xhr.send();
* });
* ```
*
* In this example, the instance of XMLHttpRequest runs in the zone and acts as a macroTask. The
* output is 'task is scheduled macroTask, XMLHttpRequest.send, zone'.
*
* If you set `__Zone_disable_XHR = true` before importing `zone.js`,
* `zone.js` does not monkey patch `XMLHttpRequest` APIs and the above onScheduleTask callback
* will not be called.
*
*/
__Zone_disable_XHR?: boolean;
/**
* Disable the monkey patch of the browser geolocation APIs.
*
* By default, `zone.js` monkey patches geolocation APIs to make callbacks run in the same zone
* when those APIs are called.
*
* Consider the following examples:
*
* ```
* const zone = Zone.current.fork({
* name: 'myZone'
* });
*
* zone.run(() => {
* navigator.geolocation.getCurrentPosition(pos => {
* console.log('navigator.getCurrentPosition() callback is invoked in the zone',
* Zone.current.name);
* // output is 'navigator.getCurrentPosition() callback is invoked in the zone myZone'.
* }
* });
* ```
*
* If set you `__Zone_disable_geolocation = true` before importing `zone.js`,
* `zone.js` does not monkey patch geolocation APIs and the above code
* outputs 'getCurrentPosition <root>'.
*
*/
__Zone_disable_geolocation?: boolean;
/**
* Disable the monkey patch of the browser `canvas` APIs.
*
* By default, `zone.js` monkey patches `canvas` APIs to make callbacks run in the same zone
* when those APIs are called.
*
* Consider the following example:
*
* ```
* const zone = Zone.current.fork({
* name: 'myZone'
* });
*
* zone.run(() => {
* canvas.toBlob(blog => {
* console.log('canvas.toBlob() callback is invoked in the zone', Zone.current.name);
* // output is 'canvas.toBlob() callback is invoked in the zone myZone'.
* }
* });
* ```
*
* If you set `__Zone_disable_canvas = true` before importing `zone.js`,
* `zone.js` does not monkey patch `canvas` APIs and the above code
* outputs 'canvas.toBlob <root>'.
*/
__Zone_disable_canvas?: boolean;
/**
* Disable the `Promise` monkey patch.
*
* By default, `zone.js` monkey patches `Promise` APIs to make the `then()/catch()` callbacks in
* the same zone when those callbacks are called.
*
* Consider the following examples:
*
* ```
* const zone = Zone.current.fork({name: 'myZone'});
*
* const p = Promise.resolve(1);
*
* zone.run(() => {
* p.then(() => {
* console.log('then() callback is invoked in the zone', Zone.current.name);
* // output is 'then() callback is invoked in the zone myZone'.
* });
* });
* ```
*
* If you set `__Zone_disable_ZoneAwarePromise = true` before importing `zone.js`,
* `zone.js` does not monkey patch `Promise` APIs and the above code
* outputs 'promise then callback <root>'.
*/
__Zone_disable_ZoneAwarePromise?: boolean;
/**
* Define event names that users don't want monkey patched by the `zone.js`.
*
* By default, `zone.js` monkey patches EventTarget.addEventListener(). The event listener
* callback runs in the same zone when the addEventListener() is called.
*
* Sometimes, you don't want all of the event names used in this patched version because it
* impacts performance. For example, you might want `scroll` or `mousemove` event listeners to
* run the native `addEventListener()` for better performance.
*
* Users can achieve this goal by defining `__zone_symbol__UNPATCHED_EVENTS = ['scroll',
* 'mousemove'];` before importing `zone.js`.
*/
__zone_symbol__UNPATCHED_EVENTS?: string[];
/**
* Define a list of `on` properties to be ignored when being monkey patched by the `zone.js`.
*
* By default, `zone.js` monkey patches `on` properties on inbuilt browser classes as
* `WebSocket`, `XMLHttpRequest`, `Worker`, `HTMLElement` and others (see `patchTargets` in
* `propertyDescriptorPatch`). `on` properties may be `WebSocket.prototype.onclose`,
* `XMLHttpRequest.prototype.onload`, etc.
*
* Sometimes, we're not able to customise third-party libraries, which setup `on` listeners.
* Given a library creates a `Websocket` and sets `socket.onmessage`, this will impact
* performance if the `onmessage` property is set within the Angular zone, because this will
* trigger change detection on any message coming through the socket. We can exclude specific
* targets and their `on` properties from being patched by zone.js.
*
* Users can achieve this by defining `__Zone_ignore_on_properties`, it expects an array of
* objects where `target` is the actual object `on` properties will be set on:
* ```
* __Zone_ignore_on_properties = [
* {
* target: WebSocket.prototype,
* ignoreProperties: ['message', 'close', 'open']
* }
* ];
* ```
*
* In order to check whether `on` properties have been successfully ignored or not, it's enough
* to open the console in the browser, run `WebSocket.prototype` and expand the object, we
* should see the following:
* ```
* {
* __zone_symbol__ononclosepatched: true,
* __zone_symbol__ononerrorpatched: true,
* __zone_symbol__ononmessagepatched: true,
* __zone_symbol__ononopenpatched: true
* }
* ```
* These `__zone_symbol__*` properties are set by zone.js when `on` properties have been patched
* previously. When `__Zone_ignore_on_properties` is setup, we should not see those properties
* on targets.
*/
__Zone_ignore_on_properties?: {target: any; ignoreProperties: string[];}[];
/**
* Define the event names of the passive listeners.
*
* To add passive event listeners, you can use `elem.addEventListener('scroll', listener,
* {passive: true});` or implement your own `EventManagerPlugin`.
*
* You can also define a global variable as follows:
*
* ```
* __zone_symbol__PASSIVE_EVENTS = ['scroll'];
* ```
*
* The preceding code makes all scroll event listeners passive.
*/
__zone_symbol__PASSIVE_EVENTS?: string[];
/**
* Disable wrapping uncaught promise rejection.
*
* By default, `zone.js` throws the original error occurs in the uncaught promise rejection.
*
* If you set `__zone_symbol__DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION = false;` before
* importing `zone.js`, `zone.js` will wrap the uncaught promise rejection in a new `Error`
* object which contains additional information such as a value of the rejection and a stack
* trace.
*/
__zone_symbol__DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION?: boolean;
}
/**
* Interface of `zone-testing.js` test configurations.
*
* You can define the following configurations on the `window` or `global` object before
* importing `zone-testing.js` to change `zone-testing.js` default behaviors in the test runner.
*/
interface ZoneTestConfigurations {
/**
* Disable the Jasmine integration.
*
* In the `zone-testing.js` bundle, by default, `zone-testing.js` monkey patches Jasmine APIs
* to make Jasmine APIs run in specified zone.
*
* 1. Make the `describe()`/`xdescribe()`/`fdescribe()` methods run in the syncTestZone.
* 2. Make the `it()`/`xit()`/`fit()`/`beforeEach()`/`afterEach()`/`beforeAll()`/`afterAll()`
* methods run in the ProxyZone.
*
* With this patch, `async()`/`fakeAsync()` can work with the Jasmine runner.
*
* If you set `__Zone_disable_jasmine = true` before importing `zone-testing.js`,
* `zone-testing.js` does not monkey patch the jasmine APIs and the `async()`/`fakeAsync()`
* cannot work with the Jasmine runner any longer.
*/
__Zone_disable_jasmine?: boolean;
/**
* Disable the Mocha integration.
*
* In the `zone-testing.js` bundle, by default, `zone-testing.js` monkey patches the Mocha APIs
* to make Mocha APIs run in the specified zone.
*
* 1. Make the `describe()`/`xdescribe()`/`fdescribe()` methods run in the syncTestZone.
* 2. Make the `it()`/`xit()`/`fit()`/`beforeEach()`/`afterEach()`/`beforeAll()`/`afterAll()`
* methods run in the ProxyZone.
*
* With this patch, `async()`/`fakeAsync()` can work with the Mocha runner.
*
* If you set `__Zone_disable_mocha = true` before importing `zone-testing.js`,
* `zone-testing.js` does not monkey patch the Mocha APIs and the `async()/`fakeAsync()` can not
* work with the Mocha runner any longer.
*/
__Zone_disable_mocha?: boolean;
/**
* Disable the Jest integration.
*
* In the `zone-testing.js` bundle, by default, `zone-testing.js` monkey patches Jest APIs
* to make Jest APIs run in the specified zone.
*
* 1. Make the `describe()`/`xdescribe()`/`fdescribe()` methods run in the syncTestZone.
* 2. Make the `it()`/`xit()`/`fit()`/`beforeEach()`/`afterEach()`/`before()`/`after()` methods
* run in the ProxyZone.
*
* With this patch, `async()`/`fakeAsync()` can work with the Jest runner.
*
* If you set `__Zone_disable_jest = true` before importing `zone-testing.js`,
* `zone-testing.js` does not monkey patch the jest APIs and `async()`/`fakeAsync()` cannot
* work with the Jest runner any longer.
*/
__Zone_disable_jest?: boolean;
/**
* Disable monkey patch the jasmine clock APIs.
*
* By default, `zone-testing.js` monkey patches the `jasmine.clock()` API,
* so the `jasmine.clock()` can work with the `fakeAsync()/tick()` API.
*
* Consider the following example:
*
* ```
* describe('jasmine.clock integration', () => {
* beforeEach(() => {
* jasmine.clock().install();
* });
* afterEach(() => {
* jasmine.clock().uninstall();
* });
* it('fakeAsync test', fakeAsync(() => {
* setTimeout(spy, 100);
* expect(spy).not.toHaveBeenCalled();
* jasmine.clock().tick(100);
* expect(spy).toHaveBeenCalled();
* }));
* });
* ```
*
* In the `fakeAsync()` method, `jasmine.clock().tick()` works just like `tick()`.
*
* If you set `__zone_symbol__fakeAsyncDisablePatchingClock = true` before importing
* `zone-testing.js`,`zone-testing.js` does not monkey patch the `jasmine.clock()` APIs and the
* `jasmine.clock()` cannot work with `fakeAsync()` any longer.
*/
__zone_symbol__fakeAsyncDisablePatchingClock?: boolean;
/**
* Enable auto running into `fakeAsync()` when installing the `jasmine.clock()`.
*
* By default, `zone-testing.js` does not automatically run into `fakeAsync()`
* if the `jasmine.clock().install()` is called.
*
* Consider the following example:
*
* ```
* describe('jasmine.clock integration', () => {
* beforeEach(() => {
* jasmine.clock().install();
* });
* afterEach(() => {
* jasmine.clock().uninstall();
* });
* it('fakeAsync test', fakeAsync(() => {
* setTimeout(spy, 100);
* expect(spy).not.toHaveBeenCalled();
* jasmine.clock().tick(100);
* expect(spy).toHaveBeenCalled();
* }));
* });
* ```
*
* You must run `fakeAsync()` to make test cases in the `FakeAsyncTestZone`.
*
* If you set `__zone_symbol__fakeAsyncAutoFakeAsyncWhenClockPatched = true` before importing
* `zone-testing.js`, `zone-testing.js` can run test case automatically in the
* `FakeAsyncTestZone` without calling the `fakeAsync()`.
*
* Consider the following example:
*
* ```
* describe('jasmine.clock integration', () => {
* beforeEach(() => {
* jasmine.clock().install();
* });
* afterEach(() => {
* jasmine.clock().uninstall();
* });
* it('fakeAsync test', () => { // here we don't need to call fakeAsync
* setTimeout(spy, 100);
* expect(spy).not.toHaveBeenCalled();
* jasmine.clock().tick(100);
* expect(spy).toHaveBeenCalled();
* });
* });
* ```
*
*/
__zone_symbol__fakeAsyncAutoFakeAsyncWhenClockPatched?: boolean;
/**
* Enable waiting for the unresolved promise in the `async()` test.
*
* In the `async()` test, `AsyncTestZone` waits for all the asynchronous tasks to finish. By
* default, if some promises remain unresolved, `AsyncTestZone` does not wait and reports that
* it received an unexpected result.
*
* Consider the following example:
*
* ```
* describe('wait never resolved promise', () => {
* it('async with never resolved promise test', async(() => {
* const p = new Promise(() => {});
* p.then(() => {
* // do some expectation.
* });
* }))
* });
* ```
*
* By default, this case passes, because the callback of `p.then()` is never called. Because `p`
* is an unresolved promise, there is no pending asynchronous task, which means the `async()`
* method does not wait.
*
* If you set `__zone_symbol__supportWaitUnResolvedChainedPromise = true`, the above case
* times out, because `async()` will wait for the unresolved promise.
*/
__zone_symbol__supportWaitUnResolvedChainedPromise?: boolean;
}
/**
* The interface of the `zone.js` runtime configurations.
*
* These configurations can be defined on the `Zone` object after
* importing zone.js to change behaviors. The differences between
* the `ZoneRuntimeConfigurations` and the `ZoneGlobalConfigurations` are,
*
* 1. `ZoneGlobalConfigurations` must be defined on the `global/window` object before importing
* `zone.js`. The value of the configuration cannot be changed at runtime.
*
* 2. `ZoneRuntimeConfigurations` must be defined on the `Zone` object after importing `zone.js`.
* You can change the value of this configuration at runtime.
*
*/
interface ZoneRuntimeConfigurations {
/**
* Ignore outputting errors to the console when uncaught Promise errors occur.
*
* By default, if an uncaught Promise error occurs, `zone.js` outputs the
* error to the console by calling `console.error()`.
*
* If you set `__zone_symbol__ignoreConsoleErrorUncaughtError = true`, `zone.js` does not output
* the uncaught error to `console.error()`.
*/
__zone_symbol__ignoreConsoleErrorUncaughtError?: boolean;
}
}
export {};
import './lib/zone';
import './lib/zone.api.extensions';
import './lib/zone.configurations.api';

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc