PageSourceSearch

https://shop.sharethedignity.org.au/assets/scripts/configure.U43DPAZA.js

js sharethedignity.org.au collected 2026-10-02 03:06:38 UTC 111,443 bytes, 20 lines download raw bytes

1(()=>{var Ji=Object.create;var bn=Object.defineProperty;var Wi=Object.getOwnPropertyDescriptor;var Yi=Object.getOwnPropertyNames;var Qi=Object.getPrototypeOf,Zi=Object.prototype.hasOwnProperty;var yn=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var es=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let c of Yi(e))!Zi.call(t,c)&&c!==n&&bn(t,c,{get:()=>e[c],enumerable:!(o=Wi(e,c))||o.enumerable});return t};var ts=(t,e,n)=>(n=t!=null?Ji(Qi(t)):{},es(e||!t||!t.__esModule?bn(n,"default",{value:t,enumerable:!0}):n,t));var Pn=yn((kn,sr)=>{(function(t){if(typeof kn=="object"&&typeof sr<"u")sr.exports=t();else if(typeof define=="function"&&define.amd)define([],t);else{var e;typeof window<"u"?e=window:typeof global<"u"?e=global:typeof self<"u"?e=self:e=this,e.Bugsnag=t()}})(function(){var t,e,n,o=["navigation","request","process","log","user","state","error","manual"],c=function(r,a,s){for(var i=s,u=0,f=r.length;u<f;u++)i=a(i,r[u],u,r);return i},d=function(r,a){return c(r,function(s,i,u,f){return a(i,u,f)?s.concat(i):s},[])},h=function(r,a){return c(r,function(s,i,u,f){return s===!0||i===a},!1)},b=function(r){return Object.prototype.toString.call(r)==="[object Array]"},v=!{toString:null}.propertyIsEnumerable("toString"),R=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],T=function(r){var a=[],s;for(s in r)Object.prototype.hasOwnProperty.call(r,s)&&a.push(s);if(!v)return a;for(var i=0,u=R.length;i<u;i++)Object.prototype.hasOwnProperty.call(r,R[i])&&a.push(R[i]);return a},k=function(r,a){return r===void 0&&(r=1),a===void 0&&(a=1/0),function(s){return typeof s=="number"&&parseInt(""+s,10)===s&&s>=r&&s<=a}},S=function(r){return typeof r=="function"||b(r)&&d(r,function(a){return typeof a=="function"}).length===r.length},O=function(r){return typeof r=="string"&&!!r.length},P={},M=function(){return{unhandledExceptions:!0,unhandledRejections:!0}};P.schema={apiKey:{defaultValue:function(){return null},message:"is required",validate:O},appVersion:{defaultValue:function(){},message:"should be a string",validate:function(r){return r===void 0||O(r)}},appType:{defaultValue:function(){},message:"should be a string",validate:function(r){return r===void 0||O(r)}},autoDetectErrors:{defaultValue:function(){return!0},message:"should be true|false",validate:function(r){return r===!0||r===!1}},enabledErrorTypes:{defaultValue:function(){return M()},message:"should be an object containing the flags { unhandledExceptions:true|false, unhandledRejections:true|false }",allowPartialObject:!0,validate:function(r){if(typeof r!="object"||!r)return!1;var a=T(r),s=T(M());return!(d(a,function(i){return h(s,i)}).length<a.length||d(T(r),function(i){return typeof r[i]!="boolean"}).length>0)}},onError:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:S},onSession:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:S},onBreadcrumb:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:S},endpoints:{defaultValue:function(r){return typeof r>"u"?{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(r){return r&&typeof r=="object"&&O(r.notify)&&O(r.sessions)&&d(T(r),function(a){return!h(["notify","sessions"],a)}).length===0}},autoTrackSessions:{defaultValue:function(r){return!0},message:"should be true|false",validate:function(r){return r===!0||r===!1}},enabledReleaseStages:{defaultValue:function(){return null},message:"should be an array of strings",validate:function(r){return r===null||b(r)&&d(r,function(a){return typeof a=="string"}).length===r.length}},releaseStage:{defaultValue:function(){return"production"},message:"should be a string",validate:function(r){return typeof r=="string"&&r.length}},maxBreadcrumbs:{defaultValue:function(){return 25},message:"should be a number \u2264100",validate:function(r){return k(0,100)(r)}},enabledBreadcrumbTypes:{defaultValue:function(){return o},message:"should be null or a list of available breadcrumb types ("+o.join(",")+")",validate:function(r){return r===null||b(r)&&c(r,function(a,s){return a===!1?a:h(o,s)},!0)}},context:{defaultValue:function(){},message:"should be a string",validate:function(r){return r===void 0||typeof r=="string"}},user:{defaultValue:function(){return{}},message:"should be an object with { id, email, name } properties",validate:function(r){return r===null||r&&c(T(r),function(a,s){return a&&h(["id","email","name"],s)},!0)}},metadata:{defaultValue:function(){return{}},message:"should be an object",validate:function(r){return typeof r=="object"&&r!==null}},logger:{defaultValue:function(){},message:"should be null or an object with methods { debug, info, warn, error }",validate:function(r){return!r||r&&c(["debug","info","warn","error"],function(a,s){return a&&typeof r[s]=="function"},!0)}},redactedKeys:{defaultValue:function(){return["password"]}
1,message:"should be an array of strings|regexes",validate:function(r){return b(r)&&r.length===d(r,function(a){return typeof a=="string"||a&&typeof a.test=="function"}).length}},plugins:{defaultValue:function(){return[]},message:"should be an array of plugin objects",validate:function(r){return b(r)&&r.length===d(r,function(a){return a&&typeof a=="object"&&typeof a.load=="function"}).length}},featureFlags:{defaultValue:function(){return[]},message:'should be an array of objects that have a "name" property',validate:function(r){return b(r)&&r.length===d(r,function(a){return a&&typeof a=="object"&&typeof a.name=="string"}).length}},reportUnhandledPromiseRejectionsAsHandled:{defaultValue:function(){return!1},message:"should be true|false",validate:function(r){return r===!0||r===!1}},sendPayloadChecksums:{defaultValue:function(){return!1},message:"should be true|false",validate:function(r){return r===!0||r===!1}}};var I=function(r){for(var a=1;a<arguments.length;a++){var s=arguments[a];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]=s[i])}return r},$=function(r,a){return c(r,function(s,i,u,f){return s.concat(a(i,u,f))},[])};function U(){return U=Object.assign?Object.assign.bind():function(r){for(var a=1;a<arguments.length;a++){var s=arguments[a];for(var i in s)({}).hasOwnProperty.call(s,i)&&(r[i]=s[i])}return r},U.apply(null,arguments)}var G=P.schema,oe={releaseStage:I({},G.releaseStage,{defaultValue:function(){return/^localhost(:\d+)?$/.test(window.location.host)?"development":"production"}}),appType:U({},G.appType,{defaultValue:function(){return"browser"}}),logger:I({},G.logger,{defaultValue:function(){return typeof console<"u"&&typeof console.debug=="function"?ca():void 0}})},ca=function(){var r={},a=console.log;return $(["debug","info","warn","error"],function(s){var i=console[s];r[s]=typeof i=="function"?i.bind(console,"[bugsnag]"):a.bind(console,"[bugsnag]")}),r},la=(function(){function r(s,i,u,f){f===void 0&&(f=new Date),this.type=u,this.message=s,this.metadata=i,this.timestamp=f}var a=r.prototype;return a.toJSON=function(){return{type:this.type,name:this.message,timestamp:this.timestamp,metaData:this.metadata}},r})(),Mt=la,at={};(function(r,a){"use strict";typeof t=="function"&&t.amd?t("stackframe",[],a):typeof at=="object"?at=a():r.StackFrame=a()})(this,function(){"use strict";function r(E){return!isNaN(parseFloat(E))&&isFinite(E)}function a(E){return E.charAt(0).toUpperCase()+E.substring(1)}function s(E){return function(){return this[E]}}var i=["isConstructor","isEval","isNative","isToplevel"],u=["columnNumber","lineNumber"],f=["fileName","functionName","source"],l=["args"],g=["evalOrigin"],p=i.concat(u,f,l,g);function m(E){if(E)for(var C=0;C<p.length;C++)E[p[C]]!==void 0&&this["set"+a(p[C])](E[p[C]])}m.prototype={getArgs:function(){return this.args},setArgs:function(E){if(Object.prototype.toString.call(E)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=E},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(E){if(E instanceof m)this.evalOrigin=E;else if(E instanceof Object)this.evalOrigin=new m(E);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var E=this.getFileName()||"",C=this.getLineNumber()||"",N=this.getColumnNumber()||"",A=this.getFunctionName()||"";return this.getIsEval()?E?"[eval] ("+E+":"+C+":"+N+")":"[eval]:"+C+":"+N:A?A+" ("+E+":"+C+":"+N+")":E+":"+C+":"+N}},m.fromString=function(C){var N=C.indexOf("("),A=C.lastIndexOf(")"),x=C.substring(0,N),F=C.substring(N+1,A).split(","),D=C.substring(A+1);if(D.indexOf("@")===0)var X=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(D,""),q=X[1],le=X[2],Pe=X[3];return new m({functionName:x,args:F||void 0,fileName:q,lineNumber:le||void 0,columnNumber:Pe||void 0})};for(var y=0;y<i.length;y++)m.prototype["get"+a(i[y])]=s(i[y]),m.prototype["set"+a(i[y])]=(function(E){return function(C){this[E]=!!C}})(i[y]);for(var _=0;_<u.length;_++)m.prototype["get"+a(u[_])]=s(u[_]),m.prototype["set"+a(u[_])]=(function(E){return function(C){if(!r(C))throw new TypeError(E+" must be a Number");this[E]=Number(C)}})(u[_]);for(var w=0;w<f.length;w++)m.prototype["get"+a(f[w])]=s(f[w]),m.prototype["set"+a(f[w])]=(function(E){return function(C){this[E]=String(C)}})(f[w]);return m});var Ft={};(function(r,a){"use strict";typeof t=="function"&&t.amd?t("stack-generator",["stackframe"],a):typeof Ft=="object"?Ft=a(at):r.StackGenerator=a(r.StackFrame)})(this,function(r){return{backtrace:function(s){var i=[],u=10;typeof s=="object"&&typeof s.maxStackSize=="number"&&(u=s.maxStackSize);for(var f=arguments.callee;f&&i.length<u&&f.arguments;){for(var l=new Array(f.arguments.length),g=0;g<l.length;++g)l[g]=f.arguments[g];/function(?:\s+([\w$]+))+\s*\(/.test(f.toString())?i.push(new r({functionName:RegExp.$1||void 0,args:l})):i.push(new r({args:l}));try{f=f.caller}catch{break}}return i}}});var jt={};(function(r,a){"use strict";
1typeof t=="function"&&t.amd?t("error-stack-parser",["stackframe"],a):typeof jt=="object"?jt=a(at):r.ErrorStackParser=a(r.StackFrame)})(this,function(a){"use strict";var s=/(^|@)\S+:\d+/,i=/^\s*at .*(\S+:\d+|\(native\))/m,u=/^(eval@)?(\[native code])?$/;return{parse:function(l){if(typeof l.stacktrace<"u"||typeof l["opera#sourceloc"]<"u")return this.parseOpera(l);if(l.stack&&l.stack.match(i))return this.parseV8OrIE(l);if(l.stack)return this.parseFFOrSafari(l);throw new Error("Cannot parse given Error object")},extractLocation:function(l){if(l.indexOf(":")===-1)return[l];var g=/(.+?)(?::(\d+))?(?::(\d+))?$/,p=g.exec(l.replace(/[()]/g,""));return[p[1],p[2]||void 0,p[3]||void 0]},parseV8OrIE:function(l){var g=l.stack.split(`
2`).filter(function(p){return!!p.match(i)},this);return g.map(function(p){p.indexOf("(eval ")>-1&&(p=p.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var m=p.replace(/^\s+/,"").replace(/\(eval code/g,"("),y=m.match(/ (\((.+):(\d+):(\d+)\)$)/);m=y?m.replace(y[0],""):m;var _=m.split(/\s+/).slice(1),w=this.extractLocation(y?y[1]:_.pop()),E=_.join(" ")||void 0,C=["eval","<anonymous>"].indexOf(w[0])>-1?void 0:w[0];return new a({functionName:E,fileName:C,lineNumber:w[1],columnNumber:w[2],source:p})},this)},parseFFOrSafari:function(l){var g=l.stack.split(`
3`).filter(function(p){return!p.match(u)},this);return g.map(function(p){if(p.indexOf(" > eval")>-1&&(p=p.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),p.indexOf("@")===-1&&p.indexOf(":")===-1)return new a({functionName:p});var m=/((.*".+"[^@]*)?[^@]*)(?:@)/,y=p.match(m),_=y&&y[1]?y[1]:void 0,w=this.extractLocation(p.replace(m,""));return new a({functionName:_,fileName:w[0],lineNumber:w[1],columnNumber:w[2],source:p})},this)},parseOpera:function(l){return!l.stacktrace||l.message.indexOf(`
4`)>-1&&l.message.split(`
5`).length>l.stacktrace.split(`
6`).length?this.parseOpera9(l):l.stack?this.parseOpera11(l):this.parseOpera10(l)},parseOpera9:function(l){for(var g=/Line (\d+).*script (?:in )?(\S+)/i,p=l.message.split(`
7`),m=[],y=2,_=p.length;y<_;y+=2){var w=g.exec(p[y]);w&&m.push(new a({fileName:w[2],lineNumber:w[1],source:p[y]}))}return m},parseOpera10:function(l){for(var g=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,p=l.stacktrace.split(`
8`),m=[],y=0,_=p.length;y<_;y+=2){var w=g.exec(p[y]);w&&m.push(new a({functionName:w[3]||void 0,fileName:w[2],lineNumber:w[1],source:p[y]}))}return m},parseOpera11:function(l){var g=l.stack.split(`
9`).filter(function(p){return!!p.match(s)&&!p.match(/^Error created at/)},this);return g.map(function(p){var m=p.split("@"),y=this.extractLocation(m.pop()),_=m.shift()||"",w=_.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,E;_.match(/\(([^)]*)\)/)&&(E=_.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var C=E===void 0||E==="[arguments not available]"?void 0:E.split(",");return new a({functionName:w,args:C,fileName:y[0],lineNumber:y[1],columnNumber:y[2],source:p})},this)}}});var Lr=jt,it=function(r,a,s,i){var u=i&&i.redactedKeys?i.redactedKeys:[],f=i&&i.redactedPaths?i.redactedPaths:[];return JSON.stringify(_a(r,u,f),a,s)},da=20,fa=25e3,pa=8,st="...";function ha(r){return r instanceof Error||/^\[object (Error|(Dom)?Exception)\]$/.test(Object.prototype.toString.call(r))}function Nr(r){return"[Throws: "+(r?r.message:"?")+"]"}function ga(r,a){for(var s=0,i=r.length;s<i;s++)if(r[s]===a)return!0;return!1}function ma(r,a){for(var s=0,i=r.length;s<i;s++)if(a.indexOf(r[s])===0)return!0;return!1}function ba(r,a){for(var s=0,i=r.length;s<i;s++)if(typeof r[s]=="string"&&r[s].toLowerCase()===a.toLowerCase()||r[s]&&typeof r[s].test=="function"&&r[s].test(a))return!0;return!1}function ya(r){return Object.prototype.toString.call(r)==="[object Array]"}function va(r,a){try{return r[a]}catch(s){return Nr(s)}}function _a(r,a,s){var i=[],u=0;function f(l,g){function p(){return g.length>pa&&u>fa}if(u++,g.length>da||p())return st;if(l===null||typeof l!="object")return l;if(ga(i,l))return"[Circular]";if(i.push(l),typeof l.toJSON=="function")try{u--;var m=f(l.toJSON(),g);return i.pop(),m}catch(x){return Nr(x)}var y=ha(l);if(y){u--;var _=f({name:l.name,message:l.message},g);return i.pop(),_}if(ya(l)){for(var w=[],E=0,C=l.length;E<C;E++){if(p()){w.push(st);break}w.push(f(l[E],g.concat("[]")))}return i.pop(),w}var N={};try{for(var A in l)if(Object.prototype.hasOwnProperty.call(l,A)){if(ma(s,g.join("."))&&ba(a,A)){N[A]="[REDACTED]";continue}if(p()){N[A]=st;break}N[A]=f(va(l,A),g.concat(A))}}catch{}return i.pop(),N}return f(r,[])}function Or(r,a,s,i){if(typeof s=="string"){i===void 0?i=null:i!==null&&typeof i!="str
9ing"&&(i=it(i));var u=a[s];if(typeof u=="number"){r[u]={name:s,variant:i};return}r.push({name:s,variant:i}),a[s]=r.length-1}}function Sa(r,a,s){if(b(a)){for(var i=0;i<a.length;++i){var u=a[i];u===null||typeof u!="object"||Or(r,s,u.name,u.variant)}return r}}function Ea(r){return $(d(r,Boolean),function(a){var s=a.name,i=a.variant,u={featureFlag:s};return typeof i=="string"&&(u.variant=i),u})}function Ta(r,a,s){var i=a[s];typeof i=="number"&&(r[i]=null,delete a[s])}var ue={add:Or,clear:Ta,merge:Sa,toEventApi:Ea},ot=function(r){return!!r&&(!!r.stack||!!r.stacktrace||!!r["opera#sourceloc"])&&typeof(r.stack||r.stacktrace||r["opera#sourceloc"])=="string"&&r.stack!==r.name+": "+r.message},wa=Aa;function Aa(r){switch(Object.prototype.toString.call(r)){case"[object Error]":return!0;case"[object Exception]":return!0;case"[object DOMException]":return!0;default:return r instanceof Error}}var ut=wa,Ca=function(r,a,s,i){var u;if(a){var f;if(s===null)return Dr(r,a);typeof s=="object"&&(f=s),typeof s=="string"&&(f=(u={},u[s]=i,u)),f&&(a==="__proto__"||a==="constructor"||a==="prototype"||(r[a]||(r[a]={}),r[a]=I({},r[a],f)))}},Ra=function(r,a,s){if(typeof a=="string"){if(!s)return r[a];if(r[a])return r[a][s]}},Dr=function(r,a,s){if(typeof a=="string"){if(!s){delete r[a];return}a==="__proto__"||a==="constructor"||a==="prototype"||r[a]&&delete r[a][s]}},_e={add:Ca,get:Ra,clear:Dr};function $t(){return $t=Object.assign?Object.assign.bind():function(r){for(var a=1;a<arguments.length;a++){var s=arguments[a];for(var i in s)({}).hasOwnProperty.call(s,i)&&(r[i]=s[i])}return r},$t.apply(null,arguments)}var ne=(function(){function r(s,i,u,f,l){u===void 0&&(u=[]),f===void 0&&(f=Pa()),this.apiKey=void 0,this.context=void 0,this.groupingHash=void 0,this.originalError=l,this._handledState=f,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=[Fr(s,i,r.__type,u)]}var a=r.prototype;return a.addMetadata=function(i,u,f){return _e.add(this._metadata,i,u,f)},a.setTraceCorrelation=function(i,u){typeof i=="string"&&(this._correlation=$t({traceId:i},typeof u=="string"?{spanId:u}:{}))},a.getGroupingDiscriminator=function(){return this._groupingDiscriminator},a.setGroupingDiscriminator=function(i){var u=this._groupingDiscriminator;return(typeof i=="string"||i===null||i===void 0)&&(this._groupingDiscriminator=i),u},a.getMetadata=function(i,u){return _e.get(this._metadata,i,u)},a.clearMetadata=function(i,u){return _e.clear(this._metadata,i,u)},a.addFeatureFlag=function(i,u){u===void 0&&(u=null),ue.add(this._features,this._featuresIndex,i,u)},a.addFeatureFlags=function(i){ue.merge(this._features,i,this._featuresIndex)},a.getFeatureFlags=function(){return ue.toEventApi(this._features)},a.clearFeatureFlag=function(i){ue.clear(this._features,this._featuresIndex,i)},a.clearFeatureFlags=function(){this._features=[],this._featuresIndex={}},a.getUser=function(){return this._user},a.setUser=function(i,u,f){this._user={id:i,email:u,name:f}},a.toJSON=function(){return{payloadVersion:"4",exceptions:$(this.errors,function(i){return I({},i,{message:i.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}},r})(),xa=function(r){var a={file:r.fileName,method:ka(r.functionName),lineNumber:r.lineNumber,columnNumber:r.columnNumber,code:void 0,inProject:void 0};return a.lineNumber>-1&&!a.file&&!a.method&&(a.file="global code"),a},ka=function(r){return/^global code$/i.test(r)?"global code":r},Pa=function(){return{unhandled:!1,severity:"warning",severityReason:{type:"handledException"}}},Mr=function(r){return typeof r=="string"?r:""};function Fr(r,a,s,i){return{errorClass:Mr(r),errorMessage:Mr(a),type:s,stacktrace:c(i,function(u,f){var l=xa(f);try{return JSON.stringify(l)==="{}"?u:u.concat(l)}catch{return u}},[])}}function jr(r){return r.cause?[r].concat(jr(r.cause)):[r]}ne.getStacktrace=function(r,a,s){if(ot(r))return Lr.parse(r).slice(a);try{return d(Ft.backtrace(),function(i){return(i.functionName||"").indexOf("StackGenerator$$")===-1}).slice(1+s)}catch{return[]}},ne.create=function(r,a,s,i,u,f){u===void 0&&(u=0);var l=Br(r,a,i,f),g=l[0],p=l[1],m;try{var y=ne.getStacktrace(g,p>0?1+p+u:0,1+u);m=new ne(g.name,g.message,y,s,r)}catch{m=new ne(g.name,g.message,[],s,r)}if(g.name==="InvalidError"&&m.addMetadata(""+i,"non-error parameter",$r(r)),g.cause){var _,w=jr(g).slice(1),E=$(w,function(C){var N=ut(C)&&ot(C)?Lr.parse(C):[],A=Br(C,!0,"error cause"),x=A[0];return x.name==="InvalidError"&&m.addMetadata("error cause",$r(C)),Fr(x.name,x.message,ne.__type,N)});(_=m.errors).push.apply(_,E)}return m};var $r=function(r){return r===null?"null":r===void 0?"undefined":r},Br=function(r,a,s,i){var u,f=0,l=function(g){var p=s==="error cause"?"was":"received";i&&i.warn(s+" "+p+' a non-error: "'+g+'"');var m=new Error(s+" "+p+' a non-error. See "'+s+'" tab for more detail.');return m.name="InvalidError",m};if(!a)ut(r)?u=r:(u=l(typeof r),f+=2);else switch(typeof r){case"string":case"number":case"boolean":u=new Error(String(r)),f+=1;break;case"function":u=l("function"),f+=2;break;case"object":r!==null&&ut(r)?u=r:r!==null&&Ia(r)?(u=new Error(r.message||r.errorMessage),u.name=r.name||r.errorClass,f+=1):(u=l(r===null?"null":"unsupported object"),f+=2);break;default:u=l("nothing"),f+=2}if(!ot(u))try{throw u}catch(g){ot(g)&&(u=g,f=1)}return[u,f]};ne.__type="browserjs";var Ia=function(r){return(typeof r.name=="string"||typeof r.errorClass=="string")&&(typeof r.message=="string"||typeof r.errorMessage=="string")},Bt=ne,La=function(r,a,s){var i=0,u=function(){if(i>=r.length)return s(null,!0);a(r[i],function(f,l){if(f)return s(f);if(l===!1)return s(null,!1);i++,u()})};u()},Na=function(r,a,s,i){var u=function(f,l){if(typeof f!="function")return l(null);try{if(f.length!==2){var g=f(a);return g&&typeof g.then=="function"?g.then(function(p){return setTimeout(function(){return l(null,p)})},function(p){setTimeout(function(){return s(p),l(null,!0)})}):l(null,g)}f(a,function(p,m){if(p)return s(p),l(null);l(null,m)})}
9catch(p){s(p),l(null)}};La(r,u,i)},qr=function(r,a,s,i){for(var u=!1,f=r.slice();!u&&f.length;)try{u=f.pop()(a)===!1}catch(l){i.error("Error occurred in "+s+" callback, continuing anyway\u2026"),i.error(l)}return u};function Oa(r){return typeof r=="string"&&/^c[a-z0-9]{20,32}$/.test(r)}var Da=Oa;function Ma(r,a){var s="000000000"+r;return s.substr(s.length-a)}var qt=Ma;function Fa(r){var a=4,s=36,i=Math.pow(s,a),u=0;function f(){return qt((Math.random()*i<<0).toString(s),a)}function l(){return u=u<i?u:0,u++,u-1}function g(){var p="c",m=new Date().getTime().toString(s),y=qt(l().toString(s),a),_=r(),w=f()+f();return p+m+y+_+w}return g.fingerprint=r,g.isCuid=Da,g}var ja=Fa,Vr=typeof window=="object"?window:self,Ur=0;for(var $a in Vr)Object.hasOwnProperty.call(Vr,$a)&&Ur++;var Ba=navigator.mimeTypes?navigator.mimeTypes.length:0,qa=qt((Ba+navigator.userAgent.length).toString(36)+Ur.toString(36),4);function Va(){return qa}var Ua=Va,Ha=ja(Ua),Ga=Ha,Ka=(function(){function r(){this.id=Ga(),this.startedAt=new Date,this._handled=0,this._unhandled=0,this._user={},this.app={},this.device={}}var a=r.prototype;return a.getUser=function(){return this._user},a.setUser=function(i,u,f){this._user={id:i,email:u,name:f}},a.toJSON=function(){return{id:this.id,startedAt:this.startedAt,events:{handled:this._handled,unhandled:this._unhandled}}},a._track=function(i){this[i._handledState.unhandled?"_unhandled":"_handled"]+=1},r})(),Vt=Ka,Xa=ue.add,za=ue.clear,Ut=ue.merge,Ja="00000",Wa="https://notify.bugsnag.smartbear.com",Ya="https://sessions.bugsnag.smartbear.com",ae=function(){},Qa=(function(){function r(s,i,u,f){var l=this;i===void 0&&(i=P.schema),u===void 0&&(u=[]),this._notifier=f,this._config={},this._schema=i,this._delivery={sendSession:ae,sendEvent:ae},this._logger={debug:ae,info:ae,warn:ae,error:ae},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=r,this.Event=Bt,this.Breadcrumb=Mt,this.Session=Vt,this._config=this._configure(s,u),$(u.concat(this._config.plugins),function(m){m&&l._loadPlugin(m)}),this._depth=1;var g=this,p=this.notify;this.notify=function(){return p.apply(g,arguments)}}var a=r.prototype;return a.addMetadata=function(i,u,f){return _e.add(this._metadata,i,u,f)},a.getMetadata=function(i,u){return _e.get(this._metadata,i,u)},a.clearMetadata=function(i,u){return _e.clear(this._metadata,i,u)},a.addFeatureFlag=function(i,u){u===void 0&&(u=null),Xa(this._features,this._featuresIndex,i,u)},a.addFeatureFlags=function(i){Ut(this._features,i,this._featuresIndex)},a.clearFeatureFlag=function(i){za(this._features,this._featuresIndex,i)},a.clearFeatureFlags=function(){this._features=[],this._featuresIndex={}},a.getContext=function(){return this._context},a.setContext=function(i){this._context=i},a.getGroupingDiscriminator=function(){return this._groupingDiscriminator},a.setGroupingDiscriminator=function(i){var u=this._groupingDiscriminator;return(typeof i=="string"||i===null||i===void 0)&&(this._groupingDiscriminator=i),u},a._configure=function(i,u){var f=c(u,function(m,y){return y&&y.configSchema?I({},m,y.configSchema):m},this._schema);i.endpoints||(i.sendPayloadChecksums="sendPayloadChecksums"in i?i.sendPayloadChecksums:!0);var l=c(T(f),function(m,y){var _=f[y].defaultValue(i[y]);if(i[y]!==void 0){var w=f[y].validate(i[y]);w?f[y].allowPartialObject?m.config[y]=I(_,i[y]):m.config[y]=i[y]:(m.errors[y]=f[y].message,m.config[y]=_)}else m.config[y]=_;return m},{errors:{},config:{}}),g=l.errors,p=l.config;if(f.apiKey){if(!p.apiKey)throw new Error("No Bugsnag API Key set");/^[0-9a-f]{32}$/i.test(p.apiKey)||(g.apiKey="should be a string of 32 hexadecimal characters"),i.endpoints===void 0&&p.apiKey.indexOf(Ja)===0&&(p.endpoints={notify:Wa,sessions:Ya})}return this._metadata=I({},p.metadata),Ut(this._features,p.featureFlags,this._featuresIndex),this._user=I({},p.user),this._context=p.context,p.logger&&(this._logger=p.logger),p.onError&&(this._cbs.e=this._cbs.e.concat(p.onError)),p.onBreadcrumb&&(this._cbs.b=this._cbs.b.concat(p.onBreadcrumb)),p.onSession&&(this._cbs.s=this._cbs.s.concat(p.onSession)),T(g).length&&this._logger.warn(Za(g,i)),p},a.getUser=function(){return this._user},a.setUser=function(i,u,f){this._user={id:i,email:u,name:f}},a._loadPlugin=function(i){var u=i.load(this);i.name&&(this._plugins["~"+i.name+"~"]=u)},a.getPlugin=function(i){return this._plugins["~"+i+"~"]},a._setDelivery=function(i){this._delivery=i(this)},a.startSession=function(){var i=new Vt;i.app.releaseStage=this._config.releaseStage,i.app.version=this._config.appVersion,i.app.type=this._config.appType,i._user=I({},this._user);var u=qr(this._cbs.s,i,"onSession",this._logger);return u?(this._logger.debug("Session not started due to onSession callback"),this):this._sessionDelegate.startSession(this,i)},a.addOnError=function(i,u){u===void 0&&(u=!1),this._cbs.e[u?"unshift":"push"](i)},a.removeOnError=function(i){this._cbs.e=d(this._cbs.e,function(u){return u!==i})},a._addOnSessionPayload=function(i){this._cbs.sp.push(i)},a.addOnSession=function(i){this._cbs.s.push(i)},a.removeOnSession=function(i){this._cbs.s=d(this._cbs.s,function(u){return u!==i})},a.addOnBreadcrumb=function(i,u){u===void 0&&(u=!1),this._cbs.b[u?"unshift":"push"](i)},a.removeOnBreadcrumb=function(i){this._cbs.b=d(this._cbs.b,function(u){return u!==i})},a.pauseSession=function(){return this._sessionDelegate.pauseSession(this)},a.resumeSession=function(){return this._sessionDelegate.resumeSession(this)},a.leaveBreadcrumb=function(i,u,f){if(i=typeof i=="string"?i:"",f=typeof f=="string"&&h(o,f)?f:"manual",u=typeof u=="object"&&u!==null?u:{},!!i){var l=new Mt(i,u,f),g=qr(this._cbs.b,l,"onBreadcrumb",this._logger);if(g){this._logger.debug("Breadcrumb not attached due to onBreadcrumb callback");return}this._breadcrumbs.push(l),this._breadcrumbs.length>this._config.maxBreadcrumbs&&(this._breadcrumbs=this._breadcrumbs.slice(this._breadcrumbs.length-this._config.maxBreadcrumbs))}},a._isBreadcrumbTypeEnabled=function(i){var u=this._config.enabledBreadcrumbTypes;return u===null||h(u,i)},a.notify=function(i,u,f){f===void 0&&(f=ae);var l=Bt.create(i,!0,void 0,"notify()",this._depth+1,this._logger);this._notify(l,u,f)},a._notify=function(i,u,f){var l=this;if(f===void 0&&(f=ae),i.app=I({},i.app,{releaseStage:this._config.releaseStage,version:this._config.appVersion,type:this._config.appType}),i.context=i.context||this._context,i._metadata=I({},i._metadata,this._metadata),i._user=I({},i._user,this._user),i.breadcrumbs=this._breadcrumbs.slice(),i.setGroupingDiscriminator(this._groupingDiscriminator),Ut(i._features,this._features,i._featuresIndex),this._config.enabledReleaseStages!==null&&!h(this._config.enabledReleaseStages,this._config.releaseStage))return this._logger.warn("Event not sent due to releaseStage/enabledReleaseStages configuration"),f(null,i);var g=i.severity,p=function(y){l._logger.error("Error occurred in onError callback, continuing anyway\u2026"),l._logger.error(y)},m=[].concat(this._cbs.e).concat(u);Na(m,i,p,function(y,_){if(y&&p(y),!_)return l._logger.debug("Event not sent due to onError callback"),f(null,i);l._isBreadcrumbTypeEnabled("error")&&r.prototype.leaveBreadcrumb.call(l,i.errors[0].errorClass,{errorClass:i.errors[0].errorClass,errorMessage:i.errors[0].errorMessage,severity:i.severity},"error"),g!==i.severity&&(i._handledState.severityReason={type:"userCallbackSetSeverity"}),i.unhandled!==i._handledState.unhandled&&(i._handledState.severityReason.unhandledOverrid
9den=!0,i._handledState.unhandled=i.unhandled),l._session&&(l._session._track(i),i._session=l._session),l._delivery.sendEvent({apiKey:i.apiKey||l._config.apiKey,notifier:l._notifier,events:[i]},function(w){return f(w,i)})})},r})(),Za=function(r,a){var s=new Error(`Invalid configuration
10`+$(T(r),function(i){return"  - "+i+" "+r[i]+", got "+ei(a[i])}).join(`
11
12`));return s},ei=function(r){switch(typeof r){case"string":case"number":case"object":return JSON.stringify(r);default:return String(r)}},Ht=Qa,Se={},Hr=["events.[].metaData","events.[].breadcrumbs.[].metaData","events.[].request","events.[].response"];Se.event=function(r,a){var s=it(r,null,null,{redactedPaths:Hr,redactedKeys:a});return s.length>1e6&&(r.events[0]._metadata={notifier:`WARNING!
13Serialized payload was `+s.length/1e6+`MB (limit = 1MB)
14metadata was removed`},s=it(r,null,null,{redactedPaths:Hr,redactedKeys:a})),s},Se.session=function(r,a){var s=it(r,null,null);return s};var Gt={};Gt=function(r,a){return a===void 0&&(a=window),{sendEvent:function(s,i){if(i===void 0&&(i=function(){}),r._config.endpoints.notify===null){var u=new Error("Event not sent due to incomplete endpoint configuration");return i(u)}var f=Gr(r._config,"notify","4",a),l=Se.event(s,r._config.redactedKeys),g=new a.XDomainRequest;g.onload=function(){i(null)},g.onerror=function(){var p=new Error("Event failed to send");r._logger.error("Event failed to send\u2026",p),l.length>1e6&&r._logger.warn("Event oversized ("+(l.length/1e6).toFixed(2)+" MB)"),i(p)},g.open("POST",f),setTimeout(function(){try{g.send(l)}catch(p){r._logger.error(p),i(p)}},0)},sendSession:function(s,i){if(i===void 0&&(i=function(){}),r._config.endpoints.sessions===null){var u=new Error("Session not sent due to incomplete endpoint configuration");return i(u)}var f=Gr(r._config,"sessions","1",a),l=new a.XDomainRequest;l.onload=function(){i(null)},l.open("POST",f),setTimeout(function(){try{l.send(Se.session(s,r._config.redactedKeys))}catch(g){r._logger.error(g),i(g)}},0)}}};var Gr=function(r,a,s,i){var u=JSON.parse(JSON.stringify(new Date)),f=ti(r.endpoints[a],i.location.protocol);return f+"?apiKey="+encodeURIComponent(r.apiKey)+"&payloadVersion="+s+"&sentAt="+encodeURIComponent(u)},ti=Gt._matchPageProtocol=function(r,a){return a==="http:"?r.replace(/^https:/,"http:"):r};function Kr(r,a){if(r.isSecureContext&&r.crypto&&r.crypto.subtle&&r.crypto.subtle.digest&&typeof TextEncoder=="function"){var s=new TextEncoder().encode(a);return r.crypto.subtle.digest("SHA-1",s).then(function(i){var u=Array.from(new Uint8Array(i)),f=u.map(function(l){return l.toString(16).padStart(2,"0")}).join("");return"sha1 "+f})}return Promise.resolve()}var ri=function(r,a){return a===void 0&&(a=window),{sendEvent:function(s,i){i===void 0&&(i=function(){});try{var u=r._config.endpoints.notify;if(u===null){var f=new Error("Event not sent due to incomplete endpoint configuration");return i(f)}var l=new a.XMLHttpRequest,g=Se.event(s,r._config.redactedKeys);l.onreadystatechange=function(){if(l.readyState===a.XMLHttpRequest.DONE){var p=l.status;if(p===0||p>=400){var m=new Error("Request failed with status "+p);r._logger.error("Event failed to send\u2026",m),g.length>1e6&&r._logger.warn("Event oversized ("+(g.length/1e6).toFixed(2)+" MB)"),i(m)}else i(null)}},l.open("POST",u),l.setRequestHeader("Content-Type","application/json"),l.setRequestHeader("Bugsnag-Api-Key",s.apiKey||r._config.apiKey),l.setRequestHeader("Bugsnag-Payload-Version","4"),l.setRequestHeader("Bugsnag-Sent-At",new Date().toISOString()),r._config.sendPayloadChecksums&&typeof Promise<"u"&&Promise.toString().indexOf("[native code]")!==-1?Kr(a,g).then(function(p){p&&l.setRequestHeader("Bugsnag-Integrity",p),l.send(g)}).catch(function(p){r._logger.error(p),l.send(g)}):l.send(g)}catch(p){r._logger.error(p)}},sendSession:function(s,i){i===void 0&&(i=function(){});try{var u=r._config.endpoints.sessions;if(u===null){var f=new Error("Session not sent due to incomplete endpoint configuration");return i(f)}var l=new a.XMLHttpRequest,g=Se.session(s,r._config.redactedKeys);l.onreadystatechange=function(){if(l.readyState===a.XMLHttpRequest.DONE){var p=l.status;if(p===0||p>=400){var m=new Error("Request failed with status "+p);r._logger.error("Session failed to send\u2026",m),i(m)}else i(null)}}
14,l.open("POST",u),l.setRequestHeader("Content-Type","application/json"),l.setRequestHeader("Bugsnag-Api-Key",r._config.apiKey),l.setRequestHeader("Bugsnag-Payload-Version","1"),l.setRequestHeader("Bugsnag-Sent-At",new Date().toISOString()),r._config.sendPayloadChecksums&&typeof Promise<"u"&&Promise.toString().indexOf("[native code]")!==-1?Kr(a,g).then(function(p){p&&l.setRequestHeader("Bugsnag-Integrity",p),l.send(g)}).catch(function(p){r._logger.error(p),l.send(g)}):l.send(g)}catch(p){r._logger.error(p)}}}},Xr=new Date,ni=function(){Xr=new Date},ai={name:"appDuration",load:function(r){return r.addOnError(function(a){var s=new Date;a.app.duration=s-Xr},!0),{reset:ni}}},ii=function(r){return r===void 0&&(r=window),{load:function(a){a.addOnError(function(s){s.context===void 0&&(s.context=r.location.pathname)},!0)}}};function si(r){return typeof r=="string"&&/^c[a-z0-9]{20,32}$/.test(r)}var oi=si;function ui(r,a){var s="000000000"+r;return s.substr(s.length-a)}var Kt=ui;function ci(r){var a=4,s=36,i=Math.pow(s,a),u=0;function f(){return Kt((Math.random()*i<<0).toString(s),a)}function l(){return u=u<i?u:0,u++,u-1}function g(){var p="c",m=new Date().getTime().toString(s),y=Kt(l().toString(s),a),_=r(),w=f()+f();return p+m+y+_+w}return g.fingerprint=r,g.isCuid=oi,g}var li=ci,zr=typeof window=="object"?window:self,Jr=0;for(var di in zr)Object.hasOwnProperty.call(zr,di)&&Jr++;var fi=navigator.mimeTypes?navigator.mimeTypes.length:0,pi=Kt((fi+navigator.userAgent.length).toString(36)+Jr.toString(36),4);function hi(){return pi}var gi=hi,mi=li(gi),Wr=mi,Yr="bugsnag-anonymous-id",bi=function(r){try{var a=r.localStorage,s=a.getItem(Yr);return s&&Wr.isCuid(s)||(s=Wr(),a.setItem(Yr,s)),s}catch{}},yi=function(r,a){return r===void 0&&(r=navigator),a===void 0&&(a=window),{load:function(s){var i={locale:r.browserLanguage||r.systemLanguage||r.userLanguage||r.language,userAgent:r.userAgent};a&&a.screen&&a.screen.orientation&&a.screen.orientation.type?i.orientation=a.screen.orientation.type:a&&a.document&&(i.orientation=a.document.documentElement.clientWidth>a.document.documentElement.clientHeight?"landscape":"portrait"),s._config.generateAnonymousId&&(i.id=bi(a)),s.addOnSession(function(u){u.device=I({},u.device,i),s._config.collectUserIp||Qr(u)}),s.addOnError(function(u){u.device=I({},u.device,i,{time:new Date}),s._config.collectUserIp||Qr(u)},!0)},configSchema:{generateAnonymousId:{validate:function(s){return s===!0||s===!1},defaultValue:function(){return!0},message:"should be true|false"}}}},Qr=function(r){var a=r.getUser();(!a||!a.id)&&r.setUser(r.device.id)},vi=function(r){return r===void 0&&(r=window),{load:function(a){a.addOnError(function(s){s.request&&s.request.url||(s.request=I({},s.request,{url:r.location.href}))},!0)}}},_i={load:function(r){r._sessionDelegate=Si}},Si={startSession:function(r,a){var s=r;return s._session=a,s._pausedSession=null,s._config.enabledReleaseStages!==null&&!h(s._config.enabledReleaseStages,s._config.releaseStage)?(s._logger.warn("Session not sent due to releaseStage/enabledReleaseStages configuration"),s):(s._delivery.sendSession({notifier:s._notifier,device:a.device,app:a.app,sessions:[{id:a.id,startedAt:a.startedAt,user:a._user}]}),s)},resumeSession:function(r){return r._session?r:r._pausedSession?(r._session=r._pausedSession,r._pausedSession=null,r):r.startSession()},pauseSession:function(r){r._pausedSession=r._session,r._session=null}},Ei={load:function(r){r._config.collectUserIp||r.addOnError(function(a){a._user&&typeof a._user.id>"u"&&delete a._user.id,a._user=I({id:"[REDACTED]"},a._user),a.request=I({clientIp:"[REDACTED]"},a.request)})},configSchema:{collectUserIp:{defaultValue:function(){return!0},message:"should be true|false",validate:function(r){return r===!0||r===!1}}}},Zr={};Zr.load=function(r){var a=/^(local-)?dev(elopment)?$/.test(r._config.releaseStage);a||!r._isBreadcrumbTypeEnabled("log")||$(Ti,function(s){var i=console[s];console[s]=function(){for(var u=arguments.length,f=new Array(u),l=0;l<u;l++)f[l]=arguments[l];r.leaveBreadcrumb("Console output",c(f,function(g,p,m){var y="[Unknown value]";
14try{y=String(p)}catch{}if(y==="[object Object]")try{y=JSON.stringify(p)}catch{}return g["["+m+"]"]=y,g},{severity:s.indexOf("group")===0?"log":s}),"log"),i.apply(console,f)},console[s]._restore=function(){console[s]=i}})};var Ti=d(["log","debug","info","warn","error"],function(r){return typeof console<"u"&&typeof console[r]=="function"}),en=200,tn=5e5,wi=function(r,a){return r===void 0&&(r=document),a===void 0&&(a=window),{load:function(s){if(!s._config.trackInlineScripts)return;var i=a.location.href,u="",f=!!r.attachEvent,l=f?r.readyState==="complete":r.readyState!=="loading",g=function(){return r.documentElement.outerHTML};u=g();var p=r.onreadystatechange;r.onreadystatechange=function(){r.readyState==="interactive"&&(u=g(),l=!0);try{p.apply(this,arguments)}catch{}};var m=null,y=function(A){m=A},_=function(){var A=r.currentScript||m;if(!A&&!l){var x=r.scripts||r.getElementsByTagName("script");A=x[x.length-1]}return A},w=function(A){(!l||!u)&&(u=g());var x=["<!-- DOC START -->"].concat(u.split(`
15`)),F=A-1,D=Math.max(F-3,0),X=Math.min(F+3,x.length);return c(x.slice(D,X),function(q,le,Pe){return q[D+1+Pe]=le.length<=en?le:le.substr(0,en),q},{})};s.addOnError(function(A){A.errors[0].stacktrace=d(A.errors[0].stacktrace,function(q){return!/__trace__$/.test(q.method)});var x=A.errors[0].stacktrace[0],F=function(q){return q.replace(/#.*$/,"").replace(/\?.*$/,"")};if(!(x&&x.file&&F(x.file)!==F(i))){var D=_();if(D){var X=D.innerHTML;A.addMetadata("script","content",X.length<=tn?X:X.substr(0,tn)),x&&x.lineNumber&&(x.code=w(x.lineNumber))}}},!0);var E=$(["setTimeout","setInterval","setImmediate","requestAnimationFrame"],function(A){return Xt(a,A,function(x){return N(x,function(F){return{get:function(){return F[0]},replace:function(D){F[0]=D}}})})}),C=E[0];$(["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload","MediaSource","MediaRecorder","MediaStream","ServiceWorker","ServiceWorkerContainer","ServiceWorkerRegistration","BroadcastChannel","RTCPeerConnection","RTCDataChannel","AbortSignal","MediaQueryList","ShadowRoot","FontFaceSet","Animation","PermissionStatus","PaymentRequest","VideoTrackList"],function(A){!a[A]||!a[A].prototype||!Object.prototype.hasOwnProperty.call(a[A].prototype,"addEventListener")||(Xt(a[A].prototype,"addEventListener",function(x){return N(x,rn)}),Xt(a[A].prototype,"removeEventListener",function(x){return N(x,rn,!0)}))});function N(A,x,F){return F===void 0&&(F=!1),function(){var D=[].slice.call(arguments);try{var X=x(D),q=X.get();if(F&&A.apply(this,D),typeof q!="function")return A.apply(this,D);if(q.__trace__)X.replace(q.__trace__);else{var le=_();q.__trace__=function(){y(le),C(function(){y(null)},0);var zi=q.apply(this,arguments);return y(null),zi},q.__trace__.__trace__=q.__trace__,X.replace(q.__trace__)}}catch{}if(A.apply)return A.apply(this,D);switch(D.length){case 1:return A(D[0]);case 2:return A(D[0],D[1]);default:return A()}}}},configSchema:{trackInlineScripts:{validate:function(s){return s===!0||s===!1},defaultValue:function(){return!0},message:"should be true|false"}}}};function Xt(r,a,s){var i=r[a];if(!i)return i;var u=s(i);return r[a]=u,i}function rn(r){var a=!!r[1]&&typeof r[1].handleEvent=="function";return{get:function(){return a?r[1].handleEvent:r[1]},replace:function(s){a?r[1].handleEvent=s:r[1]=s}}}var Ai=function(r){return r===void 0&&(r=window),{load:function(a){"addEventListener"in r&&a._isBreadcrumbTypeEnabled("user")&&r.addEventListener("click",function(s){var i,u;try{i=Ri(s.target),u=nn(s.target,r)}catch{i="[hidden]",u="[hidden]",a._logger.error("Cross domain error when tracking click event. See docs: https://tinyurl.com/yy3rn63z")}a.leaveBreadcrumb("UI click",{targetText:i,targetSelector:u},"user")},!0)}}},Ci=/^\s*([^\s][\s\S]{0,139}[^\s])?\s*/;function Ri(r){var a=r.textContent||r.innerText||"";return!a&&(r.type==="submit"||r.type==="button")&&(a=r.value),a=a.replace(Ci,"$1"),a.length>140?a.slice(0,135)+"(...)":a}function nn(r,a){var s=[r.tagName];if(r.id&&s.push("#"+r.id),r.className&&r.className.length&&s.push("."+r.className.split(" ").join(".")),!a.document.querySelectorAll||!Array.prototype.indexOf)return s.join("");try{if(a.document.querySelectorAll(s.join("")).length===1)return s.join("")}catch{return s.join("")}if(r.parentNode.childNodes.length>1){var i=Array.prototype.indexOf.call(r.parentNode.childNodes,r)+1;s.push(":nth-child("+i+")")}return a.document.querySelectorAll(s.join("")).length===1?s.join(""):r.parentNode?nn(r.parentNode,a)+" > "+s.join(""):s.join("")}var an={};an=function(r){r===void 0&&(r=window);var a={load:function(s){if("addEventListener"in r&&s._isBreadcrumbTypeEnabled("navigation")){var i=function(u){return function(){return s.leaveBreadcrumb(u,{},"navigation")}};r.addEventListener("pagehide",i("Page hidden"),!0),r.addEventListener("pageshow",i("Page shown"),!0),r.addEventListener("load",i("Page loaded"),!0),r.document.addEventListener("DOMContentLoaded",i("DOMContentLoaded"),!0),r.addEventListener("load",function(){return r.addEventListener("popstate",i("Navigated back"),!0)}),r.addEventListener("hashchange",function(u){var f=u.oldURL?{from:ct(u.oldURL,r),to:ct(u.newURL,r),state:on(r)}:{to:ct(r.location.href,r)};s.leaveBreadcrumb("Hash changed",f,"navigation")},!0),r.history.pushState&&sn(s,r.history,"pushState",r,!0),r.history.replaceState&&sn(s,r.history,"replaceState",r)}}};return a};var ct=function(r,a){var s=a.document.createElement("A");return s.href=r,""+s.pathname+s.search+s.hash},xi=function(r,a,s,i){var u=ct(r.location.href,r);return{title:s,state:a,prevState:on(r),to:i||u,from:u}},sn=function(r,a,s,i,u){u===void 0&&(u=!1);var f=a[s];a[s]=function(l,g,p){r.leaveBreadcrumb("History "+s,xi(i,l,g,p),"navigation"),u&&typeof r.resetEventCount=="function"&&r.resetEventCount(),f.apply(a,[l,g].concat(p!==void 0?p:[]))}},on=function(r){try{return r.history.state}catch{}},un=function(r){if(!r)return{};var a={};if(typeof r.entries=="function")for(var s=r.entries(),i=s.next();!i.done;){var u=i.value,f=u[0],l=u[1];a[f]=l,i=s.next()}else r.forEach&&r.forEach(function(g,p){a[p]=g});return a},ki=(function(){function r(){this.callbacks=[]}var a=r.prototype;return a.onStart=function(i){if(typeof i!="function")throw new Error("RequestTracker onStart callback must be a function");this.callbacks.push(i)},a.start=function(i){var u=this.callbacks.map(function(f){try{return f(i)}catch(l){return console.error("RequestTracker callback error:",l),null}}).filter(function(f){return f&&typeof f=="object"});return{onRequestEnd:function(f){u.forEach(function(l){if(typeof l.onRequestEnd=="function")try{l.onRequestEnd(f)}catch(g){console.error("RequestTracker onRequestEnd callback error:",g)}})},extraRequestHeaders:u.map(function(f){return f.extraRequestHeaders}).filter(function(f){return f&&typeof f=="object"}).reduce(function(f,l){return Object.assign(f,l)},{})}},a._reset=function(){this.callbacks=[]},r})(),zt=ki;function Pi(r,a){if(a===void 0&&(a={}),!(!("fetch"in r)||r.fetch.polyfill)){if(!r.__bugsnag_fetch_tracker__){var s=new zt,i=r.fetch;r.fetch=function(f,l){l===void 0&&(l={});var g=null,p="GET";f&&typeof f=="object"?(g=f.url,l&&"method"in l?p=l.method:f&&"method"in f&&(p=f.method)):(g=f,l&&"method"in l&&(p=l.method)),p===void 0&&(p="GET");var m={};l&&l.headers&&(l.headers instanceof Headers?m=un(l.headers):typeof l.headers=="object"&&(m=l.headers));var y=Date.now(),_={url:String(g),method:String(p),startTime:y,type:"fetch",input:f,headers:m,body:l?l.body:void 0},w=s.start(_),E=w.onRequestEnd;return i.call.apply(i,[this].concat(Array.prototype.slice.call(arguments))).then(function(C){return E({endTime:Date.now(),status:C.status,state:"success",headers:un(C.headers)}),C},function(C){throw E({endTime:Date.now(),state:"error",error:C}),C})},r.__bugsnag_fetch_tracker__=s}return r.__bugsnag_fetch_tracker__}}var cn=Pi;function ln(r,a){if(a===void 0&&(a=[]),!r||typeof r!="string")return!0;var s=r.replace(/\?.*$/,"");return h(a,s)}function Ii(r,a){a===void 0&&(a=[]);var s=[r._config.endpoints.notify,r._config.endpoints.sessions].concat(a).filter(
15Boolean);return function(i){return ln(i,s)}}function Li(r){return r&&Date.now()-r}var dn={shouldIgnoreUrl:ln,createUrlFilter:Ii,getDuration:Li},Ni=function(r){if(!r)return{};var a=r.trim().split(/[\r\n]+/),s={};return a.forEach(function(i){var u=i.split(": "),f=u.shift(),l=u.join(": ");s[f]=l}),s},fn=function(a){var s=a.response,i=a.responseType;if(s!=null)switch(i){case"arraybuffer":case"blob":return"[Binary Data]";case"document":return"[Document]";case"json":try{return JSON.stringify(s)}catch{return"[Unserializable JSON]"}default:return String(s)}};function Oi(r,a){if(a===void 0&&(a={}),!(!("addEventListener"in r.XMLHttpRequest.prototype)||!("WeakMap"in r))){if(!r.__bugsnag_xhr_tracker__){var s=new zt,i=new WeakMap,u=new WeakMap,f=r.XMLHttpRequest.prototype.open,l=r.XMLHttpRequest.prototype.send,g=r.XMLHttpRequest.prototype.setRequestHeader;r.XMLHttpRequest.prototype.open=function(m,y){this&&i.set(this,{method:String(m),url:String(y)}),f.apply(this,arguments)},r.XMLHttpRequest.prototype.setRequestHeader=function(m,y){if(this){var _=i.get(this);_&&(_.headers=_.headers||{},_.headers[String(m)]=(_.headers[String(m)]||"")+String(y))}g.apply(this,arguments)},r.XMLHttpRequest.prototype.send=function(m){var y=this,_=i.get(this);if(_){var w=u.get(this);w&&(this.removeEventListener("load",w.load),this.removeEventListener("error",w.error));var E=Date.now(),C={url:_.url,method:_.method,startTime:E,type:"xmlhttprequest",body:m,headers:_.headers},N=s.start(C),A=N.onRequestEnd,x=function(){return Ni(y.getAllResponseHeaders())},F=function(){A({endTime:Date.now(),status:y.status,state:"success",headers:x(),body:fn(y)})},D=function(){A({endTime:Date.now(),state:"error",headers:x(),body:fn(y)})};this.addEventListener("load",F),this.addEventListener("error",D),this&&u.set(this,{load:F,error:D})}l.apply(this,arguments)},r.__bugsnag_xhr_tracker__=s}return r.__bugsnag_xhr_tracker__}}var pn=Oi,hn=dn.createUrlFilter,gn=dn.getDuration;function Di(r,a){return r===void 0&&(r=[]),a===void 0&&(a=window),{name:"requestTracker",load:function(s){try{var i=cn(a),u=pn(a),f=hn(s,r);return{fetchTracker:i,xhrTracker:u,urlFilter:f,getDuration:gn}}catch(l){throw s._logger.error("Failed to load request tracker:",l),new Error("Request tracking is not available: "+l.message)}}}}var Mi={RequestTracker:zt,createFetchTracker:cn,createXhrTracker:pn,createUrlFilter:hn,getDuration:gn,createRequestTrackerPlugin:Di},Jt="request",Fi=function(r,a){r===void 0&&(r=[]),a===void 0&&(a=window);var s=[],i={load:function(u){if(!u._isBreadcrumbTypeEnabled("request"))return;var f=u.getPlugin("requestTracker");if(!f)try{var l=Mi.createRequestTrackerPlugin,g=l(r,a);u._loadPlugin(g),f=u.getPlugin("requestTracker")}catch(m){u._logger.warn("Failed to auto-load request tracker, falling back to direct monkey-patching:",m.message)}if(f)return p(f);function p(m){var y=m.fetchTracker,_=m.xhrTracker,w=m.urlFilter,E=m.getDuration,C=function(N){if(!w(N.url))return{onRequestEnd:function(A){var x=E(N.startTime),F={method:N.method,status:A.status,url:N.url,duration:x},D=N.type==="fetch"?"fetch()":"XMLHttpRequest";A.state==="error"?u.leaveBreadcrumb(D+" error",{method:N.method,url:N.url,duration:x},Jt):A.status>=400?u.leaveBreadcrumb(D+" failed",F,Jt):u.leaveBreadcrumb(D+" succeeded",F,Jt)}}};y&&(y.onStart(C),s.push(y._restore)),_&&(_.onStart(C),s.push(_._restore))}}};return i},ji={load:function(r){var a=0;r.addOnError(function(s){if(a>=r._config.maxEvents)return r._logger.warn("Cancelling event send due to maxEvents per session limit of "+r._config.maxEvents+" being reached"),!1;a++}),r.resetEventCount=function(){a=0}},configSchema:{maxEvents:{defaultValue:function(){return 10},message:"should be a positive integer \u2264100",validate:function(r){return k(1,100)(r)}}}},Wt={};Wt={load:function(r){r.addOnError(function(a){var s=c(a.errors,function(i,u){return i.concat(u.stacktrace)},[]);$(s,function(i){i.file=$i(i.file)})})}};var $i=Wt._strip=function(r){return typeof r=="string"?r.replace(/\?.*$/,"").replace(/#.*$/,""):r},Bi=function(r,a){return r===void 0&&(r=window),a===void 0&&(a="window onerror"),{load:function(s){if(!s._config.autoDetectErrors||!s._config.enabledErrorTypes.unhandledExceptions)return;function i(f,l,g,p,m){if(g===0&&/Script error\.?/.test(f))s._logger.warn("Ignoring cross-domain or eval script error. See docs: https://tinyurl.com/yy3rn63z");else{var y={severity:"error",unhandled:!0,severityReason:{type:"unhandledException"}},_;if(m)_=s.Event.create(m,!0,y,a,1),mn(_.errors[0].stacktrace,l,g,p);else if(typeof f=="object"&&f!==null&&(!l||typeof l!="string")&&!g&&!p&&!m){var w=f.type?"Event: "+f.type:"Error",E=f.message||f.detail||"";_=s.Event.create({name:w,message:E},!0,y,a,1),_.originalError=f,_.addMetadata(a,{event:f,extraParameters:l})}else _=s.Event.create(f,!0,y,a,1),mn(_.errors[0].stacktrace,l,g,p);s._notify(_)}try{u.apply(this,arguments)}catch{}}var u=r.onerror;r.onerror=i}}},mn=function(r,a,s,i){r[0]||r.push({});var u=r[0];
15!u.file&&typeof a=="string"&&(u.file=a),!u.lineNumber&&Yt(s)&&(u.lineNumber=s),u.columnNumber||(Yt(i)?u.columnNumber=i:window.event&&Yt(window.event.errorCharacter)&&(u.columnNumber=window.event.errorCharacter))},Yt=function(r){return typeof r=="number"&&String.call(r)!=="NaN"},qi,Vi=function(r){r===void 0&&(r=window);var a={load:function(s){if(!(!s._config.autoDetectErrors||!s._config.enabledErrorTypes.unhandledRejections)){var i=function(u){var f=u.reason,l=!1;try{u.detail&&u.detail.reason&&(f=u.detail.reason,l=!0)}catch{}var g=!s._config.reportUnhandledPromiseRejectionsAsHandled,p=s.Event.create(f,!1,{severity:"error",unhandled:g,severityReason:{type:"unhandledPromiseRejection"}},"unhandledrejection handler",1,s._logger);l&&$(p.errors[0].stacktrace,Ui(f)),s._notify(p,function(m){if(ut(m.originalError)&&!m.originalError.stack){var y;m.addMetadata("unhandledRejection handler",(y={},y[Object.prototype.toString.call(m.originalError)]={name:m.originalError.name,message:m.originalError.message,code:m.originalError.code},y))}})};"addEventListener"in r?r.addEventListener("unhandledrejection",i):r.onunhandledrejection=function(u,f){i({detail:{reason:u,promise:f}})},qi=i}}};return a},Ui=function(r){return function(a){a.file!==r.toString()&&a.method&&(a.method=a.method.replace(/^\s+/,""))}},ce={},Hi="Bugsnag JavaScript",Gi="8.9.0",Ki="https://github.com/bugsnag/bugsnag-js",Xi=I({},P.schema,oe),H={_client:null,createClient:function(r){typeof r=="string"&&(r={apiKey:r}),r||(r={});var a=[ai,yi(),ii(),vi(),ji,_i,Ei,Wt,Bi(),Vi(),an(),Ai(),Fi(),Zr,wi()],s=new Ht(r,Xi,a,{name:Hi,version:Gi,url:Ki});return s._setDelivery(window.XDomainRequest?Gt:ri),s._logger.debug("Loaded!"),s.leaveBreadcrumb("Bugsnag loaded",{},"state"),s._config.autoTrackSessions?s.startSession():s},start:function(r){return H._client?(H._client._logger.warn("Bugsnag.start() was called more than once. Ignoring."),H._client):(H._client=H.createClient(r),H._client)},isStarted:function(){return H._client!=null}};return $(["resetEventCount"].concat(T(Ht.prototype)),function(r){/^_/.test(r)||(H[r]=function(){if(!H._client)return console.log("Bugsnag."+r+"() was called before Bugsnag.start()");H._client._depth+=1;var a=H._client[r].apply(H._client,arguments);return H._client._depth-=1,a})}),ce=H,ce.Client=Ht,ce.Event=Bt,ce.Session=Vt,ce.Breadcrumb=Mt,ce.default=H,ce})});var Ln=yn((ro,In)=>{In.exports=Pn()});var de="a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]",fe={selector:"button[data-remote]:not([form]), button[data-confirm]:not([form])",exclude:"form button"},Oe="select[data-remote], input[data-remote], textarea[data-remote]",W="form:not([data-turbo=true])",Ie="form:not([data-turbo=true]) input[type=submit], form:not([data-turbo=true]) input[type=image], form:not([data-turbo=true]) button[type=submit], form:not([data-turbo=true]) button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])",er="input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled",pt="input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled",rs="input[name][type=file]:not([disabled])",Ae="a[data-disable-with], a[data-disable]",Me="button[data-remote][data-disable-with], button[data-remote][data-disable]",Sn=null,tr=()=>{let t=document.querySelector("meta[name=csp-nonce]");return Sn=t&&t.content},En=()=>Sn||tr(),Qt=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector,j=function(t,e){return e.exclude?Qt.call(t,e.selector)&&!Qt.call(t,e.exclude):Qt.call(t,e)},De="_ujsData",Y=(t,e)=>t[De]?t[De][e]:void 0,V=function(t,e,n){return t[De]||(t[De]={}),t[De][e]=n},dt=t=>Array.prototype.slice.call(document.querySelectorAll(t)),ht=function(t){var e=!1;do{if(t.isContentEditable){e=!0;break}t=t.parentElement}while(t);return e},gt=()=>{let t=document.querySelector("meta[name=csrf-token]");return t&&t.content},rr=()=>{let t=document.querySelector("meta[name=csrf-param]");return t&&t.content},nr=t=>{let e=gt();if(e)return t.setRequestHeader("X-CSRF-Token",e)},Tn=()=>{let t=gt(),e=rr();if(t&&e)return dt('form input[name="'+e+'"]').forEach((n=>n.value=t))},vn={"*":"*/*",text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript",script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},wn=t=>{t=ns(t);var e=as(t,(function(){let n=is(e.response!=null?e.response:e.responseText,e.getResponseHeader("Content-Type"));return Math.floor(e.status/100)===2?typeof t.success=="function"&&t.success(n,e.statusText,e):typeof t.error=="function"&&t.error(n,e.statusText,e),typeof t.complete=="function"?t.complete(e,e.statusText):void 0}));if(t.beforeSend&&!t.beforeSend(e,t))return!1;if(e.readyState===XMLHttpRequest.OPENED)return e.send(t.data)},ns=function(t){return t.url=t.url||location.href,t.type=t.type.toUpperCase(),t.type==="GET"&&t.data&&(t.url.indexOf("?")<0?t.url+="?"+t.data:t.url+="&"+t.data),t.dataType in vn||(t.dataType="*"),t.accept=vn[t.dataType],t.dataType!=="*"&&(t.accept+=", */*; q=0.01"),t},as=function(t,e){let n=new XMLHttpRequest;return n.open(t.type,t.url,!0),n.setRequestHeader("Accept",t.accept),typeof t.data=="str
15ing"&&n.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),t.crossDomain||(n.setRequestHeader("X-Requested-With","XMLHttpRequest"),nr(n)),n.withCredentials=!!t.withCredentials,n.onreadystatechange=function(){if(n.readyState===XMLHttpRequest.DONE)return e(n)},n},is=function(t,e){if(typeof t=="string"&&typeof e=="string"){if(e.match(/\bjson\b/))try{t=JSON.parse(t)}catch{}else if(e.match(/\b(?:java|ecma)script\b/)){let n=document.createElement("script");n.setAttribute("nonce",En()),n.text=t,document.head.appendChild(n).parentNode.removeChild(n)}else if(e.match(/\b(xml|html|svg)\b/)){let n=new DOMParser;e=e.replace(/;.+/,"");try{t=n.parseFromString(t,e)}catch{}}}return t},ss=t=>t.href,ar=function(t){let e=document.createElement("a");e.href=location.href;let n=document.createElement("a");try{return n.href=t,!((!n.protocol||n.protocol===":")&&!n.host||e.protocol+"//"+e.host==n.protocol+"//"+n.host)}catch{return!0}},_n,{CustomEvent:Ee}=window;typeof Ee!="function"&&(Ee=function(t,e){let n=document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n},Ee.prototype=window.Event.prototype,{preventDefault:_n}=Ee.prototype,Ee.prototype.preventDefault=function(){let t=_n.call(this);return this.cancelable&&!this.defaultPrevented&&Object.defineProperty(this,"defaultPrevented",{get(){return!0}}),t});var z=(t,e,n)=>{let o=new Ee(e,{bubbles:!0,cancelable:!0,detail:n});return t.dispatchEvent(o),!o.defaultPrevented},pe=t=>{z(t.target,"ujs:everythingStopped"),t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()},L=(t,e,n,o)=>t.addEventListener(n,(function(c){let{target:d}=c;for(;d instanceof Element&&!j(d,e);)d=d.parentNode;d instanceof Element&&o.call(d,c)===!1&&(c.preventDefault(),c.stopPropagation())})),ft=t=>Array.prototype.slice.call(t),Zt=(t,e)=>{let n=[t];j(t,"form")&&(n=ft(t.elements));let o=[];return n.forEach((function(c){!c.name||c.disabled||j(c,"fieldset[disabled] *")||(j(c,"select")?ft(c.options).forEach((function(d){d.selected&&o.push({name:c.name,value:d.value})})):(c.checked||["radio","checkbox","submit"].indexOf(c.type)===-1)&&o.push({name:c.name,value:c.value}))})),e&&o.push(e),o.map((function(c){return c.name?`${encodeURIComponent(c.name)}=${encodeURIComponent(c.value)}`:c})).join("&")},ir=(t,e)=>j(t,"form")?ft(t.elements).filter((n=>j(n,e))):ft(t.querySelectorAll(e)),os=t=>function(e){cs(this,t)||pe(e)},us=(t,e)=>window.confirm(t),cs=function(t,e){let n,o=t.getAttribute("data-confirm");if(!o)return!0;let c=!1;if(z(t,"confirm")){try{c=e.confirm(o,t)}catch{}n=z(t,"confirm:complete",[c])}return c&&n},Te=function(t){this.disabled&&pe(t)},ie=t=>{let e;if(t instanceof Event){if(hs(t))return;e=t.target}else e=t;if(!ht(e)){if(j(e,Ae))return ds(e);if(j(e,Me)||j(e,pt))return Cn(e);if(j(e,W))return ps(e)}},Le=t=>{let e=t instanceof Event?t.target:t;if(!ht(e)){if(j(e,Ae))return ls(e);if(j(e,Me)||j(e,er))return An(e);if(j(e,W))return fs(e)}},ls=function(t){if(Y(t,"ujs:disabled"))return;let e=t.getAttribute("data-disable-with");return e!=null&&(V(t,"ujs:enable-with",t.innerHTML),t.innerHTML=e),t.addEventListener("click",pe),V(t,"ujs:disabled",!0)},ds=function(t){let e=Y(t,"ujs:enable-with");return e!=null&&(t.innerHTML=e,V(t,"ujs:enable-with",null)),t.removeEventListener("click",pe),V(t,"ujs:disabled",null)},fs=t=>ir(t,er).forEach(An),An=function(t){if(Y(t,"ujs:disabled"))return;let e=t.getAttribute("data-disable-with");return e!=null&&(j(t,"button")?(V(t,"ujs:enable-with",t.innerHTML),t.innerHTML=e):(V(t,"ujs:enable-with",t.value),t.value=e)),t.disabled=!0,V(t,"ujs:disabled",!0)},ps=t=>ir(t,pt).forEach((e=>Cn(e))),Cn=function(t){let e=Y(t,"ujs:enable-with");return e!=null&&(j(t,"button")?t.innerHTML=e:t.value=e,V(t,"ujs:enable-with",null)),t.disabled=!1,V(t,"ujs:disabled",null)},hs=function(t){let e=t.detail?t.detail[0]:void 0;return e&&e.getResponseHeader("X-Xhr-Redirect")},gs=t=>function(e){let n=this,o=n.getAttribute("data-method");if(!o||ht(this))return;let c=t.href(n),d=gt(),h=rr(),b=document.createElement("form"),v=`<input name='_method' value='${o}' type='hidden' />`;h&&d&&!ar(c)&&(v+=`<input name='${h}' value='${d}' type='hidden' />`),v+='<input type="submit" />',b.method="post",b.action=c,b.target=n.target,b.innerHTML=v,b.style.display="none",document.body.appendChild(b),b.querySelector('[type="submit"]').click(),pe(e)},ms=function(t){let e=t.getAttribute("data-remote");return e!=null&&e!=="false"},bs=t=>function(e){let n,o,c,d=this;if(!ms(d))return!0;
15if(!z(d,"ajax:before")||ht(d))return z(d,"ajax:stopped"),!1;let h=d.getAttribute("data-with-credentials"),b=d.getAttribute("data-type")||"script";if(j(d,W)){let v=Y(d,"ujs:submit-button");o=Y(d,"ujs:submit-button-formmethod")||d.getAttribute("method")||"get",c=Y(d,"ujs:submit-button-formaction")||d.getAttribute("action")||location.href,o.toUpperCase()==="GET"&&(c=c.replace(/\?.*$/,"")),d.enctype==="multipart/form-data"?(n=new FormData(d),v!=null&&n.append(v.name,v.value)):n=Zt(d,v),V(d,"ujs:submit-button",null),V(d,"ujs:submit-button-formmethod",null),V(d,"ujs:submit-button-formaction",null)}else j(d,fe)||j(d,Oe)?(o=d.getAttribute("data-method"),c=d.getAttribute("data-url"),n=Zt(d,d.getAttribute("data-params"))):(o=d.getAttribute("data-method"),c=t.href(d),n=d.getAttribute("data-params"));wn({type:o||"GET",url:c,data:n,dataType:b,beforeSend(v,R){return z(d,"ajax:beforeSend",[v,R])?z(d,"ajax:send",[v]):(z(d,"ajax:stopped"),!1)},success(...v){return z(d,"ajax:success",v)},error(...v){return z(d,"ajax:error",v)},complete(...v){return z(d,"ajax:complete",v)},crossDomain:ar(c),withCredentials:h!=null&&h!=="false"}),pe(e)},Rn=function(t){let e=this,{form:n}=e;if(n)return e.name&&V(n,"ujs:submit-button",{name:e.name,value:e.value}),V(n,"ujs:formnovalidate-button",e.formNoValidate),V(n,"ujs:submit-button-formaction",e.getAttribute("formaction")),V(n,"ujs:submit-button-formmethod",e.getAttribute("formmethod"))},lt=function(t){let e=this,n=(e.getAttribute("data-method")||"GET").toUpperCase(),o=e.getAttribute("data-params"),d=(t.metaKey||t.ctrlKey)&&n==="GET"&&!o;(t.button!=null&&t.button!==0||d)&&t.stopImmediatePropagation()},J={$:dt,ajax:wn,buttonClickSelector:fe,buttonDisableSelector:Me,confirm:us,cspNonce:En,csrfToken:gt,csrfParam:rr,CSRFProtection:nr,delegate:L,disableElement:Le,enableElement:ie,fileInputSelector:rs,fire:z,formElements:ir,formEnableSelector:pt,formDisableSelector:er,formInputClickSelector:Ie,formSubmitButtonClick:Rn,formSubmitSelector:W,getData:Y,handleDisabledElement:Te,href:ss,inputChangeSelector:Oe,isCrossDomain:ar,linkClickSelector:de,linkDisableSelector:Ae,loadCSPNonce:tr,matches:j,preventInsignificantClick:lt,refreshCSRFTokens:Tn,serializeElement:Zt,setData:V,stopEverything:pe},we=os(J);J.handleConfirm=we;var xn=gs(J);J.handleMethod=xn;var Ne=bs(J);J.handleRemote=Ne;var ys=function(){if(window._rails_loaded)throw new Error("rails-ujs has already been loaded!");return window.addEventListener("pageshow",(function(){dt(pt).forEach((function(t){Y(t,"ujs:disabled")&&ie(t)})),dt(Ae).forEach((function(t){Y(t,"ujs:disabled")&&ie(t)}))}
15)),L(document,Ae,"ajax:complete",ie),L(document,Ae,"ajax:stopped",ie),L(document,Me,"ajax:complete",ie),L(document,Me,"ajax:stopped",ie),L(document,de,"click",lt),L(document,de,"click",Te),L(document,de,"click",we),L(document,de,"click",Le),L(document,de,"click",Ne),L(document,de,"click",xn),L(document,fe,"click",lt),L(document,fe,"click",Te),L(document,fe,"click",we),L(document,fe,"click",Le),L(document,fe,"click",Ne),L(document,Oe,"change",Te),L(document,Oe,"change",we),L(document,Oe,"change",Ne),L(document,W,"submit",Te),L(document,W,"submit",we),L(document,W,"submit",Ne),L(document,W,"submit",(t=>setTimeout((()=>Le(t)),13))),L(document,W,"ajax:send",Le),L(document,W,"ajax:complete",ie),L(document,Ie,"click",lt),L(document,Ie,"click",Te),L(document,Ie,"click",we),L(document,Ie,"click",Rn),document.addEventListener("DOMContentLoaded",Tn),document.addEventListener("DOMContentLoaded",tr),window._rails_loaded=!0};J.start=ys;if(typeof jQuery<"u"&&jQuery&&jQuery.ajax){if(jQuery.rails)throw new Error("If you load both jquery_ujs and rails-ujs, use rails-ujs only.");jQuery.rails=J,jQuery.ajaxPrefilter((function(t,e,n){if(!t.crossDomain)return nr(n)}))}var Dt=ts(Ln());var Nn={attributeStringValueLimit:1024,attributeArrayLengthLimit:1e3,attributeCountLimit:128};var ee=t=>t===!0||t===!1,B=t=>!!t&&typeof t=="object"&&!Array.isArray(t),K=t=>typeof t=="number"&&Number.isFinite(t)&&!Number.isNaN(t),he=t=>typeof t=="string",te=t=>he(t)&&t.length>0,or=t=>B(t)&&typeof t.debug=="function"&&typeof t.info=="function"&&typeof t.warn=="function"&&typeof t.error=="function",ur=t=>Array.isArray(t)&&t.every(te),cr=t=>Array.isArray(t)&&t.every(e=>te(e)||e instanceof RegExp);function lr(t){return B(t)&&K(t.value)&&K(t.time)}var dr=t=>B(t)&&typeof t.id=="string"&&typeof t.traceId=="string"&&typeof t.isValid=="function"&&typeof t.samplingRate=="number"&&typeof t.samplingProbability=="number",Fe=t=>B(t)&&typeof t.id=="string"&&typeof t.traceId=="string";function fr(t){return K(t)||t instanceof Date}function On(t){return B(t)&&typeof t.install=="function"&&typeof t.start=="function"}function pr(t){return Array.isArray(t)&&t.every(e=>On(e))}function mt(t){return Array.isArray(t)&&t.every(e=>typeof e=="function")}function vs(t,e){let n=t.length,o=t.slice(0,e),c=o.length;return`${o} *** ${n-c} CHARS TRUNCATED`}var bt=class{constructor(e){this.attributes=e}set(e,n){typeof e=="string"&&(typeof n=="string"||typeof n=="boolean"||K(n)||Array.isArray(n))&&this.attributes.set(e,n)}remove(e){this.attributes.delete(e)}toJson(){return Array.from(this.attributes).map(([e,n])=>hr(e,n))}toObject(){return Object.fromEntries(this.attributes)}},je=class extends bt{get droppedAttributesCount(){return this._droppedAttributesCount}constructor(e,n,o,c){super(e),this._droppedAttributesCount=0,this.spanAttributeLimits=n,this.spanName=o,this.logger=c}truncateAttribute(e,n){if(typeof n=="string"&&n.length>this.spanAttributeLimits.attributeStringValueLimit&&(this.attributes.set(e,vs(n,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(n)&&n.length>this.spanAttributeLimits.attributeArrayLengthLimit){let o=n.slice(0,this.spanAttributeLimits.attributeArrayLengthLimit);this.attributes.set(e,o),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"||K(e)||Array.isArray(e)}isValidAttributeName(e){return typeof e=="string"&&e.length>0}set(e,n){if(this.isValidAttributeName(e)){if(n==null){this.remove(e);return}this.isValidAttributeValue(n)&&this.attributes.set(e,n)}}setCustom(e,n){if(this.isValidAttributeName(e)){if(n==null){this.remove(e);return}if(this.isValidAttributeValue(n)){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,n)}}}
15toJson(){return Array.from(this.attributes).forEach(([e,n])=>{this.truncateAttribute(e,n)}),Array.from(this.attributes).map(([e,n])=>hr(e,n)).filter(e=>e!==void 0)}},$e=class extends bt{constructor(e,n,o,c,d){let h=new Map([["deployment.environment",e],["telemetry.sdk.name",c],["telemetry.sdk.version",d],["service.name",o]]);n.length>0&&h.set("service.version",n),super(h)}};function _s(t){switch(typeof t){case"number":return Number.isNaN(t)||!Number.isFinite(t)?void 0:Number.isInteger(t)?{intValue:`${t}`}:{doubleValue:t};case"boolean":return{boolValue:t};case"string":return{stringValue:t}}}function Ss(t){return t.map(e=>_s(e)).filter(e=>typeof e<"u")}function hr(t,e){switch(typeof e){case"number":return Number.isNaN(e)||!Number.isFinite(e)?void 0:t!=="bugsnag.sampling.p"&&Number.isInteger(e)?{key:t,value:{intValue:`${e}`}}:{key:t,value:{doubleValue:e}};case"boolean":return{key:t,value:{boolValue:e}};case"string":return{key:t,value:{stringValue:e}};case"object":if(Array.isArray(e)){let n=Ss(e);return{key:t,value:{arrayValue:n.length>0?{values:n}:{}}}}return;default:return}}function Be(t){return Math.round(t*1e6)}function gr(t){return Math.round(t/1e6)}var Ce={appVersion:{defaultValue:"",message:"should be a string",validate:te},endpoint:{defaultValue:"https://otlp.bugsnag.com/v1/traces",message:"should be a string",validate:te},apiKey:{defaultValue:"",message:"should be a 32 character hexadecimal string",validate:t=>he(t)&&/^[a-f0-9]{32}$/.test(t)},logger:{defaultValue:{debug(t){console.debug(t)},info(t){console.info(t)},warn(t){console.warn(t)},error(t){console.error(t)}},message:"should be a Logger object",validate:or},releaseStage:{defaultValue:"production",message:"should be a string",validate:te},enabledReleaseStages:{defaultValue:null,message:"should be an array of strings",validate:t=>t===null||ur(t)},plugins:{defaultValue:[],message:"should be an array of plugin objects",validate:pr},bugsnag:{defaultValue:void 0,message:"should be an instance of Bugsnag",validate:t=>B(t)&&typeof t.addOnError=="function"},samplingProbability:{defaultValue:void 0,message:"should be a number between 0 and 1",validate:t=>t===void 0||K(t)&&t>=0&&t<=1},onSpanStart:{defaultValue:void 0,message:"should be an array of functions",validate:mt},onSpanEnd:{defaultValue:void 0,message:"should be an array of functions",validate:mt},attributeStringValueLimit:{defaultValue:1024,message:`should be a number between 1 and ${1e4}`,validate:t=>K(t)&&t>0&&t<=1e4},attributeArrayLengthLimit:{defaultValue:1e3,message:`should be a number between 1 and ${1e4}`,validate:t=>K(t)&&t>0&&t<=1e4},attributeCountLimit:{defaultValue:128,message:`should be a number between 1 and ${1e3}`,validate:t=>K(t)&&t>0&&t<=1e3}};function mr(t,e,n=!1){if(typeof t=="string"?t={apiKey:t}:t==null?t={apiKey:e.apiKey.defaultValue}:B(t)&&t.apiKey===void 0&&(t.apiKey=e.apiKey.defaultValue),!B(t)||!he(t.apiKey)||t.apiKey.length===0)throw new Error("No Bugsnag API Key set");let o="",c={};for(let h of Object.keys(e))Object.prototype.hasOwnProperty.call(t,h)?e[h].validate(t[h])?c[h]=t[h]:(o+=`
16  - ${h} ${e[h].message}, got ${typeof t[h]}`,c[h]=e[h].defaultValue):c[h]=e[h].defaultValue;let d=n?5*1e3:30*1e3;return c.apiKey=t.apiKey,c.maximumBatchSize=t.maximumBatchSize||100,c.batchInactivityTimeoutMs=t.batchInactivityTimeoutMs||d,o.length>0&&c.logger.warn(`Invalid configuration${o}`),c}var qe=class{constructor(){this.events=[]}add(e,n){this.events.push({name:e,time:n})}toJson(e){return this.events.map(({name:n,time:o})=>({name:n,timeUnixNano:e.toUnixTimestampNanoseconds(o)}))}};function Ve(t){let e=0;for(let n=0;n<t.length/8;n++){let o=n*8,c=Number.parseInt(t.slice(o,o+8),16);e=(e^c)>>>0}return e}var As=3600*1e3;function br(t,e){return{name:t.name,kind:t.kind,spanId:t.id,traceId:t.traceId,parentSpanId:t.parentSpanId,...t.attributes.droppedAttributesCount>0?{droppedAttributesCount:t.attributes.droppedAttributesCount}:{},startTimeUnixNano:e.toUnixTimestampNanoseconds(t.startTime),endTimeUnixNano:e.toUnixTimestampNanoseconds(t.endTime),attributes:t.attributes.toJson(),events:t.events.toJson(e)}}function $n(t){return{get id(){return t.id},get traceId(){return t.traceId},get samplingRate(){return t.samplingRate},get samplingProbability(){return t.samplingProbability.raw},get name(){return t.name},isValid:()=>!1,end:()=>{},setAttribute:(e,n)=>{t.attributes.setCustom(e,n)}}}async function yr(t,e,n){if(!n||n.length===0)return!0;
16let o=$n(t),c=performance.now(),d=!0;for(let h of n)try{let b=h(o);if(typeof b.then=="function"&&(b=await b),b===!1){d=!1;break}}catch(b){e.error("Error in onSpanEnd callback: "+b)}if(d){let h=Be(performance.now()-c);o.setAttribute("bugsnag.span.callbacks_duration",h)}return d}var Ue=class{constructor(e,n,o,c,d,h,b,v){this.kind=3,this.events=new qe,this.id=e,this.traceId=n,this.parentSpanId=v,this.name=o,this.startTime=c,this.attributes=d,this.samplingRate=Ve(this.traceId),this.samplingProbability=b,this.clock=h}addEvent(e,n){this.events.add(e,n)}setAttribute(e,n){this.attributes.set(e,n)}setCustomAttribute(e,n){this.attributes.setCustom(e,n)}end(e,n){this.endTime=e;let o=n;return this.attributes.set("bugsnag.sampling.p",o.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 o},set samplingProbability(c){o=c,this.attributes.set("bugsnag.sampling.p",o.raw)},parentSpanId:this.parentSpanId}}isValid(){return this.endTime===void 0&&this.startTime>this.clock.now()-As}},He={startTime:{message:"should be a number or Date",getDefaultValue:()=>{},validate:fr},parentContext:{message:"should be a ParentContext",getDefaultValue:()=>{},validate:t=>t===null||Fe(t)},makeCurrentContext:{message:"should be true|false",getDefaultValue:()=>{},validate:ee},isFirstClass:{message:"should be true|false",getDefaultValue:()=>{},validate:ee}};var yt=class{constructor(e,n,o,c,d,h){this.spans=[],this.timeout=null,this.flushQueue=Promise.resolve(),this.delivery=e,this.configuration=n,this.retryQueue=o,this.sampler=c,this.probabilityManager=d,this.encoder=h,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 n=await this.encoder.encode(e),o=Date.now();try{let c=await this.delivery.send(n);switch(c.samplingProbability!==void 0&&this.probabilityManager.setProbability(c.samplingProbability),c.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(n,o);break;default:c.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=[],n=this.sampler.spanProbability;for(let o of this.spans)o.samplingProbability.raw>n.raw&&(o.samplingProbability=n),this.sampler.sample(o)&&await yr(o,this.configuration.logger,this.configuration.onSpanEnd)&&e.push(o);if(this.spans=[],e.length!==0)return e}};var Ge=class{constructor(e,n,o){this.clock=e,this.configuration=n,this.resourceAttributeSource=o}async encode(e){let n=await this.resourceAttributeSource(this.configuration),o=Array(e.length);for(let d=0;d<e.length;++d)o[d]=br(e[d],this.clock);return{body:{resourceSpans:[{resource:{attributes:n.toJson()},scopeSpans:[{spans:o}]}]},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 n=Object.create(null);for(let d of e){let h=n[d.samplingProbability.raw]||0;n[d.samplingProbability.raw]=h+1}let o=Object.keys(n),c=Array(o.length);for(let d=0;d<o.length;++d){let h=o[d];c[d]=`${h}:${n[h]}`}return c.join(";")}},Cs=new Set([402,407,408,429]);function vr(t){return t>=200&&t<300?"success":t>=400&&t<500&&!Cs.has(t)?"failure-discard":"failure-retryable"}var vt=class t{static async create(e,n){return e.probability=n,new t(e,n)}constructor(e,n){this.sampler=e,this.samplingProbability=n}setProbability(e){return Promise.resolve()}ensureFreshProbability(){return Promise.resolve()}};var me={NORMAL:5e4},ge=class{constructor(e){this.items=[],e&&(this.items=e,this.sort())}add(e,n){return this.items.some(o=>o.item===e)?!1:(this.items.push({item:e,priority:n}),this.sort(),!0)}addAll(e){let n=!1;for(let o of e)this.items.some(c=>c.item===o.item)||(this.items.push(o),n=!0);return n&&this.sort(),n}*[Symbol.iterator](){for(let e of this.items)yield e.item}sort(){this.items.sort((e,n)=>n.priority-e.priority)}};var Ke=class{constructor(e,n){this.configuration=e,this.clock=n,this.onSpanStartCallbacks=[],this.onSpanEndCallbacks=[],this.spanControlProviders=[]}addOnSpanStartCallback(e,n=me.NORMAL){this.onSpanStartCallbacks.push({item:e,priority:n})}addOnSpanEndCallback(e,n=me.NORMAL){this.onSpanEndCallbacks.push({item:e,priority:n})}addSpanControlProvider(e,n=me.NORMAL){this.spanControlProviders.push({item:e,priority:n})}mergeFrom(e){this.onSpanStartCallbacks.push(...e.onSpanStartCallbacks),this.onSpanEndCallbacks.push(...e.onSpanEndCallbacks),this.spanControlProviders.push(...e.spanControlProviders)}},Xe=class{constructor(){this.plugins=[],this.installedPlugins=new Set}addPlugins(e){this.plugins.push(...e)}installPlugins(e,n){this.logger=e.logger;let o=new Ke(e,n);for(let c of this.plugins)if(!this.installedPlugins.has(c))try{let d=new Ke(e,n);c.install(d),o.mergeFrom(d),this.installedPlugins.add(c)}catch(d){this.logger&&this.logger.error(`Plugin ${c.constructor.name} failed to install: ${d}`)}return o}startPlugins(){for(let e of this.installedPlugins)try{e.start()}catch(n){this.logger&&this.logger.error(`Plugin ${e.constructor.name} failed to start: ${n}`)}}getPlugin(e){for(let n of this.installedPlugins)if(n instanceof e)return n}};var _t=class{constructor(e,n){this.delivery=e,this.payload={body:{resourceSpans:[]},headers:{"Bugsnag-Api-Key":n,"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,3e4)})}};var St=class t{static async create(e,n,o){let c=await e.load("bugsnag-sampling-probability"),d;return c===void 0?(n.probability=1,d=0):(c.time<Date.now()-864e5,n.probability=c.value,d=c.time),new t(e,n,o,d)}constructor(e,n,o,c){this.outstandingFreshnessCheck=void 0,this.persistence=e,this.sampler=n,this.probabilityFetcher=o,this.lastProbabilityTime=c,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>=864e5?(this.outstandingFreshnessCheck=this.probabilityFetcher.getNewProbability().then(e=>{this.setProbability(e),this.outstandingFreshnessCheck=void 0}),this.outstandingFreshnessCheck):Promise.resolve()}};var ze=class{constructor(){this.spans=[]}add(e){this.spans.push(e)}};function Je(t){return Math.floor(t*4294967295)}var We=class{constructor(e){this._probability=e,this.scaledProbability=Je(e)}get probability(){return this._probability}set probability(e){this._probability=e,this.scaledProbability=Je(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 Bn(t,e){return t===e?!0:t!==void 0&&e!==void 0?t.id===e.id&&t.traceId===e.traceId:!1}var Ye=class{constructor(e,n=[]){this.isInForeground=!0,this.onBackgroun
16dStateChange=o=>{this.isInForeground=o==="in-foreground",this.contextStack.length=0},this.contextStack=n,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){Bn(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()}};var Et=class{constructor(){this.providers=new ge}addProvider(e,n){this.providers.add(e,n)}addProviders(e){this.providers.addAll(e)}getSpanControls(e){for(let n of this.providers){let o=n.getSpanControls(e);if(o)return o}return null}};function Re(t,e){return K(e)?e:e instanceof Date?t.convert(e):t.now()}var _r=-1,Qe=class{constructor(e,n,o,c,d,h,b,v){this.spanAttributeLimits=Nn,this.openSpans=new WeakSet,this.isInForeground=!0,this.onBackgroundStateChange=R=>{this.isInForeground=R==="in-foreground",this.openSpans=new WeakSet},this.processor=e,this.sampler=n,this.idGenerator=o,this.spanAttributesSource=c,this.clock=d,this.logger=b,this.spanContextStorage=v,h.onStateChange(this.onBackgroundStateChange)}startSpan(e,n){n.parentContext=Fe(n.parentContext)||n.parentContext===null?n.parentContext:this.spanContextStorage.current;let o=new je(new Map,this.spanAttributeLimits,e,this.logger);typeof n.isFirstClass=="boolean"&&o.set("bugsnag.span.first_class",n.isFirstClass);let c=this.createSpanInternal(e,n,o);return this.isInForeground&&(this.openSpans.add(c),n.makeCurrentContext!==!1&&this.spanContextStorage.push(c)),this.onSpanStart(c),c}onSpanStart(e){if(this.onSpanStartCallbacks){let n=this.toPublicApi(e);for(let o of this.onSpanStartCallbacks)try{o(n)}catch(c){this.logger.error("Error in onSpanStart callback: "+c)}}}createSpanInternal(e,n,o){let c=Re(this.clock,n.startTime),d=this.idGenerator.generate(64),h=n.parentContext?n.parentContext.id:void 0,b=n.parentContext?n.parentContext.traceId:this.idGenerator.generate(128);return new Ue(d,b,e,c,o,this.clock,this.sampler.probability,h)}startNetworkSpan(e){let n=`[HTTP/${e.method.toUpperCase()}]`,o=this.validateSpanOptions(n,e),c=this.startSpan(o.name,{...o.options,makeCurrentContext:!1});return c.setAttribute("bugsnag.span.category","network"),c.setAttribute("http.method",e.method),c.setAttribute("http.url",e.url),c}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 n of this.processor.spans)e.add(n);this.processor=e}endSpan(e,n,o){this.spanContextStorage.pop(e);let c=!this.openSpans.delete(e),d=e.isValid();if(c&&!d&&this.logger.warn("Attempted to end a Span which is no longer valid."),c||!d||n===_r){this.discardSpan(e);return}for(let[h,b]of Object.entries(o||{}))e.setAttribute(h,b);this.spanAttributesSource.requestAttributes(e),this.sendForProcessing(e,n)}discardSpan(e){e.end(_r,this.sampler.spanProbability)}sendForProcessing(e,n){let o=e.end(n,this.sampler.spanProbability);this.sampler.sample(o)&&this.processor.add(o)}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:(n,o)=>{e.setCustomAttribute(n,o)},end:n=>{let o=Re(this.clock,n);this.endSpan(e,o)}}}validateSpanOptions(e,n,o=He){let c="",d={};if(typeof e!="string"&&(c+=`
17  - name should be a string, got ${typeof e}`,e=String(e)),n!==void 0&&!B(n))c+=`
18  - options is not an object`;else{let h=n||{};for(let b of Object.keys(o))Object.prototype.hasOwnProperty.call(h,b)&&h[b]!==void 0?o[b].validate(h[b])?d[b]=h[b]:(c+=`
19  - ${b} ${o[b].message}, got ${typeof h[b]}`,d[b]=o[b].getDefaultValue(h[b])):d[b]=o[b].getDefaultValue(h[b])}return c.length>0&&this.logger.warn(`Invalid span options${c}`),{name:e,options:d}}};var qn="starting";function Ze(){return qn}function se(t){qn=t}function Sr(t){let e="00000",n="https://otlp.bugsnag.smartbear.com/v1/traces",o=new ze,c=t.spanContextStorage||new Ye(t.backgroundingListener),d=t.schema.logger.defaultValue;se("starting");let h=new We(1),b=t.spanFactory||Qe,v=new b(o,h,t.idGenerator,t.spanAttributesSource,t.clock,t.backgroundingListener,d,c),R=new Et,T=new Xe;return T.addPlugins(t.plugins(v,c)),{start:k=>{let S=mr(k,t.schema,t.isDevelopment);if(S.endpoint===Ce.endpoint.defaultValue&&(S.apiKey.startsWith(e)?S.endpoint=n:S.endpoint=S.endpoint.replace("https://",`https://${S.apiKey}.`)),S.bugsnag&&typeof S.bugsnag.Event.prototype.setTraceCorrelation=="function"&&S.bugsnag.Client){let U=S.bugsnag.Client.prototype._notify;
19S.bugsnag.Client.prototype._notify=function(...G){let oe=c.current;oe&&typeof G[0].setTraceCorrelation=="function"&&G[0].setTraceCorrelation(oe.traceId,oe.id),U.apply(this,G)}}T.addPlugins(S.plugins);let O=T.installPlugins(S,t.clock);R.addProviders(O.spanControlProviders);let P=new ge(O.onSpanStartCallbacks),M=new ge(O.onSpanEndCallbacks);S.onSpanStart&&P.addAll(S.onSpanStart.map(U=>({item:U,priority:me.NORMAL}))),S.onSpanEnd&&M.addAll(S.onSpanEnd.map(U=>({item:U,priority:me.NORMAL}))),S.onSpanStart=Array.from(P),S.onSpanEnd=Array.from(M),v.configure(S);let I=t.deliveryFactory(S.endpoint);(S.samplingProbability===void 0?St.create(t.persistence,h,new _t(I,S.apiKey)):vt.create(h,S.samplingProbability)).then(U=>{let G=new yt(I,S,t.retryQueueFactory(I,S.retryQueueMaxSize),h,U,new Ge(t.clock,S,t.resourceAttributesSource));v.reprocessEarlySpans(G),t.backgroundingListener.onStateChange(oe=>{G.flush(),oe==="in-foreground"&&U.ensureFreshProbability()}),d=S.logger}),T.startPlugins()},startSpan:(k,S)=>{let O=v.validateSpanOptions(k,S),P=v.startSpan(O.name,O.options);return P.setAttribute("bugsnag.span.category","custom"),v.toPublicApi(P)},startNetworkSpan:k=>{let S=v.startNetworkSpan(k);return{...v.toPublicApi(S),end:M=>{v.endSpan(S,Re(t.clock,M.endTime),{"http.status_code":M.status})}}},getPlugin:k=>T.getPlugin(k),getSpanControls:k=>R.getSpanControls(k),get currentSpanContext(){return c.current},get appState(){return Ze()},...t.platformExtensions&&t.platformExtensions(v,c)}}function Er(){let t=()=>{};return{start:t,startSpan:()=>({id:"",traceId:"",end:t,isValid:()=>!1}),currentSpanContext:void 0}}function xe(t,e){var n="000000000"+t;return n.substr(n.length-e)}var Vn=typeof window=="object"?window:self,Hn=0;for(Un in Vn)Object.hasOwnProperty.call(Vn,Un)&&Hn++;var Un,Rs=navigator.mimeTypes?navigator.mimeTypes.length:0,xs=xe((Rs+navigator.userAgent.length).toString(36)+Hn.toString(36),4);function Tr(){return xs}function Tt(t){return typeof t=="string"&&/^c[a-z0-9]{20,32}$/.test(t)}function wr(t){let o=Math.pow(36,4),c=0;function d(){return xe((Math.random()*o<<0).toString(36),4)}function h(){return c=c<o?c:0,c++,c-1}function b(){var v="c",R=new Date().getTime().toString(36),T=xe(h().toString(36),4),k=t(),S=d()+d();return v+R+T+k+S}return b.fingerprint=t,b.isCuid=Tt,b}var ks=wr(Tr);var wt=ks;var{isCuid:Ps}=wt,et=class{constructor(){this.persistedItems=new Map}async load(e){return this.persistedItems.get(e)}async save(e,n){this.persistedItems.set(e,n)}};function Ar(t,e){switch(t){case"bugsnag-sampling-probability":{let n=JSON.parse(e);return lr(n)?n:void 0}case"bugsnag-anonymous-id":return Ps(e)?e:void 0}}var tt=class{constructor(e,n){this.delivery=e,this.retryQueueMaxSize=n,this.requestQueue=Promise.resolve(),this.payloads=[]}add(e,n){this.payloads.push({payload:e,time:n});let o=this.payloads.reduce((c,{payload:d})=>c+Gn(d),0);for(;o>this.retryQueueMaxSize;){let c=this.payloads.shift();if(!c)break;o-=Gn(c.payload)}}async flush(){if(this.payloads.length===0)return;let e=this.payloads;this.payloads=[],this.requestQueue=this.requestQueue.then(async()=>{for(let{payload:n,time:o}of e)if(!(Date.now()>=o+864e5))try{let{state:c}=await this.delivery.send(n);switch(c){case"success":case"failure-discard":break;case"failure-retryable":this.add(n,o);break;default:}}catch{}}),await this.requestQueue}};function Gn(t){let e=0;for(let n=0;n<t.body.resourceSpans.length;++n){let o=t.body.resourceSpans[n].scopeSpans;for(let c=0;c<o.length;++c)e+=o[c].spans.length}return e}var Is=/^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9]{2}$/,rt=class t{constructor(e){this.id=e.id,this.traceId=e.traceId}encodeAsTraceParent(){return t.toTraceParentString(this)}static parseTraceParent(e){let n=Is.exec(e);if(!n)return;let[,o,c]=n;return new t({id:c,traceId:o})}static toTraceParentString(e){let n=!0;if(dr(e)){let o=Je(e.samplingProbability);n=e.samplingRate<=o}return`00-${e.traceId}-${e.id}-${n?"01":"00"}`}};function Ls(t){let e=t.get("Bugsnag-Sampling-Probability");if(typeof e!="string")return;let n=Number.parseFloat(e);if(!(Number.isNaN(n)||n<0||n>1))return n}function Kn(t,e,n){let o=!1;return n&&n.onStateChange(c=>{o=c==="in-background"}),function(d){return{async send(h){let b=JSON.stringify(h.body);h.headers["Bugsnag-Sent-At"]=e.date().toISOString();try{let v=await t(d,{method:"POST",keepalive:o,body:b,headers:h.headers});return{state:vr(v.status),samplingProbability:Ls(v.headers)}}catch{return b.length>1e6?{state:"failure-discard"}:{state:"failure-retryable"}}}}}}function be(t){return t}function Cr(t){return typeof t=="function"}var ye=class{constructor(){this.callbacks=[]}onStart(e){this.callbacks.push(e)}start(e){let n=[];for(let o of this.callbacks){let c=o(e);c&&n.push(c)}return{onRequestEnd:o=>{for(let c of n)c&&c.onRequestEnd&&c.onRequestEnd(o)},extraRequestHeaders:n.map(o=>{if(o&&o.extraRequestHeaders)return o.extraRequestHeaders}).filter(Ns)}}};function Ns(t){return t!==void 0}function ve(t,e){if(t.indexOf("https://")===0||t.indexOf("http://")===0)return t;try{let n=new URL(t,e).href;return!t.endsWith("/")&&n.endsWith("/")?n.slice(0,-1):n}catch{return t}}function Os(t,e,n,o){let c=Xn(e),d=c?e.url:String(e),h=!!n&&n.method||c&&e.method||"GET";return{url:ve(d,o),method:h,startTime:t,type:"fetch"}}function Xn(t){return!!t&&typeof t=="object"&&!(t instanceof URL)}function Ds(t){return!!t&&typeof t=="object"&&t instanceof Headers}function Rr(t,e){let n=new ye,o=t.fetch;return t.fetch=function(d,h){let b=Os(e.now(),d,h,t.document&&t.document.baseURI),{onRequestEnd:v,extraRequestHeaders:R}=n.start(b),T=Ms(d,h,R);return o.call(this,T[0],T[1]).then(k=>(v({status:k.status,endTime:e.now(),state:"success"}
19),k)).catch(k=>{throw v({error:k,endTime:e.now(),state:"error"}),k})},n}function Ms(t,e,n){if(!n)return[t,e];let o=n.reduce((c,d)=>({...c,...d}),{});return Xn(t)&&(!e||!e.headers)?Fs(o,t):e=js(o,e),[t,e]}function Fs(t,e){for(let[n,o]of Object.entries(t))e.headers.has(n)||e.headers.set(n,o)}function js(t,e){if(e||(e={}),Ds(e.headers)){for(let[n,o]of Object.entries(t))e.headers.has(n)||e.headers.set(n,o);return e}else return{...e,headers:{...t,...e.headers}}}function xr(t,e,n){let o=new ye,c=new WeakMap,d=new WeakMap,h=t.prototype.open;t.prototype.open=function(R,T,...k){c.set(this,{method:R,url:ve(String(T),n&&n.baseURI)}),h.call(this,R,T,...k)};let b=t.prototype.send;return t.prototype.send=function(R){let T=c.get(this);if(T){let k=d.get(this);k&&this.removeEventListener("readystatechange",k);let{onRequestEnd:S,extraRequestHeaders:O}=o.start({type:"xmlhttprequest",method:T.method,url:T.url,startTime:e.now()});if(O)for(let M of O)for(let[I,$]of Object.entries(M))this.setRequestHeader(I,$);let P=M=>{if(this.readyState===t.DONE&&S){let I=this.status>0?{endTime:e.now(),status:this.status,state:"success"}:{endTime:e.now(),state:"error"};S(I)}};this.addEventListener("readystatechange",P),d.set(this,P)}b.call(this,R)},o}var re={referrer:!0,title:!0,url:!0};function At(t){return{...re,...t}}function zn(t){let e=["undefined","boolean"],n=Object.keys(re);return B(t)&&n.every(o=>e.includes(typeof t[o]))}function $s(t,e){return t===void 0||e===void 0||t===0&&e===0}var Jn=(t,e,n,o)=>{function c(b,v,R){if($s(v,R))return;let T=t.startSpan(`[PageLoadPhase/${b}]${n}`,{startTime:v,parentContext:o,makeCurrentContext:!1});T.setAttribute("bugsnag.span.category","page_load_phase"),T.setAttribute("bugsnag.phase",b),t.endSpan(T,R)}let d=e.getEntriesByType("navigation"),h=Array.isArray(d)&&d[0];if(h){c("Unload",h.unloadEventStart,h.unloadEventEnd),c("Redirect",h.redirectStart,h.redirectEnd),c("LoadFromCache",h.fetchStart,h.domainLookupStart),c("DNSLookup",h.domainLookupStart,h.domainLookupEnd);let b=h.secureConnectionStart||h.connectEnd;c("TCPHandshake",h.connectStart,b),c("TLS",b,h.connectEnd),c("HTTPRequest",h.requestStart,h.responseStart),c("HTTPResponse",h.responseStart,h.responseEnd),c("DomContentLoadedEvent",h.domContentLoadedEventStart,h.domContentLoadedEventEnd),c("LoadEvent",h.loadEventStart,h.loadEventEnd)}};var Q=t=>t.pathname||"/",Wn=()=>class{constructor(e=Q){this.resolveRoute=e}listenForRouteChanges(e){}},Yn=(t,e)=>class{constructor(o=Q){this.resolveRoute=o}listenForRouteChanges(o){addEventListener("popstate",d=>{let h=new URL(e.href),b=o(h,"popstate");t(v=>{b.end(v)})});let c=history.pushState;history.pushState=function(...d){let h=d[2];if(h){let b=new URL(ve(h.toString(),document.baseURI)),v=o(b,"pushState");t(R=>{v.end(R)})}c.apply(this,d)}}};var Ct=class{constructor(e,n,o,c,d,h,b){this.wasBackgrounded=!1,this.enabled=!1,this.routeResolver=Q,this.sendPageAttributes=re,this.document=e,this.location=n,this.spanFactory=o,this.webVitals=c,this.onSettle=d,this.performance=b,h.onStateChange(v=>{!this.wasBackgrounded&&v==="in-background"&&(this.wasBackgrounded=!0)})}install(e){if(!e.configuration.autoInstrumentFullPageLoads||this.wasBackgrounded)return;let{routingProvider:n,sendPageAttributes:o}=e.configuration;n&&(this.routeResolver=n.resolveRoute),o&&(this.sendPageAttributes=o),this.enabled=!0}start(){if(!this.enabled)return;let e=null,n=document.querySelector('meta[name="traceparent"]');if(n!==null&&n.getAttribute("content")){let h=n.getAttribute("content"),[,b,v]=h.split("-");
19e={traceId:b,id:v}}let o=this.spanFactory.startSpan("[FullPageLoad]",{startTime:0,parentContext:e}),c=At(this.sendPageAttributes||re),d=new URL(this.location.href);this.onSettle(h=>{if(this.wasBackgrounded)return;let b=this.routeResolver(d)||Q(d);o.name+=b,Jn(this.spanFactory,this.performance,b,o),o.setAttribute("bugsnag.span.category","full_page_load"),o.setAttribute("bugsnag.browser.page.route",b),c.referrer&&o.setAttribute("bugsnag.browser.page.referrer",this.document.referrer),c.title&&o.setAttribute("bugsnag.browser.page.title",this.document.title),c.url&&o.setAttribute("bugsnag.browser.page.url",d.toString()),this.webVitals.attachTo(o),this.spanFactory.endSpan(o,h),Ze()==="starting"&&se("ready")})}};var Bs=["http://","https://","/","./","../"],Rt=class{constructor(e,n,o,c){this.spanFactory=e,this.spanContextStorage=n,this.fetchTracker=o,this.xhrTracker=c,this.configEndpoint="",this.networkRequestCallback=be,this.logger={debug:console.debug,warn:console.warn,info:console.info,error:console.error},this.enabled=!1,this.trackRequest=d=>{if(!this.shouldTrackRequest(d))return;let h=!1,b={url:d.url,type:d.type,propagateTraceContext:h},v=this.networkRequestCallback(b);if(!v)return{onRequestEnd:void 0,extraRequestHeaders:void 0};if(v.propagateTraceContext===void 0&&(v.propagateTraceContext=h),!v.url)return{onRequestEnd:void 0,extraRequestHeaders:v.propagateTraceContext?this.getExtraRequestHeaders():void 0};if(typeof v.url!="string"){this.logger.warn(`expected url to be a string following network request callback, got ${typeof v.url}`);return}let R=this.spanFactory.startNetworkSpan({method:d.method,startTime:d.startTime,url:v.url});return{onRequestEnd:T=>{T.state==="success"&&this.spanFactory.endSpan(R,T.endTime,{"http.status_code":T.status})},extraRequestHeaders:v.propagateTraceContext?this.getExtraRequestHeaders(R):void 0}}}install(e){if(!e.configuration.autoInstrumentNetworkRequests)return;let{endpoint:n,logger:o,networkRequestCallback:c}=e.configuration;o&&(this.logger=o),n&&(this.configEndpoint=n),c&&(this.networkRequestCallback=c),this.enabled=!0}start(){this.enabled&&(this.xhrTracker.onStart(this.trackRequest),this.fetchTracker.onStart(this.trackRequest))}shouldTrackRequest(e){return e.url!==this.configEndpoint&&Bs.some(n=>e.url.startsWith(n))}getExtraRequestHeaders(e=this.spanContextStorage.current){let n={};return e&&(n.traceparent=rt.toTraceParentString(e),n.tracestate=qs(e.traceId)),n}};function qs(t){return`sb=v:1;r32:${Ve(t)}`}function Vs(t){switch(t){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 t}}function Us(t){return t&&Array.isArray(t.supportedEntryTypes)&&t.supportedEntryTypes.includes("resource")}var xt=class{constructor(e,n,o){this.spanFactory=e,this.spanContextStorage=n,this.PerformanceObserverClass=o,this.enabled=!1,this.logger={debug:console.debug,warn:console.warn,info:console.info,error:console.error},this.networkRequestCallback=be}install(e){if(!Us(this.PerformanceObserverClass))return;let{logger:n,networkRequestCallback:o}=e.configuration;n&&(this.logger=n),o&&(this.networkRequestCallback=o),this.enabled=!0}start(){if(!this.enabled)return;let e=new this.PerformanceObserverClass(n=>{let o=n.getEntries();for(let c of o){if(c.initiatorType==="fetch"||c.initiatorType==="xmlhttprequest")continue;let d=this.spanContextStorage.first;if(d){let h=this.networkRequestCallback({url:c.name,type:c.initiatorType});if(!h)return;if(typeof h.url!="string"){this.logger.warn(`expected url to be a string following network request callback, got ${typeof h.url}`);return}let b="";try{let T=new URL(h.url);T.search="",b=T.href}catch{this.logger.warn(`Unable to parse URL returned from networkRequestCallback: ${h.url}`);return}let v=this.spanFactory.startSpan(`[ResourceLoad]${b}`,{parentContext:d,startTime:c.startTime,makeCurrentContext:!1});v.setAttribute("bugsnag.span.category","resource_load"),v.setAttribute("http.url",h.url);let R=Vs(c.nextHopProtocol);R&&v.setAttribute("http.flavor",R),c.encodedBodySize&&c.decodedBodySize&&(v.setAttribute("http.response_content_length",c.encodedBodySize),v.setAttribute("http.response_content_length_uncompressed",c.decodedBodySize)),c.responseStatus&&v.setAttribute("http.status_code",c.responseStatus),this.spanFactory.endSpan(v,c.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"]})}}};var{startTime:Hs,parentContext:Gs,makeCurrentContext:Ks}=He,Xs={startTime:Hs,parentContext:Gs,makeCurrentContext:Ks,trigger:{getDefaultValue:t=>String(t),message:"should be a string",validate:he}},kt=class{constructor(e,n,o){this.spanFactory=e,this.location=n,this.document=o,this.enabled=!1,this.sendPageAttributes=re,this.logger={debug:console.debug,warn:console.warn,info:console.info,error:console.error}}install(e){if(!e.configuration.autoInstrumentRouteChanges)return;let{logger:n,routingProvider:o,sendPageAttributes:c}=e.configuration;n&&(this.logger=n),o&&(this.routingProvider=o),c&&(this.sendPageAttributes=c),this.enabled=!0}start(){var e,n;if(!this.enabled)return;let o=new URL(this.location.href),c=((e=this.routingProvider)===null||e===void 0?void 0:e.resolveRoute(o))||Q(o),d=At(this.sendPageAttributes);(n=this.routingProvider)===null||n===void 0||n.listenForRouteChanges((h,b,v)=>{var R;let T;if(h instanceof URL)T=h;else try{let M=String(h);T=new URL(M)}catch{return this.logger.warn(`Invalid span options
20  - url should be a URL`),{id:"",name:"",traceId:"",samplingRate:0,samplingProbability:0,isValid:()=>!1,setAttribute:()=>{},end:()=>{}}}se("navigating");let k={...v,trigger:b},S=this.spanFactory.validateSpanOptions("[RouteChange]",k,Xs),O=((R=this.routingProvider)===null||R===void 0?void 0:R.resolveRoute(T))||Q(T);S.name+=O;let P=this.spanFactory.startSpan(S.name,S.options);return P.setAttribute("bugsnag.span.category","route_change"),P.setAttribute("bugsnag.browser.page.route",O),P.setAttribute("bugsnag.browser.page.previous_route",c),P.setAttribute("bugsnag.browser.page.route_change.trigger",S.options.trigger),d.url&&P.setAttribute("bugsnag.browser.page.url",h.toString()),c=O,{get id(){return P.id},get traceId(){return P.traceId},get samplingRate(){return P.samplingRate},get samplingProbability(){return P.samplingProbability},get name(){return P.name},isValid:P.isValid,setAttribute:P.setAttribute,end:M=>{var I;let $=B(M)?M:{endTime:M};if(d.title&&P.setAttribute("bugsnag.browser.page.title",this.document.title),$.url){let U=zs($.url),G=((I=this.routingProvider)===null||I===void 0?void 0:I.resolveRoute(U))||Q(U);P.name=`[RouteChange]${G}`,P.setAttribute("bugsnag.browser.page.route",G),c=G,d.url&&P.setAttribute("bugsnag.browser.page.url",U.toString())}this.spanFactory.toPublicApi(P).end($.endTime),se("ready")}}})}};function zs(t){return typeof t=="string"?new URL(t):t}function Qn(t){let e=[],n=t.document.visibilityState==="hidden"?"in-background":"in-foreground",o={onStateChange(d){e.push(d),n==="in-background"&&d(n)}},c=d=>
20{if(n!==d){n=d;for(let h of e)h(n)}};return t.document.addEventListener("visibilitychange",function(){let d=t.document.visibilityState==="hidden"?"in-background":"in-foreground";c(d)}),t.addEventListener("pagehide",function(){c("in-background")}),t.addEventListener("pageshow",function(){c("in-foreground")}),o}var Js=3e5;function Zn(t,e){return Math.abs(Date.now()-(t+e.now()))>Js?Date.now()-e.now():t}function ea(t,e){let n=t.timeOrigin===void 0?t.timing.navigationStart:t.timeOrigin,o=Zn(n,t);e.onStateChange(d=>{d==="in-foreground"&&(o=Zn(o,t))});let c=d=>Be(o+d);return{now:()=>t.now(),date:()=>new Date(o+t.now()),convert:d=>d.getTime()-o,toUnixNanoseconds:c,toUnixTimestampNanoseconds:d=>c(d).toString(),fromUnixNanoseconds:d=>gr(d)-o}}var ta=t=>B(t)&&typeof t.resolveRoute=="function"&&typeof t.listenForRouteChanges=="function";function ra(t,e=!1){return{...Ce,releaseStage:{...Ce.releaseStage,defaultValue:e?"development":"production"},autoInstrumentFullPageLoads:{defaultValue:!0,message:"should be true|false",validate:ee},autoInstrumentNetworkRequests:{defaultValue:!0,message:"should be true|false",validate:ee},autoInstrumentRouteChanges:{defaultValue:!0,message:"should be true|false",validate:ee},generateAnonymousId:{defaultValue:!0,message:"should be true|false",validate:ee},routingProvider:{defaultValue:t,message:"should be a routing provider",validate:ta},settleIgnoreUrls:{defaultValue:[],message:"should be an array of string|RegExp",validate:cr},networkRequestCallback:{defaultValue:be,message:"should be a function",validate:Cr},sendPageAttributes:{defaultValue:re,message:"should be an object",validate:zn},serviceName:{defaultValue:"unknown_service",message:"should be a string",validate:te}}}function Ws(t){let e=t.toString(16);return e.length===1?"0"+e:e}var na={generate(t){let e=new Uint8Array(t/8),n=window.crypto.getRandomValues(e);return Array.from(n).map(Ws).join("")}};var Z=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 n of this.callbacks)n(e)}};var Pt=class extends Z{constructor(e,n){super(e),this.timeout=void 0,new MutationObserver(()=>{this.restart()}).observe(n,{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 Ys(t){return!!t&&t.entryType==="navigation"}var It=class extends Z{constructor(e,n,o,c){super(e),c.readyState==="complete"?setTimeout(()=>{this.settleUsingPerformance(o)},0):n("load",()=>{setTimeout(()=>{this.settleUsingPerformance(o)},0)})}settleUsingPerformance(e){let n=this.clock.now(),o=typeof e.getEntriesByType=="function"?e.getEntriesByType("navigation")[0]:void 0,c=0;Ys(o)?c=o.loadEventEnd:e.timing&&(c=e.timing.loadEventEnd-e.timing.navigationStart),(c<=0||c>n)&&(c=n),this.settle(c)}};var nt=class extends Z{constructor(e,n){super(e),this.timeout=void 0,this.urlsToIgnore=[],this.outstandingRequests=0,this.settled=!0,n.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:n=>{if(--this.outstandingRequests===0){let o=this.clock.now();this.timeout=setTimeout(()=>{this.settle(o)},100)}}}}shouldIgnoreUrl(e){return this.urlsToIgnore.some(n=>n.test(e))}};var Lt=class extends Z{constructor(e,n){super(e),this.settlers=n;for(let o of n)o.subscribe(c=>{this.settlersAreSettled()?this.settle(c):this.settled=!1})}isSettled(){return super.isSettled()&&this.settlersAreSettled()}settlersAreSettled(){for(let e of this.settlers)if(!e.isSettled())return!1;return!0}};var Qs=60*1e3;function aa(){let t=()=>{};return t.install=()=>{},t.start=()=>{},t}function ia(t,e,n,o,c){let d=new Pt(t,e.document),h=new nt(t,n),b=new nt(t,o),v=new It(t,e.addEventListener,c,e.document),R=new Lt(t,[d,v,h,b]);function T(k){let S=I=>{clearTimeout(O),R.unsubscribe(S),k(I)},O=setTimeout(()=>{let I=t.now();R.unsubscribe(S),k(I)},Qs),P=R.isSettled()?100:0,M=t.now();setTimeout(()=>{R.isSettled()?S(M):R.subscribe(S)},P)}return T.install=function(k){let S=[];k.configuration.endpoint&&S.push(RegExp(k.configuration.endpoint)),k.configuration.settleIgnoreUrls&&S.push(...k.configuration.settleIgnoreUrls.map(O=>typeof O=="string"?RegExp(O):O)),h.setUrlsToIgnore(S),b.setUrlsToIgnore(S)},T.start=function(){},T}function sa(t){try{if(t.localStorage)return new kr(t.localStorage)}catch{}return new et}function Zs(t,e){switch(t){case"bugsnag-sampling-probability":return JSON.stringify(e);case"bugsnag-anonymous-id":return e;default:return t}}var kr=class{constructor(e){this.storage=e}async load(e){try{let n=this.storage.getItem(e);if(n)return Ar(e,n)}catch{}}async save(e,n){try{this.storage.setItem(e,Zs(e,n))}catch{}}};function oa(t,e){let n,o;return function(d){let h=new $e(d.releaseStage,d.appVersion,d.serviceName,"bugsnag.performance.browser","3.4.1");if(h.set("browser.user_agent",t.userAgent),t.userAgentData&&(h.set("browser.platform",t.userAgentData.platform),h.set("browser.mobile",t.userAgentData.mobile)),d.generateAnonymousId)if(n||(n=e.load("bugsnag-anonymous-id").then(b=>{let v=b||wt();return b||e.save("bugsnag-anonymous-id",v),o=v,o})),o)h.set("device.id",o);else return n.then(b=>(h.set("device.id",b),h));return Promise.resolve(h)}}var ua=t=>{let e={url:{name:"bugsnag.browser.page.url",getValue:()=>t.location.href,permitted:!1},title:{name:"bugsnag.browser.page.title",getValue:()=>t.title,permitted:!1}};return{configure(n){e.title.permitted=n.sendPageAttributes.title||!1,e.url.permitted=n.sendPageAttributes.url||!1},requestAttributes(n){for(let o of Object.values(e))o.permitted&&n.setAttribute(o.name,o.getValue())}}};var Nt=class{constructor(e,n,o){if(this.performance=e,this.clock=n,this.observers=[],o&&Array.isArray(o.supportedEntryTypes)){let c=o.supportedEntryTypes;c.includes("largest-contentful-paint")&&this.observeLargestContentfulPaint(o),c.includes("layout-shift")&&this.observeLayoutShift(o)}}attachTo(e){let n=this.firstContentfulPaint();n&&e.addEvent("fcp",n);let o=this.timeToFirstByte();o&&e.addEvent("ttfb",o);let c=this.firstInputDelay();c&&(e.addEvent("fid_start",c.start),e.addEvent("fid_end",c.end)),this.cumulativeLayoutShift&&e.setAttribute("bugsnag.metrics.cls",this.cumulativeLayoutShift),this.largestContentfulPaint&&e.addEvent("lcp",this.largestContentfulPaint);for(let d of this.observers)d.disconnect()}firstContentfulPaint(){let e=this.performance.getEntriesByName("first-contentful-paint","paint"),n=Array.isArray(e)&&e[0];if(n)return n.startTime}timeToFirstByte(){let e=this.performance.getEntriesByType("navigation"),n=Array.isArray(e)&&e[0],o;if(n?o=n.responseStart:o=this.performance.timing.responseStart-this.performance.timing.navigationStart,o>0&&o<=this.clock.now())return o}firstInputDelay(){let e=this.performance.getEntriesByType("first-input"),n=Array.isArray(e)&&e[0];if(n)return{start:n.startTime,end:n.processingStart}}observeLargestContentfulPaint(e){let n=new e(o=>{let c=o.getEntries();c.length>0&&(this.largestContentfulPaint=c[c.length-1].startTime)});n.observe({type:"largest-contentful-paint",buffered:!0}),this.observers.push(n)}observeLayoutShift(e){let n,o=new e(c=>{for(let d of c.getEntries())d.hadRecentInput||(n&&d.startTime-n.previousStartTime<1e3&&d.startTime-n.firstStartTime<5e3?(n.value+=d.value,n.previousStartTime=d.startTime):n={value:d.value,firstStartTime:d.startTime,previousStartTime:d.startTime});n&&(this.cumulativeLayoutShift===void 0||n.value>this.cumulativeLayoutShift)&&(this.cumulativeLayoutShift=n.value)});o.observe({type:"layout-shift",buffered:!0}),this.observers.push(o)}};var ke,Ot,Pr;if(typeof window>"u"||typeof document>"u")ke=aa(),Ot=Wn(),Pr=Er();else{let t=window.location.hostname==="localhost",e=Qn(window),n=ua(document),o=ea(performance,e),c=sa(window),d=oa(navigator,c),h=Rr(window,o),b=xr(XMLHttpRequest,o,document),v=new Nt(performance,o,window.PerformanceObserver);ke=ia(o,window,h,b,performance),Ot=Yn(ke,window.location),Pr=Sr({isDevelopment:t,backgroundingListener:e,clock:o,resourceAttributesSource:d,spanAttributesSource:n,deliveryFactory:Kn(window.fetch,o,e),idGenerator:na,schema:ra(new Ot,t),plugins:(R,T)=>[ke,new Ct(document,window.location,R,v,ke,e,performance),new xt(R,T,window.PerformanceObserver),new Rt(R,T,h,b),new kt(R,window.location,document)],persistence:c,retryQueueFactory:(R,T)=>new tt(R,T)})}var Ir=Pr;window.Rails=J;
20window._rails_loaded||J.start();window.StoreConnect=window.StoreConnect||{};window.StoreConnect.configure=function(t){if(t.BUGSNAG_RELEASE_STAGE!=="test"){if(!t.BUGSNAG_KEY)throw new Error("Failed to configure Bugsnag, missing BUGSNAG_KEY");window.bugsnagClient=Dt.default,Dt.default.start({apiKey:t.BUGSNAG_KEY,appVersion:t.STORE_CONNECT_VERSION,notifyReleaseStages:["production","staging"],releaseStage:t.BUGSNAG_RELEASE_STAGE,appType:"client",plugins:[]}),t.BUGSNAG_PERFORMANCE_FRONTEND==="true"&&Ir.start({apiKey:t.BUGSNAG_KEY,appVersion:t.STORE_CONNECT_VERSION,bugsnag:Dt.default,logger:null,notifyReleaseStages:["production","staging","development"],releaseStage:t.BUGSNAG_RELEASE_STAGE})}};})();

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.