projecte_ionic/node_modules/zone.js/fesm2015/zone-testing-node-bundle.min.js

153 lines
65 KiB
JavaScript
Raw Permalink Normal View History

2022-02-09 18:30:03 +01:00
"use strict";
/**
* @license Angular v12.0.0-next.0
* (c) 2010-2020 Google LLC. https://angular.io/
* License: MIT
*/
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/const Zone$1=function(e){const 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");const s=e.__Zone_symbol_prefix||"__zone_symbol__";function o(e){return s+e}const i=!0===e[o("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!==A.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 I.zone}static get currentTask(){return C}static __load_patch(t,s,o=!1){if(A.hasOwnProperty(t)){if(!o&&i)throw Error("Already loaded patch: "+t)}else if(!e["__Zone_disable_"+t]){const o="Zone:"+t;n(o),A[t]=s(e,a,D),r(o,o)}}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),r=this;return function(){return r.runGuarded(n,this,arguments,t)}}run(e,t,n,r){I={parent:I,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{I=I.parent}}runGuarded(e,t=null,n,r){I={parent:I,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{I=I.parent}}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===g&&(e.type===O||e.type===Z))return;const r=e.state!=E;r&&e._transitionTo(E,S),e.runCount++;const s=C;C=e,I={parent:I,zone:this};try{e.type==Z&&e.data&&!e.data.isPeriodic&&(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,e,t,n)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{e.state!==g&&e.state!==P&&(e.type==O||e.data&&e.data.isPeriodic?r&&e._transitionTo(S,E):(e.runCount=0,this._updateTaskCount(e,-1),r&&e._transitionTo(g,E,g))),I=I.parent,C=s}}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,g);const t=[];e._zoneDelegates=t,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(t){throw e._transitionTo(P,b,g),this._zoneDelegate.handleError(this,t),t}return e._zoneDelegates===t&&this._updateTaskCount(e,1),e.state==b&&e._transitionTo(S,b),e}scheduleMicroTask(e,t,n,r){return this.scheduleTask(new u(w,e,t,n,r,void 0))}scheduleMacroTask(e,t,n,r,s){return this.scheduleTask(new u(Z,e,t,n,r,s))}scheduleEventTask(e,t,n,r,s){return this.scheduleTask(new u(O,e,t,n,r,s))}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(v,S,E);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(P,v),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(g,v),e.runCount=0,e}_updateTaskCount(e,t){const n=e._zoneDelegates;-1==t&&(e._zoneDelegates=null);for(let r=0;r<n.length;r++)n[r]._updateTaskCount(e.type,t)}}a.__symbol__=o;const c={name:"",onHasTask:(e,t,n,r)=>e.hasTask(n,r),onScheduleTask:(e,t,n,r)=>e.scheduleTask(n,r),onInvokeTask:(e,t,n,r,s,o)=>e.invokeTask(n,r,s,o),onCancelTa
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/function wrapWithCurrentZone(e,t){return Zone.current.wrap(e,t)}function scheduleMacroTaskWithCurrentZone(e,t,n,r,s){return Zone.current.scheduleMacroTask(e,t,n,r,s)}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 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,r=n[t];let s;if(isBrowser&&n===internalWindow&&"error"===e.type){const t=e;s=r&&r.call(this,t.message,t.filename,t.lineno,t.colno,t.error),!0===s&&e.preventDefault()}else s=r&&r.apply(this,arguments),null==s||s||e.preventDefault();return s};function patchProperty(e,t,n){let r=ObjectGetOwnPropertyDescriptor(e,t);if(!r&&n&&ObjectGetOwnPropertyDescriptor(n,t)&&(r={enumerable:!0,configurable:!0}),!r||!r.configurable)return;const s=zoneSymbol("on"+t+"patched");if(e.hasOwnProperty(s)&&e[s])return;delete r.writable,delete r.value;const o=r.get,i=r.set,a=t.substr(2);let c=zoneSymbolEventNames[a];c||(c=zoneSymbolEventNames[a]=zoneSymbol("ON_PROPERTY"+a)),r.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)},r.get=function(){let n=this;if(n||e!==_global||(n=_global),!n)return null;const s=n[c];if(s)return s;if(o){let e=o&&o.call(this);if(e)return r.set.call(this,e),"function"==typeof n.removeAttribute&&n.removeAttribute(t),e}return null},ObjectDefineProperty(e,t,r),e[s]=!0}function patchOnProperties(e,t,n){if(t)for(let r=0;r<t.length;r++)patchProperty(e,"on"+t[r],n);else{const t=[];for(const n in e)"on"==n.substr(0,2)&&t.push(n);for(let r=0;r<t.length;r++)patchProperty(e,t[r],n)}}const originalInstanceKey=zoneSymbol("originalInstance");function copySymbolProperties(e,t){"function"==typeof Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(n=>{const 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})})}let shouldCopySymbolProperties=!1;function setShouldCopySymbolProperties(e){shouldCopySymbolProperties=e}function patchMethod(e,t,n){let r=e;for(;r&&!r.hasOwnProperty(t);)r=ObjectGetPrototypeOf(r);!r&&e[t]&&(r=e);const s=zoneSymbol(t);let o=null;if(r&&(!(o=r[s])||!r.hasOwnProperty(s))&&(o=r[s]=r[t],isPropertyWritable(r&&ObjectGetOwnPropertyDescriptor(r,t)))){const e=n(o,s,t);r[t]=function(){return e(this,arguments)},attachOriginToPatched(r[t],o),shouldCopySymbolProperties&&copySymbolProperties(o,r[t])}return o}function patchMacroTask(e,t,n){let r=null;function s(e){const t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},r.apply(t.target,t.args),e}r=patchMethod(e,t,e=>function(t,r){const o=n(t,r);return o.cbIdx>=0&&"function"==typeof r[o.cbIdx]?scheduleMacroTaskWithCurrentZone(o.name,r[o.cbIdx],o,s):e.apply(t,r)})}function patchMicroTask(e,t,n){let r=null;function s(e){const t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},r.apply(t.target,t.args),e}r=patchMethod(e,t,e=>
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/Zone.__load_patch("ZoneAwarePromise",(e,t,n)=>{const r=Object.getOwnPropertyDescriptor,s=Object.defineProperty,o=n.symbol,i=[],a=!0===e[o("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],c=o("Promise"),l=o("then");n.onUnhandledError=e=>{if(n.showUncaughtError()){const t=e&&e.rejection;t?console.error("Unhandled Promise rejection:",t instanceof Error?t.message:t,"; Zone:",e.zone.name,"; Task:",e.task&&e.task.source,"; Value:",t,t instanceof Error?t.stack:void 0):console.error(e)}},n.microtaskDrainDone=()=>{for(;i.length;){const e=i.shift();try{e.zone.runGuarded(()=>{if(e.throwOriginal)throw e.rejection;throw e})}catch(e){h(e)}}};const u=o("unhandledPromiseRejectionHandler");function h(e){n.onUnhandledError(e);try{const n=t[u];"function"==typeof n&&n.call(this,e)}catch(e){}}function p(e){return e&&e.then}function d(e){return e}function f(e){return Z.reject(e)}const _=o("state"),m=o("value"),k=o("finally"),T=o("parentPromiseValue"),y=o("parentPromiseState");function g(e,t){return n=>{try{S(e,t,n)}catch(t){S(e,!1,t)}}}const b=o("currentTaskTrace");function S(e,r,o){const c=function(){let e=!1;return function t(n){return function(){e||(e=!0,n.apply(null,arguments))}}}();if(e===o)throw new TypeError("Promise resolved with itself");if(null===e[_]){let l=null;try{"object"!=typeof o&&"function"!=typeof o||(l=o&&o.then)}catch(t){return c(()=>{S(e,!1,t)})(),e}if(!1!==r&&o instanceof Z&&o.hasOwnProperty(_)&&o.hasOwnProperty(m)&&null!==o[_])v(o),S(e,o[_],o[m]);else if(!1!==r&&"function"==typeof l)try{l.call(o,c(g(e,r)),c(g(e,!1)))}catch(t){c(()=>{S(e,!1,t)})()}else{e[_]=r;const c=e[m];if(e[m]=o,e[k]===k&&!0===r&&(e[_]=e[y],e[m]=e[T]),!1===r&&o instanceof Error){const e=t.currentTask&&t.currentTask.data&&t.currentTask.data.__creationTrace__;e&&s(o,b,{configurable:!0,enumerable:!1,writable:!0,value:e})}for(let t=0;t<c.length;)P(e,c[t++],c[t++],c[t++],c[t++]);if(0==c.length&&0==r){e[_]=0;let r=o;try{throw new Error("Uncaught (in promise): "+function l(e){return e&&e.toString===Object.prototype.toString?(e.constructor&&e.constructor.name||"")+": "+JSON.stringify(e):e?e.toString():Object.prototype.toString.call(e)}(o)+(o&&o.stack?"\n"+o.stack:""))}catch(e){r=e}a&&(r.throwOriginal=!0),r.rejection=o,r.promise=e,r.zone=t.current,r.task=t.currentTask,i.push(r),n.scheduleMicroTask()}}}return e}const E=o("rejectionHandledHandler");function v(e){if(0===e[_]){try{const n=t[E];n&&"function"==typeof n&&n.call(this,{rejection:e[m],promise:e})}catch(e){}e[_]=!1;for(let t=0;t<i.length;t++)e===i[t].promise&&i.splice(t,1)}}function P(e,t,n,r,s){v(e);const o=e[_],i=o?"function"==typeof r?r:d:"function"==typeof s?s:f;t.scheduleMicroTask("Promise.then",()=>{try{const r=e[m],s=!!n&&k===n[k];s&&(n[T]=r,n[y]=o);const a=t.run(i,void 0,s&&i!==f&&i!==d?[]:[r]);S(n,!0,a)}catch(e){S(n,!1,e)}},n)}const w=function(){};class Z{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(e){return S(new this(null),!0,e)}static reject(e){return S(new this(null),!1,e)}static race(e){let t,n,r=new this((e,r)=>{t=e,n=r});function s(e){t(e)}function o(e){n(e)}for(let t of e)p(t)||(t=this.resolve(t)),t.then(s,o);return r}static all(e){return Z.allWithCallback(e)}static allSettled(e){return(this&&this.prototype instanceof Z?this:Z).allWithCallback(e,{thenCallback:e=>({status:"fulfilled",value:e}),errorCallback:e=>({status:"rejected",reason:e})})}static allWithCallback(e,t){let n,r,s=new this((e,t)=>{n=e,r=t}),o=2,i=0;const a=[];for(let s of e){p(s)||(s=this.resolve(s));const e=i;try{s.then(r=>{a[e]=t?t.thenCallback(r):r,o--,0===o&&n(a)},s=>{t?(a[e]=t.errorCallback(s),o--,0===o&&n(a)):r(s)})}catch(e){r(e)}o++,i++}return o-=2,0===o&&n(a),s}constructor(e){const t=this;if(!(t instanceof Z))throw new Error("Must be an instanceof Promise.");t[_]=null,t[m]=[];try{e&&e(g(t,!0),g(t,!1))}catch(e){S(t,!1,e)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return Z}then(e,n){let r=this.constructor[Symbol.species];r&&"function"==typeof r||(r=this.constructor||Z);const s=new r(w),o=t.current;return null==this[_]?this[m].push(o,s,e,n):P(this,o,s
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
Zone.__load_patch("toString",e=>{const t=Function.prototype.toString,n=zoneSymbol("OriginalDelegate"),r=zoneSymbol("Promise"),s=zoneSymbol("Error"),o=function o(){if("function"==typeof this){const o=this[n];if(o)return"function"==typeof o?t.call(o):Object.prototype.toString.call(o);if(this===Promise){const n=e[r];if(n)return t.call(n)}if(this===Error){const n=e[s];if(n)return t.call(n)}}return t.call(this)};o[n]=t,Function.prototype.toString=o;const i=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":i.call(this)}}),
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
Zone.__load_patch("node_util",(e,t,n)=>{n.patchOnProperties=patchOnProperties,n.patchMethod=patchMethod,n.bindArguments=bindArguments,n.patchMacroTask=patchMacroTask,setShouldCopySymbolProperties(!0)});
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
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=new RegExp("^"+ZONE_SYMBOL_PREFIX+"(\\w+)(true|false)$"),IMMEDIATE_PROPAGATION_SYMBOL=zoneSymbol("propagationStopped");function prepareEventNames(e,t){const n=(t?t(e):e)+"false",r=(t?t(e):e)+"true",s=ZONE_SYMBOL_PREFIX+n,o=ZONE_SYMBOL_PREFIX+r;zoneSymbolEventNames$1[e]={},zoneSymbolEventNames$1[e].false=s,zoneSymbolEventNames$1[e].true=o}function patchEventTarget(e,t,n){const r=n&&n.add||"addEventListener",s=n&&n.rm||"removeEventListener",o=n&&n.listeners||"eventListeners",i=n&&n.rmAll||"removeAllListeners",a=zoneSymbol(r),c="."+r+":",l=function(e,t,n){if(e.isRemoved)return;const r=e.callback;"object"==typeof r&&r.handleEvent&&(e.callback=e=>r.handleEvent(e),e.originalDelegate=r),e.invoke(e,t,[n]);const o=e.options;o&&"object"==typeof o&&o.once&&t[s].call(t,n.type,e.originalDelegate?e.originalDelegate:e.callback,o)},u=function(t){if(!(t=t||e.event))return;const n=this||t.target||e,r=n[zoneSymbolEventNames$1[t.type].false];if(r)if(1===r.length)l(r[0],n,t);else{const e=r.slice();for(let r=0;r<e.length&&(!t||!0!==t[IMMEDIATE_PROPAGATION_SYMBOL]);r++)l(e[r],n,t)}},h=function(t){if(!(t=t||e.event))return;const n=this||t.target||e,r=n[zoneSymbolEventNames$1[t.type].true];if(r)if(1===r.length)l(r[0],n,t);else{const e=r.slice();for(let r=0;r<e.length&&(!t||!0!==t[IMMEDIATE_PROPAGATION_SYMBOL]);r++)l(e[r],n,t)}};function p(t,n){if(!t)return!1;let l=!0;n&&void 0!==n.useG&&(l=n.useG);const p=n&&n.vh;let d=!0;n&&void 0!==n.chkDup&&(d=n.chkDup);let f=!1;n&&void 0!==n.rt&&(f=n.rt);let _=t;for(;_&&!_.hasOwnProperty(r);)_=ObjectGetPrototypeOf(_);if(!_&&t[r]&&(_=t),!_)return!1;if(_[a])return!1;const m=n&&n.eventNameToString,k={},T=_[a]=_[r],y=_[zoneSymbol(s)]=_[s],g=_[zoneSymbol(o)]=_[o],b=_[zoneSymbol(i)]=_[i];let S;function E(e,t){return!passiveSupported&&"object"==typeof e&&e?!!e.capture:passiveSupported&&t?"boolean"==typeof e?{capture:e,passive:!0}:e?"object"==typeof e&&!1!==e.passive?Object.assign(Object.assign({},e),{passive:!0}):e:{passive:!0}:e}n&&n.prepend&&(S=_[zoneSymbol(n.prepend)]=_[n.prepend]);const v=l?function(e){if(!k.isExisting)return T.call(k.target,k.eventName,k.capture?h:u,k.options)}:function(e){return T.call(k.target,k.eventName,e.invoke,k.options)},P=l?function(e){if(!e.isRemoved){const t=zoneSymbolEventNames$1[e.eventName];let n;t&&(n=t[e.capture?"true":"false"]);const r=n&&e.target[n];if(r)for(let t=0;t<r.length;t++)if(r[t]===e){r.splice(t,1),e.isRemoved=!0,0===r.length&&(e.allRemoved=!0,e.target[n]=null);break}}if(e.allRemoved)return y.call(e.target,e.eventName,e.capture?h:u,e.options)}:function(e){return y.call(e.target,e.eventName,e.invoke,e.options)},w=n&&n.diff?n.diff:function(e,t){const n=typeof t;return"function"===n&&e.callback===t||"object"===n&&e.originalDelegate===t},Z=Zone[zoneSymbol("UNPATCHED_EVENTS")],O=e[zoneSymbol("PASSIVE_EVENTS")],A=function(t,r,s,o,i=!1,a=!1){return function(){const c=this||e;let u=arguments[0];n&&n.transferEventName&&(u=n.transferEventName(u));let h=arguments[1];if(!h)return t.apply(this,arguments);if(isNode&&"uncaughtException"===u)return t.apply(this,arguments);let f=!1;if("function"!=typeof h){if(!h.handleEvent)return t.apply(this,arguments);f=!0}if(p&&!p(t,h,c,arguments))return;const _=passiveSupported&&!!O&&-1!==O.indexOf(u),T=E(arguments[2],_);if(Z)for(let e=0;e<Z.length;e++)if(u===Z[e])return _?t.call(c,u,h,T):t.apply(this,arguments);const y=!!T&&("boolean"==typeof T||T.capture),g=!(!T||"object"!=typeof T)&&T.once,b=Zone.current;let S=zoneSymbolEventNames$1[u];S||(prepareEventNames(u,m),S=zoneSymbolEventNames$1[u]);const v=S[y?"true":"false"];let P,A=c[v],D=!1;if(A){if(D=!0,d)for(let e=0;e<A.length;e++)if(w(A[e],h))return}else A=c[v]=[];const I=c.constructor.name,C=globalSources[I];C&&(P=C[u]),P||(P=I+r+(m?m(u):u)),k
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/Zone.__load_patch("EventEmitter",e=>{const t=function(e,t){return e.callback===t||e.callback.listener===t},n=function(e){return"string"==typeof e?e:e?e.toString().replace("(","_").replace(")","_"):""};let r;try{r=require("events")}catch(e){}r&&r.EventEmitter&&function s(r){const s=patchEventTarget(e,[r],{useG:!1,add:"addListener",rm:"removeListener",prepend:"prependListener",rmAll:"removeAllListeners",listeners:"listeners",chkDup:!1,rt:!0,diff:t,eventNameToString:n});s&&s[0]&&(r.on=r.addListener,r.off=r.removeListener)}(r.EventEmitter.prototype)}),
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
Zone.__load_patch("fs",()=>{let 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(t=>!!e[t]&&"function"==typeof e[t]).forEach(t=>{patchMacroTask(e,t,(e,n)=>({name:"fs."+t,args:n,cbIdx:n.length>0?n.length-1:-1,target:e}))})});
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
const taskSymbol=zoneSymbol("zoneTask");function patchTimer(e,t,n,r){let s=null,o=null;n+=r;const i={};function a(t){const n=t.data;return n.args[0]=function(){return t.invoke.apply(this,arguments)},n.handleId=s.apply(e,n.args),t}function c(t){return o.call(e,t.data.handleId)}s=patchMethod(e,t+=r,n=>function(s,o){if("function"==typeof o[0]){const e={isPeriodic:"Interval"===r,delay:"Timeout"===r||"Interval"===r?o[1]||0:void 0,args:o},n=o[0];o[0]=function t(){try{return n.apply(this,arguments)}finally{e.isPeriodic||("number"==typeof e.handleId?delete i[e.handleId]:e.handleId&&(e.handleId[taskSymbol]=null))}};const s=scheduleMacroTaskWithCurrentZone(t,o[0],e,a,c);if(!s)return s;const l=s.data.handleId;return"number"==typeof l?i[l]=s:l&&(l[taskSymbol]=s),l&&l.ref&&l.unref&&"function"==typeof l.ref&&"function"==typeof l.unref&&(s.ref=l.ref.bind(l),s.unref=l.unref.bind(l)),"number"==typeof l||l?l:s}return n.apply(e,o)}),o=patchMethod(e,n,t=>function(n,r){const s=r[0];let o;"number"==typeof s?o=i[s]:(o=s&&s[taskSymbol],o||(o=s)),o&&"string"==typeof o.type?"notScheduled"!==o.state&&(o.cancelFn&&o.data.isPeriodic||0===o.runCount)&&("number"==typeof s?delete i[s]:s&&(s[taskSymbol]=null),o.zone.cancelTask(o)):t.apply(e,r)})}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/const set="set",clear="clear";Zone.__load_patch("node_timers",(e,t)=>{let n=!1;try{const t=require("timers");if(e.setTimeout!==t.setTimeout&&!isMix){const r=t.setTimeout;t.setTimeout=function(){return n=!0,r.apply(this,arguments)};const s=e.setTimeout(()=>{},100);clearTimeout(s),t.setTimeout=r}patchTimer(t,set,clear,"Timeout"),patchTimer(t,set,clear,"Interval"),patchTimer(t,set,clear,"Immediate")}catch(e){}isMix||(n?(e[t.__symbol__("setTimeout")]=e.setTimeout,e[t.__symbol__("setInterval")]=e.setInterval,e[t.__symbol__("setImmediate")]=e.setImmediate):(patchTimer(e,set,clear,"Timeout"),patchTimer(e,set,clear,"Interval"),patchTimer(e,set,clear,"Immediate")))}),Zone.__load_patch("nextTick",()=>{patchMicroTask(process,"nextTick",(e,t)=>({name:"process.nextTick",args:t,cbIdx:t.length>0&&"function"==typeof t[0]?0:-1,target:process}))}),Zone.__load_patch("handleUnhandledPromiseRejection",(e,t,n)=>{function r(e){return function(t){findEventTasks(process,e).forEach(n=>{"unhandledRejection"===e?n.invoke(t.rejection,t.promise):"rejectionHandled"===e&&n.invoke(t.promise)})}}t[n.symbol("unhandledPromiseRejectionHandler")]=r("unhandledRejection"),t[n.symbol("rejectionHandledHandler")]=r("rejectionHandled")}),Zone.__load_patch("crypto",()=>{let e;try{e=require("crypto")}catch(e){}e&&["randomBytes","pbkdf2"].forEach(t=>{patchMacroTask(e,t,(n,r)=>({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",(e,t)=>{["dir","log","info","error","warn","assert","debug","timeEnd","trace"].forEach(e=>{const n=console[t.__symbol__(e)]=console[e];n&&(console[e]=function(){const e=ArraySlice.call(arguments);return t.current===t.root?n.apply(this,e):t.root.run(n,this,e)})})});
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
const NEWLINE="\n",IGNORE_FRAMES={},creationTrace="__creationTrace__",ERROR_TAG="STACKTRACE TRACKING",SEP_TAG="__SEP_TAG__";let sepTemplate=SEP_TAG+"@[native]";class LongStackTrace{constructor(){this.error=getStacktrace(),this.timestamp=new Date}}function getStacktraceWithUncaughtError(){return new Error(ERROR_TAG)}function getStacktraceWithCaughtError(){try{throw getStacktraceWithUncaughtError()}catch(e){return e}}const error=getStacktraceWithUncaughtError(),caughtError=getStacktraceWithCaughtError(),getStacktrace=error.stack?getStacktraceWithUncaughtError:caughtError.stack?getStacktraceWithCaughtError:getStacktraceWithUncaughtError;function getFrames(e){return e.stack?e.stack.split("\n"):[]}function addErrorStack(e,t){let n=getFrames(t);for(let t=0;t<n.length;t++)IGNORE_FRAMES.hasOwnProperty(n[t])||e.push(n[t])}function renderLongStackTrace(e,t){const n=[t?t.trim():""];if(e){let t=(new Date).getTime();for(let r=0;r<e.length;r++){const s=e[r],o=s.timestamp;let i=`____________________Elapsed ${t-o.getTime()} ms; At: ${o}`;i=i.replace(/[^\w\d]/g,"_"),n.push(sepTemplate.replace(SEP_TAG,i)),addErrorStack(n,s.error),t=o.getTime()}}return n.join("\n")}function stackTracesEnabled(){return Error.stackTraceLimit>0}function captureStackTraces(e,t){t>0&&(e.push(getFrames((new LongStackTrace).error)),captureStackTraces(e,t-1))}function computeIgnoreFrames(){if(!stackTracesEnabled())return;const e=[];captureStackTraces(e,2);const t=e[0],n=e[1];for(let e=0;e<t.length;e++){const n=t[e];if(-1==n.indexOf(ERROR_TAG)){let e=n.match(/^\s*at\s+/);if(e){sepTemplate=e[0]+SEP_TAG+" (http://localhost)";break}}}for(let e=0;e<t.length;e++){const r=t[e];if(r!==n[e])break;IGNORE_FRAMES[r]=!0}}Zone.longStackTraceZoneSpec={name:"long-stack-trace",longStackTraceLimit:10,getLongStackTrace:function(e){if(!e)return;const t=e[Zone.__symbol__("currentTaskTrace")];return t?renderLongStackTrace(t,e.stack):e.stack},onScheduleTask:function(e,t,n,r){if(stackTracesEnabled()){const e=Zone.currentTask;let t=e&&e.data&&e.data[creationTrace]||[];t=[new LongStackTrace].concat(t),t.length>this.longStackTraceLimit&&(t.length=this.longStackTraceLimit),r.data||(r.data={}),"eventTask"===r.type&&(r.data=Object.assign({},r.data)),r.data[creationTrace]=t}return e.scheduleTask(n,r)},onHandleError:function(e,t,n,r){if(stackTracesEnabled()){const e=Zone.currentTask||r.task;if(r instanceof Error&&e){const t=renderLongStackTrace(e.data&&e.data[creationTrace],r.stack);try{r.stack=r.longStack=t}catch(e){}}}return e.handleError(n,r)}},computeIgnoreFrames();
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
class ProxyZoneSpec{constructor(e=null){this.defaultSpecDelegate=e,this.name="ProxyZone",this._delegateSpec=null,this.properties={ProxyZoneSpec:this},this.propertyKeys=null,this.lastTaskState=null,this.isNeedToTriggerHasTask=!1,this.tasks=[],this.setDelegate(e)}static get(){return Zone.current.get("ProxyZoneSpec")}static isLoaded(){return ProxyZoneSpec.get()instanceof ProxyZoneSpec}static assertPresent(){if(!ProxyZoneSpec.isLoaded())throw new Error("Expected to be running in 'ProxyZone', but it was not found.");return ProxyZoneSpec.get()}setDelegate(e){const t=this._delegateSpec!==e;this._delegateSpec=e,this.propertyKeys&&this.propertyKeys.forEach(e=>delete this.properties[e]),this.propertyKeys=null,e&&e.properties&&(this.propertyKeys=Object.keys(e.properties),this.propertyKeys.forEach(t=>this.properties[t]=e.properties[t])),t&&this.lastTaskState&&(this.lastTaskState.macroTask||this.lastTaskState.microTask)&&(this.isNeedToTriggerHasTask=!0)}getDelegate(){return this._delegateSpec}resetDelegate(){this.getDelegate(),this.setDelegate(this.defaultSpecDelegate)}tryTriggerHasTask(e,t,n){this.isNeedToTriggerHasTask&&this.lastTaskState&&(this.isNeedToTriggerHasTask=!1,this.onHasTask(e,t,n,this.lastTaskState))}removeFromTasks(e){if(this.tasks)for(let t=0;t<this.tasks.length;t++)if(this.tasks[t]===e)return void this.tasks.splice(t,1)}getAndClearPendingTasksInfo(){if(0===this.tasks.length)return"";const e="--Pending async tasks are: ["+this.tasks.map(e=>{const t=e.data&&Object.keys(e.data).map(t=>t+":"+e.data[t]).join(",");return`type: ${e.type}, source: ${e.source}, args: {${t}}`})+"]";return this.tasks=[],e}onFork(e,t,n,r){return this._delegateSpec&&this._delegateSpec.onFork?this._delegateSpec.onFork(e,t,n,r):e.fork(n,r)}onIntercept(e,t,n,r,s){return this._delegateSpec&&this._delegateSpec.onIntercept?this._delegateSpec.onIntercept(e,t,n,r,s):e.intercept(n,r,s)}onInvoke(e,t,n,r,s,o,i){return this.tryTriggerHasTask(e,t,n),this._delegateSpec&&this._delegateSpec.onInvoke?this._delegateSpec.onInvoke(e,t,n,r,s,o,i):e.invoke(n,r,s,o,i)}onHandleError(e,t,n,r){return this._delegateSpec&&this._delegateSpec.onHandleError?this._delegateSpec.onHandleError(e,t,n,r):e.handleError(n,r)}onScheduleTask(e,t,n,r){return"eventTask"!==r.type&&this.tasks.push(r),this._delegateSpec&&this._delegateSpec.onScheduleTask?this._delegateSpec.onScheduleTask(e,t,n,r):e.scheduleTask(n,r)}onInvokeTask(e,t,n,r,s,o){return"eventTask"!==r.type&&this.removeFromTasks(r),this.tryTriggerHasTask(e,t,n),this._delegateSpec&&this._delegateSpec.onInvokeTask?this._delegateSpec.onInvokeTask(e,t,n,r,s,o):e.invokeTask(n,r,s,o)}onCancelTask(e,t,n,r){return"eventTask"!==r.type&&this.removeFromTasks(r),this.tryTriggerHasTask(e,t,n),this._delegateSpec&&this._delegateSpec.onCancelTask?this._delegateSpec.onCancelTask(e,t,n,r):e.cancelTask(n,r)}onHasTask(e,t,n,r){this.lastTaskState=r,this._delegateSpec&&this._delegateSpec.onHasTask?this._delegateSpec.onHasTask(e,t,n,r):e.hasTask(n,r)}}Zone.ProxyZoneSpec=ProxyZoneSpec;
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
class SyncTestZoneSpec{constructor(e){this.runZone=Zone.current,this.name="syncTestZone for "+e}onScheduleTask(e,t,n,r){switch(r.type){case"microTask":case"macroTask":throw new Error(`Cannot call ${r.source} from within a sync test.`);case"eventTask":r=e.scheduleTask(n,r)}return r}}Zone.SyncTestZoneSpec=SyncTestZoneSpec,
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
Zone.__load_patch("jasmine",(e,t,n)=>{if(!t)throw new Error("Missing: zone.js");if("undefined"!=typeof jest)return;if("undefined"==typeof jasmine||jasmine.__zone_patch__)return;jasmine.__zone_patch__=!0;const r=t.SyncTestZoneSpec,s=t.ProxyZoneSpec;if(!r)throw new Error("Missing: SyncTestZoneSpec");if(!s)throw new Error("Missing: ProxyZoneSpec");const o=t.current,i=o.fork(new r("jasmine.describe")),a=t.__symbol__,c=!0===e[a("fakeAsyncDisablePatchingClock")],l=!c&&(!0===e[a("fakeAsyncPatchLock")]||!0===e[a("fakeAsyncAutoFakeAsyncWhenClockPatched")]);if(!0!==e[a("ignoreUnhandledRejection")]){const e=jasmine.GlobalErrors;e&&!jasmine[a("GlobalErrors")]&&(jasmine[a("GlobalErrors")]=e,jasmine.GlobalErrors=function(){const t=new e,n=t.install;return n&&!t[a("install")]&&(t[a("install")]=n,t.install=function(){const e=process.listeners("unhandledRejection"),t=n.apply(this,arguments);return process.removeAllListeners("unhandledRejection"),e&&e.forEach(e=>process.on("unhandledRejection",e)),t}),t})}const u=jasmine.getEnv();if(["describe","xdescribe","fdescribe"].forEach(e=>{let t=u[e];u[e]=function(e,n){return t.call(this,e,function r(e){return function(){return i.run(e,this,arguments)}}(n))}}),["it","xit","fit"].forEach(e=>{let t=u[e];u[a(e)]=t,u[e]=function(e,n,r){return arguments[1]=p(n),t.apply(this,arguments)}}),["beforeEach","afterEach","beforeAll","afterAll"].forEach(e=>{let t=u[e];u[a(e)]=t,u[e]=function(e,n){return arguments[0]=p(e),t.apply(this,arguments)}}),!c){const e=jasmine[a("clock")]=jasmine.clock;jasmine.clock=function(){const n=e.apply(this,arguments);if(!n[a("patched")]){n[a("patched")]=a("patched");const e=n[a("tick")]=n.tick;n.tick=function(){const n=t.current.get("FakeAsyncTestZoneSpec");return n?n.tick.apply(n,arguments):e.apply(this,arguments)};const r=n[a("mockDate")]=n.mockDate;n.mockDate=function(){const e=t.current.get("FakeAsyncTestZoneSpec");if(e){const t=arguments.length>0?arguments[0]:new Date;return e.setFakeBaseSystemTime.apply(e,t&&"function"==typeof t.getTime?[t.getTime()]:arguments)}return r.apply(this,arguments)},l&&["install","uninstall"].forEach(e=>{const r=n[a(e)]=n[e];n[e]=function(){const n=t.FakeAsyncTestZoneSpec;if(!n)return r.apply(this,arguments);jasmine[a("clockInstalled")]="install"===e}})}return n}}if(!jasmine[t.__symbol__("createSpyObj")]){const e=jasmine.createSpyObj;jasmine[t.__symbol__("createSpyObj")]=e,jasmine.createSpyObj=function(){const t=Array.prototype.slice.call(arguments),n=t.length>=3?t[2]:null;let r;if(n){const n=Object.defineProperty;Object.defineProperty=function(e,t,r){return n.call(this,e,t,Object.assign(Object.assign({},r),{configurable:!0,enumerable:!0}))};try{r=e.apply(this,t)}finally{Object.defineProperty=n}}else r=e.apply(this,t);return r}}function h(e,n,r,s){const o=!!jasmine[a("clockInstalled")],i=r.testProxyZone;if(o&&l){const n=t[t.__symbol__("fakeAsyncTest")];n&&"function"==typeof n.fakeAsync&&(e=n.fakeAsync(e))}return s?i.run(e,n,[s]):i.run(e,n)}function p(e){return e&&(e.length?function(t){return h(e,this,this.queueRunner,t)}:function(){return h(e,this,this.queueRunner)})}const d=jasmine.QueueRunner;jasmine.QueueRunner=function(n){function r(r){r.onComplete&&(r.onComplete=(e=>()=>{this.testProxyZone=null,this.testProxyZoneSpec=null,o.scheduleMicroTask("jasmine.onComplete",e)})(r.onComplete));const s=e[t.__symbol__("setTimeout")],i=e[t.__symbol__("clearTimeout")];s&&(r.timeout={setTimeout:s||e.setTimeout,clearTimeout:i||e.clearTimeout}),jasmine.UserContext?(r.userContext||(r.userContext=new jasmine.UserContext),r.userContext.queueRunner=this):(r.userContext||(r.userContext={}),r.userContext.queueRunner=this);const a=r.onException;r.onException=function(e){if(e&&"Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL."===e.message){const t=this&&this.testProxyZoneSpec;if(t){const n=t.getAndClearPendingTasksInfo();try{e.message+=n}catch(e){}}}a&&a.call(this,e)},n.call(this,r)}return function(e,t){for(const n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);function n(){this.constructor=e}e.prototype=null===t?Object.cre
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
Zone.__load_patch("jest",(e,t,n)=>{if("undefined"==typeof jest||jest.__zone_patch__)return;jest.__zone_patch__=!0;const r=t.ProxyZoneSpec,s=t.SyncTestZoneSpec;if(!r)throw new Error("Missing ProxyZoneSpec");const o=t.current,i=o.fork(new s("jest.describe")),a=new r,c=o.fork(a);function l(e){return function(...t){return i.run(e,this,t)}}function u(e,r=!1){if("function"!=typeof e)return e;const s=function(){if(!0===t[n.symbol("useFakeTimersCalled")]&&e&&!e.isFakeAsync){const n=t[t.__symbol__("fakeAsyncTest")];n&&"function"==typeof n.fakeAsync&&(e=n.fakeAsync(e))}return a.isTestFunc=r,c.run(e,null,arguments)};return Object.defineProperty(s,"length",{configurable:!0,writable:!0,enumerable:!1}),s.length=e.length,s}["describe","xdescribe","fdescribe"].forEach(n=>{let r=e[n];e[t.__symbol__(n)]||(e[t.__symbol__(n)]=r,e[n]=function(...e){return e[1]=l(e[1]),r.apply(this,e)},e[n].each=function s(e){return function(...t){const n=e.apply(this,t);return function(...e){return e[1]=l(e[1]),n.apply(this,e)}}}(r.each))}),e.describe.only=e.fdescribe,e.describe.skip=e.xdescribe,["it","xit","fit","test","xtest"].forEach(n=>{let r=e[n];e[t.__symbol__(n)]||(e[t.__symbol__(n)]=r,e[n]=function(...e){return e[1]=u(e[1],!0),r.apply(this,e)},e[n].each=function s(e){return function(...t){return function(...n){return n[1]=u(n[1]),e.apply(this,t).apply(this,n)}}}(r.each),e[n].todo=r.todo)}),e.it.only=e.fit,e.it.skip=e.xit,e.test.only=e.fit,e.test.skip=e.xit,["beforeEach","afterEach","beforeAll","afterAll"].forEach(n=>{let r=e[n];e[t.__symbol__(n)]||(e[t.__symbol__(n)]=r,e[n]=function(...e){return e[0]=u(e[0]),r.apply(this,e)})}),t.patchJestObject=function e(r,s=!1){function o(){return!!t.current.get("FakeAsyncTestZoneSpec")}function i(){const e=t.current.get("ProxyZoneSpec");return e&&e.isTestFunc}r[n.symbol("fakeTimers")]||(r[n.symbol("fakeTimers")]=!0,n.patchMethod(r,"_checkFakeTimers",e=>function(t,n){return!!o()||e.apply(t,n)}),n.patchMethod(r,"useFakeTimers",e=>function(r,o){return t[n.symbol("useFakeTimersCalled")]=!0,s||i()?e.apply(r,o):r}),n.patchMethod(r,"useRealTimers",e=>function(r,o){return t[n.symbol("useFakeTimersCalled")]=!1,s||i()?e.apply(r,o):r}),n.patchMethod(r,"setSystemTime",e=>function(n,r){const s=t.current.get("FakeAsyncTestZoneSpec");if(!s||!o())return e.apply(n,r);s.setFakeBaseSystemTime(r[0])}),n.patchMethod(r,"getRealSystemTime",e=>function(n,r){const s=t.current.get("FakeAsyncTestZoneSpec");return s&&o()?s.getRealSystemTime():e.apply(n,r)}),n.patchMethod(r,"runAllTicks",e=>function(n,r){const s=t.current.get("FakeAsyncTestZoneSpec");if(!s)return e.apply(n,r);s.flushMicrotasks()}),n.patchMethod(r,"runAllTimers",e=>function(n,r){const s=t.current.get("FakeAsyncTestZoneSpec");if(!s)return e.apply(n,r);s.flush(100,!0)}),n.patchMethod(r,"advanceTimersByTime",e=>function(n,r){const s=t.current.get("FakeAsyncTestZoneSpec");if(!s)return e.apply(n,r);s.tick(r[0])}),n.patchMethod(r,"runOnlyPendingTimers",e=>function(n,r){const s=t.current.get("FakeAsyncTestZoneSpec");if(!s)return e.apply(n,r);s.flushOnlyPendingTimers()}),n.patchMethod(r,"advanceTimersToNextTimer",e=>function(n,r){const s=t.current.get("FakeAsyncTestZoneSpec");if(!s)return e.apply(n,r);s.tickToNext(r[0])}),n.patchMethod(r,"clearAllTimers",e=>function(n,r){const s=t.current.get("FakeAsyncTestZoneSpec");if(!s)return e.apply(n,r);s.removeAllTimers()}),n.patchMethod(r,"getTimerCount",e=>function(n,r){const s=t.current.get("FakeAsyncTestZoneSpec");return s?s.getTimerCount():e.apply(n,r)}))}}),
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
Zone.__load_patch("mocha",(e,t)=>{const n=e.Mocha;if(void 0===n)return;if(void 0===t)throw new Error("Missing Zone.js");const r=t.ProxyZoneSpec,s=t.SyncTestZoneSpec;if(!r)throw new Error("Missing ProxyZoneSpec");if(n.__zone_patch__)throw new Error('"Mocha" has already been patched with "Zone".');n.__zone_patch__=!0;const o=t.current,i=o.fork(new s("Mocha.describe"));let a=null;const c=o.fork(new r),l={after:n.after,afterEach:n.afterEach,before:n.before,beforeEach:n.beforeEach,describe:n.describe,it:n.it};function u(e,t,n){for(let r=0;r<e.length;r++){let s=e[r];"function"==typeof s&&(e[r]=0===s.length?t(s):n(s),e[r].toString=function(){return s.toString()})}return e}function h(e){return u(e,(function(e){return function(){return i.run(e,this,arguments)}}))}function p(e){return u(e,(function(e){return function(){return a.run(e,this)}}),(function(e){return function(t){return a.run(e,this,[t])}}))}function d(e){return u(e,(function(e){return function(){return c.run(e,this)}}),(function(e){return function(t){return c.run(e,this,[t])}}))}var f,_;e.describe=e.suite=n.describe=function(){return l.describe.apply(this,h(arguments))},e.xdescribe=e.suite.skip=n.describe.skip=function(){return l.describe.skip.apply(this,h(arguments))},e.describe.only=e.suite.only=n.describe.only=function(){return l.describe.only.apply(this,h(arguments))},e.it=e.specify=e.test=n.it=function(){return l.it.apply(this,p(arguments))},e.xit=e.xspecify=n.it.skip=function(){return l.it.skip.apply(this,p(arguments))},e.it.only=e.test.only=n.it.only=function(){return l.it.only.apply(this,p(arguments))},e.after=e.suiteTeardown=n.after=function(){return l.after.apply(this,d(arguments))},e.afterEach=e.teardown=n.afterEach=function(){return l.afterEach.apply(this,p(arguments))},e.before=e.suiteSetup=n.before=function(){return l.before.apply(this,d(arguments))},e.beforeEach=e.setup=n.beforeEach=function(){return l.beforeEach.apply(this,p(arguments))},f=n.Runner.prototype.runTest,_=n.Runner.prototype.run,n.Runner.prototype.runTest=function(e){t.current.scheduleMicroTask("mocha.forceTask",()=>{f.call(this,e)})},n.Runner.prototype.run=function(e){return this.on("test",e=>{a=o.fork(new r)}),this.on("fail",(e,t)=>{const n=a&&a.get("ProxyZoneSpec");if(n&&t)try{t.message+=n.getAndClearPendingTasksInfo()}catch(e){}}),_.call(this,e)}}),
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function(e){class t{constructor(t,n,r){this.finishCallback=t,this.failCallback=n,this._pendingMicroTasks=!1,this._pendingMacroTasks=!1,this._alreadyErrored=!1,this._isSync=!1,this.runZone=Zone.current,this.unresolvedChainedPromiseCount=0,this.supportWaitUnresolvedChainedPromise=!1,this.name="asyncTestZone for "+r,this.properties={AsyncTestZoneSpec:this},this.supportWaitUnresolvedChainedPromise=!0===e[Zone.__symbol__("supportWaitUnResolvedChainedPromise")]}isUnresolvedChainedPromisePending(){return this.unresolvedChainedPromiseCount>0}_finishCallbackIfDone(){this._pendingMicroTasks||this._pendingMacroTasks||this.supportWaitUnresolvedChainedPromise&&this.isUnresolvedChainedPromisePending()||this.runZone.run(()=>{setTimeout(()=>{this._alreadyErrored||this._pendingMicroTasks||this._pendingMacroTasks||this.finishCallback()},0)})}patchPromiseForTest(){if(!this.supportWaitUnresolvedChainedPromise)return;const e=Promise[Zone.__symbol__("patchPromiseForTest")];e&&e()}unPatchPromiseForTest(){if(!this.supportWaitUnresolvedChainedPromise)return;const e=Promise[Zone.__symbol__("unPatchPromiseForTest")];e&&e()}onScheduleTask(e,n,r,s){return"eventTask"!==s.type&&(this._isSync=!1),"microTask"===s.type&&s.data&&s.data instanceof Promise&&!0===s.data[t.symbolParentUnresolved]&&this.unresolvedChainedPromiseCount--,e.scheduleTask(r,s)}onInvokeTask(e,t,n,r,s,o){return"eventTask"!==r.type&&(this._isSync=!1),e.invokeTask(n,r,s,o)}onCancelTask(e,t,n,r){return"eventTask"!==r.type&&(this._isSync=!1),e.cancelTask(n,r)}onInvoke(e,t,n,r,s,o,i){try{return this._isSync=!0,e.invoke(n,r,s,o,i)}finally{this._isSync&&this._finishCallbackIfDone()}}onHandleError(e,t,n,r){return e.handleError(n,r)&&(this.failCallback(r),this._alreadyErrored=!0),!1}onHasTask(e,t,n,r){e.hasTask(n,r),"microTask"==r.change?(this._pendingMicroTasks=r.microTask,this._finishCallbackIfDone()):"macroTask"==r.change&&(this._pendingMacroTasks=r.macroTask,this._finishCallbackIfDone())}}t.symbolParentUnresolved=Zone.__symbol__("parentUnresolved"),Zone.AsyncTestZoneSpec=t}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global),Zone.__load_patch("asynctest",(e,t,n)=>{function r(e,n,r,s){const o=t.current,i=t.AsyncTestZoneSpec;if(void 0===i)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");const 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/dist/proxy.js");const c=a.get();a.assertPresent();const l=t.current.getZoneWith("ProxyZoneSpec"),u=c.getDelegate();return l.parent.run(()=>{const e=new i(()=>{c.getDelegate()==e&&c.setDelegate(u),e.unPatchPromiseForTest(),o.run(()=>{r()})},t=>{c.getDelegate()==e&&c.setDelegate(u),e.unPatchPromiseForTest(),o.run(()=>{s(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,t=>{if("string"==typeof t)return e.fail(new Error(t));e.fail(t)})}:function(){return new Promise((e,t)=>{r(n,this,e,t)})}}}),
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function(e){const t=e.Date;function n(){if(0===arguments.length){const e=new t;return e.setTime(n.now()),e}{const e=Array.prototype.slice.call(arguments);return new t(...e)}}n.now=function(){const e=Zone.current.get("FakeAsyncTestZoneSpec");return e?e.getFakeSystemTime():t.now.apply(this,arguments)},n.UTC=t.UTC,n.parse=t.parse;const r={setTimeout:e.setTimeout,setInterval:e.setInterval,clearTimeout:e.clearTimeout,clearInterval:e.clearInterval};class s{constructor(){this._schedulerQueue=[],this._currentTickTime=0,this._currentFakeBaseSystemTime=t.now(),this._currentTickRequeuePeriodicEntries=[]}getCurrentTickTime(){return this._currentTickTime}getFakeSystemTime(){return this._currentFakeBaseSystemTime+this._currentTickTime}setFakeBaseSystemTime(e){this._currentFakeBaseSystemTime=e}getRealSystemTime(){return t.now()}scheduleFunction(e,t,n){let r=(n=Object.assign({args:[],isPeriodic:!1,isRequestAnimationFrame:!1,id:-1,isRequeuePeriodic:!1},n)).id<0?s.nextId++:n.id,o={endTime:this._currentTickTime+t,id:r,func:e,args:n.args,delay:t,isPeriodic:n.isPeriodic,isRequestAnimationFrame:n.isRequestAnimationFrame};n.isRequeuePeriodic&&this._currentTickRequeuePeriodicEntries.push(o);let i=0;for(;i<this._schedulerQueue.length&&!(o.endTime<this._schedulerQueue[i].endTime);i++);return this._schedulerQueue.splice(i,0,o),r}removeScheduledFunctionWithId(e){for(let t=0;t<this._schedulerQueue.length;t++)if(this._schedulerQueue[t].id==e){this._schedulerQueue.splice(t,1);break}}removeAll(){this._schedulerQueue=[]}getTimerCount(){return this._schedulerQueue.length}tickToNext(e=1,t,n){this._schedulerQueue.length<e||this.tick(this._schedulerQueue[e-1].endTime-this._currentTickTime,t,n)}tick(t=0,n,r){let s=this._currentTickTime+t,o=0;const i=(r=Object.assign({processNewMacroTasksSynchronously:!0},r)).processNewMacroTasksSynchronously?this._schedulerQueue:this._schedulerQueue.slice();if(0===i.length&&n)n(t);else{for(;i.length>0&&(this._currentTickRequeuePeriodicEntries=[],!(s<i[0].endTime));){let t=i.shift();if(!r.processNewMacroTasksSynchronously){const e=this._schedulerQueue.indexOf(t);e>=0&&this._schedulerQueue.splice(e,1)}if(o=this._currentTickTime,this._currentTickTime=t.endTime,n&&n(this._currentTickTime-o),!t.func.apply(e,t.isRequestAnimationFrame?[this._currentTickTime]:t.args))break;r.processNewMacroTasksSynchronously||this._currentTickRequeuePeriodicEntries.forEach(e=>{let t=0;for(;t<i.length&&!(e.endTime<i[t].endTime);t++);i.splice(t,0,e)})}o=this._currentTickTime,this._currentTickTime=s,n&&n(this._currentTickTime-o)}}flushOnlyPendingTimers(e){if(0===this._schedulerQueue.length)return 0;const t=this._currentTickTime;return this.tick(this._schedulerQueue[this._schedulerQueue.length-1].endTime-t,e,{processNewMacroTasksSynchronously:!1}),this._currentTickTime-t}flush(e=20,t=!1,n){return t?this.flushPeriodic(n):this.flushNonPeriodic(e,n)}flushPeriodic(e){if(0===this._schedulerQueue.length)return 0;const t=this._currentTickTime;return this.tick(this._schedulerQueue[this._schedulerQueue.length-1].endTime-t,e),this._currentTickTime-t}flushNonPeriodic(t,n){const r=this._currentTickTime;let s=0,o=0;for(;this._schedulerQueue.length>0;){if(o++,o>t)throw new Error("flush failed after reaching the limit of "+t+" tasks. Does your code use a polling timeout?");if(0===this._schedulerQueue.filter(e=>!e.isPeriodic&&!e.isRequestAnimationFrame).length)break;const r=this._schedulerQueue.shift();if(s=this._currentTickTime,this._currentTickTime=r.endTime,n&&n(this._currentTickTime-s),!r.func.apply(e,r.args))break}return this._currentTickTime-r}}s.nextId=1;class o{constructor(t,n=!1,r){this.trackPendingRequestAnimationFrame=n,this.macroTaskOptions=r,this._scheduler=new s,this._microtasks=[],this._lastError=null,this._uncaughtPromiseErrors=Promise[Zone.__symbol__("uncaughtPromiseErrors")],this.pendingPeriodicTimers=[],this.pendingTimers=[],this.patchDateLocked=!1,this.properties={FakeAsyncTestZoneSpec:this},this.name="fakeAsyncTestZone for "+t,this.macroTaskOptions||(this.macroTaskOptions=e[Zone.__symbol__("FakeAsyncTestMacroTask")])}static assertInZone(){if(null=
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
Zone.__load_patch("promisefortest",(e,t,n)=>{const r=n.symbol("state"),s=n.symbol("parentUnresolved");Promise[n.symbol("patchPromiseForTest")]=function e(){let n=Promise[t.__symbol__("ZonePromiseThen")];n||(n=Promise[t.__symbol__("ZonePromiseThen")]=Promise.prototype.then,Promise.prototype.then=function(){const e=n.apply(this,arguments);if(null===this[r]){const n=t.current.get("AsyncTestZoneSpec");n&&(n.unresolvedChainedPromiseCount++,e[s]=!0)}return e})},Promise[n.symbol("unPatchPromiseForTest")]=function e(){const n=Promise[t.__symbol__("ZonePromiseThen")];n&&(Promise.prototype.then=n,Promise[t.__symbol__("ZonePromiseThen")]=void 0)}});