Icard/angular-clarity-master(work.../node_modules/zone.js/bundles/zone-testing-node-bundle.um...

7 lines
64 KiB
JavaScript

"use strict";var __assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},__assign.apply(this,arguments)},__spreadArray=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* License: MIT
*/
!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){!function(e){var t,n=e.performance;function r(e){n&&n.mark&&n.mark(e)}function o(e,t){n&&n.measure&&n.measure(e,t)}r("Zone");var i=e.__Zone_symbol_prefix||"__zone_symbol__";function s(e){return i+e}var a=!0===e[s("forceDuplicateZoneCheck")];if(e.Zone){if(a||"function"!=typeof e.Zone.__symbol__)throw new Error("Zone already loaded.");return e.Zone}var c=function(){function n(e,t){this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new h(this,this._parent&&this._parent._zoneDelegate,t)}return n.assertZonePatched=function(){if(e.Promise!==C.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")},Object.defineProperty(n,"root",{get:function(){for(var e=t.current;e.parent;)e=e.parent;return e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"current",{get:function(){return F.zone},enumerable:!1,configurable:!0}),Object.defineProperty(n,"currentTask",{get:function(){return O},enumerable:!1,configurable:!0}),n.__load_patch=function(n,i,s){if(void 0===s&&(s=!1),C.hasOwnProperty(n)){if(!s&&a)throw Error("Already loaded patch: "+n)}else if(!e["__Zone_disable_"+n]){var c="Zone:"+n;r(c),C[n]=i(e,t,I),o(c,c)}},Object.defineProperty(n.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),n.prototype.get=function(e){var t=this.getZoneWith(e);if(t)return t._properties[e]},n.prototype.getZoneWith=function(e){for(var t=this;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null},n.prototype.fork=function(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)},n.prototype.wrap=function(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);var n=this._zoneDelegate.intercept(this,e,t),r=this;return function(){return r.runGuarded(n,this,arguments,t)}},n.prototype.run=function(e,t,n,r){F={parent:F,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{F=F.parent}},n.prototype.runGuarded=function(e,t,n,r){void 0===t&&(t=null),F={parent:F,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{F=F.parent}},n.prototype.runTask=function(e,t,n){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||g).name+"; Execution: "+this.name+")");if(e.state!==b||e.type!==A&&e.type!==j){var r=e.state!=P;r&&e._transitionTo(P,w),e.runCount++;var o=O;O=e,F={parent:F,zone:this};try{e.type==j&&e.data&&!e.data.isPeriodic&&(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,e,t,n)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{e.state!==b&&e.state!==Z&&(e.type==A||e.data&&e.data.isPeriodic?r&&e._transitionTo(w,P):(e.runCount=0,this._updateTaskCount(e,-1),r&&e._transitionTo(b,P,b))),F=F.parent,O=o}}},n.prototype.scheduleTask=function(e){if(e.zone&&e.zone!==this)for(var t=this;t;){if(t===e.zone)throw Error("can not reschedule task to ".concat(this.name," which is descendants of the original zone ").concat(e.zone.name));t=t.parent}e._transitionTo(S,b);var n=[];e._zoneDelegates=n,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(t){throw e._transitionTo(Z,S,b),this._zoneDelegate.handleError(this,t),t}return e._zoneDelegates===n&&this._updateTaskCount(e,1),e.state==S&&e._transitionTo(w,S),e},n.prototype.scheduleMicroTask=function(e,t,n,r){return this.scheduleTask(new f(D,e,t,n,r,void 0))},n.prototype.scheduleMacroTask=function(e,t,n,r,o){return this.scheduleTask(new f(j,e,t,n,r,o))},n.prototype.scheduleEventTask=function(e,t,n,r,o){return this.scheduleTask(new f(A,e,t,n,r,o))},n.prototype.cancelTask=function(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||g).name+"; Execution: "+this.name+")");if(e.state===w||e.state===P){e._transitionTo(E,w,P);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(b,E),e.runCount=0,e}},n.prototype._updateTaskCount=function(e,t){var n=e._zoneDelegates;-1==t&&(e._zoneDelegates=null);for(var r=0;r<n.length;r++)n[r]._updateTaskCount(e.type,t)},n}();(t=c).__symbol__=s;var u,l={name:"",onHasTask:function(e,t,n,r){return e.hasTask(n,r)},onScheduleTask:function(e,t,n,r){return e.scheduleTask(n,r)},onInvokeTask:function(e,t,n,r,o,i){return e.invokeTask(n,r,o,i)},onCancelTask:function(e,t,n,r){return e.cancelTask(n,r)}},h=function(){function e(e,t,n){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=e,this._parentDelegate=t,this._forkZS=n&&(n&&n.onFork?n:t._forkZS),this._forkDlgt=n&&(n.onFork?t:t._forkDlgt),this._forkCurrZone=n&&(n.onFork?this.zone:t._forkCurrZone),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this.zone:t._interceptCurrZone),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this.zone:t._invokeCurrZone),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this.zone:t._handleErrorCurrZone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this.zone:t._scheduleTaskCurrZone),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this.zone:t._invokeTaskCurrZone),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this.zone:t._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;var r=n&&n.onHasTask;(r||t&&t._hasTaskZS)&&(this._hasTaskZS=r?n:l,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=e,n.onScheduleTask||(this._scheduleTaskZS=l,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this.zone),n.onInvokeTask||(this._invokeTaskZS=l,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this.zone),n.onCancelTask||(this._cancelTaskZS=l,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this.zone))}return e.prototype.fork=function(e,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,t):new c(e,t)},e.prototype.intercept=function(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,e,t,n):t},e.prototype.invoke=function(e,t,n,r,o){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,e,t,n,r,o):t.apply(n,r)},e.prototype.handleError=function(e,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,e,t)},e.prototype.scheduleTask=function(e,t){var n=t;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),(n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,e,t))||(n=t);else if(t.scheduleFn)t.scheduleFn(t);else{if(t.type!=D)throw new Error("Task is missing scheduleFn.");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.");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,i,s,a){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=n,this.source=r,this.data=i,this.scheduleFn=s,this.cancelFn=a,!o)throw new Error("callback is not defined");this.callback=o;var c=this;this.invoke=n===A&&i&&i.useG?t.invokeTask:function(){return t.invokeTask.call(e,c,this,arguments)}}return t.invokeTask=function(e,t,n){e||(e=this),x++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{1==x&&T(),x--}},Object.defineProperty(t.prototype,"zone",{get:function(){return this._zone},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),t.prototype.cancelScheduleRequest=function(){this._transitionTo(b,S)},t.prototype._transitionTo=function(e,t,n){if(this._state!==t&&this._state!==n)throw new Error("".concat(this.type," '").concat(this.source,"': can not transition to '").concat(e,"', expecting state '").concat(t,"'").concat(n?" or '"+n+"'":"",", was '").concat(this._state,"'."));this._state=e,e==b&&(this._zoneDelegates=null)},t.prototype.toString=function(){return this.data&&void 0!==this.data.handleId?this.data.handleId.toString():Object.prototype.toString.call(this)},t.prototype.toJSON=function(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}},t}(),p=s("setTimeout"),d=s("Promise"),y=s("then"),_=[],k=!1;function m(t){if(u||e[d]&&(u=e[d].resolve(0)),u){var n=u[y];n||(n=u.then),n.call(u,t)}else e[p](t,0)}function v(e){0===x&&0===_.length&&m(T),e&&_.push(e)}function T(){if(!k){for(k=!0;_.length;){var e=_;_=[];for(var t=0;t<e.length;t++){var n=e[t];try{n.zone.runTask(n,null,null)}catch(e){I.onUnhandledError(e)}}}I.microtaskDrainDone(),k=!1}}var g={name:"NO ZONE"},b="notScheduled",S="scheduling",w="scheduled",P="running",E="canceling",Z="unknown",D="microTask",j="macroTask",A="eventTask",C={},I={symbol:s,currentZoneFrame:function(){return F},onUnhandledError:z,microtaskDrainDone:z,scheduleMicroTask:v,showUncaughtError:function(){return!c[s("ignoreConsoleErrorUncaughtError")]},patchEventTarget:function(){return[]},patchOnProperties:z,patchMethod:function(){return z},bindArguments:function(){return[]},patchThen:function(){return z},patchMacroTask:function(){return z},patchEventPrototype:function(){return z},isIEOrEdge:function(){return!1},getGlobalObjects:function(){},ObjectDefineProperty:function(){return z},ObjectGetOwnPropertyDescriptor:function(){},ObjectCreate:function(){},ArraySlice:function(){return[]},patchClass:function(){return z},wrapWithCurrentZone:function(){return z},filterProperties:function(){return[]},attachOriginToPatched:function(){return z},_redefineProperty:function(){return z},patchCallbacks:function(){return z},nativeScheduleMicroTask:m},F={parent:null,zone:new c(null,null)},O=null,x=0;function z(){}o("Zone","Zone"),e.Zone=c}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global);var e=Object.getOwnPropertyDescriptor,t=Object.defineProperty,n=Object.getPrototypeOf,r=Array.prototype.slice,o="addEventListener",i="removeEventListener";Zone.__symbol__(o),Zone.__symbol__(i);var s="true",a="false",c=Zone.__symbol__("");function u(e,t){return Zone.current.wrap(e,t)}function l(e,t,n,r,o){return Zone.current.scheduleMacroTask(e,t,n,r,o)}var h=Zone.__symbol__,f="undefined"!=typeof window,p=f?window:void 0,d=f&&p||"object"==typeof self&&self||global,y="removeAttribute";function _(e,t){for(var n=e.length-1;n>=0;n--)"function"==typeof e[n]&&(e[n]=u(e[n],t+"_"+n));return e}var k="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,m=!("nw"in d)&&void 0!==d.process&&"[object process]"==={}.toString.call(d.process),v=!m&&!k&&!(!f||!p.HTMLElement),T=void 0!==d.process&&"[object process]"==={}.toString.call(d.process)&&!k&&!(!f||!p.HTMLElement),g={},b=function(e){if(e=e||d.event){var t=g[e.type];t||(t=g[e.type]=h("ON_PROPERTY"+e.type));var n,r=this||e.target||d,o=r[t];return v&&r===p&&"error"===e.type?!0===(n=o&&o.call(this,e.message,e.filename,e.lineno,e.colno,e.error))&&e.preventDefault():null==(n=o&&o.apply(this,arguments))||n||e.preventDefault(),n}};function S(n,r,o){var i=e(n,r);if(!i&&o&&e(o,r)&&(i={enumerable:!0,configurable:!0}),i&&i.configurable){var s=h("on"+r+"patched");if(!n.hasOwnProperty(s)||!n[s]){delete i.writable,delete i.value;var a=i.get,c=i.set,u=r.slice(2),l=g[u];l||(l=g[u]=h("ON_PROPERTY"+u)),i.set=function(e){var t=this;t||n!==d||(t=d),t&&("function"==typeof t[l]&&t.removeEventListener(u,b),c&&c.call(t,null),t[l]=e,"function"==typeof e&&t.addEventListener(u,b,!1))},i.get=function(){var e=this;if(e||n!==d||(e=d),!e)return null;var t=e[l];if(t)return t;if(a){var o=a.call(this);if(o)return i.set.call(this,o),"function"==typeof e[y]&&e.removeAttribute(r),o}return null},t(n,r,i),n[s]=!0}}}function w(e,t,n){if(t)for(var r=0;r<t.length;r++)S(e,"on"+t[r],n);else{var o=[];for(var i in e)"on"==i.slice(0,2)&&o.push(i);for(var s=0;s<o.length;s++)S(e,o[s],n)}}h("originalInstance");var P=!1;function E(t,r,o){for(var i=t;i&&!i.hasOwnProperty(r);)i=n(i);!i&&t[r]&&(i=t);var s=h(r),a=null;if(i&&(!(a=i[s])||!i.hasOwnProperty(s))&&(a=i[s]=i[r],function c(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&void 0===e.set)}(i&&e(i,r)))){var u=o(a,s,r);i[r]=function(){return u(this,arguments)},D(i[r],a),P&&function e(t,n){"function"==typeof Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach((function(e){var r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,{get:function(){return t[e]},set:function(n){(!r||r.writable&&"function"==typeof r.set)&&(t[e]=n)},enumerable:!r||r.enumerable,configurable:!r||r.configurable})}))}(a,i[r])}return a}function Z(e,t,n){var r=null;function o(e){var t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},r.apply(t.target,t.args),e}r=E(e,t,(function(e){return function(t,r){var i=n(t,r);return i.cbIdx>=0&&"function"==typeof r[i.cbIdx]?l(i.name,r[i.cbIdx],i,o):e.apply(t,r)}}))}function D(e,t){e[h("OriginalDelegate")]=t}Zone.__load_patch("ZoneAwarePromise",(function(e,t,n){var r=Object.getOwnPropertyDescriptor,o=Object.defineProperty,i=n.symbol,s=[],a=!0===e[i("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],c=i("Promise"),u=i("then"),l="__creationTrace__";n.onUnhandledError=function(e){if(n.showUncaughtError()){var t=e&&e.rejection;t?console.error("Unhandled Promise rejection:",t instanceof Error?t.message:t,"; Zone:",e.zone.name,"; Task:",e.task&&e.task.source,"; Value:",t,t instanceof Error?t.stack:void 0):console.error(e)}},n.microtaskDrainDone=function(){for(var e=function(){var e=s.shift();try{e.zone.runGuarded((function(){if(e.throwOriginal)throw e.rejection;throw e}))}catch(e){!function r(e){n.onUnhandledError(e);try{var r=t[h];"function"==typeof r&&r.call(this,e)}catch(e){}}(e)}};s.length;)e()};var h=i("unhandledPromiseRejectionHandler");function f(e){return e&&e.then}function p(e){return e}function d(e){return z.reject(e)}var y=i("state"),_=i("value"),k=i("finally"),m=i("parentPromiseValue"),v=i("parentPromiseState"),T="Promise.then",g=null,b=!0,S=!1,w=0;function P(e,t){return function(n){try{A(e,t,n)}catch(t){A(e,!1,t)}}}var Z=function(){var e=!1;return function t(n){return function(){e||(e=!0,n.apply(null,arguments))}}},D="Promise resolved with itself",j=i("currentTaskTrace");function A(e,r,i){var c=Z();if(e===i)throw new TypeError(D);if(e[y]===g){var u=null;try{"object"!=typeof i&&"function"!=typeof i||(u=i&&i.then)}catch(t){return c((function(){A(e,!1,t)}))(),e}if(r!==S&&i instanceof z&&i.hasOwnProperty(y)&&i.hasOwnProperty(_)&&i[y]!==g)I(i),A(e,i[y],i[_]);else if(r!==S&&"function"==typeof u)try{u.call(i,c(P(e,r)),c(P(e,!1)))}catch(t){c((function(){A(e,!1,t)}))()}else{e[y]=r;var h=e[_];if(e[_]=i,e[k]===k&&r===b&&(e[y]=e[v],e[_]=e[m]),r===S&&i instanceof Error){var f=t.currentTask&&t.currentTask.data&&t.currentTask.data[l];f&&o(i,j,{configurable:!0,enumerable:!1,writable:!0,value:f})}for(var p=0;p<h.length;)F(e,h[p++],h[p++],h[p++],h[p++]);if(0==h.length&&r==S){e[y]=w;var d=i;try{throw new Error("Uncaught (in promise): "+function e(t){return t&&t.toString===Object.prototype.toString?(t.constructor&&t.constructor.name||"")+": "+JSON.stringify(t):t?t.toString():Object.prototype.toString.call(t)}(i)+(i&&i.stack?"\n"+i.stack:""))}catch(e){d=e}a&&(d.throwOriginal=!0),d.rejection=i,d.promise=e,d.zone=t.current,d.task=t.currentTask,s.push(d),n.scheduleMicroTask()}}}return e}var C=i("rejectionHandledHandler");function I(e){if(e[y]===w){try{var n=t[C];n&&"function"==typeof n&&n.call(this,{rejection:e[_],promise:e})}catch(e){}e[y]=S;for(var r=0;r<s.length;r++)e===s[r].promise&&s.splice(r,1)}}function F(e,t,n,r,o){I(e);var i=e[y],s=i?"function"==typeof r?r:p:"function"==typeof o?o:d;t.scheduleMicroTask(T,(function(){try{var r=e[_],o=!!n&&k===n[k];o&&(n[m]=r,n[v]=i);var a=t.run(s,void 0,o&&s!==d&&s!==p?[]:[r]);A(n,!0,a)}catch(e){A(n,!1,e)}}),n)}var O=function(){},x=e.AggregateError,z=function(){function e(t){var n=this;if(!(n instanceof e))throw new Error("Must be an instanceof Promise.");n[y]=g,n[_]=[];try{var r=Z();t&&t(r(P(n,b)),r(P(n,S)))}catch(e){A(n,!1,e)}}return e.toString=function(){return"function ZoneAwarePromise() { [native code] }"},e.resolve=function(e){return A(new this(null),b,e)},e.reject=function(e){return A(new this(null),S,e)},e.any=function(t){if(!t||"function"!=typeof t[Symbol.iterator])return Promise.reject(new x([],"All promises were rejected"));var n=[],r=0;try{for(var o=0,i=t;o<i.length;o++)r++,n.push(e.resolve(i[o]))}catch(e){return Promise.reject(new x([],"All promises were rejected"))}if(0===r)return Promise.reject(new x([],"All promises were rejected"));var s=!1,a=[];return new e((function(e,t){for(var o=0;o<n.length;o++)n[o].then((function(t){s||(s=!0,e(t))}),(function(e){a.push(e),0==--r&&(s=!0,t(new x(a,"All promises were rejected")))}))}))},e.race=function(e){var t,n,r=new this((function(e,r){t=e,n=r}));function o(e){t(e)}function i(e){n(e)}for(var s=0,a=e;s<a.length;s++){var c=a[s];f(c)||(c=this.resolve(c)),c.then(o,i)}return r},e.all=function(t){return e.allWithCallback(t)},e.allSettled=function(t){return(this&&this.prototype instanceof e?this:e).allWithCallback(t,{thenCallback:function(e){return{status:"fulfilled",value:e}},errorCallback:function(e){return{status:"rejected",reason:e}}})},e.allWithCallback=function(e,t){for(var n,r,o=new this((function(e,t){n=e,r=t})),i=2,s=0,a=[],c=function(e){f(e)||(e=u.resolve(e));var o=s;try{e.then((function(e){a[o]=t?t.thenCallback(e):e,0==--i&&n(a)}),(function(e){t?(a[o]=t.errorCallback(e),0==--i&&n(a)):r(e)}))}catch(e){r(e)}i++,s++},u=this,l=0,h=e;l<h.length;l++)c(h[l]);return 0==(i-=2)&&n(a),o},Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"Promise"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.then=function(n,r){var o,i=null===(o=this.constructor)||void 0===o?void 0:o[Symbol.species];i&&"function"==typeof i||(i=this.constructor||e);var s=new i(O),a=t.current;return this[y]==g?this[_].push(a,s,n,r):F(this,a,s,n,r),s},e.prototype.catch=function(e){return this.then(null,e)},e.prototype.finally=function(n){var r,o=null===(r=this.constructor)||void 0===r?void 0:r[Symbol.species];o&&"function"==typeof o||(o=e);var i=new o(O);i[k]=k;var s=t.current;return this[y]==g?this[_].push(s,i,n,n):F(this,s,i,n,n),i},e}();z.resolve=z.resolve,z.reject=z.reject,z.race=z.race,z.all=z.all;var M=e[c]=e.Promise;e.Promise=z;var R=i("thenPatched");function N(e){var t=e.prototype,n=r(t,"then");if(!n||!1!==n.writable&&n.configurable){var o=t.then;t[u]=o,e.prototype.then=function(e,t){var n=this;return new z((function(e,t){o.call(n,e,t)})).then(e,t)},e[R]=!0}}return n.patchThen=N,M&&(N(M),E(e,"fetch",(function(e){return function t(e){return function(t,n){var r=e.apply(t,n);if(r instanceof z)return r;var o=r.constructor;return o[R]||N(o),r}}(e)}))),Promise[t.__symbol__("uncaughtPromiseErrors")]=s,z})),Zone.__load_patch("toString",(function(e){var t=Function.prototype.toString,n=h("OriginalDelegate"),r=h("Promise"),o=h("Error"),i=function i(){if("function"==typeof this){var s=this[n];if(s)return"function"==typeof s?t.call(s):Object.prototype.toString.call(s);if(this===Promise){var a=e[r];if(a)return t.call(a)}if(this===Error){var c=e[o];if(c)return t.call(c)}}return t.call(this)};i[n]=t,Function.prototype.toString=i;var s=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":s.call(this)}})),Zone.__load_patch("node_util",(function(e,t,n){n.patchOnProperties=w,n.patchMethod=E,n.bindArguments=_,n.patchMacroTask=Z,function r(e){P=e}(!0)}));var j=!1;if("undefined"!=typeof window)try{var A=Object.defineProperty({},"passive",{get:function(){j=!0}});window.addEventListener("test",A,A),window.removeEventListener("test",A,A)}catch(e){j=!1}var C={useG:!0},I={},F={},O=new RegExp("^"+c+"(\\w+)(true|false)$"),x=h("propagationStopped");function z(e,t){var n=(t?t(e):e)+a,r=(t?t(e):e)+s,o=c+n,i=c+r;I[e]={},I[e][a]=o,I[e][s]=i}function M(e,t,r,u){var l=u&&u.add||o,f=u&&u.rm||i,p=u&&u.listeners||"eventListeners",d=u&&u.rmAll||"removeAllListeners",y=h(l),_="."+l+":",k="prependListener",v="."+k+":",T=function(e,t,n){if(!e.isRemoved){var r,o=e.callback;"object"==typeof o&&o.handleEvent&&(e.callback=function(e){return o.handleEvent(e)},e.originalDelegate=o);try{e.invoke(e,t,[n])}catch(e){r=e}var i=e.options;return i&&"object"==typeof i&&i.once&&t[f].call(t,n.type,e.originalDelegate?e.originalDelegate:e.callback,i),r}};function g(n,r,o){if(r=r||e.event){var i=n||r.target||e,c=i[I[r.type][o?s:a]];if(c){var u=[];if(1===c.length)(f=T(c[0],i,r))&&u.push(f);else for(var l=c.slice(),h=0;h<l.length&&(!r||!0!==r[x]);h++){var f;(f=T(l[h],i,r))&&u.push(f)}if(1===u.length)throw u[0];var p=function(e){var n=u[e];t.nativeScheduleMicroTask((function(){throw n}))};for(h=0;h<u.length;h++)p(h)}}}var b=function(e){return g(this,e,!1)},S=function(e){return g(this,e,!0)};function w(t,r){if(!t)return!1;var o=!0;r&&void 0!==r.useG&&(o=r.useG);var i=r&&r.vh,u=!0;r&&void 0!==r.chkDup&&(u=r.chkDup);var T=!1;r&&void 0!==r.rt&&(T=r.rt);for(var g=t;g&&!g.hasOwnProperty(l);)g=n(g);if(!g&&t[l]&&(g=t),!g)return!1;if(g[y])return!1;var w,P=r&&r.eventNameToString,E={},Z=g[y]=g[l],A=g[h(f)]=g[f],x=g[h(p)]=g[p],M=g[h(d)]=g[d];r&&r.prepend&&(w=g[h(r.prepend)]=g[r.prepend]);var N=o?function(e){if(!E.isExisting)return Z.call(E.target,E.eventName,E.capture?S:b,E.options)}:function(e){return Z.call(E.target,E.eventName,e.invoke,E.options)},q=o?function(e){if(!e.isRemoved){var t=I[e.eventName],n=void 0;t&&(n=t[e.capture?s:a]);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 A.call(e.target,e.eventName,e.capture?S:b,e.options)}:function(e){return A.call(e.target,e.eventName,e.invoke,e.options)},L=r&&r.diff?r.diff:function(e,t){var n=typeof t;return"function"===n&&e.callback===t||"object"===n&&e.originalDelegate===t},H=Zone[h("UNPATCHED_EVENTS")],U=e[h("PASSIVE_EVENTS")],Q=function(t,n,c,l,h,f){return void 0===h&&(h=!1),void 0===f&&(f=!1),function(){var p=this||e,d=arguments[0];r&&r.transferEventName&&(d=r.transferEventName(d));var y=arguments[1];if(!y)return t.apply(this,arguments);if(m&&"uncaughtException"===d)return t.apply(this,arguments);var _=!1;if("function"!=typeof y){if(!y.handleEvent)return t.apply(this,arguments);_=!0}if(!i||i(t,y,p,arguments)){var k=j&&!!U&&-1!==U.indexOf(d),v=function e(t,n){return!j&&"object"==typeof t&&t?!!t.capture:j&&n?"boolean"==typeof t?{capture:t,passive:!0}:t?"object"==typeof t&&!1!==t.passive?__assign(__assign({},t),{passive:!0}):t:{passive:!0}:t}(arguments[2],k);if(H)for(var T=0;T<H.length;T++)if(d===H[T])return k?t.call(p,d,y,v):t.apply(this,arguments);var g=!!v&&("boolean"==typeof v||v.capture),b=!(!v||"object"!=typeof v)&&v.once,S=Zone.current,w=I[d];w||(z(d,P),w=I[d]);var Z,D=w[g?s:a],A=p[D],O=!1;if(A){if(O=!0,u)for(T=0;T<A.length;T++)if(L(A[T],y))return}else A=p[D]=[];var x=p.constructor.name,M=F[x];M&&(Z=M[d]),Z||(Z=x+n+(P?P(d):d)),E.options=v,b&&(E.options.once=!1),E.target=p,E.capture=g,E.eventName=d,E.isExisting=O;var R=o?C:void 0;R&&(R.taskData=E);var N=S.scheduleEventTask(Z,y,R,c,l);return E.target=null,R&&(R.taskData=null),b&&(v.once=!0),(j||"boolean"!=typeof N.options)&&(N.options=v),N.target=p,N.capture=g,N.eventName=d,_&&(N.originalDelegate=y),f?A.unshift(N):A.push(N),h?p:void 0}}};return g[l]=Q(Z,_,N,q,T),w&&(g[k]=Q(w,v,(function(e){return w.call(E.target,E.eventName,e.invoke,E.options)}),q,T,!0)),g[f]=function(){var t=this||e,n=arguments[0];r&&r.transferEventName&&(n=r.transferEventName(n));var o=arguments[2],u=!!o&&("boolean"==typeof o||o.capture),l=arguments[1];if(!l)return A.apply(this,arguments);if(!i||i(A,l,t,arguments)){var h,f=I[n];f&&(h=f[u?s:a]);var p=h&&t[h];if(p)for(var d=0;d<p.length;d++){var y=p[d];if(L(y,l))return p.splice(d,1),y.isRemoved=!0,0===p.length&&(y.allRemoved=!0,t[h]=null,"string"==typeof n&&(t[c+"ON_PROPERTY"+n]=null)),y.zone.cancelTask(y),T?t:void 0}return A.apply(this,arguments)}},g[p]=function(){var t=this||e,n=arguments[0];r&&r.transferEventName&&(n=r.transferEventName(n));for(var o=[],i=R(t,P?P(n):n),s=0;s<i.length;s++){var a=i[s];o.push(a.originalDelegate?a.originalDelegate:a.callback)}return o},g[d]=function(){var t=this||e,n=arguments[0];if(n){r&&r.transferEventName&&(n=r.transferEventName(n));var o=I[n];if(o){var i=t[o[a]],c=t[o[s]];if(i){var u=i.slice();for(p=0;p<u.length;p++)this[f].call(this,n,(l=u[p]).originalDelegate?l.originalDelegate:l.callback,l.options)}if(c)for(u=c.slice(),p=0;p<u.length;p++){var l;this[f].call(this,n,(l=u[p]).originalDelegate?l.originalDelegate:l.callback,l.options)}}}else{for(var h=Object.keys(t),p=0;p<h.length;p++){var y=O.exec(h[p]),_=y&&y[1];_&&"removeListener"!==_&&this[d].call(this,_)}this[d].call(this,"removeListener")}if(T)return this},D(g[l],Z),D(g[f],A),M&&D(g[d],M),x&&D(g[p],x),!0}for(var P=[],E=0;E<r.length;E++)P[E]=w(r[E],u);return P}function R(e,t){if(!t){var n=[];for(var r in e){var o=O.exec(r),i=o&&o[1];if(i&&(!t||i===t)){var c=e[r];if(c)for(var u=0;u<c.length;u++)n.push(c[u])}}return n}var l=I[t];l||(z(t),l=I[t]);var h=e[l[a]],f=e[l[s]];return h?f?h.concat(f):h.slice():f?f.slice():[]}function N(e,t){t.patchMethod(e,"queueMicrotask",(function(e){return function(e,t){Zone.current.scheduleMicroTask("queueMicrotask",t[0])}}))}Zone.__load_patch("EventEmitter",(function(e,t,n){var r,o="addListener",i="removeListener",s=function(e,t){return e.callback===t||e.callback.listener===t},a=function(e){return"string"==typeof e?e:e?e.toString().replace("(","_").replace(")","_"):""};try{r=require("events")}catch(e){}r&&r.EventEmitter&&function c(t){var r=M(e,n,[t],{useG:!1,add:o,rm:i,prepend:"prependListener",rmAll:"removeAllListeners",listeners:"listeners",chkDup:!1,rt:!0,diff:s,eventNameToString:a});r&&r[0]&&(t.on=t[o],t.off=t[i])}(r.EventEmitter.prototype)})),Zone.__load_patch("fs",(function(){var e;try{e=require("fs")}catch(e){}e&&["access","appendFile","chmod","chown","close","exists","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","read","readdir","readFile","readlink","realpath","rename","rmdir","stat","symlink","truncate","unlink","utimes","write","writeFile"].filter((function(t){return!!e[t]&&"function"==typeof e[t]})).forEach((function(t){Z(e,t,(function(e,n){return{name:"fs."+t,args:n,cbIdx:n.length>0?n.length-1:-1,target:e}}))}))}));var q=h("zoneTask");function L(e,t,n,r){var o=null,i=null;n+=r;var s={};function a(t){var n=t.data;return n.args[0]=function(){return t.invoke.apply(this,arguments)},n.handleId=o.apply(e,n.args),t}function c(t){return i.call(e,t.data.handleId)}o=E(e,t+=r,(function(n){return function(o,i){if("function"==typeof i[0]){var u={isPeriodic:"Interval"===r,delay:"Timeout"===r||"Interval"===r?i[1]||0:void 0,args:i},h=i[0];i[0]=function e(){try{return h.apply(this,arguments)}finally{u.isPeriodic||("number"==typeof u.handleId?delete s[u.handleId]:u.handleId&&(u.handleId[q]=null))}};var f=l(t,i[0],u,a,c);if(!f)return f;var p=f.data.handleId;return"number"==typeof p?s[p]=f:p&&(p[q]=f),p&&p.ref&&p.unref&&"function"==typeof p.ref&&"function"==typeof p.unref&&(f.ref=p.ref.bind(p),f.unref=p.unref.bind(p)),"number"==typeof p||p?p:f}return n.apply(e,i)}})),i=E(e,n,(function(t){return function(n,r){var o,i=r[0];"number"==typeof i?o=s[i]:(o=i&&i[q])||(o=i),o&&"string"==typeof o.type?"notScheduled"!==o.state&&(o.cancelFn&&o.data.isPeriodic||0===o.runCount)&&("number"==typeof i?delete s[i]:i&&(i[q]=null),o.zone.cancelTask(o)):t.apply(e,r)}}))}var H="set",U="clear";Zone.__load_patch("node_timers",(function(e,t){var n=!1;try{var r=require("timers");if(e.setTimeout!==r.setTimeout&&!T){var o=r.setTimeout;r.setTimeout=function(){return n=!0,o.apply(this,arguments)};var i=e.setTimeout((function(){}),100);clearTimeout(i),r.setTimeout=o}L(r,H,U,"Timeout"),L(r,H,U,"Interval"),L(r,H,U,"Immediate")}catch(e){}T||(n?(e[t.__symbol__("setTimeout")]=e.setTimeout,e[t.__symbol__("setInterval")]=e.setInterval,e[t.__symbol__("setImmediate")]=e.setImmediate):(L(e,H,U,"Timeout"),L(e,H,U,"Interval"),L(e,H,U,"Immediate")))})),Zone.__load_patch("nextTick",(function(){!function e(t,n,r){var o=null;function i(e){var t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},o.apply(t.target,t.args),e}o=E(t,n,(function(e){return function(t,n){var o=r(t,n);return o.cbIdx>=0&&"function"==typeof n[o.cbIdx]?Zone.current.scheduleMicroTask(o.name,n[o.cbIdx],o,i):e.apply(t,n)}}))}(process,"nextTick",(function(e,t){return{name:"process.nextTick",args:t,cbIdx:t.length>0&&"function"==typeof t[0]?0:-1,target:process}}))})),Zone.__load_patch("handleUnhandledPromiseRejection",(function(e,t,n){function r(e){return function(t){R(process,e).forEach((function(n){"unhandledRejection"===e?n.invoke(t.rejection,t.promise):"rejectionHandled"===e&&n.invoke(t.promise)}))}}t[n.symbol("unhandledPromiseRejectionHandler")]=r("unhandledRejection"),t[n.symbol("rejectionHandledHandler")]=r("rejectionHandled")})),Zone.__load_patch("crypto",(function(){var e;try{e=require("crypto")}catch(e){}e&&["randomBytes","pbkdf2"].forEach((function(t){Z(e,t,(function(n,r){return{name:"crypto."+t,args:r,cbIdx:r.length>0&&"function"==typeof r[r.length-1]?r.length-1:-1,target:e}}))}))})),Zone.__load_patch("console",(function(e,t){["dir","log","info","error","warn","assert","debug","timeEnd","trace"].forEach((function(e){var n=console[t.__symbol__(e)]=console[e];n&&(console[e]=function(){var e=r.call(arguments);return t.current===t.root?n.apply(this,e):t.root.run(n,this,e)})}))})),Zone.__load_patch("queueMicrotask",(function(e,t,n){N(e,n)}));var Q="\n",G={},W="__creationTrace__",B="STACKTRACE TRACKING",K="__SEP_TAG__",V=K+"@[native]",J=function J(){this.error=te(),this.timestamp=new Date};function Y(){return new Error(B)}function X(){try{throw Y()}catch(e){return e}}var $=Y(),ee=X(),te=$.stack?Y:ee.stack?X:Y;function ne(e){return e.stack?e.stack.split(Q):[]}function re(e,t){for(var n=ne(t),r=0;r<n.length;r++)G.hasOwnProperty(n[r])||e.push(n[r])}function oe(e,t){var n=[t?t.trim():""];if(e)for(var r=(new Date).getTime(),o=0;o<e.length;o++){var i=e[o],s=i.timestamp,a="____________________Elapsed ".concat(r-s.getTime()," ms; At: ").concat(s);a=a.replace(/[^\w\d]/g,"_"),n.push(V.replace(K,a)),re(n,i.error),r=s.getTime()}return n.join(Q)}function ie(){return Error.stackTraceLimit>0}function se(e,t){t>0&&(e.push(ne((new J).error)),se(e,t-1))}Zone.longStackTraceZoneSpec={name:"long-stack-trace",longStackTraceLimit:10,getLongStackTrace:function(e){if(e){var t=e[Zone.__symbol__("currentTaskTrace")];return t?oe(t,e.stack):e.stack}},onScheduleTask:function(e,t,n,r){if(ie()){var o=Zone.currentTask,i=o&&o.data&&o.data[W]||[];(i=[new J].concat(i)).length>this.longStackTraceLimit&&(i.length=this.longStackTraceLimit),r.data||(r.data={}),"eventTask"===r.type&&(r.data=__assign({},r.data)),r.data[W]=i}return e.scheduleTask(n,r)},onHandleError:function(e,t,n,r){if(ie()){var o=Zone.currentTask||r.task;if(r instanceof Error&&o){var i=oe(o.data&&o.data[W],r.stack);try{r.stack=r.longStack=i}catch(e){}}}return e.handleError(n,r)}},function ae(){if(ie()){var e=[];se(e,2);for(var t=e[0],n=e[1],r=0;r<t.length;r++)if(-1==(i=t[r]).indexOf(B)){var o=i.match(/^\s*at\s+/);if(o){V=o[0]+K+" (http://localhost)";break}}for(r=0;r<t.length;r++){var i;if((i=t[r])!==n[r])break;G[i]=!0}}}();var ce=function(){function e(e){void 0===e&&(e=null),this.defaultSpecDelegate=e,this.name="ProxyZone",this._delegateSpec=null,this.properties={ProxyZoneSpec:this},this.propertyKeys=null,this.lastTaskState=null,this.isNeedToTriggerHasTask=!1,this.tasks=[],this.setDelegate(e)}return e.get=function(){return Zone.current.get("ProxyZoneSpec")},e.isLoaded=function(){return e.get()instanceof e},e.assertPresent=function(){if(!e.isLoaded())throw new Error("Expected to be running in 'ProxyZone', but it was not found.");return e.get()},e.prototype.setDelegate=function(e){var t=this,n=this._delegateSpec!==e;this._delegateSpec=e,this.propertyKeys&&this.propertyKeys.forEach((function(e){return delete t.properties[e]})),this.propertyKeys=null,e&&e.properties&&(this.propertyKeys=Object.keys(e.properties),this.propertyKeys.forEach((function(n){return t.properties[n]=e.properties[n]}))),n&&this.lastTaskState&&(this.lastTaskState.macroTask||this.lastTaskState.microTask)&&(this.isNeedToTriggerHasTask=!0)},e.prototype.getDelegate=function(){return this._delegateSpec},e.prototype.resetDelegate=function(){this.getDelegate(),this.setDelegate(this.defaultSpecDelegate)},e.prototype.tryTriggerHasTask=function(e,t,n){this.isNeedToTriggerHasTask&&this.lastTaskState&&(this.isNeedToTriggerHasTask=!1,this.onHasTask(e,t,n,this.lastTaskState))},e.prototype.removeFromTasks=function(e){if(this.tasks)for(var t=0;t<this.tasks.length;t++)if(this.tasks[t]===e)return void this.tasks.splice(t,1)},e.prototype.getAndClearPendingTasksInfo=function(){if(0===this.tasks.length)return"";var e="--Pending async tasks are: ["+this.tasks.map((function(e){var t=e.data&&Object.keys(e.data).map((function(t){return t+":"+e.data[t]})).join(",");return"type: ".concat(e.type,", source: ").concat(e.source,", args: {").concat(t,"}")}))+"]";return this.tasks=[],e},e.prototype.onFork=function(e,t,n,r){return this._delegateSpec&&this._delegateSpec.onFork?this._delegateSpec.onFork(e,t,n,r):e.fork(n,r)},e.prototype.onIntercept=function(e,t,n,r,o){return this._delegateSpec&&this._delegateSpec.onIntercept?this._delegateSpec.onIntercept(e,t,n,r,o):e.intercept(n,r,o)},e.prototype.onInvoke=function(e,t,n,r,o,i,s){return this.tryTriggerHasTask(e,t,n),this._delegateSpec&&this._delegateSpec.onInvoke?this._delegateSpec.onInvoke(e,t,n,r,o,i,s):e.invoke(n,r,o,i,s)},e.prototype.onHandleError=function(e,t,n,r){return this._delegateSpec&&this._delegateSpec.onHandleError?this._delegateSpec.onHandleError(e,t,n,r):e.handleError(n,r)},e.prototype.onScheduleTask=function(e,t,n,r){return"eventTask"!==r.type&&this.tasks.push(r),this._delegateSpec&&this._delegateSpec.onScheduleTask?this._delegateSpec.onScheduleTask(e,t,n,r):e.scheduleTask(n,r)},e.prototype.onInvokeTask=function(e,t,n,r,o,i){return"eventTask"!==r.type&&this.removeFromTasks(r),this.tryTriggerHasTask(e,t,n),this._delegateSpec&&this._delegateSpec.onInvokeTask?this._delegateSpec.onInvokeTask(e,t,n,r,o,i):e.invokeTask(n,r,o,i)},e.prototype.onCancelTask=function(e,t,n,r){return"eventTask"!==r.type&&this.removeFromTasks(r),this.tryTriggerHasTask(e,t,n),this._delegateSpec&&this._delegateSpec.onCancelTask?this._delegateSpec.onCancelTask(e,t,n,r):e.cancelTask(n,r)},e.prototype.onHasTask=function(e,t,n,r){this.lastTaskState=r,this._delegateSpec&&this._delegateSpec.onHasTask?this._delegateSpec.onHasTask(e,t,n,r):e.hasTask(n,r)},e}();Zone.ProxyZoneSpec=ce;var ue=function(){function e(e){this.runZone=Zone.current,this.name="syncTestZone for "+e}return e.prototype.onScheduleTask=function(e,t,n,r){switch(r.type){case"microTask":case"macroTask":throw new Error("Cannot call ".concat(r.source," from within a sync test (").concat(this.name,")."));case"eventTask":r=e.scheduleTask(n,r)}return r},e}();Zone.SyncTestZoneSpec=ue,Zone.__load_patch("jasmine",(function(e,t,n){if(!t)throw new Error("Missing: zone.js");if("undefined"==typeof jest&&"undefined"!=typeof jasmine&&!jasmine.__zone_patch__){jasmine.__zone_patch__=!0;var r=t.SyncTestZoneSpec,o=t.ProxyZoneSpec;if(!r)throw new Error("Missing: SyncTestZoneSpec");if(!o)throw new Error("Missing: ProxyZoneSpec");var i=t.current,s=t.__symbol__,a=!0===e[s("fakeAsyncDisablePatchingClock")],c=!a&&(!0===e[s("fakeAsyncPatchLock")]||!0===e[s("fakeAsyncAutoFakeAsyncWhenClockPatched")]);if(!0!==e[s("ignoreUnhandledRejection")]){var u=jasmine.GlobalErrors;u&&!jasmine[s("GlobalErrors")]&&(jasmine[s("GlobalErrors")]=u,jasmine.GlobalErrors=function(){var t=new u,n=t.install;return n&&!t[s("install")]&&(t[s("install")]=n,t.install=function(){var t="undefined"!=typeof process&&!!process.on,r=t?process.listeners("unhandledRejection"):e.eventListeners("unhandledrejection"),o=n.apply(this,arguments);return t?process.removeAllListeners("unhandledRejection"):e.removeAllListeners("unhandledrejection"),r&&r.forEach((function(n){t?process.on("unhandledRejection",n):e.addEventListener("unhandledrejection",n)})),o}),t})}var l=jasmine.getEnv();if(["describe","xdescribe","fdescribe"].forEach((function(e){var t=l[e];l[e]=function(e,n){return t.call(this,e,function o(e,t){return function(){return i.fork(new r("jasmine.describe#".concat(e))).run(t,this,arguments)}}(e,n))}})),["it","xit","fit"].forEach((function(e){var t=l[e];l[s(e)]=t,l[e]=function(e,n,r){return arguments[1]=y(n),t.apply(this,arguments)}})),["beforeEach","afterEach","beforeAll","afterAll"].forEach((function(e){var t=l[e];l[s(e)]=t,l[e]=function(e,n){return arguments[0]=y(e),t.apply(this,arguments)}})),!a){var h=jasmine[s("clock")]=jasmine.clock;jasmine.clock=function(){var e=h.apply(this,arguments);if(!e[s("patched")]){e[s("patched")]=s("patched");var n=e[s("tick")]=e.tick;e.tick=function(){var e=t.current.get("FakeAsyncTestZoneSpec");return e?e.tick.apply(e,arguments):n.apply(this,arguments)};var r=e[s("mockDate")]=e.mockDate;e.mockDate=function(){var e=t.current.get("FakeAsyncTestZoneSpec");if(e){var n=arguments.length>0?arguments[0]:new Date;return e.setFakeBaseSystemTime.apply(e,n&&"function"==typeof n.getTime?[n.getTime()]:arguments)}return r.apply(this,arguments)},c&&["install","uninstall"].forEach((function(n){var r=e[s(n)]=e[n];e[n]=function(){if(!t.FakeAsyncTestZoneSpec)return r.apply(this,arguments);jasmine[s("clockInstalled")]="install"===n}}))}return e}}if(!jasmine[t.__symbol__("createSpyObj")]){var f=jasmine.createSpyObj;jasmine[t.__symbol__("createSpyObj")]=f,jasmine.createSpyObj=function(){var e,t=Array.prototype.slice.call(arguments);if(t.length>=3&&t[2]){var n=Object.defineProperty;Object.defineProperty=function(e,t,r){return n.call(this,e,t,__assign(__assign({},r),{configurable:!0,enumerable:!0}))};try{e=f.apply(this,t)}finally{Object.defineProperty=n}}else e=f.apply(this,t);return e}}var p=jasmine.QueueRunner;jasmine.QueueRunner=function(n){function r(r){var o,s=this;r.onComplete&&(r.onComplete=(o=r.onComplete,function(){s.testProxyZone=null,s.testProxyZoneSpec=null,i.scheduleMicroTask("jasmine.onComplete",o)}));var a=e[t.__symbol__("setTimeout")],c=e[t.__symbol__("clearTimeout")];a&&(r.timeout={setTimeout:a||e.setTimeout,clearTimeout:c||e.clearTimeout}),jasmine.UserContext?(r.userContext||(r.userContext=new jasmine.UserContext),r.userContext.queueRunner=this):(r.userContext||(r.userContext={}),r.userContext.queueRunner=this);var u=r.onException;r.onException=function(e){if(e&&"Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL."===e.message){var t=this&&this.testProxyZoneSpec;if(t){var n=t.getAndClearPendingTasksInfo();try{e.message+=n}catch(e){}}}u&&u.call(this,e)},n.call(this,r)}return function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);function r(){this.constructor=e}e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}(r,n),r.prototype.execute=function(){for(var e=this,r=t.current,s=!1;r;){if(r===i){s=!0;break}r=r.parent}if(!s)throw new Error("Unexpected Zone: "+t.current.name);this.testProxyZoneSpec=new o,this.testProxyZone=i.fork(this.testProxyZoneSpec),t.currentTask?n.prototype.execute.call(this):t.current.scheduleMicroTask("jasmine.execute().forceTask",(function(){return p.prototype.execute.call(e)}))},r}(p)}function d(e,n,r,o){var i=!!jasmine[s("clockInstalled")],a=r.testProxyZone;if(i&&c){var u=t[t.__symbol__("fakeAsyncTest")];u&&"function"==typeof u.fakeAsync&&(e=u.fakeAsync(e))}return o?a.run(e,n,[o]):a.run(e,n)}function y(e){return e&&(e.length?function(t){return d(e,this,this.queueRunner,t)}:function(){return d(e,this,this.queueRunner)})}})),Zone.__load_patch("jest",(function(e,t,n){if("undefined"!=typeof jest&&!jest.__zone_patch__){t[n.symbol("ignoreConsoleErrorUncaughtError")]=!0,jest.__zone_patch__=!0;var r=t.ProxyZoneSpec,o=t.SyncTestZoneSpec;if(!r)throw new Error("Missing ProxyZoneSpec");var i=t.current,s=i.fork(new o("jest.describe")),a=new r,c=i.fork(a);["describe","xdescribe","fdescribe"].forEach((function(n){var r=e[n];e[t.__symbol__(n)]||(e[t.__symbol__(n)]=r,e[n]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e[1]=u(e[1]),r.apply(this,e)},e[n].each=function o(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=e.apply(this,t);return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e[1]=u(e[1]),r.apply(this,e)}}}(r.each))})),e.describe.only=e.fdescribe,e.describe.skip=e.xdescribe,["it","xit","fit","test","xtest"].forEach((function(n){var r=e[n];e[t.__symbol__(n)]||(e[t.__symbol__(n)]=r,e[n]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e[1]=l(e[1],!0),r.apply(this,e)},e[n].each=function o(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n[1]=l(n[1]),e.apply(this,t).apply(this,n)}}}(r.each),e[n].todo=r.todo)})),e.it.only=e.fit,e.it.skip=e.xit,e.test.only=e.fit,e.test.skip=e.xit,["beforeEach","afterEach","beforeAll","afterAll"].forEach((function(n){var r=e[n];e[t.__symbol__(n)]||(e[t.__symbol__(n)]=r,e[n]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e[0]=l(e[0]),r.apply(this,e)})})),t.patchJestObject=function e(r,o){function i(){return!!t.current.get("FakeAsyncTestZoneSpec")}function s(){var e=t.current.get("ProxyZoneSpec");return e&&e.isTestFunc}void 0===o&&(o=!1),r[n.symbol("fakeTimers")]||(r[n.symbol("fakeTimers")]=!0,n.patchMethod(r,"_checkFakeTimers",(function(e){return function(t,n){return!!i()||e.apply(t,n)}})),n.patchMethod(r,"useFakeTimers",(function(e){return function(r,i){return t[n.symbol("useFakeTimersCalled")]=!0,o||s()?e.apply(r,i):r}})),n.patchMethod(r,"useRealTimers",(function(e){return function(r,i){return t[n.symbol("useFakeTimersCalled")]=!1,o||s()?e.apply(r,i):r}})),n.patchMethod(r,"setSystemTime",(function(e){return function(n,r){var o=t.current.get("FakeAsyncTestZoneSpec");if(!o||!i())return e.apply(n,r);o.setFakeBaseSystemTime(r[0])}})),n.patchMethod(r,"getRealSystemTime",(function(e){return function(n,r){var o=t.current.get("FakeAsyncTestZoneSpec");return o&&i()?o.getRealSystemTime():e.apply(n,r)}})),n.patchMethod(r,"runAllTicks",(function(e){return function(n,r){var o=t.current.get("FakeAsyncTestZoneSpec");if(!o)return e.apply(n,r);o.flushMicrotasks()}})),n.patchMethod(r,"runAllTimers",(function(e){return function(n,r){var o=t.current.get("FakeAsyncTestZoneSpec");if(!o)return e.apply(n,r);o.flush(100,!0)}})),n.patchMethod(r,"advanceTimersByTime",(function(e){return function(n,r){var o=t.current.get("FakeAsyncTestZoneSpec");if(!o)return e.apply(n,r);o.tick(r[0])}})),n.patchMethod(r,"runOnlyPendingTimers",(function(e){return function(n,r){var o=t.current.get("FakeAsyncTestZoneSpec");if(!o)return e.apply(n,r);o.flushOnlyPendingTimers()}})),n.patchMethod(r,"advanceTimersToNextTimer",(function(e){return function(n,r){var o=t.current.get("FakeAsyncTestZoneSpec");if(!o)return e.apply(n,r);o.tickToNext(r[0])}})),n.patchMethod(r,"clearAllTimers",(function(e){return function(n,r){var o=t.current.get("FakeAsyncTestZoneSpec");if(!o)return e.apply(n,r);o.removeAllTimers()}})),n.patchMethod(r,"getTimerCount",(function(e){return function(n,r){var o=t.current.get("FakeAsyncTestZoneSpec");return o?o.getTimerCount():e.apply(n,r)}})))}}function u(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return s.run(e,this,t)}}function l(e,r){if(void 0===r&&(r=!1),"function"!=typeof e)return e;var o=function(){if(!0===t[n.symbol("useFakeTimersCalled")]&&e&&!e.isFakeAsync){var o=t[t.__symbol__("fakeAsyncTest")];o&&"function"==typeof o.fakeAsync&&(e=o.fakeAsync(e))}return a.isTestFunc=r,c.run(e,null,arguments)};return Object.defineProperty(o,"length",{configurable:!0,writable:!0,enumerable:!1}),o.length=e.length,o}})),Zone.__load_patch("mocha",(function(e,t){var n=e.Mocha;if(void 0!==n){if(void 0===t)throw new Error("Missing Zone.js");var r=t.ProxyZoneSpec,o=t.SyncTestZoneSpec;if(!r)throw new Error("Missing ProxyZoneSpec");if(n.__zone_patch__)throw new Error('"Mocha" has already been patched with "Zone".');n.__zone_patch__=!0;var i,s,a=t.current,c=a.fork(new o("Mocha.describe")),u=null,l=a.fork(new r),h={after:e.after,afterEach:e.afterEach,before:e.before,beforeEach:e.beforeEach,describe:e.describe,it:e.it};e.describe=e.suite=function(){return h.describe.apply(this,p(arguments))},e.xdescribe=e.suite.skip=e.describe.skip=function(){return h.describe.skip.apply(this,p(arguments))},e.describe.only=e.suite.only=function(){return h.describe.only.apply(this,p(arguments))},e.it=e.specify=e.test=function(){return h.it.apply(this,d(arguments))},e.xit=e.xspecify=e.it.skip=function(){return h.it.skip.apply(this,d(arguments))},e.it.only=e.test.only=function(){return h.it.only.apply(this,d(arguments))},e.after=e.suiteTeardown=function(){return h.after.apply(this,y(arguments))},e.afterEach=e.teardown=function(){return h.afterEach.apply(this,d(arguments))},e.before=e.suiteSetup=function(){return h.before.apply(this,y(arguments))},e.beforeEach=e.setup=function(){return h.beforeEach.apply(this,d(arguments))},i=n.Runner.prototype.runTest,s=n.Runner.prototype.run,n.Runner.prototype.runTest=function(e){var n=this;t.current.scheduleMicroTask("mocha.forceTask",(function(){i.call(n,e)}))},n.Runner.prototype.run=function(e){return this.on("test",(function(e){u=a.fork(new r)})),this.on("fail",(function(e,t){var n=u&&u.get("ProxyZoneSpec");if(n&&t)try{t.message+=n.getAndClearPendingTasksInfo()}catch(e){}})),s.call(this,e)}}function f(e,t,n){for(var r=function(r){var o=e[r];"function"==typeof o&&(e[r]=0===o.length?t(o):n(o),e[r].toString=function(){return o.toString()})},o=0;o<e.length;o++)r(o);return e}function p(e){return f(e,(function(e){return function(){return c.run(e,this,arguments)}}))}function d(e){return f(e,(function(e){return function(){return u.run(e,this)}}),(function(e){return function(t){return u.run(e,this,[t])}}))}function y(e){return f(e,(function(e){return function(){return l.run(e,this)}}),(function(e){return function(t){return l.run(e,this,[t])}}))}})),function(e){var t,n=function(){function n(t,n,r){this.finishCallback=t,this.failCallback=n,this._pendingMicroTasks=!1,this._pendingMacroTasks=!1,this._alreadyErrored=!1,this._isSync=!1,this._existingFinishTimer=null,this.entryFunction=null,this.runZone=Zone.current,this.unresolvedChainedPromiseCount=0,this.supportWaitUnresolvedChainedPromise=!1,this.name="asyncTestZone for "+r,this.properties={AsyncTestZoneSpec:this},this.supportWaitUnresolvedChainedPromise=!0===e[Zone.__symbol__("supportWaitUnResolvedChainedPromise")]}return n.prototype.isUnresolvedChainedPromisePending=function(){return this.unresolvedChainedPromiseCount>0},n.prototype._finishCallbackIfDone=function(){var e=this;null!==this._existingFinishTimer&&(clearTimeout(this._existingFinishTimer),this._existingFinishTimer=null),this._pendingMicroTasks||this._pendingMacroTasks||this.supportWaitUnresolvedChainedPromise&&this.isUnresolvedChainedPromisePending()||this.runZone.run((function(){e._existingFinishTimer=setTimeout((function(){e._alreadyErrored||e._pendingMicroTasks||e._pendingMacroTasks||e.finishCallback()}),0)}))},n.prototype.patchPromiseForTest=function(){if(this.supportWaitUnresolvedChainedPromise){var e=Promise[Zone.__symbol__("patchPromiseForTest")];e&&e()}},n.prototype.unPatchPromiseForTest=function(){if(this.supportWaitUnresolvedChainedPromise){var e=Promise[Zone.__symbol__("unPatchPromiseForTest")];e&&e()}},n.prototype.onScheduleTask=function(e,n,r,o){return"eventTask"!==o.type&&(this._isSync=!1),"microTask"===o.type&&o.data&&o.data instanceof Promise&&!0===o.data[t.symbolParentUnresolved]&&this.unresolvedChainedPromiseCount--,e.scheduleTask(r,o)},n.prototype.onInvokeTask=function(e,t,n,r,o,i){return"eventTask"!==r.type&&(this._isSync=!1),e.invokeTask(n,r,o,i)},n.prototype.onCancelTask=function(e,t,n,r){return"eventTask"!==r.type&&(this._isSync=!1),e.cancelTask(n,r)},n.prototype.onInvoke=function(e,t,n,r,o,i,s){this.entryFunction||(this.entryFunction=r);try{return this._isSync=!0,e.invoke(n,r,o,i,s)}finally{this._isSync&&this.entryFunction===r&&this._finishCallbackIfDone()}},n.prototype.onHandleError=function(e,t,n,r){return e.handleError(n,r)&&(this.failCallback(r),this._alreadyErrored=!0),!1},n.prototype.onHasTask=function(e,t,n,r){e.hasTask(n,r),t===n&&("microTask"==r.change?(this._pendingMicroTasks=r.microTask,this._finishCallbackIfDone()):"macroTask"==r.change&&(this._pendingMacroTasks=r.macroTask,this._finishCallbackIfDone()))},n}();(t=n).symbolParentUnresolved=Zone.__symbol__("parentUnresolved"),Zone.AsyncTestZoneSpec=n}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global),Zone.__load_patch("asynctest",(function(e,t,n){function r(e,n,r,o){var i=t.current,s=t.AsyncTestZoneSpec;if(void 0===s)throw new Error("AsyncTestZoneSpec is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/plugins/async-test");var a=t.ProxyZoneSpec;if(!a)throw new Error("ProxyZoneSpec is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/plugins/proxy");var c=a.get();a.assertPresent();var u=t.current.getZoneWith("ProxyZoneSpec"),l=c.getDelegate();return u.parent.run((function(){var e=new s((function(){c.getDelegate()==e&&c.setDelegate(l),e.unPatchPromiseForTest(),i.run((function(){r()}))}),(function(t){c.getDelegate()==e&&c.setDelegate(l),e.unPatchPromiseForTest(),i.run((function(){o(t)}))}),"test");c.setDelegate(e),e.patchPromiseForTest()})),t.current.runGuarded(e,n)}t[n.symbol("asyncTest")]=function t(n){return e.jasmine?function(e){e||((e=function(){}).fail=function(e){throw e}),r(n,this,e,(function(t){if("string"==typeof t)return e.fail(new Error(t));e.fail(t)}))}:function(){var e=this;return new Promise((function(t,o){r(n,e,t,o)}))}}})),function(e){var t,n=e.Date;function r(){if(0===arguments.length){var e=new n;return e.setTime(r.now()),e}var t=Array.prototype.slice.call(arguments);return new(n.bind.apply(n,__spreadArray([void 0],t,!1)))}r.now=function(){var e=Zone.current.get("FakeAsyncTestZoneSpec");return e?e.getFakeSystemTime():n.now.apply(this,arguments)},r.UTC=n.UTC,r.parse=n.parse;var o={setTimeout:e.setTimeout,setInterval:e.setInterval,clearTimeout:e.clearTimeout,clearInterval:e.clearInterval},i=function(){function r(){this._schedulerQueue=[],this._currentTickTime=0,this._currentFakeBaseSystemTime=n.now(),this._currentTickRequeuePeriodicEntries=[]}return r.prototype.getCurrentTickTime=function(){return this._currentTickTime},r.prototype.getFakeSystemTime=function(){return this._currentFakeBaseSystemTime+this._currentTickTime},r.prototype.setFakeBaseSystemTime=function(e){this._currentFakeBaseSystemTime=e},r.prototype.getRealSystemTime=function(){return n.now()},r.prototype.scheduleFunction=function(e,n,r){var o=(r=__assign({args:[],isPeriodic:!1,isRequestAnimationFrame:!1,id:-1,isRequeuePeriodic:!1},r)).id<0?t.nextId++:r.id,i={endTime:this._currentTickTime+n,id:o,func:e,args:r.args,delay:n,isPeriodic:r.isPeriodic,isRequestAnimationFrame:r.isRequestAnimationFrame};r.isRequeuePeriodic&&this._currentTickRequeuePeriodicEntries.push(i);for(var s=0;s<this._schedulerQueue.length&&!(i.endTime<this._schedulerQueue[s].endTime);s++);return this._schedulerQueue.splice(s,0,i),o},r.prototype.removeScheduledFunctionWithId=function(e){for(var t=0;t<this._schedulerQueue.length;t++)if(this._schedulerQueue[t].id==e){this._schedulerQueue.splice(t,1);break}},r.prototype.removeAll=function(){this._schedulerQueue=[]},r.prototype.getTimerCount=function(){return this._schedulerQueue.length},r.prototype.tickToNext=function(e,t,n){void 0===e&&(e=1),this._schedulerQueue.length<e||this.tick(this._schedulerQueue[e-1].endTime-this._currentTickTime,t,n)},r.prototype.tick=function(t,n,r){void 0===t&&(t=0);var o=this._currentTickTime+t,i=0,s=(r=Object.assign({processNewMacroTasksSynchronously:!0},r)).processNewMacroTasksSynchronously?this._schedulerQueue:this._schedulerQueue.slice();if(0===s.length&&n)n(t);else{for(;s.length>0&&(this._currentTickRequeuePeriodicEntries=[],!(o<s[0].endTime));){var a=s.shift();if(!r.processNewMacroTasksSynchronously){var c=this._schedulerQueue.indexOf(a);c>=0&&this._schedulerQueue.splice(c,1)}if(i=this._currentTickTime,this._currentTickTime=a.endTime,n&&n(this._currentTickTime-i),!a.func.apply(e,a.isRequestAnimationFrame?[this._currentTickTime]:a.args))break;r.processNewMacroTasksSynchronously||this._currentTickRequeuePeriodicEntries.forEach((function(e){for(var t=0;t<s.length&&!(e.endTime<s[t].endTime);t++);s.splice(t,0,e)}))}i=this._currentTickTime,this._currentTickTime=o,n&&n(this._currentTickTime-i)}},r.prototype.flushOnlyPendingTimers=function(e){if(0===this._schedulerQueue.length)return 0;var t=this._currentTickTime;return this.tick(this._schedulerQueue[this._schedulerQueue.length-1].endTime-t,e,{processNewMacroTasksSynchronously:!1}),this._currentTickTime-t},r.prototype.flush=function(e,t,n){return void 0===e&&(e=20),void 0===t&&(t=!1),t?this.flushPeriodic(n):this.flushNonPeriodic(e,n)},r.prototype.flushPeriodic=function(e){if(0===this._schedulerQueue.length)return 0;var t=this._currentTickTime;return this.tick(this._schedulerQueue[this._schedulerQueue.length-1].endTime-t,e),this._currentTickTime-t},r.prototype.flushNonPeriodic=function(t,n){for(var r=this._currentTickTime,o=0,i=0;this._schedulerQueue.length>0;){if(++i>t)throw new Error("flush failed after reaching the limit of "+t+" tasks. Does your code use a polling timeout?");if(0===this._schedulerQueue.filter((function(e){return!e.isPeriodic&&!e.isRequestAnimationFrame})).length)break;var s=this._schedulerQueue.shift();if(o=this._currentTickTime,this._currentTickTime=s.endTime,n&&n(this._currentTickTime-o),!s.func.apply(e,s.args))break}return this._currentTickTime-r},r}();(t=i).nextId=1;var s=function(){function t(t,n,r){void 0===n&&(n=!1),this.trackPendingRequestAnimationFrame=n,this.macroTaskOptions=r,this._scheduler=new i,this._microtasks=[],this._lastError=null,this._uncaughtPromiseErrors=Promise[Zone.__symbol__("uncaughtPromiseErrors")],this.pendingPeriodicTimers=[],this.pendingTimers=[],this.patchDateLocked=!1,this.properties={FakeAsyncTestZoneSpec:this},this.name="fakeAsyncTestZone for "+t,this.macroTaskOptions||(this.macroTaskOptions=e[Zone.__symbol__("FakeAsyncTestMacroTask")])}return t.assertInZone=function(){if(null==Zone.current.get("FakeAsyncTestZoneSpec"))throw new Error("The code should be running in the fakeAsync zone to call this function")},t.prototype._fnAndFlush=function(t,n){var r=this;return function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return t.apply(e,o),null===r._lastError?(null!=n.onSuccess&&n.onSuccess.apply(e),r.flushMicrotasks()):null!=n.onError&&n.onError.apply(e),null===r._lastError}},t._removeTimer=function(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)},t.prototype._dequeueTimer=function(e){var n=this;return function(){t._removeTimer(n.pendingTimers,e)}},t.prototype._requeuePeriodicTimer=function(e,t,n,r){var o=this;return function(){-1!==o.pendingPeriodicTimers.indexOf(r)&&o._scheduler.scheduleFunction(e,t,{args:n,isPeriodic:!0,id:r,isRequeuePeriodic:!0})}},t.prototype._dequeuePeriodicTimer=function(e){var n=this;return function(){t._removeTimer(n.pendingPeriodicTimers,e)}},t.prototype._setTimeout=function(e,t,n,r){void 0===r&&(r=!0);var o=this._dequeueTimer(i.nextId),s=this._fnAndFlush(e,{onSuccess:o,onError:o}),a=this._scheduler.scheduleFunction(s,t,{args:n,isRequestAnimationFrame:!r});return r&&this.pendingTimers.push(a),a},t.prototype._clearTimeout=function(e){t._removeTimer(this.pendingTimers,e),this._scheduler.removeScheduledFunctionWithId(e)},t.prototype._setInterval=function(e,t,n){var r=i.nextId,o={onSuccess:null,onError:this._dequeuePeriodicTimer(r)},s=this._fnAndFlush(e,o);return o.onSuccess=this._requeuePeriodicTimer(s,t,n,r),this._scheduler.scheduleFunction(s,t,{args:n,isPeriodic:!0}),this.pendingPeriodicTimers.push(r),r},t.prototype._clearInterval=function(e){t._removeTimer(this.pendingPeriodicTimers,e),this._scheduler.removeScheduledFunctionWithId(e)},t.prototype._resetLastErrorAndThrow=function(){var e=this._lastError||this._uncaughtPromiseErrors[0];throw this._uncaughtPromiseErrors.length=0,this._lastError=null,e},t.prototype.getCurrentTickTime=function(){return this._scheduler.getCurrentTickTime()},t.prototype.getFakeSystemTime=function(){return this._scheduler.getFakeSystemTime()},t.prototype.setFakeBaseSystemTime=function(e){this._scheduler.setFakeBaseSystemTime(e)},t.prototype.getRealSystemTime=function(){return this._scheduler.getRealSystemTime()},t.patchDate=function(){e[Zone.__symbol__("disableDatePatching")]||e.Date!==r&&(e.Date=r,r.prototype=n.prototype,t.checkTimerPatch())},t.resetDate=function(){e.Date===r&&(e.Date=n)},t.checkTimerPatch=function(){e.setTimeout!==o.setTimeout&&(e.setTimeout=o.setTimeout,e.clearTimeout=o.clearTimeout),e.setInterval!==o.setInterval&&(e.setInterval=o.setInterval,e.clearInterval=o.clearInterval)},t.prototype.lockDatePatch=function(){this.patchDateLocked=!0,t.patchDate()},t.prototype.unlockDatePatch=function(){this.patchDateLocked=!1,t.resetDate()},t.prototype.tickToNext=function(e,n,r){void 0===e&&(e=1),void 0===r&&(r={processNewMacroTasksSynchronously:!0}),e<=0||(t.assertInZone(),this.flushMicrotasks(),this._scheduler.tickToNext(e,n,r),null!==this._lastError&&this._resetLastErrorAndThrow())},t.prototype.tick=function(e,n,r){void 0===e&&(e=0),void 0===r&&(r={processNewMacroTasksSynchronously:!0}),t.assertInZone(),this.flushMicrotasks(),this._scheduler.tick(e,n,r),null!==this._lastError&&this._resetLastErrorAndThrow()},t.prototype.flushMicrotasks=function(){var e=this;for(t.assertInZone();this._microtasks.length>0;){var n=this._microtasks.shift();n.func.apply(n.target,n.args)}(null!==e._lastError||e._uncaughtPromiseErrors.length)&&e._resetLastErrorAndThrow()},t.prototype.flush=function(e,n,r){t.assertInZone(),this.flushMicrotasks();var o=this._scheduler.flush(e,n,r);return null!==this._lastError&&this._resetLastErrorAndThrow(),o},t.prototype.flushOnlyPendingTimers=function(e){t.assertInZone(),this.flushMicrotasks();var n=this._scheduler.flushOnlyPendingTimers(e);return null!==this._lastError&&this._resetLastErrorAndThrow(),n},t.prototype.removeAllTimers=function(){t.assertInZone(),this._scheduler.removeAll(),this.pendingPeriodicTimers=[],this.pendingTimers=[]},t.prototype.getTimerCount=function(){return this._scheduler.getTimerCount()+this._microtasks.length},t.prototype.onScheduleTask=function(e,t,n,r){switch(r.type){case"microTask":var o=r.data&&r.data.args,i=void 0;if(o){var s=r.data.cbIdx;"number"==typeof o.length&&o.length>s+1&&(i=Array.prototype.slice.call(o,s+1))}this._microtasks.push({func:r.invoke,args:i,target:r.data&&r.data.target});break;case"macroTask":switch(r.source){case"setTimeout":r.data.handleId=this._setTimeout(r.invoke,r.data.delay,Array.prototype.slice.call(r.data.args,2));break;case"setImmediate":r.data.handleId=this._setTimeout(r.invoke,0,Array.prototype.slice.call(r.data.args,1));break;case"setInterval":r.data.handleId=this._setInterval(r.invoke,r.data.delay,Array.prototype.slice.call(r.data.args,2));break;case"XMLHttpRequest.send":throw new Error("Cannot make XHRs from within a fake async test. Request URL: "+r.data.url);case"requestAnimationFrame":case"webkitRequestAnimationFrame":case"mozRequestAnimationFrame":r.data.handleId=this._setTimeout(r.invoke,16,r.data.args,this.trackPendingRequestAnimationFrame);break;default:var a=this.findMacroTaskOption(r);if(a){var c=r.data&&r.data.args,u=c&&c.length>1?c[1]:0,l=a.callbackArgs?a.callbackArgs:c;a.isPeriodic?(r.data.handleId=this._setInterval(r.invoke,u,l),r.data.isPeriodic=!0):r.data.handleId=this._setTimeout(r.invoke,u,l);break}throw new Error("Unknown macroTask scheduled in fake async test: "+r.source)}break;case"eventTask":r=e.scheduleTask(n,r)}return r},t.prototype.onCancelTask=function(e,t,n,r){switch(r.source){case"setTimeout":case"requestAnimationFrame":case"webkitRequestAnimationFrame":case"mozRequestAnimationFrame":return this._clearTimeout(r.data.handleId);case"setInterval":return this._clearInterval(r.data.handleId);default:var o=this.findMacroTaskOption(r);if(o){var i=r.data.handleId;return o.isPeriodic?this._clearInterval(i):this._clearTimeout(i)}return e.cancelTask(n,r)}},t.prototype.onInvoke=function(e,n,r,o,i,s,a){try{return t.patchDate(),e.invoke(r,o,i,s,a)}finally{this.patchDateLocked||t.resetDate()}},t.prototype.findMacroTaskOption=function(e){if(!this.macroTaskOptions)return null;for(var t=0;t<this.macroTaskOptions.length;t++){var n=this.macroTaskOptions[t];if(n.source===e.source)return n}return null},t.prototype.onHandleError=function(e,t,n,r){return this._lastError=r,!1},t}();Zone.FakeAsyncTestZoneSpec=s}("object"==typeof window&&window||"object"==typeof self&&self||global),Zone.__load_patch("fakeasync",(function(e,t,n){var r=t&&t.FakeAsyncTestZoneSpec;function o(){return t&&t.ProxyZoneSpec}var i=null;function s(){i&&i.unlockDatePatch(),i=null,o()&&o().assertPresent().resetDelegate()}function a(){if(null==i&&null==(i=t.current.get("FakeAsyncTestZoneSpec")))throw new Error("The code should be running in the fakeAsync zone to call this function");return i}function c(){a().flushMicrotasks()}t[n.symbol("fakeAsyncTest")]={resetFakeAsyncZone:s,flushMicrotasks:c,discardPeriodicTasks:function u(){a().pendingPeriodicTimers.length=0},tick:function l(e,t){void 0===e&&(e=0),void 0===t&&(t=!1),a().tick(e,null,t)},flush:function h(e){return a().flush(e)},fakeAsync:function f(e){var n=function(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];var u=o();if(!u)throw new Error("ProxyZoneSpec is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/plugins/proxy");var l=u.assertPresent();if(t.current.get("FakeAsyncTestZoneSpec"))throw new Error("fakeAsync() calls can not be nested");try{if(!i){if(l.getDelegate()instanceof r)throw new Error("fakeAsync() calls can not be nested");i=new r}var h=void 0,f=l.getDelegate();l.setDelegate(i),i.lockDatePatch();try{h=e.apply(this,n),c()}finally{l.setDelegate(f)}if(i.pendingPeriodicTimers.length>0)throw new Error("".concat(i.pendingPeriodicTimers.length," ")+"periodic timer(s) still in the queue.");if(i.pendingTimers.length>0)throw new Error("".concat(i.pendingTimers.length," timer(s) still in the queue."));return h}finally{s()}};return n.isFakeAsync=!0,n}}}),!0),Zone.__load_patch("promisefortest",(function(e,t,n){var r=n.symbol("state"),o=n.symbol("parentUnresolved");Promise[n.symbol("patchPromiseForTest")]=function e(){var n=Promise[t.__symbol__("ZonePromiseThen")];n||(n=Promise[t.__symbol__("ZonePromiseThen")]=Promise.prototype.then,Promise.prototype.then=function(){var e=n.apply(this,arguments);if(null===this[r]){var i=t.current.get("AsyncTestZoneSpec");i&&(i.unresolvedChainedPromiseCount++,e[o]=!0)}return e})},Promise[n.symbol("unPatchPromiseForTest")]=function e(){var n=Promise[t.__symbol__("ZonePromiseThen")];n&&(Promise.prototype.then=n,Promise[t.__symbol__("ZonePromiseThen")]=void 0)}}))}));