This repository has been archived by the owner on Jan 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
opbeat-angular.min.js
3 lines (3 loc) · 93.6 KB
/
opbeat-angular.min.js
1
2
3
!function e(t,n,r){function o(a,s){if(!n[a]){if(!t[a]){var c="function"==typeof require&&require;if(!s&&c)return c(a,!0);if(i)return i(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var p=n[a]={exports:{}};t[a][0].call(p.exports,function(e){var n=t[a][1][e];return o(n?n:e)},p,p.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t,n){(function(r){!function(o,i){"use strict";"function"==typeof r&&r.amd?r("error-stack-parser",["stackframe"],i):"object"==typeof n?t.exports=i(e("stackframe")):o.ErrorStackParser=i(o.StackFrame)}(this,function(e){"use strict";function t(e,t,n){if("function"==typeof Array.prototype.map)return e.map(t,n);for(var r=new Array(e.length),o=0;o<e.length;o++)r[o]=t.call(n,e[o]);return r}function n(e,t,n){if("function"==typeof Array.prototype.filter)return e.filter(t,n);for(var r=[],o=0;o<e.length;o++)t.call(n,e[o])&&r.push(e[o]);return r}function r(e,t){if("function"==typeof Array.prototype.indexOf)return e.indexOf(t);for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1}var o=/(^|@)\S+\:\d+/,i=/^\s*at .*(\S+\:\d+|\(native\))/m,a=/^(eval@)?(\[native code\])?$/;return{parse:function(e){if("undefined"!=typeof e.stacktrace||"undefined"!=typeof e["opera#sourceloc"])return this.parseOpera(e);if(e.stack&&e.stack.match(i))return this.parseV8OrIE(e);if(e.stack)return this.parseFFOrSafari(e);throw new Error("Cannot parse given Error object")},extractLocation:function(e){if(e.indexOf(":")===-1)return[e];var t=/(.+?)(?:\:(\d+))?(?:\:(\d+))?$/,n=t.exec(e.replace(/[\(\)]/g,""));return[n[1],n[2]||void 0,n[3]||void 0]},parseV8OrIE:function(o){var a=n(o.stack.split("\n"),function(e){return!!e.match(i)},this);return t(a,function(t){t.indexOf("(eval ")>-1&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^\()]*)|(\)\,.*$)/g,""));var n=t.replace(/^\s+/,"").replace(/\(eval code/g,"(").split(/\s+/).slice(1),o=this.extractLocation(n.pop()),i=n.join(" ")||void 0,a=r(["eval","<anonymous>"],o[0])>-1?void 0:o[0];return new e(i,(void 0),a,o[1],o[2],t)},this)},parseFFOrSafari:function(r){var o=n(r.stack.split("\n"),function(e){return!e.match(a)},this);return t(o,function(t){if(t.indexOf(" > eval")>-1&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g,":$1")),t.indexOf("@")===-1&&t.indexOf(":")===-1)return new e(t);var n=t.split("@"),r=this.extractLocation(n.pop()),o=n.join("@")||void 0;return new e(o,(void 0),r[0],r[1],r[2],t)},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(t){for(var n=/Line (\d+).*script (?:in )?(\S+)/i,r=t.message.split("\n"),o=[],i=2,a=r.length;i<a;i+=2){var s=n.exec(r[i]);s&&o.push(new e((void 0),(void 0),s[2],s[1],(void 0),r[i]))}return o},parseOpera10:function(t){for(var n=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=t.stacktrace.split("\n"),o=[],i=0,a=r.length;i<a;i+=2){var s=n.exec(r[i]);s&&o.push(new e(s[3]||void 0,(void 0),s[2],s[1],(void 0),r[i]))}return o},parseOpera11:function(r){var i=n(r.stack.split("\n"),function(e){return!!e.match(o)&&!e.match(/^Error created at/)},this);return t(i,function(t){var n,r=t.split("@"),o=this.extractLocation(r.pop()),i=r.shift()||"",a=i.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^\)]*\)/g,"")||void 0;i.match(/\(([^\)]*)\)/)&&(n=i.replace(/^[^\(]+\(([^\)]*)\)$/,"$1"));var s=void 0===n||"[arguments not available]"===n?void 0:n.split(",");return new e(a,s,o[0],o[1],o[2],t)},this)}}})}).call(this,void 0)},{stackframe:26}],2:[function(e,t,n){(function(e){!function(n,r){"use strict";"function"==typeof e&&e.amd?e(r):"object"==typeof t&&t.exports?t.exports=r():n.log=r()}(this,function(){"use strict";function e(e){return typeof console!==s&&(void 0!==console[e]?t(console,e):void 0!==console.log?t(console,"log"):a)}function t(e,t){var n=e[t];if("function"==typeof n.bind)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch(r){return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function n(e,t,n){return function(){typeof console!==s&&(r.call(this,t,n),this[e].apply(this,arguments))}}function r(e,t){for(var n=0;n<c.length;n++){var r=c[n];this[r]=n<e?a:this.methodFactory(r,e,t)}}function o(t,r,o){return e(t)||n.apply(this,arguments)}function i(e,t,n){function i(e){var t=(c[e]||"silent").toUpperCase();try{return void(window.localStorage[l]=t)}catch(n){}try{window.document.cookie=encodeURIComponent(l)+"="+t+";"}catch(n){}}function a(){var e;try{e=window.localStorage[l]}catch(t){}if(typeof e===s)try{var n=window.document.cookie,r=n.indexOf(encodeURIComponent(l)+"=");r&&(e=/^([^;]+)/.exec(n.slice(r))[1])}catch(t){}return void 0===p.levels[e]&&(e=void 0),e}var u,p=this,l="loglevel";e&&(l+=":"+e),p.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},p.methodFactory=n||o,p.getLevel=function(){return u},p.setLevel=function(t,n){if("string"==typeof t&&void 0!==p.levels[t.toUpperCase()]&&(t=p.levels[t.toUpperCase()]),!("number"==typeof t&&t>=0&&t<=p.levels.SILENT))throw"log.setLevel() called with invalid level: "+t;if(u=t,n!==!1&&i(t),r.call(p,t,e),typeof console===s&&t<p.levels.SILENT)return"No console available for logging"},p.setDefaultLevel=function(e){a()||p.setLevel(e,!1)},p.enableAll=function(e){p.setLevel(p.levels.TRACE,e)},p.disableAll=function(e){p.setLevel(p.levels.SILENT,e)};var f=a();null==f&&(f=null==t?"WARN":t),p.setLevel(f,!1)}var a=function(){},s="undefined",c=["trace","debug","info","warn","error"],u=new i,p={};u.getLogger=function(e){if("string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=p[e];return t||(t=p[e]=new i(e,u.getLevel(),u.methodFactory)),t};var l=typeof window!==s?window.log:void 0;return u.noConflict=function(){return typeof window!==s&&window.log===u&&(window.log=l),u},u})}).call(this,void 0)},{}],3:[function(e,t,n){t.exports={createValidFrames:function(e){var t=[];return Array.isArray(e)&&(t=e.filter(function(e){return"undefined"!=typeof e.filename&&"undefined"!=typeof e.lineno})),t}}},{}],4:[function(e,t,n){function r(e,t,n){this._logger=t,this._transport=e,this._config=n}function o(e){var t=i(e,c);return Object.keys(t).map(function(e){var n=t[e][0],r=n._start;n.transaction?r-=n.transaction._start:r=0;var o={},i=u.createValidFrames(n.frames);return i.length>0&&(o._frames=i),{transaction:n.transaction.name,transaction_kind:n.transaction.type,signature:n.signature,kind:n.type,timestamp:n.transaction._startStamp.toISOString(),parents:n.ancestors(),extra:o,_group:e}}).sort(function(e,t){return e.start_time-t.start_time})}function i(e,t){var n={};return e.forEach(function(e){var r=t(e);r in n?n[r].push(e):n[r]=[e],e._traceGroup=r}),n}function a(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes())}function s(e){return[a(e._startStamp).getTime(),e.name,e.result,e.type].join("-")}function c(e){var t=e.ancestors().map(function(e){return e.signature}).join(",");return[a(e.transaction._startStamp).getTime(),e.transaction.name,t,e.signature,e.type].join("-")}var u=e("./backend_utils"),p=e("../lib/utils");t.exports=r,r.prototype.sendError=function(e){if(this._config.isValid()){e.stacktrace.frames=u.createValidFrames(e.stacktrace.frames);var t={};e.stacktrace.frames.forEach(function(e){e.debug&&e.debug.length>0&&(t[e.abs_path]=e.debug.join(" - "),delete e.debug)}),Object.keys(t).length>0&&(e.extra.debug||(e.extra.debug={}),e.extra.debug.file_errors=t);var n=this.getHeaders();if(e=this._config.applyFilters(e))return this._transport.sendError(e,n);this._logger.debug("opbeat.transport.sendToOpbeat.cancelled")}else this._logger.debug("Config is not valid")},r.prototype.getHeaders=function(){var e=this._config.get("platform"),t={"X-Opbeat-Client":this._config.getAgentName()};if(e){var n=[];e.platform&&n.push("platform="+e.platform),e.framework&&n.push("framework="+e.framework),n.length>0&&(t["X-Opbeat-Platform"]=n.join(" "))}return t},r.prototype.groupSmallContinuouslySimilarTraces=function(e,t){var n=e.duration(),r=[],o=1;return e.traces.forEach(function(i,a){if(0===r.length)r.push(i);else{var s=r[r.length-1],c=s.type===i.type&&s.signature===i.signature&&i.duration()/n<t&&(i._start-s._end)/n<t,u=e.traces.length===a+1;c&&(o++,s._end=i._end,s.calcDiff()),o>1&&(!c||u)&&(s.signature=o+"x "+s.signature,o=1),c||r.push(i)}}),r},r.prototype.checkBrowserResponsiveness=function(e,t,n){var r=e.browserResponsivenessCounter;if("undefined"==typeof t||"undefined"==typeof r)return!0;var o=e._rootTrace.duration(),i=Math.floor(o/t),a=r+n>=i;return a},r.prototype.setTransactionContextInfo=function(e){var t=this,n=t._config.get("performance.browserResponsivenessInterval"),r=t._config.get("performance.checkBrowserResponsiveness"),o=t._config.get("context");o&&e.addContextInfo(o);var i=e.contextInfo,a=i.url;if(a&&a.location){a.location=a.location.substring(0,511);var s=p.parseUrl(a.location),c=s.protocol,u=["http:","https:","file:"];u.indexOf(c)<0?delete a.location:(a.base=s.path,Object.keys(s.queryStringParsed).length>0&&(a.query=s.queryStringParsed),s.hash&&(a.hash=s.hash))}e.addContextInfo({system:{agent:t._config.getAgentName()}}),r&&(e.setDebugData("browserResponsivenessCounter",e.browserResponsivenessCounter),e.setDebugData("browserResponsivenessInterval",n))},r.prototype.sendTransactions=function(e){var t=this;if(this._config.isValid()){var n=t._config.get("performance.browserResponsivenessInterval"),r=t._config.get("performance.checkBrowserResponsiveness");e.forEach(function(e){if(e.traces.sort(function(e,t){return e._start-t._start}),t._config.get("performance.groupSimilarTraces")){var n=t._config.get("performance.similarTraceThreshold");e.traces=t.groupSmallContinuouslySimilarTraces(e,n)}t.setTransactionContextInfo(e)});var o=e.filter(function(e){if(r&&!e.isHardNavigation){var o=t._config.get("performance.browserResponsivenessBuffer"),i=e._rootTrace.duration(),a=t.checkBrowserResponsiveness(e,n,o);if(!a)return t._logger.debug("Transaction was discarded! browser was not responsive enough during the transaction."," duration:",i," browserResponsivenessCounter:",e.browserResponsivenessCounter,"interval:",n),!1}return!0});if(o.length>0){var i=this._formatTransactions(o),a=this.getHeaders();return this._transport.sendTransaction(i,a).then(void 0,function(e){return t._logger.warn("Failed sending transactions!",e),Promise.reject(e)})}}else this._logger.debug("Config is not valid")},r.prototype._formatTransactions=function(e){var t=this.groupTransactions(e),n=[].concat.apply([],e.map(function(e){return e.traces})),r=o(n),i=this.getRawGroupedTracesTimings(n,r);return r.forEach(function(e){delete e._group,"string"==typeof e.signature&&(e.signature=e.signature.substring(0,511))}),{transactions:t,traces:{groups:r,raw:i}}},r.prototype.groupTransactions=function(e){var t=i(e,s);return Object.keys(t).map(function(e){var n=t[e][0],r=t[e].map(function(e){return e.duration()});return{transaction:n.name,result:n.result,kind:n.type,timestamp:a(n._startStamp).toISOString(),durations:r}})},r.prototype.getRawGroupedTracesTimings=function(e,t){var n=function(e,t){var n=0,r=c(t);return e.forEach(function(e,t){e._group===r&&(n=t)}),n},r=this,o=i(e,function(e){return e.transaction.name+"|"+e.transaction._start});return Object.keys(o).map(function(e){var i=o[e],a=i[0].transaction,s=[a.duration()];return i.forEach(function(e){var o=n(t,e),i=e._start-a._start;i>a.duration()?r._logger.debug("%c -- opbeat.instrumentation.getRawGroupedTracesTimings.error.relativeTraceStartLargerThanTransactionDuration","color: #ff0000",i,a._start,a.duration(),{trace:e,transaction:a}):i<0?r._logger.debug("%c -- opbeat.instrumentation.getRawGroupedTracesTimings.error.negativeRelativeTraceStart!","color: #ff0000",i,e._start,a._start,e):e.duration()>a.duration()?r._logger.debug("%c -- opbeat.instrumentation.getRawGroupedTracesTimings.error.traceDurationLargerThanTranscationDuration","color: #ff0000",e.duration(),a.duration(),{trace:e,transaction:a}):s.push([o,i,e.duration()])}),a.contextInfo&&Object.keys(a.contextInfo).length>0&&s.push(a.contextInfo),s})}},{"../lib/utils":16,"./backend_utils":3}],5:[function(e,t,n){function r(e){o(e)}var o=e("./patches/xhrPatch");t.exports=r},{"./patches/xhrPatch":7}],6:[function(e,t,n){function r(e){return"__opbeat_symbol__"+e}function o(e,t,n){for(var o=e;o&&!o.hasOwnProperty(t);)o=Object.getPrototypeOf(o);!o&&e[t]&&(o=e);var a,s=r(t);return o&&!(a=o[s])&&(a=o[s]=o[t],o[t]=i(t,n(a,s,t))),a}function i(e,t){try{return Function("f","return function "+e+"(){return f(this, arguments)}")(t)}catch(n){return function(){return t(this,arguments)}}}t.exports={patchFunction:function(e,t){},_copyProperties:function(e,t){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},wrapAfter:function(e,t){return function(){var n=e.apply(this,arguments);return t.apply(this,arguments),n}},wrapBefore:function(e,t){return function(){return t.apply(this,arguments),e.apply(this,arguments)}},wrap:function(e,t,n){return function(){t.apply(this,arguments);var r=e.apply(this,arguments);return n.apply(this,arguments),r}},argumentsToArray:function(e){for(var t=[],n=0;n<e.length;n++)t[n]=e[n];return t},opbeatSymbol:r,patchMethod:o}},{}],7:[function(e,t,n){var r=e("../patchUtils"),o=r.opbeatSymbol("url"),i=r.opbeatSymbol("method"),a=r.opbeatSymbol("isAsync");t.exports=function(){r.patchMethod(window.XMLHttpRequest.prototype,"open",function(e){return function(t,n){t[i]=n[0],t[o]=n[1],t[a]=n[2],e.apply(t,n)}})}},{"../patchUtils":6}],8:[function(e,t,n){function r(){this.services={}}var o=e("../backend/opbeat_backend"),i=e("loglevel"),a=e("../lib/config"),s=e("../lib/utils"),c=e("../lib/transport"),u=e("../exceptions/exceptionHandler"),p=e("../exceptions/stackFrameService"),l=e("../performance/serviceContainer");r.prototype.getOpbeatBackend=function(){if(s.isUndefined(this.services.OpbeatBackend)){var e=this.getLogger(),t=this.getConfigService(),n=this.getTransport();this.services.OpbeatBackend=new o(n,e,t)}return this.services.OpbeatBackend},r.prototype.getTransport=function(){if(s.isUndefined(this.services.Transport)){var e=this.getConfigService(),t=this.getLogger();this.services.Transport=new c(e,t)}return this.services.Transport},r.prototype.setLogLevel=function(e,t){t.get("debug")===!0&&"trace"!==t.config.logLevel?e.setLevel("debug",!1):e.setLevel(t.get("logLevel"),!1)},r.prototype.getLogger=function(){if(s.isUndefined(this.services.Logger)){var e=this.getConfigService(),t=this;t.setLogLevel(i,e),e.subscribeToChange(function(n){t.setLogLevel(i,e)}),this.services.Logger=i}return this.services.Logger},r.prototype.getConfigService=function(){if(s.isUndefined(this.services.ConfigService)){var e=new a;e.init(),this.services.ConfigService=e}return this.services.ConfigService},r.prototype.getExceptionHandler=function(){if(s.isUndefined(this.services.ExceptionHandler)){var e=this.getLogger(),t=this.getConfigService(),n=new u(this.getOpbeatBackend(),t,e,this.getStackFrameService());this.services.ExceptionHandler=n}return this.services.ExceptionHandler},r.prototype.getStackFrameService=function(){if(s.isUndefined(this.services.StackFrameService)){var e=this.getLogger(),t=this.getConfigService(),n=new p(t,e);this.services.StackFrameService=n}return this.services.StackFrameService},r.prototype.getPerformanceServiceContainer=function(){return s.isUndefined(this.services.PerformanceServiceContainer)&&(this.services.PerformanceServiceContainer=new l(this)),this.services.PerformanceServiceContainer},t.exports=r},{"../backend/opbeat_backend":4,"../exceptions/exceptionHandler":10,"../exceptions/stackFrameService":11,"../lib/config":14,"../lib/transport":15,"../lib/utils":16,"../performance/serviceContainer":18,loglevel:2}],9:[function(e,t,n){function r(){this.subscriptions=[]}r.prototype.subscribe=function(e){var t=this;return this.subscriptions.push(e),function(){var n=t.subscriptions.indexOf(e);n>-1&&t.subscriptions.splice(n,1)}},r.prototype.applyAll=function(e,t){this.subscriptions.forEach(function(n){try{n.apply(e,t)}catch(r){console.log(r,r.stack)}},this)},t.exports=r},{}],10:[function(e,t,n){function r(e){var t={};return Object.keys(e).forEach(function(n){if("stack"!==n){var r=e[n];if(null!==r){switch(typeof r){case"function":return;case"object":if("function"!=typeof r.toISOString)return;r=r.toISOString()}t[n]=r}}}),t}var o=e("./stacktrace"),i=e("../lib/utils"),a=function(e,t,n,r){this._opbeatBackend=e,this._config=t,this._logger=n,this._stackFrameService=r};a.prototype.install=function(){window.onerror=function(e,t,n,r,o){var i={eventObject:{msg:e,file:t,line:n,col:r}};this._processError(o,i)}.bind(this)},a.prototype.uninstall=function(){window.onerror=null},a.prototype.processError=function(e,t){return this._processError(e,t)},a.prototype.getExceptionData=function(e,t){var n=t&&t.eventObject||{},a=n.msg,s=n.file,c=n.line,u=n.col,p=e;if(n.msg&&"string"!=typeof n.msg){var l=n.msg;a=l.message,s=s||l.filename,c=c||l.lineno,u=u||l.colno,p=e||l.error}if("Script error."!==a||s){var f=p?r(p):void 0;t&&t.extra&&(f=i.merge({},f,t.extra));var d={message:p?p.message:a,type:p?p.name:null,fileurl:s||null,lineno:c||null,colno:u||null,extra:f};d.type||(d.message&&d.message.indexOf(":")>-1?d.type=d.message.split(":")[0]:d.type="");var h;h=p?o.fromError(p):new Promise(function(e,t){e([{fileName:d.fileurl,lineNumber:d.lineno,columnNumber:d.colno}])});var g=this;return h.then(function(e){return d.stack=e||[],g._stackFrameService.stackInfoToOpbeatException(d).then(function(e){var t=g._stackFrameService.processOpbeatException(e,g._config.get("context.user"),g._config.get("context.extra"));return t})})}},a.prototype._processError=function(e,t){var n=this,r=n.getExceptionData(e,t);if(r)return r.then(function(e){return n._opbeatBackend.sendError(e)})["catch"](function(e){n._logger.warn(e)})},t.exports=a},{"../lib/utils":16,"./stacktrace":12}],11:[function(e,t,n){function r(e,t){this._logger=t,this._config=e}var o=e("../lib/utils"),i=e("./stacktrace"),a=function(e){for(var t=Promise.resolve(),n=[],r=0;r<e.length;++r)n.push(t=t.then(e[r]));return Promise.all(n)};r.prototype.getFramesForCurrent=function(){return i.get().then(function(e){var t=e.map(function(e){return this.buildOpbeatFrame.bind(this,e)}.bind(this)),n=a(t);return n.then(function(e){return e})}.bind(this))},r.prototype.buildOpbeatFrame=function(e){return new Promise(function(t,n){if(!e.fileName&&!e.lineNumber)return t({});if(!e.columnNumber&&!e.lineNumber)return t({});var r=this.cleanFilePath(e.fileName),o=this.filePathToFileName(r);this.isFileInline(r)&&(o="(inline script)");var i={filename:o,lineno:e.lineNumber,colno:e.columnNumber,"function":e.functionName||"<anonymous>",abs_path:e.fileName,in_app:this.isFileInApp(r),debug:[]};t(i)}.bind(this))},r.prototype.stackInfoToOpbeatException=function(e){return new Promise(function(t,n){if(e.stack&&e.stack.length){var r=e.stack.map(function(e){return this.buildOpbeatFrame.bind(this,e)}.bind(this)),o=a(r);o.then(function(n){e.frames=n,e.stack=null,t(e)})}else t(e)}.bind(this))},r.prototype.processOpbeatException=function(e,t,n){var r,i=e.type,a=String(e.message)||"Script error",s=this.cleanFilePath(e.fileurl),c=this.filePathToFileName(s),u=e.frames||[];u&&u.length?u.reverse():c&&u.push({filename:c,lineno:e.lineno});var p={frames:u};if(!c&&u.length){var l=u[u.length-1];c=l.filename?l.filename:"(inline script)"}r=this.isFileInline(s)?"(inline script)":c;var f="";i&&"string"==typeof a&&0!==a.indexOf("Error:")&&(f=i+": ");var d={message:f+a,culprit:r,exception:{type:i,value:a},http:{url:window.location.href},stacktrace:p,user:t||{},level:null,logger:null,machine:null},h=this.getBrowserSpecificMetadata();return d.extra=o.merge({},h,n,e.extra),this._logger.debug("opbeat.exceptions.processOpbeatException",d),d},r.prototype.cleanFilePath=function(e){return e||(e=""),"<anonymous>"===e&&(e=""),e},r.prototype.filePathToFileName=function(e){var t=window.location.origin||window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"");return e.indexOf(t)>-1&&(e=e.replace(t+"/","")),e},r.prototype.isFileInline=function(e){return!!e&&0===window.location.href.indexOf(e)},r.prototype.isFileInApp=function(e){var t=this._config.get("libraryPathPattern");return!RegExp(t).test(e)},r.prototype.getBrowserSpecificMetadata=function(){var e=o.getViewPortInfo(),t={environment:{utcOffset:(new Date).getTimezoneOffset()/-60,browserWidth:e.width,browserHeight:e.height,screenWidth:window.screen.width,screenHeight:window.screen.height,language:navigator.language,userAgent:navigator.userAgent,platform:navigator.platform},page:{referer:document.referrer,host:document.domain,location:window.location.href}};return t},t.exports=r},{"../lib/utils":16,"./stacktrace":12}],12:[function(e,t,n){function r(e){return e.stack||e["opera#sourceloc"]}function o(e){return e.map(function(e){return e.functionName&&(e.functionName=i(e.functionName)),e})}function i(e){var t=e.split("/");return e=t.length>1?["Object",t[t.length-1]].join("."):t[0],e=e.replace(/.<$/gi,".<anonymous>"),e=e.replace(/^Anonymous function$/,"<anonymous>"),t=e.split("."),e=t.length>1?t[t.length-1]:t[0]}var a=e("error-stack-parser"),s=e("stack-generator"),c=e("../lib/utils"),u={filter:function(e){return(e.functionName||"").indexOf("StackTrace$$")===-1&&(e.functionName||"").indexOf("ErrorStackParser$$")===-1&&(e.functionName||"").indexOf("StackGenerator$$")===-1&&(e.functionName||"").indexOf("opbeatFunctionWrapper")===-1&&(e.fileName||"").indexOf("opbeat-angular.js")===-1&&(e.fileName||"").indexOf("opbeat-angular.min.js")===-1&&(e.fileName||"").indexOf("opbeat.js")===-1&&(e.fileName||"").indexOf("opbeat.min.js")===-1}};t.exports={get:function(e){try{throw new Error}catch(t){return r(t)?this.fromError(t,e):this.generateArtificially(e)}},generateArtificially:function(e){e=c.mergeObject(u,e);var t=s.backtrace(e);return"function"==typeof e.filter&&(t=t.filter(e.filter)),t=o(t),Promise.resolve(t)},fromError:function(e,t){return t=c.mergeObject(u,t),new Promise(function(n){var r=a.parse(e);"function"==typeof t.filter&&(r=r.filter(t.filter)),r=o(r),n(Promise.all(r.map(function(e){return new Promise(function(t){t(e)})})))})}}},{"../lib/utils":16,"error-stack-parser":1,"stack-generator":25}],13:[function(e,t,n){t.exports.ServiceFactory=e("./common/serviceFactory"),t.exports.ServiceContainer=e("./performance/serviceContainer"),t.exports.ConfigService=e("./lib/config"),t.exports.TransactionService=e("./performance/transactionService"),t.exports.Subscription=e("./common/subscription"),t.exports.patchUtils=e("./common/patchUtils"),t.exports.patchCommon=e("./common/patchCommon"),t.exports.utils=e("./lib/utils")},{"./common/patchCommon":5,"./common/patchUtils":6,"./common/serviceFactory":8,"./common/subscription":9,"./lib/config":14,"./lib/utils":16,"./performance/serviceContainer":18,"./performance/transactionService":21}],14:[function(e,t,n){function r(){this.config={},this.defaults={opbeatAgentName:"opbeat-js",VERSION:"v3.15.1",apiOrigin:"https://intake.opbeat.com",apiUrlPrefix:"/api/v1",isInstalled:!1,debug:!1,logLevel:"warn",orgId:null,appId:null,angularAppName:null,performance:{browserResponsivenessInterval:500,browserResponsivenessBuffer:3,checkBrowserResponsiveness:!0,enable:!0,enableStackFrames:!1,groupSimilarTraces:!0,similarTraceThreshold:.05,captureInteractions:!1,sendVerboseDebugInfo:!1,includeXHRQueryString:!1,capturePageLoad:!0},ignoreTransactions:[],libraryPathPattern:"(node_modules|bower_components|webpack)",context:{},platform:{}},this._changeSubscription=new a,this.filters=[]}function o(e){var t={},n=/^data\-([\w\-]+)$/;if(e)for(var r=e.attributes,o=0;o<r.length;o++){var a=r[o];if(n.test(a.nodeName)){var s=a.nodeName.match(n)[1];s=i.arrayMap(s.split("-"),function(e,t){return t>0?e.charAt(0).toUpperCase()+e.substring(1):e}).join(""),t[s]=a.value||a.nodeValue}}return t}var i=e("./utils"),a=e("../common/subscription");r.prototype.addFilter=function(e){if("function"!=typeof e)throw new Error("Argument to must be function");this.filters.push(e)},r.prototype.applyFilters=function(e){for(var t=0;t<this.filters.length;t++)if(e=this.filters[t](e),!e)return;return e},r.prototype.init=function(){var e=s();this.setConfig(e)},r.prototype.get=function(e){return i.arrayReduce(e.split("."),function(e,t){return e&&e[t]},this.config)},r.prototype.getEndpointUrl=function(e){var t=this.get("apiOrigin")+this.get("apiUrlPrefix")+"/organizations/"+this.get("orgId")+"/apps/"+this.get("appId")+"/client-side/"+e+"/";return t},r.prototype.set=function(e,t){var n=e.split("."),r=n.length-1,o=this.config;i.arraySome(n,function(e,n){if("undefined"==typeof e)return!0;if(n===r)o[e]=t;else{var i=o[e]||{};o[e]=i,o=i}})},r.prototype.getAgentName=function(){var e=this.config.VERSION;return(!e||e.indexOf("%%VERSION")>=0)&&(e="dev"),this.get("opbeatAgentName")+"/"+e},r.prototype.setConfig=function(e){e=e||{},this.config=i.merge({},this.defaults,this.config,e),this._changeSubscription.applyAll(this,[this.config])},r.prototype.subscribeToChange=function(e){return this._changeSubscription.subscribe(e)},r.prototype.isValid=function(){var e=["appId","orgId"],t=i.arrayMap(e,i.functionBind(function(e){return null===this.config[e]||void 0===this.config[e]},this));return i.arrayIndexOf(t,!0)===-1};var s=function(){var e=i.getCurrentScript(),t=o(e);return t};r.prototype.VERSION="v3.15.1",r.prototype.isPlatformSupported=function(){return"function"==typeof Array.prototype.forEach&&"function"==typeof JSON.stringify&&"function"==typeof Function.bind&&window.performance&&"function"==typeof window.performance.now&&i.isCORSSupported()},t.exports=r},{"../common/subscription":9,"./utils":16}],15:[function(e,t,n){function r(e,t){this.configService=e,this.logger=t}function o(e,t,n,r,o){return new Promise(function(i,a){var s=new window.XMLHttpRequest;if(s.open(t,e,!0),s.timeout=1e4,"JSON"===n&&s.setRequestHeader("Content-Type","application/json"),o)for(var c in o)o.hasOwnProperty(c)&&s.setRequestHeader(c.toLowerCase(),o[c]);s.onreadystatechange=function(t){if(4===s.readyState){var n=s.status;if(0===n||n>399&&n<600){var r=new Error(e+" HTTP status: "+n);r.xhr=s,a(r)}else i(s.responseText)}},s.onerror=function(e){a(e)},"JSON"===n&&(r=JSON.stringify(r)),s.send(r)})}r.prototype.sendError=function(e,t){return this._sendToOpbeat("errors",e,t)},r.prototype.sendTransaction=function(e,t){return this._sendToOpbeat("transactions",e,t)},r.prototype._sendToOpbeat=function(e,t,n){var r=this;this.logger.debug("opbeat.transport.sendToOpbeat",t);var i=this.configService.getEndpointUrl(e);return o(i,"POST","JSON",t,n).then(function(e){return r.logger.debug("opbeat.transport.makeRequest.success"),e},function(e){return r.logger.debug("opbeat.transport.makeRequest.error",e),Promise.reject(e)})},t.exports=r},{}],16:[function(e,t,n){function r(e){return null!==e&&"object"==typeof e}function o(e){return"function"==typeof e}var i=[].slice;t.exports={getViewPortInfo:function(){var e=document.documentElement,t=document.getElementsByTagName("body")[0],n=window.innerWidth||e.clientWidth||t.clientWidth,r=window.innerHeight||e.clientHeight||t.clientHeight;return{width:n,height:r}},mergeObject:function(e,t){var n,r={};for(n in e)r[n]=e[n];for(n in t)r[n]=t[n];return r},extend:function(e){return this.baseExtend(e,i.call(arguments,1),!1)},merge:function(e){return this.baseExtend(e,i.call(arguments,1),!0)},baseExtend:function a(e,t,n){for(var i=0,s=t.length;i<s;++i){var c=t[i];if(r(c)||o(c))for(var u=Object.keys(c),p=0,l=u.length;p<l;p++){var f=u[p],d=c[f];n&&r(d)?(r(e[f])||(e[f]=Array.isArray(d)?[]:{}),a(e[f],[d],!1)):e[f]=d}}return e},isObject:r,isFunction:o,arrayReduce:function(e,t,n){if(null==e)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof t)throw new TypeError(t+" is not a function");var r=Object(e),o=r.length>>>0,i=0;if(!n){for(;i<o&&!(i in r);)i++;if(i>=o)throw new TypeError("Reduce of empty array with no initial value");n=r[i++]}for(;i<o;i++)i in r&&(n=t(n,r[i],i,r));return n},arraySome:function(e,t,n){if(null==e)throw new TypeError("Array.prototype.some called on null or undefined");if("function"!=typeof t)throw new TypeError;var r=Object(e),o=r.length>>>0;n||(n=void 0);for(var i=0;i<o;i++)if(i in r&&t.call(n,r[i],i,r))return!0;return!1},arrayMap:function(e,t,n){var r,o,i;if(null==this)throw new TypeError(" this is null or not defined");var a=Object(e),s=a.length>>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(arguments.length>1&&(r=n),o=new Array(s),i=0;i<s;){var c,u;i in a&&(c=a[i],u=t.call(r,c,i,a),o[i]=u),i++}return o},arrayIndexOf:function(e,t,n){var r;if(null==e)throw new TypeError('"arrayVal" is null or not defined');var o=Object(e),i=o.length>>>0;if(0===i)return-1;var a=+n||0;if(Math.abs(a)===1/0&&(a=0),a>=i)return-1;for(r=Math.max(a>=0?a:i-Math.abs(a),0);r<i;){if(r in o&&o[r]===t)return r;r++}return-1},functionBind:function(e,t){var n=Array.prototype.slice.call(arguments,2),r=function(){},o=function(){return e.apply(t,n.concat(Array.prototype.slice.call(arguments)))};return r.prototype=e.prototype,o.prototype=new r,o},getRandomInt:function(e,t){return Math.floor(Math.random()*(t-e+1))+e},isUndefined:function(e){return"undefined"==typeof e},isCORSSupported:function(){var e=new window.XMLHttpRequest;return"withCredentials"in e},getOpbeatScript:function(){if("undefined"!=typeof document)for(var e=document.getElementsByTagName("script"),t=0,n=e.length;t<n;t++){var r=e[t];if(r.src.indexOf("opbeat")>0)return r}},getCurrentScript:function(){if("undefined"!=typeof document){var e=document.currentScript;return e?e:this.getOpbeatScript()}},generateUuid:function(){function e(e){var t=(Math.random().toString(16)+"000000000").substr(2,8);return e?"-"+t.substr(0,4)+"-"+t.substr(4,4):t}return e()+e(!0)+e(!0)+e()},parseUrl:function(e){var t=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,n=t.exec(e),r=n[1]||"",o=n[3]||"",i=n[5]?"#"+n[5]:"",a="";e.indexOf("://")>-1&&(a=e.split("://")[0]+":");for(var s={},c=o.split("&"),u=0,p=c.length;u<p;u++){var l=c[u];if(""!==l&&"undefined"!=typeof l&&null!==l){var f=c[u].split("="),d=f.shift();s[d]=f.join("=")}}return{protocol:a,path:r,queryString:o,queryStringParsed:s,hash:i}}}},{}],17:[function(e,t,n){function r(e,t){var n=t.duration();return n<s&&n>0&&t._start<=e._rootTrace._end&&t._end<=e._rootTrace._end}var o=e("./trace"),i=[["domainLookupStart","domainLookupEnd","DNS lookup"],["connectStart","connectEnd","Connect"],["requestStart","responseStart","Sending and waiting for first byte"],["responseStart","responseEnd","Downloading"],["domLoading","domInteractive","Fetching, parsing and sync. execution"],["domContentLoadedEventStart","domContentLoadedEventEnd",'"DOMContentLoaded" event handling'],["loadEventStart","loadEventEnd",'"load" event handling']],a=["navigationStart","unloadEventStart","unloadEventEnd","redirectStart","redirectEnd","fetchStart","domainLookupStart","domainLookupEnd","connectStart","connectEnd","secureConnectionStart","requestStart","responseStart","responseEnd","domLoading","domInteractive","domContentLoadedEventStart","domContentLoadedEventEnd","domComplete","loadEventStart","loadEventEnd"],s=3e5;t.exports=function(e){if(e.isHardNavigation&&window.performance&&window.performance.timing){var t=window.performance.timing.fetchStart,n=window.performance.timing;e._rootTrace._start=e._start=0,e.type="page-load";for(var s=0;s<i.length;s++){var c=n[i[s][0]],u=n[i[s][1]];if(c&&u&&u-c!==0){var p=new o(e,i[s][2],"hard-navigation.browser-timing");p._start=n[i[s][0]]-t,p.ended=!0,p.setParent(e._rootTrace),p.end(),p._end=n[i[s][1]]-t,p.calcDiff(),r(e,p)||e.traces.splice(e.traces.indexOf(p),1)}}if(window.performance.getEntriesByType){var l=window.performance.getEntriesByType("resource"),f=e.traces.filter(function(e){return e.type.indexOf("ext.HttpRequest")>-1}).map(function(e){
return e.signature.split(" ")[1]});for(s=0;s<l.length;s++){var d=l[s];if(!d.initiatorType||"xmlhttprequest"!==d.initiatorType)if("css"!==d.initiatorType&&"img"!==d.initiatorType&&"script"!==d.initiatorType&&"link"!==d.initiatorType){for(var h=!1,g=0;g<f.length;g++){var v=d.name.lastIndexOf(f[g]);if(v>-1&&v===d.name.length-f[g].length){h=!0;break}}if(h)continue}else{var m="resource";d.initiatorType&&(m+="."+d.initiatorType),p=new o(e,d.name,m),p._start=d.startTime,p.ended=!0,p.setParent(e._rootTrace),p.end(),p._end=d.responseEnd,p.calcDiff(),r(e,p)||e.traces.splice(e.traces.indexOf(p),1)}}}e._adjustStartToEarliestTrace(),e._adjustEndToLatestTrace();var y={timeToComplete:e._rootTrace._end};a.forEach(function(e){var r=n[e];r&&(y[e]=r-t)}),e.addMetrics(y)}return 0}},{"./trace":19}],18:[function(e,t,n){function r(e){this.serviceFactory=e,this.services={},this.services.configService=this.serviceFactory.getConfigService(),this.services.logger=this.serviceFactory.getLogger(),this.services.zoneService=this.createZoneService()}var o=e("./transactionService"),i=e("./zoneService"),a=e("../lib/utils");r.prototype.initialize=function(){var e=this.services.configService,t=this.services.logger;this.services.zoneService.initialize(window.Zone.current);var n=this.services.opbeatBackend=this.serviceFactory.getOpbeatBackend(),r=this.services.transactionService=new o(this.services.zoneService,this.services.logger,e,n);if(r.scheduleTransactionSend(),a.isUndefined(window.opbeatApi)&&(window.opbeatApi={}),window.opbeatApi.subscribeToTransactions=r.subscribe.bind(r),!a.isUndefined(window.opbeatApi.onload)){var i=window.opbeatApi.onload;i.forEach(function(e){try{e()}catch(n){t.error(n)}})}},r.prototype.createZoneService=function(){var e=this.services.logger;return new i(e,this.services.configService)},t.exports=r},{"../lib/utils":16,"./transactionService":21,"./zoneService":22}],19:[function(e,t,n){function r(e,t,n,r){this.transaction=e,this.signature=t,this.type=n,this.ended=!1,this._parent=null,this._diff=null,this._end=null,this._start=window.performance.now(),(o.isUndefined(r)||null==r)&&(r={})}var o=e("../lib/utils");r.prototype.calcDiff=function(){this._end&&this._start&&(this._diff=this._end-this._start)},r.prototype.end=function(){this._end=window.performance.now(),this.calcDiff(),this.ended=!0,o.isUndefined(this.transaction)||"function"!=typeof this.transaction._onTraceEnd||this.transaction._onTraceEnd(this)},r.prototype.duration=function(){return o.isUndefined(this.ended)||o.isUndefined(this._start)?null:(this._diff=this._end-this._start,parseFloat(this._diff))},r.prototype.startTime=function(){return this.ended&&this.transaction.ended?this._start:null},r.prototype.ancestors=function(){var e=this.parent();return e?[e.signature]:[]},r.prototype.parent=function(){return this._parent},r.prototype.setParent=function(e){this._parent=e},r.prototype.getFingerprint=function(){for(var e=[this.transaction.name,this.signature,this.type],t=this._parent;t;)e.push(t.signature),t=t._parent;return e.join("-")},r.prototype.getTraceStackFrames=function(e){e()},t.exports=r},{"../lib/utils":16}],20:[function(e,t,n){function r(e){for(var t=null,n=0;n<e.length;n++){var r=e[n];r.type&&r.type.indexOf("ext")===-1&&"transaction"!==r.type&&(!t||t._end<r._end)&&(t=r)}return t}function o(e){var t=null;return e.forEach(function(e){t||(t=e),t&&t._start>e._start&&(t=e)}),t}var i=e("./trace"),a=e("../lib/utils"),s=function(e,t,n,r){this.metadata={},this.name=e,this.type=t,this.ended=!1,this._markDoneAfterLastTrace=!1,this._isDone=!1,this._options=n,this._logger=r,"undefined"==typeof n&&(this._options={}),this.contextInfo={_debug:{},_metrics:{}},this._options.sendVerboseDebugInfo&&(this.contextInfo._debug.log=[],this.debugLog("Transaction",e,t)),this.traces=[],this._activeTraces={},this._scheduledTasks={},this.events={},this.doneCallback=function(){},this._rootTrace=this.startTrace("transaction","transaction",{enableStackFrames:!1}),this._startStamp=new Date,this._start=this._rootTrace._start,this.duration=this._rootTrace.duration.bind(this._rootTrace),this.nextId=0,this.isHardNavigation=!1};s.prototype.debugLog=function(){if(this._options.sendVerboseDebugInfo){var e=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);e.unshift(Date.now().toString());var t=e.join(" - ");this.contextInfo._debug.log.push(t),this._logger&&this._logger.debug(t)}},s.prototype.addContextInfo=function(e){a.merge(this.contextInfo,e)},s.prototype.setDebugData=function(e,t){this.contextInfo._debug[e]=t},s.prototype.addMetrics=function(e){this.contextInfo._metrics=a.merge(this.contextInfo._metrics,e)},s.prototype.redefine=function(e,t,n){this.debugLog("redefine",e,t),this.name=e,this.type=t,this._options=n},s.prototype.startTrace=function(e,t,n){this.debugLog("startTrace",e,t);var r="undefined"==typeof n?{}:n;r.enableStackFrames=this._options.enableStackFrames===!0&&r.enableStackFrames!==!1;var o=new i(this,e,t,r);return o.traceId=this.nextId,this.nextId++,this._rootTrace&&(o.setParent(this._rootTrace),this._activeTraces[o.traceId]=o),o},s.prototype.recordEvent=function(e){var t=this.events[e.name];a.isUndefined(t)?(t={name:e.name,start:e.start,end:e.end,time:e.end-e.start,count:0},this.events[t.name]=t):(t.time+=e.end-e.start,t.count++,t.end=e.end)},s.prototype.isFinished=function(){var e=Object.keys(this._scheduledTasks);return this.debugLog("isFinished scheduledTasks",e),0===e.length},s.prototype.detectFinish=function(){this.isFinished()&&this.end()},s.prototype.end=function(){this.ended||(this.debugLog("end"),this.ended=!0,this.addContextInfo({url:{location:window.location.href}}),this._rootTrace.end(),this.isFinished()===!0&&this._finish())},s.prototype.addTask=function(e){this.debugLog("addTask",e),this._scheduledTasks[e]=e},s.prototype.removeTask=function(e){this.debugLog("removeTask",e),this.setDebugData("lastRemovedTask",e),delete this._scheduledTasks[e]},s.prototype.addEndedTraces=function(e){this.traces=this.traces.concat(e)},s.prototype._onTraceEnd=function(e){this.traces.push(e),e._scheduledTasks=Object.keys(this._scheduledTasks),delete this._activeTraces[e.traceId]},s.prototype._finish=function(){if(this._alreadFinished!==!0){this._alreadFinished=!0;for(var e in this.events){var t=this.events[e],n=new i(this,e,e,this._options);n.ended=!0,n._start=t.start,n._diff=t.time,n._end=t.end,n.setParent(this._rootTrace),this.traces.push(n)}this._adjustStartToEarliestTrace(),this._adjustEndToLatestTrace(),this.doneCallback(this)}},s.prototype._adjustEndToLatestTrace=function(){var e=r(this.traces);if(e){this._rootTrace._end=e._end,this._rootTrace.calcDiff();for(var t=0;t<this.traces.length;t++){var n=this.traces[t];n._end>this._rootTrace._end&&(n._end=this._rootTrace._end,n.calcDiff(),n.type=n.type+".truncated")}}},s.prototype._adjustStartToEarliestTrace=function(){var e=o(this.traces);e&&(this._rootTrace._start=e._start,this._rootTrace.calcDiff(),this._start=this._rootTrace._start)},t.exports=s},{"../lib/utils":16,"./trace":19}],21:[function(e,t,n){function r(e,t,n,r){function o(e){"XMLHttpRequest.send"===e.source&&e.trace&&!e.trace.ended&&e.trace.end(),f.logInTransaction("Executing",e.taskId)}function s(e){if("XMLHttpRequest.send"===e.source){var t=e.XHR.url,n=e.XHR.method+" ";if(f._config.get("performance.includeXHRQueryString"))n+=t;else{var r=i.parseUrl(t);n+=r.path}var o=f.startTrace(n,"ext.HttpRequest",{enableStackFrames:!1});e.trace=o}else"interaction"===e.type&&"function"==typeof d.interactionStarted&&d.interactionStarted(e);f.addTask(e.taskId)}function c(e){"XMLHttpRequest.send"===e.source&&e.trace&&!e.trace.ended&&(e.trace.end(),f.logInTransaction("xhr late ending"),f.setDebugDataOnTransaction("xhrLateEnding",!0)),f.removeTask(e.taskId),f.detectFinish()}function u(e){f.removeTask(e.taskId),f.detectFinish()}function p(e){t.trace("onInvokeEnd","source:",e.source,"type:",e.type),f.detectFinish()}function l(e){t.trace("onInvokeStart","source:",e.source,"type:",e.type)}this._config=n,"undefined"==typeof n&&t.debug("TransactionService: config is not provided"),this._queue=[],this._logger=t,this._opbeatBackend=r,this._zoneService=e,this.nextAutoTaskId=1,this.taskMap={},this.metrics={},this._queue=[],this.initialPageLoadName=void 0,this._subscription=new a;var f=this;this._alreadyCapturedPageLoad=!1,e.spec.onBeforeInvokeTask=o;var d=this;e.spec.onScheduleTask=s,e.spec.onInvokeTask=c,e.spec.onCancelTask=u,e.spec.onInvokeEnd=p,e.spec.onInvokeStart=l}var o=e("./transaction"),i=e("../lib/utils"),a=e("../common/subscription"),s=e("./captureHardNavigation");r.prototype.createTransaction=function(e,t,n){var r=n;if(i.isUndefined(r)&&(r=this._config.get("performance")),r.enable&&this._zoneService.isOpbeatZone()){var a=new o(e,t,r,this._logger);return a.setDebugData("zone",this._zoneService.getCurrentZone().name),this._zoneService.set("transaction",a),r.checkBrowserResponsiveness&&this.startCounter(a),a}},r.prototype.createZoneTransaction=function(){return this.createTransaction("ZoneTransaction","transaction")},r.prototype.getCurrentTransaction=function(){var e=this._config.get("performance");if(e.enable&&this._zoneService.isOpbeatZone()){var t=this._zoneService.get("transaction");return i.isUndefined(t)||t.ended?this.createZoneTransaction():t}},r.prototype.startCounter=function(e){e.browserResponsivenessCounter=0;var t=this._config.get("performance.browserResponsivenessInterval");return"undefined"==typeof t?void this._logger.debug("browserResponsivenessInterval is undefined!"):void this._zoneService.runOuter(function(){var n=setInterval(function(){e.ended?window.clearInterval(n):e.browserResponsivenessCounter++},t)})},r.prototype.sendPageLoadMetrics=function(e){var t,n=this,r=this._config.get("performance");t=this._zoneService.getFromOpbeatZone("transaction");var i=e||this.initialPageLoadName||window.location.pathname;return t&&"ZoneTransaction"===t.name?t.redefine(i,"page-load",r):t=new o(i,"page-load",r,this._logger),t.isHardNavigation=!0,t.doneCallback=function(){n.applyAsync(function(){var e=n.capturePageLoadMetrics(t);e&&(n.add(t),n._subscription.applyAll(n,[t]))})},t.detectFinish(),t},r.prototype.capturePageLoadMetrics=function(e){var t=this,n=t._config.get("performance.capturePageLoad");if(n&&!t._alreadyCapturedPageLoad&&e.isHardNavigation)return e.addMetrics(t.metrics),s(e),t._alreadyCapturedPageLoad=!0,!0},r.prototype.startTransaction=function(e,t){var n=this,r=this._config.get("performance");if("interaction"!==t||r.captureInteractions){var o=this.getCurrentTransaction();if(o)return"ZoneTransaction"!==o.name?(this.logInTransaction("Ending early to start a new transaction:",e,t),this._logger.debug("Ending old transaction",o),o.end(),o=this.createTransaction(e,t)):o.redefine(e,t,r),this._logger.debug("TransactionService.startTransaction",o),o.doneCallback=function(){n.applyAsync(function(){n._logger.debug("TransactionService transaction finished",o),o.traces.length>1&&!n.shouldIgnoreTransaction(o.name)&&(n.capturePageLoadMetrics(o),n.add(o),n._subscription.applyAll(n,[o]))})},o}},r.prototype.applyAsync=function(e,t,n){return this._zoneService.runOuter(function(){return Promise.resolve().then(function(){return e.apply(t,n)})})},r.prototype.shouldIgnoreTransaction=function(e){for(var t=this._config.get("ignoreTransactions"),n=0;n<t.length;n++){var r=t[n];if("function"==typeof r.test){if(r.test(e))return!0}else if(r===e)return!0}return!1},r.prototype.startTrace=function(e,t,n){var r=this.getCurrentTransaction();if(r){this._logger.debug("TransactionService.startTrace",e,t);var o=r.startTrace(e,t,n);return o}},r.prototype.add=function(e){var t=this._config.get("performance");t.enable&&(this._queue.push(e),this._logger.debug("TransactionService.add",e))},r.prototype.getTransactions=function(){return this._queue},r.prototype.clearTransactions=function(){this._queue=[]},r.prototype.subscribe=function(e){return this._subscription.subscribe(e)},r.prototype.addTask=function(e){var t=this.getCurrentTransaction();return t&&("undefined"==typeof e&&(e="autoId"+this.nextAutoTaskId++),t.addTask(e),this._logger.debug("TransactionService.addTask",e)),e},r.prototype.removeTask=function(e){var t=this._zoneService.get("transaction");i.isUndefined(t)||t.ended||(t.removeTask(e),this._logger.debug("TransactionService.removeTask",e))},r.prototype.logInTransaction=function(){var e=this._zoneService.get("transaction");i.isUndefined(e)||e.ended||e.debugLog.apply(e,arguments)},r.prototype.setDebugDataOnTransaction=function(e,t){var n=this._zoneService.get("transaction");i.isUndefined(n)||n.ended||n.setDebugData(e,t)},r.prototype.detectFinish=function(){var e=this._zoneService.get("transaction");i.isUndefined(e)||e.ended||(e.detectFinish(),this._logger.debug("TransactionService.detectFinish"))},r.prototype.scheduleTransactionSend=function(){var e=this._logger,t=this._opbeatBackend,n=this;setInterval(function(){var r=n.getTransactions();if(0!==r.length){e.debug("Sending Transactions to opbeat.",r.length);var o=t.sendTransactions(r);o&&o.then(void 0,function(){e.debug("Failed sending transactions!")}),n.clearTransactions()}},5e3)},t.exports=r},{"../common/subscription":9,"../lib/utils":16,"./captureHardNavigation":17,"./transaction":20}],22:[function(e,t,n){function r(e,t){function n(){}this.events=new o;var r=0,i=this.spec={onScheduleTask:n,onBeforeInvokeTask:n,onInvokeTask:n,onCancelTask:n,onHandleError:n,onInvokeStart:n,onInvokeEnd:n};this.zoneConfig={name:"opbeatRootZone",onScheduleTask:function(t,n,o,l){if("eventTask"===l.type&&"opbeatImmediatelyFiringEvent"===l.data.eventName)return l.data.handler(l.data),l;var f=l.data&&l.data.target;if(f&&"undefined"==typeof l.data.target[p]&&(l.data.target[p]={registeredEventListeners:{}}),e.trace("zoneservice.onScheduleTask",l.source," type:",l.type),"macroTask"===l.type){e.trace("Zone: ",o.name);var d=r++,h={taskId:l.source+d,source:l.source,type:l.type};"setTimeout"===l.source?0!==l.data.args[1]&&"undefined"!=typeof l.data.args[1]||(l[a]=h,i.onScheduleTask(h)):l.source===u&&(h.XHR={resolved:!1,send:!1,url:l.data.target[s],method:l.data.target[c]},l.data.target.addEventListener("opbeatImmediatelyFiringEvent",function(e){"undefined"!=typeof e.target[p]?l.data.target[p]=e.target[p]:l.data.target[p]=e.target[p]={registeredEventListeners:{}}}),l.data.target[p].task=h,l.data.target[p].typeName="XMLHttpRequest",i.onScheduleTask(h))}else"eventTask"!==l.type||!f||"readystatechange"!==l.data.eventName&&"load"!==l.data.eventName?"microTask"===l.type&&"Promise.then"===l.source&&(d=r++,h={taskId:l.source+d,source:l.source,type:l.type},l[a]=h,i.onScheduleTask(h)):l.data.target[p].registeredEventListeners[l.data.eventName]={resolved:!1};var g=t.scheduleTask(o,l);return g},onInvoke:function(e,t,n,o,a,s,c){var u=r++,p={taskId:c+u,source:c,type:"invoke"};i.onInvokeStart(p);var l=o.apply(a,s);return i.onInvokeEnd(p),l},onInvokeTask:function(t,n,o,s,c,l){i.onInvokeStart({source:s.source,type:s.type}),e.trace("zoneservice.onInvokeTask",s.source," type:",s.type);var d,h=s.data&&s.data.target;if(h&&"XMLHttpRequest"===s.data.target[p].typeName){var g=s.data.target[p];e.trace("opbeatData",g);var v=g.task;v&&"readystatechange"===s.data.eventName&&s.data.target.readyState===s.data.target.DONE?(g.registeredEventListeners.readystatechange.resolved=!0,i.onBeforeInvokeTask(v)):v&&"load"===s.data.eventName&&"load"in g.registeredEventListeners?g.registeredEventListeners.load.resolved=!0:v&&s.source===u&&(v.XHR.resolved=!0),d=t.invokeTask(o,s,c,l),!v||g.registeredEventListeners.load&&!g.registeredEventListeners.load.resolved||g.registeredEventListeners.readystatechange&&!g.registeredEventListeners.readystatechange.resolved||!v.XHR.resolved||i.onInvokeTask(v)}else if(!s[a]||"setTimeout"!==s.source&&"Promise.then"!==s.source)if("eventTask"===s.type&&h&&s.data.eventName in f){var m=r++;v={taskId:s.source+m,source:s.source,type:"interaction",applyArgs:l},i.onScheduleTask(v),d=t.invokeTask(o,s,c,l),i.onInvokeTask(v)}else d=t.invokeTask(o,s,c,l);else i.onBeforeInvokeTask(s[a]),d=t.invokeTask(o,s,c,l),i.onInvokeTask(s[a]);return i.onInvokeEnd({source:s.source,type:s.type}),d},onCancelTask:function(e,t,n,r){var o;return"macroTask"===r.type&&(r.source===u?(o=r.data.target[p].task,i.onCancelTask(o)):r[a]&&"setTimeout"===r.source&&(o=r[a],i.onCancelTask(o))),e.cancelTask(n,r)}}}var o=e("../common/subscription"),i=e("../common/patchUtils"),a=i.opbeatSymbol("taskData"),s=i.opbeatSymbol("url"),c=i.opbeatSymbol("method"),u="XMLHttpRequest.send",p=i.opbeatSymbol("opbeatData"),l=["click","contextmenu","dblclick","mousedown","keydown","keypress","keyup"],f={};l.forEach(function(e){f[e]=1}),r.prototype.initialize=function(e){this.outer=e,this.zone=e.fork(this.zoneConfig)},r.prototype.set=function(e,t){window.Zone.current._properties[e]=t},r.prototype.get=function(e){return window.Zone.current.get(e)},r.prototype.getFromOpbeatZone=function(e){return this.zone.get(e)},r.prototype.setOnOpbeatZone=function(e,t){this.zone._properties[e]=t},r.prototype.getCurrentZone=function(){return window.Zone.current},r.prototype.isOpbeatZone=function(){return this.zone.name===window.Zone.current.name},r.prototype.runOuter=function(e,t,n){return this.outer?this.outer.run(e,t,n):e.apply(t,n)},r.prototype.runInOpbeatZone=function(e,t,n,r){return this.zone.run(e,t,n,r||"runInOpbeatZone:"+e.name)},t.exports=r},{"../common/patchUtils":6,"../common/subscription":9}],23:[function(e,t,n){(function(e,r){!function(e,o){"object"==typeof n&&"undefined"!=typeof t?o():"function"==typeof r&&r.amd?r(o):o()}(this,function(){"use strict";function t(e,t){for(var n=e.length-1;n>=0;n--)"function"==typeof e[n]&&(e[n]=Zone.current.wrap(e[n],t+"_"+n));return e}function n(e,n){for(var r=e.constructor.name,o=function(o){var i=n[o],a=e[i];a&&(e[i]=function(e){var n=function(){return e.apply(this,t(arguments,r+"."+i))};return g(n,e),n}(a))},i=0;i<n.length;i++)o(i)}function r(e,t,n){var r=Object.getOwnPropertyDescriptor(e,t);if(!r&&n){var o=Object.getOwnPropertyDescriptor(n,t);o&&(r={enumerable:!0,configurable:!0})}if(r&&r.configurable){delete r.writable,delete r.value;var i=r.get,a=t.substr(2),s=C("_"+t);r.set=function(t){var n=this;if(n||e!==I||(n=I),n){var r=n[s];if(r&&n.removeEventListener(a,r),"function"==typeof t){var o=function(e){var n=t.apply(this,arguments);return void 0==n||n||e.preventDefault(),n};n[s]=o,n.addEventListener(a,o,!1)}else n[s]=null}},r.get=function(){var n=this;if(n||e!==I||(n=I),!n)return null;if(n.hasOwnProperty(s))return n[s];if(i){var o=i&&i.apply(this);if(o)return r.set.apply(this,[o]),"function"==typeof n.removeAttribute&&n.removeAttribute(t),o}return null},Object.defineProperty(e,t,r)}}function o(e,t,n){if(t)for(var o=0;o<t.length;o++)r(e,"on"+t[o],n);else{var i=[];for(var a in e)"on"==a.substr(0,2)&&i.push(a);for(var s=0;s<i.length;s++)r(e,i[s],n)}}function i(e,t){var n="boolean"==typeof e?e:"object"==typeof e&&(e&&e.capture),r="boolean"==typeof t?t:"object"==typeof t&&(t&&t.capture);return!!n==!!r}function a(e,t,n,r,o){var a=e[N];if(a)for(var s=0;s<a.length;s++){var c=a[s],u=c.data,p=u.handler;if((u.handler===t||p.listener===t)&&i(u.options,r)&&u.eventName===n)return o&&a.splice(s,1),c}return null}function s(e,t,n){var r=e[N];r||(r=e[N]=[]),n?r.unshift(t):r.push(t)}function c(e,t,n,r,o,i){function c(e){var t=e.data;return s(t.target,e,o),t.invokeAddFunc(p,e)}function u(e){var t=e.data;return a(t.target,e.invoke,t.eventName,t.options,!0),t.invokeRemoveFunc(l,e)}void 0===n&&(n=!0),void 0===r&&(r=!1),void 0===o&&(o=!1),void 0===i&&(i=R);var p=C(e),l=C(t),f=!n&&void 0;return function(t,n){var o=i(t,n);o.options=o.options||f;var s=null;"function"==typeof o.handler?s=o.handler:o.handler&&o.handler.handleEvent&&(s=function(e){return o.handler.handleEvent(e)});var l=!1;try{l=o.handler&&"[object FunctionWrapper]"===o.handler.toString()}catch(d){return o.crossContext=!0,o.invokeAddFunc(p,o.handler)}if(!s||l)return o.invokeAddFunc(p,o.handler);if(!r){var h=a(o.target,o.handler,o.eventName,o.options,!1);if(h)return o.invokeAddFunc(p,h)}var g=Zone.current,v=o.target.constructor.name+"."+e+":"+o.eventName;g.scheduleEventTask(v,s,o,c,u)}}function u(e,t,n){void 0===t&&(t=!0),void 0===n&&(n=R);var r=C(e),o=!t&&void 0;return function(e,t){var i=n(e,t);i.options=i.options||o;var s=null;"function"==typeof i.handler?s=i.handler:i.handler&&i.handler.handleEvent&&(s=function(e){return i.handler.handleEvent(e)});var c=!1;try{c=i.handler&&"[object FunctionWrapper]"===i.handler.toString()}catch(u){return i.crossContext=!0,i.invokeRemoveFunc(r,i.handler)}if(!s||c)return i.invokeRemoveFunc(r,i.handler);var p=a(i.target,i.handler,i.eventName,i.options,!0);p?p.zone.cancelTask(p):i.invokeRemoveFunc(r,i.handler)}}function p(e,t,n,r){return void 0===t&&(t=D),void 0===n&&(n=z),void 0===r&&(r=R),!(!e||!e[t])&&(f(e,t,function(){return c(t,n,!0,!1,!1,r)}),f(e,n,function(){return u(n,!0,r)}),!0)}function l(e){var n=I[e];if(n){I[C(e)]=n,I[e]=function(){var r=t(arguments,e);switch(r.length){case 0:this[Z]=new n;break;case 1:this[Z]=new n(r[0]);break;case 2:this[Z]=new n(r[0],r[1]);break;case 3:this[Z]=new n(r[0],r[1],r[2]);break;case 4:this[Z]=new n(r[0],r[1],r[2],r[3]);break;default:throw new Error("Arg list too long.")}},g(I[e],n);var r,o=new n(function(){});for(r in o)"XMLHttpRequest"===e&&"responseBlob"===r||!function(t){"function"==typeof o[t]?I[e].prototype[t]=function(){return this[Z][t].apply(this[Z],arguments)}:Object.defineProperty(I[e].prototype,t,{set:function(n){"function"==typeof n?(this[Z][t]=Zone.current.wrap(n,e+"."+t),g(this[Z][t],n)):this[Z][t]=n},get:function(){return this[Z][t]}})}(r);for(r in n)"prototype"!==r&&n.hasOwnProperty(r)&&(I[e][r]=n[r])}}function f(e,t,n){for(var r=e;r&&!r.hasOwnProperty(t);)r=Object.getPrototypeOf(r);!r&&e[t]&&(r=e);var o,i=C(t);if(r&&!(o=r[i])){o=r[i]=r[t];var a=n(o,i,t);r[t]=function(){return a(this,arguments)},g(r[t],o)}return o}function d(e,t,n){function r(e){var t=e.data;return t.args[t.callbackIndex]=function(){e.invoke.apply(this,arguments)},o.apply(t.target,t.args),e}var o=null;o=f(e,t,function(e){return function(t,o){var i=n(t,o);if(i.callbackIndex>=0&&"function"==typeof o[i.callbackIndex]){var a=Zone.current.scheduleMacroTask(i.name,o[i.callbackIndex],i,r,null);return a}return e.apply(t,o)}})}function h(e,t){var n=e[C("eventTasks")],r=[];if(n)for(var o=0;o<n.length;o++){var i=n[o],a=i.data,s=a&&a.eventName;s===t&&r.push(i)}return r}function g(e,t){e[C("OriginalDelegate")]=t}function v(e,t,n,r){function o(t){function n(){try{t.invoke.apply(this,arguments)}finally{"number"==typeof r.handleId&&delete c[r.handleId]}}var r=t.data;return r.args[0]=n,r.handleId=a.apply(e,r.args),"number"==typeof r.handleId&&(c[r.handleId]=t),t}function i(e){return"number"==typeof e.data.handleId&&delete c[e.data.handleId],s(e.data.handleId)}var a=null,s=null;t+=r,n+=r;var c={};a=f(e,t,function(n){return function(a,s){if("function"==typeof s[0]){var c=Zone.current,u={handleId:null,isPeriodic:"Interval"===r,delay:"Timeout"===r||"Interval"===r?s[1]||0:null,args:s},p=c.scheduleMacroTask(t,s[0],u,o,i);if(!p)return p;var l=p.data.handleId;return l&&l.ref&&l.unref&&"function"==typeof l.ref&&"function"==typeof l.unref&&(p.ref=l.ref.bind(l),p.unref=l.unref.bind(l)),p}return n.apply(e,s)}}),s=f(e,n,function(t){return function(n,r){var o="number"==typeof r[0]?c[r[0]]:r[0];o&&"string"==typeof o.type?"notScheduled"!==o.state&&(o.cancelFn&&o.data.isPeriodic||0===o.runCount)&&o.zone.cancelTask(o):t.apply(e,r)}})}function m(){Object.defineProperty=function(e,t,n){if(b(e,t))throw new TypeError("Cannot assign to read only property '"+t+"' of "+e);var r=n.configurable;return"prototype"!==t&&(n=k(e,t,n)),w(e,t,n,r)},Object.defineProperties=function(e,t){return Object.keys(t).forEach(function(n){Object.defineProperty(e,n,t[n])}),e},Object.create=function(e,t){return"object"!=typeof t||Object.isFrozen(t)||Object.keys(t).forEach(function(n){t[n]=k(e,n,t[n])}),M(e,t)},Object.getOwnPropertyDescriptor=function(e,t){var n=H(e,t);return b(e,t)&&(n.configurable=!1),n}}function y(e,t,n){var r=n.configurable;return n=k(e,t,n),w(e,t,n,r)}function b(e,t){return e&&e[B]&&e[B][t]}function k(e,t,n){return n.configurable=!0,n.configurable||(e[B]||A(e,B,{writable:!0,value:{}}),e[B][t]=!0),n}function w(e,t,n,r){try{return A(e,t,n)}catch(o){if(!n.configurable)throw o;"undefined"==typeof r?delete n.configurable:n.configurable=r;try{return A(e,t,n)}catch(o){var i=null;try{i=JSON.stringify(n)}catch(o){i=i.toString()}console.log("Attempting to configure '"+t+"' with descriptor '"+i+"' on object '"+e+"' and got error, giving up: "+o)}}}function _(e){var t=[],n=e.wtf;n?t=$.split(",").map(function(e){return"HTML"+e+"Element"}).concat(q):e[U]?t.push(U):t=q;for(var r=0;r<t.length;r++){var o=e[t[r]];p(o&&o.prototype)}}function T(e){var t=e.WebSocket;e.EventTarget||p(t.prototype),e.WebSocket=function(e,n){var r,i=arguments.length>1?new t(e,n):new t(e),a=Object.getOwnPropertyDescriptor(i,"onmessage");return a&&a.configurable===!1?(r=Object.create(i),["addEventListener","removeEventListener","send","close"].forEach(function(e){r[e]=function(){return i[e].apply(i,arguments)}})):r=i,o(r,["close","error","message","open"]),r};for(var n in t)e.WebSocket[n]=t[n]}function S(e){if(!j||L){var t="undefined"!=typeof WebSocket;if(E()){if(F){o(window,se,Object.getPrototypeOf(window)),o(Document.prototype,se),"undefined"!=typeof window.SVGElement&&o(window.SVGElement.prototype,se),o(Element.prototype,se),o(HTMLElement.prototype,se),o(HTMLMediaElement.prototype,J),o(HTMLFrameSetElement.prototype,V.concat(ne)),o(HTMLBodyElement.prototype,V.concat(ne)),o(HTMLFrameElement.prototype,te),o(HTMLIFrameElement.prototype,te);var n=window.HTMLMarqueeElement;n&&o(n.prototype,re)}o(XMLHttpRequest.prototype,oe);var r=e.XMLHttpRequestEventTarget;r&&o(r&&r.prototype,oe),"undefined"!=typeof IDBIndex&&(o(IDBIndex.prototype,ie),o(IDBRequest.prototype,ie),o(IDBOpenDBRequest.prototype,ie),o(IDBDatabase.prototype,ie),o(IDBTransaction.prototype,ie),o(IDBCursor.prototype,ie)),t&&o(WebSocket.prototype,ae)}else O(),l("XMLHttpRequest"),t&&T(e)}}function E(){if((F||L)&&!Object.getOwnPropertyDescriptor(HTMLElement.prototype,"onclick")&&"undefined"!=typeof Element){var e=Object.getOwnPropertyDescriptor(Element.prototype,"onclick");if(e&&!e.configurable)return!1}var t=Object.getOwnPropertyDescriptor(XMLHttpRequest.prototype,"onreadystatechange");if(t){Object.defineProperty(XMLHttpRequest.prototype,"onreadystatechange",{enumerable:!0,configurable:!0,get:function(){return!0}});var n=new XMLHttpRequest,r=!!n.onreadystatechange;return Object.defineProperty(XMLHttpRequest.prototype,"onreadystatechange",t||{}),r}Object.defineProperty(XMLHttpRequest.prototype,"onreadystatechange",{enumerable:!0,configurable:!0,get:function(){return this[C("fakeonreadystatechange")]},set:function(e){this[C("fakeonreadystatechange")]=e}});var n=new XMLHttpRequest,o=function(){};n.onreadystatechange=o;var r=n[C("fakeonreadystatechange")]===o;return n.onreadystatechange=null,r}function O(){for(var e=function(e){var t=se[e],n="on"+t;self.addEventListener(t,function(e){var t,r,o=e.target;for(r=o?o.constructor.name+"."+n:"unknown."+n;o;)o[n]&&!o[n][ce]&&(t=Zone.current.wrap(o[n],r),t[ce]=o[n],o[n]=t),o=o.parentElement},!0)},t=0;t<se.length;t++)e(t)}function x(e){if((F||L)&&"registerElement"in e.document){var t=document.registerElement,n=["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"];document.registerElement=function(e,r){return r&&r.prototype&&n.forEach(function(e){var t="Document.registerElement::"+e;if(r.prototype.hasOwnProperty(e)){var n=Object.getOwnPropertyDescriptor(r.prototype,e);n&&n.value?(n.value=Zone.current.wrap(n.value,t),y(r.prototype,e,n)):r.prototype[e]=Zone.current.wrap(r.prototype[e],t)}else r.prototype[e]&&(r.prototype[e]=Zone.current.wrap(r.prototype[e],t))}),t.apply(document,[e,r])},g(document.registerElement,t)}}(function(e){function t(e){s&&s.mark&&s.mark(e)}function n(e,t){s&&s.measure&&s.measure(e,t)}function r(t){0===L&&0===g.length&&(e[d]?e[d].resolve(0)[h](o):e[f](o,0)),t&&g.push(t)}function o(){if(!v){for(v=!0;g.length;){var e=g;g=[];for(var t=0;t<e.length;t++){var n=e[t];try{n.zone.runTask(n,null,null)}catch(r){C.onUnhandledError(r)}}}!c[a("ignoreConsoleErrorUncaughtError")];C.microtaskDrainDone(),v=!1}}function i(){}function a(e){return"__zone_symbol__"+e}var s=e.performance;if(t("Zone"),e.Zone)throw new Error("Zone already loaded.");var c=function(){function r(e,t){this._properties=null,this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new p(this,this._parent&&this._parent._zoneDelegate,t)}return r.assertZonePatched=function(){if(e.Promise!==x.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(r,"root",{get:function(){for(var e=r.current;e.parent;)e=e.parent;return e},enumerable:!0,configurable:!0}),Object.defineProperty(r,"current",{get:function(){return j.zone},enumerable:!0,configurable:!0}),Object.defineProperty(r,"currentTask",{get:function(){return F},enumerable:!0,configurable:!0}),r.__load_patch=function(o,i){if(x.hasOwnProperty(o))throw Error("Already loaded patch: "+o);if(!e["__Zone_disable_"+o]){var a="Zone:"+o;t(a),x[o]=i(e,r,C),n(a,a)}},Object.defineProperty(r.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),r.prototype.get=function(e){var t=this.getZoneWith(e);if(t)return t._properties[e]},r.prototype.getZoneWith=function(e){for(var t=this;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null},r.prototype.fork=function(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)},r.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)}},r.prototype.run=function(e,t,n,r){void 0===t&&(t=void 0),void 0===n&&(n=null),void 0===r&&(r=null),j={parent:j,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{j=j.parent}},r.prototype.runGuarded=function(e,t,n,r){void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=null),j={parent:j,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(o){if(this._zoneDelegate.handleError(this,o))throw o}}finally{j=j.parent}},r.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||m).name+"; Execution: "+this.name+")");var r=e.state===y;if(!r||e.type!==O){var o=e.state!=w;o&&e._transitionTo(w,k),e.runCount++;var i=F;F=e,j={parent:j,zone:this};try{e.type==E&&e.data&&!e.data.isPeriodic&&(e.cancelFn=null);try{return this._zoneDelegate.invokeTask(this,e,t,n)}catch(a){if(this._zoneDelegate.handleError(this,a))throw a}}finally{e.state!==y&&e.state!==T&&(e.type==O||e.data&&e.data.isPeriodic?o&&e._transitionTo(k,w):(e.runCount=0,this._updateTaskCount(e,-1),o&&e._transitionTo(y,w,y))),j=j.parent,F=i}}},r.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 "+this.name+" which is descendants of the original zone "+e.zone.name);t=t.parent}e._transitionTo(b,y);var n=[];e._zoneDelegates=n,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(r){throw e._transitionTo(T,b,y),this._zoneDelegate.handleError(this,r),r}return e._zoneDelegates===n&&this._updateTaskCount(e,1),e.state==b&&e._transitionTo(k,b),e},r.prototype.scheduleMicroTask=function(e,t,n,r){return this.scheduleTask(new l(S,e,t,n,r,null))},r.prototype.scheduleMacroTask=function(e,t,n,r,o){
return this.scheduleTask(new l(E,e,t,n,r,o))},r.prototype.scheduleEventTask=function(e,t,n,r,o){return this.scheduleTask(new l(O,e,t,n,r,o))},r.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||m).name+"; Execution: "+this.name+")");e._transitionTo(_,k,w);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(T,_),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(y,_),e.runCount=0,e},r.prototype._updateTaskCount=function(e,t){var n=e._zoneDelegates;t==-1&&(e._zoneDelegates=null);for(var r=0;r<n.length;r++)n[r]._updateTaskCount(e.type,t)},r}();c.__symbol__=a;var u={name:"",onHasTask:function(e,t,n,r){return e.hasTask(n,r)},onScheduleTask:function(e,t,n,r){return e.scheduleTask(n,r)},onInvokeTask:function(e,t,n,r,o,i){return e.invokeTask(n,r,o,i)},onCancelTask:function(e,t,n,r){return e.cancelTask(n,r)}},p=function(){function e(e,t,n){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=e,this._parentDelegate=t,this._forkZS=n&&(n&&n.onFork?n:t._forkZS),this._forkDlgt=n&&(n.onFork?t:t._forkDlgt),this._forkCurrZone=n&&(n.onFork?this.zone:t.zone),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this.zone:t.zone),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this.zone:t.zone),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this.zone:t.zone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this.zone:t.zone),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this.zone:t.zone),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this.zone:t.zone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;var r=n&&n.onHasTask,o=t&&t._hasTaskZS;(r||o)&&(this._hasTaskZS=r?n:u,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=e,n.onScheduleTask||(this._scheduleTaskZS=u,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this.zone),n.onInvokeTask||(this._invokeTaskZS=u,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this.zone),n.onCancelTask||(this._cancelTaskZS=u,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this.zone))}return e.prototype.fork=function(e,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,t):new c(e,t)},e.prototype.intercept=function(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,e,t,n):t},e.prototype.invoke=function(e,t,n,r,o){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,e,t,n,r,o):t.apply(n,r)},e.prototype.handleError=function(e,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,e,t)},e.prototype.scheduleTask=function(e,t){var n=t;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,e,t),n||(n=t);else if(t.scheduleFn)t.scheduleFn(t);else{if(t.type!=S)throw new Error("Task is missing scheduleFn.");r(t)}return n},e.prototype.invokeTask=function(e,t,n,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,e,t,n,r):t.callback.apply(n,r)},e.prototype.cancelTask=function(e,t){var n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,e,t);else{if(!t.cancelFn)throw Error("Task is not cancelable");n=t.cancelFn(t)}return n},e.prototype.hasTask=function(e,t){try{return this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,e,t)}catch(n){this.handleError(e,n)}},e.prototype._updateTaskCount=function(e,t){var n=this._taskCounts,r=n[e],o=n[e]=r+t;if(!(o<0||0!=r&&0!=o)){var i={microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e};this.hasTask(this.zone,i)}},e}(),l=function(){function e(e,t,n,r,i,a){this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=e,this.source=t,this.data=r,this.scheduleFn=i,this.cancelFn=a,this.callback=n;var s=this;this.invoke=function(){L++;try{return s.runCount++,s.zone.runTask(s,this,arguments)}finally{1==L&&o(),L--}}}return Object.defineProperty(e.prototype,"zone",{get:function(){return this._zone},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!0,configurable:!0}),e.prototype.cancelScheduleRequest=function(){this._transitionTo(y,b)},e.prototype._transitionTo=function(e,t,n){if(this._state!==t&&this._state!==n)throw new Error(this.type+" '"+this.source+"': can not transition to '"+e+"', expecting state '"+t+"'"+(n?" or '"+n+"'":"")+", was '"+this._state+"'.");this._state=e,e==y&&(this._zoneDelegates=null)},e.prototype.toString=function(){return this.data&&"undefined"!=typeof this.data.handleId?this.data.handleId:Object.prototype.toString.call(this)},e.prototype.toJSON=function(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,invoke:this.invoke,scheduleFn:this.scheduleFn,cancelFn:this.cancelFn,runCount:this.runCount,callback:this.callback}},e}(),f=a("setTimeout"),d=a("Promise"),h=a("then"),g=[],v=!1,m={name:"NO ZONE"},y="notScheduled",b="scheduling",k="scheduled",w="running",_="canceling",T="unknown",S="microTask",E="macroTask",O="eventTask",x={},C={symbol:a,currentZoneFrame:function(){return j},onUnhandledError:i,microtaskDrainDone:i,scheduleMicroTask:r,showUncaughtError:function(){return!c[a("ignoreConsoleErrorUncaughtError")]},patchEventTargetMethods:function(){return!1},patchOnProperties:i,patchMethod:function(){return i}},I="__rootZoneSpec__",P=new c(null,null);e[I]&&(P=P.fork(e[I]),delete e[I]);var j={parent:null,zone:P},F=null,L=0;return n("Zone","Zone"),e.Zone=c})("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||e);Zone.__load_patch("ZoneAwarePromise",function(e,t,n){function r(e){n.onUnhandledError(e);try{var r=t[d("unhandledPromiseRejectionHandler")];r&&"function"==typeof r&&r.apply(this,[e])}catch(o){}}function o(e){return e&&e.then}function i(e){return e}function a(e){return E.reject(e)}function s(e,t){return function(n){try{c(e,t,n)}catch(r){c(e,!1,r)}}}function c(e,r,o){var i=S();if(e===o)throw new TypeError("Promise resolved with itself");if(e[m]===k){var a=null;try{"object"!=typeof o&&"function"!=typeof o||(a=o&&o.then)}catch(l){return i(function(){c(e,!1,l)})(),e}if(r!==_&&o instanceof E&&o.hasOwnProperty(m)&&o.hasOwnProperty(y)&&o[m]!==k)u(o),c(e,o[m],o[y]);else if(r!==_&&"function"==typeof a)try{a.apply(o,[i(s(e,r)),i(s(e,!1))])}catch(l){i(function(){c(e,!1,l)})()}else{e[m]=r;var f=e[y];e[y]=o,r===_&&o instanceof Error&&(o[d("currentTask")]=t.currentTask);for(var g=0;g<f.length;)p(e,f[g++],f[g++],f[g++],f[g++]);if(0==f.length&&r==_){e[m]=T;try{throw new Error("Uncaught (in promise): "+o+(o&&o.stack?"\n"+o.stack:""))}catch(l){var v=l;v.rejection=o,v.promise=e,v.zone=t.current,v.task=t.currentTask,h.push(v),n.scheduleMicroTask()}}}}return e}function u(e){if(e[m]===T){try{var n=t[d("rejectionHandledHandler")];n&&"function"==typeof n&&n.apply(this,[{rejection:e[y],promise:e}])}catch(r){}e[m]=_;for(var o=0;o<h.length;o++)e===h[o].promise&&h.splice(o,1)}}function p(e,t,n,r,o){u(e);var s=e[m]?"function"==typeof r?r:i:"function"==typeof o?o:a;t.scheduleMicroTask(b,function(){try{c(n,!0,t.run(s,void 0,[e[y]]))}catch(r){c(n,!1,r)}})}function l(e){var t=e.prototype,n=t.then;t[v]=n,e.prototype.then=function(e,t){var r=this,o=new E(function(e,t){n.call(r,e,t)});return o.then(e,t)},e[x]=!0}function f(e){return function(){var t=e.apply(this,arguments);if(t instanceof E)return t;var n=t.constructor;return n[x]||l(n),t}}var d=n.symbol,h=[],g=d("Promise"),v=d("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(;h.length;)for(var e=function(){var e=h.shift();try{e.zone.runGuarded(function(){throw e})}catch(t){r(t)}};h.length;)e()};var m=d("state"),y=d("value"),b="Promise.then",k=null,w=!0,_=!1,T=0,S=function(){var e=!1;return function(t){return function(){e||(e=!0,t.apply(null,arguments))}}},E=function(){function e(t){var n=this;if(!(n instanceof e))throw new Error("Must be an instanceof Promise.");n[m]=k,n[y]=[];try{t&&t(s(n,w),s(n,_))}catch(r){c(n,!1,r)}}return e.toString=function(){return"function ZoneAwarePromise() { [native code] }"},e.resolve=function(e){return c(new this(null),w,e)},e.reject=function(e){return c(new this(null),_,e)},e.race=function(e){function t(e){a&&(a=r(e))}function n(e){a&&(a=i(e))}for(var r,i,a=new this(function(e,t){n=[e,t],r=n[0],i=n[1];var n}),s=0,c=e;s<c.length;s++){var u=c[s];o(u)||(u=this.resolve(u)),u.then(t,n)}return a},e.all=function(e){for(var t,n,r=new this(function(e,r){t=e,n=r}),i=0,a=[],s=0,c=e;s<c.length;s++){var u=c[s];o(u)||(u=this.resolve(u)),u.then(function(e){return function(n){a[e]=n,i--,i||t(a)}}(i),n),i++}return i||t(a),r},e.prototype.then=function(e,n){var r=new this.constructor(null),o=t.current;return this[m]==k?this[y].push(o,r,e,n):p(this,o,r,e,n),r},e.prototype["catch"]=function(e){return this.then(null,e)},e}();E.resolve=E.resolve,E.reject=E.reject,E.race=E.race,E.all=E.all;var O=e[g]=e.Promise;e.Promise=E;var x=d("thenPatched");if(O){l(O);var C=e.fetch;"function"==typeof C&&(e.fetch=f(C))}return Promise[t.__symbol__("uncaughtPromiseErrors")]=h,E});var C=function(e){return"__zone_symbol__"+e},I="object"==typeof window&&window||"object"==typeof self&&self||e,P="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,j=!("nw"in I)&&"undefined"!=typeof I.process&&"[object process]"==={}.toString.call(I.process),F=!j&&!P&&!("undefined"==typeof window||!window.HTMLElement),L="undefined"!=typeof I.process&&"[object process]"==={}.toString.call(I.process)&&!P&&!("undefined"==typeof window||!window.HTMLElement),N=C("eventTasks"),D="addEventListener",z="removeEventListener",R=function(e,t){return{options:t[2],eventName:t[0],handler:t[1],target:e||I,name:t[0],crossContext:!1,invokeAddFunc:function(e,t){if(!this.crossContext)return t&&t.invoke?this.target[e](this.eventName,t.invoke,this.options):this.target[e](this.eventName,t,this.options);try{return this.target[e](this.eventName,t,this.options)}catch(n){}},invokeRemoveFunc:function(e,t){if(!this.crossContext)return t&&t.invoke?this.target[e](this.eventName,t.invoke,this.options):this.target[e](this.eventName,t,this.options);try{return this.target[e](this.eventName,t,this.options)}catch(n){}}}},Z=C("originalInstance");Zone.__load_patch("toString",function(e,t,n){var r=Function.prototype.toString;Function.prototype.toString=function(){if("function"==typeof this){var t=this[C("OriginalDelegate")];if(t)return"function"==typeof t?r.apply(this[C("OriginalDelegate")],arguments):Object.prototype.toString.call(t);if(this===Promise){var n=e[C("Promise")];if(n)return r.apply(n,arguments)}if(this===Error){var o=e[C("Error")];if(o)return r.apply(o,arguments)}}return r.apply(this,arguments)};var o=Object.prototype.toString;Object.prototype.toString=function(){return this instanceof Promise?"[object Promise]":o.apply(this,arguments)}});var A=Object[C("defineProperty")]=Object.defineProperty,H=Object[C("getOwnPropertyDescriptor")]=Object.getOwnPropertyDescriptor,M=Object.create,B=C("unconfigurables"),$="Anchor,Area,Audio,BR,Base,BaseFont,Body,Button,Canvas,Content,DList,Directory,Div,Embed,FieldSet,Font,Form,Frame,FrameSet,HR,Head,Heading,Html,IFrame,Image,Input,Keygen,LI,Label,Legend,Link,Map,Marquee,Media,Menu,Meta,Meter,Mod,OList,Object,OptGroup,Option,Output,Paragraph,Pre,Progress,Quote,Script,Select,Source,Span,Style,TableCaption,TableCell,TableCol,Table,TableRow,TableSection,TextArea,Title,Track,UList,Unknown,Video",q="ApplicationCache,EventSource,FileReader,InputMethodContext,MediaController,MessagePort,Node,Performance,SVGElementInstance,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebKitNamedFlow,Window,Worker,WorkerGlobalScope,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload,IDBRequest,IDBOpenDBRequest,IDBDatabase,IDBTransaction,IDBCursor,DBIndex,WebSocket".split(","),U="EventTarget",X=["abort","animationcancel","animationend","animationiteration","auxclick","beforeinput","blur","cancel","canplay","canplaythrough","change","compositionstart","compositionupdate","compositionend","cuechange","click","close","contextmenu","curechange","dblclick","drag","dragend","dragenter","dragexit","dragleave","dragover","drop","durationchange","emptied","ended","error","focus","focusin","focusout","gotpointercapture","input","invalid","keydown","keypress","keyup","load","loadstart","loadeddata","loadedmetadata","lostpointercapture","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","mousewheel","pause","play","playing","pointercancel","pointerdown","pointerenter","pointerleave","pointerlockchange","mozpointerlockchange","webkitpointerlockerchange","pointerlockerror","mozpointerlockerror","webkitpointerlockerror","pointermove","pointout","pointerover","pointerup","progress","ratechange","reset","resize","scroll","seeked","seeking","select","selectionchange","selectstart","show","sort","stalled","submit","suspend","timeupdate","volumechange","touchcancel","touchmove","touchstart","transitioncancel","transitionend","waiting","wheel"],W=["afterscriptexecute","beforescriptexecute","DOMContentLoaded","fullscreenchange","mozfullscreenchange","webkitfullscreenchange","msfullscreenchange","fullscreenerror","mozfullscreenerror","webkitfullscreenerror","msfullscreenerror","readystatechange"],V=["absolutedeviceorientation","afterinput","afterprint","appinstalled","beforeinstallprompt","beforeprint","beforeunload","devicelight","devicemotion","deviceorientation","deviceorientationabsolute","deviceproximity","hashchange","languagechange","message","mozbeforepaint","offline","online","paint","pageshow","pagehide","popstate","rejectionhandled","storage","unhandledrejection","unload","userproximity","vrdisplyconnected","vrdisplaydisconnected","vrdisplaypresentchange"],G=["beforecopy","beforecut","beforepaste","copy","cut","paste","dragstart","loadend","animationstart","search","transitionrun","transitionstart","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend"],J=["encrypted","waitingforkey","msneedkey","mozinterruptbegin","mozinterruptend"],K=["activate","afterupdate","ariarequest","beforeactivate","beforedeactivate","beforeeditfocus","beforeupdate","cellchange","controlselect","dataavailable","datasetchanged","datasetcomplete","errorupdate","filterchange","layoutcomplete","losecapture","move","moveend","movestart","propertychange","resizeend","resizestart","rowenter","rowexit","rowsdelete","rowsinserted","command","compassneedscalibration","deactivate","help","mscontentzoom","msmanipulationstatechanged","msgesturechange","msgesturedoubletap","msgestureend","msgesturehold","msgesturestart","msgesturetap","msgotpointercapture","msinertiastart","mslostpointercapture","mspointercancel","mspointerdown","mspointerenter","mspointerhover","mspointerleave","mspointermove","mspointerout","mspointerover","mspointerup","pointerout","mssitemodejumplistitemremoved","msthumbnailclick","stop","storagecommit"],Q=["webglcontextrestored","webglcontextlost","webglcontextcreationerror"],Y=["autocomplete","autocompleteerror"],ee=["toggle"],te=["load"],ne=["blur","error","focus","load","resize","scroll"],re=["bounce","finish","start"],oe=["loadstart","progress","abort","error","load","progress","timeout","loadend","readystatechange"],ie=["upgradeneeded","complete","abort","success","error","blocked","versionchange","close"],ae=["close","error","open","message"],se=X.concat(Q,Y,ee,W,V,G,K),ce=C("unbound");Zone.__load_patch("timers",function(e,t,n){var r="set",o="clear";v(e,r,o,"Timeout"),v(e,r,o,"Interval"),v(e,r,o,"Immediate"),v(e,"request","cancel","AnimationFrame"),v(e,"mozRequest","mozCancel","AnimationFrame"),v(e,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",function(e,t,n){for(var r=["alert","prompt","confirm"],o=0;o<r.length;o++){var i=r[o];f(e,i,function(n,r,o){return function(r,i){return t.current.run(n,e,i,o)}})}}),Zone.__load_patch("EventTarget",function(e,t,n){_(e);var r=e.XMLHttpRequestEventTarget;r&&r.prototype&&p(r.prototype),l("MutationObserver"),l("WebKitMutationObserver"),l("FileReader")}),Zone.__load_patch("on_property",function(e,t,n){S(e),m(),x(e)}),Zone.__load_patch("canvas",function(e,t,n){var r=e.HTMLCanvasElement;"undefined"!=typeof r&&r.prototype&&r.prototype.toBlob&&d(r.prototype,"toBlob",function(e,t){return{name:"HTMLCanvasElement.toBlob",target:e,callbackIndex:0,args:t}})}),Zone.__load_patch("XHR",function(e,t,n){function r(e){function n(e){var t=e[o];return t}function r(e){XMLHttpRequest[s]=!1;var t=e.data,n=t.target[a],r=t.target[C("addEventListener")],i=t.target[C("removeEventListener")];n&&i.apply(t.target,["readystatechange",n]);var c=t.target[a]=function(){t.target.readyState===t.target.DONE&&!t.aborted&&XMLHttpRequest[s]&&"scheduled"===e.state&&e.invoke()};r.apply(t.target,["readystatechange",c]);var u=t.target[o];return u||(t.target[o]=e),l.apply(t.target,t.args),XMLHttpRequest[s]=!0,e}function c(){}function u(e){var t=e.data;return t.aborted=!0,d.apply(t.target,t.args)}var p=f(e.XMLHttpRequest.prototype,"open",function(){return function(e,t){return e[i]=0==t[2],p.apply(e,t)}}),l=f(e.XMLHttpRequest.prototype,"send",function(){return function(e,n){var o=t.current;if(e[i])return l.apply(e,n);var a={target:e,isPeriodic:!1,delay:null,args:n,aborted:!1};return o.scheduleMacroTask("XMLHttpRequest.send",c,a,r,u)}}),d=f(e.XMLHttpRequest.prototype,"abort",function(e){return function(e,t){var r=n(e);if(r&&"string"==typeof r.type){if(null==r.cancelFn||r.data&&r.data.aborted)return;r.zone.cancelTask(r)}}})}r(e);var o=C("xhrTask"),i=C("xhrSync"),a=C("xhrListener"),s=C("xhrScheduled")}),Zone.__load_patch("geolocation",function(e,t,r){e.navigator&&e.navigator.geolocation&&n(e.navigator.geolocation,["getCurrentPosition","watchPosition"])}),Zone.__load_patch("PromiseRejectionEvent",function(e,t,n){function r(t){return function(n){var r=h(e,t);r.forEach(function(r){var o=e.PromiseRejectionEvent;if(o){var i=new o(t,{promise:n.promise,reason:n.rejection});r.invoke(i)}})}}e.PromiseRejectionEvent&&(t[C("unhandledPromiseRejectionHandler")]=r("unhandledrejection"),t[C("rejectionHandledHandler")]=r("rejectionhandled"))}),Zone.__load_patch("util",function(e,t,n){n.patchEventTargetMethods=p,n.patchOnProperties=o,n.patchMethod=f})})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},void 0)},{}],24:[function(e,t,n){(function(e){!function(r,o){"use strict";"function"==typeof e&&e.amd?e("stackframe",[],o):"object"==typeof n?t.exports=o():r.StackFrame=o()}(this,function(){"use strict";function e(e){return!isNaN(parseFloat(e))&&isFinite(e)}function t(e){return e[0].toUpperCase()+e.substring(1)}function n(e){return function(){return this[e]}}function r(e){if(e instanceof Object)for(var n=0;n<c.length;n++)e.hasOwnProperty(c[n])&&void 0!==e[c[n]]&&this["set"+t(c[n])](e[c[n]])}var o=["isConstructor","isEval","isNative","isToplevel"],i=["columnNumber","lineNumber"],a=["fileName","functionName","source"],s=["args"],c=o.concat(i,a,s);r.prototype={getArgs:function(){return this.args},setArgs:function(e){if("[object Array]"!==Object.prototype.toString.call(e))throw new TypeError("Args must be an Array");this.args=e},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(e){if(e instanceof r)this.evalOrigin=e;else{if(!(e instanceof Object))throw new TypeError("Eval Origin must be an Object or StackFrame");this.evalOrigin=new r(e)}},toString:function(){var t=this.getFunctionName()||"{anonymous}",n="("+(this.getArgs()||[]).join(",")+")",r=this.getFileName()?"@"+this.getFileName():"",o=e(this.getLineNumber())?":"+this.getLineNumber():"",i=e(this.getColumnNumber())?":"+this.getColumnNumber():"";return t+n+r+o+i}};for(var u=0;u<o.length;u++)r.prototype["get"+t(o[u])]=n(o[u]),r.prototype["set"+t(o[u])]=function(e){return function(t){this[e]=Boolean(t)}}(o[u]);for(var p=0;p<i.length;p++)r.prototype["get"+t(i[p])]=n(i[p]),r.prototype["set"+t(i[p])]=function(t){return function(n){if(!e(n))throw new TypeError(t+" must be a Number");this[t]=Number(n)}}(i[p]);for(var l=0;l<a.length;l++)r.prototype["get"+t(a[l])]=n(a[l]),r.prototype["set"+t(a[l])]=function(e){return function(t){this[e]=String(t)}}(a[l]);return r})}).call(this,void 0)},{}],25:[function(e,t,n){(function(r){!function(o,i){"use strict";"function"==typeof r&&r.amd?r("stack-generator",["stackframe"],i):"object"==typeof n?t.exports=i(e("stackframe")):o.StackGenerator=i(o.StackFrame)}(this,function(e){return{backtrace:function(t){var n=[],r=10;"object"==typeof t&&"number"==typeof t.maxStackSize&&(r=t.maxStackSize);for(var o=arguments.callee;o&&n.length<r;){for(var i=new Array(o.arguments.length),a=0;a<i.length;++a)i[a]=o.arguments[a];/function(?:\s+([\w$]+))+\s*\(/.test(o.toString())?n.push(new e({functionName:RegExp.$1||void 0,args:i})):n.push(new e({args:i}));try{o=o.caller}catch(s){break}}return n}}})}).call(this,void 0)},{stackframe:24}],26:[function(e,t,n){(function(e){!function(r,o){"use strict";"function"==typeof e&&e.amd?e("stackframe",[],o):"object"==typeof n?t.exports=o():r.StackFrame=o()}(this,function(){"use strict";function e(e){return!isNaN(parseFloat(e))&&isFinite(e)}function t(e,t,n,r,o,i){void 0!==e&&this.setFunctionName(e),void 0!==t&&this.setArgs(t),void 0!==n&&this.setFileName(n),void 0!==r&&this.setLineNumber(r),void 0!==o&&this.setColumnNumber(o),void 0!==i&&this.setSource(i)}return t.prototype={getFunctionName:function(){return this.functionName},setFunctionName:function(e){this.functionName=String(e)},getArgs:function(){return this.args},setArgs:function(e){if("[object Array]"!==Object.prototype.toString.call(e))throw new TypeError("Args must be an Array");this.args=e},getFileName:function(){return this.fileName},setFileName:function(e){this.fileName=String(e)},getLineNumber:function(){return this.lineNumber},setLineNumber:function(t){if(!e(t))throw new TypeError("Line Number must be a Number");this.lineNumber=Number(t)},getColumnNumber:function(){return this.columnNumber},setColumnNumber:function(t){if(!e(t))throw new TypeError("Column Number must be a Number");this.columnNumber=Number(t)},getSource:function(){return this.source},setSource:function(e){this.source=String(e)},toString:function(){var t=this.getFunctionName()||"{anonymous}",n="("+(this.getArgs()||[]).join(",")+")",r=this.getFileName()?"@"+this.getFileName():"",o=e(this.getLineNumber())?":"+this.getLineNumber():"",i=e(this.getColumnNumber())?":"+this.getColumnNumber():"";return t+n+r+o+i}},t})}).call(this,void 0)},{}],27:[function(e,t,n){function r(e){function t(){}function n(e){u.angularInitializer.beforeBootstrap()}function r(){u.angularInitializer.afterBootstrap()}function i(e,t,i){p||(p=o(u));var a;return u.configService.isPlatformSupported()?(n(),a=u.zoneService.runInOpbeatZone(e,t,i,"angular:bootstrap"),r()):a=e.apply(t,i),a}var c=e.getPerformanceServiceContainer(),u=c.services;u.configService.isPlatformSupported()?c.initialize():u.logger.warn("Platform is not supported.");var p=!1;s(c),u.angularInitializer={afterBootstrap:t,beforeBootstrap:t},u.exceptionHandler=e.getExceptionHandler(),u.exceptionHandler.install(),p=o(u),a(i)}function o(e){return i(e)}var i=e("./ngOpbeat"),a=e("./patches/bootstrapPatch"),s=e("opbeat-js-core").patchCommon;t.exports=r},{"./ngOpbeat":28,"./patches/bootstrapPatch":30,"opbeat-js-core":13}],28:[function(e,t,n){function r(e,t,n){this.config=function(e){e&&t.setConfig(e)},this.version=t.get("VERSION"),this.install=function(){e.warn("$opbeatProvider.install is deprecated!")},this.$get=[function(){return{getConfig:function(){return t},captureException:function(t,r){return t instanceof Error?void n.processError(t,r):void e.warn("Can't capture exception. Passed exception needs to be an instanceof Error")},setUserContext:function(e){t.set("context.user",e)},setExtraContext:function(e){t.set("context.extra",e)}}}]}function o(e,t){f(e),c(e,t),u(e,t),p(e,t),l(e,t),d(e,t)}function i(e){var t=window.opbeat||(window.opbeat={});h.extend(t,e)}function a(){}function s(e){function t(e,t){function n(e){if(d=!0,!p.get("performance.enable"))return void u.debug("Performance monitoring is disable");u.debug("Route change started");var t=e;""!==t&&"undefined"!=typeof t||(t="/");var n=c.startTransaction(t,"route-change");n&&h&&(h=!1,n.isHardNavigation=!0)}function r(e,t){var r;if(t&&t.$$route){if("undefined"!=typeof t.$$route.redirectTo)return;r=t.$$route.originalPath}else t&&t.name&&(r=t.name);n(r)}p.set("isInstalled",!0),p.set("opbeatAgentName","opbeat-angular"),p.set("platform.framework","angular/"+window.angular.version.full);var o=s();if(o&&p.set("platform.platform",o),u.debug("Agent:",p.getAgentName()),t.has("$transitions")){var i=t.get("$transitions");i.onStart({},function(e){var t=e.to();n(t.name)})}else e.$on("$routeChangeStart",r),e.$on("$stateChangeStart",r)}function n(e){o(e,c)}function s(){var e="undefined"!=typeof window.cordova;return e?"cordova":"browser"}var c=e.transactionService,u=e.logger,p=e.configService,l=e.exceptionHandler,f=e.angularInitializer,d=!1,h=!0;if(i({setInitialPageLoadName:function(e){c.initialPageLoadName=e}}),window.angular&&"function"==typeof window.angular.module)return p.isPlatformSupported()?(window.angular.module("ngOpbeat",[]).provider("$opbeat",new r(u,p,l)).config(["$provide",n]).run(["$rootScope","$injector",t]),f.beforeBootstrap=function(){c.metrics.appBeforeBootstrap=performance.now()},f.afterBootstrap=function(){c.metrics.appAfterBootstrap=performance.now(),d||c.sendPageLoadMetrics()}):window.angular.module("ngOpbeat",[]).provider("$opbeat",new r(u,p,l)).config(["$provide",a]).run(["$rootScope",a]),window.angular.module("opbeat-angular",["ngOpbeat"]),!0}var c=e("./patches/controllerPatch"),u=e("./patches/compilePatch"),p=e("./patches/rootScopePatch"),l=e("./patches/directivesPatch"),f=e("./patches/exceptionHandlerPatch"),d=e("./patches/interactionsPatch"),h=e("opbeat-js-core").utils;t.exports=s},{"./patches/compilePatch":31,"./patches/controllerPatch":32,"./patches/directivesPatch":33,"./patches/exceptionHandlerPatch":34,"./patches/interactionsPatch":35,"./patches/rootScopePatch":36,"opbeat-js-core":13}],29:[function(e,t,n){function r(){var e=new i;window.opbeatApi&&window.opbeatApi.serviceFactory&&(e=window.opbeatApi.serviceFactory),a(e)}var o=e("opbeat-js-core"),i=o.ServiceFactory,a=e("./angularInitializer");e("opbeat-zone"),r()},{"./angularInitializer":27,"opbeat-js-core":13,"opbeat-zone":23}],30:[function(e,t,n){function r(e,t){function n(n,o){return t&&u.test(window.name)&&(window.name=window.name.substring(c.length)),e(r,window.angular,arguments)}if("undefined"!=typeof window.angular){var r=window.angular.bootstrap;Object.defineProperty(window.angular,"bootstrap",{get:function(){return"function"==typeof r?n:r},set:function(e){r=e}})}}function o(e){if("undefined"!=typeof window.angular){if(u.test(window.name)){var t=window.angular.resumeBootstrap;return Object.defineProperty(window.angular,"resumeBootstrap",{get:function(){return"function"==typeof t?function(n){return e(t,window.angular,arguments)}:t},set:function(e){t=e}}),!1}return window.name=c+window.name,window.angular.resumeDeferredBootstrap=function(){var t=[];return e(window.angular.resumeBootstrap,window.angular,[t])},window.addEventListener("beforeunload",function(){u.test(window.name)&&(window.name=window.name.substring(c.length))}),!0}}function i(e){var t=!1,n=window.angular;Object.defineProperty(window,"angular",{get:function(){return n},set:function(r){n=r,t||"object"!=typeof n||(t=!0,a(e))},enumerable:!0,configurable:!0})}function a(e){var t=o(e);r(e,t)}function s(e){window.angular?a(e):i(e)}var c="NG_DEFER_BOOTSTRAP!",u=new RegExp("^"+c+".*");t.exports=s},{}],31:[function(e,t,n){var r=e("opbeat-js-core"),o=r.patchUtils,i=r.utils;t.exports=function(e,t){e.decorator("$compile",["$delegate","$injector",function(e,n){function r(){var n=t.startTrace(c,s,{enableStackFrames:!1});try{var r=e.apply(this,arguments)}finally{i.isUndefined(n)||n.end()}return r}var a=["$compile","compile"],s="template.$compile",c=a.join(".");return o._copyProperties(e,r),r}])}},{"opbeat-js-core":13}],32:[function(e,t,n){function r(e){var t,n;return"string"==typeof e[0]?n=e[0]:"function"==typeof e[0]&&(n=e[0].name),"object"==typeof e[1]&&(t=e[1].$scope),{scope:t,name:n}}var o=e("opbeat-js-core").utils;t.exports=function(e,t){e.decorator("$controller",["$delegate","$injector",function(e,n){return function(){var n=Array.prototype.slice.call(arguments),i=r(n);if(i.name){var a,s="$controller."+i.name,c="app.$controller",u=t.startTrace(s,c,{enableStackFrames:!1});try{a=e.apply(this,arguments)}finally{o.isUndefined(u)||u.end()}}else a=e.apply(this,arguments);return a}}])}},{"opbeat-js-core":13}],33:[function(e,t,n){function r(e){return null==e?null:(e.exp?e=e.exp:e.name&&(e=e.name),e.toString())}var o=e("opbeat-js-core").utils;t.exports=function(e,t){"use strict";e.decorator("ngRepeatDirective",["$delegate","$injector",function(e,n){var i=e[0],a=i.compile;return i.compile=function(){var e=a.apply(this,arguments);return function(){var n=arguments[0],i=n.$watchCollection;n.$watchCollection=function(e,n){var a=r(e);"function"==typeof n&&(arguments[1]=function(e){var r="";if(null!=a){var i=Array.isArray(e)?"["+e.length+"]":"";r=a+i}var s="ngRepeat "+r,c="template.ngRepeat",u=t.startTrace(s,c,{enableStackFrames:!1}),p=n.apply(this,arguments);return o.isUndefined(u)||u.end(),p}),i.apply(this,arguments)};var a=e.apply(this,arguments);return n.$watchCollection=i,a}},e}])}},{"opbeat-js-core":13}],34:[function(e,t,n){t.exports=function(e){e.decorator("$exceptionHandler",["$delegate","$opbeat",function(e,t){return function(n,r){return t.captureException(n),e(n,r)}}])}},{}],35:[function(e,t,n){t.exports=function(e,t){"use strict";function n(e,n){var r=e.compile;e.compile=function(){var e=r.apply(this,arguments);return function(r,o,i){var a=i.$normalize("ng-"+n),s=i[a];return o.on(n,function(e){t.startTransaction(a+": "+s,"interaction")}),e.apply(this,arguments)}}}e.decorator("ngSubmitDirective",["$delegate","$injector",function(e,t){var r=e[0];return n(r,"submit"),e}]),e.decorator("ngClickDirective",["$delegate","$injector",function(e,t){var r=e[0];return n(r,"click"),e}])}},{}],36:[function(e,t,n){function r(e,t){var n="getPrototypeOf"in Object?Object.getPrototypeOf(e):e.__proto__,r=n.$digest;return n.$digest=function(){var e=t.startTrace("$scope.$digest","app.$digest",{enableStackFrames:!1}),n=r.apply(this,arguments);return e&&e.end(),n},e}t.exports=function(e,t){e.decorator("$rootScope",["$delegate","$injector",function(e,n){return r(e,t)}])}},{}]},{},[29]);