!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r():"function"==typeof define&&define.amd?define(r):r()}(this,function(){"use strict";function t(){return new Error(u)}function r(){try{throw t()}catch(r){return r}}function a(t){return t.stack?t.stack.split(o):[]}function e(t,r){for(var e=a(r),n=0;n0&&(t.push(a((new h).error)),c(t,r-1))}function i(){if(!(Error.stackTraceLimit<=0)){var t=[];c(t,2);for(var r=t[0],a=t[1],e=0;e0){var n=Zone.currentTask,c=n&&n.data&&n.data[f]||[];c=[new h].concat(c),c.length>this.longStackTraceLimit&&(c.length=this.longStackTraceLimit),e.data||(e.data={}),e.data[f]=c}return t.scheduleTask(a,e)},onHandleError:function(t,r,a,e){if(Error.stackTraceLimit>0){var c=Zone.currentTask||e.task;if(e instanceof Error&&c){var i=n(c.data&&c.data[f],e.stack);try{e.stack=e.longStack=i}catch(o){}}}return t.handleError(a,e)}},i()});