Socket
Socket
Sign inDemoInstall

zone.js

Package Overview
Dependencies
Maintainers
2
Versions
124
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zone.js - npm Package Compare versions

Comparing version 0.9.1 to 0.10.0

dist/async-test.min.js

444

dist/async-test.js
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, (function () { 'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
var _global = typeof window !== 'undefined' && window || typeof self !== 'undefined' && self || global;
var AsyncTestZoneSpec = /** @class */ (function () {
function AsyncTestZoneSpec(finishCallback, failCallback, namePrefix) {
this.finishCallback = finishCallback;
this.failCallback = failCallback;
this._pendingMicroTasks = false;
this._pendingMacroTasks = false;
this._alreadyErrored = false;
this._isSync = false;
this.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;
if (!(this._pendingMicroTasks || this._pendingMacroTasks ||
(this.supportWaitUnresolvedChainedPromise && this.isUnresolvedChainedPromisePending()))) {
// We do this because we would like to catch unhandled rejected promises.
this.runZone.run(function () {
setTimeout(function () {
if (!_this._alreadyErrored && !(_this._pendingMicroTasks || _this._pendingMacroTasks)) {
_this.finishCallback();
}
}, 0);
});
}
};
AsyncTestZoneSpec.prototype.patchPromiseForTest = function () {
if (!this.supportWaitUnresolvedChainedPromise) {
return;
}
var patchPromiseForTest = Promise[Zone.__symbol__('patchPromiseForTest')];
if (patchPromiseForTest) {
patchPromiseForTest();
}
};
AsyncTestZoneSpec.prototype.unPatchPromiseForTest = function () {
if (!this.supportWaitUnresolvedChainedPromise) {
return;
}
var unPatchPromiseForTest = Promise[Zone.__symbol__('unPatchPromiseForTest')];
if (unPatchPromiseForTest) {
unPatchPromiseForTest();
}
};
AsyncTestZoneSpec.prototype.onScheduleTask = function (delegate, current, target, task) {
if (task.type !== 'eventTask') {
this._isSync = false;
}
if (task.type === 'microTask' && task.data && task.data instanceof Promise) {
// check whether the promise is a chained promise
if (task.data[AsyncTestZoneSpec.symbolParentUnresolved] === true) {
// chained promise is being scheduled
this.unresolvedChainedPromiseCount--;
}
}
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) {
try {
this._isSync = true;
return parentZoneDelegate.invoke(targetZone, delegate, applyThis, applyArgs, source);
}
finally {
var afterTaskCounts = parentZoneDelegate._taskCounts;
if (this._isSync) {
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);
if (hasTaskState.change == 'microTask') {
this._pendingMicroTasks = hasTaskState.microTask;
this._finishCallbackIfDone();
}
else if (hasTaskState.change == 'macroTask') {
this._pendingMacroTasks = hasTaskState.macroTask;
this._finishCallbackIfDone();
}
};
AsyncTestZoneSpec.symbolParentUnresolved = Zone.__symbol__('parentUnresolved');
return AsyncTestZoneSpec;
}());
// Export the class so that new instances can be created with proper
// constructor params.
Zone['AsyncTestZoneSpec'] = AsyncTestZoneSpec;
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
Zone.__load_patch('asynctest', function (global, Zone, api) {
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
}(function () {
'use strict';
/**
* Wraps a test function in an asynchronous test zone. The test will automatically
* complete when all asynchronous calls within this zone are done.
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
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;
};
(function (_global) {
var AsyncTestZoneSpec = /** @class */ (function () {
function AsyncTestZoneSpec(finishCallback, failCallback, namePrefix) {
this.finishCallback = finishCallback;
this.failCallback = failCallback;
this._pendingMicroTasks = false;
this._pendingMacroTasks = false;
this._alreadyErrored = false;
this._isSync = false;
this.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;
if (!(this._pendingMicroTasks || this._pendingMacroTasks ||
(this.supportWaitUnresolvedChainedPromise &&
this.isUnresolvedChainedPromisePending()))) {
// We do this because we would like to catch unhandled rejected promises.
this.runZone.run(function () {
setTimeout(function () {
if (!_this._alreadyErrored && !(_this._pendingMicroTasks || _this._pendingMacroTasks)) {
_this.finishCallback();
}
}, 0);
});
}
runInTestZone(fn, this, done, function (err) {
if (typeof err === 'string') {
return done.fail(new Error(err));
};
AsyncTestZoneSpec.prototype.patchPromiseForTest = function () {
if (!this.supportWaitUnresolvedChainedPromise) {
return;
}
var patchPromiseForTest = Promise[Zone.__symbol__('patchPromiseForTest')];
if (patchPromiseForTest) {
patchPromiseForTest();
}
};
AsyncTestZoneSpec.prototype.unPatchPromiseForTest = function () {
if (!this.supportWaitUnresolvedChainedPromise) {
return;
}
var unPatchPromiseForTest = Promise[Zone.__symbol__('unPatchPromiseForTest')];
if (unPatchPromiseForTest) {
unPatchPromiseForTest();
}
};
AsyncTestZoneSpec.prototype.onScheduleTask = function (delegate, current, target, task) {
if (task.type !== 'eventTask') {
this._isSync = false;
}
if (task.type === 'microTask' && task.data && task.data instanceof Promise) {
// check whether the promise is a chained promise
if (task.data[AsyncTestZoneSpec.symbolParentUnresolved] === true) {
// chained promise is being scheduled
this.unresolvedChainedPromiseCount--;
}
else {
done.fail(err);
}
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) {
try {
this._isSync = true;
return parentZoneDelegate.invoke(targetZone, delegate, applyThis, applyArgs, source);
}
finally {
var afterTaskCounts = parentZoneDelegate._taskCounts;
if (this._isSync) {
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);
if (hasTaskState.change == 'microTask') {
this._pendingMicroTasks = hasTaskState.microTask;
this._finishCallbackIfDone();
}
else if (hasTaskState.change == 'macroTask') {
this._pendingMacroTasks = hasTaskState.macroTask;
this._finishCallbackIfDone();
}
};
return AsyncTestZoneSpec;
}());
AsyncTestZoneSpec.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);
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
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);
});
};
}
// 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/dist/async-test.js');
}
var ProxyZoneSpec = Zone['ProxyZoneSpec'];
if (ProxyZoneSpec === undefined) {
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/dist/proxy.js');
}
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
// sill 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();
});
};
};
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/dist/async-test.js');
return Zone.current.runGuarded(fn, context);
}
var ProxyZoneSpec = Zone['ProxyZoneSpec'];
if (ProxyZoneSpec === undefined) {
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/dist/proxy.js');
}
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
// sill 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);
}
});
})));
});
}));
//# sourceMappingURL=async_test_rollup.umd.js.map
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, (function () { 'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
var __read = (undefined && undefined.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
var __spread = (undefined && undefined.__spread) || function () {
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
return ar;
};
(function (global) {
var OriginalDate = global.Date;
var FakeDate = /** @class */ (function () {
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, __spread([void 0], args)))();
}
}
FakeDate.now = function () {
var fakeAsyncTestZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');
if (fakeAsyncTestZoneSpec) {
return fakeAsyncTestZoneSpec.getCurrentRealTime() + fakeAsyncTestZoneSpec.getCurrentTime();
}
return OriginalDate.now.apply(this, arguments);
};
return FakeDate;
}());
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._currentTime = 0;
// Current real time in millis.
this._currentRealTime = OriginalDate.now();
}
Scheduler.prototype.getCurrentTime = function () {
return this._currentTime;
};
Scheduler.prototype.getCurrentRealTime = function () {
return this._currentRealTime;
};
Scheduler.prototype.setCurrentRealTime = function (realTime) {
this._currentRealTime = realTime;
};
Scheduler.prototype.scheduleFunction = function (cb, delay, args, isPeriodic, isRequestAnimationFrame, id) {
if (args === void 0) { args = []; }
if (isPeriodic === void 0) { isPeriodic = false; }
if (isRequestAnimationFrame === void 0) { isRequestAnimationFrame = false; }
if (id === void 0) { id = -1; }
var currentId = id < 0 ? Scheduler.nextId++ : id;
var endTime = this._currentTime + delay;
// Insert so that scheduler queue remains sorted by end time.
var newEntry = {
endTime: endTime,
id: currentId,
func: cb,
args: args,
delay: delay,
isPeriodic: isPeriodic,
isRequestAnimationFrame: isRequestAnimationFrame
};
var i = 0;
for (; i < this._schedulerQueue.length; i++) {
var currentEntry = this._schedulerQueue[i];
if (newEntry.endTime < currentEntry.endTime) {
break;
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
}(function () {
'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (global) {
var OriginalDate = global.Date;
var FakeDate = /** @class */ (function () {
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, [void 0].concat(args)))();
}
}
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;
FakeDate.now = function () {
var fakeAsyncTestZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');
if (fakeAsyncTestZoneSpec) {
return fakeAsyncTestZoneSpec.getCurrentRealTime() + fakeAsyncTestZoneSpec.getCurrentTime();
}
}
return OriginalDate.now.apply(this, arguments);
};
return FakeDate;
}());
FakeDate.UTC = OriginalDate.UTC;
FakeDate.parse = OriginalDate.parse;
// keep a reference for zone patched timer function
var timers = {
setTimeout: global.setTimeout,
setInterval: global.setInterval,
clearTimeout: global.clearTimeout,
clearInterval: global.clearInterval
};
Scheduler.prototype.tick = function (millis, doTick) {
if (millis === void 0) { millis = 0; }
var finalTime = this._currentTime + millis;
var lastCurrentTime = 0;
if (this._schedulerQueue.length === 0 && doTick) {
doTick(millis);
return;
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._currentTime = 0;
// Current real time in millis.
this._currentRealTime = OriginalDate.now();
}
while (this._schedulerQueue.length > 0) {
var current = this._schedulerQueue[0];
if (finalTime < current.endTime) {
// Done processing the queue since it's sorted by endTime.
break;
Scheduler.prototype.getCurrentTime = function () { return this._currentTime; };
Scheduler.prototype.getCurrentRealTime = function () { return this._currentRealTime; };
Scheduler.prototype.setCurrentRealTime = function (realTime) { this._currentRealTime = realTime; };
Scheduler.prototype.scheduleFunction = function (cb, delay, args, isPeriodic, isRequestAnimationFrame, id) {
if (args === void 0) { args = []; }
if (isPeriodic === void 0) { isPeriodic = false; }
if (isRequestAnimationFrame === void 0) { isRequestAnimationFrame = false; }
if (id === void 0) { id = -1; }
var currentId = id < 0 ? Scheduler.nextId++ : id;
var endTime = this._currentTime + delay;
// Insert so that scheduler queue remains sorted by end time.
var newEntry = {
endTime: endTime,
id: currentId,
func: cb,
args: args,
delay: delay,
isPeriodic: isPeriodic,
isRequestAnimationFrame: isRequestAnimationFrame
};
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.tick = function (millis, doTick) {
if (millis === void 0) { millis = 0; }
var finalTime = this._currentTime + millis;
var lastCurrentTime = 0;
if (this._schedulerQueue.length === 0 && doTick) {
doTick(millis);
return;
}
while (this._schedulerQueue.length > 0) {
var current = this._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 = this._schedulerQueue.shift();
lastCurrentTime = this._currentTime;
this._currentTime = current_1.endTime;
if (doTick) {
doTick(this._currentTime - lastCurrentTime);
}
var retval = current_1.func.apply(global, current_1.isRequestAnimationFrame ? [this._currentTime] : current_1.args);
if (!retval) {
// Uncaught exception in the current scheduled function. Stop processing the queue.
break;
}
}
}
lastCurrentTime = this._currentTime;
this._currentTime = finalTime;
if (doTick) {
doTick(this._currentTime - lastCurrentTime);
}
};
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 {
// Time to run scheduled function. Remove it from the head of queue.
var current_1 = this._schedulerQueue.shift();
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._currentTime;
var lastTask = this._schedulerQueue[this._schedulerQueue.length - 1];
this.tick(lastTask.endTime - startTime, doTick);
return this._currentTime - startTime;
};
Scheduler.prototype.flushNonPeriodic = function (limit, doTick) {
var startTime = this._currentTime;
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._currentTime;
this._currentTime = current_1.endTime;
this._currentTime = current.endTime;
if (doTick) {
// Update any secondary schedulers like Jasmine mock Date.
doTick(this._currentTime - lastCurrentTime);
}
var retval = current_1.func.apply(global, current_1.isRequestAnimationFrame ? [this._currentTime] : current_1.args);
var retval = current.func.apply(global, current.args);
if (!retval) {

@@ -154,533 +182,462 @@ // Uncaught exception in the current scheduled function. Stop processing the queue.

}
}
lastCurrentTime = this._currentTime;
this._currentTime = finalTime;
if (doTick) {
doTick(this._currentTime - lastCurrentTime);
}
};
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._currentTime;
var lastTask = this._schedulerQueue[this._schedulerQueue.length - 1];
this.tick(lastTask.endTime - startTime, doTick);
return this._currentTime - startTime;
};
Scheduler.prototype.flushNonPeriodic = function (limit, doTick) {
var startTime = this._currentTime;
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._currentTime;
this._currentTime = current.endTime;
if (doTick) {
// Update any secondary schedulers like Jasmine mock Date.
doTick(this._currentTime - 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._currentTime - startTime;
};
return this._currentTime - startTime;
};
return Scheduler;
}());
// Next scheduler id.
Scheduler.nextId = 1;
return Scheduler;
}());
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')];
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];
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');
}
fn.apply(global, args);
if (_this._lastError === null) { // Success
if (completers.onSuccess != null) {
completers.onSuccess.apply(global);
};
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];
}
// Flush microtasks only on success.
_this.flushMicrotasks();
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);
}
else { // Failure
if (completers.onError != null) {
completers.onError.apply(global);
};
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, true, false, id);
}
};
};
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, false, !isTimer);
if (isTimer) {
this.pendingTimers.push(id);
}
// Return true if there were no errors, false otherwise.
return _this._lastError === null;
return id;
};
};
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._clearTimeout = function (id) {
FakeAsyncTestZoneSpec._removeTimer(this.pendingTimers, id);
this._scheduler.removeScheduledFunctionWithId(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, true, false, 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, 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.getCurrentTime = function () { return this._scheduler.getCurrentTime(); };
FakeAsyncTestZoneSpec.prototype.getCurrentRealTime = function () { return this._scheduler.getCurrentRealTime(); };
FakeAsyncTestZoneSpec.prototype.setCurrentRealTime = function (realTime) { this._scheduler.setCurrentRealTime(realTime); };
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.prototype._dequeuePeriodicTimer = function (id) {
var _this = this;
return function () {
FakeAsyncTestZoneSpec._removeTimer(_this.pendingPeriodicTimers, id);
FakeAsyncTestZoneSpec.resetDate = function () {
if (global['Date'] === FakeDate) {
global['Date'] = OriginalDate;
}
};
};
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, false, !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, 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.getCurrentTime = function () {
return this._scheduler.getCurrentTime();
};
FakeAsyncTestZoneSpec.prototype.getCurrentRealTime = function () {
return this._scheduler.getCurrentRealTime();
};
FakeAsyncTestZoneSpec.prototype.setCurrentRealTime = function (realTime) {
this._scheduler.setCurrentRealTime(realTime);
};
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.tick = function (millis, doTick) {
if (millis === void 0) { millis = 0; }
FakeAsyncTestZoneSpec.assertInZone();
this.flushMicrotasks();
this._scheduler.tick(millis, doTick);
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();
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;
}
};
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.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);
FakeAsyncTestZoneSpec.prototype.lockDatePatch = function () {
this.patchDateLocked = true;
FakeAsyncTestZoneSpec.patchDate();
};
FakeAsyncTestZoneSpec.prototype.unlockDatePatch = function () {
this.patchDateLocked = false;
FakeAsyncTestZoneSpec.resetDate();
};
FakeAsyncTestZoneSpec.prototype.tick = function (millis, doTick) {
if (millis === void 0) { millis = 0; }
FakeAsyncTestZoneSpec.assertInZone();
this.flushMicrotasks();
this._scheduler.tick(millis, doTick);
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.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;
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;
}
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);
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();
}
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);
}
};
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 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);
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
Zone.__load_patch('fakeasync', function (global, Zone, api) {
var FakeAsyncTestZoneSpec = Zone && Zone['FakeAsyncTestZoneSpec'];
var ProxyZoneSpec = Zone && Zone['ProxyZoneSpec'];
var _fakeAsyncTestZoneSpec = 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);
/**
* Clears out the shared fake async zone for a test.
* To be called in a global `beforeEach`.
* @license
* Copyright Google Inc. All Rights Reserved.
*
* @experimental
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function resetFakeAsyncZone() {
if (_fakeAsyncTestZoneSpec) {
_fakeAsyncTestZoneSpec.unlockDatePatch();
Zone.__load_patch('fakeasync', function (global, Zone, api) {
var FakeAsyncTestZoneSpec = Zone && Zone['FakeAsyncTestZoneSpec'];
var ProxyZoneSpec = 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.
ProxyZoneSpec && ProxyZoneSpec.assertPresent().resetDelegate();
}
_fakeAsyncTestZoneSpec = null;
// in node.js testing we may not have ProxyZoneSpec in which case there is nothing to reset.
ProxyZoneSpec && ProxyZoneSpec.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
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
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();
/**
* 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
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var res = void 0;
var lastProxyZoneSpec = proxyZoneSpec.getDelegate();
proxyZoneSpec.setDelegate(_fakeAsyncTestZoneSpec);
_fakeAsyncTestZoneSpec.lockDatePatch();
var proxyZoneSpec = ProxyZoneSpec.assertPresent();
if (Zone.current.get('FakeAsyncTestZoneSpec')) {
throw new Error('fakeAsync() calls can not be nested');
}
try {
res = fn.apply(this, args);
flushMicrotasks();
// 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(_fakeAsyncTestZoneSpec.pendingPeriodicTimers.length + " " +
"periodic timer(s) still in the queue.");
}
if (_fakeAsyncTestZoneSpec.pendingTimers.length > 0) {
throw new Error(_fakeAsyncTestZoneSpec.pendingTimers.length + " timer(s) still in the queue.");
}
return res;
}
finally {
proxyZoneSpec.setDelegate(lastProxyZoneSpec);
resetFakeAsyncZone();
}
if (_fakeAsyncTestZoneSpec.pendingPeriodicTimers.length > 0) {
throw new Error(_fakeAsyncTestZoneSpec.pendingPeriodicTimers.length + " " +
"periodic timer(s) still in the queue.");
};
}
function _getFakeAsyncZoneSpec() {
if (_fakeAsyncTestZoneSpec == null) {
_fakeAsyncTestZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');
if (_fakeAsyncTestZoneSpec == null) {
throw new Error('The code should be running in the fakeAsync zone to call this function');
}
if (_fakeAsyncTestZoneSpec.pendingTimers.length > 0) {
throw new Error(_fakeAsyncTestZoneSpec.pendingTimers.length + " timer(s) still in the queue.");
}
return res;
}
finally {
resetFakeAsyncZone();
}
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) {
if (millis === void 0) { millis = 0; }
_getFakeAsyncZoneSpec().tick(millis);
}
/**
* 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();
var pendingTimers = 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
};
}
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) {
if (millis === void 0) { millis = 0; }
_getFakeAsyncZoneSpec().tick(millis);
}
/**
* 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();
var pendingTimers = 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 };
});
})));
});
}));
//# sourceMappingURL=fake_async_test_rollup.umd.js.map
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, (function () { 'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
(function () {
var __extends = function (d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
}(function () {
'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (_global) {
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 jasmine == 'undefined')
throw new Error('Missing: jasmine.js');
if (jasmine['__zone_patch__'])
throw new Error("'jasmine' has already been patched with 'Zone'.");
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;
// 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` but outside of
// a `beforeEach` or `it`.
var syncZone = ambientZone.fork(new SyncTestZoneSpec('jasmine.describe'));
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 originalHandlers = process.listeners('unhandledRejection');
var r = originalInstall.apply(this, arguments);
process.removeAllListeners('unhandledRejection');
if (originalHandlers) {
originalHandlers.forEach(function (h) { return process.on('unhandledRejection', h); });
}
return r;
};
}
return instance;
};
}
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var _global = typeof window !== 'undefined' && window || typeof self !== 'undefined' && self || global;
// 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 jasmine == 'undefined')
throw new Error('Missing: jasmine.js');
if (jasmine['__zone_patch__'])
throw new Error("'jasmine' has already been patched with 'Zone'.");
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;
// 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` but outside of
// a `beforeEach` or `it`.
var syncZone = ambientZone.fork(new SyncTestZoneSpec('jasmine.describe'));
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 originalHandlers = process.listeners('unhandledRejection');
var r = originalInstall.apply(this, arguments);
process.removeAllListeners('unhandledRejection');
if (originalHandlers) {
originalHandlers.forEach(function (h) { return process.on('unhandledRejection', h); });
// 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(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 r;
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.setCurrentRealTime.apply(fakeAsyncZoneSpec, dateTime && typeof dateTime.getTime === 'function' ?
[dateTime.getTime()] :
arguments);
}
return originalMockDate_1.apply(this, arguments);
};
// for auto go into fakeAsync feature, we need the flag to enable it
if (enableAutoFakeAsyncWhenClockPatched) {
['install', 'uninstall'].forEach(function (methodName) {
var originalClockFn = (clock[symbol(methodName)] = clock[methodName]);
clock[methodName] = function () {
var FakeAsyncTestZoneSpec = Zone['FakeAsyncTestZoneSpec'];
if (FakeAsyncTestZoneSpec) {
jasmine[symbol('clockInstalled')] = 'install' === methodName;
return;
}
return originalClockFn.apply(this, arguments);
};
});
}
}
return instance;
return clock;
};
}
}
// Monkey patch all of the jasmine DSL so that each function runs in appropriate zone.
var jasmineEnv = jasmine.getEnv();
['describe', 'xdescribe', 'fdescribe'].forEach(function (methodName) {
var originalJasmineFn = jasmineEnv[methodName];
jasmineEnv[methodName] = function (description, specDefinitions) {
return originalJasmineFn.call(this, description, wrapDescribeInZone(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.setCurrentRealTime.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);
};
});
/**
* Gets a function wrapping the body of a Jasmine `describe` block to execute in a
* synchronous-only zone.
*/
function wrapDescribeInZone(describeBody) {
return function () {
return syncZone.run(describeBody, this, arguments);
};
}
function runInTestZone(testBody, applyThis, queueRunner, done) {
var isClockInstalled = !!jasmine[symbol('clockInstalled')];
var testProxyZoneSpec = 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);
}
}
return clock;
};
}
/**
* Gets a function wrapping the body of a Jasmine `describe` block to execute in a
* synchronous-only zone.
*/
function wrapDescribeInZone(describeBody) {
return function () {
return syncZone.run(describeBody, this, arguments);
};
}
function runInTestZone(testBody, applyThis, queueRunner, done) {
var isClockInstalled = !!jasmine[symbol('clockInstalled')];
var testProxyZoneSpec = 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);
}
}
if (done) {
return testProxyZone.run(testBody, applyThis, [done]);
/**
* Gets a function wrapping the body of a Jasmine `it/beforeEach/afterEach` block to
* execute in a ProxyZone zone.
* This will run in `testProxyZone`. The `testProxyZone` will be reset by the `ZoneQueueRunner`
*/
function wrapTestInZone(testBody) {
// The `done` callback is only passed through if the function expects at least one argument.
// Note we have to make a function with correct number of arguments, otherwise jasmine will
// think that all functions are sync or async.
return (testBody && (testBody.length ? function (done) {
return runInTestZone(testBody, this, this.queueRunner, done);
} : function () {
return runInTestZone(testBody, this, this.queueRunner);
}));
}
else {
return testProxyZone.run(testBody, applyThis);
}
}
/**
* Gets a function wrapping the body of a Jasmine `it/beforeEach/afterEach` block to
* execute in a ProxyZone zone.
* This will run in `testProxyZone`. The `testProxyZone` will be reset by the `ZoneQueueRunner`
*/
function wrapTestInZone(testBody) {
// The `done` callback is only passed through if the function expects at least one argument.
// Note we have to make a function with correct number of arguments, otherwise jasmine will
// think that all functions are sync or async.
return (testBody && (testBody.length ? function (done) {
return runInTestZone(testBody, this, this.queueRunner, done);
} : function () {
return runInTestZone(testBody, this, this.queueRunner);
}));
}
var QueueRunner = jasmine.QueueRunner;
jasmine.QueueRunner = (function (_super) {
__extends(ZoneQueueRunner, _super);
function ZoneQueueRunner(attrs) {
var _this = this;
attrs.onComplete = (function (fn) { return function () {
// All functions are done, clear the test zone.
_this.testProxyZone = null;
_this.testProxyZoneSpec = null;
ambientZone.scheduleMicroTask('jasmine.onComplete', fn);
}; })(attrs.onComplete);
var nativeSetTimeout = _global['__zone_symbol__setTimeout'];
var nativeClearTimeout = _global['__zone_symbol__clearTimeout'];
if (nativeSetTimeout) {
// should run setTimeout inside jasmine outside of zone
attrs.timeout = {
setTimeout: nativeSetTimeout ? nativeSetTimeout : _global.setTimeout,
clearTimeout: nativeClearTimeout ? nativeClearTimeout : _global.clearTimeout
};
}
// create a userContext to hold the queueRunner itself
// so we can access the testProxy in it/xit/beforeEach ...
if (jasmine.UserContext) {
if (!attrs.userContext) {
attrs.userContext = new jasmine.UserContext();
var QueueRunner = jasmine.QueueRunner;
jasmine.QueueRunner = (function (_super) {
__extends(ZoneQueueRunner, _super);
function ZoneQueueRunner(attrs) {
var _this = this;
if (attrs.onComplete) {
attrs.onComplete = (function (fn) { return function () {
// All functions are done, clear the test zone.
_this.testProxyZone = null;
_this.testProxyZoneSpec = null;
ambientZone.scheduleMicroTask('jasmine.onComplete', fn);
}; })(attrs.onComplete);
}
attrs.userContext.queueRunner = this;
}
else {
if (!attrs.userContext) {
attrs.userContext = {};
var nativeSetTimeout = _global[Zone.__symbol__('setTimeout')];
var nativeClearTimeout = _global[Zone.__symbol__('clearTimeout')];
if (nativeSetTimeout) {
// should run setTimeout inside jasmine outside of zone
attrs.timeout = {
setTimeout: nativeSetTimeout ? nativeSetTimeout : _global.setTimeout,
clearTimeout: nativeClearTimeout ? nativeClearTimeout : _global.clearTimeout
};
}
attrs.userContext.queueRunner = this;
}
// patch attrs.onException
var onException = attrs.onException;
attrs.onException = function (error) {
if (error &&
error.message ===
'Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.') {
// jasmine timeout, we can make the error message more
// reasonable to tell what tasks are pending
var proxyZoneSpec = this && this.testProxyZoneSpec;
if (proxyZoneSpec) {
var pendingTasksInfo = proxyZoneSpec.getAndClearPendingTasksInfo();
try {
// try catch here in case error.message is not writable
error.message += pendingTasksInfo;
// create a userContext to hold the queueRunner itself
// so we can access the testProxy in it/xit/beforeEach ...
if (jasmine.UserContext) {
if (!attrs.userContext) {
attrs.userContext = new jasmine.UserContext();
}
attrs.userContext.queueRunner = this;
}
else {
if (!attrs.userContext) {
attrs.userContext = {};
}
attrs.userContext.queueRunner = this;
}
// patch attrs.onException
var onException = attrs.onException;
attrs.onException = function (error) {
if (error &&
error.message ===
'Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.') {
// jasmine timeout, we can make the error message more
// reasonable to tell what tasks are pending
var proxyZoneSpec = this && this.testProxyZoneSpec;
if (proxyZoneSpec) {
var pendingTasksInfo = proxyZoneSpec.getAndClearPendingTasksInfo();
try {
// try catch here in case error.message is not writable
error.message += pendingTasksInfo;
}
catch (err) {
}
}
catch (err) {
}
}
if (onException) {
onException.call(this, error);
}
};
_super.call(this, attrs);
}
ZoneQueueRunner.prototype.execute = function () {
var _this = this;
var zone = Zone.current;
var isChildOfAmbientZone = false;
while (zone) {
if (zone === ambientZone) {
isChildOfAmbientZone = true;
break;
}
zone = zone.parent;
}
if (onException) {
onException.call(this, error);
if (!isChildOfAmbientZone)
throw new Error('Unexpected Zone: ' + Zone.current.name);
// This is the zone which will be used for running individual tests.
// It will be a proxy zone, so that the tests function can retroactively install
// different zones.
// Example:
// - In beforeEach() do childZone = Zone.current.fork(...);
// - In it() try to do fakeAsync(). The issue is that because the beforeEach forked the
// zone outside of fakeAsync it will be able to escape the fakeAsync rules.
// - Because ProxyZone is parent fo `childZone` fakeAsync can retroactively add
// fakeAsync behavior to the childZone.
this.testProxyZoneSpec = new ProxyZoneSpec();
this.testProxyZone = ambientZone.fork(this.testProxyZoneSpec);
if (!Zone.currentTask) {
// if we are not running in a task then if someone would register a
// element.addEventListener and then calling element.click() the
// addEventListener callback would think that it is the top most task and would
// drain the microtask queue on element.click() which would be incorrect.
// For this reason we always force a task when running jasmine tests.
Zone.current.scheduleMicroTask('jasmine.execute().forceTask', function () { return QueueRunner.prototype.execute.call(_this); });
}
else {
_super.prototype.execute.call(this);
}
};
_super.call(this, attrs);
}
ZoneQueueRunner.prototype.execute = function () {
var _this = this;
var zone = Zone.current;
var isChildOfAmbientZone = false;
while (zone) {
if (zone === ambientZone) {
isChildOfAmbientZone = true;
break;
}
zone = zone.parent;
}
if (!isChildOfAmbientZone)
throw new Error('Unexpected Zone: ' + Zone.current.name);
// This is the zone which will be used for running individual tests.
// It will be a proxy zone, so that the tests function can retroactively install
// different zones.
// Example:
// - In beforeEach() do childZone = Zone.current.fork(...);
// - In it() try to do fakeAsync(). The issue is that because the beforeEach forked the
// zone outside of fakeAsync it will be able to escape the fakeAsync rules.
// - Because ProxyZone is parent fo `childZone` fakeAsync can retroactively add
// fakeAsync behavior to the childZone.
this.testProxyZoneSpec = new ProxyZoneSpec();
this.testProxyZone = ambientZone.fork(this.testProxyZoneSpec);
if (!Zone.currentTask) {
// if we are not running in a task then if someone would register a
// element.addEventListener and then calling element.click() the
// addEventListener callback would think that it is the top most task and would
// drain the microtask queue on element.click() which would be incorrect.
// For this reason we always force a task when running jasmine tests.
Zone.current.scheduleMicroTask('jasmine.execute().forceTask', function () { return QueueRunner.prototype.execute.call(_this); });
}
else {
_super.prototype.execute.call(this);
}
};
return ZoneQueueRunner;
})(QueueRunner);
})();
})));
return ZoneQueueRunner;
})(QueueRunner);
})(typeof window !== 'undefined' && window || typeof self !== 'undefined' && self || global);
}));
//# sourceMappingURL=jasmine_patch_rollup.umd.js.map

@@ -1,1 +0,21 @@

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n():"function"==typeof define&&define.amd?define(n):n()}(0,function(){"use strict";!function(){var e="undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global;if(!Zone)throw new Error("Missing: zone.js");if("undefined"==typeof jasmine)throw new Error("Missing: jasmine.js");if(jasmine.__zone_patch__)throw new Error("'jasmine' has already been patched with 'Zone'.");jasmine.__zone_patch__=!0;var n=Zone.SyncTestZoneSpec,t=Zone.ProxyZoneSpec;if(!n)throw new Error("Missing: SyncTestZoneSpec");if(!t)throw new Error("Missing: ProxyZoneSpec");var o=Zone.current,r=o.fork(new n("jasmine.describe")),i=Zone.__symbol__,s=!0===e[i("fakeAsyncDisablePatchingClock")],c=!s&&(!0===e[i("fakeAsyncPatchLock")]||!0===e[i("fakeAsyncAutoFakeAsyncWhenClockPatched")]);if(!(!0===e[i("ignoreUnhandledRejection")])){var a=jasmine.GlobalErrors;a&&!jasmine[i("GlobalErrors")]&&(jasmine[i("GlobalErrors")]=a,jasmine.GlobalErrors=function(){var e=new a,n=e.install;return n&&!e[i("install")]&&(e[i("install")]=n,e.install=function(){var e=process.listeners("unhandledRejection"),t=n.apply(this,arguments);return process.removeAllListeners("unhandledRejection"),e&&e.forEach(function(e){return process.on("unhandledRejection",e)}),t}),e})}var u=jasmine.getEnv();if(["describe","xdescribe","fdescribe"].forEach(function(e){var n=u[e];u[e]=function(e,t){return n.call(this,e,(o=t,function(){return r.run(o,this,arguments)}));var o}}),["it","xit","fit"].forEach(function(e){var n=u[e];u[i(e)]=n,u[e]=function(e,t,o){return arguments[1]=p(t),n.apply(this,arguments)}}),["beforeEach","afterEach","beforeAll","afterAll"].forEach(function(e){var n=u[e];u[i(e)]=n,u[e]=function(e,t){return arguments[0]=p(e),n.apply(this,arguments)}}),!s){var l=jasmine[i("clock")]=jasmine.clock;jasmine.clock=function(){var e=l.apply(this,arguments);if(!e[i("patched")]){e[i("patched")]=i("patched");var n=e[i("tick")]=e.tick;e.tick=function(){var e=Zone.current.get("FakeAsyncTestZoneSpec");return e?e.tick.apply(e,arguments):n.apply(this,arguments)};var t=e[i("mockDate")]=e.mockDate;e.mockDate=function(){var e=Zone.current.get("FakeAsyncTestZoneSpec");if(e){var n=arguments.length>0?arguments[0]:new Date;return e.setCurrentRealTime.apply(e,n&&"function"==typeof n.getTime?[n.getTime()]:arguments)}return t.apply(this,arguments)},c&&["install","uninstall"].forEach(function(n){var t=e[i(n)]=e[n];e[n]=function(){if(!Zone.FakeAsyncTestZoneSpec)return t.apply(this,arguments);jasmine[i("clockInstalled")]="install"===n}})}return e}}function f(e,n,t,o){var r=!!jasmine[i("clockInstalled")],s=(t.testProxyZoneSpec,t.testProxyZone);if(r&&c){var a=Zone[Zone.__symbol__("fakeAsyncTest")];a&&"function"==typeof a.fakeAsync&&(e=a.fakeAsync(e))}return o?s.run(e,n,[o]):s.run(e,n)}function p(e){return e&&(e.length?function(n){return f(e,this,this.queueRunner,n)}:function(){return f(e,this,this.queueRunner)})}var h=jasmine.QueueRunner;jasmine.QueueRunner=function(n){function r(t){var r,i=this;t.onComplete=(r=t.onComplete,function(){i.testProxyZone=null,i.testProxyZoneSpec=null,o.scheduleMicroTask("jasmine.onComplete",r)});var s=e.__zone_symbol__setTimeout,c=e.__zone_symbol__clearTimeout;s&&(t.timeout={setTimeout:s||e.setTimeout,clearTimeout:c||e.clearTimeout}),jasmine.UserContext?(t.userContext||(t.userContext=new jasmine.UserContext),t.userContext.queueRunner=this):(t.userContext||(t.userContext={}),t.userContext.queueRunner=this);var a=t.onException;t.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){}}}a&&a.call(this,e)},n.call(this,t)}return function(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);function o(){this.constructor=e}e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}(r,n),r.prototype.execute=function(){for(var e=this,r=Zone.current,i=!1;r;){if(r===o){i=!0;break}r=r.parent}if(!i)throw new Error("Unexpected Zone: "+Zone.current.name);this.testProxyZoneSpec=new t,this.testProxyZone=o.fork(this.testProxyZoneSpec),Zone.currentTask?n.prototype.execute.call(this):Zone.current.scheduleMicroTask("jasmine.execute().forceTask",function(){return h.prototype.execute.call(e)})},r}(h)}()});
/**
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
!function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
!function(e){if(!Zone)throw new Error("Missing: zone.js");if("undefined"==typeof jasmine)throw new Error("Missing: jasmine.js");if(jasmine.__zone_patch__)throw new Error("'jasmine' has already been patched with 'Zone'.");jasmine.__zone_patch__=!0;var n=Zone.SyncTestZoneSpec,t=Zone.ProxyZoneSpec;if(!n)throw new Error("Missing: SyncTestZoneSpec");if(!t)throw new Error("Missing: ProxyZoneSpec");var o=Zone.current,r=o.fork(new n("jasmine.describe")),i=Zone.__symbol__,s=!0===e[i("fakeAsyncDisablePatchingClock")],c=!s&&(!0===e[i("fakeAsyncPatchLock")]||!0===e[i("fakeAsyncAutoFakeAsyncWhenClockPatched")]);if(!0!==e[i("ignoreUnhandledRejection")]){var a=jasmine.GlobalErrors;a&&!jasmine[i("GlobalErrors")]&&(jasmine[i("GlobalErrors")]=a,jasmine.GlobalErrors=function(){var e=new a,n=e.install;return n&&!e[i("install")]&&(e[i("install")]=n,e.install=function(){var e=process.listeners("unhandledRejection"),t=n.apply(this,arguments);return process.removeAllListeners("unhandledRejection"),e&&e.forEach(function(e){return process.on("unhandledRejection",e)}),t}),e})}var u=jasmine.getEnv();if(["describe","xdescribe","fdescribe"].forEach(function(e){var n=u[e];u[e]=function(e,t){return n.call(this,e,function o(e){return function(){return r.run(e,this,arguments)}}(t))}}),["it","xit","fit"].forEach(function(e){var n=u[e];u[i(e)]=n,u[e]=function(e,t,o){return arguments[1]=p(t),n.apply(this,arguments)}}),["beforeEach","afterEach","beforeAll","afterAll"].forEach(function(e){var n=u[e];u[i(e)]=n,u[e]=function(e,t){return arguments[0]=p(e),n.apply(this,arguments)}}),!s){var l=jasmine[i("clock")]=jasmine.clock;jasmine.clock=function(){var e=l.apply(this,arguments);if(!e[i("patched")]){e[i("patched")]=i("patched");var n=e[i("tick")]=e.tick;e.tick=function(){var e=Zone.current.get("FakeAsyncTestZoneSpec");return e?e.tick.apply(e,arguments):n.apply(this,arguments)};var t=e[i("mockDate")]=e.mockDate;e.mockDate=function(){var e=Zone.current.get("FakeAsyncTestZoneSpec");if(e){var n=arguments.length>0?arguments[0]:new Date;return e.setCurrentRealTime.apply(e,n&&"function"==typeof n.getTime?[n.getTime()]:arguments)}return t.apply(this,arguments)},c&&["install","uninstall"].forEach(function(n){var t=e[i(n)]=e[n];e[n]=function(){if(!Zone.FakeAsyncTestZoneSpec)return t.apply(this,arguments);jasmine[i("clockInstalled")]="install"===n}})}return e}}function f(e,n,t,o){var r=!!jasmine[i("clockInstalled")],s=t.testProxyZone;if(r&&c){var a=Zone[Zone.__symbol__("fakeAsyncTest")];a&&"function"==typeof a.fakeAsync&&(e=a.fakeAsync(e))}return o?s.run(e,n,[o]):s.run(e,n)}function p(e){return e&&(e.length?function(n){return f(e,this,this.queueRunner,n)}:function(){return f(e,this,this.queueRunner)})}var h=jasmine.QueueRunner;jasmine.QueueRunner=function(n){function r(t){var r,i=this;t.onComplete&&(t.onComplete=(r=t.onComplete,function(){i.testProxyZone=null,i.testProxyZoneSpec=null,o.scheduleMicroTask("jasmine.onComplete",r)}));var s=e[Zone.__symbol__("setTimeout")],c=e[Zone.__symbol__("clearTimeout")];s&&(t.timeout={setTimeout:s||e.setTimeout,clearTimeout:c||e.clearTimeout}),jasmine.UserContext?(t.userContext||(t.userContext=new jasmine.UserContext),t.userContext.queueRunner=this):(t.userContext||(t.userContext={}),t.userContext.queueRunner=this);var a=t.onException;t.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){}}}a&&a.call(this,e)},n.call(this,t)}return function(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);function o(){this.constructor=e}e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}(r,n),r.prototype.execute=function(){for(var e=this,r=Zone.current,i=!1;r;){if(r===o){i=!0;break}r=r.parent}if(!i)throw new Error("Unexpected Zone: "+Zone.current.name);this.testProxyZoneSpec=new t,this.testProxyZone=o.fork(this.testProxyZoneSpec),Zone.currentTask?n.prototype.execute.call(this):Zone.current.scheduleMicroTask("jasmine.execute().forceTask",function(){return h.prototype.execute.call(e)})},r}(h)}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global)});
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, (function () { 'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
/**
* @fileoverview
* @suppress {globalThis}
*/
var __assign = (undefined && undefined.__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];
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
}(function () {
'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @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 t;
};
return __assign.apply(this, arguments);
};
var NEWLINE = '\n';
var IGNORE_FRAMES = {};
var creationTrace = '__creationTrace__';
var ERROR_TAG = 'STACKTRACE TRACKING';
var SEP_TAG = '__SEP_TAG__';
var sepTemplate = SEP_TAG + '@[native]';
var LongStackTrace = /** @class */ (function () {
function LongStackTrace() {
this.error = getStacktrace();
this.timestamp = new Date();
return LongStackTrace;
}());
function getStacktraceWithUncaughtError() {
return new Error(ERROR_TAG);
}
return LongStackTrace;
}());
function getStacktraceWithUncaughtError() {
return new Error(ERROR_TAG);
}
function getStacktraceWithCaughtError() {
try {
throw getStacktraceWithUncaughtError();
function getStacktraceWithCaughtError() {
try {
throw getStacktraceWithUncaughtError();
}
catch (err) {
return err;
}
}
catch (err) {
return err;
// Some implementations of exception handling don't create a stack trace if the exception
// isn't thrown, however it's faster not to actually throw the exception.
var error = getStacktraceWithUncaughtError();
var caughtError = getStacktraceWithCaughtError();
var getStacktrace = error.stack ?
getStacktraceWithUncaughtError :
(caughtError.stack ? getStacktraceWithCaughtError : getStacktraceWithUncaughtError);
function getFrames(error) {
return error.stack ? error.stack.split(NEWLINE) : [];
}
}
// Some implementations of exception handling don't create a stack trace if the exception
// isn't thrown, however it's faster not to actually throw the exception.
var error = getStacktraceWithUncaughtError();
var caughtError = getStacktraceWithCaughtError();
var getStacktrace = error.stack ?
getStacktraceWithUncaughtError :
(caughtError.stack ? getStacktraceWithCaughtError : getStacktraceWithUncaughtError);
function getFrames(error) {
return error.stack ? error.stack.split(NEWLINE) : [];
}
function addErrorStack(lines, error) {
var trace = getFrames(error);
for (var i = 0; i < trace.length; i++) {
var frame = trace[i];
// Filter out the Frames which are part of stack capturing.
if (!IGNORE_FRAMES.hasOwnProperty(frame)) {
lines.push(trace[i]);
function addErrorStack(lines, error) {
var trace = getFrames(error);
for (var i = 0; i < trace.length; i++) {
var frame = trace[i];
// Filter out the Frames which are part of stack capturing.
if (!IGNORE_FRAMES.hasOwnProperty(frame)) {
lines.push(trace[i]);
}
}
}
}
function renderLongStackTrace(frames, stack) {
var longTrace = [stack ? stack.trim() : ''];
if (frames) {
var timestamp = new Date().getTime();
for (var i = 0; i < frames.length; i++) {
var traceFrames = frames[i];
var lastTime = traceFrames.timestamp;
var separator = "____________________Elapsed " + (timestamp - lastTime.getTime()) + " ms; At: " + lastTime;
separator = separator.replace(/[^\w\d]/g, '_');
longTrace.push(sepTemplate.replace(SEP_TAG, separator));
addErrorStack(longTrace, traceFrames.error);
timestamp = lastTime.getTime();
function renderLongStackTrace(frames, stack) {
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 " + (timestamp - lastTime.getTime()) + " ms; At: " + lastTime;
separator = separator.replace(/[^\w\d]/g, '_');
longTrace.push(sepTemplate.replace(SEP_TAG, separator));
addErrorStack(longTrace, traceFrames.error);
timestamp = lastTime.getTime();
}
}
return longTrace.join(NEWLINE);
}
return longTrace.join(NEWLINE);
}
Zone['longStackTraceZoneSpec'] = {
name: 'long-stack-trace',
longStackTraceLimit: 10,
// 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 (Error.stackTraceLimit > 0) {
// 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
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;
Zone['longStackTraceZoneSpec'] = {
name: 'long-stack-trace',
longStackTraceLimit: 10,
// add a getLongStackTrace method in spec to
// handle handled reject promise error.
getLongStackTrace: function (error) {
if (!error) {
return undefined;
}
if (!task.data)
task.data = {};
if (task.type === 'eventTask') {
// Fix issue https://github.com/angular/zone.js/issues/1195,
// For event task of browser, by default, all task will share a
// singleton instance of data object, we should create a new one here
// The cast to `any` is required to workaround a closure bug which wrongly applies
// URL sanitization rules to .data access.
task.data = __assign({}, task.data);
var trace = error[Zone.__symbol__('currentTaskTrace')];
if (!trace) {
return error.stack;
}
task.data[creationTrace] = trace;
}
return parentZoneDelegate.scheduleTask(targetZone, task);
},
onHandleError: function (parentZoneDelegate, currentZone, targetZone, error) {
if (Error.stackTraceLimit > 0) {
// 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
var parentTask = Zone.currentTask || error.task;
if (error instanceof Error && parentTask) {
var longStack = renderLongStackTrace(parentTask.data && parentTask.data[creationTrace], error.stack);
try {
error.stack = error.longStack = longStack;
return renderLongStackTrace(trace, error.stack);
},
onScheduleTask: function (parentZoneDelegate, currentZone, targetZone, task) {
if (Error.stackTraceLimit > 0) {
// 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
var currentTask = Zone.currentTask;
var trace = currentTask && currentTask.data && currentTask.data[creationTrace] || [];
trace = [new LongStackTrace()].concat(trace);
if (trace.length > this.longStackTraceLimit) {
trace.length = this.longStackTraceLimit;
}
catch (err) {
if (!task.data)
task.data = {};
if (task.type === 'eventTask') {
// Fix issue https://github.com/angular/zone.js/issues/1195,
// For event task of browser, by default, all task will share a
// singleton instance of data object, we should create a new one here
// The cast to `any` is required to workaround a closure bug which wrongly applies
// URL sanitization rules to .data access.
task.data = Object.assign({}, task.data);
}
task.data[creationTrace] = trace;
}
return parentZoneDelegate.scheduleTask(targetZone, task);
},
onHandleError: function (parentZoneDelegate, currentZone, targetZone, error) {
if (Error.stackTraceLimit > 0) {
// 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
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);
}
return parentZoneDelegate.handleError(targetZone, error);
};
function captureStackTraces(stackTraces, count) {
if (count > 0) {
stackTraces.push(getFrames((new LongStackTrace()).error));
captureStackTraces(stackTraces, count - 1);
}
}
};
function captureStackTraces(stackTraces, count) {
if (count > 0) {
stackTraces.push(getFrames((new LongStackTrace()).error));
captureStackTraces(stackTraces, count - 1);
}
}
function computeIgnoreFrames() {
if (Error.stackTraceLimit <= 0) {
return;
}
var frames = [];
captureStackTraces(frames, 2);
var frames1 = frames[0];
var frames2 = frames[1];
for (var i = 0; i < frames1.length; i++) {
var frame1 = frames1[i];
if (frame1.indexOf(ERROR_TAG) == -1) {
var match = frame1.match(/^\s*at\s+/);
if (match) {
sepTemplate = match[0] + SEP_TAG + ' (http://localhost)';
function computeIgnoreFrames() {
if (Error.stackTraceLimit <= 0) {
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;

@@ -180,15 +177,4 @@ }

}
for (var i = 0; i < frames1.length; i++) {
var frame1 = frames1[i];
var frame2 = frames2[i];
if (frame1 === frame2) {
IGNORE_FRAMES[frame1] = true;
}
else {
break;
}
}
}
computeIgnoreFrames();
})));
computeIgnoreFrames();
}));
//# sourceMappingURL=long_stack_trace_zone_rollup.umd.js.map

@@ -1,1 +0,13 @@

!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r():"function"==typeof define&&define.amd?define(r):r()}(0,function(){"use strict";var t=function(){return(t=Object.assign||function(t){for(var r,a=1,e=arguments.length;a<e;a++)for(var n in r=arguments[a])Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n]);return t}).apply(this,arguments)},r="\n",a={},e="STACKTRACE TRACKING",n="__SEP_TAG__",c=n+"@[native]",o=function(){return function(){this.error=u(),this.timestamp=new Date}}();function i(){return new Error(e)}function s(){try{throw i()}catch(t){return t}}var _=i(),f=s(),u=_.stack?i:f.stack?s:i;function l(t){return t.stack?t.stack.split(r):[]}function k(t,r){for(var e=l(r),n=0;n<e.length;n++){var c=e[n];a.hasOwnProperty(c)||t.push(e[n])}}function h(t,a){var e=[a?a.trim():""];if(t)for(var o=(new Date).getTime(),i=0;i<t.length;i++){var s=t[i],_=s.timestamp,f="____________________Elapsed "+(o-_.getTime())+" ms; At: "+_;f=f.replace(/[^\w\d]/g,"_"),e.push(c.replace(n,f)),k(e,s.error),o=_.getTime()}return e.join(r)}Zone.longStackTraceZoneSpec={name:"long-stack-trace",longStackTraceLimit:10,getLongStackTrace:function(t){if(t){var r=t[Zone.__symbol__("currentTaskTrace")];return r?h(r,t.stack):t.stack}},onScheduleTask:function(r,a,e,n){if(Error.stackTraceLimit>0){var c=Zone.currentTask,i=c&&c.data&&c.data.__creationTrace__||[];(i=[new o].concat(i)).length>this.longStackTraceLimit&&(i.length=this.longStackTraceLimit),n.data||(n.data={}),"eventTask"===n.type&&(n.data=t({},n.data)),n.data.__creationTrace__=i}return r.scheduleTask(e,n)},onHandleError:function(t,r,a,e){if(Error.stackTraceLimit>0){var n=Zone.currentTask||e.task;if(e instanceof Error&&n){var c=h(n.data&&n.data.__creationTrace__,e.stack);try{e.stack=e.longStack=c}catch(t){}}}return t.handleError(a,e)}},function(){if(!(Error.stackTraceLimit<=0)){var t=[];!function t(r,a){a>0&&(r.push(l((new o).error)),t(r,a-1))}(t,2);for(var r=t[0],i=t[1],s=0;s<r.length;s++)if(-1==(f=r[s]).indexOf(e)){var _=f.match(/^\s*at\s+/);if(_){c=_[0]+n+" (http://localhost)";break}}for(s=0;s<r.length;s++){var f;if((f=r[s])!==i[s])break;a[f]=!0}}}()});
/**
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
!function(t){"function"==typeof define&&define.amd?define(t):t()}(function(){"use strict";
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/var t="\n",a={},r="STACKTRACE TRACKING",e="__SEP_TAG__",n=e+"@[native]",c=function c(){this.error=f(),this.timestamp=new Date};function i(){return new Error(r)}function o(){try{throw i()}catch(t){return t}}var s=i(),_=o(),f=s.stack?i:_.stack?o:i;function u(a){return a.stack?a.stack.split(t):[]}function k(t,r){for(var e=u(r),n=0;n<e.length;n++)a.hasOwnProperty(e[n])||t.push(e[n])}function T(a,r){var c=[r?r.trim():""];if(a)for(var i=(new Date).getTime(),o=0;o<a.length;o++){var s=a[o],_=s.timestamp,f="____________________Elapsed "+(i-_.getTime())+" ms; At: "+_;f=f.replace(/[^\w\d]/g,"_"),c.push(n.replace(e,f)),k(c,s.error),i=_.getTime()}return c.join(t)}Zone.longStackTraceZoneSpec={name:"long-stack-trace",longStackTraceLimit:10,getLongStackTrace:function(t){if(t){var a=t[Zone.__symbol__("currentTaskTrace")];return a?T(a,t.stack):t.stack}},onScheduleTask:function(t,a,r,e){if(Error.stackTraceLimit>0){var n=Zone.currentTask,i=n&&n.data&&n.data.__creationTrace__||[];(i=[new c].concat(i)).length>this.longStackTraceLimit&&(i.length=this.longStackTraceLimit),e.data||(e.data={}),"eventTask"===e.type&&(e.data=Object.assign({},e.data)),e.data.__creationTrace__=i}return t.scheduleTask(r,e)},onHandleError:function(t,a,r,e){if(Error.stackTraceLimit>0){var n=Zone.currentTask||e.task;if(e instanceof Error&&n){var c=T(n.data&&n.data.__creationTrace__,e.stack);try{e.stack=e.longStack=c}catch(t){}}}return t.handleError(r,e)}},function h(){if(!(Error.stackTraceLimit<=0)){var t=[];!function t(a,r){r>0&&(a.push(u((new c).error)),t(a,r-1))}(t,2);for(var i=t[0],o=t[1],s=0;s<i.length;s++)if(-1==(f=i[s]).indexOf(r)){var _=f.match(/^\s*at\s+/);if(_){n=_[0]+e+" (http://localhost)";break}}for(s=0;s<i.length;s++){var f;if((f=i[s])!==o[s])break;a[f]=!0}}}()});
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, (function () { 'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
(function (context) {
var Mocha = context.Mocha;
if (typeof Mocha === 'undefined') {
throw new Error('Missing Mocha.js');
}
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: Mocha.after,
afterEach: Mocha.afterEach,
before: Mocha.before,
beforeEach: Mocha.beforeEach,
describe: Mocha.describe,
it: Mocha.it
};
function modifyArguments(args, syncTest, asyncTest) {
var _loop_1 = function (i) {
var arg = args[i];
if (typeof arg === 'function') {
// The `done` callback is only passed through if the function expects at
// least one argument.
// Note we have to make a function with correct number of arguments,
// otherwise mocha will
// think that all functions are sync or async.
args[i] = (arg.length === 0) ? syncTest(arg) : asyncTest(arg);
// Mocha uses toString to view the test body in the result list, make sure we return the
// correct function body
args[i].toString = function () {
return arg.toString();
};
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
}(function () {
'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (context) {
var Mocha = context.Mocha;
if (typeof Mocha === 'undefined') {
throw new Error('Missing Mocha.js');
}
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: Mocha.after,
afterEach: Mocha.afterEach,
before: Mocha.before,
beforeEach: Mocha.beforeEach,
describe: Mocha.describe,
it: Mocha.it
};
function modifyArguments(args, syncTest, asyncTest) {
var _loop_1 = function (i) {
var arg = args[i];
if (typeof arg === 'function') {
// The `done` callback is only passed through if the function expects at
// least one argument.
// Note we have to make a function with correct number of arguments,
// otherwise mocha will
// think that all functions are sync or async.
args[i] = (arg.length === 0) ? syncTest(arg) : asyncTest(arg);
// Mocha uses toString to view the test body in the result list, make sure we return the
// correct function body
args[i].toString = function () { return arg.toString(); };
}
};
for (var i = 0; i < args.length; i++) {
_loop_1(i);
}
};
for (var i = 0; i < args.length; i++) {
_loop_1(i);
return args;
}
return args;
}
function wrapDescribeInZone(args) {
var syncTest = function (fn) {
return function () {
return syncZone.run(fn, this, arguments);
function wrapDescribeInZone(args) {
var syncTest = function (fn) {
return function () { return syncZone.run(fn, this, arguments); };
};
};
return modifyArguments(args, syncTest);
}
function wrapTestInZone(args) {
var asyncTest = function (fn) {
return function (done) {
return testZone.run(fn, this, [done]);
return modifyArguments(args, syncTest);
}
function wrapTestInZone(args) {
var asyncTest = function (fn) {
return function (done) { return testZone.run(fn, this, [done]); };
};
};
var syncTest = function (fn) {
return function () {
return testZone.run(fn, this);
var syncTest = function (fn) {
return function () { return testZone.run(fn, this); };
};
};
return modifyArguments(args, syncTest, asyncTest);
}
function wrapSuiteInZone(args) {
var asyncTest = function (fn) {
return function (done) {
return suiteZone.run(fn, this, [done]);
return modifyArguments(args, syncTest, asyncTest);
}
function wrapSuiteInZone(args) {
var asyncTest = function (fn) {
return function (done) { return suiteZone.run(fn, this, [done]); };
};
};
var syncTest = function (fn) {
return function () {
return suiteZone.run(fn, this);
var syncTest = function (fn) {
return function () { return suiteZone.run(fn, this); };
};
return modifyArguments(args, syncTest, asyncTest);
}
context.describe = context.suite = Mocha.describe = function () {
return mochaOriginal.describe.apply(this, wrapDescribeInZone(arguments));
};
return modifyArguments(args, syncTest, asyncTest);
}
context.describe = context.suite = Mocha.describe = function () {
return mochaOriginal.describe.apply(this, wrapDescribeInZone(arguments));
};
context.xdescribe = context.suite.skip = Mocha.describe.skip = function () {
return mochaOriginal.describe.skip.apply(this, wrapDescribeInZone(arguments));
};
context.describe.only = context.suite.only = Mocha.describe.only = function () {
return mochaOriginal.describe.only.apply(this, wrapDescribeInZone(arguments));
};
context.it = context.specify = context.test = Mocha.it = function () {
return mochaOriginal.it.apply(this, wrapTestInZone(arguments));
};
context.xit = context.xspecify = Mocha.it.skip = function () {
return mochaOriginal.it.skip.apply(this, wrapTestInZone(arguments));
};
context.it.only = context.test.only = Mocha.it.only = function () {
return mochaOriginal.it.only.apply(this, wrapTestInZone(arguments));
};
context.after = context.suiteTeardown = Mocha.after = function () {
return mochaOriginal.after.apply(this, wrapSuiteInZone(arguments));
};
context.afterEach = context.teardown = Mocha.afterEach = function () {
return mochaOriginal.afterEach.apply(this, wrapTestInZone(arguments));
};
context.before = context.suiteSetup = Mocha.before = function () {
return mochaOriginal.before.apply(this, wrapSuiteInZone(arguments));
};
context.beforeEach = context.setup = Mocha.beforeEach = 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);
});
context.xdescribe = context.suite.skip = Mocha.describe.skip = function () {
return mochaOriginal.describe.skip.apply(this, wrapDescribeInZone(arguments));
};
Mocha.Runner.prototype.run = function (fn) {
this.on('test', function (e) {
testZone = rootZone.fork(new ProxyZoneSpec());
});
this.on('fail', function (test, err) {
var proxyZoneSpec = testZone && testZone.get('ProxyZoneSpec');
if (proxyZoneSpec && err) {
try {
// try catch here in case err.message is not writable
err.message += proxyZoneSpec.getAndClearPendingTasksInfo();
context.describe.only = context.suite.only = Mocha.describe.only = function () {
return mochaOriginal.describe.only.apply(this, wrapDescribeInZone(arguments));
};
context.it = context.specify = context.test =
Mocha.it = function () { return mochaOriginal.it.apply(this, wrapTestInZone(arguments)); };
context.xit = context.xspecify = Mocha.it.skip = function () {
return mochaOriginal.it.skip.apply(this, wrapTestInZone(arguments));
};
context.it.only = context.test.only = Mocha.it.only = function () {
return mochaOriginal.it.only.apply(this, wrapTestInZone(arguments));
};
context.after = context.suiteTeardown = Mocha.after = function () {
return mochaOriginal.after.apply(this, wrapSuiteInZone(arguments));
};
context.afterEach = context.teardown = Mocha.afterEach = function () {
return mochaOriginal.afterEach.apply(this, wrapTestInZone(arguments));
};
context.before = context.suiteSetup = Mocha.before = function () {
return mochaOriginal.before.apply(this, wrapSuiteInZone(arguments));
};
context.beforeEach = context.setup = Mocha.beforeEach = function () {
return mochaOriginal.beforeEach.apply(this, wrapTestInZone(arguments));
};
(function (originalRunTest, originalRun) {
Mocha.Runner.prototype.runTest = function (fn) {
var _this = this;
Zone.current.scheduleMicroTask('mocha.forceTask', function () { originalRunTest.call(_this, fn); });
};
Mocha.Runner.prototype.run = function (fn) {
this.on('test', function (e) { testZone = rootZone.fork(new ProxyZoneSpec()); });
this.on('fail', function (test, err) {
var proxyZoneSpec = testZone && testZone.get('ProxyZoneSpec');
if (proxyZoneSpec && err) {
try {
// try catch here in case err.message is not writable
err.message += proxyZoneSpec.getAndClearPendingTasksInfo();
}
catch (error) {
}
}
catch (error) {
}
}
});
return originalRun.call(this, fn);
};
})(Mocha.Runner.prototype.runTest, Mocha.Runner.prototype.run);
})(typeof window !== 'undefined' && window || typeof self !== 'undefined' && self || global);
})));
});
return originalRun.call(this, fn);
};
})(Mocha.Runner.prototype.runTest, Mocha.Runner.prototype.run);
})(typeof window !== 'undefined' && window || typeof self !== 'undefined' && self || global);
}));
//# sourceMappingURL=mocha_patch_rollup.umd.js.map

@@ -1,1 +0,21 @@

!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?e():"function"==typeof define&&define.amd?define(e):e()}(0,function(){"use strict";!function(n){var e=n.Mocha;if(void 0===e)throw new Error("Missing Mocha.js");if("undefined"==typeof Zone)throw new Error("Missing Zone.js");var t=Zone.ProxyZoneSpec,r=Zone.SyncTestZoneSpec;if(!t)throw new Error("Missing ProxyZoneSpec");if(e.__zone_patch__)throw new Error('"Mocha" has already been patched with "Zone".');e.__zone_patch__=!0;var i,o,u=Zone.current,f=u.fork(new r("Mocha.describe")),c=null,s=u.fork(new t),a={after:e.after,afterEach:e.afterEach,before:e.before,beforeEach:e.beforeEach,describe:e.describe,it:e.it};function p(n,e,t){for(var r=function(r){var i=n[r];"function"==typeof i&&(n[r]=0===i.length?e(i):t(i),n[r].toString=function(){return i.toString()})},i=0;i<n.length;i++)r(i);return n}function h(n){return p(n,function(n){return function(){return f.run(n,this,arguments)}})}function y(n){return p(n,function(n){return function(){return c.run(n,this)}},function(n){return function(e){return c.run(n,this,[e])}})}function d(n){return p(n,function(n){return function(){return s.run(n,this)}},function(n){return function(e){return s.run(n,this,[e])}})}n.describe=n.suite=e.describe=function(){return a.describe.apply(this,h(arguments))},n.xdescribe=n.suite.skip=e.describe.skip=function(){return a.describe.skip.apply(this,h(arguments))},n.describe.only=n.suite.only=e.describe.only=function(){return a.describe.only.apply(this,h(arguments))},n.it=n.specify=n.test=e.it=function(){return a.it.apply(this,y(arguments))},n.xit=n.xspecify=e.it.skip=function(){return a.it.skip.apply(this,y(arguments))},n.it.only=n.test.only=e.it.only=function(){return a.it.only.apply(this,y(arguments))},n.after=n.suiteTeardown=e.after=function(){return a.after.apply(this,d(arguments))},n.afterEach=n.teardown=e.afterEach=function(){return a.afterEach.apply(this,y(arguments))},n.before=n.suiteSetup=e.before=function(){return a.before.apply(this,d(arguments))},n.beforeEach=n.setup=e.beforeEach=function(){return a.beforeEach.apply(this,y(arguments))},i=e.Runner.prototype.runTest,o=e.Runner.prototype.run,e.Runner.prototype.runTest=function(n){var e=this;Zone.current.scheduleMicroTask("mocha.forceTask",function(){i.call(e,n)})},e.Runner.prototype.run=function(n){return this.on("test",function(n){c=u.fork(new t)}),this.on("fail",function(n,e){var t=c&&c.get("ProxyZoneSpec");if(t&&e)try{e.message+=t.getAndClearPendingTasksInfo()}catch(n){}}),o.call(this,n)}}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global)});
/**
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
!function(n){"function"==typeof define&&define.amd?define(n):n()}(function(){"use strict";
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
!function(n){var e=n.Mocha;if(void 0===e)throw new Error("Missing Mocha.js");if("undefined"==typeof Zone)throw new Error("Missing Zone.js");var t=Zone.ProxyZoneSpec,r=Zone.SyncTestZoneSpec;if(!t)throw new Error("Missing ProxyZoneSpec");if(e.__zone_patch__)throw new Error('"Mocha" has already been patched with "Zone".');e.__zone_patch__=!0;var i,o,u=Zone.current,c=u.fork(new r("Mocha.describe")),f=null,s=u.fork(new t),a={after:e.after,afterEach:e.afterEach,before:e.before,beforeEach:e.beforeEach,describe:e.describe,it:e.it};function p(n,e,t){for(var r=function(r){var i=n[r];"function"==typeof i&&(n[r]=0===i.length?e(i):t(i),n[r].toString=function(){return i.toString()})},i=0;i<n.length;i++)r(i);return n}function h(n){return p(n,function(n){return function(){return c.run(n,this,arguments)}})}function y(n){return p(n,function(n){return function(){return f.run(n,this)}},function(n){return function(e){return f.run(n,this,[e])}})}function l(n){return p(n,function(n){return function(){return s.run(n,this)}},function(n){return function(e){return s.run(n,this,[e])}})}n.describe=n.suite=e.describe=function(){return a.describe.apply(this,h(arguments))},n.xdescribe=n.suite.skip=e.describe.skip=function(){return a.describe.skip.apply(this,h(arguments))},n.describe.only=n.suite.only=e.describe.only=function(){return a.describe.only.apply(this,h(arguments))},n.it=n.specify=n.test=e.it=function(){return a.it.apply(this,y(arguments))},n.xit=n.xspecify=e.it.skip=function(){return a.it.skip.apply(this,y(arguments))},n.it.only=n.test.only=e.it.only=function(){return a.it.only.apply(this,y(arguments))},n.after=n.suiteTeardown=e.after=function(){return a.after.apply(this,l(arguments))},n.afterEach=n.teardown=e.afterEach=function(){return a.afterEach.apply(this,y(arguments))},n.before=n.suiteSetup=e.before=function(){return a.before.apply(this,l(arguments))},n.beforeEach=n.setup=e.beforeEach=function(){return a.beforeEach.apply(this,y(arguments))},i=e.Runner.prototype.runTest,o=e.Runner.prototype.run,e.Runner.prototype.runTest=function(n){var e=this;Zone.current.scheduleMicroTask("mocha.forceTask",function(){i.call(e,n)})},e.Runner.prototype.run=function(n){return this.on("test",function(n){f=u.fork(new t)}),this.on("fail",function(n,e){var t=f&&f.get("ProxyZoneSpec");if(t&&e)try{e.message+=t.getAndClearPendingTasksInfo()}catch(n){}}),o.call(this,n)}}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global)});
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, (function () { 'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
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 set a new delegateSpec, shoulde check whether need to
// trigger hasTask or not
if (isNewDelegate && this.lastTaskState &&
(this.lastTaskState.macroTask || this.lastTaskState.microTask)) {
this.isNeedToTriggerHasTask = true;
}
};
ProxyZoneSpec.prototype.getDelegate = function () {
return this._delegateSpec;
};
ProxyZoneSpec.prototype.resetDelegate = function () {
var delegateSpec = 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
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
}(function () {
'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
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.onHasTask(parentZoneDelegate, currentZone, targetZone, this.lastTaskState);
this.tasks = [];
this.setDelegate(defaultSpecDelegate);
}
};
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);
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 () {
var delegateSpec = 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;
}
}
};
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: " + task.type + ", source: " + task.source + ", args: {" + dataInfo + "}";
});
var pendingTasksInfo = '--Pendng 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;
})));
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: " + task.type + ", source: " + task.source + ", args: {" + 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;
}));
//# sourceMappingURL=proxy_rollup.umd.js.map

@@ -1,1 +0,13 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t()}(0,function(){"use strict";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="--Pendng 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: "+e.type+", source: "+e.source+", args: {"+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,o){return this._delegateSpec&&this._delegateSpec.onIntercept?this._delegateSpec.onIntercept(e,t,s,n,o):e.intercept(s,n,o)},e.prototype.onInvoke=function(e,t,s,n,o,r,a){return this.tryTriggerHasTask(e,t,s),this._delegateSpec&&this._delegateSpec.onInvoke?this._delegateSpec.onInvoke(e,t,s,n,o,r,a):e.invoke(s,n,o,r,a)},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,o,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,o,r):e.invokeTask(s,n,o,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});
/**
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
!function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/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: "+e.type+", source: "+e.source+", args: {"+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,r){return this._delegateSpec&&this._delegateSpec.onIntercept?this._delegateSpec.onIntercept(e,t,s,n,r):e.intercept(s,n,r)},e.prototype.onInvoke=function(e,t,s,n,r,a,o){return this.tryTriggerHasTask(e,t,s),this._delegateSpec&&this._delegateSpec.onInvoke?this._delegateSpec.onInvoke(e,t,s,n,r,a,o):e.invoke(s,n,r,a,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,r,a){return"eventTask"!==n.type&&this.removeFromTasks(n),this.tryTriggerHasTask(e,t,s),this._delegateSpec&&this._delegateSpec.onInvokeTask?this._delegateSpec.onInvokeTask(e,t,s,n,r,a):e.invokeTask(s,n,r,a)},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});
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, (function () { 'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
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 " + task.source + " from within a sync test.");
case 'eventTask':
task = delegate.scheduleTask(target, task);
break;
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
}(function () {
'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var SyncTestZoneSpec = /** @class */ (function () {
function SyncTestZoneSpec(namePrefix) {
this.runZone = Zone.current;
this.name = 'syncTestZone for ' + namePrefix;
}
return task;
};
return SyncTestZoneSpec;
}());
// Export the class so that new instances can be created with proper
// constructor params.
Zone['SyncTestZoneSpec'] = SyncTestZoneSpec;
})));
SyncTestZoneSpec.prototype.onScheduleTask = function (delegate, current, target, task) {
switch (task.type) {
case 'microTask':
case 'macroTask':
throw new Error("Cannot call " + task.source + " from within a sync test.");
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;
}));
//# sourceMappingURL=sync_test_rollup.umd.js.map
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, (function () { 'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
/**
* 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;
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
}(function () {
'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* 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 };
}
throw new Error('Unknown task format: ' + type);
};
TaskTrackingZoneSpec.prototype.onScheduleTask = function (parentZoneDelegate, currentZone, targetZone, task) {
task['creationLocation'] = new Error("Task '" + task.type + "' from '" + 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;
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;
}
}
return parentZoneDelegate.cancelTask(targetZone, task);
};
TaskTrackingZoneSpec.prototype.onInvokeTask = function (parentZoneDelegate, currentZone, targetZone, task, applyThis, applyArgs) {
if (task.type === 'eventTask')
throw new Error('Unknown task format: ' + type);
};
TaskTrackingZoneSpec.prototype.onScheduleTask = function (parentZoneDelegate, currentZone, targetZone, task) {
task['creationLocation'] = new Error("Task '" + task.type + "' from '" + 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) {
if (task.type === 'eventTask')
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);
var tasks = this.getTasksFor(task.type);
for (var i = 0; i < tasks.length; i++) {
if (tasks[i] == task) {
tasks.splice(i, 1);
break;
};
TaskTrackingZoneSpec.prototype.clearEvents = function () {
while (this.eventTasks.length) {
Zone.current.cancelTask(this.eventTasks[0]);
}
}
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;
})));
};
return TaskTrackingZoneSpec;
}());
// Export the class so that new instances can be created with proper
// constructor params.
Zone['TaskTrackingZoneSpec'] = TaskTrackingZoneSpec;
}));
//# sourceMappingURL=task_tracking_rollup.umd.js.map

@@ -1,1 +0,13 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t()}(0,function(){"use strict";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 '"+s.type+"' from '"+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){if("eventTask"===s.type)return e.invokeTask(n,s,r,o);for(var a=this.getTasksFor(s.type),i=0;i<a.length;i++)if(a[i]==s){a.splice(i,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});
/**
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
!function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/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 '"+s.type+"' from '"+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){if("eventTask"===s.type)return e.invokeTask(n,s,r,o);for(var a=this.getTasksFor(s.type),i=0;i<a.length;i++)if(a[i]==s){a.splice(i,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});
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, (function () { 'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
Zone.__load_patch('mediaQuery', function (global, Zone, api) {
function patchAddListener(proto) {
api.patchMethod(proto, 'addListener', function (delegate) { return function (self, args) {
var callback = args.length > 0 ? args[0] : null;
if (typeof callback === 'function') {
var wrapperedCallback = Zone.current.wrap(callback, 'MediaQuery');
callback[api.symbol('mediaQueryCallback')] = wrapperedCallback;
return delegate.call(self, wrapperedCallback);
}
else {
return delegate.apply(self, args);
}
}; });
}
function patchRemoveListener(proto) {
api.patchMethod(proto, 'removeListener', function (delegate) { return function (self, args) {
var callback = args.length > 0 ? args[0] : null;
if (typeof callback === 'function') {
var wrapperedCallback = callback[api.symbol('mediaQueryCallback')];
if (wrapperedCallback) {
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
}(function () {
'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
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);

@@ -46,39 +30,52 @@ }

}
}
else {
return delegate.apply(self, args);
}
}; });
}
if (global['MediaQueryList']) {
var proto = global['MediaQueryList'].prototype;
patchAddListener(proto);
patchRemoveListener(proto);
}
else if (global['matchMedia']) {
api.patchMethod(global, 'matchMedia', function (delegate) { return function (self, args) {
var mql = delegate.apply(self, args);
if (mql) {
// try to patch MediaQueryList.prototype
var proto = Object.getPrototypeOf(mql);
if (proto && proto['addListener']) {
// try to patch proto, don't need to worry about patch
// multiple times, because, api.patchEventTarget will check it
patchAddListener(proto);
patchRemoveListener(proto);
patchAddListener(mql);
patchRemoveListener(mql);
}; });
}
function patchRemoveListener(proto) {
api.patchMethod(proto, 'removeListener', function (delegate) { return function (self, args) {
var callback = args.length > 0 ? args[0] : null;
if (typeof callback === 'function') {
var wrapperedCallback = callback[api.symbol('mediaQueryCallback')];
if (wrapperedCallback) {
return delegate.call(self, wrapperedCallback);
}
else {
return delegate.apply(self, args);
}
}
else if (mql['addListener']) {
// proto not exists, or proto has no addListener method
// try to patch mql instance
patchAddListener(mql);
patchRemoveListener(mql);
else {
return delegate.apply(self, args);
}
}
return mql;
}; });
}
});
})));
}; });
}
if (global['MediaQueryList']) {
var proto = global['MediaQueryList'].prototype;
patchAddListener(proto);
patchRemoveListener(proto);
}
else if (global['matchMedia']) {
api.patchMethod(global, 'matchMedia', function (delegate) { return function (self, args) {
var mql = delegate.apply(self, args);
if (mql) {
// try to patch MediaQueryList.prototype
var proto = Object.getPrototypeOf(mql);
if (proto && proto['addListener']) {
// try to patch proto, don't need to worry about patch
// multiple times, because, api.patchEventTarget will check it
patchAddListener(proto);
patchRemoveListener(proto);
patchAddListener(mql);
patchRemoveListener(mql);
}
else if (mql['addListener']) {
// proto not exists, or proto has no addListener method
// try to patch mql instance
patchAddListener(mql);
patchRemoveListener(mql);
}
}
return mql;
}; });
}
});
}));
//# sourceMappingURL=webapis_media_query_rollup.umd.js.map

@@ -1,1 +0,13 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t()}(0,function(){"use strict";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 o=t.current.wrap(i,"MediaQuery");return i[n.symbol("mediaQueryCallback")]=o,e.call(r,o)}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 o=Object.getPrototypeOf(i);o&&o.addListener?(r(o),a(o),r(i),a(i)):i.addListener&&(r(i),a(i))}return i}})})});
/**
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
!function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/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}})})});
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, (function () { 'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
Zone.__load_patch('notification', function (global, Zone, api) {
var Notification = global['Notification'];
if (!Notification || !Notification.prototype) {
return;
}
var desc = Object.getOwnPropertyDescriptor(Notification.prototype, 'onerror');
if (!desc || !desc.configurable) {
return;
}
api.patchOnProperties(Notification.prototype, null);
});
})));
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
}(function () {
'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
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);
});
}));
//# sourceMappingURL=webapis_notification_rollup.umd.js.map

@@ -1,1 +0,13 @@

!function(o,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t()}(0,function(){"use strict";Zone.__load_patch("notification",function(o,t,e){var n=o.Notification;if(n&&n.prototype){var i=Object.getOwnPropertyDescriptor(n.prototype,"onerror");i&&i.configurable&&e.patchOnProperties(n.prototype,null)}})});
/**
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
!function(t){"function"==typeof define&&define.amd?define(t):t()}(function(){"use strict";
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/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)}})});
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, (function () { 'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
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, [RTCPeerConnection.prototype], { useG: false });
});
})));
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
}(function () {
'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
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, [RTCPeerConnection.prototype], { useG: false });
});
}));
//# sourceMappingURL=webapis_rtc_peer_connection_rollup.umd.js.map

@@ -1,1 +0,13 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t()}(0,function(){"use strict";Zone.__load_patch("RTCPeerConnection",function(e,t,o){var n=e.RTCPeerConnection;if(n){var p=o.symbol("addEventListener"),r=o.symbol("removeEventListener");n.prototype.addEventListener=n.prototype[p],n.prototype.removeEventListener=n.prototype[r],n.prototype[p]=null,n.prototype[r]=null,o.patchEventTarget(e,[n.prototype],{useG:!1})}})});
/**
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
!function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/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,[o.prototype],{useG:!1})}})});
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, (function () { 'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
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 windowPrototype = Object.getPrototypeOf(window);
if (windowPrototype && windowPrototype.hasOwnProperty('addEventListener')) {
windowPrototype[Zone.__symbol__('addEventListener')] = null;
windowPrototype[Zone.__symbol__('removeEventListener')] = null;
api.patchEventTarget(global, [windowPrototype]);
}
if (Node.prototype.hasOwnProperty('addEventListener')) {
Node.prototype[Zone.__symbol__('addEventListener')] = null;
Node.prototype[Zone.__symbol__('removeEventListener')] = null;
api.patchEventTarget(global, [Node.prototype]);
}
});
})));
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
}(function () {
'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
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, [proto]);
}
});
});
}));
//# sourceMappingURL=webapis_shadydom_rollup.umd.js.map

@@ -1,1 +0,13 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t()}(0,function(){"use strict";Zone.__load_patch("shadydom",function(e,t,o){var n=Object.getPrototypeOf(window);n&&n.hasOwnProperty("addEventListener")&&(n[t.__symbol__("addEventListener")]=null,n[t.__symbol__("removeEventListener")]=null,o.patchEventTarget(e,[n])),Node.prototype.hasOwnProperty("addEventListener")&&(Node.prototype[t.__symbol__("addEventListener")]=null,Node.prototype[t.__symbol__("removeEventListener")]=null,o.patchEventTarget(e,[Node.prototype]))})});
/**
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
!function(t){"function"==typeof define&&define.amd?define(t):t()}(function(){"use strict";
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/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,[n]))})})});
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, (function () { 'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
/**
* @fileoverview
* @suppress {missingRequire}
*/
(function (global) {
// 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;
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
}(function () {
'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @fileoverview
* @suppress {missingRequire}
*/
(function (global) {
// 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);
WtfZoneSpec.forkInstance(zonePathName(targetZone), retValue.name);
return retValue;
};
WtfZoneSpec.prototype.onInvoke = function (parentZoneDelegate, currentZone, targetZone, delegate, applyThis, applyArgs, source) {
var src = source || 'unknown';
var scope = WtfZoneSpec.invokeScope[src];
if (!scope) {
scope = WtfZoneSpec.invokeScope[src] =
wtfEvents.createScope("Zone:invoke:" + source + "(ascii zone)");
return false;
})();
var WtfZoneSpec = /** @class */ (function () {
function WtfZoneSpec() {
this.name = 'WTF';
}
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 = WtfZoneSpec.scheduleInstance[key];
if (!instance) {
instance = WtfZoneSpec.scheduleInstance[key] =
wtfEvents.createInstance("Zone:schedule:" + 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 = WtfZoneSpec.invokeTaskScope[source];
if (!scope) {
scope = WtfZoneSpec.invokeTaskScope[source] =
wtfEvents.createScope("Zone:invokeTask:" + 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 = WtfZoneSpec.cancelInstance[key];
if (!instance) {
instance = WtfZoneSpec.cancelInstance[key] =
wtfEvents.createInstance("Zone:cancel:" + key + "(ascii zone, any options)");
}
var retValue = parentZoneDelegate.cancelTask(targetZone, task);
instance(zonePathName(targetZone), shallowObj(task.data, 2));
return retValue;
};
WtfZoneSpec.prototype.onFork = function (parentZoneDelegate, currentZone, targetZone, zoneSpec) {
var retValue = parentZoneDelegate.fork(targetZone, zoneSpec);
WtfZoneSpec.forkInstance(zonePathName(targetZone), retValue.name);
return retValue;
};
WtfZoneSpec.prototype.onInvoke = function (parentZoneDelegate, currentZone, targetZone, delegate, applyThis, applyArgs, source) {
var src = source || 'unknown';
var scope = WtfZoneSpec.invokeScope[src];
if (!scope) {
scope = WtfZoneSpec.invokeScope[src] =
wtfEvents.createScope("Zone:invoke:" + 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 = WtfZoneSpec.scheduleInstance[key];
if (!instance) {
instance = WtfZoneSpec.scheduleInstance[key] =
wtfEvents.createInstance("Zone:schedule:" + 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 = WtfZoneSpec.invokeTaskScope[source];
if (!scope) {
scope = WtfZoneSpec.invokeTaskScope[source] =
wtfEvents.createScope("Zone:invokeTask:" + 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 = WtfZoneSpec.cancelInstance[key];
if (!instance) {
instance = WtfZoneSpec.cancelInstance[key] =
wtfEvents.createInstance("Zone:cancel:" + key + "(ascii zone, any options)");
}
var retValue = parentZoneDelegate.cancelTask(targetZone, task);
instance(zonePathName(targetZone), shallowObj(task.data, 2));
return retValue;
};
return WtfZoneSpec;
}());
WtfZoneSpec.forkInstance = wtfEnabled ? wtfEvents.createInstance('Zone:fork(ascii zone, ascii newZone)') : null;

@@ -97,37 +96,35 @@ WtfZoneSpec.scheduleInstance = {};

WtfZoneSpec.invokeTaskScope = {};
return WtfZoneSpec;
}());
function shallowObj(obj, depth) {
if (!obj || !depth)
return null;
var out = {};
for (var key in obj) {
if (obj.hasOwnProperty(key)) {
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;
function shallowObj(obj, depth) {
if (!obj || !depth)
return null;
var out = {};
for (var key in obj) {
if (obj.hasOwnProperty(key)) {
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;
}
out[key] = value;
}
return out;
}
return out;
}
function zonePathName(zone) {
var name = zone.name;
var localZone = zone.parent;
while (localZone != null) {
name = localZone.name + '::' + name;
localZone = localZone.parent;
function zonePathName(zone) {
var name = zone.name;
var localZone = zone.parent;
while (localZone != null) {
name = localZone.name + '::' + name;
localZone = localZone.parent;
}
return name;
}
return name;
}
Zone['wtfZoneSpec'] = !wtfEnabled ? null : new WtfZoneSpec();
})(typeof window === 'object' && window || typeof self === 'object' && self || global);
})));
Zone['wtfZoneSpec'] = !wtfEnabled ? null : new WtfZoneSpec();
})(typeof window === 'object' && window || typeof self === 'object' && self || global);
}));
//# sourceMappingURL=wtf_rollup.umd.js.map

@@ -1,1 +0,21 @@

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n():"function"==typeof define&&define.amd?define(n):n()}(0,function(){"use strict";!function(e){var n,o=null,t=null,c=!(!(n=e.wtf)||!(o=n.trace)||(t=o.events,0)),a=function(){function e(){this.name="WTF"}return e.prototype.onFork=function(n,o,t,c){var a=n.fork(t,c);return e.forkInstance(i(t),a.name),a},e.prototype.onInvoke=function(n,c,a,r,s,u,f){var p=f||"unknown",l=e.invokeScope[p];return l||(l=e.invokeScope[p]=t.createScope("Zone:invoke:"+f+"(ascii zone)")),o.leaveScope(l(i(a)),n.invoke(a,r,s,u,f))},e.prototype.onHandleError=function(e,n,o,t){return e.handleError(o,t)},e.prototype.onScheduleTask=function(n,o,c,a){var s=a.type+":"+a.source,u=e.scheduleInstance[s];u||(u=e.scheduleInstance[s]=t.createInstance("Zone:schedule:"+s+"(ascii zone, any data)"));var f=n.scheduleTask(c,a);return u(i(c),r(a.data,2)),f},e.prototype.onInvokeTask=function(n,c,a,r,s,u){var f=r.source,p=e.invokeTaskScope[f];return p||(p=e.invokeTaskScope[f]=t.createScope("Zone:invokeTask:"+f+"(ascii zone)")),o.leaveScope(p(i(a)),n.invokeTask(a,r,s,u))},e.prototype.onCancelTask=function(n,o,c,a){var s=a.source,u=e.cancelInstance[s];u||(u=e.cancelInstance[s]=t.createInstance("Zone:cancel:"+s+"(ascii zone, any options)"));var f=n.cancelTask(c,a);return u(i(c),r(a.data,2)),f},e.forkInstance=c?t.createInstance("Zone:fork(ascii zone, ascii newZone)"):null,e.scheduleInstance={},e.cancelInstance={},e.invokeScope={},e.invokeTaskScope={},e}();function r(e,n){if(!e||!n)return null;var o={};for(var t in e)if(e.hasOwnProperty(t)){var c=e[t];switch(typeof c){case"object":var a=c&&c.constructor&&c.constructor.name;c=a==Object.name?r(c,n-1):a;break;case"function":c=c.name||void 0}o[t]=c}return o}function i(e){for(var n=e.name,o=e.parent;null!=o;)n=o.name+"::"+n,o=o.parent;return n}Zone.wtfZoneSpec=c?new a:null}("object"==typeof window&&window||"object"==typeof self&&self||global)});
/**
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
!function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
!function(e){var n,o=null,c=null,t=!(!(n=e.wtf)||!(o=n.trace)||(c=o.events,0)),a=function(){function e(){this.name="WTF"}return e.prototype.onFork=function(n,o,c,t){var a=n.fork(c,t);return e.forkInstance(i(c),a.name),a},e.prototype.onInvoke=function(n,t,a,r,s,u,f){var l=f||"unknown",p=e.invokeScope[l];return p||(p=e.invokeScope[l]=c.createScope("Zone:invoke:"+f+"(ascii zone)")),o.leaveScope(p(i(a)),n.invoke(a,r,s,u,f))},e.prototype.onHandleError=function(e,n,o,c){return e.handleError(o,c)},e.prototype.onScheduleTask=function(n,o,t,a){var s=a.type+":"+a.source,u=e.scheduleInstance[s];u||(u=e.scheduleInstance[s]=c.createInstance("Zone:schedule:"+s+"(ascii zone, any data)"));var f=n.scheduleTask(t,a);return u(i(t),r(a.data,2)),f},e.prototype.onInvokeTask=function(n,t,a,r,s,u){var f=r.source,l=e.invokeTaskScope[f];return l||(l=e.invokeTaskScope[f]=c.createScope("Zone:invokeTask:"+f+"(ascii zone)")),o.leaveScope(l(i(a)),n.invokeTask(a,r,s,u))},e.prototype.onCancelTask=function(n,o,t,a){var s=a.source,u=e.cancelInstance[s];u||(u=e.cancelInstance[s]=c.createInstance("Zone:cancel:"+s+"(ascii zone, any options)"));var f=n.cancelTask(t,a);return u(i(t),r(a.data,2)),f},e}();function r(e,n){if(!e||!n)return null;var o={};for(var c in e)if(e.hasOwnProperty(c)){var t=e[c];switch(typeof t){case"object":var a=t&&t.constructor&&t.constructor.name;t=a==Object.name?r(t,n-1):a;break;case"function":t=t.name||void 0}o[c]=t}return o}function i(e){for(var n=e.name,o=e.parent;null!=o;)n=o.name+"::"+n,o=o.parent;return n}a.forkInstance=t?c.createInstance("Zone:fork(ascii zone, ascii newZone)"):null,a.scheduleInstance={},a.cancelInstance={},a.invokeScope={},a.invokeTaskScope={},Zone.wtfZoneSpec=t?new a:null}("object"==typeof window&&window||"object"==typeof self&&self||global)});

@@ -18,3 +18,3 @@ /**

*/
var Zone = function(){};
var Zone = function() {};
/**

@@ -29,4 +29,8 @@ * @type {!Zone} The parent Zone.

Zone.assertZonePatched = function(){};
Zone.assertZonePatched = function() {};
Zone.__symbol__ = function(name) {};
Zone.__load_patch = function(name, fn) {};
/**

@@ -58,3 +62,3 @@ * @type {!Zone} Returns the current [Zone]. Returns the current zone. The only way to change

*/
Zone.prototype.get = function(key){};
Zone.prototype.get = function(key) {};

@@ -69,3 +73,3 @@ /**

*/
Zone.prototype.getZoneWith = function(key){};
Zone.prototype.getZoneWith = function(key) {};

@@ -78,3 +82,3 @@ /**

*/
Zone.prototype.fork = function(zoneSpec){};
Zone.prototype.fork = function(zoneSpec) {};

@@ -152,3 +156,4 @@ /**

*/
Zone.prototype.scheduleMacroTask = function(source, callback, data, customSchedule, customCancel) {};
Zone.prototype.scheduleMacroTask = function(source, callback, data, customSchedule, customCancel) {
};

@@ -163,3 +168,4 @@ /**

*/
Zone.prototype.scheduleEventTask = function(source, callback, data, customSchedule, customCancel) {};
Zone.prototype.scheduleEventTask = function(source, callback, data, customSchedule, customCancel) {
};

@@ -170,3 +176,3 @@ /**

*/
Zone.prototype.scheduleTask = function(task){};
Zone.prototype.scheduleTask = function(task) {};

@@ -177,3 +183,3 @@ /**

*/
Zone.prototype.cancelTask = function(task){};
Zone.prototype.cancelTask = function(task) {};

@@ -190,3 +196,4 @@ /**

/**
* @type {Object<string, Object>|undefined} A set of properties to be associated with Zone. Use [Zone.get] to retrieve them.
* @type {Object<string, Object>|undefined} A set of properties to be associated with Zone. Use
* [Zone.get] to retrieve them.
*/

@@ -336,3 +343,3 @@ ZoneSpec.prototype.properties;

*/
var HasTaskState = function(){};
var HasTaskState = function() {};

@@ -359,3 +366,3 @@ /**

*/
var TaskType = function(){};
var TaskType = function() {};

@@ -365,3 +372,3 @@ /**

*/
var TaskState = function(){};
var TaskState = function() {};

@@ -371,3 +378,3 @@ /**

*/
var TaskData = function(){};
var TaskData = function() {};
/**

@@ -374,0 +381,0 @@ * @type {boolean|undefined}

/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, (function () { 'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
Zone.__load_patch('bluebird', function (global, Zone, api) {
// TODO: @JiaLiPassion, we can automatically patch bluebird
// if global.Promise = Bluebird, but sometimes in nodejs,
// global.Promise is not Bluebird, and Bluebird is just be
// used by other libraries such as sequelize, so I think it is
// safe to just expose a method to patch Bluebird explicitly
var BLUEBIRD = 'bluebird';
Zone[Zone.__symbol__(BLUEBIRD)] = function patchBluebird(Bluebird) {
// patch method of Bluebird.prototype which not using `then` internally
var bluebirdApis = ['then', 'spread', 'finally'];
bluebirdApis.forEach(function (bapi) {
api.patchMethod(Bluebird.prototype, bapi, function (delegate) { return function (self, args) {
var zone = Zone.current;
var _loop_1 = function (i) {
var func = args[i];
if (typeof func === 'function') {
args[i] = function () {
var argSelf = this;
var argArgs = arguments;
return new Bluebird(function (res, rej) {
zone.scheduleMicroTask('Promise.then', function () {
try {
res(func.apply(argSelf, argArgs));
}
catch (error) {
rej(error);
}
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
}(function () {
'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
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); });
});
};
}
}
};
for (var i = 0; i < args.length; i++) {
_loop_1(i);
}
return delegate.apply(self, args);
}; });
});
Bluebird.onPossiblyUnhandledRejection(function (e, promise) {
try {
Zone.current.runGuarded(function () {
throw e;
});
}
catch (err) {
api.onUnhandledError(err);
}
});
// override global promise
global[api.symbol('ZoneAwarePromise')] = Bluebird;
};
});
})));
Bluebird.onPossiblyUnhandledRejection(function (e, promise) {
try {
Zone.current.runGuarded(function () {
e.isHandledByZone = true;
throw e;
});
}
catch (err) {
err.isHandledByZone = false;
api.onUnhandledError(err);
}
});
// override global promise
global[api.symbol('ZoneAwarePromise')] = Bluebird;
};
});
}));
//# sourceMappingURL=zone_bluebird_rollup.umd.js.map

@@ -1,1 +0,13 @@

!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t()}(0,function(){"use strict";Zone.__load_patch("bluebird",function(n,t,e){t[t.__symbol__("bluebird")]=function(o){["then","spread","finally"].forEach(function(n){e.patchMethod(o.prototype,n,function(n){return function(e,r){for(var c=t.current,i=function(n){var t=r[n];"function"==typeof t&&(r[n]=function(){var n=this,e=arguments;return new o(function(o,r){c.scheduleMicroTask("Promise.then",function(){try{o(t.apply(n,e))}catch(n){r(n)}})})})},u=0;u<r.length;u++)i(u);return n.apply(e,r)}})}),o.onPossiblyUnhandledRejection(function(n,o){try{t.current.runGuarded(function(){throw n})}catch(n){e.onUnhandledError(n)}}),n[e.symbol("ZoneAwarePromise")]=o}})});
/**
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
!function(n){"function"==typeof define&&define.amd?define(n):n()}(function(){"use strict";
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/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[o.symbol("ZoneAwarePromise")]=i}})});
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, (function () { 'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
/**
* @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.
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
}(function () {
'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var blacklistedStackFramesSymbol = api.symbol('blacklistedStackFrames');
var NativeError = global[api.symbol('Error')] = global['Error'];
// Store the frames which should be removed from the stack frames
var blackListedStackFrames = {};
// 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 blackListedStackFramesPolicy = global['__Zone_Error_BlacklistedStackFrames_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 (blackListedStackFrames[frame]) {
case 0 /* blackList */:
frames.splice(i, 1);
i--;
break;
case 1 /* transition */:
if (zoneFrame.parent) {
// This is the special frame where zone changed. Print and process it accordingly
zoneFrame = zoneFrame.parent;
}
else {
zoneFrame = null;
}
frames.splice(i, 1);
i--;
break;
default:
frames[i] += isZoneFrame ? " [" + zoneFrame.zone.name + "]" :
" [" + zoneFrame.zoneName + "]";
}
}
}
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.
* @fileoverview
* @suppress {globalThis,undefinedVars}
*/
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 (blackListedStackFramesPolicy === 'lazy') {
// don't handle stack trace now
error[api.symbol('zoneFrameNames')] = buildZoneFrameNames(zoneFrame);
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 blacklistedStackFramesSymbol = api.symbol('blacklistedStackFrames');
var NativeError = global[api.symbol('Error')] = global['Error'];
// Store the frames which should be removed from the stack frames
var blackListedStackFrames = {};
// 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 blackListedStackFramesPolicy = global['__Zone_Error_BlacklistedStackFrames_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;
}
else if (blackListedStackFramesPolicy === 'default') {
try {
error.stack = error.zoneAwareStack = buildZoneAwareStackFrames(originalStack, zoneFrame);
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 (blackListedStackFrames[frame]) {
case 0 /* blackList */:
frames.splice(i, 1);
i--;
break;
case 1 /* transition */:
if (zoneFrame.parent) {
// This is the special frame where zone changed. Print and process it accordingly
zoneFrame = zoneFrame.parent;
}
else {
zoneFrame = null;
}
frames.splice(i, 1);
i--;
break;
default:
frames[i] += isZoneFrame ? " [" + zoneFrame.zone.name + "]" :
" [" + zoneFrame.zoneName + "]";
}
}
catch (e) {
// ignore as some browsers don't allow overriding of stack
}
}
return frames.join('\n');
}
if (this instanceof NativeError && this.constructor != NativeError) {
// We got called with a `new` operator AND we are subclass of ZoneAwareError
// in that case we have to copy all of our properties to `this`.
Object.keys(error).concat('stack', 'message').forEach(function (key) {
var value = error[key];
if (value !== undefined) {
/**
* This is ZoneAwareError which processes the stack frame and cleans up extra frames as well as
* adds zone information to it.
*/
function ZoneAwareError() {
var _this = this;
// We always have to return native error otherwise the browser console will not work.
var error = NativeError.apply(this, arguments);
// Save original stack trace
var originalStack = error['originalStack'] = error.stack;
// Process the stack trace and rewrite the frames.
if (ZoneAwareError[stackRewrite] && originalStack) {
var zoneFrame = api.currentZoneFrame();
if (blackListedStackFramesPolicy === 'lazy') {
// don't handle stack trace now
error[api.symbol('zoneFrameNames')] = buildZoneFrameNames(zoneFrame);
}
else if (blackListedStackFramesPolicy === 'default') {
try {
_this[key] = value;
error.stack = error.zoneAwareStack = buildZoneAwareStackFrames(originalStack, zoneFrame);
}
catch (e) {
// ignore the assignment in case it is a setter and it throws.
// ignore as some browsers don't allow overriding of stack
}
}
});
return this;
}
return error;
}
// Copy the prototype so that instanceof operator works as expected
ZoneAwareError.prototype = NativeError.prototype;
ZoneAwareError[blacklistedStackFramesSymbol] = blackListedStackFrames;
ZoneAwareError[stackRewrite] = false;
var zoneAwareStackSymbol = api.symbol('zoneAwareStack');
// try to define zoneAwareStack property when blackListed
// policy is delay
if (blackListedStackFramesPolicy === 'lazy') {
Object.defineProperty(ZoneAwareError.prototype, 'zoneAwareStack', {
configurable: true,
enumerable: true,
get: function () {
if (!this[zoneAwareStackSymbol]) {
this[zoneAwareStackSymbol] = buildZoneAwareStackFrames(this.originalStack, this[api.symbol('zoneFrameNames')], false);
}
return this[zoneAwareStackSymbol];
},
set: function (newStack) {
this.originalStack = newStack;
this[zoneAwareStackSymbol] = buildZoneAwareStackFrames(this.originalStack, this[api.symbol('zoneFrameNames')], false);
}
});
}
// those properties need special handling
var specialPropertyNames = ['stackTraceLimit', 'captureStackTrace', 'prepareStackTrace'];
// those properties of NativeError should be set to ZoneAwareError
var nativeErrorProperties = Object.keys(NativeError);
if (nativeErrorProperties) {
nativeErrorProperties.forEach(function (prop) {
if (specialPropertyNames.filter(function (sp) { return sp === prop; }).length === 0) {
Object.defineProperty(ZoneAwareError, prop, {
get: function () {
return NativeError[prop];
},
set: function (value) {
NativeError[prop] = value;
if (this instanceof NativeError && this.constructor != NativeError) {
// We got called with a `new` operator AND we are subclass of ZoneAwareError
// in that case we have to copy all of our properties to `this`.
Object.keys(error).concat('stack', 'message').forEach(function (key) {
var value = error[key];
if (value !== undefined) {
try {
_this[key] = value;
}
catch (e) {
// ignore the assignment in case it is a setter and it throws.
}
}
});
return this;
}
});
}
if (NativeError.hasOwnProperty('stackTraceLimit')) {
// Extend default stack limit as we will be removing few frames.
NativeError.stackTraceLimit = Math.max(NativeError.stackTraceLimit, 15);
// make sure that ZoneAwareError has the same property which forwards to NativeError.
Object.defineProperty(ZoneAwareError, 'stackTraceLimit', {
get: function () {
return NativeError.stackTraceLimit;
},
return error;
}
// Copy the prototype so that instanceof operator works as expected
ZoneAwareError.prototype = NativeError.prototype;
ZoneAwareError[blacklistedStackFramesSymbol] = blackListedStackFrames;
ZoneAwareError[stackRewrite] = false;
var zoneAwareStackSymbol = api.symbol('zoneAwareStack');
// try to define zoneAwareStack property when blackListed
// policy is delay
if (blackListedStackFramesPolicy === '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) {
return NativeError.stackTraceLimit = 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 (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 (blackListedStackFramesPolicy === 'disable') {
// don't need to run detectZone to populate
// blacklisted stack frames
return;
}
});
if (blackListedStackFramesPolicy === 'disable') {
// don't need to run detectZone to populate
// blacklisted stack frames
return;
}
// Now we need to populate the `blacklistedStackFrames` 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;
if (fnName.indexOf('ZoneAwareError') !== -1) {
if (fnName.indexOf('new ZoneAwareError') !== -1) {
zoneAwareFrame1 = frame;
zoneAwareFrame2 = frame.replace('new ZoneAwareError', 'new Error.ZoneAwareError');
// Now we need to populate the `blacklistedStackFrames` 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 /* 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');
}
}
blackListedStackFrames[zoneAwareFrame2] = 0 /* blackList */;
}
if (fnName.indexOf('runGuarded') !== -1) {
runGuardedFrame = true;
}
else if (fnName.indexOf('runTask') !== -1) {
runTaskFrame = true;
}
else if (fnName.indexOf('run') !== -1) {
runFrame = true;
}
else {
zoneAwareFrame1WithoutNew = frame;
zoneAwareFrame2WithoutNew = frame.replace('Error.', '');
if (frame.indexOf('Error.ZoneAwareError') === -1) {
zoneAwareFrame3WithoutNew =
frame.replace('ZoneAwareError', 'Error.ZoneAwareError');
}
frameType = 0 /* blackList */;
}
blackListedStackFrames[zoneAwareFrame2] = 0 /* blackList */;
blackListedStackFrames[frame] = frameType;
// Once we find all of the frames we can stop looking.
if (runFrame && runGuardedFrame && runTaskFrame) {
ZoneAwareError[stackRewrite] = true;
break;
}
}
if (fnName.indexOf('runGuarded') !== -1) {
runGuardedFrame = true;
}
else if (fnName.indexOf('runTask') !== -1) {
runTaskFrame = true;
}
else if (fnName.indexOf('run') !== -1) {
runFrame = true;
}
else {
frameType = 0 /* blackList */;
}
blackListedStackFrames[frame] = frameType;
// Once we find all of the frames we can stop looking.
if (runFrame && runGuardedFrame && runTaskFrame) {
ZoneAwareError[stackRewrite] = true;
break;
}
}
}
return false;
}
return false;
}
});
// carefully constructor a stack frame which contains all of the frames of interest which
// need to be detected and blacklisted.
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.
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(blacklistedStackFramesSymbol, function () {
childDetectZone.scheduleMacroTask(blacklistedStackFramesSymbol, function () {
childDetectZone.scheduleMicroTask(blacklistedStackFramesSymbol, function () {
throw new Error();
});
// carefully constructor a stack frame which contains all of the frames of interest which
// need to be detected and blacklisted.
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.
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(blacklistedStackFramesSymbol, function () {
childDetectZone.scheduleMacroTask(blacklistedStackFramesSymbol, function () {
childDetectZone.scheduleMicroTask(blacklistedStackFramesSymbol, function () { throw new Error(); }, undefined, function (t) {
t._transitionTo = fakeTransitionTo;
t.invoke();
});
childDetectZone.scheduleMicroTask(blacklistedStackFramesSymbol, function () { throw Error(); }, undefined, function (t) {
t._transitionTo = fakeTransitionTo;
t.invoke();
});
}, undefined, function (t) {
t._transitionTo = fakeTransitionTo;
t.invoke();
});
childDetectZone.scheduleMicroTask(blacklistedStackFramesSymbol, function () {
throw Error();
}, undefined, function (t) {
t._transitionTo = fakeTransitionTo;
t.invoke();
});
}, function () { });
}, undefined, function (t) {

@@ -339,11 +326,7 @@ t._transitionTo = fakeTransitionTo;

}, function () { });
}, undefined, function (t) {
t._transitionTo = fakeTransitionTo;
t.invoke();
}, function () { });
});
});
Error.stackTraceLimit = originalStackTraceLimit;
});
Error.stackTraceLimit = originalStackTraceLimit;
});
})));
}));
//# sourceMappingURL=zone_error_rollup.umd.js.map

@@ -1,1 +0,13 @@

!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e():"function"==typeof define&&define.amd?define(e):e()}(0,function(){"use strict";Zone.__load_patch("Error",function(r,e,t){var n,a,o,i,c,s=t.symbol("blacklistedStackFrames"),u=r[t.symbol("Error")]=r.Error,f={};r.Error=d;var k="stackRewrite",l=r.__Zone_Error_BlacklistedStackFrames_policy||"default";function p(r,e,t){void 0===t&&(t=!0);for(var s=r.split("\n"),u=0;s[u]!==n&&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]+=t?" ["+e.zone.name+"]":" ["+e.zoneName+"]"}}return s.join("\n")}function d(){var r=this,e=u.apply(this,arguments),n=e.originalStack=e.stack;if(d[k]&&n){var a=t.currentZoneFrame();if("lazy"===l)e[t.symbol("zoneFrameNames")]=function(r){for(var e={zoneName:r.zone.name},t=e;r.parent;){var n={zoneName:(r=r.parent).zone.name};e.parent=n,e=n}return t}(a);else if("default"===l)try{e.stack=e.zoneAwareStack=p(n,a)}catch(r){}}return this instanceof u&&this.constructor!=u?(Object.keys(e).concat("stack","message").forEach(function(t){var n=e[t];if(void 0!==n)try{r[t]=n}catch(r){}}),this):e}d.prototype=u.prototype,d[s]=f,d[k]=!1;var m=t.symbol("zoneAwareStack");"lazy"===l&&Object.defineProperty(d.prototype,"zoneAwareStack",{configurable:!0,enumerable:!0,get:function(){return this[m]||(this[m]=p(this.originalStack,this[t.symbol("zoneFrameNames")],!1)),this[m]},set:function(r){this.originalStack=r,this[m]=p(this.originalStack,this[t.symbol("zoneFrameNames")],!1)}});var h=["stackTraceLimit","captureStackTrace","prepareStackTrace"],T=Object.keys(u);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){u.captureStackTrace(r,e)}});if(Object.defineProperty(d,"prepareStackTrace",{get:function(){return u.prepareStackTrace},set:function(r){return u.prepareStackTrace=r&&"function"==typeof r?function(e,t){if(t)for(var n=0;n<t.length;n++){if("zoneCaptureStackTrace"===t[n].getFunctionName()){t.splice(n,1);break}}return r.call(this,e,t)}:r}}),"disable"!==l){var v=e.current.fork({name:"detect",onHandleError:function(r,e,t,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")?(n=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,t,n){return r.scheduleTask(t,n)},onInvokeTask:function(r,e,t,n,a,o){return r.invokeTask(t,n,a,o)},onCancelTask:function(r,e,t,n){return r.cancelTask(t,n)},onInvoke:function(r,e,t,n,a,o,i){return r.invoke(t,n,a,o,i)}}),y=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=y}})});
/**
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
!function(r){"function"==typeof define&&define.amd?define(r):r()}(function(){"use strict";
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/Zone.__load_patch("Error",function(r,e,n){var t,a,o,i,c,s=n.symbol("blacklistedStackFrames"),u=r[n.symbol("Error")]=r.Error,f={};r.Error=d;var k="stackRewrite",l=r.__Zone_Error_BlacklistedStackFrames_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]+=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 o(r){for(var e={zoneName:r.zone.name},n=e;r.parent;){var t={zoneName:(r=r.parent).zone.name};e.parent=t,e=t}return n}(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 h=n.symbol("zoneAwareStack");"lazy"===l&&Object.defineProperty(d.prototype,"zoneAwareStack",{configurable:!0,enumerable:!0,get:function(){return this[h]||(this[h]=p(this.originalStack,this[n.symbol("zoneFrameNames")],!1)),this[h]},set:function(r){this.originalStack=r,this[h]=p(this.originalStack,this[n.symbol("zoneFrameNames")],!1)}});var m=["stackTraceLimit","captureStackTrace","prepareStackTrace"],T=Object.keys(u);if(T&&T.forEach(function(r){0===m.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,h=!1;u.length;){var m=u.shift();if(/:\d+:\d+/.test(m)||"ZoneAwareError"===m){var T=m.split("(")[0].split("@")[0],v=1;if(-1!==T.indexOf("ZoneAwareError")&&(-1!==T.indexOf("new ZoneAwareError")?(t=m,a=m.replace("new ZoneAwareError","new Error.ZoneAwareError")):(o=m,i=m.replace("Error.",""),-1===m.indexOf("Error.ZoneAwareError")&&(c=m.replace("ZoneAwareError","Error.ZoneAwareError"))),f[a]=0),-1!==T.indexOf("runGuarded")?p=!0:-1!==T.indexOf("runTask")?h=!0:-1!==T.indexOf("run")?l=!0:v=0,f[m]=v,l&&p&&h){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}})});

@@ -1,1 +0,110 @@

const Zone$1=function(e){const t=e.performance;function n(e){t&&t.mark&&t.mark(e)}function o(e,n){t&&t.measure&&t.measure(e,n)}n("Zone");const r=!0===e.__zone_symbol__forceDuplicateZoneCheck;if(e.Zone){if(r||"function"!=typeof e.Zone.__symbol__)throw new Error("Zone already loaded.");return e.Zone}class s{constructor(e,t){this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new a(this,this._parent&&this._parent._zoneDelegate,t)}static assertZonePatched(){if(e.Promise!==P.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let e=s.current;for(;e.parent;)e=e.parent;return e}static get current(){return D.zone}static get currentTask(){return z}static __load_patch(t,i){if(P.hasOwnProperty(t)){if(r)throw Error("Already loaded patch: "+t)}else if(!e["__Zone_disable_"+t]){const r="Zone:"+t;n(r),P[t]=i(e,s,N),o(r,r)}}get parent(){return this._parent}get name(){return this._name}get(e){const t=this.getZoneWith(e);if(t)return t._properties[e]}getZoneWith(e){let t=this;for(;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null}fork(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)}wrap(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);const n=this._zoneDelegate.intercept(this,e,t),o=this;return function(){return o.runGuarded(n,this,arguments,t)}}run(e,t,n,o){D={parent:D,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,o)}finally{D=D.parent}}runGuarded(e,t=null,n,o){D={parent:D,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,o)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{D=D.parent}}runTask(e,t,n){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||g).name+"; Execution: "+this.name+")");if(e.state===y&&(e.type===w||e.type===O))return;const o=e.state!=T;o&&e._transitionTo(T,b),e.runCount++;const r=z;z=e,D={parent:D,zone:this};try{e.type==O&&e.data&&!e.data.isPeriodic&&(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,e,t,n)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{e.state!==y&&e.state!==v&&(e.type==w||e.data&&e.data.isPeriodic?o&&e._transitionTo(b,T):(e.runCount=0,this._updateTaskCount(e,-1),o&&e._transitionTo(y,T,y))),D=D.parent,z=r}}scheduleTask(e){if(e.zone&&e.zone!==this){let t=this;for(;t;){if(t===e.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${e.zone.name}`);t=t.parent}}e._transitionTo(E,y);const t=[];e._zoneDelegates=t,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(t){throw e._transitionTo(v,E,y),this._zoneDelegate.handleError(this,t),t}return e._zoneDelegates===t&&this._updateTaskCount(e,1),e.state==E&&e._transitionTo(b,E),e}scheduleMicroTask(e,t,n,o){return this.scheduleTask(new c(S,e,t,n,o,void 0))}scheduleMacroTask(e,t,n,o,r){return this.scheduleTask(new c(O,e,t,n,o,r))}scheduleEventTask(e,t,n,o,r){return this.scheduleTask(new c(w,e,t,n,o,r))}cancelTask(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||g).name+"; Execution: "+this.name+")");e._transitionTo(k,b,T);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(v,k),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(y,k),e.runCount=0,e}_updateTaskCount(e,t){const n=e._zoneDelegates;-1==t&&(e._zoneDelegates=null);for(let o=0;o<n.length;o++)n[o]._updateTaskCount(e.type,t)}}s.__symbol__=R;const i={name:"",onHasTask:(e,t,n,o)=>e.hasTask(n,o),onScheduleTask:(e,t,n,o)=>e.scheduleTask(n,o),onInvokeTask:(e,t,n,o,r,s)=>e.invokeTask(n,o,r,s),onCancelTask:(e,t,n,o)=>e.cancelTask(n,o)};class a{constructor(e,t,n){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=e,this._parentDelegate=t,this._forkZS=n&&(n&&n.onFork?n:t._forkZS),this._forkDlgt=n&&(n.onFork?t:t._forkDlgt),this._forkCurrZone=n&&(n.onFork?this.zone:t.zone),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this.zone:t.zone),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this.zone:t.zone),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this.zone:t.zone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this.zone:t.zone),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this.zone:t.zone),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this.zone:t.zone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const o=n&&n.onHasTask,r=t&&t._hasTaskZS;(o||r)&&(this._hasTaskZS=o?n:i,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=e,n.onScheduleTask||(this._scheduleTaskZS=i,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this.zone),n.onInvokeTask||(this._invokeTaskZS=i,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this.zone),n.onCancelTask||(this._cancelTaskZS=i,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this.zone))}fork(e,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,t):new s(e,t)}intercept(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,e,t,n):t}invoke(e,t,n,o,r){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,e,t,n,o,r):t.apply(n,o)}handleError(e,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,e,t)}scheduleTask(e,t){let n=t;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),(n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,e,t))||(n=t);else if(t.scheduleFn)t.scheduleFn(t);else{if(t.type!=S)throw new Error("Task is missing scheduleFn.");_(t)}return n}invokeTask(e,t,n,o){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,e,t,n,o):t.callback.apply(n,o)}cancelTask(e,t){let n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,e,t);else{if(!t.cancelFn)throw Error("Task is not cancelable");n=t.cancelFn(t)}return n}hasTask(e,t){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,e,t)}catch(t){this.handleError(e,t)}}_updateTaskCount(e,t){const n=this._taskCounts,o=n[e],r=n[e]=o+t;if(r<0)throw new Error("More tasks executed then were scheduled.");if(0==o||0==r){const t={microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e};this.hasTask(this.zone,t)}}}class c{constructor(t,n,o,r,s,i){this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=t,this.source=n,this.data=r,this.scheduleFn=s,this.cancelFn=i,this.callback=o;const a=this;t===w&&r&&r.useG?this.invoke=c.invokeTask:this.invoke=function(){return c.invokeTask.call(e,a,this,arguments)}}static invokeTask(e,t,n){e||(e=this),Z++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{1==Z&&m(),Z--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(y,E)}_transitionTo(e,t,n){if(this._state!==t&&this._state!==n)throw new Error(`${this.type} '${this.source}': can not transition to '${e}', expecting state '${t}'${n?" or '"+n+"'":""}, was '${this._state}'.`);this._state=e,e==y&&(this._zoneDelegates=null)}toString(){return this.data&&void 0!==this.data.handleId?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}const l=R("setTimeout"),u=R("Promise"),p=R("then");let h,f=[],d=!1;function _(t){if(0===Z&&0===f.length)if(h||e[u]&&(h=e[u].resolve(0)),h){let e=h[p];e||(e=h.then),e.call(h,m)}else e[l](m,0);t&&f.push(t)}function m(){if(!d){for(d=!0;f.length;){const e=f;f=[];for(let t=0;t<e.length;t++){const n=e[t];try{n.zone.runTask(n,null,null)}catch(e){N.onUnhandledError(e)}}}N.microtaskDrainDone(),d=!1}}const g={name:"NO ZONE"},y="notScheduled",E="scheduling",b="scheduled",T="running",k="canceling",v="unknown",S="microTask",O="macroTask",w="eventTask",P={},N={symbol:R,currentZoneFrame:()=>D,onUnhandledError:I,microtaskDrainDone:I,scheduleMicroTask:_,showUncaughtError:()=>!s[R("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:I,patchMethod:()=>I,bindArguments:()=>[],patchThen:()=>I,patchMacroTask:()=>I,setNativePromise:e=>{e&&"function"==typeof e.resolve&&(h=e.resolve(0))},patchEventPrototype:()=>I,isIEOrEdge:()=>!1,getGlobalObjects:()=>void 0,ObjectDefineProperty:()=>I,ObjectGetOwnPropertyDescriptor:()=>void 0,ObjectCreate:()=>void 0,ArraySlice:()=>[],patchClass:()=>I,wrapWithCurrentZone:()=>I,filterProperties:()=>[],attachOriginToPatched:()=>I,_redefineProperty:()=>I,patchCallbacks:()=>I};let D={parent:null,zone:new s(null,null)},z=null,Z=0;function I(){}function R(e){return"__zone_symbol__"+e}return o("Zone","Zone"),e.Zone=s}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global);Zone.__load_patch("ZoneAwarePromise",(e,t,n)=>{const o=Object.getOwnPropertyDescriptor,r=Object.defineProperty;const s=n.symbol,i=[],a=s("Promise"),c=s("then"),l="__creationTrace__";n.onUnhandledError=(e=>{if(n.showUncaughtError()){const t=e&&e.rejection;t?console.error("Unhandled Promise rejection:",t instanceof Error?t.message:t,"; Zone:",e.zone.name,"; Task:",e.task&&e.task.source,"; Value:",t,t instanceof Error?t.stack:void 0):console.error(e)}}),n.microtaskDrainDone=(()=>{for(;i.length;)for(;i.length;){const e=i.shift();try{e.zone.runGuarded(()=>{throw e})}catch(e){p(e)}}});const u=s("unhandledPromiseRejectionHandler");function p(e){n.onUnhandledError(e);try{const n=t[u];n&&"function"==typeof n&&n.call(this,e)}catch(e){}}function h(e){return e&&e.then}function f(e){return e}function d(e){return M.reject(e)}const _=s("state"),m=s("value"),g=s("finally"),y=s("parentPromiseValue"),E=s("parentPromiseState"),b="Promise.then",T=null,k=!0,v=!1,S=0;function O(e,t){return n=>{try{D(e,t,n)}catch(t){D(e,!1,t)}}}const w=function(){let e=!1;return function(t){return function(){e||(e=!0,t.apply(null,arguments))}}},P="Promise resolved with itself",N=s("currentTaskTrace");function D(e,o,s){const a=w();if(e===s)throw new TypeError(P);if(e[_]===T){let c=null;try{"object"!=typeof s&&"function"!=typeof s||(c=s&&s.then)}catch(t){return a(()=>{D(e,!1,t)})(),e}if(o!==v&&s instanceof M&&s.hasOwnProperty(_)&&s.hasOwnProperty(m)&&s[_]!==T)Z(s),D(e,s[_],s[m]);else if(o!==v&&"function"==typeof c)try{c.call(s,a(O(e,o)),a(O(e,!1)))}catch(t){a(()=>{D(e,!1,t)})()}else{e[_]=o;const a=e[m];if(e[m]=s,e[g]===g&&o===k&&(e[_]=e[E],e[m]=e[y]),o===v&&s instanceof Error){const e=t.currentTask&&t.currentTask.data&&t.currentTask.data[l];e&&r(s,N,{configurable:!0,enumerable:!1,writable:!0,value:e})}for(let t=0;t<a.length;)I(e,a[t++],a[t++],a[t++],a[t++]);if(0==a.length&&o==v){e[_]=S;try{throw new Error("Uncaught (in promise): "+function(e){if(e&&e.toString===Object.prototype.toString){const t=e.constructor&&e.constructor.name;return(t||"")+": "+JSON.stringify(e)}return e?e.toString():Object.prototype.toString.call(e)}(s)+(s&&s.stack?"\n"+s.stack:""))}catch(o){const r=o;r.rejection=s,r.promise=e,r.zone=t.current,r.task=t.currentTask,i.push(r),n.scheduleMicroTask()}}}}return e}const z=s("rejectionHandledHandler");function Z(e){if(e[_]===S){try{const n=t[z];n&&"function"==typeof n&&n.call(this,{rejection:e[m],promise:e})}catch(e){}e[_]=v;for(let t=0;t<i.length;t++)e===i[t].promise&&i.splice(t,1)}}function I(e,t,n,o,r){Z(e);const s=e[_],i=s?"function"==typeof o?o:f:"function"==typeof r?r:d;t.scheduleMicroTask(b,()=>{try{const o=e[m],r=n&&g===n[g];r&&(n[y]=o,n[E]=s);const a=t.run(i,void 0,r&&i!==d&&i!==f?[]:[o]);D(n,!0,a)}catch(e){D(n,!1,e)}},n)}const R="function ZoneAwarePromise() { [native code] }";class M{constructor(e){const t=this;if(!(t instanceof M))throw new Error("Must be an instanceof Promise.");t[_]=T,t[m]=[];try{e&&e(O(t,k),O(t,v))}catch(e){D(t,!1,e)}}static toString(){return R}static resolve(e){return D(new this(null),k,e)}static reject(e){return D(new this(null),v,e)}static race(e){let t,n,o=new this((e,o)=>{t=e,n=o});function r(e){t(e)}function s(e){n(e)}for(let t of e)h(t)||(t=this.resolve(t)),t.then(r,s);return o}static all(e){let t,n,o=new this((e,o)=>{t=e,n=o}),r=2,s=0;const i=[];for(let o of e){h(o)||(o=this.resolve(o));const e=s;o.then(n=>{i[e]=n,0===--r&&t(i)},n),r++,s++}return 0===(r-=2)&&t(i),o}get[Symbol.toStringTag](){return"Promise"}then(e,n){const o=new this.constructor(null),r=t.current;return this[_]==T?this[m].push(r,o,e,n):I(this,r,o,e,n),o}catch(e){return this.then(null,e)}finally(e){const n=new this.constructor(null);n[g]=g;const o=t.current;return this[_]==T?this[m].push(o,n,e,e):I(this,o,n,e,e),n}}M.resolve=M.resolve,M.reject=M.reject,M.race=M.race,M.all=M.all;const j=e[a]=e.Promise,C=t.__symbol__("ZoneAwarePromise");let L=o(e,"Promise");L&&!L.configurable||(L&&delete L.writable,L&&delete L.value,L||(L={configurable:!0,enumerable:!0}),L.get=function(){return e[C]?e[C]:e[a]},L.set=function(t){t===M?e[C]=t:(e[a]=t,t.prototype[c]||F(t),n.setNativePromise(t))},r(e,"Promise",L)),e.Promise=M;const A=s("thenPatched");function F(e){const t=e.prototype,n=o(t,"then");if(n&&(!1===n.writable||!n.configurable))return;const r=t.then;t[c]=r,e.prototype.then=function(e,t){return new M((e,t)=>{r.call(this,e,t)}).then(e,t)},e[A]=!0}if(n.patchThen=F,j){F(j);const t=e.fetch;"function"==typeof t&&(e[n.symbol("fetch")]=t,e.fetch=function(e){return function(){let t=e.apply(this,arguments);if(t instanceof M)return t;let n=t.constructor;return n[A]||F(n),t}}(t))}return Promise[t.__symbol__("uncaughtPromiseErrors")]=i,M});const ObjectGetOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,ObjectDefineProperty=Object.defineProperty,ObjectGetPrototypeOf=Object.getPrototypeOf,ObjectCreate=Object.create,ArraySlice=Array.prototype.slice,ADD_EVENT_LISTENER_STR="addEventListener",REMOVE_EVENT_LISTENER_STR="removeEventListener",ZONE_SYMBOL_ADD_EVENT_LISTENER=Zone.__symbol__(ADD_EVENT_LISTENER_STR),ZONE_SYMBOL_REMOVE_EVENT_LISTENER=Zone.__symbol__(REMOVE_EVENT_LISTENER_STR),TRUE_STR="true",FALSE_STR="false",ZONE_SYMBOL_PREFIX="__zone_symbol__";function wrapWithCurrentZone(e,t){return Zone.current.wrap(e,t)}function scheduleMacroTaskWithCurrentZone(e,t,n,o,r){return Zone.current.scheduleMacroTask(e,t,n,o,r)}const zoneSymbol=Zone.__symbol__,isWindowExists="undefined"!=typeof window,internalWindow=isWindowExists?window:void 0,_global=isWindowExists&&internalWindow||"object"==typeof self&&self||global,REMOVE_ATTRIBUTE="removeAttribute",NULL_ON_PROP_VALUE=[null];function bindArguments(e,t){for(let n=e.length-1;n>=0;n--)"function"==typeof e[n]&&(e[n]=wrapWithCurrentZone(e[n],t+"_"+n));return e}function patchPrototype(e,t){const n=e.constructor.name;for(let o=0;o<t.length;o++){const r=t[o],s=e[r];if(s){if(!isPropertyWritable(ObjectGetOwnPropertyDescriptor(e,r)))continue;e[r]=(e=>{const t=function(){return e.apply(this,bindArguments(arguments,n+"."+r))};return attachOriginToPatched(t,e),t})(s)}}}function isPropertyWritable(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&void 0===e.set)}const isWebWorker="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,isNode=!("nw"in _global)&&void 0!==_global.process&&"[object process]"==={}.toString.call(_global.process),isBrowser=!isNode&&!isWebWorker&&!(!isWindowExists||!internalWindow.HTMLElement),isMix=void 0!==_global.process&&"[object process]"==={}.toString.call(_global.process)&&!isWebWorker&&!(!isWindowExists||!internalWindow.HTMLElement),zoneSymbolEventNames={},wrapFn=function(e){if(!(e=e||_global.event))return;let t=zoneSymbolEventNames[e.type];t||(t=zoneSymbolEventNames[e.type]=zoneSymbol("ON_PROPERTY"+e.type));const n=this||e.target||_global,o=n[t];let r;if(isBrowser&&n===internalWindow&&"error"===e.type){const t=e;!0===(r=o&&o.call(this,t.message,t.filename,t.lineno,t.colno,t.error))&&e.preventDefault()}else null==(r=o&&o.apply(this,arguments))||r||e.preventDefault();return r};function patchProperty(e,t,n){let o=ObjectGetOwnPropertyDescriptor(e,t);if(!o&&n){ObjectGetOwnPropertyDescriptor(n,t)&&(o={enumerable:!0,configurable:!0})}if(!o||!o.configurable)return;const r=zoneSymbol("on"+t+"patched");if(e.hasOwnProperty(r)&&e[r])return;delete o.writable,delete o.value;const s=o.get,i=o.set,a=t.substr(2);let c=zoneSymbolEventNames[a];c||(c=zoneSymbolEventNames[a]=zoneSymbol("ON_PROPERTY"+a)),o.set=function(t){let n=this;n||e!==_global||(n=_global),n&&(n[c]&&n.removeEventListener(a,wrapFn),i&&i.apply(n,NULL_ON_PROP_VALUE),"function"==typeof t?(n[c]=t,n.addEventListener(a,wrapFn,!1)):n[c]=null)},o.get=function(){let n=this;if(n||e!==_global||(n=_global),!n)return null;const r=n[c];if(r)return r;if(s){let e=s&&s.call(this);if(e)return o.set.call(this,e),"function"==typeof n[REMOVE_ATTRIBUTE]&&n.removeAttribute(t),e}return null},ObjectDefineProperty(e,t,o),e[r]=!0}function patchOnProperties(e,t,n){if(t)for(let o=0;o<t.length;o++)patchProperty(e,"on"+t[o],n);else{const t=[];for(const n in e)"on"==n.substr(0,2)&&t.push(n);for(let o=0;o<t.length;o++)patchProperty(e,t[o],n)}}const originalInstanceKey=zoneSymbol("originalInstance");function patchClass(e){const t=_global[e];if(!t)return;_global[zoneSymbol(e)]=t,_global[e]=function(){const n=bindArguments(arguments,e);switch(n.length){case 0:this[originalInstanceKey]=new t;break;case 1:this[originalInstanceKey]=new t(n[0]);break;case 2:this[originalInstanceKey]=new t(n[0],n[1]);break;case 3:this[originalInstanceKey]=new t(n[0],n[1],n[2]);break;case 4:this[originalInstanceKey]=new t(n[0],n[1],n[2],n[3]);break;default:throw new Error("Arg list too long.")}},attachOriginToPatched(_global[e],t);const n=new t(function(){});let o;for(o in n)"XMLHttpRequest"===e&&"responseBlob"===o||function(t){"function"==typeof n[t]?_global[e].prototype[t]=function(){return this[originalInstanceKey][t].apply(this[originalInstanceKey],arguments)}:ObjectDefineProperty(_global[e].prototype,t,{set:function(n){"function"==typeof n?(this[originalInstanceKey][t]=wrapWithCurrentZone(n,e+"."+t),attachOriginToPatched(this[originalInstanceKey][t],n)):this[originalInstanceKey][t]=n},get:function(){return this[originalInstanceKey][t]}})}(o);for(o in t)"prototype"!==o&&t.hasOwnProperty(o)&&(_global[e][o]=t[o])}function copySymbolProperties(e,t){if("function"!=typeof Object.getOwnPropertySymbols)return;Object.getOwnPropertySymbols(e).forEach(n=>{const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,{get:function(){return e[n]},set:function(t){(!o||o.writable&&"function"==typeof o.set)&&(e[n]=t)},enumerable:!o||o.enumerable,configurable:!o||o.configurable})})}let shouldCopySymbolProperties=!1;function patchMethod(e,t,n){let o=e;for(;o&&!o.hasOwnProperty(t);)o=ObjectGetPrototypeOf(o);!o&&e[t]&&(o=e);const r=zoneSymbol(t);let s=null;if(o&&!(s=o[r])){if(s=o[r]=o[t],isPropertyWritable(o&&ObjectGetOwnPropertyDescriptor(o,t))){const e=n(s,r,t);o[t]=function(){return e(this,arguments)},attachOriginToPatched(o[t],s),shouldCopySymbolProperties&&copySymbolProperties(s,o[t])}}return s}function patchMacroTask(e,t,n){let o=null;function r(e){const t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},o.apply(t.target,t.args),e}o=patchMethod(e,t,e=>(function(t,o){const s=n(t,o);return s.cbIdx>=0&&"function"==typeof o[s.cbIdx]?scheduleMacroTaskWithCurrentZone(s.name,o[s.cbIdx],s,r):e.apply(t,o)}))}function attachOriginToPatched(e,t){e[zoneSymbol("OriginalDelegate")]=t}let isDetectedIEOrEdge=!1,ieOrEdge=!1;function isIE(){try{const e=internalWindow.navigator.userAgent;if(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/"))return!0}catch(e){}return!1}function isIEOrEdge(){if(isDetectedIEOrEdge)return ieOrEdge;isDetectedIEOrEdge=!0;try{const e=internalWindow.navigator.userAgent;-1===e.indexOf("MSIE ")&&-1===e.indexOf("Trident/")&&-1===e.indexOf("Edge/")||(ieOrEdge=!0)}catch(e){}return ieOrEdge}Zone.__load_patch("toString",e=>{const t=Function.prototype.toString,n=zoneSymbol("OriginalDelegate"),o=zoneSymbol("Promise"),r=zoneSymbol("Error"),s=function(){if("function"==typeof this){const s=this[n];if(s)return"function"==typeof s?t.call(s):Object.prototype.toString.call(s);if(this===Promise){const n=e[o];if(n)return t.call(n)}if(this===Error){const n=e[r];if(n)return t.call(n)}}return t.call(this)};s[n]=t,Function.prototype.toString=s;const i=Object.prototype.toString;Object.prototype.toString=function(){return this instanceof Promise?"[object Promise]":i.call(this)}});let passiveSupported=!1;if("undefined"!=typeof window)try{const e=Object.defineProperty({},"passive",{get:function(){passiveSupported=!0}});window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){passiveSupported=!1}const OPTIMIZED_ZONE_EVENT_TASK_DATA={useG:!0},zoneSymbolEventNames$1={},globalSources={},EVENT_NAME_SYMBOL_REGX=/^__zone_symbol__(\w+)(true|false)$/,IMMEDIATE_PROPAGATION_SYMBOL="__zone_symbol__propagationStopped";function patchEventTarget(e,t,n){const o=n&&n.add||ADD_EVENT_LISTENER_STR,r=n&&n.rm||REMOVE_EVENT_LISTENER_STR,s=n&&n.listeners||"eventListeners",i=n&&n.rmAll||"removeAllListeners",a=zoneSymbol(o),c="."+o+":",l="prependListener",u="."+l+":",p=function(e,t,n){if(e.isRemoved)return;const o=e.callback;"object"==typeof o&&o.handleEvent&&(e.callback=(e=>o.handleEvent(e)),e.originalDelegate=o),e.invoke(e,t,[n]);const s=e.options;if(s&&"object"==typeof s&&s.once){const o=e.originalDelegate?e.originalDelegate:e.callback;t[r].call(t,n.type,o,s)}},h=function(t){if(!(t=t||e.event))return;const n=this||t.target||e,o=n[zoneSymbolEventNames$1[t.type][FALSE_STR]];if(o)if(1===o.length)p(o[0],n,t);else{const e=o.slice();for(let o=0;o<e.length&&(!t||!0!==t[IMMEDIATE_PROPAGATION_SYMBOL]);o++)p(e[o],n,t)}},f=function(t){if(!(t=t||e.event))return;const n=this||t.target||e,o=n[zoneSymbolEventNames$1[t.type][TRUE_STR]];if(o)if(1===o.length)p(o[0],n,t);else{const e=o.slice();for(let o=0;o<e.length&&(!t||!0!==t[IMMEDIATE_PROPAGATION_SYMBOL]);o++)p(e[o],n,t)}};function d(t,n){if(!t)return!1;let p=!0;n&&void 0!==n.useG&&(p=n.useG);const d=n&&n.vh;let _=!0;n&&void 0!==n.chkDup&&(_=n.chkDup);let m=!1;n&&void 0!==n.rt&&(m=n.rt);let g=t;for(;g&&!g.hasOwnProperty(o);)g=ObjectGetPrototypeOf(g);if(!g&&t[o]&&(g=t),!g)return!1;if(g[a])return!1;const y=n&&n.eventNameToString,E={},b=g[a]=g[o],T=g[zoneSymbol(r)]=g[r],k=g[zoneSymbol(s)]=g[s],v=g[zoneSymbol(i)]=g[i];let S;function O(e){passiveSupported||"boolean"==typeof E.options||void 0===E.options||null===E.options||(e.options=!!E.options.capture,E.options=e.options)}n&&n.prepend&&(S=g[zoneSymbol(n.prepend)]=g[n.prepend]);const w=function(e){return S.call(E.target,E.eventName,e.invoke,E.options)},P=p?function(e){if(!E.isExisting)return O(e),b.call(E.target,E.eventName,E.capture?f:h,E.options)}:function(e){return O(e),b.call(E.target,E.eventName,e.invoke,E.options)},N=p?function(e){if(!e.isRemoved){const t=zoneSymbolEventNames$1[e.eventName];let n;t&&(n=t[e.capture?TRUE_STR:FALSE_STR]);const o=n&&e.target[n];if(o)for(let t=0;t<o.length;t++)if(o[t]===e){o.splice(t,1),e.isRemoved=!0,0===o.length&&(e.allRemoved=!0,e.target[n]=null);break}}if(e.allRemoved)return T.call(e.target,e.eventName,e.capture?f:h,e.options)}:function(e){return T.call(e.target,e.eventName,e.invoke,e.options)},D=n&&n.diff?n.diff:function(e,t){const n=typeof t;return"function"===n&&e.callback===t||"object"===n&&e.originalDelegate===t},z=Zone[Zone.__symbol__("BLACK_LISTED_EVENTS")],Z=function(t,n,o,r,s=!1,i=!1){return function(){const a=this||e,c=arguments[0];let l=arguments[1];if(!l)return t.apply(this,arguments);if(isNode&&"uncaughtException"===c)return t.apply(this,arguments);let u=!1;if("function"!=typeof l){if(!l.handleEvent)return t.apply(this,arguments);u=!0}if(d&&!d(t,l,a,arguments))return;const h=arguments[2];if(z)for(let e=0;e<z.length;e++)if(c===z[e])return t.apply(this,arguments);let f,m=!1;void 0===h?f=!1:!0===h?f=!0:!1===h?f=!1:(f=!!h&&!!h.capture,m=!!h&&!!h.once);const g=Zone.current,b=zoneSymbolEventNames$1[c];let T;if(b)T=b[f?TRUE_STR:FALSE_STR];else{const e=(y?y(c):c)+FALSE_STR,t=(y?y(c):c)+TRUE_STR,n=ZONE_SYMBOL_PREFIX+e,o=ZONE_SYMBOL_PREFIX+t;zoneSymbolEventNames$1[c]={},zoneSymbolEventNames$1[c][FALSE_STR]=n,zoneSymbolEventNames$1[c][TRUE_STR]=o,T=f?o:n}let k,v=a[T],S=!1;if(v){if(S=!0,_)for(let e=0;e<v.length;e++)if(D(v[e],l))return}else v=a[T]=[];const O=a.constructor.name,w=globalSources[O];w&&(k=w[c]),k||(k=O+n+(y?y(c):c)),E.options=h,m&&(E.options.once=!1),E.target=a,E.capture=f,E.eventName=c,E.isExisting=S;const P=p?OPTIMIZED_ZONE_EVENT_TASK_DATA:void 0;P&&(P.taskData=E);const N=g.scheduleEventTask(k,l,P,o,r);return E.target=null,P&&(P.taskData=null),m&&(h.once=!0),(passiveSupported||"boolean"!=typeof N.options)&&(N.options=h),N.target=a,N.capture=f,N.eventName=c,u&&(N.originalDelegate=l),i?v.unshift(N):v.push(N),s?a:void 0}};return g[o]=Z(b,c,P,N,m),S&&(g[l]=Z(S,u,w,N,m,!0)),g[r]=function(){const t=this||e,n=arguments[0],o=arguments[2];let r;r=void 0!==o&&(!0===o||!1!==o&&(!!o&&!!o.capture));const s=arguments[1];if(!s)return T.apply(this,arguments);if(d&&!d(T,s,t,arguments))return;const i=zoneSymbolEventNames$1[n];let a;i&&(a=i[r?TRUE_STR:FALSE_STR]);const c=a&&t[a];if(c)for(let e=0;e<c.length;e++){const n=c[e];if(D(n,s))return c.splice(e,1),n.isRemoved=!0,0===c.length&&(n.allRemoved=!0,t[a]=null),n.zone.cancelTask(n),m?t:void 0}return T.apply(this,arguments)},g[s]=function(){const t=this||e,n=arguments[0],o=[],r=findEventTasks(t,y?y(n):n);for(let e=0;e<r.length;e++){const t=r[e];let n=t.originalDelegate?t.originalDelegate:t.callback;o.push(n)}return o},g[i]=function(){const t=this||e,n=arguments[0];if(n){const e=zoneSymbolEventNames$1[n];if(e){const o=e[FALSE_STR],s=e[TRUE_STR],i=t[o],a=t[s];if(i){const e=i.slice();for(let t=0;t<e.length;t++){const o=e[t];let s=o.originalDelegate?o.originalDelegate:o.callback;this[r].call(this,n,s,o.options)}}if(a){const e=a.slice();for(let t=0;t<e.length;t++){const o=e[t];let s=o.originalDelegate?o.originalDelegate:o.callback;this[r].call(this,n,s,o.options)}}}}else{const e=Object.keys(t);for(let t=0;t<e.length;t++){const n=e[t],o=EVENT_NAME_SYMBOL_REGX.exec(n);let r=o&&o[1];r&&"removeListener"!==r&&this[i].call(this,r)}this[i].call(this,"removeListener")}if(m)return this},attachOriginToPatched(g[o],b),attachOriginToPatched(g[r],T),v&&attachOriginToPatched(g[i],v),k&&attachOriginToPatched(g[s],k),!0}let _=[];for(let e=0;e<t.length;e++)_[e]=d(t[e],n);return _}function findEventTasks(e,t){const n=[];for(let o in e){const r=EVENT_NAME_SYMBOL_REGX.exec(o);let s=r&&r[1];if(s&&(!t||s===t)){const t=e[o];if(t)for(let e=0;e<t.length;e++)n.push(t[e])}}return n}function patchEventPrototype(e,t){const n=e.Event;n&&n.prototype&&t.patchMethod(n.prototype,"stopImmediatePropagation",e=>(function(t,n){t[IMMEDIATE_PROPAGATION_SYMBOL]=!0,e&&e.apply(t,n)}))}function patchCallbacks(e,t,n,o,r){const s=Zone.__symbol__(o);if(t[s])return;const i=t[s]=t[o];t[o]=function(s,a,c){return a&&a.prototype&&r.forEach(function(t){const r=`${n}.${o}::`+t,s=a.prototype;if(s.hasOwnProperty(t)){const n=e.ObjectGetOwnPropertyDescriptor(s,t);n&&n.value?(n.value=e.wrapWithCurrentZone(n.value,r),e._redefineProperty(a.prototype,t,n)):s[t]&&(s[t]=e.wrapWithCurrentZone(s[t],r))}else s[t]&&(s[t]=e.wrapWithCurrentZone(s[t],r))}),i.call(t,s,a,c)},e.attachOriginToPatched(t[o],i)}const zoneSymbol$1=Zone.__symbol__,_defineProperty=Object[zoneSymbol$1("defineProperty")]=Object.defineProperty,_getOwnPropertyDescriptor=Object[zoneSymbol$1("getOwnPropertyDescriptor")]=Object.getOwnPropertyDescriptor,_create=Object.create,unconfigurablesKey=zoneSymbol$1("unconfigurables");function propertyPatch(){Object.defineProperty=function(e,t,n){if(isUnconfigurable(e,t))throw new TypeError("Cannot assign to read only property '"+t+"' of "+e);const o=n.configurable;return"prototype"!==t&&(n=rewriteDescriptor(e,t,n)),_tryDefineProperty(e,t,n,o)},Object.defineProperties=function(e,t){return Object.keys(t).forEach(function(n){Object.defineProperty(e,n,t[n])}),e},Object.create=function(e,t){return"object"!=typeof t||Object.isFrozen(t)||Object.keys(t).forEach(function(n){t[n]=rewriteDescriptor(e,n,t[n])}),_create(e,t)},Object.getOwnPropertyDescriptor=function(e,t){const n=_getOwnPropertyDescriptor(e,t);return n&&isUnconfigurable(e,t)&&(n.configurable=!1),n}}function _redefineProperty(e,t,n){const o=n.configurable;return _tryDefineProperty(e,t,n=rewriteDescriptor(e,t,n),o)}function isUnconfigurable(e,t){return e&&e[unconfigurablesKey]&&e[unconfigurablesKey][t]}function rewriteDescriptor(e,t,n){return Object.isFrozen(n)||(n.configurable=!0),n.configurable||(e[unconfigurablesKey]||Object.isFrozen(e)||_defineProperty(e,unconfigurablesKey,{writable:!0,value:{}}),e[unconfigurablesKey]&&(e[unconfigurablesKey][t]=!0)),n}function _tryDefineProperty(e,t,n,o){try{return _defineProperty(e,t,n)}catch(r){if(!n.configurable)throw r;void 0===o?delete n.configurable:n.configurable=o;try{return _defineProperty(e,t,n)}catch(o){let r=null;try{r=JSON.stringify(n)}catch(e){r=n.toString()}console.log(`Attempting to configure '${t}' with descriptor '${r}' on object '${e}' and got error, giving up: ${o}`)}}}const globalEventHandlersEventNames=["abort","animationcancel","animationend","animationiteration","auxclick","beforeinput","blur","cancel","canplay","canplaythrough","change","compositionstart","compositionupdate","compositionend","cuechange","click","close","contextmenu","curechange","dblclick","drag","dragend","dragenter","dragexit","dragleave","dragover","drop","durationchange","emptied","ended","error","focus","focusin","focusout","gotpointercapture","input","invalid","keydown","keypress","keyup","load","loadstart","loadeddata","loadedmetadata","lostpointercapture","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","mousewheel","orientationchange","pause","play","playing","pointercancel","pointerdown","pointerenter","pointerleave","pointerlockchange","mozpointerlockchange","webkitpointerlockerchange","pointerlockerror","mozpointerlockerror","webkitpointerlockerror","pointermove","pointout","pointerover","pointerup","progress","ratechange","reset","resize","scroll","seeked","seeking","select","selectionchange","selectstart","show","sort","stalled","submit","suspend","timeupdate","volumechange","touchcancel","touchmove","touchstart","touchend","transitioncancel","transitionend","waiting","wheel"],documentEventNames=["afterscriptexecute","beforescriptexecute","DOMContentLoaded","freeze","fullscreenchange","mozfullscreenchange","webkitfullscreenchange","msfullscreenchange","fullscreenerror","mozfullscreenerror","webkitfullscreenerror","msfullscreenerror","readystatechange","visibilitychange","resume"],windowEventNames=["absolutedeviceorientation","afterinput","afterprint","appinstalled","beforeinstallprompt","beforeprint","beforeunload","devicelight","devicemotion","deviceorientation","deviceorientationabsolute","deviceproximity","hashchange","languagechange","message","mozbeforepaint","offline","online","paint","pageshow","pagehide","popstate","rejectionhandled","storage","unhandledrejection","unload","userproximity","vrdisplyconnected","vrdisplaydisconnected","vrdisplaypresentchange"],htmlElementEventNames=["beforecopy","beforecut","beforepaste","copy","cut","paste","dragstart","loadend","animationstart","search","transitionrun","transitionstart","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend"],mediaElementEventNames=["encrypted","waitingforkey","msneedkey","mozinterruptbegin","mozinterruptend"],ieElementEventNames=["activate","afterupdate","ariarequest","beforeactivate","beforedeactivate","beforeeditfocus","beforeupdate","cellchange","controlselect","dataavailable","datasetchanged","datasetcomplete","errorupdate","filterchange","layoutcomplete","losecapture","move","moveend","movestart","propertychange","resizeend","resizestart","rowenter","rowexit","rowsdelete","rowsinserted","command","compassneedscalibration","deactivate","help","mscontentzoom","msmanipulationstatechanged","msgesturechange","msgesturedoubletap","msgestureend","msgesturehold","msgesturestart","msgesturetap","msgotpointercapture","msinertiastart","mslostpointercapture","mspointercancel","mspointerdown","mspointerenter","mspointerhover","mspointerleave","mspointermove","mspointerout","mspointerover","mspointerup","pointerout","mssitemodejumplistitemremoved","msthumbnailclick","stop","storagecommit"],webglEventNames=["webglcontextrestored","webglcontextlost","webglcontextcreationerror"],formEventNames=["autocomplete","autocompleteerror"],detailEventNames=["toggle"],frameEventNames=["load"],frameSetEventNames=["blur","error","focus","load","resize","scroll","messageerror"],marqueeEventNames=["bounce","finish","start"],XMLHttpRequestEventNames=["loadstart","progress","abort","error","load","progress","timeout","loadend","readystatechange"],IDBIndexEventNames=["upgradeneeded","complete","abort","success","error","blocked","versionchange","close"],websocketEventNames=["close","error","open","message"],workerEventNames=["error","message"],eventNames=globalEventHandlersEventNames.concat(webglEventNames,formEventNames,detailEventNames,documentEventNames,windowEventNames,htmlElementEventNames,ieElementEventNames);function filterProperties(e,t,n){if(!n||0===n.length)return t;const o=n.filter(t=>t.target===e);if(!o||0===o.length)return t;const r=o[0].ignoreProperties;return t.filter(e=>-1===r.indexOf(e))}function patchFilteredProperties(e,t,n,o){if(!e)return;patchOnProperties(e,filterProperties(e,t,n),o)}function propertyDescriptorPatch(e,t){if(isNode&&!isMix)return;if(Zone[e.symbol("patchEvents")])return;const n="undefined"!=typeof WebSocket,o=t.__Zone_ignore_on_properties;if(isBrowser){const e=window,t=isIE?[{target:e,ignoreProperties:["error"]}]:[];patchFilteredProperties(e,eventNames.concat(["messageerror"]),o?o.concat(t):o,ObjectGetPrototypeOf(e)),patchFilteredProperties(Document.prototype,eventNames,o),void 0!==e.SVGElement&&patchFilteredProperties(e.SVGElement.prototype,eventNames,o),patchFilteredProperties(Element.prototype,eventNames,o),patchFilteredProperties(HTMLElement.prototype,eventNames,o),patchFilteredProperties(HTMLMediaElement.prototype,mediaElementEventNames,o),patchFilteredProperties(HTMLFrameSetElement.prototype,windowEventNames.concat(frameSetEventNames),o),patchFilteredProperties(HTMLBodyElement.prototype,windowEventNames.concat(frameSetEventNames),o),patchFilteredProperties(HTMLFrameElement.prototype,frameEventNames,o),patchFilteredProperties(HTMLIFrameElement.prototype,frameEventNames,o);const n=e.HTMLMarqueeElement;n&&patchFilteredProperties(n.prototype,marqueeEventNames,o);const r=e.Worker;r&&patchFilteredProperties(r.prototype,workerEventNames,o)}const r=t.XMLHttpRequest;r&&patchFilteredProperties(r.prototype,XMLHttpRequestEventNames,o);const s=t.XMLHttpRequestEventTarget;s&&patchFilteredProperties(s&&s.prototype,XMLHttpRequestEventNames,o),"undefined"!=typeof IDBIndex&&(patchFilteredProperties(IDBIndex.prototype,IDBIndexEventNames,o),patchFilteredProperties(IDBRequest.prototype,IDBIndexEventNames,o),patchFilteredProperties(IDBOpenDBRequest.prototype,IDBIndexEventNames,o),patchFilteredProperties(IDBDatabase.prototype,IDBIndexEventNames,o),patchFilteredProperties(IDBTransaction.prototype,IDBIndexEventNames,o),patchFilteredProperties(IDBCursor.prototype,IDBIndexEventNames,o)),n&&patchFilteredProperties(WebSocket.prototype,websocketEventNames,o)}Zone.__load_patch("util",(e,t,n)=>{n.patchOnProperties=patchOnProperties,n.patchMethod=patchMethod,n.bindArguments=bindArguments,n.patchMacroTask=patchMacroTask;const o=t.__symbol__("BLACK_LISTED_EVENTS"),r=t.__symbol__("UNPATCHED_EVENTS");e[r]&&(e[o]=e[r]),e[o]&&(t[o]=t[r]=e[o]),n.patchEventPrototype=patchEventPrototype,n.patchEventTarget=patchEventTarget,n.isIEOrEdge=isIEOrEdge,n.ObjectDefineProperty=ObjectDefineProperty,n.ObjectGetOwnPropertyDescriptor=ObjectGetOwnPropertyDescriptor,n.ObjectCreate=ObjectCreate,n.ArraySlice=ArraySlice,n.patchClass=patchClass,n.wrapWithCurrentZone=wrapWithCurrentZone,n.filterProperties=filterProperties,n.attachOriginToPatched=attachOriginToPatched,n._redefineProperty=_redefineProperty,n.patchCallbacks=patchCallbacks,n.getGlobalObjects=(()=>({globalSources,zoneSymbolEventNames:zoneSymbolEventNames$1,eventNames,isBrowser,isMix,isNode,TRUE_STR,FALSE_STR,ZONE_SYMBOL_PREFIX,ADD_EVENT_LISTENER_STR,REMOVE_EVENT_LISTENER_STR}))});const taskSymbol=zoneSymbol("zoneTask");function patchTimer(e,t,n,o){let r=null,s=null;n+=o;const i={};function a(t){const n=t.data;return n.args[0]=function(){try{t.invoke.apply(this,arguments)}finally{t.data&&t.data.isPeriodic||("number"==typeof n.handleId?delete i[n.handleId]:n.handleId&&(n.handleId[taskSymbol]=null))}},n.handleId=r.apply(e,n.args),t}function c(e){return s(e.data.handleId)}r=patchMethod(e,t+=o,n=>(function(r,s){if("function"==typeof s[0]){const e={isPeriodic:"Interval"===o,delay:"Timeout"===o||"Interval"===o?s[1]||0:void 0,args:s},n=scheduleMacroTaskWithCurrentZone(t,s[0],e,a,c);if(!n)return n;const r=n.data.handleId;return"number"==typeof r?i[r]=n:r&&(r[taskSymbol]=n),r&&r.ref&&r.unref&&"function"==typeof r.ref&&"function"==typeof r.unref&&(n.ref=r.ref.bind(r),n.unref=r.unref.bind(r)),"number"==typeof r||r?r:n}return n.apply(e,s)})),s=patchMethod(e,n,t=>(function(n,o){const r=o[0];let s;"number"==typeof r?s=i[r]:(s=r&&r[taskSymbol])||(s=r),s&&"string"==typeof s.type?"notScheduled"!==s.state&&(s.cancelFn&&s.data.isPeriodic||0===s.runCount)&&("number"==typeof r?delete i[r]:r&&(r[taskSymbol]=null),s.zone.cancelTask(s)):t.apply(e,o)}))}function patchCustomElements(e,t){const{isBrowser:n,isMix:o}=t.getGlobalObjects();if(!((n||o)&&e.customElements&&"customElements"in e))return;t.patchCallbacks(t,e.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback"])}function eventTargetPatch(e,t){if(Zone[t.symbol("patchEventTarget")])return;const{eventNames:n,zoneSymbolEventNames:o,TRUE_STR:r,FALSE_STR:s,ZONE_SYMBOL_PREFIX:i}=t.getGlobalObjects();for(let e=0;e<n.length;e++){const t=n[e],a=i+(t+s),c=i+(t+r);o[t]={},o[t][s]=a,o[t][r]=c}const a=e.EventTarget;return a&&a.prototype?(t.patchEventTarget(e,[a&&a.prototype]),!0):void 0}function patchEvent(e,t){t.patchEventPrototype(e,t)}Zone.__load_patch("legacy",e=>{const t=e[Zone.__symbol__("legacyPatch")];t&&t()}),Zone.__load_patch("timers",e=>{patchTimer(e,"set","clear","Timeout"),patchTimer(e,"set","clear","Interval"),patchTimer(e,"set","clear","Immediate")}),Zone.__load_patch("requestAnimationFrame",e=>{patchTimer(e,"request","cancel","AnimationFrame"),patchTimer(e,"mozRequest","mozCancel","AnimationFrame"),patchTimer(e,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",(e,t)=>{const n=["alert","prompt","confirm"];for(let o=0;o<n.length;o++){patchMethod(e,n[o],(n,o,r)=>(function(o,s){return t.current.run(n,e,s,r)}))}}),Zone.__load_patch("EventTarget",(e,t,n)=>{patchEvent(e,n),eventTargetPatch(e,n);const o=e.XMLHttpRequestEventTarget;o&&o.prototype&&n.patchEventTarget(e,[o.prototype]),patchClass("MutationObserver"),patchClass("WebKitMutationObserver"),patchClass("IntersectionObserver"),patchClass("FileReader")}),Zone.__load_patch("on_property",(e,t,n)=>{propertyDescriptorPatch(n,e),propertyPatch()}),Zone.__load_patch("customElements",(e,t,n)=>{patchCustomElements(e,n)}),Zone.__load_patch("XHR",(e,t)=>{!function(e){const c=e.XMLHttpRequest;if(!c)return;const l=c.prototype;let u=l[ZONE_SYMBOL_ADD_EVENT_LISTENER],p=l[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];if(!u){const t=e.XMLHttpRequestEventTarget;if(t){const e=t.prototype;u=e[ZONE_SYMBOL_ADD_EVENT_LISTENER],p=e[ZONE_SYMBOL_REMOVE_EVENT_LISTENER]}}const h="readystatechange",f="scheduled";function d(e){const t=e.data,o=t.target;o[s]=!1,o[a]=!1;const i=o[r];u||(u=o[ZONE_SYMBOL_ADD_EVENT_LISTENER],p=o[ZONE_SYMBOL_REMOVE_EVENT_LISTENER]),i&&p.call(o,h,i);const c=o[r]=(()=>{if(o.readyState===o.DONE)if(!t.aborted&&o[s]&&e.state===f){const n=o.__zone_symbol__loadfalse;if(n&&n.length>0){const r=e.invoke;e.invoke=function(){const n=o.__zone_symbol__loadfalse;for(let t=0;t<n.length;t++)n[t]===e&&n.splice(t,1);t.aborted||e.state!==f||r.call(e)},n.push(e)}else e.invoke()}else t.aborted||!1!==o[s]||(o[a]=!0)});u.call(o,h,c);const l=o[n];return l||(o[n]=e),b.apply(o,t.args),o[s]=!0,e}function _(){}function m(e){const t=e.data;return t.aborted=!0,T.apply(t.target,t.args)}const g=patchMethod(l,"open",()=>(function(e,t){return e[o]=0==t[2],e[i]=t[1],g.apply(e,t)})),y=zoneSymbol("fetchTaskAborting"),E=zoneSymbol("fetchTaskScheduling"),b=patchMethod(l,"send",()=>(function(e,n){if(!0===t.current[E])return b.apply(e,n);if(e[o])return b.apply(e,n);{const t={target:e,url:e[i],isPeriodic:!1,args:n,aborted:!1},o=scheduleMacroTaskWithCurrentZone("XMLHttpRequest.send",_,t,d,m);e&&!0===e[a]&&!t.aborted&&o.state===f&&o.invoke()}})),T=patchMethod(l,"abort",()=>(function(e,o){const r=e[n];if(r&&"string"==typeof r.type){if(null==r.cancelFn||r.data&&r.data.aborted)return;r.zone.cancelTask(r)}else if(!0===t.current[y])return T.apply(e,o)}))}(e);const n=zoneSymbol("xhrTask"),o=zoneSymbol("xhrSync"),r=zoneSymbol("xhrListener"),s=zoneSymbol("xhrScheduled"),i=zoneSymbol("xhrURL"),a=zoneSymbol("xhrErrorBeforeScheduled")}),Zone.__load_patch("geolocation",e=>{e.navigator&&e.navigator.geolocation&&patchPrototype(e.navigator.geolocation,["getCurrentPosition","watchPosition"])}),Zone.__load_patch("PromiseRejectionEvent",(e,t)=>{function n(t){return function(n){findEventTasks(e,t).forEach(o=>{const r=e.PromiseRejectionEvent;if(r){const e=new r(t,{promise:n.promise,reason:n.rejection});o.invoke(e)}})}}e.PromiseRejectionEvent&&(t[zoneSymbol("unhandledPromiseRejectionHandler")]=n("unhandledrejection"),t[zoneSymbol("rejectionHandledHandler")]=n("rejectionhandled"))});
/**
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
!function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/!function(e){const t=e.performance;function n(e){t&&t.mark&&t.mark(e)}function o(e,n){t&&t.measure&&t.measure(e,n)}n("Zone");const r=e.__Zone_symbol_prefix||"__zone_symbol__";function s(e){return r+e}const i=!0===e[s("forceDuplicateZoneCheck")];if(e.Zone){if(i||"function"!=typeof e.Zone.__symbol__)throw new Error("Zone already loaded.");return e.Zone}class a{constructor(e,t){this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new l(this,this._parent&&this._parent._zoneDelegate,t)}static assertZonePatched(){if(e.Promise!==O.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let e=a.current;for(;e.parent;)e=e.parent;return e}static get current(){return C.zone}static get currentTask(){return j}static __load_patch(t,r){if(O.hasOwnProperty(t)){if(i)throw Error("Already loaded patch: "+t)}else if(!e["__Zone_disable_"+t]){const s="Zone:"+t;n(s),O[t]=r(e,a,z),o(s,s)}}get parent(){return this._parent}get name(){return this._name}get(e){const t=this.getZoneWith(e);if(t)return t._properties[e]}getZoneWith(e){let t=this;for(;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null}fork(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)}wrap(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);const n=this._zoneDelegate.intercept(this,e,t),o=this;return function(){return o.runGuarded(n,this,arguments,t)}}run(e,t,n,o){C={parent:C,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,o)}finally{C=C.parent}}runGuarded(e,t=null,n,o){C={parent:C,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,o)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{C=C.parent}}runTask(e,t,n){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||y).name+"; Execution: "+this.name+")");if(e.state===v&&(e.type===P||e.type===D))return;const o=e.state!=w;o&&e._transitionTo(w,T),e.runCount++;const r=j;j=e,C={parent:C,zone:this};try{e.type==D&&e.data&&!e.data.isPeriodic&&(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,e,t,n)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{e.state!==v&&e.state!==Z&&(e.type==P||e.data&&e.data.isPeriodic?o&&e._transitionTo(T,w):(e.runCount=0,this._updateTaskCount(e,-1),o&&e._transitionTo(v,w,v))),C=C.parent,j=r}}scheduleTask(e){if(e.zone&&e.zone!==this){let t=this;for(;t;){if(t===e.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${e.zone.name}`);t=t.parent}}e._transitionTo(b,v);const t=[];e._zoneDelegates=t,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(t){throw e._transitionTo(Z,b,v),this._zoneDelegate.handleError(this,t),t}return e._zoneDelegates===t&&this._updateTaskCount(e,1),e.state==b&&e._transitionTo(T,b),e}scheduleMicroTask(e,t,n,o){return this.scheduleTask(new u(S,e,t,n,o,void 0))}scheduleMacroTask(e,t,n,o,r){return this.scheduleTask(new u(D,e,t,n,o,r))}scheduleEventTask(e,t,n,o,r){return this.scheduleTask(new u(P,e,t,n,o,r))}cancelTask(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||y).name+"; Execution: "+this.name+")");e._transitionTo(E,T,w);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(Z,E),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(v,E),e.runCount=0,e}_updateTaskCount(e,t){const n=e._zoneDelegates;-1==t&&(e._zoneDelegates=null);for(let o=0;o<n.length;o++)n[o]._updateTaskCount(e.type,t)}}a.__symbol__=s;const c={name:"",onHasTask:(e,t,n,o)=>e.hasTask(n,o),onScheduleTask:(e,t,n,o)=>e.scheduleTask(n,o),onInvokeTask:(e,t,n,o,r,s)=>e.invokeTask(n,o,r,s),onCancelTask:(e,t,n,o)=>e.cancelTask(n,o)};class l{constructor(e,t,n){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=e,this._parentDelegate=t,this._forkZS=n&&(n&&n.onFork?n:t._forkZS),this._forkDlgt=n&&(n.onFork?t:t._forkDlgt),this._forkCurrZone=n&&(n.onFork?this.zone:t._forkCurrZone),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this.zone:t._interceptCurrZone),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this.zone:t._invokeCurrZone),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this.zone:t._handleErrorCurrZone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this.zone:t._scheduleTaskCurrZone),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this.zone:t._invokeTaskCurrZone),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this.zone:t._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const o=n&&n.onHasTask;(o||t&&t._hasTaskZS)&&(this._hasTaskZS=o?n:c,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=e,n.onScheduleTask||(this._scheduleTaskZS=c,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this.zone),n.onInvokeTask||(this._invokeTaskZS=c,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this.zone),n.onCancelTask||(this._cancelTaskZS=c,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this.zone))}fork(e,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,t):new a(e,t)}intercept(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,e,t,n):t}invoke(e,t,n,o,r){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,e,t,n,o,r):t.apply(n,o)}handleError(e,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,e,t)}scheduleTask(e,t){let n=t;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),(n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,e,t))||(n=t);else if(t.scheduleFn)t.scheduleFn(t);else{if(t.type!=S)throw new Error("Task is missing scheduleFn.");m(t)}return n}invokeTask(e,t,n,o){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,e,t,n,o):t.callback.apply(n,o)}cancelTask(e,t){let n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,e,t);else{if(!t.cancelFn)throw Error("Task is not cancelable");n=t.cancelFn(t)}return n}hasTask(e,t){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,e,t)}catch(t){this.handleError(e,t)}}_updateTaskCount(e,t){const n=this._taskCounts,o=n[e],r=n[e]=o+t;if(r<0)throw new Error("More tasks executed then were scheduled.");0!=o&&0!=r||this.hasTask(this.zone,{microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e})}}class u{constructor(t,n,o,r,s,i){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=t,this.source=n,this.data=r,this.scheduleFn=s,this.cancelFn=i,!o)throw new Error("callback is not defined");this.callback=o;const a=this;this.invoke=t===P&&r&&r.useG?u.invokeTask:function(){return u.invokeTask.call(e,a,this,arguments)}}static invokeTask(e,t,n){e||(e=this),I++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{1==I&&k(),I--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(v,b)}_transitionTo(e,t,n){if(this._state!==t&&this._state!==n)throw new Error(`${this.type} '${this.source}': can not transition to '${e}', expecting state '${t}'${n?" or '"+n+"'":""}, was '${this._state}'.`);this._state=e,e==v&&(this._zoneDelegates=null)}toString(){return this.data&&void 0!==this.data.handleId?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}const h=s("setTimeout"),p=s("Promise"),f=s("then");let d,g=[],_=!1;function m(t){if(0===I&&0===g.length)if(d||e[p]&&(d=e[p].resolve(0)),d){let e=d[f];e||(e=d.then),e.call(d,k)}else e[h](k,0);t&&g.push(t)}function k(){if(!_){for(_=!0;g.length;){const e=g;g=[];for(let t=0;t<e.length;t++){const n=e[t];try{n.zone.runTask(n,null,null)}catch(e){z.onUnhandledError(e)}}}z.microtaskDrainDone(),_=!1}}const y={name:"NO ZONE"},v="notScheduled",b="scheduling",T="scheduled",w="running",E="canceling",Z="unknown",S="microTask",D="macroTask",P="eventTask",O={},z={symbol:s,currentZoneFrame:()=>C,onUnhandledError:R,microtaskDrainDone:R,scheduleMicroTask:m,showUncaughtError:()=>!a[s("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:R,patchMethod:()=>R,bindArguments:()=>[],patchThen:()=>R,patchMacroTask:()=>R,setNativePromise:e=>{e&&"function"==typeof e.resolve&&(d=e.resolve(0))},patchEventPrototype:()=>R,isIEOrEdge:()=>!1,getGlobalObjects:()=>void 0,ObjectDefineProperty:()=>R,ObjectGetOwnPropertyDescriptor:()=>void 0,ObjectCreate:()=>void 0,ArraySlice:()=>[],patchClass:()=>R,wrapWithCurrentZone:()=>R,filterProperties:()=>[],attachOriginToPatched:()=>R,_redefineProperty:()=>R,patchCallbacks:()=>R};let C={parent:null,zone:new a(null,null)},j=null,I=0;function R(){}o("Zone","Zone"),e.Zone=a}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global),
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
Zone.__load_patch("ZoneAwarePromise",(e,t,n)=>{const o=Object.getOwnPropertyDescriptor,r=Object.defineProperty,s=n.symbol,i=[],a=s("Promise"),c=s("then"),l="__creationTrace__";n.onUnhandledError=(e=>{if(n.showUncaughtError()){const t=e&&e.rejection;t?console.error("Unhandled Promise rejection:",t instanceof Error?t.message:t,"; Zone:",e.zone.name,"; Task:",e.task&&e.task.source,"; Value:",t,t instanceof Error?t.stack:void 0):console.error(e)}}),n.microtaskDrainDone=(()=>{for(;i.length;)for(;i.length;){const e=i.shift();try{e.zone.runGuarded(()=>{throw e})}catch(e){h(e)}}});const u=s("unhandledPromiseRejectionHandler");function h(e){n.onUnhandledError(e);try{const n=t[u];n&&"function"==typeof n&&n.call(this,e)}catch(e){}}function p(e){return e&&e.then}function f(e){return e}function d(e){return R.reject(e)}const g=s("state"),_=s("value"),m=s("finally"),k=s("parentPromiseValue"),y=s("parentPromiseState"),v="Promise.then",b=null,T=!0,w=!1,E=0;function Z(e,t){return n=>{try{O(e,t,n)}catch(t){O(e,!1,t)}}}const S=function(){let e=!1;return function t(n){return function(){e||(e=!0,n.apply(null,arguments))}}},D="Promise resolved with itself",P=s("currentTaskTrace");function O(e,o,s){const a=S();if(e===s)throw new TypeError(D);if(e[g]===b){let c=null;try{"object"!=typeof s&&"function"!=typeof s||(c=s&&s.then)}catch(t){return a(()=>{O(e,!1,t)})(),e}if(o!==w&&s instanceof R&&s.hasOwnProperty(g)&&s.hasOwnProperty(_)&&s[g]!==b)C(s),O(e,s[g],s[_]);else if(o!==w&&"function"==typeof c)try{c.call(s,a(Z(e,o)),a(Z(e,!1)))}catch(t){a(()=>{O(e,!1,t)})()}else{e[g]=o;const a=e[_];if(e[_]=s,e[m]===m&&o===T&&(e[g]=e[y],e[_]=e[k]),o===w&&s instanceof Error){const e=t.currentTask&&t.currentTask.data&&t.currentTask.data[l];e&&r(s,P,{configurable:!0,enumerable:!1,writable:!0,value:e})}for(let t=0;t<a.length;)j(e,a[t++],a[t++],a[t++],a[t++]);if(0==a.length&&o==w){let o;if(e[g]=E,s instanceof Error||s&&s.message)o=s;else try{throw new Error("Uncaught (in promise): "+function c(e){return e&&e.toString===Object.prototype.toString?(e.constructor&&e.constructor.name||"")+": "+JSON.stringify(e):e?e.toString():Object.prototype.toString.call(e)}(s)+(s&&s.stack?"\n"+s.stack:""))}catch(e){o=e}o.rejection=s,o.promise=e,o.zone=t.current,o.task=t.currentTask,i.push(o),n.scheduleMicroTask()}}}return e}const z=s("rejectionHandledHandler");function C(e){if(e[g]===E){try{const n=t[z];n&&"function"==typeof n&&n.call(this,{rejection:e[_],promise:e})}catch(e){}e[g]=w;for(let t=0;t<i.length;t++)e===i[t].promise&&i.splice(t,1)}}function j(e,t,n,o,r){C(e);const s=e[g],i=s?"function"==typeof o?o:f:"function"==typeof r?r:d;t.scheduleMicroTask(v,()=>{try{const o=e[_],r=!!n&&m===n[m];r&&(n[k]=o,n[y]=s);const a=t.run(i,void 0,r&&i!==d&&i!==f?[]:[o]);O(n,!0,a)}catch(e){O(n,!1,e)}},n)}const I="function ZoneAwarePromise() { [native code] }";class R{constructor(e){const t=this;if(!(t instanceof R))throw new Error("Must be an instanceof Promise.");t[g]=b,t[_]=[];try{e&&e(Z(t,T),Z(t,w))}catch(e){O(t,!1,e)}}static toString(){return I}static resolve(e){return O(new this(null),T,e)}static reject(e){return O(new this(null),w,e)}static race(e){let t,n,o=new this((e,o)=>{t=e,n=o});function r(e){t(e)}function s(e){n(e)}for(let t of e)p(t)||(t=this.resolve(t)),t.then(r,s);return o}static all(e){let t,n,o=new this((e,o)=>{t=e,n=o}),r=2,s=0;const i=[];for(let o of e){p(o)||(o=this.resolve(o));const e=s;o.then(n=>{i[e]=n,0==--r&&t(i)},n),r++,s++}return 0==(r-=2)&&t(i),o}get[Symbol.toStringTag](){return"Promise"}then(e,n){const o=new this.constructor(null),r=t.current;return this[g]==b?this[_].push(r,o,e,n):j(this,r,o,e,n),o}catch(e){return this.then(null,e)}finally(e){const n=new this.constructor(null);n[m]=m;const o=t.current;return this[g]==b?this[_].push(o,n,e,e):j(this,o,n,e,e),n}}R.resolve=R.resolve,R.reject=R.reject,R.race=R.race,R.all=R.all;const x=e[a]=e.Promise,N=t.__symbol__("ZoneAwarePromise");let M=o(e,"Promise");M&&!M.configurable||(M&&delete M.writable,M&&delete M.value,M||(M={configurable:!0,enumerable:!0}),M.get=function(){return e[N]?e[N]:e[a]},M.set=function(t){t===R?e[N]=t:(e[a]=t,t.prototype[c]||A(t),n.setNativePromise(t))},r(e,"Promise",M)),e.Promise=R;const L=s("thenPatched");function A(e){const t=e.prototype,n=o(t,"then");if(n&&(!1===n.writable||!n.configurable))return;const r=t.then;t[c]=r,e.prototype.then=function(e,t){return new R((e,t)=>{r.call(this,e,t)}).then(e,t)},e[L]=!0}if(n.patchThen=A,x){A(x);const t=e.fetch;"function"==typeof t&&(e[n.symbol("fetch")]=t,e.fetch=function F(e){return function(){let t=e.apply(this,arguments);if(t instanceof R)return t;let n=t.constructor;return n[L]||A(n),t}}(t))}return Promise[t.__symbol__("uncaughtPromiseErrors")]=i,R});
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
const e=Object.getOwnPropertyDescriptor,t=Object.defineProperty,n=Object.getPrototypeOf,o=Object.create,r=Array.prototype.slice,s="addEventListener",i="removeEventListener",a=Zone.__symbol__(s),c=Zone.__symbol__(i),l="true",u="false",h=Zone.__symbol__("");function p(e,t){return Zone.current.wrap(e,t)}function f(e,t,n,o,r){return Zone.current.scheduleMacroTask(e,t,n,o,r)}const d=Zone.__symbol__,g="undefined"!=typeof window,_=g?window:void 0,m=g&&_||"object"==typeof self&&self||global,k="removeAttribute",y=[null];function v(e,t){for(let n=e.length-1;n>=0;n--)"function"==typeof e[n]&&(e[n]=p(e[n],t+"_"+n));return e}function b(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&void 0===e.set)}const T="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,w=!("nw"in m)&&void 0!==m.process&&"[object process]"==={}.toString.call(m.process),E=!w&&!T&&!(!g||!_.HTMLElement),Z=void 0!==m.process&&"[object process]"==={}.toString.call(m.process)&&!T&&!(!g||!_.HTMLElement),S={},D=function(e){if(!(e=e||m.event))return;let t=S[e.type];t||(t=S[e.type]=d("ON_PROPERTY"+e.type));const n=this||e.target||m,o=n[t];let r;if(E&&n===_&&"error"===e.type){const t=e;!0===(r=o&&o.call(this,t.message,t.filename,t.lineno,t.colno,t.error))&&e.preventDefault()}else null==(r=o&&o.apply(this,arguments))||r||e.preventDefault();return r};function P(n,o,r){let s=e(n,o);if(!s&&r&&e(r,o)&&(s={enumerable:!0,configurable:!0}),!s||!s.configurable)return;const i=d("on"+o+"patched");if(n.hasOwnProperty(i)&&n[i])return;delete s.writable,delete s.value;const a=s.get,c=s.set,l=o.substr(2);let u=S[l];u||(u=S[l]=d("ON_PROPERTY"+l)),s.set=function(e){let t=this;t||n!==m||(t=m),t&&(t[u]&&t.removeEventListener(l,D),c&&c.apply(t,y),"function"==typeof e?(t[u]=e,t.addEventListener(l,D,!1)):t[u]=null)},s.get=function(){let e=this;if(e||n!==m||(e=m),!e)return null;const t=e[u];if(t)return t;if(a){let t=a&&a.call(this);if(t)return s.set.call(this,t),"function"==typeof e[k]&&e.removeAttribute(o),t}return null},t(n,o,s),n[i]=!0}function O(e,t,n){if(t)for(let o=0;o<t.length;o++)P(e,"on"+t[o],n);else{const t=[];for(const n in e)"on"==n.substr(0,2)&&t.push(n);for(let o=0;o<t.length;o++)P(e,t[o],n)}}const z=d("originalInstance");function C(e){const n=m[e];if(!n)return;m[d(e)]=n,m[e]=function(){const t=v(arguments,e);switch(t.length){case 0:this[z]=new n;break;case 1:this[z]=new n(t[0]);break;case 2:this[z]=new n(t[0],t[1]);break;case 3:this[z]=new n(t[0],t[1],t[2]);break;case 4:this[z]=new n(t[0],t[1],t[2],t[3]);break;default:throw new Error("Arg list too long.")}},x(m[e],n);const o=new n(function(){});let r;for(r in o)"XMLHttpRequest"===e&&"responseBlob"===r||function(n){"function"==typeof o[n]?m[e].prototype[n]=function(){return this[z][n].apply(this[z],arguments)}:t(m[e].prototype,n,{set:function(t){"function"==typeof t?(this[z][n]=p(t,e+"."+n),x(this[z][n],t)):this[z][n]=t},get:function(){return this[z][n]}})}(r);for(r in n)"prototype"!==r&&n.hasOwnProperty(r)&&(m[e][r]=n[r])}let j=!1;function I(t,o,r){let s=t;for(;s&&!s.hasOwnProperty(o);)s=n(s);!s&&t[o]&&(s=t);const i=d(o);let a=null;if(s&&!(a=s[i])&&(a=s[i]=s[o],b(s&&e(s,o)))){const e=r(a,i,o);s[o]=function(){return e(this,arguments)},x(s[o],a),j&&function c(e,t){"function"==typeof Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(n=>{const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,{get:function(){return e[n]},set:function(t){(!o||o.writable&&"function"==typeof o.set)&&(e[n]=t)},enumerable:!o||o.enumerable,configurable:!o||o.configurable})})}(a,s[o])}return a}function R(e,t,n){let o=null;function r(e){const t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},o.apply(t.target,t.args),e}o=I(e,t,e=>(function(t,o){const s=n(t,o);return s.cbIdx>=0&&"function"==typeof o[s.cbIdx]?f(s.name,o[s.cbIdx],s,r):e.apply(t,o)}))}function x(e,t){e[d("OriginalDelegate")]=t}let N=!1,M=!1;function L(){if(N)return M;N=!0;try{const e=_.navigator.userAgent;-1===e.indexOf("MSIE ")&&-1===e.indexOf("Trident/")&&-1===e.indexOf("Edge/")||(M=!0)}catch(e){}return M}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/Zone.__load_patch("toString",e=>{const t=Function.prototype.toString,n=d("OriginalDelegate"),o=d("Promise"),r=d("Error"),s=function s(){if("function"==typeof this){const s=this[n];if(s)return"function"==typeof s?t.call(s):Object.prototype.toString.call(s);if(this===Promise){const n=e[o];if(n)return t.call(n)}if(this===Error){const n=e[r];if(n)return t.call(n)}}return t.call(this)};s[n]=t,Function.prototype.toString=s;const i=Object.prototype.toString;Object.prototype.toString=function(){return this instanceof Promise?"[object Promise]":i.call(this)}});
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
let A=!1;if("undefined"!=typeof window)try{const e=Object.defineProperty({},"passive",{get:function(){A=!0}});window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){A=!1}const F={useG:!0},H={},G={},q=new RegExp("^"+h+"(\\w+)(true|false)$"),B=d("propagationStopped");function $(e,t,o){const r=o&&o.add||s,a=o&&o.rm||i,c=o&&o.listeners||"eventListeners",p=o&&o.rmAll||"removeAllListeners",f=d(r),g="."+r+":",_="prependListener",m="."+_+":",k=function(e,t,n){if(e.isRemoved)return;const o=e.callback;"object"==typeof o&&o.handleEvent&&(e.callback=(e=>o.handleEvent(e)),e.originalDelegate=o),e.invoke(e,t,[n]);const r=e.options;r&&"object"==typeof r&&r.once&&t[a].call(t,n.type,e.originalDelegate?e.originalDelegate:e.callback,r)},y=function(t){if(!(t=t||e.event))return;const n=this||t.target||e,o=n[H[t.type][u]];if(o)if(1===o.length)k(o[0],n,t);else{const e=o.slice();for(let o=0;o<e.length&&(!t||!0!==t[B]);o++)k(e[o],n,t)}},v=function(t){if(!(t=t||e.event))return;const n=this||t.target||e,o=n[H[t.type][l]];if(o)if(1===o.length)k(o[0],n,t);else{const e=o.slice();for(let o=0;o<e.length&&(!t||!0!==t[B]);o++)k(e[o],n,t)}};function b(t,o){if(!t)return!1;let s=!0;o&&void 0!==o.useG&&(s=o.useG);const i=o&&o.vh;let k=!0;o&&void 0!==o.chkDup&&(k=o.chkDup);let b=!1;o&&void 0!==o.rt&&(b=o.rt);let T=t;for(;T&&!T.hasOwnProperty(r);)T=n(T);if(!T&&t[r]&&(T=t),!T)return!1;if(T[f])return!1;const E=o&&o.eventNameToString,Z={},S=T[f]=T[r],D=T[d(a)]=T[a],P=T[d(c)]=T[c],O=T[d(p)]=T[p];let z;function C(e){A||"boolean"==typeof Z.options||null==Z.options||(e.options=!!Z.options.capture,Z.options=e.options)}o&&o.prepend&&(z=T[d(o.prepend)]=T[o.prepend]);const j=s?function(e){if(!Z.isExisting)return C(e),S.call(Z.target,Z.eventName,Z.capture?v:y,Z.options)}:function(e){return C(e),S.call(Z.target,Z.eventName,e.invoke,Z.options)},I=s?function(e){if(!e.isRemoved){const t=H[e.eventName];let n;t&&(n=t[e.capture?l:u]);const o=n&&e.target[n];if(o)for(let t=0;t<o.length;t++)if(o[t]===e){o.splice(t,1),e.isRemoved=!0,0===o.length&&(e.allRemoved=!0,e.target[n]=null);break}}if(e.allRemoved)return D.call(e.target,e.eventName,e.capture?v:y,e.options)}:function(e){return D.call(e.target,e.eventName,e.invoke,e.options)},R=o&&o.diff?o.diff:function(e,t){const n=typeof t;return"function"===n&&e.callback===t||"object"===n&&e.originalDelegate===t},N=Zone[d("BLACK_LISTED_EVENTS")],M=function(t,n,r,a,c=!1,p=!1){return function(){const f=this||e;let d=arguments[0];o&&o.transferEventName&&(d=o.transferEventName(d));let g=arguments[1];if(!g)return t.apply(this,arguments);if(w&&"uncaughtException"===d)return t.apply(this,arguments);let _=!1;if("function"!=typeof g){if(!g.handleEvent)return t.apply(this,arguments);_=!0}if(i&&!i(t,g,f,arguments))return;const m=arguments[2];if(N)for(let e=0;e<N.length;e++)if(d===N[e])return t.apply(this,arguments);let y,v=!1;void 0===m?y=!1:!0===m?y=!0:!1===m?y=!1:(y=!!m&&!!m.capture,v=!!m&&!!m.once);const b=Zone.current,T=H[d];let S;if(T)S=T[y?l:u];else{const e=(E?E(d):d)+u,t=(E?E(d):d)+l,n=h+e,o=h+t;H[d]={},H[d][u]=n,H[d][l]=o,S=y?o:n}let D,P=f[S],O=!1;if(P){if(O=!0,k)for(let e=0;e<P.length;e++)if(R(P[e],g))return}else P=f[S]=[];const z=f.constructor.name,C=G[z];C&&(D=C[d]),D||(D=z+n+(E?E(d):d)),Z.options=m,v&&(Z.options.once=!1),Z.target=f,Z.capture=y,Z.eventName=d,Z.isExisting=O;const j=s?F:void 0;j&&(j.taskData=Z);const I=b.scheduleEventTask(D,g,j,r,a);return Z.target=null,j&&(j.taskData=null),v&&(m.once=!0),(A||"boolean"!=typeof I.options)&&(I.options=m),I.target=f,I.capture=y,I.eventName=d,_&&(I.originalDelegate=g),p?P.unshift(I):P.push(I),c?f:void 0}};return T[r]=M(S,g,j,I,b),z&&(T[_]=M(z,m,function(e){return z.call(Z.target,Z.eventName,e.invoke,Z.options)},I,b,!0)),T[a]=function(){const t=this||e;let n=arguments[0];o&&o.transferEventName&&(n=o.transferEventName(n));const r=arguments[2];let s;s=void 0!==r&&(!0===r||!1!==r&&!!r&&!!r.capture);const a=arguments[1];if(!a)return D.apply(this,arguments);if(i&&!i(D,a,t,arguments))return;const c=H[n];let p;c&&(p=c[s?l:u]);const f=p&&t[p];if(f)for(let e=0;e<f.length;e++){const o=f[e];if(R(o,a))return f.splice(e,1),o.isRemoved=!0,0===f.length&&(o.allRemoved=!0,t[p]=null,"string"==typeof n)&&(t[h+"ON_PROPERTY"+n]=null),o.zone.cancelTask(o),b?t:void 0}return D.apply(this,arguments)},T[c]=function(){const t=this||e;let n=arguments[0];o&&o.transferEventName&&(n=o.transferEventName(n));const r=[],s=U(t,E?E(n):n);for(let e=0;e<s.length;e++){const t=s[e];r.push(t.originalDelegate?t.originalDelegate:t.callback)}return r},T[p]=function(){const t=this||e;let n=arguments[0];if(n){o&&o.transferEventName&&(n=o.transferEventName(n));const e=H[n];if(e){const o=t[e[u]],r=t[e[l]];if(o){const e=o.slice();for(let t=0;t<e.length;t++){const o=e[t];this[a].call(this,n,o.originalDelegate?o.originalDelegate:o.callback,o.options)}}if(r){const e=r.slice();for(let t=0;t<e.length;t++){const o=e[t];this[a].call(this,n,o.originalDelegate?o.originalDelegate:o.callback,o.options)}}}}else{const e=Object.keys(t);for(let t=0;t<e.length;t++){const n=q.exec(e[t]);let o=n&&n[1];o&&"removeListener"!==o&&this[p].call(this,o)}this[p].call(this,"removeListener")}if(b)return this},x(T[r],S),x(T[a],D),O&&x(T[p],O),P&&x(T[c],P),!0}let T=[];for(let e=0;e<t.length;e++)T[e]=b(t[e],o);return T}function U(e,t){const n=[];for(let o in e){const r=q.exec(o);let s=r&&r[1];if(s&&(!t||s===t)){const t=e[o];if(t)for(let e=0;e<t.length;e++)n.push(t[e])}}return n}function W(e,t){const n=e.Event;n&&n.prototype&&t.patchMethod(n.prototype,"stopImmediatePropagation",e=>(function(t,n){t[B]=!0,e&&e.apply(t,n)}))}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/function V(e,t,n,o,r){const s=Zone.__symbol__(o);if(t[s])return;const i=t[s]=t[o];t[o]=function(s,a,c){return a&&a.prototype&&r.forEach(function(t){const r=`${n}.${o}::`+t,s=a.prototype;if(s.hasOwnProperty(t)){const n=e.ObjectGetOwnPropertyDescriptor(s,t);n&&n.value?(n.value=e.wrapWithCurrentZone(n.value,r),e._redefineProperty(a.prototype,t,n)):s[t]&&(s[t]=e.wrapWithCurrentZone(s[t],r))}else s[t]&&(s[t]=e.wrapWithCurrentZone(s[t],r))}),i.call(t,s,a,c)},e.attachOriginToPatched(t[o],i)}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/const X=Zone.__symbol__,Y=Object[X("defineProperty")]=Object.defineProperty,J=(Object[X("getOwnPropertyDescriptor")]=Object.getOwnPropertyDescriptor,X("unconfigurables"));function K(e,t,n){const o=n.configurable;return n=function r(e,t,n){return Object.isFrozen(n)||(n.configurable=!0),n.configurable||(e[J]||Object.isFrozen(e)||Y(e,J,{writable:!0,value:{}}),e[J]&&(e[J][t]=!0)),n}(e,t,n),function s(e,t,n,o){try{return Y(e,t,n)}catch(r){if(!n.configurable)throw r;void 0===o?delete n.configurable:n.configurable=o;try{return Y(e,t,n)}catch(o){let r=null;try{r=JSON.stringify(n)}catch(e){r=n.toString()}console.log(`Attempting to configure '${t}' with descriptor '${r}' on object '${e}' and got error, giving up: ${o}`)}}}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/(e,t,n,o)}const Q=["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","vrdisplyconnected","vrdisplaydisconnected","vrdisplaypresentchange"],ee=["encrypted","waitingforkey","msneedkey","mozinterruptbegin","mozinterruptend"],te=["load"],ne=["blur","error","focus","load","resize","scroll","messageerror"],oe=["bounce","finish","start"],re=["loadstart","progress","abort","error","load","progress","timeout","loadend","readystatechange"],se=["upgradeneeded","complete","abort","success","error","blocked","versionchange","close"],ie=["close","error","open","message"],ae=["error","message"],ce=["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"].concat(["webglcontextrestored","webglcontextlost","webglcontextcreationerror"],["autocomplete","autocompleteerror"],["toggle"],["afterscriptexecute","beforescriptexecute","DOMContentLoaded","freeze","fullscreenchange","mozfullscreenchange","webkitfullscreenchange","msfullscreenchange","fullscreenerror","mozfullscreenerror","webkitfullscreenerror","msfullscreenerror","readystatechange","visibilitychange","resume"],Q,["beforecopy","beforecut","beforepaste","copy","cut","paste","dragstart","loadend","animationstart","search","transitionrun","transitionstart","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend"],["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"]);function le(e,t,n){if(!n||0===n.length)return t;const o=n.filter(t=>t.target===e);if(!o||0===o.length)return t;const r=o[0].ignoreProperties;return t.filter(e=>-1===r.indexOf(e))}function ue(e,t,n,o){e&&O(e,le(e,t,n),o)}function he(e,t){if(w&&!Z)return;if(Zone[e.symbol("patchEvents")])return;const o="undefined"!=typeof WebSocket,r=t.__Zone_ignore_on_properties;if(E){const e=window,t=function s(){try{const t=e.navigator.userAgent;if(-1!==t.indexOf("MSIE ")||-1!==t.indexOf("Trident/"))return!0}catch(e){}return!1}?[{target:e,ignoreProperties:["error"]}]:[];ue(e,ce.concat(["messageerror"]),r?r.concat(t):r,n(e)),ue(Document.prototype,ce,r),void 0!==e.SVGElement&&ue(e.SVGElement.prototype,ce,r),ue(Element.prototype,ce,r),ue(HTMLElement.prototype,ce,r),ue(HTMLMediaElement.prototype,ee,r),ue(HTMLFrameSetElement.prototype,Q.concat(ne),r),ue(HTMLBodyElement.prototype,Q.concat(ne),r),ue(HTMLFrameElement.prototype,te,r),ue(HTMLIFrameElement.prototype,te,r);const o=e.HTMLMarqueeElement;o&&ue(o.prototype,oe,r);const s=e.Worker;s&&ue(s.prototype,ae,r)}const i=t.XMLHttpRequest;i&&ue(i.prototype,re,r);const a=t.XMLHttpRequestEventTarget;a&&ue(a&&a.prototype,re,r),"undefined"!=typeof IDBIndex&&(ue(IDBIndex.prototype,se,r),ue(IDBRequest.prototype,se,r),ue(IDBOpenDBRequest.prototype,se,r),ue(IDBDatabase.prototype,se,r),ue(IDBTransaction.prototype,se,r),ue(IDBCursor.prototype,se,r)),o&&ue(WebSocket.prototype,ie,r)}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/Zone.__load_patch("util",(n,a,c)=>{c.patchOnProperties=O,c.patchMethod=I,c.bindArguments=v,c.patchMacroTask=R;const f=a.__symbol__("BLACK_LISTED_EVENTS"),d=a.__symbol__("UNPATCHED_EVENTS");n[d]&&(n[f]=n[d]),n[f]&&(a[f]=a[d]=n[f]),c.patchEventPrototype=W,c.patchEventTarget=$,c.isIEOrEdge=L,c.ObjectDefineProperty=t,c.ObjectGetOwnPropertyDescriptor=e,c.ObjectCreate=o,c.ArraySlice=r,c.patchClass=C,c.wrapWithCurrentZone=p,c.filterProperties=le,c.attachOriginToPatched=x,c._redefineProperty=K,c.patchCallbacks=V,c.getGlobalObjects=(()=>({globalSources:G,zoneSymbolEventNames:H,eventNames:ce,isBrowser:E,isMix:Z,isNode:w,TRUE_STR:l,FALSE_STR:u,ZONE_SYMBOL_PREFIX:h,ADD_EVENT_LISTENER_STR:s,REMOVE_EVENT_LISTENER_STR:i}))});
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
const pe=d("zoneTask");function fe(e,t,n,o){let r=null,s=null;n+=o;const i={};function a(t){const n=t.data;return n.args[0]=function o(){try{t.invoke.apply(this,arguments)}finally{t.data&&t.data.isPeriodic||("number"==typeof n.handleId?delete i[n.handleId]:n.handleId&&(n.handleId[pe]=null))}},n.handleId=r.apply(e,n.args),t}function c(e){return s(e.data.handleId)}r=I(e,t+=o,n=>(function(r,s){if("function"==typeof s[0]){const e=f(t,s[0],{isPeriodic:"Interval"===o,delay:"Timeout"===o||"Interval"===o?s[1]||0:void 0,args:s},a,c);if(!e)return e;const n=e.data.handleId;return"number"==typeof n?i[n]=e:n&&(n[pe]=e),n&&n.ref&&n.unref&&"function"==typeof n.ref&&"function"==typeof n.unref&&(e.ref=n.ref.bind(n),e.unref=n.unref.bind(n)),"number"==typeof n||n?n:e}return n.apply(e,s)})),s=I(e,n,t=>(function(n,o){const r=o[0];let s;"number"==typeof r?s=i[r]:(s=r&&r[pe])||(s=r),s&&"string"==typeof s.type?"notScheduled"!==s.state&&(s.cancelFn&&s.data.isPeriodic||0===s.runCount)&&("number"==typeof r?delete i[r]:r&&(r[pe]=null),s.zone.cancelTask(s)):t.apply(e,o)}))}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function de(e,t){if(Zone[t.symbol("patchEventTarget")])return;const{eventNames:n,zoneSymbolEventNames:o,TRUE_STR:r,FALSE_STR:s,ZONE_SYMBOL_PREFIX:i}=t.getGlobalObjects();for(let e=0;e<n.length;e++){const t=n[e],a=i+(t+s),c=i+(t+r);o[t]={},o[t][s]=a,o[t][r]=c}const a=e.EventTarget;return a&&a.prototype?(t.patchEventTarget(e,[a&&a.prototype]),!0):void 0}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
Zone.__load_patch("legacy",e=>{const t=e[Zone.__symbol__("legacyPatch")];t&&t()}),Zone.__load_patch("timers",e=>{fe(e,"set","clear","Timeout"),fe(e,"set","clear","Interval"),fe(e,"set","clear","Immediate")}),Zone.__load_patch("requestAnimationFrame",e=>{fe(e,"request","cancel","AnimationFrame"),fe(e,"mozRequest","mozCancel","AnimationFrame"),fe(e,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",(e,t)=>{const n=["alert","prompt","confirm"];for(let o=0;o<n.length;o++)I(e,n[o],(n,o,r)=>(function(o,s){return t.current.run(n,e,s,r)}))}),Zone.__load_patch("EventTarget",(e,t,n)=>{!function o(e,t){t.patchEventPrototype(e,t)}(e,n),de(e,n);const r=e.XMLHttpRequestEventTarget;r&&r.prototype&&n.patchEventTarget(e,[r.prototype]),C("MutationObserver"),C("WebKitMutationObserver"),C("IntersectionObserver"),C("FileReader")}),Zone.__load_patch("on_property",(e,t,n)=>{he(n,e)}),Zone.__load_patch("customElements",(e,t,n)=>{!function o(e,t){const{isBrowser:n,isMix:o}=t.getGlobalObjects();(n||o)&&e.customElements&&"customElements"in e&&t.patchCallbacks(t,e.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback"])}(e,n)}),Zone.__load_patch("XHR",(e,t)=>{!function n(e){const n=e.XMLHttpRequest;if(!n)return;const h=n.prototype;let p=h[a],g=h[c];if(!p){const t=e.XMLHttpRequestEventTarget;if(t){const e=t.prototype;p=e[a],g=e[c]}}const _="readystatechange",m="scheduled";function k(e){const n=e.data,r=n.target;r[i]=!1,r[u]=!1;const l=r[s];p||(p=r[a],g=r[c]),l&&g.call(r,_,l);const h=r[s]=(()=>{if(r.readyState===r.DONE)if(!n.aborted&&r[i]&&e.state===m){const o=r[t.__symbol__("loadfalse")];if(o&&o.length>0){const s=e.invoke;e.invoke=function(){const o=r[t.__symbol__("loadfalse")];for(let t=0;t<o.length;t++)o[t]===e&&o.splice(t,1);n.aborted||e.state!==m||s.call(e)},o.push(e)}else e.invoke()}else n.aborted||!1!==r[i]||(r[u]=!0)});return p.call(r,_,h),r[o]||(r[o]=e),E.apply(r,n.args),r[i]=!0,e}function y(){}function v(e){const t=e.data;return t.aborted=!0,Z.apply(t.target,t.args)}const b=I(h,"open",()=>(function(e,t){return e[r]=0==t[2],e[l]=t[1],b.apply(e,t)})),T=d("fetchTaskAborting"),w=d("fetchTaskScheduling"),E=I(h,"send",()=>(function(e,n){if(!0===t.current[w])return E.apply(e,n);if(e[r])return E.apply(e,n);{const t={target:e,url:e[l],isPeriodic:!1,args:n,aborted:!1},o=f("XMLHttpRequest.send",y,t,k,v);e&&!0===e[u]&&!t.aborted&&o.state===m&&o.invoke()}})),Z=I(h,"abort",()=>(function(e,n){const r=function s(e){return e[o]}(e);if(r&&"string"==typeof r.type){if(null==r.cancelFn||r.data&&r.data.aborted)return;r.zone.cancelTask(r)}else if(!0===t.current[T])return Z.apply(e,n)}))}(e);const o=d("xhrTask"),r=d("xhrSync"),s=d("xhrListener"),i=d("xhrScheduled"),l=d("xhrURL"),u=d("xhrErrorBeforeScheduled")}),Zone.__load_patch("geolocation",t=>{t.navigator&&t.navigator.geolocation&&function n(t,o){const r=t.constructor.name;for(let n=0;n<o.length;n++){const s=o[n],i=t[s];if(i){if(!b(e(t,s)))continue;t[s]=(e=>{const t=function(){return e.apply(this,v(arguments,r+"."+s))};return x(t,e),t})(i)}}}(t.navigator.geolocation,["getCurrentPosition","watchPosition"])}),Zone.__load_patch("PromiseRejectionEvent",(e,t)=>{function n(t){return function(n){U(e,t).forEach(o=>{const r=e.PromiseRejectionEvent;if(r){const e=new r(t,{promise:n.promise,reason:n.rejection});o.invoke(e)}})}}e.PromiseRejectionEvent&&(t[d("unhandledPromiseRejectionHandler")]=n("unhandledrejection"),t[d("rejectionHandledHandler")]=n("rejectionhandled"))})});
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, (function () { 'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
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);
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
}(function () {
'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/*
* This is necessary for Chrome and Chrome mobile, to enable
* things like redefining `createdCallback` on an element.
*/
var zoneSymbol = Zone.__symbol__;
var _defineProperty = Object[zoneSymbol('defineProperty')] = Object.defineProperty;
var _getOwnPropertyDescriptor = Object[zoneSymbol('getOwnPropertyDescriptor')] =
Object.getOwnPropertyDescriptor;
var _create = Object.create;
var unconfigurablesKey = zoneSymbol('unconfigurables');
function propertyPatch() {
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]); });
return obj;
};
Object.create = function (obj, proto) {
if (typeof proto === 'object' && !Object.isFrozen(proto)) {
Object.keys(proto).forEach(function (prop) {
proto[prop] = rewriteDescriptor(obj, prop, proto[prop]);
});
}
return _create(obj, proto);
};
Object.getOwnPropertyDescriptor = function (obj, prop) {
var desc = _getOwnPropertyDescriptor(obj, prop);
if (desc && isUnconfigurable(obj, prop)) {
desc.configurable = false;
}
return desc;
};
}
else if (_global[EVENT_TARGET]) {
apis.push(EVENT_TARGET);
function isUnconfigurable(obj, prop) {
return obj && obj[unconfigurablesKey] && obj[unconfigurablesKey][prop];
}
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;
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;
}
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] }';
// 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;
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 descJson = null;
try {
descJson = JSON.stringify(desc);
}
catch (error) {
descJson = desc.toString();
}
console.log("Attempting to configure '" + prop + "' with descriptor '" + descJson + "' on object '" + obj + "' and got error, giving up: " + error);
}
}
else {
throw error;
}
}
}
// predefine all task.source string
for (var i = 0; i < WTF_ISSUE_555.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;
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
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);
}
}
var checkIEAndCrossContext = function (nativeDelegate, delegate, target, args) {
if (!isDisableIECheck && ieOrEdge) {
if (isEnableCrossContextCheck) {
try {
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();

@@ -78,2 +198,7 @@ if ((testString === FUNCTION_WRAPPER || testString == BROWSER_TOOLS)) {

}
}
else if (isEnableCrossContextCheck) {
try {
delegate.toString();
}
catch (error) {

@@ -84,261 +209,225 @@ nativeDelegate.apply(target, args);

}
else {
var testString = delegate.toString();
if ((testString === FUNCTION_WRAPPER || testString == BROWSER_TOOLS)) {
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, apiTypes, {
vh: checkIEAndCrossContext,
transferEventName: function (eventName) {
var pointerEventName = pointerEventsMap[eventName];
return pointerEventName || eventName;
}
});
Zone[api.symbol('patchEventTarget')] = !!_global[EVENT_TARGET];
return true;
}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// 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, [WS.prototype]);
}
else if (isEnableCrossContextCheck) {
try {
delegate.toString();
_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);
};
});
}
catch (error) {
nativeDelegate.apply(target, args);
return false;
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];
}
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, apiTypes, { vh: checkIEAndCrossContext });
Zone[api.symbol('patchEventTarget')] = !!_global[EVENT_TARGET];
return true;
}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// 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, [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);
};
});
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function propertyDescriptorLegacyPatch(api, _global) {
var _a = api.getGlobalObjects(), isNode = _a.isNode, isMix = _a.isMix;
if (isNode && !isMix) {
return;
}
else {
// we can patch the real socket
proxySocket = socket;
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;
}
api.patchOnProperties(proxySocket, ['close', 'error', 'message', 'open'], proxySocketProto);
return proxySocket;
};
var globalWebSocket = _global['WebSocket'];
for (var prop in WS) {
globalWebSocket[prop] = WS[prop];
}
}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @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);
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;
}
}
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)
var XMLHttpRequest = _global['XMLHttpRequest'];
if (!XMLHttpRequest) {
// XMLHttpRequest is not available in service worker
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', {
}
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 true;
}
get: function () { return this[SYMBOL_FAKE_ONREADYSTATECHANGE_1]; },
set: function (value) { this[SYMBOL_FAKE_ONREADYSTATECHANGE_1] = value; }
});
var div = document.createElement('div');
var result = !!div.onclick;
api.ObjectDefineProperty(Element.prototype, 'onclick', desc);
var req = new XMLHttpRequest();
var detectFunc = function () { };
req.onreadystatechange = detectFunc;
var result = req[SYMBOL_FAKE_ONREADYSTATECHANGE_1] === detectFunc;
req.onreadystatechange = null;
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;
}
}
// 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 eventNames = api.getGlobalObjects().eventNames;
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;
// 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 eventNames = api.getGlobalObjects().eventNames;
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;
}
elt = elt.parentElement;
}
}, true);
};
for (var i = 0; i < eventNames.length; i++) {
_loop_1(i);
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);
}
}
}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function registerElementPatch(_global, api) {
var _a = api.getGlobalObjects(), isBrowser = _a.isBrowser, isMix = _a.isMix;
if ((!isBrowser && !isMix) || !('registerElement' in _global.document)) {
return;
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
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);
}
var callbacks = ['createdCallback', 'attachedCallback', 'detachedCallback', 'attributeChangedCallback'];
api.patchCallbacks(api, document, 'Document', 'registerElement', callbacks);
}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @fileoverview
* @suppress {missingRequire}
*/
(function (_global) {
_global['__zone_symbol__legacyPatch'] = function () {
var Zone = _global['Zone'];
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 self !== 'undefined' && self || global);
})));
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (_global) {
_global[Zone.__symbol__('legacyPatch')] = function () {
var Zone = _global['Zone'];
Zone.__load_patch('defineProperty', function () { 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 : {});
}));
//# sourceMappingURL=zone_legacy_rollup.umd.js.map

@@ -1,1 +0,58 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t()}(0,function(){"use strict";function e(e,t){var n=t.getGlobalObjects(),r=n.eventNames,o=n.globalSources,a=n.zoneSymbolEventNames,c=n.TRUE_STR,i=n.FALSE_STR,l=n.ZONE_SYMBOL_PREFIX,s="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",u="ApplicationCache,EventSource,FileReader,InputMethodContext,MediaController,MessagePort,Node,Performance,SVGElementInstance,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebKitNamedFlow,Window,Worker,WorkerGlobalScope,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload,IDBRequest,IDBOpenDBRequest,IDBDatabase,IDBTransaction,IDBCursor,DBIndex,WebSocket".split(","),p=[],f=e.wtf,b=s.split(",");f?p=b.map(function(e){return"HTML"+e+"Element"}).concat(u):e.EventTarget?p.push("EventTarget"):p=u;for(var d=e.__Zone_disable_IE_check||!1,g=e.__Zone_enable_cross_context_check||!1,v=t.isIEOrEdge(),y="function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] }",E=0;E<r.length;E++){var m=l+((S=r[E])+i),h=l+(S+c);a[S]={},a[S][i]=m,a[S][c]=h}for(E=0;E<s.length;E++)for(var _=b[E],O=o[_]={},T=0;T<r.length;T++){var S;O[S=r[T]]=_+".addEventListener:"+S}var k=[];for(E=0;E<p.length;E++){var L=e[p[E]];k.push(L&&L.prototype)}return t.patchEventTarget(e,k,{vh:function(e,t,n,r){if(!d&&v){if(g)try{var o;if("[object FunctionWrapper]"===(o=t.toString())||o==y)return e.apply(n,r),!1}catch(t){return e.apply(n,r),!1}else if("[object FunctionWrapper]"===(o=t.toString())||o==y)return e.apply(n,r),!1}else if(g)try{t.toString()}catch(t){return e.apply(n,r),!1}return!0}}),Zone[t.symbol("patchEventTarget")]=!!e.EventTarget,!0}function t(e,t){var n=e.getGlobalObjects(),r=n.isNode,o=n.isMix;if((!r||o)&&!function(e,t){var n=e.getGlobalObjects(),r=n.isBrowser,o=n.isMix;if((r||o)&&!e.ObjectGetOwnPropertyDescriptor(HTMLElement.prototype,"onclick")&&"undefined"!=typeof Element){var a=e.ObjectGetOwnPropertyDescriptor(Element.prototype,"onclick");if(a&&!a.configurable)return!1;if(a){e.ObjectDefineProperty(Element.prototype,"onclick",{enumerable:!0,configurable:!0,get:function(){return!0}});var c=document.createElement("div"),i=!!c.onclick;return e.ObjectDefineProperty(Element.prototype,"onclick",a),i}}var l=t.XMLHttpRequest;if(!l)return!1;var s=l.prototype,u=e.ObjectGetOwnPropertyDescriptor(s,"onreadystatechange");if(u){e.ObjectDefineProperty(s,"onreadystatechange",{enumerable:!0,configurable:!0,get:function(){return!0}});var p=new l,i=!!p.onreadystatechange;return e.ObjectDefineProperty(s,"onreadystatechange",u||{}),i}var f=e.symbol("fake");e.ObjectDefineProperty(s,"onreadystatechange",{enumerable:!0,configurable:!0,get:function(){return this[f]},set:function(e){this[f]=e}});var p=new l,b=function(){};p.onreadystatechange=b;var i=p[f]===b;return p.onreadystatechange=null,i}(e,t)){var a="undefined"!=typeof WebSocket;!function(e){for(var t=e.getGlobalObjects().eventNames,n=e.symbol("unbound"),r=function(r){var o=t[r],a="on"+o;self.addEventListener(o,function(t){var r,o,c=t.target;for(o=c?c.constructor.name+"."+a:"unknown."+a;c;)c[a]&&!c[a][n]&&((r=e.wrapWithCurrentZone(c[a],o))[n]=c[a],c[a]=r),c=c.parentElement},!0)},o=0;o<t.length;o++)r(o)}(e),e.patchClass("XMLHttpRequest"),a&&function(e,t){var n=e.getGlobalObjects(),r=n.ADD_EVENT_LISTENER_STR,o=n.REMOVE_EVENT_LISTENER_STR,a=t.WebSocket;t.EventTarget||e.patchEventTarget(t,[a.prototype]),t.WebSocket=function(t,n){var c,i,l=arguments.length>1?new a(t,n):new a(t),s=e.ObjectGetOwnPropertyDescriptor(l,"onmessage");return s&&!1===s.configurable?(c=e.ObjectCreate(l),i=l,[r,o,"send","close"].forEach(function(t){c[t]=function(){var n=e.ArraySlice.call(arguments);if(t===r||t===o){var a=n.length>0?n[0]:void 0;if(a){var i=Zone.__symbol__("ON_PROPERTY"+a);l[i]=c[i]}}return l[t].apply(l,n)}})):c=l,e.patchOnProperties(c,["close","error","message","open"],i),c};var c=t.WebSocket;for(var i in a)c[i]=a[i]}(e,t),Zone[e.symbol("patchEvents")]=!0}}var n;(n="undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global).__zone_symbol__legacyPatch=function(){var r=n.Zone;r.__load_patch("registerElement",function(e,t,n){!function(e,t){var n=t.getGlobalObjects(),r=n.isBrowser,o=n.isMix;(r||o)&&"registerElement"in e.document&&t.patchCallbacks(t,document,"Document","registerElement",["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"])}(e,n)}),r.__load_patch("EventTargetLegacy",function(n,r,o){e(n,o),t(o,n)})}});
/**
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
!function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/var e,t=Zone.__symbol__,n=Object[t("defineProperty")]=Object.defineProperty,r=Object[t("getOwnPropertyDescriptor")]=Object.getOwnPropertyDescriptor,o=Object.create,a=t("unconfigurables");function c(e,t){return e&&e[a]&&e[a][t]}function i(e,t,r){return Object.isFrozen(r)||(r.configurable=!0),r.configurable||(e[a]||Object.isFrozen(e)||n(e,a,{writable:!0,value:{}}),e[a]&&(e[a][t]=!0)),r}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function l(e,t){var n=t.getGlobalObjects(),r=n.eventNames,o=n.globalSources,a=n.zoneSymbolEventNames,c=n.TRUE_STR,i=n.FALSE_STR,l=n.ZONE_SYMBOL_PREFIX,u="ApplicationCache,EventSource,FileReader,InputMethodContext,MediaController,MessagePort,Node,Performance,SVGElementInstance,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebKitNamedFlow,Window,Worker,WorkerGlobalScope,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload,IDBRequest,IDBOpenDBRequest,IDBDatabase,IDBTransaction,IDBCursor,DBIndex,WebSocket".split(","),p=[],f=e.wtf,s="Anchor,Area,Audio,BR,Base,BaseFont,Body,Button,Canvas,Content,DList,Directory,Div,Embed,FieldSet,Font,Form,Frame,FrameSet,HR,Head,Heading,Html,IFrame,Image,Input,Keygen,LI,Label,Legend,Link,Map,Marquee,Media,Menu,Meta,Meter,Mod,OList,Object,OptGroup,Option,Output,Paragraph,Pre,Progress,Quote,Script,Select,Source,Span,Style,TableCaption,TableCell,TableCol,Table,TableRow,TableSection,TextArea,Title,Track,UList,Unknown,Video".split(",");f?p=s.map(function(e){return"HTML"+e+"Element"}).concat(u):e.EventTarget?p.push("EventTarget"):p=u;for(var b=e.__Zone_disable_IE_check||!1,g=e.__Zone_enable_cross_context_check||!1,d=t.isIEOrEdge(),y="function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] }",v={MSPointerCancel:"pointercancel",MSPointerDown:"pointerdown",MSPointerEnter:"pointerenter",MSPointerHover:"pointerhover",MSPointerLeave:"pointerleave",MSPointerMove:"pointermove",MSPointerOut:"pointerout",MSPointerOver:"pointerover",MSPointerUp:"pointerup"},O=0;O<r.length;O++){var E=l+((T=r[O])+i),h=l+(T+c);a[T]={},a[T][i]=E,a[T][c]=h}for(O=0;O<s.length;O++)for(var m=s[O],_=o[m]={},S=0;S<r.length;S++){var T;_[T=r[S]]=m+".addEventListener:"+T}var P=[];for(O=0;O<p.length;O++){var j=e[p[O]];P.push(j&&j.prototype)}return t.patchEventTarget(e,P,{vh:function(e,t,n,r){if(!b&&d){if(g)try{var o;if("[object FunctionWrapper]"===(o=t.toString())||o==y)return e.apply(n,r),!1}catch(t){return e.apply(n,r),!1}else if("[object FunctionWrapper]"===(o=t.toString())||o==y)return e.apply(n,r),!1}else if(g)try{t.toString()}catch(t){return e.apply(n,r),!1}return!0},transferEventName:function(e){return v[e]||e}}),Zone[t.symbol("patchEventTarget")]=!!e.EventTarget,!0}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function u(e,t){var n=e.getGlobalObjects();if((!n.isNode||n.isMix)&&!function r(e,t){var n=e.getGlobalObjects();if((n.isBrowser||n.isMix)&&!e.ObjectGetOwnPropertyDescriptor(HTMLElement.prototype,"onclick")&&"undefined"!=typeof Element){var r=e.ObjectGetOwnPropertyDescriptor(Element.prototype,"onclick");if(r&&!r.configurable)return!1;if(r){e.ObjectDefineProperty(Element.prototype,"onclick",{enumerable:!0,configurable:!0,get:function(){return!0}});var o=!!document.createElement("div").onclick;return e.ObjectDefineProperty(Element.prototype,"onclick",r),o}}var a=t.XMLHttpRequest;if(!a)return!1;var c=a.prototype,i=e.ObjectGetOwnPropertyDescriptor(c,"onreadystatechange");if(i)return e.ObjectDefineProperty(c,"onreadystatechange",{enumerable:!0,configurable:!0,get:function(){return!0}}),o=!!(u=new a).onreadystatechange,e.ObjectDefineProperty(c,"onreadystatechange",i||{}),o;var l=e.symbol("fake");e.ObjectDefineProperty(c,"onreadystatechange",{enumerable:!0,configurable:!0,get:function(){return this[l]},set:function(e){this[l]=e}});var u,p=function(){};return(u=new a).onreadystatechange=p,o=u[l]===p,u.onreadystatechange=null,o}(e,t)){var o="undefined"!=typeof WebSocket;!function a(e){for(var t=e.getGlobalObjects().eventNames,n=e.symbol("unbound"),r=function(r){var o=t[r],a="on"+o;self.addEventListener(o,function(t){var r,o,c=t.target;for(o=c?c.constructor.name+"."+a:"unknown."+a;c;)c[a]&&!c[a][n]&&((r=e.wrapWithCurrentZone(c[a],o))[n]=c[a],c[a]=r),c=c.parentElement},!0)},o=0;o<t.length;o++)r(o)}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/(e),e.patchClass("XMLHttpRequest"),o&&function c(e,t){var n=e.getGlobalObjects(),r=n.ADD_EVENT_LISTENER_STR,o=n.REMOVE_EVENT_LISTENER_STR,a=t.WebSocket;t.EventTarget||e.patchEventTarget(t,[a.prototype]),t.WebSocket=function(t,n){var c,i,l=arguments.length>1?new a(t,n):new a(t),u=e.ObjectGetOwnPropertyDescriptor(l,"onmessage");return u&&!1===u.configurable?(c=e.ObjectCreate(l),i=l,[r,o,"send","close"].forEach(function(t){c[t]=function(){var n=e.ArraySlice.call(arguments);if(t===r||t===o){var a=n.length>0?n[0]:void 0;if(a){var i=Zone.__symbol__("ON_PROPERTY"+a);l[i]=c[i]}}return l[t].apply(l,n)}})):c=l,e.patchOnProperties(c,["close","error","message","open"],i),c};var c=t.WebSocket;for(var i in a)c[i]=a[i]}(e,t),Zone[e.symbol("patchEvents")]=!0}}(
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{})[Zone.__symbol__("legacyPatch")]=function(){var t=e.Zone;t.__load_patch("defineProperty",function(){!function e(){Object.defineProperty=function(e,t,r){if(c(e,t))throw new TypeError("Cannot assign to read only property '"+t+"' of "+e);var o=r.configurable;return"prototype"!==t&&(r=i(e,t,r)),function a(e,t,r,o){try{return n(e,t,r)}catch(c){if(!r.configurable)throw c;void 0===o?delete r.configurable:r.configurable=o;try{return n(e,t,r)}catch(n){var a=null;try{a=JSON.stringify(r)}catch(e){a=r.toString()}console.log("Attempting to configure '"+t+"' with descriptor '"+a+"' on object '"+e+"' and got error, giving up: "+n)}}}(e,t,r,o)},Object.defineProperties=function(e,t){return Object.keys(t).forEach(function(n){Object.defineProperty(e,n,t[n])}),e},Object.create=function(e,t){return"object"!=typeof t||Object.isFrozen(t)||Object.keys(t).forEach(function(n){t[n]=i(e,n,t[n])}),o(e,t)},Object.getOwnPropertyDescriptor=function(e,t){var n=r(e,t);return n&&c(e,t)&&(n.configurable=!1),n}}()}),t.__load_patch("registerElement",function(e,t,n){!function r(e,t){var n=t.getGlobalObjects();(n.isBrowser||n.isMix)&&"registerElement"in e.document&&t.patchCallbacks(t,document,"Document","registerElement",["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"])}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/(e,n)}),t.__load_patch("EventTargetLegacy",function(e,t,n){l(e,n),u(n,e)})}});
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, (function () { 'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
Zone.__load_patch('canvas', function (global, Zone, api) {
var HTMLCanvasElement = global['HTMLCanvasElement'];
if (typeof HTMLCanvasElement !== 'undefined' && HTMLCanvasElement.prototype &&
HTMLCanvasElement.prototype.toBlob) {
api.patchMacroTask(HTMLCanvasElement.prototype, 'toBlob', function (self, args) {
return { name: 'HTMLCanvasElement.toBlob', target: self, cbIdx: 0, args: args };
});
}
});
})));
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
}(function () {
'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
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 };
});
}
});
}));
//# sourceMappingURL=zone_patch_canvas_rollup.umd.js.map

@@ -1,1 +0,13 @@

!function(t,o){"object"==typeof exports&&"undefined"!=typeof module?o():"function"==typeof define&&define.amd?define(o):o()}(0,function(){"use strict";Zone.__load_patch("canvas",function(t,o,e){var n=t.HTMLCanvasElement;void 0!==n&&n.prototype&&n.prototype.toBlob&&e.patchMacroTask(n.prototype,"toBlob",function(t,o){return{name:"HTMLCanvasElement.toBlob",target:t,cbIdx:0,args:o}})})});
/**
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
!function(t){"function"==typeof define&&define.amd?define(t):t()}(function(){"use strict";
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/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}})})});
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, (function () { 'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
Zone.__load_patch('cordova', function (global, Zone, api) {
if (global.cordova) {
var SUCCESS_SOURCE_1 = 'cordova.exec.success';
var ERROR_SOURCE_1 = 'cordova.exec.error';
var FUNCTION_1 = 'function';
var nativeExec_1 = api.patchMethod(global.cordova, 'exec', function () { return function (self, args) {
if (args.length > 0 && typeof args[0] === FUNCTION_1) {
args[0] = Zone.current.wrap(args[0], SUCCESS_SOURCE_1);
}
if (args.length > 1 && typeof args[1] === FUNCTION_1) {
args[1] = Zone.current.wrap(args[1], ERROR_SOURCE_1);
}
return nativeExec_1.apply(self, args);
}; });
}
});
Zone.__load_patch('cordova.FileReader', function (global, Zone) {
if (global.cordova && typeof global['FileReader'] !== 'undefined') {
document.addEventListener('deviceReady', function () {
var FileReader = global['FileReader'];
['abort', 'error', 'load', 'loadstart', 'loadend', 'progress'].forEach(function (prop) {
var eventNameSymbol = Zone.__symbol__('ON_PROPERTY' + prop);
Object.defineProperty(FileReader.prototype, eventNameSymbol, {
configurable: true,
get: function () {
return this._realReader && this._realReader[eventNameSymbol];
}
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
}(function () {
'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
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]; }
});
});
});
});
}
});
})));
}
});
}));
//# sourceMappingURL=zone_patch_cordova_rollup.umd.js.map

@@ -1,1 +0,13 @@

!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o():"function"==typeof define&&define.amd?define(o):o()}(0,function(){"use strict";Zone.__load_patch("cordova",function(e,o,r){if(e.cordova)var t=r.patchMethod(e.cordova,"exec",function(){return function(e,r){return r.length>0&&"function"==typeof r[0]&&(r[0]=o.current.wrap(r[0],"cordova.exec.success")),r.length>1&&"function"==typeof r[1]&&(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 t=o.__symbol__("ON_PROPERTY"+e);Object.defineProperty(r.prototype,t,{configurable:!0,get:function(){return this._realReader&&this._realReader[t]}})})})})});
/**
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
!function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/Zone.__load_patch("cordova",function(e,o,r){if(e.cordova)var n=r.patchMethod(e.cordova,"exec",function(){return function(e,r){return r.length>0&&"function"==typeof r[0]&&(r[0]=o.current.wrap(r[0],"cordova.exec.success")),r.length>1&&"function"==typeof r[1]&&(r[1]=o.current.wrap(r[1],"cordova.exec.error")),n.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]}})})})})});
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, (function () { 'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
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;
// 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) {
return;
}
patchArguments(CallbacksRegistry.prototype, 'add', 'CallbackRegistry.add');
});
})));
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('electron')) :
typeof define === 'function' && define.amd ? define(['electron'], factory) :
(global = global || self, global.zone_patch_electron_rollup = factory(global.electron));
}(this, function (electron$1) {
'use strict';
electron$1 = electron$1 && electron$1.hasOwnProperty('default') ? electron$1['default'] : electron$1;
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
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 desktopCapturer = electron$1.desktopCapturer, shell = electron$1.shell, CallbacksRegistry = electron$1.CallbacksRegistry, ipcRenderer = electron$1.ipcRenderer;
// 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');
});
var electron = {};
return electron;
}));
//# sourceMappingURL=zone_patch_electron_rollup.umd.js.map

@@ -1,1 +0,14 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t()}(0,function(){"use strict";Zone.__load_patch("electron",function(e,t,n){function o(e,t,o){return n.patchMethod(e,t,function(e){return function(t,r){return e&&e.apply(t,n.bindArguments(r,o))}})}var r=require("electron"),c=r.desktopCapturer,u=r.shell,l=r.CallbacksRegistry;c&&o(c,"getSources","electron.desktopCapturer.getSources"),u&&o(u,"openExternal","electron.shell.openExternal"),l&&o(l.prototype,"add","CallbackRegistry.add")})});
/**
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("electron")):"function"==typeof define&&define.amd?define(["electron"],t):(e=e||self).zone_patch_electron_rollup=t(e.electron)}(this,function(e){"use strict";return e=e&&e.hasOwnProperty("default")?e.default:e,
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
Zone.__load_patch("electron",function(t,n,r){function o(e,t,n){return r.patchMethod(e,t,function(e){return function(t,o){return e&&e.apply(t,r.bindArguments(o,n))}})}var l=e.desktopCapturer,c=e.shell,u=e.CallbacksRegistry,p=e.ipcRenderer;l&&o(l,"getSources","electron.desktopCapturer.getSources"),c&&o(c,"openExternal","electron.shell.openExternal"),u?o(u.prototype,"add","CallbackRegistry.add"):p&&o(p,"on","ipcRenderer.on")}),{}});
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, (function () { 'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
/**
* @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 fetchTaskAborting = api.symbol('fetchTaskAborting');
var OriginalAbortController = global['AbortController'];
var supportAbort = typeof OriginalAbortController === 'function';
var abortNative = null;
if (supportAbort) {
global['AbortController'] = function () {
var abortController = new OriginalAbortController();
var signal = abortController.signal;
signal.abortController = abortController;
return abortController;
};
abortNative = api.patchMethod(OriginalAbortController.prototype, 'abort', function (delegate) { return function (self, args) {
if (self.task) {
return self.task.zone.cancelTask(self.task);
}
return delegate.apply(self, args);
}; });
}
var placeholder = function () { };
global['fetch'] = function () {
var _this = this;
var args = Array.prototype.slice.call(arguments);
var options = args.length > 1 ? args[1] : null;
var signal = options && options.signal;
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);
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
}(function () {
'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @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 fetchTaskAborting = api.symbol('fetchTaskAborting');
var OriginalAbortController = global['AbortController'];
var supportAbort = typeof OriginalAbortController === 'function';
var abortNative = null;
if (supportAbort) {
global['AbortController'] = function () {
var abortController = new OriginalAbortController();
var signal = abortController.signal;
signal.abortController = abortController;
return abortController;
};
abortNative = api.patchMethod(OriginalAbortController.prototype, 'abort', function (delegate) { return function (self, args) {
if (self.task) {
return self.task.zone.cancelTask(self.task);
}
catch (error) {
rej(error);
return;
}
finally {
zone[fetchTaskScheduling] = false;
}
if (!(fetchPromise instanceof ZoneAwarePromise)) {
var ctor = fetchPromise.constructor;
if (!ctor[symbolThenPatched]) {
api.patchThen(ctor);
return delegate.apply(self, args);
}; });
}
var placeholder = function () { };
global['fetch'] = function () {
var _this = this;
var args = Array.prototype.slice.call(arguments);
var options = args.length > 1 ? args[1] : null;
var signal = options && options.signal;
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);
}
}
fetchPromise.then(function (resource) {
if (task.state !== 'notScheduled') {
task.invoke();
catch (error) {
rej(error);
return;
}
res(resource);
}, function (error) {
if (task.state !== 'notScheduled') {
task.invoke();
finally {
zone[fetchTaskScheduling] = false;
}
rej(error);
});
}, function () {
if (!supportAbort) {
rej('No AbortController supported, can not cancel fetch');
return;
}
if (signal && signal.abortController && !signal.aborted &&
typeof signal.abortController.abort === 'function' && abortNative) {
try {
Zone.current[fetchTaskAborting] = true;
abortNative.call(signal.abortController);
if (!(fetchPromise instanceof ZoneAwarePromise)) {
var ctor = fetchPromise.constructor;
if (!ctor[symbolThenPatched]) {
api.patchThen(ctor);
}
}
finally {
Zone.current[fetchTaskAborting] = false;
fetchPromise.then(function (resource) {
if (task.state !== 'notScheduled') {
task.invoke();
}
res(resource);
}, function (error) {
if (task.state !== 'notScheduled') {
task.invoke();
}
rej(error);
});
}, function () {
if (!supportAbort) {
rej('No AbortController supported, can not cancel fetch');
return;
}
if (signal && signal.abortController && !signal.aborted &&
typeof signal.abortController.abort === 'function' && abortNative) {
try {
Zone.current[fetchTaskAborting] = true;
abortNative.call(signal.abortController);
}
finally {
Zone.current[fetchTaskAborting] = false;
}
}
else {
rej('cancel fetch need a AbortController.signal');
}
});
if (signal && signal.abortController) {
signal.abortController.task = task;
}
else {
rej('cancel fetch need a AbortController.signal');
}
});
if (signal && signal.abortController) {
signal.abortController.task = task;
}
});
};
});
})));
};
});
}));
//# sourceMappingURL=zone_patch_fetch_rollup.umd.js.map

@@ -1,1 +0,13 @@

!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n():"function"==typeof define&&define.amd?define(n):n()}(0,function(){"use strict";Zone.__load_patch("fetch",function(t,n,o){var e=t.fetch;if("function"==typeof e){var r=t[o.symbol("fetch")];r&&(e=r);var c=t.Promise,l=o.symbol("thenPatched"),a=o.symbol("fetchTaskScheduling"),f=o.symbol("fetchTaskAborting"),i=t.AbortController,u="function"==typeof i,s=null;u&&(t.AbortController=function(){var t=new i;return t.signal.abortController=t,t},s=o.patchMethod(i.prototype,"abort",function(t){return function(n,o){return n.task?n.task.zone.cancelTask(n.task):t.apply(n,o)}}));var h=function(){};t.fetch=function(){var t=this,r=Array.prototype.slice.call(arguments),i=r.length>1?r[1]:null,d=i&&i.signal;return new Promise(function(i,p){var b=n.current.scheduleMacroTask("fetch",h,{fetchArgs:r},function(){var f,u=n.current;try{u[a]=!0,f=e.apply(t,r)}catch(t){return void p(t)}finally{u[a]=!1}if(!(f instanceof c)){var s=f.constructor;s[l]||o.patchThen(s)}f.then(function(t){"notScheduled"!==b.state&&b.invoke(),i(t)},function(t){"notScheduled"!==b.state&&b.invoke(),p(t)})},function(){if(u)if(d&&d.abortController&&!d.aborted&&"function"==typeof d.abortController.abort&&s)try{n.current[f]=!0,s.call(d.abortController)}finally{n.current[f]=!1}else p("cancel fetch need a AbortController.signal");else p("No AbortController supported, can not cancel fetch")});d&&d.abortController&&(d.abortController.task=b)})}}})});
/**
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
!function(t){"function"==typeof define&&define.amd?define(t):t()}(function(){"use strict";
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/Zone.__load_patch("fetch",function(t,n,o){var e=t.fetch;if("function"==typeof e){var r=t[o.symbol("fetch")];r&&(e=r);var c=t.Promise,l=o.symbol("thenPatched"),a=o.symbol("fetchTaskScheduling"),f=o.symbol("fetchTaskAborting"),i=t.AbortController,u="function"==typeof i,s=null;u&&(t.AbortController=function(){var t=new i;return t.signal.abortController=t,t},s=o.patchMethod(i.prototype,"abort",function(t){return function(n,o){return n.task?n.task.zone.cancelTask(n.task):t.apply(n,o)}}));var h=function(){};t.fetch=function(){var t=this,r=Array.prototype.slice.call(arguments),i=r.length>1?r[1]:null,b=i&&i.signal;return new Promise(function(i,d){var p=n.current.scheduleMacroTask("fetch",h,{fetchArgs:r},function(){var f,u=n.current;try{u[a]=!0,f=e.apply(t,r)}catch(t){return void d(t)}finally{u[a]=!1}if(!(f instanceof c)){var s=f.constructor;s[l]||o.patchThen(s)}f.then(function(t){"notScheduled"!==p.state&&p.invoke(),i(t)},function(t){"notScheduled"!==p.state&&p.invoke(),d(t)})},function(){if(u)if(b&&b.abortController&&!b.aborted&&"function"==typeof b.abortController.abort&&s)try{n.current[f]=!0,s.call(b.abortController)}finally{n.current[f]=!1}else d("cancel fetch need a AbortController.signal");else d("No AbortController supported, can not cancel fetch")});b&&b.abortController&&(b.abortController.task=p)})}}})});
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, (function () { 'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
Zone.__load_patch('jsonp', function (global, Zone, api) {
Zone[Zone.__symbol__('jsonp')] = function patchJsonp(options) {
if (!options || !options.jsonp || !options.sendFuncName) {
return;
}
var noop = function () { };
[options.successFuncName, options.failedFuncName].forEach(function (methodName) {
if (!methodName) {
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
}(function () {
'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
Zone.__load_patch('jsonp', function (global, Zone, api) {
// because jsonp is not a standard api, there are a lot of
// implementations, so zone.js just provide a helper util to
// patch the jsonp send and onSuccess/onError callback
// the options is an object which contains
// - jsonp, the jsonp object which hold the send function
// - sendFuncName, the name of the send function
// - successFuncName, success func name
// - failedFuncName, failed func name
Zone[Zone.__symbol__('jsonp')] = function patchJsonp(options) {
if (!options || !options.jsonp || !options.sendFuncName) {
return;
}
var oriFunc = global[methodName];
if (oriFunc) {
api.patchMethod(global, methodName, function (delegate) { return function (self, args) {
var task = global[api.symbol('jsonTask')];
if (task) {
task.callback = delegate;
return task.invoke.apply(self, args);
}
else {
return delegate.apply(self, args);
}
}; });
}
else {
Object.defineProperty(global, methodName, {
configurable: true,
enumerable: true,
get: function () {
return function () {
var task = global[api.symbol('jsonpTask')];
var delegate = global[api.symbol("jsonp" + methodName + "callback")];
if (task) {
if (delegate) {
task.callback = delegate;
var noop = function () { };
[options.successFuncName, options.failedFuncName].forEach(function (methodName) {
if (!methodName) {
return;
}
var oriFunc = global[methodName];
if (oriFunc) {
api.patchMethod(global, methodName, function (delegate) { return function (self, args) {
var task = global[api.symbol('jsonTask')];
if (task) {
task.callback = delegate;
return task.invoke.apply(self, args);
}
else {
return delegate.apply(self, args);
}
}; });
}
else {
Object.defineProperty(global, methodName, {
configurable: true,
enumerable: true,
get: function () {
return function () {
var task = global[api.symbol('jsonpTask')];
var delegate = global[api.symbol("jsonp" + methodName + "callback")];
if (task) {
if (delegate) {
task.callback = delegate;
}
global[api.symbol('jsonpTask')] = undefined;
return task.invoke.apply(this, arguments);
}
global[api.symbol('jsonpTask')] = undefined;
return task.invoke.apply(this, arguments);
}
else {
if (delegate) {
return delegate.apply(this, arguments);
else {
if (delegate) {
return delegate.apply(this, arguments);
}
}
}
return null;
};
},
set: function (callback) {
this[api.symbol("jsonp" + methodName + "callback")] = callback;
}
});
}
});
api.patchMethod(options.jsonp, options.sendFuncName, function (delegate) { return function (self, args) {
global[api.symbol('jsonpTask')] =
Zone.current.scheduleMacroTask('jsonp', noop, {}, function (task) {
return delegate.apply(self, args);
}, noop);
}; });
};
});
})));
return null;
};
},
set: function (callback) {
this[api.symbol("jsonp" + 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);
}; });
};
});
}));
//# sourceMappingURL=zone_patch_jsonp_rollup.umd.js.map

@@ -1,1 +0,13 @@

!function(n,o){"object"==typeof exports&&"undefined"!=typeof module?o():"function"==typeof define&&define.amd?define(o):o()}(0,function(){"use strict";Zone.__load_patch("jsonp",function(n,o,e){o[o.__symbol__("jsonp")]=function(t){if(t&&t.jsonp&&t.sendFuncName){var c=function(){};[t.successFuncName,t.failedFuncName].forEach(function(o){o&&(n[o]?e.patchMethod(n,o,function(o){return function(t,c){var s=n[e.symbol("jsonTask")];return s?(s.callback=o,s.invoke.apply(t,c)):o.apply(t,c)}}):Object.defineProperty(n,o,{configurable:!0,enumerable:!0,get:function(){return function(){var t=n[e.symbol("jsonpTask")],c=n[e.symbol("jsonp"+o+"callback")];return t?(c&&(t.callback=c),n[e.symbol("jsonpTask")]=void 0,t.invoke.apply(this,arguments)):c?c.apply(this,arguments):null}},set:function(n){this[e.symbol("jsonp"+o+"callback")]=n}}))}),e.patchMethod(t.jsonp,t.sendFuncName,function(t){return function(s,a){n[e.symbol("jsonpTask")]=o.current.scheduleMacroTask("jsonp",c,{},function(n){return t.apply(s,a)},c)}})}}})});
/**
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
!function(n){"function"==typeof define&&define.amd?define(n):n()}(function(){"use strict";
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/Zone.__load_patch("jsonp",function(n,o,e){o[o.__symbol__("jsonp")]=function c(t){if(t&&t.jsonp&&t.sendFuncName){var a=function(){};[t.successFuncName,t.failedFuncName].forEach(function(o){o&&(n[o]?e.patchMethod(n,o,function(o){return function(c,t){var a=n[e.symbol("jsonTask")];return a?(a.callback=o,a.invoke.apply(c,t)):o.apply(c,t)}}):Object.defineProperty(n,o,{configurable:!0,enumerable:!0,get:function(){return function(){var c=n[e.symbol("jsonpTask")],t=n[e.symbol("jsonp"+o+"callback")];return c?(t&&(c.callback=t),n[e.symbol("jsonpTask")]=void 0,c.invoke.apply(this,arguments)):t?t.apply(this,arguments):null}},set:function(n){this[e.symbol("jsonp"+o+"callback")]=n}}))}),e.patchMethod(t.jsonp,t.sendFuncName,function(c){return function(t,s){n[e.symbol("jsonpTask")]=o.current.scheduleMacroTask("jsonp",a,{},function(n){return c.apply(t,s)},a)}})}}})});
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, (function () { 'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
/**
* Promise for async/fakeAsync zoneSpec test
* can support async operation which not supported by zone.js
* such as
* it ('test jsonp in AsyncZone', async() => {
* new Promise(res => {
* jsonp(url, (data) => {
* // success callback
* res(data);
* });
* }).then((jsonpResult) => {
* // get jsonp result.
*
* // user will expect AsyncZoneSpec wait for
* // then, but because jsonp is not zone aware
* // AsyncZone will finish before then is called.
* });
* });
*/
Zone.__load_patch('promisefortest', function (global, Zone, api) {
var symbolState = api.symbol('state');
var UNRESOLVED = null;
var symbolParentUnresolved = api.symbol('parentUnresolved');
// patch Promise.prototype.then to keep an internal
// number for tracking unresolved chained promise
// we will decrease this number when the parent promise
// being resolved/rejected and chained promise was
// scheduled as a microTask.
// so we can know such kind of chained promise still
// not resolved in AsyncTestZone
Promise[api.symbol('patchPromiseForTest')] = function patchPromiseForTest() {
var oriThen = Promise[Zone.__symbol__('ZonePromiseThen')];
if (oriThen) {
return;
}
oriThen = Promise[Zone.__symbol__('ZonePromiseThen')] = Promise.prototype.then;
Promise.prototype.then = function () {
var chained = oriThen.apply(this, arguments);
if (this[symbolState] === UNRESOLVED) {
// parent promise is unresolved.
var asyncTestZoneSpec = Zone.current.get('AsyncTestZoneSpec');
if (asyncTestZoneSpec) {
asyncTestZoneSpec.unresolvedChainedPromiseCount++;
chained[symbolParentUnresolved] = true;
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
}(function () {
'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Promise for async/fakeAsync zoneSpec test
* can support async operation which not supported by zone.js
* such as
* it ('test jsonp in AsyncZone', async() => {
* new Promise(res => {
* jsonp(url, (data) => {
* // success callback
* res(data);
* });
* }).then((jsonpResult) => {
* // get jsonp result.
*
* // user will expect AsyncZoneSpec wait for
* // then, but because jsonp is not zone aware
* // AsyncZone will finish before then is called.
* });
* });
*/
Zone.__load_patch('promisefortest', function (global, Zone, api) {
var symbolState = api.symbol('state');
var UNRESOLVED = null;
var symbolParentUnresolved = api.symbol('parentUnresolved');
// patch Promise.prototype.then to keep an internal
// number for tracking unresolved chained promise
// we will decrease this number when the parent promise
// being resolved/rejected and chained promise was
// scheduled as a microTask.
// so we can know such kind of chained promise still
// not resolved in AsyncTestZone
Promise[api.symbol('patchPromiseForTest')] = function patchPromiseForTest() {
var oriThen = Promise[Zone.__symbol__('ZonePromiseThen')];
if (oriThen) {
return;
}
oriThen = Promise[Zone.__symbol__('ZonePromiseThen')] = Promise.prototype.then;
Promise.prototype.then = function () {
var chained = oriThen.apply(this, arguments);
if (this[symbolState] === UNRESOLVED) {
// parent promise is unresolved.
var asyncTestZoneSpec = Zone.current.get('AsyncTestZoneSpec');
if (asyncTestZoneSpec) {
asyncTestZoneSpec.unresolvedChainedPromiseCount++;
chained[symbolParentUnresolved] = true;
}
}
return chained;
};
};
Promise[api.symbol('unPatchPromiseForTest')] = function unpatchPromiseForTest() {
// restore origin then
var oriThen = Promise[Zone.__symbol__('ZonePromiseThen')];
if (oriThen) {
Promise.prototype.then = oriThen;
Promise[Zone.__symbol__('ZonePromiseThen')] = undefined;
}
return chained;
};
};
Promise[api.symbol('unPatchPromiseForTest')] = function unpatchPromiseForTest() {
// restore origin then
var oriThen = Promise[Zone.__symbol__('ZonePromiseThen')];
if (oriThen) {
Promise.prototype.then = oriThen;
Promise[Zone.__symbol__('ZonePromiseThen')] = undefined;
}
};
});
})));
});
}));
//# sourceMappingURL=zone_patch_promise_test_rollup.umd.js.map

@@ -1,1 +0,13 @@

!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o():"function"==typeof define&&define.amd?define(o):o()}(0,function(){"use strict";Zone.__load_patch("promisefortest",function(e,o,n){var t=n.symbol("state"),s=n.symbol("parentUnresolved");Promise[n.symbol("patchPromiseForTest")]=function(){var e=Promise[o.__symbol__("ZonePromiseThen")];e||(e=Promise[o.__symbol__("ZonePromiseThen")]=Promise.prototype.then,Promise.prototype.then=function(){var n=e.apply(this,arguments);if(null===this[t]){var r=o.current.get("AsyncTestZoneSpec");r&&(r.unresolvedChainedPromiseCount++,n[s]=!0)}return n})},Promise[n.symbol("unPatchPromiseForTest")]=function(){var e=Promise[o.__symbol__("ZonePromiseThen")];e&&(Promise.prototype.then=e,Promise[o.__symbol__("ZonePromiseThen")]=void 0)}})});
/**
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
!function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/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)}})});
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, (function () { 'use strict';
var __values = (undefined && undefined.__values) || function (o) {
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
if (m) return m.call(o);
return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
}(function () {
'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
Zone.__load_patch('ResizeObserver', function (global, Zone, api) {
var ResizeObserver = global['ResizeObserver'];
if (!ResizeObserver) {
return;
}
};
};
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
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 e_1, _a;
var zones = {};
var currZone = Zone.current;
try {
for (var entries_1 = __values(entries), entries_1_1 = entries_1.next(); !entries_1_1.done; entries_1_1 = entries_1.next()) {
var entry = entries_1_1.value;
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];

@@ -58,65 +43,55 @@ if (!zone) {

}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (entries_1_1 && !entries_1_1.done && (_a = entries_1.return)) _a.call(entries_1);
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;
}
finally { if (e_1) throw e_1.error; }
}
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) {
}
target[resizeObserverSymbol] = undefined;
return delegate.apply(self, args);
}
var targets = self[resizeObserverSymbol];
if (!targets) {
targets = self[resizeObserverSymbol] = [];
}
targets.push(target);
target[resizeObserverSymbol] = Zone.current;
return delegate.apply(self, args);
}; });
api.patchMethod(ResizeObserver.prototype, 'unobserve', function (delegate) { return function (self, args) {
var target = args.length > 0 ? args[0] : null;
if (!target) {
}; });
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);
}
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);
}; });
});
})));
}; });
});
}));
//# sourceMappingURL=zone_patch_resize_observer_rollup.umd.js.map

@@ -1,1 +0,13 @@

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n():"function"==typeof define&&define.amd?define(n):n()}(0,function(){"use strict";var e=function(e){var n="function"==typeof Symbol&&e[Symbol.iterator],r=0;return n?n.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}};Zone.__load_patch("ResizeObserver",function(n,r,t){var o=n.ResizeObserver;if(o){var i=t.symbol("ResizeObserver");t.patchMethod(n,"ResizeObserver",function(n){return function(n,t){var u=t.length>0?t[0]:null;return u&&(t[0]=function(n,t){var o,a,c=this,f={},l=r.current;try{for(var p=e(n),v=p.next();!v.done;v=p.next()){var s=v.value,h=s.target[i];h||(h=l);var d=f[h.name];d||(f[h.name]=d={entries:[],zone:h}),d.entries.push(s)}}catch(e){o={error:e}}finally{try{v&&!v.done&&(a=p.return)&&a.call(p)}finally{if(o)throw o.error}}Object.keys(f).forEach(function(e){var n=f[e];n.zone!==r.current?n.zone.run(u,c,[n.entries,t],"ResizeObserver"):u.call(c,n.entries,t)})}),t.length>0?new o(t[0]):new o}}),t.patchMethod(o.prototype,"observe",function(e){return function(n,t){var o=t.length>0?t[0]:null;if(!o)return e.apply(n,t);var u=n[i];return u||(u=n[i]=[]),u.push(o),o[i]=r.current,e.apply(n,t)}}),t.patchMethod(o.prototype,"unobserve",function(e){return function(n,r){var t=r.length>0?r[0]:null;if(!t)return e.apply(n,r);var o=n[i];if(o)for(var u=0;u<o.length;u++)if(o[u]===t){o.splice(u,1);break}return t[i]=void 0,e.apply(n,r)}}),t.patchMethod(o.prototype,"disconnect",function(e){return function(n,r){var t=n[i];return t&&(t.forEach(function(e){e[i]=void 0}),n[i]=void 0),e.apply(n,r)}})}})});
/**
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
!function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/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)}})}})});

@@ -0,33 +1,1093 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('rxjs')) :
typeof define === 'function' && define.amd ? define(['rxjs'], factory) :
(factory(global.rxjs));
}(this, (function (rxjs) { 'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
Zone.__load_patch('rxjs.Scheduler.now', function (global, Zone, api) {
api.patchMethod(rxjs.Scheduler, 'now', function (delegate) { return function (self, args) {
return Date.now.call(self);
}; });
api.patchMethod(rxjs.asyncScheduler, 'now', function (delegate) { return function (self, args) {
return Date.now.call(self);
}; });
api.patchMethod(rxjs.asapScheduler, 'now', function (delegate) { return function (self, args) {
return Date.now.call(self);
}; });
});
})));
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
}(function () {
'use strict';
function isFunction(x) {
return typeof x === 'function';
}
var _enable_super_gross_mode_that_will_cause_bad_things = false;
var config = {
Promise: undefined,
set useDeprecatedSynchronousErrorHandling(value) {
if (value) {
var error = new Error();
console.warn('DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n' + error.stack);
}
else if (_enable_super_gross_mode_that_will_cause_bad_things) {
console.log('RxJS: Back to a better error behavior. Thank you. <3');
}
_enable_super_gross_mode_that_will_cause_bad_things = value;
},
get useDeprecatedSynchronousErrorHandling() {
return _enable_super_gross_mode_that_will_cause_bad_things;
},
};
function hostReportError(err) {
setTimeout(function () { throw err; });
}
var empty = {
closed: true,
next: function (value) { },
error: function (err) {
if (config.useDeprecatedSynchronousErrorHandling) {
throw err;
}
else {
hostReportError(err);
}
},
complete: function () { }
};
var isArray = Array.isArray || (function (x) { return x && typeof x.length === 'number'; });
function isObject(x) {
return x !== null && typeof x === 'object';
}
function UnsubscriptionErrorImpl(errors) {
Error.call(this);
this.message = errors ?
errors.length + " errors occurred during unsubscription:\n" + errors.map(function (err, i) { return i + 1 + ") " + err.toString(); }).join('\n ') : '';
this.name = 'UnsubscriptionError';
this.errors = errors;
return this;
}
UnsubscriptionErrorImpl.prototype = Object.create(Error.prototype);
var UnsubscriptionError = UnsubscriptionErrorImpl;
var Subscription = /** @class */ (function () {
function Subscription(unsubscribe) {
this.closed = false;
this._parent = null;
this._parents = null;
this._subscriptions = null;
if (unsubscribe) {
this._unsubscribe = unsubscribe;
}
}
Subscription.prototype.unsubscribe = function () {
var hasErrors = false;
var errors;
if (this.closed) {
return;
}
var _a = this, _parent = _a._parent, _parents = _a._parents, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions;
this.closed = true;
this._parent = null;
this._parents = null;
this._subscriptions = null;
var index = -1;
var len = _parents ? _parents.length : 0;
while (_parent) {
_parent.remove(this);
_parent = ++index < len && _parents[index] || null;
}
if (isFunction(_unsubscribe)) {
try {
_unsubscribe.call(this);
}
catch (e) {
hasErrors = true;
errors = e instanceof UnsubscriptionError ? flattenUnsubscriptionErrors(e.errors) : [e];
}
}
if (isArray(_subscriptions)) {
index = -1;
len = _subscriptions.length;
while (++index < len) {
var sub = _subscriptions[index];
if (isObject(sub)) {
try {
sub.unsubscribe();
}
catch (e) {
hasErrors = true;
errors = errors || [];
if (e instanceof UnsubscriptionError) {
errors = errors.concat(flattenUnsubscriptionErrors(e.errors));
}
else {
errors.push(e);
}
}
}
}
}
if (hasErrors) {
throw new UnsubscriptionError(errors);
}
};
Subscription.prototype.add = function (teardown) {
var subscription = teardown;
switch (typeof teardown) {
case 'function':
subscription = new Subscription(teardown);
case 'object':
if (subscription === this || subscription.closed || typeof subscription.unsubscribe !== 'function') {
return subscription;
}
else if (this.closed) {
subscription.unsubscribe();
return subscription;
}
else if (!(subscription instanceof Subscription)) {
var tmp = subscription;
subscription = new Subscription();
subscription._subscriptions = [tmp];
}
break;
default: {
if (!teardown) {
return Subscription.EMPTY;
}
throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.');
}
}
if (subscription._addParent(this)) {
var subscriptions = this._subscriptions;
if (subscriptions) {
subscriptions.push(subscription);
}
else {
this._subscriptions = [subscription];
}
}
return subscription;
};
Subscription.prototype.remove = function (subscription) {
var subscriptions = this._subscriptions;
if (subscriptions) {
var subscriptionIndex = subscriptions.indexOf(subscription);
if (subscriptionIndex !== -1) {
subscriptions.splice(subscriptionIndex, 1);
}
}
};
Subscription.prototype._addParent = function (parent) {
var _a = this, _parent = _a._parent, _parents = _a._parents;
if (_parent === parent) {
return false;
}
else if (!_parent) {
this._parent = parent;
return true;
}
else if (!_parents) {
this._parents = [parent];
return true;
}
else if (_parents.indexOf(parent) === -1) {
_parents.push(parent);
return true;
}
return false;
};
return Subscription;
}());
Subscription.EMPTY = (function (empty) {
empty.closed = true;
return empty;
}(new Subscription()));
function flattenUnsubscriptionErrors(errors) {
return errors.reduce(function (errs, err) { return errs.concat((err instanceof UnsubscriptionError) ? err.errors : err); }, []);
}
var rxSubscriber = typeof Symbol === 'function'
? Symbol('rxSubscriber')
: '@@rxSubscriber_' + Math.random();
var Subscriber = /** @class */ (function (_super) {
__extends(Subscriber, _super);
function Subscriber(destinationOrNext, error, complete) {
var _this = _super.call(this) || this;
_this.syncErrorValue = null;
_this.syncErrorThrown = false;
_this.syncErrorThrowable = false;
_this.isStopped = false;
switch (arguments.length) {
case 0:
_this.destination = empty;
break;
case 1:
if (!destinationOrNext) {
_this.destination = empty;
break;
}
if (typeof destinationOrNext === 'object') {
if (destinationOrNext instanceof Subscriber) {
_this.syncErrorThrowable = destinationOrNext.syncErrorThrowable;
_this.destination = destinationOrNext;
destinationOrNext.add(_this);
}
else {
_this.syncErrorThrowable = true;
_this.destination = new SafeSubscriber(_this, destinationOrNext);
}
break;
}
default:
_this.syncErrorThrowable = true;
_this.destination = new SafeSubscriber(_this, destinationOrNext, error, complete);
break;
}
return _this;
}
Subscriber.prototype[rxSubscriber] = function () { return this; };
Subscriber.create = function (next, error, complete) {
var subscriber = new Subscriber(next, error, complete);
subscriber.syncErrorThrowable = false;
return subscriber;
};
Subscriber.prototype.next = function (value) {
if (!this.isStopped) {
this._next(value);
}
};
Subscriber.prototype.error = function (err) {
if (!this.isStopped) {
this.isStopped = true;
this._error(err);
}
};
Subscriber.prototype.complete = function () {
if (!this.isStopped) {
this.isStopped = true;
this._complete();
}
};
Subscriber.prototype.unsubscribe = function () {
if (this.closed) {
return;
}
this.isStopped = true;
_super.prototype.unsubscribe.call(this);
};
Subscriber.prototype._next = function (value) {
this.destination.next(value);
};
Subscriber.prototype._error = function (err) {
this.destination.error(err);
this.unsubscribe();
};
Subscriber.prototype._complete = function () {
this.destination.complete();
this.unsubscribe();
};
Subscriber.prototype._unsubscribeAndRecycle = function () {
var _a = this, _parent = _a._parent, _parents = _a._parents;
this._parent = null;
this._parents = null;
this.unsubscribe();
this.closed = false;
this.isStopped = false;
this._parent = _parent;
this._parents = _parents;
return this;
};
return Subscriber;
}(Subscription));
var SafeSubscriber = /** @class */ (function (_super) {
__extends(SafeSubscriber, _super);
function SafeSubscriber(_parentSubscriber, observerOrNext, error, complete) {
var _this = _super.call(this) || this;
_this._parentSubscriber = _parentSubscriber;
var next;
var context = _this;
if (isFunction(observerOrNext)) {
next = observerOrNext;
}
else if (observerOrNext) {
next = observerOrNext.next;
error = observerOrNext.error;
complete = observerOrNext.complete;
if (observerOrNext !== empty) {
context = Object.create(observerOrNext);
if (isFunction(context.unsubscribe)) {
_this.add(context.unsubscribe.bind(context));
}
context.unsubscribe = _this.unsubscribe.bind(_this);
}
}
_this._context = context;
_this._next = next;
_this._error = error;
_this._complete = complete;
return _this;
}
SafeSubscriber.prototype.next = function (value) {
if (!this.isStopped && this._next) {
var _parentSubscriber = this._parentSubscriber;
if (!config.useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
this.__tryOrUnsub(this._next, value);
}
else if (this.__tryOrSetError(_parentSubscriber, this._next, value)) {
this.unsubscribe();
}
}
};
SafeSubscriber.prototype.error = function (err) {
if (!this.isStopped) {
var _parentSubscriber = this._parentSubscriber;
var useDeprecatedSynchronousErrorHandling = config.useDeprecatedSynchronousErrorHandling;
if (this._error) {
if (!useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
this.__tryOrUnsub(this._error, err);
this.unsubscribe();
}
else {
this.__tryOrSetError(_parentSubscriber, this._error, err);
this.unsubscribe();
}
}
else if (!_parentSubscriber.syncErrorThrowable) {
this.unsubscribe();
if (useDeprecatedSynchronousErrorHandling) {
throw err;
}
hostReportError(err);
}
else {
if (useDeprecatedSynchronousErrorHandling) {
_parentSubscriber.syncErrorValue = err;
_parentSubscriber.syncErrorThrown = true;
}
else {
hostReportError(err);
}
this.unsubscribe();
}
}
};
SafeSubscriber.prototype.complete = function () {
var _this = this;
if (!this.isStopped) {
var _parentSubscriber = this._parentSubscriber;
if (this._complete) {
var wrappedComplete = function () { return _this._complete.call(_this._context); };
if (!config.useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
this.__tryOrUnsub(wrappedComplete);
this.unsubscribe();
}
else {
this.__tryOrSetError(_parentSubscriber, wrappedComplete);
this.unsubscribe();
}
}
else {
this.unsubscribe();
}
}
};
SafeSubscriber.prototype.__tryOrUnsub = function (fn, value) {
try {
fn.call(this._context, value);
}
catch (err) {
this.unsubscribe();
if (config.useDeprecatedSynchronousErrorHandling) {
throw err;
}
else {
hostReportError(err);
}
}
};
SafeSubscriber.prototype.__tryOrSetError = function (parent, fn, value) {
if (!config.useDeprecatedSynchronousErrorHandling) {
throw new Error('bad call');
}
try {
fn.call(this._context, value);
}
catch (err) {
if (config.useDeprecatedSynchronousErrorHandling) {
parent.syncErrorValue = err;
parent.syncErrorThrown = true;
return true;
}
else {
hostReportError(err);
return true;
}
}
return false;
};
SafeSubscriber.prototype._unsubscribe = function () {
var _parentSubscriber = this._parentSubscriber;
this._context = null;
this._parentSubscriber = null;
_parentSubscriber.unsubscribe();
};
return SafeSubscriber;
}(Subscriber));
function canReportError(observer) {
while (observer) {
var closed_1 = observer.closed, destination = observer.destination, isStopped = observer.isStopped;
if (closed_1 || isStopped) {
return false;
}
else if (destination && destination instanceof Subscriber) {
observer = destination;
}
else {
observer = null;
}
}
return true;
}
function toSubscriber(nextOrObserver, error, complete) {
if (nextOrObserver) {
if (nextOrObserver instanceof Subscriber) {
return nextOrObserver;
}
if (nextOrObserver[rxSubscriber]) {
return nextOrObserver[rxSubscriber]();
}
}
if (!nextOrObserver && !error && !complete) {
return new Subscriber(empty);
}
return new Subscriber(nextOrObserver, error, complete);
}
var observable = typeof Symbol === 'function' && Symbol.observable || '@@observable';
function noop() { }
function pipeFromArray(fns) {
if (!fns) {
return noop;
}
if (fns.length === 1) {
return fns[0];
}
return function piped(input) {
return fns.reduce(function (prev, fn) { return fn(prev); }, input);
};
}
var Observable = /** @class */ (function () {
function Observable(subscribe) {
this._isScalar = false;
if (subscribe) {
this._subscribe = subscribe;
}
}
Observable.prototype.lift = function (operator) {
var observable = new Observable();
observable.source = this;
observable.operator = operator;
return observable;
};
Observable.prototype.subscribe = function (observerOrNext, error, complete) {
var operator = this.operator;
var sink = toSubscriber(observerOrNext, error, complete);
if (operator) {
sink.add(operator.call(sink, this.source));
}
else {
sink.add(this.source || (config.useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ?
this._subscribe(sink) :
this._trySubscribe(sink));
}
if (config.useDeprecatedSynchronousErrorHandling) {
if (sink.syncErrorThrowable) {
sink.syncErrorThrowable = false;
if (sink.syncErrorThrown) {
throw sink.syncErrorValue;
}
}
}
return sink;
};
Observable.prototype._trySubscribe = function (sink) {
try {
return this._subscribe(sink);
}
catch (err) {
if (config.useDeprecatedSynchronousErrorHandling) {
sink.syncErrorThrown = true;
sink.syncErrorValue = err;
}
if (canReportError(sink)) {
sink.error(err);
}
else {
console.warn(err);
}
}
};
Observable.prototype.forEach = function (next, promiseCtor) {
var _this = this;
promiseCtor = getPromiseCtor(promiseCtor);
return new promiseCtor(function (resolve, reject) {
var subscription;
subscription = _this.subscribe(function (value) {
try {
next(value);
}
catch (err) {
reject(err);
if (subscription) {
subscription.unsubscribe();
}
}
}, reject, resolve);
});
};
Observable.prototype._subscribe = function (subscriber) {
var source = this.source;
return source && source.subscribe(subscriber);
};
Observable.prototype[observable] = function () {
return this;
};
Observable.prototype.pipe = function () {
var operations = [];
for (var _i = 0; _i < arguments.length; _i++) {
operations[_i] = arguments[_i];
}
if (operations.length === 0) {
return this;
}
return pipeFromArray(operations)(this);
};
Observable.prototype.toPromise = function (promiseCtor) {
var _this = this;
promiseCtor = getPromiseCtor(promiseCtor);
return new promiseCtor(function (resolve, reject) {
var value;
_this.subscribe(function (x) { return value = x; }, function (err) { return reject(err); }, function () { return resolve(value); });
});
};
return Observable;
}());
Observable.create = function (subscribe) {
return new Observable(subscribe);
};
function getPromiseCtor(promiseCtor) {
if (!promiseCtor) {
promiseCtor = Promise;
}
if (!promiseCtor) {
throw new Error('no Promise impl found');
}
return promiseCtor;
}
var SubjectSubscriber = /** @class */ (function (_super) {
__extends(SubjectSubscriber, _super);
function SubjectSubscriber(destination) {
var _this = _super.call(this, destination) || this;
_this.destination = destination;
return _this;
}
return SubjectSubscriber;
}(Subscriber));
function refCount() {
return function refCountOperatorFunction(source) {
return source.lift(new RefCountOperator(source));
};
}
var RefCountOperator = /** @class */ (function () {
function RefCountOperator(connectable) {
this.connectable = connectable;
}
RefCountOperator.prototype.call = function (subscriber, source) {
var connectable = this.connectable;
connectable._refCount++;
var refCounter = new RefCountSubscriber(subscriber, connectable);
var subscription = source.subscribe(refCounter);
if (!refCounter.closed) {
refCounter.connection = connectable.connect();
}
return subscription;
};
return RefCountOperator;
}());
var RefCountSubscriber = /** @class */ (function (_super) {
__extends(RefCountSubscriber, _super);
function RefCountSubscriber(destination, connectable) {
var _this = _super.call(this, destination) || this;
_this.connectable = connectable;
return _this;
}
RefCountSubscriber.prototype._unsubscribe = function () {
var connectable = this.connectable;
if (!connectable) {
this.connection = null;
return;
}
this.connectable = null;
var refCount = connectable._refCount;
if (refCount <= 0) {
this.connection = null;
return;
}
connectable._refCount = refCount - 1;
if (refCount > 1) {
this.connection = null;
return;
}
var connection = this.connection;
var sharedConnection = connectable._connection;
this.connection = null;
if (sharedConnection && (!connection || sharedConnection === connection)) {
sharedConnection.unsubscribe();
}
};
return RefCountSubscriber;
}(Subscriber));
var ConnectableObservable = /** @class */ (function (_super) {
__extends(ConnectableObservable, _super);
function ConnectableObservable(source, subjectFactory) {
var _this = _super.call(this) || this;
_this.source = source;
_this.subjectFactory = subjectFactory;
_this._refCount = 0;
_this._isComplete = false;
return _this;
}
ConnectableObservable.prototype._subscribe = function (subscriber) {
return this.getSubject().subscribe(subscriber);
};
ConnectableObservable.prototype.getSubject = function () {
var subject = this._subject;
if (!subject || subject.isStopped) {
this._subject = this.subjectFactory();
}
return this._subject;
};
ConnectableObservable.prototype.connect = function () {
var connection = this._connection;
if (!connection) {
this._isComplete = false;
connection = this._connection = new Subscription();
connection.add(this.source
.subscribe(new ConnectableSubscriber(this.getSubject(), this)));
if (connection.closed) {
this._connection = null;
connection = Subscription.EMPTY;
}
else {
this._connection = connection;
}
}
return connection;
};
ConnectableObservable.prototype.refCount = function () {
return refCount()(this);
};
return ConnectableObservable;
}(Observable));
var connectableProto = ConnectableObservable.prototype;
var connectableObservableDescriptor = {
operator: { value: null },
_refCount: { value: 0, writable: true },
_subject: { value: null, writable: true },
_connection: { value: null, writable: true },
_subscribe: { value: connectableProto._subscribe },
_isComplete: { value: connectableProto._isComplete, writable: true },
getSubject: { value: connectableProto.getSubject },
connect: { value: connectableProto.connect },
refCount: { value: connectableProto.refCount }
};
var ConnectableSubscriber = /** @class */ (function (_super) {
__extends(ConnectableSubscriber, _super);
function ConnectableSubscriber(destination, connectable) {
var _this = _super.call(this, destination) || this;
_this.connectable = connectable;
return _this;
}
ConnectableSubscriber.prototype._error = function (err) {
this._unsubscribe();
_super.prototype._error.call(this, err);
};
ConnectableSubscriber.prototype._complete = function () {
this.connectable._isComplete = true;
this._unsubscribe();
_super.prototype._complete.call(this);
};
ConnectableSubscriber.prototype._unsubscribe = function () {
var connectable = this.connectable;
if (connectable) {
this.connectable = null;
var connection = connectable._connection;
connectable._refCount = 0;
connectable._subject = null;
connectable._connection = null;
if (connection) {
connection.unsubscribe();
}
}
};
return ConnectableSubscriber;
}(SubjectSubscriber));
var Action = /** @class */ (function (_super) {
__extends(Action, _super);
function Action(scheduler, work) {
return _super.call(this) || this;
}
Action.prototype.schedule = function (state, delay) {
if (delay === void 0) { delay = 0; }
return this;
};
return Action;
}(Subscription));
var AsyncAction = /** @class */ (function (_super) {
__extends(AsyncAction, _super);
function AsyncAction(scheduler, work) {
var _this = _super.call(this, scheduler, work) || this;
_this.scheduler = scheduler;
_this.work = work;
_this.pending = false;
return _this;
}
AsyncAction.prototype.schedule = function (state, delay) {
if (delay === void 0) { delay = 0; }
if (this.closed) {
return this;
}
this.state = state;
var id = this.id;
var scheduler = this.scheduler;
if (id != null) {
this.id = this.recycleAsyncId(scheduler, id, delay);
}
this.pending = true;
this.delay = delay;
this.id = this.id || this.requestAsyncId(scheduler, this.id, delay);
return this;
};
AsyncAction.prototype.requestAsyncId = function (scheduler, id, delay) {
if (delay === void 0) { delay = 0; }
return setInterval(scheduler.flush.bind(scheduler, this), delay);
};
AsyncAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
if (delay === void 0) { delay = 0; }
if (delay !== null && this.delay === delay && this.pending === false) {
return id;
}
clearInterval(id);
return undefined;
};
AsyncAction.prototype.execute = function (state, delay) {
if (this.closed) {
return new Error('executing a cancelled action');
}
this.pending = false;
var error = this._execute(state, delay);
if (error) {
return error;
}
else if (this.pending === false && this.id != null) {
this.id = this.recycleAsyncId(this.scheduler, this.id, null);
}
};
AsyncAction.prototype._execute = function (state, delay) {
var errored = false;
var errorValue = undefined;
try {
this.work(state);
}
catch (e) {
errored = true;
errorValue = !!e && e || new Error(e);
}
if (errored) {
this.unsubscribe();
return errorValue;
}
};
AsyncAction.prototype._unsubscribe = function () {
var id = this.id;
var scheduler = this.scheduler;
var actions = scheduler.actions;
var index = actions.indexOf(this);
this.work = null;
this.state = null;
this.pending = false;
this.scheduler = null;
if (index !== -1) {
actions.splice(index, 1);
}
if (id != null) {
this.id = this.recycleAsyncId(scheduler, id, null);
}
this.delay = null;
};
return AsyncAction;
}(Action));
var QueueAction = /** @class */ (function (_super) {
__extends(QueueAction, _super);
function QueueAction(scheduler, work) {
var _this = _super.call(this, scheduler, work) || this;
_this.scheduler = scheduler;
_this.work = work;
return _this;
}
QueueAction.prototype.schedule = function (state, delay) {
if (delay === void 0) { delay = 0; }
if (delay > 0) {
return _super.prototype.schedule.call(this, state, delay);
}
this.delay = delay;
this.state = state;
this.scheduler.flush(this);
return this;
};
QueueAction.prototype.execute = function (state, delay) {
return (delay > 0 || this.closed) ?
_super.prototype.execute.call(this, state, delay) :
this._execute(state, delay);
};
QueueAction.prototype.requestAsyncId = function (scheduler, id, delay) {
if (delay === void 0) { delay = 0; }
if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
}
return scheduler.flush(this);
};
return QueueAction;
}(AsyncAction));
var Scheduler = /** @class */ (function () {
function Scheduler(SchedulerAction, now) {
if (now === void 0) { now = Scheduler.now; }
this.SchedulerAction = SchedulerAction;
this.now = now;
}
Scheduler.prototype.schedule = function (work, delay, state) {
if (delay === void 0) { delay = 0; }
return new this.SchedulerAction(this, work).schedule(state, delay);
};
return Scheduler;
}());
Scheduler.now = function () { return Date.now(); };
var AsyncScheduler = /** @class */ (function (_super) {
__extends(AsyncScheduler, _super);
function AsyncScheduler(SchedulerAction, now) {
if (now === void 0) { now = Scheduler.now; }
var _this = _super.call(this, SchedulerAction, function () {
if (AsyncScheduler.delegate && AsyncScheduler.delegate !== _this) {
return AsyncScheduler.delegate.now();
}
else {
return now();
}
}) || this;
_this.actions = [];
_this.active = false;
_this.scheduled = undefined;
return _this;
}
AsyncScheduler.prototype.schedule = function (work, delay, state) {
if (delay === void 0) { delay = 0; }
if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) {
return AsyncScheduler.delegate.schedule(work, delay, state);
}
else {
return _super.prototype.schedule.call(this, work, delay, state);
}
};
AsyncScheduler.prototype.flush = function (action) {
var actions = this.actions;
if (this.active) {
actions.push(action);
return;
}
var error;
this.active = true;
do {
if (error = action.execute(action.state, action.delay)) {
break;
}
} while (action = actions.shift());
this.active = false;
if (error) {
while (action = actions.shift()) {
action.unsubscribe();
}
throw error;
}
};
return AsyncScheduler;
}(Scheduler));
var QueueScheduler = /** @class */ (function (_super) {
__extends(QueueScheduler, _super);
function QueueScheduler() {
return _super !== null && _super.apply(this, arguments) || this;
}
return QueueScheduler;
}(AsyncScheduler));
var queue = new QueueScheduler(QueueAction);
var NotificationKind;
(function (NotificationKind) {
NotificationKind["NEXT"] = "N";
NotificationKind["ERROR"] = "E";
NotificationKind["COMPLETE"] = "C";
})(NotificationKind || (NotificationKind = {}));
var nextHandle = 1;
var tasksByHandle = {};
function runIfPresent(handle) {
var cb = tasksByHandle[handle];
if (cb) {
cb();
}
}
var Immediate = {
setImmediate: function (cb) {
var handle = nextHandle++;
tasksByHandle[handle] = cb;
Promise.resolve().then(function () { return runIfPresent(handle); });
return handle;
},
clearImmediate: function (handle) {
delete tasksByHandle[handle];
},
};
var AsapAction = /** @class */ (function (_super) {
__extends(AsapAction, _super);
function AsapAction(scheduler, work) {
var _this = _super.call(this, scheduler, work) || this;
_this.scheduler = scheduler;
_this.work = work;
return _this;
}
AsapAction.prototype.requestAsyncId = function (scheduler, id, delay) {
if (delay === void 0) { delay = 0; }
if (delay !== null && delay > 0) {
return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
}
scheduler.actions.push(this);
return scheduler.scheduled || (scheduler.scheduled = Immediate.setImmediate(scheduler.flush.bind(scheduler, null)));
};
AsapAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
if (delay === void 0) { delay = 0; }
if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
}
if (scheduler.actions.length === 0) {
Immediate.clearImmediate(id);
scheduler.scheduled = undefined;
}
return undefined;
};
return AsapAction;
}(AsyncAction));
var AsapScheduler = /** @class */ (function (_super) {
__extends(AsapScheduler, _super);
function AsapScheduler() {
return _super !== null && _super.apply(this, arguments) || this;
}
AsapScheduler.prototype.flush = function (action) {
this.active = true;
this.scheduled = undefined;
var actions = this.actions;
var error;
var index = -1;
var count = actions.length;
action = action || actions.shift();
do {
if (error = action.execute(action.state, action.delay)) {
break;
}
} while (++index < count && (action = actions.shift()));
this.active = false;
if (error) {
while (++index < count && (action = actions.shift())) {
action.unsubscribe();
}
throw error;
}
};
return AsapScheduler;
}(AsyncScheduler));
var asap = new AsapScheduler(AsapAction);
var async = new AsyncScheduler(AsyncAction);
var AnimationFrameAction = /** @class */ (function (_super) {
__extends(AnimationFrameAction, _super);
function AnimationFrameAction(scheduler, work) {
var _this = _super.call(this, scheduler, work) || this;
_this.scheduler = scheduler;
_this.work = work;
return _this;
}
AnimationFrameAction.prototype.requestAsyncId = function (scheduler, id, delay) {
if (delay === void 0) { delay = 0; }
if (delay !== null && delay > 0) {
return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
}
scheduler.actions.push(this);
return scheduler.scheduled || (scheduler.scheduled = requestAnimationFrame(function () { return scheduler.flush(null); }));
};
AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
if (delay === void 0) { delay = 0; }
if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
}
if (scheduler.actions.length === 0) {
cancelAnimationFrame(id);
scheduler.scheduled = undefined;
}
return undefined;
};
return AnimationFrameAction;
}(AsyncAction));
var AnimationFrameScheduler = /** @class */ (function (_super) {
__extends(AnimationFrameScheduler, _super);
function AnimationFrameScheduler() {
return _super !== null && _super.apply(this, arguments) || this;
}
AnimationFrameScheduler.prototype.flush = function (action) {
this.active = true;
this.scheduled = undefined;
var actions = this.actions;
var error;
var index = -1;
var count = actions.length;
action = action || actions.shift();
do {
if (error = action.execute(action.state, action.delay)) {
break;
}
} while (++index < count && (action = actions.shift()));
this.active = false;
if (error) {
while (++index < count && (action = actions.shift())) {
action.unsubscribe();
}
throw error;
}
};
return AnimationFrameScheduler;
}(AsyncScheduler));
var animationFrame = new AnimationFrameScheduler(AnimationFrameAction);
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
Zone.__load_patch('rxjs.Scheduler.now', function (global, Zone, api) {
api.patchMethod(Scheduler, 'now', function (delegate) { return function (self, args) {
return Date.now.call(self);
}; });
api.patchMethod(async, 'now', function (delegate) { return function (self, args) {
return Date.now.call(self);
}; });
api.patchMethod(asap, 'now', function (delegate) { return function (self, args) {
return Date.now.call(self);
}; });
});
}));
//# sourceMappingURL=zone_patch_rxjs_fake_async_rollup.umd.js.map

@@ -1,1 +0,20 @@

!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("rxjs")):"function"==typeof define&&define.amd?define(["rxjs"],e):e(n.rxjs)}(this,function(n){"use strict";Zone.__load_patch("rxjs.Scheduler.now",function(e,t,o){o.patchMethod(n.Scheduler,"now",function(n){return function(n,e){return Date.now.call(n)}}),o.patchMethod(n.asyncScheduler,"now",function(n){return function(n,e){return Date.now.call(n)}}),o.patchMethod(n.asapScheduler,"now",function(n){return function(n,e){return Date.now.call(n)}})})});
var __extends=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();
/**
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
/**
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
!function(t){"function"==typeof define&&define.amd?define(t):t()}(function(){"use strict";function t(t){return"function"==typeof t}var e=!1,n={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){var n=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+n.stack)}else e&&console.log("RxJS: Back to a better error behavior. Thank you. <3");e=t},get useDeprecatedSynchronousErrorHandling(){return e}};function r(t){setTimeout(function(){throw t})}var i={closed:!0,next:function(t){},error:function(t){if(n.useDeprecatedSynchronousErrorHandling)throw t;r(t)},complete:function(){}},o=Array.isArray||function(t){return t&&"number"==typeof t.length};function s(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(t,e){return e+1+") "+t.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this}s.prototype=Object.create(Error.prototype);var c=s,u=function(){function e(t){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}return e.prototype.unsubscribe=function(){var e,n=!1;if(!this.closed){var r=this._parent,i=this._parents,s=this._unsubscribe,u=this._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var l,a=-1,p=i?i.length:0;r;)r.remove(this),r=++a<p&&i[a]||null;if(t(s))try{s.call(this)}catch(t){n=!0,e=t instanceof c?h(t.errors):[t]}if(o(u))for(a=-1,p=u.length;++a<p;){var f=u[a];if(null!==(l=f)&&"object"==typeof l)try{f.unsubscribe()}catch(t){n=!0,e=e||[],t instanceof c?e=e.concat(h(t.errors)):e.push(t)}}if(n)throw new c(e)}},e.prototype.add=function(t){var n=t;switch(typeof t){case"function":n=new e(t);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof e)){var r=n;(n=new e)._subscriptions=[r]}break;default:if(!t)return e.EMPTY;throw new Error("unrecognized teardown "+t+" added to Subscription.")}if(n._addParent(this)){var i=this._subscriptions;i?i.push(n):this._subscriptions=[n]}return n},e.prototype.remove=function(t){var e=this._subscriptions;if(e){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}},e.prototype._addParent=function(t){var e=this._parent,n=this._parents;return e!==t&&(e?n?-1===n.indexOf(t)&&(n.push(t),!0):(this._parents=[t],!0):(this._parent=t,!0))},e}();function h(t){return t.reduce(function(t,e){return t.concat(e instanceof c?e.errors:e)},[])}u.EMPTY=function(t){return t.closed=!0,t}(new u);var l="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),a=function(t){function e(n,r,o){var s=t.call(this)||this;switch(s.syncErrorValue=null,s.syncErrorThrown=!1,s.syncErrorThrowable=!1,s.isStopped=!1,arguments.length){case 0:s.destination=i;break;case 1:if(!n){s.destination=i;break}if("object"==typeof n){n instanceof e?(s.syncErrorThrowable=n.syncErrorThrowable,s.destination=n,n.add(s)):(s.syncErrorThrowable=!0,s.destination=new p(s,n));break}default:s.syncErrorThrowable=!0,s.destination=new p(s,n,r,o)}return s}return __extends(e,t),e.prototype[l]=function(){return this},e.create=function(t,n,r){var i=new e(t,n,r);return i.syncErrorThrowable=!1,i},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parent,e=this._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=t,this._parents=e,this},e}(u),p=function(e){function o(n,r,o,s){var c,u=e.call(this)||this;u._parentSubscriber=n;var h=u;return t(r)?c=r:r&&(c=r.next,o=r.error,s=r.complete,r!==i&&(t((h=Object.create(r)).unsubscribe)&&u.add(h.unsubscribe.bind(h)),h.unsubscribe=u.unsubscribe.bind(u))),u._context=h,u._next=c,u._error=o,u._complete=s,u}return __extends(o,e),o.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;n.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},o.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,i=n.useDeprecatedSynchronousErrorHandling;if(this._error)i&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)i?(e.syncErrorValue=t,e.syncErrorThrown=!0):r(t),this.unsubscribe();else{if(this.unsubscribe(),i)throw t;r(t)}}},o.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var r=function(){return t._complete.call(t._context)};n.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,r),this.unsubscribe()):(this.__tryOrUnsub(r),this.unsubscribe())}else this.unsubscribe()}},o.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),n.useDeprecatedSynchronousErrorHandling)throw t;r(t)}},o.prototype.__tryOrSetError=function(t,e,i){if(!n.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,i)}catch(e){return n.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):(r(e),!0)}return!1},o.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},o}(a),f="function"==typeof Symbol&&Symbol.observable||"@@observable";function d(){}var b=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,r){var o=this.operator,s=function c(t,e,n){if(t){if(t instanceof a)return t;if(t[l])return t[l]()}return t||e||n?new a(t,e,n):new a(i)}(t,e,r);if(s.add(o?o.call(s,this.source):this.source||n.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),n.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){n.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),function e(t){for(;t;){var e=t.destination;if(t.closed||t.isStopped)return!1;t=e&&e instanceof a?e:null}return!0}(t)?t.error(e):console.warn(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=y(e))(function(e,r){var i;i=n.subscribe(function(e){try{t(e)}catch(t){r(t),i&&i.unsubscribe()}},r,e)})},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[f]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:function n(t){return t?1===t.length?t[0]:function e(n){return t.reduce(function(t,e){return e(t)},n)}:d}(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=y(t))(function(t,n){var r;e.subscribe(function(t){return r=t},function(t){return n(t)},function(){return t(r)})})},t}();function y(t){if(t||(t=Promise),!t)throw new Error("no Promise impl found");return t}b.create=function(t){return new b(t)};var _=function(t){function e(e){var n=t.call(this,e)||this;return n.destination=e,n}return __extends(e,t),e}(a),v=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var r=new w(t,n),i=e.subscribe(r);return r.closed||(r.connection=n.connect()),i},t}(),w=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return __extends(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var n=this.connection,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},e}(a),E=(function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}__extends(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new u).add(this.source.subscribe(new E(this.getSubject(),this))),t.closed?(this._connection=null,t=u.EMPTY):this._connection=t),t},e.prototype.refCount=function(){return function t(){return function t(e){return e.lift(new v(e))}}()(this)}}(b),function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return __extends(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(_)),S=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return __extends(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n=!1,r=void 0;try{this.work(t)}catch(t){n=!0,r=!!t&&t||new Error(t)}if(n)return this.unsubscribe(),r},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,n=e.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},e}(function(t){function e(e,n){return t.call(this)||this}return __extends(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(u)),x=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return __extends(e,t),e.prototype.schedule=function(e,n){return void 0===n&&(n=0),n>0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,r):e.flush(this)},e}(S),g=function(){function t(e,n){void 0===n&&(n=t.now),this.SchedulerAction=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(n,e)},t}();g.now=function(){return Date.now()};var m,T=function(t){function e(n,r){void 0===r&&(r=g.now);var i=t.call(this,n,function(){return e.delegate&&e.delegate!==i?e.delegate.now():r()})||this;return i.actions=[],i.active=!1,i.scheduled=void 0,i}return __extends(e,t),e.prototype.schedule=function(n,r,i){return void 0===r&&(r=0),e.delegate&&e.delegate!==this?e.delegate.schedule(n,r,i):t.prototype.schedule.call(this,n,r,i)},e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(g);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e}(T))(x),function(t){t.NEXT="N",t.ERROR="E",t.COMPLETE="C"}(m||(m={}));var A=1,O={},j=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return __extends(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=(i=e.flush.bind(e,null),o=A++,O[o]=i,Promise.resolve().then(function(){return function t(e){var n=O[e];n&&n()}(o)}),o)));var i,o},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(delete O[n],e.scheduled=void 0)},e}(S),D=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,i=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++r<i&&(t=n.shift()));if(this.active=!1,e){for(;++r<i&&(t=n.shift());)t.unsubscribe();throw e}},e}(T))(j),I=new T(S),k=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return __extends(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame(function(){return e.flush(null)})))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(cancelAnimationFrame(n),e.scheduled=void 0)},e}(S);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,i=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++r<i&&(t=n.shift()));if(this.active=!1,e){for(;++r<i&&(t=n.shift());)t.unsubscribe();throw e}},e}(T))(k),
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
Zone.__load_patch("rxjs.Scheduler.now",function(t,e,n){n.patchMethod(g,"now",function(t){return function(t,e){return Date.now.call(t)}}),n.patchMethod(I,"now",function(t){return function(t,e){return Date.now.call(t)}}),n.patchMethod(D,"now",function(t){return function(t,e){return Date.now.call(t)}})})});

@@ -0,188 +1,1242 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('rxjs')) :
typeof define === 'function' && define.amd ? define(['rxjs'], factory) :
(factory(global.rxjs));
}(this, (function (rxjs) { 'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
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;
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
}(function () {
'use strict';
function isFunction(x) {
return typeof x === 'function';
}
var _enable_super_gross_mode_that_will_cause_bad_things = false;
var config = {
Promise: undefined,
set useDeprecatedSynchronousErrorHandling(value) {
if (value) {
var error = new Error();
console.warn('DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n' + error.stack);
}
else if (_enable_super_gross_mode_that_will_cause_bad_things) {
console.log('RxJS: Back to a better error behavior. Thank you. <3');
}
_enable_super_gross_mode_that_will_cause_bad_things = value;
},
get useDeprecatedSynchronousErrorHandling() {
return _enable_super_gross_mode_that_will_cause_bad_things;
},
};
function hostReportError(err) {
setTimeout(function () { throw err; });
}
var empty = {
closed: true,
next: function (value) { },
error: function (err) {
if (config.useDeprecatedSynchronousErrorHandling) {
throw err;
}
else {
hostReportError(err);
}
},
complete: function () { }
};
var isArray = Array.isArray || (function (x) { return x && typeof x.length === 'number'; });
function isObject(x) {
return x !== null && typeof x === 'object';
}
function UnsubscriptionErrorImpl(errors) {
Error.call(this);
this.message = errors ?
errors.length + " errors occurred during unsubscription:\n" + errors.map(function (err, i) { return i + 1 + ") " + err.toString(); }).join('\n ') : '';
this.name = 'UnsubscriptionError';
this.errors = errors;
return this;
}
UnsubscriptionErrorImpl.prototype = Object.create(Error.prototype);
var UnsubscriptionError = UnsubscriptionErrorImpl;
var Subscription = /** @class */ (function () {
function Subscription(unsubscribe) {
this.closed = false;
this._parent = null;
this._parents = null;
this._subscriptions = null;
if (unsubscribe) {
this._unsubscribe = unsubscribe;
}
}
Subscription.prototype.unsubscribe = function () {
var hasErrors = false;
var errors;
if (this.closed) {
return;
}
var _a = this, _parent = _a._parent, _parents = _a._parents, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions;
this.closed = true;
this._parent = null;
this._parents = null;
this._subscriptions = null;
var index = -1;
var len = _parents ? _parents.length : 0;
while (_parent) {
_parent.remove(this);
_parent = ++index < len && _parents[index] || null;
}
if (isFunction(_unsubscribe)) {
try {
_unsubscribe.call(this);
}
},
_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;
this._zoneSubscribe = function () {
if (this._zone && this._zone !== Zone.current) {
var tearDown_1 = this._zone.run(subscribe, this, arguments);
if (tearDown_1 && 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);
};
catch (e) {
hasErrors = true;
errors = e instanceof UnsubscriptionError ? flattenUnsubscriptionErrors(e.errors) : [e];
}
}
if (isArray(_subscriptions)) {
index = -1;
len = _subscriptions.length;
while (++index < len) {
var sub = _subscriptions[index];
if (isObject(sub)) {
try {
sub.unsubscribe();
}
catch (e) {
hasErrors = true;
errors = errors || [];
if (e instanceof UnsubscriptionError) {
errors = errors.concat(flattenUnsubscriptionErrors(e.errors));
}
return tearDown_1;
else {
errors.push(e);
}
}
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);
}
if (hasErrors) {
throw new UnsubscriptionError(errors);
}
};
Subscription.prototype.add = function (teardown) {
var subscription = teardown;
switch (typeof teardown) {
case 'function':
subscription = new Subscription(teardown);
case 'object':
if (subscription === this || subscription.closed || typeof subscription.unsubscribe !== 'function') {
return subscription;
}
else if (this.closed) {
subscription.unsubscribe();
return subscription;
}
else if (!(subscription instanceof Subscription)) {
var tmp = subscription;
subscription = new Subscription();
subscription._subscriptions = [tmp];
}
break;
default: {
if (!teardown) {
return Subscription.EMPTY;
}
throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.');
}
}
if (subscription._addParent(this)) {
var subscriptions = this._subscriptions;
if (subscriptions) {
subscriptions.push(subscription);
}
else {
this._subscriptions = [subscription];
}
}
return subscription;
};
Subscription.prototype.remove = function (subscription) {
var subscriptions = this._subscriptions;
if (subscriptions) {
var subscriptionIndex = subscriptions.indexOf(subscription);
if (subscriptionIndex !== -1) {
subscriptions.splice(subscriptionIndex, 1);
}
}
};
Subscription.prototype._addParent = function (parent) {
var _a = this, _parent = _a._parent, _parents = _a._parents;
if (_parent === parent) {
return false;
}
else if (!_parent) {
this._parent = parent;
return true;
}
else if (!_parents) {
this._parents = [parent];
return true;
}
else if (_parents.indexOf(parent) === -1) {
_parents.push(parent);
return true;
}
return false;
};
return Subscription;
}());
Subscription.EMPTY = (function (empty) {
empty.closed = true;
return empty;
}(new Subscription()));
function flattenUnsubscriptionErrors(errors) {
return errors.reduce(function (errs, err) { return errs.concat((err instanceof UnsubscriptionError) ? err.errors : err); }, []);
}
var rxSubscriber = typeof Symbol === 'function'
? Symbol('rxSubscriber')
: '@@rxSubscriber_' + Math.random();
var Subscriber = /** @class */ (function (_super) {
__extends(Subscriber, _super);
function Subscriber(destinationOrNext, error, complete) {
var _this = _super.call(this) || this;
_this.syncErrorValue = null;
_this.syncErrorThrown = false;
_this.syncErrorThrowable = false;
_this.isStopped = false;
switch (arguments.length) {
case 0:
_this.destination = empty;
break;
case 1:
if (!destinationOrNext) {
_this.destination = empty;
break;
}
if (typeof destinationOrNext === 'object') {
if (destinationOrNext instanceof Subscriber) {
_this.syncErrorThrowable = destinationOrNext.syncErrorThrowable;
_this.destination = destinationOrNext;
destinationOrNext.add(_this);
}
return factory.apply(this, arguments);
};
else {
_this.syncErrorThrowable = true;
_this.destination = new SafeSubscriber(_this, destinationOrNext);
}
break;
}
default:
_this.syncErrorThrowable = true;
_this.destination = new SafeSubscriber(_this, destinationOrNext, error, complete);
break;
}
return _this;
}
Subscriber.prototype[rxSubscriber] = function () { return this; };
Subscriber.create = function (next, error, complete) {
var subscriber = new Subscriber(next, error, complete);
subscriber.syncErrorThrowable = false;
return subscriber;
};
Subscriber.prototype.next = function (value) {
if (!this.isStopped) {
this._next(value);
}
};
Subscriber.prototype.error = function (err) {
if (!this.isStopped) {
this.isStopped = true;
this._error(err);
}
};
Subscriber.prototype.complete = function () {
if (!this.isStopped) {
this.isStopped = true;
this._complete();
}
};
Subscriber.prototype.unsubscribe = function () {
if (this.closed) {
return;
}
this.isStopped = true;
_super.prototype.unsubscribe.call(this);
};
Subscriber.prototype._next = function (value) {
this.destination.next(value);
};
Subscriber.prototype._error = function (err) {
this.destination.error(err);
this.unsubscribe();
};
Subscriber.prototype._complete = function () {
this.destination.complete();
this.unsubscribe();
};
Subscriber.prototype._unsubscribeAndRecycle = function () {
var _a = this, _parent = _a._parent, _parents = _a._parents;
this._parent = null;
this._parents = null;
this.unsubscribe();
this.closed = false;
this.isStopped = false;
this._parent = _parent;
this._parents = _parents;
return this;
};
return Subscriber;
}(Subscription));
var SafeSubscriber = /** @class */ (function (_super) {
__extends(SafeSubscriber, _super);
function SafeSubscriber(_parentSubscriber, observerOrNext, error, complete) {
var _this = _super.call(this) || this;
_this._parentSubscriber = _parentSubscriber;
var next;
var context = _this;
if (isFunction(observerOrNext)) {
next = observerOrNext;
}
else if (observerOrNext) {
next = observerOrNext.next;
error = observerOrNext.error;
complete = observerOrNext.complete;
if (observerOrNext !== empty) {
context = Object.create(observerOrNext);
if (isFunction(context.unsubscribe)) {
_this.add(context.unsubscribe.bind(context));
}
context.unsubscribe = _this.unsubscribe.bind(_this);
}
}
});
};
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);
_this._context = context;
_this._next = next;
_this._error = error;
_this._complete = complete;
return _this;
}
SafeSubscriber.prototype.next = function (value) {
if (!this.isStopped && this._next) {
var _parentSubscriber = this._parentSubscriber;
if (!config.useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
this.__tryOrUnsub(this._next, value);
}
return operatorDelegate.apply(operatorSelf, operatorArgs);
}; });
else if (this.__tryOrSetError(_parentSubscriber, this._next, value)) {
this.unsubscribe();
}
}
};
SafeSubscriber.prototype.error = function (err) {
if (!this.isStopped) {
var _parentSubscriber = this._parentSubscriber;
var useDeprecatedSynchronousErrorHandling = config.useDeprecatedSynchronousErrorHandling;
if (this._error) {
if (!useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
this.__tryOrUnsub(this._error, err);
this.unsubscribe();
}
else {
this.__tryOrSetError(_parentSubscriber, this._error, err);
this.unsubscribe();
}
}
else if (!_parentSubscriber.syncErrorThrowable) {
this.unsubscribe();
if (useDeprecatedSynchronousErrorHandling) {
throw err;
}
hostReportError(err);
}
else {
if (useDeprecatedSynchronousErrorHandling) {
_parentSubscriber.syncErrorValue = err;
_parentSubscriber.syncErrorThrown = true;
}
else {
hostReportError(err);
}
this.unsubscribe();
}
}
};
SafeSubscriber.prototype.complete = function () {
var _this = this;
if (!this.isStopped) {
var _parentSubscriber = this._parentSubscriber;
if (this._complete) {
var wrappedComplete = function () { return _this._complete.call(_this._context); };
if (!config.useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
this.__tryOrUnsub(wrappedComplete);
this.unsubscribe();
}
else {
this.__tryOrSetError(_parentSubscriber, wrappedComplete);
this.unsubscribe();
}
}
else {
this.unsubscribe();
}
}
};
SafeSubscriber.prototype.__tryOrUnsub = function (fn, value) {
try {
fn.call(this._context, value);
}
catch (err) {
this.unsubscribe();
if (config.useDeprecatedSynchronousErrorHandling) {
throw err;
}
else {
hostReportError(err);
}
}
};
SafeSubscriber.prototype.__tryOrSetError = function (parent, fn, value) {
if (!config.useDeprecatedSynchronousErrorHandling) {
throw new Error('bad call');
}
try {
fn.call(this._context, value);
}
catch (err) {
if (config.useDeprecatedSynchronousErrorHandling) {
parent.syncErrorValue = err;
parent.syncErrorThrown = true;
return true;
}
else {
hostReportError(err);
return true;
}
}
return false;
};
SafeSubscriber.prototype._unsubscribe = function () {
var _parentSubscriber = this._parentSubscriber;
this._context = null;
this._parentSubscriber = null;
_parentSubscriber.unsubscribe();
};
return SafeSubscriber;
}(Subscriber));
function canReportError(observer) {
while (observer) {
var closed_1 = observer.closed, destination = observer.destination, isStopped = observer.isStopped;
if (closed_1 || isStopped) {
return false;
}
else if (destination && destination instanceof Subscriber) {
observer = destination;
}
else {
observer = null;
}
}
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) {
return this._zoneUnsubscribe;
return true;
}
function toSubscriber(nextOrObserver, error, complete) {
if (nextOrObserver) {
if (nextOrObserver instanceof Subscriber) {
return nextOrObserver;
}
if (nextOrObserver[rxSubscriber]) {
return nextOrObserver[rxSubscriber]();
}
}
if (!nextOrObserver && !error && !complete) {
return new Subscriber(empty);
}
return new Subscriber(nextOrObserver, error, complete);
}
var observable = typeof Symbol === 'function' && Symbol.observable || '@@observable';
function noop() { }
function pipeFromArray(fns) {
if (!fns) {
return noop;
}
if (fns.length === 1) {
return fns[0];
}
return function piped(input) {
return fns.reduce(function (prev, fn) { return fn(prev); }, input);
};
}
var Observable = /** @class */ (function () {
function Observable(subscribe) {
this._isScalar = false;
if (subscribe) {
this._subscribe = subscribe;
}
}
Observable.prototype.lift = function (operator) {
var observable = new Observable();
observable.source = this;
observable.operator = operator;
return observable;
};
Observable.prototype.subscribe = function (observerOrNext, error, complete) {
var operator = this.operator;
var sink = toSubscriber(observerOrNext, error, complete);
if (operator) {
sink.add(operator.call(sink, this.source));
}
else {
sink.add(this.source || (config.useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ?
this._subscribe(sink) :
this._trySubscribe(sink));
}
if (config.useDeprecatedSynchronousErrorHandling) {
if (sink.syncErrorThrowable) {
sink.syncErrorThrowable = false;
if (sink.syncErrorThrown) {
throw sink.syncErrorValue;
}
var proto = Object.getPrototypeOf(this);
return proto && proto._unsubscribe;
},
set: function (unsubscribe) {
this._zone = Zone.current;
this._zoneUnsubscribe = function () {
if (this._zone && this._zone !== Zone.current) {
return this._zone.run(unsubscribe, this, arguments);
}
}
return sink;
};
Observable.prototype._trySubscribe = function (sink) {
try {
return this._subscribe(sink);
}
catch (err) {
if (config.useDeprecatedSynchronousErrorHandling) {
sink.syncErrorThrown = true;
sink.syncErrorValue = err;
}
if (canReportError(sink)) {
sink.error(err);
}
else {
console.warn(err);
}
}
};
Observable.prototype.forEach = function (next, promiseCtor) {
var _this = this;
promiseCtor = getPromiseCtor(promiseCtor);
return new promiseCtor(function (resolve, reject) {
var subscription;
subscription = _this.subscribe(function (value) {
try {
next(value);
}
catch (err) {
reject(err);
if (subscription) {
subscription.unsubscribe();
}
return unsubscribe.apply(this, arguments);
};
}
}, reject, resolve);
});
};
Observable.prototype._subscribe = function (subscriber) {
var source = this.source;
return source && source.subscribe(subscriber);
};
Observable.prototype[observable] = function () {
return this;
};
Observable.prototype.pipe = function () {
var operations = [];
for (var _i = 0; _i < arguments.length; _i++) {
operations[_i] = arguments[_i];
}
if (operations.length === 0) {
return this;
}
return pipeFromArray(operations)(this);
};
Observable.prototype.toPromise = function (promiseCtor) {
var _this = this;
promiseCtor = getPromiseCtor(promiseCtor);
return new promiseCtor(function (resolve, reject) {
var value;
_this.subscribe(function (x) { return value = x; }, function (err) { return reject(err); }, function () { return resolve(value); });
});
};
return Observable;
}());
Observable.create = function (subscribe) {
return new Observable(subscribe);
};
function getPromiseCtor(promiseCtor) {
if (!promiseCtor) {
promiseCtor = Promise;
}
if (!promiseCtor) {
throw new Error('no Promise impl found');
}
return promiseCtor;
}
var SubjectSubscriber = /** @class */ (function (_super) {
__extends(SubjectSubscriber, _super);
function SubjectSubscriber(destination) {
var _this = _super.call(this, destination) || this;
_this.destination = destination;
return _this;
}
return SubjectSubscriber;
}(Subscriber));
function refCount() {
return function refCountOperatorFunction(source) {
return source.lift(new RefCountOperator(source));
};
}
var RefCountOperator = /** @class */ (function () {
function RefCountOperator(connectable) {
this.connectable = connectable;
}
RefCountOperator.prototype.call = function (subscriber, source) {
var connectable = this.connectable;
connectable._refCount++;
var refCounter = new RefCountSubscriber(subscriber, connectable);
var subscription = source.subscribe(refCounter);
if (!refCounter.closed) {
refCounter.connection = connectable.connect();
}
return subscription;
};
return RefCountOperator;
}());
var RefCountSubscriber = /** @class */ (function (_super) {
__extends(RefCountSubscriber, _super);
function RefCountSubscriber(destination, connectable) {
var _this = _super.call(this, destination) || this;
_this.connectable = connectable;
return _this;
}
RefCountSubscriber.prototype._unsubscribe = function () {
var connectable = this.connectable;
if (!connectable) {
this.connection = null;
return;
}
this.connectable = null;
var refCount = connectable._refCount;
if (refCount <= 0) {
this.connection = null;
return;
}
connectable._refCount = refCount - 1;
if (refCount > 1) {
this.connection = null;
return;
}
var connection = this.connection;
var sharedConnection = connectable._connection;
this.connection = null;
if (sharedConnection && (!connection || sharedConnection === connection)) {
sharedConnection.unsubscribe();
}
};
return RefCountSubscriber;
}(Subscriber));
var ConnectableObservable = /** @class */ (function (_super) {
__extends(ConnectableObservable, _super);
function ConnectableObservable(source, subjectFactory) {
var _this = _super.call(this) || this;
_this.source = source;
_this.subjectFactory = subjectFactory;
_this._refCount = 0;
_this._isComplete = false;
return _this;
}
ConnectableObservable.prototype._subscribe = function (subscriber) {
return this.getSubject().subscribe(subscriber);
};
ConnectableObservable.prototype.getSubject = function () {
var subject = this._subject;
if (!subject || subject.isStopped) {
this._subject = this.subjectFactory();
}
return this._subject;
};
ConnectableObservable.prototype.connect = function () {
var connection = this._connection;
if (!connection) {
this._isComplete = false;
connection = this._connection = new Subscription();
connection.add(this.source
.subscribe(new ConnectableSubscriber(this.getSubject(), this)));
if (connection.closed) {
this._connection = null;
connection = Subscription.EMPTY;
}
else {
this._connection = connection;
}
}
});
return connection;
};
ConnectableObservable.prototype.refCount = function () {
return refCount()(this);
};
return ConnectableObservable;
}(Observable));
var connectableProto = ConnectableObservable.prototype;
var connectableObservableDescriptor = {
operator: { value: null },
_refCount: { value: 0, writable: true },
_subject: { value: null, writable: true },
_connection: { value: null, writable: true },
_subscribe: { value: connectableProto._subscribe },
_isComplete: { value: connectableProto._isComplete, writable: true },
getSubject: { value: connectableProto.getSubject },
connect: { value: connectableProto.connect },
refCount: { value: connectableProto.refCount }
};
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;
var ConnectableSubscriber = /** @class */ (function (_super) {
__extends(ConnectableSubscriber, _super);
function ConnectableSubscriber(destination, connectable) {
var _this = _super.call(this, destination) || this;
_this.connectable = connectable;
return _this;
}
ConnectableSubscriber.prototype._error = function (err) {
this._unsubscribe();
_super.prototype._error.call(this, err);
};
ConnectableSubscriber.prototype._complete = function () {
this.connectable._isComplete = true;
this._unsubscribe();
_super.prototype._complete.call(this);
};
ConnectableSubscriber.prototype._unsubscribe = function () {
var connectable = this.connectable;
if (connectable) {
this.connectable = null;
var connection = connectable._connection;
connectable._refCount = 0;
connectable._subject = null;
connectable._connection = null;
if (connection) {
connection.unsubscribe();
}
}
});
// 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);
};
return ConnectableSubscriber;
}(SubjectSubscriber));
var Action = /** @class */ (function (_super) {
__extends(Action, _super);
function Action(scheduler, work) {
return _super.call(this) || this;
}
Action.prototype.schedule = function (state, delay) {
if (delay === void 0) { delay = 0; }
return this;
};
return Action;
}(Subscription));
var AsyncAction = /** @class */ (function (_super) {
__extends(AsyncAction, _super);
function AsyncAction(scheduler, work) {
var _this = _super.call(this, scheduler, work) || this;
_this.scheduler = scheduler;
_this.work = work;
_this.pending = false;
return _this;
}
AsyncAction.prototype.schedule = function (state, delay) {
if (delay === void 0) { delay = 0; }
if (this.closed) {
return this;
}
else {
return next.apply(this, arguments);
this.state = state;
var id = this.id;
var scheduler = this.scheduler;
if (id != null) {
this.id = this.recycleAsyncId(scheduler, id, delay);
}
this.pending = true;
this.delay = delay;
this.id = this.id || this.requestAsyncId(scheduler, this.id, delay);
return this;
};
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);
AsyncAction.prototype.requestAsyncId = function (scheduler, id, delay) {
if (delay === void 0) { delay = 0; }
return setInterval(scheduler.flush.bind(scheduler, this), delay);
};
AsyncAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
if (delay === void 0) { delay = 0; }
if (delay !== null && this.delay === delay && this.pending === false) {
return id;
}
else {
return error.apply(this, arguments);
clearInterval(id);
return undefined;
};
AsyncAction.prototype.execute = function (state, delay) {
if (this.closed) {
return new Error('executing a cancelled action');
}
this.pending = false;
var error = this._execute(state, delay);
if (error) {
return error;
}
else if (this.pending === false && this.id != null) {
this.id = this.recycleAsyncId(this.scheduler, this.id, null);
}
};
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);
AsyncAction.prototype._execute = function (state, delay) {
var errored = false;
var errorValue = undefined;
try {
this.work(state);
}
catch (e) {
errored = true;
errorValue = !!e && e || new Error(e);
}
if (errored) {
this.unsubscribe();
return errorValue;
}
};
AsyncAction.prototype._unsubscribe = function () {
var id = this.id;
var scheduler = this.scheduler;
var actions = scheduler.actions;
var index = actions.indexOf(this);
this.work = null;
this.state = null;
this.pending = false;
this.scheduler = null;
if (index !== -1) {
actions.splice(index, 1);
}
if (id != null) {
this.id = this.recycleAsyncId(scheduler, id, null);
}
this.delay = null;
};
return AsyncAction;
}(Action));
var QueueAction = /** @class */ (function (_super) {
__extends(QueueAction, _super);
function QueueAction(scheduler, work) {
var _this = _super.call(this, scheduler, work) || this;
_this.scheduler = scheduler;
_this.work = work;
return _this;
}
QueueAction.prototype.schedule = function (state, delay) {
if (delay === void 0) { delay = 0; }
if (delay > 0) {
return _super.prototype.schedule.call(this, state, delay);
}
this.delay = delay;
this.state = state;
this.scheduler.flush(this);
return this;
};
QueueAction.prototype.execute = function (state, delay) {
return (delay > 0 || this.closed) ?
_super.prototype.execute.call(this, state, delay) :
this._execute(state, delay);
};
QueueAction.prototype.requestAsyncId = function (scheduler, id, delay) {
if (delay === void 0) { delay = 0; }
if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
}
return scheduler.flush(this);
};
return QueueAction;
}(AsyncAction));
var Scheduler = /** @class */ (function () {
function Scheduler(SchedulerAction, now) {
if (now === void 0) { now = Scheduler.now; }
this.SchedulerAction = SchedulerAction;
this.now = now;
}
Scheduler.prototype.schedule = function (work, delay, state) {
if (delay === void 0) { delay = 0; }
return new this.SchedulerAction(this, work).schedule(state, delay);
};
return Scheduler;
}());
Scheduler.now = function () { return Date.now(); };
var AsyncScheduler = /** @class */ (function (_super) {
__extends(AsyncScheduler, _super);
function AsyncScheduler(SchedulerAction, now) {
if (now === void 0) { now = Scheduler.now; }
var _this = _super.call(this, SchedulerAction, function () {
if (AsyncScheduler.delegate && AsyncScheduler.delegate !== _this) {
return AsyncScheduler.delegate.now();
}
else {
return now();
}
}) || this;
_this.actions = [];
_this.active = false;
_this.scheduled = undefined;
return _this;
}
AsyncScheduler.prototype.schedule = function (work, delay, state) {
if (delay === void 0) { delay = 0; }
if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) {
return AsyncScheduler.delegate.schedule(work, delay, state);
}
else {
return complete.call(this);
return _super.prototype.schedule.call(this, work, delay, state);
}
};
AsyncScheduler.prototype.flush = function (action) {
var actions = this.actions;
if (this.active) {
actions.push(action);
return;
}
var error;
this.active = true;
do {
if (error = action.execute(action.state, action.delay)) {
break;
}
} while (action = actions.shift());
this.active = false;
if (error) {
while (action = actions.shift()) {
action.unsubscribe();
}
throw error;
}
};
return AsyncScheduler;
}(Scheduler));
var QueueScheduler = /** @class */ (function (_super) {
__extends(QueueScheduler, _super);
function QueueScheduler() {
return _super !== null && _super.apply(this, arguments) || this;
}
return QueueScheduler;
}(AsyncScheduler));
var queue = new QueueScheduler(QueueAction);
var NotificationKind;
(function (NotificationKind) {
NotificationKind["NEXT"] = "N";
NotificationKind["ERROR"] = "E";
NotificationKind["COMPLETE"] = "C";
})(NotificationKind || (NotificationKind = {}));
var nextHandle = 1;
var tasksByHandle = {};
function runIfPresent(handle) {
var cb = tasksByHandle[handle];
if (cb) {
cb();
}
}
var Immediate = {
setImmediate: function (cb) {
var handle = nextHandle++;
tasksByHandle[handle] = cb;
Promise.resolve().then(function () { return runIfPresent(handle); });
return handle;
},
clearImmediate: function (handle) {
delete tasksByHandle[handle];
},
};
patchObservable();
patchSubscription();
patchSubscriber();
});
})));
var AsapAction = /** @class */ (function (_super) {
__extends(AsapAction, _super);
function AsapAction(scheduler, work) {
var _this = _super.call(this, scheduler, work) || this;
_this.scheduler = scheduler;
_this.work = work;
return _this;
}
AsapAction.prototype.requestAsyncId = function (scheduler, id, delay) {
if (delay === void 0) { delay = 0; }
if (delay !== null && delay > 0) {
return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
}
scheduler.actions.push(this);
return scheduler.scheduled || (scheduler.scheduled = Immediate.setImmediate(scheduler.flush.bind(scheduler, null)));
};
AsapAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
if (delay === void 0) { delay = 0; }
if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
}
if (scheduler.actions.length === 0) {
Immediate.clearImmediate(id);
scheduler.scheduled = undefined;
}
return undefined;
};
return AsapAction;
}(AsyncAction));
var AsapScheduler = /** @class */ (function (_super) {
__extends(AsapScheduler, _super);
function AsapScheduler() {
return _super !== null && _super.apply(this, arguments) || this;
}
AsapScheduler.prototype.flush = function (action) {
this.active = true;
this.scheduled = undefined;
var actions = this.actions;
var error;
var index = -1;
var count = actions.length;
action = action || actions.shift();
do {
if (error = action.execute(action.state, action.delay)) {
break;
}
} while (++index < count && (action = actions.shift()));
this.active = false;
if (error) {
while (++index < count && (action = actions.shift())) {
action.unsubscribe();
}
throw error;
}
};
return AsapScheduler;
}(AsyncScheduler));
var asap = new AsapScheduler(AsapAction);
var async = new AsyncScheduler(AsyncAction);
var AnimationFrameAction = /** @class */ (function (_super) {
__extends(AnimationFrameAction, _super);
function AnimationFrameAction(scheduler, work) {
var _this = _super.call(this, scheduler, work) || this;
_this.scheduler = scheduler;
_this.work = work;
return _this;
}
AnimationFrameAction.prototype.requestAsyncId = function (scheduler, id, delay) {
if (delay === void 0) { delay = 0; }
if (delay !== null && delay > 0) {
return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
}
scheduler.actions.push(this);
return scheduler.scheduled || (scheduler.scheduled = requestAnimationFrame(function () { return scheduler.flush(null); }));
};
AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
if (delay === void 0) { delay = 0; }
if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
}
if (scheduler.actions.length === 0) {
cancelAnimationFrame(id);
scheduler.scheduled = undefined;
}
return undefined;
};
return AnimationFrameAction;
}(AsyncAction));
var AnimationFrameScheduler = /** @class */ (function (_super) {
__extends(AnimationFrameScheduler, _super);
function AnimationFrameScheduler() {
return _super !== null && _super.apply(this, arguments) || this;
}
AnimationFrameScheduler.prototype.flush = function (action) {
this.active = true;
this.scheduled = undefined;
var actions = this.actions;
var error;
var index = -1;
var count = actions.length;
action = action || actions.shift();
do {
if (error = action.execute(action.state, action.delay)) {
break;
}
} while (++index < count && (action = actions.shift()));
this.active = false;
if (error) {
while (++index < count && (action = actions.shift())) {
action.unsubscribe();
}
throw error;
}
};
return AnimationFrameScheduler;
}(AsyncScheduler));
var animationFrame = new AnimationFrameScheduler(AnimationFrameAction);
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
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 = Observable.prototype;
var _symbolSubscribe = symbol('_subscribe');
var _subscribe = ObservablePrototype[_symbolSubscribe] = ObservablePrototype._subscribe;
ObjectDefineProperties(Observable.prototype, {
_zone: { value: null, writable: true, configurable: true },
_zoneSource: { value: null, writable: true, configurable: true },
_zoneSubscribe: { value: null, writable: true, configurable: true },
source: {
configurable: true,
get: function () { return this._zoneSource; },
set: function (source) {
this._zone = Zone.current;
this._zoneSource = source;
}
},
_subscribe: {
configurable: true,
get: function () {
if (this._zoneSubscribe) {
return this._zoneSubscribe;
}
else if (this.constructor === Observable) {
return _subscribe;
}
var proto = Object.getPrototypeOf(this);
return proto && proto._subscribe;
},
set: function (subscribe) {
this._zone = Zone.current;
this._zoneSubscribe = function () {
if (this._zone && this._zone !== Zone.current) {
var tearDown_1 = this._zone.run(subscribe, this, arguments);
if (tearDown_1 && 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);
};
}
return tearDown_1;
}
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(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(Subscription.prototype, {
_zone: { value: null, writable: true, configurable: true },
_zoneUnsubscribe: { value: null, writable: true, configurable: true },
_unsubscribe: {
get: function () {
if (this._zoneUnsubscribe) {
return this._zoneUnsubscribe;
}
var proto = Object.getPrototypeOf(this);
return proto && proto._unsubscribe;
},
set: function (unsubscribe) {
this._zone = Zone.current;
this._zoneUnsubscribe = function () {
if (this._zone && this._zone !== Zone.current) {
return this._zone.run(unsubscribe, this, arguments);
}
return unsubscribe.apply(this, arguments);
};
}
}
});
};
var patchSubscriber = function () {
var next = Subscriber.prototype.next;
var error = Subscriber.prototype.error;
var complete = Subscriber.prototype.complete;
Object.defineProperty(Subscriber.prototype, 'destination', {
configurable: true,
get: function () { return this._zoneDestination; },
set: function (destination) {
this._zone = Zone.current;
this._zoneDestination = destination;
}
});
// patch Subscriber.next to make sure it run
// into SubscriptionZone
Subscriber.prototype.next = function () {
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);
}
};
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);
}
};
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();
});
}));
//# sourceMappingURL=zone_patch_rxjs_rollup.umd.js.map

@@ -1,1 +0,20 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("rxjs")):"function"==typeof define&&define.amd?define(["rxjs"],t):t(e.rxjs)}(this,function(e){"use strict";Zone.__load_patch("rxjs",function(t,r,n){var o=r.__symbol__,i=Object.defineProperties;n.patchMethod(e.Observable.prototype,"lift",function(e){return function(t,o){var i=e.apply(t,o);return i.operator&&(i.operator._zone=r.current,n.patchMethod(i.operator,"call",function(e){return function(t,n){return t._zone&&t._zone!==r.current?t._zone.run(e,t,n):e.apply(t,n)}})),i}});var u,s,c,b,a;u=e.Observable.prototype,s=u[o("_subscribe")]=u._subscribe,i(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=r.current,this._zoneSource=e}},_subscribe:{configurable:!0,get:function(){if(this._zoneSubscribe)return this._zoneSubscribe;if(this.constructor===e.Observable)return s;var t=Object.getPrototypeOf(this);return t&&t._subscribe},set:function(e){this._zone=r.current,this._zoneSubscribe=function(){if(this._zone&&this._zone!==r.current){var t=this._zone.run(e,this,arguments);if(t&&"function"==typeof t){var n=this._zone;return function(){return n!==r.current?n.run(t,this,arguments):t.apply(this,arguments)}}return t}return e.apply(this,arguments)}}},subjectFactory:{get:function(){return this._zoneSubjectFactory},set:function(e){var t=this._zone;this._zoneSubjectFactory=function(){return t&&t!==r.current?t.run(e,this,arguments):e.apply(this,arguments)}}}}),i(e.Subscription.prototype,{_zone:{value:null,writable:!0,configurable:!0},_zoneUnsubscribe:{value:null,writable:!0,configurable:!0},_unsubscribe:{get:function(){if(this._zoneUnsubscribe)return this._zoneUnsubscribe;var e=Object.getPrototypeOf(this);return e&&e._unsubscribe},set:function(e){this._zone=r.current,this._zoneUnsubscribe=function(){return this._zone&&this._zone!==r.current?this._zone.run(e,this,arguments):e.apply(this,arguments)}}}}),c=e.Subscriber.prototype.next,b=e.Subscriber.prototype.error,a=e.Subscriber.prototype.complete,Object.defineProperty(e.Subscriber.prototype,"destination",{configurable:!0,get:function(){return this._zoneDestination},set:function(e){this._zone=r.current,this._zoneDestination=e}}),e.Subscriber.prototype.next=function(){var e=r.current,t=this._zone;return t&&t!==e?t.run(c,this,arguments,"rxjs.Subscriber.next"):c.apply(this,arguments)},e.Subscriber.prototype.error=function(){var e=r.current,t=this._zone;return t&&t!==e?t.run(b,this,arguments,"rxjs.Subscriber.error"):b.apply(this,arguments)},e.Subscriber.prototype.complete=function(){var e=r.current,t=this._zone;return t&&t!==e?t.run(a,this,arguments,"rxjs.Subscriber.complete"):a.call(this)}})});
var __extends=this&&this.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();
/**
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
/**
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
!function(t){"function"==typeof define&&define.amd?define(t):t()}(function(){"use strict";function t(t){return"function"==typeof t}var e=!1,r={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){var r=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+r.stack)}else e&&console.log("RxJS: Back to a better error behavior. Thank you. <3");e=t},get useDeprecatedSynchronousErrorHandling(){return e}};function n(t){setTimeout(function(){throw t})}var i={closed:!0,next:function(t){},error:function(t){if(r.useDeprecatedSynchronousErrorHandling)throw t;n(t)},complete:function(){}},o=Array.isArray||function(t){return t&&"number"==typeof t.length};function s(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(t,e){return e+1+") "+t.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this}s.prototype=Object.create(Error.prototype);var u=s,c=function(){function e(t){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}return e.prototype.unsubscribe=function(){var e,r=!1;if(!this.closed){var n=this._parent,i=this._parents,s=this._unsubscribe,c=this._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var l,a=-1,p=i?i.length:0;n;)n.remove(this),n=++a<p&&i[a]||null;if(t(s))try{s.call(this)}catch(t){r=!0,e=t instanceof u?h(t.errors):[t]}if(o(c))for(a=-1,p=c.length;++a<p;){var f=c[a];if(null!==(l=f)&&"object"==typeof l)try{f.unsubscribe()}catch(t){r=!0,e=e||[],t instanceof u?e=e.concat(h(t.errors)):e.push(t)}}if(r)throw new u(e)}},e.prototype.add=function(t){var r=t;switch(typeof t){case"function":r=new e(t);case"object":if(r===this||r.closed||"function"!=typeof r.unsubscribe)return r;if(this.closed)return r.unsubscribe(),r;if(!(r instanceof e)){var n=r;(r=new e)._subscriptions=[n]}break;default:if(!t)return e.EMPTY;throw new Error("unrecognized teardown "+t+" added to Subscription.")}if(r._addParent(this)){var i=this._subscriptions;i?i.push(r):this._subscriptions=[r]}return r},e.prototype.remove=function(t){var e=this._subscriptions;if(e){var r=e.indexOf(t);-1!==r&&e.splice(r,1)}},e.prototype._addParent=function(t){var e=this._parent,r=this._parents;return e!==t&&(e?r?-1===r.indexOf(t)&&(r.push(t),!0):(this._parents=[t],!0):(this._parent=t,!0))},e}();function h(t){return t.reduce(function(t,e){return t.concat(e instanceof u?e.errors:e)},[])}c.EMPTY=function(t){return t.closed=!0,t}(new c);var l="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),a=function(t){function e(r,n,o){var s=t.call(this)||this;switch(s.syncErrorValue=null,s.syncErrorThrown=!1,s.syncErrorThrowable=!1,s.isStopped=!1,arguments.length){case 0:s.destination=i;break;case 1:if(!r){s.destination=i;break}if("object"==typeof r){r instanceof e?(s.syncErrorThrowable=r.syncErrorThrowable,s.destination=r,r.add(s)):(s.syncErrorThrowable=!0,s.destination=new p(s,r));break}default:s.syncErrorThrowable=!0,s.destination=new p(s,r,n,o)}return s}return __extends(e,t),e.prototype[l]=function(){return this},e.create=function(t,r,n){var i=new e(t,r,n);return i.syncErrorThrowable=!1,i},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parent,e=this._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=t,this._parents=e,this},e}(c),p=function(e){function o(r,n,o,s){var u,c=e.call(this)||this;c._parentSubscriber=r;var h=c;return t(n)?u=n:n&&(u=n.next,o=n.error,s=n.complete,n!==i&&(t((h=Object.create(n)).unsubscribe)&&c.add(h.unsubscribe.bind(h)),h.unsubscribe=c.unsubscribe.bind(c))),c._context=h,c._next=u,c._error=o,c._complete=s,c}return __extends(o,e),o.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;r.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},o.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,i=r.useDeprecatedSynchronousErrorHandling;if(this._error)i&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)i?(e.syncErrorValue=t,e.syncErrorThrown=!0):n(t),this.unsubscribe();else{if(this.unsubscribe(),i)throw t;n(t)}}},o.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};r.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},o.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),r.useDeprecatedSynchronousErrorHandling)throw t;n(t)}},o.prototype.__tryOrSetError=function(t,e,i){if(!r.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,i)}catch(e){return r.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):(n(e),!0)}return!1},o.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},o}(a),f="function"==typeof Symbol&&Symbol.observable||"@@observable";function b(){}var d=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(t,e,n){var o=this.operator,s=function u(t,e,r){if(t){if(t instanceof a)return t;if(t[l])return t[l]()}return t||e||r?new a(t,e,r):new a(i)}(t,e,n);if(s.add(o?o.call(s,this.source):this.source||r.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),r.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){r.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),function e(t){for(;t;){var e=t.destination;if(t.closed||t.isStopped)return!1;t=e&&e instanceof a?e:null}return!0}(t)?t.error(e):console.warn(e)}},t.prototype.forEach=function(t,e){var r=this;return new(e=y(e))(function(e,n){var i;i=r.subscribe(function(e){try{t(e)}catch(t){n(t),i&&i.unsubscribe()}},n,e)})},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[f]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:function r(t){return t?1===t.length?t[0]:function e(r){return t.reduce(function(t,e){return e(t)},r)}:b}(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=y(t))(function(t,r){var n;e.subscribe(function(t){return n=t},function(t){return r(t)},function(){return t(n)})})},t}();function y(t){if(t||(t=Promise),!t)throw new Error("no Promise impl found");return t}d.create=function(t){return new d(t)};var _=function(t){function e(e){var r=t.call(this,e)||this;return r.destination=e,r}return __extends(e,t),e}(a),v=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var r=this.connectable;r._refCount++;var n=new w(t,r),i=e.subscribe(n);return n.closed||(n.connection=r.connect()),i},t}(),w=function(t){function e(e,r){var n=t.call(this,e)||this;return n.connectable=r,n}return __extends(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var r=this.connection,n=t._connection;this.connection=null,!n||r&&n!==r||n.unsubscribe()}}else this.connection=null},e}(a),S=(function(t){function e(e,r){var n=t.call(this)||this;return n.source=e,n.subjectFactory=r,n._refCount=0,n._isComplete=!1,n}__extends(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new c).add(this.source.subscribe(new S(this.getSubject(),this))),t.closed?(this._connection=null,t=c.EMPTY):this._connection=t),t},e.prototype.refCount=function(){return function t(){return function t(e){return e.lift(new v(e))}}()(this)}}(d),function(t){function e(e,r){var n=t.call(this,e)||this;return n.connectable=r,n}return __extends(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(_)),g=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n.pending=!1,n}return __extends(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var r=this.id,n=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(n,r,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(n,this.id,e),this},e.prototype.requestAsyncId=function(t,e,r){return void 0===r&&(r=0),setInterval(t.flush.bind(t,this),r)},e.prototype.recycleAsyncId=function(t,e,r){if(void 0===r&&(r=0),null!==r&&this.delay===r&&!1===this.pending)return e;clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(t,e);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var r=!1,n=void 0;try{this.work(t)}catch(t){r=!0,n=!!t&&t||new Error(t)}if(r)return this.unsubscribe(),n},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,r=e.actions,n=r.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==n&&r.splice(n,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},e}(function(t){function e(e,r){return t.call(this)||this}return __extends(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(c)),E=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n}return __extends(e,t),e.prototype.schedule=function(e,r){return void 0===r&&(r=0),r>0?t.prototype.schedule.call(this,e,r):(this.delay=r,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,r){return r>0||this.closed?t.prototype.execute.call(this,e,r):this._execute(e,r)},e.prototype.requestAsyncId=function(e,r,n){return void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0?t.prototype.requestAsyncId.call(this,e,r,n):e.flush(this)},e}(g),x=function(){function t(e,r){void 0===r&&(r=t.now),this.SchedulerAction=e,this.now=r}return t.prototype.schedule=function(t,e,r){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(r,e)},t}();x.now=function(){return Date.now()};var m,z=function(t){function e(r,n){void 0===n&&(n=x.now);var i=t.call(this,r,function(){return e.delegate&&e.delegate!==i?e.delegate.now():n()})||this;return i.actions=[],i.active=!1,i.scheduled=void 0,i}return __extends(e,t),e.prototype.schedule=function(r,n,i){return void 0===n&&(n=0),e.delegate&&e.delegate!==this?e.delegate.schedule(r,n,i):t.prototype.schedule.call(this,r,n,i)},e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var r;this.active=!0;do{if(r=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,r){for(;t=e.shift();)t.unsubscribe();throw r}}},e}(x);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e}(z))(E),function(t){t.NEXT="N",t.ERROR="E",t.COMPLETE="C"}(m||(m={}));var j=1,T={},A=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n}return __extends(e,t),e.prototype.requestAsyncId=function(e,r,n){return void 0===n&&(n=0),null!==n&&n>0?t.prototype.requestAsyncId.call(this,e,r,n):(e.actions.push(this),e.scheduled||(e.scheduled=(i=e.flush.bind(e,null),o=j++,T[o]=i,Promise.resolve().then(function(){return function t(e){var r=T[e];r&&r()}(o)}),o)));var i,o},e.prototype.recycleAsyncId=function(e,r,n){if(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,r,n);0===e.actions.length&&(delete T[r],e.scheduled=void 0)},e}(g),O=(new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,r=this.actions,n=-1,i=r.length;t=t||r.shift();do{if(e=t.execute(t.state,t.delay))break}while(++n<i&&(t=r.shift()));if(this.active=!1,e){for(;++n<i&&(t=r.shift());)t.unsubscribe();throw e}},e}(z))(A),new z(g),function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n}return __extends(e,t),e.prototype.requestAsyncId=function(e,r,n){return void 0===n&&(n=0),null!==n&&n>0?t.prototype.requestAsyncId.call(this,e,r,n):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame(function(){return e.flush(null)})))},e.prototype.recycleAsyncId=function(e,r,n){if(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,r,n);0===e.actions.length&&(cancelAnimationFrame(r),e.scheduled=void 0)},e}(g));new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,r=this.actions,n=-1,i=r.length;t=t||r.shift();do{if(e=t.execute(t.state,t.delay))break}while(++n<i&&(t=r.shift()));if(this.active=!1,e){for(;++n<i&&(t=r.shift());)t.unsubscribe();throw e}},e}(z))(O),
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
Zone.__load_patch("rxjs",function(t,e,r){var n,i,o,s,u,h=e.__symbol__,l=Object.defineProperties;r.patchMethod(d.prototype,"lift",function(t){return function(n,i){var o=t.apply(n,i);return o.operator&&(o.operator._zone=e.current,r.patchMethod(o.operator,"call",function(t){return function(r,n){return r._zone&&r._zone!==e.current?r._zone.run(t,r,n):t.apply(r,n)}})),o}}),i=(n=d.prototype)[h("_subscribe")]=n._subscribe,l(d.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(t){this._zone=e.current,this._zoneSource=t}},_subscribe:{configurable:!0,get:function(){if(this._zoneSubscribe)return this._zoneSubscribe;if(this.constructor===d)return i;var t=Object.getPrototypeOf(this);return t&&t._subscribe},set:function(t){this._zone=e.current,this._zoneSubscribe=function(){if(this._zone&&this._zone!==e.current){var r=this._zone.run(t,this,arguments);if(r&&"function"==typeof r){var n=this._zone;return function(){return n!==e.current?n.run(r,this,arguments):r.apply(this,arguments)}}return r}return t.apply(this,arguments)}}},subjectFactory:{get:function(){return this._zoneSubjectFactory},set:function(t){var r=this._zone;this._zoneSubjectFactory=function(){return r&&r!==e.current?r.run(t,this,arguments):t.apply(this,arguments)}}}}),l(c.prototype,{_zone:{value:null,writable:!0,configurable:!0},_zoneUnsubscribe:{value:null,writable:!0,configurable:!0},_unsubscribe:{get:function(){if(this._zoneUnsubscribe)return this._zoneUnsubscribe;var t=Object.getPrototypeOf(this);return t&&t._unsubscribe},set:function(t){this._zone=e.current,this._zoneUnsubscribe=function(){return this._zone&&this._zone!==e.current?this._zone.run(t,this,arguments):t.apply(this,arguments)}}}}),o=a.prototype.next,s=a.prototype.error,u=a.prototype.complete,Object.defineProperty(a.prototype,"destination",{configurable:!0,get:function(){return this._zoneDestination},set:function(t){this._zone=e.current,this._zoneDestination=t}}),a.prototype.next=function(){var t=this._zone;return t&&t!==e.current?t.run(o,this,arguments,"rxjs.Subscriber.next"):o.apply(this,arguments)},a.prototype.error=function(){var t=this._zone;return t&&t!==e.current?t.run(s,this,arguments,"rxjs.Subscriber.error"):s.apply(this,arguments)},a.prototype.complete=function(){var t=this._zone;return t&&t!==e.current?t.run(u,this,arguments,"rxjs.Subscriber.complete"):u.call(this)}})});
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, (function () { 'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
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, [io.Socket.prototype], {
useG: false,
chkDup: false,
rt: true,
diff: function (task, delegate) {
return task.callback === delegate;
}
});
// also patch io.Socket.prototype.on/off/removeListener/removeAllListeners
io.Socket.prototype.on = io.Socket.prototype.addEventListener;
io.Socket.prototype.off = io.Socket.prototype.removeListener =
io.Socket.prototype.removeAllListeners = io.Socket.prototype.removeEventListener;
};
});
})));
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
}(function () {
'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
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, [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;
};
});
}));
//# sourceMappingURL=zone_patch_socket_io_rollup.umd.js.map

@@ -1,1 +0,13 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t()}(0,function(){"use strict";Zone.__load_patch("socketio",function(e,t,o){t[t.__symbol__("socketio")]=function(t){o.patchEventTarget(e,[t.Socket.prototype],{useG:!1,chkDup:!1,rt:!0,diff:function(e,t){return e.callback===t}}),t.Socket.prototype.on=t.Socket.prototype.addEventListener,t.Socket.prototype.off=t.Socket.prototype.removeListener=t.Socket.prototype.removeAllListeners=t.Socket.prototype.removeEventListener}})});
/**
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
!function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/Zone.__load_patch("socketio",function(e,t,o){t[t.__symbol__("socketio")]=function t(n){o.patchEventTarget(e,[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}})});
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, (function () { 'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
Zone.__load_patch('getUserMedia', function (global, Zone, api) {
function wrapFunctionArgs(func, source) {
return function () {
var args = Array.prototype.slice.call(arguments);
var wrappedArgs = api.bindArguments(args, source ? source : func.name);
return func.apply(this, wrappedArgs);
};
}
var navigator = global['navigator'];
if (navigator && navigator.getUserMedia) {
navigator.getUserMedia = wrapFunctionArgs(navigator.getUserMedia);
}
});
})));
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
}(function () {
'use strict';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
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);
}
});
}));
//# sourceMappingURL=zone_patch_user_media_rollup.umd.js.map

@@ -1,1 +0,13 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t()}(0,function(){"use strict";Zone.__load_patch("getUserMedia",function(e,t,n){var i,o,a=e.navigator;a&&a.getUserMedia&&(a.getUserMedia=(i=a.getUserMedia,function(){var e=Array.prototype.slice.call(arguments),t=n.bindArguments(e,o||i.name);return i.apply(this,t)}))})});
/**
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
!function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/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))})});

@@ -8,2 +8,3 @@ /**

*/
/// <amd-module name="angular/packages/zone.js/lib/zone" />
/**

@@ -288,2 +289,11 @@ * Suppress closure compiler errors about unknown 'global' variable

root: Zone;
/**
* load patch for specified native module, allow user to
* define their own patch, user can use this API after loading zone.js
*/
__load_patch(name: string, fn: _PatchFn): void;
/**
* Zone symbol API to generate a string with __zone_symbol__ prefix
*/
__symbol__(name: string): string;
}

@@ -290,0 +300,0 @@ interface UncaughtPromiseError extends Error {

@@ -1,1 +0,155 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t()}(0,function(){"use strict";!function(e){var t=e.performance;function n(e){t&&t.mark&&t.mark(e)}function r(e,n){t&&t.measure&&t.measure(e,n)}n("Zone");var o=!0===e.__zone_symbol__forceDuplicateZoneCheck;if(e.Zone){if(o||"function"!=typeof e.Zone.__symbol__)throw new Error("Zone already loaded.");return e.Zone}var a,i=function(){function t(e,t){this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new s(this,this._parent&&this._parent._zoneDelegate,t)}return t.assertZonePatched=function(){if(e.Promise!==P.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")},Object.defineProperty(t,"root",{get:function(){for(var e=t.current;e.parent;)e=e.parent;return e},enumerable:!0,configurable:!0}),Object.defineProperty(t,"current",{get:function(){return Z.zone},enumerable:!0,configurable:!0}),Object.defineProperty(t,"currentTask",{get:function(){return j},enumerable:!0,configurable:!0}),t.__load_patch=function(a,i){if(P.hasOwnProperty(a)){if(o)throw Error("Already loaded patch: "+a)}else if(!e["__Zone_disable_"+a]){var c="Zone:"+a;n(c),P[a]=i(e,t,D),r(c,c)}},Object.defineProperty(t.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),t.prototype.get=function(e){var t=this.getZoneWith(e);if(t)return t._properties[e]},t.prototype.getZoneWith=function(e){for(var t=this;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null},t.prototype.fork=function(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)},t.prototype.wrap=function(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);var n=this._zoneDelegate.intercept(this,e,t),r=this;return function(){return r.runGuarded(n,this,arguments,t)}},t.prototype.run=function(e,t,n,r){Z={parent:Z,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{Z=Z.parent}},t.prototype.runGuarded=function(e,t,n,r){void 0===t&&(t=null),Z={parent:Z,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{Z=Z.parent}},t.prototype.runTask=function(e,t,n){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||y).name+"; Execution: "+this.name+")");if(e.state!==_||e.type!==S&&e.type!==O){var r=e.state!=k;r&&e._transitionTo(k,b),e.runCount++;var o=j;j=e,Z={parent:Z,zone:this};try{e.type==O&&e.data&&!e.data.isPeriodic&&(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,e,t,n)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{e.state!==_&&e.state!==E&&(e.type==S||e.data&&e.data.isPeriodic?r&&e._transitionTo(b,k):(e.runCount=0,this._updateTaskCount(e,-1),r&&e._transitionTo(_,k,_))),Z=Z.parent,j=o}}},t.prototype.scheduleTask=function(e){if(e.zone&&e.zone!==this)for(var t=this;t;){if(t===e.zone)throw Error("can not reschedule task to "+this.name+" which is descendants of the original zone "+e.zone.name);t=t.parent}e._transitionTo(m,_);var n=[];e._zoneDelegates=n,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(t){throw e._transitionTo(E,m,_),this._zoneDelegate.handleError(this,t),t}return e._zoneDelegates===n&&this._updateTaskCount(e,1),e.state==m&&e._transitionTo(b,m),e},t.prototype.scheduleMicroTask=function(e,t,n,r){return this.scheduleTask(new l(w,e,t,n,r,void 0))},t.prototype.scheduleMacroTask=function(e,t,n,r,o){return this.scheduleTask(new l(O,e,t,n,r,o))},t.prototype.scheduleEventTask=function(e,t,n,r,o){return this.scheduleTask(new l(S,e,t,n,r,o))},t.prototype.cancelTask=function(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||y).name+"; Execution: "+this.name+")");e._transitionTo(T,b,k);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(E,T),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(_,T),e.runCount=0,e},t.prototype._updateTaskCount=function(e,t){var n=e._zoneDelegates;-1==t&&(e._zoneDelegates=null);for(var r=0;r<n.length;r++)n[r]._updateTaskCount(e.type,t)},t.__symbol__=I,t}(),c={name:"",onHasTask:function(e,t,n,r){return e.hasTask(n,r)},onScheduleTask:function(e,t,n,r){return e.scheduleTask(n,r)},onInvokeTask:function(e,t,n,r,o,a){return e.invokeTask(n,r,o,a)},onCancelTask:function(e,t,n,r){return e.cancelTask(n,r)}},s=function(){function e(e,t,n){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=e,this._parentDelegate=t,this._forkZS=n&&(n&&n.onFork?n:t._forkZS),this._forkDlgt=n&&(n.onFork?t:t._forkDlgt),this._forkCurrZone=n&&(n.onFork?this.zone:t.zone),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this.zone:t.zone),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this.zone:t.zone),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this.zone:t.zone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this.zone:t.zone),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this.zone:t.zone),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this.zone:t.zone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;var r=n&&n.onHasTask,o=t&&t._hasTaskZS;(r||o)&&(this._hasTaskZS=r?n:c,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=e,n.onScheduleTask||(this._scheduleTaskZS=c,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this.zone),n.onInvokeTask||(this._invokeTaskZS=c,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this.zone),n.onCancelTask||(this._cancelTaskZS=c,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this.zone))}return e.prototype.fork=function(e,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,t):new i(e,t)},e.prototype.intercept=function(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,e,t,n):t},e.prototype.invoke=function(e,t,n,r,o){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,e,t,n,r,o):t.apply(n,r)},e.prototype.handleError=function(e,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,e,t)},e.prototype.scheduleTask=function(e,t){var n=t;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),(n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,e,t))||(n=t);else if(t.scheduleFn)t.scheduleFn(t);else{if(t.type!=w)throw new Error("Task is missing scheduleFn.");v(t)}return n},e.prototype.invokeTask=function(e,t,n,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,e,t,n,r):t.callback.apply(n,r)},e.prototype.cancelTask=function(e,t){var n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,e,t);else{if(!t.cancelFn)throw Error("Task is not cancelable");n=t.cancelFn(t)}return n},e.prototype.hasTask=function(e,t){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,e,t)}catch(t){this.handleError(e,t)}},e.prototype._updateTaskCount=function(e,t){var n=this._taskCounts,r=n[e],o=n[e]=r+t;if(o<0)throw new Error("More tasks executed then were scheduled.");if(0==r||0==o){var a={microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e};this.hasTask(this.zone,a)}},e}(),l=function(){function t(n,r,o,a,i,c){this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=n,this.source=r,this.data=a,this.scheduleFn=i,this.cancelFn=c,this.callback=o;var s=this;n===S&&a&&a.useG?this.invoke=t.invokeTask:this.invoke=function(){return t.invokeTask.call(e,s,this,arguments)}}return t.invokeTask=function(e,t,n){e||(e=this),z++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{1==z&&g(),z--}},Object.defineProperty(t.prototype,"zone",{get:function(){return this._zone},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!0,configurable:!0}),t.prototype.cancelScheduleRequest=function(){this._transitionTo(_,m)},t.prototype._transitionTo=function(e,t,n){if(this._state!==t&&this._state!==n)throw new Error(this.type+" '"+this.source+"': can not transition to '"+e+"', expecting state '"+t+"'"+(n?" or '"+n+"'":"")+", was '"+this._state+"'.");this._state=e,e==_&&(this._zoneDelegates=null)},t.prototype.toString=function(){return this.data&&void 0!==this.data.handleId?this.data.handleId.toString():Object.prototype.toString.call(this)},t.prototype.toJSON=function(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}},t}(),u=I("setTimeout"),f=I("Promise"),p=I("then"),h=[],d=!1;function v(t){if(0===z&&0===h.length)if(a||e[f]&&(a=e[f].resolve(0)),a){var n=a[p];n||(n=a.then),n.call(a,g)}else e[u](g,0);t&&h.push(t)}function g(){if(!d){for(d=!0;h.length;){var e=h;h=[];for(var t=0;t<e.length;t++){var n=e[t];try{n.zone.runTask(n,null,null)}catch(e){D.onUnhandledError(e)}}}D.microtaskDrainDone(),d=!1}}var y={name:"NO ZONE"},_="notScheduled",m="scheduling",b="scheduled",k="running",T="canceling",E="unknown",w="microTask",O="macroTask",S="eventTask",P={},D={symbol:I,currentZoneFrame:function(){return Z},onUnhandledError:C,microtaskDrainDone:C,scheduleMicroTask:v,showUncaughtError:function(){return!i[I("ignoreConsoleErrorUncaughtError")]},patchEventTarget:function(){return[]},patchOnProperties:C,patchMethod:function(){return C},bindArguments:function(){return[]},patchThen:function(){return C},patchMacroTask:function(){return C},setNativePromise:function(e){e&&"function"==typeof e.resolve&&(a=e.resolve(0))},patchEventPrototype:function(){return C},isIEOrEdge:function(){return!1},getGlobalObjects:function(){},ObjectDefineProperty:function(){return C},ObjectGetOwnPropertyDescriptor:function(){},ObjectCreate:function(){},ArraySlice:function(){return[]},patchClass:function(){return C},wrapWithCurrentZone:function(){return C},filterProperties:function(){return[]},attachOriginToPatched:function(){return C},_redefineProperty:function(){return C},patchCallbacks:function(){return C}},Z={parent:null,zone:new i(null,null)},j=null,z=0;function C(){}function I(e){return"__zone_symbol__"+e}r("Zone","Zone"),e.Zone=i}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global);var e=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}};Zone.__load_patch("ZoneAwarePromise",function(t,n,r){var o=Object.getOwnPropertyDescriptor,a=Object.defineProperty;var i=r.symbol,c=[],s=i("Promise"),l=i("then"),u="__creationTrace__";r.onUnhandledError=function(e){if(r.showUncaughtError()){var t=e&&e.rejection;t?console.error("Unhandled Promise rejection:",t instanceof Error?t.message:t,"; Zone:",e.zone.name,"; Task:",e.task&&e.task.source,"; Value:",t,t instanceof Error?t.stack:void 0):console.error(e)}},r.microtaskDrainDone=function(){for(;c.length;)for(var e=function(){var e=c.shift();try{e.zone.runGuarded(function(){throw e})}catch(e){p(e)}};c.length;)e()};var f=i("unhandledPromiseRejectionHandler");function p(e){r.onUnhandledError(e);try{var t=n[f];t&&"function"==typeof t&&t.call(this,e)}catch(e){}}function h(e){return e&&e.then}function d(e){return e}function v(e){return R.reject(e)}var g=i("state"),y=i("value"),_=i("finally"),m=i("parentPromiseValue"),b=i("parentPromiseState"),k="Promise.then",T=null,E=!0,w=!1,O=0;function S(e,t){return function(n){try{j(e,t,n)}catch(t){j(e,!1,t)}}}var P=function(){var e=!1;return function(t){return function(){e||(e=!0,t.apply(null,arguments))}}},D="Promise resolved with itself",Z=i("currentTaskTrace");function j(e,t,o){var i=P();if(e===o)throw new TypeError(D);if(e[g]===T){var s=null;try{"object"!=typeof o&&"function"!=typeof o||(s=o&&o.then)}catch(t){return i(function(){j(e,!1,t)})(),e}if(t!==w&&o instanceof R&&o.hasOwnProperty(g)&&o.hasOwnProperty(y)&&o[g]!==T)C(o),j(e,o[g],o[y]);else if(t!==w&&"function"==typeof s)try{s.call(o,i(S(e,t)),i(S(e,!1)))}catch(t){i(function(){j(e,!1,t)})()}else{e[g]=t;var l=e[y];if(e[y]=o,e[_]===_&&t===E&&(e[g]=e[b],e[y]=e[m]),t===w&&o instanceof Error){var f=n.currentTask&&n.currentTask.data&&n.currentTask.data[u];f&&a(o,Z,{configurable:!0,enumerable:!1,writable:!0,value:f})}for(var p=0;p<l.length;)I(e,l[p++],l[p++],l[p++],l[p++]);if(0==l.length&&t==w){e[g]=O;try{throw new Error("Uncaught (in promise): "+function(e){if(e&&e.toString===Object.prototype.toString){var t=e.constructor&&e.constructor.name;return(t||"")+": "+JSON.stringify(e)}return e?e.toString():Object.prototype.toString.call(e)}(o)+(o&&o.stack?"\n"+o.stack:""))}catch(t){var h=t;h.rejection=o,h.promise=e,h.zone=n.current,h.task=n.currentTask,c.push(h),r.scheduleMicroTask()}}}}return e}var z=i("rejectionHandledHandler");function C(e){if(e[g]===O){try{var t=n[z];t&&"function"==typeof t&&t.call(this,{rejection:e[y],promise:e})}catch(e){}e[g]=w;for(var r=0;r<c.length;r++)e===c[r].promise&&c.splice(r,1)}}function I(e,t,n,r,o){C(e);var a=e[g],i=a?"function"==typeof r?r:d:"function"==typeof o?o:v;t.scheduleMicroTask(k,function(){try{var r=e[y],o=n&&_===n[_];o&&(n[m]=r,n[b]=a);var c=t.run(i,void 0,o&&i!==v&&i!==d?[]:[r]);j(n,!0,c)}catch(e){j(n,!1,e)}},n)}var R=function(){function t(e){if(!(this instanceof t))throw new Error("Must be an instanceof Promise.");this[g]=T,this[y]=[];try{e&&e(S(this,E),S(this,w))}catch(e){j(this,!1,e)}}return t.toString=function(){return"function ZoneAwarePromise() { [native code] }"},t.resolve=function(e){return j(new this(null),E,e)},t.reject=function(e){return j(new this(null),w,e)},t.race=function(t){var n,r,o,a,i=new this(function(e,t){o=e,a=t});function c(e){o(e)}function s(e){a(e)}try{for(var l=e(t),u=l.next();!u.done;u=l.next()){var f=u.value;h(f)||(f=this.resolve(f)),f.then(c,s)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return i},t.all=function(t){var n,r,o,a,i=new this(function(e,t){o=e,a=t}),c=2,s=0,l=[],u=function(e){h(e)||(e=f.resolve(e));var t=s;e.then(function(e){l[t]=e,0===--c&&o(l)},a),c++,s++},f=this;try{for(var p=e(t),d=p.next();!d.done;d=p.next()){u(d.value)}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}return 0===(c-=2)&&o(l),i},Object.defineProperty(t.prototype,Symbol.toStringTag,{get:function(){return"Promise"},enumerable:!0,configurable:!0}),t.prototype.then=function(e,t){var r=new this.constructor(null),o=n.current;return this[g]==T?this[y].push(o,r,e,t):I(this,o,r,e,t),r},t.prototype.catch=function(e){return this.then(null,e)},t.prototype.finally=function(e){var t=new this.constructor(null);t[_]=_;var r=n.current;return this[g]==T?this[y].push(r,t,e,e):I(this,r,t,e,e),t},t}();R.resolve=R.resolve,R.reject=R.reject,R.race=R.race,R.all=R.all;var L=t[s]=t.Promise,M=n.__symbol__("ZoneAwarePromise"),x=o(t,"Promise");x&&!x.configurable||(x&&delete x.writable,x&&delete x.value,x||(x={configurable:!0,enumerable:!0}),x.get=function(){return t[M]?t[M]:t[s]},x.set=function(e){e===R?t[M]=e:(t[s]=e,e.prototype[l]||H(e),r.setNativePromise(e))},a(t,"Promise",x)),t.Promise=R;var N,F=i("thenPatched");function H(e){var t=e.prototype,n=o(t,"then");if(!n||!1!==n.writable&&n.configurable){var r=t.then;t[l]=r,e.prototype.then=function(e,t){var n=this;return new R(function(e,t){r.call(n,e,t)}).then(e,t)},e[F]=!0}}if(r.patchThen=H,L){H(L);var A=t.fetch;"function"==typeof A&&(t[r.symbol("fetch")]=A,t.fetch=(N=A,function(){var e=N.apply(this,arguments);if(e instanceof R)return e;var t=e.constructor;return t[F]||H(t),e}))}return Promise[n.__symbol__("uncaughtPromiseErrors")]=c,R});var t=Object.getOwnPropertyDescriptor,n=Object.defineProperty,r=Object.getPrototypeOf,o=Object.create,a=Array.prototype.slice,i="addEventListener",c="removeEventListener",s=Zone.__symbol__(i),l=Zone.__symbol__(c),u="true",f="false",p="__zone_symbol__";function h(e,t){return Zone.current.wrap(e,t)}function d(e,t,n,r,o){return Zone.current.scheduleMacroTask(e,t,n,r,o)}var v=Zone.__symbol__,g="undefined"!=typeof window,y=g?window:void 0,_=g&&y||"object"==typeof self&&self||global,m="removeAttribute",b=[null];function k(e,t){for(var n=e.length-1;n>=0;n--)"function"==typeof e[n]&&(e[n]=h(e[n],t+"_"+n));return e}function T(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&void 0===e.set)}var E="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,w=!("nw"in _)&&void 0!==_.process&&"[object process]"==={}.toString.call(_.process),O=!w&&!E&&!(!g||!y.HTMLElement),S=void 0!==_.process&&"[object process]"==={}.toString.call(_.process)&&!E&&!(!g||!y.HTMLElement),P={},D=function(e){if(e=e||_.event){var t=P[e.type];t||(t=P[e.type]=v("ON_PROPERTY"+e.type));var n,r=this||e.target||_,o=r[t];if(O&&r===y&&"error"===e.type){var a=e;!0===(n=o&&o.call(this,a.message,a.filename,a.lineno,a.colno,a.error))&&e.preventDefault()}else null==(n=o&&o.apply(this,arguments))||n||e.preventDefault();return n}};function Z(e,r,o){var a=t(e,r);!a&&o&&(t(o,r)&&(a={enumerable:!0,configurable:!0}));if(a&&a.configurable){var i=v("on"+r+"patched");if(!e.hasOwnProperty(i)||!e[i]){delete a.writable,delete a.value;var c=a.get,s=a.set,l=r.substr(2),u=P[l];u||(u=P[l]=v("ON_PROPERTY"+l)),a.set=function(t){var n=this;(n||e!==_||(n=_),n)&&(n[u]&&n.removeEventListener(l,D),s&&s.apply(n,b),"function"==typeof t?(n[u]=t,n.addEventListener(l,D,!1)):n[u]=null)},a.get=function(){var t=this;if(t||e!==_||(t=_),!t)return null;var n=t[u];if(n)return n;if(c){var o=c&&c.call(this);if(o)return a.set.call(this,o),"function"==typeof t[m]&&t.removeAttribute(r),o}return null},n(e,r,a),e[i]=!0}}}function j(e,t,n){if(t)for(var r=0;r<t.length;r++)Z(e,"on"+t[r],n);else{var o=[];for(var a in e)"on"==a.substr(0,2)&&o.push(a);for(var i=0;i<o.length;i++)Z(e,o[i],n)}}var z=v("originalInstance");function C(e){var t=_[e];if(t){_[v(e)]=t,_[e]=function(){var n=k(arguments,e);switch(n.length){case 0:this[z]=new t;break;case 1:this[z]=new t(n[0]);break;case 2:this[z]=new t(n[0],n[1]);break;case 3:this[z]=new t(n[0],n[1],n[2]);break;case 4:this[z]=new t(n[0],n[1],n[2],n[3]);break;default:throw new Error("Arg list too long.")}},M(_[e],t);var r,o=new t(function(){});for(r in o)"XMLHttpRequest"===e&&"responseBlob"===r||function(t){"function"==typeof o[t]?_[e].prototype[t]=function(){return this[z][t].apply(this[z],arguments)}:n(_[e].prototype,t,{set:function(n){"function"==typeof n?(this[z][t]=h(n,e+"."+t),M(this[z][t],n)):this[z][t]=n},get:function(){return this[z][t]}})}(r);for(r in t)"prototype"!==r&&t.hasOwnProperty(r)&&(_[e][r]=t[r])}}var I=!1;function R(e,n,o){for(var a=e;a&&!a.hasOwnProperty(n);)a=r(a);!a&&e[n]&&(a=e);var i,c,s=v(n),l=null;if(a&&!(l=a[s])&&(l=a[s]=a[n],T(a&&t(a,n)))){var u=o(l,s,n);a[n]=function(){return u(this,arguments)},M(a[n],l),I&&(i=l,c=a[n],"function"==typeof Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(i).forEach(function(e){var t=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(c,e,{get:function(){return i[e]},set:function(n){(!t||t.writable&&"function"==typeof t.set)&&(i[e]=n)},enumerable:!t||t.enumerable,configurable:!t||t.configurable})}))}return l}function L(e,t,n){var r=null;function o(e){var t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},r.apply(t.target,t.args),e}r=R(e,t,function(e){return function(t,r){var a=n(t,r);return a.cbIdx>=0&&"function"==typeof r[a.cbIdx]?d(a.name,r[a.cbIdx],a,o):e.apply(t,r)}})}function M(e,t){e[v("OriginalDelegate")]=t}var x=!1,N=!1;function F(){try{var e=y.navigator.userAgent;if(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/"))return!0}catch(e){}return!1}function H(){if(x)return N;x=!0;try{var e=y.navigator.userAgent;-1===e.indexOf("MSIE ")&&-1===e.indexOf("Trident/")&&-1===e.indexOf("Edge/")||(N=!0)}catch(e){}return N}Zone.__load_patch("toString",function(e){var t=Function.prototype.toString,n=v("OriginalDelegate"),r=v("Promise"),o=v("Error"),a=function(){if("function"==typeof this){var a=this[n];if(a)return"function"==typeof a?t.call(a):Object.prototype.toString.call(a);if(this===Promise){var i=e[r];if(i)return t.call(i)}if(this===Error){var c=e[o];if(c)return t.call(c)}}return t.call(this)};a[n]=t,Function.prototype.toString=a;var i=Object.prototype.toString;Object.prototype.toString=function(){return this instanceof Promise?"[object Promise]":i.call(this)}});var A=!1;if("undefined"!=typeof window)try{var B=Object.defineProperty({},"passive",{get:function(){A=!0}});window.addEventListener("test",B,B),window.removeEventListener("test",B,B)}catch(e){A=!1}var G={useG:!0},W={},q={},U=/^__zone_symbol__(\w+)(true|false)$/,X="__zone_symbol__propagationStopped";function V(e,t,n){var o=n&&n.add||i,a=n&&n.rm||c,s=n&&n.listeners||"eventListeners",l=n&&n.rmAll||"removeAllListeners",h=v(o),d="."+o+":",g="prependListener",y="."+g+":",_=function(e,t,n){if(!e.isRemoved){var r=e.callback;"object"==typeof r&&r.handleEvent&&(e.callback=function(e){return r.handleEvent(e)},e.originalDelegate=r),e.invoke(e,t,[n]);var o=e.options;if(o&&"object"==typeof o&&o.once){var i=e.originalDelegate?e.originalDelegate:e.callback;t[a].call(t,n.type,i,o)}}},m=function(t){if(t=t||e.event){var n=this||t.target||e,r=n[W[t.type][f]];if(r)if(1===r.length)_(r[0],n,t);else for(var o=r.slice(),a=0;a<o.length&&(!t||!0!==t[X]);a++)_(o[a],n,t)}},b=function(t){if(t=t||e.event){var n=this||t.target||e,r=n[W[t.type][u]];if(r)if(1===r.length)_(r[0],n,t);else for(var o=r.slice(),a=0;a<o.length&&(!t||!0!==t[X]);a++)_(o[a],n,t)}};function k(t,n){if(!t)return!1;var i=!0;n&&void 0!==n.useG&&(i=n.useG);var c=n&&n.vh,_=!0;n&&void 0!==n.chkDup&&(_=n.chkDup);var k=!1;n&&void 0!==n.rt&&(k=n.rt);for(var T=t;T&&!T.hasOwnProperty(o);)T=r(T);if(!T&&t[o]&&(T=t),!T)return!1;if(T[h])return!1;var E,O=n&&n.eventNameToString,S={},P=T[h]=T[o],D=T[v(a)]=T[a],Z=T[v(s)]=T[s],j=T[v(l)]=T[l];function z(e){A||"boolean"==typeof S.options||void 0===S.options||null===S.options||(e.options=!!S.options.capture,S.options=e.options)}n&&n.prepend&&(E=T[v(n.prepend)]=T[n.prepend]);var C=i?function(e){if(!S.isExisting)return z(e),P.call(S.target,S.eventName,S.capture?b:m,S.options)}:function(e){return z(e),P.call(S.target,S.eventName,e.invoke,S.options)},I=i?function(e){if(!e.isRemoved){var t=W[e.eventName],n=void 0;t&&(n=t[e.capture?u:f]);var r=n&&e.target[n];if(r)for(var o=0;o<r.length;o++)if(r[o]===e){r.splice(o,1),e.isRemoved=!0,0===r.length&&(e.allRemoved=!0,e.target[n]=null);break}}if(e.allRemoved)return D.call(e.target,e.eventName,e.capture?b:m,e.options)}:function(e){return D.call(e.target,e.eventName,e.invoke,e.options)},R=n&&n.diff?n.diff:function(e,t){var n=typeof t;return"function"===n&&e.callback===t||"object"===n&&e.originalDelegate===t},L=Zone[Zone.__symbol__("BLACK_LISTED_EVENTS")],x=function(t,n,r,o,a,s){return void 0===a&&(a=!1),void 0===s&&(s=!1),function(){var l=this||e,h=arguments[0],d=arguments[1];if(!d)return t.apply(this,arguments);if(w&&"uncaughtException"===h)return t.apply(this,arguments);var v=!1;if("function"!=typeof d){if(!d.handleEvent)return t.apply(this,arguments);v=!0}if(!c||c(t,d,l,arguments)){var g,y=arguments[2];if(L)for(var m=0;m<L.length;m++)if(h===L[m])return t.apply(this,arguments);var b=!1;void 0===y?g=!1:!0===y?g=!0:!1===y?g=!1:(g=!!y&&!!y.capture,b=!!y&&!!y.once);var k,T=Zone.current,E=W[h];if(E)k=E[g?u:f];else{var P=(O?O(h):h)+f,D=(O?O(h):h)+u,Z=p+P,j=p+D;W[h]={},W[h][f]=Z,W[h][u]=j,k=g?j:Z}var z,C=l[k],I=!1;if(C){if(I=!0,_)for(m=0;m<C.length;m++)if(R(C[m],d))return}else C=l[k]=[];var M=l.constructor.name,x=q[M];x&&(z=x[h]),z||(z=M+n+(O?O(h):h)),S.options=y,b&&(S.options.once=!1),S.target=l,S.capture=g,S.eventName=h,S.isExisting=I;var N=i?G:void 0;N&&(N.taskData=S);var F=T.scheduleEventTask(z,d,N,r,o);return S.target=null,N&&(N.taskData=null),b&&(y.once=!0),(A||"boolean"!=typeof F.options)&&(F.options=y),F.target=l,F.capture=g,F.eventName=h,v&&(F.originalDelegate=d),s?C.unshift(F):C.push(F),a?l:void 0}}};return T[o]=x(P,d,C,I,k),E&&(T[g]=x(E,y,function(e){return E.call(S.target,S.eventName,e.invoke,S.options)},I,k,!0)),T[a]=function(){var t,n=this||e,r=arguments[0],o=arguments[2];t=void 0!==o&&(!0===o||!1!==o&&(!!o&&!!o.capture));var a=arguments[1];if(!a)return D.apply(this,arguments);if(!c||c(D,a,n,arguments)){var i,s=W[r];s&&(i=s[t?u:f]);var l=i&&n[i];if(l)for(var p=0;p<l.length;p++){var h=l[p];if(R(h,a))return l.splice(p,1),h.isRemoved=!0,0===l.length&&(h.allRemoved=!0,n[i]=null),h.zone.cancelTask(h),k?n:void 0}return D.apply(this,arguments)}},T[s]=function(){for(var t=this||e,n=arguments[0],r=[],o=Y(t,O?O(n):n),a=0;a<o.length;a++){var i=o[a],c=i.originalDelegate?i.originalDelegate:i.callback;r.push(c)}return r},T[l]=function(){var t=this||e,n=arguments[0];if(n){var r=W[n];if(r){var o=r[f],i=r[u],c=t[o],s=t[i];if(c){var p=c.slice();for(g=0;g<p.length;g++){var h=(d=p[g]).originalDelegate?d.originalDelegate:d.callback;this[a].call(this,n,h,d.options)}}if(s)for(p=s.slice(),g=0;g<p.length;g++){var d;h=(d=p[g]).originalDelegate?d.originalDelegate:d.callback;this[a].call(this,n,h,d.options)}}}else{for(var v=Object.keys(t),g=0;g<v.length;g++){var y=v[g],_=U.exec(y),m=_&&_[1];m&&"removeListener"!==m&&this[l].call(this,m)}this[l].call(this,"removeListener")}if(k)return this},M(T[o],P),M(T[a],D),j&&M(T[l],j),Z&&M(T[s],Z),!0}for(var T=[],E=0;E<t.length;E++)T[E]=k(t[E],n);return T}function Y(e,t){var n=[];for(var r in e){var o=U.exec(r),a=o&&o[1];if(a&&(!t||a===t)){var i=e[r];if(i)for(var c=0;c<i.length;c++)n.push(i[c])}}return n}function K(e,t){var n=e.Event;n&&n.prototype&&t.patchMethod(n.prototype,"stopImmediatePropagation",function(e){return function(t,n){t[X]=!0,e&&e.apply(t,n)}})}function J(e,t,n,r,o){var a=Zone.__symbol__(r);if(!t[a]){var i=t[a]=t[r];t[r]=function(a,c,s){return c&&c.prototype&&o.forEach(function(t){var o=n+"."+r+"::"+t,a=c.prototype;if(a.hasOwnProperty(t)){var i=e.ObjectGetOwnPropertyDescriptor(a,t);i&&i.value?(i.value=e.wrapWithCurrentZone(i.value,o),e._redefineProperty(c.prototype,t,i)):a[t]&&(a[t]=e.wrapWithCurrentZone(a[t],o))}else a[t]&&(a[t]=e.wrapWithCurrentZone(a[t],o))}),i.call(t,a,c,s)},e.attachOriginToPatched(t[r],i)}}var Q=Zone.__symbol__,$=Object[Q("defineProperty")]=Object.defineProperty,ee=Object[Q("getOwnPropertyDescriptor")]=Object.getOwnPropertyDescriptor,te=Object.create,ne=Q("unconfigurables");function re(e,t,n){var r=n.configurable;return ie(e,t,n=ae(e,t,n),r)}function oe(e,t){return e&&e[ne]&&e[ne][t]}function ae(e,t,n){return Object.isFrozen(n)||(n.configurable=!0),n.configurable||(e[ne]||Object.isFrozen(e)||$(e,ne,{writable:!0,value:{}}),e[ne]&&(e[ne][t]=!0)),n}function ie(e,t,n,r){try{return $(e,t,n)}catch(a){if(!n.configurable)throw a;void 0===r?delete n.configurable:n.configurable=r;try{return $(e,t,n)}catch(r){var o=null;try{o=JSON.stringify(n)}catch(e){o=n.toString()}console.log("Attempting to configure '"+t+"' with descriptor '"+o+"' on object '"+e+"' and got error, giving up: "+r)}}}var ce=["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","vrdisplyconnected","vrdisplaydisconnected","vrdisplaypresentchange"],se=["encrypted","waitingforkey","msneedkey","mozinterruptbegin","mozinterruptend"],le=["load"],ue=["blur","error","focus","load","resize","scroll","messageerror"],fe=["bounce","finish","start"],pe=["loadstart","progress","abort","error","load","progress","timeout","loadend","readystatechange"],he=["upgradeneeded","complete","abort","success","error","blocked","versionchange","close"],de=["close","error","open","message"],ve=["error","message"],ge=["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"].concat(["webglcontextrestored","webglcontextlost","webglcontextcreationerror"],["autocomplete","autocompleteerror"],["toggle"],["afterscriptexecute","beforescriptexecute","DOMContentLoaded","freeze","fullscreenchange","mozfullscreenchange","webkitfullscreenchange","msfullscreenchange","fullscreenerror","mozfullscreenerror","webkitfullscreenerror","msfullscreenerror","readystatechange","visibilitychange","resume"],ce,["beforecopy","beforecut","beforepaste","copy","cut","paste","dragstart","loadend","animationstart","search","transitionrun","transitionstart","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend"],["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"]);function ye(e,t,n){if(!n||0===n.length)return t;var r=n.filter(function(t){return t.target===e});if(!r||0===r.length)return t;var o=r[0].ignoreProperties;return t.filter(function(e){return-1===o.indexOf(e)})}function _e(e,t,n,r){e&&j(e,ye(e,t,n),r)}function me(e,t){if((!w||S)&&!Zone[e.symbol("patchEvents")]){var n="undefined"!=typeof WebSocket,o=t.__Zone_ignore_on_properties;if(O){var a=window,i=F?[{target:a,ignoreProperties:["error"]}]:[];_e(a,ge.concat(["messageerror"]),o?o.concat(i):o,r(a)),_e(Document.prototype,ge,o),void 0!==a.SVGElement&&_e(a.SVGElement.prototype,ge,o),_e(Element.prototype,ge,o),_e(HTMLElement.prototype,ge,o),_e(HTMLMediaElement.prototype,se,o),_e(HTMLFrameSetElement.prototype,ce.concat(ue),o),_e(HTMLBodyElement.prototype,ce.concat(ue),o),_e(HTMLFrameElement.prototype,le,o),_e(HTMLIFrameElement.prototype,le,o);var c=a.HTMLMarqueeElement;c&&_e(c.prototype,fe,o);var s=a.Worker;s&&_e(s.prototype,ve,o)}var l=t.XMLHttpRequest;l&&_e(l.prototype,pe,o);var u=t.XMLHttpRequestEventTarget;u&&_e(u&&u.prototype,pe,o),"undefined"!=typeof IDBIndex&&(_e(IDBIndex.prototype,he,o),_e(IDBRequest.prototype,he,o),_e(IDBOpenDBRequest.prototype,he,o),_e(IDBDatabase.prototype,he,o),_e(IDBTransaction.prototype,he,o),_e(IDBCursor.prototype,he,o)),n&&_e(WebSocket.prototype,de,o)}}function be(e,t){var n=t.getGlobalObjects(),r=n.eventNames,o=n.globalSources,a=n.zoneSymbolEventNames,i=n.TRUE_STR,c=n.FALSE_STR,s=n.ZONE_SYMBOL_PREFIX,l="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",u="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(","),f=[],p=e.wtf,h=l.split(",");p?f=h.map(function(e){return"HTML"+e+"Element"}).concat(u):e.EventTarget?f.push("EventTarget"):f=u;for(var d=e.__Zone_disable_IE_check||!1,v=e.__Zone_enable_cross_context_check||!1,g=t.isIEOrEdge(),y="function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] }",_=0;_<r.length;_++){var m=s+((w=r[_])+c),b=s+(w+i);a[w]={},a[w][c]=m,a[w][i]=b}for(_=0;_<l.length;_++)for(var k=h[_],T=o[k]={},E=0;E<r.length;E++){var w;T[w=r[E]]=k+".addEventListener:"+w}var O=[];for(_=0;_<f.length;_++){var S=e[f[_]];O.push(S&&S.prototype)}return t.patchEventTarget(e,O,{vh:function(e,t,n,r){if(!d&&g){if(v)try{var o;if("[object FunctionWrapper]"===(o=t.toString())||o==y)return e.apply(n,r),!1}catch(t){return e.apply(n,r),!1}else if("[object FunctionWrapper]"===(o=t.toString())||o==y)return e.apply(n,r),!1}else if(v)try{t.toString()}catch(t){return e.apply(n,r),!1}return!0}}),Zone[t.symbol("patchEventTarget")]=!!e.EventTarget,!0}function ke(e,t){var n=e.getGlobalObjects(),r=n.isNode,o=n.isMix;if((!r||o)&&!function(e,t){var n=e.getGlobalObjects(),r=n.isBrowser,o=n.isMix;if((r||o)&&!e.ObjectGetOwnPropertyDescriptor(HTMLElement.prototype,"onclick")&&"undefined"!=typeof Element){var a=e.ObjectGetOwnPropertyDescriptor(Element.prototype,"onclick");if(a&&!a.configurable)return!1;if(a){e.ObjectDefineProperty(Element.prototype,"onclick",{enumerable:!0,configurable:!0,get:function(){return!0}});var i=document.createElement("div"),c=!!i.onclick;return e.ObjectDefineProperty(Element.prototype,"onclick",a),c}}var s=t.XMLHttpRequest;if(!s)return!1;var l=s.prototype,u=e.ObjectGetOwnPropertyDescriptor(l,"onreadystatechange");if(u){e.ObjectDefineProperty(l,"onreadystatechange",{enumerable:!0,configurable:!0,get:function(){return!0}});var f=new s,c=!!f.onreadystatechange;return e.ObjectDefineProperty(l,"onreadystatechange",u||{}),c}var p=e.symbol("fake");e.ObjectDefineProperty(l,"onreadystatechange",{enumerable:!0,configurable:!0,get:function(){return this[p]},set:function(e){this[p]=e}});var f=new s,h=function(){};f.onreadystatechange=h;var c=f[p]===h;return f.onreadystatechange=null,c}(e,t)){var a="undefined"!=typeof WebSocket;!function(e){for(var t=e.getGlobalObjects().eventNames,n=e.symbol("unbound"),r=function(r){var o=t[r],a="on"+o;self.addEventListener(o,function(t){var r,o,i=t.target;for(o=i?i.constructor.name+"."+a:"unknown."+a;i;)i[a]&&!i[a][n]&&((r=e.wrapWithCurrentZone(i[a],o))[n]=i[a],i[a]=r),i=i.parentElement},!0)},o=0;o<t.length;o++)r(o)}(e),e.patchClass("XMLHttpRequest"),a&&function(e,t){var n=e.getGlobalObjects(),r=n.ADD_EVENT_LISTENER_STR,o=n.REMOVE_EVENT_LISTENER_STR,a=t.WebSocket;t.EventTarget||e.patchEventTarget(t,[a.prototype]),t.WebSocket=function(t,n){var i,c,s=arguments.length>1?new a(t,n):new a(t),l=e.ObjectGetOwnPropertyDescriptor(s,"onmessage");return l&&!1===l.configurable?(i=e.ObjectCreate(s),c=s,[r,o,"send","close"].forEach(function(t){i[t]=function(){var n=e.ArraySlice.call(arguments);if(t===r||t===o){var a=n.length>0?n[0]:void 0;if(a){var c=Zone.__symbol__("ON_PROPERTY"+a);s[c]=i[c]}}return s[t].apply(s,n)}})):i=s,e.patchOnProperties(i,["close","error","message","open"],c),i};var i=t.WebSocket;for(var c in a)i[c]=a[c]}(e,t),Zone[e.symbol("patchEvents")]=!0}}Zone.__load_patch("util",function(e,r,s){s.patchOnProperties=j,s.patchMethod=R,s.bindArguments=k,s.patchMacroTask=L;var l=r.__symbol__("BLACK_LISTED_EVENTS"),d=r.__symbol__("UNPATCHED_EVENTS");e[d]&&(e[l]=e[d]),e[l]&&(r[l]=r[d]=e[l]),s.patchEventPrototype=K,s.patchEventTarget=V,s.isIEOrEdge=H,s.ObjectDefineProperty=n,s.ObjectGetOwnPropertyDescriptor=t,s.ObjectCreate=o,s.ArraySlice=a,s.patchClass=C,s.wrapWithCurrentZone=h,s.filterProperties=ye,s.attachOriginToPatched=M,s._redefineProperty=re,s.patchCallbacks=J,s.getGlobalObjects=function(){return{globalSources:q,zoneSymbolEventNames:W,eventNames:ge,isBrowser:O,isMix:S,isNode:w,TRUE_STR:u,FALSE_STR:f,ZONE_SYMBOL_PREFIX:p,ADD_EVENT_LISTENER_STR:i,REMOVE_EVENT_LISTENER_STR:c}}}),function(e){e.__zone_symbol__legacyPatch=function(){var t=e.Zone;t.__load_patch("registerElement",function(e,t,n){!function(e,t){var n=t.getGlobalObjects(),r=n.isBrowser,o=n.isMix;(r||o)&&"registerElement"in e.document&&t.patchCallbacks(t,document,"Document","registerElement",["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"])}(e,n)}),t.__load_patch("EventTargetLegacy",function(e,t,n){be(e,n),ke(n,e)})}}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global);var Te=v("zoneTask");function Ee(e,t,n,r){var o=null,a=null;n+=r;var i={};function c(t){var n=t.data;return n.args[0]=function(){try{t.invoke.apply(this,arguments)}finally{t.data&&t.data.isPeriodic||("number"==typeof n.handleId?delete i[n.handleId]:n.handleId&&(n.handleId[Te]=null))}},n.handleId=o.apply(e,n.args),t}function s(e){return a(e.data.handleId)}o=R(e,t+=r,function(n){return function(o,a){if("function"==typeof a[0]){var l={isPeriodic:"Interval"===r,delay:"Timeout"===r||"Interval"===r?a[1]||0:void 0,args:a},u=d(t,a[0],l,c,s);if(!u)return u;var f=u.data.handleId;return"number"==typeof f?i[f]=u:f&&(f[Te]=u),f&&f.ref&&f.unref&&"function"==typeof f.ref&&"function"==typeof f.unref&&(u.ref=f.ref.bind(f),u.unref=f.unref.bind(f)),"number"==typeof f||f?f:u}return n.apply(e,a)}}),a=R(e,n,function(t){return function(n,r){var o,a=r[0];"number"==typeof a?o=i[a]:(o=a&&a[Te])||(o=a),o&&"string"==typeof o.type?"notScheduled"!==o.state&&(o.cancelFn&&o.data.isPeriodic||0===o.runCount)&&("number"==typeof a?delete i[a]:a&&(a[Te]=null),o.zone.cancelTask(o)):t.apply(e,r)}})}function we(e,t){if(!Zone[t.symbol("patchEventTarget")]){for(var n=t.getGlobalObjects(),r=n.eventNames,o=n.zoneSymbolEventNames,a=n.TRUE_STR,i=n.FALSE_STR,c=n.ZONE_SYMBOL_PREFIX,s=0;s<r.length;s++){var l=r[s],u=c+(l+i),f=c+(l+a);o[l]={},o[l][i]=u,o[l][a]=f}var p=e.EventTarget;if(p&&p.prototype)return t.patchEventTarget(e,[p&&p.prototype]),!0}}Zone.__load_patch("legacy",function(e){var t=e[Zone.__symbol__("legacyPatch")];t&&t()}),Zone.__load_patch("timers",function(e){Ee(e,"set","clear","Timeout"),Ee(e,"set","clear","Interval"),Ee(e,"set","clear","Immediate")}),Zone.__load_patch("requestAnimationFrame",function(e){Ee(e,"request","cancel","AnimationFrame"),Ee(e,"mozRequest","mozCancel","AnimationFrame"),Ee(e,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",function(e,t){for(var n=["alert","prompt","confirm"],r=0;r<n.length;r++){R(e,n[r],function(n,r,o){return function(r,a){return t.current.run(n,e,a,o)}})}}),Zone.__load_patch("EventTarget",function(e,t,n){!function(e,t){t.patchEventPrototype(e,t)}(e,n),we(e,n);var r=e.XMLHttpRequestEventTarget;r&&r.prototype&&n.patchEventTarget(e,[r.prototype]),C("MutationObserver"),C("WebKitMutationObserver"),C("IntersectionObserver"),C("FileReader")}),Zone.__load_patch("on_property",function(e,t,n){me(n,e),Object.defineProperty=function(e,t,n){if(oe(e,t))throw new TypeError("Cannot assign to read only property '"+t+"' of "+e);var r=n.configurable;return"prototype"!==t&&(n=ae(e,t,n)),ie(e,t,n,r)},Object.defineProperties=function(e,t){return Object.keys(t).forEach(function(n){Object.defineProperty(e,n,t[n])}),e},Object.create=function(e,t){return"object"!=typeof t||Object.isFrozen(t)||Object.keys(t).forEach(function(n){t[n]=ae(e,n,t[n])}),te(e,t)},Object.getOwnPropertyDescriptor=function(e,t){var n=ee(e,t);return n&&oe(e,t)&&(n.configurable=!1),n}}),Zone.__load_patch("customElements",function(e,t,n){!function(e,t){var n=t.getGlobalObjects(),r=n.isBrowser,o=n.isMix;(r||o)&&e.customElements&&"customElements"in e&&t.patchCallbacks(t,e.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback"])}(e,n)}),Zone.__load_patch("XHR",function(e,t){!function(e){var u=e.XMLHttpRequest;if(!u)return;var f=u.prototype;var p=f[s],h=f[l];if(!p){var g=e.XMLHttpRequestEventTarget;if(g){var y=g.prototype;p=y[s],h=y[l]}}var _="readystatechange",m="scheduled";function b(e){var t=e.data,r=t.target;r[a]=!1,r[c]=!1;var i=r[o];p||(p=r[s],h=r[l]),i&&h.call(r,_,i);var u=r[o]=function(){if(r.readyState===r.DONE)if(!t.aborted&&r[a]&&e.state===m){var n=r.__zone_symbol__loadfalse;if(n&&n.length>0){var o=e.invoke;e.invoke=function(){for(var n=r.__zone_symbol__loadfalse,a=0;a<n.length;a++)n[a]===e&&n.splice(a,1);t.aborted||e.state!==m||o.call(e)},n.push(e)}else e.invoke()}else t.aborted||!1!==r[a]||(r[c]=!0)};p.call(r,_,u);var f=r[n];return f||(r[n]=e),S.apply(r,t.args),r[a]=!0,e}function k(){}function T(e){var t=e.data;return t.aborted=!0,P.apply(t.target,t.args)}var E=R(f,"open",function(){return function(e,t){return e[r]=0==t[2],e[i]=t[1],E.apply(e,t)}}),w=v("fetchTaskAborting"),O=v("fetchTaskScheduling"),S=R(f,"send",function(){return function(e,n){if(!0===t.current[O])return S.apply(e,n);if(e[r])return S.apply(e,n);var o={target:e,url:e[i],isPeriodic:!1,args:n,aborted:!1},a=d("XMLHttpRequest.send",k,o,b,T);e&&!0===e[c]&&!o.aborted&&a.state===m&&a.invoke()}}),P=R(f,"abort",function(){return function(e,r){var o=e[n];if(o&&"string"==typeof o.type){if(null==o.cancelFn||o.data&&o.data.aborted)return;o.zone.cancelTask(o)}else if(!0===t.current[w])return P.apply(e,r)}})}(e);var n=v("xhrTask"),r=v("xhrSync"),o=v("xhrListener"),a=v("xhrScheduled"),i=v("xhrURL"),c=v("xhrErrorBeforeScheduled")}),Zone.__load_patch("geolocation",function(e){e.navigator&&e.navigator.geolocation&&function(e,n){for(var r=e.constructor.name,o=function(o){var a=n[o],i=e[a];if(i){if(!T(t(e,a)))return"continue";e[a]=function(e){var t=function(){return e.apply(this,k(arguments,r+"."+a))};return M(t,e),t}(i)}},a=0;a<n.length;a++)o(a)}(e.navigator.geolocation,["getCurrentPosition","watchPosition"])}),Zone.__load_patch("PromiseRejectionEvent",function(e,t){function n(t){return function(n){Y(e,t).forEach(function(r){var o=e.PromiseRejectionEvent;if(o){var a=new o(t,{promise:n.promise,reason:n.rejection});r.invoke(a)}})}}e.PromiseRejectionEvent&&(t[v("unhandledPromiseRejectionHandler")]=n("unhandledrejection"),t[v("rejectionHandledHandler")]=n("rejectionhandled"))})});
/**
* @license Angular v0.10.0
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
!function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/!function(e){var t=e.performance;function n(e){t&&t.mark&&t.mark(e)}function r(e,n){t&&t.measure&&t.measure(e,n)}n("Zone");var o=e.__Zone_symbol_prefix||"__zone_symbol__";function a(e){return o+e}var i=!0===e[a("forceDuplicateZoneCheck")];if(e.Zone){if(i||"function"!=typeof e.Zone.__symbol__)throw new Error("Zone already loaded.");return e.Zone}var s=function(){function t(e,t){this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new l(this,this._parent&&this._parent._zoneDelegate,t)}return t.assertZonePatched=function(){if(e.Promise!==D.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")},Object.defineProperty(t,"root",{get:function(){for(var e=t.current;e.parent;)e=e.parent;return e},enumerable:!0,configurable:!0}),Object.defineProperty(t,"current",{get:function(){return C.zone},enumerable:!0,configurable:!0}),Object.defineProperty(t,"currentTask",{get:function(){return z},enumerable:!0,configurable:!0}),t.__load_patch=function(o,a){if(D.hasOwnProperty(o)){if(i)throw Error("Already loaded patch: "+o)}else if(!e["__Zone_disable_"+o]){var s="Zone:"+o;n(s),D[o]=a(e,t,j),r(s,s)}},Object.defineProperty(t.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),t.prototype.get=function(e){var t=this.getZoneWith(e);if(t)return t._properties[e]},t.prototype.getZoneWith=function(e){for(var t=this;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null},t.prototype.fork=function(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)},t.prototype.wrap=function(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);var n=this._zoneDelegate.intercept(this,e,t),r=this;return function(){return r.runGuarded(n,this,arguments,t)}},t.prototype.run=function(e,t,n,r){C={parent:C,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{C=C.parent}},t.prototype.runGuarded=function(e,t,n,r){void 0===t&&(t=null),C={parent:C,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{C=C.parent}},t.prototype.runTask=function(e,t,n){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||_).name+"; Execution: "+this.name+")");if(e.state!==b||e.type!==Z&&e.type!==P){var r=e.state!=E;r&&e._transitionTo(E,T),e.runCount++;var o=z;z=e,C={parent:C,zone:this};try{e.type==P&&e.data&&!e.data.isPeriodic&&(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,e,t,n)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{e.state!==b&&e.state!==S&&(e.type==Z||e.data&&e.data.isPeriodic?r&&e._transitionTo(T,E):(e.runCount=0,this._updateTaskCount(e,-1),r&&e._transitionTo(b,E,b))),C=C.parent,z=o}}},t.prototype.scheduleTask=function(e){if(e.zone&&e.zone!==this)for(var t=this;t;){if(t===e.zone)throw Error("can not reschedule task to "+this.name+" which is descendants of the original zone "+e.zone.name);t=t.parent}e._transitionTo(k,b);var n=[];e._zoneDelegates=n,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(t){throw e._transitionTo(S,k,b),this._zoneDelegate.handleError(this,t),t}return e._zoneDelegates===n&&this._updateTaskCount(e,1),e.state==k&&e._transitionTo(T,k),e},t.prototype.scheduleMicroTask=function(e,t,n,r){return this.scheduleTask(new f(O,e,t,n,r,void 0))},t.prototype.scheduleMacroTask=function(e,t,n,r,o){return this.scheduleTask(new f(P,e,t,n,r,o))},t.prototype.scheduleEventTask=function(e,t,n,r,o){return this.scheduleTask(new f(Z,e,t,n,r,o))},t.prototype.cancelTask=function(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||_).name+"; Execution: "+this.name+")");e._transitionTo(w,T,E);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(S,w),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(b,w),e.runCount=0,e},t.prototype._updateTaskCount=function(e,t){var n=e._zoneDelegates;-1==t&&(e._zoneDelegates=null);for(var r=0;r<n.length;r++)n[r]._updateTaskCount(e.type,t)},t}();s.__symbol__=a;var c,u={name:"",onHasTask:function(e,t,n,r){return e.hasTask(n,r)},onScheduleTask:function(e,t,n,r){return e.scheduleTask(n,r)},onInvokeTask:function(e,t,n,r,o,a){return e.invokeTask(n,r,o,a)},onCancelTask:function(e,t,n,r){return e.cancelTask(n,r)}},l=function(){function e(e,t,n){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=e,this._parentDelegate=t,this._forkZS=n&&(n&&n.onFork?n:t._forkZS),this._forkDlgt=n&&(n.onFork?t:t._forkDlgt),this._forkCurrZone=n&&(n.onFork?this.zone:t._forkCurrZone),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this.zone:t._interceptCurrZone),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this.zone:t._invokeCurrZone),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this.zone:t._handleErrorCurrZone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this.zone:t._scheduleTaskCurrZone),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this.zone:t._invokeTaskCurrZone),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this.zone:t._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;var r=n&&n.onHasTask;(r||t&&t._hasTaskZS)&&(this._hasTaskZS=r?n:u,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=e,n.onScheduleTask||(this._scheduleTaskZS=u,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this.zone),n.onInvokeTask||(this._invokeTaskZS=u,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this.zone),n.onCancelTask||(this._cancelTaskZS=u,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this.zone))}return e.prototype.fork=function(e,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,t):new s(e,t)},e.prototype.intercept=function(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,e,t,n):t},e.prototype.invoke=function(e,t,n,r,o){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,e,t,n,r,o):t.apply(n,r)},e.prototype.handleError=function(e,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,e,t)},e.prototype.scheduleTask=function(e,t){var n=t;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),(n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,e,t))||(n=t);else if(t.scheduleFn)t.scheduleFn(t);else{if(t.type!=O)throw new Error("Task is missing scheduleFn.");y(t)}return n},e.prototype.invokeTask=function(e,t,n,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,e,t,n,r):t.callback.apply(n,r)},e.prototype.cancelTask=function(e,t){var n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,e,t);else{if(!t.cancelFn)throw Error("Task is not cancelable");n=t.cancelFn(t)}return n},e.prototype.hasTask=function(e,t){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,e,t)}catch(t){this.handleError(e,t)}},e.prototype._updateTaskCount=function(e,t){var n=this._taskCounts,r=n[e],o=n[e]=r+t;if(o<0)throw new Error("More tasks executed then were scheduled.");0!=r&&0!=o||this.hasTask(this.zone,{microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e})},e}(),f=function(){function t(n,r,o,a,i,s){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=n,this.source=r,this.data=a,this.scheduleFn=i,this.cancelFn=s,!o)throw new Error("callback is not defined");this.callback=o;var c=this;this.invoke=n===Z&&a&&a.useG?t.invokeTask:function(){return t.invokeTask.call(e,c,this,arguments)}}return t.invokeTask=function(e,t,n){e||(e=this),M++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{1==M&&m(),M--}},Object.defineProperty(t.prototype,"zone",{get:function(){return this._zone},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!0,configurable:!0}),t.prototype.cancelScheduleRequest=function(){this._transitionTo(b,k)},t.prototype._transitionTo=function(e,t,n){if(this._state!==t&&this._state!==n)throw new Error(this.type+" '"+this.source+"': can not transition to '"+e+"', expecting state '"+t+"'"+(n?" or '"+n+"'":"")+", was '"+this._state+"'.");this._state=e,e==b&&(this._zoneDelegates=null)},t.prototype.toString=function(){return this.data&&void 0!==this.data.handleId?this.data.handleId.toString():Object.prototype.toString.call(this)},t.prototype.toJSON=function(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}},t}(),p=a("setTimeout"),h=a("Promise"),d=a("then"),v=[],g=!1;function y(t){if(0===M&&0===v.length)if(c||e[h]&&(c=e[h].resolve(0)),c){var n=c[d];n||(n=c.then),n.call(c,m)}else e[p](m,0);t&&v.push(t)}function m(){if(!g){for(g=!0;v.length;){var e=v;v=[];for(var t=0;t<e.length;t++){var n=e[t];try{n.zone.runTask(n,null,null)}catch(e){j.onUnhandledError(e)}}}j.microtaskDrainDone(),g=!1}}var _={name:"NO ZONE"},b="notScheduled",k="scheduling",T="scheduled",E="running",w="canceling",S="unknown",O="microTask",P="macroTask",Z="eventTask",D={},j={symbol:a,currentZoneFrame:function(){return C},onUnhandledError:I,microtaskDrainDone:I,scheduleMicroTask:y,showUncaughtError:function(){return!s[a("ignoreConsoleErrorUncaughtError")]},patchEventTarget:function(){return[]},patchOnProperties:I,patchMethod:function(){return I},bindArguments:function(){return[]},patchThen:function(){return I},patchMacroTask:function(){return I},setNativePromise:function(e){e&&"function"==typeof e.resolve&&(c=e.resolve(0))},patchEventPrototype:function(){return I},isIEOrEdge:function(){return!1},getGlobalObjects:function(){},ObjectDefineProperty:function(){return I},ObjectGetOwnPropertyDescriptor:function(){},ObjectCreate:function(){},ArraySlice:function(){return[]},patchClass:function(){return I},wrapWithCurrentZone:function(){return I},filterProperties:function(){return[]},attachOriginToPatched:function(){return I},_redefineProperty:function(){return I},patchCallbacks:function(){return I}},C={parent:null,zone:new s(null,null)},z=null,M=0;function I(){}r("Zone","Zone"),e.Zone=s}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global),
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
Zone.__load_patch("ZoneAwarePromise",function(e,t,n){var r=Object.getOwnPropertyDescriptor,o=Object.defineProperty,a=n.symbol,i=[],s=a("Promise"),c=a("then"),u="__creationTrace__";n.onUnhandledError=function(e){if(n.showUncaughtError()){var t=e&&e.rejection;t?console.error("Unhandled Promise rejection:",t instanceof Error?t.message:t,"; Zone:",e.zone.name,"; Task:",e.task&&e.task.source,"; Value:",t,t instanceof Error?t.stack:void 0):console.error(e)}},n.microtaskDrainDone=function(){for(;i.length;)for(var e=function(){var e=i.shift();try{e.zone.runGuarded(function(){throw e})}catch(e){f(e)}};i.length;)e()};var l=a("unhandledPromiseRejectionHandler");function f(e){n.onUnhandledError(e);try{var r=t[l];r&&"function"==typeof r&&r.call(this,e)}catch(e){}}function p(e){return e&&e.then}function h(e){return e}function d(e){return M.reject(e)}var v=a("state"),g=a("value"),y=a("finally"),m=a("parentPromiseValue"),_=a("parentPromiseState"),b="Promise.then",k=null,T=!0,E=!1,w=0;function S(e,t){return function(n){try{D(e,t,n)}catch(t){D(e,!1,t)}}}var O=function(){var e=!1;return function t(n){return function(){e||(e=!0,n.apply(null,arguments))}}},P="Promise resolved with itself",Z=a("currentTaskTrace");function D(e,r,a){var s=O();if(e===a)throw new TypeError(P);if(e[v]===k){var c=null;try{"object"!=typeof a&&"function"!=typeof a||(c=a&&a.then)}catch(t){return s(function(){D(e,!1,t)})(),e}if(r!==E&&a instanceof M&&a.hasOwnProperty(v)&&a.hasOwnProperty(g)&&a[v]!==k)C(a),D(e,a[v],a[g]);else if(r!==E&&"function"==typeof c)try{c.call(a,s(S(e,r)),s(S(e,!1)))}catch(t){s(function(){D(e,!1,t)})()}else{e[v]=r;var l=e[g];if(e[g]=a,e[y]===y&&r===T&&(e[v]=e[_],e[g]=e[m]),r===E&&a instanceof Error){var f=t.currentTask&&t.currentTask.data&&t.currentTask.data[u];f&&o(a,Z,{configurable:!0,enumerable:!1,writable:!0,value:f})}for(var p=0;p<l.length;)z(e,l[p++],l[p++],l[p++],l[p++]);if(0==l.length&&r==E){e[v]=w;var h=void 0;if(a instanceof Error||a&&a.message)h=a;else try{throw new Error("Uncaught (in promise): "+function d(e){return e&&e.toString===Object.prototype.toString?(e.constructor&&e.constructor.name||"")+": "+JSON.stringify(e):e?e.toString():Object.prototype.toString.call(e)}(a)+(a&&a.stack?"\n"+a.stack:""))}catch(e){h=e}h.rejection=a,h.promise=e,h.zone=t.current,h.task=t.currentTask,i.push(h),n.scheduleMicroTask()}}}return e}var j=a("rejectionHandledHandler");function C(e){if(e[v]===w){try{var n=t[j];n&&"function"==typeof n&&n.call(this,{rejection:e[g],promise:e})}catch(e){}e[v]=E;for(var r=0;r<i.length;r++)e===i[r].promise&&i.splice(r,1)}}function z(e,t,n,r,o){C(e);var a=e[v],i=a?"function"==typeof r?r:h:"function"==typeof o?o:d;t.scheduleMicroTask(b,function(){try{var r=e[g],o=!!n&&y===n[y];o&&(n[m]=r,n[_]=a);var s=t.run(i,void 0,o&&i!==d&&i!==h?[]:[r]);D(n,!0,s)}catch(e){D(n,!1,e)}},n)}var M=function(){function e(t){if(!(this instanceof e))throw new Error("Must be an instanceof Promise.");this[v]=k,this[g]=[];try{t&&t(S(this,T),S(this,E))}catch(e){D(this,!1,e)}}return e.toString=function(){return"function ZoneAwarePromise() { [native code] }"},e.resolve=function(e){return D(new this(null),T,e)},e.reject=function(e){return D(new this(null),E,e)},e.race=function(e){var t,n,r=new this(function(e,r){t=e,n=r});function o(e){t(e)}function a(e){n(e)}for(var i=0,s=e;i<s.length;i++){var c=s[i];p(c)||(c=this.resolve(c)),c.then(o,a)}return r},e.all=function(e){for(var t,n,r=new this(function(e,r){t=e,n=r}),o=2,a=0,i=[],s=function(e){p(e)||(e=c.resolve(e));var r=a;e.then(function(e){i[r]=e,0==--o&&t(i)},n),o++,a++},c=this,u=0,l=e;u<l.length;u++)s(l[u]);return 0==(o-=2)&&t(i),r},Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"Promise"},enumerable:!0,configurable:!0}),e.prototype.then=function(e,n){var r=new this.constructor(null),o=t.current;return this[v]==k?this[g].push(o,r,e,n):z(this,o,r,e,n),r},e.prototype.catch=function(e){return this.then(null,e)},e.prototype.finally=function(e){var n=new this.constructor(null);n[y]=y;var r=t.current;return this[v]==k?this[g].push(r,n,e,e):z(this,r,n,e,e),n},e}();M.resolve=M.resolve,M.reject=M.reject,M.race=M.race,M.all=M.all;var I=e[s]=e.Promise,R=t.__symbol__("ZoneAwarePromise"),L=r(e,"Promise");L&&!L.configurable||(L&&delete L.writable,L&&delete L.value,L||(L={configurable:!0,enumerable:!0}),L.get=function(){return e[R]?e[R]:e[s]},L.set=function(t){t===M?e[R]=t:(e[s]=t,t.prototype[c]||x(t),n.setNativePromise(t))},o(e,"Promise",L)),e.Promise=M;var N=a("thenPatched");function x(e){var t=e.prototype,n=r(t,"then");if(!n||!1!==n.writable&&n.configurable){var o=t.then;t[c]=o,e.prototype.then=function(e,t){var n=this;return new M(function(e,t){o.call(n,e,t)}).then(e,t)},e[N]=!0}}if(n.patchThen=x,I){x(I);var F=e.fetch;"function"==typeof F&&(e[n.symbol("fetch")]=F,e.fetch=function H(e){return function(){var t=e.apply(this,arguments);if(t instanceof M)return t;var n=t.constructor;return n[N]||x(n),t}}(F))}return Promise[t.__symbol__("uncaughtPromiseErrors")]=i,M});
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var e=Object.getOwnPropertyDescriptor,t=Object.defineProperty,n=Object.getPrototypeOf,r=Object.create,o=Array.prototype.slice,a="addEventListener",i="removeEventListener",s=Zone.__symbol__(a),c=Zone.__symbol__(i),u="true",l="false",f=Zone.__symbol__("");function p(e,t){return Zone.current.wrap(e,t)}function h(e,t,n,r,o){return Zone.current.scheduleMacroTask(e,t,n,r,o)}var d=Zone.__symbol__,v="undefined"!=typeof window,g=v?window:void 0,y=v&&g||"object"==typeof self&&self||global,m="removeAttribute",_=[null];function b(e,t){for(var n=e.length-1;n>=0;n--)"function"==typeof e[n]&&(e[n]=p(e[n],t+"_"+n));return e}function k(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&void 0===e.set)}var T="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,E=!("nw"in y)&&void 0!==y.process&&"[object process]"==={}.toString.call(y.process),w=!E&&!T&&!(!v||!g.HTMLElement),S=void 0!==y.process&&"[object process]"==={}.toString.call(y.process)&&!T&&!(!v||!g.HTMLElement),O={},P=function(e){if(e=e||y.event){var t=O[e.type];t||(t=O[e.type]=d("ON_PROPERTY"+e.type));var n,r=this||e.target||y,o=r[t];return w&&r===g&&"error"===e.type?!0===(n=o&&o.call(this,e.message,e.filename,e.lineno,e.colno,e.error))&&e.preventDefault():null==(n=o&&o.apply(this,arguments))||n||e.preventDefault(),n}};function Z(n,r,o){var a=e(n,r);if(!a&&o&&e(o,r)&&(a={enumerable:!0,configurable:!0}),a&&a.configurable){var i=d("on"+r+"patched");if(!n.hasOwnProperty(i)||!n[i]){delete a.writable,delete a.value;var s=a.get,c=a.set,u=r.substr(2),l=O[u];l||(l=O[u]=d("ON_PROPERTY"+u)),a.set=function(e){var t=this;t||n!==y||(t=y),t&&(t[l]&&t.removeEventListener(u,P),c&&c.apply(t,_),"function"==typeof e?(t[l]=e,t.addEventListener(u,P,!1)):t[l]=null)},a.get=function(){var e=this;if(e||n!==y||(e=y),!e)return null;var t=e[l];if(t)return t;if(s){var o=s&&s.call(this);if(o)return a.set.call(this,o),"function"==typeof e[m]&&e.removeAttribute(r),o}return null},t(n,r,a),n[i]=!0}}}function D(e,t,n){if(t)for(var r=0;r<t.length;r++)Z(e,"on"+t[r],n);else{var o=[];for(var a in e)"on"==a.substr(0,2)&&o.push(a);for(var i=0;i<o.length;i++)Z(e,o[i],n)}}var j=d("originalInstance");function C(e){var n=y[e];if(n){y[d(e)]=n,y[e]=function(){var t=b(arguments,e);switch(t.length){case 0:this[j]=new n;break;case 1:this[j]=new n(t[0]);break;case 2:this[j]=new n(t[0],t[1]);break;case 3:this[j]=new n(t[0],t[1],t[2]);break;case 4:this[j]=new n(t[0],t[1],t[2],t[3]);break;default:throw new Error("Arg list too long.")}},R(y[e],n);var r,o=new n(function(){});for(r in o)"XMLHttpRequest"===e&&"responseBlob"===r||function(n){"function"==typeof o[n]?y[e].prototype[n]=function(){return this[j][n].apply(this[j],arguments)}:t(y[e].prototype,n,{set:function(t){"function"==typeof t?(this[j][n]=p(t,e+"."+n),R(this[j][n],t)):this[j][n]=t},get:function(){return this[j][n]}})}(r);for(r in n)"prototype"!==r&&n.hasOwnProperty(r)&&(y[e][r]=n[r])}}var z=!1;function M(t,r,o){for(var a=t;a&&!a.hasOwnProperty(r);)a=n(a);!a&&t[r]&&(a=t);var i=d(r),s=null;if(a&&!(s=a[i])&&(s=a[i]=a[r],k(a&&e(a,r)))){var c=o(s,i,r);a[r]=function(){return c(this,arguments)},R(a[r],s),z&&function u(e,t){"function"==typeof Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,{get:function(){return e[n]},set:function(t){(!r||r.writable&&"function"==typeof r.set)&&(e[n]=t)},enumerable:!r||r.enumerable,configurable:!r||r.configurable})})}(s,a[r])}return s}function I(e,t,n){var r=null;function o(e){var t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},r.apply(t.target,t.args),e}r=M(e,t,function(e){return function(t,r){var a=n(t,r);return a.cbIdx>=0&&"function"==typeof r[a.cbIdx]?h(a.name,r[a.cbIdx],a,o):e.apply(t,r)}})}function R(e,t){e[d("OriginalDelegate")]=t}var L=!1,N=!1;function x(){if(L)return N;L=!0;try{var e=g.navigator.userAgent;-1===e.indexOf("MSIE ")&&-1===e.indexOf("Trident/")&&-1===e.indexOf("Edge/")||(N=!0)}catch(e){}return N}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/Zone.__load_patch("toString",function(e){var t=Function.prototype.toString,n=d("OriginalDelegate"),r=d("Promise"),o=d("Error"),a=function a(){if("function"==typeof this){var i=this[n];if(i)return"function"==typeof i?t.call(i):Object.prototype.toString.call(i);if(this===Promise){var s=e[r];if(s)return t.call(s)}if(this===Error){var c=e[o];if(c)return t.call(c)}}return t.call(this)};a[n]=t,Function.prototype.toString=a;var i=Object.prototype.toString;Object.prototype.toString=function(){return this instanceof Promise?"[object Promise]":i.call(this)}});
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var F=!1;if("undefined"!=typeof window)try{var H=Object.defineProperty({},"passive",{get:function(){F=!0}});window.addEventListener("test",H,H),window.removeEventListener("test",H,H)}catch(e){F=!1}var A={useG:!0},B={},G={},W=new RegExp("^"+f+"(\\w+)(true|false)$"),q=d("propagationStopped");function U(e,t,r){var o=r&&r.add||a,s=r&&r.rm||i,c=r&&r.listeners||"eventListeners",p=r&&r.rmAll||"removeAllListeners",h=d(o),v="."+o+":",g="prependListener",y="."+g+":",m=function(e,t,n){if(!e.isRemoved){var r=e.callback;"object"==typeof r&&r.handleEvent&&(e.callback=function(e){return r.handleEvent(e)},e.originalDelegate=r),e.invoke(e,t,[n]);var o=e.options;o&&"object"==typeof o&&o.once&&t[s].call(t,n.type,e.originalDelegate?e.originalDelegate:e.callback,o)}},_=function(t){if(t=t||e.event){var n=this||t.target||e,r=n[B[t.type][l]];if(r)if(1===r.length)m(r[0],n,t);else for(var o=r.slice(),a=0;a<o.length&&(!t||!0!==t[q]);a++)m(o[a],n,t)}},b=function(t){if(t=t||e.event){var n=this||t.target||e,r=n[B[t.type][u]];if(r)if(1===r.length)m(r[0],n,t);else for(var o=r.slice(),a=0;a<o.length&&(!t||!0!==t[q]);a++)m(o[a],n,t)}};function k(t,r){if(!t)return!1;var a=!0;r&&void 0!==r.useG&&(a=r.useG);var i=r&&r.vh,m=!0;r&&void 0!==r.chkDup&&(m=r.chkDup);var k=!1;r&&void 0!==r.rt&&(k=r.rt);for(var T=t;T&&!T.hasOwnProperty(o);)T=n(T);if(!T&&t[o]&&(T=t),!T)return!1;if(T[h])return!1;var w,S=r&&r.eventNameToString,O={},P=T[h]=T[o],Z=T[d(s)]=T[s],D=T[d(c)]=T[c],j=T[d(p)]=T[p];function C(e){F||"boolean"==typeof O.options||null==O.options||(e.options=!!O.options.capture,O.options=e.options)}r&&r.prepend&&(w=T[d(r.prepend)]=T[r.prepend]);var z=a?function(e){if(!O.isExisting)return C(e),P.call(O.target,O.eventName,O.capture?b:_,O.options)}:function(e){return C(e),P.call(O.target,O.eventName,e.invoke,O.options)},M=a?function(e){if(!e.isRemoved){var t=B[e.eventName],n=void 0;t&&(n=t[e.capture?u:l]);var r=n&&e.target[n];if(r)for(var o=0;o<r.length;o++)if(r[o]===e){r.splice(o,1),e.isRemoved=!0,0===r.length&&(e.allRemoved=!0,e.target[n]=null);break}}if(e.allRemoved)return Z.call(e.target,e.eventName,e.capture?b:_,e.options)}:function(e){return Z.call(e.target,e.eventName,e.invoke,e.options)},I=r&&r.diff?r.diff:function(e,t){var n=typeof t;return"function"===n&&e.callback===t||"object"===n&&e.originalDelegate===t},L=Zone[d("BLACK_LISTED_EVENTS")],N=function(t,n,o,s,c,p){return void 0===c&&(c=!1),void 0===p&&(p=!1),function(){var h=this||e,d=arguments[0];r&&r.transferEventName&&(d=r.transferEventName(d));var v=arguments[1];if(!v)return t.apply(this,arguments);if(E&&"uncaughtException"===d)return t.apply(this,arguments);var g=!1;if("function"!=typeof v){if(!v.handleEvent)return t.apply(this,arguments);g=!0}if(!i||i(t,v,h,arguments)){var y,_=arguments[2];if(L)for(var b=0;b<L.length;b++)if(d===L[b])return t.apply(this,arguments);var k=!1;void 0===_?y=!1:!0===_?y=!0:!1===_?y=!1:(y=!!_&&!!_.capture,k=!!_&&!!_.once);var T,w=Zone.current,P=B[d];if(P)T=P[y?u:l];else{var Z=(S?S(d):d)+l,D=(S?S(d):d)+u,j=f+Z,C=f+D;B[d]={},B[d][l]=j,B[d][u]=C,T=y?C:j}var z,M=h[T],R=!1;if(M){if(R=!0,m)for(b=0;b<M.length;b++)if(I(M[b],v))return}else M=h[T]=[];var N=h.constructor.name,x=G[N];x&&(z=x[d]),z||(z=N+n+(S?S(d):d)),O.options=_,k&&(O.options.once=!1),O.target=h,O.capture=y,O.eventName=d,O.isExisting=R;var H=a?A:void 0;H&&(H.taskData=O);var W=w.scheduleEventTask(z,v,H,o,s);return O.target=null,H&&(H.taskData=null),k&&(_.once=!0),(F||"boolean"!=typeof W.options)&&(W.options=_),W.target=h,W.capture=y,W.eventName=d,g&&(W.originalDelegate=v),p?M.unshift(W):M.push(W),c?h:void 0}}};return T[o]=N(P,v,z,M,k),w&&(T[g]=N(w,y,function(e){return w.call(O.target,O.eventName,e.invoke,O.options)},M,k,!0)),T[s]=function(){var t=this||e,n=arguments[0];r&&r.transferEventName&&(n=r.transferEventName(n));var o,a=arguments[2];o=void 0!==a&&(!0===a||!1!==a&&!!a&&!!a.capture);var s=arguments[1];if(!s)return Z.apply(this,arguments);if(!i||i(Z,s,t,arguments)){var c,p=B[n];p&&(c=p[o?u:l]);var h=c&&t[c];if(h)for(var d=0;d<h.length;d++){var v=h[d];if(I(v,s))return h.splice(d,1),v.isRemoved=!0,0===h.length&&(v.allRemoved=!0,t[c]=null,"string"==typeof n&&(t[f+"ON_PROPERTY"+n]=null)),v.zone.cancelTask(v),k?t:void 0}return Z.apply(this,arguments)}},T[c]=function(){var t=this||e,n=arguments[0];r&&r.transferEventName&&(n=r.transferEventName(n));for(var o=[],a=X(t,S?S(n):n),i=0;i<a.length;i++){var s=a[i];o.push(s.originalDelegate?s.originalDelegate:s.callback)}return o},T[p]=function(){var t=this||e,n=arguments[0];if(n){r&&r.transferEventName&&(n=r.transferEventName(n));var o=B[n];if(o){var a=t[o[l]],i=t[o[u]];if(a){var c=a.slice();for(d=0;d<c.length;d++)this[s].call(this,n,(f=c[d]).originalDelegate?f.originalDelegate:f.callback,f.options)}if(i)for(c=i.slice(),d=0;d<c.length;d++){var f;this[s].call(this,n,(f=c[d]).originalDelegate?f.originalDelegate:f.callback,f.options)}}}else{for(var h=Object.keys(t),d=0;d<h.length;d++){var v=W.exec(h[d]),g=v&&v[1];g&&"removeListener"!==g&&this[p].call(this,g)}this[p].call(this,"removeListener")}if(k)return this},R(T[o],P),R(T[s],Z),j&&R(T[p],j),D&&R(T[c],D),!0}for(var T=[],w=0;w<t.length;w++)T[w]=k(t[w],r);return T}function X(e,t){var n=[];for(var r in e){var o=W.exec(r),a=o&&o[1];if(a&&(!t||a===t)){var i=e[r];if(i)for(var s=0;s<i.length;s++)n.push(i[s])}}return n}function V(e,t){var n=e.Event;n&&n.prototype&&t.patchMethod(n.prototype,"stopImmediatePropagation",function(e){return function(t,n){t[q]=!0,e&&e.apply(t,n)}})}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/function Y(e,t,n,r,o){var a=Zone.__symbol__(r);if(!t[a]){var i=t[a]=t[r];t[r]=function(a,s,c){return s&&s.prototype&&o.forEach(function(t){var o=n+"."+r+"::"+t,a=s.prototype;if(a.hasOwnProperty(t)){var i=e.ObjectGetOwnPropertyDescriptor(a,t);i&&i.value?(i.value=e.wrapWithCurrentZone(i.value,o),e._redefineProperty(s.prototype,t,i)):a[t]&&(a[t]=e.wrapWithCurrentZone(a[t],o))}else a[t]&&(a[t]=e.wrapWithCurrentZone(a[t],o))}),i.call(t,a,s,c)},e.attachOriginToPatched(t[r],i)}}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/var K=Zone.__symbol__,J=Object[K("defineProperty")]=Object.defineProperty,Q=Object[K("getOwnPropertyDescriptor")]=Object.getOwnPropertyDescriptor,$=Object.create,ee=K("unconfigurables");function te(e,t,n){var r=n.configurable;return oe(e,t,n=re(e,t,n),r)}function ne(e,t){return e&&e[ee]&&e[ee][t]}function re(e,t,n){return Object.isFrozen(n)||(n.configurable=!0),n.configurable||(e[ee]||Object.isFrozen(e)||J(e,ee,{writable:!0,value:{}}),e[ee]&&(e[ee][t]=!0)),n}function oe(e,t,n,r){try{return J(e,t,n)}catch(a){if(!n.configurable)throw a;void 0===r?delete n.configurable:n.configurable=r;try{return J(e,t,n)}catch(r){var o=null;try{o=JSON.stringify(n)}catch(e){o=n.toString()}console.log("Attempting to configure '"+t+"' with descriptor '"+o+"' on object '"+e+"' and got error, giving up: "+r)}}}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/var ae=["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","vrdisplyconnected","vrdisplaydisconnected","vrdisplaypresentchange"],ie=["encrypted","waitingforkey","msneedkey","mozinterruptbegin","mozinterruptend"],se=["load"],ce=["blur","error","focus","load","resize","scroll","messageerror"],ue=["bounce","finish","start"],le=["loadstart","progress","abort","error","load","progress","timeout","loadend","readystatechange"],fe=["upgradeneeded","complete","abort","success","error","blocked","versionchange","close"],pe=["close","error","open","message"],he=["error","message"],de=["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"].concat(["webglcontextrestored","webglcontextlost","webglcontextcreationerror"],["autocomplete","autocompleteerror"],["toggle"],["afterscriptexecute","beforescriptexecute","DOMContentLoaded","freeze","fullscreenchange","mozfullscreenchange","webkitfullscreenchange","msfullscreenchange","fullscreenerror","mozfullscreenerror","webkitfullscreenerror","msfullscreenerror","readystatechange","visibilitychange","resume"],ae,["beforecopy","beforecut","beforepaste","copy","cut","paste","dragstart","loadend","animationstart","search","transitionrun","transitionstart","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend"],["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"]);function ve(e,t,n){if(!n||0===n.length)return t;var r=n.filter(function(t){return t.target===e});if(!r||0===r.length)return t;var o=r[0].ignoreProperties;return t.filter(function(e){return-1===o.indexOf(e)})}function ge(e,t,n,r){e&&D(e,ve(e,t,n),r)}function ye(e,t){if((!E||S)&&!Zone[e.symbol("patchEvents")]){var r="undefined"!=typeof WebSocket,o=t.__Zone_ignore_on_properties;if(w){var a=window,i=function s(){try{var e=g.navigator.userAgent;if(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/"))return!0}catch(e){}return!1}?[{target:a,ignoreProperties:["error"]}]:[];ge(a,de.concat(["messageerror"]),o?o.concat(i):o,n(a)),ge(Document.prototype,de,o),void 0!==a.SVGElement&&ge(a.SVGElement.prototype,de,o),ge(Element.prototype,de,o),ge(HTMLElement.prototype,de,o),ge(HTMLMediaElement.prototype,ie,o),ge(HTMLFrameSetElement.prototype,ae.concat(ce),o),ge(HTMLBodyElement.prototype,ae.concat(ce),o),ge(HTMLFrameElement.prototype,se,o),ge(HTMLIFrameElement.prototype,se,o);var c=a.HTMLMarqueeElement;c&&ge(c.prototype,ue,o);var u=a.Worker;u&&ge(u.prototype,he,o)}var l=t.XMLHttpRequest;l&&ge(l.prototype,le,o);var f=t.XMLHttpRequestEventTarget;f&&ge(f&&f.prototype,le,o),"undefined"!=typeof IDBIndex&&(ge(IDBIndex.prototype,fe,o),ge(IDBRequest.prototype,fe,o),ge(IDBOpenDBRequest.prototype,fe,o),ge(IDBDatabase.prototype,fe,o),ge(IDBTransaction.prototype,fe,o),ge(IDBCursor.prototype,fe,o)),r&&ge(WebSocket.prototype,pe,o)}}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function me(e,t){var n=t.getGlobalObjects(),r=n.eventNames,o=n.globalSources,a=n.zoneSymbolEventNames,i=n.TRUE_STR,s=n.FALSE_STR,c=n.ZONE_SYMBOL_PREFIX,u="ApplicationCache,EventSource,FileReader,InputMethodContext,MediaController,MessagePort,Node,Performance,SVGElementInstance,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebKitNamedFlow,Window,Worker,WorkerGlobalScope,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload,IDBRequest,IDBOpenDBRequest,IDBDatabase,IDBTransaction,IDBCursor,DBIndex,WebSocket".split(","),l=[],f=e.wtf,p="Anchor,Area,Audio,BR,Base,BaseFont,Body,Button,Canvas,Content,DList,Directory,Div,Embed,FieldSet,Font,Form,Frame,FrameSet,HR,Head,Heading,Html,IFrame,Image,Input,Keygen,LI,Label,Legend,Link,Map,Marquee,Media,Menu,Meta,Meter,Mod,OList,Object,OptGroup,Option,Output,Paragraph,Pre,Progress,Quote,Script,Select,Source,Span,Style,TableCaption,TableCell,TableCol,Table,TableRow,TableSection,TextArea,Title,Track,UList,Unknown,Video".split(",");f?l=p.map(function(e){return"HTML"+e+"Element"}).concat(u):e.EventTarget?l.push("EventTarget"):l=u;for(var h=e.__Zone_disable_IE_check||!1,d=e.__Zone_enable_cross_context_check||!1,v=t.isIEOrEdge(),g="function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] }",y={MSPointerCancel:"pointercancel",MSPointerDown:"pointerdown",MSPointerEnter:"pointerenter",MSPointerHover:"pointerhover",MSPointerLeave:"pointerleave",MSPointerMove:"pointermove",MSPointerOut:"pointerout",MSPointerOver:"pointerover",MSPointerUp:"pointerup"},m=0;m<r.length;m++){var _=c+((w=r[m])+s),b=c+(w+i);a[w]={},a[w][s]=_,a[w][i]=b}for(m=0;m<p.length;m++)for(var k=p[m],T=o[k]={},E=0;E<r.length;E++){var w;T[w=r[E]]=k+".addEventListener:"+w}var S=[];for(m=0;m<l.length;m++){var O=e[l[m]];S.push(O&&O.prototype)}return t.patchEventTarget(e,S,{vh:function(e,t,n,r){if(!h&&v){if(d)try{var o;if("[object FunctionWrapper]"===(o=t.toString())||o==g)return e.apply(n,r),!1}catch(t){return e.apply(n,r),!1}else if("[object FunctionWrapper]"===(o=t.toString())||o==g)return e.apply(n,r),!1}else if(d)try{t.toString()}catch(t){return e.apply(n,r),!1}return!0},transferEventName:function(e){return y[e]||e}}),Zone[t.symbol("patchEventTarget")]=!!e.EventTarget,!0}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function _e(e,t){var n=e.getGlobalObjects();if((!n.isNode||n.isMix)&&!function r(e,t){var n=e.getGlobalObjects();if((n.isBrowser||n.isMix)&&!e.ObjectGetOwnPropertyDescriptor(HTMLElement.prototype,"onclick")&&"undefined"!=typeof Element){var r=e.ObjectGetOwnPropertyDescriptor(Element.prototype,"onclick");if(r&&!r.configurable)return!1;if(r){e.ObjectDefineProperty(Element.prototype,"onclick",{enumerable:!0,configurable:!0,get:function(){return!0}});var o=!!document.createElement("div").onclick;return e.ObjectDefineProperty(Element.prototype,"onclick",r),o}}var a=t.XMLHttpRequest;if(!a)return!1;var i=a.prototype,s=e.ObjectGetOwnPropertyDescriptor(i,"onreadystatechange");if(s)return e.ObjectDefineProperty(i,"onreadystatechange",{enumerable:!0,configurable:!0,get:function(){return!0}}),o=!!(u=new a).onreadystatechange,e.ObjectDefineProperty(i,"onreadystatechange",s||{}),o;var c=e.symbol("fake");e.ObjectDefineProperty(i,"onreadystatechange",{enumerable:!0,configurable:!0,get:function(){return this[c]},set:function(e){this[c]=e}});var u,l=function(){};return(u=new a).onreadystatechange=l,o=u[c]===l,u.onreadystatechange=null,o}(e,t)){var o="undefined"!=typeof WebSocket;!function a(e){for(var t=e.getGlobalObjects().eventNames,n=e.symbol("unbound"),r=function(r){var o=t[r],a="on"+o;self.addEventListener(o,function(t){var r,o,i=t.target;for(o=i?i.constructor.name+"."+a:"unknown."+a;i;)i[a]&&!i[a][n]&&((r=e.wrapWithCurrentZone(i[a],o))[n]=i[a],i[a]=r),i=i.parentElement},!0)},o=0;o<t.length;o++)r(o)}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/(e),e.patchClass("XMLHttpRequest"),o&&function i(e,t){var n=e.getGlobalObjects(),r=n.ADD_EVENT_LISTENER_STR,o=n.REMOVE_EVENT_LISTENER_STR,a=t.WebSocket;t.EventTarget||e.patchEventTarget(t,[a.prototype]),t.WebSocket=function(t,n){var i,s,c=arguments.length>1?new a(t,n):new a(t),u=e.ObjectGetOwnPropertyDescriptor(c,"onmessage");return u&&!1===u.configurable?(i=e.ObjectCreate(c),s=c,[r,o,"send","close"].forEach(function(t){i[t]=function(){var n=e.ArraySlice.call(arguments);if(t===r||t===o){var a=n.length>0?n[0]:void 0;if(a){var s=Zone.__symbol__("ON_PROPERTY"+a);c[s]=i[s]}}return c[t].apply(c,n)}})):i=c,e.patchOnProperties(i,["close","error","message","open"],s),i};var i=t.WebSocket;for(var s in a)i[s]=a[s]}(e,t),Zone[e.symbol("patchEvents")]=!0}}Zone.__load_patch("util",function(n,s,c){c.patchOnProperties=D,c.patchMethod=M,c.bindArguments=b,c.patchMacroTask=I;var h=s.__symbol__("BLACK_LISTED_EVENTS"),d=s.__symbol__("UNPATCHED_EVENTS");n[d]&&(n[h]=n[d]),n[h]&&(s[h]=s[d]=n[h]),c.patchEventPrototype=V,c.patchEventTarget=U,c.isIEOrEdge=x,c.ObjectDefineProperty=t,c.ObjectGetOwnPropertyDescriptor=e,c.ObjectCreate=r,c.ArraySlice=o,c.patchClass=C,c.wrapWithCurrentZone=p,c.filterProperties=ve,c.attachOriginToPatched=R,c._redefineProperty=te,c.patchCallbacks=Y,c.getGlobalObjects=function(){return{globalSources:G,zoneSymbolEventNames:B,eventNames:de,isBrowser:w,isMix:S,isNode:E,TRUE_STR:u,FALSE_STR:l,ZONE_SYMBOL_PREFIX:f,ADD_EVENT_LISTENER_STR:a,REMOVE_EVENT_LISTENER_STR:i}}}),
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function(e){e[Zone.__symbol__("legacyPatch")]=function(){var t=e.Zone;t.__load_patch("defineProperty",function(){!function e(){Object.defineProperty=function(e,t,n){if(ne(e,t))throw new TypeError("Cannot assign to read only property '"+t+"' of "+e);var r=n.configurable;return"prototype"!==t&&(n=re(e,t,n)),oe(e,t,n,r)},Object.defineProperties=function(e,t){return Object.keys(t).forEach(function(n){Object.defineProperty(e,n,t[n])}),e},Object.create=function(e,t){return"object"!=typeof t||Object.isFrozen(t)||Object.keys(t).forEach(function(n){t[n]=re(e,n,t[n])}),$(e,t)},Object.getOwnPropertyDescriptor=function(e,t){var n=Q(e,t);return n&&ne(e,t)&&(n.configurable=!1),n}}()}),t.__load_patch("registerElement",function(e,t,n){!function r(e,t){var n=t.getGlobalObjects();(n.isBrowser||n.isMix)&&"registerElement"in e.document&&t.patchCallbacks(t,document,"Document","registerElement",["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"])}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/(e,n)}),t.__load_patch("EventTargetLegacy",function(e,t,n){me(e,n),_e(n,e)})}}("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{});
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var be=d("zoneTask");function ke(e,t,n,r){var o=null,a=null;n+=r;var i={};function s(t){var n=t.data;return n.args[0]=function r(){try{t.invoke.apply(this,arguments)}finally{t.data&&t.data.isPeriodic||("number"==typeof n.handleId?delete i[n.handleId]:n.handleId&&(n.handleId[be]=null))}},n.handleId=o.apply(e,n.args),t}function c(e){return a(e.data.handleId)}o=M(e,t+=r,function(n){return function(o,a){if("function"==typeof a[0]){var u=h(t,a[0],{isPeriodic:"Interval"===r,delay:"Timeout"===r||"Interval"===r?a[1]||0:void 0,args:a},s,c);if(!u)return u;var l=u.data.handleId;return"number"==typeof l?i[l]=u:l&&(l[be]=u),l&&l.ref&&l.unref&&"function"==typeof l.ref&&"function"==typeof l.unref&&(u.ref=l.ref.bind(l),u.unref=l.unref.bind(l)),"number"==typeof l||l?l:u}return n.apply(e,a)}}),a=M(e,n,function(t){return function(n,r){var o,a=r[0];"number"==typeof a?o=i[a]:(o=a&&a[be])||(o=a),o&&"string"==typeof o.type?"notScheduled"!==o.state&&(o.cancelFn&&o.data.isPeriodic||0===o.runCount)&&("number"==typeof a?delete i[a]:a&&(a[be]=null),o.zone.cancelTask(o)):t.apply(e,r)}})}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function Te(e,t){if(!Zone[t.symbol("patchEventTarget")]){for(var n=t.getGlobalObjects(),r=n.eventNames,o=n.zoneSymbolEventNames,a=n.TRUE_STR,i=n.FALSE_STR,s=n.ZONE_SYMBOL_PREFIX,c=0;c<r.length;c++){var u=r[c],l=s+(u+i),f=s+(u+a);o[u]={},o[u][i]=l,o[u][a]=f}var p=e.EventTarget;if(p&&p.prototype)return t.patchEventTarget(e,[p&&p.prototype]),!0}}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
Zone.__load_patch("legacy",function(e){var t=e[Zone.__symbol__("legacyPatch")];t&&t()}),Zone.__load_patch("timers",function(e){ke(e,"set","clear","Timeout"),ke(e,"set","clear","Interval"),ke(e,"set","clear","Immediate")}),Zone.__load_patch("requestAnimationFrame",function(e){ke(e,"request","cancel","AnimationFrame"),ke(e,"mozRequest","mozCancel","AnimationFrame"),ke(e,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",function(e,t){for(var n=["alert","prompt","confirm"],r=0;r<n.length;r++)M(e,n[r],function(n,r,o){return function(r,a){return t.current.run(n,e,a,o)}})}),Zone.__load_patch("EventTarget",function(e,t,n){!function r(e,t){t.patchEventPrototype(e,t)}(e,n),Te(e,n);var o=e.XMLHttpRequestEventTarget;o&&o.prototype&&n.patchEventTarget(e,[o.prototype]),C("MutationObserver"),C("WebKitMutationObserver"),C("IntersectionObserver"),C("FileReader")}),Zone.__load_patch("on_property",function(e,t,n){ye(n,e)}),Zone.__load_patch("customElements",function(e,t,n){!function r(e,t){var n=t.getGlobalObjects();(n.isBrowser||n.isMix)&&e.customElements&&"customElements"in e&&t.patchCallbacks(t,e.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback"])}(e,n)}),Zone.__load_patch("XHR",function(e,t){!function n(e){var n=e.XMLHttpRequest;if(n){var f=n.prototype,p=f[s],v=f[c];if(!p){var g=e.XMLHttpRequestEventTarget;if(g){var y=g.prototype;p=y[s],v=y[c]}}var m="readystatechange",_="scheduled",b=M(f,"open",function(){return function(e,t){return e[o]=0==t[2],e[u]=t[1],b.apply(e,t)}}),k=d("fetchTaskAborting"),T=d("fetchTaskScheduling"),E=M(f,"send",function(){return function(e,n){if(!0===t.current[T])return E.apply(e,n);if(e[o])return E.apply(e,n);var r={target:e,url:e[u],isPeriodic:!1,args:n,aborted:!1},a=h("XMLHttpRequest.send",O,r,S,P);e&&!0===e[l]&&!r.aborted&&a.state===_&&a.invoke()}}),w=M(f,"abort",function(){return function(e,n){var o=function a(e){return e[r]}(e);if(o&&"string"==typeof o.type){if(null==o.cancelFn||o.data&&o.data.aborted)return;o.zone.cancelTask(o)}else if(!0===t.current[k])return w.apply(e,n)}})}function S(e){var n=e.data,o=n.target;o[i]=!1,o[l]=!1;var u=o[a];p||(p=o[s],v=o[c]),u&&v.call(o,m,u);var f=o[a]=function(){if(o.readyState===o.DONE)if(!n.aborted&&o[i]&&e.state===_){var r=o[t.__symbol__("loadfalse")];if(r&&r.length>0){var a=e.invoke;e.invoke=function(){for(var r=o[t.__symbol__("loadfalse")],i=0;i<r.length;i++)r[i]===e&&r.splice(i,1);n.aborted||e.state!==_||a.call(e)},r.push(e)}else e.invoke()}else n.aborted||!1!==o[i]||(o[l]=!0)};return p.call(o,m,f),o[r]||(o[r]=e),E.apply(o,n.args),o[i]=!0,e}function O(){}function P(e){var t=e.data;return t.aborted=!0,w.apply(t.target,t.args)}}(e);var r=d("xhrTask"),o=d("xhrSync"),a=d("xhrListener"),i=d("xhrScheduled"),u=d("xhrURL"),l=d("xhrErrorBeforeScheduled")}),Zone.__load_patch("geolocation",function(t){t.navigator&&t.navigator.geolocation&&function n(t,r){for(var o=t.constructor.name,a=function(n){var a=r[n],i=t[a];if(i){if(!k(e(t,a)))return"continue";t[a]=function(e){var t=function(){return e.apply(this,b(arguments,o+"."+a))};return R(t,e),t}(i)}},i=0;i<r.length;i++)a(i)}(t.navigator.geolocation,["getCurrentPosition","watchPosition"])}),Zone.__load_patch("PromiseRejectionEvent",function(e,t){function n(t){return function(n){X(e,t).forEach(function(r){var o=e.PromiseRejectionEvent;if(o){var a=new o(t,{promise:n.promise,reason:n.rejection});r.invoke(a)}})}}e.PromiseRejectionEvent&&(t[d("unhandledPromiseRejectionHandler")]=n("unhandledrejection"),t[d("rejectionHandledHandler")]=n("rejectionhandled"))})});
{
"name": "zone.js",
"version": "0.9.1",
"version": "0.10.0",
"description": "Zones for JavaScript",

@@ -17,41 +17,18 @@ "main": "dist/zone-node.js",

},
"devDependencies": {
"domino": "2.1.2",
"mocha": "^3.1.2",
"mock-require": "3.0.3",
"promises-aplus-tests": "^2.1.2",
"typescript": "~3.4.2"
},
"scripts": {
"changelog": "gulp changelog",
"ci": "npm run lint && npm run format && npm run promisetest && npm run test:single && npm run test-node",
"closure:test": "scripts/closure/closure_compiler.sh",
"format": "gulp format:enforce",
"karma-jasmine": "karma start karma-build-jasmine.conf.js",
"karma-jasmine:es2015": "karma start karma-build-jasmine.es2015.conf.js",
"karma-jasmine:phantomjs": "karma start karma-build-jasmine-phantomjs.conf.js --single-run",
"karma-jasmine:single": "karma start karma-build-jasmine.conf.js --single-run",
"karma-jasmine:autoclose": "npm run karma-jasmine:single && npm run ws-client",
"karma-jasmine-phantomjs:autoclose": "npm run karma-jasmine:phantomjs && npm run ws-client",
"lint": "gulp lint",
"prepublish": "tsc && gulp build",
"promisetest": "gulp promisetest",
"promisefinallytest": "mocha promise.finally.spec.js",
"webdriver-start": "webdriver-manager update && webdriver-manager start",
"webdriver-http": "node simple-server.js",
"webdriver-test": "node test/webdriver/test.js",
"webdriver-sauce-test": "node test/webdriver/test.sauce.js",
"ws-client": "node ./test/ws-client.js",
"ws-server": "node ./test/ws-server.js",
"tsc": "tsc -p .",
"tsc:w": "tsc -w -p .",
"tsc:esm2015": "tsc -p tsconfig-esm-2015.json",
"tslint": "tslint -c tslint.json 'lib/**/*.ts'",
"test": "npm run tsc && concurrently \"npm run tsc:w\" \"npm run ws-server\" \"npm run karma-jasmine\"",
"test:es2015": "npm run tsc && concurrently \"npm run tsc:w\" \"npm run ws-server\" \"npm run karma-jasmine:es2015\"",
"test:phantomjs": "npm run tsc && concurrently \"npm run tsc:w\" \"npm run ws-server\" \"npm run karma-jasmine:phantomjs\"",
"test:phantomjs-single": "npm run tsc && concurrently \"npm run ws-server\" \"npm run karma-jasmine-phantomjs:autoclose\"",
"test:single": "npm run tsc && concurrently \"npm run ws-server\" \"npm run karma-jasmine:autoclose\"",
"test-dist": "concurrently \"npm run tsc:w\" \"npm run ws-server\" \"karma start karma-dist-jasmine.conf.js\"",
"test-node": "gulp test/node",
"test-bluebird": "gulp test/bluebird",
"test-mocha": "npm run tsc && concurrently \"npm run tsc:w\" \"npm run ws-server\" \"karma start karma-build-mocha.conf.js\"",
"serve": "python -m SimpleHTTPServer 8000"
"promisetest": "tsc -p . && node ./promise-test.js",
"promisefinallytest": "tsc -p . && mocha promise.finally.spec.js",
"electrontest": "cd test/extra && node electron.js"
},
"repository": {
"type": "git",
"url": "git://github.com/angular/zone.js.git"
"url": "git://github.com/angular/angular.git",
"directory": "packages/zone.js"
},

@@ -61,57 +38,4 @@ "author": "Brian Ford",

"bugs": {
"url": "https://github.com/angular/zone.js/issues"
},
"dependencies": {},
"devDependencies": {
"@types/jasmine": "2.2.33",
"@types/node": "^9.x",
"@types/systemjs": "^0.19.30",
"assert": "^1.4.1",
"bluebird": "^3.5.1",
"clang-format": "^1.2.3",
"concurrently": "^2.2.0",
"conventional-changelog": "^1.1.7",
"core-js": "^2.5.7",
"core-js-bundle": "^3.0.0-alpha.1",
"es6-promise": "^3.0.2",
"google-closure-compiler": "^20170409.0.0",
"gulp": "^3.8.11",
"gulp-clang-format": "^1.0.25",
"gulp-conventional-changelog": "^1.1.7",
"gulp-rename": "^1.2.2",
"gulp-rollup": "^2.16.1",
"gulp-terser": "^1.1.7",
"gulp-tsc": "^1.1.4",
"gulp-tslint": "^7.0.1",
"gulp-uglify": "^1.2.0",
"gulp-util": "^3.0.7",
"jasmine": "^3.3.1",
"jasmine-core": "^2.9.1",
"karma": "^0.13.14",
"karma-chrome-launcher": "^0.2.1",
"karma-firefox-launcher": "^0.1.4",
"karma-jasmine": "^1.1.1",
"karma-mocha": "^1.2.0",
"karma-phantomjs-launcher": "^1.0.4",
"karma-safari-launcher": "^0.1.1",
"karma-sauce-launcher": "^0.2.10",
"karma-sourcemap-loader": "^0.3.6",
"mocha": "^3.1.2",
"nodejs-websocket": "^1.2.0",
"phantomjs": "^2.1.7",
"promises-aplus-tests": "^2.1.2",
"pump": "^1.0.1",
"rxjs": "^6.2.1",
"selenium-webdriver": "^3.4.0",
"systemjs": "^0.19.37",
"terser": "^3.16.1",
"ts-loader": "^0.6.0",
"tslint": "^4.1.1",
"tslint-eslint-rules": "^3.1.0",
"typescript": "^3.2.2",
"vrsource-tslint-rules": "^4.0.0",
"webdriver-manager": "^12.0.6",
"webdriverio": "^4.8.0",
"whatwg-fetch": "^2.0.1"
"url": "https://github.com/angular/angular/issues"
}
}
# Zone.js
[![Build Status](https://travis-ci.org/angular/zone.js.png)](https://travis-ci.org/angular/zone.js)
[![CDNJS](https://img.shields.io/cdnjs/v/zone.js.svg)](https://cdnjs.com/libraries/zone.js)
Implements _Zones_ for JavaScript, inspired by [Dart](https://www.dartlang.org/articles/zones/).
Implements _Zones_ for JavaScript, inspired by [Dart](https://dart.dev/articles/archive/zones).
> If you're using zone.js via unpkg (i.e. using `https://unpkg.com/zone.js`)
> and you're using any of the following libraries, make sure you import them first
> and you're using any of the following libraries, make sure you import them first

@@ -17,3 +16,3 @@ > * 'newrelic' as it patches global.Promise before zone.js does

See the new API [here](./dist/zone.js.d.ts).
See the new API [here](./lib/zone.ts).

@@ -29,3 +28,3 @@ Read up on [Zone Primer](https://docs.google.com/document/d/1F5Ug0jcrm031vhSMJEOgp1l-Is-Vf0UCNDY-LsQtAIY).

[![screenshot of the zone.js presentation and ng-conf 2014](/presentation.png)](//www.youtube.com/watch?v=3IqtmUscE_U&t=150)
[![screenshot of the zone.js presentation and ng-conf 2014](./presentation.png)](//www.youtube.com/watch?v=3IqtmUscE_U&t=150)

@@ -32,0 +31,0 @@ ## See also

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

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

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

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

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

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

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

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

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc