zone.js
Version:
Zones for JavaScript
10 lines (8 loc) • 44.1 kB
JavaScript
'use strict';
/**
* @license Angular
* (c) 2010-2026 Google LLC. https://angular.dev/
* License: MIT
*/(function(g,f){if(typeof define=="function"&&define.amd){define(["timers","crypto","events","fs"],function(_d_0,_d_1,_d_2,_d_3){var d={"timers": _d_0,"crypto": _d_1,"events": _d_2,"fs": _d_3},r=function(m){if(m in d) return d[m];if(typeof require=="function") return require(m);throw new Error("Cannot find module '"+m+"'")};return f(r)})}else if(typeof exports=="object" && typeof module<"u"){module.exports=f(require)}else{var gN={"timers":"timers","crypto":"crypto","events":"events","fs":"fs"},gReq=function(r){var mod = r in gN ? g[gN[r]] : g[r]; return mod };var m=f(gReq);for(var i in m) g[i]=m[i]}}(typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : this,function(require){var exports={};var __exports=exports;var module={exports};
"use strict";(function(ye,me){if(typeof define=="function"&&define.amd)define(["timers","crypto","events","fs"],function(ke,Pe,Ye,qe){var Re={timers:ke,crypto:Pe,events:Ye,fs:qe},Fe=function(we){if(we in Re)return Re[we];if(typeof require=="function")return require(we);throw new Error("Cannot find module '"+we+"'")};return me(Fe)});else if(typeof exports=="object"&&typeof module<"u")module.exports=me(require);else{var Me={timers:"timers",crypto:"crypto",events:"events",fs:"fs"},Ae=function(ke){var Pe=ke in Me?ye[Me[ke]]:ye[ke];return Pe},je=me(Ae);for(var He in je)ye[He]=je[He]}})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:exports,function(ye){var me={},Me=me,Ae={exports:me},je=Object.defineProperty,He=Object.defineProperties,ke=Object.getOwnPropertyDescriptors,Pe=Object.getOwnPropertySymbols,Ye=Object.prototype.hasOwnProperty,qe=Object.prototype.propertyIsEnumerable,Re=function(r,e,n){return e in r?je(r,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[e]=n},Fe=function(r,e){for(var n in e||(e={}))Ye.call(e,n)&&Re(r,n,e[n]);if(Pe)for(var t=0,i=Pe(e);t<i.length;t++){var n=i[t];qe.call(e,n)&&Re(r,n,e[n])}return r},we=function(r,e){return He(r,ke(e))},O=function(r,e,n){return Re(r,typeof e!="symbol"?e+"":e,n),n},ve=globalThis;function ae(r){var e=ve.__Zone_symbol_prefix||"__zone_symbol__";return e+r}function Zr(){var r=ve.performance;function e(d){r&&r.mark&&r.mark(d)}function n(d,s){r&&r.measure&&r.measure(d,s)}e("Zone");var t=function(){function d(s,a){O(this,"_parent"),O(this,"_name"),O(this,"_properties"),O(this,"_zoneDelegate"),this._parent=s,this._name=a?a.name||"unnamed":"<root>",this._properties=a&&a.properties||{},this._zoneDelegate=new f(this,this._parent&&this._parent._zoneDelegate,a)}return d.assertZonePatched=function(){if(ve.Promise!==Z.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(d,"root",{get:function(){for(var s=d.current;s.parent;)s=s.parent;return s},enumerable:!1,configurable:!0}),Object.defineProperty(d,"current",{get:function(){return y.zone},enumerable:!1,configurable:!0}),Object.defineProperty(d,"currentTask",{get:function(){return x},enumerable:!1,configurable:!0}),d.__load_patch=function(s,a,u){if(u===void 0&&(u=!1),Z.hasOwnProperty(s)){var m=ve[ae("forceDuplicateZoneCheck")]===!0;if(!u&&m)throw Error("Already loaded patch: "+s)}else if(!ve["__Zone_disable_"+s]){var j="Zone:"+s;e(j),Z[s]=a(ve,d,re),n(j,j)}},Object.defineProperty(d.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),d.prototype.get=function(s){var a=this.getZoneWith(s);if(a)return a._properties[s]},d.prototype.getZoneWith=function(s){for(var a=this;a;){if(a._properties.hasOwnProperty(s))return a;a=a._parent}return null},d.prototype.fork=function(s){if(!s)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,s)},d.prototype.wrap=function(s,a){if(typeof s!="function")throw new Error("Expecting function got: "+s);var u=this._zoneDelegate.intercept(this,s,a),m=this;return function(){return m.runGuarded(u,this,arguments,a)}},d.prototype.run=function(s,a,u,m){y={parent:y,zone:this};try{return this._zoneDelegate.invoke(this,s,a,u,m)}finally{y=y.parent}},d.prototype.runGuarded=function(s,a,u,m){a===void 0&&(a=null),y={parent:y,zone:this};try{try{return this._zoneDelegate.invoke(this,s,a,u,m)}catch(j){if(this._zoneDelegate.handleError(this,j))throw j}}finally{y=y.parent}},d.prototype.runTask=function(s,a,u){if(s.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(s.zone||ne).name+"; Execution: "+this.name+")");var m=s,j=s.type,Y=s.data,fe=Y===void 0?{}:Y,be=fe.isPeriodic,Te=be===void 0?!1:be,ge=fe.isRefreshable,_e=ge===void 0?!1:ge;if(!(s.state===A&&(j===G||j===w))){var l=s.state!=q;l&&m._transitionTo(q,T);var h=x;x=m,y={parent:y,zone:this};try{j==w&&s.data&&!Te&&!_e&&(s.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,m,a,u)}catch(g){if(this._zoneDelegate.handleError(this,g))throw g}}finally{var o=s.state;if(o!==A&&o!==X)if(j==G||Te||_e&&o===S)l&&m._transitionTo(T,q,S);else{var v=m._zoneDelegates;this._updateTaskCount(m,-1),l&&m._transitionTo(A,q,A),_e&&(m._zoneDelegates=v)}y=y.parent,x=h}}},d.prototype.scheduleTask=function(s){if(s.zone&&s.zone!==this)for(var a=this;a;){if(a===s.zone)throw Error("can not reschedule task to ".concat(this.name," which is descendants of the original zone ").concat(s.zone.name));a=a.parent}s._transitionTo(S,A);var u=[];s._zoneDelegates=u,s._zone=this;try{s=this._zoneDelegate.scheduleTask(this,s)}catch(m){throw s._transitionTo(X,S,A),this._zoneDelegate.handleError(this,m),m}return s._zoneDelegates===u&&this._updateTaskCount(s,1),s.state==S&&s._transitionTo(T,S),s},d.prototype.scheduleMicroTask=function(s,a,u,m){return this.scheduleTask(new p(V,s,a,u,m,void 0))},d.prototype.scheduleMacroTask=function(s,a,u,m,j){return this.scheduleTask(new p(w,s,a,u,m,j))},d.prototype.scheduleEventTask=function(s,a,u,m,j){return this.scheduleTask(new p(G,s,a,u,m,j))},d.prototype.cancelTask=function(s){if(s.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(s.zone||ne).name+"; Execution: "+this.name+")");if(!(s.state!==T&&s.state!==q)){s._transitionTo(W,T,q);try{this._zoneDelegate.cancelTask(this,s)}catch(a){throw s._transitionTo(X,W),this._zoneDelegate.handleError(this,a),a}return this._updateTaskCount(s,-1),s._transitionTo(A,W),s.runCount=-1,s}},d.prototype._updateTaskCount=function(s,a){var u=s._zoneDelegates;a==-1&&(s._zoneDelegates=null);for(var m=0;m<u.length;m++)u[m]._updateTaskCount(s.type,a)},d}();O(t,"__symbol__",ae);var i=t,c={name:"",onHasTask:function(d,s,a,u){return d.hasTask(a,u)},onScheduleTask:function(d,s,a,u){return d.scheduleTask(a,u)},onInvokeTask:function(d,s,a,u,m,j){return d.invokeTask(a,u,m,j)},onCancelTask:function(d,s,a,u){return d.cancelTask(a,u)}},f=function(){function d(s,a,u){O(this,"_zone"),O(this,"_taskCounts",{microTask:0,macroTask:0,eventTask:0}),O(this,"_parentDelegate"),O(this,"_forkDlgt"),O(this,"_forkZS"),O(this,"_forkCurrZone"),O(this,"_interceptDlgt"),O(this,"_interceptZS"),O(this,"_interceptCurrZone"),O(this,"_invokeDlgt"),O(this,"_invokeZS"),O(this,"_invokeCurrZone"),O(this,"_handleErrorDlgt"),O(this,"_handleErrorZS"),O(this,"_handleErrorCurrZone"),O(this,"_scheduleTaskDlgt"),O(this,"_scheduleTaskZS"),O(this,"_scheduleTaskCurrZone"),O(this,"_invokeTaskDlgt"),O(this,"_invokeTaskZS"),O(this,"_invokeTaskCurrZone"),O(this,"_cancelTaskDlgt"),O(this,"_cancelTaskZS"),O(this,"_cancelTaskCurrZone"),O(this,"_hasTaskDlgt"),O(this,"_hasTaskDlgtOwner"),O(this,"_hasTaskZS"),O(this,"_hasTaskCurrZone"),this._zone=s,this._parentDelegate=a,this._forkZS=u&&(u&&u.onFork?u:a._forkZS),this._forkDlgt=u&&(u.onFork?a:a._forkDlgt),this._forkCurrZone=u&&(u.onFork?this._zone:a._forkCurrZone),this._interceptZS=u&&(u.onIntercept?u:a._interceptZS),this._interceptDlgt=u&&(u.onIntercept?a:a._interceptDlgt),this._interceptCurrZone=u&&(u.onIntercept?this._zone:a._interceptCurrZone),this._invokeZS=u&&(u.onInvoke?u:a._invokeZS),this._invokeDlgt=u&&(u.onInvoke?a:a._invokeDlgt),this._invokeCurrZone=u&&(u.onInvoke?this._zone:a._invokeCurrZone),this._handleErrorZS=u&&(u.onHandleError?u:a._handleErrorZS),this._handleErrorDlgt=u&&(u.onHandleError?a:a._handleErrorDlgt),this._handleErrorCurrZone=u&&(u.onHandleError?this._zone:a._handleErrorCurrZone),this._scheduleTaskZS=u&&(u.onScheduleTask?u:a._scheduleTaskZS),this._scheduleTaskDlgt=u&&(u.onScheduleTask?a:a._scheduleTaskDlgt),this._scheduleTaskCurrZone=u&&(u.onScheduleTask?this._zone:a._scheduleTaskCurrZone),this._invokeTaskZS=u&&(u.onInvokeTask?u:a._invokeTaskZS),this._invokeTaskDlgt=u&&(u.onInvokeTask?a:a._invokeTaskDlgt),this._invokeTaskCurrZone=u&&(u.onInvokeTask?this._zone:a._invokeTaskCurrZone),this._cancelTaskZS=u&&(u.onCancelTask?u:a._cancelTaskZS),this._cancelTaskDlgt=u&&(u.onCancelTask?a:a._cancelTaskDlgt),this._cancelTaskCurrZone=u&&(u.onCancelTask?this._zone:a._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;var m=u&&u.onHasTask,j=a&&a._hasTaskZS;(m||j)&&(this._hasTaskZS=m?u:c,this._hasTaskDlgt=a,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=this._zone,u.onScheduleTask||(this._scheduleTaskZS=c,this._scheduleTaskDlgt=a,this._scheduleTaskCurrZone=this._zone),u.onInvokeTask||(this._invokeTaskZS=c,this._invokeTaskDlgt=a,this._invokeTaskCurrZone=this._zone),u.onCancelTask||(this._cancelTaskZS=c,this._cancelTaskDlgt=a,this._cancelTaskCurrZone=this._zone))}return Object.defineProperty(d.prototype,"zone",{get:function(){return this._zone},enumerable:!1,configurable:!0}),d.prototype.fork=function(s,a){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,s,a):new i(s,a)},d.prototype.intercept=function(s,a,u){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,s,a,u):a},d.prototype.invoke=function(s,a,u,m,j){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,s,a,u,m,j):a.apply(u,m)},d.prototype.handleError=function(s,a){return this._handleErrorZS?this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,s,a):!0},d.prototype.scheduleTask=function(s,a){var u=a;if(this._scheduleTaskZS)this._hasTaskZS&&u._zoneDelegates.push(this._hasTaskDlgtOwner),u=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,s,a),u||(u=a);else if(a.scheduleFn)a.scheduleFn(a);else if(a.type==V)M(a);else throw new Error("Task is missing scheduleFn.");return u},d.prototype.invokeTask=function(s,a,u,m){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,s,a,u,m):a.callback.apply(u,m)},d.prototype.cancelTask=function(s,a){var u;if(this._cancelTaskZS)u=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,s,a);else{if(!a.cancelFn)throw Error("Task is not cancelable");u=a.cancelFn(a)}return u},d.prototype.hasTask=function(s,a){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,s,a)}catch(u){this.handleError(s,u)}},d.prototype._updateTaskCount=function(s,a){var u=this._taskCounts,m=u[s],j=u[s]=m+a;if(j<0)throw new Error("More tasks executed then were scheduled.");if(m==0||j==0){var Y={microTask:u.microTask>0,macroTask:u.macroTask>0,eventTask:u.eventTask>0,change:s};this.hasTask(this._zone,Y)}},d}(),p=function(){function d(s,a,u,m,j,Y){if(O(this,"type"),O(this,"source"),O(this,"invoke"),O(this,"callback"),O(this,"data"),O(this,"scheduleFn"),O(this,"cancelFn"),O(this,"_zone",null),O(this,"runCount",0),O(this,"_zoneDelegates",null),O(this,"_state","notScheduled"),this.type=s,this.source=a,this.data=m,this.scheduleFn=j,this.cancelFn=Y,!u)throw new Error("callback is not defined");this.callback=u;var fe=this;s===G&&m&&m.useG?this.invoke=d.invokeTask:this.invoke=function(){return d.invokeTask.call(ve,fe,this,arguments)}}return d.invokeTask=function(s,a,u){s||(s=this),L++;try{return s.runCount++,s.zone.runTask(s,a,u)}finally{L==1&&K(),L--}},Object.defineProperty(d.prototype,"zone",{get:function(){return this._zone},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),d.prototype.cancelScheduleRequest=function(){this._transitionTo(A,S)},d.prototype._transitionTo=function(s,a,u){if(this._state===a||this._state===u)this._state=s,s==A&&(this._zoneDelegates=null);else throw new Error("".concat(this.type," '").concat(this.source,"': can not transition to '").concat(s,"', expecting state '").concat(a,"'").concat(u?" or '"+u+"'":"",", was '").concat(this._state,"'."))},d.prototype.toString=function(){return this.data&&typeof this.data.handleId!="undefined"?this.data.handleId.toString():Object.prototype.toString.call(this)},d.prototype.toJSON=function(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}},d}(),_=ae("setTimeout"),b=ae("Promise"),E=ae("then"),k=[],R=!1,N;function z(d){if(N||ve[b]&&(N=ve[b].resolve(0)),N){var s=N[E];s||(s=N.then),s.call(N,d)}else ve[_](d,0)}function M(d){L===0&&k.length===0&&z(K),d&&k.push(d)}function K(){if(!R){for(R=!0;k.length;){var d=k;k=[];for(var s=0;s<d.length;s++){var a=d[s];try{a.zone.runTask(a,null,null)}catch(u){re.onUnhandledError(u)}}}re.microtaskDrainDone(),R=!1}}var ne={name:"NO ZONE"},A="notScheduled",S="scheduling",T="scheduled",q="running",W="canceling",X="unknown",V="microTask",w="macroTask",G="eventTask",Z={},re={symbol:ae,currentZoneFrame:function(){return y},onUnhandledError:F,microtaskDrainDone:F,scheduleMicroTask:M,showUncaughtError:function(){return!i[ae("ignoreConsoleErrorUncaughtError")]},patchEventTarget:function(){return[]},patchOnProperties:F,patchMethod:function(){return F},bindArguments:function(){return[]},patchThen:function(){return F},patchMacroTask:function(){return F},patchEventPrototype:function(){return F},getGlobalObjects:function(){},ObjectDefineProperty:function(){return F},ObjectGetOwnPropertyDescriptor:function(){},ObjectCreate:function(){},ArraySlice:function(){return[]},patchClass:function(){return F},wrapWithCurrentZone:function(){return F},filterProperties:function(){return[]},attachOriginToPatched:function(){return F},_redefineProperty:function(){return F},patchCallbacks:function(){return F},nativeScheduleMicroTask:z},y={parent:null,zone:new i(null,null)},x=null,L=0;function F(){}return n("Zone","Zone"),i}var De=Object.getOwnPropertyDescriptor,Je=Object.defineProperty,Ke=Object.getPrototypeOf,Lr=Object.create,lr=Array.prototype.slice,Qe="addEventListener",$e="removeEventListener",er=ae(Qe),rr=ae($e),de="true",pe="false",Ie=ae("");function tr(r,e){return Zone.current.wrap(r,e)}function nr(r,e,n,t,i){return Zone.current.scheduleMacroTask(r,e,n,t,i)}var B=ae,Ve=typeof window!="undefined",xe=Ve?window:void 0,ee=Ve&&xe||globalThis,Nr="removeAttribute";function Be(r,e){for(var n=r.length-1;n>=0;n--)typeof r[n]=="function"&&(r[n]=tr(r[n],e+"_"+n));return r}function Mr(r,e){for(var n=r.constructor.name,t=function(c){var f=e[c],p=r[f];if(p){var _=De(r,f);if(!fr(_))return"continue";r[f]=function(b){var E=function(){return b.apply(this,Be(arguments,n+"."+f))};return Ee(E,b),E}(p)}},i=0;i<e.length;i++)t(i)}function fr(r){return r?r.writable===!1?!1:!(typeof r.get=="function"&&typeof r.set=="undefined"):!0}var hr=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope,Ge=!("nw"in ee)&&typeof ee.process!="undefined"&&ee.process.toString()==="[object process]",or=!Ge&&!hr&&!!(Ve&&xe.HTMLElement),Ue=typeof ee.process!="undefined"&&ee.process.toString()==="[object process]"&&!hr&&!!(Ve&&xe.HTMLElement),ze={},Ar=B("enable_beforeunload"),vr=function(r){if(r=r||ee.event,!!r){var e=ze[r.type];e||(e=ze[r.type]=B("ON_PROPERTY"+r.type));var n=this||r.target||ee,t=n[e],i;if(or&&n===xe&&r.type==="error"){var c=r;i=t&&t.call(this,c.message,c.filename,c.lineno,c.colno,c.error),i===!0&&r.preventDefault()}else i=t&&t.apply(this,arguments),r.type==="beforeunload"&&ee[Ar]&&typeof i=="string"?r.returnValue=i:i!=null&&!i&&r.preventDefault();return i}};function _r(r,e,n){var t=De(r,e);if(!t&&n){var i=De(n,e);i&&(t={enumerable:!0,configurable:!0})}if(!(!t||!t.configurable)){var c=B("on"+e+"patched");if(!(r.hasOwnProperty(c)&&r[c])){delete t.writable,delete t.value;var f=t.get,p=t.set,_=e.slice(2),b=ze[_];b||(b=ze[_]=B("ON_PROPERTY"+_)),t.set=function(E){var k=this;if(!k&&r===ee&&(k=ee),!!k){var R=k[b];typeof R=="function"&&k.removeEventListener(_,vr),p==null||p.call(k,null),k[b]=E,typeof E=="function"&&k.addEventListener(_,vr,!1)}},t.get=function(){var E=this;if(!E&&r===ee&&(E=ee),!E)return null;var k=E[b];if(k)return k;if(f){var R=f.call(this);if(R)return t.set.call(this,R),typeof E[Nr]=="function"&&E.removeAttribute(e),R}return null},Je(r,e,t),r[c]=!0}}}function ir(r,e,n){if(e)for(var t=0;t<e.length;t++)_r(r,"on"+e[t],n);else{var i=[];for(var c in r)c.slice(0,2)=="on"&&i.push(c);for(var f=0;f<i.length;f++)_r(r,i[f],n)}}var ce=B("originalInstance");function Ze(r){var e=ee[r];if(e){ee[B(r)]=e,ee[r]=function(){var i=Be(arguments,r);switch(i.length){case 0:this[ce]=new e;break;case 1:this[ce]=new e(i[0]);break;case 2:this[ce]=new e(i[0],i[1]);break;case 3:this[ce]=new e(i[0],i[1],i[2]);break;case 4:this[ce]=new e(i[0],i[1],i[2],i[3]);break;default:throw new Error("Arg list too long.")}},Ee(ee[r],e);var n=new e(function(){}),t;for(t in n)r==="XMLHttpRequest"&&t==="responseBlob"||function(i){typeof n[i]=="function"?ee[r].prototype[i]=function(){return this[ce][i].apply(this[ce],arguments)}:Je(ee[r].prototype,i,{set:function(c){typeof c=="function"?(this[ce][i]=tr(c,r+"."+i),Ee(this[ce][i],c)):this[ce][i]=c},get:function(){return this[ce][i]}})}(t);for(t in e)t!=="prototype"&&e.hasOwnProperty(t)&&(ee[r][t]=e[t])}}function jr(r,e){if(typeof Object.getOwnPropertySymbols=="function"){var n=Object.getOwnPropertySymbols(r);n.forEach(function(t){var i=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,{get:function(){return r[t]},set:function(c){i&&(!i.writable||typeof i.set!="function")||(r[t]=c)},enumerable:i?i.enumerable:!0,configurable:i?i.configurable:!0})})}}var dr=!1;function Hr(r){dr=r}function le(r,e,n){for(var t=r;t&&!t.hasOwnProperty(e);)t=Ke(t);!t&&r[e]&&(t=r);var i=B(e),c=null;if(t&&(!(c=t[i])||!t.hasOwnProperty(i))){c=t[i]=t[e];var f=t&&De(t,e);if(fr(f)){var p=n(c,i,e);t[e]=function(){return p(this,arguments)},Ee(t[e],c),dr&&jr(c,t[e])}}return c}function Le(r,e,n){var t=null;function i(c){var f=c.data;return f.args[f.cbIdx]=function(){c.invoke.apply(this,arguments)},t.apply(f.target,f.args),c}t=le(r,e,function(c){return function(f,p){var _=n(f,p);return _.cbIdx>=0&&typeof p[_.cbIdx]=="function"?nr(_.name,p[_.cbIdx],_,i):c.apply(f,p)}})}function Fr(r,e,n){var t=null;function i(c){var f=c.data;return f.args[f.cbIdx]=function(){c.invoke.apply(this,arguments)},t.apply(f.target,f.args),c}t=le(r,e,function(c){return function(f,p){var _=n(f,p);return _.cbIdx>=0&&typeof p[_.cbIdx]=="function"?Zone.current.scheduleMicroTask(_.name,p[_.cbIdx],_,i):c.apply(f,p)}})}function Ee(r,e){r[B("OriginalDelegate")]=e}function pr(r){return typeof r=="function"}function Er(r){return typeof r=="number"}var Vr={useG:!0},se={},Tr={},yr=new RegExp("^"+Ie+"(\\w+)(true|false)$"),mr=B("propagationStopped");function gr(r,e){var n=(e?e(r):r)+pe,t=(e?e(r):r)+de,i=Ie+n,c=Ie+t;se[r]={},se[r][pe]=i,se[r][de]=c}function kr(r,e,n,t){var i=t&&t.add||Qe,c=t&&t.rm||$e,f=t&&t.listeners||"eventListeners",p=t&&t.rmAll||"removeAllListeners",_=B(i),b="."+i+":",E="prependListener",k="."+E+":",R=function(S,T,q){if(!S.isRemoved){var W=S.callback;typeof W=="object"&&W.handleEvent&&(S.callback=function(G){return W.handleEvent(G)},S.originalDelegate=W);var X;try{S.invoke(S,T,[q])}catch(G){X=G}var V=S.options;if(V&&typeof V=="object"&&V.once){var w=S.originalDelegate?S.originalDelegate:S.callback;T[c].call(T,q.type,w,V)}return X}};function N(S,T,q){if(T=T||r.event,!!T){var W=S||T.target||r,X=W[se[T.type][q?de:pe]];if(X){var V=[];if(X.length===1){var w=R(X[0],W,T);w&&V.push(w)}else for(var G=X.slice(),Z=0;Z<G.length&&!(T&&T[mr]===!0);Z++){var w=R(G[Z],W,T);w&&V.push(w)}if(V.length===1)throw V[0];for(var re=function(y){var x=V[y];e.nativeScheduleMicroTask(function(){throw x})},Z=0;Z<V.length;Z++)re(Z)}}}var z=function(S){return N(this,S,!1)},M=function(S){return N(this,S,!0)};function K(S,T){if(!S)return!1;var q=!0;T&&T.useG!==void 0&&(q=T.useG);var W=T&&T.vh,X=!0;T&&T.chkDup!==void 0&&(X=T.chkDup);var V=!1;T&&T.rt!==void 0&&(V=T.rt);for(var w=S;w&&!w.hasOwnProperty(i);)w=Ke(w);if(!w&&S[i]&&(w=S),!w||w[_])return!1;var G=T&&T.eventNameToString,Z={},re=w[_]=w[i],y=w[B(c)]=w[c],x=w[B(f)]=w[f],L=w[B(p)]=w[p],F;T&&T.prepend&&(F=w[B(T.prepend)]=w[T.prepend]);function d(o,v){return v?typeof o=="boolean"?{capture:o,passive:!0}:o?typeof o=="object"&&o.passive!==!1?we(Fe({},o),{passive:!0}):o:{passive:!0}:o}var s=function(o){if(!Z.isExisting)return re.call(Z.target,Z.eventName,Z.capture?M:z,Z.options)},a=function(o){if(!o.isRemoved){var v=se[o.eventName],g=void 0;v&&(g=v[o.capture?de:pe]);var P=g&&o.target[g];if(P)for(var I=0;I<P.length;I++){var H=P[I];if(H===o){P.splice(I,1),o.isRemoved=!0,o.removeAbortListener&&(o.removeAbortListener(),o.removeAbortListener=null),P.length===0&&(o.allRemoved=!0,o.target[g]=null);break}}}if(o.allRemoved)return y.call(o.target,o.eventName,o.capture?M:z,o.options)},u=function(o){return re.call(Z.target,Z.eventName,o.invoke,Z.options)},m=function(o){return F.call(Z.target,Z.eventName,o.invoke,Z.options)},j=function(o){return y.call(o.target,o.eventName,o.invoke,o.options)},Y=q?s:u,fe=q?a:j,be=function(o,v){var g=typeof v;return g==="function"&&o.callback===v||g==="object"&&o.originalDelegate===v},Te=(T==null?void 0:T.diff)||be,ge=Zone[B("UNPATCHED_EVENTS")],_e=r[B("PASSIVE_EVENTS")];function l(o){if(typeof o=="object"&&o!==null){var v=Fe({},o);return o.signal&&(v.signal=o.signal),v}return o}var h=function(o,v,g,P,I,H){return I===void 0&&(I=!1),H===void 0&&(H=!1),function(){var C=this||r,D=arguments[0];T&&T.transferEventName&&(D=T.transferEventName(D));var U=arguments[1];if(!U)return o.apply(this,arguments);if(Ge&&D==="uncaughtException")return o.apply(this,arguments);var Q=!1;if(typeof U!="function"){if(!U.handleEvent)return o.apply(this,arguments);Q=!0}if(!(W&&!W(o,U,C,arguments))){var ie=!!_e&&_e.indexOf(D)!==-1,te=l(d(arguments[2],ie)),$=te==null?void 0:te.signal;if(!($!=null&&$.aborted)){if(ge){for(var J=0;J<ge.length;J++)if(D===ge[J])return ie?o.call(C,D,U,te):o.apply(this,arguments)}var oe=te?typeof te=="boolean"?!0:te.capture:!1,wr=te&&typeof te=="object"?te.once:!1,nt=Zone.current,cr=se[D];cr||(gr(D,G),cr=se[D]);var Sr=cr[oe?de:pe],Ce=C[Sr],Or=!1;if(Ce){if(Or=!0,X){for(var J=0;J<Ce.length;J++)if(Te(Ce[J],U))return}}else Ce=C[Sr]=[];var Xe,Cr=C.constructor.name,Dr=Tr[Cr];Dr&&(Xe=Dr[D]),Xe||(Xe=Cr+v+(G?G(D):D)),Z.options=te,wr&&(Z.options.once=!1),Z.target=C,Z.capture=oe,Z.eventName=D,Z.isExisting=Or;var Ne=q?Vr:void 0;Ne&&(Ne.taskData=Z),$&&(Z.options.signal=void 0);var he=nt.scheduleEventTask(Xe,U,Ne,g,P);if($){Z.options.signal=$;var Ir=function(){return he.zone.cancelTask(he)};o.call($,"abort",Ir,{once:!0}),he.removeAbortListener=function(){return $.removeEventListener("abort",Ir)}}if(Z.target=null,Ne&&(Ne.taskData=null),wr&&(Z.options.once=!0),typeof he.options!="boolean"&&(he.options=te),he.target=C,he.capture=oe,he.eventName=D,Q&&(he.originalDelegate=U),H?Ce.unshift(he):Ce.push(he),I)return C}}}};return w[i]=h(re,b,Y,fe,V),F&&(w[E]=h(F,k,m,fe,V,!0)),w[c]=function(){var o=this||r,v=arguments[0];T&&T.transferEventName&&(v=T.transferEventName(v));var g=arguments[2],P=g?typeof g=="boolean"?!0:g.capture:!1,I=arguments[1];if(!I)return y.apply(this,arguments);if(!(W&&!W(y,I,o,arguments))){var H=se[v],C;H&&(C=H[P?de:pe]);var D=C&&o[C];if(D)for(var U=0;U<D.length;U++){var Q=D[U];if(Te(Q,I)){if(D.splice(U,1),Q.isRemoved=!0,D.length===0&&(Q.allRemoved=!0,o[C]=null,!P&&typeof v=="string")){var ie=Ie+"ON_PROPERTY"+v;o[ie]=null}return Q.zone.cancelTask(Q),V?o:void 0}}return y.apply(this,arguments)}},w[f]=function(){var o=this||r,v=arguments[0];T&&T.transferEventName&&(v=T.transferEventName(v));for(var g=[],P=ar(o,G?G(v):v),I=0;I<P.length;I++){var H=P[I],C=H.originalDelegate?H.originalDelegate:H.callback;g.push(C)}return g},w[p]=function(){var o=this||r,v=arguments[0];if(v){T&&T.transferEventName&&(v=T.transferEventName(v));var D=se[v];if(D){var U=D[pe],Q=D[de],ie=o[U],te=o[Q];if(ie)for(var $=ie.slice(),P=0;P<$.length;P++){var J=$[P],oe=J.originalDelegate?J.originalDelegate:J.callback;this[c].call(this,v,oe,J.options)}if(te)for(var $=te.slice(),P=0;P<$.length;P++){var J=$[P],oe=J.originalDelegate?J.originalDelegate:J.callback;this[c].call(this,v,oe,J.options)}}}else{for(var g=Object.keys(o),P=0;P<g.length;P++){var I=g[P],H=yr.exec(I),C=H&&H[1];C&&C!=="removeListener"&&this[p].call(this,C)}this[p].call(this,"removeListener")}if(V)return this},Ee(w[i],re),Ee(w[c],y),L&&Ee(w[p],L),x&&Ee(w[f],x),!0}for(var ne=[],A=0;A<n.length;A++)ne[A]=K(n[A],t);return ne}function ar(r,e){if(!e){var n=[];for(var t in r){var i=yr.exec(t),c=i&&i[1];if(c&&(!e||c===e)){var f=r[t];if(f)for(var p=0;p<f.length;p++)n.push(f[p])}}return n}var _=se[e];_||(gr(e),_=se[e]);var b=r[_[pe]],E=r[_[de]];return b?E?b.concat(E):b.slice():E?E.slice():[]}function xr(r,e){var n=r.Event;n&&n.prototype&&e.patchMethod(n.prototype,"stopImmediatePropagation",function(t){return function(i,c){i[mr]=!0,t&&t.apply(i,c)}})}function br(r,e){e.patchMethod(r,"queueMicrotask",function(n){return function(t,i){Zone.current.scheduleMicroTask("queueMicrotask",i[0])}})}var We=B("zoneTask");function ue(r,e,n,t){var i=null,c=null;e+=t,n+=t;var f={};function p(b){var E=b.data;E.args[0]=function(){return b.invoke.apply(this,arguments)};var k=i.apply(r,E.args);return Er(k)?E.handleId=k:(E.handle=k,E.isRefreshable=pr(k.refresh)),b}function _(b){var E=b.data,k=E.handle,R=E.handleId;return c.call(r,k!=null?k:R)}i=le(r,e,function(b){return function(E,k){var R;if(pr(k[0])){var N={isRefreshable:!1,isPeriodic:t==="Interval",delay:t==="Timeout"||t==="Interval"?k[1]||0:void 0,args:k},z=k[0];k[0]=function(){try{return z.apply(this,arguments)}finally{var X=N.handle,V=N.handleId,w=N.isPeriodic,G=N.isRefreshable;!w&&!G&&(V?delete f[V]:X&&(X[We]=null))}};var M=nr(e,k[0],N,p,_);if(!M)return M;var K=M.data,ne=K.handleId,A=K.handle,S=K.isRefreshable,T=K.isPeriodic;if(ne)f[ne]=M;else if(A&&(A[We]=M,S&&!T)){var q=A.refresh;A.refresh=function(){var W=M.zone,X=M.state;return X==="notScheduled"?(M._state="scheduled",W._updateTaskCount(M,1)):X==="running"&&(M._state="scheduling"),q.call(this)}}return(R=A!=null?A:ne)!=null?R:M}else return b.apply(r,k)}}),c=le(r,n,function(b){return function(E,k){var R=k[0],N;Er(R)?(N=f[R],delete f[R]):(N=R==null?void 0:R[We],N?R[We]=null:N=R),N!=null&&N.type?N.cancelFn&&N.zone.cancelTask(N):b.apply(r,k)}})}function Br(r,e){var n=e.getGlobalObjects(),t=n.isBrowser,i=n.isMix;if(!(!t&&!i||!r.customElements||!("customElements"in r))){var c=["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback","formAssociatedCallback","formDisabledCallback","formResetCallback","formStateRestoreCallback"];e.patchCallbacks(e,r.customElements,"customElements","define",c)}}function Gr(r,e){if(!Zone[e.symbol("patchEventTarget")]){for(var n=e.getGlobalObjects(),t=n.eventNames,i=n.zoneSymbolEventNames,c=n.TRUE_STR,f=n.FALSE_STR,p=n.ZONE_SYMBOL_PREFIX,_=0;_<t.length;_++){var b=t[_],E=b+f,k=b+c,R=p+E,N=p+k;i[b]={},i[b][f]=R,i[b][c]=N}var z=r.EventTarget;if(!(!z||!z.prototype))return e.patchEventTarget(r,e,[z&&z.prototype]),!0}}function Ur(r,e){e.patchEventPrototype(r,e)}function Pr(r,e,n){if(!n||n.length===0)return e;var t=n.filter(function(c){return c.target===r});if(t.length===0)return e;var i=t[0].ignoreProperties;return e.filter(function(c){return i.indexOf(c)===-1})}function Rr(r,e,n,t){if(r){var i=Pr(r,e,n);ir(r,i,t)}}function sr(r){return Object.getOwnPropertyNames(r).filter(function(e){return e.startsWith("on")&&e.length>2}).map(function(e){return e.substring(2)})}function zr(r,e){if(!(Ge&&!Ue)&&!Zone[r.symbol("patchEvents")]){var n=e.__Zone_ignore_on_properties,t=[];if(or){var i=window;t=t.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]),Rr(i,sr(i),n,Ke(i))}t=t.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(var c=0;c<t.length;c++){var f=e[t[c]];f!=null&&f.prototype&&Rr(f.prototype,sr(f.prototype),n)}}}function Wr(r){r.__load_patch("timers",function(e){var n="set",t="clear";ue(e,n,t,"Timeout"),ue(e,n,t,"Interval"),ue(e,n,t,"Immediate")}),r.__load_patch("requestAnimationFrame",function(e){ue(e,"request","cancel","AnimationFrame"),ue(e,"mozRequest","mozCancel","AnimationFrame"),ue(e,"webkitRequest","webkitCancel","AnimationFrame")}),r.__load_patch("blocking",function(e,n){for(var t=["alert","prompt","confirm"],i=0;i<t.length;i++){var c=t[i];le(e,c,function(f,p,_){return function(b,E){return n.current.run(f,e,E,_)}})}}),r.__load_patch("EventTarget",function(e,n,t){Ur(e,t),Gr(e,t);var i=e.XMLHttpRequestEventTarget;i&&i.prototype&&t.patchEventTarget(e,t,[i.prototype])}),r.__load_patch("MutationObserver",function(e,n,t){Ze("MutationObserver"),Ze("WebKitMutationObserver")}),r.__load_patch("IntersectionObserver",function(e,n,t){Ze("IntersectionObserver")}),r.__load_patch("FileReader",function(e,n,t){Ze("FileReader")}),r.__load_patch("on_property",function(e,n,t){zr(t,e)}),r.__load_patch("customElements",function(e,n,t){Br(e,t)}),r.__load_patch("XHR",function(e,n){b(e);var t=B("xhrTask"),i=B("xhrSync"),c=B("xhrListener"),f=B("xhrScheduled"),p=B("xhrURL"),_=B("xhrErrorBeforeScheduled");function b(E){var k=E.XMLHttpRequest;if(!k)return;var R=k.prototype;function N(y){return y[t]}var z=R[er],M=R[rr];if(!z){var K=E.XMLHttpRequestEventTarget;if(K){var ne=K.prototype;z=ne[er],M=ne[rr]}}var A="readystatechange",S="scheduled";function T(y){var x=y.data,L=x.target;L[f]=!1,L[_]=!1;var F=L[c];z||(z=L[er],M=L[rr]),F&&M.call(L,A,F);var d=L[c]=function(){if(L.readyState===L.DONE)if(!x.aborted&&L[f]&&y.state===S){var a=L[n.__symbol__("loadfalse")];if(L.status!==0&&a&&a.length>0){var u=y.invoke;y.invoke=function(){for(var m=L[n.__symbol__("loadfalse")],j=0;j<m.length;j++)m[j]===y&&m.splice(j,1);!x.aborted&&y.state===S&&u.call(y)},a.push(y)}else y.invoke()}else!x.aborted&&L[f]===!1&&(L[_]=!0)};z.call(L,A,d);var s=L[t];return s||(L[t]=y),Z.apply(L,x.args),L[f]=!0,y}function q(){}function W(y){var x=y.data;return x.aborted=!0,re.apply(x.target,x.args)}var X=le(R,"open",function(){return function(y,x){return y[i]=x[2]==!1,y[p]=x[1],X.apply(y,x)}}),V="XMLHttpRequest.send",w=B("fetchTaskAborting"),G=B("fetchTaskScheduling"),Z=le(R,"send",function(){return function(y,x){if(n.current[G]===!0||y[i])return Z.apply(y,x);var L={target:y,url:y[p],isPeriodic:!1,args:x,aborted:!1},F=nr(V,q,L,T,W);y&&y[_]===!0&&!L.aborted&&F.state===S&&F.invoke()}}),re=le(R,"abort",function(){return function(y,x){var L=N(y);if(L&&typeof L.type=="string"){if(L.cancelFn==null||L.data&&L.data.aborted)return;L.zone.cancelTask(L)}else if(n.current[w]===!0)return re.apply(y,x)}})}}),r.__load_patch("geolocation",function(e){e.navigator&&e.navigator.geolocation&&Mr(e.navigator.geolocation,["getCurrentPosition","watchPosition"])}),r.__load_patch("PromiseRejectionEvent",function(e,n){function t(i){return function(c){var f=ar(e,i);f.forEach(function(p){var _=e.PromiseRejectionEvent;if(_){var b=new _(i,{promise:c.promise,reason:c.rejection});p.invoke(b)}})}}e.PromiseRejectionEvent&&(n[B("unhandledPromiseRejectionHandler")]=t("unhandledrejection"),n[B("rejectionHandledHandler")]=t("rejectionhandled"))}),r.__load_patch("queueMicrotask",function(e,n,t){br(e,t)})}function Xr(r){r.__load_patch("ZoneAwarePromise",function(e,n,t){var i=Object.getOwnPropertyDescriptor,c=Object.defineProperty;function f(l){if(l&&l.toString===Object.prototype.toString){var h=l.constructor&&l.constructor.name;return(h||"")+": "+JSON.stringify(l)}return l?l.toString():Object.prototype.toString.call(l)}var p=t.symbol,_=[],b=e[p("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")]!==!1,E=p("Promise"),k=p("then"),R="__creationTrace__";t.onUnhandledError=function(l){if(t.showUncaughtError()){var h=l&&l.rejection;h?console.error("Unhandled Promise rejection:",h instanceof Error?h.message:h,"; Zone:",l.zone.name,"; Task:",l.task&&l.task.source,"; Value:",h,h instanceof Error?h.stack:void 0):console.error(l)}},t.microtaskDrainDone=function(){for(var l=function(){var h=_.shift();try{h.zone.runGuarded(function(){throw h.throwOriginal?h.rejection:h})}catch(o){z(o)}};_.length;)l()};var N=p("unhandledPromiseRejectionHandler");function z(l){t.onUnhandledError(l);try{var h=n[N];typeof h=="function"&&h.call(this,l)}catch(o){}}function M(l){return l&&typeof l.then=="function"}function K(l){return l}function ne(l){return Y.reject(l)}var A=p("state"),S=p("value"),T=p("finally"),q=p("parentPromiseValue"),W=p("parentPromiseState"),X="Promise.then",V=null,w=!0,G=!1,Z=0;function re(l,h){return function(o){try{F(l,h,o)}catch(v){F(l,!1,v)}}}var y=function(){var l=!1;return function(o){return function(){l||(l=!0,o.apply(null,arguments))}}},x="Promise resolved with itself",L=p("currentTaskTrace");function F(l,h,o){var v=y();if(l===o)throw new TypeError(x);if(l[A]===V){var g=null;try{(typeof o=="object"||typeof o=="function")&&(g=o&&o.then)}catch(D){return v(function(){F(l,!1,D)})(),l}if(h!==G&&o instanceof Y&&o.hasOwnProperty(A)&&o.hasOwnProperty(S)&&o[A]!==V)s(o),F(l,o[A],o[S]);else if(h!==G&&typeof g=="function")try{g.call(o,v(re(l,h)),v(re(l,!1)))}catch(D){v(function(){F(l,!1,D)})()}else{l[A]=h;var P=l[S];if(l[S]=o,l[T]===T&&h===w&&(l[A]=l[W],l[S]=l[q]),h===G&&o instanceof Error){var I=n.currentTask&&n.currentTask.data&&n.currentTask.data[R];I&&c(o,L,{configurable:!0,enumerable:!1,writable:!0,value:I})}for(var H=0;H<P.length;)a(l,P[H++],P[H++],P[H++],P[H++]);if(P.length==0&&h==G){l[A]=Z;var C=o;try{throw new Error("Uncaught (in promise): "+f(o)+(o&&o.stack?"\n"+o.stack:""))}catch(D){C=D}b&&(C.throwOriginal=!0),C.rejection=o,C.promise=l,C.zone=n.current,C.task=n.currentTask,_.push(C),t.scheduleMicroTask()}}}return l}var d=p("rejectionHandledHandler");function s(l){if(l[A]===Z){try{var h=n[d];h&&typeof h=="function"&&h.call(this,{rejection:l[S],promise:l})}catch(v){}l[A]=G;for(var o=0;o<_.length;o++)l===_[o].promise&&_.splice(o,1)}}function a(l,h,o,v,g){s(l);var P=l[A],I=P?typeof v=="function"?v:K:typeof g=="function"?g:ne;h.scheduleMicroTask(X,function(){try{var H=l[S],C=!!o&&T===o[T];C&&(o[q]=H,o[W]=P);var D=h.run(I,void 0,C&&I!==ne&&I!==K?[]:[H]);F(o,!0,D)}catch(U){F(o,!1,U)}},o)}var u="function ZoneAwarePromise() { [native code] }",m=function(){},j=e.AggregateError,Y=function(){function l(h){var o=this;if(!(o instanceof l))throw new Error("Must be an instanceof Promise.");o[A]=V,o[S]=[];try{var v=y();h&&h(v(re(o,w)),v(re(o,G)))}catch(g){F(o,!1,g)}}return l.toString=function(){return u},l.resolve=function(h){return h instanceof l?h:F(new this(null),w,h)},l.reject=function(h){return F(new this(null),G,h)},l.withResolvers=function(){var h={};return h.promise=new l(function(o,v){h.resolve=o,h.reject=v}),h},l.any=function(h){if(!h||typeof h[Symbol.iterator]!="function")return Promise.reject(new j([],"All promises were rejected"));var o=[],v=0;try{for(var g=0,P=h;g<P.length;g++){var I=P[g];v++,o.push(l.resolve(I))}}catch(D){return Promise.reject(new j([],"All promises were rejected"))}if(v===0)return Promise.reject(new j([],"All promises were rejected"));var H=!1,C=[];return new l(function(D,U){for(var Q=0;Q<o.length;Q++)o[Q].then(function(ie){H||(H=!0,D(ie))},function(ie){C.push(ie),v--,v===0&&(H=!0,U(new j(C,"All promises were rejected")))})})},l.race=function(h){var o,v,g=new this(function(U,Q){o=U,v=Q});function P(U){o(U)}function I(U){v(U)}for(var H=0,C=h;H<C.length;H++){var D=C[H];M(D)||(D=this.resolve(D)),D.then(P,I)}return g},l.all=function(h){return l.allWithCallback(h)},l.allSettled=function(h){var o=this&&this.prototype instanceof l?this:l;return o.allWithCallback(h,{thenCallback:function(v){return{status:"fulfilled",value:v}},errorCallback:function(v){return{status:"rejected",reason:v}}})},l.allWithCallback=function(h,o){for(var v,g,P=new this(function($,J){v=$,g=J}),I=2,H=0,C=[],D=function($){M($)||($=U.resolve($));var J=H;try{$.then(function(oe){C[J]=o?o.thenCallback(oe):oe,I--,I===0&&v(C)},function(oe){o?(C[J]=o.errorCallback(oe),I--,I===0&&v(C)):g(oe)})}catch(oe){g(oe)}I++,H++},U=this,Q=0,ie=h;Q<ie.length;Q++){var te=ie[Q];D(te)}return I-=2,I===0&&v(C),P},Object.defineProperty(l.prototype,Symbol.toStringTag,{get:function(){return"Promise"},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,Symbol.species,{get:function(){return l},enumerable:!1,configurable:!0}),l.prototype.then=function(h,o){var v,g=(v=this.constructor)==null?void 0:v[Symbol.species];(!g||typeof g!="function")&&(g=this.constructor||l);var P=new g(m),I=n.current;return this[A]==V?this[S].push(I,P,h,o):a(this,I,P,h,o),P},l.prototype.catch=function(h){return this.then(null,h)},l.prototype.finally=function(h){var o,v=(o=this.constructor)==null?void 0:o[Symbol.species];(!v||typeof v!="function")&&(v=l);var g=new v(m);g[T]=T;var P=n.current;return this[A]==V?this[S].push(P,g,h,h):a(this,P,g,h,h),g},l}();Y.resolve=Y.resolve,Y.reject=Y.reject,Y.race=Y.race,Y.all=Y.all;var fe=e[E]=e.Promise;e.Promise=Y;var be=p("thenPatched");function Te(l){var h=l.prototype,o=i(h,"then");if(!(o&&(o.writable===!1||!o.configurable))){var v=h.then;h[k]=v,l.prototype.then=function(g,P){var I=this,H=new Y(function(C,D){v.call(I,C,D)});return H.then(g,P)},l[be]=!0}}t.patchThen=Te;function ge(l){return function(h,o){var v=l.apply(h,o);if(v instanceof Y)return v;var g=v.constructor;return g[be]||Te(g),v}}if(fe){Te(fe);var _e=fe.try;_e&&typeof _e=="function"&&(Y.try=_e),le(e,"fetch",function(l){return ge(l)})}return Promise[n.__symbol__("uncaughtPromiseErrors")]=_,Y})}function Yr(r){r.__load_patch("toString",function(e){var n=Function.prototype.toString,t=B("OriginalDelegate"),i=B("Promise"),c=B("Error"),f=function(){if(typeof this=="function"){var E=this[t];if(E)return typeof E=="function"?n.call(E):Object.prototype.toString.call(E);if(this===Promise){var k=e[i];if(k)return n.call(k)}if(this===Error){var R=e[c];if(R)return n.call(R)}}return n.call(this)};f[t]=n,Function.prototype.toString=f;var p=Object.prototype.toString,_="[object Promise]";Object.prototype.toString=function(){return typeof Promise=="function"&&this instanceof Promise?_:p.call(this)}})}function qr(r,e,n,t,i){var c=Zone.__symbol__(t);if(!e[c]){var f=e[c]=e[t];e[t]=function(p,_,b){return _&&_.prototype&&i.forEach(function(E){var k="".concat(n,".").concat(t,"::")+E,R=_.prototype;try{if(R.hasOwnProperty(E)){var N=r.ObjectGetOwnPropertyDescriptor(R,E);N&&N.value?(N.value=r.wrapWithCurrentZone(N.value,k),r._redefineProperty(_.prototype,E,N)):R[E]&&(R[E]=r.wrapWithCurrentZone(R[E],k))}else R[E]&&(R[E]=r.wrapWithCurrentZone(R[E],k))}catch(z){}}),f.call(e,p,_,b)},r.attachOriginToPatched(e[t],f)}}function Jr(r){r.__load_patch("util",function(e,n,t){var i=sr(e);t.patchOnProperties=ir,t.patchMethod=le,t.bindArguments=Be,t.patchMacroTask=Le;var c=n.__symbol__("BLACK_LISTED_EVENTS"),f=n.__symbol__("UNPATCHED_EVENTS");e[f]&&(e[c]=e[f]),e[c]&&(n[c]=n[f]=e[c]),t.patchEventPrototype=xr,t.patchEventTarget=kr,t.ObjectDefineProperty=Je,t.ObjectGetOwnPropertyDescriptor=De,t.ObjectCreate=Lr,t.ArraySlice=lr,t.patchClass=Ze,t.wrapWithCurrentZone=tr,t.filterProperties=Pr,t.attachOriginToPatched=Ee,t._redefineProperty=Object.defineProperty,t.patchCallbacks=qr,t.getGlobalObjects=function(){return{globalSources:Tr,zoneSymbolEventNames:se,eventNames:i,isBrowser:or,isMix:Ue,isNode:Ge,TRUE_STR:de,FALSE_STR:pe,ZONE_SYMBOL_PREFIX:Ie,ADD_EVENT_LISTENER_STR:Qe,REMOVE_EVENT_LISTENER_STR:$e}}})}function Kr(r){Xr(r),Yr(r),Jr(r)}function Qr(r){r.__load_patch("EventEmitter",function(e,n,t){var i="addListener",c="prependListener",f="removeListener",p="removeAllListeners",_="listeners",b="on",E="off",k=function(M,K){return M.callback===K||M.callback.listener===K},R=function(M){return typeof M=="string"?M:M?M.toString().replace("(","_").replace(")","_"):""};function N(M){var K=kr(e,t,[M],{useG:!1,add:i,rm:f,prepend:c,rmAll:p,listeners:_,chkDup:!1,rt:!0,diff:k,eventNameToString:R});K&&K[0]&&(M[b]=M[i],M[E]=M[f])}var z;try{z=ye("events")}catch(M){}z&&z.EventEmitter&&N(z.EventEmitter.prototype)})}function $r(r){r.__load_patch("fs",function(e,n,t){var i,c;try{c=ye("fs")}catch(_){}if(c){var f=["access","appendFile","chmod","chown","close","exists","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","lutimes","link","lstat","mkdir","mkdtemp","open","opendir","read","readdir","readFile","readlink","realpath","rename","rmdir","stat","symlink","truncate","unlink","utimes","write","writeFile","writev"];f.filter(function(_){return!!c[_]&&typeof c[_]=="function"}).forEach(function(_){Le(c,_,function(b,E){return{name:"fs."+_,args:E,cbIdx:E.length>0?E.length-1:-1,target:b}})});var p=(i=c.realpath)==null?void 0:i[t.symbol("OriginalDelegate")];p!=null&&p.native&&(c.realpath.native=p.native,Le(c.realpath,"native",function(_,b){return{args:b,target:_,cbIdx:b.length>0?b.length-1:-1,name:"fs.realpath.native"}}))}})}function et(r){r.__load_patch("node_util",function(e,n,t){t.patchOnProperties=ir,t.patchMethod=le,t.bindArguments=Be,t.patchMacroTask=Le,Hr(!0)})}var Se="set",Oe="clear";function rt(r){et(r),Qr(r),$r(r),r.__load_patch("node_timers",function(e,n){var t=!1;try{var i=ye("timers"),c=e.setTimeout===i.setTimeout;if(!c&&!Ue){var f=i.setTimeout;i.setTimeout=function(){return t=!0,f.apply(this,arguments)};var p=e.setTimeout(function(){},100);clearTimeout(p),i.setTimeout=f}ue(i,Se,Oe,"Timeout"),ue(i,Se,Oe,"Interval"),ue(i,Se,Oe,"Immediate")}catch(_){}Ue||(t?(e[n.__symbol__("setTimeout")]=e.setTimeout,e[n.__symbol__("setInterval")]=e.setInterval,e[n.__symbol__("setImmediate")]=e.setImmediate):(ue(e,Se,Oe,"Timeout"),ue(e,Se,Oe,"Interval"),ue(e,Se,Oe,"Immediate")))}),r.__load_patch("nextTick",function(){Fr(process,"nextTick",function(e,n){return{name:"process.nextTick",args:n,cbIdx:n.length>0&&typeof n[0]=="function"?0:-1,target:process}})}),r.__load_patch("handleUnhandledPromiseRejection",function(e,n,t){n[t.symbol("unhandledPromiseRejectionHandler")]=i("unhandledRejection"),n[t.symbol("rejectionHandledHandler")]=i("rejectionHandled");function i(c){return function(f){var p=ar(process,c);p.forEach(function(_){c==="unhandledRejection"?_.invoke(f.rejection,f.promise):c==="rejectionHandled"&&_.invoke(f.promise)})}}}),r.__load_patch("crypto",function(){var e;try{e=ye("crypto")}catch(t){}if(e){var n=["randomBytes","pbkdf2"];n.forEach(function(t){Le(e,t,function(i,c){return{name:"crypto."+t,args:c,cbIdx:c.length>0&&typeof c[c.length-1]=="function"?c.length-1:-1,target:e}})})}}),r.__load_patch("console",function(e,n){var t=["dir","log","info","error","warn","assert","debug","timeEnd","trace"];t.forEach(function(i){var c=console[n.__symbol__(i)]=console[i];c&&(console[i]=function(){var f=lr.call(arguments);return n.current===n.root?c.apply(this,f):n.root.run(c,this,f)})})}),r.__load_patch("queueMicrotask",function(e,n,t){br(e,t)})}function tt(){var r,e=globalThis,n=e[ae("forceDuplicateZoneCheck")]===!0;if(e.Zone&&(n||typeof e.Zone.__symbol__!="function"))throw new Error("Zone already loaded.");return(r=e.Zone)!=null||(e.Zone=Zr()),e.Zone}var ur=tt();return Kr(ur),Wr(ur),rt(ur),Me!=me&&(Ae.exports=me),Ae.exports});
if(__exports != exports)module.exports = exports;return module.exports}));