Updated the files.

This commit is contained in:
Batuhan Berk Başoğlu 2024-02-08 19:38:41 -05:00
parent 1553e6b971
commit 753967d4f5
23418 changed files with 3784666 additions and 0 deletions

272
my-app/node_modules/zone.js/bundles/async-test.umd.js generated vendored Executable file
View file

@ -0,0 +1,272 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'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;
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[_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.
//
// 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;
}());
_a = AsyncTestZoneSpec;
(function () {
_a.symbolParentUnresolved = Zone.__symbol__('parentUnresolved');
})();
// 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) {
// 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 () {
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);
}
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);
}
});
}));

6
my-app/node_modules/zone.js/bundles/async-test.umd.min.js generated vendored Executable file
View file

@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 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)}))}}}))}));

785
my-app/node_modules/zone.js/bundles/fake-async-test.umd.js generated vendored Executable file
View file

@ -0,0 +1,785 @@
'use strict';
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'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)))();
}
}
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 timers = {
setTimeout: global.setTimeout,
setInterval: global.setInterval,
clearTimeout: global.clearTimeout,
clearInterval: global.clearInterval
};
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.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;
}
}
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;
}
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;
if (doTick) {
// Update any secondary schedulers like Jasmine mock Date.
doTick(this._currentTickTime - lastCurrentTime);
}
var retval = current.func.apply(global, current.args);
if (!retval) {
// Uncaught exception in the current scheduled function. Stop processing the queue.
break;
}
}
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');
}
};
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);
}
};
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);
}
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 (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();
}
};
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);
}
}
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;
}
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;
}());
// 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'];
}
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];
}
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) {
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;
}
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, 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);
}));

File diff suppressed because one or more lines are too long

342
my-app/node_modules/zone.js/bundles/jasmine-patch.umd.js generated vendored Executable file
View file

@ -0,0 +1,342 @@
'use strict';
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'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;
}
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);
}
});
}
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 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 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 {
spyObj = originalCreateSpyObj_1.apply(this, args);
}
finally {
Object.defineProperty = defineProperty_1;
}
}
else {
spyObj = originalCreateSpyObj_1.apply(this, args);
}
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 {
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();
}
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) {
}
}
}
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 (!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);
});
}));

View file

@ -0,0 +1,6 @@
"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/
* 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)})}}))}));

View file

@ -0,0 +1,184 @@
'use strict';
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'use strict';
/**
* @fileoverview
* @suppress {globalThis}
*/
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);
}
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.
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 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);
}
// 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 (!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);
}
}
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;
}
}
}
computeIgnoreFrames();
}));

View file

@ -0,0 +1,6 @@
"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/
* 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}}}()}));

155
my-app/node_modules/zone.js/bundles/mocha-patch.umd.js generated vendored Executable file
View file

@ -0,0 +1,155 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'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();
};
}
};
for (var i = 0; i < args.length; i++) {
_loop_1(i);
}
return args;
}
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]);
};
};
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]);
};
};
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));
};
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);
});
};
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) {
}
}
});
return originalRun.call(this, fn);
};
})(Mocha.Runner.prototype.runTest, Mocha.Runner.prototype.run);
});
}));

6
my-app/node_modules/zone.js/bundles/mocha-patch.umd.min.js generated vendored Executable file
View file

@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 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])}}))}}))}));

179
my-app/node_modules/zone.js/bundles/proxy.umd.js generated vendored Executable file
View file

