PageSourceSearch

https://docs.apilayer.com/assets/bugsnag-Cx1_1MSo.js

js apilayer.com collected 2026-10-02 17:12:17 UTC 52,609 bytes, 16 lines download raw bytes

1import{n as e}from"./jsx-runtime-cvnAX2Ol.js";var t=e(((e,t)=>{(function(n){if(typeof e==`object`&&t!==void 0)t.exports=n();else if(typeof define==`function`&&define.amd)define([],n);else{var r=typeof window<`u`||typeof window<`u`?window:typeof self<`u`?self:this;r.Bugsnag=n()}})(function(){var e,t=[`navigation`,`request`,`process`,`log`,`user`,`state`,`error`,`manual`],n=function(e,t,n){for(var r=n,i=0,a=e.length;i<a;i++)r=t(r,e[i],i,e);return r},r=function(e,t){return n(e,function(e,n,r,i){return t(n,r,i)?e.concat(n):e},[])},i=function(e,t){return n(e,function(e,n,r,i){return e===!0||n===t},!1)},a=function(e){return Object.prototype.toString.call(e)===`[object Array]`},o=!{toString:null}.propertyIsEnumerable(`toString`),s=[`toString`,`toLocaleString`,`valueOf`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`constructor`],c=function(e){var t=[],n;for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);if(!o)return t;for(var r=0,i=s.length;r<i;r++)Object.prototype.hasOwnProperty.call(e,s[r])&&t.push(s[r]);return t},l=function(e,t){return e===void 0&&(e=1),t===void 0&&(t=1/0),function(n){return typeof n==`
1number`&&parseInt(``+n,10)===n&&n>=e&&n<=t}},u=function(e){return typeof e==`function`||a(e)&&r(e,function(e){return typeof e==`function`}).length===e.length},d=function(e){return typeof e==`string`&&!!e.length},f={},p=function(){return{unhandledExceptions:!0,unhandledRejections:!0}};f.schema={apiKey:{defaultValue:function(){return null},message:`is required`,validate:d},appVersion:{defaultValue:function(){},message:`should be a string`,validate:function(e){return e===void 0||d(e)}},appType:{defaultValue:function(){},message:`should be a string`,validate:function(e){return e===void 0||d(e)}},autoDetectErrors:{defaultValue:function(){return!0},message:`should be true|false`,validate:function(e){return e===!0||e===!1}},enabledErrorTypes:{defaultValue:function(){return p()},message:`should be an object containing the flags { unhandledExceptions:true|false, unhandledRejections:true|false }`,allowPartialObject:!0,validate:function(e){if(typeof e!=`object`||!e)return!1;var t=c(e),n=c(p());return!(r(t,function(e){return i(n,e)}).length<t.length||r(c(e),function(t){return typeof e[t]!=`boolean`}).length>0)}},onError:{defaultValue:function(){return[]},message:`should be a function or array of functions`,validate:u},onSession:{defaultValue:function(){return[]},message:`should be a function or array of functions`,validate:u},onBreadcrumb:{defaultValue:function(){return[]},message:`should be a function or array of functions`,validate:u},endpoints:{defaultValue:function(e){return e===void 0?{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&&typeof e==`object`&&d(e.notify)&&d(e.sessions)&&r(c(e),function(e){return!i([`notify`,`sessions`],e)}).length===0}},autoTrackSessions:{defaultValue:function(e){return!0},message:`should be true|false`,validate:function(e){return e===!0||e===!1}},enabledReleaseStages:{defaultValue:function(){return null},message:`should be an array of strings`,validate:function(e){return e===null||a(e)&&r(e,function(e){return typeof e==`string`}).length===e.length}},releaseStage:{defaultValue:function(){return`production`},message:`should be a string`,validate:function(e){return typeof e==`string`&&e.length}},maxBreadcrumbs:{defaultValue:function(){return 25},message:`should be a number ≤100`,validate:function(e){return l(0,100)(e)}},enabledBreadcrumbTypes:{defaultValue:function(){return t},message:`should be null or a list of available breadcrumb types (`+t.join(`,`)+`)`,validate:function(e){return e===null||a(e)&&n(e,function(e,n){return e===!1?e:i(t,n)},!0)}},context:{defaultValue:function(){},message:`should be a string`,validate:function(e){return e===void 0||typeof e==`string`}},user:{defaultValue:function(){return{}},message:`should be an object with { id, email, name } properties`,validate:function(e){return e===null||e&&n(c(e),function(e,t){return e&&i([`id`,`email`,`name`],t)},!0)}},metadata:{defaultValue:function(){return{}},message:`should be an object`,validate:function(e){return typeof e==`object`&&!!e}},logger:{defaultValue:function(){},message:`should be null or an object with methods { debug, info, warn, error }`,validate:function(e){return!e||e&&n([`debug`,`info`,`warn`,`error`],function(t,n){return t&&typeof e[n]==`function`},!0)}},redactedKeys:{defaultValue:function(){return[`password`]},message:`should be an array of strings|regexes`,validate:function(e){return a(e)&&e.length===r(e,function(e){return typeof e==`string`||e&&typeof e.test==`function`}).length}},plugins:{defaultValue:function(){return[]},message:`should be an array of plugin objects`,validate:function(e){return a(e)&&e.length===r(e,function(e){return e&&typeof e==`object`&&typeof e.load==`function`}).length}},featureFlags:{defaultValue:function(){return[]},message:`should be an array of objects that have a "name" property`,validate:function(e){return a(e)&&e.length===r(e,function(e){return e&&typeof e==`object`&&typeof e.name==`string`}).length}},reportUnhandledPromiseRejectionsAsHandled:{defaultValue:function(){return!1},message:`should be true|false`,validate:function(e){return e===!0||e===!1}},sendPayloadChecksums:{defaultValue:function(){return!1},message:`should be true|false`,validate:function(e){return e===!0||e===!1}}};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},h=function(e,t){return n(e,function(e,n,r,i){return e.concat(t(n,r,i))},[])};function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g.apply(null,arguments)}var _=f.schema,ee={releaseStage:m({},_.releaseStage,{defaultValue:function(){return/^localhost(:\d+)?$/.test(window.location.host)?`development`:`production`}}),appType:g({},_.appType,{defaultValue:function(){return`browser`}}),logger:m({},_.logger,{defaultValue:function(){return typeof console<`u`&&typeof console.debug==`function`?te():void 0}})},te=function(){var e={},t=console.log;return h([`debug`,`info`,`warn`,`error`],function(n){var r=console[n];
vendor: 7,183 bytes, lines 1-9
1e[n]=typeof r==`function`?r.bind(console,`[bugsnag]`):t.bind(console,`[bugsnag]`)}),e},v=function(){function e(e,t,n,r){r===void 0&&(r=new Date),this.type=n,this.message=e,this.metadata=t,this.timestamp=r}var t=e.prototype;return t.toJSON=function(){return{type:this.type,name:this.message,timestamp:this.timestamp,metaData:this.metadata}},e}(),y={};(function(t,n){typeof e==`function`&&e.amd?e(`stackframe`,[],n):typeof y==`object`?y=n():t.StackFrame=n()})(this,function(){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`],i=[`columnNumber`,`lineNumber`],a=[`fileName`,`functionName`,`source`],o=r.concat(i,a,[`args`],[`evalOrigin`]);function s(e){if(e)for(var n=0;n<o.length;n++)e[o[n]]!==void 0&&this[`set`+t(o[n])](e[o[n]])}s.prototype={getArgs:function(){return this.args},setArgs:function(e){if(Object.prototype.toString.call(e)!==`[object Array]`)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(){var e=this.getFileName()||``,t=this.getLineNumber()||``,n=this.getColumnNumber()||``,r=this.getFunctionName()||``;return this.getIsEval()?e?`[eval] (`+e+`:`+t+`:`+n+`)`:`[eval]:`+t+`:`+n:r?r+` (`+e+`:`+t+`:`+n+`)`:e+`:`+t+`:`+n}},s.fromString=function(e){var t=e.indexOf(`(`),n=e.lastIndexOf(`)`),r=e.substring(0,t),i=e.substring(t+1,n).split(`,`),a=e.substring(n+1);if(a.indexOf(`@`)===0)var o=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(a,``),c=o[1],l=o[2],u=o[3];return new s({functionName:r,args:i||void 0,fileName:c,lineNumber:l||void 0,columnNumber:u||void 0})};for(var c=0;c<r.length;c++)s.prototype[`get`+t(r[c])]=n(r[c]),s.prototype[`set`+t(r[c])]=function(e){return function(t){this[e]=!!t}}(r[c]);for(var l=0;l<i.length;l++)s.prototype[`get`+t(i[l])]=n(i[l]),s.prototype[`set`+t(i[l])]=function(t){return function(n){if(!e(n))throw TypeError(t+` must be a Number`);this[t]=Number(n)}}(i[l]);for(var u=0;u<a.length;u++)s.prototype[`get`+t(a[u])]=n(a[u]),s.prototype[`set`+t(a[u])]=function(e){return function(t){this[e]=String(t)}}(a[u]);return s});var b={};(function(t,n){typeof e==`function`&&e.amd?e(`stack-generator`,[`stackframe`],n):typeof b==`object`?b=n(y):t.StackGenerator=n(t.StackFrame)})(this,function(e){return{backtrace:function(t){var n=[],r=10;typeof t==`object`&&typeof t.maxStackSize==`number`&&(r=t.maxStackSize);for(var i=arguments.callee;i&&n.length<r&&i.arguments;){for(var a=Array(i.arguments.length),o=0;o<a.length;++o)a[o]=i.arguments[o];/function(?:\s+([\w$]+))+\s*\(/.test(i.toString())?n.push(new e({functionName:RegExp.$1||void 0,args:a})):n.push(new e({args:a}));try{i=i.caller}catch{break}}return n}}});var x={};(function(t,n){typeof e==`function`&&e.amd?e(`error-stack-parser`,[`stackframe`],n):typeof x==`object`?x=n(y):t.ErrorStackParser=n(t.StackFrame)})(this,function(e){var t=/(^|@)\S+:\d+/,n=/^\s*at .*(\S+:\d+|\(native\))/m,r=/^(eval@)?(\[native code])?$/;return{parse:function(e){if(e.stacktrace!==void 0||e[`opera#sourceloc`]!==void 0)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(e.indexOf(`:`)===-1)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(`
2`).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+)\)$)/);n=r?n.replace(r[0],``):n;var i=n.split(/\s+/).slice(1),a=this.extractLocation(r?r[1]:i.pop());return new e({functionName:i.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(`
3`).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`)),t.indexOf(`@`)===-1&&t.indexOf(`:`)===-1)return new e({functionName:t});var n=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=t.match(n),i=r&&r[1]?r[1]:void 0,a=this.extractLocation(t.replace(n,``));return new e({functionName:i,fileName:a[0],lineNumber:a[1],columnNumber:a[2],source:t})},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf(`
4`)>-1&&e.message.split(`
5`).length>e.stacktrace.split(`
6`).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(`
7`),i=[],a=2,o=r.length;a<o;a+=2){var s=n.exec(r[a]);s&&i.push(new e({fileName:s[2],lineNumber:s[1],source:r[a]}))}return i},parseOpera10:function(t){for(var n=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=t.stacktrace.split(`
8`),i=[],a=0,o=r.length;a<o;a+=2){var s=n.exec(r[a]);s&&i.push(new e({functionName:s[3]||void 0,fileName:s[2],lineNumber:s[1],source:r[a]}))}return i},parseOpera11:function(n){return n.stack.split(`
9`).filter(function(e){return!!e.match(t)&&!e.match(/^Error created at/)},this).map(function(t){var n=t.split(`@`),r=this.extractLocation(n.pop()),i=n.shift()||``,a=i.replace(/<anonymous function(: (\w+))?>/,`$2`).replace(/\([^)]*\)/g,``)||void 0,o;return i.match(/\(([^)]*)\)/)&&(o=i.replace(/^[^(]+\(([^)]*)\)$/,`$1`)),new e({functionName:a,args:o===void 0||o===`[arguments not available]`?void 0:o.split(`,`),fileName:r[0],lineNumber:r[1],columnNumber:r[2],source:t})},this)}}});var S=x,C=function(e,t,n,r){var i=r&&r.redactedKeys?r.redactedKeys:[],a=r&&r.redactedPaths?r.redactedPaths:[];return JSON.stringify(fe(e,i,a),t,n)},ne=20,re=25e3,ie=8,w=`...`;function ae(e){return e instanceof Error||/^\[object (Error|(Dom)?Exception)\]$/.test(Object.prototype.toString.call(e))}function oe(e){return`[Throws: `+(e?e.message:`?`)+`]`}function se(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return!0;return!1}function ce(e,t){for(var n=0,r=e.length;n<r;n++)if(t.indexOf(e[n])===0)return!0;return!1}function le(e,t){for(var n=0,r=e.length;n<r;n++)if(typeof e[n]==`string`&&e[n].toLowerCase()===t.toLowerCase()||e[n]&&typeof e[n].test==`function`&&e[n].test(t))return!0;return!1}function ue(e){return Object.prototype.toString.call(e)===`[object Array]`}function de(e,t){try{return e[t]}catch(e){return oe(e)}}function fe(e,t,n){var r=[],i=0;function a(e,o){function s(){return o.length>ie&&i>re}if(i++,o.length>ne||s())return w;if(typeof e!=`object`||!e)return e;if(se(r,e))return`[Circular]`;if(r.push(e),typeof e.toJSON==`function`)try{i--;var c=a(e.toJSON(),o);return r.pop(),c}catch(e){return oe(e)}if(ae(e)){i--;var l=a({name:e.name,message:e.message},o);return r.pop(),l}if(ue(e)){for(var u=[],d=0,f=e.length;d<f;d++){if(s()){u.push(w);break}
9u.push(a(e[d],o.concat(`[]`)))}return r.pop(),u}var p={};try{for(var m in e)if(Object.prototype.hasOwnProperty.call(e,m)){if(ce(n,o.join(`.`))&&le(t,m)){p[m]=`[REDACTED]`;continue}if(s()){p[m]=w;break}p[m]=a(de(e,m),o.concat(m))}}catch{}return r.pop(),p}return a(e,[])}function pe(e,t,n,r){if(typeof n==`string`){r===void 0?r=null:r!==null&&typeof r!=`string`&&(r=C(r));var i=t[n];if(typeof i==`number`){e[i]={name:n,variant:r};return}e.push({name:n,variant:r}),t[n]=e.length-1}}function me(e,t,n){if(a(t)){for(var r=0;r<t.length;++r){var i=t[r];typeof i==`object`&&i&&pe(e,n,i.name,i.variant)}return e}}function he(e){return h(r(e,Boolean),function(e){var t=e.name,n=e.variant,r={featureFlag:t};return typeof n==`string`&&(r.variant=n),r})}function ge(e,t,n){var r=t[n];typeof r==`number`&&(e[r]=null,delete t[n])}var T={add:pe,clear:ge,merge:me,toEventApi:he},E=function(e){return!!e&&(!!e.stack||!!e.stacktrace||!!e[`opera#sourceloc`])&&typeof(e.stack||e.stacktrace||e[`opera#sourceloc`])==`string`&&e.stack!==e.name+`: `+e.message},_e=ve;function ve(e){switch(Object.prototype.toString.call(e)){case`[object Error]`:return!0;case`[object Exception]`:return!0;case`[object DOMException]`:return!0;default:return e instanceof Error}}var D=_e,ye=function(e,t,n,r){var i;if(t){var a;if(n===null)return xe(e,t);typeof n==`object`&&(a=n),typeof n==`string`&&(a=(i={},i[n]=r,i)),a&&t!==`__proto__`&&t!==`constructor`&&t!==`prototype`&&(e[t]||(e[t]={}),e[t]=m({},e[t],a))}},be=function(e,t,n){if(typeof t==`string`){if(!n)return e[t];if(e[t])return e[t][n]}},xe=function(e,t,n){if(typeof t==`string`){if(!n){delete e[t];return}t!==`__proto__`&&t!==`constructor`&&t!==`prototype`&&e[t]&&delete e[t][n]}},O={add:ye,get:be,clear:xe};function k(){return k=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},k.apply(null,arguments)}var A=function(){function e(t,n,r,i,a){r===void 0&&(r=[]),i===void 0&&(i=we()),this.apiKey=void 0,this.context=void 0,this.groupingHash=void 0,this.originalError=a,this._handledState=i,this.severity=this._handledState.severity,this.unhandled=this._handledState.unhandled,this.app={},this.device={},this.request={},this.response={},this.breadcrumbs=[],this.threads=[],this._metadata={},this._features=[],this._featuresIndex={},this._user={},this._session=void 0,this._correlation=void 0,this._groupingDiscriminator=void 0,this.errors=[Te(t,n,e.__type,r)]}var t=e.prototype;return t.addMetadata=function(e,t,n){return O.add(this._metadata,e,t,n)},t.setTraceCorrelation=function(e,t){typeof e==`string`&&(this._correlation=k({traceId:e},typeof t==`string`?{spanId:t}:{}))},t.getGroupingDiscriminator=function(){return this._groupingDiscriminator},t.setGroupingDiscriminator=function(e){var t=this._groupingDiscriminator;return(typeof e==`string`||e==null)&&(this._groupingDiscriminator=e),t},t.getMetadata=function(e,t){return O.get(this._metadata,e,t)},t.clearMetadata=function(e,t){return O.clear(this._metadata,e,t)},t.addFeatureFlag=function(e,t){t===void 0&&(t=null),T.add(this._features,this._featuresIndex,e,t)},t.addFeatureFlags=function(e){T.merge(this._features,e,this._featuresIndex)},t.getFeatureFlags=function(){return T.toEventApi(this._features)},t.clearFeatureFlag=function(e){T.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:h(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,response:this.response,breadcrumbs:this.breadcrumbs,context:this.context,groupingHash:this.groupingHash,groupingDiscriminator:this._groupingDiscriminator,metaData:this._metadata,user:this._user,session:this._session,featureFlags:this.getFeatureFlags(),correlation:this._correlation}},e}(),Se=function(e){var t={file:e.fileName,method:Ce(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},Ce=function(e){return/^global code$/i.test(e)?`global code`:e},we=function(){return{unhandled:!1,severity:`warning`,severityReason:{type:`handledException`}}},j=function(e){return typeof e==`string`?e:``};
vendor: 15,593 bytes, lines 9-14
9function Te(e,t,r,i){return{errorClass:j(e),errorMessage:j(t),type:r,stacktrace:n(i,function(e,t){var n=Se(t);try{return JSON.stringify(n)===`{}`?e:e.concat(n)}catch{return e}},[])}}function Ee(e){return e.cause?[e].concat(Ee(e.cause)):[e]}A.getStacktrace=function(e,t,n){if(E(e))return S.parse(e).slice(t);try{return r(b.backtrace(),function(e){return(e.functionName||``).indexOf(`StackGenerator$$`)===-1}).slice(1+n)}catch{return[]}},A.create=function(e,t,n,r,i,a){i===void 0&&(i=0);var o=Oe(e,t,r,a),s=o[0],c=o[1],l;try{var u=A.getStacktrace(s,c>0?1+c+i:0,1+i);l=new A(s.name,s.message,u,n,e)}catch{l=new A(s.name,s.message,[],n,e)}if(s.name===`InvalidError`&&l.addMetadata(``+r,`non-error parameter`,De(e)),s.cause){var d,f=h(Ee(s).slice(1),function(e){var t=D(e)&&E(e)?S.parse(e):[],n=Oe(e,!0,`error cause`)[0];return n.name===`InvalidError`&&l.addMetadata(`error cause`,De(e)),Te(n.name,n.message,A.__type,t)});(d=l.errors).push.apply(d,f)}return l};var De=function(e){return e===null?`null`:e===void 0?`undefined`:e},Oe=function(e,t,n,r){var i,a=0,o=function(e){var t=n===`error cause`?`was`:`received`;r&&r.warn(n+` `+t+` a non-error: "`+e+`"`);var i=Error(n+` `+t+` a non-error. See "`+n+`" tab for more detail.`);return i.name=`InvalidError`,i};if(!t)D(e)?i=e:(i=o(typeof e),a+=2);else switch(typeof e){case`string`:case`number`:case`boolean`:i=Error(String(e)),a+=1;break;case`function`:i=o(`function`),a+=2;break;case`object`:e!==null&&D(e)?i=e:e!==null&&ke(e)?(i=Error(e.message||e.errorMessage),i.name=e.name||e.errorClass,a+=1):(i=o(e===null?`null`:`unsupported object`),a+=2);break;default:i=o(`nothing`),a+=2}if(!E(i))try{throw i}catch(e){E(e)&&(i=e,a=1)}return[i,a]};A.__type=`browserjs`;var ke=function(e){return(typeof e.name==`string`||typeof e.errorClass==`string`)&&(typeof e.message==`string`||typeof e.errorMessage==`string`)},M=A,Ae=function(e,t,n){var r=0,i=function(){if(r>=e.length)return n(null,!0);t(e[r],function(e,t){if(e)return n(e);if(t===!1)return n(null,!1);r++,i()})};i()},je=function(e,t,n,r){Ae(e,function(e,r){if(typeof e!=`function`)return r(null);try{if(e.length!==2){var i=e(t);return i&&typeof i.then==`function`?i.then(function(e){return setTimeout(function(){return r(null,e)})},function(e){setTimeout(function(){return n(e),r(null,!0)})}):r(null,i)}e(t,function(e,t){if(e)return n(e),r(null);r(null,t)})}catch(e){n(e),r(null)}},r)},N=function(e,t,n,r){for(var i=!1,a=e.slice();!i&&a.length;)try{i=a.pop()(t)===!1}catch(e){r.error(`Error occurred in `+n+` callback, continuing anyway…`),r.error(e)}return i};function Me(e){return typeof e==`string`&&/^c[a-z0-9]{20,32}$/.test(e)}var Ne=Me;function Pe(e,t){var n=`000000000`+e;return n.substr(n.length-t)}var P=Pe;function Fe(e){var t=4,n=36,r=n**+t,i=0;function a(){return P((Math.random()*r<<0).toString(n),t)}function o(){return i=i<r?i:0,i++,i-1}function s(){var r=`c`,i=new Date().getTime().toString(n),s=P(o().toString(n),t),c=e(),l=a()+a();return r+i+s+c+l}return s.fingerprint=e,s.isCuid=Ne,s}var Ie=Fe,Le=typeof window==`object`?window:self,Re=0;for(var ze in Le)Object.hasOwnProperty.call(Le,ze)&&Re++;var Be=P(((navigator.mimeTypes?navigator.mimeTypes.length:0)+navigator.userAgent.length).toString(36)+Re.toString(36),4);function Ve(){return Be}var He=Ie(Ve),F=function(){function e(){this.id=He(),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}(),Ue=T.add,We=T.clear,I=T.merge,Ge=`00000`,Ke=`https://notify.bugsnag.smartbear.com`,qe=`https://sessions.bugsnag.smartbear.com`,L=function(){},Je=function(){function e(t,n,r,i){var a=this;n===void 0&&(n=f.schema),r===void 0&&(r=[]),this._notifier=i,this._config={},this._schema=n,this._delivery={sendSession:L,sendEvent:L},this._logger={debug:L,info:L,warn:L,error:L},this._plugins={},this._breadcrumbs=[],this._session=null,this._metadata={},this._featuresIndex={},this._features=[],this._context=void 0,this._user={},this._groupingDiscriminator=void 0,this._cbs={e:[],s:[],sp:[],b:[]},this.Client=e,this.Event=M,this.Breadcrumb=v,this.Session=F,this._config=this._configure(t,r),h(r.concat(this._config.plugins),function(e){e&&a._loadPlugin(e)}),this._depth=1;var o=this,s=this.notify;this.notify=function(){return s.apply(o,arguments)}}var a=e.prototype;return a.addMetadata=function(e,t,n){return O.add(this._metadata,e,t,n)},a.getMetadata=function(e,t){return O.get(this._metadata,e,t)},a.clearMetadata=function(e,t){return O.clear(this._metadata,e,t)},a.addFeatureFlag=function(e,t){t===void 0&&(t=null),Ue(this._features,this._featuresIndex,e,t)},a.addFeatureFlags=function(e){I(this._features,e,this._featuresIndex)},a.clearFeatureFlag=function(e){We(this._features,this._featuresIndex,e)},a.clearFeatureFlags=function(){this._features=[],this._featuresIndex={}},a.getContext=function(){return this._context},a.setContext=function(e){this._context=e},a.getGroupingDiscriminator=function(){return this._groupingDiscriminator},a.setGroupingDiscriminator=function(e){var t=this._groupingDiscriminator;return(typeof e==`string`||e==null)&&(this._groupingDiscriminator=e),t},a._configure=function(e,t){var r=n(t,function(e,t){return t&&t.configSchema?m({},e,t.configSchema):e},this._schema);e.endpoints||(e.sendPayloadChecksums=`sendPayloadChecksums`in e?e.sendPayloadChecksums:!0);var i=n(c(r),function(t,n){var i=r[n].defaultValue(e[n]);return e[n]===void 0?t.config[n]=i:r[n].validate(e[n])?r[n].allowPartialObject?t.config[n]=m(i,e[n]):t.config[n]=e[n]:(t.errors[n]=r[n].message,t.config[n]=i),t},{errors:{},config:{}}),a=i.errors,o=i.config;if(r.apiKey){if(!o.apiKey)throw Error(`No Bugsnag API Key set`);/^[0-9a-f]{32}$/i.test(o.apiKey)||(a.apiKey=`should be a string of 32 hexadecimal characters`),e.endpoints===void 0&&o.apiKey.indexOf(Ge)===0&&(o.endpoints={notify:Ke,sessions:qe})}return this._metadata=m({},o.metadata),I(this._features,o.featureFlags,this._featuresIndex),this._user=m({},o.user),this._context=o.context,o.logger&&(this._logger=o.logger),o.onError&&(this._cbs.e=this._cbs.e.concat(o.onError)),o.onBreadcrumb&&(this._cbs.b=this._cbs.b.concat(o.onBreadcrumb)),o.onSession&&(this._cbs.s=this._cbs.s.concat(o.onSession)),c(a).length&&this._logger.warn(Ye(a,e)),o},a.getUser=function(){return this._user},a.setUser=function(e,t,n){this._user={id:e,email:t,name:n}},a._loadPlugin=function(e){var t=e.load(this);e.name&&(this._plugins[`~`+e.name+`~`]=t)},a.getPlugin=function(e){return this._plugins[`~`+e+`~`]},a._setDelivery=function(e){this._delivery=e(this)},a.startSession=function(){var e=new F;return e.app.releaseStage=this._config.releaseStage,e.app.version=this._config.appVersion,e.app.type=this._config.appType,e._user=m({},this._user),N(this._cbs.s,e,`onSession`,this._logger)?(this._logger.debug(`Session not started due to onSession callback`),this):this._sessionDelegate.startSession(this,e)},a.addOnError=function(e,t){t===void 0&&(t=!1),this._cbs.e[t?`unshift`:`push`](e)},a.removeOnError=function(e){this._cbs.e=r(this._cbs.e,function(t){return t!==e})},a._addOnSessionPayload=function(e){this._cbs.sp.push(e)},a.addOnSession=function(e){this._cbs.s.push(e)},a.removeOnSession=function(e){this._cbs.s=r(this._cbs.s,function(t){return t!==e})},a.addOnBreadcrumb=function(e,t){t===void 0&&(t=!1),this._cbs.b[t?`unshift`:`push`](e)},a.removeOnBreadcrumb=function(e){this._cbs.b=r(this._cbs.b,function(t){return t!==e})},a.pauseSession=function(){return this._sessionDelegate.pauseSession(this)},a.resumeSession=function(){return this._sessionDelegate.resumeSession(this)},a.leaveBreadcrumb=function(e,n,r){if(e=typeof e==`string`?e:``,r=typeof r==`string`&&i(t,r)?r:`manual`,n=typeof n==`object`&&n?n:{},e){var a=new v(e,n,r);if(N(this._cbs.b,a,`onBreadcrumb`,this._logger)){this._logger.debug(`Breadcrumb not attached due to onBreadcrumb callback`);return}this._breadcrumbs.push(a),this._breadcrumbs.length>this._config.maxBreadcrumbs&&(this._breadcrumbs=this._breadcrumbs.slice(this._breadcrumbs.length-this._config.maxBreadcrumbs))}},a._isBreadcrumbTypeEnabled=function(e){var t=this._config.enabledBreadcrumbTypes;return t===null||i(t,e)},a.notify=function(e,t,n){n===void 0&&(n=L);var r=M.create(e,!0,void 0,`notify()`,this._depth+1,this._logger);this._notify(r,t,n)},a._notify=function(t,n,r){var a=this;if(r===void 0&&(r=L),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(),t.setGroupingDiscriminator(this._groupingDiscriminator),I(t._features,this._features,t._featuresIndex),this._config.enabledReleaseStages!==null&&!i(this._config.enabledReleaseStages,this._config.releaseStage))return this._logger.warn(`Event not sent due to releaseStage/enabledReleaseStages configuration`),r(null,t);var o=t.severity,s=function(e){a._logger.error(`Error occurred in onError callback, continuing anyway…`),a._logger.error(e)};je([].concat(this._cbs.e,n),t,s,function(n,i){if(n&&s(n),!i)return a._logger.debug(`Event not sent due to onError callback`),r(null,t);a._isBreadcrumbTypeEnabled(`error`)&&e.prototype.leaveBreadcrumb.call(a,t.errors[0].errorClass,{errorClass:t.errors[0].errorClass,errorMessage:t.errors[0].errorMessage,severity:t.severity},`error`),o!==t.severity&&(t._handledState.severityReason={type:`userCallbackSetSeverity`}),t.unhandled!==t._handledState.unhandled&&(t._handledState.severityReason.unhandledOverridden=!0,t._handledState.unhandled=t.unhandled),a._session&&(a._session._track(t),t._session=a._session),a._delivery.sendEvent({apiKey:t.apiKey||a._config.apiKey,notifier:a._notifier,events:[t]},function(e){return r(e,t)})})},e}(),Ye=function(e,t){return Error(`Invalid configuration
10`+h(c(e),function(n){return`  - `+n+` `+e[n]+`, got `+Xe(t[n])}).join(`
11
12`))},Xe=function(e){switch(typeof e){case`string`:case`number`:case`object`:return JSON.stringify(e);default:return String(e)}},R=Je,z={},Ze=[`events.[].metaData`,`events.[].breadcrumbs.[].metaData`,`events.[].request`,`events.[].response`];z.event=function(e,t){var n=C(e,null,null,{redactedPaths:Ze,redactedKeys:t});return n.length>1e6&&(e.events[0]._metadata={notifier:`WARNING!
13Serialized payload was `+n.length/1e6+`MB (limit = 1MB)
14metadata was removed`},n=C(e,null,null,{redactedPaths:Ze,redactedKeys:t})),n},z.session=function(e,t){return C(e,null,null)};var B={};B=function(e,t){return t===void 0&&(t=window),{sendEvent:function(n,r){if(r===void 0&&(r=function(){}),e._config.endpoints.notify===null)return r(Error(`Event not sent due to incomplete endpoint configuration`));var i=V(e._config,`notify`,`4`,t),a=z.event(n,e._config.redactedKeys),o=new t.XDomainRequest;o.onload=function(){r(null)},o.onerror=function(){var t=Error(`Event failed to send`);e._logger.error(`Event failed to send…`,t),a.length>1e6&&e._logger.warn(`Event oversized (`+(a.length/1e6).toFixed(2)+` MB)`),r(t)},o.open(`POST`,i),setTimeout(function(){try{o.send(a)}catch(t){e._logger.error(t),r(t)}},0)},sendSession:function(n,r){if(r===void 0&&(r=function(){}),e._config.endpoints.sessions===null)return r(Error(`Session not sent due to incomplete endpoint configuration`));var i=V(e._config,`sessions`,`1`,t),a=new t.XDomainRequest;a.onload=function(){r(null)},a.open(`POST`,i),setTimeout(function(){try{a.send(z.session(n,e._config.redactedKeys))}catch(t){e._logger.error(t),r(t)}},0)}}};var V=function(e,t,n,r){var i=JSON.parse(JSON.stringify(new Date));return Qe(e.endpoints[t],r.location.protocol)+`?apiKey=`+encodeURIComponent(e.apiKey)+`&payloadVersion=`+n+`&sentAt=`+encodeURIComponent(i)},Qe=B._matchPageProtocol=function(e,t){return t===`http:`?e.replace(/^https:/,`http:`):e};function H(e,t){if(e.isSecureContext&&e.crypto&&e.crypto.subtle&&e.crypto.subtle.digest&&typeof TextEncoder==`function`){var n=new TextEncoder().encode(t);return e.crypto.subtle.digest(`SHA-1`,n).then(function(e){return`sha1 `+Array.from(new Uint8Array(e)).map(function(e){return e.toString(16).padStart(2,`0`)}).join(``)})}return Promise.resolve()}var $e=function(e,t){return t===void 0&&(t=window),{sendEvent:function(n,r){r===void 0&&(r=function(){});try{var i=e._config.endpoints.notify;if(i===null)return r(Error(`Event not sent due to incomplete endpoint configuration`));var a=new t.XMLHttpRequest,o=z.event(n,e._config.redactedKeys);a.onreadystatechange=function(){if(a.readyState===t.XMLHttpRequest.DONE){var n=a.status;if(n===0||n>=400){var i=Error(`Request failed with status `+n);e._logger.error(`Event failed to send…`,i),o.length>1e6&&e._logger.warn(`Event oversized (`+(o.length/1e6).toFixed(2)+` MB)`),r(i)}else r(null)}},a.open(`POST`,i),a.setRequestHeader(`Content-Type`,`application/json`),a.setRequestHeader(`Bugsnag-Api-Key`,n.apiKey||e._config.apiKey),a.setRequestHeader(`Bugsnag-Payload-Version`,`4`),a.setRequestHeader(`Bugsnag-Sent-At`,new Date().toISOString()),e._config.sendPayloadChecksums&&typeof Promise<`u`&&Promise.toString().indexOf(`[native code]`)!==-1?H(t,o).then(function(e){e&&a.setRequestHeader(`Bugsnag-Integrity`,e),a.send(o)}).catch(function(t){e._logger.error(t),a.send(o)}):a.send(o)}catch(t){e._logger.error(t)}},sendSession:function(n,r){r===void 0&&(r=function(){});try{var i=e._config.endpoints.sessions;if(i===null)return r(Error(`Session not sent due to incomplete endpoint configuration`));var a=new t.XMLHttpRequest,o=z.session(n,e._config.redactedKeys);a.onreadystatechange=function(){if(a.readyState===t.XMLHttpRequest.DONE){var n=a.status;if(n===0||n>=400){var i=Error(`Request failed with status `+n);e._logger.error(`Session failed to send…`,i),r(i)}else r(null)}},a.open(`POST`,i),a.setRequestHeader(`Content-Type`,`application/json`),a.setRequestHeader(`Bugsnag-Api-Key`,e._config.apiKey),a.setRequestHeader(`Bugsnag-Payload-Version`,`1`),a.setRequestHeader(`Bugsnag-Sent-At`,new Date().toISOString()),e._config.sendPayloadChecksums&&typeof Promise<`u`&&Promise.toString().indexOf(`[native code]`)!==-1?H(t,o).then(function(e){e&&a.setRequestHeader(`Bugsnag-Integrity`,e),a.send(o)}).catch(function(t){e._logger.error(t),a.send(o)}):a.send(o)}catch(t){e._logger.error(t)}}}},U=new Date,et=function(){U=new Date},tt={name:`appDuration`,load:function(e){return e.addOnError(function(e){var t=new Date;e.app.duration=t-U},!0),{reset:et}}},nt=function(e){return e===void 0&&(e=window),{load:function(t){t.addOnError(function(t){t.context===void 0&&(t.context=e.location.pathname)},!0)}}};function rt(e){return typeof e==`string`&&/^c[a-z0-9]{20,32}$/.test(e)}var it=rt;function at(e,t){var n=`000000000`+e;return n.substr(n.length-t)}var W=at;function ot(e){var t=4,n=36,r=n**+t,i=0;function a(){return W((Math.random()*r<<0).toString(n),t)}function o(){return i=i<r?i:0,i++,i-1}function s(){var r=`c`,i=new Date().getTime().toString(n),s=W(o().toString(n),t),c=e(),l=a()+a();return r+i+s+c+l}return s.fingerprint=e,s.isCuid=it,s}var st=ot,G=typeof window==`object`?window:self,ct=0;for(var lt in G)Object.hasOwnProperty.call(G,lt)&&ct++;var ut=W(((navigator.mimeTypes?navigator.mimeTypes.length:0)+navigator.userAgent.length).toString(36)+ct.toString(36),4);function dt(){return ut}var ft=st(dt),pt=`bugsnag-anonymous-id`,mt=function(e){try{var t=e.localStorage,n=t.getItem(pt);
14return n&&ft.isCuid(n)?n:(n=ft(),t.setItem(pt,n),n)}catch{}},ht=function(e,t){return e===void 0&&(e=navigator),t===void 0&&(t=window),{load:function(n){var r={locale:e.browserLanguage||e.systemLanguage||e.userLanguage||e.language,userAgent:e.userAgent};t&&t.screen&&t.screen.orientation&&t.screen.orientation.type?r.orientation=t.screen.orientation.type:t&&t.document&&(r.orientation=t.document.documentElement.clientWidth>t.document.documentElement.clientHeight?`landscape`:`portrait`),n._config.generateAnonymousId&&(r.id=mt(t)),n.addOnSession(function(e){e.device=m({},e.device,r),n._config.collectUserIp||gt(e)}),n.addOnError(function(e){e.device=m({},e.device,r,{time:new Date}),n._config.collectUserIp||gt(e)},!0)},configSchema:{generateAnonymousId:{validate:function(e){return e===!0||e===!1},defaultValue:function(){return!0},message:`should be true|false`}}}},gt=function(e){var t=e.getUser();(!t||!t.id)&&e.setUser(e.device.id)},_t=function(e){return e===void 0&&(e=window),{load:function(t){t.addOnError(function(t){t.request&&t.request.url||(t.request=m({},t.request,{url:e.location.href}))},!0)}}},vt={load:function(e){e._sessionDelegate=yt}},yt={startSession:function(e,t){var n=e;return n._session=t,n._pausedSession=null,n._config.enabledReleaseStages!==null&&!i(n._config.enabledReleaseStages,n._config.releaseStage)?(n._logger.warn(`Session not sent due to releaseStage/enabledReleaseStages configuration`),n):(n._delivery.sendSession({notifier:n._notifier,device:t.device,app:t.app,sessions:[{id:t.id,startedAt:t.startedAt,user:t._user}]}),n)},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}},bt={load:function(e){e._config.collectUserIp||e.addOnError(function(e){e._user&&e._user.id===void 0&&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 e===!0||e===!1}}}},xt={};xt.load=function(e){!/^(local-)?dev(elopment)?$/.test(e._config.releaseStage)&&e._isBreadcrumbTypeEnabled(`log`)&&h(St,function(t){var r=console[t];console[t]=function(){var i=[...arguments];e.leaveBreadcrumb(`Console output`,n(i,function(e,t,n){var r=`[Unknown value]`;try{r=String(t)}catch{}if(r===`[object Object]`)try{r=JSON.stringify(t)}catch{}return e[`[`+n+`]`]=r,e},{severity:t.indexOf(`group`)===0?`log`:t}),`log`),r.apply(console,i)},console[t]._restore=function(){console[t]=r}})};var St=r([`log`,`debug`,`info`,`warn`,`error`],function(e){return typeof console<`u`&&typeof console[e]==`function`}),Ct=200,wt=5e5,Tt=function(e,t){return e===void 0&&(e=document),t===void 0&&(t=window),{load:function(i){if(!i._config.trackInlineScripts)return;var a=t.location.href,o=``,s=e.attachEvent?e.readyState===`complete`:e.readyState!==`loading`,c=function(){return e.documentElement.outerHTML};o=c();var l=e.onreadystatechange;e.onreadystatechange=function(){e.readyState===`interactive`&&(o=c(),s=!0);try{l.apply(this,arguments)}catch{}};var u=null,d=function(e){u=e},f=function(){var t=e.currentScript||u;if(!t&&!s){var n=e.scripts||e.getElementsByTagName(`script`);t=n[n.length-1]}return t},p=function(e){(!s||!o)&&(o=c());var t=[`<!-- DOC START -->`].concat(o.split(`
15`)),r=e-1,i=Math.max(r-3,0),a=Math.min(r+3,t.length);return n(t.slice(i,a),function(e,t,n){return e[i+1+n]=t.length<=Ct?t:t.substr(0,Ct),e},{})};i.addOnError(function(e){e.errors[0].stacktrace=r(e.errors[0].stacktrace,function(e){return!/__trace__$/.test(e.method)});var t=e.errors[0].stacktrace[0],n=function(e){return e.replace(/#.*$/,``).replace(/\?.*$/,``)};if(!(t&&t.file&&n(t.file)!==n(a))){var i=f();if(i){var o=i.innerHTML;e.addMetadata(`script`,`content`,o.length<=wt?o:o.substr(0,wt)),t&&t.lineNumber&&(t.code=p(t.lineNumber))}}},!0);var m=h([`setTimeout`,`setInterval`,`setImmediate`,`requestAnimationFrame`],function(e){return K(t,e,function(e){return g(e,function(e){return{get:function(){return e[0]},replace:function(t){e[0]=t}}})})})[0];h(`EventTarget.Window.Node.ApplicationCache.AudioTrackList.ChannelMergerNode.CryptoOperation.EventSource.FileReader.HTMLUnknownElement.IDBDatabase.IDBRequest.IDBTransaction.Ke
15yOperation.MediaController.MessagePort.ModalWindow.Notification.SVGElementInstance.Screen.TextTrack.TextTrackCue.TextTrackList.WebSocket.WebSocketWorker.Worker.XMLHttpRequest.XMLHttpRequestEventTarget.XMLHttpRequestUpload.MediaSource.MediaRecorder.MediaStream.ServiceWorker.ServiceWorkerContainer.ServiceWorkerRegistration.BroadcastChannel.RTCPeerConnection.RTCDataChannel.AbortSignal.MediaQueryList.ShadowRoot.FontFaceSet.Animation.PermissionStatus.PaymentRequest.VideoTrackList`.split(`.`),function(e){t[e]&&t[e].prototype&&Object.prototype.hasOwnProperty.call(t[e].prototype,`addEventListener`)&&(K(t[e].prototype,`addEventListener`,function(e){return g(e,Et)}),K(t[e].prototype,`removeEventListener`,function(e){return g(e,Et,!0)}))});function g(e,t,n){return n===void 0&&(n=!1),function(){var r=[...arguments];try{var i=t(r),a=i.get();if(n&&e.apply(this,r),typeof a!=`function`)return e.apply(this,r);if(a.__trace__)i.replace(a.__trace__);else{var o=f();a.__trace__=function(){d(o),m(function(){d(null)},0);var e=[...arguments],t=a.apply(this,e);return d(null),t},a.__trace__.__trace__=a.__trace__,i.replace(a.__trace__)}}catch{}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 e===!0||e===!1},defaultValue:function(){return!0},message:`should be true|false`}}}};function K(e,t,n){var r=e[t];return r&&(e[t]=n(r),r)}function Et(e){var t=!!e[1]&&typeof e[1].handleEvent==`function`;return{get:function(){return t?e[1].handleEvent:e[1]},replace:function(n){t?e[1].handleEvent=n:e[1]=n}}}var Dt=function(e){return e===void 0&&(e=window),{load:function(t){`addEventListener`in e&&t._isBreadcrumbTypeEnabled(`user`)&&e.addEventListener(`click`,function(n){var r,i;try{r=kt(n.target),i=At(n.target,e)}catch{r=`[hidden]`,i=`[hidden]`,t._logger.error(`Cross domain error when tracking click event. See docs: https://tinyurl.com/yy3rn63z`)}t.leaveBreadcrumb(`UI click`,{targetText:r,targetSelector:i},`user`)},!0)}}},Ot=/^\s*([^\s][\s\S]{0,139}[^\s])?\s*/;function kt(e){var t=e.textContent||e.innerText||``;return!t&&(e.type===`submit`||e.type===`button`)&&(t=e.value),t=t.replace(Ot,`$1`),t.length>140?t.slice(0,135)+`(...)`:t}function At(e,t){var n=[e.tagName];if(e.id&&n.push(`#`+e.id),e.className&&e.className.length&&n.push(`.`+e.className.split(` `).join(`.`)),!t.document.querySelectorAll||!Array.prototype.indexOf)return n.join(``);try{if(t.document.querySelectorAll(n.join(``)).length===1)return n.join(``)}catch{return n.join(``)}if(e.parentNode.childNodes.length>1){var r=Array.prototype.indexOf.call(e.parentNode.childNodes,e)+1;n.push(`:nth-child(`+r+`)`)}return t.document.querySelectorAll(n.join(``)).length===1?n.join(``):e.parentNode?At(e.parentNode,t)+` > `+n.join(``):n.join(``)}var jt={};jt=function(e){return e===void 0&&(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:q(n.oldURL,e),to:q(n.newURL,e),state:Pt(e)}:{to:q(e.location.href,e)};t.leaveBreadcrumb(`Hash changed`,r,`navigation`)},!0),e.history.pushState&&Nt(t,e.history,`pushState`,e,!0),e.history.replaceState&&Nt(t,e.history,`replaceState`,e)}}}};var q=function(e,t){var n=t.document.createElement(`A`);return n.href=e,``+n.pathname+n.search+n.hash},Mt=function(e,t,n,r){var i=q(e.location.href,e);return{title:n,state:t,prevState:Pt(e),to:r||i,from:i}},Nt=function(e,t,n,r,i){i===void 0&&(i=!1);var a=t[n];t[n]=function(o,s,c){e.leaveBreadcrumb(`History `+n,Mt(r,o,s,c),`navigation`),i&&typeof e.resetEventCount==`function`&&e.resetEventCount(),a.apply(t,[o,s].concat(c===void 0?[]:c))}},Pt=function(e){try{return e.history.state}catch{}},Ft=function(e){if(!e)return{};var t={};if(typeof e.entries==`function`)for(var n=e.entries(),r=n.next();!r.done;){var i=r.value,a=i[0];t[a]=i[1],r=n.next()}else e.forEach&&e.forEach(function(e,n){t[n]=e});return t},J=function(){function e(){this.callbacks=[]}var t=e.prototype;return t.onStart=function(e){if(typeof e!=`function`)throw Error(`RequestTracker onStart callback must be a function`);this.callbacks.push(e)},t.start=function(e){var t=this.callbacks.map(function(t){try{return t(e)}catch(e){return console.error(`RequestTracker callback error:`,e),null}}).filter(function(e){return e&&typeof e==`object`});return{onRequestEnd:function(e){t.forEach(function(t){if(typeof t.onRequestEnd==`function`)try{t.onRequestEnd(e)}catch(e){console.error(`RequestTracker onRequestEnd callback error:`,e)}})},extraRequestHeaders:t.map(function(e){return e.extraRequestHeaders}).filter(function(e){return e&&typeof e==`object`}).reduce(function(e,t){return Object.assign(e,t)},{})}},t._reset=function(){this.callbacks=[]},e}();function It(e,t){if(t===void 0&&(t={}),`fetch`in e&&!e.fetch.polyfill){if(!e.__bugsnag_fetch_tracker__){var n=new J,r=e.fetch;e.fetch=function(e,t){t===void 0&&(t={});var i=null,a=`GET`;e&&typeof e==`object`?(i=e.url,t&&`method`in t?a=t.method:e&&`method`in e&&(a=e.method)):(i=e,t&&`method`in t&&(a=t.method)),a===void 0&&(a=`GET`);var o={};t&&t.headers&&(t.headers instanceof Headers?o=Ft(t.headers):typeof t.headers==`object`&&(o=t.headers));var s={url:String(i),method:String(a),startTime:Date.now(),type:`fetch`,input:e,headers:o,body:t?t.body:void 0},c=n.start(s).onRequestEnd;return r.call.apply(r,[this].concat(Array.prototype.slice.call(arguments))).then(function(e){return c({endTime:Date.now(),status:e.status,state:`success`,headers:Ft(e.headers)}),e},function(e){throw c({endTime:Date.now(),state:`error`,error:e}),e})},e.__bugsnag_fetch_tracker__=n}return e.__bugsnag_fetch_tracker__}}var Lt=It;function Rt(e,t){if(t===void 0&&(t=[]),!e||typeof e!=`string`)return!0;var n=e.replace(/\?.*$/,``);return i(t,n)}function zt(e,t){t===void 0&&(t=[]);var n=[e._config.endpoints.notify,e._config.endpoints.sessions].concat(t).filter(
15Boolean);return function(e){return Rt(e,n)}}function Bt(e){return e&&Date.now()-e}var Vt={shouldIgnoreUrl:Rt,createUrlFilter:zt,getDuration:Bt},Ht=function(e){if(!e)return{};var t=e.trim().split(/[\r\n]+/),n={};return t.forEach(function(e){var t=e.split(`: `),r=t.shift();n[r]=t.join(`: `)}),n},Ut=function(e){var t=e.response,n=e.responseType;if(t!=null)switch(n){case`arraybuffer`:case`blob`:return`[Binary Data]`;case`document`:return`[Document]`;case`json`:try{return JSON.stringify(t)}catch{return`[Unserializable JSON]`}default:return String(t)}};function Wt(e,t){if(t===void 0&&(t={}),`addEventListener`in e.XMLHttpRequest.prototype&&`WeakMap`in e){if(!e.__bugsnag_xhr_tracker__){var n=new J,r=new WeakMap,i=new WeakMap,a=e.XMLHttpRequest.prototype.open,o=e.XMLHttpRequest.prototype.send,s=e.XMLHttpRequest.prototype.setRequestHeader;e.XMLHttpRequest.prototype.open=function(e,t){this&&r.set(this,{method:String(e),url:String(t)}),a.apply(this,arguments)},e.XMLHttpRequest.prototype.setRequestHeader=function(e,t){if(this){var n=r.get(this);n&&(n.headers=n.headers||{},n.headers[String(e)]=(n.headers[String(e)]||``)+String(t))}s.apply(this,arguments)},e.XMLHttpRequest.prototype.send=function(e){var t=this,a=r.get(this);if(a){var s=i.get(this);s&&(this.removeEventListener(`load`,s.load),this.removeEventListener(`error`,s.error));var c=Date.now(),l={url:a.url,method:a.method,startTime:c,type:`xmlhttprequest`,body:e,headers:a.headers},u=n.start(l).onRequestEnd,d=function(){return Ht(t.getAllResponseHeaders())},f=function(){u({endTime:Date.now(),status:t.status,state:`success`,headers:d(),body:Ut(t)})},p=function(){u({endTime:Date.now(),state:`error`,headers:d(),body:Ut(t)})};this.addEventListener(`load`,f),this.addEventListener(`error`,p),this&&i.set(this,{load:f,error:p})}o.apply(this,arguments)},e.__bugsnag_xhr_tracker__=n}return e.__bugsnag_xhr_tracker__}}var Gt=Wt,Kt=Vt.createUrlFilter,qt=Vt.getDuration;function Jt(e,t){return e===void 0&&(e=[]),t===void 0&&(t=window),{name:`requestTracker`,load:function(n){try{return{fetchTracker:Lt(t),xhrTracker:Gt(t),urlFilter:Kt(n,e),getDuration:qt}}catch(e){throw n._logger.error(`Failed to load request tracker:`,e),Error(`Request tracking is not available: `+e.message)}}}}var Yt={RequestTracker:J,createFetchTracker:Lt,createXhrTracker:Gt,createUrlFilter:Kt,getDuration:qt,createRequestTrackerPlugin:Jt},Y=`request`,Xt=function(e,t){e===void 0&&(e=[]),t===void 0&&(t=window);var n=[];return{load:function(r){if(!r._isBreadcrumbTypeEnabled(`request`))return;var i=r.getPlugin(`requestTracker`);if(!i)try{var a=Yt.createRequestTrackerPlugin,o=a(e,t);r._loadPlugin(o),i=r.getPlugin(`requestTracker`)}catch(e){r._logger.warn(`Failed to auto-load request tracker, falling back to direct monkey-patching:`,e.message)}if(i)return s(i);function s(e){var t=e.fetchTracker,i=e.xhrTracker,a=e.urlFilter,o=e.getDuration,s=function(e){if(!a(e.url))return{onRequestEnd:function(t){var n=o(e.startTime),i={method:e.method,status:t.status,url:e.url,duration:n},a=e.type===`fetch`?`fetch()`:`XMLHttpRequest`;t.state===`error`?r.leaveBreadcrumb(a+` error`,{method:e.method,url:e.url,duration:n},Y):t.status>=400?r.leaveBreadcrumb(a+` failed`,i,Y):r.leaveBreadcrumb(a+` succeeded`,i,Y)}}};t&&(t.onStart(s),n.push(t._restore)),i&&(i.onStart(s),n.push(i._restore))}}}},Zt={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 l(1,100)(e)}}}},X={};X={load:function(e){e.addOnError(function(e){h(n(e.errors,function(e,t){return e.concat(t.stacktrace)},[]),function(e){e.file=Qt(e.file)})})}};var Qt=X._strip=function(e){return typeof e==`string`?e.replace(/\?.*$/,``).replace(/#.*$/,``):e},$t=function(e,t){return e===void 0&&(e=window),t===void 0&&(t=`window onerror`),{load:function(n){if(!n._config.autoDetectErrors||!n._config.enabledErrorTypes.unhandledExceptions)return;
15function r(e,r,a,o,s){if(a===0&&/Script error\.?/.test(e))n._logger.warn(`Ignoring cross-domain or eval script error. See docs: https://tinyurl.com/yy3rn63z`);else{var c={severity:`error`,unhandled:!0,severityReason:{type:`unhandledException`}},l;if(s)l=n.Event.create(s,!0,c,t,1),en(l.errors[0].stacktrace,r,a,o);else if(typeof e==`object`&&e&&(!r||typeof r!=`string`)&&!a&&!o&&!s){var u=e.type?`Event: `+e.type:`Error`,d=e.message||e.detail||``;l=n.Event.create({name:u,message:d},!0,c,t,1),l.originalError=e,l.addMetadata(t,{event:e,extraParameters:r})}else l=n.Event.create(e,!0,c,t,1),en(l.errors[0].stacktrace,r,a,o);n._notify(l)}try{i.apply(this,arguments)}catch{}}var i=e.onerror;e.onerror=r}}},en=function(e,t,n,r){e[0]||e.push({});var i=e[0];!i.file&&typeof t==`string`&&(i.file=t),!i.lineNumber&&Z(n)&&(i.lineNumber=n),i.columnNumber||(Z(r)?i.columnNumber=r:window.event&&Z(window.event.errorCharacter)&&(i.columnNumber=window.event.errorCharacter))},Z=function(e){return typeof e==`number`&&String.call(e)!==`NaN`},tn=function(e){return e===void 0&&(e=window),{load:function(t){if(t._config.autoDetectErrors&&t._config.enabledErrorTypes.unhandledRejections){var n=function(e){var n=e.reason,r=!1;try{e.detail&&e.detail.reason&&(n=e.detail.reason,r=!0)}catch{}var i=!t._config.reportUnhandledPromiseRejectionsAsHandled,a=t.Event.create(n,!1,{severity:`error`,unhandled:i,severityReason:{type:`unhandledPromiseRejection`}},`unhandledrejection handler`,1,t._logger);r&&h(a.errors[0].stacktrace,nn(n)),t._notify(a,function(e){if(D(e.originalError)&&!e.originalError.stack){var t;e.addMetadata(`unhandledRejection handler`,(t={},t[Object.prototype.toString.call(e.originalError)]={name:e.originalError.name,message:e.originalError.message,code:e.originalError.code},t))}})};`addEventListener`in e?e.addEventListener(`unhandledrejection`,n):e.onunhandledrejection=function(e,t){n({detail:{reason:e,promise:t}})}}}}},nn=function(e){return function(t){t.file!==e.toString()&&(t.method&&=t.method.replace(/^\s+/,``))}},Q={},rn=`Bugsnag JavaScript`,an=`8.10.0`,on=`https://github.com/bugsnag/bugsnag-js`,sn=m({},f.schema,ee),$={_client:null,createClient:function(e){typeof e==`string`&&(e={apiKey:e}),e||={};var t=[tt,ht(),nt(),_t(),Zt,vt,bt,X,$t(),tn(),jt(),Dt(),Xt(),xt,Tt()],n=new R(e,sn,t,{name:rn,version:an,url:on});return n._setDelivery(window.XDomainRequest?B:$e),n._logger.debug(`Loaded!`),n.leaveBreadcrumb(`Bugsnag loaded`,{},`state`),n._config.autoTrackSessions?n.startSession():n},start:function(e){return $._client?($._client._logger.warn(`Bugsnag.start() was called more than once. Ignoring.`),$._client):($._client=$.createClient(e),$._client)},isStarted:function(){return $._client!=null}};return h([`resetEventCount`].concat(c(R.prototype)),function(e){/^_/.test(e)||($[e]=function(){if(!$._client)return console.log(`Bugsnag.`+e+`() was called before Bugsnag.start()`);$._client._depth+=1;var t=$._client[e].apply($._client,arguments);return--$._client._depth,t})}),Q=$,Q.Client=R,Q.Event=M,Q.Session=F,Q.Breadcrumb=v,Q.default=$,Q})})),n=e(((e,n)=>{n.exports=t()})),r=[];for(let e=0;e<256;++e)r.push((e+256).toString(16).slice(1));function i(e,t=0){return(r[e[t+0]]+r[e[t+1]]+r[e[t+2]]+r[e[t+3]]+`-`+r[e[t+4]]+r[e[t+5]]+`-`+r[e[t+6]]+r[e[t+7]]+`-`+r[e[t+8]]+r[e[t+9]]+`-`+r[e[t+10]]+r[e[t+11]]+r[e[t+12]]+r[e[t+13]]+r[e[t+14]]+r[e[t+15]]).toLowerCase()}var a=new Uint8Array(16);function o(){return crypto.getRandomValues(a)}function s(e,t,n){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():c(e,t,n)}function c(e,t,n){e||={};let r=e.random??e.rng?.()??o();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return i(r)}var l=[/Failed to fetch dynamically imported module/,/JSON array expected\./,/cannot be parsed as a URL\./,/is not a valid URL\./],u=e=>l.some(t=>t.test(e??``));export{s as n,n as r,u as t};
16//# sourceMappingURL=bugsnag-Cx1_1MSo.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.