"object"==typeof navigator&&function(){"use strict";var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var t,r=(function(e,t){function r(e,t){for(var r=0;r0){var s=r(n,this);~s?n.splice(s+1):n.push(this),~s?o.splice(s,1/0,i):o.push(i),~r(n,a)&&(a=t.call(this,i,a))}else n.push(a);return null==e?a instanceof Error?function(e){var t={stack:e.stack,message:e.message,name:e.name};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}(a):a:e.call(this,i,a)}}(e.exports=function(e,t,r,o){return JSON.stringify(e,n(t,o),r)}).getSerialize=n}(t={exports:{}},t.exports),t.exports),n=(r.getSerialize,"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{});function o(e){return void 0===e}function i(e){return"[object Object]"===Object.prototype.toString.call(e)}function a(e){return"[object String]"===Object.prototype.toString.call(e)}function s(e){return"[object Array]"===Object.prototype.toString.call(e)}function c(){if(!("fetch"in n))return!1;try{return new Headers,new Request(""),new Response,!0}catch(e){return!1}}function l(e,t){var r,n;if(o(e.length))for(r in e)h(e,r)&&t.call(null,r,e[r]);else if(n=e.length)for(r=0;r ".length;e&&n++<5&&!("html"===(t=f(e))||n>1&&o+r.length*i+t.length>=80);)r.push(t),o+=t.length,e=e.parentNode;return r.reverse().join(" > ")},htmlElementAsString:f,isSameException:function(e,t){return!d(e,t)&&(e=e.values[0],t=t.values[0],e.type===t.type&&e.value===t.value&&(r=e.stacktrace,n=t.stacktrace,(!o(r)||!o(n))&&g(e.stacktrace,t.stacktrace)));var r,n},isSameStacktrace:g,parseUrl:function(e){if("string"!=typeof e)return{};var t=e.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/),r=t[6]||"",n=t[8]||"";return{protocol:t[2],host:t[4],path:t[5],relative:t[5]+r+n}},fill:function(e,t,r,n){if(null!=e){var o=e[t];e[t]=r(o),e[t].__raven__=!0,e[t].__orig__=o,n&&n.push([e,t,o])}},safeJoin:function(e,t){if(!s(e))return"";for(var r=[],n=0;no?e(t,n-1):a},serializeKeysForMessage:function(e,t){if("number"==typeof e||"string"==typeof e)return e.toString();if(!Array.isArray(e))return"";if(0===(e=e.filter(function(e){return"string"==typeof e})).length)return"[object has no keys]";if(t="number"!=typeof t?v:t,e[0].length>=t)return e[0];for(var r=e.length;r>0;r--){var n=e.slice(0,r).join(", ");if(!(n.length>t))return r===e.length?n:n+"…"}return""},sanitize:function(e,t){if(!s(t)||s(t)&&0===t.length)return e;var n,o=p(t),a="********";try{n=JSON.parse(r(e))}catch(t){return e}return function e(t){return s(t)?t.map(function(t){return e(t)}):i(t)?Object.keys(t).reduce(function(r,n){return o.test(n)?r[n]=a:r[n]=e(t[n]),r},{}):t}(n)}},w={collectWindowErrors:!0,debug:!1},x="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},k=[].slice,S="?",O=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function C(){return"undefined"==typeof document||null==document.location?"":document.location.href}w.report=function(){var e,t,r=[],n=null,o=null,i=null;function a(e,t){var n=null;if(!t||w.collectWindowErrors){for(var o in r)if(r.hasOwnProperty(o))try{r[o].apply(null,[e].concat(k.call(arguments,2)))}catch(e){n=e}if(n)throw n}}function s(t,r,n,o,s){var l=E.isErrorEvent(s)?s.error:s,u=E.isErrorEvent(t)?t.message:t;if(i)w.computeStackTrace.augmentStackTraceWithInitialElement(i,r,n,u),c();else if(l&&E.isError(l))a(w.computeStackTrace(l),!0);else{var h,p={url:r,line:n,column:o},f=void 0;if("[object String]"==={}.toString.call(u))(h=u.match(O))&&(f=h[1],u=h[2]);p.func=S,a({name:f,message:u,url:C(),stack:[p]},!0)}return!!e&&e.apply(this,arguments)}function c(){var e=i,t=n;n=null,i=null,o=null,a.apply(null,[e,!1].concat(t))}function l(e,t){var r=k.call(arguments,1);if(i){if(o===e)return;c()}var a=w.computeStackTrace(e);if(i=a,o=e,n=r,setTimeout(function(){o===e&&c()},a.incomplete?2e3:0),!1!==t)throw e}return l.subscribe=function(n){t||(e=x.onerror,x.onerror=s,t=!0),r.push(n)},l.unsubscribe=function(e){for(var t=r.length-1;t>=0;--t)r[t]===e&&r.splice(t,1)},l.uninstall=function(){t&&(x.onerror=e,t=!1,e=void 0),r=[]},l}(),w.computeStackTrace=function(){function e(e){if(void 0!==e.stack&&e.stack){for(var t,r,n,o=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|native|eval|webpack||[a-z]:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,i=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx(?:-web)|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,a=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,s=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,c=/\((\S*)(?::(\d+))(?::(\d+))\)/,l=e.stack.split("\n"),u=[],h=(/^(.*) is undefined$/.exec(e.message),0),p=l.length;h eval")>-1&&(t=s.exec(r[3]))?(r[3]=t[1],r[4]=t[2],r[5]=null):0!==h||r[5]||void 0===e.columnNumber||(u[0].column=e.columnNumber+1),n={url:r[3],func:r[1]||S,args:r[2]?r[2].split(","):[],line:r[4]?+r[4]:null,column:r[5]?+r[5]:null}}if(!n.func&&n.line&&(n.func=S),n.url&&"blob:"===n.url.substr(0,5)){var d=new XMLHttpRequest;if(d.open("GET",n.url,!1),d.send(null),200===d.status){var g=d.responseText||"",m=(g=g.slice(-300)).match(/\/\/# sourceMappingURL=(.*)$/);if(m){var _=m[1];"~"===_.charAt(0)&&(_=("undefined"==typeof document||null==document.location?"":document.location.origin?document.location.origin:document.location.protocol+"//"+document.location.hostname+(document.location.port?":"+document.location.port:""))+_.slice(1)),n.url=_.slice(0,-4)}}}u.push(n)}return u.length?{name:e.name,message:e.message,url:C(),stack:u}:null}}function t(e,t,r,n){var o={url:t,line:r};if(o.url&&o.line){if(e.incomplete=!1,o.func||(o.func=S),e.stack.length>0&&e.stack[0].url===o.url){if(e.stack[0].line===o.line)return!1;if(!e.stack[0].line&&e.stack[0].func===o.func)return e.stack[0].line=o.line,!1}return e.stack.unshift(o),e.partial=!0,!0}return e.incomplete=!0,!1}function r(e,o){for(var i,a,s=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,c=[],l={},u=!1,h=r.caller;h&&!u;h=h.caller)if(h!==n&&h!==w.report){if(a={url:null,func:S,line:null,column:null},h.name?a.func=h.name:(i=s.exec(h.toString()))&&(a.func=i[1]),void 0===a.func)try{a.func=i.input.substring(0,i.input.indexOf("{"))}catch(e){}l[""+h]?u=!0:l[""+h]=!0,c.push(a)}o&&c.splice(0,o);var p={name:e.name,message:e.message,url:C(),stack:c};return t(p,e.sourceURL||e.fileName,e.line||e.lineNumber,e.message||e.description),p}function n(t,n){var o=null;n=null==n?0:+n;try{if(o=e(t))return o}catch(e){if(w.debug)throw e}try{if(o=r(t,n+1))return o}catch(e){if(w.debug)throw e}return{name:t.name,message:t.message,url:C()}}return n.augmentStackTraceWithInitialElement=t,n.computeStackTraceFromStackProp=e,n}();var R=w;function j(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function T(e,t,r,n,o,i){return j((a=j(j(t,e),j(n,i)))<<(s=o)|a>>>32-s,r);var a,s}function F(e,t,r,n,o,i,a){return T(t&r|~t&n,e,t,o,i,a)}function D(e,t,r,n,o,i,a){return T(t&n|r&~n,e,t,o,i,a)}function A(e,t,r,n,o,i,a){return T(t^r^n,e,t,o,i,a)}function B(e,t,r,n,o,i,a){return T(r^(t|~n),e,t,o,i,a)}function L(e,t){var r,n,o,i,a;e[t>>5]|=128<>>9<<4)]=t;var s=1732584193,c=-271733879,l=-1732584194,u=271733878;for(r=0;r>5]>>>t%32&255);return r}function H(e){var t,r=[];for(r[(e.length>>2)-1]=void 0,t=0;t>5]|=(255&e.charCodeAt(t/8))<>>4&15)+"0123456789abcdef".charAt(15&t);return n}function P(e){return unescape(encodeURIComponent(e))}function U(e){return function(e){return M(L(H(e),8*e.length))}(P(e))}function N(e,t){return function(e,t){var r,n,o=H(e),i=[],a=[];for(i[15]=a[15]=void 0,o.length>16&&(o=L(o,8*e.length)),r=0;r<16;r+=1)i[r]=909522486^o[r],a[r]=1549556828^o[r];return n=L(i.concat(H(t)),512+8*t.length),M(L(a.concat(n),640))}(P(e),P(t))}var q=function(e,t,r){return t?r?N(t,e):I(N(t,e)):r?U(e):I(U(e))};function z(e){this.name="RavenConfigError",this.message=e}z.prototype=new Error,z.prototype.constructor=z;var K=z,W=function(e,t,r){var n=e[t],o=e;if(t in e){var i="warn"===t?"warning":t;e[t]=function(){var e=[].slice.call(arguments),a=E.safeJoin(e," "),s={level:i,logger:"console",extra:{arguments:e}};"assert"===t?!1===e[0]&&(a="Assertion failed: "+(E.safeJoin(e.slice(1)," ")||"console.assert"),s.extra.arguments=e.slice(1),r&&r(a,s)):r&&r(a,s),n&&Function.prototype.apply.call(n,o,e)}}},V=E.isErrorEvent,$=E.isDOMError,X=E.isDOMException,J=E.isError,G=E.isObject,Y=E.isPlainObject,Z=E.isUndefined,Q=E.isFunction,ee=E.isString,te=E.isArray,re=E.isEmptyObject,ne=E.each,oe=E.objectMerge,ie=E.truncate,ae=E.objectFrozen,se=E.hasKey,ce=E.joinRegExp,le=E.urlencode,ue=E.uuid4,he=E.htmlTreeAsString,pe=E.isSameException,fe=E.isSameStacktrace,de=E.parseUrl,ge=E.fill,me=E.supportsFetch,_e=E.supportsReferrerPolicy,ve=E.serializeKeysForMessage,be=E.serializeException,ye=E.sanitize,Ee=W,we="source protocol user pass host port path".split(" "),xe=/^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/;function ke(){return+new Date}var Se="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},Oe=Se.document,Ce=Se.navigator;function Re(e,t){return Q(t)?function(r){return t(r,e)}:t}function je(){for(var e in this._hasJSON=!("object"!=typeof JSON||!JSON.stringify),this._hasDocument=!Z(Oe),this._hasNavigator=!Z(Ce),this._lastCapturedException=null,this._lastData=null,this._lastEventId=null,this._globalServer=null,this._globalKey=null,this._globalProject=null,this._globalContext={},this._globalOptions={release:Se.SENTRY_RELEASE&&Se.SENTRY_RELEASE.id,logger:"javascript",ignoreErrors:[],ignoreUrls:[],whitelistUrls:[],includePaths:[],headers:null,collectWindowErrors:!0,captureUnhandledRejections:!0,maxMessageLength:0,maxUrlLength:250,stackTraceLimit:50,autoBreadcrumbs:!0,instrument:!0,sampleRate:1,sanitizeKeys:[]},this._fetchDefaults={method:"POST",referrerPolicy:_e()?"origin":""},this._ignoreOnError=0,this._isRavenInstalled=!1,this._originalErrorStackTraceLimit=Error.stackTraceLimit,this._originalConsole=Se.console||{},this._originalConsoleMethods={},this._plugins=[],this._startTime=ke(),this._wrappedBuiltIns=[],this._breadcrumbs=[],this._lastCapturedEvent=null,this._keypressTimeout,this._location=Se.location,this._lastHref=this._location&&this._location.href,this._resetBackoff(),this._originalConsole)this._originalConsoleMethods[e]=this._originalConsole[e]}je.prototype={VERSION:"3.27.0",debug:!1,TraceKit:R,config:function(e,t){var r=this;if(r._globalServer)return this._logDebug("error","Error: Raven has already been configured"),r;if(!e)return r;var n=r._globalOptions;t&&ne(t,function(e,t){"tags"===e||"extra"===e||"user"===e?r._globalContext[e]=t:n[e]=t}),r.setDSN(e),n.ignoreErrors.push(/^Script error\.?$/),n.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/),n.ignoreErrors=ce(n.ignoreErrors),n.ignoreUrls=!!n.ignoreUrls.length&&ce(n.ignoreUrls),n.whitelistUrls=!!n.whitelistUrls.length&&ce(n.whitelistUrls),n.includePaths=ce(n.includePaths),n.maxBreadcrumbs=Math.max(0,Math.min(n.maxBreadcrumbs||100,100));var o={xhr:!0,console:!0,dom:!0,location:!0,sentry:!0},i=n.autoBreadcrumbs;"[object Object]"==={}.toString.call(i)?i=oe(o,i):!1!==i&&(i=o),n.autoBreadcrumbs=i;var a={tryCatch:!0},s=n.instrument;return"[object Object]"==={}.toString.call(s)?s=oe(a,s):!1!==s&&(s=a),n.instrument=s,R.collectWindowErrors=!!n.collectWindowErrors,r},install:function(){var e=this;return e.isSetup()&&!e._isRavenInstalled&&(R.report.subscribe(function(){e._handleOnErrorStackInfo.apply(e,arguments)}),e._globalOptions.captureUnhandledRejections&&e._attachPromiseRejectionHandler(),e._patchFunctionToString(),e._globalOptions.instrument&&e._globalOptions.instrument.tryCatch&&e._instrumentTryCatch(),e._globalOptions.autoBreadcrumbs&&e._instrumentBreadcrumbs(),e._drainPlugins(),e._isRavenInstalled=!0),Error.stackTraceLimit=e._globalOptions.stackTraceLimit,this},setDSN:function(e){var t=this._parseDSN(e),r=t.path.lastIndexOf("/"),n=t.path.substr(1,r);this._dsn=e,this._globalKey=t.user,this._globalSecret=t.pass&&t.pass.substr(1),this._globalProject=t.path.substr(r+1),this._globalServer=this._getGlobalServer(t),this._globalEndpoint=this._globalServer+"/"+n+"api/"+this._globalProject+"/store/",this._resetBackoff()},context:function(e,t,r){return Q(e)&&(r=t||[],t=e,e={}),this.wrap(e,t).apply(this,r)},wrap:function(e,t,r){var n=this;if(Z(t)&&!Q(e))return e;if(Q(e)&&(t=e,e=void 0),!Q(t))return t;try{if(t.__raven__)return t;if(t.__raven_wrapper__)return t.__raven_wrapper__}catch(e){return t}function o(){var o=[],i=arguments.length,a=!e||e&&!1!==e.deep;for(r&&Q(r)&&r.apply(this,arguments);i--;)o[i]=a?n.wrap(e,arguments[i]):arguments[i];try{return t.apply(this,o)}catch(t){throw n._ignoreNextOnError(),n.captureException(t,e),t}}for(var i in t)se(t,i)&&(o[i]=t[i]);return o.prototype=t.prototype,t.__raven_wrapper__=o,o.__raven__=!0,o.__orig__=t,o},uninstall:function(){return R.report.uninstall(),this._detachPromiseRejectionHandler(),this._unpatchFunctionToString(),this._restoreBuiltIns(),this._restoreConsole(),Error.stackTraceLimit=this._originalErrorStackTraceLimit,this._isRavenInstalled=!1,this},_promiseRejectionHandler:function(e){this._logDebug("debug","Raven caught unhandled promise rejection:",e),this.captureException(e.reason,{mechanism:{type:"onunhandledrejection",handled:!1}})},_attachPromiseRejectionHandler:function(){return this._promiseRejectionHandler=this._promiseRejectionHandler.bind(this),Se.addEventListener&&Se.addEventListener("unhandledrejection",this._promiseRejectionHandler),this},_detachPromiseRejectionHandler:function(){return Se.removeEventListener&&Se.removeEventListener("unhandledrejection",this._promiseRejectionHandler),this},captureException:function(e,t){if(t=oe({trimHeadFrames:0},t||{}),V(e)&&e.error)e=e.error;else{if($(e)||X(e)){var r=e.name||($(e)?"DOMError":"DOMException"),n=e.message?r+": "+e.message:r;return this.captureMessage(n,oe(t,{stacktrace:!0,trimHeadFrames:t.trimHeadFrames+1}))}if(J(e))e=e;else{if(!Y(e))return this.captureMessage(e,oe(t,{stacktrace:!0,trimHeadFrames:t.trimHeadFrames+1}));t=this._getCaptureExceptionOptionsFromPlainObject(t,e),e=new Error(t.message)}}this._lastCapturedException=e;try{var o=R.computeStackTrace(e);this._handleStackInfo(o,t)}catch(t){if(e!==t)throw t}return this},_getCaptureExceptionOptionsFromPlainObject:function(e,t){var r=Object.keys(t).sort(),n=oe(e,{message:"Non-Error exception captured with keys: "+ve(r),fingerprint:[q(r)],extra:e.extra||{}});return n.extra.__serialized__=be(t),n},captureMessage:function(e,t){if(!this._globalOptions.ignoreErrors.test||!this._globalOptions.ignoreErrors.test(e)){var r,n=oe({message:e+=""},t=t||{});try{throw new Error(e)}catch(e){r=e}r.name=null;var o=R.computeStackTrace(r),i=te(o.stack)&&o.stack[1];i&&"Raven.captureException"===i.func&&(i=o.stack[2]);var a=i&&i.url||"";if((!this._globalOptions.ignoreUrls.test||!this._globalOptions.ignoreUrls.test(a))&&(!this._globalOptions.whitelistUrls.test||this._globalOptions.whitelistUrls.test(a))){if(this._globalOptions.stacktrace||t.stacktrace||""===n.message){n.fingerprint=null==n.fingerprint?e:n.fingerprint,(t=oe({trimHeadFrames:0},t)).trimHeadFrames+=1;var s=this._prepareFrames(o,t);n.stacktrace={frames:s.reverse()}}return n.fingerprint&&(n.fingerprint=te(n.fingerprint)?n.fingerprint:[n.fingerprint]),this._send(n),this}}},captureBreadcrumb:function(e){var t=oe({timestamp:ke()/1e3},e);if(Q(this._globalOptions.breadcrumbCallback)){var r=this._globalOptions.breadcrumbCallback(t);if(G(r)&&!re(r))t=r;else if(!1===r)return this}return this._breadcrumbs.push(t),this._breadcrumbs.length>this._globalOptions.maxBreadcrumbs&&this._breadcrumbs.shift(),this},addPlugin:function(e){var t=[].slice.call(arguments,1);return this._plugins.push([e,t]),this._isRavenInstalled&&this._drainPlugins(),this},setUserContext:function(e){return this._globalContext.user=e,this},setExtraContext:function(e){return this._mergeContext("extra",e),this},setTagsContext:function(e){return this._mergeContext("tags",e),this},clearContext:function(){return this._globalContext={},this},getContext:function(){return JSON.parse(r(this._globalContext))},setEnvironment:function(e){return this._globalOptions.environment=e,this},setRelease:function(e){return this._globalOptions.release=e,this},setDataCallback:function(e){var t=this._globalOptions.dataCallback;return this._globalOptions.dataCallback=Re(t,e),this},setBreadcrumbCallback:function(e){var t=this._globalOptions.breadcrumbCallback;return this._globalOptions.breadcrumbCallback=Re(t,e),this},setShouldSendCallback:function(e){var t=this._globalOptions.shouldSendCallback;return this._globalOptions.shouldSendCallback=Re(t,e),this},setTransport:function(e){return this._globalOptions.transport=e,this},lastException:function(){return this._lastCapturedException},lastEventId:function(){return this._lastEventId},isSetup:function(){return!!this._hasJSON&&(!!this._globalServer||(this.ravenNotConfiguredError||(this.ravenNotConfiguredError=!0,this._logDebug("error","Error: Raven has not been configured.")),!1))},afterLoad:function(){var e=Se.RavenConfig;e&&this.config(e.dsn,e.config).install()},showReportDialog:function(e){if(Oe){if(!(e=oe({eventId:this.lastEventId(),dsn:this._dsn,user:this._globalContext.user||{}},e)).eventId)throw new K("Missing eventId");if(!e.dsn)throw new K("Missing DSN");var t=encodeURIComponent,r=[];for(var n in e)if("user"===n){var o=e.user;o.name&&r.push("name="+t(o.name)),o.email&&r.push("email="+t(o.email))}else r.push(t(n)+"="+t(e[n]));var i=this._getGlobalServer(this._parseDSN(e.dsn)),a=Oe.createElement("script");a.async=!0,a.src=i+"/api/embed/error-page/?"+r.join("&"),(Oe.head||Oe.body).appendChild(a)}},_ignoreNextOnError:function(){var e=this;this._ignoreOnError+=1,setTimeout(function(){e._ignoreOnError-=1})},_triggerEvent:function(e,t){var r,n;if(this._hasDocument){for(n in t=t||{},e="raven"+e.substr(0,1).toUpperCase()+e.substr(1),Oe.createEvent?(r=Oe.createEvent("HTMLEvents")).initEvent(e,!0,!0):(r=Oe.createEventObject()).eventType=e,t)se(t,n)&&(r[n]=t[n]);if(Oe.createEvent)Oe.dispatchEvent(r);else try{Oe.fireEvent("on"+r.eventType.toLowerCase(),r)}catch(e){}}},_breadcrumbEventHandler:function(e){var t=this;return function(r){if(t._keypressTimeout=null,t._lastCapturedEvent!==r){var n;t._lastCapturedEvent=r;try{n=he(r.target)}catch(e){n=""}t.captureBreadcrumb({category:"ui."+e,message:n})}}},_keypressEventHandler:function(){var e=this;return function(t){var r;try{r=t.target}catch(e){return}var n=r&&r.tagName;if(n&&("INPUT"===n||"TEXTAREA"===n||r.isContentEditable)){var o=e._keypressTimeout;o||e._breadcrumbEventHandler("input")(t),clearTimeout(o),e._keypressTimeout=setTimeout(function(){e._keypressTimeout=null},1e3)}}},_captureUrlChange:function(e,t){var r=de(this._location.href),n=de(t),o=de(e);this._lastHref=t,r.protocol===n.protocol&&r.host===n.host&&(t=n.relative),r.protocol===o.protocol&&r.host===o.host&&(e=o.relative),this.captureBreadcrumb({category:"navigation",data:{to:t,from:e}})},_patchFunctionToString:function(){var e=this;e._originalFunctionToString=Function.prototype.toString,Function.prototype.toString=function(){return"function"==typeof this&&this.__raven__?e._originalFunctionToString.apply(this.__orig__,arguments):e._originalFunctionToString.apply(this,arguments)}},_unpatchFunctionToString:function(){this._originalFunctionToString&&(Function.prototype.toString=this._originalFunctionToString)},_instrumentTryCatch:function(){var e=this,t=e._wrappedBuiltIns;function r(t){return function(r,n){for(var o=new Array(arguments.length),i=0;i"}}},a)),t.apply?t.apply(this,o):t(o[0],o[1])}}var n=this._globalOptions.autoBreadcrumbs;function o(r){var o=Se[r]&&Se[r].prototype;o&&o.hasOwnProperty&&o.hasOwnProperty("addEventListener")&&(ge(o,"addEventListener",function(t){return function(o,i,a,s){try{i&&i.handleEvent&&(i.handleEvent=e.wrap({mechanism:{type:"instrument",data:{target:r,function:"handleEvent",handler:i&&i.name||""}}},i.handleEvent))}catch(e){}var c,l,u;return n&&n.dom&&("EventTarget"===r||"Node"===r)&&(l=e._breadcrumbEventHandler("click"),u=e._keypressEventHandler(),c=function(e){if(e){var t;try{t=e.type}catch(e){return}return"click"===t?l(e):"keypress"===t?u(e):void 0}}),t.call(this,o,e.wrap({mechanism:{type:"instrument",data:{target:r,function:"addEventListener",handler:i&&i.name||""}}},i,c),a,s)}},t),ge(o,"removeEventListener",function(e){return function(t,r,n,o){try{r=r&&(r.__raven_wrapper__?r.__raven_wrapper__:r)}catch(e){}return e.call(this,t,r,n,o)}},t))}ge(Se,"setTimeout",r,t),ge(Se,"setInterval",r,t),Se.requestAnimationFrame&&ge(Se,"requestAnimationFrame",function(t){return function(r){return t(e.wrap({mechanism:{type:"instrument",data:{function:"requestAnimationFrame",handler:t&&t.name||""}}},r))}},t);for(var i=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],a=0;a"}}},r)})}if(t.xhr&&"XMLHttpRequest"in Se){var o=Se.XMLHttpRequest&&Se.XMLHttpRequest.prototype;ge(o,"open",function(t){return function(r,n){return ee(n)&&-1===n.indexOf(e._globalKey)&&(this.__raven_xhr={method:r,url:n,status_code:null}),t.apply(this,arguments)}},r),ge(o,"send",function(t){return function(){var r=this;function o(){if(r.__raven_xhr&&4===r.readyState){try{r.__raven_xhr.status_code=r.status}catch(e){}e.captureBreadcrumb({type:"http",category:"xhr",data:r.__raven_xhr})}}for(var i=["onload","onerror","onprogress"],a=0;a"}}},t,o)}):r.onreadystatechange=o,t.apply(this,arguments)}},r)}t.xhr&&me()&&ge(Se,"fetch",function(t){return function(){for(var r=new Array(arguments.length),n=0;n2?arguments[2]:void 0;return r&&e._captureUrlChange(e._lastHref,r+""),t.apply(this,arguments)}};ge(Se.history,"pushState",c,r),ge(Se.history,"replaceState",c,r)}if(t.console&&"console"in Se&&console.log){var l=function(t,r){e.captureBreadcrumb({message:t,level:r.level,category:"console"})};ne(["debug","info","warn","error","log"],function(e,t){Ee(console,t,l)})}},_restoreBuiltIns:function(){for(var e;this._wrappedBuiltIns.length;){var t=(e=this._wrappedBuiltIns.shift())[0],r=e[1],n=e[2];t[r]=n}},_restoreConsole:function(){for(var e in this._originalConsoleMethods)this._originalConsole[e]=this._originalConsoleMethods[e]},_drainPlugins:function(){var e=this;ne(this._plugins,function(t,r){var n=r[0],o=r[1];n.apply(e,[e].concat(o))})},_parseDSN:function(e){var t=xe.exec(e),r={},n=7;try{for(;n--;)r[we[n]]=t[n]||""}catch(t){throw new K("Invalid DSN: "+e)}if(r.pass&&!this._globalOptions.allowSecretKey)throw new K("Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key");return r},_getGlobalServer:function(e){var t="//"+e.host+(e.port?":"+e.port:"");return e.protocol&&(t=e.protocol+":"+t),t},_handleOnErrorStackInfo:function(e,t){(t=t||{}).mechanism=t.mechanism||{type:"onerror",handled:!1},this._ignoreOnError||this._handleStackInfo(e,t)},_handleStackInfo:function(e,t){var r=this._prepareFrames(e,t);this._triggerEvent("handle",{stackInfo:e,options:t}),this._processException(e.name,e.message,e.url,e.lineno,r,t)},_prepareFrames:function(e,t){var r=this,n=[];if(e.stack&&e.stack.length&&(ne(e.stack,function(t,o){var i=r._normalizeFrame(o,e.url);i&&n.push(i)}),t&&t.trimHeadFrames))for(var o=0;o0&&(e.breadcrumbs={values:[].slice.call(this._breadcrumbs,0)}),this._globalContext.user&&(e.user=this._globalContext.user),t.environment&&(e.environment=t.environment),t.release&&(e.release=t.release),t.serverName&&(e.server_name=t.serverName),e=this._sanitizeData(e),Object.keys(e).forEach(function(t){(null==e[t]||""===e[t]||re(e[t]))&&delete e[t]}),Q(t.dataCallback)&&(e=t.dataCallback(e)||e),e&&!re(e)&&(Q(t.shouldSendCallback)&&!t.shouldSendCallback(e)||(this._shouldBackoff()?this._logDebug("warn","Raven dropped error due to backoff: ",e):"number"==typeof t.sampleRate?Math.random()