@ -0,0 +1,179 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'use strict';
var ProxyZoneSpec = /** @class */ (function () {
function ProxyZoneSpec(defaultSpecDelegate) {
if (defaultSpecDelegate === void 0) { defaultSpecDelegate = null; }
this.defaultSpecDelegate = defaultSpecDelegate;
this.name = 'ProxyZone';
this._delegateSpec = null;
this.properties = { 'ProxyZoneSpec': this };
this.propertyKeys = null;
this.lastTaskState = null;
this.isNeedToTriggerHasTask = false;
this.tasks = [];
this.setDelegate(defaultSpecDelegate);
}
ProxyZoneSpec.get = function () {
return Zone.current.get('ProxyZoneSpec');
};
ProxyZoneSpec.isLoaded = function () {
return ProxyZoneSpec.get() instanceof ProxyZoneSpec;
};
ProxyZoneSpec.assertPresent = function () {
if (!ProxyZoneSpec.isLoaded()) {
throw new Error("Expected to be running in 'ProxyZone', but it was not found.");
}
return ProxyZoneSpec.get();
};
ProxyZoneSpec.prototype.setDelegate = function (delegateSpec) {
var _this = this;
var isNewDelegate = this._delegateSpec !== delegateSpec;
this._delegateSpec = delegateSpec;
this.propertyKeys && this.propertyKeys.forEach(function (key) { return delete _this.properties[key]; });
this.propertyKeys = null;
if (delegateSpec && delegateSpec.properties) {
this.propertyKeys = Object.keys(delegateSpec.properties);
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 &&
(this.lastTaskState.macroTask || this.lastTaskState.microTask)) {
this.isNeedToTriggerHasTask = true;
}
};
ProxyZoneSpec.prototype.getDelegate = function () {
return this._delegateSpec;
};
ProxyZoneSpec.prototype.resetDelegate = function () {
this.getDelegate();
this.setDelegate(this.defaultSpecDelegate);
};
ProxyZoneSpec.prototype.tryTriggerHasTask = function (parentZoneDelegate, currentZone, targetZone) {
if (this.isNeedToTriggerHasTask && this.lastTaskState) {
// last delegateSpec has microTask or macroTask
// should call onHasTask in current delegateSpec
this.isNeedToTriggerHasTask = false;
this.onHasTask(parentZoneDelegate, currentZone, targetZone, this.lastTaskState);
}
};
ProxyZoneSpec.prototype.removeFromTasks = function (task) {
if (!this.tasks) {
return;
}
for (var i = 0; i < this.tasks.length; i++) {
if (this.tasks[i] === task) {
this.tasks.splice(i, 1);
return;
}
}
};
ProxyZoneSpec.prototype.getAndClearPendingTasksInfo = function () {
if (this.tasks.length === 0) {
return '';
}
var taskInfo = this.tasks.map(function (task) {
var dataInfo = task.data &&
Object.keys(task.data)
.map(function (key) {
return key + ':' + task.data[key];
})
.join(',');
return "type: ".concat(task.type, ", source: ").concat(task.source, ", args: {").concat(dataInfo, "}");
});
var pendingTasksInfo = '--Pending async tasks are: [' + taskInfo + ']';
// clear tasks
this.tasks = [];
return pendingTasksInfo;
};
ProxyZoneSpec.prototype.onFork = function (parentZoneDelegate, currentZone, targetZone, zoneSpec) {
if (this._delegateSpec && this._delegateSpec.onFork) {
return this._delegateSpec.onFork(parentZoneDelegate, currentZone, targetZone, zoneSpec);
}
else {
return parentZoneDelegate.fork(targetZone, zoneSpec);
}
};
ProxyZoneSpec.prototype.onIntercept = function (parentZoneDelegate, currentZone, targetZone, delegate, source) {
if (this._delegateSpec && this._delegateSpec.onIntercept) {
return this._delegateSpec.onIntercept(parentZoneDelegate, currentZone, targetZone, delegate, source);
}
else {
return parentZoneDelegate.intercept(targetZone, delegate, source);
}
};
ProxyZoneSpec.prototype.onInvoke = function (parentZoneDelegate, currentZone, targetZone, delegate, applyThis, applyArgs, source) {
this.tryTriggerHasTask(parentZoneDelegate, currentZone, targetZone);
if (this._delegateSpec && this._delegateSpec.onInvoke) {
return this._delegateSpec.onInvoke(parentZoneDelegate, currentZone, targetZone, delegate, applyThis, applyArgs, source);
}
else {
return parentZoneDelegate.invoke(targetZone, delegate, applyThis, applyArgs, source);
}
};
ProxyZoneSpec.prototype.onHandleError = function (parentZoneDelegate, currentZone, targetZone, error) {
if (this._delegateSpec && this._delegateSpec.onHandleError) {
return this._delegateSpec.onHandleError(parentZoneDelegate, currentZone, targetZone, error);
}
else {
return parentZoneDelegate.handleError(targetZone, error);
}
};
ProxyZoneSpec.prototype.onScheduleTask = function (parentZoneDelegate, currentZone, targetZone, task) {
if (task.type !== 'eventTask') {
this.tasks.push(task);
}
if (this._delegateSpec && this._delegateSpec.onScheduleTask) {
return this._delegateSpec.onScheduleTask(parentZoneDelegate, currentZone, targetZone, task);
}
else {
return parentZoneDelegate.scheduleTask(targetZone, task);
}
};
ProxyZoneSpec.prototype.onInvokeTask = function (parentZoneDelegate, currentZone, targetZone, task, applyThis, applyArgs) {
if (task.type !== 'eventTask') {
this.removeFromTasks(task);
}
this.tryTriggerHasTask(parentZoneDelegate, currentZone, targetZone);
if (this._delegateSpec && this._delegateSpec.onInvokeTask) {
return this._delegateSpec.onInvokeTask(parentZoneDelegate, currentZone, targetZone, task, applyThis, applyArgs);
}
else {
return parentZoneDelegate.invokeTask(targetZone, task, applyThis, applyArgs);
}
};
ProxyZoneSpec.prototype.onCancelTask = function (parentZoneDelegate, currentZone, targetZone, task) {
if (task.type !== 'eventTask') {
this.removeFromTasks(task);
}
this.tryTriggerHasTask(parentZoneDelegate, currentZone, targetZone);
if (this._delegateSpec && this._delegateSpec.onCancelTask) {
return this._delegateSpec.onCancelTask(parentZoneDelegate, currentZone, targetZone, task);
}
else {
return parentZoneDelegate.cancelTask(targetZone, task);
}
};
ProxyZoneSpec.prototype.onHasTask = function (delegate, current, target, hasTaskState) {
this.lastTaskState = hasTaskState;
if (this._delegateSpec && this._delegateSpec.onHasTask) {
this._delegateSpec.onHasTask(delegate, current, target, hasTaskState);
}
else {
delegate.hasTask(target, hasTaskState);
}
};
return ProxyZoneSpec;
}());
// Export the class so that new instances can be created with proper
// constructor params.
Zone['ProxyZoneSpec'] = ProxyZoneSpec;
}));

6
my-app/node_modules/zone.js/bundles/proxy.umd.min.js generated vendored Executable file
View file

@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 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}));

33
my-app/node_modules/zone.js/bundles/sync-test.umd.js generated vendored Executable file
View file

@ -0,0 +1,33 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'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;
}
return task;
};
return SyncTestZoneSpec;
}());
// Export the class so that new instances can be created with proper
// constructor params.
Zone['SyncTestZoneSpec'] = SyncTestZoneSpec;
}));

6
my-app/node_modules/zone.js/bundles/sync-test.umd.min.js generated vendored Executable file
View file

@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 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}));

79
my-app/node_modules/zone.js/bundles/task-tracking.umd.js generated vendored Executable file
View file

@ -0,0 +1,79 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'use strict';
/**
* A `TaskTrackingZoneSpec` allows one to track all outstanding Tasks.
*
* This is useful in tests. For example to see which tasks are preventing a test from completing
* or an automated way of releasing all of the event listeners at the end of the test.
*/
var TaskTrackingZoneSpec = /** @class */ (function () {
function TaskTrackingZoneSpec() {
this.name = 'TaskTrackingZone';
this.microTasks = [];
this.macroTasks = [];
this.eventTasks = [];
this.properties = { 'TaskTrackingZone': this };
}
TaskTrackingZoneSpec.get = function () {
return Zone.current.get('TaskTrackingZone');
};
TaskTrackingZoneSpec.prototype.getTasksFor = function (type) {
switch (type) {
case 'microTask':
return this.microTasks;
case 'macroTask':
return this.macroTasks;
case 'eventTask':
return this.eventTasks;
}
throw new Error('Unknown task format: ' + type);
};
TaskTrackingZoneSpec.prototype.onScheduleTask = function (parentZoneDelegate, currentZone, targetZone, task) {
task['creationLocation'] = new Error("Task '".concat(task.type, "' from '").concat(task.source, "'."));
var tasks = this.getTasksFor(task.type);
tasks.push(task);
return parentZoneDelegate.scheduleTask(targetZone, task);
};
TaskTrackingZoneSpec.prototype.onCancelTask = function (parentZoneDelegate, currentZone, targetZone, task) {
var tasks = this.getTasksFor(task.type);
for (var i = 0; i < tasks.length; i++) {
if (tasks[i] == task) {
tasks.splice(i, 1);
break;
}
}
return parentZoneDelegate.cancelTask(targetZone, task);
};
TaskTrackingZoneSpec.prototype.onInvokeTask = function (parentZoneDelegate, currentZone, targetZone, task, applyThis, applyArgs) {
var _a;
if (task.type === 'eventTask' || ((_a = task.data) === null || _a === void 0 ? void 0 : _a.isPeriodic))
return parentZoneDelegate.invokeTask(targetZone, task, applyThis, applyArgs);
var tasks = this.getTasksFor(task.type);
for (var i = 0; i < tasks.length; i++) {
if (tasks[i] == task) {
tasks.splice(i, 1);
break;
}
}
return parentZoneDelegate.invokeTask(targetZone, task, applyThis, applyArgs);
};
TaskTrackingZoneSpec.prototype.clearEvents = function () {
while (this.eventTasks.length) {
Zone.current.cancelTask(this.eventTasks[0]);
}
};
return TaskTrackingZoneSpec;
}());
// Export the class so that new instances can be created with proper
// constructor params.
Zone['TaskTrackingZoneSpec'] = TaskTrackingZoneSpec;
}));

