"use strict";var __assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n * (c) 2010-2025 Google LLC. https://angular.io/ * License: MIT */!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){var e=globalThis;function t(t){return(e.__Zone_symbol_prefix||"__zone_symbol__")+t}function n(){var n=e.performance;function r(e){n&&n.mark&&n.mark(e)}function o(e,t){n&&n.measure&&n.measure(e,t)}r("Zone");var i,a=function(){function n(e,t){this._parent=e,this._name=t?t.name||"unnamed":"",this._properties=t&&t.properties||{},this._zoneDelegate=new c(this,this._parent&&this._parent._zoneDelegate,t)}return n.assertZonePatched=function(){if(e.Promise!==P.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")},Object.defineProperty(n,"root",{get:function(){for(var e=n.current;e.parent;)e=e.parent;return e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"current",{get:function(){return z.zone},enumerable:!1,configurable:!0}),Object.defineProperty(n,"currentTask",{get:function(){return O},enumerable:!1,configurable:!0}),n.__load_patch=function(i,a,s){if(void 0===s&&(s=!1),P.hasOwnProperty(i)){var c=!0===e[t("forceDuplicateZoneCheck")];if(!s&&c)throw Error("Already loaded patch: "+i)}else if(!e["__Zone_disable_"+i]){var u="Zone:"+i;r(u),P[i]=a(e,n,j),o(u,u)}},Object.defineProperty(n.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),n.prototype.get=function(e){var t=this.getZoneWith(e);if(t)return t._properties[e]},n.prototype.getZoneWith=function(e){for(var t=this;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null},n.prototype.fork=function(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)},n.prototype.wrap=function(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);var n=this._zoneDelegate.intercept(this,e,t),r=this;return function(){return r.runGuarded(n,this,arguments,t)}},n.prototype.run=function(e,t,n,r){z={parent:z,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{z=z.parent}},n.prototype.runGuarded=function(e,t,n,r){void 0===t&&(t=null),z={parent:z,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{z=z.parent}},n.prototype.runTask=function(e,t,n){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||g).name+"; Execution: "+this.name+")");var r=e,o=e.type,i=e.data,a=void 0===i?{}:i,s=a.isPeriodic,c=void 0!==s&&s,u=a.isRefreshable,l=void 0!==u&&u;if(e.state!==y||o!==D&&o!==S){var f=e.state!=b;f&&r._transitionTo(b,T);var h=O;O=r,z={parent:z,zone:this};try{o!=S||!e.data||c||l||(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,r,t,n)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{var p=e.state;if(p!==y&&p!==E)if(o==D||c||l&&p===m)f&&r._transitionTo(T,b,m);else{var v=r._zoneDelegates;this._updateTaskCount(r,-1),f&&r._transitionTo(y,b,y),l&&(r._zoneDelegates=v)}z=z.parent,O=h}}},n.prototype.scheduleTask=function(e){if(e.zone&&e.zone!==this)for(var t=this;t;){if(t===e.zone)throw Error("can not reschedule task to ".concat(this.name," which is descendants of the original zone ").concat(e.zone.name));t=t.parent}e._transitionTo(m,y);var n=[];e._zoneDelegates=n,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(t){throw e._transitionTo(E,m,y),this._zoneDelegate.handleError(this,t),t}return e._zoneDelegates===n&&this._updateTaskCount(e,1),e.state==m&&e._transitionTo(T,m),e},n.prototype.scheduleMicroTask=function(e,t,n,r){return this.scheduleTask(new u(Z,e,t,n,r,void 0))},n.prototype.scheduleMacroTask=function(e,t,n,r,o){return this.scheduleTask(new u(S,e,t,n,r,o))},n.prototype.scheduleEventTask=function(e,t,n,r,o){return this.scheduleTask(new u(D,e,t,n,r,o))},n.prototype.cancelTask=function(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||g).name+"; Execution: "+this.name+")");if(e.state===T||e.state===b){e._transitionTo(w,T,b);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(E,w),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(y,w),e.runCount=-1,e}},n.prototype._updateTaskCount=function(e,t){var n=e._zoneDelegates;-1==t&&(e._zoneDelegates=null);for(var r=0;r0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e})},e}(),u=function(){function t(n,r,o,i,a,s){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=n,this.source=r,this.data=i,this.scheduleFn=a,this.cancelFn=s,!o)throw new Error("callback is not defined");this.callback=o;var c=this;this.invoke=n===D&&i&&i.useG?t.invokeTask:function(){return t.invokeTask.call(e,c,this,arguments)}}return t.invokeTask=function(e,t,n){e||(e=this),C++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{1==C&&k(),C--}},Object.defineProperty(t.prototype,"zone",{get:function(){return this._zone},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),t.prototype.cancelScheduleRequest=function(){this._transitionTo(y,m)},t.prototype._transitionTo=function(e,t,n){if(this._state!==t&&this._state!==n)throw new Error("".concat(this.type," '").concat(this.source,"': can not transition to '").concat(e,"', expecting state '").concat(t,"'").concat(n?" or '"+n+"'":"",", was '").concat(this._state,"'."));this._state=e,e==y&&(this._zoneDelegates=null)},t.prototype.toString=function(){return this.data&&void 0!==this.data.handleId?this.data.handleId.toString():Object.prototype.toString.call(this)},t.prototype.toJSON=function(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}},t}(),l=t("setTimeout"),f=t("Promise"),h=t("then"),p=[],v=!1;function d(t){if(i||e[f]&&(i=e[f].resolve(0)),i){var n=i[h];n||(n=i.then),n.call(i,t)}else e[l](t,0)}function _(e){0===C&&0===p.length&&d(k),e&&p.push(e)}function k(){if(!v){for(v=!0;p.length;){var e=p;p=[];for(var t=0;t=0;n--)"function"==typeof e[n]&&(e[n]=l(e[n],t+"_"+n));return e}var k="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,g=!("nw"in d)&&void 0!==d.process&&"[object process]"===d.process.toString(),y=!g&&!k&&!(!p||!v.HTMLElement),m=void 0!==d.process&&"[object process]"===d.process.toString()&&!k&&!(!p||!v.HTMLElement),T={},b=h("enable_beforeunload"),w=function(e){if(e=e||d.event){var t=T[e.type];t||(t=T[e.type]=h("ON_PROPERTY"+e.type));var n,r=this||e.target||d,o=r[t];return y&&r===v&&"error"===e.type?!0===(n=o&&o.call(this,e.message,e.filename,e.lineno,e.colno,e.error))&&e.preventDefault():(n=o&&o.apply(this,arguments),"beforeunload"===e.type&&d[b]&&"string"==typeof n?e.returnValue=n:null==n||n||e.preventDefault()),n}};function E(e,t,n){var i=r(e,t);if(!i&&n&&r(n,t)&&(i={enumerable:!0,configurable:!0}),i&&i.configurable){var a=h("on"+t+"patched");if(!e.hasOwnProperty(a)||!e[a]){delete i.writable,delete i.value;var s=i.get,c=i.set,u=t.slice(2),l=T[u];l||(l=T[u]=h("ON_PROPERTY"+u)),i.set=function(t){var n=this;n||e!==d||(n=d),n&&("function"==typeof n[l]&&n.removeEventListener(u,w),null==c||c.call(n,null),n[l]=t,"function"==typeof t&&n.addEventListener(u,w,!1))},i.get=function(){var n=this;if(n||e!==d||(n=d),!n)return null;var r=n[l];if(r)return r;if(s){var o=s.call(this);if(o)return i.set.call(this,o),"function"==typeof n.removeAttribute&&n.removeAttribute(t),o}return null},o(e,t,i),e[a]=!0}}}function Z(e,t,n){if(t)for(var r=0;r=0&&"function"==typeof r[i.cbIdx]?f(i.name,r[i.cbIdx],i,o):e.apply(t,r)}}))}function j(e,t,n){var r=null;function o(e){var t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},r.apply(t.target,t.args),e}r=D(e,t,(function(e){return function(t,r){var i=n(t,r);return i.cbIdx>=0&&"function"==typeof r[i.cbIdx]?Zone.current.scheduleMicroTask(i.name,r[i.cbIdx],i,o):e.apply(t,r)}}))}function z(e,t){e[h("OriginalDelegate")]=t}function O(e){return"function"==typeof e}function C(e){return"number"==typeof e}var I={useG:!0},A={},N={},x=new RegExp("^"+u+"(\\w+)(true|false)$"),R=h("propagationStopped");function M(e,t){var n=(t?t(e):e)+c,r=(t?t(e):e)+s,o=u+n,i=u+r;A[e]={},A[e][c]=o,A[e][s]=i}function L(e,t,n,r){var o=r&&r.add||"addEventListener",a=r&&r.rm||"removeEventListener",l=r&&r.listeners||"eventListeners",f=r&&r.rmAll||"removeAllListeners",p=h(o),v="."+o+":",d="prependListener",_="."+d+":",k=function(e,t,n){if(!e.isRemoved){var r,o=e.callback;"object"==typeof o&&o.handleEvent&&(e.callback=function(e){return o.handleEvent(e)},e.originalDelegate=o);try{e.invoke(e,t,[n])}catch(e){r=e}var i=e.options;return i&&"object"==typeof i&&i.once&&t[a].call(t,n.type,e.originalDelegate?e.originalDelegate:e.callback,i),r}};function y(n,r,o){if(r=r||e.event){var i=n||r.target||e,a=i[A[r.type][o?s:c]];if(a){var u=[];if(1===a.length)(h=k(a[0],i,r))&&u.push(h);else for(var l=a.slice(),f=0;f0?n.length-1:-1,target:t}}))}));var i=null===(r=o.realpath)||void 0===r?void 0:r[n.symbol("OriginalDelegate")];(null==i?void 0:i.native)&&(o.realpath.native=i.native,P(o.realpath,"native",(function(e,t){return{args:t,target:e,cbIdx:t.length>0?t.length-1:-1,name:"fs.realpath.native"}})))}}))}(e),e.__load_patch("node_timers",(function(e,t){var n=!1;try{var r=require("timers");if(e.setTimeout!==r.setTimeout&&!m){var o=r.setTimeout;r.setTimeout=function(){return n=!0,o.apply(this,arguments)};var i=e.setTimeout((function(){}),100);clearTimeout(i),r.setTimeout=o}U(r,q,W,"Timeout"),U(r,q,W,"Interval"),U(r,q,W,"Immediate")}catch(e){}m||(n?(e[t.__symbol__("setTimeout")]=e.setTimeout,e[t.__symbol__("setInterval")]=e.setInterval,e[t.__symbol__("setImmediate")]=e.setImmediate):(U(e,q,W,"Timeout"),U(e,q,W,"Interval"),U(e,q,W,"Immediate")))})),e.__load_patch("nextTick",(function(){j(process,"nextTick",(function(e,t){return{name:"process.nextTick",args:t,cbIdx:t.length>0&&"function"==typeof t[0]?0:-1,target:process}}))})),e.__load_patch("handleUnhandledPromiseRejection",(function(e,t,n){function r(e){return function(t){F(process,e).forEach((function(n){"unhandledRejection"===e?n.invoke(t.rejection,t.promise):"rejectionHandled"===e&&n.invoke(t.promise)}))}}t[n.symbol("unhandledPromiseRejectionHandler")]=r("unhandledRejection"),t[n.symbol("rejectionHandledHandler")]=r("rejectionHandled")})),e.__load_patch("crypto",(function(){var e;try{e=require("crypto")}catch(e){}e&&["randomBytes","pbkdf2"].forEach((function(t){P(e,t,(function(n,r){return{name:"crypto."+t,args:r,cbIdx:r.length>0&&"function"==typeof r[r.length-1]?r.length-1:-1,target:e}}))}))})),e.__load_patch("console",(function(e,t){["dir","log","info","error","warn","assert","debug","timeEnd","trace"].forEach((function(e){var n=console[t.__symbol__(e)]=console[e];n&&(console[e]=function(){var e=a.call(arguments);return t.current===t.root?n.apply(this,e):t.root.run(n,this,e)})}))})),e.__load_patch("queueMicrotask",(function(e,t,n){H(e,n)}))})(e),function i(e){e.__load_patch("ZoneAwarePromise",(function(e,t,n){var r=Object.getOwnPropertyDescriptor,o=Object.defineProperty,i=n.symbol,a=[],s=!1!==e[i("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],c=i("Promise"),u=i("then");n.onUnhandledError=function(e){if(n.showUncaughtError()){var t=e&&e.rejection;t?console.error("Unhandled Promise rejection:",t instanceof Error?t.message:t,"; Zone:",e.zone.name,"; Task:",e.task&&e.task.source,"; Value:",t,t instanceof Error?t.stack:void 0):console.error(e)}},n.microtaskDrainDone=function(){for(var e=function(){var e=a.shift();try{e.zone.runGuarded((function(){if(e.throwOriginal)throw e.rejection;throw e}))}catch(e){!function r(e){n.onUnhandledError(e);try{var r=t[l];"function"==typeof r&&r.call(this,e)}catch(e){}}(e)}};a.length;)e()};var l=i("unhandledPromiseRejectionHandler");function f(e){return e&&"function"==typeof e.then}function h(e){return e}function p(e){return I.reject(e)}var v=i("state"),d=i("value"),_=i("finally"),k=i("parentPromiseValue"),g=i("parentPromiseState"),y=null,m=!0,T=!1;function b(e,t){return function(n){try{S(e,t,n)}catch(t){S(e,!1,t)}}}var w=function(){var e=!1;return function t(n){return function(){e||(e=!0,n.apply(null,arguments))}}},E="Promise resolved with itself",Z=i("currentTaskTrace");function S(e,r,i){var c=w();if(e===i)throw new TypeError(E);if(e[v]===y){var u=null;try{"object"!=typeof i&&"function"!=typeof i||(u=i&&i.then)}catch(t){return c((function(){S(e,!1,t)}))(),e}if(r!==T&&i instanceof I&&i.hasOwnProperty(v)&&i.hasOwnProperty(d)&&i[v]!==y)j(i),S(e,i[v],i[d]);else if(r!==T&&"function"==typeof u)try{u.call(i,c(b(e,r)),c(b(e,!1)))}catch(t){c((function(){S(e,!1,t)}))()}else{e[v]=r;var l=e[d];if(e[d]=i,e[_]===_&&r===m&&(e[v]=e[g],e[d]=e[k]),r===T&&i instanceof Error){var f=t.currentTask&&t.currentTask.data&&t.currentTask.data.__creationTrace__;f&&o(i,Z,{configurable:!0,enumerable:!1,writable:!0,value:f})}for(var h=0;h