6 lines
63 KiB
JavaScript
6 lines
63 KiB
JavaScript
|
"use strict";
|
||
|
/**
|
||
|
* @license Angular v<unknown>
|
||
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
||
|
* License: MIT
|
||
|
*/!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{static{this.__symbol__=o}static assertZonePatched(){if(e.Promise!==O.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let e=a.current;for(;e.parent;)e=e.parent;return e}static get current(){return C.zone}static get currentTask(){return F}static __load_patch(t,s,o=!1){if(O.hasOwnProperty(t)){if(!o&&i)throw Error("Already loaded patch: "+t)}else if(!e["__Zone_disable_"+t]){const o="Zone:"+t;n(o),O[t]=s(e,a,I),r(o,o)}}get parent(){return this._parent}get name(){return this._name}constructor(e,t){this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new l(this,this._parent&&this._parent._zoneDelegate,t)}get(e){const t=this.getZoneWith(e);if(t)return t._properties[e]}getZoneWith(e){let t=this;for(;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null}fork(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)}wrap(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);const n=this._zoneDelegate.intercept(this,e,t),r=this;return function(){return r.runGuarded(n,this,arguments,t)}}run(e,t,n,r){C={parent:C,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{C=C.parent}}runGuarded(e,t=null,n,r){C={parent:C,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{C=C.parent}}runTask(e,t,n){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||g).name+"; Execution: "+this.name+")");if(e.state===S&&(e.type===D||e.type===A))return;const r=e.state!=v;r&&e._transitionTo(v,E),e.runCount++;const s=F;F=e,C={parent:C,zone:this};try{e.type==A&&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!==S&&e.state!==w&&(e.type==D||e.data&&e.data.isPeriodic?r&&e._transitionTo(E,v):(e.runCount=0,this._updateTaskCount(e,-1),r&&e._transitionTo(S,v,S))),C=C.parent,F=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,S);const t=[];e._zoneDelegates=t,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(t){throw e._transitionTo(w,b,S),this._zoneDelegate.handleError(this,t),t}return e._zoneDelegates===t&&this._updateTaskCount(e,1),e.state==b&&e._transitionTo(E,b),e}scheduleMicroTask(e,t,n,r){return this.scheduleTask(new u(Z,e,t,n,r,void 0))}scheduleMacroTask(e,t,n,r,s){return this.scheduleTask(new u(A,e,t,n,r,s))}scheduleEventTask(e,t,n,r,s){return this.scheduleTask(new u(D,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||g).name+"; Execution: "+this.name+")");if(e.state===E||e.state===v){e._transitionTo(P,E,v);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(w,P),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(S,P),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)}}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.in
|