View file

@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 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}));

View file

@ -0,0 +1,73 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'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) {
return delegate.call(self, wrapperedCallback);
}
else {
return delegate.apply(self, args);
}
}
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);
}
else if (mql['addListener']) {
// proto not exists, or proto has no addListener method
// try to patch mql instance
patchAddListener(mql);
patchRemoveListener(mql);
}
}
return mql;
}; });
}
});
}));

View file

@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 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}}))}))}));

View file

@ -0,0 +1,23 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'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);
});
}));

View file

@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 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)}}))}));

View file

@ -0,0 +1,27 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'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 });
});
}));

View file

@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 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})}}))}));

31
my-app/node_modules/zone.js/bundles/webapis-shadydom.umd.js generated vendored Executable file
View file

@ -0,0 +1,31 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'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]);
}
});
});
}));

View file

@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 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]))}))}))}));

135
my-app/node_modules/zone.js/bundles/wtf.umd.js generated vendored Executable file
View file

@ -0,0 +1,135 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'use strict';
/**
* @fileoverview
* @suppress {missingRequire}
*/
(function (global) {
var _a;
// Detect and setup WTF.
var wtfTrace = null;
var wtfEvents = null;
var wtfEnabled = (function () {
var wtf = global['wtf'];
if (wtf) {
wtfTrace = wtf.trace;
if (wtfTrace) {
wtfEvents = wtfTrace.events;
return true;
}
}
return false;
})();
var WtfZoneSpec = /** @class */ (function () {
function WtfZoneSpec() {
this.name = 'WTF';
}
WtfZoneSpec.prototype.onFork = function (parentZoneDelegate, currentZone, targetZone, zoneSpec) {
var retValue = parentZoneDelegate.fork(targetZone, zoneSpec);
_a.forkInstance(zonePathName(targetZone), retValue.name);
return retValue;
};
WtfZoneSpec.prototype.onInvoke = function (parentZoneDelegate, currentZone, targetZone, delegate, applyThis, applyArgs, source) {
var src = source || 'unknown';
var scope = _a.invokeScope[src];
if (!scope) {
scope = _a.invokeScope[src] =
wtfEvents.createScope("Zone:invoke:".concat(source, "(ascii zone)"));
}
return wtfTrace.leaveScope(scope(zonePathName(targetZone)), parentZoneDelegate.invoke(targetZone, delegate, applyThis, applyArgs, source));
};
WtfZoneSpec.prototype.onHandleError = function (parentZoneDelegate, currentZone, targetZone, error) {
return parentZoneDelegate.handleError(targetZone, error);
};
WtfZoneSpec.prototype.onScheduleTask = function (parentZoneDelegate, currentZone, targetZone, task) {
var key = task.type + ':' + task.source;
var instance = _a.scheduleInstance[key];
if (!instance) {
instance = _a.scheduleInstance[key] =
wtfEvents.createInstance("Zone:schedule:".concat(key, "(ascii zone, any data)"));
}
var retValue = parentZoneDelegate.scheduleTask(targetZone, task);
instance(zonePathName(targetZone), shallowObj(task.data, 2));
return retValue;
};
WtfZoneSpec.prototype.onInvokeTask = function (parentZoneDelegate, currentZone, targetZone, task, applyThis, applyArgs) {
var source = task.source;
var scope = _a.invokeTaskScope[source];
if (!scope) {
scope = _a.invokeTaskScope[source] =
wtfEvents.createScope("Zone:invokeTask:".concat(source, "(ascii zone)"));
}
return wtfTrace.leaveScope(scope(zonePathName(targetZone)), parentZoneDelegate.invokeTask(targetZone, task, applyThis, applyArgs));
};
WtfZoneSpec.prototype.onCancelTask = function (parentZoneDelegate, currentZone, targetZone, task) {
var key = task.source;
var instance = _a.cancelInstance[key];
if (!instance) {
instance = _a.cancelInstance[key] =
wtfEvents.createInstance("Zone:cancel:".concat(key, "(ascii zone, any options)"));
}
var retValue = parentZoneDelegate.cancelTask(targetZone, task);
instance(zonePathName(targetZone), shallowObj(task.data, 2));
return retValue;
};
return WtfZoneSpec;
}());
_a = WtfZoneSpec;
(function () {
_a.forkInstance = wtfEnabled ? wtfEvents.createInstance('Zone:fork(ascii zone, ascii newZone)') : null;
})();
(function () {
_a.scheduleInstance = {};
})();
(function () {
_a.cancelInstance = {};
})();
(function () {
_a.invokeScope = {};
})();
(function () {
_a.invokeTaskScope = {};
})();
function shallowObj(obj, depth) {
if (!obj || !depth)
return null;
var out = {};
for (var key in obj) {
if (obj.hasOwnProperty(key)) {
// explicit : any due to https://github.com/microsoft/TypeScript/issues/33191
var value = obj[key];
switch (typeof value) {
case 'object':
var name_1 = value && value.constructor && value.constructor.name;
value = name_1 == Object.name ? shallowObj(value, depth - 1) : name_1;
break;
case 'function':
value = value.name || undefined;
break;
}
out[key] = value;
}
}
return out;
}
function zonePathName(zone) {
var name = zone.name;
var localZone = zone.parent;
while (localZone != null) {
name = localZone.name + '::' + name;
localZone = localZone.parent;
}
return name;
}
Zone['wtfZoneSpec'] = !wtfEnabled ? null : new WtfZoneSpec();
})(typeof window === 'object' && window || typeof self === 'object' && self || global);
}));

