1import{t as e}from"./hePW80VL.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`?window:typeof global<`u`?global:typeof self<`u`?self:this;r.BugsnagPluginVue=n()}})(function(){var e=this,t,n=function(t,n){var i=t.config.errorHandler,a=function(t,a,s){var c=n.Event.create(t,!0,{severity:`error`,unhandled:!0,severityReason:{type:`unhandledException`}},`vue error handler`,1),l=o[typeof s==`string`&&s.indexOf(`runtime-`)>0?s.split(`runtime-`)[1]:s]||s;c.addMetadata(`vue`,{errorInfo:l,component:a?r(a,!0):void 0,props:a&&a.$options?a.$options.propsData:void 0}),n._notify(c),typeof console<`u`&&typeof console.error==`function`&&console.error(t),typeof i==`function`&&i.call(e,t,a,s)};t.config.errorHandler=a};function r(e){return e.$parent===null?`App`:e.$options&&e.$options.name?e.$options.name:`Anonymous`}var i={BEFORE_CREATE:`bc`,CREATED:`c`,BEFORE_MOUNT:`bm`,MOUNTED:`m`,BEFORE_UPDATE:`bu`,UPDATED:`u`,BEFORE_UNMOUNT:`bum`,UNMOUNTED:`um`,DEACTIVATED:`da`,ACTIVATED:`a`,RENDER_TRIGGERED:`rtg`,RENDER_TRACKED:`rtc`,ERROR_CAPTURED:`ec`,SERVER_PREFETCH:`sp`},a={SETUP_FUNCTION:0,RENDER_FUNCTION:1,WATCH_GETTER:2,WATCH_CALLBACK:3,WATCH_CLEANUP:4,NATIVE_EVENT_HANDLER:5,COMPONENT_EVENT_HANDLER:6,VNODE_HOOK:7,DIRECTIVE_HOOK:8,TRANSITION_HOOK:9,APP_ERROR_HANDLER:10,APP_WARN_HANDLER:11,FUNCTION_REF:12,ASYNC_COMPONENT_LOADER:13,SCHEDULER:14},o=(t={},t[i.SERVER_PREFETCH]=`serverPrefetch hook`,t[i.BEFORE_CREATE]=`beforeCreate hook`,t[i.CREATED]=`created hook`,t[i.BEFORE_MOUNT]=`beforeMount hook`,t[i.MOUNTED]=`mounted hook`,t[i.BEFORE_UPDATE]=`beforeUpdate hook`,t[i.UPDATED]=`updated`,t[i.BEFORE_UNMOUNT]=`beforeUnmount hook`,t[i.UNMOUNTED]=`unmounted hook`,t[i.ACTIVATED]=`activated hook`,t[i.DEACTIVATED]=`deactivated hook`,t[i.ERROR_CAPTURED]=`errorCaptured hook`,t[i.RENDER_TRACKED]=`renderTracked hook`,t[i.RENDER_TRIGGERED]=`renderTriggered hook`,t[a.SETUP_FUNCTION]=`setup function`,t[a.RENDER_FUNCTION]=`render function`,t[a.WATCH_GETTER]=`watcher getter`,t[a.WATCH_CALLBACK]=`watcher callback`,t[a.WATCH_CLEANUP]=`watcher cleanup function`,t[a.NATIVE_EVENT_HANDLER]=`native event handler`,t[a.COMPONENT_EVENT_HANDLER]=`component event handler`,t[a.VNODE_HOOK]=`vnode hook`,t[a.DIRECTIVE_HOOK]=`directive hook`,t[a.TRANSITION_HOOK]=`transition hook`,t[a.APP_ERROR_HANDLER]=`app errorHandler`,t[a.APP_WARN_HANDLER]=`app warnHandler`,t[a.FUNCTION_REF]=`ref function`,t[a.ASYNC_COMPONENT_LOADER]=`async component loader`,t[a.SCHEDULER]=`scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core .`,t),s={},c=this;s=function(e,t){var n=e.config.errorHandler,r=function(e,r,i){var a=t.Event.create(e,!0,{severity:`error`,unhandled:!0,severityReason:{type:`unhandledException`}},`vue error handler`,1);a.addMetadata(`vue`,{errorInfo:i,component:r?l(r,!0):void 0,props:r?r.$options.propsData:void 0}),t._notify(a),typeof console<`u`&&typeof console.error==`function`&&console.error(e),typeof n==`function`&&n.call(c,e,r,i)};e.config.errorHandler=r};var l=function(e,t){if(e.$root===e)return`<Root>`;var n=typeof e==`function`&&e.cid!=null?e.options:e._isVue?e.$options||e.constructor.options:e||{},r=n.name||n._componentTag,i=n.__file;if(!r&&i){var a=i.match(/([^/\\]+)\.vue$/);r=a&&a[1]}return(r?`<`+u(r)+`>`:`<Anonymous>`)+(i&&t!==!1?` at `+i:``)},u=s.classify=function(e){return e.replace(/(?:^|[-_])(\w)/g,function(e){return e.toUpperCase()}).replace(/[-_]/g,``)},d={};return d=function(){function e(){var e=typeof window<`u`&&window.Vue;if(this.name=`vue`,this.lazy=arguments.length===0&&!e,!this.lazy&&(this.Vue=(arguments.length<=0?void 0:arguments[0])||e,!this.Vue))throw Error("@bugsnag/plugin-vue reference to `Vue` was undefined")}var t=e.prototype;return t.load=function(e){return this.Vue&&this.Vue.config?(s(this.Vue,e),{installVueErrorHandler:function(){return e._logger.warn(`installVueErrorHandler() was called unnecessarily`)}}):{install:function(t){t||e._logger.error(Error("@bugsnag/plugin-vue reference to Vue `app` was undefined")),n(t,e)},installVueErrorHandler:function(t){t||e._logger.error(Error("@bugsnag/plugin-vue reference to `Vue` was undefined")),s(t,e)}}},e}(),d.default=d,d})})),n=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`?window:typeof global<`u`?global: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}
1.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==`number`&&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 ee=f.schema,te={releaseStage:m({},ee.releaseStage,{defaultValue:function(){return/^localhost(:\d+)?$/.test(window.location.host)?`development`:`production`}}),appType:g({},ee.appType,{defaultValue:function(){return`browser`}}),logger:m({},ee.logger,{defaultValue:function(){return typeof console<`u`&&typeof console.debug==`function`?ne():void 0}})},ne=function(){var e={},t=console.log;return h([`debug`,`info`,`warn`,`error`],function(n){var r=console[n];
vendor: 7,189 bytes, lines 1-9
1e[n]=typeof r==`function`?r.bind(console,`[bugsnag]`):t.bind(console,`[bugsnag]`)}),e},_=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}(),v={};(function(t,n){typeof e==`function`&&e.amd?e(`stackframe`,[],n):typeof v==`object`?v=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 y={};(function(t,n){typeof e==`function`&&e.amd?e(`stack-generator`,[`stackframe`],n):typeof y==`object`?y=n(v):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 re={};(function(t,n){typeof e==`function`&&e.amd?e(`error-stack-parser`,[`stackframe`],n):typeof re==`object`?re=n(v):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 ie=re,b=function(e,t,n,r){var i=r&&r.redactedKeys?r.redactedKeys:[],a=r&&r.redactedPaths?r.redactedPaths:[];return JSON.stringify(he(e,i,a),t,n)},ae=20,oe=25e3,se=8,ce=`...`;function le(e){return e instanceof Error||/^\[object (Error|(Dom)?Exception)\]$/.test(Object.prototype.toString.call(e))}function ue(e){return`[Throws: `+(e?e.message:`?`)+`]`}function de(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return!0;return!1}function fe(e,t){for(var n=0,r=e.length;n<r;n++)if(t.indexOf(e[n])===0)return!0;return!1}function pe(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 x(e){return Object.prototype.toString.call(e)===`[object Array]`}function me(e,t){try{return e[t]}catch(e){return ue(e)}}function he(e,t,n){var r=[],i=0;function a(e,o){function s(){return o.length>se&&i>oe}if(i++,o.length>ae||s())return ce;if(typeof e!=`object`||!e)return e;if(de(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 ue(e)}if(le(e)){i--;var l=a({name:e.name,message:e.message},o);return r.pop(),l}if(x(e)){for(var u=[],d=0,f=e.length;d<f;d++){if(s()){u.push(ce);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(fe(n,o.join(`.`))&&pe(t,m)){p[m]=`[REDACTED]`;continue}if(s()){p[m]=ce;break}p[m]=a(me(e,m),o.concat(m))}}catch{}return r.pop(),p}return a(e,[])}function S(e,t,n,r){if(typeof n==`string`){r===void 0?r=null:r!==null&&typeof r!=`string`&&(r=b(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 ge(e,t,n){if(a(t)){for(var r=0;r<t.length;++r){var i=t[r];typeof i!=`object`||!i||S(e,n,i.name,i.variant)}return e}}function _e(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 ve(e,t,n){var r=t[n];typeof r==`number`&&(e[r]=null,delete t[n])}var C={add:S,clear:ve,merge:ge,toEventApi:_e},w=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},ye=be;function be(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 T=ye,xe=function(e,t,n,r){var i;if(t){var a;if(n===null)return Ce(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))}},Se=function(e,t,n){if(typeof t==`string`){if(!n)return e[t];if(e[t])return e[t][n]}},Ce=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]}},E={add:xe,get:Se,clear:Ce};function D(){return D=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},D.apply(null,arguments)}var O=function(){function e(t,n,r,i,a){r===void 0&&(r=[]),i===void 0&&(i=Ee()),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=[Oe(t,n,e.__type,r)]}var t=e.prototype;return t.addMetadata=function(e,t,n){return E.add(this._metadata,e,t,n)},t.setTraceCorrelation=function(e,t){typeof e==`string`&&(this._correlation=D({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 E.get(this._metadata,e,t)},t.clearMetadata=function(e,t){return E.clear(this._metadata,e,t)},t.addFeatureFlag=function(e,t){t===void 0&&(t=null),C.add(this._features,this._featuresIndex,e,t)},t.addFeatureFlags=function(e){C.merge(this._features,e,this._featuresIndex)},t.getFeatureFlags=function(){return C.toEventApi(this._features)},t.clearFeatureFlag=function(e){C.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}(),we=function(e){var t={file:e.fileName,method:Te(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},Te=function(e){return/^global code$/i.test(e)?`global code`:e},Ee=function(){return{unhandled:!1,severity:`warning`,severityReason:{type:`handledException`}}},De=function(e){return typeof e==`string`?e:``};
vendor: 15,593 bytes, lines 9-14
9function Oe(e,t,r,i){return{errorClass:De(e),errorMessage:De(t),type:r,stacktrace:n(i,function(e,t){var n=we(t);try{return JSON.stringify(n)===`{}`?e:e.concat(n)}catch{return e}},[])}}function ke(e){return e.cause?[e].concat(ke(e.cause)):[e]}O.getStacktrace=function(e,t,n){if(w(e))return ie.parse(e).slice(t);try{return r(y.backtrace(),function(e){return(e.functionName||``).indexOf(`StackGenerator$$`)===-1}).slice(1+n)}catch{return[]}},O.create=function(e,t,n,r,i,a){i===void 0&&(i=0);var o=Ae(e,t,r,a),s=o[0],c=o[1],l;try{var u=O.getStacktrace(s,c>0?1+c+i:0,1+i);l=new O(s.name,s.message,u,n,e)}catch{l=new O(s.name,s.message,[],n,e)}if(s.name===`InvalidError`&&l.addMetadata(``+r,`non-error parameter`,k(e)),s.cause){var d,f=h(ke(s).slice(1),function(e){var t=T(e)&&w(e)?ie.parse(e):[],n=Ae(e,!0,`error cause`)[0];return n.name===`InvalidError`&&l.addMetadata(`error cause`,k(e)),Oe(n.name,n.message,O.__type,t)});(d=l.errors).push.apply(d,f)}return l};var k=function(e){return e===null?`null`:e===void 0?`undefined`:e},Ae=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)T(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&&T(e)?i=e:e!==null&&je(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(!w(i))try{throw i}catch(e){w(e)&&(i=e,a=1)}return[i,a]};O.__type=`browserjs`;var je=function(e){return(typeof e.name==`string`||typeof e.errorClass==`string`)&&(typeof e.message==`string`||typeof e.errorMessage==`string`)},Me=O,Ne=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()},A=function(e,t,n,r){Ne(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)},Pe=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 Fe(e){return typeof e==`string`&&/^c[a-z0-9]{20,32}$/.test(e)}var Ie=Fe;function j(e,t){var n=`000000000`+e;return n.substr(n.length-t)}var M=j;function Le(e){var t=4,n=36,r=n**+t,i=0;function a(){return M((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=M(o().toString(n),t),c=e(),l=a()+a();return r+i+s+c+l}return s.fingerprint=e,s.isCuid=Ie,s}var N=Le,P=typeof window==`object`?window:self,F=0;for(var Re in P)Object.hasOwnProperty.call(P,Re)&&F++;var ze=M(((navigator.mimeTypes?navigator.mimeTypes.length:0)+navigator.userAgent.length).toString(36)+F.toString(36),4);function Be(){return ze}var Ve=N(Be),I=function(){function e(){this.id=Ve(),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}(),He=C.add,Ue=C.clear,L=C.merge,We=`00000`,Ge=`https://notify.bugsnag.smartbear.com`,Ke=`https://sessions.bugsnag.smartbear.com`,R=function(){},qe=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:R,sendEvent:R},this._logger={debug:R,info:R,warn:R,error:R},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=Me,this.Breadcrumb=_,this.Session=I,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 E.add(this._metadata,e,t,n)},a.getMetadata=function(e,t){return E.get(this._metadata,e,t)},a.clearMetadata=function(e,t){return E.clear(this._metadata,e,t)},a.addFeatureFlag=function(e,t){t===void 0&&(t=null),He(this._features,this._featuresIndex,e,t)},a.addFeatureFlags=function(e){L(this._features,e,this._featuresIndex)},a.clearFeatureFlag=function(e){Ue(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(We)===0&&(o.endpoints={notify:Ge,sessions:Ke})}return this._metadata=m({},o.metadata),L(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(Je(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 I;return e.app.releaseStage=this._config.releaseStage,e.app.version=this._config.appVersion,e.app.type=this._config.appType,e._user=m({},this._user),Pe(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 _(e,n,r);if(Pe(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=R);var r=Me.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=R),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),L(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)};A([].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}(),Je=function(e,t){return Error(`Invalid configuration 10`+h(c(e),function(n){return` - `+n+` `+e[n]+`, got `+Ye(t[n])}).join(` 11 12`))},Ye=function(e){switch(typeof e){case`string`:case`number`:case`object`:return JSON.stringify(e);default:return String(e)}},z=qe,B={},Xe=[`events.[].metaData`,`events.[].breadcrumbs.[].metaData`,`events.[].request`,`events.[].response`];B.event=function(e,t){var n=b(e,null,null,{redactedPaths:Xe,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=b(e,null,null,{redactedPaths:Xe,redactedKeys:t})),n},B.session=function(e,t){return b(e,null,null)};var V={};V=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=Ze(e._config,`notify`,`4`,t),a=B.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=Ze(e._config,`sessions`,`1`,t),a=new t.XDomainRequest;a.onload=function(){r(null)},a.open(`POST`,i),setTimeout(function(){try{a.send(B.session(n,e._config.redactedKeys))}catch(t){e._logger.error(t),r(t)}},0)}}};var Ze=function(e,t,n,r){var i=JSON.parse(JSON.stringify(new Date));return H(e.endpoints[t],r.location.protocol)+`?apiKey=`+encodeURIComponent(e.apiKey)+`&payloadVersion=`+n+`&sentAt=`+encodeURIComponent(i)},H=V._matchPageProtocol=function(e,t){return t===`http:`?e.replace(/^https:/,`http:`):e};function Qe(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=B.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?Qe(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=B.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?Qe(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)}}}},et=new Date,tt=function(){et=new Date},nt={name:`appDuration`,load:function(e){return e.addOnError(function(e){var t=new Date;e.app.duration=t-et},!0),{reset:tt}}},rt=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 it(e){return typeof e==`string`&&/^c[a-z0-9]{20,32}$/.test(e)}var at=it;function U(e,t){var n=`000000000`+e;return n.substr(n.length-t)}var W=U;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=at,s}var st=ot,ct=typeof window==`object`?window:self,G=0;for(var lt in ct)Object.hasOwnProperty.call(ct,lt)&&G++;var ut=W(((navigator.mimeTypes?navigator.mimeTypes.length:0)+navigator.userAgent.length).toString(36)+G.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 q={};q=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:J(n.oldURL,e),to:J(n.newURL,e),state:Nt(e)}:{to:J(e.location.href,e)};t.leaveBreadcrumb(`Hash changed`,r,`navigation`)},!0),e.history.pushState&&Mt(t,e.history,`pushState`,e,!0),e.history.replaceState&&Mt(t,e.history,`replaceState`,e)}}}};var J=function(e,t){var n=t.document.createElement(`A`);return n.href=e,``+n.pathname+n.search+n.hash},jt=function(e,t,n,r){var i=J(e.location.href,e);return{title:n,state:t,prevState:Nt(e),to:r||i,from:i}},Mt=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,jt(r,o,s,c),`navigation`),i&&typeof e.resetEventCount==`function`&&e.resetEventCount(),a.apply(t,[o,s].concat(c===void 0?[]:c))}},Nt=function(e){try{return e.history.state}catch{}},Pt=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},Ft=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 Ft,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=Pt(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:Pt(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 Y(e,t){if(t===void 0&&(t={}),!(!(`addEventListener`in e.XMLHttpRequest.prototype)||!(`WeakMap`in e))){if(!e.__bugsnag_xhr_tracker__){var n=new Ft,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 X=Y,Z=Vt.createUrlFilter,Wt=Vt.getDuration;function Gt(e,t){return e===void 0&&(e=[]),t===void 0&&(t=window),{name:`requestTracker`,load:function(n){try{return{fetchTracker:Lt(t),xhrTracker:X(t),urlFilter:Z(n,e),getDuration:Wt}}catch(e){throw n._logger.error(`Failed to load request tracker:`,e),Error(`Request tracking is not available: `+e.message)}}}}var Kt={RequestTracker:Ft,createFetchTracker:Lt,createXhrTracker:X,createUrlFilter:Z,getDuration:Wt,createRequestTrackerPlugin:Gt},qt=`request`,Jt=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=Kt.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},qt):t.status>=400?r.leaveBreadcrumb(a+` failed`,i,qt):r.leaveBreadcrumb(a+` succeeded`,i,qt)}}};t&&(t.onStart(s),n.push(t._restore)),i&&(i.onStart(s),n.push(i._restore))}}}},Yt={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)}}}},Xt={};Xt={load:function(e){e.addOnError(function(e){h(n(e.errors,function(e,t){return e.concat(t.stacktrace)},[]),function(e){e.file=Zt(e.file)})})}};var Zt=Xt._strip=function(e){return typeof e==`string`?e.replace(/\?.*$/,``).replace(/#.*$/,``):e},Qt=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),$t(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),$t(l.errors[0].stacktrace,r,a,o);n._notify(l)}try{i.apply(this,arguments)}catch{}}var i=e.onerror;e.onerror=r}}},$t=function(e,t,n,r){e[0]||e.push({});var i=e[0];!i.file&&typeof t==`string`&&(i.file=t),!i.lineNumber&&en(n)&&(i.lineNumber=n),i.columnNumber||(en(r)?i.columnNumber=r:window.event&&en(window.event.errorCharacter)&&(i.columnNumber=window.event.errorCharacter))},en=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(T(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,te),$={_client:null,createClient:function(e){typeof e==`string`&&(e={apiKey:e}),e||={};var t=[nt,ht(),rt(),_t(),Yt,vt,bt,Xt,Qt(),tn(),q(),Dt(),Jt(),xt,Tt()],n=new z(e,sn,t,{name:rn,version:an,url:on});return n._setDelivery(window.XDomainRequest?V:$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(z.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=z,Q.Event=Me,Q.Session=I,Q.Breadcrumb=_,Q.default=$,Q})})),r=e(((e,t)=>{t.exports=n()})),i=1024,a=1e4,o=1e3,s=1e4,c=1e3,l={attributeStringValueLimit:i,attributeArrayLengthLimit:o,attributeCountLimit:128},u=e=>e===!0||e===!1,d=e=>!!e&&typeof e==`object`&&!Array.isArray(e),f=e=>typeof e==`number`&&Number.isFinite(e)&&!Number.isNaN(e),p=e=>typeof e==`string`,m=e=>p(e)&&e.length>0,h=e=>d(e)&&typeof e.debug==`function`&&typeof e.info==`function`&&typeof e.warn==`function`&&typeof e.error==`function`,g=e=>Array.isArray(e)&&e.every(m),ee=e=>Array.isArray(e)&&e.every(e=>m(e)||e instanceof RegExp);function te(e){return d(e)&&f(e.value)&&f(e.time)}var ne=e=>d(e)&&typeof e.id==`string`&&typeof e.traceId==`string`&&typeof e.isValid==`function`&&typeof e.samplingRate==`number`&&typeof e.samplingProbability==`number`,_=e=>d(e)&&typeof e.id==`string`&&typeof e.traceId==`string`;function v(e){return f(e)||e instanceof Date}function y(e){return d(e)&&typeof e.install==`function`&&typeof e.start==`function`}function re(e){return Array.isArray(e)&&e.every(e=>y(e))}function ie(e){return Array.isArray(e)&&e.every(e=>typeof e==`function`)}function b(e,t){let n=e.length,r=e.slice(0,t);return`${r} *** ${n-r.length} CHARS TRUNCATED`}var ae=class{constructor(e){this.attributes=e}set(e,t){typeof e==`string`&&(typeof t==`string`||typeof t==`boolean`||f(t)||Array.isArray(t))&&this.attributes.set(e,t)}remove(e){this.attributes.delete(e)}toJson(){return Array.from(this.attributes).map(([e,t])=>ue(e,t))}toObject(){return Object.fromEntries(this.attributes)}},oe=class extends ae{get droppedAttributesCount(){return this._droppedAttributesCount}constructor(e,t,n,r){super(e),this._droppedAttributesCount=0,this.spanAttributeLimits=t,this.spanName=n,this.logger=r}truncateAttribute(e,t){if(typeof t==`string`&&t.length>this.spanAttributeLimits.attributeStringValueLimit&&(this.attributes.set(e,b(t,this.spanAttributeLimits.attributeStringValueLimit)),this.logger.warn(`Span attribute ${e} in span ${this.spanName} was truncated as the string exceeds the ${this.spanAttributeLimits.attributeStringValueLimit} character limit set by attributeStringValueLimit.`)),Array.isArray(t)&&t.length>
15this.spanAttributeLimits.attributeArrayLengthLimit){let n=t.slice(0,this.spanAttributeLimits.attributeArrayLengthLimit);this.attributes.set(e,n),this.logger.warn(`Span attribute ${e} in span ${this.spanName} was truncated as the array exceeds the ${this.spanAttributeLimits.attributeArrayLengthLimit} element limit set by attributeArrayLengthLimit.`)}}isValidAttributeValue(e){return typeof e==`string`||typeof e==`boolean`||f(e)||Array.isArray(e)}isValidAttributeName(e){return typeof e==`string`&&e.length>0}set(e,t){if(this.isValidAttributeName(e)){if(t==null){this.remove(e);return}this.isValidAttributeValue(t)&&this.attributes.set(e,t)}}setCustom(e,t){if(this.isValidAttributeName(e)){if(t==null){this.remove(e);return}if(this.isValidAttributeValue(t)){if(!this.attributes.has(e)&&this.attributes.size>=this.spanAttributeLimits.attributeCountLimit){this._droppedAttributesCount++,this.logger.warn(`Span attribute ${e} in span ${this.spanName} was dropped as the number of attributes exceeds the ${this.spanAttributeLimits.attributeCountLimit} attribute limit set by attributeCountLimit.`);return}if(e.length>128){this._droppedAttributesCount++,this.logger.warn(`Span attribute ${e} in span ${this.spanName} was dropped as the key length exceeds the 128 character fixed limit.`);return}this.attributes.set(e,t)}}}toJson(){return Array.from(this.attributes).forEach(([e,t])=>{this.truncateAttribute(e,t)}),Array.from(this.attributes).map(([e,t])=>ue(e,t)).filter(e=>e!==void 0)}},se=class extends ae{constructor(e,t,n,r,i){let a=new Map([[`deployment.environment`,e],[`telemetry.sdk.name`,r],[`telemetry.sdk.version`,i],[`service.name`,n]]);t.length>0&&a.set(`service.version`,t),super(a)}};function ce(e){switch(typeof e){case`number`:return Number.isNaN(e)||!Number.isFinite(e)?void 0:Number.isInteger(e)?{intValue:`${e}`}:{doubleValue:e};case`boolean`:return{boolValue:e};case`string`:return{stringValue:e}}}function le(e){return e.map(e=>ce(e)).filter(e=>e!==void 0)}function ue(e,t){switch(typeof t){case`number`:return Number.isNaN(t)||!Number.isFinite(t)?void 0:e!==`bugsnag.sampling.p`&&Number.isInteger(t)?{key:e,value:{intValue:`${t}`}}:{key:e,value:{doubleValue:t}};case`boolean`:return{key:e,value:{boolValue:t}};case`string`:return{key:e,value:{stringValue:t}};case`object`:if(Array.isArray(t)){let n=le(t);return{key:e,value:{arrayValue:n.length>0?{values:n}:{}}}}return;default:return}}var de=1e6;function fe(e){return Math.round(e*de)}function pe(e){return Math.round(e/de)}var x={appVersion:{defaultValue:``,message:`should be a string`,validate:m},endpoint:{defaultValue:`https://otlp.bugsnag.com/v1/traces`,message:`should be a string`,validate:m},apiKey:{defaultValue:``,message:`should be a 32 character hexadecimal string`,validate:e=>p(e)&&/^[a-f0-9]{32}$/.test(e)},logger:{defaultValue:{debug(e){console.debug(e)},info(e){console.info(e)},warn(e){console.warn(e)},error(e){console.error(e)}},message:`should be a Logger object`,validate:h},releaseStage:{defaultValue:`production`,message:`should be a string`,validate:m},enabledReleaseStages:{defaultValue:null,message:`should be an array of strings`,validate:e=>e===null||g(e)},plugins:{defaultValue:[],message:`should be an array of plugin objects`,validate:re},bugsnag:{defaultValue:void 0,message:`should be an instance of Bugsnag`,validate:e=>d(e)&&typeof e.addOnError==`function`},samplingProbability:{defaultValue:void 0,message:`should be a number between 0 and 1`,validate:e=>e===void 0||f(e)&&e>=0&&e<=1},onSpanStart:{defaultValue:void 0,message:`should be an array of functions`,validate:ie},onSpanEnd:{defaultValue:void 0,message:`should be an array of functions`,validate:ie},attributeStringValueLimit:{defaultValue:i,message:`should be a number between 1 and ${a}`,validate:e=>f(e)&&e>0&&e<=1e4},attributeArrayLengthLimit:{defaultValue:o,message:`should be a number between 1 and ${s}`,validate:e=>f(e)&&e>0&&e<=1e4},attributeCountLimit:{defaultValue:128,message:`should be a number between 1 and ${c}`,validate:e=>f(e)&&e>0&&e<=1e3}};function me(e,t,n=!1){if(typeof e==`string`?e={apiKey:e}:e==null?e={apiKey:t.apiKey.defaultValue}
15:d(e)&&e.apiKey===void 0&&(e.apiKey=t.apiKey.defaultValue),!d(e)||!p(e.apiKey)||e.apiKey.length===0)throw Error(`No Bugsnag API Key set`);let r=``,i={};for(let n of Object.keys(t))Object.prototype.hasOwnProperty.call(e,n)?t[n].validate(e[n])?i[n]=e[n]:(r+=`\n - ${n} ${t[n].message}, got ${typeof e[n]}`,i[n]=t[n].defaultValue):i[n]=t[n].defaultValue;let a=n?5e3:3e4;return i.apiKey=e.apiKey,i.maximumBatchSize=e.maximumBatchSize||100,i.batchInactivityTimeoutMs=e.batchInactivityTimeoutMs||a,r.length>0&&i.logger.warn(`Invalid configuration${r}`),i}var he=class{constructor(){this.events=[]}add(e,t){this.events.push({name:e,time:t})}toJson(e){return this.events.map(({name:t,time:n})=>({name:t,timeUnixNano:e.toUnixTimestampNanoseconds(n)}))}};function S(e){let t=0;for(let n=0;n<e.length/8;n++){let r=n*8,i=Number.parseInt(e.slice(r,r+8),16);t=(t^i)>>>0}return t}var ge=36e5;function _e(e,t){return{name:e.name,kind:e.kind,spanId:e.id,traceId:e.traceId,parentSpanId:e.parentSpanId,...e.attributes.droppedAttributesCount>0?{droppedAttributesCount:e.attributes.droppedAttributesCount}:{},startTimeUnixNano:t.toUnixTimestampNanoseconds(e.startTime),endTimeUnixNano:t.toUnixTimestampNanoseconds(e.endTime),attributes:e.attributes.toJson(),events:e.events.toJson(t)}}function ve(e){return{get id(){return e.id},get traceId(){return e.traceId},get samplingRate(){return e.samplingRate},get samplingProbability(){return e.samplingProbability.raw},get name(){return e.name},isValid:()=>!1,end:()=>{},setAttribute:(t,n)=>{e.attributes.setCustom(t,n)}}}async function C(e,t,n){if(!n||n.length===0)return!0;let r=ve(e),i=performance.now(),a=!0;for(let e of n)try{let t=e(r);if(typeof t.then==`function`&&(t=await t),t===!1){a=!1;break}}catch(e){t.error(`Error in onSpanEnd callback: `+e)}if(a){let e=fe(performance.now()-i);r.setAttribute(`bugsnag.span.callbacks_duration`,e)}return a}var w=class{constructor(e,t,n,r,i,a,o,s){this.kind=3,this.events=new he,this.id=e,this.traceId=t,this.parentSpanId=s,this.name=n,this.startTime=r,this.attributes=i,this.samplingRate=S(this.traceId),this.samplingProbability=o,this.clock=a}addEvent(e,t){this.events.add(e,t)}setAttribute(e,t){this.attributes.set(e,t)}setCustomAttribute(e,t){this.attributes.setCustom(e,t)}end(e,t){this.endTime=e;let n=t;return this.attributes.set(`bugsnag.sampling.p`,n.raw),{id:this.id,name:this.name,kind:this.kind,traceId:this.traceId,startTime:this.startTime,attributes:this.attributes,events:this.events,samplingRate:this.samplingRate,endTime:e,get samplingProbability(){return n},set samplingProbability(e){n=e,this.attributes.set(`bugsnag.sampling.p`,n.raw)},parentSpanId:this.parentSpanId}}isValid(){return this.endTime===void 0&&this.startTime>this.clock.now()-ge}},ye={startTime:{message:`should be a number or Date`,getDefaultValue:()=>void 0,validate:v},parentContext:{message:`should be a ParentContext`,getDefaultValue:()=>void 0,validate:e=>e===null||_(e)},makeCurrentContext:{message:`should be true|false`,getDefaultValue:()=>void 0,validate:u},isFirstClass:{message:`should be true|false`,getDefaultValue:()=>void 0,validate:u}},be=class{constructor(e,t,n,r,i,a){this.spans=[],this.timeout=null,this.flushQueue=Promise.resolve(),this.delivery=e,this.configuration=t,this.retryQueue=n,this.sampler=r,this.probabilityManager=i,this.encoder=a,this.flush=this.flush.bind(this)}stop(){this.timeout!==null&&(clearTimeout(this.timeout),this.timeout=null)}start(){this.stop(),this.timeout=setTimeout(this.flush,this.configuration.batchInactivityTimeoutMs)}add(e){this.configuration.enabledReleaseStages&&!this.configuration.enabledReleaseStages.includes(this.configuration.releaseStage)||(this.spans.push(e),this.spans.length>=this.configuration.maximumBatchSize?this.flush():this.start())}async flush(){this.stop(),this.flushQueue=this.flushQueue.then(async()=>{let e=await this.prepareBatch();if(!e)return;let t=await this.encoder.encode(e),n=Date.now();try{let e=await this.delivery.send(t);switch(e.samplingProbability!==void 0&&this.probabilityManager.setProbability(e.samplingProbability),e.state){case`success`:this.retryQueue.flush();break;case`failure-discard`:this.configuration.logger.warn(`delivery failed`);break;case`failure-retryable`:this.configuration.logger.info(`delivery failed, adding to retry queue`),this.retryQueue.add(t,n);break;default:e.state}}catch{this.configuration.logger.warn(`delivery failed`)}}),await this.flushQueue}async prepareBatch(){if(this.spans.length===0)return;await this.probabilityManager.ensureFreshProbability();let e=[],t=this.sampler.spanProbability;for(let n of this.spans)n.samplingProbability.raw>t.raw&&(n.samplingProbability=t),this.sampler.sample(n)&&await C(n,this.configuration.logger,this.configuration.onSpanEnd)&&e.push(n);if(this.spans=[],e.length!==0)return e}},T=class{constructor(e,t,n){this.clock=e,this.configuration=t,this.resourceAttributeSource=n}async encode(e){let t=await this.resourceAttributeSource(this.configuration),n=Array(e.length);for(let t=0;t<e.length;++t)n[t]=_e(e[t],this.clock);return{body:{resourceSpans:[{resource:{attributes:t.toJson()},scopeSpans:[{spans:n}]}]},headers:{"Bugsnag-Api-Key":this.configuration.apiKey,"Content-Type":`application/json`,...this.configuration.samplingProbability===void 0?{"Bugsnag-Span-Sampling":this.generateSamplingHeader(e)}:{}}}}generateSamplingHeader(e){if(e.length===0)return`1:0`;let t=Object.create(null);for(let n of e){let e=t[n.samplingProbability.raw]||0;t[n.samplingProbability.raw]=e+1}let n=Object.keys(t),r=Array(n.length);for(let e=0;e<n.length;++e){let i=n[e];r[e]=`${i}:${t[i]}`}return r.join(`;`)}},xe=new Set([402,407,408,429]);function Se(e){return e>=200&&e<300?`success`:e>
15=400&&e<500&&!xe.has(e)?`failure-discard`:`failure-retryable`}var Ce=class e{static async create(t,n){return t.probability=n,new e(t,n)}constructor(e,t){this.sampler=e,this.samplingProbability=t}setProbability(e){return Promise.resolve()}ensureFreshProbability(){return Promise.resolve()}},E={NORMAL:5e4},D=class{constructor(e){this.items=[],e&&(this.items=e,this.sort())}add(e,t){return!this.items.some(t=>t.item===e)&&(this.items.push({item:e,priority:t}),this.sort(),!0)}addAll(e){let t=!1;for(let n of e)this.items.some(e=>e.item===n.item)||(this.items.push(n),t=!0);return t&&this.sort(),t}*[Symbol.iterator](){for(let e of this.items)yield e.item}sort(){this.items.sort((e,t)=>t.priority-e.priority)}},O=class{constructor(e,t){this.configuration=e,this.clock=t,this.onSpanStartCallbacks=[],this.onSpanEndCallbacks=[],this.spanControlProviders=[]}addOnSpanStartCallback(e,t=E.NORMAL){this.onSpanStartCallbacks.push({item:e,priority:t})}addOnSpanEndCallback(e,t=E.NORMAL){this.onSpanEndCallbacks.push({item:e,priority:t})}addSpanControlProvider(e,t=E.NORMAL){this.spanControlProviders.push({item:e,priority:t})}mergeFrom(e){this.onSpanStartCallbacks.push(...e.onSpanStartCallbacks),this.onSpanEndCallbacks.push(...e.onSpanEndCallbacks),this.spanControlProviders.push(...e.spanControlProviders)}},we=class{constructor(){this.plugins=[],this.installedPlugins=new Set}addPlugins(e){this.plugins.push(...e)}installPlugins(e,t){this.logger=e.logger;let n=new O(e,t);for(let r of this.plugins)if(!this.installedPlugins.has(r))try{let i=new O(e,t);r.install(i),n.mergeFrom(i),this.installedPlugins.add(r)}catch(e){this.logger&&this.logger.error(`Plugin ${r.constructor.name} failed to install: ${e}`)}return n}startPlugins(){for(let e of this.installedPlugins)try{e.start()}catch(t){this.logger&&this.logger.error(`Plugin ${e.constructor.name} failed to start: ${t}`)}}getPlugin(e){for(let t of this.installedPlugins)if(t instanceof e)return t}},Te=3e4,Ee=class{constructor(e,t){this.delivery=e,this.payload={body:{resourceSpans:[]},headers:{"Bugsnag-Api-Key":t,"Content-Type":`application/json`,"Bugsnag-Span-Sampling":`1.0:0`}}}async getNewProbability(){for(;;){let e=await this.delivery.send(this.payload);if(e.samplingProbability!==void 0)return e.samplingProbability;await this.timeBetweenRetries()}}timeBetweenRetries(){return new Promise(e=>{setTimeout(e,Te)})}},De=864e5,Oe=class e{static async create(t,n,r){let i=await t.load(`bugsnag-sampling-probability`),a;return i===void 0?(n.probability=1,a=0):(i.time,Date.now()-De,n.probability=i.value,a=i.time),new e(t,n,r,a)}constructor(e,t,n,r){this.outstandingFreshnessCheck=void 0,this.persistence=e,this.sampler=t,this.probabilityFetcher=n,this.lastProbabilityTime=r,this.ensureFreshProbability()}setProbability(e){return this.lastProbabilityTime=Date.now(),this.sampler.probability=e,this.persistence.save(`bugsnag-sampling-probability`,{value:e,time:this.lastProbabilityTime})}ensureFreshProbability(){return this.outstandingFreshnessCheck?this.outstandingFreshnessCheck:Date.now()-this.lastProbabilityTime>=De?(this.outstandingFreshnessCheck=this.probabilityFetcher.getNewProbability().then(e=>{this.setProbability(e),this.outstandingFreshnessCheck=void 0}),this.outstandingFreshnessCheck):Promise.resolve()}},ke=class{constructor(){this.spans=[]}add(e){this.spans.push(e)}};function k(e){return Math.floor(e*4294967295)}var Ae=class{constructor(e){this._probability=e,this.scaledProbability=k(e)}get probability(){return this._probability}set probability(e){this._probability=e,this.scaledProbability=k(e)}get spanProbability(){return{raw:this._probability,scaled:this.scaledProbability}}sample(e){return e.samplingRate<=e.samplingProbability.scaled}shouldSample(e){return e<=this.spanProbability.scaled}};function je(e,t){return e===t||e!==void 0&&t!==void 0&&e.id===t.id&&e.traceId===t.traceId}var Me=class{constructor(e,t=[]){this.isInForeground=!0,this.onBackgroundStateChange=e=>{this.isInForeground=e===`in-foreground`,this.contextStack.length=0},this.contextStack=t,e.onStateChange(this.onBackgroundStateChange)}*[Symbol.iterator](){for(let e=this.contextStack.length-1;e>=0;--e)yield this.contextStack[e]}push(e){e.isValid()&&this.isInForeground&&this.contextStack.push(e)}pop(e){je(e,this.current)&&this.contextStack.pop(),this.removeClosedContexts()}get first(){return this.removeClosedContexts(),this.contextStack.length>0?this.contextStack[0]:void 0}get current(){return this.removeClosedContexts(),this.contextStack.length>0?this.contextStack[this.contextStack.length-1]:void 0}removeClosedContexts(){for(;this.contextStack.length>0&&this.contextStack[this.contextStack.length-1].isValid()===!1;)this.contextStack.pop()}},Ne=class{constructor(){this.providers=new D}addProvider(e,t){this.providers.add(e,t)}addProviders(e){this.providers.addAll(e)}getSpanControls(e){for(let t of this.providers){let n=t.getSpanControls(e);if(n)return n}return null}};function A(e,t){return f(t)?t:t instanceof Date?e.convert(t):e.now()}var Pe=class{constructor(e,t,n,r,i,a,o,s){this.spanAttributeLimits=l,this.openSpans=new WeakSet,this.isInForeground=!0,this.onBackgroun
15dStateChange=e=>{this.isInForeground=e===`in-foreground`,this.openSpans=new WeakSet},this.processor=e,this.sampler=t,this.idGenerator=n,this.spanAttributesSource=r,this.clock=i,this.logger=o,this.spanContextStorage=s,a.onStateChange(this.onBackgroundStateChange)}startSpan(e,t){t.parentContext=_(t.parentContext)||t.parentContext===null?t.parentContext:this.spanContextStorage.current;let n=new oe(new Map,this.spanAttributeLimits,e,this.logger);typeof t.isFirstClass==`boolean`&&n.set(`bugsnag.span.first_class`,t.isFirstClass);let r=this.createSpanInternal(e,t,n);return this.isInForeground&&(this.openSpans.add(r),t.makeCurrentContext!==!1&&this.spanContextStorage.push(r)),this.onSpanStart(r),r}onSpanStart(e){if(this.onSpanStartCallbacks){let t=this.toPublicApi(e);for(let e of this.onSpanStartCallbacks)try{e(t)}catch(e){this.logger.error(`Error in onSpanStart callback: `+e)}}}createSpanInternal(e,t,n){let r=A(this.clock,t.startTime),i=this.idGenerator.generate(64),a=t.parentContext?t.parentContext.id:void 0;return new w(i,t.parentContext?t.parentContext.traceId:this.idGenerator.generate(128),e,r,n,this.clock,this.sampler.probability,a)}startNetworkSpan(e){let t=`[HTTP/${e.method.toUpperCase()}]`,n=this.validateSpanOptions(t,e),r=this.startSpan(n.name,{...n.options,makeCurrentContext:!1});return r.setAttribute(`bugsnag.span.category`,`network`),r.setAttribute(`http.method`,e.method),r.setAttribute(`http.url`,e.url),r}configure(e){this.logger=e.logger,this.spanAttributesSource.configure(e),this.spanAttributeLimits={attributeArrayLengthLimit:e.attributeArrayLengthLimit,attributeCountLimit:e.attributeCountLimit,attributeStringValueLimit:e.attributeStringValueLimit},this.onSpanStartCallbacks=e.onSpanStart,this.onSpanEndCallbacks=e.onSpanEnd}reprocessEarlySpans(e){for(let t of this.processor.spans)e.add(t);this.processor=e}endSpan(e,t,n){this.spanContextStorage.pop(e);let r=!this.openSpans.delete(e),i=e.isValid();if(r&&!i&&this.logger.warn(`Attempted to end a Span which is no longer valid.`),r||!i||t===-1){this.discardSpan(e);return}for(let[t,r]of Object.entries(n||{}))e.setAttribute(t,r);this.spanAttributesSource.requestAttributes(e),this.sendForProcessing(e,t)}discardSpan(e){e.end(-1,this.sampler.spanProbability)}sendForProcessing(e,t){let n=e.end(t,this.sampler.spanProbability);this.sampler.sample(n)&&this.processor.add(n)}toPublicApi(e){return{get id(){return e.id},get traceId(){return e.traceId},get samplingRate(){return e.samplingRate},get samplingProbability(){return e.samplingProbability},get name(){return e.name},isValid:()=>e.isValid(),setAttribute:(t,n)=>{e.setCustomAttribute(t,n)},end:t=>{let n=A(this.clock,t);this.endSpan(e,n)}}}validateSpanOptions(e,t,n=ye){let r=``,i={};if(typeof e!=`string`&&(r+=`\n - name should be a string, got ${typeof e}`,e=String(e)),t!==void 0&&!d(t))r+=` 16 - options is not an object`;else{let e=t||{};for(let t of Object.keys(n))Object.prototype.hasOwnProperty.call(e,t)&&e[t]!==void 0?n[t].validate(e[t])?i[t]=e[t]:(r+=`\n - ${t} ${n[t].message}, got ${typeof e[t]}`,i[t]=n[t].getDefaultValue(e[t])):i[t]=n[t].getDefaultValue(e[t])}return r.length>0&&this.logger.warn(`Invalid span options${r}`),{name:e,options:i}}},Fe=`starting`;function Ie(){return Fe}function j(e){Fe=e}function M(e){let t=new ke,n=e.spanContextStorage||new Me(e.backgroundingListener),r=e.schema.logger.defaultValue;j(`starting`);let i=new Ae(1),a=new(e.spanFactory||Pe)(t,i,e.idGenerator,e.spanAttributesSource,e.clock,e.backgroundingListener,r,n),o=new Ne,s=new we;return s.addPlugins(e.plugins(a,n)),{start:t=>{let c=me(t,e.schema,e.isDevelopment);if(c.endpoint===x.endpoint.defaultValue&&(c.endpoint=c.apiKey.startsWith(`00000`)?`https://otlp.bugsnag.smartbear.com/v1/traces`:c.endpoint.replace(`https://`,`https://${c.apiKey}.`)),c.bugsnag&&typeof c.bugsnag.Event.prototype.setTraceCorrelation==`function`&&c.bugsnag.Client){let e=c.bugsnag.Client.prototype._notify;c.bugsnag.Client.prototype._notify=function(...t){let r=n.current;r&&typeof t[0].setTraceCorrelation==`function`&&t[0].setTraceCorrelation(r.traceId,r.id),e.apply(this,t)}}s.addPlugins(c.plugins);let l=s.installPlugins(c,e.clock);o.addProviders(l.spanControlProviders);let u=new D(l.onSpanStartCallbacks),d=new D(l.onSpanEndCallbacks);c.onSpanStart&&u.addAll(c.onSpanStart.map(e=>({item:e,priority:E.NORMAL}))),c.onSpanEnd&&d.addAll(c.onSpanEnd.map(e=>({item:e,priority:E.NORMAL}))),c.onSpanStart=Array.from(u),c.onSpanEnd=Array.from(d),a.configure(c);let f=e.deliveryFactory(c.endpoint);(c.samplingProbability===void 0?Oe.create(e.persistence,i,new Ee(f,c.apiKey)):Ce.create(i,c.samplingProbability)).then(t=>{let n=new be(f,c,e.retryQueueFactory(f,c.retryQueueMaxSize),i,t,new T(e.clock,c,e.resourceAttributesSource));a.reprocessEarlySpans(n),e.backgroundingListener.onStateChange(e=>{n.flush(),e===`in-foreground`&&t.ensureFreshProbability()}),r=c.logger}),s.startPlugins()},startSpan:(e,t)=>{let n=a.validateSpanOptions(e,t),r=a.startSpan(n.name,n.options);return r.setAttribute(`bugsnag.span.category`,`custom`),a.toPublicApi(r)},startNetworkSpan:t=>{let n=a.startNetworkSpan(t);return{...a.toPublicApi(n),end:t=>{a.endSpan(n,A(e.clock,t.endTime),{"http.status_code":t.status})}}},getPlugin:e=>s.getPlugin(e),getSpanControls:e=>o.getSpanControls(e),get currentSpanContext(){return n.current},get appState(){return Ie()},...e.platformExtensions&&e.platformExtensions(a,n)}}function Le(){let e=()=>{};return{start:e,startSpan:()=>({id:``,traceId:``,end:e,isValid:()=>!1}),currentSpanContext:void 0}}function N(e,t){var n=`000000000`+e;return n.substr(n.length-t)}var P=typeof window==`object`?window:self,F=0;for(var Re in P)Object.hasOwnProperty.call(P,Re)&&F++;var ze=N(((navigator.mimeTypes?navigator.mimeTypes.length:0)+navigator.userAgent.length).toString(36)+F.toString(36),4);function Be(){return ze}function Ve(e){return typeof e==`string`&&/^c[a-z0-9]{20,32}$/.test(e)}function I(e){let t=36**4,n=0;function r(){return N((Math.random()*t<<0).toString(36),4)}function i(){return n=n<t?n:0,n++,n-1}function a(){var t=`c`,n=new Date().getTime().toString(36),a=N(i().toString(36),4),o=e(),s=r()+r();return t+n+a+o+s}return a.fingerprint=e,a.isCuid=Ve,a}var He=I(Be),{isCuid:Ue}=He,L=class{constructor(){this.persistedItems=new Map}async load(e){return this.persistedItems.get(e)}async save(e,t){this.persistedItems.set(e,t)}};function We(e,t){switch(e){case`bugsnag-sampling-probability`:{let e=JSON.parse(t);return te(e)?e:void 0}case`bugsnag-anonymous-id`:return Ue(t)?t:void 0}}var Ge=864e5,Ke=class{constructor(e,t){this.delivery=e,this.retryQueueMaxSize=t,this.requestQueue=Promise.resolve(),this.payloads=[]}add(e,t){this.payloads.push({payload:e,time:t});let n=this.payloads.reduce((e,{payload:t})=>e+R(t),0);for(;n>this.retryQueueMaxSize;){let e=this.payloads.shift();if(!e)break;n-=R(e.payload)}}async flush(){if(this.payloads.length===0)return;let e=this.payloads;this.payloads=[],this.requestQueue=this.requestQueue.then(async()=>{for(let{payload:t,time:n}of e)if(!(Date.now()>=n+Ge))try{let{state:e}=await this.delivery.send(t);switch(e){case`success`:case`failure-discard`:break;case`failure-retryable`:this.add(t,n)}}catch{}}),await this.requestQueue}};function R(e){let t=0;for(let n=0;n<e.body.resourceSpans.length;++n){let r=e.body.resourceSpans[n].scopeSpans;for(let e=0;e<r.length;++e)t+=r[e].spans.length}return t}var qe=/^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9]{2}$/,Je=class e{constructor(e){this.id=e.id,this.traceId=e.traceId}encodeAsTraceParent(){return e.toTraceParentString(this)}static parseTraceParent(t){let n=qe.exec(t);if(!n)return;let[,r,i]=n;return new e({id:i,traceId:r})}static toTraceParentString(e){let t=!0;if(ne(e)){let n=k(e.samplingProbability);t=e.samplingRate<=n}return`00-${e.traceId}-${e.id}-${t?`01`:`00`}`}};function Ye(e){let t=e.get(`Bugsnag-Sampling-Probability`);if(typeof t!=`string`)return;let n=Number.parseFloat(t);if(!(Number.isNaN(n)||n<0||n>1))return n}function z(e,t,n){let r=!1;return n&&n.onStateChange(e=>{r=e===`in-background`}),function(n){return{async send(i){let a=JSON.stringify(i.body);i.headers[`Bugsnag-Sent-At`]=t.date().toISOString();try{let t=await e(n,{method:`POST`,keepalive:r,body:a,headers:i.headers});return{state:Se(t.status),samplingProbability:Ye(t.headers)}}catch{return a.length>1e6?{state:`failure-discard`}:{state:`failure-retryable`}}}}}}function B(e){return e}function Xe(e){return typeof e==`function`}var V=class{constructor(){this.callbacks=[]}onStart(e){this.callbacks.push(e)}start(e){let t=[];for(let n of this.callbacks){let r=n(e);r&&t.push(r)}return{onRequestEnd:e=>{for(let n of t)n&&n.onRequestEnd&&n.onRequestEnd(e)},extraRequestHeaders:t.map(e=>{if(e&&e.extraRequestHeaders)return e.extraRequestHeaders}).filter(Ze)}}};function Ze(e){return e!==void 0}function H(e,t){if(e.indexOf(`https://`)===0||e.indexOf(`http://`)===0)return e;try{let n=new URL(e,t).href;
16return!e.endsWith(`/`)&&n.endsWith(`/`)?n.slice(0,-1):n}catch{return e}}function Qe(e,t,n,r){let i=$e(t),a=i?t.url:String(t),o=!!n&&n.method||i&&t.method||`GET`;return{url:H(a,r),method:o,startTime:e,type:`fetch`}}function $e(e){return!!e&&typeof e==`object`&&!(e instanceof URL)}function et(e){return!!e&&typeof e==`object`&&e instanceof Headers}function tt(e,t){let n=new V,r=e.fetch;return e.fetch=function(i,a){let o=Qe(t.now(),i,a,e.document&&e.document.baseURI),{onRequestEnd:s,extraRequestHeaders:c}=n.start(o),l=nt(i,a,c);return r.call(this,l[0],l[1]).then(e=>(s({status:e.status,endTime:t.now(),state:`success`}),e)).catch(e=>{throw s({error:e,endTime:t.now(),state:`error`}),e})},n}function nt(e,t,n){if(!n)return[e,t];let r=n.reduce((e,t)=>({...e,...t}),{});return $e(e)&&(!t||!t.headers)?rt(r,e):t=it(r,t),[e,t]}function rt(e,t){for(let[n,r]of Object.entries(e))t.headers.has(n)||t.headers.set(n,r)}function it(e,t){if(t||={},et(t.headers)){for(let[n,r]of Object.entries(e))t.headers.has(n)||t.headers.set(n,r);return t}return{...t,headers:{...e,...t.headers}}}function at(e,t,n){let r=new V,i=new WeakMap,a=new WeakMap,o=e.prototype.open;e.prototype.open=function(e,t,...r){i.set(this,{method:e,url:H(String(t),n&&n.baseURI)}),o.call(this,e,t,...r)};let s=e.prototype.send;return e.prototype.send=function(n){let o=i.get(this);if(o){let n=a.get(this);n&&this.removeEventListener(`readystatechange`,n);let{onRequestEnd:i,extraRequestHeaders:s}=r.start({type:`xmlhttprequest`,method:o.method,url:o.url,startTime:t.now()});if(s)for(let e of s)for(let[t,n]of Object.entries(e))this.setRequestHeader(t,n);let c=n=>{if(this.readyState===e.DONE&&i){let e=this.status>0?{endTime:t.now(),status:this.status,state:`success`}:{endTime:t.now(),state:`error`};i(e)}};this.addEventListener(`readystatechange`,c),a.set(this,c)}s.call(this,n)},r}var U={referrer:!0,title:!0,url:!0};function W(e){return{...U,...e}}function ot(e){let t=[`undefined`,`boolean`],n=Object.keys(U);return d(e)&&n.every(n=>t.includes(typeof e[n]))}function st(e,t){return e===void 0||t===void 0||e===0&&t===0}var ct=(e,t,n,r)=>{function i(t,i,a){if(st(i,a))return;let o=e.startSpan(`[PageLoadPhase/${t}]${n}`,{startTime:i,parentContext:r,makeCurrentContext:!1});o.setAttribute(`bugsnag.span.category`,`page_load_phase`),o.setAttribute(`bugsnag.phase`,t),e.endSpan(o,a)}let a=t.getEntriesByType(`navigation`),o=Array.isArray(a)&&a[0];if(o){i(`Unload`,o.unloadEventStart,o.unloadEventEnd),i(`Redirect`,o.redirectStart,o.redirectEnd),i(`LoadFromCache`,o.fetchStart,o.domainLookupStart),i(`DNSLookup`,o.domainLookupStart,o.domainLookupEnd);let e=o.secureConnectionStart||o.connectEnd;i(`TCPHandshake`,o.connectStart,e),i(`TLS`,e,o.connectEnd),i(`HTTPRequest`,o.requestStart,o.responseStart),i(`HTTPResponse`,o.responseStart,o.responseEnd),i(`DomContentLoadedEvent`,o.domContentLoadedEventStart,o.domContentLoadedEventEnd),i(`LoadEvent`,o.loadEventStart,o.loadEventEnd)}},G=e=>e.pathname||`/`,lt=()=>class{constructor(e=G){this.resolveRoute=e}listenForRouteChanges(e){}},ut=(e,t)=>class{constructor(e=G){this.resolveRoute=e}listenForRouteChanges(n){addEventListener(`popstate`,r=>{let i=n(new URL(t.href),`popstate`);e(e=>{i.end(e)})});let r=history.pushState;history.pushState=function(...t){let i=t[2];if(i){let t=n(new URL(H(i.toString(),document.baseURI)),`pushState`);e(e=>{t.end(e)})}r.apply(this,t)}}},dt=class{constructor(e,t,n,r,i,a,o){this.wasBackgrounded=!1,this.enabled=!1,this.routeResolver=G,this.sendPageAttributes=U,this.document=e,this.location=t,this.spanFactory=n,this.webVitals=r,this.onSettle=i,this.performance=o,a.onStateChange(e=>{!this.wasBackgrounded&&e===`in-background`&&(this.wasBackgrounded=!0)})}install(e){if(!e.configuration.autoInstrumentFullPageLoads||this.wasBackgrounded)return;let{routingProvider:t,sendPageAttributes:n}=e.configuration;t&&(this.routeResolver=t.resolveRoute),n&&(this.sendPageAttributes=n),this.enabled=!0}start(){if(!this.enabled)return;let e=null,t=document.querySelector(`meta[name="traceparent"]`);if(t!==null&&t.getAttribute(`content`)){let[,n,r]=t.getAttribute(`content`).split(`-`);e={traceId:n,id:r}}let n=this.spanFactory.startSpan(`[FullPageLoad]`,{startTime:0,parentContext:e}),r=W(this.sendPageAttributes||U),i=new URL(this.location.href);this.onSettle(e=>
16{if(this.wasBackgrounded)return;let t=this.routeResolver(i)||G(i);n.name+=t,ct(this.spanFactory,this.performance,t,n),n.setAttribute(`bugsnag.span.category`,`full_page_load`),n.setAttribute(`bugsnag.browser.page.route`,t),r.referrer&&n.setAttribute(`bugsnag.browser.page.referrer`,this.document.referrer),r.title&&n.setAttribute(`bugsnag.browser.page.title`,this.document.title),r.url&&n.setAttribute(`bugsnag.browser.page.url`,i.toString()),this.webVitals.attachTo(n),this.spanFactory.endSpan(n,e),Ie()===`starting`&&j(`ready`)})}},ft=[`http://`,`https://`,`/`,`./`,`../`],pt=class{constructor(e,t,n,r){this.spanFactory=e,this.spanContextStorage=t,this.fetchTracker=n,this.xhrTracker=r,this.configEndpoint=``,this.networkRequestCallback=B,this.logger={debug:console.debug,warn:console.warn,info:console.info,error:console.error},this.enabled=!1,this.trackRequest=e=>{if(!this.shouldTrackRequest(e))return;let t={url:e.url,type:e.type,propagateTraceContext:!1},n=this.networkRequestCallback(t);if(!n)return{onRequestEnd:void 0,extraRequestHeaders:void 0};if(n.propagateTraceContext===void 0&&(n.propagateTraceContext=!1),!n.url)return{onRequestEnd:void 0,extraRequestHeaders:n.propagateTraceContext?this.getExtraRequestHeaders():void 0};if(typeof n.url!=`string`){this.logger.warn(`expected url to be a string following network request callback, got ${typeof n.url}`);return}let r=this.spanFactory.startNetworkSpan({method:e.method,startTime:e.startTime,url:n.url});return{onRequestEnd:e=>{e.state===`success`&&this.spanFactory.endSpan(r,e.endTime,{"http.status_code":e.status})},extraRequestHeaders:n.propagateTraceContext?this.getExtraRequestHeaders(r):void 0}}}install(e){if(!e.configuration.autoInstrumentNetworkRequests)return;let{endpoint:t,logger:n,networkRequestCallback:r}=e.configuration;n&&(this.logger=n),t&&(this.configEndpoint=t),r&&(this.networkRequestCallback=r),this.enabled=!0}start(){this.enabled&&(this.xhrTracker.onStart(this.trackRequest),this.fetchTracker.onStart(this.trackRequest))}shouldTrackRequest(e){return e.url!==this.configEndpoint&&ft.some(t=>e.url.startsWith(t))}getExtraRequestHeaders(e=this.spanContextStorage.current){let t={};return e&&(t.traceparent=Je.toTraceParentString(e),t.tracestate=mt(e.traceId)),t}};function mt(e){return`sb=v:1;r32:${S(e)}`}function ht(e){switch(e){case``:return;case`http/1.0`:return`1.0`;case`http/1.1`:return`1.1`;case`h2`:case`h2c`:return`2.0`;case`h3`:return`3.0`;case`spdy/1`:case`spdy/2`:case`spdy/3`:return`SPDY`;default:return e}}function gt(e){return e&&Array.isArray(e.supportedEntryTypes)&&e.supportedEntryTypes.includes(`resource`)}var _t=class{constructor(e,t,n){this.spanFactory=e,this.spanContextStorage=t,this.PerformanceObserverClass=n,this.enabled=!1,this.logger={debug:console.debug,warn:console.warn,info:console.info,error:console.error},this.networkRequestCallback=B}install(e){if(!gt(this.PerformanceObserverClass))return;let{logger:t,networkRequestCallback:n}=e.configuration;t&&(this.logger=t),n&&(this.networkRequestCallback=n),this.enabled=!0}start(){if(!this.enabled)return;let e=new this.PerformanceObserverClass(e=>{let t=e.getEntries();for(let e of t){if(e.initiatorType===`fetch`||e.initiatorType===`xmlhttprequest`)continue;let t=this.spanContextStorage.first;if(t){let n=this.networkRequestCallback({url:e.name,type:e.initiatorType});if(!n)return;if(typeof n.url!=`string`){this.logger.warn(`expected url to be a string following network request callback, got ${typeof n.url}`);return}let r=``;try{let e=new URL(n.url);e.search=``,r=e.href}catch{this.logger.warn(`Unable to parse URL returned from networkRequestCallback: ${n.url}`);return}let i=this.spanFactory.startSpan(`[ResourceLoad]${r}`,{parentContext:t,startTime:e.startTime,makeCurrentContext:!1});i.setAttribute(`bugsnag.span.category`,`resource_load`),i.setAttribute(`http.url`,n.url);let a=ht(e.nextHopProtocol);a&&i.setAttribute(`http.flavor`,a),e.encodedBodySize&&e.decodedBodySize&&(i.setAttribute(`http.response_content_length`,e.encodedBodySize),i.setAttribute(`http.response_content_length_uncompressed`,e.decodedBodySize)),e.responseStatus&&i.setAttribute(`http.status_code`,e.responseStatus),this.spanFactory.endSpan(i,e.responseEnd)}}});try{e.observe({type:`resource`,buffered:!0})}catch{this.logger.warn(`Unable to get previous resource loads as buffered observer not supported, only showing resource loads from this point on`),e.observe({entryTypes:[`resource`]})}}},{startTime:vt,parentContext:yt,makeCurrentContext:bt}=ye,xt={startTime:vt,parentContext:yt,makeCurrentContext:bt,trigger:{getDefaultValue:e=>String(e),message:`should be a string`,validate:p}},St=class{constructor(e,t,n){this.spanFactory=e,this.location=t,this.document=n,this.enabled=!1,this.sendPageAttributes=U,this.logger={debug:console.debug,warn:console.warn,info:console.info,error:console.error}}install(e){if(!e.configuration.autoInstrumentRouteChanges)return;let{logger:t,routingProvider:n,sendPageAttributes:r}=e.configuration;t&&(this.logger=t),n&&(this.routingProvider=n),r&&(this.sendPageAttributes=r),this.enabled=!0}start(){var e;if(!this.enabled)return;let t=new URL(this.location.href),n=this.routingProvider?.resolveRoute(t)||G(t),r=W(this.sendPageAttributes);(e=this.routingProvider)==null||e.listenForRouteChanges((e,t,i)=>{let a;if(e instanceof URL)a=e;else try{a=new URL(String(e))}catch{return this.logger.warn(`Invalid span options 17 - url should be a URL`),{id:``,name:``,traceId:``,samplingRate:0,samplingProbability:0,isValid:()=>!1,setAttribute:()=>{},end:()=>{}}}j(`navigating`);let o={...i,trigger:t},s=this.spanFactory.validateSpanOptions(`[RouteChange]`,o,xt),c=this.routingProvider?.resolveRoute(a)||G(a);s.name+=c;let l=this.spanFactory.startSpan(s.name,s.options);return l.setAttribute(`bugsnag.span.category`,`route_change`),l.setAttribute(`bugsnag.browser.page.route`,c),l.setAttribute(`bugsnag.browser.page.previous_route`,n),l.setAttribute(`bugsnag.browser.page.route_change.trigger`,s.options.trigger),r.url&&l.setAttribute(`bugsnag.browser.page.url`,e.toString()),n=c,{get id(){return l.id},get traceId(){return l.traceId},get samplingRate(){return l.samplingRate},get samplingProbability(){return l.samplingProbability},get name(){return l.name},isValid:l.isValid,setAttribute:l.setAttribute,end:e=>{let t=d(e)?e:{endTime:e};if(r.title&&l.setAttribute(`bugsnag.browser.page.title`,this.document.title),t.url){let e=Ct(t.url),i=this.routingProvider?.resolveRoute(e)||G(e);l.name=`[RouteChange]${i}`,l.setAttribute(`bugsnag.browser.page.route`,i),n=i,r.url&&l.setAttribute(`bugsnag.browser.page.url`,e.toString())}this.spanFactory.toPublicApi(l).end(t.endTime),j(`ready`)}}})}};function Ct(e){return typeof e==`string`?new URL(e):e}function wt(e){let t=[],n=e.document.visibilityState===`hidden`?`in-background`:`in-foreground`,r={onStateChange(e){t.push(e),n===`in-background`&&e(n)}},i=e=>{if(n!==e){n=e;for(let e of t)e(n)}};return e.document.addEventListener(`visibilitychange`,function(){let t=e.document.visibilityState===`hidden`?`in-background`:`in-foreground`;i(t)}),e.addEventListener(`pagehide`,function(){i(`in-background`)}),e.addEventListener(`pageshow`,function(){i(`in-foreground`)}),r}var Tt=3e5;function K(e,t){return Math.abs(Date.now()-(e+t.now()))>Tt?Date.now()-t.now():e}function Et(e,t){let n=K(e.timeOrigin===void 0?e.timing.navigationStart:e.timeOrigin,e);t.onStateChange(t=>{t===`in-foreground`&&(n=K(n,e))});let r=e=>fe(n+e);return{now:()=>e.now(),date:()=>new Date(n+e.now()),convert:e=>e.getTime()-n,toUnixNanoseconds:r,toUnixTimestampNanoseconds:e=>r(e).toString(),fromUnixNanoseconds:e=>pe(e)-n}}var Dt=e=>d(e)&&typeof e.resolveRoute==`function`&&typeof e.listenForRouteChanges==`function`;function Ot(e,t=!1){return{...x,releaseStage:{...x.releaseStage,defaultValue:t?`development`:`production`},autoInstrumentFullPageLoads:{defaultValue:!0,message:`should be true|false`,validate:u},autoInstrumentNetworkRequests:{defaultValue:!0,message:`should be true|false`,validate:u},autoInstrumentRouteChanges:{defaultValue:!0,message:`should be true|false`,validate:u},generateAnonymousId:{defaultValue:!0,message:`should be true|false`,validate:u}
17,routingProvider:{defaultValue:e,message:`should be a routing provider`,validate:Dt},settleIgnoreUrls:{defaultValue:[],message:`should be an array of string|RegExp`,validate:ee},networkRequestCallback:{defaultValue:B,message:`should be a function`,validate:Xe},sendPageAttributes:{defaultValue:U,message:`should be an object`,validate:ot},serviceName:{defaultValue:`unknown_service`,message:`should be a string`,validate:m}}}function kt(e){let t=e.toString(16);return t.length===1?`0`+t:t}var At={generate(e){let t=new Uint8Array(e/8),n=window.crypto.getRandomValues(t);return Array.from(n).map(kt).join(``)}},q=class{constructor(e){this.settled=!1,this.callbacks=new Set,this.clock=e}subscribe(e){this.callbacks.add(e),this.isSettled()&&e(this.clock.now())}unsubscribe(e){this.callbacks.delete(e)}isSettled(){return this.settled}settle(e){this.settled=!0;for(let t of this.callbacks)t(e)}},J=class extends q{constructor(e,t){super(e),this.timeout=void 0,new MutationObserver(()=>{this.restart()}).observe(t,{subtree:!0,childList:!0,characterData:!0}),this.restart()}restart(){clearTimeout(this.timeout),this.settled=!1;let e=this.clock.now();this.timeout=setTimeout(()=>{this.settle(e)},100)}};function jt(e){return!!e&&e.entryType===`navigation`}var Mt=class extends q{constructor(e,t,n,r){super(e),r.readyState===`complete`?setTimeout(()=>{this.settleUsingPerformance(n)},0):t(`load`,()=>{setTimeout(()=>{this.settleUsingPerformance(n)},0)})}settleUsingPerformance(e){let t=this.clock.now(),n=typeof e.getEntriesByType==`function`?e.getEntriesByType(`navigation`)[0]:void 0,r=0;jt(n)?r=n.loadEventEnd:e.timing&&(r=e.timing.loadEventEnd-e.timing.navigationStart),(r<=0||r>t)&&(r=t),this.settle(r)}},Nt=class extends q{constructor(e,t){super(e),this.timeout=void 0,this.urlsToIgnore=[],this.outstandingRequests=0,this.settled=!0,t.onStart(this.onRequestStart.bind(this))}setUrlsToIgnore(e){this.urlsToIgnore=e}onRequestStart(e){if(!this.shouldIgnoreUrl(e.url))return clearTimeout(this.timeout),this.settled=!1,++this.outstandingRequests,{onRequestEnd:e=>{if(--this.outstandingRequests===0){let e=this.clock.now();this.timeout=setTimeout(()=>{this.settle(e)},100)}}}}shouldIgnoreUrl(e){return this.urlsToIgnore.some(t=>t.test(e))}},Pt=class extends q{constructor(e,t){super(e),this.settlers=t;for(let e of t)e.subscribe(e=>{this.settlersAreSettled()?this.settle(e):this.settled=!1})}isSettled(){return super.isSettled()&&this.settlersAreSettled()}settlersAreSettled(){for(let e of this.settlers)if(!e.isSettled())return!1;return!0}},Ft=6e4;function It(){let e=()=>{};return e.install=()=>{},e.start=()=>{},e}function Lt(e,t,n,r,i){let a=new J(e,t.document),o=new Nt(e,n),s=new Nt(e,r),c=new Pt(e,[a,new Mt(e,t.addEventListener,i,t.document),o,s]);function l(t){let n=e=>{clearTimeout(r),c.unsubscribe(n),t(e)},r=setTimeout(()=>{let r=e.now();c.unsubscribe(n),t(r)},Ft),i=c.isSettled()?100:0,a=e.now();setTimeout(()=>{c.isSettled()?n(a):c.subscribe(n)},i)}return l.install=function(e){let t=[];e.configuration.endpoint&&t.push(RegExp(e.configuration.endpoint)),e.configuration.settleIgnoreUrls&&t.push(...e.configuration.settleIgnoreUrls.map(e=>typeof e==`string`?RegExp(e):e)),o.setUrlsToIgnore(t),s.setUrlsToIgnore(t)},l.start=function(){},l}function Rt(e){try{if(e.localStorage)return new Bt(e.localStorage)}catch{}return new L}function zt(e,t){switch(e){case`bugsnag-sampling-probability`:return JSON.stringify(t);case`bugsnag-anonymous-id`:return t;default:return e}}var Bt=class{constructor(e){this.storage=e}async load(e){try{let t=this.storage.getItem(e);if(t)return We(e,t)}catch{}}async save(e,t){try{this.storage.setItem(e,zt(e,t))}catch{}}};function Vt(e,t){let n,r;return function(i){let a=new se(i.releaseStage,i.appVersion,i.serviceName,`bugsnag.performance.browser`,`3.4.1`);if(a.set(`browser.user_agent`,e.userAgent),e.userAgentData&&(a.set(`browser.platform`,e.userAgentData.platform),a.set(`browser.mobile`,e.userAgentData.mobile)),i.generateAnonymousId){if(n||=t.load(`bugsnag-anonymous-id`).then(e=>{let n=e||He();return e||t.save(`bugsnag-anonymous-id`,n),r=n,r}),r)a.set(`device.id`,r);else return n.then(e=>(a.set(`device.id`,e),a))}return Promise.resolve(a)}}var Ht=e=>{let t={url:{name:`bugsnag.browser.page.url`,getValue:()=>e.location.href,permitted:!1},title:{name:`bugsnag.browser.page.title`,getValue:()=>e.title,permitted:!1}};return{configure(e){t.title.permitted=e.sendPageAttributes.title||!1,t.url.permitted=e.sendPageAttributes.url||!1},requestAttributes(e){for(let n of Object.values(t))n.permitted&&e.setAttribute(n.name,n.getValue())}}},Ut=class{constructor(e,t,n){if(this.performance=e,this.clock=t,this.observers=[],n&&Array.isArray(n.supportedEntryTypes)){let e=n.supportedEntryTypes;e.includes(`largest-contentful-paint`)&&this.observeLargestContentfulPaint(n),e.includes(`layout-shift`)&&this.observeLayoutShift(n)}}attachTo(e){let t=this.firstContentfulPaint();t&&e.addEvent(`fcp`,t);let n=this.timeToFirstByte();n&&e.addEvent(`ttfb`,n);let r=this.firstInputDelay();r&&(e.addEvent(`fid_start`,r.start),e.addEvent(`fid_end`,r.end)),this.cumulativeLayoutShift&&e.setAttribute(`bugsnag.metrics.cls`,this.cumulativeLayoutShift),this.largestContentfulPaint&&e.addEvent(`lcp`,this.largestContentfulPaint);for(let e of this.observers)e.disconnect()}firstContentfulPaint(){let e=this.performance.getEntriesByName(`first-contentful-paint`,`paint`),t=Array.isArray(e)&&e[0];if(t)return t.startTime}timeToFirstByte(){let e=this.performance.getEntriesByType(`navigation`),t=Array.isArray(e)&&e[0],n;if(n=t?t.responseStart:this.performance.timing.responseStart-this.performance.timing.navigationStart,n>0&&n<=this.clock.now())return n}firstInputDelay(){let e=this.performance.getEntriesByType(`first-input`),t=Array.isArray(e)&&e[0];if(t)return{start:t.startTime,end:t.processingStart}}observeLargestContentfulPaint(e){let t=new e(e=>{let t=e.getEntries();t.length>0&&(this.largestContentfulPaint=t[t.length-1].startTime)});t.observe({type:`largest-contentful-paint`,buffered:!0}),this.observers.push(t)}observeLayoutShift(e){let t,n=new e(e=>{for(let n of e.getEntries())n.hadRecentInput||(t&&n.startTime-t.previousStartTime<1e3&&n.startTime-t.firstStartTime<5e3?(t.value+=n.value,t.previousStartTime=n.startTime):t={value:n.value,firstStartTime:n.startTime,previousStartTime:n.startTime});t&&(this.cumulativeLayoutShift===void 0||t.value>this.cumulativeLayoutShift)&&(this.cumulativeLayoutShift=t.value)});n.observe({type:`layout-shift`,buffered:!0}),this.observers.push(n)}},Y,X,Z;if(typeof window>`u`||typeof document>`u`)Y=It(),X=lt(),Z=Le();else{let e=window.location.hostname===`localhost`,t=wt(window),n=Ht(document),r=Et(performance,t),i=Rt(window),a=Vt(navigator,i),o=tt(window,r),s=at(XMLHttpRequest,r,document),c=new Ut(performance,r,window.PerformanceObserver);Y=Lt(r,window,o,s,performance),X=ut(Y,window.location),Z=M({isDevelopment:e,backgroundingListener:t,clock:r,resourceAttributesSource:a,spanAttributesSource:n,deliveryFactory:z(window.fetch,r,t),idGenerator:At,schema:Ot(new X,e),plugins:(e,n)=>[Y,new dt(document,window.location,e,c,Y,t,performance),new _t(e,n,window.PerformanceObserver),new pt(e,n,o,s),new St(e,window.location,document)],persistence:i,retryQueueFactory:(e,t)=>new Ke(e,t)})}var Wt=Z,Gt=class{constructor(e,t){this.router=e;let n=!t||t===`/`?``:t;function r(t){return e.resolve({path:t.pathname.replace(n??``,``)}).matched.pop()?.path||`no-route-found`}this.resolveRoute=r}listenForRouteChanges(e){this.router.beforeResolve((t,n)=>{if(!n.name)return;let r=e(new URL(t.path,document.baseURI),`beforeResolve`);Y(e=>{r.end(e)})})}};export{t as i,Wt as n,r,Gt as t}; 18//# sourceMappingURL=I0Xhptuu.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.