(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4780],{96829:function(e){e.exports=function(){var e,t,n,r,o=["navigation","request","process","log","user","state","error","manual"],a=function(e,t,n){for(var r=n,o=0,a=e.length;o<a;o++)r=t(r,e[o],o,e);return r},i=function(e,t){return a(e,function(e,n,r,o){return t(n,r,o)?e.concat(n):e},[])},s=function(e,t){return a(e,function(e,n,r,o){return!0===e||n===t},!1)},u=function(e){return"[object Array]"===Object.prototype.toString.call(e)},c=!({toString:null}).propertyIsEnumerable("toString"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(e){var t,n=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.push(t);if(!c)return n;for(var r=0,o=l.length;r<o;r++)Object.prototype.hasOwnProperty.call(e,l[r])&&n.push(l[r]);return n},d=function(e,t){return void 0===e&&(e=1),void 0===t&&(t=1/0),function(n){return"number"==typeof n&&parseInt(""+n,10)===n&&n>=e&&n<=t}},g=function(e){return"function"==typeof e||u(e)&&i(e,function(e){return"function"==typeof e}).length===e.length},h=function(e){return"string"==typeof e&&!!e.length},p={},v=function(){return{unhandledExceptions:!0,unhandledRejections:!0}};p.schema={apiKey:{defaultValue:function(){return null},message:"is required",validate:h},appVersion:{defaultValue:function(){},message:"should be a string",validate:function(e){return void 0===e||h(e)}},appType:{defaultValue:function(){},message:"should be a string",validate:function(e){return void 0===e||h(e)}},autoDetectErrors:{defaultValue:function(){return!0},message:"should be true|false",validate:function(e){return!0===e||!1===e}},enabledErrorTypes:{defaultValue:function(){return v()},message:"should be an object containing the flags { unhandledExceptions:true|false, unhandledRejections:true|false }",allowPartialObject:!0,validate:function(e){if("object"!=typeof e||!e)return!1;var t=f(e),n=f(v());return!(i(t,function(e){return s(n,e)}).length<t.length)&&!(i(f(e),function(t){return"boolean"!=typeof e[t]}).length>0)}},onError:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:g},onSession:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:g},onBreadcrumb:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:g},endpoints:{defaultValue:function(e){return void 0===e?{notify:"https://notify.bugsnag.com",sessions:"https://sessions.bugsnag.com"}:{notify:null,sessions:null}},message:"should be an object containing endpoint URLs { notify, sessions }",validate:function(e){return e&&"object"==typeof e&&h(e.notify)&&h(e.sessions)&&0===i(f(e),function(e){return!s(["notify","sessions"],e)}).length}},autoTrackSessions:{defaultValue:function(e){return!0},message:"should be true|false",validate:function(e){return!0===e||!1===e}},enabledReleaseStages:{defaultValue:function(){return null},message:"should be an array of strings",validate:function(e){return null===e||u(e)&&i(e,function(e){return"string"==typeof e}).length===e.length}},releaseStage:{defaultValue:function(){return"production"},message:"should be a string",validate:function(e){return"string"==typeof e&&e.length}},maxBreadcrumbs:{defaultValue:function(){return 25},message:"should be a number ≤100",validate:function(e){return d(0,100)(e)}},enabledBreadcrumbTypes:{defaultValue:function(){return o},message:"should be null or a list of available breadcrumb types ("+o.join(",")+")",validate:function(e){return null===e||u(e)&&a(e,function(e,t){return!1===e?e:s(o,t)},!0)}},context:{defaultValue:function(){},message:"should be a string",validate:function(e){return void 0===e||"string"==typeof e}},user:{defaultValue:function(){return{}},message:"should be an object with { id, email, name } properties",validate:function(e){return null===e||e&&a(f(e),function(e,t){return e&&s(["id","email","name"],t)},!0)}},metadata:{defaultValue:function(){return{}},message:"should be an object",validate:function(e){return"object"==typeof e&&null!==e}},logger:{defaultValue:function(){},message:"should be null or an object with methods { debug, info, warn, error }",validate:function(e){return!e||e&&a(["debug","info","warn","error"],function(t,n){return t&&"function"==typeof e[n]},!0)}},redactedKeys:{defaultValue:function(){return["password"]},message:"should be an array of strings|regexes",validate:function(e){return u(e)&&e.length===i(e,function(e){return"string"==typeof e||e&&"function"==typeof e.test}).length}},plugins:{defaultValue:function(){return[]},message:"should be an array of plugin objects",validate:function(e){return u(e)&&e.length===i(e,function(e){return e&&"object"==typeof e&&"function"==typeof e.load}).length}},featureFlags:{defaultValue:function(){return[]},message:'should be an array of objects that have a "name" property',validate:function(e){return u(e)&&e.length===i(e,function(e){return e&&"object"==typeof e&&"string"==typeof e.name}).length}}};var m=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y=function(e,t){return a(e,function(e,n,r,o){return e.concat(t(n,r,o))},[])};function b(){return(b=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var _=p.schema,S={releaseStage:m({},_.releaseStage,{defaultValue:function(){return/^localhost(:\d+)?$/.test(window.location.host)?"development":"production"}}),appType:b({},_.appType,{defaultValue:function(){return"browser"}}),logger:m({},_.logger,{defaultValue:function(){return"undefined"!=typeof console&&"function"==typeof console.debug?E():void 0}})},E=function(){var e={},t=console.log;return y(["debug","info","warn","error"],function(n){var r=console[n];e[n]="function"==typeof r?r.bind(console,"[bugsnag]"):t.bind(console,"[bugsnag]")}),e},w=function(){function e(e,t,n,r){void 0===r&&(r=new Date),this.type=n,this.message=e,this.metadata=t,this.timestamp=r}return e.prototype.toJSON=function(){return{type:this.type,name:this.message,timestamp:this.timestamp,metaData:this.metadata}},e}(),O={};e=function(){"use strict";function e(e){return!isNaN(parseFloat(e))&&isFinite(e)}function t(e){return e.charAt(0).toUpperCase()+e.substring(1)}function n(e){return function(){return this[e]}}var r=["isConstructor","isEval","isNative","isToplevel"],o=["columnNumber","lineNumber"],a=["fileName","functionName","source"],i=r.concat(o,a,["args"]);function s(e){if(e instanceof Object)for(var n=0;n<i.length;n++)e.hasOwnProperty(i[n])&&void 0!==e[i[n]]&&this["set"+t(i[n])](e[i[n]])}s.prototype={getArgs:function(){return this.args},setArgs:function(e){if("[object Array]"!==Object.prototype.toString.call(e))throw TypeError("Args must be an Array");this.args=e},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(e){if(e instanceof s)this.evalOrigin=e;else if(e instanceof Object)this.evalOrigin=new s(e);else throw TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){return(this.getFunctionName()||"{anonymous}")+"("+(this.getArgs()||[]).join(",")+")"+(this.getFileName()?"@"+this.getFileName():"")+(e(this.getLineNumber())?":"+this.getLineNumber():"")+(e(this.getColumnNumber())?":"+this.getColumnNumber():"")}};for(var u=0;u<r.length;u++)s.prototype["get"+t(r[u])]=n(r[u]),s.prototype["set"+t(r[u])]=function(e){return function(t){this[e]=!!t}}(r[u]);for(var c=0;c<o.length;c++)s.prototype["get"+t(o[c])]=n(o[c]),s.prototype["set"+t(o[c])]=function(t){return function(n){if(!e(n))throw TypeError(t+" must be a Number");this[t]=Number(n)}}(o[c]);for(var l=0;l<a.length;l++)s.prototype["get"+t(a[l])]=n(a[l]),s.prototype["set"+t(a[l])]=function(e){return function(t){this[e]=String(t)}}(a[l]);return s},"function"==typeof r&&r.amd?r("stackframe",[],e):"object"==typeof O?O=e():this.StackFrame=e();var j={};t=function(e){"use strict";var t=/(^|@)\S+\:\d+/,n=/^\s*at .*(\S+\:\d+|\(native\))/m,r=/^(eval@)?(\[native code\])?$/;return{parse:function(e){if(void 0!==e.stacktrace||void 0!==e["opera#sourceloc"])return this.parseOpera(e);if(e.stack&&e.stack.match(n))return this.parseV8OrIE(e);if(e.stack)return this.parseFFOrSafari(e);throw Error("Cannot parse given Error object")},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?:\:(\d+))?(?:\:(\d+))?$/.exec(e.replace(/[\(\)]/g,""));return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(t){return t.stack.split("\n").filter(function(e){return!!e.match(n)},this).map(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,"("),r=n.match(/ (\((.+):(\d+):(\d+)\)$)/),o=(n=r?n.replace(r[0],""):n).split(/\s+/).slice(1),a=this.extractLocation(r?r[1]:o.pop());return new e({functionName:o.join(" ")||void 0,fileName:["eval","<anonymous>"].indexOf(a[0])>-1?void 0:a[0],lineNumber:a[1],columnNumber:a[2],source:t})},this)},parseFFOrSafari:function(t){return t.stack.split("\n").filter(function(e){return!e.match(r)},this).map(function(t){if(t.indexOf(" > eval")>-1&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g,":$1")),-1===t.indexOf("@")&&-1===t.indexOf(":"))return new e({functionName:t});var n=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=t.match(n),o=r&&r[1]?r[1]:void 0,a=this.extractLocation(t.replace(n,""));return new e({functionName:o,fileName:a[0],lineNumber:a[1],columnNumber:a[2],source: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=[],a=2,i=r.length;a<i;a+=2){var s=n.exec(r[a]);s&&o.push(new e({fileName:s[2],lineNumber:s[1],source:r[a]}))}return o},parseOpera10:function(t){for(var n=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=t.stacktrace.split("\n"),o=[],a=0,i=r.length;a<i;a+=2){var s=n.exec(r[a]);s&&o.push(new e({functionName:s[3]||void 0,fileName:s[2],lineNumber:s[1],source:r[a]}))}return o},parseOpera11:function(n){return n.stack.split("\n").filter(function(e){return!!e.match(t)&&!e.match(/^Error created at/)},this).map(function(t){var n,r=t.split("@"),o=this.extractLocation(r.pop()),a=r.shift()||"",i=a.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^\)]*\)/g,"")||void 0;return a.match(/\(([^\)]*)\)/)&&(n=a.replace(/^[^\(]+\(([^\)]*)\)$/,"$1")),new e({functionName:i,args:void 0===n||"[arguments not available]"===n?void 0:n.split(","),fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:t})},this)}}},"function"==typeof r&&r.amd?r("error-stack-parser",["stackframe"],t):"object"==typeof j?j=t(O):this.ErrorStackParser=t(this.StackFrame);var k=j,N=function(e,t,n,r){var o,a,i,s;return JSON.stringify((o=r&&r.redactedKeys?r.redactedKeys:[],a=r&&r.redactedPaths?r.redactedPaths:[],i=[],s=0,function e(t,n){function r(){return n.length>8&&s>25e3}if(s++,n.length>20||r())return"...";if(null===t||"object"!=typeof t)return t;if(function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return!0;return!1}(i,t))return"[Circular]";if(i.push(t),"function"==typeof t.toJSON)try{s--;var u=e(t.toJSON(),n);return i.pop(),u}catch(e){return x(e)}if(t instanceof Error||/^\[object (Error|(Dom)?Exception)\]$/.test(Object.prototype.toString.call(t))){s--;var c=e({name:t.name,message:t.message},n);return i.pop(),c}if("[object Array]"===Object.prototype.toString.call(t)){for(var l=[],f=0,d=t.length;f<d;f++){if(r()){l.push("...");break}l.push(e(t[f],n.concat("[]")))}return i.pop(),l}var g={};try{for(var h in t)if(Object.prototype.hasOwnProperty.call(t,h)){if(function(e,t){for(var n=0,r=e.length;n<r;n++)if(0===t.indexOf(e[n]))return!0;return!1}(a,n.join("."))&&function(e,t){for(var n=0,r=e.length;n<r;n++)if("string"==typeof e[n]&&e[n].toLowerCase()===t.toLowerCase()||e[n]&&"function"==typeof e[n].test&&e[n].test(t))return!0;return!1}(o,h)){g[h]="[REDACTED]";continue}if(r()){g[h]="...";break}g[h]=e(function(e,t){try{return e[t]}catch(e){return x(e)}}(t,h),n.concat(h))}}catch(e){}return i.pop(),g}(e,[])),t,n)};function x(e){return"[Throws: "+(e?e.message:"?")+"]"}function R(e,t,n,r){if("string"==typeof n){void 0===r?r=null:null!==r&&"string"!=typeof r&&(r=N(r));var o=t[n];if("number"==typeof o){e[o]={name:n,variant:r};return}e.push({name:n,variant:r}),t[n]=e.length-1}}var B={add:R,clear:function(e,t,n){var r=t[n];"number"==typeof r&&(e[r]=null,delete t[n])},merge:function(e,t,n){if(u(t)){for(var r=0;r<t.length;++r){var o=t[r];null!==o&&"object"==typeof o&&R(e,n,o.name,o.variant)}return e}},toEventApi:function(e){return y(i(e,Boolean),function(e){var t=e.name,n=e.variant,r={featureFlag:t};return"string"==typeof n&&(r.variant=n),r})}},L=function(e){return!!e&&(!!e.stack||!!e.stacktrace||!!e["opera#sourceloc"])&&"string"==typeof(e.stack||e.stacktrace||e["opera#sourceloc"])&&e.stack!==e.name+": "+e.message},T=function(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return e instanceof Error}},C=function(e,t,n){if("string"==typeof t){if(!n){delete e[t];return}"__proto__"!==t&&"constructor"!==t&&"prototype"!==t&&e[t]&&delete e[t][n]}},M={add:function(e,t,n,r){var o,a;if(t){if(null===n)return C(e,t);if("object"==typeof n&&(a=n),"string"==typeof n&&((o={})[n]=r,a=o),a){if("__proto__"===t||"constructor"===t||"prototype"===t)return;e[t]||(e[t]={}),e[t]=m({},e[t],a)}}},get:function(e,t,n){if("string"==typeof t){if(!n)return e[t];if(e[t])return e[t][n]}},clear:C},q={};function I(){return(I=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n=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&&o.arguments;){for(var a=Array(o.arguments.length),i=0;i<a.length;++i)a[i]=o.arguments[i];/function(?:\s+([\w$]+))+\s*\(/.test(o.toString())?n.push(new e({functionName:RegExp.$1||void 0,args:a})):n.push(new e({args:a}));try{o=o.caller}catch(e){break}}return n}}},"function"==typeof r&&r.amd?r("stack-generator",["stackframe"],n):"object"==typeof q?q=n(O):this.StackGenerator=n(this.StackFrame);var D=function(){function e(t,n,r,o,a){void 0===r&&(r=[]),void 0===o&&(o=F()),this.apiKey=void 0,this.context=void 0,this.groupingHash=void 0,this.originalError=a,this._handledState=o,this.severity=this._handledState.severity,this.unhandled=this._handledState.unhandled,this.app={},this.device={},this.request={},this.breadcrumbs=[],this.threads=[],this._metadata={},this._features=[],this._featuresIndex={},this._user={},this._session=void 0,this._correlation=void 0,this.errors=[H(t,n,e.__type,r)]}var t=e.prototype;return t.addMetadata=function(e,t,n){return M.add(this._metadata,e,t,n)},t.setTraceCorrelation=function(e,t){"string"==typeof e&&(this._correlation=I({traceId:e},"string"==typeof t?{spanId:t}:{}))},t.getMetadata=function(e,t){return M.get(this._metadata,e,t)},t.clearMetadata=function(e,t){return M.clear(this._metadata,e,t)},t.addFeatureFlag=function(e,t){void 0===t&&(t=null),B.add(this._features,this._featuresIndex,e,t)},t.addFeatureFlags=function(e){B.merge(this._features,e,this._featuresIndex)},t.getFeatureFlags=function(){return B.toEventApi(this._features)},t.clearFeatureFlag=function(e){B.clear(this._features,this._featuresIndex,e)},t.clearFeatureFlags=function(){this._features=[],this._featuresIndex={}},t.getUser=function(){return this._user},t.setUser=function(e,t,n){this._user={id:e,email:t,name:n}},t.toJSON=function(){return{payloadVersion:"4",exceptions:y(this.errors,function(e){return m({},e,{message:e.errorMessage})}),severity:this.severity,unhandled:this._handledState.unhandled,severityReason:this._handledState.severityReason,app:this.app,device:this.device,request:this.request,breadcrumbs:this.breadcrumbs,context:this.context,groupingHash:this.groupingHash,metaData:this._metadata,user:this._user,session:this._session,featureFlags:this.getFeatureFlags(),correlation:this._correlation}},e}(),P=function(e){var t={file:e.fileName,method:A(e.functionName),lineNumber:e.lineNumber,columnNumber:e.columnNumber,code:void 0,inProject:void 0};return!(t.lineNumber>-1)||t.file||t.method||(t.file="global code"),t},A=function(e){return/^global code$/i.test(e)?"global code":e},F=function(){return{unhandled:!1,severity:"warning",severityReason:{type:"handledException"}}},V=function(e){return"string"==typeof e?e:""};function H(e,t,n,r){return{errorClass:V(e),errorMessage:V(t),type:n,stacktrace:a(r,function(e,t){var n=P(t);try{if("{}"===JSON.stringify(n))return e;return e.concat(n)}catch(t){return e}},[])}}D.getStacktrace=function(e,t,n){if(L(e))return k.parse(e).slice(t);try{return i(q.backtrace(),function(e){return -1===(e.functionName||"").indexOf("StackGenerator$$")}).slice(1+n)}catch(e){return[]}},D.create=function(e,t,n,r,o,a){void 0===o&&(o=0);var i=$(e,t,r,a),s=i[0],u=i[1];try{var c=D.getStacktrace(s,u>0?1+u+o:0,1+o);l=new D(s.name,s.message,c,n,e)}catch(t){l=new D(s.name,s.message,[],n,e)}if("InvalidError"===s.name&&l.addMetadata(""+r,"non-error parameter",K(e)),s.cause){var l,f,d=y((function e(t){return t.cause?[t].concat(e(t.cause)):[t]})(s).slice(1),function(e){var t=T(e)&&L(e)?k.parse(e):[],n=$(e,!0,"error cause")[0];return"InvalidError"===n.name&&l.addMetadata("error cause",K(e)),H(n.name,n.message,D.__type,t)});(f=l.errors).push.apply(f,d)}return l};var K=function(e){return null===e?"null":void 0===e?"undefined":e},$=function(e,t,n,r){var o,a=0,i=function(e){var t="error cause"===n?"was":"received";r&&r.warn(n+" "+t+' a non-error: "'+e+'"');var o=Error(n+" "+t+' a non-error. See "'+n+'" tab for more detail.');return o.name="InvalidError",o};if(t)switch(typeof e){case"string":case"number":case"boolean":o=Error(String(e)),a+=1;break;case"function":o=i("function"),a+=2;break;case"object":null!==e&&T(e)?o=e:null!==e&&U(e)?((o=Error(e.message||e.errorMessage)).name=e.name||e.errorClass,a+=1):(o=i(null===e?"null":"unsupported object"),a+=2);break;default:o=i("nothing"),a+=2}else T(e)?o=e:(o=i(typeof e),a+=2);if(!L(o))try{throw o}catch(e){L(e)&&(o=e,a=1)}return[o,a]};D.__type="browserjs";var U=function(e){return("string"==typeof e.name||"string"==typeof e.errorClass)&&("string"==typeof e.message||"string"==typeof e.errorMessage)},X=function(e,t,n){var r=0,o=function(){if(r>=e.length)return n(null,!0);t(e[r],function(e,t){return e?n(e):!1===t?n(null,!1):void(r++,o())})};o()},J=function(e,t,n,r){X(e,function(e,r){if("function"!=typeof e)return r(null);try{if(2!==e.length){var o=e(t);if(o&&"function"==typeof o.then)return o.then(function(e){return setTimeout(function(){return r(null,e)})},function(e){setTimeout(function(){return n(e),r(null,!0)})});return r(null,o)}e(t,function(e,t){if(e)return n(e),r(null);r(null,t)})}catch(e){n(e),r(null)}},r)},z=function(e,t,n,r){for(var o=!1,a=e.slice();!o&&a.length;)try{o=!1===a.pop()(t)}catch(e){r.error("Error occurred in "+n+" callback, continuing anyway…"),r.error(e)}return o},W=function(e,t){var n="000000000"+e;return n.substr(n.length-t)},G="object"==typeof window?window:self,Q=0;for(var Y in G)Object.hasOwnProperty.call(G,Y)&&Q++;var Z=W(((navigator.mimeTypes?navigator.mimeTypes.length:0)+navigator.userAgent.length).toString(36)+Q.toString(36),4),ee=function(){return Z},et=0;function en(){return W((1679616*Math.random()<<0).toString(36),4)}function er(){return"c"+new Date().getTime().toString(36)+W((et=et<1679616?et:0,++et-1).toString(36),4)+ee()+(en()+en())}er.fingerprint=ee;var eo=function(){function e(){this.id=er(),this.startedAt=new Date,this._handled=0,this._unhandled=0,this._user={},this.app={},this.device={}}var t=e.prototype;return t.getUser=function(){return this._user},t.setUser=function(e,t,n){this._user={id:e,email:t,name:n}},t.toJSON=function(){return{id:this.id,startedAt:this.startedAt,events:{handled:this._handled,unhandled:this._unhandled}}},t._track=function(e){this[e._handledState.unhandled?"_unhandled":"_handled"]+=1},e}(),ea=B.add,ei=B.clear,es=B.merge,eu=function(){},ec=function(){function e(t,n,r,o){var a=this;void 0===n&&(n=p.schema),void 0===r&&(r=[]),this._notifier=o,this._config={},this._schema=n,this._delivery={sendSession:eu,sendEvent:eu},this._logger={debug:eu,info:eu,warn:eu,error:eu},this._plugins={},this._breadcrumbs=[],this._session=null,this._metadata={},this._featuresIndex={},this._features=[],this._context=void 0,this._user={},this._cbs={e:[],s:[],sp:[],b:[]},this.Client=e,this.Event=D,this.Breadcrumb=w,this.Session=eo,this._config=this._configure(t,r),y(r.concat(this._config.plugins),function(e){e&&a._loadPlugin(e)}),this._depth=1;var i=this,s=this.notify;this.notify=function(){return s.apply(i,arguments)}}var t=e.prototype;return t.addMetadata=function(e,t,n){return M.add(this._metadata,e,t,n)},t.getMetadata=function(e,t){return M.get(this._metadata,e,t)},t.clearMetadata=function(e,t){return M.clear(this._metadata,e,t)},t.addFeatureFlag=function(e,t){void 0===t&&(t=null),ea(this._features,this._featuresIndex,e,t)},t.addFeatureFlags=function(e){es(this._features,e,this._featuresIndex)},t.clearFeatureFlag=function(e){ei(this._features,this._featuresIndex,e)},t.clearFeatureFlags=function(){this._features=[],this._featuresIndex={}},t.getContext=function(){return this._context},t.setContext=function(e){this._context=e},t._configure=function(e,t){var n=a(t,function(e,t){return t&&t.configSchema?m({},e,t.configSchema):e},this._schema),r=a(f(n),function(t,r){var o=n[r].defaultValue(e[r]);return void 0!==e[r]?n[r].validate(e[r])?n[r].allowPartialObject?t.config[r]=m(o,e[r]):t.config[r]=e[r]:(t.errors[r]=n[r].message,t.config[r]=o):t.config[r]=o,t},{errors:{},config:{}}),o=r.errors,i=r.config;if(n.apiKey){if(!i.apiKey)throw Error("No Bugsnag API Key set");/^[0-9a-f]{32}$/i.test(i.apiKey)||(o.apiKey="should be a string of 32 hexadecimal characters")}return this._metadata=m({},i.metadata),es(this._features,i.featureFlags,this._featuresIndex),this._user=m({},i.user),this._context=i.context,i.logger&&(this._logger=i.logger),i.onError&&(this._cbs.e=this._cbs.e.concat(i.onError)),i.onBreadcrumb&&(this._cbs.b=this._cbs.b.concat(i.onBreadcrumb)),i.onSession&&(this._cbs.s=this._cbs.s.concat(i.onSession)),f(o).length&&this._logger.warn(el(o,e)),i},t.getUser=function(){return this._user},t.setUser=function(e,t,n){this._user={id:e,email:t,name:n}},t._loadPlugin=function(e){var t=e.load(this);e.name&&(this._plugins["~"+e.name+"~"]=t)},t.getPlugin=function(e){return this._plugins["~"+e+"~"]},t._setDelivery=function(e){this._delivery=e(this)},t.startSession=function(){var e=new eo;return(e.app.releaseStage=this._config.releaseStage,e.app.version=this._config.appVersion,e.app.type=this._config.appType,e._user=m({},this._user),z(this._cbs.s,e,"onSession",this._logger))?(this._logger.debug("Session not started due to onSession callback"),this):this._sessionDelegate.startSession(this,e)},t.addOnError=function(e,t){void 0===t&&(t=!1),this._cbs.e[t?"unshift":"push"](e)},t.removeOnError=function(e){this._cbs.e=i(this._cbs.e,function(t){return t!==e})},t._addOnSessionPayload=function(e){this._cbs.sp.push(e)},t.addOnSession=function(e){this._cbs.s.push(e)},t.removeOnSession=function(e){this._cbs.s=i(this._cbs.s,function(t){return t!==e})},t.addOnBreadcrumb=function(e,t){void 0===t&&(t=!1),this._cbs.b[t?"unshift":"push"](e)},t.removeOnBreadcrumb=function(e){this._cbs.b=i(this._cbs.b,function(t){return t!==e})},t.pauseSession=function(){return this._sessionDelegate.pauseSession(this)},t.resumeSession=function(){return this._sessionDelegate.resumeSession(this)},t.leaveBreadcrumb=function(e,t,n){if(e="string"==typeof e?e:"",n="string"==typeof n&&s(o,n)?n:"manual",t="object"==typeof t&&null!==t?t:{},e){var r=new w(e,t,n);if(z(this._cbs.b,r,"onBreadcrumb",this._logger)){this._logger.debug("Breadcrumb not attached due to onBreadcrumb callback");return}this._breadcrumbs.push(r),this._breadcrumbs.length>this._config.maxBreadcrumbs&&(this._breadcrumbs=this._breadcrumbs.slice(this._breadcrumbs.length-this._config.maxBreadcrumbs))}},t._isBreadcrumbTypeEnabled=function(e){var t=this._config.enabledBreadcrumbTypes;return null===t||s(t,e)},t.notify=function(e,t,n){void 0===n&&(n=eu);var r=D.create(e,!0,void 0,"notify()",this._depth+1,this._logger);this._notify(r,t,n)},t._notify=function(t,n,r){var o=this;if(void 0===r&&(r=eu),t.app=m({},t.app,{releaseStage:this._config.releaseStage,version:this._config.appVersion,type:this._config.appType}),t.context=t.context||this._context,t._metadata=m({},t._metadata,this._metadata),t._user=m({},t._user,this._user),t.breadcrumbs=this._breadcrumbs.slice(),es(t._features,this._features,t._featuresIndex),null!==this._config.enabledReleaseStages&&!s(this._config.enabledReleaseStages,this._config.releaseStage))return this._logger.warn("Event not sent due to releaseStage/enabledReleaseStages configuration"),r(null,t);var a=t.severity,i=function(e){o._logger.error("Error occurred in onError callback, continuing anyway…"),o._logger.error(e)};J([].concat(this._cbs.e).concat(n),t,i,function(n,s){if(n&&i(n),!s)return o._logger.debug("Event not sent due to onError callback"),r(null,t);o._isBreadcrumbTypeEnabled("error")&&e.prototype.leaveBreadcrumb.call(o,t.errors[0].errorClass,{errorClass:t.errors[0].errorClass,errorMessage:t.errors[0].errorMessage,severity:t.severity},"error"),a!==t.severity&&(t._handledState.severityReason={type:"userCallbackSetSeverity"}),t.unhandled!==t._handledState.unhandled&&(t._handledState.severityReason.unhandledOverridden=!0,t._handledState.unhandled=t.unhandled),o._session&&(o._session._track(t),t._session=o._session),o._delivery.sendEvent({apiKey:t.apiKey||o._config.apiKey,notifier:o._notifier,events:[t]},function(e){return r(e,t)})})},e}(),el=function(e,t){return Error("Invalid configuration\n"+y(f(e),function(n){return"  - "+n+" "+e[n]+", got "+ef(t[n])}).join("\n\n"))},ef=function(e){switch(typeof e){case"string":case"number":case"object":return JSON.stringify(e);default:return String(e)}},ed={},eg=["events.[].metaData","events.[].breadcrumbs.[].metaData","events.[].request"];ed.event=function(e,t){var n=N(e,null,null,{redactedPaths:eg,redactedKeys:t});return n.length>1e6&&(e.events[0]._metadata={notifier:"WARNING!\nSerialized payload was "+n.length/1e6+"MB (limit = 1MB)\nmetadata was removed"},n=N(e,null,null,{redactedPaths:eg,redactedKeys:t})),n},ed.session=function(e,t){return N(e,null,null)};var eh={},ep=function(e,t,n,r){var o=JSON.parse(JSON.stringify(new Date));return ev(e.endpoints[t],r.location.protocol)+"?apiKey="+encodeURIComponent(e.apiKey)+"&payloadVersion="+n+"&sentAt="+encodeURIComponent(o)},ev=(eh=function(e,t){return void 0===t&&(t=window),{sendEvent:function(n,r){if(void 0===r&&(r=function(){}),null===e._config.endpoints.notify){var o=Error("Event not sent due to incomplete endpoint configuration");return r(o)}var a=ep(e._config,"notify","4",t),i=ed.event(n,e._config.redactedKeys),s=new t.XDomainRequest;s.onload=function(){r(null)},s.onerror=function(){var t=Error("Event failed to send");e._logger.error("Event failed to send…",t),i.length>1e6&&e._logger.warn("Event oversized ("+(i.length/1e6).toFixed(2)+" MB)"),r(t)},s.open("POST",a),setTimeout(function(){try{s.send(i)}catch(t){e._logger.error(t),r(t)}},0)},sendSession:function(n,r){if(void 0===r&&(r=function(){}),null===e._config.endpoints.sessions){var o=Error("Session not sent due to incomplete endpoint configuration");return r(o)}var a=ep(e._config,"sessions","1",t),i=new t.XDomainRequest;i.onload=function(){r(null)},i.open("POST",a),setTimeout(function(){try{i.send(ed.session(n,e._config.redactedKeys))}catch(t){e._logger.error(t),r(t)}},0)}}})._matchPageProtocol=function(e,t){return"http:"===t?e.replace(/^https:/,"http:"):e},em=function(e,t){return void 0===t&&(t=window),{sendEvent:function(n,r){void 0===r&&(r=function(){});try{var o=e._config.endpoints.notify;if(null===o){var a=Error("Event not sent due to incomplete endpoint configuration");return r(a)}var i=new t.XMLHttpRequest,s=ed.event(n,e._config.redactedKeys);i.onreadystatechange=function(){if(i.readyState===t.XMLHttpRequest.DONE){var n=i.status;if(0===n||n>=400){var o=Error("Request failed with status "+n);e._logger.error("Event failed to send…",o),s.length>1e6&&e._logger.warn("Event oversized ("+(s.length/1e6).toFixed(2)+" MB)"),r(o)}else r(null)}},i.open("POST",o),i.setRequestHeader("Content-Type","application/json"),i.setRequestHeader("Bugsnag-Api-Key",n.apiKey||e._config.apiKey),i.setRequestHeader("Bugsnag-Payload-Version","4"),i.setRequestHeader("Bugsnag-Sent-At",new Date().toISOString()),i.send(s)}catch(t){e._logger.error(t)}},sendSession:function(n,r){void 0===r&&(r=function(){});try{var o=e._config.endpoints.sessions;if(null===o){var a=Error("Session not sent due to incomplete endpoint configuration");return r(a)}var i=new t.XMLHttpRequest;i.onreadystatechange=function(){if(i.readyState===t.XMLHttpRequest.DONE){var n=i.status;if(0===n||n>=400){var o=Error("Request failed with status "+n);e._logger.error("Session failed to send…",o),r(o)}else r(null)}},i.open("POST",o),i.setRequestHeader("Content-Type","application/json"),i.setRequestHeader("Bugsnag-Api-Key",e._config.apiKey),i.setRequestHeader("Bugsnag-Payload-Version","1"),i.setRequestHeader("Bugsnag-Sent-At",new Date().toISOString()),i.send(ed.session(n,e._config.redactedKeys))}catch(t){e._logger.error(t)}}}},ey=new Date,eb=function(){ey=new Date},e_={name:"appDuration",load:function(e){return e.addOnError(function(e){var t=new Date;e.app.duration=t-ey},!0),{reset:eb}}},eS=function(e,t){var n="000000000"+e;return n.substr(n.length-t)},eE="object"==typeof window?window:self,ew=0;for(var eO in eE)Object.hasOwnProperty.call(eE,eO)&&ew++;var ej=eS(((navigator.mimeTypes?navigator.mimeTypes.length:0)+navigator.userAgent.length).toString(36)+ew.toString(36),4),ek=function(){return ej},eN=0;function ex(){return eS((1679616*Math.random()<<0).toString(36),4)}function eR(){return"c"+new Date().getTime().toString(36)+eS((eN=eN<1679616?eN:0,++eN-1).toString(36),4)+ek()+(ex()+ex())}eR.fingerprint=ek;var eB="bugsnag-anonymous-id",eL=function(e){try{var t=e.localStorage,n=t.getItem(eB);if(n&&/^c[a-z0-9]{20,32}$/.test(n))return n;return n=eR(),t.setItem(eB,n),n}catch(e){}},eT=function(e){var t=e.getUser();t&&t.id||e.setUser(e.device.id)},eC={load:function(e){e._sessionDelegate=eM}},eM={startSession:function(e,t){return(e._session=t,e._pausedSession=null,null===e._config.enabledReleaseStages||s(e._config.enabledReleaseStages,e._config.releaseStage))?e._delivery.sendSession({notifier:e._notifier,device:t.device,app:t.app,sessions:[{id:t.id,startedAt:t.startedAt,user:t._user}]}):e._logger.warn("Session not sent due to releaseStage/enabledReleaseStages configuration"),e},resumeSession:function(e){return e._session?e:e._pausedSession?(e._session=e._pausedSession,e._pausedSession=null,e):e.startSession()},pauseSession:function(e){e._pausedSession=e._session,e._session=null}},eq={load:function(e){e._config.collectUserIp||e.addOnError(function(e){e._user&&void 0===e._user.id&&delete e._user.id,e._user=m({id:"[REDACTED]"},e._user),e.request=m({clientIp:"[REDACTED]"},e.request)})},configSchema:{collectUserIp:{defaultValue:function(){return!0},message:"should be true|false",validate:function(e){return!0===e||!1===e}}}},eI={};eI.load=function(e){!/^(local-)?dev(elopment)?$/.test(e._config.releaseStage)&&e._isBreadcrumbTypeEnabled("log")&&y(eD,function(t){var n=console[t];console[t]=function(){for(var r=arguments.length,o=Array(r),i=0;i<r;i++)o[i]=arguments[i];e.leaveBreadcrumb("Console output",a(o,function(e,t,n){var r="[Unknown value]";try{r=String(t)}catch(e){}if("[object Object]"===r)try{r=JSON.stringify(t)}catch(e){}return e["["+n+"]"]=r,e},{severity:0===t.indexOf("group")?"log":t}),"log"),n.apply(console,o)},console[t]._restore=function(){console[t]=n}})};var eD=i(["log","debug","info","warn","error"],function(e){return"undefined"!=typeof console&&"function"==typeof console[e]});function eP(e,t,n){var r=e[t];if(!r)return r;var o=n(r);return e[t]=o,r}function eA(e){var t=!!e[1]&&"function"==typeof e[1].handleEvent;return{get:function(){return t?e[1].handleEvent:e[1]},replace:function(n){t?e[1].handleEvent=n:e[1]=n}}}var eF=/^\s*([^\s][\s\S]{0,139}[^\s])?\s*/,eV={};eV=function(e){return void 0===e&&(e=window),{load:function(t){if("addEventListener"in e&&t._isBreadcrumbTypeEnabled("navigation")){var n=function(e){return function(){return t.leaveBreadcrumb(e,{},"navigation")}};e.addEventListener("pagehide",n("Page hidden"),!0),e.addEventListener("pageshow",n("Page shown"),!0),e.addEventListener("load",n("Page loaded"),!0),e.document.addEventListener("DOMContentLoaded",n("DOMContentLoaded"),!0),e.addEventListener("load",function(){return e.addEventListener("popstate",n("Navigated back"),!0)}),e.addEventListener("hashchange",function(n){var r=n.oldURL?{from:eH(n.oldURL,e),to:eH(n.newURL,e),state:eU(e)}:{to:eH(e.location.href,e)};t.leaveBreadcrumb("Hash changed",r,"navigation")},!0),e.history.pushState&&e$(t,e.history,"pushState",e,!0),e.history.replaceState&&e$(t,e.history,"replaceState",e)}}}};var eH=function(e,t){var n=t.document.createElement("A");return n.href=e,""+n.pathname+n.search+n.hash},eK=function(e,t,n,r){var o=eH(e.location.href,e);return{title:n,state:t,prevState:eU(e),to:r||o,from:o}},e$=function(e,t,n,r,o){void 0===o&&(o=!1);var a=t[n];t[n]=function(i,s,u){e.leaveBreadcrumb("History "+n,eK(r,i,s,u),"navigation"),o&&"function"==typeof e.resetEventCount&&e.resetEventCount(),a.apply(t,[i,s].concat(void 0!==u?u:[]))}},eU=function(e){try{return e.history.state}catch(e){}},eX="request",eJ=function(e){return e&&new Date-e},ez={load:function(e){var t=0;e.addOnError(function(n){if(t>=e._config.maxEvents)return e._logger.warn("Cancelling event send due to maxEvents per session limit of "+e._config.maxEvents+" being reached"),!1;t++}),e.resetEventCount=function(){t=0}},configSchema:{maxEvents:{defaultValue:function(){return 10},message:"should be a positive integer ≤100",validate:function(e){return d(1,100)(e)}}}},eW={},eG=(eW={load:function(e){e.addOnError(function(e){y(a(e.errors,function(e,t){return e.concat(t.stacktrace)},[]),function(e){e.file=eG(e.file)})})}})._strip=function(e){return"string"==typeof e?e.replace(/\?.*$/,"").replace(/#.*$/,""):e},eQ=function(e,t,n,r){e[0]||e.push({});var o=e[0];o.file||"string"!=typeof t||(o.file=t),!o.lineNumber&&eY(n)&&(o.lineNumber=n),!o.columnNumber&&(eY(r)?o.columnNumber=r:window.event&&eY(window.event.errorCharacter)&&(o.columnNumber=window.event.errorCharacter))},eY=function(e){return"number"==typeof e&&"NaN"!==String.call(e)},eZ={},e0=m({},p.schema,S),e1={_client:null,createClient:function(e){"string"==typeof e&&(e={apiKey:e}),e||(e={});var t,n,r,o,u,c,l,f,d,g,h,p,v=new ec(e,e0,[e_,(void 0===t&&(t=navigator),void 0===n&&(n=window),{load:function(e){var r={locale:t.browserLanguage||t.systemLanguage||t.userLanguage||t.language,userAgent:t.userAgent};n&&n.screen&&n.screen.orientation&&n.screen.orientation.type?r.orientation=n.screen.orientation.type:n&&n.document&&(r.orientation=n.document.documentElement.clientWidth>n.document.documentElement.clientHeight?"landscape":"portrait"),e._config.generateAnonymousId&&(r.id=eL(n)),e.addOnSession(function(t){t.device=m({},t.device,r),e._config.collectUserIp||eT(t)}),e.addOnError(function(t){t.device=m({},t.device,r,{time:new Date}),e._config.collectUserIp||eT(t)},!0)},configSchema:{generateAnonymousId:{validate:function(e){return!0===e||!1===e},defaultValue:function(){return!0},message:"should be true|false"}}}),(void 0===r&&(r=window),{load:function(e){e.addOnError(function(e){void 0===e.context&&(e.context=r.location.pathname)},!0)}}),(void 0===o&&(o=window),{load:function(e){e.addOnError(function(e){e.request&&e.request.url||(e.request=m({},e.request,{url:o.location.href}))},!0)}}),ez,eC,eq,eW,(void 0===u&&(u=window),void 0===c&&(c="window onerror"),{load:function(e){if(e._config.autoDetectErrors&&e._config.enabledErrorTypes.unhandledExceptions){var t=u.onerror;u.onerror=function(n,r,o,a,i){if(0===o&&/Script error\.?/.test(n))e._logger.warn("Ignoring cross-domain or eval script error. See docs: https://tinyurl.com/yy3rn63z");else{var s,u={severity:"error",unhandled:!0,severityReason:{type:"unhandledException"}};if(i)eQ((s=e.Event.create(i,!0,u,c,1)).errors[0].stacktrace,r,o,a);else if("object"!=typeof n||null===n||r&&"string"==typeof r||o||a||i)eQ((s=e.Event.create(n,!0,u,c,1)).errors[0].stacktrace,r,o,a);else{var l=n.type?"Event: "+n.type:"Error",f=n.message||n.detail||"";(s=e.Event.create({name:l,message:f},!0,u,c,1)).originalError=n,s.addMetadata(c,{event:n,extraParameters:r})}e._notify(s)}"function"==typeof t&&t.apply(this,arguments)}}}}),(void 0===l&&(l=window),{load:function(e){if(e._config.autoDetectErrors&&e._config.enabledErrorTypes.unhandledRejections){var t=function(t){var n,r=t.reason,o=!1;try{t.detail&&t.detail.reason&&(r=t.detail.reason,o=!0)}catch(e){}var a=e.Event.create(r,!1,{severity:"error",unhandled:!0,severityReason:{type:"unhandledPromiseRejection"}},"unhandledrejection handler",1,e._logger);o&&y(a.errors[0].stacktrace,(n=r,function(e){e.file!==n.toString()&&e.method&&(e.method=e.method.replace(/^\s+/,""))})),e._notify(a,function(e){if(T(e.originalError)&&!e.originalError.stack){var t;e.addMetadata("unhandledRejection handler",((t={})[Object.prototype.toString.call(e.originalError)]={name:e.originalError.name,message:e.originalError.message,code:e.originalError.code},t))}})};"addEventListener"in l?l.addEventListener("unhandledrejection",t):l.onunhandledrejection=function(e,n){t({detail:{reason:e,promise:n}})}}}}),eV(),(void 0===f&&(f=window),{load:function(e){"addEventListener"in f&&e._isBreadcrumbTypeEnabled("user")&&f.addEventListener("click",function(t){var n,r,o,a;try{(a=(o=t.target).textContent||o.innerText||"")||"submit"!==o.type&&"button"!==o.type||(a=o.value),n=(a=a.replace(eF,"$1")).length>140?a.slice(0,135)+"(...)":a,r=function e(t,n){var r=[t.tagName];if(t.id&&r.push("#"+t.id),t.className&&t.className.length&&r.push("."+t.className.split(" ").join(".")),!n.document.querySelectorAll||!Array.prototype.indexOf)return r.join("");try{if(1===n.document.querySelectorAll(r.join("")).length)return r.join("")}catch(e){return r.join("")}if(t.parentNode.childNodes.length>1){var o=Array.prototype.indexOf.call(t.parentNode.childNodes,t)+1;r.push(":nth-child("+o+")")}return 1===n.document.querySelectorAll(r.join("")).length?r.join(""):t.parentNode?e(t.parentNode,n)+" > "+r.join(""):r.join("")}(t.target,f)}catch(t){n="[hidden]",r="[hidden]",e._logger.error("Cross domain error when tracking click event. See docs: https://tinyurl.com/yy3rn63z")}e.leaveBreadcrumb("UI click",{targetText:n,targetSelector:r},"user")},!0)}}),(void 0===d&&(d=[]),void 0===g&&(g=window),{load:function(e){if(e._isBreadcrumbTypeEnabled("request")){var t=[e._config.endpoints.notify,e._config.endpoints.sessions].concat(d);(function(){if("addEventListener"in g.XMLHttpRequest.prototype&&"WeakMap"in g){var n=new WeakMap,r=new WeakMap,o=g.XMLHttpRequest.prototype.open;g.XMLHttpRequest.prototype.open=function(e,t){this&&n.set(this,{method:e,url:t}),o.apply(this,arguments)};var a=g.XMLHttpRequest.prototype.send;g.XMLHttpRequest.prototype.send=function(o){var i=this,u=n.get(this);if(u){var c=r.get(this);c&&(this.removeEventListener("load",c.load),this.removeEventListener("error",c.error));var l=new Date,f=function(){return function(n,r,o){if(void 0===r){e._logger.warn("The request URL is no longer present on this XMLHttpRequest. A breadcrumb cannot be left for this request.");return}"string"==typeof r&&s(t,r.replace(/\?.*$/,""))||e.leaveBreadcrumb("XMLHttpRequest error",{method:String(n),url:String(r),duration:o},eX)}(u.method,u.url,eJ(l))},d=function(){return function(n,r,o,a){if(void 0===r){e._logger.warn("The request URL is no longer present on this XMLHttpRequest. A breadcrumb cannot be left for this request.");return}if(!("string"==typeof r&&s(t,r.replace(/\?.*$/,"")))){var i={status:o,method:String(n),url:String(r),duration:a};o>=400?e.leaveBreadcrumb("XMLHttpRequest failed",i,eX):e.leaveBreadcrumb("XMLHttpRequest succeeded",i,eX)}}(u.method,u.url,i.status,eJ(l))};this.addEventListener("load",d),this.addEventListener("error",f),this&&r.set(this,{load:d,error:f})}a.apply(this,arguments)}}})(),function(){if("fetch"in g&&!g.fetch.polyfill){var e=g.fetch;g.fetch=function(){var t,o=arguments,a=arguments[0],i=arguments[1],s=null;return a&&"object"==typeof a?(s=a.url,i&&"method"in i?t=i.method:a&&"method"in a&&(t=a.method)):(s=a,i&&"method"in i&&(t=i.method)),void 0===t&&(t="GET"),new Promise(function(a,i){var u=new Date;e.apply(void 0,o).then(function(e){n(e,t,s,eJ(u)),a(e)}).catch(function(e){r(t,s,eJ(u)),i(e)})})}}}();var n=function(t,n,r,o){var a={method:String(n),status:t.status,url:String(r),duration:o};t.status>=400?e.leaveBreadcrumb("fetch() failed",a,eX):e.leaveBreadcrumb("fetch() succeeded",a,eX)},r=function(t,n,r){e.leaveBreadcrumb("fetch() error",{method:String(t),url:String(n),duration:r},eX)}}}}),eI,(void 0===h&&(h=document),void 0===p&&(p=window),{load:function(e){if(e._config.trackInlineScripts){var t=p.location.href,n="",r=h.attachEvent?"complete"===h.readyState:"loading"!==h.readyState,o=function(){return h.documentElement.outerHTML};n=o();var s=h.onreadystatechange;h.onreadystatechange=function(){"interactive"===h.readyState&&(n=o(),r=!0);try{s.apply(this,arguments)}catch(e){}};var u=null,c=function(e){u=e},l=function(){var e=h.currentScript||u;if(!e&&!r){var t=h.scripts||h.getElementsByTagName("script");e=t[t.length-1]}return e},f=function(e){r&&n||(n=o());var t=["<!-- DOC START -->"].concat(n.split("\n")),i=e-1,s=Math.max(i-3,0),u=Math.min(i+3,t.length);return a(t.slice(s,u),function(e,t,n){return e[s+1+n]=t.length<=200?t:t.substr(0,200),e},{})};e.addOnError(function(e){e.errors[0].stacktrace=i(e.errors[0].stacktrace,function(e){return!/__trace__$/.test(e.method)});var n=e.errors[0].stacktrace[0],r=function(e){return e.replace(/#.*$/,"").replace(/\?.*$/,"")};if(!n||!n.file||r(n.file)===r(t)){var o=l();if(o){var a=o.innerHTML;e.addMetadata("script","content",a.length<=5e5?a:a.substr(0,5e5)),n&&n.lineNumber&&(n.code=f(n.lineNumber))}}},!0);var d=y(["setTimeout","setInterval","setImmediate","requestAnimationFrame"],function(e){return eP(p,e,function(e){return g(e,function(e){return{get:function(){return e[0]},replace:function(t){e[0]=t}}})})})[0];y(["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"],function(e){p[e]&&p[e].prototype&&Object.prototype.hasOwnProperty.call(p[e].prototype,"addEventListener")&&(eP(p[e].prototype,"addEventListener",function(e){return g(e,eA)}),eP(p[e].prototype,"removeEventListener",function(e){return g(e,eA,!0)}))})}function g(e,t,n){return void 0===n&&(n=!1),function(){var r=[].slice.call(arguments);try{var o=t(r),a=o.get();if(n&&e.apply(this,r),"function"!=typeof a)return e.apply(this,r);if(a.__trace__)o.replace(a.__trace__);else{var i=l();a.__trace__=function(){c(i),d(function(){c(null)},0);var e=a.apply(this,arguments);return c(null),e},a.__trace__.__trace__=a.__trace__,o.replace(a.__trace__)}}catch(e){}if(e.apply)return e.apply(this,r);switch(r.length){case 1:return e(r[0]);case 2:return e(r[0],r[1]);default:return e()}}}},configSchema:{trackInlineScripts:{validate:function(e){return!0===e||!1===e},defaultValue:function(){return!0},message:"should be true|false"}}})],{name:"Bugsnag JavaScript",version:"8.0.0",url:"https://github.com/bugsnag/bugsnag-js"});return v._setDelivery(window.XDomainRequest?eh:em),v._logger.debug("Loaded!"),v.leaveBreadcrumb("Bugsnag loaded",{},"state"),v._config.autoTrackSessions?v.startSession():v},start:function(e){return e1._client?e1._client._logger.warn("Bugsnag.start() was called more than once. Ignoring."):e1._client=e1.createClient(e),e1._client},isStarted:function(){return null!=e1._client}};return y(["resetEventCount"].concat(f(ec.prototype)),function(e){/^_/.test(e)||(e1[e]=function(){if(!e1._client)return console.log("Bugsnag."+e+"() was called before Bugsnag.start()");e1._client._depth+=1;var t=e1._client[e].apply(e1._client,arguments);return e1._client._depth-=1,t})}),(eZ=e1).Client=ec,eZ.Event=D,eZ.Session=eo,eZ.Breadcrumb=w,eZ.default=e1,eZ}()},73820:function(e,t,n){e.exports=n(96829)},65985:function(e){e.exports=function(){var e={};function t(){return(t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function n(e,t){return(n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}e=function(){function e(){var e="undefined"!=typeof window&&window.React;if(this.name="react",this.lazy=0==arguments.length&&!e,!this.lazy&&(this.React=(arguments.length<=0?void 0:arguments[0])||e,!this.React))throw Error("@bugsnag/plugin-react reference to `React` was undefined")}return e.prototype.load=function(e){if(!this.lazy){var t=o(this.React,e);return t.createErrorBoundary=function(){return t},t}var n=function(){throw Error("@bugsnag/plugin-react was used incorrectly. Valid usage is as follows:\nPass React to the plugin constructor\n\n  `Bugsnag.start({ plugins: [new BugsnagPluginReact(React)] })`\nand then call `const ErrorBoundary = Bugsnag.getPlugin('react').createErrorBoundary()`\n\nOr if React is not available until after Bugsnag has started,\nconstruct the plugin with no arguments\n  `Bugsnag.start({ plugins: [new BugsnagPluginReact()] })`,\nthen pass in React when available to construct your error boundary\n  `const ErrorBoundary = Bugsnag.getPlugin('react').createErrorBoundary(React)`")};return n.createErrorBoundary=function(t){if(!t)throw Error("@bugsnag/plugin-react reference to `React` was undefined");return o(t,e)},n},e}();var r=function(e){for(var t=e.split(/\n/g),n="",r=0,o=t.length;r<o;r++)t[r].length&&(n+=(n.length?"\n":"")+t[r].trim());return n},o=function(e,o){return function(a){function i(e){var t;return(t=a.call(this,e)||this).state={error:null,info:null},t.handleClearError=t.handleClearError.bind(function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)),t}i.prototype=Object.create(a.prototype),i.prototype.constructor=i,n(i,a);var s=i.prototype;return s.handleClearError=function(){this.setState({error:null,info:null})},s.componentDidCatch=function(e,t){var n=this.props.onError,a=o.Event.create(e,!0,{severity:"error",unhandled:!0,severityReason:{type:"unhandledException"}},1);t&&t.componentStack&&(t.componentStack=r(t.componentStack)),a.addMetadata("react",t),o._notify(a,n),this.setState({error:e,info:t})},s.render=function(){if(this.state.error){var n=this.props.FallbackComponent;return n?e.createElement(n,t({},this.state,{clearError:this.handleClearError})):null}return this.props.children},i}(e.Component)};return e.formatComponentStack=r,e.default=e,e}()}}]);