6
my-app/node_modules/zone.js/bundles/wtf.umd.min.js generated vendored Executable file
View file

@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 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)}));

92
my-app/node_modules/zone.js/bundles/zone-bluebird.umd.js generated vendored Executable file
View file

@ -0,0 +1,92 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'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);
}
});
});
};
}
};
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();
}
}
});
}
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); });
});
}
}
});
}
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;
};
});
}));

View file

@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 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}}))}));

338
my-app/node_modules/zone.js/bundles/zone-error.umd.js generated vendored Executable file
View file

@ -0,0 +1,338 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'use strict';
/**
* @fileoverview
* @suppress {globalThis,undefinedVars}
*/
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, "]");
}
}
}
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);
}
else if (zoneJsInternalStackFramesPolicy === 'default') {
try {
error.stack = error.zoneAwareStack = buildZoneAwareStackFrames(originalStack, zoneFrame);
}
catch (e) {
// ignore as some browsers don't allow overriding of stack
}
}
}
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;
}
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.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;
}
}
}
return value.call(this, error, structuredStackTrace);
};
}
});
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');
}
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 {
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();
}, 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();
}, function () { });
}, undefined, function (t) {
t._transitionTo = fakeTransitionTo;
t.invoke();
}, function () { });
});
});
Error.stackTraceLimit = originalStackTraceLimit;
});
}));

6
my-app/node_modules/zone.js/bundles/zone-error.umd.min.js generated vendored Executable file
View file

@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 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}}))}));

670
my-app/node_modules/zone.js/bundles/zone-legacy.umd.js generated vendored Executable file
View file

