Bones/node_modules/zone.js/dist/long-stack-trace-zone.min.js
SOUTHERNCO\x2mjbyrn 7efe7605b8 Template Upload
2017-05-17 13:45:25 -04:00

1 line
1.7 KiB
JavaScript

!function(t){function r(n){if(e[n])return e[n].exports;var a=e[n]={exports:{},id:n,loaded:!1};return t[n].call(a.exports,a,a.exports,r),a.loaded=!0,a.exports}var e={};return r.m=t,r.c=e,r.p="",r(0)}([function(t,exports){"use strict";!function(){function t(){return new Error("STACKTRACE TRACKING")}function r(){try{throw t()}catch(r){return r}}function e(t){return t.stack?t.stack.split(i):[]}function n(t,r){var n;n=e(r);for(var a=0;a<n.length;a++){var c=n[a];a<u.length&&u[a]===c||t.push(n[a])}}function a(t,r){var e=[r];if(t)for(var a=(new Date).getTime(),c=0;c<t.length;c++){var o=t[c],u=o.timestamp;e.push(s+" Elapsed: "+(a-u.getTime())+" ms; At: "+u+" "+s),n(e,o.error),a=u.getTime()}return e.join(i)}function c(t,r){r>0&&(t.push(e((new l).error)),c(t,r-1))}function o(){var t=[];c(t,2);for(var r=t[0],e=t[1],n=0;n<r.length;n++){var a=r[n],o=e[n];if(a!==o)break;u.push(a)}}var i="\n",s=" ------------- ",u=[],f="__creationTrace__",l=function(){function t(){this.error=p(),this.timestamp=new Date}return t}(),d=t(),h=r(),p=d.stack?t:h.stack?r:t;Zone.longStackTraceZoneSpec={name:"long-stack-trace",longStackTraceLimit:10,onScheduleTask:function(t,r,e,n){var a=Zone.currentTask,c=a&&a.data&&a.data[f]||[];return c=[new l].concat(c),c.length>this.longStackTraceLimit&&(c.length=this.longStackTraceLimit),n.data||(n.data={}),n.data[f]=c,t.scheduleTask(e,n)},onHandleError:function(t,r,e,n){var c=Zone.currentTask;if(n instanceof Error&&c){var o=Object.getOwnPropertyDescriptor(n,"stack");if(o){var i=o.get,s=o.value;o={get:function(){return a(c.data&&c.data[f],i?i.apply(this):s)}},Object.defineProperty(n,"stack",o)}else n.stack=a(c.data&&c.data[f],n.stack)}return t.handleError(e,n)}},o()}()}]);