source: trip-planner-front/node_modules/zone.js/fesm2015/zone-error.min.js@ eed0bf8

Last change on this file since eed0bf8 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 4.0 KB
Line 
1"use strict";
2/**
3 * @license Angular v12.0.0-next.0
4 * (c) 2010-2020 Google LLC. https://angular.io/
5 * License: MIT
6 */
7/**
8 * @license
9 * Copyright Google LLC All Rights Reserved.
10 *
11 * Use of this source code is governed by an MIT-style license that can be
12 * found in the LICENSE file at https://angular.io/license
13 */Zone.__load_patch("Error",(e,r,t)=>{const n=t.symbol("zoneJsInternalStackFrames"),a=e[t.symbol("Error")]=e.Error,o={};let c,i,s,l,k;e.Error=h;const u=e.__Zone_Error_BlacklistedStackFrames_policy||e.__Zone_Error_ZoneJsInternalStackFrames_policy||"default";function f(e){let r={zoneName:e.zone.name},t=r;for(;e.parent;){const t={zoneName:(e=e.parent).zone.name};r.parent=t,r=t}return t}function p(e,r,t=!0){let n=e.split("\n"),a=0;for(;n[a]!==c&&n[a]!==i&&n[a]!==s&&n[a]!==l&&n[a]!==k&&a<n.length;)a++;for(;a<n.length&&r;a++){let e=n[a];if(e.trim())switch(o[e]){case 0:n.splice(a,1),a--;break;case 1:r=r.parent?r.parent:null,n.splice(a,1),a--;break;default:n[a]+=t?` [${r.zone.name}]`:` [${r.zoneName}]`}}return n.join("\n")}function h(){let e=a.apply(this,arguments);const r=e.originalStack=e.stack;if(h.stackRewrite&&r){let n=t.currentZoneFrame();if("lazy"===u)e[t.symbol("zoneFrameNames")]=f(n);else if("default"===u)try{e.stack=e.zoneAwareStack=p(r,n)}catch(e){}}return this instanceof a&&this.constructor!=a?(Object.keys(e).concat("stack","message").forEach(r=>{const t=e[r];if(void 0!==t)try{this[r]=t}catch(e){}}),this):e}h.prototype=a.prototype,h[n]=o,h.stackRewrite=!1;const m=t.symbol("zoneAwareStack");"lazy"===u&&Object.defineProperty(h.prototype,"zoneAwareStack",{configurable:!0,enumerable:!0,get:function(){return this[m]||(this[m]=p(this.originalStack,this[t.symbol("zoneFrameNames")],!1)),this[m]},set:function(e){this.originalStack=e,this[m]=p(this.originalStack,this[t.symbol("zoneFrameNames")],!1)}});const d=["stackTraceLimit","captureStackTrace","prepareStackTrace"],T=Object.keys(a);if(T&&T.forEach(e=>{0===d.filter(r=>r===e).length&&Object.defineProperty(h,e,{get:function(){return a[e]},set:function(r){a[e]=r}})}),a.hasOwnProperty("stackTraceLimit")&&(a.stackTraceLimit=Math.max(a.stackTraceLimit,15),Object.defineProperty(h,"stackTraceLimit",{get:function(){return a.stackTraceLimit},set:function(e){return a.stackTraceLimit=e}})),a.hasOwnProperty("captureStackTrace")&&Object.defineProperty(h,"captureStackTrace",{value:function e(r,t){a.captureStackTrace(r,t)}}),Object.defineProperty(h,"prepareStackTrace",{get:function(){return a.prepareStackTrace},set:function(e){return a.prepareStackTrace=e&&"function"==typeof e?function(r,t){if(t)for(let e=0;e<t.length;e++)if("zoneCaptureStackTrace"===t[e].getFunctionName()){t.splice(e,1);break}return e.call(this,r,t)}:e}}),"disable"===u)return;const E=r.current.fork({name:"detect",onHandleError:function(e,r,t,n){if(n.originalStack&&Error===h){let e=n.originalStack.split(/\n/),r=!1,t=!1,a=!1;for(;e.length;){let n=e.shift();if(/:\d+:\d+/.test(n)||"ZoneAwareError"===n){let e=n.split("(")[0].split("@")[0],u=1;if(-1!==e.indexOf("ZoneAwareError")&&(-1!==e.indexOf("new ZoneAwareError")?(c=n,i=n.replace("new ZoneAwareError","new Error.ZoneAwareError")):(s=n,l=n.replace("Error.",""),-1===n.indexOf("Error.ZoneAwareError")&&(k=n.replace("ZoneAwareError","Error.ZoneAwareError"))),o[i]=0),-1!==e.indexOf("runGuarded")?t=!0:-1!==e.indexOf("runTask")?a=!0:-1!==e.indexOf("run")?r=!0:u=0,o[n]=u,r&&t&&a){h.stackRewrite=!0;break}}}}return!1}}).fork({name:"child",onScheduleTask:function(e,r,t,n){return e.scheduleTask(t,n)},onInvokeTask:function(e,r,t,n,a,o){return e.invokeTask(t,n,a,o)},onCancelTask:function(e,r,t,n){return e.cancelTask(t,n)},onInvoke:function(e,r,t,n,a,o,c){return e.invoke(t,n,a,o,c)}}),y=Error.stackTraceLimit;Error.stackTraceLimit=100,E.run(()=>{E.runGuarded(()=>{const e=()=>{};E.scheduleEventTask(n,()=>{E.scheduleMacroTask(n,()=>{E.scheduleMicroTask(n,()=>{throw new Error},void 0,r=>{r._transitionTo=e,r.invoke()}),E.scheduleMicroTask(n,()=>{throw Error()},void 0,r=>{r._transitionTo=e,r.invoke()})},void 0,r=>{r._transitionTo=e,r.invoke()},()=>{})},void 0,r=>{r._transitionTo=e,r.invoke()},()=>{})})}),Error.stackTraceLimit=y});
Note: See TracBrowser for help on using the repository browser.