@ -0,0 +1,670 @@
'use strict';
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'use strict';
/*
* This is necessary for Chrome and Chrome mobile, to enable
* things like redefining `createdCallback` on an element.
*/
var zoneSymbol;
var _defineProperty;
var _getOwnPropertyDescriptor;
var _create;
var 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 (obj, prop, desc) {
if (isUnconfigurable(obj, prop)) {
throw new TypeError('Cannot assign to read only property \'' + prop + '\' of ' + obj);
}
var originalConfigurableFlag = desc.configurable;
if (prop !== 'prototype') {
desc = rewriteDescriptor(obj, prop, desc);
}
return _tryDefineProperty(obj, prop, desc, originalConfigurableFlag);
};
Object.defineProperties = function (obj, props) {
Object.keys(props).forEach(function (prop) {
Object.defineProperty(obj, prop, props[prop]);
});
for (var _i = 0, _a = Object.getOwnPropertySymbols(props); _i < _a.length; _i++) {
var sym = _a[_i];
var desc = Object.getOwnPropertyDescriptor(props, sym);
// Since `Object.getOwnPropertySymbols` returns *all* symbols,
// including non-enumerable ones, retrieve property descriptor and check
// enumerability there. Proceed with the rewrite only when a property is
// enumerable to make the logic consistent with the way regular
// properties are retrieved (via `Object.keys`, which respects
// `enumerable: false` flag). More information:
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Enumerability_and_ownership_of_properties#retrieval
if (desc === null || desc === void 0 ? void 0 : desc.enumerable) {
Object.defineProperty(obj, sym, props[sym]);
}
}
return obj;
};
Object.create = function (proto, propertiesObject) {
if (typeof propertiesObject === 'object' && !Object.isFrozen(propertiesObject)) {
Object.keys(propertiesObject).forEach(function (prop) {
propertiesObject[prop] = rewriteDescriptor(proto, prop, propertiesObject[prop]);
});
}
return _create(proto, propertiesObject);
};
Object.getOwnPropertyDescriptor = function (obj, prop) {
var desc = _getOwnPropertyDescriptor(obj, prop);
if (desc && isUnconfigurable(obj, prop)) {
desc.configurable = false;
}
return desc;
};
}
function _redefineProperty(obj, prop, desc) {
var originalConfigurableFlag = desc.configurable;
desc = rewriteDescriptor(obj, prop, desc);
return _tryDefineProperty(obj, prop, desc, originalConfigurableFlag);
}
function isUnconfigurable(obj, prop) {
return obj && obj[unconfigurablesKey] && obj[unconfigurablesKey][prop];
}
function rewriteDescriptor(obj, prop, desc) {
// issue-927, if the desc is frozen, don't try to change the desc
if (!Object.isFrozen(desc)) {
desc.configurable = true;
}
if (!desc.configurable) {
// issue-927, if the obj is frozen, don't try to set the desc to obj
if (!obj[unconfigurablesKey] && !Object.isFrozen(obj)) {
_defineProperty(obj, unconfigurablesKey, { writable: true, value: {} });
}
if (obj[unconfigurablesKey]) {
obj[unconfigurablesKey][prop] = true;
}
}
return desc;
}
function _tryDefineProperty(obj, prop, desc, originalConfigurableFlag) {
try {
return _defineProperty(obj, prop, desc);
}
catch (error) {
if (desc.configurable) {
// In case of errors, when the configurable flag was likely set by rewriteDescriptor(),
// let's retry with the original flag value
if (typeof originalConfigurableFlag == 'undefined') {
delete desc.configurable;
}
else {
desc.configurable = originalConfigurableFlag;
}
try {
return _defineProperty(obj, prop, desc);
}
catch (error) {
var swallowError = false;
if (prop === 'createdCallback' || prop === 'attachedCallback' ||
prop === 'detachedCallback' || prop === 'attributeChangedCallback') {
// We only swallow the error in registerElement patch
// this is the work around since some applications
// fail if we throw the error
swallowError = true;
}
if (!swallowError) {
throw error;
}
// TODO: @JiaLiPassion, Some application such as `registerElement` patch
// still need to swallow the error, in the future after these applications
// are updated, the following logic can be removed.
var descJson = null;
try {
descJson = JSON.stringify(desc);
}
catch (error) {
descJson = desc.toString();
}
console.log("Attempting to configure '".concat(prop, "' with descriptor '").concat(descJson, "' on object '").concat(obj, "' and got error, giving up: ").concat(error));
}
}
else {
throw error;
}
}
}
function eventTargetLegacyPatch(_global, api) {
var _a = api.getGlobalObjects(), eventNames = _a.eventNames, globalSources = _a.globalSources, zoneSymbolEventNames = _a.zoneSymbolEventNames, TRUE_STR = _a.TRUE_STR, FALSE_STR = _a.FALSE_STR, ZONE_SYMBOL_PREFIX = _a.ZONE_SYMBOL_PREFIX;
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 EVENT_TARGET = 'EventTarget';
var apis = [];
var isWtf = _global['wtf'];
var WTF_ISSUE_555_ARRAY = WTF_ISSUE_555.split(',');
if (isWtf) {
// Workaround for: https://github.com/google/tracing-framework/issues/555
apis = WTF_ISSUE_555_ARRAY.map(function (v) { return 'HTML' + v + 'Element'; }).concat(NO_EVENT_TARGET);
}
else if (_global[EVENT_TARGET]) {
apis.push(EVENT_TARGET);
}
else {
// Note: EventTarget is not available in all browsers,
// if it's not available, we instead patch the APIs in the IDL that inherit from EventTarget
apis = NO_EVENT_TARGET;
}
var isDisableIECheck = _global['__Zone_disable_IE_check'] || false;
var isEnableCrossContextCheck = _global['__Zone_enable_cross_context_check'] || false;
var ieOrEdge = api.isIEOrEdge();
var ADD_EVENT_LISTENER_SOURCE = '.addEventListener:';
var FUNCTION_WRAPPER = '[object FunctionWrapper]';
var BROWSER_TOOLS = 'function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] }';
var pointerEventsMap = {
'MSPointerCancel': 'pointercancel',
'MSPointerDown': 'pointerdown',
'MSPointerEnter': 'pointerenter',
'MSPointerHover': 'pointerhover',
'MSPointerLeave': 'pointerleave',
'MSPointerMove': 'pointermove',
'MSPointerOut': 'pointerout',
'MSPointerOver': 'pointerover',
'MSPointerUp': 'pointerup'
};
// predefine all __zone_symbol__ + eventName + true/false string
for (var i = 0; i < eventNames.length; i++) {
var eventName = eventNames[i];
var falseEventName = eventName + FALSE_STR;
var trueEventName = eventName + TRUE_STR;
var symbol = ZONE_SYMBOL_PREFIX + falseEventName;
var symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;
zoneSymbolEventNames[eventName] = {};
zoneSymbolEventNames[eventName][FALSE_STR] = symbol;
zoneSymbolEventNames[eventName][TRUE_STR] = symbolCapture;
}
// predefine all task.source string
for (var i = 0; i < WTF_ISSUE_555_ARRAY.length; i++) {
var target = WTF_ISSUE_555_ARRAY[i];
var targets = globalSources[target] = {};
for (var j = 0; j < eventNames.length; j++) {
var eventName = eventNames[j];
targets[eventName] = target + ADD_EVENT_LISTENER_SOURCE + eventName;
}
}
var checkIEAndCrossContext = function (nativeDelegate, delegate, target, args) {
if (!isDisableIECheck && ieOrEdge) {
if (isEnableCrossContextCheck) {
try {
var testString = delegate.toString();
if ((testString === FUNCTION_WRAPPER || testString == BROWSER_TOOLS)) {
nativeDelegate.apply(target, args);
return false;
}
}
catch (error) {
nativeDelegate.apply(target, args);
return false;
}
}
else {
var testString = delegate.toString();
if ((testString === FUNCTION_WRAPPER || testString == BROWSER_TOOLS)) {
nativeDelegate.apply(target, args);
return false;
}
}
}
else if (isEnableCrossContextCheck) {
try {
delegate.toString();
}
catch (error) {
nativeDelegate.apply(target, args);
return false;
}
}
return true;
};
var apiTypes = [];
for (var i = 0; i < apis.length; i++) {
var type = _global[apis[i]];
apiTypes.push(type && type.prototype);
}
// vh is validateHandler to check event handler
// is valid or not(for security check)
api.patchEventTarget(_global, api, apiTypes, {
vh: checkIEAndCrossContext,
transferEventName: function (eventName) {
var pointerEventName = pointerEventsMap[eventName];
return pointerEventName || eventName;
}
});
Zone[api.symbol('patchEventTarget')] = !!_global[EVENT_TARGET];
return true;
}
// we have to patch the instance since the proto is non-configurable
function apply(api, _global) {
var _a = api.getGlobalObjects(), ADD_EVENT_LISTENER_STR = _a.ADD_EVENT_LISTENER_STR, REMOVE_EVENT_LISTENER_STR = _a.REMOVE_EVENT_LISTENER_STR;
var WS = _global.WebSocket;
// On Safari window.EventTarget doesn't exist so need to patch WS add/removeEventListener
// On older Chrome, no need since EventTarget was already patched
if (!_global.EventTarget) {
api.patchEventTarget(_global, api, [WS.prototype]);
}
_global.WebSocket = function (x, y) {
var socket = arguments.length > 1 ? new WS(x, y) : new WS(x);
var proxySocket;
var proxySocketProto;
// Safari 7.0 has non-configurable own 'onmessage' and friends properties on the socket instance
var onmessageDesc = api.ObjectGetOwnPropertyDescriptor(socket, 'onmessage');
if (onmessageDesc && onmessageDesc.configurable === false) {
proxySocket = api.ObjectCreate(socket);
// socket have own property descriptor 'onopen', 'onmessage', 'onclose', 'onerror'
// but proxySocket not, so we will keep socket as prototype and pass it to
// patchOnProperties method
proxySocketProto = socket;
[ADD_EVENT_LISTENER_STR, REMOVE_EVENT_LISTENER_STR, 'send', 'close'].forEach(function (propName) {
proxySocket[propName] = function () {
var args = api.ArraySlice.call(arguments);
if (propName === ADD_EVENT_LISTENER_STR || propName === REMOVE_EVENT_LISTENER_STR) {
var eventName = args.length > 0 ? args[0] : undefined;
if (eventName) {
var propertySymbol = Zone.__symbol__('ON_PROPERTY' + eventName);
socket[propertySymbol] = proxySocket[propertySymbol];
}
}
return socket[propName].apply(socket, args);
};
});
}
else {
// we can patch the real socket
proxySocket = socket;
}
api.patchOnProperties(proxySocket, ['close', 'error', 'message', 'open'], proxySocketProto);
return proxySocket;
};
var globalWebSocket = _global['WebSocket'];
for (var prop in WS) {
globalWebSocket[prop] = WS[prop];
}
}
/**
* @fileoverview
* @suppress {globalThis}
*/
function propertyDescriptorLegacyPatch(api, _global) {
var _a = api.getGlobalObjects(), isNode = _a.isNode, isMix = _a.isMix;
if (isNode && !isMix) {
return;
}
if (!canPatchViaPropertyDescriptor(api, _global)) {
var supportsWebSocket = typeof WebSocket !== 'undefined';
// Safari, Android browsers (Jelly Bean)
patchViaCapturingAllTheEvents(api);
api.patchClass('XMLHttpRequest');
if (supportsWebSocket) {
apply(api, _global);
}
Zone[api.symbol('patchEvents')] = true;
}
}
function canPatchViaPropertyDescriptor(api, _global) {
var _a = api.getGlobalObjects(), isBrowser = _a.isBrowser, isMix = _a.isMix;
if ((isBrowser || isMix) &&
!api.ObjectGetOwnPropertyDescriptor(HTMLElement.prototype, 'onclick') &&
typeof Element !== 'undefined') {
// WebKit https://bugs.webkit.org/show_bug.cgi?id=134364
// IDL interface attributes are not configurable
var desc = api.ObjectGetOwnPropertyDescriptor(Element.prototype, 'onclick');
if (desc && !desc.configurable)
return false;
// try to use onclick to detect whether we can patch via propertyDescriptor
// because XMLHttpRequest is not available in service worker
if (desc) {
api.ObjectDefineProperty(Element.prototype, 'onclick', {
enumerable: true,
configurable: true,
get: function () {
return true;
}
});
var div = document.createElement('div');
var result = !!div.onclick;
api.ObjectDefineProperty(Element.prototype, 'onclick', desc);
return result;
}
}
var XMLHttpRequest = _global['XMLHttpRequest'];
if (!XMLHttpRequest) {
// XMLHttpRequest is not available in service worker
return false;
}
var ON_READY_STATE_CHANGE = 'onreadystatechange';
var XMLHttpRequestPrototype = XMLHttpRequest.prototype;
var xhrDesc = api.ObjectGetOwnPropertyDescriptor(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE);
// add enumerable and configurable here because in opera
// by default XMLHttpRequest.prototype.onreadystatechange is undefined
// without adding enumerable and configurable will cause onreadystatechange
// non-configurable
// and if XMLHttpRequest.prototype.onreadystatechange is undefined,
// we should set a real desc instead a fake one
if (xhrDesc) {
api.ObjectDefineProperty(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE, {
enumerable: true,
configurable: true,
get: function () {
return true;
}
});
var req = new XMLHttpRequest();
var result = !!req.onreadystatechange;
// restore original desc
api.ObjectDefineProperty(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE, xhrDesc || {});
return result;
}
else {
var SYMBOL_FAKE_ONREADYSTATECHANGE_1 = api.symbol('fake');
api.ObjectDefineProperty(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE, {
enumerable: true,
configurable: true,
get: function () {
return this[SYMBOL_FAKE_ONREADYSTATECHANGE_1];
},
set: function (value) {
this[SYMBOL_FAKE_ONREADYSTATECHANGE_1] = value;
}
});
var req = new XMLHttpRequest();
var detectFunc = function () { };
req.onreadystatechange = detectFunc;
var result = req[SYMBOL_FAKE_ONREADYSTATECHANGE_1] === detectFunc;
req.onreadystatechange = null;
return result;
}
}
var 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'
];
var documentEventNames = [
'afterscriptexecute', 'beforescriptexecute', 'DOMContentLoaded', 'freeze', 'fullscreenchange',
'mozfullscreenchange', 'webkitfullscreenchange', 'msfullscreenchange', 'fullscreenerror',
'mozfullscreenerror', 'webkitfullscreenerror', 'msfullscreenerror', 'readystatechange',
'visibilitychange', 'resume'
];
var 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'
];
var htmlElementEventNames = [
'beforecopy', 'beforecut', 'beforepaste', 'copy', 'cut', 'paste', 'dragstart', 'loadend',
'animationstart', 'search', 'transitionrun', 'transitionstart', 'webkitanimationend',
'webkitanimationiteration', 'webkitanimationstart', 'webkittransitionend'
];
var 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'
];
var webglEventNames = ['webglcontextrestored', 'webglcontextlost', 'webglcontextcreationerror'];
var formEventNames = ['autocomplete', 'autocompleteerror'];
var detailEventNames = ['toggle'];
var eventNames = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], globalEventHandlersEventNames, true), webglEventNames, true), formEventNames, true), detailEventNames, true), documentEventNames, true), windowEventNames, true), htmlElementEventNames, true), ieElementEventNames, true);
// Whenever any eventListener fires, we check the eventListener target and all parents
// for `onwhatever` properties and replace them with zone-bound functions
// - Chrome (for now)
function patchViaCapturingAllTheEvents(api) {
var unboundKey = api.symbol('unbound');
var _loop_1 = function (i) {
var property = eventNames[i];
var onproperty = 'on' + property;
self.addEventListener(property, function (event) {
var elt = event.target, bound, source;
if (elt) {
source = elt.constructor['name'] + '.' + onproperty;
}
else {
source = 'unknown.' + onproperty;
}
while (elt) {
if (elt[onproperty] && !elt[onproperty][unboundKey]) {
bound = api.wrapWithCurrentZone(elt[onproperty], source);
bound[unboundKey] = elt[onproperty];
elt[onproperty] = bound;
}
elt = elt.parentElement;
}
}, true);
};
for (var i = 0; i < eventNames.length; i++) {
_loop_1(i);
}
}
function registerElementPatch(_global, api) {
var _a = api.getGlobalObjects(), isBrowser = _a.isBrowser, isMix = _a.isMix;
if ((!isBrowser && !isMix) || !('registerElement' in _global.document)) {
return;
}
var callbacks = ['createdCallback', 'attachedCallback', 'detachedCallback', 'attributeChangedCallback'];
api.patchCallbacks(api, document, 'Document', 'registerElement', callbacks);
}
/**
* @fileoverview
* @suppress {missingRequire}
*/
(function (_global) {
var symbolPrefix = _global['__Zone_symbol_prefix'] || '__zone_symbol__';
function __symbol__(name) {
return symbolPrefix + name;
}
_global[__symbol__('legacyPatch')] = function () {
var Zone = _global['Zone'];
Zone.__load_patch('defineProperty', function (global, Zone, api) {
api._redefineProperty = _redefineProperty;
propertyPatch();
});
Zone.__load_patch('registerElement', function (global, Zone, api) {
registerElementPatch(global, api);
});
Zone.__load_patch('EventTargetLegacy', function (global, Zone, api) {
eventTargetLegacyPatch(global, api);
propertyDescriptorLegacyPatch(api, global);
});
};
})(typeof window !== 'undefined' ?
window :
typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {});
}));

