PageSourceSearch

https://asset.matsurihi.me/a52ddc4/princess.js

js matsurihi.me collected 2026-10-06 20:41:11 UTC 202,845 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"princess-js@a52ddc4"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5c416abc-bded-4e08-a8bb-3482d470da9d",e._sentryDebugIdIdentifier="sentry-dbid-5c416abc-bded-4e08-a8bb-3482d470da9d")}catch(e){}}(),(self.webpackChunkprincess=self.webpackChunkprincess||[]).push([[722],{60:function(e,t,n){n.d(t,{T:function(){return Ve}});const r=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),s=e=>encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent),o=decodeURIComponent,i=e=>('"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent));function a(e,t,n){const r=/(?:^|; )([^=]*)=([^;]*)/g,s={};let o;for(;null!=(o=r.exec(document.cookie));)try{const r=n(o[1]);if(s[r]=t(o[2],r),e===r)break}catch(e){}return null!=e?s[e]:s}const c=Object.freeze({decodeName:o,decodeValue:i,encodeName:r,encodeValue:s}),u=Object.freeze({path:"/"});function l(e,t,n=u,{encodeValue:o=s,encodeName:i=r}={}){return document.cookie=`${i(e)}=${o(t,e)}${function(e){return"number"==typeof(e=Object.assign({},e)).expires&&(e.expires=new Date(Date.now()+864e5*e.expires)),null!=e.expires&&(e.expires=e.expires.toUTCString()),Object.entries(e).filter(([e,t])=>null!=t&&!1!==t).map(([e,t])=>!0===t?`; ${e}`:`; ${e}=${t.split(";")[0]}`).join("")}(n)}`}function p(e,{decodeValue:t=i,decodeName:n=o}={}){return a(e,t,n)}(function e(t,n){const r={set:function(e,t,n){return l(e,t,Object.assign({},this.attributes,n),{encodeValue:this.converter.write})},get:function(e){return 0===arguments.length?function({decodeValue:e=i,decodeName:t=o}={}){return a(void 0,e,t)}(this.converter.read):null!=e?p(e,this.converter.read):void 0},remove:function(e,t){!function(e,t=u){l(e,"",Object.assign({},t,{expires:-1}))}(e,Object.assign({},this.attributes,t))},withAttributes:function(t){return e(this.converter,Object.assign({},this.attributes,t))},withConverter:function(t){return e(Object.assign({},this.converter,t),this.attributes)}},s={attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}};return Object.create(r,s)})({read:c.decodeValue,write:c.encodeValue},u);const d={prod:"matsurihi.me",beta:"nakatani.icu",dev:"hakozaki.serika"},h=`.${d.prod}`,f=(e,t,n=24855)=>{l(e,t,{path:"/",expires:n,secure:true,domain:h})},g=e=>f("theme",e),m="0.3s",y=["p","li","footer"],_=(e,t)=>{if(t){document.body.style.transitionDuration=m;for(const e of y){const t=document.getElementsByTagName(e);for(let e=0;e<t.length;e++)t[e].style.transitionDuration=m}}switch(e){case"light":document.documentElement.removeAttribute("data-bs-theme");break;case"dark":document.documentElement.setAttribute("data-bs-theme","dark")}},v=()=>{const e="dark"===document.documentElement.getAttribute("data-bs-theme")?"light":"dark";_(e,!0),g(e)},b=()=>{const e=document.getElementById("navbar-contrast-button");e&&e.addEventListener("click",v);const t=(()=>{const e=p("theme");return"dark"===e||"light"===e?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"})();_(t,!1),g(t)},S=e=>"string"==typeof e,x=()=>{let e,t;const n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},w=e=>null==e?"":String(e),k=/###/g,E=e=>e&&e.includes("###")?e.replace(k,"."):e,T=e=>!e||S(e),$=(e,t,n)=>{const r=S(t)?t.split("."):t;let s=0;for(;s<r.length-1;){if(T(e))return{};const t=E(r[s]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++s}return T(e)?{}:{obj:e,k:E(r[s])}},O=(e,t,n)=>{const{obj:r,k:s}=$(e,t,Object);if(void 0!==r||1===t.length)return void(r[s]=n);let o=t[t.length-1],i=t.slice(0,t.length-1),a=$(e,i,Object);for(;void 0===a.obj&&i.length;)o=`${i[i.length-1]}.${o}`,i=i.slice(0,i.length-1),a=$(e,i,Object),a?.obj&&void 0!==a.obj[`${a.k}.${o}`]&&(a.obj=void 0);a.obj[`${a.k}.${o}`]=n},I=(e,t)=>{const{obj:n,k:r}=$(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},C=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(Object.prototype.hasOwnProperty.call(e,r)?S(e[r])||e[r]instanceof String||S(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):C(e[r],t[r],n):e[r]=t[r]);return e},L=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),R={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},P=e=>S(e)?e.replace(/[&<>
1"'\/]/g,e=>R[e]):e;const N=[" ",",","?","!",";"],A=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),j=(e,t,n=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const r=t.split(n);let s=e;for(let e=0;e<r.length;){if(!s||"object"!=typeof s)return;let t,o="";for(let i=e;i<r.length;++i)if(i!==e&&(o+=n),o+=r[i],t=s[o],void 0!==t){if(["string","number","boolean"].includes(typeof t)&&i<r.length-1)continue;e+=i-e+1;break}s=t}return s},D=e=>e?.replace(/_/g,"-"),M={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class F{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||M,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(e=e.map(e=>S(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g," "):e),S(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new F(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new F(this.logger,e)}}var q=new F;class H{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}once(e,t){const n=(...r)=>{t(...r),this.off(e,n)};return this.on(e,n),this}emit(e,...t){if(this.observers[e]){Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(([n,r])=>{for(let s=0;s<r;s++)n(e,...t)})}}}class U extends H{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){const s=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let i;e.includes(".")?i=e.split("."):(i=[e,t],n&&(Array.isArray(n)?i.push(...n):S(n)&&s?i.push(...n.split(s)):i.push(n)));const a=I(this.data,i);return a||t||n||!e.includes(".")||(e=i[0],t=i[1],n=i.slice(2).join(".")),!a&&o&&S(n)?j(this.data?.[e]?.[t],n,s):a}addResource(e,t,n,r,s={silent:!1}){const o=void 0!==s.keySeparator?s.keySeparator:this.options.keySeparator;let i=[e,t];
vendor: 1,999 bytes, line 1
1n&&(i=i.concat(o?n.split(o):n)),e.includes(".")&&(i=e.split("."),r=t,t=i[1]),this.addNamespaces(t),O(this.data,i,r),s.silent||this.emit("added",e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(const r in n)(S(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,s,o={silent:!1,skipCopy:!1}){let i=[e,t];e.includes(".")&&(i=e.split("."),r=n,n=t,t=i[1]),this.addNamespaces(t);let a=I(this.data,i)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?C(a,n,s):a={...a,...n},O(this.data,i,a),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var B={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,s){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,s)??t}),t}};const z=Symbol("i18next/PATH_KEY");function V(e,t){const{[z]:n}=e(function(){const e=[],t=Object.create(null);let n;return t.get=(r,s)=>(n?.revoke?.(),s===z?e:(e.push(s),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}()),r=t?.keySeparator??".",s=t?.nsSeparator??":",o="strict"===t?.enableSelector;if(n.length>1&&s){const e=t?.ns,i=o?Array.isArray(e)?e:e?[e]:null:Array.isArray(e)?e:null;if(i){if((o?i:i.length>1?i.slice(1):[]).includes(n[0]))return`${n[0]}${s}${n.slice(1).join(r)}`}}return n.join(r)}const W=e=>!S(e)&&"boolean"!=typeof e&&"number"!=typeof e;class K extends H{constructor(e,t={}){super(),((e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","
1i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=q.create("translator"),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const n={...t};if(null==e)return!1;const r=this.resolve(e,n);if(void 0===r?.res)return!1;const s=W(r.res);return!1!==n.returnObjects||!s}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let s=t.ns||this.options.defaultNS||[];const o=n&&e.includes(n),i=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const r=N.filter(e=>!t.includes(e)&&!n.includes(e));if(0===r.length)return!0;const s=A.getRegExp(`(${r.map(e=>"?"===e?"\\?":e).join("|")})`);let o=!s.test(e);if(!o){const t=e.indexOf(n);t>0&&!s.test(e.substring(0,t))&&(o=!0)}return o})(e,n,r));if(o&&!i){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:S(s)?[s]:s};const o=e.split(n);(n!==r||n===r&&this.options.ns.includes(o[0]))&&(s=o.shift()),e=o.join(r)}return{key:e,namespaces:S(s)?[s]:s}}translate(e,t,n){let r="object"==typeof t?{...t}:t;if("object"!=typeof r&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof r&&(r={...r}),r||(r={}),null==e)return"";"function"==typeof e&&(e=V(e,{...this.options,...r})),Array.isArray(e)||(e=[String(e)]),e=e.map(e=>"function"==typeof e?V(e,{...this.options,...r}):String(e));const s=void 0!==r.returnDetails?r.returnDetails:this.options.returnDetails,o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,{key:i,namespaces:a}=this.extractFromKey(e[e.length-1],r),c=a[a.length-1];let u=void 0!==r.nsSeparator?r.nsSeparator:this.options.nsSeparator;void 0===u&&(u=":");const l=r.lng||this.language,p=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===l?.toLowerCase())return p?s?{res:`${c}${u}${i}`,usedKey:i,exactUsedKey:i,usedLng:l,usedNS:c,usedParams:this.getUsedParamsDetails(r)}:`${c}${u}${i}`:s?{res:i,usedKey:i,exactUsedKey:i,usedLng:l,usedNS:c,usedParams:this.getUsedParamsDetails(r)}:i;const d=this.resolve(e,r);let h=d?.res;const f=d?.usedKey||i,g=d?.exactUsedKey||i,m=void 0!==r.joinArrays?r.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,_=void 0!==r.count&&!S(r.count),v=K.hasDefaultValue(r),b=_?this.pluralResolver.getSuffix(l,r.count,r):"",x=r.ordinal&&_?this.pluralResolver.getSuffix(l,r.count,{ordinal:!1}):"",w=_&&!r.ordinal&&0===r.count,k=w&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${b}`]||r[`defaultValue${x}`]||r.defaultValue;let E=h;y&&!h&&v&&(E=k);const T=W(E),$=Object.prototype.toString.apply(E);if(!(y&&E&&T)||["[object Number]","[object Function]","[object RegExp]"].includes($)||S(m)&&Array.isArray(E))if(y&&S(m)&&Array.isArray(h))h=h.join(m),h&&(h=this.extendTranslation(h,e,r,n));else{let t=!1,s=!1;!this.isValidLookup(h)&&v&&(t=!0,h=k),this.isValidLookup(h)||(s=!0,h=i);const a=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&s?void 0:h,p=v&&k!==h&&this.options.updateMissing;if(s||t||p){if(this.logger.log(p?"updateKey":"missingKey",l,c,_&&!p?`${i}${this.pluralResolver.getSuffix(l,r.count,r)}`:i,p?k:h),o){const e=this.resolve(i,{...r,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(r.lng||this.language):e.push(r.lng||this.language);const n=(e,t,n)=>{const s=v&&n!==h?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,c,t,s,p,r):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,c,t,s,p,r),this.emit
vendor: 29,632 bytes, line 1
1("missingKey",e,c,t,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&_?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,r);w&&r[`defaultValue${this.options.pluralSeparator}zero`]&&!t.includes(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],i+t,r[`defaultValue${t}`]||k)})}):n(e,i,k))}h=this.extendTranslation(h,e,r,d,n),s&&h===i&&this.options.appendNamespaceToMissingKey&&(h=`${c}${u}${i}`),(s||t)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${u}${i}`:i,t?h:void 0,r))}else{if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,E,{...r,ns:a}):`key '${i} (${this.language})' returned an object instead of string.`;return s?(d.res=e,d.usedParams=this.getUsedParamsDetails(r),d):e}if(o){const e=Array.isArray(E),t=e?[]:{},n=e?g:f;for(const e in E)if(Object.prototype.hasOwnProperty.call(E,e)){const s=`${n}${o}${e}`;t[e]=v&&!h?this.translate(s,{...r,defaultValue:W(k)?k[e]:void 0,joinArrays:!1,ns:a}):this.translate(s,{...r,joinArrays:!1,ns:a}),t[e]===s&&(t[e]=E[e])}h=t}}return s?(d.res=h,d.usedParams=this.getUsedParamsDetails(r),d):h}extendTranslation(e,t,n,r,s){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const o=S(e)&&(void 0!==n?.interpolation?.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let i;if(o){const t=e.match(this.interpolator.nestingRegexp);i=t&&t.length}let a=n.replace&&!S(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),e=this.interpolator.interpolate(e,a,n.lng||this.language||r.usedLng,n),o){const t=e.match(this.interpolator.nestingRegexp);i<(t&&t.length)&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(...e)=>s?.[0]!==e[0]||n.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),n)),n.interpolation&&this.interpolator.reset()}const o=n.postProcess||this.options.postProcess,i=S(o)?[o]:o;return null!=e&&i?.length&&!1!==n.applyPostProcessor&&(e=B.handle(i,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,s,o,i;return S(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>"function"==typeof e?V(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;const a=this.extractFromKey(e,t),c=a.key;r=c;let u=a.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));const l=void 0!==t.count&&!S(t.count),p=l&&!t.ordinal&&0===t.count,d=void 0!==t.context&&(S(t.context)||"number"==typeof t.context)&&""!==t.context,h=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);u.forEach(e=>{this.isValidLookup(n)||(i=e,this.checkedLoadedFor[`${h[0]}-${e}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(i)||(this.checkedLoadedFor[`${h[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${h.join(", ")}" won't get resolved as namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach(r=>{if(this.isValidLookup(n))return;o=r;const i=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(i,c,r,e,t);else{let e;l&&(e=this.pluralResolver.getSuffix(r,t.count,t));const n=`${this.options.pluralSeparator}zero`,s=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(l&&(t.ordinal&&e.startsWith(s)&&i.push(c+e.replace(s,this.options.pluralSeparator)),i.push(c+e),p&&i.push(c+n)),d){const r=`${c}${this.options.contextSeparator||"_"}${t.context}`;i.push(r),l&&(t.ordinal&&e.startsWith(s)&&i.push(r+e.replace(s,this.options.pluralSeparator)),i.push(r+e),p&&i.push(r+n))}}let a;for(;a=i.pop();)this.isValidLookup(n)||(s=a,n=this.getResource(r,e,a,t))}))})}),{res:n,usedKey:r,exactUsedKey:s,usedLng:o,usedNS:i}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!S(e.replace);let r=n?e.replace:e;if(n&&void 0!==e.count&&(r={...r,count:e.count}),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith("defaultValue")&&void 0!==e[t])return!0;return!1}}class J{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=q.create("languageUtils"),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(e){if(!(e=D(e))||!e.includes("-"))return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=D(e))||!e.includes("-"))return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(S(e)&&e.includes("-")){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;const r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r||!(!e.includes("-")&&!r.includes("-"))&&(!(!e.includes("-")||r.includes("-")||e.slice(0,e.indexOf("-"))!==r)||!!(e.startsWith(r)&&r.length>1)))}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),S(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.options.fallbackLng,r=Array.isArray(n)?n.join("|"):n;r!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=r);const s=void 0===t||!1===t||S(t),o=void 0===t&&"function"==typeof this.options.fallbackLng;let i=null;if(S(e)&&s&&!o){let n;n=void 0===t?"undefined":!1===t?"boolean:false":`string:${t}`,i=`${e.length}:${e}|${n}`}if(null!==i){const e=this.resolveHierarchyCache[i];if(void 0!==e)return e.slice()}const a=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),c=[],u=e=>{e&&(this.isSupportedCode(e)?c.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return S(e)&&(e.includes("-")||e.includes("_"))?("languageOnly"!==this.options.load&&u(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&u(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&u(this.getLanguagePartFromCode(e))):S(e)&&u(this.formatLanguageCode(e)),a.forEach(e=>{c.includes(e)||u(this.formatLanguageCode(e))}),null!==i?(this.resolveHierarchyCache[i]=c,c.slice()):c}}const Y={zero:0,one:1,two:2,few:3,many:4,other:5},G={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class X{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=q.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=D("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:n,type:r});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];let o;try{o=new Intl.PluralRules(n,{type:r})}catch(n){if("undefined"==typeof Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),G;if(!e.match(/-|_/))return G;const r=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(r,t)}return this.pluralRulesCache[s]=o,o}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((e,t)=>Y[e]-Y[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,n={}){const r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const Q=(e,t,n,r=".",s=!0)=>{let o=((e,t,n)=>{const r=I(e,n);return void 0!==r?r:I(t,n)})(e,t,n);return!o&&s&&S(n)&&(o=j(e,n,r),void 0===o&&(o=j(t,n,r))),o},Z=e=>e.replace(/\$/g,"$$$$");class ee{constructor(e={}){this.logger=q.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:s,prefixEscaped:o,suffix:i,suffixEscaped:a,formatSeparator:c,unescapeSuffix:u,unescapePrefix:l,nestingPrefix:p,nestingPrefixEscaped:d,nestingSuffix:h,nestingSuffixEscaped:f,nestingOptionsSeparator:g,maxReplaces:m,alwaysFormat:y}=e.interpolation;this.escape=void 0!==t?t:P,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=s?L(s):o||"{{",this.suffix=i?L(i):a||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":l?L(l):"-",this.unescapeSuffix=this.unescapePrefix?"":u?L(u):"",this.nestingPrefix=p?L(p):d||L("$t("),this.nestingSuffix=h?L(h):f||L(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==y&&y,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let s,o,i;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(!e.includes(this.formatSeparator)){const s=Q(t,a,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(s,void 0,n,{...r,...t,interpolationkey:e}):s}const s=e.split(this.formatSeparator),o=s.shift().trim(),i=s.join(this.formatSeparator).trim();return this.format(Q(t,a,o,this.options.keySeparator,this.options.ignoreJSONStructure),i,n,{...r,...t,interpolationkey:o})};this.resetRegExp(),!this.escapeValue&&"string"==typeof e&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const u=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,l=void 0!==r?.interpolation?.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>e},{regex:this.regexp,safeValue:e=>this.escapeValue?this.escape(e):e}].forEach(t=>{for(i=0;s=t.regex.exec(e);){const n=s[1].trim();if(o=c(n),void 0===o)if("function"==typeof u){const t=u(e,s,r);o=S(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))o="";else{if(l){o=s[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),o=""}else S(o)||this.useRawValueToEscape||(o=w(o));const a=t.safeValue(o);if(e=e.replace(s[0],Z(a)),l?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=s[0].length):t.regex.lastIndex=0,i++,i>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,s,o;const i=(e,t)=>{const n=this.nestingOptionsSeparator;if(!e.includes(n))return e;const r=e.split(new RegExp(`${L(n)}[ ]*{`));let s=`{${r[1]}`;e=r[0],s=this.interpolate(s,o);const i=s.match(/'/g),a=s.match(/"/g);((i?.length??0)%2==0&&!a||(a?.length??0)%2!=0)&&(s=s.replace(/'/g,'"'));try{o=JSON.parse(s),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${s}`}return o.defaultValue&&o.defaultValue.includes(this.prefix)&&delete o.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let a=[];o={...n},o=o.replace&&!S(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;const c=/{.*}/s.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(-1!==c&&(a=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),s=t(i.call(this,r[1].trim(),o),o),s&&r[0]===e&&!S(s))return s;S(s)||(s=w(s)),s||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),s=""),a.length&&(s=a.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),s.trim())),e=e.replace(r[0],Z(w(s))),this.regexp.lastIndex=0}return e}}const te=e=>{const t={};return(n,r,s)=>{let o=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(o={...o,[s.interpolationkey]:void 0});const i=r+JSON.stringify(o);let a=t[i];return a||(a=e(D(r),s),t[i]=a),a(n)}},ne=e=>(t,n,r)=>e(D(n),r)(t);class re{constructor(e={}){this.logger=q.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?te:ne;this.formats={number:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:n((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:n((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=te(t)}format(e,t,n,r={}){if(!t)return e;if(null==e)return e;const s=t.split(this.formatSeparator),o=[];for(let e=0;e<s.length;e++){let t=s[e];for(;t.indexOf("(")>-1&&!t.includes(")")&&e+1<s.length;)t=`${t}${this.formatSeparator}${s[++e]}`;o.push(t)}return o.reduce((e,t)=>{const{formatName:s,formatOptions:o}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.includes("(")){const r=e.split("(");t=r[0].toLowerCase().trim();const s=r[1].slice(0,-1);"currency"!==t||s.includes(":")?"relativetime"!==t||s.includes(":")?s.split(";").forEach(e=>{if(e){const[t,...r]=e.split(":"),s=r.join(":").trim().replace(/^'+|'+$/g,""),o=t.trim();n[o]||(n[o]=s),"false"===s&&(n[o]=!1),"true"===s&&(n[o]=!0),isNaN(s)||(n[o]=parseInt(s,10))}}):n.range||(n.range=s.trim()):n.currency||(n.currency=s.trim())}return{formatName:t,formatOptions:n}})(t);if(this.formats[s]){let t=e;try{const i=r?.formatParams?.[r.interpolationkey]||{},a=i.locale||i.lng||r.locale||r.lng||n;t=this.formats[s](e,a,{...o,...r,...i})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${s}`),e},e)}}class se extends H{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=q.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){const s={},o={},i={},a={};return e.forEach(e=>{let r=!0;t.forEach(t=>{const i=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[i]=2:this.state[i]<0||(1===this.state[i]?void 0===o[i]&&(o[i]=!0):(this.state[i]=1,r=!1,void 0===o[i]&&(o[i]=!0),void 0===s[i]&&(s[i]=!0),void 0===a[t]&&(a[t]=!0)))}),r||(i[e]=!0)}),(Object.keys(s).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(s),pending:Object.keys(o),toLoadLanguages:Object.keys(i),toLoadNamespaces:Object.keys(a)}}loaded(e,t,n){const r=e.split("|"),s=r[0],o=r[1];t&&this.emit("failedLoading",s,o,t),!t&&n&&this.store.addResourceBundle(s,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const i={};this.queue.forEach(n=>{((e,t,n)=>{const{obj:r,k:s}=$(e,t,Object);r[s]=r[s]||[],r[s].push(n)})(n.loaded,[s],o),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{i[e]||(i[e]={});const t=n.loaded[e];t.length&&t.forEach(t=>{void 0===i[e][t]&&(i[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",i),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,s=this.retryTimeout,o){if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:s,callback:o});this.readingCalls++;const i=(i,a)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}i&&a&&r<this.maxRetries?setTimeout(()=>{this.read(e,t,n,r+1,2*s,o)},s):o(i,a)},a=this.backend[n].bind(this.backend);if(2!==a.length)return a(e,t,i);try{const n=a(e,t);n&&"function"==typeof n.then?n.then(e=>i(null,e)).catch(i):i(null,n)}catch(e){i(e)}}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();S(e)&&(e=this.languageUtils.toResolveHierarchy(e)),S(t)&&(t=[t]);const s=this.queueLoad(e,t,n,r);if(!s.toLoad.length)return s.pending.length||r(),null;s.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){const n=e.split("|"),r=n[0],s=n[1];this.read(r,s,"read",void 0,void 0,(n,o)=>{n&&this.logger.warn(`${t}loading namespace ${s} for language ${r} failed`,n),!n&&o&&this.logger.log(`${t}loaded namespace ${s} for language ${r}`,o),this.loaded(e,n,o)})}saveMissing(e,t,n,r,s,o={},i=()=>{}){if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(t)){if(null!=n&&""!==n){if(this.backend?.create){const a={...o,isUpdate:s},c=this.backend.create.bind(this.backend);if(c.length<6)try{let s;s=5===c.length?c(e,t,n,r,a):c(e,t,n,r),s&&"function"==typeof s.then?s.then(e=>i(null,e)).catch(i):i(null,s)}catch(e){i(e)}else c(e,t,n,r,i,a)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}else this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const oe=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),S(e[1])&&(t.defaultValue=e[1]),S(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),ie=e=>(S(e.ns)&&(e.ns=[e.ns]),S(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),S(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),ae=()=>{};class ce extends H{constructor(e={},t){var n;if(super(),this.options=ie(e),this.services={},this.logger=q,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))}),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(S(e.ns)?e.defaultNS=e.ns:e.ns.includes("translation")||(e.defaultNS=e.ns[0]));const n=oe();this.options={...n,...this.options,...ie(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);const r=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?q.init(r(this.modules.logger),this.options):q.init(null,this.options),e=this.modules.formatter?this.modules.formatter:re;const t=new J(this.options);this.store=new U(this.options.resources,this.options);const n=this.services;n.logger=q,n.resourceStore=this.store,n.languageUtils=t,n.pluralResolver=new X(t,{prepend:this.options.pluralSeparator}),e&&(n.formatter=r(e),n.formatter.init&&n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new ee(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new se(r(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(n.languageDetector=r(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=r(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new K(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=ae),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});const s=x(),o=()=>{const e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),s.resolve(n),t(e,n)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?o():setTimeout(o,0),s}loadResources(e,t=ae){let n=t;const r=S(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===r?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return n();const e=[],t=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&(e.includes(t)||e.push(t))})};if(r)t(r);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e))}this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){const r=x();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=ae),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&B.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!["cimode","dev"].includes(e)){for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!["cimode","dev"].includes(t)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}this.resolvedLanguage||this.languages.includes(e)||!this.store.hasLanguageSomeTranslations(e)||(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const n=x();this.emit("languageChanging",e);const r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},s=(s,o)=>{o?this.isLanguageChangingTo===e&&(r(o),this.translator.changeLanguage(o),this.isLanguageChangingTo=void 0,this.emit("languageChanged",o),this.logger.log("languageChanged",o)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(s,(...e)=>this.t(...e))},o=t=>{e||t||!this.services.languageDetector||(t=[]);const n=S(t)?t:t&&t[0],o=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(S(t)?[t]:t);o&&(this.language||r(o),this.translator.language||this.translator.changeLanguage(o),this.services.languageDetector?.cacheUserLanguage?.(o)),this.loadResources(o,e=>{s(e,o)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),n}getFixedT(e,t,n,r){const s=r?.scopeNs,o=(e,t,...r)=>{let i;i="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(r)):{...t},i.lng=i.lng||o.lng,i.lngs=i.lngs||o.lngs;const a=void 0!==i.ns&&null!==i.ns;i.ns=i.ns||o.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||n||o.keyPrefix);const c={...this.options,...i};Array.isArray(s)&&!a&&(c.ns=s),"function"==typeof i.keyPrefix&&(i.keyPrefix=V(i.keyPrefix,c));const u=this.options.keySeparator||".";let l;return i.keyPrefix&&Array.isArray(e)?l=e.map(e=>("function"==typeof e&&(e=V(e,c)),`${i.keyPrefix}${u}${e}`)):("function"==typeof e&&(e=V(e,c)),l=i.keyPrefix?`${i.keyPrefix}${u}${e}`:e),this.t(l,i)};return S(e)?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;
1if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,s=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const o=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,o);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!o(n,e)||r&&!o(s,e)))}loadNamespaces(e,t){const n=x();return this.options.ns?(S(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=x();S(e)&&(e=[e]);const r=this.options.preload||[],s=e.filter(e=>!r.includes(e)&&this.services.languageUtils.isSupportedCode(e));return s.length?(this.options.preload=r.concat(s),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const t=new Intl.Locale(e);if(t&&t.getTextInfo){const e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}const t=this.services?.languageUtils||new J(oe());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].includes(t.getLanguagePartFromCode(e))||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const n=new ce(e,t);return n.createInstance=ce.createInstance,n}cloneInstance(e={},t=ae){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},s=new ce(r);void 0===e.debug&&void 0===e.prefix||(s.logger=s.logger.clone(e));if(["store","services","language"].forEach(e=>{s[e]=this[e]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},n){const e=Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{});s.store=new U(e,r),s.services.resourceStore=s.store}if(e.interpolation){const t={...oe().interpolation,...this.options.interpolation,...e.interpolation},n={...r,interpolation:t};s.services.interpolator=new ee(n)}return s.translator=new K(s.services,r),s.translator.on("*",(e,...t)=>{s.emit(e,...t)}),s.init(r,t),s.translator.options=r,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const ue=ce.createInstance(),le=(ue.createInstance,ue.dir,ue.init,ue.loadResources,ue.reloadResources,ue.use),pe=ue.changeLanguage,de=(ue.getFixedT,ue.t),he=(ue.exists,ue.setDefaultNamespace,ue.hasLoadedNamespace,ue.loadNamespaces,ue.loadLanguages,["__proto__","constructor","prototype"]);function fe(e){return"string"==typeof e&&(!(0===e.length||e.length>128)&&(!(he.indexOf(e)>-1)&&(!(e.indexOf("..")>-1)&&(!(e.indexOf("\\")>-1)&&(!/[?#%:\s]/.test(e)&&!/[\x00-\x1F\x7F]/.test(e))))))}function ge(e){return!!fe(e)&&!(e.indexOf("/")>-1||e.indexOf("@")>-1)}const me={lng:ge,ns:function(e){return!!fe(e)&&!(e.indexOf("//")>-1)}};function ye(e){return"string"!=typeof e?e:e.replace(/[\r\n\x00-\x1F\x7F]/g," ")}function _e(){return"function"==typeof XMLHttpRequest||"object"==typeof XMLHttpRequest}const ve=/\{\{(.+?)\}\}/g;function be(e,t){let n=!1;const r=e.replace(ve,(e,r)=>{const s=r.trim();if(he.indexOf(s)>-1)return e;const o=t[s];if(null==o)return e;const i=me[s]||ge,a=String(o).split("+");for(const t of a)if(!i(t))return n=!0,e;return a.join("+")});return n?null:r}const Se="undefined"!=typeof globalThis?globalThis:void 0!==n.g?n.g:"undefined"!=typeof window?window:void 0;let xe;"function"==typeof fetch?xe=fetch:Se&&"function"==typeof Se.fetch&&(xe=Se.fetch);const we=_e()&&Se?Se.XMLHttpRequest:void 0,ke="function"==typeof ActiveXObject&&Se?Se.ActiveXObject:void 0,Ee=["__proto__","constructor","prototype"],Te=(e,t)=>
vendor: 5,400 bytes, line 1
1{if(t&&"object"==typeof t){let n="";for(const e of Object.keys(t))Ee.indexOf(e)>-1||(n+="&"+encodeURIComponent(e)+"="+encodeURIComponent(t[e]));if(!n)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+n.slice(1)}return e},$e=(e,t,n,r)=>{const s=e=>{if(!e.ok)return n(e.statusText||"Error",{status:e.status});e.text().then(t=>{n(null,{status:e.status,data:t})}).catch(n)};if(r){const o=r(e,t);if(o instanceof Promise)return void o.then(s).catch(n)}"function"==typeof fetch?fetch(e,t).then(s).catch(n):xe(e,t).then(s).catch(n)},Oe=(e,t,r,s)=>("function"==typeof r&&(s=r,r=void 0),s=s||(()=>{}),xe&&0!==t.indexOf("file:")?((e,t,r,s)=>{e.queryStringParams&&(t=Te(t,e.queryStringParams));const o={..."function"==typeof e.customHeaders?e.customHeaders():e.customHeaders};"undefined"==typeof window&&void 0!==n.g&&void 0!==n.g.process&&n.g.process.versions&&n.g.process.versions.node&&(o["User-Agent"]=`i18next-http-backend (node/${n.g.process.version}; ${n.g.process.platform} ${n.g.process.arch})`),r&&(o["Content-Type"]="application/json");const i="function"==typeof e.requestOptions?e.requestOptions(r):e.requestOptions,a={method:r?"POST":"GET",body:r?e.stringify(r):void 0,headers:o,...e._omitFetchOptions?{}:i},c="function"==typeof e.alternateFetch&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{$e(t,a,s,c)}catch(n){if(!i||0===Object.keys(i).length||!n.message||n.message.indexOf("not implemented")<0)return s(n);try{Object.keys(i).forEach(e=>{delete a[e]}),$e(t,a,s,c),e._omitFetchOptions=!0}catch(e){s(e)}}})(e,t,r,s):_e()||"function"==typeof ActiveXObject?((e,t,n,r)=>{n&&"object"==typeof n&&(n=Te("",n).slice(1)),e.queryStringParams&&(t=Te(t,e.queryStringParams));try{const s=we?new we:new ke("MSXML2.XMLHTTP.3.0");s.open(n?"POST":"GET",t,1),e.crossDomain||s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.withCredentials=!!e.withCredentials,n&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.overrideMimeType&&s.overrideMimeType("application/json");let o=e.customHeaders;if(o="function"==typeof o?o():o,o)for(const e of Object.keys(o))Ee.indexOf(e)>-1||s.setRequestHeader(e,o[e]);s.onreadystatechange=()=>{s.readyState>3&&r(s.status>=400?s.statusText:null,{status:s.status,data:s.responseText})},s.send(n)}catch(e){console&&console.log(e)}})(e,t,r,s):void s(new Error("No fetch and no xhr implementation found!")));var Ie=class{constructor(e,t={},n={}){this.services=e,this.options=t,this.allOptions=n,this.type="backend",this.init(e,t,n)}init(e,t={},n={}){if(this.services=e,this.options={loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:e=>JSON.parse(e),stringify:JSON.stringify,parsePayload:(e,t,n)=>({[t]:n||""}),parseLoadPayload:(e,t)=>{},request:Oe,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"},...this.options||{},...t},this.allOptions=n,this.services&&this.options.reloadInterval){const e=setInterval(()=>this.reload(),this.options.reloadInterval);"object"==typeof e&&"function"==typeof e.unref&&e.unref()}}readMulti(e,t,n){this._readAny(e,e,t,t,n)}read(e,t,n){this._readAny([e],e,[t],t,n)}_readAny(e,t,n,r,s){let o=this.options.loadPath;var i;"function"==typeof this.options.loadPath&&(o=this.options.loadPath(e,n)),o=function(e){return!!e&&"function"==typeof e.then}(i=o)?i:Promise.resolve(i),o.then(o=>{if(!o)return s(null,{});const i=be(o,{lng:e.join("+"),ns:n.join("+")});if(null==i){const t=e.map(ye).join(", "),r=n.map(ye).join(", ");return s(new Error("i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=["+t+"] namespaces=["+r+"]"),!1)}this.loadUrl(i,s,t,r)})}loadUrl(e,t,n,r){const s="string"==typeof n?[n]:n,o="string"==typeof r?[r]:r,i=this.options.parseLoadPayload(s,o),a=ye(function(e){if("string"!=typeof e||0===e.length)return e;try{const t=new URL(e);return t.username||t.password?(t.username="",t.password="",t.toString()):e}catch(t){return e.replace(/(\/\/)[^/@\s]+@/g,"$1")}}(e));this.options.request(this.options,e,i,(e,s)=>{if(s&&(s.status>=500&&s.status<600||!s.status))return t("failed loading "+a+"; status code: "+s.status,!0);if(s&&s.status>=400&&s.status<500)return t("failed loading "+a+"; status code: "+s.status,!1);if(!s&&e&&e.message){const n=e.message.toLowerCase();if(["failed","fetch","network","load"].find(e=>n.indexOf(e)>-1))return t("failed loading "+a+": "+ye(e.message),!0)}if(e)return t(e,!1);let o,i;try{o="string"==typeof s.data?this.options.parse(s.data,n,r):s.data}catch(e){i="failed parsing "+a+" to json"}if(i)return t(i,!1);t(null,o)})}create(e,t,n,r,s){if(!this.options.addPath)return;"string"==typeof e&&(e=[e]);const o=this.options.parsePayload(t,n,r);let i=0;const a=[],c=[];e.forEach(n=>{let r=this.options.addPath;"function"==typeof this.options.addPath&&(r=this.options.addPath(n,t));const u=be(r,{lng:n,ns:t});if(null==u)return i+=1,void(s&&i===e.length&&s(a,c));this.options.request(this.options,u,o,(t,n)=>{i+=1,a.push(t),c.push(n),i===e.length&&"function"==typeof s&&s(a,c)})})}reload(){const{backendConnector:e,languageUtils:t,logger:n}=this.services,r=e.language;if(r&&"cimode"===r.toLowerCase())return;const s=[],o=e=>{t.toResolveHierarchy(e).forEach(e=>{s.indexOf(e)<0&&s.push(e)})};o(r),this.allOptions.preload&&this.allOptions.preload.forEach(e=>
1o(e)),s.forEach(t=>{this.allOptions.ns.forEach(r=>{e.read(t,r,"read",null,null,(s,o)=>{s&&n.warn(`loading namespace ${r} for language ${t} failed`,s),!s&&o&&n.log(`loaded namespace ${r} for language ${t}`,o),e.loaded(`${t}|${r}`,s,o)})})})}};Ie.type="backend";const Ce={en:{ymd:"%m/%d/%Y",md:"%m/%d"},ja:{ymd:"%Y/%m/%d",md:"%m/%d"}},Le=Ce.ja;function Re(e){if(e=e.toLowerCase().replace("-","_"),Object.hasOwn(Ce,e))return Ce[e];const[t]=e.split("_",2);return Object.hasOwn(Ce,t)?Ce[t]:Ce.ja}function Pe(e,t){const n=e.getHours()%12,r=e.getTimezoneOffset(),s=r<=0,o=Math.abs(r);return t.replace(/%(.)/g,(t,r)=>{switch(r){case"d":return`0${e.getDate()}`.slice(-2);case"F":return`${e.getFullYear()}-${`0${e.getMonth()+1}`.slice(-2)}-${`0${e.getDate()}`.slice(-2)}`;case"H":return`0${e.getHours()}`.slice(-2);case"I":return`0${0===n?12:n}`.slice(-2);case"m":return`0${e.getMonth()+1}`.slice(-2);case"M":return`0${e.getMinutes()}`.slice(-2);case"R":return`0${e.getHours()}:`.slice(-3)+`0${e.getMinutes()}`.slice(-2);case"S":return`0${e.getSeconds()}`.slice(-2);case"T":return`0${e.getHours()}:`.slice(-3)+`0${e.getMinutes()}:`.slice(-3)+`0${e.getSeconds()}`.slice(-2);case"y":return e.getFullYear().toString().slice(-2);case"Y":return e.getFullYear().toString();case"z":return(s?"+":"-")+`0${Math.floor(o/60)}`.slice(-2)+("0"+o%60).slice(-2);case"%":return"%";default:return t}})}function Ne(e,t,n,r,s,o=void 0){let i="";if(t){const e=o?Re(o):Le;i=r?e.ymd:e.md,n&&(i+=" ")}n&&(i+="%H:%M",s&&(i+=":%S"));return Pe("number"==typeof e?new Date(e):e,i)}function Ae(e,t=void 0){let n=(t?Re(t):Le).ymd;const r=n.indexOf("%d");switch(r){case 0:n=n.slice(3);break;case n.length-2:n=n.slice(0,r-1);break;default:n=n.slice(0,r)+n.slice(r+3)}return Pe("number"==typeof e?new Date(e):e,n)}function je(e,...t){if("string"==typeof e)return e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;");let n="";for(let r=0;r<t.length;r++)n+=e[r],n+=t[r].replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;");return n+=e[e.length-1],n}const De={debug:!1,fallbackLng:["ja","en"],lng:window.i18nLanguage,ns:void 0===window.i18nNamespace?["common"]:[...window.i18nNamespace,"common"],defaultNS:window.i18nNamespace?.[0]??"common",supportedLngs:["ja","en"],backend:{loadPath:"/i18n/{{lng}}/{{ns}}.json",queryStringParams:{v:"a52ddc4"}}},Me=[{name:"ymdhms",date:!0,time:!0,year:!0,second:!0},{name:"ymdhm",date:!0,time:!0,year:!0,second:!1},{name:"ymd",date:!0,time:!1,year:!0,second:!1},{name:"ym",date:!0,time:!1,year:!0,second:!1,ym:!0},{name:"mdhms",date:!0,time:!0,year:!1,second:!0},{name:"mdhm",date:!0,time:!0,year:!1,second:!1},{name:"md",date:!0,time:!1,year:!1,second:!1},{name:"hms",date:!1,time:!0,year:!1,second:!0},{name:"hm",date:!1,time:!0,year:!1,second:!1}],Fe=e=>{for(const t of Me){const n=document.querySelectorAll(`[data-${t.name}]`);for(let r=0;r<n.length;r++)try{const s=n[r],o=s.getAttribute(`data-${t.name}`);if(!o)continue;const i=new Date(/^\d+$/.test(o)?1e3*parseInt(o,10):o);if(Number.isNaN(i.getTime()))continue;t.ym?s.textContent=Ae(i,e):s.textContent=Ne(i,t.date,t.time,t.year,t.second,e)}catch(e){console.error(e)}}},qe=[{name:"int",style:"decimal",defaultDigits:0},{name:"float",style:"decimal",defaultDigits:2},{name:"percent",style:"percent",defaultDigits:2}],He=(e,t,n,r)=>new Intl.NumberFormat(t,{style:n,minimumFractionDigits:"decimal"===n?r:0,maximumFractionDigits:r}).format(e),Ue=e=>{for(const t of qe){const n=document.querySelectorAll(`[data-${t.name}]`);for(let r=0;r<n.length;r++)try{const s=n[r],o=s.getAttribute(`data-${t.name}`);if(!o)continue;const i=Number(o);if(Number.isNaN(i))continue;const a=s.getAttribute("data-digits"),c=null!==a?parseInt(a,10):t.defaultDigits;s.textContent=He(i,e,t.style,c)}catch(e){console.error(e)}}},Be=e=>{(()=>{const e=document.querySelectorAll("[data-i18n]");for(let t=0;t<e.length;t++)try{const n=e[t],r=n.getAttribute("data-i18n");if(!r)continue;let s={};const o=n.getAttribute("data-i18n-values");if(o){const e=JSON.parse(o);"object"==typeof e&&e&&(s=e)}let i=de(r,{...s,returnDetails:!1});
1"prefix"in s&&(i=je(s.prefix)+i),"suffix"in s&&(i+=je(s.suffix)),n.innerHTML=i}catch(e){console.error(e)}})(),Fe(e),Ue(e),f("language",e),document.documentElement.setAttribute("lang",e)},ze=async()=>{await le(Ie).init(De).then(()=>{if((()=>{for(const e of Me)ue.services.formatter?.add(e.name,(t,n)=>{const r=new Date(1e3*t);return Number.isNaN(r.getTime())?String(t):e.ym?Ae(r,n):Ne(r,e.date,e.time,e.year,e.second,n)})})(),window.additionalI18nResources){for(const e in window.additionalI18nResources){const t=window.additionalI18nResources[e];for(const n in t)ue.addResourceBundle(e,n,t[n],!0,!0)}return!0}}).catch(e=>console.error(e)),window.i18n=ue,window.dispatchEvent(new CustomEvent("i18nInitialized",{detail:ue})),ue.on("languageChanged",Be);const e=ue.language;Fe(e),Ue(e);const t=document.getElementsByClassName("change-language-button");for(let e=0;e<t.length;e++){const n=t[e];n.addEventListener("click",()=>{const e=n.getAttribute("data-lang");e&&pe(e).catch(e=>console.warn(e))})}};function Ve(){b(),ze().catch(e=>console.warn(e))}},337:function(e,t,n){n.d(t,{i:function(){return Dc}});const r="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,s="10.75.1",o=globalThis;function i(){return a(o),o}function a(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||s,t[s]=t[s]||{}}function c(e,t,n=o){const r=n.__SENTRY__=n.__SENTRY__||{},i=r[s]=r[s]||{};return i[e]||(i[e]=t())}const u=["debug","info","warn","error","log","assert","trace"],l={};function p(e){if(!("console"in o))return e();const t=o.console,n={},r=Object.keys(l);r.forEach(e=>{const r=l[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}function d(){return f().enabled}function h(e,...t){r&&d()&&p(()=>{o.console[e](`Sentry Logger [${e}]:`,...t)})}function f(){return r?c("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const g={enable:function(){f().enabled=!0},disable:function(){f().enabled=!1},isEnabled:d,log:function(...e){h("log",...e)},warn:function(...e){h("warn",...e)},error:function(...e){h("error",...e)}};const m=[];function y(e){const t=e.defaultIntegrations||[],n=e.integrations;let r;if(t.forEach(e=>{e.isDefaultInstance=!0}),Array.isArray(n))r=[...t,...n];else if("function"==typeof n){const e=n(t);r=Array.isArray(e)?e:[e]}else r=t;return function(e){const t={};return e.forEach(e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}(r)}function _(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function v(e,t,n){if(n[t.name])r&&g.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,m.includes(t.name)||"function"!=typeof t.setupOnce||(t.setupOnce(),m.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),"function"==typeof t.preprocessEvent){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(t,r)=>n(t,r,e))}if("function"==typeof t.processEvent){const n=t.processEvent.bind(t),r=Object.assign((t,r)=>n(t,r,e),{id:t.name});e.addEventProcessor(r)}["processSpan","processSegmentSpan"].forEach(n=>{const r=t[n];"function"==typeof r&&e.on(n,n=>r.call(t,n,e))}),r&&g.log(`Integration installed: ${t.name}`)}}function b(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}const S=Object.prototype.toString;function x(e){switch(S.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return P(e,Error)}}function w(e,t){return S.call(e)===`[object ${t}]`}function k(e){return w(e,"ErrorEvent")}function E(e){return w(e,"DOMError")}function T(e){return w(e,"String")}function $(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function O(e){return null===e||$(e)||"object"!=typeof e&&"function"!=typeof e}function I(e){return w(e,"Object")}function C(e){return"object"==typeof e&&null!==e}function L(e){return"undefined"!=typeof Event&&P(e,Event)}function R(e){return Boolean(e?.then&&"function"==typeof e.then)}function P(e,t){try{return e instanceof t}catch{return!1}}function N(e){return"undefined"!=typeof Request&&P(e,Request)}function A(e,t,n){if(!(t in e))return;const s=e[t];if("function"!=typeof s)return;const o=n(s);"function"==typeof o&&D(o,s);try{e[t]=o}catch{r&&g.log(`Failed to replace method "${t}" in object`,e)}}function j(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{r&&g.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function D(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,j(e,"__sentry_original__",t)}catch{}}function M(e){return e.__sentry_original__}function F(e){if(x(e))return{message:e.message,name:e.name,stack:e.stack,...q(e)};
1if(L(e)){const{type:t,target:n,currentTarget:r,detail:s}=e;return{type:t,target:n,currentTarget:r,...s?{detail:s}:{},...q(e)}}return e}function q(e){return C(e)?Object.fromEntries(Object.entries(e)):{}}let H;function U(e){if(void 0!==H)return H?H(e):e();const t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=o;return t in n&&"function"==typeof n[t]?(H=n[t],H(e)):(H=null,e())}function B(){return U(()=>Math.random())}function z(){return U(()=>Date.now())}let V;function W(e=function(){const e=o;return e.crypto||e.msCrypto}()){try{if(e?.randomUUID)return U(()=>e.randomUUID()).replace(/-/g,"")}catch{}return V||(V="10000000100040008000100000000000"),V.replace(/[018]/g,e=>(e^(16*B()&15)>>e/4).toString(16))}function K(e){return e.exception?.values?.[0]}function J(e){const{message:t,event_id:n}=e;if(t)return t;const r=K(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Y(e,t,n){const r=e.exception=e.exception||{},s=r.values=r.values||[],o=s[0]=s[0]||{};o.value||(o.value=t||""),o.type||(o.type=n||"Error")}function G(e,t){const n=K(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r?.data,...t.data};n.mechanism.data=e}}function X(e){if(function(e){try{return e.__sentry_captured__}catch{}}(e))return!0;try{j(e,"__sentry_captured__",!0)}catch{}return!1}const Q=Symbol.for("sentry.skipNormalization"),Z=Symbol.for("sentry.overrideNormalizationDepth");const ee=/\(error: (.*)\)/,te=/captureMessage|captureException/;function ne(...e){const t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{const s=[],o=e.split("\n");for(let e=n;e<o.length;e++){let n=o[e];n.length>1024&&(n=n.slice(0,1024));const i=ee.test(n)?n.replace(ee,"$1"):n;if(!i.includes("Error: ")){for(const e of t){const t=e(i);if(t){s.push(t);break}}if(s.length>=50+r)break}}return function(e){if(!e.length)return[];const t=Array.from(e);/sentryWrapped/.test(re(t).function||"")&&t.pop();t.reverse(),te.test(re(t).function||"")&&(t.pop(),te.test(re(t).function||"")&&t.pop());return t.slice(0,50).map(e=>({...e,filename:e.filename||re(t).filename,function:e.function||"?"}))}(s.slice(r))}}function re(e){return e[e.length-1]||{}}const se="<anonymous>";function oe(e){try{return e&&"function"==typeof e&&e.name||se}catch{return se}}function ie(e){const t=e.exception;if(t){const e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch{return}}}let ae;function ce(e,t=100,n=1/0){try{return le("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function ue(e,t=3,n=102400){const r=ce(e,t);return s=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(s))>n?ue(e,t-1,n):r;var s}function le(e,t,n=1/0,r=1/0,s=function(){const e=new WeakSet;function t(t){return!!e.has(t)||(e.add(t),!1)}function n(t){e.delete(t)}return[t,n]}()){const[o,i]=s;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const a=pe(e,t);if(!a.startsWith("[object "))return a;if(function(e){return Boolean(e[Q])}(t))return t;const c=function(e){const t=e[Z];return"number"==typeof t?t:void 0}(t),u=void 0!==c?c:n;
1if(0===u)return a.replace("object ","");if(o(t))return"[Circular ~]";const l=t;if(l&&"function"==typeof l.toJSON)try{return le("",l.toJSON(),u-1,r,s)}catch{}const p=Array.isArray(t)?[]:{};let d=0;const h=F(t);for(const e in h){if(!Object.prototype.hasOwnProperty.call(h,e))continue;if(d>=r){p[e]="[MaxProperties ~]";break}const t=h[e];p[e]=le(e,t,u-1,r,s),d++}return i(t),p}function pe(e,t){try{if(ae){const e=ae(t);if(e)return e}if(void 0!==n.g&&t===n.g)return"[Global]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${oe(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const e=function(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}(t);return`[object ${e}]`}catch(e){return`**non-serializable** (${e})`}}function de(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function he(e,t){if(!Array.isArray(e))return"";const n=[];for(let t=0;t<e.length;t++){const r=e[t];O(r)?n.push(String(r)):r instanceof Error?n.push(r.message?`${r.name}: ${r.message}`:r.name):n.push(pe(0,r))}return n.join(t)}function fe(e,t,n=!1){return!!T(e)&&(w(t,"RegExp")?t.test(e):T(t)?n?e===t:e.includes(t):"function"==typeof t&&t(e))}function ge(e,t=[],n=!1){for(const r of t)if(fe(e,r,n))return!0;return!1}const me=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,/can't redefine non-configurable property "solana"/,/vv\(\)\.getRestrictions is not a function/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/Java exception was raised during method invocation$/,/Java object is gone$/],ye=(e={})=>{let t;return{name:"EventFilters",setup(n){const r=n.getOptions();t=ve(e,r)},processEvent(n,s,o){if(!t){const n=o.getOptions();t=ve(e,n)}return function(e,t){if(e.type){if("transaction"===e.type&&function(e,t){if(!t?.length)return!1;const n=e.transaction;return!!n&&ge(n,t)}(e,t.ignoreTransactions))return r&&g.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${J(e)}`),!0}else{if(function(e,t){if(!t?.length)return!1;return b(e).some(e=>ge(e,t))}(e,t.ignoreErrors))return r&&g.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${J(e)}`),!0;if(function(e){if(!e.exception?.values?.length)return!1;return!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&"Error"!==e.type||e.value)}(e))return r&&g.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${J(e)}`),!0;if(function(e,t){if(!t?.length)return!1;const n=be(e);return!!n&&ge(n,t)}(e,t.denyUrls))return r&&g.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${J(e)}.\nUrl: ${be(e)}`),!0;if(!function(e,t){if(!t?.length)return!0;const n=be(e);return!n||ge(n,t)}(e,t.allowUrls))return r&&g.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${J(e)}.\nUrl: ${be(e)}`),!0}return!1}(n,t)?null:n}}},_e=(e={})=>({...ye(e),name:"InboundFilters"});function ve(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:me],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function be(e){try{const t=[...e.exception?.values??[]].reverse().find(e=>void 0===e.mechanism?.parent_id&&e.stacktrace?.frames?.length),n=t?.stacktrace?.frames;return n?function(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(n):null}catch{return r&&g.error(`Cannot extract url for event ${J(e)}`),null}}function Se(){return z()/1e3}let xe;function we(){return(xe??(xe=function(){const{performance:e}=o;if(!e?.now||!e.timeOrigin)return Se;const t=e.timeOrigin;return()=>(t+U(()=>e.now()))/1e3}()))()}let ke=null;function Ee(){return null===ke&&(ke=function(){const{performance:e}=o;if(!e?.now)return;const t=3e5,n=U(()=>e.now()),r=z(),s=e.timeOrigin;if("number"==typeof s&&Math.abs(s+n-r)<t)return s;const i=e.timing?.navigationStart;if("number"==typeof i&&Math.abs(i+n-r)<t)return i;return r-n}()),ke}
vendor: 7,753 bytes, line 1
1function Te(e){const t=we(),n={sid:W(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return{sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}(n)};return e&&$e(n,e),n}function $e(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||we(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:W()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Oe(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&0===Object.keys(t).length)return e;const r={...e};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=Oe(r[e],t[e],n-1));return r}function Ie(){return W()}function Ce(){return W().substring(16)}function Le(e){try{const t=o.WeakRef;if("function"==typeof t)return new t(e)}catch{}return e}function Re(e){if(e){if("object"==typeof e&&"deref"in e&&"function"==typeof e.deref)try{return e.deref()}catch{return}return e}}const Pe="_sentrySpan";function Ne(e,t){t?j(e,Pe,Le(t)):delete e[Pe]}function Ae(e){return Re(e[Pe])}class je{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Ie(),sampleRand:B()}}clone(){const e=new je;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._attributes={...this._attributes},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,e._conversationId=this._conversationId,Ne(e,Ae(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&$e(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(e){return this._conversationId=e||void 0,this._notifyScopeListeners(),this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this.setTags({[e]:t})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,t){return this.setAttributes({[e]:t})}removeAttribute(e){return e in this._attributes&&(delete this._attributes[e],this._notifyScopeListeners()),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"==typeof e?e(this):e,n=t instanceof je?t.getScopeData():I(t)?e:void 0,{tags:r,attributes:s,extra:o,user:i,contexts:a,level:c,fingerprint:u=[],propagationContext:l,conversationId:p}=n||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...s},this._extra={...this._extra,...o},this._contexts={...this._contexts,...a},i&&Object.keys(i).length&&(this._user=i),c&&(this._level=c),u.length&&(this._fingerprint=u),l&&(this._propagationContext=l),p&&(this._conversationId=p),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,Ne(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Ie(),sampleRand:B()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:Se(),...e,message:e.message?de(e.message,2048):e.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Ae(this),conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Oe(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t?.event_id||W();if(!this._client)return r&&g.warn("No client configured on scope - will not capture exception!"),n;const s=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:s,...t,event_id:n},this),n}captureMessage(e,t,n){const s=n?.event_id||W();if(!this._client)return r&&g.warn("No client configured on scope - will not capture message!"),s;const o=n?.syntheticException??new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:o,...n,event_id:s},this),s}captureEvent(e,t){const n=e.event_id||t?.event_id||W();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(r&&g.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEac
1h(e=>{e(this)}),this._notifyingListeners=!1)}}const De=e=>e instanceof Promise&&!e[Me],Me=Symbol("chained PromiseLike"),Fe=(e,t)=>{if(!t)return e;let n=!1;for(const r in e){if(r in t)continue;n=!0;const s=e[r];"function"==typeof s?Object.defineProperty(t,r,{value:(...t)=>s.apply(e,t),enumerable:!0,configurable:!0,writable:!0}):t[r]=s}return n&&Object.assign(t,{[Me]:!0}),t};class qe{constructor(e,t){let n,r;n=e||new je,r=t||new je,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(e){throw this._popScope(),e}return R(n)?((e,t,n)=>{const r=e.then(e=>(t(e),e),e=>{throw n(e),e});return De(r)&&De(e)?r:Fe(e,r)})(n,()=>this._popScope(),()=>this._popScope()):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function He(){const e=a(i());return e.stack=e.stack||new qe(c("defaultCurrentScope",()=>new je),c("defaultIsolationScope",()=>new je))}function Ue(e){return He().withScope(e)}function Be(e,t){const n=He();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function ze(e){return He().withScope(()=>e(He().getIsolationScope()))}function Ve(e){const t=a(e);return t.acs?t.acs:{withIsolationScope:ze,withScope:Ue,withSetScope:Be,withSetIsolationScope:(e,t)=>ze(t),getCurrentScope:()=>He().getScope(),getIsolationScope:()=>He().getIsolationScope()}}let We;function Ke(){return Ve(i()).getCurrentScope()}function Je(){return Ve(i()).getIsolationScope()}function Ye(...e){const t=Ve(i());if(2===e.length){const[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function Ge(){return Ke().getClient()}function Xe(e){const t=We?.();if(t)return{trace_id:t.traceId,span_id:t.spanId};const n=e.getPropagationContext(),{traceId:r,parentSpanId:s,propagationSpanId:o}=n,i={trace_id:r,span_id:o||Ce()};return s&&(i.parent_span_id=s),i}const Qe=new WeakMap,Ze=()=>({name:"FunctionToString",setupOnce(){const e=Function.prototype.toString;try{Function.prototype.toString=function(...t){const n=M(this);let r;try{Qe.has(Ge())&&void 0!==n&&(r=n)}catch{}return e.apply(r??this,t)}}catch{}},setup(e){Qe.set(e,!0)}}),et="sentry.source",tt="sentry.sample_rate",nt="sentry.previous_trace_sample_rate",rt="sentry.op",st="sentry.origin",ot="sentry.status.message",it="sentry.idle_span_finish_reason",at="sentry.measurement_unit",ct="sentry.measurement_value",ut="sentry.custom_span_name",lt="sentry.profile_id",pt="sentry.exclusive_time",dt="sentry.link.type";function ht(e,t){const{value:n,unit:r}="object"==typeof(s=e)&&null!=s&&!Array.isArray(s)&&Object.keys(s).includes("value")?e:{value:e,unit:void 0};var s;const o=function(e){if(Array.isArray(e))return{value:e,type:"array"};const t="string"==typeof e?"string":"boolean"==typeof e?"boolean":"number"!=typeof e||Number.isNaN(e)?null:Number.isInteger(e)?"integer":"double";if(t)return{value:e,type:t}}(n),i=r&&"string"==typeof r?{unit:r}:{};if(o)return{...o,...i};if(!t||"skip-undefined"===t&&void 0===n)return;let a="";try{a=JSON.stringify(n)??""}catch{}return{value:a,type:"string",...i}}function ft(e,t=!1){const n={};for(const[r,s]of Object.entries(e??{})){const e=ht(s,t);e&&(n[r]=e)}return n}const gt="_sentryScope",mt="_sentryIsolationScope",yt=Symbol.for("sentry.otelSourceInference"),_t=Symbol.for("sentry.otelSourceExplicitlySet"),vt=Symbol.for("sentry.tracerProviderSpan");function bt(e,t,n){e&&(j(e,mt,Le(n)),j(e,gt,t))}function St(e){const t=e;return{scope:t[gt],isolationScope:Re(t[mt])}}function xt(e){return!0===e[yt]}function wt(e){return!0===e[vt]}const kt="sentry-";function Et(e){const t=Tt(e);if(!t)return;const n=Object.entries(t).reduce((e,[t,n])=>{if(t.startsWith(kt)){e[t.slice(7)]=n}return e},{});return Object.keys(n).length>0?n:void 0}function Tt(e){if(e&&(T(e)||Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>
1{const n=$t(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):$t(e)}function $t(e){return e.split(",").map(e=>{const t=e.indexOf("=");if(-1===t)return[];return[e.slice(0,t),e.slice(t+1)].map(e=>{try{return decodeURIComponent(e.trim())}catch{return}})}).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}function Ot(e){if(0!==Object.keys(e).length)return Object.entries(e).reduce((e,[t,n],s)=>{const o=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`,i=0===s?o:`${e},${o}`;return i.length>8192?(r&&g.warn(`Not adding key: ${t} with val: ${n} to baggage header due to exceeding baggage size limits.`),e):i},"")}function It(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;return"number"!=typeof t||isNaN(t)||t<0||t>1?void 0:t}const Ct=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Lt(e,t){const n=function(e){if(!e)return;const t=e.match(Ct);if(!t)return;let n;return"1"===t[3]?n=!0:"0"===t[3]&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}(e),r=Et(t);if(!n?.traceId)return{traceId:Ie(),sampleRand:B()};const s=function(e,t){const n=It(t?.sample_rand);if(void 0!==n)return n;const r=It(t?.sample_rate);return r&&void 0!==e?.parentSampled?e.parentSampled?B()*r:r+B()*(1-r):B()}(n,r);r&&(r.sample_rand=s.toString());const{traceId:o,parentSpanId:i,parentSampled:a}=n;return{traceId:o,parentSpanId:i,sampled:a,dsc:r||{},sampleRand:s}}function Rt(e=Ie(),t=Ce(),n){let r="";return void 0!==n&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function Pt(e=Ie(),t=Ce(),n){return`00-${e}-${t}-${n?"01":"00"}`}let Nt=!1;function At(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:s,parent_span_id:o,status:i,origin:a,links:c}=Ht(e);return{parent_span_id:o,span_id:t,trace_id:n,data:r,op:s,status:i,origin:a,links:c}}function jt(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),s=r?t:Ht(e).parent_span_id,o=St(e).scope;return{parent_span_id:s,span_id:r?o?.getPropagationContext().propagationSpanId||Ce():t,trace_id:n}}function Dt(e){return e&&e.length>0?e.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:s})=>({span_id:e,trace_id:t,sampled:1===n,attributes:s,...r})):void 0}function Mt(e){return e?.length?e.map(({context:{spanId:e,traceId:t,traceFlags:n},attributes:r})=>({span_id:e,trace_id:t,sampled:1===n,attributes:r})):void 0}function Ft(e){return"number"==typeof e?qt(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?qt(e.getTime()):we()}function qt(e){return e>9999999999?e/1e3:e}function Ht(e){if(Vt(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(zt(e)){const{attributes:r,startTime:s,name:o,endTime:i,status:a,links:c}=e;return{span_id:t,trace_id:n,data:r,description:o,parent_span_id:Bt(e),start_timestamp:Ft(s),timestamp:Ft(i)||void 0,status:Kt(a),op:r[rt],origin:r[st],links:Dt(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function Ut(e){if(Vt(e))return e.getStreamedSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(zt(e)){const{attributes:r,startTime:s,name:o,endTime:i,status:a,links:c}=e;return{name:o,span_id:t,trace_id:n,parent_span_id:Bt(e),start_timestamp:Ft(s),end_timestamp:Ft(i),is_segment:e===tn(e),status:Jt(a),attributes:Yt(r,a),links:Mt(c)}}return{span_id:t,trace_id:n,start_timestamp:0,name:"",end_timestamp:0,status:"ok",is_segment:e===tn(e)}}function Bt(e){return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0}function zt(e){const t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}function Vt(e){return"function"==typeof e.getSpanJSON}function Wt(e){const{traceFlags:t}=e.spanContext();return 1===t}function Kt(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"internal_error"}function Jt(e){return e&&1!==e.code&&0!==e.code&&"cancelled"!==e.message?"error":"ok"}function Yt(e,t){const n="error"===Jt(t)?t?.message:void 0;return{...n&&{[ot]:n},...e}}const Gt="_sentryChildSpans",Xt="_sentryRootSpan";function Qt(e,t){const n=e[Xt]||e;j(t,Xt,n),Wt(e)&&(e.isRecording()||n.isRecording())&&(e[Gt]?e[Gt].add(t):j(e,Gt,new Set([t])))}function Zt(e){const t=new Set;return function e(n){if(!t.has(n)&&Wt(n)){t.add(n);const r=n[Gt]?Array.from(n[Gt]):[];for(const t of r)e(t)}}(e),Array.from(t)}const en=tn;function tn(e){return e[Xt]||e}function nn(){const e=Ve(i());return e.getActiveSpan?e.getActiveSpan():Ae(Ke())}function rn(){Nt||(p(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),Nt=!0)}const sn=()=>({name:"ConversationId",setup(e){e.on("spanStart",e=>{const t=Ke().getScopeData(),n=Je().getScopeData(),r=t.conversationId||n.conversationId;if(r){const{op:t,data:n,description:s}=Ht(e);
1if(!t?.startsWith("gen_ai.")&&!n["ai.operationId"]&&!s?.startsWith("ai."))return;e.setAttribute("gen_ai.conversation.id",r)}})}}),on=()=>{let e;return{name:"Dedupe",processEvent(t){if(t.type)return t;try{if(function(e,t){if(!t)return!1;if(function(e,t){const n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!cn(e,t))return!1;if(!an(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){const n=un(t),r=un(e);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!cn(e,t))return!1;if(!an(e,t))return!1;return!0}(e,t))return!0;return!1}(t,e))return r&&g.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}};function an(e,t){let n=ie(e),r=ie(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let e=0;e<r.length;e++){const t=r[e],s=n[e];if(t.filename!==s.filename||t.lineno!==s.lineno||t.colno!==s.colno||t.function!==s.function)return!1}return!0}function cn(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch{return!1}}function un(e){return e.exception?.values?.[0]}function ln(e,t){!0===t.debug&&(r?g.enable():p(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")}));Ke().update(t.initialScope);const n=new e(t);return function(e){Ke().setClient(e)}(n),n.init(),n}function pn(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function dn(e,t,n){return t||`${function(e){return`${pn(e)}${e.projectId}/envelope/`}(e)}?${function(e,t){const n={sentry_version:"7"};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}(e,n)}`}const hn="production",fn=/^o(\d+)\./,gn=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function mn(e,t=!1){const{host:n,path:r,pass:s,port:o,projectId:i,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&s?`:${s}`:""}@${n}${o?`:${o}`:""}/${r?`${r}/`:r}${i}`}function yn(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function _n(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=function(e){const t=e.match(fn);return t?.[1]}(n)),r}function vn(e){const t="string"==typeof e?function(e){const t=gn.exec(e);if(!t)return void p(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});const[n,r,s="",o="",i="",a=""]=t.slice(1);let c="",u=a;const l=u.split("/");if(l.length>1&&(c=l.slice(0,-1).join("/"),u=l.pop()),u){const e=u.match(/^\d+/);e&&(u=e[0])}return yn({host:o,pass:s,path:c,projectId:u,port:i,protocol:n,publicKey:r})}(e):yn(e);if(t&&function(e){if(!r)return!0;const{port:t,projectId:n,protocol:s}=e;return!(["protocol","publicKey","host","projectId"].find(t=>!e[t]&&(g.error(`Invalid Sentry Dsn: ${t} missing`),!0))||(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(s)?t&&isNaN(parseInt(t,10))&&(g.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(g.error(`Invalid Sentry Dsn: Invalid protocol ${s}`),1):(g.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}function bn(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=e||Ge()?.getOptions();return!(!t||null==t.tracesSampleRate&&!t.tracesSampler)}const Sn=Symbol.for("sentry.nonRecordingSpan");class xn{constructor(e={}){this._traceId=e.traceId||Ie(),this._spanId=e.spanId||Ce(),this.dropReason=e.dropReason,j(this,Sn,!0)}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:0}}end(e){}setAttribute(e,t){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,t,n){return this}addLink(e){return this}addLinks(e){return this}recordException(e,t){}}function wn(e){return!!e&&!0===e[Sn]}const kn="_frozenDsc";function En(e,t){j(e,kn,t)}function Tn(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},s={environment:n.environment||hn,release:n.release,public_key:r,trace_id:e,org_id:_n(t)};return t.emit("createDsc",s),s}function $n(e,t){const n=t.getPropagationContext();return n.dsc||Tn(n.traceId,e)}
1function On(e){const t=Ge();if(!t)return{};const n=en(e),r=Ht(n),s=r.data,o=n.spanContext().traceState,i=o?.get("sentry.sample_rate")??s[tt]??s[nt];function a(e){return"number"!=typeof i&&"string"!=typeof i||(e.sample_rate=`${i}`),e}const c=n[kn];if(c)return a(c);const u=wn(n),l=u&&"ignored"===n.dropReason;if(u&&(!bn(t.getOptions())||l)){const e=St(n).scope;if(e){const n={...$n(t,e)};return l&&(n.sampled="false"),a(n)}}const p=o?.get("sentry.dsc"),d=p&&Et(p);if(d)return a(d);const h=Tn(e.spanContext().traceId,t),f=s[et]??s["sentry.segment.name.source"],g=r.description;return"url"!==f&&g&&(h.transaction=g),bn()&&(h.sampled=String(Wt(n)),h.sample_rand=o?.get("sentry.sample_rand")??St(n).scope?.getPropagationContext().sampleRand.toString()),a(h),t.emit("createDsc",h,n),h}function In(e){return!!e&&"function"==typeof e&&"_streamed"in e&&!!e._streamed}function Cn(e,t=[]){return[e,t]}function Ln(e,t){const[n,r]=e;return[n,[...r,t]]}function Rn(e,t){const n=e[1];for(const e of n){if(t(e,e[0].type))return!0}return!1}function Pn(e){const t=a(o);return t.encodePolyfill?t.encodePolyfill(e):(new TextEncoder).encode(e)}function Nn(e){const[t,n]=e;let r=JSON.stringify(t);function s(e){"string"==typeof r?r="string"==typeof e?r+e:[Pn(r),e]:r.push("string"==typeof e?Pn(e):e)}for(const e of n){const[t,n]=e;if(s(`\n${JSON.stringify(t)}\n`),"string"==typeof n||n instanceof Uint8Array)s(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(ce(n))}s(e)}}return"string"==typeof r?r:function(e){const t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}(r)}function An(e){return[{type:"span"},e]}function jn(e){const t="string"==typeof e.data?Pn(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const Dn={sessions:"session",event:"error",client_report:"internal",user_report:"default",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",raw_security:"security",log:"log_item",trace_metric:"metric"};function Mn(e){return function(e){return e in Dn}(e)?Dn[e]:e}function Fn(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function qn(e){g.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function Hn(e,t){if(!t?.length)return!1;for(const n of t){if(zn(n)){if(e.description&&fe(e.description,n))return r&&qn(e),!0;continue}const t=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!t)continue;const s=!n.name||e.description&&fe(e.description,n.name),o=!n.op||e.op&&fe(e.op,n.op),i=!n.attributes||Object.entries(n.attributes).every(([t,n])=>Un(e.attributes?.[t],n));if(s&&o&&i)return r&&qn(e),!0}return!1}function Un(e,t){return"string"==typeof e&&("string"==typeof t||t instanceof RegExp)?fe(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e===t}function Bn(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const t of e)t.parent_span_id===r&&(t.parent_span_id=n)}function zn(e){return"string"==typeof e||e instanceof RegExp}function Vn(e,t,n,r){const s=Fn(n),o=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){if(!t)return e;const n=e.sdk||{};e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0}}(e,n?.sdk);const i=function(e,t,n,r){const s=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(z()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:mn(r)},...s&&{trace:s}}}(e,s,r,t);delete e.sdkProcessingMetadata;return Cn(i,[[{type:o},e]])}function Wn(){return!("undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function Kn(){return"undefined"!=typeof window&&(!Wn()||function(){const e=o.process;return"renderer"===e?.type}())}function Jn(e,t){const n=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...Kn()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function Yn(e,t){const n=t??Gn(e)??[];if(0===n.length)return;
1const r=e.getOptions(),s=function(e,t,n,r,s){const o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=mn(r)),Cn(o,[Jn(e,s)])}(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);Xn().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(s)}function Gn(e){return Xn().get(e)}function Xn(){return c("clientToLogBufferMap",()=>new WeakMap)}function Qn(e,t){const n=t?"auto":"never";return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{version:2,...Kn()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function Zn(e,t){const n=t??er(e)??[];if(0===n.length)return;const r=e.getOptions(),s=function(e,t,n,r,s){const o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=mn(r)),Cn(o,[Qn(e,s)])}(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);tr().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(s)}function er(e){return tr().get(e)}function tr(){return c("clientToMetricBufferMap",()=>new WeakMap)}function nr(e){return"stream"===e.getOptions().traceLifecycle}function rr(e){const t={trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,name:e.description||"",start_timestamp:e.start_timestamp,end_timestamp:e.timestamp||e.start_timestamp,status:e.status&&"ok"!==e.status&&"cancelled"!==e.status?"error":"ok",is_segment:!1,attributes:{...e.data},links:e.links};return n=t,{...n,attributes:ft(n.attributes),links:n.links?.map(e=>({...e,attributes:ft(e.attributes)}))};var n}function sr(e){return new ir(t=>{t(e)})}function or(e){return new ir((t,n)=>{n(e)})}class ir{constructor(e){this._state=0,this._handlers=[],this._runExecutor(e)}then(e,t){return new ir((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(e){return new ir((t,n)=>{let r,s;return this.then(t=>{s=!1,r=t,e&&e()},t=>{s=!0,r=t,e&&e()}).then(()=>{s?n(r):t(r)})})}_executeHandlers(){if(0===this._state)return;const e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(1===this._state&&e[1](this._value),2===this._state&&e[2](this._value),e[0]=!0)})}_runExecutor(e){const t=(e,t)=>{0===this._state&&(R(t)?t.then(n,r):(this._state=e,this._value=t,this._executeHandlers()))},n=e=>{t(1,e)},r=e=>{t(2,e)};try{e(n,r)}catch(e){r(e)}}}function ar(e,t,n,r=0){try{const s=cr(t,n,e,r);return R(s)?s:sr(s)}catch(e){return or(e)}}function cr(e,t,n,s){const o=n[s];if(!e||!o)return e;const i=o({...e},t);return r&&null===i&&g.log(`Event processor "${o.id||"?"}" dropped event`),R(i)?i.then(e=>cr(e,t,n,s+1)):cr(i,t,n,s+1)}let ur,lr,pr,dr;function hr(e){const t=o._sentryDebugIds,n=o._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],s=n?Object.keys(n):[];if(dr&&r.length===lr&&s.length===pr)return dr;lr=r.length,pr=s.length,dr={},ur||(ur={});const i=(t,n)=>{for(const r of t){const t=n[r],s=ur?.[r];if(s&&dr&&t)dr[s[0]]=t,ur&&(ur[r]=[s[0],t]);else if(t){const n=e(r);for(let e=n.length-1;e>=0;e--){const s=n[e],o=s?.filename;if(o&&dr&&ur){dr[o]=t,ur[r]=[o,t];break}}}}};return t&&i(r,t),n&&i(s,n),dr}function fr(e,t){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:o}=t;!function(e,t){const{extra:n,tags:r,user:s,contexts:o,level:i,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra});Object.keys(r).length&&(e.tags={...r,...e.tags});Object.keys(s).length&&(e.user={...s,...e.user});Object.keys(o).length&&(e.contexts={...o,...e.contexts});i&&(e.level=i);a&&"transaction"!==e.type&&(e.transaction=a)}(e,t),r&&function(e,t){e.contexts={trace:jt(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:On(t),...e.sdkProcessingMetadata};const n=en(t),r=Ht(n).description;r&&!e.transaction&&"transaction"===e.type&&(e.transaction=r)}(e,r),function(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t));e.fingerprint.length||delete e.fingerprint}(e,n),function(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,s),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,o)}function gr(e,t){const{extra:n,tags:r,attributes:s,user:o,contexts:i,level:a,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:l,eventProcessors:p,attachments:d,propagationContext:h,transactionName:f,span:g}=t;mr(e,"extra",n),mr(e,"tags",r),mr(e,"attributes",s),mr(e,"user",o),mr(e,"contexts",i),e.sdkProcessingMetadata=Oe(e.sdkProcessingMetadata,c,2),a&&(e.level=a),f&&(e.transactionName=f),g&&(e.span=g),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),p.length&&(e.eventProcessors=[...e.eventProcessors,...p]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...h}}function mr(e,t,n){e[t]=Oe(e[t],n,1)}function yr(e,t){const n=c("globalScope",()=>new je).getScopeData();return e&&gr(n,e.getScopeData()),t&&gr(n,t.getScopeData()),n}function _r(e,t,n,r,s,o){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||W(),timestamp:t.timestamp||Se()},u=n.integrations||e.integrations.map(e=>e.name);!function(e,t){const{environment:n,release:r,dist:s,maxValueLength:o}=t;e.environment=e.environment||n||hn,!e.release&&r&&(e.release=r);!e.dist&&s&&(e.dist=s);const i=e.request;i?.url&&o&&(i.url=de(i.url,o));
1o&&e.exception?.values?.forEach(e=>{e.value&&(e.value=de(e.value,o))})}(c,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(c,u),s&&s.emit("applyFrameMetadata",t),void 0===t.type&&function(e,t){const n=hr(t);e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.filename&&(e.debug_id=n[e.filename])})})}(c,e.stackParser);const l=function(e,t){if(!t)return e;const n=e?e.clone():new je;return n.update(t),n}(r,n.captureContext);n.mechanism&&G(c,n.mechanism);const p=s?s.getEventProcessors():[],d=yr(o,l),h=[...n.attachments||[],...d.attachments];h.length&&(n.attachments=h),fr(c,d);const f=[...p,...d.eventProcessors];return(n.data&&!0===n.data.__sentry__?sr(c):ar(f,c,n)).then(e=>(e&&function(e){const t={};if(e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})}),0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([e,t])=>{n.push({type:"sourcemap",code_file:e,debug_id:t})})}(e),"number"==typeof i&&i>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:ce(e.data,t,n)}}))},...e.user&&{user:ce(e.user,t,n)},...e.contexts&&{contexts:ce(e.contexts,t,n)},...e.extra&&{extra:ce(e.extra,t,n)}};e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=ce(e.contexts.trace.data,t,n)));e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:ce(e.data,t,n)}})));e.contexts?.flags&&r.contexts&&(r.contexts.flags=ce(e.contexts.flags,3,n));return r}(e,i,a):e))}function vr(e){if(e)return function(e){return e instanceof je||"function"==typeof e}(e)||function(e){return Object.keys(e).some(e=>br.includes(e))}(e)?{captureContext:e}:e}const br=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Sr(e){return"object"==typeof e&&"function"==typeof e.unref&&e.unref(),e}const xr=Symbol.for("SentryBufferFullError");function wr(e=100){const t=new Set;function n(e){t.delete(e)}return{get $(){return Array.from(t)},add:function(r){if(!(t.size<e))return or(xr);const s=r();return t.add(s),s.then(()=>n(s),()=>n(s)),s},drain:function(e){if(!t.size)return sr(!0);const n=Promise.allSettled(Array.from(t)).then(()=>!0);if(!e)return n;const r=[n,new Promise(t=>Sr(setTimeout(()=>t(!1),e)))];return Promise.race(r)}}}const kr=["forwarded","-ip","remote-","via","-user"];const Er={userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:5};function Tr(e,t){return void 0===e?{...t.httpHeaders}:"boolean"==typeof(n=e)||"allow"in n||"deny"in n?{request:e,response:e}:{request:e.request??t.httpHeaders.request,response:e.response??t.httpHeaders.response};var n}function $r(e){const t=null!=e.dataCollection?Er:!0===e.sendDefaultPii?{userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:7}:{userInfo:!1,cookies:{deny:kr},httpHeaders:{request:{deny:kr},response:{deny:kr}},httpBodies:[],urlQueryParams:{deny:kr},graphQL:{document:!0,variables:!0},genAI:{inputs:!1,outputs:!1},databaseQueryData:!1,stackFrameVariables:!0,frameContextLines:7};const n=e.dataCollection??{};return{userInfo:n.userInfo??t.userInfo,cookies:n.cookies??t.cookies,httpHeaders:Tr(n.httpHeaders,t),httpBodies:n.httpBodies??t.httpBodies,urlQueryParams:n.urlQueryParams??n.queryParams??t.urlQueryParams,graphQL:{document:n.graphQL?.document??t.graphQL.document,variables:n.graphQL?.variables??t.graphQL.variables},genAI:{inputs:n.genAI?.inputs??t.genAI.inputs,outputs:n.genAI?.outputs??t.genAI.outputs},databaseQueryData:n.databaseQueryData??t.databaseQueryData,stackFrame
1Variables:n.stackFrameVariables??t.stackFrameVariables,frameContextLines:n.frameContextLines??t.frameContextLines}}const Or="Not capturing exception because it's already been captured.",Ir="Discarded session because of missing or non-string release",Cr=Symbol.for("SentryInternalError"),Lr=Symbol.for("SentryDoNotSendEventError");function Rr(e){return{message:e,[Cr]:!0}}function Pr(e){return{message:e,[Lr]:!0}}function Nr(e){return C(e)&&Cr in e}function Ar(e){return C(e)&&Lr in e}function jr(e,t,n,r,s){let o,i=0,a=!1;e.on(n,()=>{i=0,clearTimeout(o),a=!1}),e.on(t,t=>{if(i+=r(t),i>=8e5)s(e);else if(!a){const t=e.getOptions()._flushInterval??5e3;t>0&&(a=!0,o=Sr(setTimeout(()=>{s(e)},t)))}}),e.on("flush",()=>{s(e)})}class Dr{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=wr(e.transportOptions?.bufferSize??64),this._dataCollection=$r(e),e.dsn?this._dsn=vn(e.dsn):r&&g.warn("No DSN provided, client will not send events."),this._dsn){const t=dn(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs??!0,this._options.enableLogs&&jr(this,"afterCaptureLog","flushLogs",Ur,Yn);(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&jr(this,"afterCaptureMetric","flushMetrics",Hr,Zn)}captureException(e,t,n){const s=W();if(X(e))return r&&g.log(Or),s;const o={event_id:s,...t};return this._process(()=>this.eventFromException(e,o).then(e=>this._captureEvent(e,o,n)).then(e=>e),"error"),o.event_id}captureMessage(e,t,n,r){const s={event_id:W(),...n},o=$(e)?e:String(e),i=O(e),a=i?this.eventFromMessage(o,t,s):this.eventFromException(e,s);return this._process(()=>a.then(e=>this._captureEvent(e,s,r)),i?"unknown":"error"),s.event_id}captureEvent(e,t,n){const s=W();if(t?.originalException&&X(t.originalException))return r&&g.log(Or),s;const o={event_id:s,...t},i=e.sdkProcessingMetadata||{},a=i.capturedSpanScope,c=i.capturedSpanIsolationScope,u=Mr(e.type);return this._process(()=>this._captureEvent(e,o,a||n,c),u),o.event_id}captureSession(e){this.sendSession(e),$e(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getDataCollectionOptions(){return this._dataCollection}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(e){const t=this._transport;if(this.emit("flush"),!t)return!0;const n=await this._isClientDoneProcessing(e),r=await t.flush(e);return n&&r}async close(e){const t=await this.flush(e);return this.getOptions().enabled=!1,this.emit("close"),t}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(e){const t=this._integrations[e.name];!t&&e.beforeSetup&&e.beforeSetup(this),v(this,e,this._integrations),t||_(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);const n=function(e,t){if("transaction"!==e.type||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||!1===t.getOptions().streamGenAiSpans||nr(t))return;const n=[],r=[];for(const t of e.spans)t.op?.startsWith("gen_ai.")?n.push(rr(t)):r.push(t);if(0===n.length)return;e.spans=r;const s=t.getDataCollectionOptions().userInfo?"auto":"never";return[{type:"span",item_count:n.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...Kn()&&{ingest_settings:{infer_ip:s,infer_user_agent:s}},items:n}]}(e,this);let r=Vn(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])r=Ln(r,jn(e));n&&(r=Ln(r,n)),this.sendEnvelope(r).then(t=>this.emit("afterSendEvent",e,t))}sendSession(e){const{release:t,environment:n=hn}=this._options;if("aggregates"in e){const s=e.attrs||{};if(!s.release&&!t)return void(r&&g.warn(Ir));s.release=s.release||t,s.environment=s.environment||n,e.attrs=s}else{if(!e.release&&!t)return void(r&&g.warn(Ir));e.release=e.release||t,e.environment=e.environment||n}
1this.emit("beforeSendSession",e);const s=function(e,t,n,r){const s=Fn(n);return Cn({sent_at:new Date(z()).toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:mn(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(s)}recordDroppedEvent(e,t,n=1){if(this._options.sendClientReports){const s=`${e}:${t}`;r&&g.log(`Recording outcome: "${s}"${n>1?` (${n} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+n}}on(e,t){const n=this._hooks[e]=this._hooks[e]||new Set,r=(...e)=>t(...e);return n.add(r),()=>{n.delete(r)}}emit(e,...t){const n=this._hooks[e];n&&n.forEach(e=>e(...t))}async sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)try{return await this._transport.send(e)}catch(e){return r&&g.error("Error while sending envelope:",e),{}}return r&&g.error("Transport disabled"),{}}registerCleanup(e){}dispose(){}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(e,t){const n={};return t.forEach(t=>{t?.beforeSetup&&t.beforeSetup(e)}),t.forEach(t=>{t&&v(e,t,n)}),n}(this,e),_(this,e)}_updateSessionFromEvent(e,t){let n="fatal"===t.level,r=!1;const s=t.exception?.values;if(s){r=!0,n=!1;for(const e of s)if(!1===e.mechanism?.handled){n=!0;break}}const o="ok"===e.status;(o&&0===e.errors||o&&n)&&($e(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}async _isClientDoneProcessing(e){let t=0;for(;!e||t<e;){if(await new Promise(e=>setTimeout(e,1)),!this._numProcessing)return!0;t++}return!1}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n,r){const s=this.getOptions(),o=this.getIntegrationNames();return!t.integrations&&o.length&&(t.integrations=o),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),_r(s,e,t,n,this,r).then(e=>{if(null===e)return e;this.emit("postprocessEvent",e,t),e.contexts={trace:{...e.contexts?.trace,...Xe(n)},...e.contexts};const r=$n(this,n);return e.sdkProcessingMetadata={dynamicSamplingContext:r,...e.sdkProcessingMetadata},e})}_captureEvent(e,t={},n=Ke(),s=Je()){return r&&Fr(e)&&g.log(`Captured error event \`${b(e)[0]||"<unknown>"}\``),this._processEvent(e,t,n,s).then(e=>e.event_id,e=>{r&&(Ar(e)?g.log(e.message):Nr(e)?g.warn(e.message):g.warn(e))})}_processEvent(e,t,n,r){const s=this.getOptions(),{sampleRate:o}=s,i=qr(e),a=Fr(e),c=`before send for type \`${e.type||"error"}\``,u=void 0===o?void 0:It(o),l=Mr(e.type);return this._prepareEvent(e,t,n,r).then(e=>{if(null===e)throw this.recordDroppedEvent("event_processor",l),Pr("An event processor returned `null`, will not send event.");if(!0===t.data?.__sentry__)return e;const n=function(e,t,n,r){const{beforeSend:s,beforeSendTransaction:o,ignoreSpans:i}=t,a=!In(t.beforeSendSpan)&&t.beforeSendSpan;let c=n;if(Fr(c)&&s)return s(c,r);if(qr(c)){if(a||i){const t=function(e){const{trace_id:t,parent_span_id:n,span_id:r,status:s,origin:o,data:i,op:a}=e.contexts?.trace??{};return{data:i??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:s,timestamp:e.timestamp,trace_id:t??"",origin:o,profile_id:i?.[lt],exclusive_time:i?.[pt],measurements:e.measurements,is_segment:!0}}(c);if(i?.length&&Hn({description:t.description,op:t.op,attributes:t.data},i))return null;if(a){const e=a(t);e?c=Oe(n,{type:"transaction",timestamp:(u=e).timestamp,start_timestamp:u.start_timestamp,transaction:u.description,contexts:{trace:{trace_id:u.trace_id,span_id:u.span_id,parent_span_id:u.parent_span_id,op:u.op,status:u.status,origin:u.origin,data:{...u.data,...u.profile_id&&{[lt]:u.profile_id},...u.exclusive_time&&{[pt]:u.exclusive_time}}}},measurements:u.measurements}):rn()}if(c.spans){const t=[],n=c.spans;for(const e of n)if(i?.length&&Hn({description:e.description,op:e.op,attributes:e.data},i))Bn(n,e);else if(a){const n=a(e);n?t.push(n):(rn(),t.push(e))}else t.push(e);const r=c.spans.length-t.length;r&&e.recordDroppedEvent("before_send","span",r),c.spans=t}}if(o){if(c.spans){const e=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return o(c,r)}}var u;return c}(this,s,e,t);return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(R(e))return e.then(e=>{if(!I(e)&&null!==e)throw Rr(n);return e},e=>{throw Rr(`${t} rejected with ${e}`)});if(!I(e)&&null!==e)throw Rr(n);return e}(n,c)}).then(s=>{if(null===s){if(this.recordDroppedEvent("before_send",l),i){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw Pr(`${c} returned \`null\`, will not send event.`)}const p=n.getSession()||r.getSession();if(a&&p&&this._updateSessionFromEvent(p,s),a&&"number"==typeof u&&B()>u)throw this.recordDroppedEvent("sample_rate","error"),Pr(`Discarding event because it's not included in the random sample (sampling rate = ${o})`);if(i){const e=(s.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(s.spans?s.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}const d=s.transaction_info;if(i&&d&&s.transaction!==e.transaction){const e="custom";s.transaction_info={...d,source:e}}return this.sendEvent(s,t),s}).then(null,e=>{if(Ar(e)||Nr(e))throw e;throw this.captureException(e,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:e}),Rr(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)})}_process(e,t){this._numProcessing++,this._promiseBuffer.add(e).then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e===xr&&this.recordDroppedEvent("queue_overflow",t),e))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t}})}_flushOutcomes(){r&&g.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(r&&g.log("No outcomes to send"));if(!this._dsn)return void(r&&g.log("No dsn provided, will not send outcomes"));r&&g.log("Sending outcomes:",e);const t=(n=e,Cn((s=this._options.tunnel&&mn(this._dsn))?{dsn:s}:{},[[{type:"client_report"},{timestamp:o||Se(),discarded_events:n}]]));var n,s,o;this.sendEnvelope(t)}}function Mr(e){return"replay_event"===e?"replay":e||"error"}function Fr(e){return void 0===e.type}function qr(e){return"transaction"===e.type}function Hr(e){let t=0;return e.name&&(t+=2*e.name.length),t+=8,t+Br(e.attributes)}function Ur(e){let t=0;return e.message&&(t+=2*e.message.length),t+Br(e.attributes)}function Br(e){if(!e)return 0;let t=0;
1return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*zr(e[0]):O(e)?t+=zr(e):t+=100}),t}function zr(e){return"string"==typeof e?2*e.length:"number"==typeof e?8:"boolean"==typeof e?4:0}function Vr(e){"aggregates"in e?void 0===e.attrs?.ip_address&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):void 0===e.ipAddress&&(e.ipAddress="{{auto}}")}function Wr(e){return function(e){return x(e)&&"__sentry_fetch_url_host__"in e&&"string"==typeof e.__sentry_fetch_url_host__}(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}function Kr(e,t){const n=Gr(e,t),r={type:Zr(t),value:es(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function Jr(e,t,n,r){const s=Ge(),o=s?.getOptions().normalizeDepth,i=(a=t,Object.values(a).find(x));var a;const c={__serialized__:ue(t,o)};if(i)return{exception:{values:[Kr(e,i)]},extra:c};const u={exception:{values:[{type:L(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:rs(t,{isUnhandledRejection:r})}]},extra:c};if(n){const t=Gr(e,n);t.length&&(u.exception.values[0].stacktrace={frames:t})}return u}function Yr(e,t){return{exception:{values:[Kr(e,t)]}}}function Gr(e,t){const n=t.stacktrace||t.stack||"",r=function(e){if(e&&Xr.test(e.message))return 1;return 0}(t),s=function(e){if("number"==typeof e.framesToPop)return e.framesToPop;return 0}(t);try{return e(n,r,s)}catch{}return[]}const Xr=/Minified React error #\d+;/i;function Qr(e){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&e instanceof WebAssembly.Exception}function Zr(e){const t=e?.name;if(!t&&Qr(e)){return e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception"}return t}function es(e){const t=e?.message;return Qr(e)?Array.isArray(e.message)&&2==e.message.length?e.message[1]:"wasm exception":t?t.error&&"string"==typeof t.error.message?Wr(t.error):Wr(e):"No error message"}function ts(e,t,n,r,s){let o;if(k(t)&&t.error){return Yr(e,t.error)}if(E(t)||w(t,"DOMException")){const s=t;if("stack"in t){o=Yr(e,t);const s=o.exception?.values?.[0];if(r&&n&&s&&!s.stacktrace){const t=Gr(e,n);t.length&&(s.stacktrace={frames:t},G(o,{synthetic:!0}))}}else{const t=s.name||(E(s)?"DOMError":"DOMException"),i=s.message?`${t}: ${s.message}`:t;o=ns(e,i,n,r),Y(o,i)}return"code"in s&&(o.tags={...o.tags,"DOMException.code":`${s.code}`}),o}if(x(t))return Yr(e,t);if(I(t)||L(t)){return o=Jr(e,t,n,s),G(o,{synthetic:!0}),o}return o=ns(e,t,n,r),Y(o,`${t}`,void 0),G(o,{synthetic:!0}),o}function ns(e,t,n,r){const s={};if(r&&n){const r=Gr(e,n);r.length&&(s.exception={values:[{value:t,stacktrace:{frames:r}}]}),G(s,{synthetic:!0})}if($(t)){const{__sentry_template_string__:e,__sentry_template_values__:n}=t;return s.logentry={message:e,params:n},s}return s.message=t,s}function rs(e,{isUnhandledRejection:t}){const n=function(e){const t=Object.keys(F(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}(e),r=t?"promise rejection":"exception";if(k(e))return`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``;if(L(e)){return`Event \`${function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}(e)}\` (type=${e.type}) captured as ${r}`}return`Object captured as ${r} with keys: ${n}`}function ss(e,t){return Ke().captureEvent(e,t)}function os(e){const t=Je(),{user:n}=yr(t,Ke()),{userAgent:r}=o.navigator||{},s=Te({user:n,...r&&{userAgent:r},...e}),i=t.getSession();return"ok"===i?.status&&$e(i,{status:"exited"}),is(),t.setSession(s),s}function is(){const e=Je(),t=Ke().getSession()||e.getSession();t&&function(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),$e(e,n)}(t),as(),e.setSession()}function as(){const e=Je(),t=Ge(),n=e.getSession();n&&t&&t.captureSession(n)}function cs(e=!1){e?is():as()}const us=o;function ls(){try{return us.document.location.href}catch{return""}}function ps(e,t=5){if(!us.HTMLElement)return null;let n=e;for(let e=0;e<t;e++){if(!n)return null;if(n instanceof HTMLElement){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}n=n.parentNode}return null}const ds=o;let hs=0;function fs(){return hs>0}function gs(e,t={}){if("function"!=typeof e)return e;try{if(Object.prototype.hasOwnProperty.call(e,"__sentry_wrapped__")){const t=e.__sentry_wrapped__;return"function"==typeof t?t:e}if(M(e))return e}catch{return e}const n=function(...n){o._sentryWrappedDepth=(o._sentryWrappedDepth||0)+1;try{const r=n.map(e=>gs(e,t));return e.apply(this,r)}catch(e){throw hs++,setTimeout(()=>{hs--}),Ye(r=>{var s,o;r.addEventProcessor(e=>(t.mechanism&&(Y(e,void 0,void 0),G(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),s=e,Ke().captureException(s,vr(o))}),e}finally{o._sentryWrappedDepth=(o._sentryWrappedDepth||0)-1}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch{}D(n,e),j(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get(){return e.name}})}catch{}return n}function ms(){const e=ls(),{referrer:t}=ds.document||{},{userAgent:n}=ds.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}class ys extends Dr{constructor(e){const t=(n=e,{release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:ds.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...n});var n;!function(e,t,n=[t],r="npm"){const o=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};o.name||(o.name=`sentry.javascript.${t}`,o.packages=n.map(e=>({name:`${r}:@sentry/${e}`,version:s})),o.version=s)}(t,"browser",["browser"],ds.SENTRY_SDK_SOURCE||"npm"),super(t);const{userInfo:r}=this.getDataCollectionOptions();t._metadata?.sdk&&(t._metadata.sdk.settings={infer_ip:r?"auto":"never",...t._metadata.sdk.settings});const{sendClientReports:o}=this._options;ds.document&&ds.document.addEventListener("visibilitychange",()=>{"hidden"===ds.document.visibilityState&&(o&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}),r&&this.on("beforeSendSession",Vr)}eventFromException(e,t){return function(e,t,n,r){const s=ts(e,t,n?.syntheticException||void 0,r);return G(s),s.level="error",n?.event_id&&(s.event_id=n.event_id),sr(s)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,s){const o=ns(e,t,r?.syntheticException||void 0,s);return o.level=n,r?.event_id&&(o.event_id=r.event_id),sr(o)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}_prepareEvent(e,t,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n,r)}}const _s={},vs={};function bs(e,t){return _s[e]=_s[e]||[],_s[e].push(t),()=>{const n=_s[e];if(n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}}function Ss(e,t){if(!vs[e]){vs[e]=!0;try{t()}catch(t){r&&g.error(`Error while instrumenting ${e}`,t)}}}function xs(e,t){const n=e&&_s[e];if(n)for(const s of n)try{s(t)}catch(t){r&&g.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${oe(s)}\nError:`,t)}}const ws=new Set([]);const ks=new Set;function Es(){"console"in o&&u.forEach(function(e){!ks.has(e)&&e in o.console&&(ks.add(e),A(o.console,e,function(t){return l[e]=t,function(...t){const n=t[0],s=l[e],i=ws.size&&"string"==typeof n&&ge(n,ws);i||xs("console",{args:t,level:e}),(!i||r&&g.isEnabled())&&s?.apply(o.console,t)}}))})}const Ts=o;function $s(){if(!("fetch"in Ts))return!1;
1try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function Os(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Is(e,t){const n="fetch",r=bs(n,e);return Ss(n,()=>Cs(void 0,t)),r}function Cs(e,t=!1){t&&!function(){if("string"==typeof EdgeRuntime)return!0;if(!$s())return!1;if(Os(Ts.fetch))return!0;let e=!1;const t=Ts.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=Os(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){r&&g.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e}()||A(o,"fetch",function(t){return function(...n){const r=new Error,{method:s,url:i}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:Ps(t),method:Rs(n,"method")?String(n.method).toUpperCase():N(t)&&Rs(t,"method")?String(t.method).toUpperCase():"GET"}}const t=e[0];return{url:Ps(t),method:Rs(t,"method")?String(t.method).toUpperCase():"GET"}}(n),a={args:n,fetchData:{method:s,url:i},startTimestamp:1e3*we(),virtualError:r,headers:Ns(n)};return e||xs("fetch",{...a}),t.apply(o,n).then(async t=>(e?e(t):xs("fetch",{...a,endTimestamp:1e3*we(),response:t}),t),e=>{xs("fetch",{...a,endTimestamp:1e3*we(),error:e}),x(e)&&void 0===e.stack&&(e.stack=r.stack,j(e,"framesToPop",1));
1const t=Ge(),n=t?.getOptions().enhanceFetchErrorMessages??"always";if(!1!==n&&x(e)&&"TypeError"===e.name&&("Failed to fetch"===e.message||"Load failed"===e.message||"NetworkError when attempting to fetch resource."===e.message))try{const t=new URL(a.fetchData.url).host;"always"===n?e.message=`${e.message} (${t})`:j(e,"__sentry_fetch_url_host__",t)}catch{}throw e})}})}function Ls(e){let t;try{t=e.clone()}catch{return}!async function(e,t){if(e?.body){const n=e.body,r=n.getReader(),s=setTimeout(()=>{n.cancel().then(null,()=>{})},9e4);let o=!0;for(;o;){let e;try{e=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:s}=await r.read();clearTimeout(e),s&&(t(),o=!1)}catch{o=!1}finally{clearTimeout(e)}}clearTimeout(s),r.releaseLock(),n.cancel().then(null,()=>{})}}(t,()=>{xs("fetch-body-resolved",{endTimestamp:1e3*we(),response:e})})}function Rs(e,t){return C(e)&&!!e[t]}function Ps(e){return"string"==typeof e?e:e?Rs(e,"url")?e.url:e.toString?e.toString():"":""}function Ns(e){const[t,n]=e;try{if("object"==typeof n&&null!==n&&"headers"in n&&n.headers)return new Headers(n.headers);if(N(t))return new Headers(t.headers)}catch{}}const As=100;function js(e,t){const n=Ge(),r=Je();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:o=As}=n.getOptions();if(o<=0)return;const i={timestamp:Se(),...e},a=s?p(()=>s(i,t)):i;null!==a&&(n.emit&&n.emit("beforeAddBreadcrumb",a,t),r.addBreadcrumb(a,o))}function Ds(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}function Ms(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}function Fs(e){return"isRelative"in e}function qs(e,t){const n=e.indexOf("://")<=0&&0!==e.indexOf("//"),r=t??(n?"thismessage:/":void 0);try{if("canParse"in URL&&!URL.canParse(e,r))return;const t=new URL(e,r);return n?{isRelative:n,pathname:t.pathname,search:t.search,hash:t.hash}:t}catch{}}function Hs(e){if(Fs(e))return e.pathname;const t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}function Us(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function Bs(e,t=!0){if(e.startsWith("data:")){const n=e.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",s=e.includes(";base64,"),o=e.indexOf(",");let i="";if(t&&-1!==o){const t=e.slice(o+1);i=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${s?",base64":""}${i?`,${i}`:""}`}return e}const zs=o;let Vs,Ws,Ks;function Js(){if(!zs.document)return;const e=xs.bind(null,"dom"),t=Ys(e,!0);zs.document.addEventListener("click",t,!1),zs.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{const n=zs,r=n[t]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(A(r,"addEventListener",function(t){return function(n,r,s){if("click"===n||"keypress"==n)try{const r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},o=r[n]=r[n]||{refCount:0};if(!o.handler){const r=Ys(e);o.handler=r,t.call(this,n,r,s)}o.refCount++}catch{}return t.call(this,n,r,s)}}),A(r,"removeEventListener",function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this.__sentry_instrumentation_handlers__||{},s=n[t];s&&(s.refCount--,s.refCount<=0&&(e.call(this,t,s.handler,r),s.handler=void 0,delete n[t]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function Ys(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(e){try{return e.target}catch{return null}}(n);if(function(e,t){return"keypress"===e&&(!t?.tagName||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}(n.type,r))return;j(n,"_sentryCaptured",!0),r&&!r._sentryId&&j(r,"_sentryId",W());const s="keypress"===n.type?"input":n.type;if(!function(e){if(e.type!==Ws)return!1;try{if(!e.target||e.target._sentryId!==Ks)return!1}catch{}return!0}(n)){e({event:n,name:s,global:t}),Ws=n.type,Ks=r?r._sentryId:void 0}clearTimeout(Vs),Vs=zs.setTimeout(()=>{Ks=void 0,Ws=void 0},1e3)}}const Gs="__sentry_xhr_v3__";function Xs(e){bs("xhr",e),Ss("xhr",Qs)}function Qs(){if(!zs.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let r=new Error;const s=1e3*we(),o=T(n[0])?n[0].toUpperCase():void 0,i=function(e){if(T(e))return e;try{return e.toString()}catch{}return}(n[1]);if(!o||!i)return e.apply(t,n);t[Gs]={method:o,url:i,request_headers:{}}
1,"POST"===o&&i.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const a=()=>{const e=t[Gs];if(e&&4===t.readyState){try{e.status_code=t.status}catch{}xs("xhr",{endTimestamp:1e3*we(),startTimestamp:s,xhr:t,virtualError:r}),r=void 0,t.removeEventListener("readystatechange",a)}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply(e,t,n){return a(),e.apply(t,n)}}):t.addEventListener("readystatechange",a),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){const[r,s]=n,o=t[Gs];return o&&T(r)&&T(s)&&(o.request_headers[r.toLowerCase()]=s),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){const r=t[Gs];if(!r)return e.apply(t,n);void 0!==n[0]&&(r.body=n[0]);return xs("xhr",{startTimestamp:1e3*we(),xhr:t}),e.apply(t,n)}})}let Zs;function eo(e){const t="history";bs(t,e),Ss(t,to)}function to(){function e(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const r=Zs,s=function(e){try{return new URL(e,zs.location.origin).toString()}catch{return e}}(String(n));if(Zs=s,r===s)return e.apply(this,t);xs("history",{from:r,to:s})}return e.apply(this,t)}}zs.addEventListener("popstate",()=>{const e=zs.location.href,t=Zs;if(Zs=e,t===e)return;xs("history",{from:t,to:e})}),"history"in Ts&&Ts.history&&(A(zs.history,"pushState",e),A(zs.history,"replaceState",e))}const no={};try{"undefined"!=typeof Node&&(no.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode").get),"undefined"!=typeof Element&&(no.tagName=Object.getOwnPropertyDescriptor(Element.prototype,"tagName").get,no.id=Object.getOwnPropertyDescriptor(Element.prototype,"id").get,no.className=Object.getOwnPropertyDescriptor(Element.prototype,"className").get,no.getAttribute=Element.prototype.getAttribute),"undefined"!=typeof HTMLElement&&(no.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"dataset").get)}catch{}function ro(e,t,n){const r=no[t];if(r)try{return r.call(e,n)}catch{}const s=e[t];return"function"==typeof s?s.call(e,n):s}function so(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,s=[];let o=0,i=0;const a=" > ",c=a.length;let u;const l=Array.isArray(t)?t:t.keyAttrs,p=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&o++<r&&(u=oo(n,l),!("html"===u||o>1&&i+s.length*c+u.length>=p));)s.push(u),i+=u.length,n=ro(n,"parentNode");return s.reverse().join(a)}catch{return"<unknown>"}}function oo(e,t){const n=[],r=ro(e,"tagName");if(!r)return"";if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement){const t=ro(e,"dataset");if(t){if(t.sentryComponent)return t.sentryComponent;if(t.sentryElement)return t.sentryElement}}n.push(r.toLowerCase());const s=t?.length?t.filter(t=>ro(e,"getAttribute",t)).map(t=>[t,ro(e,"getAttribute",t)]):null;if(s?.length)s.forEach(e=>{n.push(`[${e[0]}="${e[1]}"]`)});else{const t=ro(e,"id");t&&n.push(`#${t}`);const r=ro(e,"className");if(r&&T(r)){const e=r.split(/\s+/);for(const t of e)n.push(`.${t}`)}}for(const t of["aria-label","type","name","title","alt"]){const r=ro(e,"getAttribute",t);r&&n.push(`[${t}="${r}"]`)}return n.join("")}const io="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,ao=1024,co=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(e){var n;t.console&&function(e){const t="console",n=bs(t,e);Ss(t,Es)}(function(e){return function(t){if(Ge()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:Ds(t.level),message:he(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${he(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}js(n,{input:t.args,level:t.level})}}(e)),t.dom&&(n=function(e,t){return function(n){if(Ge()!==e)return;let r,s,o="object"==typeof t?t.serializeAttribute:void 0,i="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;i&&i>ao&&(io&&g.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${i} was configured. Sentry will use 1024 instead.`),i=ao),"string"==typeof o&&(o=[o]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=so(t,{keyAttrs:o,maxStringLength:i}),s=ps(t)}catch{r="<unknown>"}if(0===r.length)return;const a={category:`ui.${n.name}`,message:r};s&&(a.data={"ui.component_name":s}),js(a,{event:n.event,name:n.name,global:n.global})}}(e,t.dom),bs("dom",n),Ss("dom",Js)),t.xhr&&Xs(function(e){return function(t){if(Ge()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,s=t.xhr[Gs];if(!n||!r||!s)return;const{method:o,url:i,status_code:a,body:c}=s,u={method:o,url:i,status_code:a},l={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r},p={category:"xhr",data:u,type:"http",level:Ms(a)};e.emit("beforeOutgoingRequestBreadcrumb",p,l),js(p,l)}}(e)),t.fetch&&Is(function(e){return function(t){if(Ge()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;
vendor: 1,931 bytes, line 1
1if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){const s={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},o={category:"fetch",data:t.fetchData,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",o,s),js(o,s)}else{const s=t.response,o={...t.fetchData,status_code:s?.status},i={input:t.args,response:s,startTimestamp:n,endTimestamp:r},a={category:"fetch",data:o,type:"http",level:Ms(o.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",a,i),js(a,i)}}}(e)),t.history&&eo(function(e){return function(t){if(Ge()!==e)return;let n=t.from,r=t.to;const s=Us(ds.location.href);let o=n?Us(n):void 0;const i=Us(r);o?.path||(o=s),s.protocol===i.protocol&&s.host===i.host&&(r=i.relative),s.protocol===o.protocol&&s.host===o.host&&(n=o.relative),js({category:"navigation",data:{from:n,to:r}})}}(e)),t.sentry&&e.on("beforeSendEvent",function(e){return function(t){Ge()===e&&js({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:J(t)},{event:t})}}(e))}}};const uo="EventTarget,Window,Node,ApplicationCache,AudioTrackList,BroadcastChannel,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(","),lo=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&A(ds,"setTimeout",po),t.setInterval&&A(ds,"setInterval",po),t.requestAnimationFrame&&A(ds,"requestAnimationFrame",ho),t.XMLHttpRequest&&"XMLHttpRequest"in ds&&A(XMLHttpRequest.prototype,"send",fo);const e=t.eventTarget;
1if(e){(Array.isArray(e)?e:uo).forEach(e=>function(e,t){const n=ds,r=n[e]?.prototype;if(!r?.hasOwnProperty?.("addEventListener"))return;A(r,"addEventListener",function(n){return function(r,s,o){try{"function"==typeof s.handleEvent&&(s.handleEvent=gs(s.handleEvent,{mechanism:{data:{handler:oe(s),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&function(e,t,n){e&&"object"==typeof e&&"removeEventListener"in e&&"function"==typeof e.removeEventListener&&e.removeEventListener(t,n)}(this,r,s),n.apply(this,[r,gs(s,{mechanism:{data:{handler:oe(s),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),o])}}),A(r,"removeEventListener",function(e){return function(t,n,r){try{if(Object.prototype.hasOwnProperty.call(n,"__sentry_wrapped__")){const s=n.__sentry_wrapped__;s&&e.call(this,t,s,r)}}catch{}return e.call(this,t,n,r)}})}(e,t))}}}};function po(e){return function(...t){const n=t[0];return t[0]=gs(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${oe(e)}`}}),e.apply(this,t)}}function ho(e){return function(t){return e.apply(this,[gs(t,{mechanism:{data:{handler:oe(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function fo(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&A(n,e,function(t){const n={mechanism:{data:{handler:oe(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=M(t);return r&&(n.mechanism.data.handler=oe(r)),gs(t,n)})}),e.apply(this,t)}}function go(e,t,n){zs.document&&zs.addEventListener(e,t,n)}function mo(e,t,n){zs.document&&zs.removeEventListener(e,t,n)}const yo=e=>{let t=!1;return()=>{t||(e(),t=!0)}},_o=e=>{const t=zs.requestIdleCallback||zs.setTimeout;"hidden"===zs.document?.visibilityState?e():(go("visibilitychange",e=yo(e),{once:!0,capture:!0}),go("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),mo("visibilitychange",e,{capture:!0}),mo("pagehide",e,{capture:!0})}))},vo=(e={})=>{const t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(void 0===ds.document)return void(io&&g.warn("Using the `browserSessionIntegration` in non-browser environments is not supported."));os({ignoreDuration:!0});let e=!1;_o(()=>{e||(cs(),e=!0)});const n=Je();let r=n.getUser();n.addScopeListener(t=>{const n=t.getUser();r?.id===n?.id&&r?.ip_address===n?.ip_address||(r=n,e&&cs())}),"route"===t&&eo(({from:t,to:n})=>{t!==n&&(os({ignoreDuration:!0}),cs(),e=!0)})}}};function bo(e,t){const n=e.attributes??(e.attributes={});Object.entries(t).forEach(([e,t])=>{null==t||e in n||(n[e]=t)})}const So=()=>({name:"CultureContext",preprocessEvent(e){const t=xo();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){const t=xo();t&&bo(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}});function xo(){try{const e=ds.Intl;if(!e)return;const t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}let wo=null;function ko(e){const t="error";bs(t,e),Ss(t,Eo)}function Eo(){wo=o.onerror,o.onerror=function(e,t,n,r,s){return xs("error",{column:r,error:s,line:n,msg:e,url:t}),!!wo&&wo.apply(this,arguments)},o.onerror.__SENTRY_INSTRUMENTED__=!0}let To=null;function $o(e){const t="unhandledrejection";bs(t,e),Ss(t,Oo)}function Oo(){To=o.onunhandledrejection,o.onunhandledrejection=function(e){return xs("unhandledrejection",e),!To||To.apply(this,arguments)},o.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Io=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(!function(e){ko(t=>{const{stackParser:n,attachStacktrace:r}=Lo();if(Ge()!==e||fs())return;const{msg:s,url:o,line:i,column:a,error:c}=t,u=function(e,t,n,r){const s=e.exception=e.exception||{},o=s.values=s.values||[],i=o[0]=o[0]||{},a=i.stacktrace=i.stacktrace||{},c=a.frames=a.frames||[];0===c.length&&c.push({colno:r,lineno:n,filename:Ro(t)??ls(),function:"?",in_app:!0});return e}(ts(n,c||s,void 0,r,!1),o,i,a);u.level="error",ss(u,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}(e),Co("onerror")),t.onunhandledrejection&&(!function(e){$o(t=>{const{stackParser:n,attachStacktrace:r}=Lo();if(Ge()!==e||fs())return;const s=function(e){if(O(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}(t),o=O(s)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(s)}`}]}}:ts(n,s,void 0,r,!0);o.level="error",ss(o,{originalException:s,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}(e),Co("onunhandledrejection"))}}};function Co(e){io&&g.log(`Global Handler attached: ${e}`)}function Lo(){const e=Ge();return e?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function Ro(e){if(T(e)&&0!==e.length)return e.startsWith("data:")?`<${Bs(e,!1)}>`:e}const Po="http.url",No="sentry.segment.name",Ao="sentry.transaction",jo="url.full",Do="url.path",Mo="user_agent.original",Fo=()=>({name:"HttpContext",preprocessEvent(e){if(!ds.navigator&&!ds.location&&!ds.document)return;const t=ms(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}},processSpan(e){if(!ds.navigator&&!ds.location&&!ds.document)return;const t=ms();bo(e,{[Mo]:t.headers["User-Agent"],...e.is_segment&&{[jo]:"http.client"!==e.attributes?.["sentry.op"]?t.url:void 0,"http.request.header.referer":t.headers.Referer}})}});function qo(e,t,n,r,s,o){if(!s.exception?.values||!o||!x(o.originalException))return;const i=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;i&&(s.exception.values=Ho(e,t,r,o.originalException,n,s.exception.values,i,0
1))}function Ho(e,t,n,r,s,o,i,a){if(o.length>=n+1)return o;let c=[...o];if(x(r[s])){Bo(i,a,r);const o=e(t,r[s]),u=c.length;zo(o,s,u,a),c=Ho(e,t,n,r[s],s,[o,...c],o,u)}return Uo(r)&&r.errors.forEach((o,u)=>{if(x(o)){Bo(i,a,r);const l=e(t,o),p=c.length;zo(l,`errors[${u}]`,p,a),c=Ho(e,t,n,o,s,[l,...c],l,p)}}),c}function Uo(e){return Array.isArray(e.errors)}function Bo(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...Uo(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function zo(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}const Vo=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,r,s){qo(Kr,s.getOptions().stackParser,n,t,e,r)}}};function Wo(e,t,n,r){const s={filename:e,function:"<anonymous>"===t?"?":t,in_app:!0};return void 0!==n&&(s.lineno=n),void 0!==r&&(s.colno=r),s}const Ko=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Jo=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Yo=/\((\S*)(?::(\d+))(?::(\d+))\)/,Go=/at (.+?) ?\(data:(.+?),/,Xo=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Qo=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Zo=ne(...[[30,e=>{const t=e.match(Go);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=Ko.exec(e);if(n){const[,e,t,r]=n;return Wo(e,"?",+t,+r)}const r=Jo.exec(e);if(r){if(0===r[2]?.indexOf("eval")){const e=Yo.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}const[e,t]=ei(r[1]||"?",r[2]);return Wo(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],[50,e=>{const t=Xo.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=Qo.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||"?";return[n,e]=ei(n,e),Wo(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]),ei=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:"?",n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};function ti(e,{statusCode:t,headers:n},r=z()){const s={...e},o=n?.["x-sentry-rate-limits"],i=n?.["retry-after"];if(o)for(const e of o.trim().split(",")){const[t,n,,,o]=e.split(":",5),i=parseInt(t,10),a=1e3*(isNaN(i)?60:i);if(n)for(const e of n.split(";"))"metric_bucket"===e&&o&&!o.split(";").includes("custom")||(s[e]=r+a);else s.all=r+a}else i?s.all=r+function(e,t=z()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(i,r):429===t&&(s.all=r+6e4);return s}function ni(e,t,n=wr(e.bufferSize||64)){let s={};return{send:function(o){const i=[];if(Rn(o,(t,n)=>{const r=Mn(n);!function(e,t,n=z()){return function(e,t){return e[t]||e.all||0}(e,t)>n}(s,r)?i.push(t):e.recordDroppedEvent("ratelimit_backoff",r)}),0===i.length)return Promise.resolve({});const a=Cn(o[0],i),c=t=>{!function(e,t){return Rn(e,(e,n)=>t.includes(n))}(a,["client_report"])?Rn(a,(n,r)=>{e.recordDroppedEvent(t,Mn(r))}):r&&g.warn(`Dropping client report. Will not send outcomes (reason: ${t}).`)};return n.add(()=>t({body:Nn(a)}).then(e=>413===e.statusCode?(r&&g.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),c("send_error"),e):(r&&void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&g.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),s=ti(s,e),e),e=>{throw c("network_error"),r&&g.error("Encountered error running transport request:",e),e})).then(e=>e,e=>{if(e===xr)return r&&g.error("Skipped sending event because buffer is full."),c("queue_overflow"),Promise.resolve({});throw e})},flush:e=>n.drain(e)}}const ri="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,si={};function oi(e){const t=si[e];if(t)return t;let n=zs[e];if(Os(n))return si[e]=n.bind(zs);const r=zs.document;if(r&&"function"==typeof r.createElement)try{const t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);const s=t.contentWindow;s?.[e]&&(n=s[e]),r.head.removeChild(t)}catch(t){ri&&g.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n?si[e]=n.bind(zs):n}function ii(e,t=oi("fetch")){let n=0,r=0;return ni(e,async function(s){const o=s.body.length;n+=o,r++;
1const i={body:s.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const n=await t(e.url,i);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get("X-Sentry-Rate-Limits"),"retry-after":n.headers.get("Retry-After")}}}catch(e){throw si["fetch"]=void 0,e}finally{n-=o,r--}},wr(e.bufferSize||40))}const ai=/^HTML(\w*)Element$/;function ci(e){if("undefined"!=typeof window&&e===window)return"[Window]";if("undefined"!=typeof document&&e===document)return"[Document]";if(function(e){if("undefined"==typeof Element)return!1;try{return e instanceof Element}catch{return!1}}(e)){const t=function(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}(e);if(ai.test(t))return`[HTMLElement: ${so(e)}]`}}function ui(){return!!function(){if(void 0===ds.window)return!1;const e=ds;if(e.nw)return!1;const t=e.chrome||e.browser;if(!t?.runtime?.id)return!1;const n=ls();return!(ds===ds.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(n))}()&&(io&&p(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0)}function li(e={}){const t=!e.skipBrowserExtensionCheck&&ui();let n=null==e.defaultIntegrations?[_e(),Ze(),sn(),lo(),co(),Io(),Vo(),on(),Fo(),So(),vo()]:e.defaultIntegrations;const r={...e,enabled:!t&&e.enabled,stackParser:(s=e.stackParser||Zo,Array.isArray(s)?ne(...s):s),integrations:y({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||ii};var s;return ae=ci,ln(ys,r)}function pi(e,t,n,s=nn()){const o=s&&en(s);o&&(r&&g.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),o.addEvent(e,{[ct]:t,[at]:n}))}function di(e){if(!e||0===e.length)return;const t={};return e.forEach(e=>{const n=e.attributes||{},r=n[at],s=n[ct];"string"==typeof r&&"number"==typeof s&&(t[e.name]={value:s,unit:r})}),t}function hi(){return a(i()).segmentSpanCaptureStrategy}class fi{constructor(e={}){this._traceId=e.traceId||Ie(),this._spanId=e.spanId||Ce(),this._startTime=e.startTimestamp||we(),this._links=e.links,this._attributes={},this.setAttributes({[st]:"manual",[rt]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this._frozen||(this._links?this._links.push(e):this._links=[e]),this}addLinks(e){return this._frozen||(this._links?this._links.push(...e):this._links=e),this}recordException(e,t){}spanContext(){const{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:n?1:0}}setAttribute(e,t){return this._frozen||(void 0===t?delete this._attributes[e]:this._attributes[e]=t,e===et&&void 0!==t&&xt(this)&&j(this,_t,!0)),this}setAttributes(e){return Object.keys(e).forEach(t=>this.setAttribute(t,e[t])),this}updateStartTime(e){this._frozen||(this._startTime=Ft(e))}setStatus(e){return this._frozen||(this._status=e),this}updateName(e){return this._frozen||(this._name=e,xt(this)||this.setAttribute(et,"custom")),this}end(e){this._endTime||(this._endTime=Ft(e),function(e){if(!r)return;const{description:t="< unknown name >",op:n="< unknown op >"}=Ht(e),{spanId:s}=e.spanContext(),o=`[Tracing] Finishing "${n}" ${en(e)===e?"root ":""}span "${t}" with ID ${s}`;g.log(o)}(this),this._onSpanEnded()),this._frozen=wt(this)}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[rt],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Kt(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[st],profile_id:this._attributes[lt],exclusive_time:this._attributes[pt],measurements:di(this._events),is_segment:this._isStandaloneSpan&&en(this)===this||void 0,segment_id:this._isStandaloneSpan?en(this).spanContext().spanId:void 0,links:Dt(this._links)}}getStreamedSpanJSON(){return{name:this._name??"",span_id:this._spanId,trace_id:this._traceId,parent_span_id:this._parentSpanId,start_timestamp:this._startTime,end_timestamp:this._endTime??this._startTime,is_segment:this._isStandaloneSpan||this===en(this),status:Jt(this._status),attributes:Yt(this._attributes,this._status),links:Mt(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,t,n){if(this._frozen)return this;r&&g.log("[Tracing] Adding an event to span:",e);const s=gi(t)?t:n||we(),o=gi(t)?{}:t||{},i={name:e,time:Ft(s),attributes:o};return this._events.push(i),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const e=Ge();e&&(e.emit("spanEnd",this),this._isStandaloneSpan||e.emit("afterSpanEnd",this));const t=en(this),n=this._isStandaloneSpan||this===t;if(this._isStandaloneSpan)return void(this._sampled?function(e){const t=Ge(
1);if(!t)return;const n=e[1];if(!n||0===n.length)return void t.recordDroppedEvent("before_send","span");t.sendEnvelope(e)}(function(e,t){const n=On(e[0]),r=t?.getDsn(),s=t?.getOptions().tunnel,o={sent_at:new Date(z()).toISOString(),...(i=n,!!i.trace_id&&!!i.public_key&&{trace:n}),...!!s&&r&&{dsn:mn(r)}};var i;const{beforeSendSpan:a,ignoreSpans:c}=t?.getOptions()||{},u=c?.length?e.filter(e=>{const t=Ht(e);return!Hn({description:t.description,op:t.op,attributes:t.data},c)}):e,l=e.length-u.length;l&&t?.recordDroppedEvent("before_send","span",l);const p=a?e=>{const t=Ht(e);return(In(a)?t:a(t))||(rn(),t)}:Ht,d=[];for(const e of u){const t=p(e);t&&d.push(An(t))}return Cn(o,d)}([this],e)):(r&&g.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),e&&e.recordDroppedEvent("sample_rate","span")));if(!n){const e=hi();if(e){const n=St(this).scope||Ke();e.onChildSpanEnded(this,t,e=>this._convertSpanToTransaction(e),n)}return}if(e&&nr(e))return void e.emit("afterSegmentSpanEnd",this);const s=St(this).scope||Ke(),o=hi();if(o)o.onSegmentSpanEnded(e=>this._convertSpanToTransaction(e),s);else{const e=this._convertSpanToTransaction();e&&s.captureEvent(e)}}_convertSpanToTransaction(e={}){if(!mi(Ht(this)))return;this._name||(r&&g.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=St(this),s=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(!0!==this._sampled)return;e.onSpanCaptured?.(this);const o=[];for(const t of Zt(this)){if(t===this||yi(t)||e.isSpanAlreadyCaptured?.(t))continue;const n=Ht(t);mi(n)&&(e.onSpanCaptured?.(t),o.push(n))}const i=this._attributes[et];delete this._attributes[ut];let a=!1;o.forEach(e=>{delete e.data[ut],e.op?.startsWith("gen_ai.")&&(a=!0)});const c={contexts:{trace:At(this)},spans:o.length>1e3?o.sort((e,t)=>e.start_timestamp-t.start_timestamp).slice(0,1e3):o,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:On(this),hasGenAiSpans:a},request:s,...i&&{transaction_info:{source:i}}},u=di(this._events);return u&&Object.keys(u).length&&(r&&g.log("[Measurements] Adding measurements to transaction event",JSON.stringify(u,void 0,2)),c.measurements=u),c}}function gi(e){return e&&"number"==typeof e||e instanceof Date||Array.isArray(e)}function mi(e){return!!(e.start_timestamp&&e.timestamp&&e.span_id&&e.trace_id)}function yi(e){return e instanceof fi&&e.isStandaloneSpan()}const _i="__SENTRY_SUPPRESS_TRACING__";function vi(e){const t=Ti();return t.startInactiveSpan?t.startInactiveSpan(e):bi(e)}function bi(e){const t=Ei(e),{forceTransaction:n,parentSpan:r}=e;return(e.scope?t=>Ye(e.scope,t):void 0!==r?e=>Si(r,e):e=>e())(()=>{const s=Ke(),o=Oi(s,r),i=Ge();return e.onlyIfParent&&!o?wi(s,i):ki({parentSpan:o,spanArguments:t,forceTransaction:n,scope:s})})}function Si(e,t){const n=Ti();return n.withActiveSpan?n.withActiveSpan(e,t):Ye(n=>(Ne(n,e||void 0),t(n)))}function xi(e=Ke()){const t=Ti();return t.isTracingSuppressed?t.isTracingSuppressed(e):!0===e.getScopeData().sdkProcessingMetadata[_i]}function wi(e,t){t?.recordDroppedEvent("no_parent_span","span");const n=new xn({traceId:e.getPropagationContext().traceId});return bt(n,e,Je()),n}function ki({parentSpan:e,spanArguments:t,forceTransaction:n,scope:s}){const o=Je();if(!bn()){const t=s.getPropagationContext(),r=e?e.spanContext().traceId:t.traceId,i=new xn({traceId:r});return e&&!n&&Qt(e,i),bt(i,s,o),i}const i=Ge();if(function(e,t){const n=e?.getOptions().ignoreSpans;if(!e||!nr(e)||!n?.length)return!1;return Hn({description:t.name||"",op:t.attributes?.[rt]||t.op,attributes:t.attributes},n)}(i,t)){xi(s)||i?.recordDroppedEvent("ignored","span");const t=new xn({dropReason:"ignored",traceId:e?.spanContext().traceId??s.getPropagationContext().traceId});return e&&!n&&Qt(e,t),bt(t,s,o),t}let a;if(e&&!n)a=function(e,t,n,r){const{spanId:s,traceId:o}=e.spanContext(),i=xi(t),a=!i&&Wt(e),c=a?new fi({...n,parentSpanId:s,traceId:o,sampled:a}):new xn({traceId:o});Qt(e,c),bt(c,t,r);const u=Ge();if(!u)return c;nr(u)&&wn(c)&&(wn(e)&&e.dropReason?(c.dropReason=e.dropReason,u.recordDroppedEvent(e.dropReason,"span")):i||(c.dropReason="sample_rate",u.recordDroppedEvent("sample_rate","span")));u.emit("spanStart",c),n.endTimestamp&&(u.emit("spanEnd",c),u.emit("afterSpanEnd",c));return c}(e,s,t,o),Qt(e,a);else if(e){const n=On(e),{traceId:r,spanId:i}=e.spanContext(),c=Wt(e);a=$i({traceId:r,parentSpanId:i,...t},s,o,c),En(a,n)}else{const{traceId:e,dsc:n,parentSpanId:r,sampled:i}=s.getPropagationContext();a=$i({traceId:e,parentSpanId:r,...t},s,o,i),n&&En(a,n)}return function(e){if(!r)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:s}=Ht(e),{spanId:o}=e.spanContext(),i=Wt(e),a=en(e),c=a===e,u=`[Tracing] Starting ${i?"sampled":"unsampled"} ${c?"root ":""}span`,l=[`op: ${n}`,`name: ${t}`,`ID: ${o}`];if(s&&l.push(`parent ID: ${s}`),!c){const{op:e,description:t}=Ht(a);l.push(`root ID: ${a.spanContext().spanId}`),e&&l.push(`root op: ${e}`),t&&l.push(`root description: ${t}`)}g.log(`${u}\n  ${l.join("\n  ")}`)}(a),a}function Ei(e){const t={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const n={...t};return n.startTimestamp=Ft(e.startTime),delete n.startTime,n}return t}function Ti(){return Ve(i())}function $i(e,t,n,s){const o=Ge(),i=o?.getOptions()||{},{name:a=""}=e,c={spanAttributes:{...e.attributes},spanName:a,parentSampled:s};o?.emit("beforeSampling",c,{decision:!1});const u=c.parentSampled??s,l=c.spanAttributes,p=t.getPropagationContext(),d=xi(t),[h,f,m]=d?[!1]:function(e,t,n){if(!bn(e))return[!1];let s,o;"function"==typeof e.tracesSampler?(o=e.tracesSampler({...t,inheritOrSampleWith:e=>"number"==typeof t.parentSampleRate?t.parentSampleRate:"boolean"==typeof t.parentSampled?Number(t.parentSampled):e}),s=!0):void 0!==t.parentSampled?o=t.parentSampled:void 0!==e.tracesSampleRate&&(o=e.tracesSampleRate,s=!0);const i=It(o);if(void 0===i)return r&&g.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(o)} of type ${JSON.stringify(typeof o)}.`),[!1];if(!i)return r&&g.log("[Tracing] Discarding transaction because "+("function"==typeof e.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),[!1,i,s];const a=n<i;return a||r&&g.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(o)})`),[a,i,s]}(i,{name:a,parentSampled:u,attributes:l,normalizedRequest:n.getScopeData().sdkProcessingMetadata.normalizedRequest,parentSampleRate:It(p.dsc?.sample_rate)},p.sampleRand),y=new fi({...e,attributes:{[et]:"custom",[tt]:void 0!==f&&m?f:void 0,...l},sampled:h});return h||!o||d||(r&&g.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),o.recordDroppedEvent("sample_rate",nr(o)?"span":"transaction")),bt(y,t,n),o&&o.emit("spanStart",y),y}function Oi(e,t){if(t)return t;if(null===t)return;const n=Ae(e);
1if(!n)return;const r=Ge();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?en(n):n}function Ii(e){return wn(e)&&"ignored"===e.dropReason}const Ci={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3};function Li(e,t={}){const n=new Map;let s,o,i=!1,a="externalFinish",c=!t.disableAutoFinish;const u=[],{idleTimeout:l=Ci.idleTimeout,finalTimeout:p=Ci.finalTimeout,childSpanTimeout:d=Ci.childSpanTimeout,beforeSpanEnd:h,trimIdleSpanEndTimestamp:f=!0}=t,m=Ge(),y=Ke();if(!m||!bn()){const e=new xn({traceId:y.getPropagationContext().traceId});return bt(e,y,Je()),e}const _=nn(),v=function(e){const t=vi(e);return Ne(Ke(),t),r&&g.log("[Tracing] Started span is an idle span"),t}(e);function b(){s&&(clearTimeout(s),s=void 0)}function S(){o&&(clearTimeout(o),o=void 0)}function x(e){b(),s=setTimeout(()=>{!i&&0===n.size&&c&&(a="idleTimeout",v.end(e))},l)}function w(e){S(),o=setTimeout(()=>{!i&&c&&(a="heartbeatFailed",v.end(e))},d)}function k(e){i=!0,n.clear(),u.forEach(e=>e()),Ne(y,_);const t=Ht(v),{start_timestamp:s}=t;if(!s)return;t.data[it]||v.setAttribute(it,a);const o=t.status;o&&"unknown"!==o||v.setStatus({code:1}),g.log(`[Tracing] Idle span "${t.op}" finished`);const c=Zt(v).filter(e=>e!==v);let d=0;
1c.forEach(t=>{t.isRecording()&&(t.setStatus({code:2,message:"cancelled"}),t.end(e),r&&g.log("[Tracing] Cancelling span since span ended early",JSON.stringify(t,void 0,2)));const n=Ht(t),{timestamp:s=0,start_timestamp:o=0}=n,i=o<=e,a=s-o<=(p+l)/1e3;if(r){const e=JSON.stringify(t,void 0,2);i?a||g.log("[Tracing] Discarding span since it finished after idle span final timeout",e):g.log("[Tracing] Discarding span since it happened after idle span was finished",e)}a&&i||(!function(e,t){e[Gt]&&e[Gt].delete(t)}(v,t),d++)}),d>0&&v.setAttribute("sentry.idle_span_discarded_spans",d)}return v.end=new Proxy(v.end,{apply(e,t,n){if(h&&h(v),wn(t))return;const[r,...s]=n,o=Ft(r||we()),i=Zt(v).filter(e=>e!==v),a=Ht(v);if(!i.length||!f)return k(o),Reflect.apply(e,t,[o,...s]);const c=m.getOptions().ignoreSpans,u=i?.reduce((e,t)=>{const n=Ht(t);return n.timestamp?c&&Hn({description:n.description,op:n.op,attributes:n.data},c)?e:e?Math.max(e,n.timestamp):n.timestamp:e},void 0),l=a.start_timestamp,d=Math.min(l?l+p/1e3:1/0,Math.max(l||-1/0,Math.min(o,u||1/0)));return k(d),Reflect.apply(e,t,[d,...s])}}),u.push(m.on("spanStart",e=>{if(i||e===v||Ht(e).timestamp||e instanceof fi&&e.isStandaloneSpan())return;var t;Zt(v).includes(e)&&(t=e.spanContext().spanId,b(),n.set(t,!0),w(we()+d/1e3))})),u.push(m.on("spanEnd",e=>{var t;i||(t=e.spanContext().spanId,n.has(t)&&n.delete(t),0===n.size&&(x(we()+l/1e3),S()))})),u.push(m.on("idleSpanEnableAutoFinish",e=>{e===v&&(c=!0,x(),n.size&&w())})),t.disableAutoFinish||x(),setTimeout(()=>{i||(v.setStatus({code:2,message:"deadline_exceeded"}),a="finalTimeout",v.end())},p),v}let Ri=!1;const Pi=(e,t,n,r)=>{let s,o;return i=>{t.value>=0&&(i||r)&&(o=t.value-(s??0),(o||void 0===s)&&(s=t.value,t.delta=o,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,n),e(t)))}},Ni=(e=!0)=>{const t=zs.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},Ai=()=>{const e=Ni();return e?.activationStart??0};let ji=-1;const Di=new Set,Mi=e=>{if(function(e){return"pagehide"===e.type||"hidden"===zs.document?.visibilityState}(e)&&ji>-1){if("visibilitychange"===e.type||"pagehide"===e.type)for(const e of Di)e();isFinite(ji)||(ji="visibilitychange"===e.type?e.timeStamp:0,mo("prerenderingchange",Mi,!0))}},Fi=()=>{if(zs.document&&ji<0){const e=Ai(),t=zs.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(t=>"hidden"===t.name&&t.startTime>e)[0]?.startTime;ji=t??("hidden"!==zs.document?.visibilityState||zs.document?.prerendering?1/0:0),go("visibilitychange",Mi,!0),go("pagehide",Mi,!0),go("prerenderingchange",Mi,!0)}return{get firstHiddenTime(){return ji},onHidden(e){Di.add(e)}}};const qi=(e,t=-1)=>{const n=Ni();let r="navigate";n&&(zs.document?.prerendering||Ai()>0?r="prerender":zs.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-")));return{name:e,value:t,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},Hi=new WeakMap;function Ui(e,t){try{return Hi.get(e)||Hi.set(e,new t),Hi.get(e)}catch(e){return new t}}class Bi{constructor(){this._sessionValue=0,this._sessionEntries=[]}_processEntry(e){if(e.hadRecentInput)return;const t=this._sessionEntries[0],n=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this._sessionValue+=e.value,this._sessionEntries.push(e)):(this._sessionValue=e.value,this._sessionEntries=[e]),this._onAfterProcessingUnexpectedShift?.(e)}}const zi=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},Vi=e=>{zs.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},Wi=[1800,3e3],Ki=[.1,.25],Ji=(e,t={})=>{((e,t={})=>{Vi(()=>{const n=Fi(),r=qi("FCP");let s;const o=zi("paint",e=>{for(const t of e)"first-contentful-paint"===t.name&&(o.disconnect(),t.startTime<n.firstHiddenTime&&(r.value=Math.max(t.startTime-Ai(),0),r.entries.push(t),s(!0)))});o&&(s=Pi(e,r,Wi,t.reportAllChanges))})})(yo(()=>{const n=qi("CLS",0);let r;const s=Fi(),o=Ui(t,Bi),i=e=>{for(const t of e)o._processEntry(t);o._sessionValue>
1n.value&&(n.value=o._sessionValue,n.entries=o._sessionEntries,r())},a=zi("layout-shift",i);a&&(r=Pi(e,n,Ki,t.reportAllChanges),s.onHidden(()=>{i(a.takeRecords()),r(!0)}),zs?.setTimeout?.(r))}))};let Yi=0,Gi=1/0,Xi=0;const Qi=e=>{e.forEach(e=>{e.interactionId&&(Gi=Math.min(Gi,e.interactionId),Xi=Math.max(Xi,e.interactionId),Yi=Xi?(Xi-Gi)/7+1:0)})};let Zi;const ea=()=>Zi?Yi:performance.interactionCount||0;let ta=0;class na{constructor(){this._longestInteractionList=[],this._longestInteractionMap=new Map}_resetInteractions(){ta=ea(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const e=Math.min(this._longestInteractionList.length-1,Math.floor((ea()-ta)/50));return this._longestInteractionList[e]}_processEntry(e){if(this._onBeforeProcessingEntry?.(e),!e.interactionId&&"first-input"!==e.entryType)return;const t=this._longestInteractionList.at(-1);let n=this._longestInteractionMap.get(e.interactionId);if(n||this._longestInteractionList.length<10||e.duration>t._latency){if(n?e.duration>n._latency?(n.entries=[e],n._latency=e.duration):e.duration===n._latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],_latency:e.duration},this._longestInteractionMap.set(n.id,n),this._longestInteractionList.push(n)),this._longestInteractionList.sort((e,t)=>t._latency-e._latency),this._longestInteractionList.length>10){const e=this._longestInteractionList.splice(10);for(const t of e)this._longestInteractionMap.delete(t.id)}this._onAfterProcessingINPCandidate?.(n)}}}const ra=[200,500],sa=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=Fi();Vi(()=>{"interactionCount"in performance||Zi||(Zi=zi("event",Qi,{type:"event",buffered:!0,durationThreshold:0}));const r=qi("INP");let s;const o=Ui(t,na),i=e=>{_o(()=>{for(const t of e)o._processEntry(t);const t=o._estimateP98LongestInteraction();t&&t._latency!==r.value&&(r.value=t._latency,r.entries=t.entries,s())})},a=zi("event",i,{durationThreshold:t.durationThreshold??40});s=Pi(e,r,ra,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{i(a.takeRecords()),s(!0)}))})};class oa{_processEntry(e){this._onBeforeProcessingEntry?.(e)}}const ia=[2500,4e3],aa=[800,1800],ca=e=>{zs.document?.prerendering?Vi(()=>ca(e)):"complete"!==zs.document?.readyState?addEventListener("load",()=>ca(e),!0):setTimeout(e)},ua={},la={};let pa,da,ha,fa;function ga(e,t=!1){return ka("cls",e,ba,pa,t)}function ma(e,t=!1){return ka("lcp",e,Sa,da,t)}function ya(e){return ka("inp",e,wa,fa)}function _a(e,t){return Ea(e,t),la[e]||(!function(e){const t={};"event"===e&&(t.durationThreshold=0);zi(e,t=>{va(e,{entries:t})},t)}(e),la[e]=!0),Ta(e,t)}function va(e,t){const n=ua[e];if(n?.length)for(const r of n)try{r(t)}catch(t){ri&&g.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${oe(r)}\nError:`,t)}}function ba(){return Ji(e=>{va("cls",{metric:e}),pa=e},{reportAllChanges:!0})}function Sa(){return((e,t={})=>{Vi(()=>{const n=Fi(),r=qi("LCP");let s;const o=Ui(t,oa),i=e=>{t.reportAllChanges||(e=e.slice(-1));for(const t of e)t&&(o._processEntry(t),t.startTime<n.firstHiddenTime&&(r.value=Math.max(t.startTime-Ai(),0),r.entries=[t],s()))},a=zi("largest-contentful-paint",i);if(a){s=Pi(e,r,ia,t.reportAllChanges);const n=yo(()=>{i(a.takeRecords()),a.disconnect(),s(!0)}),o=e=>{e.isTrusted&&(_o(n),mo(e.type,o,{capture:!0}))};for(const e of["keydown","click","visibilitychange"])go(e,o,{capture:!0})}})})(e=>{va("lcp",{metric:e}),da=e},{reportAllChanges:!0})}function xa(){return((e,t={})=>{const n=qi("TTFB"),r=Pi(e,n,aa,t.reportAllChanges);ca(()=>{const e=Ni();e&&(n.value=Math.max(e.responseStart-Ai(),0),n.entries=[e],r(!0))})})(e=>{va("ttfb",{metric:e}),ha=e})}function wa(){return sa(e=>{va("inp",{metric:e}),fa=e})}function ka(e,t,n,r,s=!1){let o;return Ea(e,t),la[e]||(o=n(),la[e]=!0),r&&t({metric:r}),Ta(e,t,s?o:void 0)}function Ea(e,t){ua[e]=ua[e]||[],ua[e].push(t)}function Ta(e,t,n){return()=>{n&&n();const r=ua[e];if(!r)return;const s=r.indexOf(t);-1!==s&&r.splice(s,1)}}function $a(e){return"number"==typeof e&&isFinite(e)}function Oa(e,t,n,{...r}){const s=Ht(e).start_timestamp;return s&&s>t&&"function"==typeof e.updateStartTime&&e.updateStartTime(t),Si(e,()=>{const e=vi({startTime:t,...r});return e&&e.end(n),e})}
1function Ia(e){const t=Ge();if(!t)return;const{name:n,transaction:r,attributes:s,startTime:o}=e,{release:i,environment:a}=t.getOptions(),{userInfo:c}=t.getDataCollectionOptions(),u=t.getIntegrationByName("Replay"),l=u?.getReplayId(),p=Ke(),d=p.getUser(),h=void 0!==d?d.email||d.id||d.ip_address:void 0;let f;try{f=p.getScopeData().contexts.profile.profile_id}catch{}return vi({name:n,attributes:{release:i,environment:a,user:h||void 0,profile_id:f||void 0,replay_id:l||void 0,transaction:r,"user_agent.original":zs.navigator?.userAgent,"client.address":c?"{{auto}}":void 0,...s},startTime:o,experimental:{standalone:!0}})}function Ca(){return zs.addEventListener&&zs.performance}function La(e){return e/1e3}function Ra(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function Pa(e,t){let n,r=!1;function s(e){!r&&n&&t(e,n.spanContext().spanId,n),r=!0}(e=>{const t=t=>{"pagehide"!==t.type&&"hidden"!==zs.document?.visibilityState||e(t)};go("visibilitychange",t,{capture:!0,once:!0}),go("pagehide",t,{capture:!0,once:!0})})(()=>{s("pagehide")});const o=e.on("beforeStartNavigationSpan",(e,t)=>{t?.isRedirect||(s("navigation"),o(),i())}),i=e.on("afterStartPageLoadSpan",e=>{n=e,i()})}function Na(e){let t,n=0;if(!Ra("layout-shift"))return;const r=ga(({metric:e})=>{const r=e.entries[e.entries.length-1];r&&(n=e.value,t=r)},!0);Pa(e,(e,s)=>{!function(e,t,n,r){ri&&g.log(`Sending CLS span (${e})`);const s=t?La((Ee()||0)+t.startTime):we(),o=Ke().getScopeData().transactionName,i=t?so(t.sources[0]?.node):"Layout shift",a={[st]:"auto.http.browser.cls",[rt]:"ui.webvital.cls",[pt]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((e,t)=>{a[`cls.source.${t+1}`]=so(e.node)});const c=Ia({name:i,transaction:o,attributes:a,startTime:s});c&&(c.addEvent("cls",{[at]:"",[ct]:e}),c.end(s))}(n,t,s,e),r()})}function Aa(e){return null!=e&&e>0&&e<=6e4}function ja(e){let t,n=0;if(!Ra("largest-contentful-paint"))return;const r=ma(({metric:e})=>{const r=e.entries[e.entries.length-1];r&&Aa(e.value)&&(n=e.value,t=r)},!0);Pa(e,(e,s)=>{!function(e,t,n,r){if(!Aa(e))return;ri&&g.log(`Sending LCP span (${e})`);const s=La((Ee()||0)+(t?.startTime||0)),o=Ke().getScopeData().transactionName,i=t?so(t.element):"Largest contentful paint",a={[st]:"auto.http.browser.lcp",[rt]:"ui.webvital.lcp",[pt]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(a["lcp.element"]=so(t.element)),t.id&&(a["lcp.id"]=t.id),t.url&&(a["lcp.url"]=t.url),null!=t.loadTime&&(a["lcp.loadTime"]=t.loadTime),null!=t.renderTime&&(a["lcp.renderTime"]=t.renderTime),null!=t.size&&(a["lcp.size"]=t.size));const c=Ia({name:i,transaction:o,attributes:a,startTime:s});c&&(c.addEvent("lcp",{[at]:"millisecond",[ct]:e}),c.end(s))}(n,t,s,e),r()})}function Da(e){return e?((Ee()||performance.timeOrigin)+e)/1e3:e}function Ma(e){const t={};if(null!=e.nextHopProtocol){const{name:n,version:r}=function(e){let t="unknown",n="unknown",r="";for(const s of e){if("/"===s){[t,n]=e.split("/");break}if(!isNaN(Number(s))){t="h"===r?"http":r,n=e.split(r)[1];break}r+=s}return r===e&&(t=r),{name:t,version:n}}(e.nextHopProtocol);t["network.protocol.version"]=r,t["network.protocol.name"]=n}return Ee()||Ca()?.timeOrigin?(n={...t,"http.request.redirect_start":Da(e.redirectStart),"http.request.redirect_end":Da(e.redirectEnd),"http.request.worker_start":Da(e.workerStart),"http.request.fetch_start":Da(e.fetchStart),"http.request.domain_lookup_start":Da(e.domainLookupStart),"http.request.domain_lookup_end":Da(e.domainLookupEnd),"http.request.connect_start":Da(e.connectStart),"http.request.secure_connection_start":Da(e.secureConnectionStart),"http.request.connection_end":Da(e.connectEnd),"http.request.request_start":Da(e.requestStart),"http.request.response_start":Da(e.responseStart),"http.request.response_end":Da(e.responseEnd),"http.request.time_to_first_byte":null!=e.responseStart?e.responseStart/1e3:void 0},Object.fromEntries(Object.entries(n).filter(([,e])=>null!=e))):t;var n}const Fa=2147483647;let qa,Ha,Ua=0,Ba={};function za({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=Ca();if(r&&Ee()){r.mark&&zs.performance.mark("sentry-tracing-init");const s=t?ja(n):!1===t?ma(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&Aa(e.value)&&(Ba.lcp={value:e.value,unit:"millisecond"},qa=t)},!0):void 0,o=e?Na(n):!1===e?ga(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Ba.cls={value:e.value,unit:""},Ha=t)},!0):void 0,i=ka("ttfb",({metric:e})=>{e.entries[e.entries.length-1]&&(Ba.ttfb={value:e.value,unit:"millisecond"})},xa,ha),a=_a("paint",({entries:e})=>{const t=Fi();for(const n of e){const e=n.startTime<t.firstHiddenTime;"first-paint"===n.name&&e&&(Ba.fp={value:n.startTime,unit:"millisecond"}),"first-contentful-paint"===n.name&&e&&(Ba.fcp={value:n.startTime,unit:"millisecond"})}});return()=>{i(),a(),s?.(),o?.()}}return()=>{}}function Va(e,t){const n=Ca(),r=Ee();if(!n?.getEntries||!r)return;const{spanStreamingEnabled:s,ignorePerformanceApiSpans:o,ignoreResourceSpans:i}=t,a=La(r),c=n.getEntries(),{op:u,start_timestamp:l}=Ht(e);
1c.slice(Ua).forEach(t=>{const n=La(t.startTime),r=La(Math.max(0,t.duration));if(!("navigation"===u&&l&&a+n<l))switch(t.entryType){case"navigation":!function(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Ja(e,t,r,n)}),Ja(e,t,"secureConnection",n,"TLS/SSL"),Ja(e,t,"fetch",n,"cache"),Ja(e,t,"domainLookup",n,"DNS"),function(e,t,n){const r=n+La(t.requestStart),s=n+La(t.responseEnd),o=n+La(t.responseStart);t.responseEnd&&(Oa(e,r,s,{op:"browser.request",name:t.name,attributes:{[st]:"auto.ui.browser.metrics"}}),Oa(e,o,s,{op:"browser.response",name:t.name,attributes:{[st]:"auto.ui.browser.metrics"}}))}(e,t,n)}(e,t,a);break;case"mark":case"paint":case"measure":!function(e,t,n,r,s,o){if(function(e){if("measure"!==e?.entryType)return;try{return"Components ⚛"===e.detail.devtools.track}catch{return}}(t))return;if(["mark","measure"].includes(t.entryType)&&ge(t.name,o))return;const i=Ni(!1),a=La(i?i.requestStart:0),c=s+Math.max(n,a),u=s+n,l=u+r,p={[st]:"auto.resource.browser.metrics"};c!==u&&(p["sentry.browser.measure_happened_before_request"]=!0,p["sentry.browser.measure_start_time"]=c);(function(e,t){try{const n=t.detail;if(!n)return;if("object"==typeof n){for(const[t,r]of Object.entries(n))if(r&&O(r))e[`sentry.browser.measure.detail.${t}`]=r;else if(void 0!==r)try{e[`sentry.browser.measure.detail.${t}`]=JSON.stringify(r)}catch{}return}if(O(n))return void(e["sentry.browser.measure.detail"]=n);try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}})(p,t),c<=l&&Oa(e,c,l,{name:t.name,op:t.entryType,attributes:p})}(e,t,n,r,a,o);break;case"resource":!function(e,t,n,r,s,o,i){if("xmlhttprequest"===t.initiatorType||"fetch"===t.initiatorType)return;const a=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(i?.includes(a))return;const c={[st]:"auto.resource.browser.metrics"},u=Us(n);u.protocol&&(c["url.scheme"]=u.protocol.split(":").pop());u.host&&(c["server.address"]=u.host);c["url.same_origin"]=n.includes(zs.location.origin),c[jo]=n,function(e,t,n){n.forEach(([n,r])=>{const s=e[n];null!=s&&("number"==typeof s&&s<Fa||"string"==typeof s)&&(t[r]=s)})}(t,c,[["responseStatus","http.response.status_code"],["transferSize","http.response_transfer_size"],["encodedBodySize","http.response_content_length"],["decodedBodySize","http.decoded_response_content_length"],["renderBlockingStatus","resource.render_blocking_status"],["deliveryType","http.response_delivery_type"]]);const l={...c,...Ma(t)},p=o+r,d=p+s;Oa(e,p,d,{name:n.replace(zs.location.origin,""),op:a,attributes:l})}(e,t,t.name,n,r,a,i)}}),Ua=Math.max(c.length-1,0),function(e,t){const n=zs.navigator;if(!n)return;const r=n.connection;r&&(r.effectiveType&&e.setAttribute(t?"network.connection.effective_type":"effectiveConnectionType",r.effectiveType),r.type&&e.setAttribute(t?"network.connection.type":"connectionType",r.type),$a(r.rtt)&&(t?e.setAttribute("network.connection.rtt",r.rtt):"pageload"===Ht(e).op&&pi("connection.rtt",r.rtt,"millisecond")));$a(n.deviceMemory)&&(t?e.setAttribute("device.memory.estimated_capacity",n.deviceMemory):e.setAttribute("deviceMemory",`${n.deviceMemory} GB`));$a(n.hardwareConcurrency)&&(t?e.setAttribute("device.processor_count",n.hardwareConcurrency):e.setAttribute("hardwareConcurrency",String(n.hardwareConcurrency)))}(e,s)}function Wa(e,t){const n=Ee();if(!Ca()?.getEntries||!n)return void Ka();const{spanStreamingEnabled:r,recordClsOnPageloadSpan:s,recordLcpOnPageloadSpan:o}=t,i=La(n);if("pageload"===Ht(e).op){if(function(e){const t=Ni(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}(Ba),r){const t=(t,n,r)=>{const s=r??`browser.web_vital.${t}.value`;e.setAttribute(s,n),ri&&g.log("Setting web vital attribute",{[s]:n},"on pageload span")};["ttfb","fp","fcp"].forEach(e=>{Ba[e]&&t(e,Ba[e].value)}),Ba["ttfb.requestTime"]&&t("ttfb.requestTime",Ba["ttfb.requestTime"].value,"browser.web_vital.ttfb.request_time")}else s||delete Ba.cls,o||delete Ba.lcp,Object.entries(Ba).forEach(([t,n])=>{pi(t,n.value,n.unit,e)}),function(e,t){qa&&t.recordLcpOnPageloadSpan&&(qa.element&&e.setAttribute("lcp.element",so(qa.element)),qa.id&&e.setAttribute("lcp.id",qa.id),qa.url&&e.setAttribute("lcp.url",qa.url.trim().slice(0,200)),null!=qa.loadTime&&e.setAttribute("lcp.loadTime",qa.loadTime),null!=qa.renderTime&&e.setAttribute("lcp.renderTime",qa.renderTime),e.setAttribute("lcp.size",qa.size));
1Ha?.sources&&t.recordClsOnPageloadSpan&&Ha.sources.forEach((t,n)=>e.setAttribute(`cls.source.${n+1}`,so(t.node)))}(e,t);e.setAttribute(r?"browser.performance.time_origin":"performance.timeOrigin",i),e.setAttribute(r?"browser.performance.navigation.activation_start":"performance.activationStart",Ai())}Ka()}function Ka(){qa=void 0,Ha=void 0,Ba={}}function Ja(e,t,n,r,s=n){const o=function(e){if("secureConnection"===e)return"connectEnd";if("fetch"===e)return"domainLookupStart";return`${e}End`}(n),i=t[o],a=t[`${n}Start`];a&&i&&Oa(e,r+La(a),r+La(i),{op:`browser.${s}`,name:t.name,attributes:{[st]:"auto.ui.browser.metrics",..."redirect"===n&&null!=t.redirectCount?{"http.redirect_count":t.redirectCount}:{}}})}const Ya=new WeakMap,Ga=new WeakMap,Xa=["text/event-stream","application/x-ndjson","application/stream+json"],Qa=()=>({name:"FetchStreamPerformance",setup(){!function(e){const t="fetch-body-resolved",n=bs(t,e);Ss(t,()=>Cs(Ls))}(e=>{if(e.response){const t=Ya.get(e.response);if(t&&e.endTimestamp){t.end(e.endTimestamp);const n=Ga.get(e.response);n&&clearTimeout(n)}}}),Is(e=>{if(e.endTimestamp&&e.response){const t=e.response.headers?.get("content-type")||"";if(e.response.headers?.get("content-length")||!Xa.some(e=>t.startsWith(e)))return;const n=e.fetchData?.url||"",r=e.fetchData?.method||"GET",s=qs(n),o=vi({name:`${r} ${n.startsWith("data:")?Bs(n):s?Hs(s):n}`,startTime:e.endTimestamp,attributes:{url:Bs(n),"http.method":r,type:"fetch",[rt]:"http.client.stream",[st]:"auto.http.browser.stream"}});Ya.set(e.response,o);const i=setTimeout(()=>{o.isRecording()&&o.end()},9e4);Ga.set(e.response,i)}})}}),Za=[],ec=new Map,tc=new Map;function nc(){if(Ca()&&Ee()){const e=ya(sc);return()=>{e()}}return()=>{}}const rc={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};const sc=({metric:e})=>{if(null==e.value)return;const t=La(e.value);if(t>60)return;const n=e.entries.find(t=>t.duration===e.value&&rc[t.name]);if(!n)return;const{interactionId:r}=n,s=rc[n.name],o=La(Ee()+n.startTime),i=nn(),a=i?en(i):void 0,c=null!=r?ec.get(r):void 0,u=c?.span||a,l=u?Ht(u).description:Ke().getScopeData().transactionName,p=Ia({name:c?.elementName||so(n.target),transaction:l,attributes:{[st]:"auto.http.browser.inp",[rt]:`ui.interaction.${s}`,[pt]:n.duration},startTime:o});p&&(p.addEvent("inp",{[at]:"millisecond",[ct]:e.value}),p.end(o+t))};function oc(){const e=Object.keys(rc);function t(e){const t=e.target;if(!t)return;const n=so(t),r=Math.round(e.timeStamp);if(tc.set(r,n),tc.size>50){const e=tc.keys().next().value;void 0!==e&&tc.delete(e)}}Kn()&&e.forEach(e=>{zs.addEventListener(e,t,{capture:!0,passive:!0})});const n=({entries:e})=>{const t=nn(),n=t&&en(t);e.forEach(e=>{if(!function(e){return"duration"in e}(e))return;const t=e.interactionId;if(null==t)return;if(ec.has(t))return;const r=e.target?so(e.target):function(e){const t=Math.round(e.startTime);let n=tc.get(t);if(!n)for(let e=-5;e<=5;e++){const r=tc.get(t+e);if(r){n=r;break}}return n||"<unknown>"}(e);if(Za.length>10){const e=Za.shift();ec.delete(e)}Za.push(t),ec.set(t,{span:n,elementName:r})})};_a("event",n),_a("first-input",n)}function ic(e){const{name:t,op:n,origin:r,metricName:s,value:o,attributes:i,parentSpan:a,reportEvent:c,startTime:u,endTime:l}=e,p=Ke().getScopeData().transactionName,d={[st]:r,[rt]:n,[pt]:0,[`browser.web_vital.${s}.value`]:o,[Ao]:p,[No]:p,"user_agent.original":zs.navigator?.userAgent,...i};a&&"pageload"===Ut(a).attributes?.[rt]&&(d["sentry.pageload.span_id"]=a.spanContext().spanId),c&&(d[`browser.web_vital.${s}.report_event`]=c);const h=vi({name:t,attributes:d,startTime:u,parentSpan:a});h&&h.end(l??u)}function ac(e){let t,n=0;if(!Ra("largest-contentful-paint"))return;const r=ma(({metric:e})=>{const r=e.entries[e.entries.length-1];r&&Aa(e.value)&&(n=e.value,t=r)},!0);Pa(e,(e,s,o)=>{!function(e,t,n,r){if(!Aa(e))return;ri&&g.log(`Sending LCP span (${e})`);const s=Ee()||0,o=La(s),i=La(s+(t?.startTime||0)),a=t?so(t.element):"Largest contentful paint",c={};t?.element&&(c["browser.web_vital.lcp.element"]=so(t.element)),t?.id&&(c["browser.web_vital.lcp.id"]=t.id),t?.url&&(c["browser.web_vital.lcp.url"]=t.url),null!=t?.loadTime&&(c["browser.web_vital.lcp.load_time"]=t.loadTime),null!=t?.renderTime&&(c["browser.web_vital.lcp.render_time"]=t.renderTime),null!=t?.size&&(c["browser.web_vital.lcp.size"]=t.size),ic({name:a,op:"ui.webvital.lcp",origin:"auto.http.browser.lcp",metricName:"lcp",value:e,attributes:c,parentSpan:n,reportEvent:r,startTime:o,endTime:i})}(n,t,o,e),r()})}function cc(e){let t,n=0;if(!Ra("layout-shift"))return;const r=ga(({metric:e})=>{const r=e.entries[e.entries.length-1];r&&(n=e.value,t=r)},!0);Pa(e,(e,s,o)=>{!function(e,t,n,r){ri&&g.log(`Sending CLS span (${e})`);const s=t?La((Ee()||0)+t.startTime):we(),o=t?so(t.sources[0]?.node):"Layout shift",i={};
1t?.sources&&t.sources.forEach((e,t)=>{i[`browser.web_vital.cls.source.${t+1}`]=so(e.node)});ic({name:o,op:"ui.webvital.cls",origin:"auto.http.browser.cls",metricName:"cls",value:e,attributes:i,parentSpan:n,reportEvent:r,startTime:s})}(n,t,o,e),r()})}function uc(){if(!Ca()||!Ee())return;ya(({metric:e})=>{if(null==e.value)return;if(La(e.value)>60)return;const t=e.entries.find(t=>t.duration===e.value&&rc[t.name]);t&&function(e,t){ri&&g.log(`Sending INP span (${e})`);const n=La(Ee()+t.startTime),r=La(e),s=rc[t.name],o=(p=t.interactionId,null!=p?ec.get(p):void 0),i=nn(),a=i?en(i):void 0,c=o?.span||a,u=c?Ut(c).name:Ke().getScopeData().transactionName,l=o?.elementName||so(t.target);var p;ic({name:l,op:`ui.interaction.${s}`,origin:"auto.http.browser.inp",metricName:"inp",value:e,attributes:{[pt]:t.duration,[Ao]:u,[No]:u},startTime:n,endTime:n+r,parentSpan:c})}(e.value,t)})}const lc="WebVitals",pc=(e={})=>{const t=new Set(e.ignore??[]);return{name:lc,setup(n){const r=nr(n),{enableStandaloneClsSpans:s,enableStandaloneLcpSpans:o}=e._experiments??{},i=r||t.has("cls")?void 0:s||!1,a=r||t.has("lcp")?void 0:o||!1,c=za({recordClsStandaloneSpans:i,recordLcpStandaloneSpans:a,client:n}),u=new WeakSet;n.on("afterStartPageLoadSpan",e=>{u.add(e)}),n.on("spanEnd",e=>{u.delete(e)&&(c(),Wa(e,{recordClsOnPageloadSpan:!1===i,recordLcpOnPageloadSpan:!1===a,spanStreamingEnabled:r}))}),r?(t.has("lcp")||ac(n),t.has("cls")||cc(n),t.has("inp")||uc()):t.has("inp")||nc()},afterAllSetup(){t.has("inp")||oc()}}};const dc="sentry_previous_trace",hc="sentry.previous_trace";function fc(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r="session-storage"===t;let s=r?function(){try{const e=ds.sessionStorage?.getItem(dc);return JSON.parse(e)}catch{return}}():void 0;e.on("spanStart",e=>{if(en(e)!==e)return;const t=Ke().getPropagationContext();s=function(e,t,n){const r=Ht(t);function s(){try{const e=Number(r.data?.[tt]??n.dsc?.sample_rate);return Number.isNaN(e)?0:e}catch{return 0}}const o={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:s(),sampleRand:n.sampleRand};if(!e)return o;const i=e.spanContext;if(i.traceId===r.trace_id)return e;Date.now()/1e3-e.startTimestamp<=3600&&(io&&g.log(`Adding previous_trace \`${JSON.stringify(i)}\` link to span \`${JSON.stringify({op:r.op,...t.spanContext()})}\``),t.addLink({context:i,attributes:{[dt]:"previous_trace"}}),t.setAttribute(hc,`${i.traceId}-${i.spanId}-${gc(i)?1:0}`));return o}(s,e,t),r&&function(e){try{ds.sessionStorage.setItem(dc,JSON.stringify(e))}catch(e){io&&g.warn("Could not store previous trace in sessionStorage",e)}}(s)});let o=!0;n&&e.on("beforeSampling",e=>{if(!s)return;const t=Ke(),n=t.getPropagationContext();o&&n.parentSpanId?o=!1:(t.setPropagationContext({...n,dsc:{...n.dsc,sample_rate:String(s.sampleRate),sampled:String(gc(s.spanContext))},sampleRand:s.sampleRand}),e.parentSampled=gc(s.spanContext),e.parentSampleRate=s.sampleRate,e.spanAttributes={...e.spanAttributes,[nt]:s.sampleRate})})}function gc(e){return 1===e.traceFlags}function mc(e,t){e.setAttribute("http.response.status_code",t);const n=function(e){if(e<400&&e>=100)return{code:1};if(e>=400&&e<500)switch(e){case 401:return{code:2,message:"unauthenticated"};case 403:return{code:2,message:"permission_denied"};case 404:return{code:2,message:"not_found"};case 409:return{code:2,message:"already_exists"};case 413:return{code:2,message:"failed_precondition"};case 429:return{code:2,message:"resource_exhausted"};case 499:return{code:2,message:"cancelled"};default:return{code:2,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:2,message:"unimplemented"};case 503:return{code:2,message:"unavailable"};case 504:return{code:2,message:"deadline_exceeded"};default:return{code:2,message:"internal_error"}}return{code:2,message:"internal_error"}}(t);"unknown_error"!==n.message&&e.setStatus(n)}function yc(e={}){const t=e.client||Ge();if(!function(){const e=Ge();return!1!==e?.getOptions().enabled&&!!e?.getTransport()}()||!t)return{};const n=Ve(i());if(n.getTraceData)return n.getTraceData(e);const r=e.scope||Ke(),s=e.span||nn(),o=wn(s)&&!bn(t.getOptions());if(!s&&void 0!==We)return{};const a=s&&!o?function(e){const{traceId:t,spanId:n}=e.spanContext();return Rt(t,n,Wt(e))}(s):function(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Rt(t,r,n)}(r),c=function(e){if(!e)return;return Ot(Object.entries(e).reduce((e,[t,n])=>(n&&(e[`${kt}${t}`]=n),e),{}))}(s?On(s):$n(t,r));
1if(!Ct.test(a))return g.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const u={"sentry-trace":a,baggage:c};return e.propagateTraceparent&&(u.traceparent=s&&!o?function(e){const{traceId:t,spanId:n}=e.spanContext();return Pt(t,n,Wt(e))}(s):function(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Pt(t,r,n)}(r)),u}function _c(e,t,n,r,s){if(!e.fetchData)return;const{method:o,url:i}=e.fetchData,a=bn()&&t(i);if(e.endTimestamp){const t=e.fetchData.__span;if(!t)return;const n=r[t];return void(n&&(a&&(function(e,t){if(t.response){mc(e,t.response.status);const n=t.response?.headers?.get("content-length");if(n){const t=parseInt(n);t>0&&e.setAttribute("http.response_content_length",t)}}else t.error&&e.setStatus({code:2,message:"internal_error"});e.end()}(n,e),function(e,t,n){const r="object"==typeof n&&null!==n?n.onRequestSpanEnd:void 0;r?.(e,{headers:t.response?.headers,error:t.error})}(n,e,s)),delete r[t]))}const{spanOrigin:c="auto.http.browser",propagateTraceparent:u=!1}="object"==typeof s?s:{spanOrigin:s},l=Ge(),p=!!nn(),d=p||!!l&&nr(l),h=a&&d?vi(function(e,t,n){if(e.startsWith("data:")){return{name:`${t} ${Bs(e)}`,attributes:bc(e,void 0,t,n)}}const r=qs(e),s=r?Hs(r):e;return{name:`${t} ${s}`,attributes:bc(e,r,t,n)}}(i,o,c)):new xn,f=Ii(h)&&p?void 0:h;if(a&&!d&&l?.recordDroppedEvent("no_parent_span","span"),e.fetchData.__span=h.spanContext().spanId,r[h.spanContext().spanId]=h,n(e.fetchData.url)){const t=e.args[0],n={...e.args[1]||{}},r=function(e,t,n,r){const s=yc({span:n,propagateTraceparent:r}),o=s["sentry-trace"],i=s.baggage,a=s.traceparent;if(!o)return;const c=t.headers||(N(e)?e.headers:void 0);if(c){if(function(e){return"undefined"!=typeof Headers&&P(e,Headers)}(c)){const e=new Headers(c);if(e.get("sentry-trace")||e.set("sentry-trace",o),r&&a&&!e.get("traceparent")&&e.set("traceparent",a),i){const t=e.get("baggage");t?vc(t)||e.set("baggage",`${t},${i}`):e.set("baggage",i)}return e}if(function(e){if(!Array.isArray(e))return!1;return e.every(e=>Array.isArray(e)&&2===e.length&&"string"==typeof e[0])}(c)){const e=[...c];e.find(e=>"sentry-trace"===e[0])||e.push(["sentry-trace",o]),r&&a&&!e.find(e=>"traceparent"===e[0])&&e.push(["traceparent",a]);const t=c.find(e=>"baggage"===e[0]&&"string"==typeof e[1]&&vc(e[1]));return i&&!t&&e.push(["baggage",i]),e}{const e="sentry-trace"in c?c["sentry-trace"]:void 0,t="traceparent"in c?c.traceparent:void 0,n="baggage"in c?c.baggage:void 0,s=n?Array.isArray(n)?[...n]:[n]:[],u=n&&(Array.isArray(n)?n.find(e=>vc(e)):vc(n));i&&!u&&s.push(i);const l=Object.assign({},c,{"sentry-trace":e??o,...s.length>0&&{baggage:s.join(",")}});return r&&a&&!t&&(l.traceparent=a),l}}return{"sentry-trace":o,...i&&{baggage:i},...a&&{traceparent:a}}}(t,n,bn()&&d?f:void 0,u);r&&(e.args[1]=n,n.headers=r)}if(l){const t={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};l.emit("beforeOutgoingRequestSpan",h,t)}return h}function vc(e){return"string"==typeof e&&e.split(",").some(e=>e.trim().startsWith(kt))}function bc(e,t,n,r){const s={url:Bs(e),type:"fetch","http.method":n,[st]:r,[rt]:"http.client"};return t&&(Fs(t)||(s[Po]=Bs(t.href),s[jo]=Bs(t.href),s["server.address"]=t.host),t.search&&(s["http.query"]=t.search),t.hash&&(s["http.fragment"]=t.hash)),s}function Sc(e){let t;try{t=e.getAllResponseHeaders()}catch(t){return ri&&g.error(t,"Failed to get xhr response headers",e),{}}return t?t.split("\r\n").reduce((e,t)=>{const[n,r]=t.split(": ");return r&&(e[n.toLowerCase()]=r),e},{}):{}}function xc(e){try{return new URL(e,ds.location.origin).href}catch{return}}function wc(e){try{return new Headers(e)}catch{return}}const kc={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function Ec(e,t){const{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:s,enableHTTPTimings:o,tracePropagationTargets:i,onRequestSpanStart:a,onRequestSpanEnd:c}
1={...kc,...t},u="function"==typeof s?s:e=>!0,l=e=>function(e,t){const n=ls();if(n){let r,s;try{r=new URL(e,n),s=new URL(n).origin}catch{return!1}const o=r.origin===s;return t?ge(r.toString(),t)||o&&ge(r.pathname,t):o}{const n=!!e.match(/^\/(?!\/)/);return t?ge(e,t):n}}(e,i),p={},d=e.getOptions().propagateTraceparent;n&&Is(t=>{const n=_c(t,u,l,p,{propagateTraceparent:d,onRequestSpanEnd:c});if(n){const r=xc(t.fetchData.url),s=r?Us(r).host:void 0,i=r?Bs(r):void 0;n.setAttributes({[Po]:i,[jo]:i,"server.address":s}),o&&$c(n,e),a?.(n,{headers:t.headers})}}),r&&Xs(t=>{const n=function(e,t,n,r,s,o){const i=e.xhr,a=i?.[Gs];if(!i||i.__sentry_own_request__||!a)return;const{url:c,method:u}=a,l=bn()&&t(c);if(e.endTimestamp){const t=i.__sentry_xhr_span_id__;if(!t)return;const n=r[t];return void(n&&(l&&void 0!==a.status_code&&(mc(n,a.status_code),n.end(),o?.(n,{headers:wc(Sc(i)),error:e.error})),delete r[t]))}const p=xc(c),d=Us(p||c),h=p?Bs(p):void 0,f=Bs((b=c,b.split(/[?#]/,1)[0])),g=Ge(),m=!!nn(),y=m||!!g&&nr(g),_=l&&y?vi({name:`${u} ${f}`,attributes:{url:Bs(c),type:"xhr","http.method":u,"http.url":h,[jo]:h,"server.address":d?.host,[st]:"auto.http.browser",[rt]:"http.client",...d?.search&&{"http.query":d?.search},...d?.hash&&{"http.fragment":d?.hash}}}):new xn,v=Ii(_)&&m?void 0:_;var b;l&&!y&&g?.recordDroppedEvent("no_parent_span","span");i.__sentry_xhr_span_id__=_.spanContext().spanId,r[i.__sentry_xhr_span_id__]=_,n(c)&&function(e,t,n){const{"sentry-trace":r,baggage:s,traceparent:o}=yc({span:t,propagateTraceparent:n});r&&function(e,t,n,r){const s=e.__sentry_xhr_v3__?.request_headers;if(s?.["sentry-trace"]||!e.setRequestHeader)return;try{if(e.setRequestHeader("sentry-trace",t),r&&!s?.traceparent&&e.setRequestHeader("traceparent",r),n){const t=s?.baggage;t&&t.split(",").some(e=>e.trim().startsWith("sentry-"))||e.setRequestHeader("baggage",n)}}catch{}}(e,r,s,o)}(i,bn()&&y?v:void 0,s);g&&g.emit("beforeOutgoingRequestSpan",_,e);return _}(t,u,l,p,d,c);n&&(o&&$c(n,e),a?.(n,{headers:wc(t.xhr.__sentry_xhr_v3__?.request_headers)}))})}const Tc=300;function $c(e,t){const{url:n}=Ht(e).data;if(!n||"string"!=typeof n)return;let r=()=>{setTimeout(s)};if(nr(t)){const t=e.end.bind(e);e.end=e=>{const n=e??we();let o=!1;const i=()=>{o||(o=!0,setTimeout(s),t(n),clearTimeout(a))};r=i;const a=setTimeout(i,Tc)}}const s=_a("resource",({entries:t})=>{t.forEach(t=>{(function(e){return"resource"===e.entryType&&"initiatorType"in e&&"string"==typeof e.nextHopProtocol&&("fetch"===e.initiatorType||"xmlhttprequest"===e.initiatorType)})(t)&&t.name.endsWith(n)&&(e.setAttributes(Ma(t)),r())})})}const Oc=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;const Ic={...Ci,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...kc},Cc=(e={})=>{"enableElementTiming"in e&&p(()=>{console.warn("[Sentry] `enableElementTiming` is deprecated and no longer has any effect. Use the standalone `elementTimingIntegration` instead.")});const t={name:void 0,source:void 0},n=ds.document,{enableInp:s,enableLongTask:i,enableLongAnimationFrame:a,_experiments:{enableInteractions:c,enableStandaloneClsSpans:u,enableStandaloneLcpSpans:l},beforeStartSpan:d,idleTimeout:h,finalTimeout:f,childSpanTimeout:m,markBackgroundSpan:y,traceFetch:_,traceXHR:v,trackFetchStreamPerformance:b,shouldCreateSpanForRequest:S,enableHTTPTimings:x,ignoreResourceSpans:w,ignorePerformanceApiSpans:k,instrumentPageLoad:E,instrumentNavigation:T,detectRedirects:$,linkPreviousTrace:O,consistentTraceSampling:I,enableReportPageLoaded:C,onRequestSpanStart:L,onRequestSpanEnd:R}={...Ic,...e},P=function(){const e=ds.navigator;return!!e?.userAgent&&Oc.test(e.userAgent)}();let N,A;
1function j(e,r,s=!0,o){const i="pageload"===r.op,a=r.name,c=d?d(r):r,u=qs(o||ls()),l={...u?.pathname&&{[Do]:u.pathname},...u&&!Fs(u)&&{[jo]:u.href},...c.attributes};if(a!==c.name&&(l[et]="custom"),c.attributes=l,!s){const e=Se();return void vi({...c,startTime:e}).end(e)}t.name=c.name,t.source=l[et];const p=Li(c,{idleTimeout:h,finalTimeout:f,childSpanTimeout:m,disableAutoFinish:i,beforeSpanEnd:t=>{Va(t,{ignoreResourceSpans:w,ignorePerformanceApiSpans:k,spanStreamingEnabled:nr(e)}),Ac(e,void 0);const n=Ke(),r=n.getPropagationContext();n.setPropagationContext({...r,traceId:p.spanContext().traceId,sampled:Wt(p),dsc:On(t)}),i&&(A=void 0)},trimIdleSpanEndTimestamp:!C});function g(){n&&["interactive","complete"].includes(n.readyState)&&(e.emit("idleSpanEnableAutoFinish",p),n.removeEventListener("readystatechange",g))}i&&C&&(A=p),Ac(e,p),i&&!C&&n&&(n.addEventListener("readystatechange",g),g())}return{name:"BrowserTracing",setup(e){if(P)io&&g.log("[Tracing] Skipping browserTracingIntegration setup for bot user agent.");else{if(function(){function e(){const e=nn(),t=e&&en(e);if(t){const e="internal_error";r&&g.log(`[Tracing] Root span: ${e} -> Global error occurred`),t.setStatus({code:2,message:e})}}Ri||(Ri=!0,ko(e),$o(e))}(),a&&o.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?.includes("long-animation-frame")?new PerformanceObserver(e=>{const t=nn();if(t)for(const n of e.getEntries()){if(!n.scripts[0])continue;const e=La(Ee()+n.startTime),{start_timestamp:r,op:s}=Ht(t);if("navigation"===s&&r&&e<r)continue;const o=La(n.duration),i={[st]:"auto.ui.browser.metrics"},a=n.scripts[0],{invoker:c,invokerType:u,sourceURL:l,sourceFunctionName:p,sourceCharPosition:d}=a;i["browser.script.invoker"]=c,i["browser.script.invoker_type"]=u,l&&(i["code.filepath"]=l),p&&(i["code.function"]=p),-1!==d&&(i["browser.script.source_char_position"]=d),Oa(t,e,e+o,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:i})}}).observe({type:"long-animation-frame",buffered:!0}):i&&_a("longtask",({entries:e})=>{const t=nn();if(!t)return;const{op:n,start_timestamp:r}=Ht(t);for(const s of e){const e=La(Ee()+s.startTime),o=La(s.duration);"navigation"===n&&r&&e<r||Oa(t,e,e+o,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[st]:"auto.ui.browser.metrics"}})}}),c&&_a("event",({entries:e})=>{const t=nn();if(t)for(const n of e)if("click"===n.name){const e=La(Ee()+n.startTime),r=La(n.duration),s={name:so(n.target),op:`ui.interaction.${n.name}`,startTime:e,attributes:{[st]:"auto.ui.browser.metrics"}},o=ps(n.target);o&&(s.attributes["ui.component_name"]=o),Oa(t,e,e+r,s)}}),$&&n){const e=()=>{N=we()};addEventListener("click",e,{capture:!0}),addEventListener("keydown",e,{capture:!0,passive:!0})}e.on("startNavigationSpan",(n,r)=>{if(Ge()!==e)return;if(r?.isRedirect)return io&&g.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),void j(e,{op:"navigation.redirect",...n},!1,r.url);N=void 0,t();const s=Ke();s.setPropagationContext({traceId:Ie(),sampleRand:Math.random(),propagationSpanId:bn()?void 0:Ce()}),s.setSDKProcessingMetadata({normalizedRequest:void 0}),j(e,{op:"navigation",...n,parentSpan:null,forceTransaction:!0},!0,r?.url)}),e.on("startPageLoadSpan",(n,r={})=>{if(Ge()!==e)return;t();const s=Lt(r.sentryTrace||Lc("sentry-trace")||Rc("sentry-trace"),r.baggage||Lc("baggage")||Rc("baggage")),o=Ke();o.setPropagationContext(s),bn()||(o.getPropagationContext().propagationSpanId=Ce()),o.setSDKProcessingMetadata({normalizedRequest:ms()}),j(e,{op:"pageload",...n})}),e.on("endPageloadSpan",()=>{C&&A&&(A.setAttribute(it,"reportPageLoaded"),A.end())})}function t(){const t=Nc(e);t&&!Ht(t).timestamp&&(io&&g.log(`[Tracing] Finishing current active span with op: ${Ht(t).op}`),t.setAttribute(it,"cancelled"),t.end())}},afterAllSetup(e){if(P)return;e.addIntegration&&!e.getIntegrationByName?.(lc)&&e.addIntegration(pc({ignore:s?[]:["inp"],_experiments:{enableStandaloneClsSpans:u,enableStandaloneLcpSpans:l}}));let n=ls();if("off"!==O&&fc(e,{linkPreviousTrace:O,consistentTraceSampling:I}),ds.location){if(E){const t=Ee();!function(e,t,n){e.emit("startPageLoadSpan",t,n),Ke().setTransactionName(t.name);const r=Nc(e);r&&e.emit("afterStartPageLoadSpan",r)}(e,{name:ds.location.pathname,startTime:t?t/1e3:void 0,attributes:{[et]:"url",[st]:"auto.pageload.browser"}})}T&&eo(({to:t,from:r})=>{if(void 0===r&&-1!==n?.indexOf(t))return void(n=void 0);n=void 0;const s=qs(t),o=Nc(e),i=o&&$&&function(e,t){const n=Ht(e),r=Se(),s=n.start_timestamp;if(r-s>jc)return!1;if(t&&r-t<=jc)return!1;return!0}(o,N);!function(e,t,n){const{url:r,isRedirect:s}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:s,url:r}),e.emit("startNavigationSpan",t,{isRedirect:s,url:r});const o=Ke();o.setTransactionName(t.name),r&&!s&&o.setSDKProcessingMetadata({normalizedRequest:{...ms(),url:r}});Nc(e)}(e,{name:s?.pathname||ds.location.pathname,attributes:{[et]:"url",[st]:"auto.navigation.browser"}},{url:t,isRedirect:i})})}y&&(ds.document?ds.document.addEventListener("visibilitychange",()=>{const e=nn();if(!e)return;const t=en(e);if(ds.document.hidden&&t){const e="cancelled",{op:n,status:r}=Ht(t);io&&g.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${n}`),r||t.setStatus({code:2,message:e}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):io&&g.warn("[Tracing] Could not set up background tab detection due to lack of global document")),c&&function(e,t,n,r,s
1){const o=ds.document;let i;const a=()=>{const o="ui.action.click",a=Nc(e);if(a){const e=Ht(a).op;if(["navigation","pageload"].includes(e))return void(io&&g.warn(`[Tracing] Did not create ${o} span because a pageload or navigation span is in progress.`))}i&&(i.setAttribute(it,"interactionInterrupted"),i.end(),i=void 0),s.name?i=Li({name:s.name,op:o,attributes:{[et]:s.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r}):io&&g.warn(`[Tracing] Did not create ${o} transaction because _latestRouteName is missing.`)};o&&addEventListener("click",a,{capture:!0})}(e,h,f,m,t),Ec(e,{traceFetch:_,traceXHR:v,tracePropagationTargets:e.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:S,enableHTTPTimings:x,onRequestSpanStart:L,onRequestSpanEnd:R}),b&&e.addIntegration(Qa())}}};function Lc(e){const t=ds.document,n=t?.querySelector(`meta[name=${e}]`);return n?.getAttribute("content")||void 0}function Rc(e){const t=ds.performance?.getEntriesByType?.("navigation")[0],n=t?.serverTiming?.find(t=>t.name===e);return n?.description}const Pc="_sentry_idleSpan";function Nc(e){return e[Pc]}function Ac(e,t){j(e,Pc,t)}const jc=1.5;const Dc=e=>li({dsn:e,release:"princess-js@a52ddc4",integrations:[Cc()],environment:"prod"})}}]);

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.