6
my-app/node_modules/zone.js/bundles/zone-legacy.umd.min.js generated vendored Executable file

File diff suppressed because one or more lines are too long

3119
my-app/node_modules/zone.js/bundles/zone-mix.umd.js generated vendored Executable file

File diff suppressed because it is too large Load diff

6
my-app/node_modules/zone.js/bundles/zone-mix.umd.min.js generated vendored Executable file

File diff suppressed because one or more lines are too long

2545
my-app/node_modules/zone.js/bundles/zone-node.umd.js generated vendored Executable file

File diff suppressed because it is too large Load diff

6
my-app/node_modules/zone.js/bundles/zone-node.umd.min.js generated vendored Executable file

File diff suppressed because one or more lines are too long

21
my-app/node_modules/zone.js/bundles/zone-patch-canvas.umd.js generated vendored Executable file
View file

@ -0,0 +1,21 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'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 };
});
}
});
}));

View file

@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 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}}))}))}));

View file

@ -0,0 +1,44 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'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];
}
});
});
});
}
});
}));

View file

@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 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]}})}))}))}))}));

View file

@ -0,0 +1,48 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'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;
}
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');
}
return;
}
patchArguments(CallbacksRegistry.prototype, 'add', 'CallbackRegistry.add');
});
}));

View file

@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 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")}))}));

83
my-app/node_modules/zone.js/bundles/zone-patch-fetch.umd.js generated vendored Executable file
View file

@ -0,0 +1,83 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'use strict';
/**
* @fileoverview
* @suppress {missingRequire}
*/
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 placeholder = function () { };
global['fetch'] = function () {
var _this = this;
var args = Array.prototype.slice.call(arguments);
var options = args.length > 1 ? args[1] : {};
var signal = options && 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 new Promise(function (res, rej) {
var task = Zone.current.scheduleMacroTask('fetch', placeholder, { fetchArgs: args }, function () {
var fetchPromise;
var zone = Zone.current;
try {
zone[fetchTaskScheduling] = true;
fetchPromise = fetch.apply(_this, args);
}
catch (error) {
rej(error);
return;
}
finally {
zone[fetchTaskScheduling] = false;
}
if (!(fetchPromise instanceof ZoneAwarePromise)) {
var ctor = fetchPromise.constructor;
if (!ctor[symbolThenPatched]) {
api.patchThen(ctor);
}
}
fetchPromise.then(function (resource) {
if (task.state !== 'notScheduled') {
task.invoke();
}
res(resource);
}, function (error) {
if (task.state !== 'notScheduled') {
task.invoke();
}
rej(error);
});
}, function () {
ac.abort();
});
});
};
});
}));

View file

@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 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 c=n[e.symbol("fetch")];c&&(o=c);var i=n.Promise,r=e.symbol("thenPatched"),a=e.symbol("fetchTaskScheduling"),f=function(){};n.fetch=function(){var n=this,c=Array.prototype.slice.call(arguments),l=c.length>1?c[1]:{},s=l&&l.signal,u=new AbortController;return l.signal=u.signal,c[1]=l,s&&(s[t.__symbol__("addEventListener")]||s.addEventListener).call(s,"abort",(function(){u.abort()}),{once:!0}),new Promise((function(l,s){var h=t.current.scheduleMacroTask("fetch",f,{fetchArgs:c},(function(){var f,u=t.current;try{u[a]=!0,f=o.apply(n,c)}catch(n){return void s(n)}finally{u[a]=!1}if(!(f instanceof i)){var d=f.constructor;d[r]||e.patchThen(d)}f.then((function(n){"notScheduled"!==h.state&&h.invoke(),l(n)}),(function(n){"notScheduled"!==h.state&&h.invoke(),s(n)}))}),(function(){u.abort()}))}))}}}))}));

80
my-app/node_modules/zone.js/bundles/zone-patch-jsonp.umd.js generated vendored Executable file
View file

@ -0,0 +1,80 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'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) {
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);
}
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 delegate.apply(self, args);
}, noop);
}; });
};
});
}));

View file

@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 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)}}))}}}))}));

View file

@ -0,0 +1,22 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'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']);
}
});
}));

View file

@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 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"])}))}));

View file

@ -0,0 +1,70 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'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;
}
}
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;
}
};
});
}));

View file

@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 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)}}))}));

View file

@ -0,0 +1,91 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'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;
}
var zoneEntriesInfo = zones[zone.name];
if (!zoneEntriesInfo) {
zones[zone.name] = zoneEntriesInfo = { entries: [], zone: zone };
}
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);
}
});
};
}
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;
}
}
}
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);
}; });
});
}));

View file

@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 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)}}))}}))}));

View file

@ -0,0 +1,179 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'use strict';
var ProxyZoneSpec = /** @class */ (function () {
function ProxyZoneSpec(defaultSpecDelegate) {
if (defaultSpecDelegate === void 0) { defaultSpecDelegate = null; }
this.defaultSpecDelegate = defaultSpecDelegate;
this.name = 'ProxyZone';
this._delegateSpec = null;
this.properties = { 'ProxyZoneSpec': this };
this.propertyKeys = null;
this.lastTaskState = null;
this.isNeedToTriggerHasTask = false;
this.tasks = [];
this.setDelegate(defaultSpecDelegate);
}
ProxyZoneSpec.get = function () {
return Zone.current.get('ProxyZoneSpec');
};
ProxyZoneSpec.isLoaded = function () {
return ProxyZoneSpec.get() instanceof ProxyZoneSpec;
};
ProxyZoneSpec.assertPresent = function () {
if (!ProxyZoneSpec.isLoaded()) {
throw new Error("Expected to be running in 'ProxyZone', but it was not found.");
}
return ProxyZoneSpec.get();
};
ProxyZoneSpec.prototype.setDelegate = function (delegateSpec) {
var _this = this;
var isNewDelegate = this._delegateSpec !== delegateSpec;
this._delegateSpec = delegateSpec;
this.propertyKeys && this.propertyKeys.forEach(function (key) { return delete _this.properties[key]; });
this.propertyKeys = null;
if (delegateSpec && delegateSpec.properties) {
this.propertyKeys = Object.keys(delegateSpec.properties);
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 &&
(this.lastTaskState.macroTask || this.lastTaskState.microTask)) {
this.isNeedToTriggerHasTask = true;
}
};
ProxyZoneSpec.prototype.getDelegate = function () {
return this._delegateSpec;
};
ProxyZoneSpec.prototype.resetDelegate = function () {
this.getDelegate();
this.setDelegate(this.defaultSpecDelegate);
};
ProxyZoneSpec.prototype.tryTriggerHasTask = function (parentZoneDelegate, currentZone, targetZone) {
if (this.isNeedToTriggerHasTask && this.lastTaskState) {
// last delegateSpec has microTask or macroTask
// should call onHasTask in current delegateSpec
this.isNeedToTriggerHasTask = false;
this.onHasTask(parentZoneDelegate, currentZone, targetZone, this.lastTaskState);
}
};
ProxyZoneSpec.prototype.removeFromTasks = function (task) {
if (!this.tasks) {
return;
}
for (var i = 0; i < this.tasks.length; i++) {
if (this.tasks[i] === task) {
this.tasks.splice(i, 1);
return;
}
}
};
ProxyZoneSpec.prototype.getAndClearPendingTasksInfo = function () {
if (this.tasks.length === 0) {
return '';
}
var taskInfo = this.tasks.map(function (task) {
var dataInfo = task.data &&
Object.keys(task.data)
.map(function (key) {
return key + ':' + task.data[key];
})
.join(',');
return "type: ".concat(task.type, ", source: ").concat(task.source, ", args: {").concat(dataInfo, "}");
});
var pendingTasksInfo = '--Pending async tasks are: [' + taskInfo + ']';
// clear tasks
this.tasks = [];
return pendingTasksInfo;
};
ProxyZoneSpec.prototype.onFork = function (parentZoneDelegate, currentZone, targetZone, zoneSpec) {
if (this._delegateSpec && this._delegateSpec.onFork) {
return this._delegateSpec.onFork(parentZoneDelegate, currentZone, targetZone, zoneSpec);
}
else {
return parentZoneDelegate.fork(targetZone, zoneSpec);
}
};
ProxyZoneSpec.prototype.onIntercept = function (parentZoneDelegate, currentZone, targetZone, delegate, source) {
if (this._delegateSpec && this._delegateSpec.onIntercept) {
return this._delegateSpec.onIntercept(parentZoneDelegate, currentZone, targetZone, delegate, source);
}
else {
return parentZoneDelegate.intercept(targetZone, delegate, source);
}
};
ProxyZoneSpec.prototype.onInvoke = function (parentZoneDelegate, currentZone, targetZone, delegate, applyThis, applyArgs, source) {
this.tryTriggerHasTask(parentZoneDelegate, currentZone, targetZone);
if (this._delegateSpec && this._delegateSpec.onInvoke) {
return this._delegateSpec.onInvoke(parentZoneDelegate, currentZone, targetZone, delegate, applyThis, applyArgs, source);
}
else {
return parentZoneDelegate.invoke(targetZone, delegate, applyThis, applyArgs, source);
}
};
ProxyZoneSpec.prototype.onHandleError = function (parentZoneDelegate, currentZone, targetZone, error) {
if (this._delegateSpec && this._delegateSpec.onHandleError) {
return this._delegateSpec.onHandleError(parentZoneDelegate, currentZone, targetZone, error);
}
else {
return parentZoneDelegate.handleError(targetZone, error);
}
};
ProxyZoneSpec.prototype.onScheduleTask = function (parentZoneDelegate, currentZone, targetZone, task) {
if (task.type !== 'eventTask') {
this.tasks.push(task);
}
if (this._delegateSpec && this._delegateSpec.onScheduleTask) {
return this._delegateSpec.onScheduleTask(parentZoneDelegate, currentZone, targetZone, task);
}
else {
return parentZoneDelegate.scheduleTask(targetZone, task);
}
};
ProxyZoneSpec.prototype.onInvokeTask = function (parentZoneDelegate, currentZone, targetZone, task, applyThis, applyArgs) {
if (task.type !== 'eventTask') {
this.removeFromTasks(task);
}
this.tryTriggerHasTask(parentZoneDelegate, currentZone, targetZone);
if (this._delegateSpec && this._delegateSpec.onInvokeTask) {
return this._delegateSpec.onInvokeTask(parentZoneDelegate, currentZone, targetZone, task, applyThis, applyArgs);
}
else {
return parentZoneDelegate.invokeTask(targetZone, task, applyThis, applyArgs);
}
};
ProxyZoneSpec.prototype.onCancelTask = function (parentZoneDelegate, currentZone, targetZone, task) {
if (task.type !== 'eventTask') {
this.removeFromTasks(task);
}
this.tryTriggerHasTask(parentZoneDelegate, currentZone, targetZone);
if (this._delegateSpec && this._delegateSpec.onCancelTask) {
return this._delegateSpec.onCancelTask(parentZoneDelegate, currentZone, targetZone, task);
}
else {
return parentZoneDelegate.cancelTask(targetZone, task);
}
};
ProxyZoneSpec.prototype.onHasTask = function (delegate, current, target, hasTaskState) {
this.lastTaskState = hasTaskState;
if (this._delegateSpec && this._delegateSpec.onHasTask) {
this._delegateSpec.onHasTask(delegate, current, target, hasTaskState);
}
else {
delegate.hasTask(target, hasTaskState);
}
};
return ProxyZoneSpec;
}());
// Export the class so that new instances can be created with proper
// constructor params.
Zone['ProxyZoneSpec'] = ProxyZoneSpec;
}));

View file

@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 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}));

201
my-app/node_modules/zone.js/bundles/zone-patch-rxjs.umd.js generated vendored Executable file
View file

@ -0,0 +1,201 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 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) :
(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();
});
}));

View file

@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 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)}}))}));

View file

@ -0,0 +1,29 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'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;
};
});
}));

View file

@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 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}}))}));

View file

@ -0,0 +1,25 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'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);
}
});
}));

View file

@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2022 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))}))}));

2223
my-app/node_modules/zone.js/bundles/zone-testing.umd.js generated vendored Executable file

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

2845
my-app/node_modules/zone.js/bundles/zone.umd.js generated vendored Executable file

File diff suppressed because it is too large Load diff

6
my-app/node_modules/zone.js/bundles/zone.umd.min.js generated vendored Executable file

File diff suppressed because one or more lines are too long