@promodev/form-builder-vue3 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/form-builder-vue3.js +991 -959
- package/dist/form-builder-vue3.umd.cjs +17 -17
- package/dist/widget/form-builder-vue3.iife.js +18 -18
- package/package.json +1 -1
|
@@ -24,19 +24,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24
24
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function MR(e,t){if(e){if(typeof e=="string")return Fv(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fv(e,t):void 0}}function Fv(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function LR(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}function DR(e){if(Array.isArray(e))return e}function FR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,jR(r.key),r)}}function BR(e,t,n){return t&&UR(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function jR(e){var t=qR(e,"string");return Bl(t)=="symbol"?t:t+""}function qR(e,t){if(Bl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Bl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var zR="["+Nr+Bn+"]+",HR=new RegExp("^"+zR+"$","i"),VR="(?:["+cd+"]["+Nr+Bn+"]*|["+Nr+Bn+"]+)",WR=new RegExp("[^"+Nr+Bn+"]+.*$"),GR=/[^\d\[\]]/,YR=(function(){function e(t){var n=t.defaultCountry,r=t.defaultCallingCode,i=t.metadata,o=t.onNationalSignificantNumberChange;FR(this,e),this.defaultCountry=n,this.defaultCallingCode=r,this.metadata=i,this.onNationalSignificantNumberChange=o}return BR(e,[{key:"input",value:function(n,r){var i=JR(n),o=Dv(i,2),s=o[0],a=o[1],l=dd(s),c;return a&&(r.digits||(r.startInternationalNumber(void 0,void 0),l||(c=!0))),l&&this.inputDigits(l,r),{digits:l,justLeadingPlus:c}}},{key:"inputDigits",value:function(n,r){var i=r.digits,o=i.length<3&&i.length+n.length>=3;if(r.appendDigits(n),o&&this.extractIddPrefix(r),this.isWaitingForCountryCallingCode(r)){if(!this.extractCountryCallingCode(r))return}else r.appendNationalSignificantNumberDigits(n);r.international||this.hasExtractedNationalSignificantNumber||this.extractNationalSignificantNumber(r.getNationalDigits(),function(s){return r.update(s)})}},{key:"isWaitingForCountryCallingCode",value:function(n){var r=n.international,i=n.callingCode;return r&&!i}},{key:"extractCountryCallingCode",value:function(n){var r=a0("+"+n.getDigitsWithoutInternationalPrefix(),n.country,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),i=r.countryCallingCode,o=r.number;if(i)return n.setCallingCode(i),n.update({nationalSignificantNumber:o}),!0}},{key:"reset",value:function(n){if(n){this.hasSelectedNumberingPlan=!0;var r=n._nationalPrefixForParsing();this.couldPossiblyExtractAnotherNationalSignificantNumber=r&&GR.test(r)}else this.hasSelectedNumberingPlan=void 0,this.couldPossiblyExtractAnotherNationalSignificantNumber=void 0}},{key:"extractNationalSignificantNumber",value:function(n,r){if(this.hasSelectedNumberingPlan){var i=i0(n,this.metadata),o=i.nationalPrefix,s=i.nationalNumber,a=i.carrierCode;if(s!==n)return this.onExtractedNationalNumber(o,a,s,n,r),!0}}},{key:"extractAnotherNationalSignificantNumber",value:function(n,r,i){if(!this.hasExtractedNationalSignificantNumber)return this.extractNationalSignificantNumber(n,i);if(this.couldPossiblyExtractAnotherNationalSignificantNumber){var o=i0(n,this.metadata),s=o.nationalPrefix,a=o.nationalNumber,l=o.carrierCode;if(a!==r)return this.onExtractedNationalNumber(s,l,a,n,i),!0}}},{key:"onExtractedNationalNumber",value:function(n,r,i,o,s){var a=!1,l,c=o.lastIndexOf(i);if(c<0||c!==o.length-i.length)a=!0;else{var u=o.slice(0,c);u&&u!==n&&(l=u)}s({nationalPrefix:n,carrierCode:r,nationalSignificantNumber:i,nationalSignificantNumberIsModified:a,prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix:l}),this.hasExtractedNationalSignificantNumber=!0,this.onNationalSignificantNumberChange()}},{key:"reExtractNationalSignificantNumber",value:function(n){if(this.extractAnotherNationalSignificantNumber(n.getNationalDigits(),n.nationalSignificantNumber,function(r){return n.update(r)}))return!0;if(this.extractIddPrefix(n))return this.extractCallingCodeAndNationalSignificantNumber(n),!0;if(this.fixMissingPlus(n))return this.extractCallingCodeAndNationalSignificantNumber(n),!0}},{key:"extractIddPrefix",value:function(n){var r=n.international,i=n.IDDPrefix,o=n.digits;if(n.nationalSignificantNumber,!(r||i)){var s=nv(o,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata);if(s!==void 0&&s!==o)return n.update({IDDPrefix:o.slice(0,o.length-s.length)}),this.startInternationalNumber(n,{country:void 0,callingCode:void 0}),!0}}},{key:"fixMissingPlus",value:function(n){if(!n.international){var r=ov(n.digits,n.country,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),i=r.countryCallingCode;if(i)return n.update({missingPlus:!0}),this.startInternationalNumber(n,{country:n.country,callingCode:i}),!0}}},{key:"startInternationalNumber",value:function(n,r){var i=r.country,o=r.callingCode;n.startInternationalNumber(i,o),n.nationalSignificantNumber&&(n.resetNationalSignificantNumber(),this.onNationalSignificantNumberChange(),this.hasExtractedNationalSignificantNumber=void 0)}},{key:"extractCallingCodeAndNationalSignificantNumber",value:function(n){this.extractCountryCallingCode(n)&&this.extractNationalSignificantNumber(n.getNationalDigits(),function(r){return n.update(r)})}}])})();function KR(e){var t=e.search(VR);if(!(t<0)){e=e.slice(t);var n;return e[0]==="+"&&(n=!0,e=e.slice(1)),e=e.replace(WR,""),n&&(e="+"+e),e}}function XR(e){var t=KR(e)||"";return t[0]==="+"?[t.slice(1),!0]:[t]}function JR(e){var t=XR(e),n=Dv(t,2),r=n[0],i=n[1];return HR.test(r)||(r=""),[r,i]}function jl(e){"@babel/helpers - typeof";return jl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jl(e)}function ZR(e,t){return nO(e)||tO(e,t)||eO(e,t)||QR()}function QR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
25
25
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eO(e,t){if(e){if(typeof e=="string")return Uv(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Uv(e,t):void 0}}function Uv(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function tO(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}function nO(e){if(Array.isArray(e))return e}function rO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,sO(r.key),r)}}function oO(e,t,n){return t&&iO(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function sO(e){var t=aO(e,"string");return jl(t)=="symbol"?t:t+""}function aO(e,t){if(jl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(jl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Bv=(function(){function e(t,n){rO(this,e),this.metadata=new pn(n);var r=this.getCountryAndCallingCode(t),i=ZR(r,2),o=i[0],s=i[1];this.defaultCountry=o,this.defaultCallingCode=s,this.reset()}return oO(e,[{key:"getCountryAndCallingCode",value:function(n){var r,i;return n&&(Jo(n)?(r=n.defaultCountry,i=n.defaultCallingCode):r=n),r&&!this.metadata.hasCountry(r)&&(r=void 0),[r,i]}},{key:"input",value:function(n){var r=this.parser.input(n,this.state),i=r.digits,o=r.justLeadingPlus;if(o)this.formattedOutput="+";else if(i){this.determineTheCountryIfNeeded(),this.state.nationalSignificantNumber&&this.formatter.narrowDownMatchingFormats(this.state);var s;if(this.metadata.hasSelectedNumberingPlan()&&(s=this.formatter.format(i,this.state)),s===void 0&&this.parser.reExtractNationalSignificantNumber(this.state)){this.determineTheCountryIfNeeded();var a=this.state.getNationalDigits();a&&(s=this.formatter.format(a,this.state))}this.formattedOutput=s?this.getFullNumber(s):this.getNonFormattedNumber()}return this.formattedOutput}},{key:"reset",value:function(){var n=this;return this.state=new XN({onCountryChange:function(i){n.country=i},onCallingCodeChange:function(i,o){n.metadata.selectNumberingPlan(o,i),n.formatter.reset(n.metadata.numberingPlan,n.state),n.parser.reset(n.metadata.numberingPlan)}}),this.formatter=new OR({state:this.state,metadata:this.metadata}),this.parser=new YR({defaultCountry:this.defaultCountry,defaultCallingCode:this.defaultCallingCode,metadata:this.metadata,state:this.state,onNationalSignificantNumberChange:function(){n.determineTheCountryIfNeeded(),n.formatter.reset(n.metadata.numberingPlan,n.state)}}),this.state.reset({country:this.defaultCountry,callingCode:this.defaultCallingCode}),this.formattedOutput="",this}},{key:"isInternational",value:function(){return this.state.international}},{key:"getCallingCode",value:function(){if(this.isInternational())return this.state.callingCode}},{key:"getCountryCallingCode",value:function(){return this.getCallingCode()}},{key:"getCountry",value:function(){var n=this.state.digits;if(n)return this._getCountry()}},{key:"_getCountry",value:function(){var n=this.state.country;return n}},{key:"determineTheCountryIfNeeded",value:function(){(!this.state.country||this.isCountryCallingCodeAmbiguous())&&this.determineTheCountry()}},{key:"getFullNumber",value:function(n){var r=this;if(this.isInternational()){var i=function(a){return r.formatter.getInternationalPrefixBeforeCountryCallingCode(r.state,{spacing:!!a})+a},o=this.state.callingCode;return i(o?n?"".concat(o," ").concat(n):o:"".concat(this.state.getDigitsWithoutInternationalPrefix()))}return n}},{key:"getNonFormattedNationalNumberWithPrefix",value:function(){var n=this.state,r=n.nationalSignificantNumber,i=n.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix,o=n.nationalPrefix,s=r,a=i||o;return a&&(s=a+s),s}},{key:"getNonFormattedNumber",value:function(){var n=this.state.nationalSignificantNumberIsModified;return this.getFullNumber(n?this.state.getNationalDigits():this.getNonFormattedNationalNumberWithPrefix())}},{key:"getNonFormattedTemplate",value:function(){var n=this.getNonFormattedNumber();if(n)return n.replace(/[\+\d]/g,Rr)}},{key:"isCountryCallingCodeAmbiguous",value:function(){var n=this.state.callingCode,r=this.metadata.getCountryCodesForCallingCode(n);return r&&r.length>1}},{key:"determineTheCountry",value:function(){this.state.setCountry(o0(this.isInternational()?this.state.callingCode:this.defaultCallingCode,{nationalNumber:this.state.nationalSignificantNumber,metadata:this.metadata}))}},{key:"getNumberValue",value:function(){var n=this.state,r=n.digits,i=n.callingCode,o=n.country,s=n.nationalSignificantNumber;if(r){if(this.isInternational())return i?"+"+i+s:"+"+r;if(o||i){var a=o?this.metadata.countryCallingCode():i;return"+"+a+s}}}},{key:"getNumber",value:function(){var n=this.state,r=n.nationalSignificantNumber,i=n.carrierCode,o=n.callingCode,s=this._getCountry();if(r&&!(!s&&!o)){if(s&&s===this.defaultCountry){var a=new pn(this.metadata.metadata);a.selectNumberingPlan(s);var l=a.numberingPlan.callingCode(),c=this.metadata.getCountryCodesForCallingCode(l);if(c.length>1){var u=iv(r,{countries:c,metadata:this.metadata.metadata});u&&(s=u)}}var d=new mv(s||o,r,this.metadata.metadata);return i&&(d.carrierCode=i),d}}},{key:"isPossible",value:function(){var n=this.getNumber();return n?n.isPossible():!1}},{key:"isValid",value:function(){var n=this.getNumber();return n?n.isValid():!1}},{key:"getNationalNumber",value:function(){return this.state.nationalSignificantNumber}},{key:"getChars",value:function(){return(this.state.international?"+":"")+this.state.digits}},{key:"getTemplate",value:function(){return this.formatter.getTemplate(this.state)||this.getNonFormattedTemplate()||""}}])})();function lO(){return jC(HN,arguments)}function pd(e){return Bv.call(this,e,Gb)}pd.prototype=Object.create(Bv.prototype,{}),pd.prototype.constructor=pd;const cO=[{local:"690",intl:"+590"},{local:"691",intl:"+590"},{local:"590",intl:"+590"},{local:"696",intl:"+596"},{local:"697",intl:"+596"},{local:"596",intl:"+596"},{local:"694",intl:"+594"},{local:"594",intl:"+594"},{local:"692",intl:"+262"},{local:"693",intl:"+262"},{local:"262",intl:"+262"},{local:"269",intl:"+262"}];function jv(e){const t=(e||"").replace(/[\s.\-()]/g,"");if(!t.startsWith("0"))return e;const n=t.slice(1);for(const{local:r,intl:i}of cO)if(n.startsWith(r))return i+n.slice(r.length);return e}const md=typeof window<"u",lo=(e,t=!1)=>t?Symbol.for(e):Symbol(e),uO=(e,t,n)=>dO({l:e,k:t,s:n}),dO=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Qt=e=>typeof e=="number"&&isFinite(e),qv=e=>b0(e)==="[object Date]",Zo=e=>b0(e)==="[object RegExp]",y0=e=>xt(e)&&Object.keys(e).length===0,Kt=Object.assign,fO=Object.create,$t=(e=null)=>fO(e);let zv;const co=()=>zv||(zv=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:$t()),pO=Object.prototype.hasOwnProperty;function _r(e,t){return pO.call(e,t)}function mn(e,t){const n=e[t];return _r(e,t)?n:void 0}function Hv(e){return _r(Object.prototype,e)}const Ft=Array.isArray,Ut=e=>typeof e=="function",Oe=e=>typeof e=="string",wt=e=>typeof e=="boolean",at=e=>e!==null&&typeof e=="object",mO=e=>at(e)&&Ut(e.then)&&Ut(e.catch),Vv=Object.prototype.toString,b0=e=>Vv.call(e),xt=e=>b0(e)==="[object Object]",_O=e=>e==null?"":Ft(e)||xt(e)&&e.toString===Vv?JSON.stringify(e,null,2):String(e);function v0(e,t=""){return e.reduce((n,r,i)=>i===0?n+r:n+t+r,"")}function hO(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}function Wv(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/").replace(/=/g,"=")}function gO(e){return e.replace(/&(?![a-z0-9#]{2,6};)/gi,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}const yO=/^javascript:/i,bO=/^(?:href|xlink:href|src|action|formaction)$/i,vO=/&#(?:x([0-9a-f]+)|(\d+));?/gi,$O=/&(?:Tab|NewLine);/g,SO=/:?/gi,EO=/[\u0000-\u0020\u007f-\u009f]/g,TO=/(?:^|[\s"'<>/])on\w+\s*=\s*["']?[^"'>]+["']?/i,wO=/(^|[\s"'<>/])on(\w+\s*=)/gi,IO=/(?:^|[\s"'<>/])srcdoc\s*=/i,AO=/(^|[\s"'<>/])s(rcdoc\s*=)/gi,xO=/<(?:base|animate|set)(?=[\s/>]|$)/i,CO=/<(base|animate|set)(?=[\s/>]|$)/gi,kO=/(^|[\s"'<>/])((?:href|xlink:href|src|action|formaction)\s*=\s*)([^\s"'=<>`]+)/gi;function NO(e,t,n){const r=t||n;if(!r)return e;const i=Number.parseInt(r,t?16:10);return i<=127?String.fromCharCode(i):e}function $0(e){const t=e.replace(vO,NO).replace($O,"").replace(SO,":").replace(EO,"");return yO.test(t)}function RO(e){const t=/url\s*\(/gi;let n="",r=0,i;for(;(i=t.exec(e))!==null;){const o=i.index,s=t.lastIndex-1;let a=s+1,l=1,c=null;for(;a<e.length;a++){const f=e[a];if(c){f===c&&(c=null);continue}if(f==='"'||f==="'")c=f;else if(f==="(")l++;else if(f===")"&&(l--,l===0))break}if(l!==0)break;const u=e.slice(s+1,a).trim(),d=u.startsWith('"')&&u.endsWith('"')||u.startsWith("'")&&u.endsWith("'")?u.slice(1,-1).trim():u;n+=e.slice(r,o),n+=$0(d)?"url(about:blank)":e.slice(o,a+1),r=a+1}return n+e.slice(r)}function Gv(e,t){if(bO.test(e)&&$0(t))return"about:blank";const n=e.toLowerCase()==="style"?RO(t):t;return gO(n)}function OO(e){return e=e.replace(/([\w:-]+)\s*=\s*"([^"]*)"/g,(t,n,r)=>`${n}="${Gv(n,r)}"`),e=e.replace(/([\w:-]+)\s*=\s*'([^']*)'/g,(t,n,r)=>`${n}='${Gv(n,r)}'`),TO.test(e)&&(e=e.replace(wO,"$1on$2")),IO.test(e)&&(e=e.replace(AO,"$1s$2")),xO.test(e)&&(e=e.replace(CO,"<$1")),e=e.replace(kO,(t,n,r,i)=>$0(i)?`${n}${r}about:blank`:t),e}const Yv=e=>!at(e)||Ft(e);function _d(e,t){if(Yv(e)||Yv(t)||t===Object.prototype)throw new Error("Invalid value");const n=[{src:e,des:t}];for(;n.length;){const{src:r,des:i}=n.pop();Object.keys(r).forEach(o=>{if(o==="__proto__")return;const s=r[o];if(Ft(s)){const a=[];a.length=s.length,i[o]=a,n.push({src:s,des:a})}else at(s)?((!at(i[o])||Ft(i[o]))&&(i[o]=$t()),n.push({src:s,des:i[o]})):i[o]=s})}}function PO(e,t,n){return{line:e,column:t,offset:n}}function S0(e,t,n){return{start:e,end:t}}const gt={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14},MO=17;function hd(e,t,n={}){const{domain:r,messages:i,args:o}=n,s=e,a=new SyntaxError(String(s));return a.code=e,t&&(a.location=t),a.domain=r,a}function LO(e){throw e}const ti=" ",DO="\r",Rn=`
|
|
26
26
|
`,FO="\u2028",UO="\u2029";function BO(e){const t=e;let n=0,r=1,i=1,o=0;const s=w=>t[w]===DO&&t[w+1]===Rn,a=w=>t[w]===Rn,l=w=>t[w]===UO,c=w=>t[w]===FO,u=w=>s(w)||a(w)||l(w)||c(w),d=()=>n,f=()=>r,p=()=>i,m=()=>o,b=w=>s(w)||l(w)||c(w)?Rn:t[w],g=()=>b(n),_=()=>b(n+o);function y(){return o=0,u(n)&&(r++,i=0),s(n)&&n++,n++,i++,t[n]}function T(){return s(n+o)&&o++,o++,t[n+o]}function S(){n=0,r=1,i=1,o=0}function O(w=0){o=w}function N(){const w=n+o;for(;w!==n;)y();o=0}return{index:d,line:f,column:p,peekOffset:m,charAt:b,currentChar:g,currentPeek:_,next:y,peek:T,reset:S,resetPeek:O,skipToPeek:N}}const Ii=void 0,jO=".",Kv="'",qO="tokenizer";function zO(e,t={}){const n=t.location!==!1,r=BO(e),i=()=>r.index(),o=()=>PO(r.line(),r.column(),r.index()),s=o(),a=i(),l={currentType:13,offset:a,startLoc:s,endLoc:s,lastType:13,lastOffset:a,lastStartLoc:s,lastEndLoc:s,braceNest:0,inLinked:!1,text:""},c=()=>l,{onError:u}=t;function d($,v,E,...x){const Q=c();if(v.column+=E,v.offset+=E,u){const Z=n?S0(Q.startLoc,v):null,ne=hd($,Z,{domain:qO,args:x});u(ne)}}function f($,v,E){$.endLoc=o(),$.currentType=v;const x={type:v};return n&&(x.loc=S0($.startLoc,$.endLoc)),E!=null&&(x.value=E),x}const p=$=>f($,13);function m($,v){return $.currentChar()===v?($.next(),v):(d(gt.EXPECTED_TOKEN,o(),0,v),"")}function b($){let v="";for(;$.currentPeek()===ti||$.currentPeek()===Rn;)v+=$.currentPeek(),$.peek();return v}function g($){const v=b($);return $.skipToPeek(),v}function _($){if($===Ii)return!1;const v=$.charCodeAt(0);return v>=97&&v<=122||v>=65&&v<=90||v===95}function y($){if($===Ii)return!1;const v=$.charCodeAt(0);return v>=48&&v<=57}function T($,v){const{currentType:E}=v;if(E!==2)return!1;b($);const x=_($.currentPeek());return $.resetPeek(),x}function S($,v){const{currentType:E}=v;if(E!==2)return!1;b($);const x=$.currentPeek()==="-"?$.peek():$.currentPeek(),Q=y(x);return $.resetPeek(),Q}function O($,v){const{currentType:E}=v;if(E!==2)return!1;b($);const x=$.currentPeek()===Kv;return $.resetPeek(),x}function N($,v){const{currentType:E}=v;if(E!==7)return!1;b($);const x=$.currentPeek()===".";return $.resetPeek(),x}function w($,v){const{currentType:E}=v;if(E!==8)return!1;b($);const x=_($.currentPeek());return $.resetPeek(),x}function D($,v){const{currentType:E}=v;if(!(E===7||E===11))return!1;b($);const x=$.currentPeek()===":";return $.resetPeek(),x}function Y($,v){const{currentType:E}=v;if(E!==9)return!1;const x=()=>{const Z=$.currentPeek();return Z==="{"?_($.peek()):Z==="@"||Z==="|"||Z===":"||Z==="."||Z===ti||!Z?!1:Z===Rn?($.peek(),x()):P($,!1)},Q=x();return $.resetPeek(),Q}function q($){b($);const v=$.currentPeek()==="|";return $.resetPeek(),v}function P($,v=!0){const E=(Q=!1,Z="")=>{const ne=$.currentPeek();return ne==="{"||ne==="@"||!ne?Q:ne==="|"?!(Z===ti||Z===Rn):ne===ti?($.peek(),E(!0,ti)):ne===Rn?($.peek(),E(!0,Rn)):!0},x=E();return v&&$.resetPeek(),x}function C($,v){const E=$.currentChar();return E===Ii?Ii:v(E)?($.next(),E):null}function F($){const v=$.charCodeAt(0);return v>=97&&v<=122||v>=65&&v<=90||v>=48&&v<=57||v===95||v===36}function R($){return C($,F)}function G($){const v=$.charCodeAt(0);return v>=97&&v<=122||v>=65&&v<=90||v>=48&&v<=57||v===95||v===36||v===45}function z($){return C($,G)}function K($){const v=$.charCodeAt(0);return v>=48&&v<=57}function M($){return C($,K)}function oe($){const v=$.charCodeAt(0);return v>=48&&v<=57||v>=65&&v<=70||v>=97&&v<=102}function te($){return C($,oe)}function se($){let v="",E="";for(;v=M($);)E+=v;return E}function _e($){let v="";for(;;){const E=$.currentChar();if(E==="\\"){const x=$.peek();x==="{"||x==="}"||x==="@"||x==="|"||x==="\\"?(v+=E+x,$.next(),$.next()):($.resetPeek(),v+=E,$.next())}else{if(E==="{"||E==="}"||E==="@"||E==="|"||!E)break;if(E===ti||E===Rn)if(P($))v+=E,$.next();else{if(q($))break;v+=E,$.next()}else v+=E,$.next()}}return v}function ce($){g($);let v="",E="";for(;v=z($);)E+=v;const x=$.currentChar();if(x&&x!=="}"&&x!==Ii&&x!==ti&&x!==Rn&&x!==" "){const Q=Ue($);return d(gt.INVALID_TOKEN_IN_PLACEHOLDER,o(),0,E+Q),E+Q}return $.currentChar()===Ii&&d(gt.UNTERMINATED_CLOSING_BRACE,o(),0),E}function ye($){g($);let v="";return $.currentChar()==="-"?($.next(),v+=`-${se($)}`):v+=se($),$.currentChar()===Ii&&d(gt.UNTERMINATED_CLOSING_BRACE,o(),0),v}function Te($){return $!==Kv&&$!==Rn}function le($){g($),m($,"'");let v="",E="";for(;v=C($,Te);)v==="\\"?E+=ge($):E+=v;const x=$.currentChar();return x===Rn||x===Ii?(d(gt.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,o(),0),x===Rn&&($.next(),m($,"'")),E):(m($,"'"),E)}function ge($){const v=$.currentChar();switch(v){case"\\":case"'":return $.next(),`\\${v}`;case"u":return Ce($,v,4);case"U":return Ce($,v,6);default:return d(gt.UNKNOWN_ESCAPE_SEQUENCE,o(),0,v),""}}function Ce($,v,E){m($,v);let x="";for(let Q=0;Q<E;Q++){const Z=te($);if(!Z){d(gt.INVALID_UNICODE_ESCAPE_SEQUENCE,o(),0,`\\${v}${x}${$.currentChar()}`);break}x+=Z}return`\\${v}${x}`}function Me($){return $!=="{"&&$!=="}"&&$!==ti&&$!==Rn}function Ue($){g($);let v="",E="";for(;v=C($,Me);)E+=v;return E}function nt($){let v="",E="";for(;v=R($);)E+=v;return E}function A($){const v=E=>{const x=$.currentChar();return x==="{"||x==="@"||x==="|"||x==="("||x===")"||!x||x===ti?E:(E+=x,$.next(),v(E))};return v("")}function k($){g($);const v=m($,"|");return g($),v}function X($,v){let E=null;switch($.currentChar()){case"{":return v.braceNest>=1&&d(gt.NOT_ALLOW_NEST_PLACEHOLDER,o(),0),$.next(),E=f(v,2,"{"),g($),v.braceNest++,E;case"}":return v.braceNest>0&&v.currentType===2&&d(gt.EMPTY_PLACEHOLDER,o(),0),$.next(),E=f(v,3,"}"),v.braceNest--,v.braceNest>0&&g($),v.inLinked&&v.braceNest===0&&(v.inLinked=!1),E;case"@":return v.braceNest>0&&d(gt.UNTERMINATED_CLOSING_BRACE,o(),0),E=ae($,v)||p(v),v.braceNest=0,E;default:{let Q=!0,Z=!0,ne=!0;if(q($))return v.braceNest>0&&d(gt.UNTERMINATED_CLOSING_BRACE,o(),0),E=f(v,1,k($)),v.braceNest=0,v.inLinked=!1,E;if(v.braceNest>0&&(v.currentType===4||v.currentType===5||v.currentType===6))return d(gt.UNTERMINATED_CLOSING_BRACE,o(),0),v.braceNest=0,ee($,v);if(Q=T($,v))return E=f(v,4,ce($)),g($),E;if(Z=S($,v))return E=f(v,5,ye($)),g($),E;if(ne=O($,v))return E=f(v,6,le($)),g($),E;if(!Q&&!Z&&!ne)return E=f(v,12,Ue($)),d(gt.INVALID_TOKEN_IN_PLACEHOLDER,o(),0,E.value),g($),E;break}}return E}function ae($,v){const{currentType:E}=v;let x=null;const Q=$.currentChar();switch((E===7||E===8||E===11||E===9)&&(Q===Rn||Q===ti)&&d(gt.INVALID_LINKED_FORMAT,o(),0),Q){case"@":return $.next(),x=f(v,7,"@"),v.inLinked=!0,x;case".":return g($),$.next(),f(v,8,".");case":":return g($),$.next(),f(v,9,":");default:return q($)?(x=f(v,1,k($)),v.braceNest=0,v.inLinked=!1,x):N($,v)||D($,v)?(g($),ae($,v)):w($,v)?(g($),f(v,11,nt($))):Y($,v)?(g($),Q==="{"?X($,v)||x:f(v,10,A($))):(E===7&&d(gt.INVALID_LINKED_FORMAT,o(),0),v.braceNest=0,v.inLinked=!1,ee($,v))}}function ee($,v){let E={type:13};if(v.braceNest>0)return X($,v)||p(v);if(v.inLinked)return ae($,v)||p(v);switch($.currentChar()){case"{":return X($,v)||p(v);case"}":return d(gt.UNBALANCED_CLOSING_BRACE,o(),0),$.next(),f(v,3,"}");case"@":return ae($,v)||p(v);default:{if(q($))return E=f(v,1,k($)),v.braceNest=0,v.inLinked=!1,E;if(P($))return f(v,0,_e($));break}}return E}function re(){const{currentType:$,offset:v,startLoc:E,endLoc:x}=l;return l.lastType=$,l.lastOffset=v,l.lastStartLoc=E,l.lastEndLoc=x,l.offset=i(),l.startLoc=o(),r.currentChar()===Ii?f(l,13):ee(r,l)}return{nextToken:re,currentOffset:i,currentPosition:o,context:c}}const HO="parser",VO=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g,WO=/\\([\\@{}|])/g;function GO(e,t){return t}function YO(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const r=parseInt(t||n,16);return r<=55295||r>=57344?String.fromCodePoint(r):"�"}}}function KO(e={}){const t=e.location!==!1,{onError:n}=e;function r(_,y,T,S,...O){const N=_.currentPosition();if(N.offset+=S,N.column+=S,n){const w=t?S0(T,N):null,D=hd(y,w,{domain:HO,args:O});n(D)}}function i(_,y,T){const S={type:_};return t&&(S.start=y,S.end=y,S.loc={start:T,end:T}),S}function o(_,y,T,S){t&&(_.end=y,_.loc&&(_.loc.end=T))}function s(_,y){const T=_.context(),S=i(3,T.offset,T.startLoc);return S.value=y.replace(WO,GO),o(S,_.currentOffset(),_.currentPosition()),S}function a(_,y){const T=_.context(),{lastOffset:S,lastStartLoc:O}=T,N=i(5,S,O);return N.index=parseInt(y,10),_.nextToken(),o(N,_.currentOffset(),_.currentPosition()),N}function l(_,y){const T=_.context(),{lastOffset:S,lastStartLoc:O}=T,N=i(4,S,O);return N.key=y,_.nextToken(),o(N,_.currentOffset(),_.currentPosition()),N}function c(_,y){const T=_.context(),{lastOffset:S,lastStartLoc:O}=T,N=i(9,S,O);return N.value=y.replace(VO,YO),_.nextToken(),o(N,_.currentOffset(),_.currentPosition()),N}function u(_){const y=_.nextToken(),T=_.context(),{lastOffset:S,lastStartLoc:O}=T,N=i(8,S,O);return y.type!==11?(r(_,gt.UNEXPECTED_EMPTY_LINKED_MODIFIER,T.lastStartLoc,0),N.value="",o(N,S,O),{nextConsumeToken:y,node:N}):(y.value==null&&r(_,gt.UNEXPECTED_LEXICAL_ANALYSIS,T.lastStartLoc,0,ni(y)),N.value=y.value||"",o(N,_.currentOffset(),_.currentPosition()),{node:N})}function d(_,y){const T=_.context(),S=i(7,T.offset,T.startLoc);return S.value=y,o(S,_.currentOffset(),_.currentPosition()),S}function f(_){const y=_.context(),T=i(6,y.offset,y.startLoc);let S=_.nextToken();if(S.type===8){const O=u(_);T.modifier=O.node,S=O.nextConsumeToken||_.nextToken()}switch(S.type!==9&&r(_,gt.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,ni(S)),S=_.nextToken(),S.type===2&&(S=_.nextToken()),S.type){case 10:S.value==null&&r(_,gt.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,ni(S)),T.key=d(_,S.value||"");break;case 4:S.value==null&&r(_,gt.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,ni(S)),T.key=l(_,S.value||"");break;case 5:S.value==null&&r(_,gt.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,ni(S)),T.key=a(_,S.value||"");break;case 6:S.value==null&&r(_,gt.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,ni(S)),T.key=c(_,S.value||"");break;default:{r(_,gt.UNEXPECTED_EMPTY_LINKED_KEY,y.lastStartLoc,0);const O=_.context(),N=i(7,O.offset,O.startLoc);return N.value="",o(N,O.offset,O.startLoc),T.key=N,o(T,O.offset,O.startLoc),{nextConsumeToken:S,node:T}}}return o(T,_.currentOffset(),_.currentPosition()),{node:T}}function p(_){const y=_.context(),T=y.currentType===1?_.currentOffset():y.offset,S=y.currentType===1?y.endLoc:y.startLoc,O=i(2,T,S);O.items=[];let N=null;do{const Y=N||_.nextToken();switch(N=null,Y.type){case 0:Y.value==null&&r(_,gt.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,ni(Y)),O.items.push(s(_,Y.value||""));break;case 5:Y.value==null&&r(_,gt.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,ni(Y)),O.items.push(a(_,Y.value||""));break;case 4:Y.value==null&&r(_,gt.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,ni(Y)),O.items.push(l(_,Y.value||""));break;case 6:Y.value==null&&r(_,gt.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,ni(Y)),O.items.push(c(_,Y.value||""));break;case 7:{const q=f(_);O.items.push(q.node),N=q.nextConsumeToken||null;break}}}while(y.currentType!==13&&y.currentType!==1);const w=y.currentType===1?y.lastOffset:_.currentOffset(),D=y.currentType===1?y.lastEndLoc:_.currentPosition();return o(O,w,D),O}function m(_,y,T,S){const O=_.context();let N=S.items.length===0;const w=i(1,y,T);w.cases=[],w.cases.push(S);do{const D=p(_);N||(N=D.items.length===0),w.cases.push(D)}while(O.currentType!==13);return N&&r(_,gt.MUST_HAVE_MESSAGES_IN_PLURAL,T,0),o(w,_.currentOffset(),_.currentPosition()),w}function b(_){const y=_.context(),{offset:T,startLoc:S}=y,O=p(_);return y.currentType===13?O:m(_,T,S,O)}function g(_){const y=zO(_,Kt({},e)),T=y.context(),S=i(0,T.offset,T.startLoc);return t&&S.loc&&(S.loc.source=_),S.body=b(y),e.onCacheKey&&(S.cacheKey=e.onCacheKey(_)),T.currentType!==13&&r(y,gt.UNEXPECTED_LEXICAL_ANALYSIS,T.lastStartLoc,0,_[T.offset]||""),o(S,y.currentOffset(),y.currentPosition()),S}return{parse:g}}function ni(e){if(e.type===13)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function XO(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:o=>(n.helpers.add(o),o)}}function Xv(e,t){for(let n=0;n<e.length;n++)E0(e[n],t)}function E0(e,t){switch(e.type){case 1:Xv(e.cases,t),t.helper("plural");break;case 2:Xv(e.items,t);break;case 6:{E0(e.key,t),t.helper("linked"),t.helper("type");break}case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named");break}}function JO(e,t={}){const n=XO(e);n.helper("normalize"),e.body&&E0(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}function ZO(e){const t=e.body;return t.type===2?Jv(t):t.cases.forEach(n=>Jv(n)),e}function Jv(e){if(e.items.length===1){const t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{const t=[];for(let n=0;n<e.items.length;n++){const r=e.items[n];if(!(r.type===3||r.type===9)||r.value==null)break;t.push(r.value)}if(t.length===e.items.length){e.static=v0(t);for(let n=0;n<e.items.length;n++){const r=e.items[n];(r.type===3||r.type===9)&&delete r.value}}}}function js(e){switch(e.t=e.type,e.type){case 0:{const t=e;js(t.body),t.b=t.body,delete t.body;break}case 1:{const t=e,n=t.cases;for(let r=0;r<n.length;r++)js(n[r]);t.c=n,delete t.cases;break}case 2:{const t=e,n=t.items;for(let r=0;r<n.length;r++)js(n[r]);t.i=n,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{const t=e;t.value&&(t.v=t.value,delete t.value);break}case 6:{const t=e;js(t.key),t.k=t.key,delete t.key,t.modifier&&(js(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{const t=e;t.i=t.index,delete t.index;break}case 4:{const t=e;t.k=t.key,delete t.key;break}}delete e.type}function QO(e,t){const{filename:n,breakLineCode:r,needIndent:i}=t,o=t.location!==!1,s={filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:i,indentLevel:0};o&&e.loc&&(s.source=e.loc.source);const a=()=>s;function l(b,g){s.code+=b}function c(b,g=!0){const _=g?r:"";l(i?_+" ".repeat(b):_)}function u(b=!0){const g=++s.indentLevel;b&&c(g)}function d(b=!0){const g=--s.indentLevel;b&&c(g)}function f(){c(s.indentLevel)}return{context:a,push:l,indent:u,deindent:d,newline:f,helper:b=>`_${b}`,needIndent:()=>s.needIndent}}function eP(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),qs(e,t.key),t.modifier?(e.push(", "),qs(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function tP(e,t){const{helper:n,needIndent:r}=e;e.push(`${n("normalize")}([`),e.indent(r());const i=t.items.length;for(let o=0;o<i&&(qs(e,t.items[o]),o!==i-1);o++)e.push(", ");e.deindent(r()),e.push("])")}function nP(e,t){const{helper:n,needIndent:r}=e;if(t.cases.length>1){e.push(`${n("plural")}([`),e.indent(r());const i=t.cases.length;for(let o=0;o<i&&(qs(e,t.cases[o]),o!==i-1);o++)e.push(", ");e.deindent(r()),e.push("])")}}function rP(e,t){t.body?qs(e,t.body):e.push("null")}function qs(e,t){const{helper:n}=e;switch(t.type){case 0:rP(e,t);break;case 1:nP(e,t);break;case 2:tP(e,t);break;case 6:eP(e,t);break;case 8:e.push(JSON.stringify(t.value),t);break;case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n("interpolate")}(${n("list")}(${t.index}))`,t);break;case 4:e.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(t.key)}))`,t);break;case 9:e.push(JSON.stringify(t.value),t);break;case 3:e.push(JSON.stringify(t.value),t);break}}const iP=(e,t={})=>{const n=Oe(t.mode)?t.mode:"normal",r=Oe(t.filename)?t.filename:"message.intl";t.sourceMap;const i=t.breakLineCode!=null?t.breakLineCode:n==="arrow"?";":`
|
|
27
|
-
`,o=t.needIndent?t.needIndent:n!=="arrow",s=e.helpers||[],a=QO(e,{filename:r,breakLineCode:i,needIndent:o});a.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),a.indent(o),s.length>0&&(a.push(`const { ${v0(s.map(u=>`${u}: _${u}`),", ")} } = ctx`),a.newline()),a.push("return "),qs(a,e),a.deindent(o),a.push("}"),delete e.helpers;const{code:l,map:c}=a.context();return{ast:e,code:l,map:c?c.toJSON():void 0}};function oP(e,t={}){const n=Kt({},t),r=!!n.jit,i=!!n.minify,o=n.optimize==null?!0:n.optimize,a=KO(n).parse(e);return r?(o&&ZO(a),i&&js(a),{ast:a,code:""}):(JO(a,n),iP(a,n))}function sP(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(co().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(co().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function Qo(e){return at(e)&&T0(e)===0&&(_r(e,"b")||_r(e,"body"))}const Zv=["b","body"];function aP(e){return uo(e,Zv)}const Qv=["c","cases"];function lP(e){return uo(e,Qv,[])}const e3=["s","static"];function cP(e){return uo(e,e3)}const t3=["i","items"];function uP(e){return uo(e,t3,[])}const n3=["t","type"];function T0(e){return uo(e,n3)}const r3=["v","value"];function gd(e,t){const n=uo(e,r3);if(n!=null)return n;throw ql(t)}const i3=["m","modifier"];function dP(e){return uo(e,i3)}const o3=["k","key"];function fP(e){const t=uo(e,o3);if(t)return t;throw ql(6)}function uo(e,t,n){for(let r=0;r<t.length;r++){const i=t[r];if(_r(e,i)&&e[i]!=null)return e[i]}return n}const s3=[...Zv,...Qv,...e3,...t3,...o3,...i3,...r3,...n3];function ql(e){return new Error(`unhandled node type: ${e}`)}function w0(e){return n=>pP(n,e)}function pP(e,t){const n=aP(t);if(n==null)throw ql(0);if(T0(n)===1){const o=lP(n);return e.plural(o.reduce((s,a)=>[...s,a3(e,a)],[]))}else return a3(e,n)}function a3(e,t){const n=cP(t);if(n!=null)return e.type==="text"?n:e.normalize([n]);{const r=uP(t).reduce((i,o)=>[...i,I0(e,o)],[]);return e.normalize(r)}}function I0(e,t){const n=T0(t);switch(n){case 3:return gd(t,n);case 9:return gd(t,n);case 4:{const r=t;if(_r(r,"k")&&r.k)return e.interpolate(e.named(r.k));if(_r(r,"key")&&r.key)return e.interpolate(e.named(r.key));throw ql(n)}case 5:{const r=t;if(_r(r,"i")&&Qt(r.i))return e.interpolate(e.list(r.i));if(_r(r,"index")&&Qt(r.index))return e.interpolate(e.list(r.index));throw ql(n)}case 6:{const r=t,i=dP(r),o=fP(r);return e.linked(I0(e,o),i?I0(e,i):void 0,e.type)}case 7:return gd(t,n);case 8:return gd(t,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const mP=e=>e;let yd=$t();function _P(e,t={}){let n=!1;const r=t.onError||LO;return t.onError=i=>{n=!0,r(i)},{...oP(e,t),detectError:n}}function hP(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&Oe(e)){wt(t.warnHtmlMessage)&&t.warnHtmlMessage;const r=(t.onCacheKey||mP)(e),i=yd[r];if(i)return i;const{ast:o,detectError:s}=_P(e,{...t,location:!1,jit:!0}),a=w0(o);return s?a:yd[r]=a}else{if(!Qo(e))return(()=>e);const n=e.cacheKey;if(n){const r=yd[n];return r||(yd[n]=w0(e))}else return w0(e)}}let zl=null;function gP(e){zl=e}function yP(e,t,n){zl&&zl.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})}const bP=vP("function:translate");function vP(e){return t=>zl&&zl.emit(e,t)}const Ai={INVALID_ARGUMENT:MO,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},$P=24;function xi(e){return hd(e,null,void 0)}function A0(e,t){return t.locale!=null?l3(t.locale):l3(e.locale)}let x0;function l3(e){if(Oe(e))return e;if(Ut(e)){if(e.resolvedOnce&&x0!=null)return x0;if(e.constructor.name==="Function"){const t=e();if(mO(t))throw xi(Ai.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return x0=t}else throw xi(Ai.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw xi(Ai.NOT_SUPPORT_LOCALE_TYPE)}function SP(e,t,n){return[...new Set([n,...Ft(t)?t:at(t)?Object.keys(t).filter(r=>r!=="default"):Oe(t)?[t]:[n]])]}function EP(e,t,n){const r=Oe(n)?n:Hl,i=e;let o;at(t)?(i.__localeChainObjectCache||(i.__localeChainObjectCache=new WeakMap),o=i.__localeChainObjectCache.get(t),o||(o=new Map,i.__localeChainObjectCache.set(t,o))):(i.__localeChainCache||(i.__localeChainCache=new Map),o=i.__localeChainCache.get(t),o||(o=new Map,i.__localeChainCache.set(t,o)));const s=o.get(r);if(s)return s;const a=[];let l=[n];for(;Ft(l);)l=c3(a,l,t);const c=Ft(t)||!xt(t)?t:t.default?t.default:null;return l=Oe(c)?[c]:c,Ft(l)&&c3(a,l,!1),o.set(r,a),a}function c3(e,t,n){let r=!0;for(let i=0;i<t.length&&wt(r);i++){const o=t[i];Oe(o)&&(r=TP(e,t[i],n))}return r}function TP(e,t,n){let r;const i=t.split("-");do{const o=i.join("-");r=wP(e,o,n),i.splice(-1,1)}while(i.length&&r===!0);return r}function wP(e,t,n){let r=!1;if(!e.includes(t)&&(r=!0,t)){r=t[t.length-1]!=="!";const i=t.replace(/!/g,"");e.push(i),(Ft(n)||xt(n))&&n[i]&&(r=n[i])}return r}const fo=[];fo[0]={w:[0],i:[3,0],"[":[4],o:[7]},fo[1]={w:[1],".":[2],"[":[4],o:[7]},fo[2]={w:[2],i:[3,0],0:[3,0]},fo[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},fo[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},fo[5]={"'":[4,0],o:8,l:[5,0]},fo[6]={'"':[4,0],o:8,l:[6,0]};const IP=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function AP(e){return IP.test(e)}function xP(e){const t=e.charCodeAt(0),n=e.charCodeAt(e.length-1);return t===n&&(t===34||t===39)?e.slice(1,-1):e}function CP(e){if(e==null)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function kP(e){const t=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:AP(t)?xP(t):"*"+t}function NP(e){const t=[];let n=-1,r=0,i=0,o,s,a,l,c,u,d;const f=[];f[0]=()=>{s===void 0?s=a:s+=a},f[1]=()=>{s!==void 0&&(t.push(s),s=void 0)},f[2]=()=>{f[0](),i++},f[3]=()=>{if(i>0)i--,r=4,f[0]();else{if(i=0,s===void 0||(s=kP(s),s===!1))return!1;f[1]()}};function p(){const m=e[n+1];if(r===5&&m==="'"||r===6&&m==='"')return n++,a="\\"+m,f[0](),!0}for(;r!==null;)if(n++,o=e[n],!(o==="\\"&&p())){if(l=CP(o),d=fo[r],c=d[l]||d.l||8,c===8||(r=c[0],c[1]!==void 0&&(u=f[c[1]],u&&(a=o,u()===!1))))return;if(r===7)return t}}const u3=new Map;function RP(e,t){return at(e)?mn(e,t):null}function OP(e,t){if(!at(e))return null;let n=u3.get(t);if(n||(n=NP(t),n&&u3.set(t,n)),!n)return null;const r=n.length;let i=e,o=0;for(;o<r;){const s=n[o];if(s3.includes(s)&&Qo(i)||!at(i)||!_r(i,s))return null;const a=i[s];if(a===void 0||Ut(i))return null;i=a,o++}return i}const PP="11.4.17",bd=-1,Hl="en-US",vd="",d3=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function MP(){return{upper:(e,t)=>t==="text"&&Oe(e)?e.toUpperCase():t==="vnode"&&at(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&Oe(e)?e.toLowerCase():t==="vnode"&&at(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&Oe(e)?d3(e):t==="vnode"&&at(e)&&"__v_isVNode"in e?d3(e.children):e}}let f3;function LP(e){f3=e}let p3;function DP(e){p3=e}let m3;function FP(e){m3=e}let _3=null;const UP=e=>{_3=e},BP=()=>_3;let h3=null;const g3=e=>{h3=e},jP=()=>h3;let y3=0;function qP(e={}){const t=Ut(e.onWarn)?e.onWarn:hO,n=Oe(e.version)?e.version:PP,r=Oe(e.locale)||Ut(e.locale)?e.locale:Hl,i=Ut(r)?Hl:r,o=Ft(e.fallbackLocale)||xt(e.fallbackLocale)||Oe(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:i,s=xt(e.messages)?e.messages:C0(i),a=xt(e.datetimeFormats)?e.datetimeFormats:C0(i),l=xt(e.numberFormats)?e.numberFormats:C0(i),c=Kt($t(),e.modifiers,MP()),u=e.pluralRules||$t(),d=Ut(e.missing)?e.missing:null,f=wt(e.missingWarn)||Zo(e.missingWarn)?e.missingWarn:!0,p=wt(e.fallbackWarn)||Zo(e.fallbackWarn)?e.fallbackWarn:!0,m=!!e.fallbackFormat,b=!!e.unresolving,g=Ut(e.postTranslation)?e.postTranslation:null,_=xt(e.processor)?e.processor:null,y=wt(e.warnHtmlMessage)?e.warnHtmlMessage:!0,T=!!e.escapeParameter,S=Ut(e.messageCompiler)?e.messageCompiler:f3,O=Ut(e.messageResolver)?e.messageResolver:p3||RP,N=Ut(e.localeFallbacker)?e.localeFallbacker:m3||SP,w=at(e.fallbackContext)?e.fallbackContext:void 0,D=e,Y=at(D.__datetimeFormatters)?D.__datetimeFormatters:new Map,q=at(D.__numberFormatters)?D.__numberFormatters:new Map,P=at(D.__meta)?D.__meta:{};y3++;const C={version:n,cid:y3,locale:r,fallbackLocale:o,messages:s,modifiers:c,pluralRules:u,missing:d,missingWarn:f,fallbackWarn:p,fallbackFormat:m,unresolving:b,postTranslation:g,processor:_,warnHtmlMessage:y,escapeParameter:T,messageCompiler:S,messageResolver:O,localeFallbacker:N,fallbackContext:w,onWarn:t,__meta:P};return C.datetimeFormats=a,C.numberFormats=l,C.__datetimeFormatters=Y,C.__numberFormatters=q,__INTLIFY_PROD_DEVTOOLS__&&yP(C,n,P),C}const C0=e=>({[e]:$t()});function b3(e,t,n,r,i){const{missing:o,onWarn:s}=e;if(o!==null){const a=o(e,n,t,i);return Oe(a)?a:t}else return t}function v3(e,t){const n=e;at(t)?n.__localeChainObjectCache?.delete(t):n.__localeChainCache?.delete(t)}function $d(e,t,n){v3(e,n),e.fallbackContext&&v3(e.fallbackContext,n),e.localeFallbacker(e,n,t)}function zP(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function HP(e,t){const n=t.indexOf(e);if(n===-1)return!1;for(let r=n+1;r<t.length;r++)if(zP(e,t[r]))return!0;return!1}function $3(e,t,n,r,i,o,s){const{fallbackLocale:a,localeFallbacker:l,onWarn:c}=e,u=l(e,a,n);for(let d=0;d<u.length;d++){const f=u[d],p=mn(mn(r,f)||{},t);if(xt(p)&&Oe(f))return f;b3(e,t,f,i,s)}return null}function S3(e,t,n){let r=`${e}__${t}`;return xt(n)&&!y0(n)&&(r=`${r}__${JSON.stringify(n)}`),r}function E3(e,t,n){for(const r in n){const i=`${t}__${r}`;for(const o of e.keys())(o===i||o.startsWith(`${i}__`))&&e.delete(o)}}function T3(e,t,n,r){const[,i,o,s]=e;let a=n;return Oe(i)?t.key=i:xt(i)&&Object.keys(i).forEach(l=>{r.includes(l)?a[l]=i[l]:t[l]=i[l]}),Oe(o)?t.locale=o:xt(o)&&(a=o),xt(s)&&(a=s),a}function w3(e,...t){const{datetimeFormats:n,unresolving:r,onWarn:i}=e,{__datetimeFormatters:o}=e;if(!Oe(t[0])&&!qv(t[0])&&!Qt(t[0]))return vd;const[s,a,l,c]=k0(...t),u=wt(l.missingWarn)?l.missingWarn:e.missingWarn,d=wt(l.fallbackWarn)?l.fallbackWarn:e.fallbackWarn,f=!!l.part,p=A0(e,l);if(!Oe(s)||s===""){const y=new Intl.DateTimeFormat(p.replace(/!/g,""),c);return f?y.formatToParts(a):y.format(a)}const m=$3(e,s,p,n,u,d,"datetime format");if(!Oe(m))return r?bd:s;const b=n[m][s],g=S3(m,s,c);let _=o.get(g);return _||(_=new Intl.DateTimeFormat(m,Kt({},b,c)),o.set(g,_)),f?_.formatToParts(a):_.format(a)}const I3=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function k0(...e){const[t]=e,n=$t(),r=$t();let i;if(Oe(t)){const s=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!s)throw xi(Ai.INVALID_ISO_DATE_ARGUMENT);const a=s[3]?s[3].trim().startsWith("T")?`${s[1].trim()}${s[3].trim()}`:`${s[1].trim()}T${s[3].trim()}`:s[1].trim();i=new Date(a);try{i.toISOString()}catch{throw xi(Ai.INVALID_ISO_DATE_ARGUMENT)}}else if(qv(t)){if(isNaN(t.getTime()))throw xi(Ai.INVALID_DATE_ARGUMENT);i=t}else if(Qt(t))i=t;else throw xi(Ai.INVALID_ARGUMENT);const o=T3(e,n,r,I3);return[n.key||"",i,n,o]}function A3(e,t,n){E3(e.__datetimeFormatters,t,n)}function x3(e,...t){const{numberFormats:n,unresolving:r,onWarn:i}=e,{__numberFormatters:o}=e;if(!Qt(t[0]))return vd;const[s,a,l,c]=N0(...t),u=wt(l.missingWarn)?l.missingWarn:e.missingWarn,d=wt(l.fallbackWarn)?l.fallbackWarn:e.fallbackWarn,f=!!l.part,p=A0(e,l);if(!Oe(s)||s===""){const y=new Intl.NumberFormat(p.replace(/!/g,""),c);return f?y.formatToParts(a):y.format(a)}const m=$3(e,s,p,n,u,d,"number format");if(!Oe(m))return r?bd:s;const b=n[m][s],g=S3(m,s,c);let _=o.get(g);return _||(_=new Intl.NumberFormat(m,Kt({},b,c)),o.set(g,_)),f?_.formatToParts(a):_.format(a)}const C3=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function N0(...e){const[t]=e,n=$t(),r=$t();if(!Qt(t))throw xi(Ai.INVALID_ARGUMENT);const i=t,o=T3(e,n,r,C3);return[n.key||"",i,n,o]}function k3(e,t,n){E3(e.__numberFormatters,t,n)}const VP=e=>e,WP=e=>"",GP="text",YP=e=>e.length===0?"":v0(e),KP=_O;function R0(e,t){return e=Math.abs(e),t===2?e===1?0:1:Math.min(e,2)}function XP(e){const t=Qt(e.pluralIndex)?e.pluralIndex:-1;return Qt(e.named?.count)?e.named.count:Qt(e.named?.n)?e.named.n:t}function JP(e={}){const t=e.locale,n=XP(e),r=Oe(t)&&e.pluralRules&&Ut(mn(e.pluralRules,t))?e.pluralRules[t]:R0,i=r===R0?void 0:R0,o=y=>y[r(n,y.length,i)],s=e.list||[],a=y=>s[y],l=e.named||$t(),c=Qt(e.pluralIndex),u=y=>{const T=Hv(y)?mn(l,y):l[y];return c&&!T&&(y==="count"||y==="n")?e.pluralIndex:T};function d(y,T){const S=Ut(e.messages)?e.messages(y,!!T):at(e.messages)?e.messages[y]:!1;return S||(e.parent?e.parent.message(y):WP)}const f=y=>e.modifiers?mn(e.modifiers,y):VP,p=Ut(e.processor?.normalize)?e.processor.normalize:YP,m=Ut(e.processor?.interpolate)?e.processor.interpolate:KP,b=Oe(e.processor?.type)?e.processor.type:GP,_={list:a,named:u,plural:o,linked:(y,...T)=>{const[S,O]=T;let N="text",w="";T.length===1?at(S)?(w=S.modifier||w,N=S.type||N):Oe(S)&&(w=S||w):T.length===2&&(Oe(S)&&(w=S||w),Oe(O)&&(N=O||N));const D=d(y,!0)(_),Y=D===""||D===void 0?y:D,q=N==="vnode"&&Ft(Y)&&w?Y[0]:Y;if(!w)return q;const P=f(w);return Ut(P)?P(q,N):q},message:d,type:b,interpolate:m,normalize:p,values:Kt($t(),s,l,c?{count:u("count"),n:u("n")}:{})};return _}const N3=()=>"",Ci=e=>Ut(e),Sd=e=>Oe(e)||Qo(e)||Ci(e);function R3(e,...t){const{fallbackFormat:n,postTranslation:r,unresolving:i,messageCompiler:o,fallbackLocale:s,messages:a}=e,[l,c]=O0(...t),u=wt(c.missingWarn)?c.missingWarn:e.missingWarn,d=wt(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,f=wt(c.escapeParameter)?c.escapeParameter:e.escapeParameter,p=!!c.resolvedMessage,m=Oe(c.default)||wt(c.default)?wt(c.default)?o?l:()=>l:c.default:n?o?l:()=>l:null,b=n||m!=null&&(Oe(m)||Ut(m)),g=A0(e,c);f&&ZP(c);let[_,y,T]=p?[l,g,mn(a,g)||$t()]:O3(e,l,g,s,d,u),S=_,O=l;if(!p&&!Sd(S)&&b&&(S=m,O=S),!p&&(!Sd(S)||!Oe(y)))return i?bd:l;let N=!1;const w=()=>{N=!0},D=Ci(S)?S:P3(e,l,y,S,O,w);if(N)return S;const Y=tM(e,y,T,c),q=JP(Y),P=QP(e,D,q);let C=r?r(P,l):P;if(f&&Oe(C)&&(C=OO(C)),__INTLIFY_PROD_DEVTOOLS__){const F={timestamp:Date.now(),key:Oe(l)?l:Ci(S)?S.key:"",locale:y||(Ci(S)?S.locale:""),format:Oe(S)?S:Ci(S)?S.source:"",message:C};F.meta=Kt({},e.__meta,BP()||{}),bP(F)}return C}function ZP(e){if(Ft(e.list)&&(e.list=e.list.map(t=>Oe(t)?Wv(t):t)),at(e.named)){const t=e.named,n=$t();for(const r of Object.keys(t)){const i=t[r];n[r]=Oe(i)?Wv(i):i}e.named=n}}function O3(e,t,n,r,i,o){const{messages:s,onWarn:a,messageResolver:l,localeFallbacker:c}=e,u=c(e,r,n);let d=$t(),f,p=null;const m="translate";for(let b=0;b<u.length&&(f=u[b],d=mn(s,f)||$t(),(p=l(d,t))===null&&(p=mn(d,t)),!Sd(p));b++)if(!HP(f,u)){const g=b3(e,t,f,o,m);g!==t&&(p=g)}return[p,f,d]}function P3(e,t,n,r,i,o){const{messageCompiler:s,warnHtmlMessage:a}=e;if(Ci(r)){const c=r;return c.locale=c.locale||n,c.key=c.key||t,c}if(s==null){const c=(()=>r);return c.locale=n,c.key=t,c}const l=s(r,eM(e,n,i,r,a,o));return l.locale=n,l.key=t,l.source=r,l}function QP(e,t,n){return t(n)}function O0(...e){const[t,n,r]=e,i=$t();if(!Oe(t)&&!Qt(t)&&!Ci(t)&&!Qo(t))throw xi(Ai.INVALID_ARGUMENT);const o=Qt(t)?String(t):(Ci(t),t);return Qt(n)?i.plural=n:Oe(n)?i.default=n:xt(n)&&!y0(n)?i.named=n:Ft(n)&&(i.list=n),Qt(r)?i.plural=r:Oe(r)?i.default=r:xt(r)&&Kt(i,r),[o,i]}function eM(e,t,n,r,i,o){return{locale:t,key:n,warnHtmlMessage:i,onError:s=>{throw o&&o(s),s},onCacheKey:s=>uO(t,n,s)}}function tM(e,t,n,r){const{modifiers:i,pluralRules:o,messageResolver:s,fallbackLocale:a,fallbackWarn:l,missingWarn:c,fallbackContext:u}=e,f={locale:t,modifiers:i,pluralRules:o,messages:(p,m)=>{let b=s(n,p);if(b==null&&(u||m)){const[g,,_]=O3(u||e,p,t,a,l,c);b=g??s(_,p)}if(Oe(b)||Qo(b)){let g=!1;const y=P3(e,p,t,b,p,()=>{g=!0});return g?N3:y}else return Ci(b)?b:N3}};return e.processor&&(f.processor=e.processor),r.list&&(f.list=r.list),r.named&&(f.named=r.named),Qt(r.plural)&&(f.pluralIndex=r.plural),f}sP();const nM="11.4.17";function rM(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(co().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(co().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(co().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(co().__INTLIFY_PROD_DEVTOOLS__=!1)}const jn={UNEXPECTED_RETURN_TYPE:$P,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function Yn(e,...t){return hd(e,null,void 0)}const P0=lo("__translateVNode"),M0=lo("__datetimeParts"),L0=lo("__numberParts"),M3=lo("__setPluralRules"),L3=lo("__injectWithOption"),zs=lo("__dispose");let D3=null;{const e=co().__VUE_INSTANCE_SETTERS__;Ft(e)&&e.push(t=>{D3=t})}function po(e){return!!Hv(e)}function Vl(e){if(!at(e)||Qo(e))return e;for(const t in e)if(_r(e,t))if(!t.includes("."))at(e[t])&&Vl(e[t]);else{const n=t.split("."),r=n.length-1;let i=e,o=!1;for(let a=0;a<r;a++){if(n[a]==="__proto__")throw new Error(`unsafe key: ${n[a]}`);if(n[a]in i||(i[n[a]]=$t()),!at(i[n[a]])){o=!0;break}if(Qo(i[n[a]])&&(s3.includes(n[a+1])||n[a+1]==="cacheKey")){o=!0;break}i=i[n[a]]}o||(i[n[r]]=e[t],delete e[t]);const s=i[n[r]];at(s)&&Vl(s)}return e}function D0(e,t){const{messages:n,__i18n:r,messageResolver:i,flatJson:o}=t,s=xt(n)?n:Ft(r)?$t():{[e]:$t()};if(Ft(r)&&r.forEach(a=>{if("locale"in a&&"resource"in a){const{locale:l,resource:c}=a;if(l){if(po(l))return;s[l]=mn(s,l)||$t(),_d(c,s[l])}else _d(c,s)}else Oe(a)&&_d(JSON.parse(a),s)}),i==null&&o)for(const a in s)_r(s,a)&&Vl(s[a]);return s}function F3(e){return e.type}function U3(e,t,n){let r=at(t.messages)?t.messages:$t();"__i18nGlobal"in n&&(r=D0(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const i=Object.keys(r);i.length&&i.forEach(o=>{e.mergeLocaleMessage(o,r[o])});{if(at(t.datetimeFormats)){const o=Object.keys(t.datetimeFormats);o.length&&o.forEach(s=>{e.mergeDateTimeFormat(s,t.datetimeFormats[s])})}if(at(t.numberFormats)){const o=Object.keys(t.numberFormats);o.length&&o.forEach(s=>{e.mergeNumberFormat(s,t.numberFormats[s])})}}}function B3(e){return Ne(cl,null,e,0)}function Wl(){return D3??Os()}const j3="__INTLIFY_META__",q3=()=>[],iM=()=>!1;let z3=0;function H3(e){return((t,n,r,i)=>e(n,r,Wl()||void 0,i))}const oM=()=>{const e=Wl();let t=null;return e&&(t=F3(e)[j3])?{[j3]:t}:null};function Ed(e={}){const{__root:t,__injectWithOption:n}=e,r=t===void 0,i=e.flatJson,o=md?Re:Zp;let s=wt(e.inheritLocale)?e.inheritLocale:!0;const a=o(t&&s?t.locale.value:Oe(e.locale)?e.locale:Hl),l=o(t&&s?t.fallbackLocale.value:Oe(e.fallbackLocale)||Ft(e.fallbackLocale)||xt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:a.value),c=o(D0(a.value,e)),u=o(xt(e.datetimeFormats)?e.datetimeFormats:{[a.value]:{}}),d=o(xt(e.numberFormats)?e.numberFormats:{[a.value]:{}});let f=t?t.missingWarn:wt(e.missingWarn)||Zo(e.missingWarn)?e.missingWarn:!0,p=t?t.fallbackWarn:wt(e.fallbackWarn)||Zo(e.fallbackWarn)?e.fallbackWarn:!0,m=t?t.fallbackRoot:wt(e.fallbackRoot)?e.fallbackRoot:!0,b=!!e.fallbackFormat,g=Ut(e.missing)?e.missing:null,_=Ut(e.missing)?H3(e.missing):null,y=Ut(e.postTranslation)?e.postTranslation:null,T=t?t.warnHtmlMessage:wt(e.warnHtmlMessage)?e.warnHtmlMessage:!0,S=!!e.escapeParameter;const O=t?t.modifiers:xt(e.modifiers)?e.modifiers:{};let N=e.pluralRules||t&&t.pluralRules,w;w=(()=>{r&&g3(null);const J={version:nM,locale:a.value,fallbackLocale:l.value,messages:c.value,modifiers:O,pluralRules:N,missing:_===null?void 0:_,missingWarn:f,fallbackWarn:p,fallbackFormat:b,unresolving:!0,postTranslation:y===null?void 0:y,warnHtmlMessage:T,escapeParameter:S,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};J.datetimeFormats=u.value,J.numberFormats=d.value;const ie=qP(J);return r&&g3(ie),ie})(),$d(w,a.value,l.value);function Y(){return[a.value,l.value,c.value,u.value,d.value]}const q=pe({get:()=>a.value,set:J=>{w.locale=J,a.value=J}});function P(J){r||(w.fallbackContext=jP());try{return J()}finally{r||(w.fallbackContext=void 0)}}function C(J){P(()=>$d(w,a.value,J))}const F=pe({get:()=>l.value,set:J=>{l.value=J,w.fallbackLocale=l.value,C(l.value)}}),R=pe(()=>c.value),G=pe(()=>u.value),z=pe(()=>d.value);function K(){return Ut(y)?y:null}function M(J){y=J,w.postTranslation=J}function oe(){return g}function te(J){J!==null&&(_=H3(J)),g=J,w.missing=_}const se=(J,ie,Be,He,H,W)=>{Y();let ue;try{__INTLIFY_PROD_DEVTOOLS__,ue=P(()=>J(w))}finally{__INTLIFY_PROD_DEVTOOLS__}if(Be!=="translate exists"&&Qt(ue)&&ue===bd||Be==="translate exists"&&!ue){const[Ae,ke]=ie();return t&&m?He(t):H(Ae)}else{if(W(ue))return ue;throw Yn(jn.UNEXPECTED_RETURN_TYPE)}};function _e(...J){return se(ie=>Reflect.apply(R3,null,[ie,...J]),()=>O0(...J),"translate",ie=>Reflect.apply(ie.t,ie,[...J]),ie=>ie,ie=>Oe(ie))}function ce(...J){const[ie,Be,He]=J;if(He&&!at(He))throw Yn(jn.INVALID_ARGUMENT);return _e(ie,Be,Kt({resolvedMessage:!0},He||{}))}function ye(...J){return se(ie=>Reflect.apply(w3,null,[ie,...J]),()=>k0(...J),"datetime format",ie=>Reflect.apply(ie.d,ie,[...J]),()=>vd,ie=>Oe(ie)||Ft(ie))}function Te(...J){return se(ie=>Reflect.apply(x3,null,[ie,...J]),()=>N0(...J),"number format",ie=>Reflect.apply(ie.n,ie,[...J]),()=>vd,ie=>Oe(ie)||Ft(ie))}function le(J){return J.map(ie=>Oe(ie)||Qt(ie)||wt(ie)?B3(String(ie)):ie)}const Ce={normalize:le,interpolate:J=>J,type:"vnode"};function Me(...J){return se(ie=>{let Be;const He=ie;try{He.processor=Ce,Be=Reflect.apply(R3,null,[He,...J])}finally{He.processor=null}return Be},()=>O0(...J),"translate",ie=>ie[P0](...J),ie=>[B3(ie)],ie=>Ft(ie))}function Ue(...J){return se(ie=>Reflect.apply(x3,null,[ie,...J]),()=>N0(...J),"number format",ie=>ie[L0](...J),q3,ie=>Oe(ie)||Ft(ie))}function nt(...J){return se(ie=>Reflect.apply(w3,null,[ie,...J]),()=>k0(...J),"datetime format",ie=>ie[M0](...J),q3,ie=>Oe(ie)||Ft(ie))}function A(J){N=J,w.pluralRules=N}function k(J,ie){const Be=re(J),He=w.messageResolver(Be,ie);return He===null?mn(Be,ie):He}function X(J,ie){return se(()=>{if(!J)return!1;const Be=Oe(ie)?ie:a.value,He=Oe(ie)?[Be]:w.localeFallbacker(w,l.value,Be);for(let H=0;H<He.length;H++)if(Sd(k(He[H],J)))return!0;return!1},()=>[J],"translate exists",Be=>Reflect.apply(Be.te,Be,[J,ie]),iM,Be=>wt(Be))}function ae(J){let ie=null;const Be=w.localeFallbacker(w,l.value,a.value);for(let He=0;He<Be.length;He++){const H=k(Be[He],J);if(H!=null){ie=H;break}}return ie}function ee(J){const ie=ae(J);return ie??(t?t.tm(J)||{}:{})}function re(J){return mn(c.value,J)||{}}function $(J,ie){po(J)||(i&&Vl(ie),c.value[J]=ie,w.messages=c.value)}function v(J,ie){po(J)||(c.value[J]=mn(c.value,J)||{},i&&Vl(ie),_d(ie,c.value[J]),w.messages=c.value)}function E(J){return mn(u.value,J)||{}}function x(J,ie){po(J)||(u.value[J]=ie,w.datetimeFormats=u.value,A3(w,J,ie))}function Q(J,ie){po(J)||(u.value[J]=Kt(mn(u.value,J)||{},ie),w.datetimeFormats=u.value,A3(w,J,ie))}function Z(J){return mn(d.value,J)||{}}function ne(J,ie){po(J)||(d.value[J]=ie,w.numberFormats=d.value,k3(w,J,ie))}function xe(J,ie){po(J)||(d.value[J]=Kt(mn(d.value,J)||{},ie),w.numberFormats=d.value,k3(w,J,ie))}z3++,dt(l,()=>C(l.value),{deep:!0,flush:"sync"}),t&&md&&(dt(t.locale,J=>{s&&(a.value=J,w.locale=J,$d(w,a.value,l.value))}),dt(t.fallbackLocale,J=>{s&&(l.value=J,w.fallbackLocale=l.value,$d(w,a.value,l.value))}));const Se={id:z3,locale:q,fallbackLocale:F,get inheritLocale(){return s},set inheritLocale(J){s=J,J&&t&&(q.value=t.locale.value,F.value=t.fallbackLocale.value)},get availableLocales(){return Object.keys(c.value).sort()},messages:R,get modifiers(){return O},get pluralRules(){return N||{}},get isGlobal(){return r},get missingWarn(){return f},set missingWarn(J){f=J,w.missingWarn=f},get fallbackWarn(){return p},set fallbackWarn(J){p=J,w.fallbackWarn=p},get fallbackRoot(){return m},set fallbackRoot(J){m=J},get fallbackFormat(){return b},set fallbackFormat(J){b=J,w.fallbackFormat=b},get warnHtmlMessage(){return T},set warnHtmlMessage(J){T=J,w.warnHtmlMessage=J},get escapeParameter(){return S},set escapeParameter(J){S=J,w.escapeParameter=J},t:_e,getLocaleMessage:re,setLocaleMessage:$,mergeLocaleMessage:v,getPostTranslationHandler:K,setPostTranslationHandler:M,getMissingHandler:oe,setMissingHandler:te,[M3]:A};return Se.datetimeFormats=G,Se.numberFormats=z,Se.rt=ce,Se.te=X,Se.tm=ee,Se.d=ye,Se.n=Te,Se.getDateTimeFormat=E,Se.setDateTimeFormat=x,Se.mergeDateTimeFormat=Q,Se.getNumberFormat=Z,Se.setNumberFormat=ne,Se.mergeNumberFormat=xe,Se[L3]=n,Se[P0]=Me,Se[M0]=nt,Se[L0]=Ue,Se}const F0=new WeakMap;function Hs(e){if(!Zo(e))return!e;let t=F0.get(e);return t||(t=new RegExp(`^(?![\\s\\S]*(?:${e.source}))`,e.flags.replace(/[gy]/g,"")),F0.set(e,t),F0.set(t,e)),t}function sM(e){const t=Oe(e.locale)?e.locale:Hl,n=Oe(e.fallbackLocale)||Ft(e.fallbackLocale)||xt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,r=Ut(e.missing)?e.missing:void 0,i=wt(e.silentTranslationWarn)||Zo(e.silentTranslationWarn)?Hs(e.silentTranslationWarn):!0,o=wt(e.silentFallbackWarn)||Zo(e.silentFallbackWarn)?Hs(e.silentFallbackWarn):!0,s=wt(e.fallbackRoot)?e.fallbackRoot:!0,a=!!e.formatFallbackMessages,l=xt(e.modifiers)?e.modifiers:{},c=e.pluralizationRules,u=Ut(e.postTranslation)?e.postTranslation:void 0,d=Oe(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,f=!!e.escapeParameterHtml,p=wt(e.sync)?e.sync:!0;let m=e.messages;if(xt(e.sharedMessages)){const O=e.sharedMessages;m=Object.keys(O).reduce((w,D)=>{if(po(D))return w;const Y=mn(w,D)||(w[D]={});return Kt(Y,O[D]),w},m||{})}const{__i18n:b,__root:g,__injectWithOption:_}=e,y=e.datetimeFormats,T=e.numberFormats,S=e.flatJson;return{locale:t,fallbackLocale:n,messages:m,flatJson:S,datetimeFormats:y,numberFormats:T,missing:r,missingWarn:i,fallbackWarn:o,fallbackRoot:s,fallbackFormat:a,modifiers:l,pluralRules:c,postTranslation:u,warnHtmlMessage:d,escapeParameter:f,messageResolver:e.messageResolver,inheritLocale:p,__i18n:b,__root:g,__injectWithOption:_}}function U0(e={}){const t=Ed(sM(e)),{__extender:n}=e,r={id:t.id,get locale(){return t.locale.value},set locale(i){t.locale.value=i},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(i){t.fallbackLocale.value=i},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(i){t.setMissingHandler(i)},get silentTranslationWarn(){return Hs(t.missingWarn)},set silentTranslationWarn(i){t.missingWarn=Hs(i)},get silentFallbackWarn(){return Hs(t.fallbackWarn)},set silentFallbackWarn(i){t.fallbackWarn=Hs(i)},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(i){t.fallbackFormat=i},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(i){t.setPostTranslationHandler(i)},get sync(){return t.inheritLocale},set sync(i){t.inheritLocale=i},get warnHtmlInMessage(){return t.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(i){t.warnHtmlMessage=i!=="off"},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(i){t.escapeParameter=i},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...i){return Reflect.apply(t.t,t,[...i])},rt(...i){return Reflect.apply(t.rt,t,[...i])},te(i,o){return t.te(i,o)},tm(i){return t.tm(i)},getLocaleMessage(i){return t.getLocaleMessage(i)},setLocaleMessage(i,o){t.setLocaleMessage(i,o)},mergeLocaleMessage(i,o){t.mergeLocaleMessage(i,o)},d(...i){return Reflect.apply(t.d,t,[...i])},getDateTimeFormat(i){return t.getDateTimeFormat(i)},setDateTimeFormat(i,o){t.setDateTimeFormat(i,o)},mergeDateTimeFormat(i,o){t.mergeDateTimeFormat(i,o)},n(...i){return Reflect.apply(t.n,t,[...i])},getNumberFormat(i){return t.getNumberFormat(i)},setNumberFormat(i,o){t.setNumberFormat(i,o)},mergeNumberFormat(i,o){t.mergeNumberFormat(i,o)}};return r.__extender=n,r}function aM(e,t,n){return{beforeCreate(){const r=Wl();if(!r)throw Yn(jn.UNEXPECTED_ERROR);const i=this.$options;if(i.i18n){const o=Kt({},i.i18n);if(i.__i18n&&(o.__i18n=i.__i18n),o.__root=t,this===this.$root)this.$i18n=V3(e,o);else{o.__injectWithOption=!0,o.__extender=n.__vueI18nExtend,this.$i18n=U0(o);const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}}else if(i.__i18n)if(this===this.$root)this.$i18n=V3(e,i);else{this.$i18n=U0({__i18n:i.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const o=this.$i18n;o.__extender&&(o.__disposer=o.__extender(this.$i18n))}else this.$i18n=e;i.__i18nGlobal&&U3(t,i,i),this.$t=(...o)=>this.$i18n.t(...o),this.$rt=(...o)=>this.$i18n.rt(...o),this.$te=(o,s)=>this.$i18n.te(o,s),this.$d=(...o)=>this.$i18n.d(...o),this.$n=(...o)=>this.$i18n.n(...o),this.$tm=o=>this.$i18n.tm(o),n.__setInstance(r,this.$i18n)},mounted(){},unmounted(){const r=Wl();if(!r)throw Yn(jn.UNEXPECTED_ERROR);const i=this.$i18n;i&&(delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,i?.__disposer&&(i.__disposer(),delete i.__disposer,delete i.__extender),n.__deleteInstance(r),delete this.$i18n)}}}function V3(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[M3](t.pluralizationRules||e.pluralizationRules);const n=D0(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(r=>e.mergeLocaleMessage(r,n[r])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(r=>e.mergeDateTimeFormat(r,t.datetimeFormats[r])),t.numberFormats&&Object.keys(t.numberFormats).forEach(r=>e.mergeNumberFormat(r,t.numberFormats[r])),e}const B0={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function lM({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((r,i)=>[...r,...i.type===et?i.children:[i]],[]):t.reduce((n,r)=>{const i=e[r];return i&&(n[r]=i()),n},$t())}function W3(){return et}const G3=ot({name:"i18n-t",props:Kt({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>Qt(e)||!isNaN(e)}},B0),setup(e,t){const{slots:n,attrs:r}=t,i=e.i18n||j0({useScope:e.scope,__useComponent:!0});return()=>{const o=()=>{const l=Object.keys(n).filter(d=>d[0]!=="_"),c=$t();e.locale&&(c.locale=e.locale),e.plural!==void 0&&(c.plural=Oe(e.plural)?+e.plural:e.plural);const u=lM(t,l);return i[P0](e.keypath,u,c)},s=Kt($t(),r),a=Oe(e.tag)||at(e.tag)?e.tag:W3();return at(a)?qo(a,s,{default:o}):qo(a,s,o())}}});function cM(e){return Ft(e)&&!Oe(e[0])}function Y3(e,t,n,r){const{slots:i,attrs:o}=t;return()=>{const s=()=>{const c={part:!0};let u=$t();e.locale&&(c.locale=e.locale),Oe(e.format)?c.key=e.format:at(e.format)&&(Oe(e.format.key)&&(c.key=e.format.key),u=Object.keys(e.format).reduce((p,m)=>n.includes(m)?Kt($t(),p,{[m]:e.format[m]}):p,$t()));const d=r(e.value,c,u);let f=[c.key];return Ft(d)?f=d.map((p,m)=>{const b=i[p.type],g=b?b({[p.type]:p.value,index:m,parts:d}):[p.value];return cM(g)&&(g[0].key=`${p.type}-${m}`),g}):Oe(d)&&(f=[d]),f},a=Kt($t(),o),l=Oe(e.tag)||at(e.tag)?e.tag:W3();return at(l)?qo(l,a,{default:s}):qo(l,a,s())}}const K3=ot({name:"i18n-n",props:Kt({value:{type:Number,required:!0},format:{type:[String,Object]}},B0),setup(e,t){const n=e.i18n||j0({useScope:e.scope,__useComponent:!0});return Y3(e,t,C3,(...r)=>n[L0](...r))}});function uM(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const r=n.__getInstance(t);return r!=null?r.__composer:e.global.__composer}}function dM(e){const t=s=>{const{instance:a,value:l}=s;if(!a||!a.$)throw Yn(jn.UNEXPECTED_ERROR);const c=uM(e,a.$),u=X3(l);return[Reflect.apply(c.t,c,[...J3(u)]),c]};return{created:(s,a)=>{const[l,c]=t(a);md&&(s.__i18nWatcher=dt(c.locale,()=>{a.instance&&a.instance.$forceUpdate()})),s.__composer=c,s.textContent=l},unmounted:s=>{md&&s.__i18nWatcher&&(s.__i18nWatcher(),s.__i18nWatcher=void 0,delete s.__i18nWatcher),s.__composer&&(s.__composer=void 0,delete s.__composer)},beforeUpdate:(s,{value:a})=>{if(s.__composer){const l=s.__composer,c=X3(a);s.textContent=Reflect.apply(l.t,l,[...J3(c)])}},getSSRProps:s=>{const[a]=t(s);return{textContent:a}}}}function X3(e){if(Oe(e))return{path:e};if(xt(e)){if(!("path"in e))throw Yn(jn.REQUIRED_VALUE,"path");return e}else throw Yn(jn.INVALID_VALUE)}function J3(e){const{path:t,locale:n,args:r,choice:i,plural:o}=e,s={},a=r||{};return Oe(n)&&(s.locale=n),Qt(i)&&(s.plural=i),Qt(o)&&(s.plural=o),[t,a,s]}function fM(e,t,...n){const r=xt(n[0])?n[0]:{};(wt(r.globalInstall)?r.globalInstall:!0)&&([G3.name,"I18nT"].forEach(o=>e.component(o,G3)),[K3.name,"I18nN"].forEach(o=>e.component(o,K3)),[e9.name,"I18nD"].forEach(o=>e.component(o,e9))),e.directive("t",dM(t))}const pM=lo("global-vue-i18n");function mM(e={}){const t=__VUE_I18N_LEGACY_API__&&wt(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,n=wt(e.globalInjection)?e.globalInjection:!0,r=new Map,[i,o]=_M(e,t),s=lo("");function a(d){return r.get(d)||null}function l(d,f){r.set(d,f)}function c(d){r.delete(d)}const u={get mode(){return __VUE_I18N_LEGACY_API__&&t?"legacy":"composition"},install(d,...f){if(d.__VUE_I18N_SYMBOL__=s,d.provide(d.__VUE_I18N_SYMBOL__,u),xt(f[0])){const b=f[0];u.__composerExtend=b.__composerExtend,u.__vueI18nExtend=b.__vueI18nExtend}let p=null;!t&&n&&(p=SM(d,u.global)),__VUE_I18N_FULL_INSTALL__&&fM(d,u,...f),__VUE_I18N_LEGACY_API__&&t&&d.mixin(aM(o,o.__composer,u));const m=d.unmount;d.unmount=()=>{p&&p(),u.dispose(),m()}},get global(){return o},dispose(){i.stop()},__instances:r,__getInstance:a,__setInstance:l,__deleteInstance:c};return u}function j0(e={}){const t=Wl();if(t==null)throw Yn(jn.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw Yn(jn.NOT_INSTALLED);const n=hM(t),r=yM(n),i=F3(t),o=gM(e,i);if(o==="global")return U3(r,e,i),r;if(o==="parent"){let l=Z3(n,t,e.__useComponent);return l==null&&(l=r),l}if(o==="isolated"){if(n.mode!=="composition")throw Yn(jn.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const l=n,c=Kt({},e),u=Z3(n,t);c.__root=u||r;const d=Ed(c);return l.__composerExtend&&(d[zs]=l.__composerExtend(d)),A1()&&DE(()=>{const p=d[zs];p&&(p(),delete d[zs])}),d}const s=n;let a=s.__getInstance(t);if(a==null){const l=Kt({},e);"__i18n"in i&&(l.__i18n=i.__i18n),r&&(l.__root=r),a=Ed(l),s.__composerExtend&&(a[zs]=s.__composerExtend(a)),vM(s,t,a),s.__setInstance(t,a)}return a}function _M(e,t){const n=LE(),r=__VUE_I18N_LEGACY_API__&&t?n.run(()=>U0(e)):n.run(()=>Ed(e));if(r==null)throw Yn(jn.UNEXPECTED_ERROR);return[n,r]}function hM(e){const t=Uo(e.isCE?pM:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw Yn(e.isCE?jn.NOT_INSTALLED_WITH_PROVIDE:jn.UNEXPECTED_ERROR);return t}function gM(e,t){return y0(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function yM(e){return e.mode==="composition"?e.global:e.global.__composer}function Z3(e,t,n=!1){let r=null;const i=t.root;let o=bM(t,n);for(;o!=null;){const s=e;if(e.mode==="composition")r=s.__getInstance(o);else if(__VUE_I18N_LEGACY_API__){const a=s.__getInstance(o);a!=null&&(r=a.__composer,n&&r&&!r[L3]&&(r=null))}if(r!=null||i===o)break;o=o.parent}return r}function bM(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function vM(e,t,n){Cr(()=>{},t),am(()=>{const r=n;e.__deleteInstance(t);const i=r[zs];i&&(i(),delete r[zs])},t)}const $M=["locale","fallbackLocale","availableLocales"],Q3=["t","rt","d","n","tm","te"];function SM(e,t){const n=Object.create(null);return $M.forEach(i=>{const o=Object.getOwnPropertyDescriptor(t,i);if(!o)throw Yn(jn.UNEXPECTED_ERROR);const s=_t(o.value)?{get(){return o.value.value},set(a){o.value.value=a}}:{get(){return o.get&&o.get()}};Object.defineProperty(n,i,s)}),e.config.globalProperties.$i18n=n,Q3.forEach(i=>{const o=Object.getOwnPropertyDescriptor(t,i);if(!o||!o.value)throw Yn(jn.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${i}`,o)}),()=>{delete e.config.globalProperties.$i18n,Q3.forEach(i=>{delete e.config.globalProperties[`$${i}`]})}}const e9=ot({name:"i18n-d",props:Kt({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},B0),setup(e,t){const n=e.i18n||j0({useScope:e.scope,__useComponent:!0});return Y3(e,t,I3,(...r)=>n[M0](...r))}});if(rM(),LP(hP),DP(OP),FP(EP),__INTLIFY_PROD_DEVTOOLS__){const e=co();e.__INTLIFY__=!0,gP(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const t9={fr:{address_required:"L'adresse est obligatoire",address_metropolitan_only:"Cette offre n'est valable qu'en France métropolitaine et en Corse.",email_domain_not_allowed:"Ce domaine d'email n'est pas autorisé pour cette opération.",noticetextlink:"notice ci-jointe",suivant:"Suivant",valider:"Valider",multiselect_list_empty:"Commencez à taper",champ_obligatoire:"Champs obligatoires",iban_section_title:"Informations indiquées sur votre IBAN",iban_holder:"Titulaire du compte",iban_warning:"Depuis le 09/10/2025, l'IBAN saisi doit correspondre au titulaire du compte indiqué. Toute incohérence pourra bloquer le virement.",iban_uk_sort_code:"Sort Code",iban_uk_sort_code_placeholder:"6 chiffres",iban_uk_account_number:"Account Number",iban_uk_account_number_placeholder:"8 chiffres",rgpd:"traite les données recueillies sur la base de l’exécution d’un contrat pour traiter votre participation à cette opération. Pour en savoir plus sur la gestion de vos données personnelles et pour exercer vos droits, reportez-vous à la <a href='{link}' target='_blank' id='noticelink'>notice ci-jointe.</a>",blurry_document:"Ce document nous semble flou. Si vous êtes sûr de sa netteté, vous pouvez continuer, sinon, nous vous conseillons d'envoyer une autre image.",precedent:"Précédent",merci_renseigner_adresse:'Merci de renseigner votre adresse, ou cliquer sur "Je ne trouve pas mon adresse"',votre_adresse:"Votre Adresse *",changez_votre_adresse:"Modifiez votre adresse",N_rue:"Adresse",compl_addresse:"Complément d'adresse",ville:"Ville",code_postal:"Code postal",pays:"Pays",Madame:"Madame",Numero_identification:"Siren ou numéro DUNS *",Monsieur:"Monsieur","Corrigez les erreurs":"Veuillez vérifier les erreurs restantes dans le formulaire.",date_fin_regule_passee:"La date limite de régularisation est dépassée. Le formulaire ne peut plus être soumis.",trouvepasadresse:"Vous ne trouvez pas votre adresse ?",trouvepasreparateur:"Vous ne trouvez pas votre réparateur?",email_reparateur:"Email de votre réparateur *",enseigne_psa:"Nom de la société *",multiple_file_upload_en_cours:"Téléchargement en cours",multiple_file_aucun_fichier:"Aucun fichier",multiple_file_patientez:"Veuillez patienter, un ou plusieurs fichiers sont en cours de téléchargement. Ne validez pas le formulaire avant la fin de l'opération",multiple_file_add_file:"Ajouter un fichier",multiple_file_remove_file:"Retirer un fichier",file_max_size_error:"La taille du fichier est trop grande",file_heic_error:"Fichier iPhone .heic non supportés",file_max_size_info:"Taille maximale du fichier: {size} Mo",select_Précisez:"Veuillez préciser",prix_produit_produit:"Produit",prix_produit_reference:"Référence",prix_produit_description:"Description",prix_produit_quantite:"Quantité",prix_produit_prix:"Prix unitaire",prix_produit_imei:"IMEI",prix_produit_select_placeholder:"Sélectionnez une option",prix_produit_max_reached:"Limite de {max} produit(s) atteinte",prix_produit_error_select_ref:"Veuillez sélectionner une référence pour le produit {num}",prix_produit_error_select_refs:"Veuillez sélectionner une référence pour les produits {nums}",prix_produit_error_quantity:"Veuillez indiquer une quantité d’au moins 1 pour le produit {num}",prix_produit_error_price:"Le prix du produit {num} est requis",prix_produit_error_min_refs:"Veuillez sélectionner au moins {min} référence(s)","Erreurs de validation":"Erreurs de validation","Champs concernés :":"Champs concernés :",field_required:"Ce champ est obligatoire.",date_invalid:"La date n’est pas valide.",date_after:"La date doit être postérieure au {date}.",date_before:"La date doit être antérieure au {date}.",phone_invalid:"Le numéro de téléphone n’est pas valide.",phone_country_not_accepted:"Le numéro de téléphone n’est pas accepté pour ce pays.",phone_mobile_required:"Veuillez saisir un numéro de téléphone mobile.",phone_fixed_required:"Veuillez saisir un numéro de téléphone fixe.",iban_invalid:"L’IBAN saisi n’est pas valide.",iban_country_not_accepted:"Le pays de cet IBAN n’est pas accepté pour cette opération.",postalcode_invalid:"Le code postal n’est pas valide.",unique_email_used:"Cette adresse e-mail a déjà été utilisée pour participer.",unique_phone_used:"Ce numéro de téléphone a déjà été utilisé pour participer.",unique_value_used:"Cette valeur a déjà été utilisée pour participer.",unique_check_failed:"La vérification d’unicité a échoué, veuillez réessayer.",error_title:"Erreur",error_generic:"Une erreur est survenue",prix_produit_add:"Ajouter un produit",prix_produit_remove:"Retirer",file_selected:"1 fichier sélectionné",file_upload_failed:"L’envoi du fichier a échoué.",file_format_not_accepted:"Format non accepté. Formats acceptés : {formats}",file_select_required:"Veuillez sélectionner un fichier",file_upload_button:"Télécharger",file_delete:"Supprimer le fichier",multiple_files_max:"Maximum {max} fichier(s).",multiple_files_drop:"Déposez vos fichiers ou cliquez"},en:{address_required:"The address is required",address_metropolitan_only:"This offer is only valid in mainland France and Corsica.",email_domain_not_allowed:"This email domain is not allowed for this operation.",noticetextlink:"attached notice",suivant:"Next",valider:"Submit",champ_obligatoire:"Required fields",multiselect_list_empty:"Start typing",iban_section_title:"Information on your IBAN",iban_holder:"Account holder",iban_warning:"Since 09/10/2025, the entered IBAN must match the account holder indicated. Any inconsistency may block the transfer.",iban_uk_sort_code:"Sort Code",iban_uk_sort_code_placeholder:"6 digits",iban_uk_account_number:"Account Number",iban_uk_account_number_placeholder:"8 digits",rgpd:"processes the data collected on the basis of the performance of the contract to manage your participation in this operation. To learn more about how your personal data is managed and to exercise your rights, please refer to the <a href='{link}' target='_blank' id='noticelink'>attached notice</a>.",precedent:"Previous",merci_renseigner_adresse:`Please select a suggested address or click on "I can't find my address"`,trouvepasadresse:"I can't find my address",trouvepasreparateur:"You can't find it?",email_reparateur:"E-mail of your repairer *",enseigne_psa:"Company name *",Numero_identification:"DUNS number *",votre_adresse:"Your address *",changez_votre_adresse:"Edit your address",N_rue:"Number and street name",compl_addresse:"Additional address info",ville:"City",code_postal:"ZIP code",pays:"Country","Corrigez les erreurs":"Please check the remaining errors in the form.",date_fin_regule_passee:"The regularization deadline has passed. The form can no longer be submitted.",Madame:"Mrs.",Monsieur:"Mr.",multiple_file_upload_en_cours:"Upload in progress",multiple_file_aucun_fichier:"No file",multiple_file_patientez:"Please wait, one or more files are being uploaded. Do not submit the form until the operation is complete.",multiple_file_add_file:"Add a file",multiple_file_remove_file:"Remove a file",file_max_size_error:"The file size is too large",file_heic_error:"iPhone .heic files not supported",file_max_size_info:"Maximum file size: {size} MB",select_Précisez:"Please specify",prix_produit_produit:"Product",prix_produit_reference:"Reference",prix_produit_description:"Description",prix_produit_quantite:"Quantity",prix_produit_prix:"Unit price incl. tax",prix_produit_imei:"IMEI",prix_produit_select_placeholder:"Select an option",prix_produit_max_reached:"Limit of {max} product(s) reached",prix_produit_error_select_ref:"Please select a reference for product {num}",prix_produit_error_select_refs:"Please select a reference for products {nums}",prix_produit_error_quantity:"Please enter a quantity of at least 1 for product {num}",prix_produit_error_price:"The price of product {num} is required",prix_produit_error_min_refs:"Please select at least {min} reference(s)","Erreurs de validation":"Validation errors","Champs concernés :":"Affected fields:",field_required:"This field is required.",date_invalid:"The date is not valid.",date_after:"The date must be after {date}.",date_before:"The date must be before {date}.",phone_invalid:"The phone number is not valid.",phone_country_not_accepted:"Phone numbers from this country are not accepted.",phone_mobile_required:"Please enter a mobile phone number.",phone_fixed_required:"Please enter a landline number.",iban_invalid:"The IBAN entered is not valid.",iban_country_not_accepted:"IBANs from this country are not accepted for this operation.",postalcode_invalid:"The postcode is not valid.",unique_email_used:"This email address has already been used to take part.",unique_phone_used:"This phone number has already been used to take part.",unique_value_used:"This value has already been used to take part.",unique_check_failed:"The check failed. Please try again.",error_title:"Error",error_generic:"An error has occurred",prix_produit_add:"Add a product",prix_produit_remove:"Remove",file_selected:"1 file selected",file_upload_failed:"The file upload failed.",file_format_not_accepted:"Format not accepted. Accepted formats: {formats}",file_select_required:"Please select a file",file_upload_button:"Upload",file_delete:"Delete file",multiple_files_max:"Maximum {max} file(s).",multiple_files_drop:"Drop your files here or click"},es:{address_required:"La dirección es obligatoria",address_metropolitan_only:"Esta oferta solo es válida en Francia metropolitana y Córcega.",email_domain_not_allowed:"Este dominio de correo electrónico no está permitido para esta operación.",noticetextlink:"aviso adjunto",suivant:"próximo",valider:"Validar",champ_obligatoire:"campos obligatorios",iban_section_title:"Información indicada en su IBAN",iban_holder:"Titular de la cuenta",iban_warning:"Desde el 09/10/2025, el IBAN ingresado debe corresponder al titular de la cuenta indicado. Cualquier inconsistencia puede bloquear la transferencia.",rgpd:"trata los datos recopilados sobre la base de la ejecución del contrato para gestionar su participación en esta operación. Para obtener más información sobre la gestión de sus datos personales y ejercer sus derechos, <a href='{link}' target='_blank' id='noticelink'>consulte el aviso adjunto</a>.",precedent:"anterior",merci_renseigner_adresse:'Introduzca su dirección o haga clic en "No encuentro mi dirección"',votre_adresse:"Tu dirección *",changez_votre_adresse:"Cambie tu dirección",Numero_identification:"TO_TRANSLATE_ES D.U.N.S number *",N_rue:"Número y nombre de la calle",compl_addresse:"Información de dirección adicional",ville:"Ciudad",code_postal:"Código postal",pays:"País",Madame:"Señor",Monsieur:"Señora",trouvepasadresse:"No se pudo encontrar su dirección","Corrigez les erreurs":"Compruebe si hay errores en el formulario",date_fin_regule_passee:"La fecha límite de regularización ha pasado. El formulario ya no puede ser enviado.",trouvepasreparateur:"TO_TRANSLATE_ES_REPARATOR?",enseigne_psa:"TO_TRANSLATE_ES_ENSEIGNE",email_reparateur:"TO_TRANSLATE_ES_E-mail of your repairer *",multiple_file_upload_en_cours:"Subida en curso",multiple_file_aucun_fichier:"Ningún archivo",multiple_file_patientez:"Espere, uno o más archivos se están subiendo. No envíe el formulario hasta que se complete la operación.",multiple_file_add_file:"Agregar un archivo",multiple_file_remove_file:"Eliminar un archivo",file_max_size_error:"El tamaño del archivo es demasiado grande",file_heic_error:"Archivos iPhone .heic no soportados",file_max_size_info:"Tamaño máximo del archivo: {size} MB",select_Précisez:"Por favor, especifique",prix_produit_produit:"Producto",prix_produit_reference:"Referencia",prix_produit_description:"Descripción",prix_produit_quantite:"Cantidad",prix_produit_prix:"Precio unitario con IVA",prix_produit_imei:"IMEI",prix_produit_select_placeholder:"Seleccione una opción",prix_produit_max_reached:"Límite de {max} producto(s) alcanzado",prix_produit_error_select_ref:"Seleccione una referencia para el producto {num}",prix_produit_error_select_refs:"Seleccione una referencia para los productos {nums}",prix_produit_error_quantity:"Indique una cantidad de al menos 1 para el producto {num}",prix_produit_error_price:"El precio del producto {num} es obligatorio",prix_produit_error_min_refs:"Seleccione al menos {min} referencia(s)","Erreurs de validation":"Errores de validación","Champs concernés :":"Campos afectados:",field_required:"Este campo es obligatorio.",date_invalid:"La fecha no es válida.",date_after:"La fecha debe ser posterior al {date}.",date_before:"La fecha debe ser anterior al {date}.",phone_invalid:"El número de teléfono no es válido.",phone_country_not_accepted:"No se aceptan números de teléfono de este país.",phone_mobile_required:"Introduzca un número de teléfono móvil.",phone_fixed_required:"Introduzca un número de teléfono fijo.",iban_invalid:"El IBAN introducido no es válido.",iban_country_not_accepted:"No se aceptan IBAN de este país para esta operación.",postalcode_invalid:"El código postal no es válido.",unique_email_used:"Esta dirección de correo electrónico ya se ha utilizado para participar.",unique_phone_used:"Este número de teléfono ya se ha utilizado para participar.",unique_value_used:"Este valor ya se ha utilizado para participar.",unique_check_failed:"No se ha podido realizar la comprobación. Inténtelo de nuevo.",error_title:"Error",error_generic:"Se ha producido un error",prix_produit_add:"Añadir un producto",prix_produit_remove:"Eliminar",file_selected:"1 archivo seleccionado",file_upload_failed:"No se ha podido subir el archivo.",file_format_not_accepted:"Formato no aceptado. Formatos aceptados: {formats}",file_select_required:"Seleccione un archivo",file_upload_button:"Subir",file_delete:"Eliminar el archivo",multiple_files_max:"Máximo {max} archivo(s).",multiple_files_drop:"Arrastre sus archivos aquí o haga clic"},"es-cat":{address_required:"L'adreça és obligatòria",address_metropolitan_only:"Aquesta oferta només és vàlida a França metropolitana i Còrsega.",email_domain_not_allowed:"Aquest domini de correu electrònic no està permès per a aquesta operació.",noticetextlink:"avís adjunt",suivant:"Próximo",valider:"ubmitos",champ_obligatoire:"TO_TRANSLATE_ES CHAMPOS OBLIGANDO",iban_section_title:"Informació indicada al vostre IBAN",iban_holder:"Titular del compte",iban_warning:"Des del 09/10/2025, l'IBAN introduït ha de correspondre amb el titular del compte indicat. Qualsevol inconsistència pot bloquejar la transferència.",rgpd:"tracta les dades recollides sobre la base de l’execució del contracte per gestionar la vostra participació en aquesta operació. Per obtenir més informació sobre la gestió de les vostres dades personals i exercir els vostres drets, <a href='{link}' target='_blank' id='noticelink'>consulteu l'avís adjunt</a>.",precedent:"TO_TRANSLATE_ES PRECEDENTOS",merci_renseigner_adresse:'TO_TRANSLATE_ES Merci de renseigner votre adresse, ou cliquer sur "Je ne trouve pas mon adresse"',votre_adresse:"Adreça *",N_rue:"Carrer i número de casa",compl_addresse:"Informació addicional sobre l'adreça",ville:"TO_TRANSLATE_ES Ville",code_postal:"TO_TRANSLATE_ES Code postal",pays:"País",Numero_identification:"TO_TRANSLATE_ES_D.U.N.S number *",Madame:"TO_TRANSLATE_ES Madame",Monsieur:"TO_TRANSLATE_ES Monsieur",trouvepasreparateur:"TO_TRANSLATE_CAT_REPARATOR?","Corrigez les erreurs":"Compruebe si hay errores en el formulario",email_reparateur:"TO_TRANSLATE_CAT_E-mail of your repairer *",enseigne_psa:"TO_TRANSLATE_CAT_ENSEIGNE",file_max_size_error:"El tamaño del archivo es demasiado grande",file_heic_error:"Arxius iPhone .heic no compatibles",file_max_size_info:"Mida màxima del fitxer: {size} MB","Erreurs de validation":"Errors de validació","Champs concernés :":"Camps afectats:"},de:{address_required:"Die Adresse ist erforderlich",address_metropolitan_only:"Dieses Angebot gilt nur im französischen Festland und auf Korsika.",email_domain_not_allowed:"Diese E-Mail-Domain ist für diesen Vorgang nicht erlaubt.",noticetextlink:"beigefügte Mitteilung",suivant:"Weiter",valider:"validate",champ_obligatoire:"Pflichtangabe",iban_section_title:"Angaben auf Ihrer IBAN",iban_holder:"Kontoinhaber",iban_warning:"Seit dem 09.10.2025 muss die eingegebene IBAN dem angegebenen Kontoinhaber entsprechen. Jegliche Unstimmigkeit kann die Überweisung blockieren.",rgpd:"verarbeitet die erhobenen Daten auf Grundlage der Vertragserfüllung, um Ihre Teilnahme an dieser Aktion zu bearbeiten. Weitere Informationen zum Umgang mit Ihren personenbezogenen Daten und zur Ausübung Ihrer Rechte finden Sie in der <a href='{link}' target='_blank' id='noticelink'>beigefügten Mitteilung</a>.",multiselect_list_empty:"Mit der Eingabe beginnen",precedent:"zurück",blurry_document:"Dieses Dokument scheint unscharf zu sein. Wir empfehlen Ihnen, ein anderes Bild zu senden, um zu vermeiden, dass die Bewerbung abgelehnt wird.",merci_renseigner_adresse:'Bitte geben Sie Ihre Adresse ein, oder klicken Sie auf "Ich kann meine Adresse nicht finden".',votre_adresse:"Ihre Adresse *",changez_votre_adresse:"Ändern Sie Ihre Adresse",N_rue:"Strasse und Hausnummer *",compl_addresse:"Adresszusatz",Numero_identification:"Identifikationsnummer*",ville:"Ort",code_postal:"Postleitzahl",pays:"Land",Madame:"Frau",Monsieur:"Herr",trouvepasadresse:" Sie finden Ihre Adresse nicht?","Corrigez les erreurs":"Bitte überprüfen Sie Ihre eingabe.",trouvepasreparateur:"Sie finden Ihre reparatur nicht?",email_reparateur:"E-Mail Adresse *",enseigne_psa:"Firmenamme *",multiple_file_upload_en_cours:"Upload läuft",multiple_file_aucun_fichier:"Keine Datei",multiple_file_patientez:"Bitte warten Sie, eine oder mehrere Dateien werden hochgeladen. Senden Sie das Formular nicht ab, bevor der Vorgang abgeschlossen ist.",multiple_file_add_file:"Datei hinzufügen",multiple_file_remove_file:"Datei entfernen",file_max_size_error:"Die Dateigröße ist zu groß",file_heic_error:"iPhone .heic Dateien werden nicht unterstützt",file_max_size_info:"Maximale Dateigröße: {size} MB",select_Précisez:"Bitte präzisieren",prix_produit_produit:"Produkt",prix_produit_reference:"Referenz",prix_produit_description:"Beschreibung",prix_produit_quantite:"Menge",prix_produit_prix:"Stückpreis inkl. MwSt.",prix_produit_imei:"IMEI",prix_produit_select_placeholder:"Option auswählen",prix_produit_max_reached:"Limit von {max} Produkt(en) erreicht",prix_produit_error_select_ref:"Bitte wählen Sie eine Referenz für Produkt {num}",prix_produit_error_select_refs:"Bitte wählen Sie eine Referenz für die Produkte {nums}",prix_produit_error_quantity:"Bitte geben Sie für Produkt {num} eine Menge von mindestens 1 an",prix_produit_error_price:"Der Preis von Produkt {num} ist erforderlich",prix_produit_error_min_refs:"Bitte wählen Sie mindestens {min} Referenz(en)","Erreurs de validation":"Validierungsfehler","Champs concernés :":"Betroffene Felder:",date_fin_regule_passee:"Die Frist für die Nachreichung ist abgelaufen. Das Formular kann nicht mehr abgeschickt werden.",field_required:"Dies ist ein Pflichtfeld.",date_invalid:"Das Datum ist ungültig.",date_after:"Das Datum muss nach dem {date} liegen.",date_before:"Das Datum muss vor dem {date} liegen.",phone_invalid:"Die Telefonnummer ist ungültig.",phone_country_not_accepted:"Telefonnummern aus diesem Land werden nicht akzeptiert.",phone_mobile_required:"Bitte geben Sie eine Mobilfunknummer ein.",phone_fixed_required:"Bitte geben Sie eine Festnetznummer ein.",iban_invalid:"Die eingegebene IBAN ist ungültig.",iban_country_not_accepted:"IBANs aus diesem Land werden für diese Aktion nicht akzeptiert.",postalcode_invalid:"Die Postleitzahl ist ungültig.",unique_email_used:"Diese E-Mail-Adresse wurde bereits für eine Teilnahme verwendet.",unique_phone_used:"Diese Telefonnummer wurde bereits für eine Teilnahme verwendet.",unique_value_used:"Dieser Wert wurde bereits für eine Teilnahme verwendet.",unique_check_failed:"Die Überprüfung ist fehlgeschlagen. Bitte versuchen Sie es erneut.",error_title:"Fehler",error_generic:"Ein Fehler ist aufgetreten",prix_produit_add:"Produkt hinzufügen",prix_produit_remove:"Entfernen",file_selected:"1 Datei ausgewählt",file_upload_failed:"Das Hochladen der Datei ist fehlgeschlagen.",file_format_not_accepted:"Format nicht zulässig. Zulässige Formate: {formats}",file_select_required:"Bitte wählen Sie eine Datei aus",file_upload_button:"Hochladen",file_delete:"Datei löschen",multiple_files_max:"Maximal {max} Datei(en).",multiple_files_drop:"Dateien hierher ziehen oder klicken"},nl:{address_required:"Het adres is verplicht",address_metropolitan_only:"Deze actie is alleen geldig in Europees Frankrijk en Corsica.",email_domain_not_allowed:"Dit e-maildomein is niet toegestaan voor deze actie.",noticetextlink:"bijgevoegde mededeling",suivant:"volgend",valider:"bevestigen",multiselect_list_empty:"Begin met typen",iban_section_title:"Informatie op uw IBAN",iban_holder:"Rekeninghouder",iban_warning:"Vanaf 09/10/2025 moet de ingevoerde IBAN overeenkomen met de aangegeven rekeninghouder. Elke inconsistentie kan de overschrijving blokkeren.",rgpd:"verwerkt de verzamelde gegevens op basis van de uitvoering van de overeenkomst om uw deelname aan deze actie te beheren. Voor meer informatie over het beheer van uw persoonsgegevens en om uw rechten uit te oefenen, verwijzen wij u naar de <a href='{link}' target='_blank' id='noticelink'>bijgevoegde kennisgeving</a>.",champ_obligatoire:"verplichte velden",blurry_document:"Dit document ziet er wazig uit, wij adviseren u een andere afbeelding te sturen om te voorkomen dat het bestand wordt geweigerd.",precedent:"vorig",merci_renseigner_adresse:'Voer alstublieft uw adres in, of klik op "Ik kan mijn adres niet vinden"',votre_adresse:"Uw adres *",changez_votre_adresse:"Uw adres wijzigen",N_rue:"Straatnaam en huisnummer",compl_addresse:"Aanvullende adresinformatie",ville:"Stad",code_postal:"Postcode",pays:"Land",Madame:"Mevr",Monsieur:"Man","Corrigez les erreurs":"Controleer de resterende fouten in het formulier.",Numero_identification:"D.U.N.S nummer * (Identificatienummer)",trouvepasadresse:"Staat uw adres er niet bij?",trouvepasreparateur:"Ik kan mijn reparateur niet vinden?",email_reparateur:"Reparateur email *",enseigne_psa:"bedrijfsnaam *",multiple_file_upload_en_cours:"Upload bezig",multiple_file_aucun_fichier:"Geen bestand",multiple_file_patientez:"Even geduld aub, één of meerdere bestanden worden geüpload. Verzend het formulier niet voordat de operatie voltooid is.",multiple_file_add_file:"Bestand toevoegen",multiple_file_remove_file:"Bestand verwijderen",file_max_size_error:"De bestandsgrootte is te groot",file_heic_error:"iPhone .heic bestanden worden niet ondersteund",file_max_size_info:"Maximale bestandsgrootte: {size} MB",select_Précisez:"Gelieve te specificeren",prix_produit_produit:"Product",prix_produit_reference:"Referentie",prix_produit_description:"Beschrijving",prix_produit_quantite:"Aantal",prix_produit_prix:"Eenheidsprijs incl. btw",prix_produit_imei:"IMEI",prix_produit_select_placeholder:"Selecteer een optie",prix_produit_max_reached:"Limiet van {max} product(en) bereikt",prix_produit_error_select_ref:"Selecteer een referentie voor product {num}",prix_produit_error_select_refs:"Selecteer een referentie voor producten {nums}",prix_produit_error_quantity:"Het aantal van product {num} is vereist",prix_produit_error_price:"De prijs van product {num} is vereist",prix_produit_error_min_refs:"Selecteer minstens {min} referentie(s)","Erreurs de validation":"Validatiefouten","Champs concernés :":"Betreffende velden:"},"lu-fr":{address_required:"L'adresse est obligatoire",address_metropolitan_only:"Cette offre n'est valable qu'en France métropolitaine et en Corse.",email_domain_not_allowed:"Ce domaine d'email n'est pas autorisé pour cette opération.",noticetextlink:"notice ci-jointe",suivant:"Suivant",valider:"Valider",champ_obligatoire:"Champ obligatoire",iban_section_title:"Informations indiquées sur votre IBAN",iban_holder:"Titulaire du compte",iban_warning:"Depuis le 09/10/2025, l'IBAN saisi doit correspondre au titulaire du compte indiqué. Toute incohérence pourra bloquer le virement.",rgpd:"traite les données recueillies sur la base de l’exécution d’un contrat pour traiter votre participation à cette opération. Pour en savoir plus sur la gestion de vos données personnelles et pour exercer vos droits, reportez-vous à la <a href='{link}' target='_blank' id='noticelink'>notice ci-jointe</a>.",precedent:"Précédent",merci_renseigner_adresse:'Merci de renseigner votre adresse, ou cliquer sur "Je ne trouve pas mon adresse"',votre_adresse:"Votre Adresse *",N_rue:"N°, rue",compl_addresse:"Complément d'adresse",ville:"Ville",Numero_identification:"Numéro D.U.N.S *",code_postal:"Code postal *",pays:"Pays",Madame:"Madame",Monsieur:"Monsieur",trouvepasadresse:"Vous ne trouvez pas votre adresse ?",email_reparateur:"email de votre réparateur *",enseigne_psa:"Nom de la société *",file_max_size_error:"La taille du fichier est trop grande",file_heic_error:"Fichier iPhone .heic non supportés",file_max_size_info:"Taille maximale du fichier: {size} Mo","Erreurs de validation":"Erreurs de validation","Champs concernés :":"Champs concernés :"},"lu-nl":{address_required:"Het adres is verplicht",address_metropolitan_only:"Deze actie is alleen geldig in Europees Frankrijk en Corsica.",email_domain_not_allowed:"Dit e-maildomein is niet toegestaan voor deze actie.",noticetextlink:"bijgevoegde mededeling",suivant:"volgend",valider:"bevestigen",champ_obligatoire:"verplichte velden",iban_section_title:"Informatie op uw IBAN",iban_holder:"Rekeninghouder",iban_warning:"Vanaf 09/10/2025 moet de ingevoerde IBAN overeenkomen met de aangegeven rekeninghouder. Elke inconsistentie kan de overschrijving blokkeren.",rgpd:"behandelt d'Donnéeën, déi op Basis vun der Ausféierung vum Kontrakt gesammelt goufen, fir Är Participatioun un dëser Aktioun ze verwalten. Fir méi Informatiounen iwwer den Ëmgank mat Ären perséinlechen Daten a fir Är Rechter auszeüben, kuckt w.e.g. <a href='{link}' target='_blank' id='noticelink'>an d'ugeschloss Notiz</a>.",precedent:"vorig",merci_renseigner_adresse:'Voer alstublieft uw adres in, of klik op "Ik kan mijn adres niet vinden"',votre_adresse:"Jouw adres *",N_rue:"Straat en huisnummer",compl_addresse:"Aanvullende adresgegevens",ville:"Stad",code_postal:"Postcode",pays:"Land",Madame:"Mevr",Monsieur:"Man",Numero_identification:"D.U.N.S nummer *",trouvepasadresse:"Vind je je adres niet ?",trouvepasreparateur:"Ik kan mijn reparateur niet vinden?",email_reparateur:"Reparateur e-mail*",enseigne_psa:"bedrijfsnaam *",file_max_size_error:"De bestandsgrootte is te groot",file_heic_error:"iPhone .heic bestanden worden niet ondersteund",file_max_size_info:"Maximale bestandsgrootte: {size} MB","Erreurs de validation":"Validatiefouten","Champs concernés :":"Betreffende velden:"},"be-fr":{address_required:"L'adresse est obligatoire",address_metropolitan_only:"Cette offre n'est valable qu'en France métropolitaine et en Corse.",email_domain_not_allowed:"Ce domaine d'email n'est pas autorisé pour cette opération.",noticetextlink:"notice ci-jointe",suivant:"Suivant",valider:"Valider",champ_obligatoire:"Champ obligatoire",iban_section_title:"Informations indiquées sur votre IBAN",iban_holder:"Titulaire du compte",iban_warning:"Depuis le 09/10/2025, l'IBAN saisi doit correspondre au titulaire du compte indiqué. Toute incohérence pourra bloquer le virement.",rgpd:"traite les données recueillies sur la base de l’exécution d’un contrat pour traiter votre participation à cette opération. Pour en savoir plus sur la gestion de vos données personnelles et pour exercer vos droits, reportez-vous à la <a href='{link}' target='_blank' id='noticelink'>notice ci-jointe</a>.",precedent:"Précédent",merci_renseigner_adresse:'Merci de renseigner votre adresse, ou cliquer sur "Je ne trouve pas mon adresse"',votre_adresse:"Votre Adresse *",N_rue:"N°, rue",compl_addresse:"Complément d'adresse",ville:"Ville",code_postal:"Code postal",pays:"Pays",Madame:"Madame",Monsieur:"Monsieur",trouvepasadresse:"Vous ne trouvez pas votre adresse ?",enseigne_psa:"Nom de la société * ",Numero_identification:"numéro DUNS *",email_reparateur:"Email de votre réparateur *",file_max_size_error:"La taille du fichier est trop grande",file_heic_error:"Fichier iPhone .heic non supportés",file_max_size_info:"Taille maximale du fichier: {size} Mo","Erreurs de validation":"Erreurs de validation","Champs concernés :":"Champs concernés :"},"be-nl":{address_required:"Het adres is verplicht",address_metropolitan_only:"Deze actie is alleen geldig in Europees Frankrijk en Corsica.",email_domain_not_allowed:"Dit e-maildomein is niet toegestaan voor deze actie.",noticetextlink:"bijgevoegde mededeling",suivant:"volgend",valider:"bevestigen",champ_obligatoire:"verplichte velden",multiselect_list_empty:"Begin met typen",iban_section_title:"Informatie op uw IBAN",iban_holder:"Rekeninghouder",iban_warning:"Vanaf 09/10/2025 moet de ingevoerde IBAN overeenkomen met de aangegeven rekeninghouder. Elke inconsistentie kan de overschrijving blokkeren.",rgpd:"verwerkt de verzamelde gegevens op basis van de uitvoering van de overeenkomst om uw deelname aan deze actie te beheren. Voor meer informatie over het beheer van uw persoonlijke gegevens en om uw rechten uit te oefenen, raadpleeg de <a href='{link}' target='_blank' id='noticelink'>bijgevoegde mededeling</a>.",blurry_document:"Dit document ziet er wazig uit, wij adviseren u een andere afbeelding te sturen om te voorkomen dat het bestand wordt geweigerd.",precedent:"vorig",merci_renseigner_adresse:'Voer alstublieft uw adres in, of klik op "Ik kan mijn adres niet vinden"',votre_adresse:"Uw adres *","modifier votre adresse":"Uw adres wijzigen",N_rue:"Straatnaam en huisnummer",compl_addresse:"Aanvullende adresgegevens",trouvepasreparateur:"Ik kan mijn reparateur niet vinden?",enseigne_psa:"bedrijfsnaam *",ville:"Plaats",code_postal:"Postcode",pays:"Land",Numero_identification:"D.U.N.S nummer *",Madame:"Mevr",Monsieur:"Man",trouvepasadresse:"Vind je je adres niet ?",email_reparateur:"Reparateur e-mail*","Erreurs de validation":"Validatiefouten","Champs concernés :":"Betreffende velden:"},sl:{address_required:"Naslov je obvezen",address_metropolitan_only:"Ta ponudba velja samo za celinsko Francijo in Korziko.",noticetextlink:"priložené oznámenie",suivant:"TO_TRANSLATE_SL Suivant",valider:"TO_TRANSLATE_SL Valider",champ_obligatoire:"obvezna polja",iban_section_title:"Informacije navedene na vašem IBAN",iban_holder:"Imetnik računa",iban_warning:"Od 09/10/2025 mora vneseni IBAN ustrezati navedenemu imetniku računa. Vsaka neskladnost lahko blokira prenos.",precedent:"TO_TRANSLATE_SL Précédent",merci_renseigner_adresse:"Vnesite svoj naslov ali pa kliknite možnost »Ne najdem svojega naslova«",votre_adresse:"POŠTNI NASLOV *",N_rue:"Številka ulice",compl_addresse:"Dodatni naslov",ville:"Kraj",code_postal:"Poštna številka",pays:"Država",Madame:"Gospa",Monsieur:"Gospod",Numero_identification:"TO_TRANSLATE_SL_D.U.N.S nummer *",trouvepasadresse:"Ne najdem svojega naslova",trouvepasreparateur:"TO_TRANSLATE_SL_REPARATOR?",enseigne_psa:"TO_TRANSLATE_SL_ENSEIGNE",email_reparateur:"TO_TRANSLATE_SL_Email de votre réparateur *","Erreurs de validation":"Napake pri preverjanju","Champs concernés :":"Vplivana polja:"},bg:{address_required:"Адресът е задължителен",address_metropolitan_only:"Тази оферта е валидна само за континентална Франция и Корсика.",noticetextlink:"приложено известие",suivant:"TO_TRANSLATE_BG Suivant",valider:"TO_TRANSLATE_BG Valider",champ_obligatoire:"задължителни полета",iban_section_title:"Информация посочена във вашия IBAN",iban_holder:"Титуляр на сметката",iban_warning:"От 09/10/2025 въведеният IBAN трябва да съответства на посочения титуляр на сметката. Всяко несъответствие може да блокира превода.",precedent:"TO_TRANSLATE_BG Précédent",merci_renseigner_adresse:"Моля, попълнете адреса си или щракнете върху „Не намирам адреса си“",votre_adresse:"ПОЩЕНСКИ АДРЕС *",N_rue:"Улица, №",compl_addresse:"Други адресни данни",ville:"Град",code_postal:"Пощенски код",pays:"Държава",Madame:"Gospa",Monsieur:"Gospod",Numero_identification:"TO_TRANSLATE_BG_D.U.N.S nummer *",trouvepasadresse:"Не намирате адреса си?",trouvepasreparateur:"TO_TRANSLATE_BG_REPARATOR?",enseigne_psa:"TO_TRANSLATE_BG_ENSEIGNE",email_reparateur:"TO_TRANSLATE_BG_Email de votre réparateur *","Erreurs de validation":"Грешки при валидация","Champs concernés :":"Засегнати полета:"},ro:{address_required:"Adresa este obligatorie",address_metropolitan_only:"Această ofertă este valabilă doar în Franța metropolitană și Corsica.",noticetextlink:"notificare atasata",suivant:"TO_TRANSLATE_RO Suivant",valider:"TO_TRANSLATE_RO Valider",champ_obligatoire:"câmpuri obligatorii",iban_section_title:"Informații indicate pe IBAN-ul dvs.",iban_holder:"Titular de cont",iban_warning:"Din 09/10/2025, IBAN-ul introdus trebuie să corespundă titularului de cont indicat. Orice inconsecvență poate bloca transferul.",precedent:"TO_TRANSLATE_RO Précédent",merci_renseigner_adresse:"Vă rugăm să completați adresa dvs. sau să faceți clic pe „Nu îmi găsesc adresa”",votre_adresse:"ADRESA *",N_rue:"Număr Stradă",compl_addresse:"Alte detalii privind adresa",ville:"Oraș",code_postal:"Cod poștal",pays:"Țara",Madame:"Doamna",Monsieur:"Domnul",Numero_identification:"TO_TRANSLATE_RO_D.U.N.S nummer *",trouvepasadresse:"Nu vă puteți găsi adresa?",trouvepasreparateur:"TO_TRANSLATE_RO_REPARATOR?",enseigne_psa:"TO_TRANSLATE_RO_ENSEIGNE",email_reparateur:"TO_TRANSLATE_RO_Email de votre réparateur *","Erreurs de validation":"Erori de validare","Champs concernés :":"Câmpuri afectate:"},el:{address_required:"Η διεύθυνση είναι υποχρεωτική",address_metropolitan_only:"Η προσφορά ισχύει μόνο για τη μητροπολιτική Γαλλία και την Κορσική.",noticetextlink:"notice ci-jointe",suivant:"TO_TRANSLATE_RO Suivant",valider:"TO_TRANSLATE_RO Valider",champ_obligatoire:"Υποχρεωτικό πεδίο",iban_section_title:"Πληροφορίες που αναγράφονται στο IBAN σας",iban_holder:"Κάτοχος λογαριασμού",iban_warning:"Από τις 09/10/2025, το IBAN που εισάγεται πρέπει να αντιστοιχεί στον υποδεικνυόμενο κάτοχο λογαριασμού. Οποιαδήποτε ασυνέπεια μπορεί να μπλοκάρει τη μεταφορά.",precedent:"TO_TRANSLATE_RO Précédent",merci_renseigner_adresse:'Συμπληρώστε τη διεύθυνσή σας ή κάντε κλικ στο "Δεν μπορώ να βρω τη διεύθυνσή μου"',votre_adresse:"ΤΑΧ/ΚΗ ΔΙΕΥΘΥΝΣΗ *",N_rue:"Οδός και αριθμός",compl_addresse:"Λοιπά στοιχεία διεύθυνσης",ville:"Πόλη",code_postal:"Ταχυδρομικός κώδικας",pays:"Χώρα",Madame:"κυρία",Monsieur:"κύριος",Numero_identification:"TO_TRANSLATE_RO_D.U.N.S nummer *",trouvepasadresse:"Δεν μπορείτε να βρείτε τη διεύθυνσή σας;",trouvepasreparateur:"TO_TRANSLATE_RO_REPARATOR?",enseigne_psa:"TO_TRANSLATE_RO_ENSEIGNE",email_reparateur:"TO_TRANSLATE_RO_Email de votre réparateur *","Erreurs de validation":"Σφάλματα επικύρωσης","Champs concernés :":"Επηρεαζόμενα πεδία:"},it:{address_required:"L'indirizzo è obbligatorio",address_metropolitan_only:"Questa offerta è valida solo in Francia metropolitana e Corsica.",email_domain_not_allowed:"Questo dominio email non è consentito per questa operazione.",multiple_file_remove_file:"Rimuovere un file",multiple_file_add_file:"Aggiungere un file",changez_votre_adresse:"Modifica il tuo indirizzo",noticetextlink:"avviso allegato",suivant:"Successivo",valider:"Confermare",champ_obligatoire:"Campi obbligatori",iban_section_title:"Informazioni indicate sul vostro IBAN",iban_holder:"Titolare del conto",iban_warning:"Dal 09/10/2025, l'IBAN inserito deve corrispondere al titolare del conto indicato. Qualsiasi incoerenza può bloccare il bonifico.",precedent:"Precedente",merci_renseigner_adresse:'Si prega di inserire il proprio indirizzo o cliccare su "Non trovo il mio indirizzo"',votre_adresse:"Il tuo indirizzo",N_rue:"N°, via",compl_addresse:"Complemento d'indirizzo",ville:"Città",code_postal:"Codice di avviamento postale",pays:"Paese",Madame:"Signora",Monsieur:"Signore",Numero_identification:"Numero D.U.N.S *",trouvepasadresse:"Non trovi il tuo indirizzo?",trouvepasreparateur:"RIPARATORE?",enseigne_psa:"INSEGNA",email_reparateur:"Email del tuo riparatore *","Corrigez les erreurs":"Si prega di verificare gli errori rimanenti nel modulo.","Erreurs de validation":"Errori di convalida","Champs concernés :":"Campi interessati:",rgpd:"tratta i dati raccolti sulla base dell'esecuzione del contratto per gestire la sua partecipazione a questa operazione. Per saperne di più sulla gestione dei suoi dati personali e per esercitare i suoi diritti, consulti l'<a href='{link}' target='_blank' id='noticelink'>avviso allegato</a>.",date_fin_regule_passee:"Il termine per la regolarizzazione è scaduto. Il modulo non può più essere inviato.",multiple_file_upload_en_cours:"Caricamento in corso",multiple_file_patientez:"Attendere: uno o più file sono in fase di caricamento. Non convalidare il modulo prima del termine dell'operazione.",file_max_size_error:"Il file è troppo grande",file_heic_error:"I file iPhone .heic non sono supportati",select_Précisez:"Si prega di specificare",prix_produit_produit:"Prodotto",prix_produit_reference:"Riferimento",prix_produit_description:"Descrizione",prix_produit_quantite:"Quantità",prix_produit_prix:"Prezzo unitario IVA inclusa",prix_produit_imei:"IMEI",field_required:"Questo campo è obbligatorio.",date_invalid:"La data non è valida.",date_after:"La data deve essere successiva al {date}.",date_before:"La data deve essere precedente al {date}.",phone_invalid:"Il numero di telefono non è valido.",phone_country_not_accepted:"I numeri di telefono di questo Paese non sono accettati.",phone_mobile_required:"Si prega di inserire un numero di cellulare.",phone_fixed_required:"Si prega di inserire un numero di telefono fisso.",iban_invalid:"L'IBAN inserito non è valido.",iban_country_not_accepted:"Gli IBAN di questo Paese non sono accettati per questa operazione.",postalcode_invalid:"Il codice postale non è valido.",unique_email_used:"Questo indirizzo e-mail è già stato utilizzato per partecipare.",unique_phone_used:"Questo numero di telefono è già stato utilizzato per partecipare.",unique_value_used:"Questo valore è già stato utilizzato per partecipare.",unique_check_failed:"Verifica non riuscita. Si prega di riprovare.",error_title:"Errore",error_generic:"Si è verificato un errore",prix_produit_add:"Aggiungi un prodotto",prix_produit_remove:"Rimuovi",prix_produit_error_quantity:"Si prega di indicare una quantità di almeno 1 per il prodotto {num}",file_selected:"1 file selezionato",file_upload_failed:"Il caricamento del file non è riuscito.",file_format_not_accepted:"Formato non accettato. Formati accettati: {formats}",file_select_required:"Si prega di selezionare un file",file_upload_button:"Carica",file_delete:"Elimina il file",multiple_files_max:"Massimo {max} file.",multiple_files_drop:"Trascina qui i tuoi file o fai clic"},pl:{address_required:"Adres jest wymagany",address_metropolitan_only:"Ta oferta jest ważna tylko we Francji metropolitalnej i na Korsyce.",email_domain_not_allowed:"Ta domena e-mail nie jest dozwolona dla tej operacji.",noticetextlink:"załączoną informacją",suivant:"Następny",valider:"Zatwierdź",champ_obligatoire:"Pola Wymagane",iban_section_title:"Informacje podane na Twoim IBAN",iban_holder:"Posiadacz konta",iban_warning:"Od 09/10/2025 wprowadzony IBAN musi odpowiadać wskazanemu posiadaczowi konta. Wszelkie niezgodności mogą zablokować przelew.",rgpd:"przetwarza zebrane dane na podstawie wykonania umowy w celu zarządzania udziałem w tej akcji. Aby uzyskać więcej informacji na temat zarządzania Państwa danymi osobowymi i skorzystać ze swoich praw, prosimy zapoznać się z <a href='{link}' target='_blank' id='noticelink'>załączoną informacją</a>.",blurry_document:"Ten dokument jest niewyraźny, radzimy wysłać inny obraz, aby uniknąć odrzucenia pliku.",precedent:"Poprzedni",merci_renseigner_adresse:"Wpisz swój adres lub kliknij „Nie mogę znaleźć swojego adresuWpisz swój adres lub kliknij „Nie mogę znaleźć swojego adresu",votre_adresse:"Twój adres",N_rue:"Adres",compl_addresse:"Uzupełnienie adresu",Numero_identification:"Numer identyfikacyjny",ville:"Miasto",code_postal:"Kod pocztowy",pays:"Kraj",Madame:"Pani.",Monsieur:"Pan.",trouvepasadresse:"Nie możesz znaleźć swojego adresu?",trouvepasreparateur:"TO_TRANSLATE_PL_REPARATOR?",email_reparateur:"TO_TRANSLATE_PL_Email de votre réparateur *",enseigne_psa:"TO_TRANSLATE_PL_ENSEIGNE","Erreurs de validation":"Błędy walidacji","Champs concernés :":"Pola, których dotyczy:","Corrigez les erreurs":"Sprawdź pozostałe błędy w formularzu.",date_fin_regule_passee:"Termin na uzupełnienie zgłoszenia minął. Formularza nie można już przesłać.",multiple_file_upload_en_cours:"Przesyłanie w toku",multiple_file_patientez:"Proszę czekać, trwa przesyłanie jednego lub kilku plików. Nie zatwierdzaj formularza przed zakończeniem operacji.",multiple_file_add_file:"Dodaj plik",multiple_file_remove_file:"Usuń plik",file_max_size_error:"Plik jest za duży",file_heic_error:"Pliki iPhone .heic nie są obsługiwane",select_Précisez:"Proszę sprecyzować",prix_produit_produit:"Produkt",prix_produit_reference:"Numer referencyjny",prix_produit_description:"Opis",prix_produit_quantite:"Ilość",prix_produit_prix:"Cena jednostkowa brutto",prix_produit_imei:"IMEI",field_required:"To pole jest wymagane.",date_invalid:"Data jest nieprawidłowa.",date_after:"Data musi być późniejsza niż {date}.",date_before:"Data musi być wcześniejsza niż {date}.",phone_invalid:"Numer telefonu jest nieprawidłowy.",phone_country_not_accepted:"Numery telefonów z tego kraju nie są akceptowane.",phone_mobile_required:"Wpisz numer telefonu komórkowego.",phone_fixed_required:"Wpisz numer telefonu stacjonarnego.",iban_invalid:"Wprowadzony numer IBAN jest nieprawidłowy.",iban_country_not_accepted:"Numery IBAN z tego kraju nie są akceptowane w tej akcji.",postalcode_invalid:"Kod pocztowy jest nieprawidłowy.",unique_email_used:"Ten adres e-mail został już użyty do udziału w akcji.",unique_phone_used:"Ten numer telefonu został już użyty do udziału w akcji.",unique_value_used:"Ta wartość została już użyta do udziału w akcji.",unique_check_failed:"Weryfikacja nie powiodła się. Spróbuj ponownie.",error_title:"Błąd",error_generic:"Wystąpił błąd",prix_produit_add:"Dodaj produkt",prix_produit_remove:"Usuń",prix_produit_error_quantity:"Podaj ilość co najmniej 1 dla produktu {num}",file_selected:"Wybrano 1 plik",file_upload_failed:"Nie udało się przesłać pliku.",file_format_not_accepted:"Niedozwolony format. Dozwolone formaty: {formats}",file_select_required:"Wybierz plik",file_upload_button:"Prześlij",file_delete:"Usuń plik",multiple_files_max:"Maksymalna liczba plików: {max}.",multiple_files_drop:"Przeciągnij pliki tutaj lub kliknij"},pt:{address_required:"O endereço é obrigatório",address_metropolitan_only:"Esta oferta é válida apenas em França metropolitana e na Córsega.",email_domain_not_allowed:"Este domínio de e-mail não é permitido para esta operação.",noticetextlink:"aviso anexado",suivant:"Próximo",valider:"Validar",multiselect_list_empty:"Comece a dactilografar",champ_obligatoire:"Campo obrigatório",iban_section_title:"Informações indicadas no seu IBAN",iban_holder:"Titular da conta",iban_warning:"Desde 09/10/2025, o IBAN inserido deve corresponder ao titular da conta indicado. Qualquer inconsistência pode bloquear a transferência.",rgpd:"processa os dados recolhidos com base na execução do contrato para gerir a sua participação nesta ação. Para saber mais sobre a gestão dos seus dados pessoais e para exercer os seus direitos, consulte o <a href='{link}' target='_blank' id='noticelink'>aviso em anexo</a>.",blurry_document:"Este documento parece desfocado, aconselhamos a enviar outra imagem para evitar que o ficheiro seja recusado",precedent:"Anterior",merci_renseigner_adresse:' Introduzca su dirección o haga clic en "No encuentro mi dirección"',votre_adresse:"O seu endereço",changez_votre_adresse:"Altere o seu endereço",N_rue:"Endereço, linha 1",compl_addresse:"Endereço adicional",Numero_identification:"TO_TRANSLATE_PL_D.U.N.S nummer",ville:"Cidade",code_postal:"Código postal",pays:"País",Madame:"Senhora",Monsieur:"Senhor",trouvepasadresse:"Não consegue encontrar a sua morada?",trouvepasreparateur:"TO_TRANSLATE_PT_REPARATOR?",email_reparateur:"TO_TRANSLATE_PT_Email de votre réparateur *",enseigne_psa:"TO_TRANSLATE_PT_ENSEIGNE","Erreurs de validation":"Erros de validação","Champs concernés :":"Campos afetados:","Corrigez les erreurs":"Por favor, verifique os erros restantes no formulário.",date_fin_regule_passee:"O prazo de regularização terminou. O formulário já não pode ser submetido.",multiple_file_upload_en_cours:"Carregamento em curso",multiple_file_patientez:"Aguarde: um ou mais ficheiros estão a ser carregados. Não valide o formulário antes do fim da operação.",multiple_file_add_file:"Adicionar um ficheiro",multiple_file_remove_file:"Remover um ficheiro",file_max_size_error:"O ficheiro é demasiado grande",file_heic_error:"Ficheiros iPhone .heic não suportados",select_Précisez:"Por favor, especifique",prix_produit_produit:"Produto",prix_produit_reference:"Referência",prix_produit_description:"Descrição",prix_produit_quantite:"Quantidade",prix_produit_prix:"Preço unitário com IVA",prix_produit_imei:"IMEI",field_required:"Este campo é obrigatório.",date_invalid:"A data não é válida.",date_after:"A data deve ser posterior a {date}.",date_before:"A data deve ser anterior a {date}.",phone_invalid:"O número de telefone não é válido.",phone_country_not_accepted:"Não são aceites números de telefone deste país.",phone_mobile_required:"Introduza um número de telemóvel.",phone_fixed_required:"Introduza um número de telefone fixo.",iban_invalid:"O IBAN introduzido não é válido.",iban_country_not_accepted:"Não são aceites IBAN deste país para esta operação.",postalcode_invalid:"O código postal não é válido.",unique_email_used:"Este endereço de e-mail já foi utilizado para participar.",unique_phone_used:"Este número de telefone já foi utilizado para participar.",unique_value_used:"Este valor já foi utilizado para participar.",unique_check_failed:"Não foi possível efetuar a verificação. Tente novamente.",error_title:"Erro",error_generic:"Ocorreu um erro",prix_produit_add:"Adicionar um produto",prix_produit_remove:"Remover",prix_produit_error_quantity:"Indique uma quantidade de, pelo menos, 1 para o produto {num}",file_selected:"1 ficheiro selecionado",file_upload_failed:"Não foi possível carregar o ficheiro.",file_format_not_accepted:"Formato não aceite. Formatos aceites: {formats}",file_select_required:"Selecione um ficheiro",file_upload_button:"Carregar",file_delete:"Eliminar o ficheiro",multiple_files_max:"Máximo de {max} ficheiro(s).",multiple_files_drop:"Arraste os seus ficheiros para aqui ou clique"},no:{address_required:"The address is required",address_metropolitan_only:"This offer is only valid in mainland France and Corsica.",email_domain_not_allowed:"This email domain is not allowed for this operation.",noticetextlink:"attached notice",suivant:"Next",valider:"Submit",champ_obligatoire:"Required fields",multiselect_list_empty:"Start typing",iban_section_title:"Information on your IBAN",iban_holder:"Account holder",iban_warning:"Since 09/10/2025, the entered IBAN must match the account holder indicated. Any inconsistency may block the transfer.",iban_uk_sort_code:"Sort Code",iban_uk_sort_code_placeholder:"6 digits",iban_uk_account_number:"Account Number",iban_uk_account_number_placeholder:"8 digits",rgpd:"processes the data collected on the basis of the performance of the contract to manage your participation in this operation. To learn more about how your personal data is managed and to exercise your rights, please refer to the <a href='{link}' target='_blank' id='noticelink'>attached notice</a>.",precedent:"Previous",merci_renseigner_adresse:`Please select a suggested address or click on "I can't find my address"`,trouvepasadresse:"I can't find my address",trouvepasreparateur:"You can't find it?",email_reparateur:"E-mail of your repairer *",enseigne_psa:"Company name *",Numero_identification:"DUNS number *",votre_adresse:"Your address *",changez_votre_adresse:"Edit your address",N_rue:"Number and street name",compl_addresse:"Additional address info",ville:"City",code_postal:"ZIP code",pays:"Country","Corrigez les erreurs":"Please check the remaining errors in the form.",date_fin_regule_passee:"The regularization deadline has passed. The form can no longer be submitted.",Madame:"Mrs.",Monsieur:"Mr.",multiple_file_upload_en_cours:"Upload in progress",multiple_file_aucun_fichier:"No file",multiple_file_patientez:"Please wait, one or more files are being uploaded. Do not submit the form until the operation is complete.",multiple_file_add_file:"Add a file",multiple_file_remove_file:"Remove a file",file_max_size_error:"The file size is too large",file_heic_error:"iPhone .heic files not supported",file_max_size_info:"Maximum file size: {size} MB",select_Précisez:"Please specify",prix_produit_produit:"Product",prix_produit_reference:"Reference",prix_produit_description:"Description",prix_produit_quantite:"Quantity",prix_produit_prix:"Unit price incl. tax",prix_produit_imei:"IMEI",prix_produit_select_placeholder:"Select an option",prix_produit_max_reached:"Limit of {max} product(s) reached",prix_produit_error_select_ref:"Please select a reference for product {num}",prix_produit_error_select_refs:"Please select a reference for products {nums}",prix_produit_error_quantity:"The quantity of product {num} is required",prix_produit_error_price:"The price of product {num} is required",prix_produit_error_min_refs:"Please select at least {min} reference(s)","Erreurs de validation":"Validation errors","Champs concernés :":"Affected fields:"}},EM={"es-cat":["es","fr"],"lu-fr":["fr"],"be-fr":["fr"],"lu-nl":["nl","fr"],"be-nl":["nl","fr"],default:["fr"]},TM={fr:"fr","fr-fr":"fr","lu-fr":"lu-fr","be-fr":"be-fr",en:"en","en-gb":"en","en-uk":"en",uk:"en",es:"es","es-es":"es","es-cat":"es-cat",de:"de",nl:"nl","lu-nl":"lu-nl","be-nl":"be-nl",it:"it",pl:"pl",sl:"sl",si:"sl",bg:"bg",ro:"ro",el:"el",gr:"el",pt:"pt","pt-pt":"pt",no:"no",nb:"no",nn:"no","nb-no":"no","nn-no":"no"};function n9(e){const t=(e||"fr").toLowerCase(),n=TM[t]||t.split("-")[0];return t9[n]?n:"fr"}const Pt=mM({legacy:!1,locale:"fr",fallbackLocale:EM,messages:t9,missingWarn:!1,fallbackWarn:!1});function ki(e){return dt(e,t=>{Pt.global.locale.value=n9(t)},{immediate:!0}),(t,n)=>Pt.global.t(t,n??{})}function wM(e,t={}){if(e==null||e==="")return!0;const{phoneType:n="both",defaultCountry:r,acceptedCountries:i=[]}=t,o=jv(String(e)),s=lO(o,o.trim().startsWith("+")?void 0:r);if(!s||!s.isValid())return Pt.global.t("phone_invalid");if(i.length>0&&(!s.country||!i.includes(s.country)))return Pt.global.t("phone_country_not_accepted");const a=s.getType(),l=a==="MOBILE"||a==="FIXED_LINE_OR_MOBILE",c=a==="FIXED_LINE"||a==="FIXED_LINE_OR_MOBILE";return n==="mobile"&&!l?Pt.global.t("phone_mobile_required"):n==="fixed"&&!c?Pt.global.t("phone_fixed_required"):!0}function q0(e){return(e||"").replace(/\s+/g,"").toUpperCase()}function IM(e){return q0(e).slice(0,2)}const AM=["AD","AT","BE","BG","CH","CY","CZ","DE","DK","EE","ES","FI","FR","GB","GI","GR","HR","HU","IE","IS","IT","LI","LT","LU","LV","MC","MT","NL","NO","PL","PT","RO","SE","SI","SK","SM","VA"],xM={FR:27,BE:16,LU:20,DE:22,NL:18,ES:24,IT:27,PT:25,GB:22,IE:22,AT:20,PL:28,SI:19,BG:22,RO:24,GR:27,CH:21,MC:27};function CM(e){const t=q0(e);if(!/^[A-Z]{2}\d{2}[A-Z0-9]+$/.test(t))return!1;const n=xM[t.slice(0,2)];if(n&&t.length!==n)return!1;const r=t.slice(4)+t.slice(0,4);let i=0;for(const o of r){const s=o>="A"&&o<="Z"?(o.charCodeAt(0)-55).toString():o;for(const a of s)i=(i*10+Number(a))%97}return i===1}function kM(e){return q0(e).replace(/(.{4})/g,"$1 ").trim()}function NM(e){return e==null||e===""?!0:CM(String(e))||Pt.global.t("iban_invalid")}function RM(e,t=[]){if(e==null||e===""||t.length===0)return!0;const n=IM(String(e));return t.flatMap(i=>i.toUpperCase()==="SEPA"?AM:[i.toUpperCase()]).includes(n)||Pt.global.t("iban_country_not_accepted")}function OM(e,t){if(e==null||e==="")return!0;const n=String(e).replace(/\D/g,"");return String(t||"").replace(/\D/g,"").length!==6||n.length!==8,!0}function PM(e){const n=(e||"").replace(/\s+/g,"").toUpperCase().replace("2A","19").replace("2B","18");if(!/^\d{15}$/.test(n))return!1;const r=n.slice(0,13),i=Number(n.slice(13,15));return 97-Number(r)%97===i}function MM(e){return e==null||e===""?!0:PM(String(e))||"Le numéro de sécurité sociale n’est pas valide."}const r9=/^(?:0[1-9]|[1-8]\d|9[0-5])\d{3}$/,LM=/^(?:97|98)/;function z0(e){return Array.isArray(e)?e.flat(1/0).map(t=>String(t).toLowerCase()):[]}const DM=new Set(["fr","fr-metro","gp","mq","gf","re","yt","pm","bl","mf"]);function FM(e){const t=z0(e);return t.length>0&&t.every(n=>DM.has(n))}function i9(e){return z0(e).includes("fr-metro")}function UM(e){return r9.test(String(e??"").trim())}function H0(e){return LM.test(String(e??"").trim())}function BM(e){return z0(e).map(t=>t==="fr-metro"?"fr":t)}const o9={fr:/^\d{5}$/,"fr-metro":r9,be:/^[1-9]\d{3}$/,lu:/^[1-9]\d{3}$/,at:/^[1-9]\d{3}$/,nl:/^\d{4}\s?[A-Za-z]{2}$/,de:/^[1-9]\d{4}$/,no:/^(?!0000)\d{4}$/};function jM(e,t=[]){if(e==null||e==="")return!0;const n=String(e).trim(),i=t.map(s=>s.toLowerCase()).filter(s=>o9[s]);return i.length===0?!0:i.some(s=>o9[s].test(n))||Pt.global.t("postalcode_invalid")}async function qM(e,t){if(e==null||e==="")return!0;const{field:n,operationId:r,server:i}=t,o=(i||"").replace(/\/$/,"");try{const{data:s}=await mt.post(`${o}/api/check/${r}`,{operationId:r,[n]:e});return s?.status==="OK"?zM(n):!0}catch(s){return rr(s,{where:"uniqueRule",field:n,operationId:r}),Pt.global.t("unique_check_failed")}}function zM(e){return e==="email"?Pt.global.t("unique_email_used"):["phone","mobile_phone","fixed_phone"].includes(e)?Pt.global.t("unique_phone_used"):Pt.global.t("unique_value_used")}Un.extend(kb);function Vs(e){return Array.isArray(e)?e:e==null?[]:typeof e=="object"?Object.values(e):[e]}function V0(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}let s9=!1;function a9(){if(s9)return;s9=!0;const e={required:$C,email:fC,min:Fb,max:Lb,min_value:Ub,max_value:Db,numeric:yC,integer:pC,length:mC,digits:Pb,regex:Bb,one_of:Qm,not_one_of:_C,confirmed:dC,size:SC,between:Ob,url:EC,alpha_spaces:Rb};for(const[t,n]of Object.entries(e))xn(t,n);xn("phone",(t,n)=>wM(t,V0(n))),xn("iban",t=>NM(t)),xn("countryiban",(t,n)=>RM(t,Vs(n).map(String))),xn("iban_uk_modulus",(t,n)=>OM(t,String(Vs(n)[0]??""))),xn("securitesocialefr",t=>MM(t)),xn("checked",t=>t===!0?!0:Pt.global.t("field_required")),xn("address_required",t=>{const n=t;return n&&typeof n=="object"&&n.address?!0:Pt.global.t("address_required")}),xn("address_metropolitan",t=>{const n=t;return!n||typeof n!="object"||!n.postcode||UM(n.postcode)?!0:Pt.global.t("address_metropolitan_only")}),xn("prix_produits_quantity",t=>{const r=(Array.isArray(t)?t:[]).findIndex(i=>!(Number.isInteger(i.quantity)&&Number(i.quantity)>=1));return r===-1?!0:Pt.global.t("prix_produit_error_quantity",{num:r+1})}),xn("postalcode",(t,n)=>jM(t,Vs(n).map(String))),xn("unique",(t,n)=>{const r=V0(n);return qM(t,{field:String(r.field??""),operationId:String(r.operationId??""),server:String(r.server??"")})}),xn("date_range",(t,n)=>{if(t==null||t==="")return!0;const r=V0(n),i=Un(String(t),["DD/MM/YYYY","YYYY-MM-DD"],!0);if(!i.isValid())return Pt.global.t("date_invalid");const o=r.min?Un(String(r.min)):null,s=r.max?Un(String(r.max)):null;return o&&o.isValid()&&i.isBefore(o,"day")?Pt.global.t("date_after",{date:o.format("DD/MM/YYYY")}):s&&s.isValid()&&i.isAfter(s,"day")?Pt.global.t("date_before",{date:s.format("DD/MM/YYYY")}):!0}),xn("date_between",(t,n)=>{if(t==null||t==="")return!0;const[r,i]=Vs(n).map(s=>s?Un(String(s)):null),o=Un(String(t));return o.isValid()?r&&r.isValid()&&o.isBefore(r,"day")?Pt.global.t("date_after",{date:r.format("DD/MM/YYYY")}):i&&i.isValid()&&o.isAfter(i,"day")?Pt.global.t("date_before",{date:i.format("DD/MM/YYYY")}):!0:Pt.global.t("date_invalid")}),xn("before",(t,n)=>{if(!t)return!0;const r=Vs(n)[0],i=r?Un(String(r)):null;return!i||!i.isValid()||Un(String(t)).isBefore(i,"day")?!0:Pt.global.t("date_before",{date:i.format("DD/MM/YYYY")})}),xn("after",(t,n)=>{if(!t)return!0;const r=Vs(n)[0],i=r?Un(String(r)):null;return!i||!i.isValid()||Un(String(t)).isAfter(i,"day")?!0:Pt.global.t("date_after",{date:i.format("DD/MM/YYYY")})}),EI({generateMessage:xC({fr:CC,en:kC,es:NC,de:RC,nl:OC,it:PC,pl:MC,sl:LC,bg:DC,ro:FC,el:UC,pt:BC}),validateOnInput:!1,validateOnBlur:!0,validateOnChange:!0,validateOnModelUpdate:!1}),Wb("fr")}function HM(e){Wb(e)}const l9=Symbol("houston-form-context");function VM(e){il(l9,e)}function mo(){const e=Uo(l9);if(!e)throw new Error("useFormContext() doit être utilisé dans un champ rendu par <HoustonForm>.");return e}const c9={included:"one_of",not_included:"not_one_of"};function u9(e){const t={};for(const n of e.split("|").map(r=>r.trim()).filter(Boolean)){const r=n.indexOf(":"),i=r===-1?n:n.slice(0,r),o=r===-1?void 0:n.slice(r+1),s=c9[i]||i;if(o===void 0)t[s]=!0;else{const a=o.split(",");t[s]=a.length>1?a:a[0]}}return t}function WM(e){if(!e)return{};if(typeof e=="string")return u9(e);const t={};for(const[n,r]of Object.entries(e))t[c9[n]||n]=r;return t}function GM(e,t={}){const n={...e.type==="email"?{email:!0}:{},...e.validation?u9(e.validation):{},...WM(e.validationRules),...t};return e.required&&(n.required=!0),n}function Xt(e,t={}){const n=mo(),r=e.save_to||e.validationLabel||e.label||e.name||"field",i=pe(()=>GM(e,{...t,...e.unique&&e.save_to&&!n.testmode.value?.disableunique?{unique:{field:e.save_to,operationId:n.operationId.value,server:n.server}}:{}})),o=e.save_to&&e.save_to in n.form?n.form[e.save_to]:void 0,{value:s,errorMessage:a,meta:l,handleBlur:c,handleChange:u,validate:d,setValue:f}=Vo(r,i,{initialValue:o,label:e.validationLabel||e.label||void 0,syncVModel:!1});e.save_to&&dt(s,T=>{n.form[e.save_to]=T},{immediate:!0});const p=T=>T==null||T==="",m=pe(()=>!!a.value&&(l.touched||l.dirty||n.submitAttempted.value)),b=pe(()=>l.valid&&!a.value&&(l.touched||l.dirty)&&!p(s.value)),g=pe(()=>m.value?"error":b.value?"valid":"idle"),_=pe(()=>({"fb-invalid":m.value,"fb-valid":b.value})),y=pe({get:()=>s.value,set:T=>f(T)});return{ctx:n,validationName:r,value:s,model:y,errorMessage:a,showError:m,isValid:b,fieldState:g,controlClass:_,meta:l,handleBlur:c,handleChange:u,validate:d,setValue:f}}function d9(e,t){if(!t)return e;const n='<span class="fb-required-star">*</span>',r=e.match(/<\/[^>]+>$/);return r&&r.index!==void 0?e.slice(0,r.index)+n+e.slice(r.index):e+n}const YM=["for","innerHTML"],lt=ot({__name:"FieldLabel",props:{label:{},required:{type:Boolean},forId:{}},setup(e){const t=e,n=pe(()=>d9(t.label??"",t.required));return(r,i)=>(U(),V("label",{class:"fb-label",for:e.forId,innerHTML:n.value},null,8,YM))}}),KM={class:"fb-field"},XM=["id","type","name","required","inputmode","placeholder","aria-invalid"],JM={key:0,class:"fb-error",role:"alert"},ZM=ot({__name:"FieldConfirmation",props:{targetName:{},name:{},label:{},type:{},required:{type:Boolean},placeholder:{},inputmode:{}},setup(e){const t=e,n=Re(null),{value:r,errorMessage:i,meta:o,handleBlur:s}=Vo(t.name,{required:!!t.required,confirmed:`@${t.targetName}`},{label:t.label}),a=pe(()=>!!i.value&&(o.touched||o.dirty)),l=pe(()=>t.inputmode);return Cr(()=>{n.value?.addEventListener("paste",c=>c.preventDefault())}),(c,u)=>(U(),V("div",KM,[Ne(lt,{"for-id":e.name,label:e.label,required:e.required},null,8,["for-id","label","required"]),Et(me("input",{id:e.name,ref_key:"inputRef",ref:n,"onUpdate:modelValue":u[0]||(u[0]=d=>_t(r)?r.value=d:null),class:ut(["fb-input",{"fb-invalid":a.value}]),type:e.type||"text",name:e.name,required:e.required,inputmode:l.value,placeholder:e.placeholder,"aria-invalid":a.value||void 0,onBlur:u[1]||(u[1]=(...d)=>h(s)&&h(s)(...d))},null,42,XM),[[sy,h(r)]]),a.value?(U(),V("span",JM,ve(h(i)),1)):be("",!0)]))}}),QM={class:"fb-field"},eL=["id","type","name","required","autocomplete","placeholder","pattern","maxlength","inputmode","aria-invalid","aria-describedby"],tL=["innerHTML"],nL=ot({__name:"FieldInput",props:{field:{}},setup(e){const n=e.field,r=n.save_to||n.name||"field",i=`${r}-info`,o=`${r}-error`,{model:s,showError:a,errorMessage:l,controlClass:c,validationName:u,handleBlur:d}=Xt(n),f=pe(()=>[n.info?i:null,a.value?o:null].filter(Boolean).join(" ")||void 0),p=pe(()=>n.inputmode);return(m,b)=>(U(),V("div",null,[me("div",QM,[Ne(lt,{"for-id":h(r),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"]),Et(me("input",{id:h(r),"onUpdate:modelValue":b[0]||(b[0]=g=>_t(s)?s.value=g:null),class:ut(["fb-input",h(c)]),type:h(n).type||"text",name:h(u),required:h(n).required||void 0,autocomplete:h(n).autocomplete,placeholder:h(n).placeholder,pattern:h(n).pattern,maxlength:h(n).maxlength,inputmode:p.value,"aria-invalid":h(a)||void 0,"aria-describedby":f.value,onBlur:b[1]||(b[1]=(...g)=>h(d)&&h(d)(...g))},null,42,eL),[[sy,h(s)]]),h(n).info?(U(),V("p",{key:0,id:i,class:"fb-info",innerHTML:h(n).info},null,8,tL)):be("",!0),h(a)&&!h(n).hideErrorMessage?(U(),V("span",{key:1,id:o,class:"fb-error",role:"alert"},ve(h(n).forceErrorMessage||h(l)),1)):be("",!0)]),h(n).confirmation?(U(),io(ZM,{key:0,"target-name":h(u),name:`${h(r)}_confirmation`,label:h(n).confirmationLabel,type:h(n).type||"text",required:h(n).required,placeholder:h(n).placeholder,inputmode:h(n).inputmode},null,8,["target-name","name","label","type","required","placeholder","inputmode"])):be("",!0)]))}}),rL={class:"fb-field"},iL=["id","name","required","aria-invalid","aria-describedby"],oL=["innerHTML"],sL=["innerHTML"],aL=ot({__name:"FieldCheckbox",props:{field:{}},setup(e){const n=e.field,r=n.save_to||n.name||"field",i=`${r}-error`,o=d9(n.label??"",n.required),{model:s,showError:a,errorMessage:l,handleBlur:c}=Xt({...n,required:!1},n.required?{checked:!0}:{});return(u,d)=>(U(),V("div",rL,[me("label",{class:ut(["fb-choice",{"is-checked":!!h(s)}])},[Et(me("input",{id:h(r),"onUpdate:modelValue":d[0]||(d[0]=f=>_t(s)?s.value=f:null),type:"checkbox",name:h(r),required:h(n).required||void 0,"aria-invalid":h(a)||void 0,"aria-describedby":h(a)?i:void 0,onBlur:d[1]||(d[1]=(...f)=>h(c)&&h(c)(...f))},null,40,iL),[[Em,h(s)]]),me("span",{class:"fb-choice-label",innerHTML:h(o)},null,8,oL)],2),h(n).info?(U(),V("p",{key:0,class:"fb-info",innerHTML:h(n).info},null,8,sL)):be("",!0),h(a)?(U(),V("span",{key:1,id:i,class:"fb-error",role:"alert"},ve(h(n).forceErrorMessage||h(l)),1)):be("",!0)]))}}),lL={class:"fb-field"},cL={class:"fb-label"},uL=["innerHTML"],dL={key:0,class:"fb-required-star"},fL={class:"fb-choice-list"},pL=["name","value","required"],mL=["innerHTML"],_L=["innerHTML"],hL=ot({__name:"FieldRadio",props:{field:{}},setup(e){const n=e.field,r=n.save_to||n.name||"field",i=`${r}-error`,{model:o,showError:s,errorMessage:a,handleBlur:l}=Xt(n),c=pe(()=>(n.options||[]).map(u=>typeof u=="string"?{value:u.toLowerCase(),name:u}:{value:u.value,name:u.name??u.label??u.value}));return(u,d)=>(U(),V("fieldset",lL,[me("legend",cL,[me("span",{innerHTML:h(n).label},null,8,uL),h(n).required?(U(),V("span",dL,"*")):be("",!0)]),me("div",fL,[(U(!0),V(et,null,yn(c.value,(f,p)=>(U(),V("label",{key:p,class:ut(["fb-choice",{"is-checked":h(o)===f.value}])},[Et(me("input",{"onUpdate:modelValue":d[0]||(d[0]=m=>_t(o)?o.value=m:null),type:"radio",name:h(r),value:f.value,required:h(n).required||void 0,onBlur:d[1]||(d[1]=(...m)=>h(l)&&h(l)(...m))},null,40,pL),[[Mu,h(o)]]),me("span",{class:"fb-choice-label",innerHTML:f.name},null,8,mL)],2))),128))]),h(n).info?(U(),V("p",{key:0,class:"fb-info",innerHTML:h(n).info},null,8,_L)):be("",!0),h(s)?(U(),V("span",{key:1,id:i,class:"fb-error",role:"alert"},ve(h(n).forceErrorMessage||h(a)),1)):be("",!0)]))}}),gL={key:0,class:"fb-field fb-field--inline"},yL={class:"fb-label"},bL=["innerHTML"],vL={key:0,class:"fb-required-star"},$L={class:"fb-choice-list fb-choice-list--inline"},SL=["name","value","required"],EL={class:"fb-choice-label"},TL={key:1,class:"fb-field"},wL=["id","name","required"],IL={value:"madame"},AL={value:"monsieur"},xL=ot({__name:"FieldCivilite",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"civilite",i=`${r}-error`,{model:o,showError:s,errorMessage:a,handleBlur:l}=Xt(n),c=pe(()=>!!n.type&&n.type!=="radio"),u=pe(()=>n.LabelMadame||"Madame"),d=pe(()=>n.LabelMonsieur||"Monsieur"),f=pe(()=>[{value:"madame",name:u.value},{value:"monsieur",name:d.value}]);return(p,m)=>c.value?(U(),V("div",TL,[Ne(lt,{"for-id":h(r),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"]),Et(me("select",{id:h(r),"onUpdate:modelValue":m[2]||(m[2]=b=>_t(o)?o.value=b:null),class:ut(["fb-select",{"fb-invalid":h(s)}]),name:h(r),required:h(n).required||void 0,onBlur:m[3]||(m[3]=(...b)=>h(l)&&h(l)(...b))},[m[4]||(m[4]=me("option",{value:""}," ",-1)),me("option",IL,ve(u.value),1),me("option",AL,ve(d.value),1)],42,wL),[[Lu,h(o)]]),h(s)?(U(),V("span",{key:0,id:i,class:"fb-error",role:"alert"},ve(h(n).forceErrorMessage||h(a)),1)):be("",!0)])):(U(),V("fieldset",gL,[me("legend",yL,[me("span",{innerHTML:h(n).label},null,8,bL),h(n).required?(U(),V("span",vL,"*")):be("",!0)]),me("div",$L,[(U(!0),V(et,null,yn(f.value,b=>(U(),V("label",{key:b.value,class:ut(["fb-choice",{"is-checked":h(o)===b.value}])},[Et(me("input",{"onUpdate:modelValue":m[0]||(m[0]=g=>_t(o)?o.value=g:null),type:"radio",name:h(r),value:b.value,required:h(n).required||void 0,onBlur:m[1]||(m[1]=(...g)=>h(l)&&h(l)(...g))},null,40,SL),[[Mu,h(o)]]),me("span",EL,ve(b.name),1)],2))),128))]),h(s)?(U(),V("span",{key:0,id:i,class:"fb-error",role:"alert"},ve(h(n).forceErrorMessage||h(a)),1)):be("",!0)]))}}),CL={class:"fb-field"},kL=["id","name","required","autocomplete"],NL={key:0,value:""},RL=["value"],OL={key:1,class:"fb-subfield"},PL=["id","placeholder"],ML=["innerHTML"],LL=ot({__name:"FieldSelect",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"field",i=`${r}-error`,{model:o,showError:s,errorMessage:a,handleBlur:l,ctx:c}=Xt(n),u=ki(c.locale),d=pe(()=>(n.options||[]).map(g=>typeof g=="string"?{value:g.toLowerCase(),name:g,other:!1}:{value:g.value,name:g.name??g.label??g.value,other:!!g.other})),f=Re(""),p=Re("");Cr(()=>{const g=typeof o.value=="string"?o.value:"",_=g.split(":")[0];if(_&&d.value.length&&!d.value.some(y=>y.value===_)){o.value="";return}if(g.includes(":")){const[y,...T]=g.split(":");f.value=y,p.value=T.join(":")}else n.defaultOptionText||(f.value=g)});const m=pe(()=>d.value.find(g=>g.value===f.value)),b=pe(()=>!!m.value?.other);return dt([f,p],()=>{o.value=b.value?`${f.value}:${p.value}`:f.value}),(g,_)=>(U(),V("div",CL,[h(n).displayLabel!==!1?(U(),io(lt,{key:0,"for-id":h(r),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"])):be("",!0),Et(me("select",{id:h(r),"onUpdate:modelValue":_[0]||(_[0]=y=>f.value=y),class:ut(["fb-select",{"fb-invalid":h(s)}]),name:h(r),required:h(n).required||void 0,autocomplete:h(n).autocomplete,onBlur:_[1]||(_[1]=(...y)=>h(l)&&h(l)(...y))},[h(n).defaultOptionText!==void 0?(U(),V("option",NL,ve(h(n).defaultOptionText),1)):be("",!0),(U(!0),V(et,null,yn(d.value,(y,T)=>(U(),V("option",{key:T,value:y.value},ve(y.name),9,RL))),128))],42,kL),[[Lu,f.value]]),b.value?(U(),V("div",OL,[Ne(lt,{"for-id":`${h(r)}-other`,label:h(u)("select_Précisez")},null,8,["for-id","label"]),Et(me("input",{id:`${h(r)}-other`,"onUpdate:modelValue":_[2]||(_[2]=y=>p.value=y),class:"fb-input",type:"text",placeholder:h(u)("select_Précisez")},null,8,PL),[[sn,p.value]])])):be("",!0),h(n).info?(U(),V("p",{key:2,class:"fb-info",innerHTML:h(n).info},null,8,ML)):be("",!0),h(s)?(U(),V("span",{key:3,id:i,class:"fb-error",role:"alert"},ve(h(a)),1)):be("",!0)]))}}),DL={class:"fb-field"},FL=["id","name","required","autocomplete","placeholder","aria-invalid","aria-describedby"],UL=["innerHTML"],BL=ot({__name:"FieldInputNumber",props:{field:{}},setup(e){const n=e.field,r=n.save_to||n.name||"field",i=`${r}-error`,o=`${r}-info`,{model:s,showError:a,errorMessage:l,controlClass:c,handleBlur:u}=Xt(n);function d(f){const p=f.target;p.value!==""&&Number(p.value)<0&&(s.value=0)}return(f,p)=>(U(),V("div",DL,[Ne(lt,{"for-id":h(r),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"]),Et(me("input",{id:h(r),"onUpdate:modelValue":p[0]||(p[0]=m=>_t(s)?s.value=m:null),class:ut(["fb-input",h(c)]),type:"number",inputmode:"decimal",min:"0",name:h(r),required:h(n).required||void 0,autocomplete:h(n).autocomplete,placeholder:h(n).placeholder,"aria-invalid":h(a)||void 0,"aria-describedby":h(n).info?o:void 0,onInput:d,onBlur:p[1]||(p[1]=(...m)=>h(u)&&h(u)(...m))},null,42,FL),[[sn,h(s),void 0,{number:!0}]]),h(n).info?(U(),V("p",{key:0,id:o,class:"fb-info",innerHTML:h(n).info},null,8,UL)):be("",!0),h(a)?(U(),V("span",{key:1,id:i,class:"fb-error",role:"alert"},ve(h(l)),1)):be("",!0)]))}}),jL={class:"fb-field"},qL=["id","name","rows","required","placeholder","maxlength","aria-invalid","aria-describedby"],zL=["innerHTML"],HL=ot({__name:"FieldTextarea",props:{field:{}},setup(e){const n=e.field,r=n.save_to||n.name||"field",i=`${r}-error`,o=`${r}-info`,{model:s,showError:a,errorMessage:l,controlClass:c,handleBlur:u}=Xt(n),d=pe({get:()=>s.value??"",set:f=>s.value=f});return(f,p)=>(U(),V("div",jL,[Ne(lt,{"for-id":h(r),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"]),Et(me("textarea",{id:h(r),"onUpdate:modelValue":p[0]||(p[0]=m=>d.value=m),class:ut(["fb-textarea",h(c)]),name:h(r),rows:h(n).rows||4,required:h(n).required||void 0,placeholder:h(n).placeholder,maxlength:h(n).maxlength,"aria-invalid":h(a)||void 0,"aria-describedby":h(n).info?o:void 0,onBlur:p[1]||(p[1]=(...m)=>h(u)&&h(u)(...m))},null,42,qL),[[sn,d.value]]),h(n).info?(U(),V("p",{key:0,id:o,class:"fb-info",innerHTML:h(n).info},null,8,zL)):be("",!0),h(a)?(U(),V("span",{key:1,id:i,class:"fb-error",role:"alert"},ve(h(l)),1)):be("",!0)]))}}),VL={class:"fb-field"},WL=["id","name","value","min","max","required","aria-invalid"],GL=["innerHTML"],YL=ot({__name:"FieldDateInput",props:{field:{}},setup(e){const n=e.field,r=n.save_to||n.name||"field",i=`${r}-error`,o=n.min?Un(String(n.min)).format("YYYY-MM-DD"):void 0,s=n.dateMaxToday?Un().format("YYYY-MM-DD"):n.max?Un(String(n.max)).format("YYYY-MM-DD"):void 0,a={};o&&(a.min=o),s&&(a.max=s);const{model:l,showError:c,errorMessage:u,controlClass:d,handleBlur:f}=Xt(n,Object.keys(a).length?{date_range:a}:{}),p=Re("");dt(l,b=>{typeof b=="string"&&/^\d{2}\/\d{2}\/\d{4}$/.test(b)?p.value=b.split("/").reverse().join("-"):typeof b=="string"&&/^\d{4}-\d{2}-\d{2}/.test(b)&&(p.value=b.slice(0,10))},{immediate:!0});function m(b){const g=b.target.value;p.value=g,l.value=g?g.split("-").reverse().join("/"):""}return(b,g)=>(U(),V("div",VL,[Ne(lt,{"for-id":h(r),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"]),me("input",{id:h(r),class:ut(["fb-input",h(d)]),type:"date",name:h(r),value:p.value,min:h(o),max:h(s),required:h(n).required||void 0,"aria-invalid":h(c)||void 0,onInput:m,onBlur:g[0]||(g[0]=(..._)=>h(f)&&h(f)(..._))},null,42,WL),h(n).info?(U(),V("p",{key:0,class:"fb-info",innerHTML:h(n).info},null,8,GL)):be("",!0),h(c)?(U(),V("span",{key:1,id:i,class:"fb-error",role:"alert"},ve(h(n).forceErrorMessage||h(u)),1)):be("",!0)]))}});function f9(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function KL(e){if(Array.isArray(e))return e}function XL(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}function JL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
28
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZL(e,t){return KL(e)||XL(e,t)||QL(e,t)||JL()}function QL(e,t){if(e){if(typeof e=="string")return f9(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f9(e,t):void 0}}const p9=Object.entries,m9=Object.setPrototypeOf,eD=Object.isFrozen,_9=Object.getPrototypeOf,h9=Object.getOwnPropertyDescriptor;let _n=Object.freeze,bn=Object.seal,Ws=Object.create,g9=typeof Reflect<"u"&&Reflect,W0=g9.apply,G0=g9.construct;_n||(_n=function(t){return t}),bn||(bn=function(t){return t}),W0||(W0=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return t.apply(n,i)}),G0||(G0=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return new t(...r)});const Ni=jt(Array.prototype.forEach),tD=jt(Array.prototype.lastIndexOf),y9=jt(Array.prototype.pop),Gl=jt(Array.prototype.push),nD=jt(Array.prototype.slice),rD=jt(Array.prototype.splice),Gs=Array.isArray,Y0=E9(Set),K0=jt(Set.prototype.add),Yl=jt(Set.prototype.has),es=jt(String.prototype.toLowerCase),X0=jt(String.prototype.toString),b9=jt(String.prototype.match),Kl=jt(String.prototype.replace),v9=jt(String.prototype.indexOf),iD=jt(String.prototype.trim),oD=jt(Number.prototype.toString),sD=jt(Boolean.prototype.toString),$9=typeof BigInt>"u"?null:jt(BigInt.prototype.toString),S9=typeof Symbol>"u"?null:jt(Symbol.prototype.toString),Kn=jt(Object.prototype.hasOwnProperty),Xl=jt(Object.prototype.toString),vn=jt(RegExp.prototype.test),Ri=E9(TypeError);function jt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return W0(e,t,r)}}function E9(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return G0(e,n)}}function ft(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:es;if(m9&&m9(e,null),!Gs(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i=="string"){const o=n(i);o!==i&&(eD(t)||(t[r]=o),i=o)}e[i]=!0}return e}function aD(e){for(let t=0;t<e.length;t++)Kn(e,t)||(e[t]=null);return e}function ir(e){const t=Ws(null);for(const r of p9(e)){var n=ZL(r,2);const i=n[0],o=n[1];Kn(e,i)&&(Gs(o)?t[i]=aD(o):o&&typeof o=="object"&&o.constructor===Object?t[i]=ir(o):t[i]=o)}return t}function lD(e){switch(typeof e){case"string":return e;case"number":return oD(e);case"boolean":return sD(e);case"bigint":return $9?$9(e):"0";case"symbol":return S9?S9(e):"Symbol()";case"undefined":return Xl(e);case"function":case"object":{if(e===null)return Xl(e);const t=e,n=hr(t,"toString");if(typeof n=="function"){const r=n(t);return typeof r=="string"?r:Xl(r)}return Xl(e)}default:return Xl(e)}}function hr(e,t){for(;e!==null;){const r=h9(e,t);if(r){if(r.get)return jt(r.get);if(typeof r.value=="function")return jt(r.value)}e=_9(e)}function n(){return null}return n}function cD(e,t){for(;e!==null;){const n=h9(e,t);if(n)return n.get?jt(n.get):null;e=_9(e)}return null}function uD(e){try{return vn(e,""),!0}catch{return!1}}const T9=_n(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),J0=_n(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Z0=_n(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),dD=_n(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Q0=_n(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),fD=_n(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),w9=_n(["#text"]),I9=_n(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),e_=_n(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),A9=_n(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Td=_n(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),pD=bn(/{{[\w\W]*|^[\w\W]*}}/g),mD=bn(/<%[\w\W]*|^[\w\W]*%>/g),_D=bn(/\${[\w\W]*/g),hD=bn(/^data-[\-\w.\u00B7-\uFFFF]+$/),gD=bn(/^aria-[\-\w]+$/),x9=bn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),yD=bn(/^(?:\w+script|data):/i),bD=bn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),vD=bn(/^html$/i),$D=bn(/^[a-z][.\w]*(-[.\w]+)+$/i),t_=bn(/<[/\w!]/g),C9=bn(/<[/\w]/g),SD=bn(/<\/no(script|embed|frames)/i),k9=bn(/\/>/i),en={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},ED=_n(ft({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),TD=function(){return typeof window>"u"?null:window},wD=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(r=n.getAttribute(i));const o="dompurify"+(r?"#"+r:"");try{return t.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},N9=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},_o=function(t,n,r,i){return Kn(t,n)&&Gs(t[n])?ft(i.base?ir(i.base):{},t[n],i.transform):r},n_=function(t,n,r){const i=Kn(t,n)?t[n]:void 0;return i&&typeof i=="object"?ir(i):r()};function R9(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:TD();const t=he=>R9(he);if(t.version="3.4.17",t.removed=[],!e||!e.document||e.document.nodeType!==en.document||!e.Element)return t.isSupported=!1,t;let n=e.document;const r=n,i=r.currentScript;e.DocumentFragment;const o=e.HTMLTemplateElement,s=e.Node,a=e.Element,l=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const c=e.DOMParser,u=e.trustedTypes,d=a.prototype,f=hr(d,"cloneNode"),p=hr(d,"remove"),m=hr(d,"removeAttributeNode"),b=hr(d,"nextSibling"),g=hr(d,"childNodes"),_=hr(d,"parentNode"),y=hr(d,"shadowRoot"),T=hr(d,"attributes"),S=s&&s.prototype?hr(s.prototype,"nodeType"):null,O=s&&s.prototype?hr(s.prototype,"nodeName"):null,N=s&&s.prototype?hr(s.prototype,"ownerDocument"):null,w=function(I){return S?S(I):I.nodeType},D=function(I){return O?O(I):I.nodeName},Y=cD(d,"namespaceURI"),q=function(I){return Y?Y(I):I.namespaceURI};if(typeof o=="function"){const he=n.createElement("template");he.content&&he.content.ownerDocument&&(n=he.content.ownerDocument)}let P,C="",F,R=!1,G=0;const z=function(){if(G>0)throw Ri('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},K=function(I){z(),G++;try{return P.createHTML(I)}finally{G--}},M=function(I){z(),G++;try{return P.createScriptURL(I)}finally{G--}},oe=function(){return R||(F=wD(u,i),R=!0),F},te=n,se=te.implementation,_e=te.createNodeIterator,ce=te.createDocumentFragment,ye=te.getElementsByTagName,Te=r.importNode;let le=N9();t.isSupported=typeof p9=="function"&&typeof _=="function"&&se&&se.createHTMLDocument!==void 0;const ge=pD,Ce=mD,Me=_D,Ue=hD,nt=gD,A=yD,k=bD,X=$D;let ae=x9,ee=null;const re=ft({},[...T9,...J0,...Z0,...Q0,...w9]);let $=null;const v=ft({},[...I9,...e_,...A9,...Td]);let E=Object.seal(Ws(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),x=null,Q=null;const Z=Object.seal(Ws(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ne=!0,xe=!0,Se=!1,J=!0,ie=!1,Be=!0,He=!1,H=!1,W=null,ue=null,Ae=!1,ke=!1,De=!1,Le=!1,bt=!0,Wt=!1;const cn="user-content-";let St=!0,rn=!1,Yt=null,un={},ur=null;const Ba=ft({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let ja=null;const qa=ft({},["audio","video","img","source","image","track"]);let za=null;const sE=ft({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),xp="http://www.w3.org/1998/Math/MathML",Cp="http://www.w3.org/2000/svg",fi="http://www.w3.org/1999/xhtml";let Ha=fi,e1=!1,t1=null;const Vie=ft({},[xp,Cp,fi],X0),aE=_n(["mi","mo","mn","ms","mtext"]);let n1=ft({},aE);const lE=_n(["annotation-xml"]);let r1=ft({},lE);const Wie=ft({},["title","style","font","a","script"]);let eu=null;const Gie=["application/xhtml+xml","text/html"],Yie="text/html";let Zt=null,Va=null;const Kie=n.createElement("form"),cE=function(I){return I instanceof RegExp||I instanceof Function},i1=function(){let I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Va&&Va===I)return;(!I||typeof I!="object")&&(I={}),I=ir(I),eu=Gie.indexOf(I.PARSER_MEDIA_TYPE)===-1?Yie:I.PARSER_MEDIA_TYPE,Zt=eu==="application/xhtml+xml"?X0:es,ee=_o(I,"ALLOWED_TAGS",re,{transform:Zt}),$=_o(I,"ALLOWED_ATTR",v,{transform:Zt}),t1=_o(I,"ALLOWED_NAMESPACES",Vie,{transform:X0}),za=_o(I,"ADD_URI_SAFE_ATTR",sE,{transform:Zt,base:sE}),ja=_o(I,"ADD_DATA_URI_TAGS",qa,{transform:Zt,base:qa}),ur=_o(I,"FORBID_CONTENTS",Ba,{transform:Zt}),x=_o(I,"FORBID_TAGS",ir({}),{transform:Zt}),Q=_o(I,"FORBID_ATTR",ir({}),{transform:Zt}),un=Kn(I,"USE_PROFILES")?I.USE_PROFILES&&typeof I.USE_PROFILES=="object"?ir(I.USE_PROFILES):I.USE_PROFILES:!1,ne=I.ALLOW_ARIA_ATTR!==!1,xe=I.ALLOW_DATA_ATTR!==!1,Se=I.ALLOW_UNKNOWN_PROTOCOLS||!1,J=I.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ie=I.SAFE_FOR_TEMPLATES||!1,Be=I.SAFE_FOR_XML!==!1,He=I.WHOLE_DOCUMENT||!1,ke=I.RETURN_DOM||!1,De=I.RETURN_DOM_FRAGMENT||!1,Le=I.RETURN_TRUSTED_TYPE||!1,Ae=I.FORCE_BODY||!1,bt=I.SANITIZE_DOM!==!1,Wt=I.SANITIZE_NAMED_PROPS||!1,St=I.KEEP_CONTENT!==!1,rn=I.IN_PLACE||!1,ae=uD(I.ALLOWED_URI_REGEXP)?I.ALLOWED_URI_REGEXP:x9,Ha=typeof I.NAMESPACE=="string"?I.NAMESPACE:fi,n1=n_(I,"MATHML_TEXT_INTEGRATION_POINTS",()=>ft({},aE)),r1=n_(I,"HTML_INTEGRATION_POINTS",()=>ft({},lE));const j=n_(I,"CUSTOM_ELEMENT_HANDLING",()=>Ws(null));if(E=Ws(null),Kn(j,"tagNameCheck")&&cE(j.tagNameCheck)&&(E.tagNameCheck=j.tagNameCheck),Kn(j,"attributeNameCheck")&&cE(j.attributeNameCheck)&&(E.attributeNameCheck=j.attributeNameCheck),Kn(j,"allowCustomizedBuiltInElements")&&typeof j.allowCustomizedBuiltInElements=="boolean"&&(E.allowCustomizedBuiltInElements=j.allowCustomizedBuiltInElements),bn(E),ie&&(xe=!1),De&&(ke=!0),un&&(ee=ft({},w9),$=Ws(null),un.html===!0&&(ft(ee,T9),ft($,I9)),un.svg===!0&&(ft(ee,J0),ft($,e_),ft($,Td)),un.svgFilters===!0&&(ft(ee,Z0),ft($,e_),ft($,Td)),un.mathMl===!0&&(ft(ee,Q0),ft($,A9),ft($,Td))),Z.tagCheck=null,Z.attributeCheck=null,Kn(I,"ADD_TAGS")&&(typeof I.ADD_TAGS=="function"?Z.tagCheck=I.ADD_TAGS:Gs(I.ADD_TAGS)&&(ee===re&&(ee=ir(ee)),ft(ee,I.ADD_TAGS,Zt))),Kn(I,"ADD_ATTR")&&(typeof I.ADD_ATTR=="function"?Z.attributeCheck=I.ADD_ATTR:Gs(I.ADD_ATTR)&&($===v&&($=ir($)),ft($,I.ADD_ATTR,Zt))),Kn(I,"ADD_FORBID_CONTENTS")&&Gs(I.ADD_FORBID_CONTENTS)&&(ur===Ba&&(ur=ir(ur)),ft(ur,I.ADD_FORBID_CONTENTS,Zt)),St&&(ee["#text"]=!0),He&&ft(ee,["html","head","body"]),ee.table&&(ft(ee,["tbody"]),delete x.tbody),I.TRUSTED_TYPES_POLICY){if(typeof I.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ri('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof I.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ri('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const de=P;P=I.TRUSTED_TYPES_POLICY;try{C=K("")}catch(fe){throw P=de,fe}}else I.TRUSTED_TYPES_POLICY===null?(P=void 0,C=""):(P===void 0&&(P=oe()),P&&typeof C=="string"&&(C=K("")));_n&&_n(I),Va=I},uE=ft({},[...J0,...Z0,...dD]),dE=ft({},[...Q0,...fD]),Xie=function(I,j,de){return j.namespaceURI===fi?I==="svg":j.namespaceURI===xp?I==="svg"&&(de==="annotation-xml"||n1[de]):!!uE[I]},Jie=function(I,j,de){return j.namespaceURI===fi?I==="math":j.namespaceURI===Cp?I==="math"&&r1[de]:!!dE[I]},Zie=function(I,j,de){return j.namespaceURI===Cp&&!r1[de]||j.namespaceURI===xp&&!n1[de]?!1:!dE[I]&&(Wie[I]||!uE[I])},Qie=function(I){const j=q(I),de=es(D(I)),fe=_(I);let Fe,Ge;return fe&&w(fe)===en.element?(Fe={namespaceURI:q(fe)},Ge=es(D(fe))):(Fe={namespaceURI:Ha},Ge="template"),t1[j]?j===Cp?Xie(de,Fe,Ge):j===xp?Jie(de,Fe,Ge):j===fi?Zie(de,Fe,Ge):!!(eu==="application/xhtml+xml"&&t1[j]):!1},Oo=function(I){Gl(t.removed,{element:I});try{_(I).removeChild(I)}catch{if(p(I),!_(I))throw Ri("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},fE=function(I,j,de){try{m(I,j)}catch{try{I.removeAttribute(de)}catch{}}},o1=function(I){a1(I);const j=g(I);j&&Ni(nD(j),fe=>{try{p(fe)}catch{}});const de=w(I)===en.element?T(I):null;if(de)for(let fe=de.length-1;fe>=0;--fe){const Fe=de[fe],Ge=Fe&&Fe.name;typeof Ge=="string"&&fE(I,Fe,Ge)}},Wa=function(I,j,de){if(!de)try{de=j.getAttributeNode(I)}catch{de=null}Gl(t.removed,{attribute:de||null,from:j});try{de?m(j,de):j.removeAttribute(I)}catch{try{j.removeAttribute(I)}catch{}}if(I==="is")if(ke||De)try{Oo(j)}catch{}else try{j.setAttribute(I,"")}catch{}},pE=function(I){const j=T(I);if(j)for(let de=j.length-1;de>=0;--de){const fe=j[de],Fe=fe&&fe.name;typeof Fe!="string"||$[Zt(Fe)]||fE(I,fe,Fe)}},s1=function(I,j){let de=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const fe=[I];for(;fe.length>0;){const Fe=fe.pop();if(j(Fe)===!1)continue;if(de&&w(Fe)===en.element){const rt=y(Fe);Po(rt)&&fe.push(rt)}const Ge=g(Fe);if(Ge)for(let rt=Ge.length-1;rt>=0;--rt)fe.push(Ge[rt])}},a1=function(I){s1(I,j=>{w(j)===en.element&&pE(j)})},l1=function(I){const j=[];return s1(I,de=>{j.push(de)},!0),j},eoe=function(I,j){const de=Y0();Ni(l1(I),fe=>{w(fe)===en.element&&K0(de,fe)}),Ni(j,fe=>{w(fe)===en.element&&!Yl(de,fe)&&pE(fe)})},mE=function(I,j){let de=!1;return Ni(t.removed,fe=>{fe.element&&(de=de||fe.element===I,a1(fe.element))}),eoe(I,j),de},toe=8,noe=function(I,j){const de=Yt;let fe=null;const Fe=()=>(fe||(fe=Y0(),Ni(j,Ge=>{K0(fe,Ge)})),fe);for(let Ge=0;;Ge++){const rt=l1(I),dn=[I];let pi=!1;if(Ni(rt,Vn=>{w(Vn)===en.documentFragment?Gl(dn,Vn):!pi&&!Yl(de,Vn)&&(pi=Yl(Fe(),Vn))}),!pi)return;if(Ge>=toe)throw Ri("the tree kept changing during in-place sanitization; refusing to return it");Ni(dn,(Vn,Zn)=>{roe(Vn,Zn>0,I,Fe())})}},roe=function(I,j,de,fe){const Fe=c1(I);let Ge;for(;Ge=Fe.nextNode();)!Yl(fe,Ge)||Yl(Yt,Ge)||(j&&zr(le.uponSanitizeShadowNode,Ge,null),d1(Ge,de),f1(Ge,de),Po(Ge.content)&&nu(Ge.content))},ioe=function(I){Yt&&K0(Yt,I)},_E=function(I,j){return Be?I==="patchsrc"?!0:I==="for"&&j!=="label"&&j!=="output":!1},ooe=function(I){Be&&s1(I,j=>{const de=w(j);if(de===en.processingInstruction||de===en.comment&&vn(C9,j.data)){try{p(j)}catch{}return!1}if(de===en.element){const fe=j,Fe=Zt(D(j));try{fe.hasAttribute&&fe.hasAttribute("patchsrc")&&fe.removeAttribute("patchsrc"),fe.hasAttribute&&fe.hasAttribute("for")&&_E("for",Fe)&&fe.removeAttribute("for")}catch{}}return!0})},hE=function(I){let j=null,de=null;if(Ae)I="<remove></remove>"+I;else{const Ge=b9(I,/^[\r\n\t ]+/);de=Ge&&Ge[0]}eu==="application/xhtml+xml"&&Ha===fi&&(I='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+I+"</body></html>");const fe=P?K(I):I;if(Ha===fi)try{j=new c().parseFromString(fe,eu)}catch{}if(!j||!j.documentElement){j=se.createDocument(Ha,"template",null);try{j.documentElement.innerHTML=e1?C:fe}catch{}}const Fe=j.body||j.documentElement;return I&&de&&Fe.insertBefore(n.createTextNode(de),Fe.childNodes[0]||null),Ha===fi?ye.call(j,He?"html":"body")[0]:He?j.documentElement:Fe},c1=function(I){const j=N?N(I):I.ownerDocument;return _e.call(j||I,I,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},kp=function(I){return I=Kl(I,ge," "),I=Kl(I,Ce," "),I=Kl(I,Me," "),I},u1=function(I){var j;gE(I);const de=(j=I.querySelectorAll)===null||j===void 0?void 0:j.call(I,"template");de&&Ni(de,fe=>{Po(fe.content)&&u1(fe.content)})},gE=function(I){I.normalize();const j=N?N(I):I.ownerDocument,de=_e.call(j||I,I,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let fe=de.nextNode();for(;fe;)fe.data=kp(fe.data),fe=de.nextNode()},Np=function(I){const j=O?O(I):null;return typeof j!="string"||Zt(j)!=="form"?!1:typeof I.nodeName!="string"||typeof I.textContent!="string"||typeof I.removeChild!="function"||I.attributes!==T(I)||typeof I.removeAttribute!="function"||typeof I.removeAttributeNode!="function"||typeof I.getAttributeNode!="function"||typeof I.setAttribute!="function"||typeof I.namespaceURI!="string"||typeof I.insertBefore!="function"||typeof I.hasChildNodes!="function"||I.nodeType!==S(I)||I.childNodes!==g(I)},Po=function(I){if(!S||typeof I!="object"||I===null)return!1;try{return S(I)===en.documentFragment}catch{return!1}},tu=function(I){if(!S||typeof I!="object"||I===null)return!1;try{return typeof S(I)=="number"}catch{return!1}};function zr(he,I,j){he.length!==0&&Ni(he,de=>{de.call(t,I,j,Va)})}const soe=function(I,j){return!!(Be&&I.hasChildNodes()&&!tu(I.firstElementChild)&&vn(t_,I.textContent)&&vn(t_,I.innerHTML)||Be&&ED[j]&&w(I)===en.element&&q(I)===fi&&(tu(I.firstElementChild)||typeof I.textContent=="string"&&vn(t_,I.textContent))||I.nodeType===en.processingInstruction||Be&&I.nodeType===en.comment&&vn(C9,I.data))},Rp=function(I,j){if(I instanceof RegExp)return vn(I,j);if(I instanceof Function){for(var de=arguments.length,fe=new Array(de>2?de-2:0),Fe=2;Fe<de;Fe++)fe[Fe-2]=arguments[Fe];return!!I(j,...fe)}return!1},aoe=function(I,j,de){if(!x[j]&&vE(j)&&Rp(E.tagNameCheck,j))return!1;if(St&&!ur[j]&&!ur[es(j)]){const fe=_(I),Fe=g(I);if(Fe&&fe){const Ge=Fe.length;for(let rt=Ge-1;rt>=0;--rt){const dn=I===de?f(Fe[rt],!0):Fe[rt];fe.insertBefore(dn,b(I))}}}return Oo(I),!0},yE=function(I,j,de,fe){return I.length===0?j:j===de||j===fe?ir(j):j},Ga=function(I,j){return I===j||_(I)!==null?!1:(rn&&a1(I),!0)},d1=function(I,j){if(ioe(I),zr(le.beforeSanitizeElements,I,null),Ga(I,j))return!0;if(Np(I))return Oo(I),!0;const de=Zt(D(I));if(ee=yE(le.uponSanitizeElement,ee,re,W),zr(le.uponSanitizeElement,I,{tagName:de,allowedTags:ee}),Ga(I,j))return!0;if(soe(I,de))return Oo(I),!0;if(x[de]||!(Z.tagCheck instanceof Function&&Z.tagCheck(de))&&!ee[de]){const fe=aoe(I,de,j);return fe===!1&&(zr(le.afterSanitizeElements,I,null),Ga(I,j))?!0:fe}if(w(I)===en.element&&!Qie(I)||(de==="noscript"||de==="noembed"||de==="noframes")&&vn(SD,I.innerHTML))return Oo(I),!0;if(ie&&I.nodeType===en.text){const fe=kp(I.textContent);I.textContent!==fe&&(Gl(t.removed,{element:I.cloneNode()}),I.textContent=fe)}return zr(le.afterSanitizeElements,I,null),Ga(I,j)},bE=function(I,j,de){if(Q[j]||_E(j,I)||bt&&(j==="id"||j==="name")&&(de in n||de in Kie))return!1;const fe=$[j]||Z.attributeCheck instanceof Function&&Z.attributeCheck(j,I);return xe&&vn(Ue,j)||ne&&vn(nt,j)?!0:fe?za[j]||vn(ae,Kl(de,k,""))||(j==="src"||j==="xlink:href"||j==="href")&&I!=="script"&&v9(de,"data:")===0&&ja[I]||Se&&!vn(A,Kl(de,k,""))?!0:!de:vE(I)&&Rp(E.tagNameCheck,I)&&Rp(E.attributeNameCheck,j,I)||j==="is"&&E.allowCustomizedBuiltInElements&&Rp(E.tagNameCheck,de)},loe=ft({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),vE=function(I){return!loe[es(I)]&&vn(X,I)},coe=function(I,j,de,fe){if(P&&typeof u=="object"&&typeof u.getAttributeType=="function"&&!de)switch(u.getAttributeType(I,j)){case"TrustedHTML":return K(fe);case"TrustedScriptURL":return M(fe)}return fe},uoe=function(I,j,de,fe){try{return de?I.setAttributeNS(de,j,fe):I.setAttribute(j,fe),Np(I)?(Oo(I),!1):!0}catch{return Wa(j,I),!1}},$E=function(I,j){return Be&&vn(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,j)?!0:es(I)==="attributename"&&b9(j,"href")!==null},f1=function(I,j){if(zr(le.beforeSanitizeAttributes,I,null),Ga(I,j))return;const de=I.attributes;if(!de||Np(I))return;$=yE(le.uponSanitizeAttribute,$,v,ue);const fe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:$,forceKeepAttr:void 0};let Fe=de.length;const Ge=Zt(I.nodeName);for(;Fe--;){const rt=de[Fe],dn=rt.name,pi=rt.namespaceURI,Vn=rt.value,Zn=Zt(dn),Ya=Vn;let Qn=dn==="value"?Ya:iD(Ya),SE=!1;if(fe.attrName=Zn,fe.attrValue=Qn,fe.keepAttr=!0,fe.forceKeepAttr=void 0,zr(le.uponSanitizeAttribute,I,fe),Qn=fe.attrValue,Wt&&(Zn==="id"||Zn==="name")&&v9(Qn,cn)!==0&&(Wa(dn,I,rt),Qn=cn+Qn,SE=!0),$E(dn,Qn)){Wa(dn,I,rt);continue}if(!fe.forceKeepAttr){if(!fe.keepAttr){Wa(dn,I,rt);continue}if(!J&&vn(k9,Qn)){Wa(dn,I,rt);continue}if(ie&&(Qn=kp(Qn)),!bE(Ge,Zn,Qn)){Wa(dn,I,rt);continue}Qn=coe(Ge,Zn,pi,Qn),Qn!==Ya&&uoe(I,dn,pi,Qn)&&SE&&y9(t.removed)}}zr(le.afterSanitizeAttributes,I,null),Ga(I,j)},nu=function(I){let j=null;const de=c1(I);for(zr(le.beforeSanitizeShadowDOM,I,null);j=de.nextNode();)if(zr(le.uponSanitizeShadowNode,j,null),d1(j,I),f1(j,I),Po(j.content)&&nu(j.content),w(j)===en.element){const fe=y(j);Po(fe)&&(p1(fe),nu(fe))}ie&&gE(I),zr(le.afterSanitizeShadowDOM,I,null)},p1=function(I){const j=[{node:I,shadow:null}];for(;j.length>0;){const de=j.pop();if(de.shadow){nu(de.shadow);continue}const fe=de.node,Fe=w(fe)===en.element,Ge=g(fe);if(Ge)for(let rt=Ge.length-1;rt>=0;--rt)j.push({node:Ge[rt],shadow:null});if(Fe){const rt=O?O(fe):null;if(typeof rt=="string"&&Zt(rt)==="template"){const dn=fe.content;Po(dn)&&j.push({node:dn,shadow:null})}}if(Fe){const rt=y(fe);Po(rt)&&j.push({node:null,shadow:rt},{node:rt,shadow:null})}}};return t.sanitize=function(he){let I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},j=null,de=null,fe=null,Fe=null;if(e1=!he,e1&&(he="<!-->"),typeof he!="string"&&!tu(he)&&(he=lD(he),typeof he!="string"))throw Ri("dirty is not a string, aborting");if(!t.isSupported)return he;H?(ee=W,$=ue):i1(I),(le.uponSanitizeElement.length>0||le.uponSanitizeAttribute.length>0)&&(ee=ir(ee)),le.uponSanitizeAttribute.length>0&&($=ir($)),t.removed=[];const Ge=rn&&typeof he!="string"&&tu(he);let rt=[];const dn=Yt;if(Ge){ooe(he);const Zn=D(he);if(typeof Zn=="string"){const Ya=Zt(Zn);if(!ee[Ya]||x[Ya])throw o1(he),Ri("root node is forbidden and cannot be sanitized in-place")}if(Np(he))throw o1(he),Ri("root node is clobbered and cannot be sanitized in-place");rt=l1(he),Yt=Y0()}else if(tu(he))j=hE("<!---->"),de=j.ownerDocument.importNode(he,!0),de.nodeType===en.element&&de.nodeName==="BODY"||de.nodeName==="HTML"?j=de:j.appendChild(de),p1(j);else{if(!ke&&!ie&&!He&&he.indexOf("<")===-1)return P&&Le?K(he):he;if(j=hE(he),!j)return ke?null:Le?C:""}j&&Ae&&Oo(j.firstChild);const pi=Ge?he:j;try{Ge&&p1(he);const Zn=c1(pi);for(;fe=Zn.nextNode();)d1(fe,pi),f1(fe,pi),Po(fe.content)&&nu(fe.content);Ge&&noe(he,rt)}catch(Zn){throw Ge&&(o1(he),mE(he,rt)),Zn}finally{Yt=dn}if(Ge){if(mE(he,rt))throw Ri("a node selected for removal could not be safely returned; refusing to sanitize in place");return ie&&u1(he),he}if(ke){if(ie&&u1(j),De)for(Fe=ce.call(j.ownerDocument);j.firstChild;)Fe.appendChild(j.firstChild);else Fe=j;return($.shadowroot||$.shadowrootmode)&&(Fe=Te.call(r,Fe,!0)),Fe}let Vn=He?j.outerHTML:j.innerHTML;return He&&ee["!doctype"]&&j.ownerDocument&&j.ownerDocument.doctype&&j.ownerDocument.doctype.name&&vn(vD,j.ownerDocument.doctype.name)&&(Vn="<!DOCTYPE "+j.ownerDocument.doctype.name+`>
|
|
29
|
-
`+Vn),ie&&(Vn=kp(Vn)),P&&Le?K(Vn):Vn},t.setConfig=function(){let he=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};i1(he),H=!0,W=ee,ue=$},t.clearConfig=function(){Va=null,H=!1,W=null,ue=null,P=F,C=""},t.isValidAttribute=function(he,I,j){Va||i1({});const de=Zt(he),fe=Zt(I);return typeof j=="string"&&($E(I,j)||!J&&vn(
|
|
30
|
-
`).filter(Boolean):[];return u.length?`<ul>${u.map(d=>`<li>${wd(d)}</li>`).join("")}</ul>`:wd(c)}if(l==="amount_to_refund"){const c=r.amount_to_refund;if(typeof c!="number")return wd(c);const u=c/100;return u%1===0?u.toString():u.toLocaleString("fr-FR",{minimumFractionDigits:2,maximumFractionDigits:2})}return wd(r[l])}));return(o,s)=>(U(),V("div",{class:"fb-blochtml",innerHTML:i.value},null,8,OD))}});const PD=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();var Id={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const MD=({size:e,strokeWidth:t=2,absoluteStrokeWidth:n,color:r,iconNode:i,name:o,class:s,...a},{slots:l})=>qo("svg",{...Id,width:e||Id.width,height:e||Id.height,stroke:r||Id.stroke,"stroke-width":n?Number(t)*24/Number(e):t,class:["lucide",`lucide-${PD(o??"icon")}`],...a},[...i.map(c=>qo(...c)),...l.default?[l.default()]:[]]);const Oi=(e,t)=>(n,{slots:r})=>qo(MD,{...n,iconNode:t,name:e},r);const r_=Oi("CheckIcon",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const LD=Oi("ChevronDownIcon",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const DD=Oi("CloudUploadIcon",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);const FD=Oi("MinusIcon",[["path",{d:"M5 12h14",key:"1ays0h"}]]);const P9=Oi("PlusIcon",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const i_=Oi("Trash2Icon",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);const UD=Oi("TriangleAlertIcon",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const M9=Oi("UploadIcon",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);const L9=Oi("XIcon",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),BD={class:"fb-field"},jD=["name","required","placeholder","aria-invalid"],qD={key:0,class:"fb-error",role:"alert"},D9=ot({__name:"FieldIbanHolder",props:{label:{},placeholder:{},required:{type:Boolean}},setup(e){const t=e,{form:n}=mo(),{value:r,errorMessage:i,meta:o,handleBlur:s}=Vo(t.label,t.required?{required:!0}:{},{initialValue:n.iban_holder??""});dt(r,l=>{n.iban_holder=l},{immediate:!0});const a=pe(()=>!!i.value&&(o.touched||o.dirty));return(l,c)=>(U(),V("div",BD,[Ne(lt,{"for-id":"iban_holder",label:e.label,required:e.required},null,8,["label","required"]),Et(me("input",{id:"iban_holder","onUpdate:modelValue":c[0]||(c[0]=u=>_t(r)?r.value=u:null),class:ut(["fb-input",{"fb-invalid":a.value}]),type:"text",name:e.label,required:e.required||void 0,placeholder:e.placeholder,"aria-invalid":a.value||void 0,onBlur:c[1]||(c[1]=(...u)=>h(s)&&h(s)(...u))},null,42,jD),[[sn,h(r)]]),a.value?(U(),V("span",qD,ve(h(i)),1)):be("",!0)]))}}),zD={class:"fb-field"},HD={class:"fb-iban-title"},VD=["id","name","value","placeholder","required","aria-invalid"],WD={key:1,class:"fb-iban-warning"},GD=["innerHTML"],YD=ot({__name:"FieldIban",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"iban",i=`${r}-error`,o=n.acceptedCountries||[],s={iban:!0};o.length&&(s.countryiban=o);const{model:a,showError:l,errorMessage:c,controlClass:u,handleBlur:d,ctx:f}=Xt(n,s),p=ki(f.locale);function m(b){a.value=kM(b.target.value)}return(b,g)=>(U(),V("div",zD,[h(n).disableHolderField?be("",!0):(U(),V(et,{key:0},[me("h3",HD,ve(h(n).sectionTitle||h(p)("iban_section_title")),1),Ne(D9,{label:h(n).holderLabel||h(p)("iban_holder"),placeholder:h(n).holderPlaceholder||"Nom et prénom ou société",required:h(n).required},null,8,["label","placeholder","required"])],64)),Ne(lt,{"for-id":h(r),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"]),me("input",{id:h(r),class:ut(["fb-input",h(u)]),type:"text",name:h(r),value:h(a),autocomplete:"off",spellcheck:"false",placeholder:h(n).placeholder,required:h(n).required||void 0,"aria-invalid":h(l)||void 0,onInput:m,onBlur:g[0]||(g[0]=(..._)=>h(d)&&h(d)(..._))},null,42,VD),h(n).disableHolderField?be("",!0):(U(),V("div",WD,[Ne(h(UD),{size:20,"aria-hidden":"true"}),me("p",null,ve(h(p)("iban_warning")),1)])),h(n).info?(U(),V("p",{key:2,class:"fb-info",innerHTML:h(n).info},null,8,GD)):be("",!0),h(l)?(U(),V("span",{key:3,id:i,class:"fb-error",role:"alert"},ve(h(n).forceErrorMessage||h(c)),1)):be("",!0)]))}}),o_=e=>e.accept&&e.allowDataFiles?`${e.accept},.csv,.json`:e.accept||"",s_=(e,t)=>{if(t)return t;const n=e.match(/\/f\/[0-9a-f]{24}\/[\w-]+\.(\w+)$/);return n?`document.${n[1]}`:decodeURI(e.split("/").slice(-1)[0])},KD={class:"fb-field"},XD={key:0,class:"fb-file-status"},JD={key:1,class:"fb-file-link"},ZD=["href"],QD=["aria-label"],eF={key:0,class:"fb-file-btn"},tF=["innerHTML"],nF=["id","name","accept","required"],rF=["id","name","accept","required","aria-invalid"],iF={key:2,class:"fb-file-selected"},oF=["innerHTML"],sF=ot({__name:"FieldFile",props:{field:{}},setup(e){const n=e.field,r=o_(n),i=n.save_to||"file",o=`${i}-error`,s=n.sizeMax??2560,{model:a,showError:l,errorMessage:c,handleBlur:u,ctx:d}=Xt(n),f=ki(d.locale),p=Re(null),m=Re(!1),b=Re(""),g=pe(()=>typeof a.value=="string"&&a.value.startsWith("http")),_=pe(()=>typeof a.value=="string"&&a.value.startsWith("data:"));function y(w){d.bus.emit("show-popup",{title:n.label||"Fichier",message:w})}function T(w){if(!r)return!0;const D=String(r).split(",").map(q=>q.trim().toLowerCase().replace(/^\./,"")).filter(Boolean);if(!D.length)return!0;const Y=w.toLowerCase().match(/\.([^.\s]+)\s*$/)?.[1];return!!Y&&D.includes(Y)}async function S(w){const D=w.target.files?.[0];if(!D)return;if(!T(D.name)){p.value&&(p.value.value=""),y(f("file_format_not_accepted",{formats:r}));return}if(D.size>s*1e3){p.value&&(p.value.value=""),y(f("file_max_size_error"));return}if(D.name.toLowerCase().endsWith(".heic")){p.value&&(p.value.value=""),y(f("file_heic_error"));return}if(b.value=D.name,d.privateUploads.value){await O(D);return}const Y=new FileReader;Y.onloadend=async()=>{const q=Y.result;if(n.isDirectUpload)try{m.value=!0;const{data:P}=await mt.post(`${d.server}/api/v2/submissions/upload`,{b64file:q,filename:D.name,operationId:d.operationId.value,save_to:n.save_to});a.value=P.url}catch(P){a.value="",p.value&&(p.value.value="");const C=P.response?.data?.errors?.[0];y(C||f("file_upload_failed")),rr(P,{where:"FieldFile.upload",save_to:n.save_to})}finally{m.value=!1}else a.value=q;u()},Y.readAsDataURL(D)}async function O(w){try{m.value=!0,a.value=await d.api.uploadPrivateFile(d.formId,n.save_to||"",w)}catch(D){a.value="",p.value&&(p.value.value="");const Y=D.response?.data?.errors?.[0];y(Y||f("file_upload_failed")),rr(D,{where:"FieldFile.uploadPrivate",save_to:n.save_to})}finally{m.value=!1}u()}function N(){a.value="",b.value="",p.value&&(p.value.value="")}return(w,D)=>(U(),V("div",KD,[Ne(lt,{"for-id":h(i),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"]),m.value?(U(),V("div",XD,ve(h(f)("multiple_file_upload_en_cours"))+"… ",1)):g.value?(U(),V("div",JD,[me("a",{href:String(h(a)),target:"_blank",rel:"noopener"},ve(h(s_)(String(h(a)),b.value)),9,ZD),me("button",{type:"button",class:"fb-file-delete","aria-label":h(f)("file_delete"),onClick:N},[Ne(h(L9),{size:16})],8,QD)])):be("",!0),!m.value&&!g.value?(U(),V(et,{key:2},[h(n).isButtonUpload?(U(),V("label",eF,[Ne(h(M9),{size:18}),me("span",{innerHTML:h(n).buttonUploadLabel||h(f)("file_upload_button")},null,8,tF),me("input",{id:h(i),ref_key:"inputRef",ref:p,type:"file",class:"fb-file-hidden",name:h(i),accept:h(r),required:!h(a)&&h(n).required?!0:void 0,onChange:S,onBlur:D[0]||(D[0]=(...Y)=>h(u)&&h(u)(...Y))},null,40,nF)])):(U(),V("input",{key:1,id:h(i),ref_key:"inputRef",ref:p,type:"file",class:"fb-file-input",name:h(i),accept:h(r),required:!h(a)&&h(n).required?!0:void 0,"aria-invalid":h(l)||void 0,onChange:S,onBlur:D[1]||(D[1]=(...Y)=>h(u)&&h(u)(...Y))},null,40,rF)),_.value?(U(),V("span",iF,[In(ve(h(f)("file_selected")),1),b.value?(U(),V(et,{key:0},[In(" — "+ve(b.value),1)],64)):be("",!0)])):be("",!0)],64)):be("",!0),h(n).info?(U(),V("p",{key:3,class:"fb-info",innerHTML:h(n).info},null,8,oF)):be("",!0),h(l)?(U(),V("span",{key:4,id:o,class:"fb-error",role:"alert"},ve(h(c)),1)):be("",!0)]))}});function aF(e){const t=(e||"").replace(/[^\dAB]/gi,"").toUpperCase().slice(0,15),n=[1,2,2,2,3,3,2],r=[];let i=0;for(const o of n){if(i>=t.length)break;r.push(t.slice(i,i+o)),i+=o}return r.join(" ")}const lF={class:"fb-field"},cF=["id","name","value","placeholder","required","aria-invalid"],uF=["innerHTML"],dF=ot({__name:"FieldSecuriteSociale",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"ssn",i=`${r}-error`,{model:o,showError:s,errorMessage:a,controlClass:l,handleBlur:c}=Xt(n,{securitesocialefr:!0});function u(d){o.value=aF(d.target.value)}return(d,f)=>(U(),V("div",lF,[Ne(lt,{"for-id":h(r),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"]),me("input",{id:h(r),class:ut(["fb-input",h(l)]),type:"text",inputmode:"numeric",name:h(r),value:h(o),placeholder:h(n).placeholder||"1 23 45 67 890 123 45",required:h(n).required||void 0,"aria-invalid":h(s)||void 0,onInput:u,onBlur:f[0]||(f[0]=(...p)=>h(c)&&h(c)(...p))},null,42,cF),h(n).info?(U(),V("p",{key:0,class:"fb-info",innerHTML:h(n).info},null,8,uF)):be("",!0),h(s)?(U(),V("span",{key:1,id:i,class:"fb-error",role:"alert"},ve(h(a)),1)):be("",!0)]))}}),fF={class:"fb-field"},pF=["id","name","placeholder","required","aria-invalid"],mF=ot({__name:"FieldDevise",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"devise",i=`${r}-error`,{model:o,showError:s,errorMessage:a,controlClass:l,handleBlur:c}=Xt(n,{min_value:0}),u=pe({get:()=>{const d=Number(o.value);return d?d/100:""},set:d=>{const f=Math.round(parseFloat(String(d))*100);o.value=Number.isNaN(f)?0:f}});return(d,f)=>(U(),V("div",fF,[Ne(lt,{"for-id":h(r),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"]),Et(me("input",{id:h(r),"onUpdate:modelValue":f[0]||(f[0]=p=>u.value=p),class:ut(["fb-input",h(l)]),type:"number",step:"0.01",inputmode:"decimal",name:h(r),placeholder:h(n).placeholder,required:h(n).required||void 0,"aria-invalid":h(s)||void 0,onBlur:f[1]||(f[1]=(...p)=>h(c)&&h(c)(...p))},null,42,pF),[[sn,u.value]]),h(s)?(U(),V("span",{key:0,id:i,class:"fb-error",role:"alert"},ve(h(n).forceErrorMessage||h(a)),1)):be("",!0)]))}});function a_(e){const t=(e||"").replace(/\D/g,"").slice(0,13);return t.length<=1?t:[t.slice(0,1),t.slice(1,7),t.slice(7,13)].filter(Boolean).join(" ")}const _F={class:"fb-field"},hF=["id","name","value","placeholder","required","aria-invalid"],gF={key:0,class:"fb-ean-ok"},yF=["innerHTML"],bF=ot({__name:"FieldEan",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"ean",i=`${r}-error`,o=pe(()=>(n.options||[]).map(y=>typeof y=="string"?{value:y,label:y}:{value:y.value,label:y.label??y.name??y.value})),s=pe(()=>o.value.length>0),a=pe(()=>o.value.map(y=>a_(y.label))),l={};s.value&&(l.one_of=a.value);const{model:c,showError:u,errorMessage:d,controlClass:f,handleBlur:p,setValue:m}=Xt(n,l),b=Re(a_(String(c.value??""))),g=Re(null);function _(y){b.value=a_(y.target.value);const T=b.value.replace(/\D/g,"");if(s.value){m(b.value);const S=o.value.find(O=>O.label.replace(/\D/g,"")===T);g.value=S?S.value:null}else m(T.length===13?T:""),g.value=null}return(y,T)=>(U(),V("div",_F,[Ne(lt,{"for-id":h(r),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"]),me("input",{id:h(r),class:ut(["fb-input",h(f)]),type:"text",inputmode:"numeric",name:h(r),value:b.value,placeholder:h(n).placeholder,required:h(n).required||void 0,"aria-invalid":h(u)||void 0,onInput:_,onBlur:T[0]||(T[0]=(...S)=>h(p)&&h(p)(...S))},null,42,hF),g.value?(U(),V("span",gF,[Ne(h(r_),{size:16}),In(" "+ve(g.value),1)])):be("",!0),h(n).info?(U(),V("p",{key:1,class:"fb-info",innerHTML:h(n).info},null,8,yF)):be("",!0),h(u)?(U(),V("span",{key:2,id:i,class:"fb-error",role:"alert"},ve(h(n).forceErrorMessage||h(d)),1)):be("",!0)]))}}),vF={class:"fb-field"},$F=["id","name","value","placeholder","required","disabled","autocomplete","aria-invalid"],SF={key:0,class:"fb-phone-verif","aria-live":"polite"},EF={key:0,class:"fb-phone-verified"},TF={class:"fb-phone-code"},wF=["onKeydown"],IF=["disabled"],AF={key:1,class:"fb-info"},xF=["disabled"],CF=["innerHTML"],kF={key:3,class:"fb-error",role:"alert"},NF=60,RF=ot({__name:"FieldPhone",props:{field:{}},emits:["phone-verification"],setup(e,{emit:t}){const n=e,r=t,i=n.field,o=i.save_to||"phone",s=`${o}-error`,{model:a,showError:l,errorMessage:c,controlClass:u,handleBlur:d,ctx:f}=Xt(i,{phone:{phoneType:i.phoneType||"both",defaultCountry:i.defaultCountry,acceptedCountries:i.acceptedCountries||[]}});function p(C){const F=C.target.value,R=jv(F);a.value=new pd(i.defaultCountry).input(R)}const m=Re(""),b=Re(""),g=Re("idle"),_=Re(!1),y=Re(0);let T;const S=pe(()=>{const C=y.value;return`${Math.floor(C/60)}:${String(C%60).padStart(2,"0")}`});function O(){y.value=NF,clearInterval(T),T=setInterval(()=>{y.value>0?y.value--:clearInterval(T)},1e3)}function N(){return{formulaireId:f.formId,field:i.save_to,phone:a.value,email:f.phoneVerificationEmail.value,url:window.location.href,testmode:f.testmode.value}}function w(C){return mt.isAxiosError(C)?C.response?.data?.message:void 0}function D(C){_.value=!0,clearInterval(T),r("phone-verification",{save_to:i.save_to,verified:!0,token:C,phone:a.value})}async function Y(){b.value="",g.value="sending";try{const{data:C}=await mt.post(`${f.server}/api/v2/phone-verification/request`,N());if(C.alreadyVerified){D();return}C.devCode&&console.info("[phone-verification] code:",C.devCode),g.value="codeSent",O()}catch(C){g.value="idle",b.value=w(C)||"L’envoi du code a échoué, veuillez réessayer.",rr(C,{where:"FieldPhone.request",save_to:i.save_to})}}async function q(){b.value="";try{const{data:C}=await mt.post(`${f.server}/api/v2/phone-verification/verify`,{...N(),code:m.value});D(C.token)}catch(C){b.value=w(C)||"Code incorrect, veuillez réessayer.",rr(C,{where:"FieldPhone.verify",save_to:i.save_to})}}function P(){m.value=m.value.replace(/\D/g,"").slice(0,6)}return ks(()=>clearInterval(T)),(C,F)=>(U(),V("div",vF,[Ne(lt,{"for-id":h(o),label:h(i).label,required:h(i).required},null,8,["for-id","label","required"]),me("input",{id:h(o),class:ut(["fb-input",h(u)]),type:"tel",inputmode:"tel",name:h(o),value:h(a),placeholder:h(i).placeholder,required:h(i).required||void 0,disabled:_.value,autocomplete:h(i).autocomplete?"tel":void 0,"aria-invalid":h(l)||void 0,onInput:p,onBlur:F[0]||(F[0]=(...R)=>h(d)&&h(d)(...R))},null,42,$F),h(i).phoneVerificationSms?(U(),V("div",SF,[_.value?(U(),V("span",EF,[Ne(h(r_),{size:16}),F[2]||(F[2]=In(" Numéro validé ",-1))])):g.value==="codeSent"?(U(),V(et,{key:1},[me("div",TF,[Et(me("input",{"onUpdate:modelValue":F[1]||(F[1]=R=>m.value=R),class:"fb-input",type:"text",inputmode:"numeric",autocomplete:"one-time-code",maxlength:"6",placeholder:"Code reçu par SMS",onInput:P,onKeydown:Fu(zo(q,["prevent"]),["enter"])},null,40,wF),[[sn,m.value]]),me("button",{type:"button",class:"fb-button fb-button--primary",disabled:m.value.length!==6,onClick:q}," Vérifier ",8,IF)]),F[3]||(F[3]=me("span",{class:"fb-info"}," Pensez à vérifier la réception de votre code dans vos spams SMS. ",-1)),y.value===0?(U(),V("button",{key:0,type:"button",class:"fb-button fb-button--ghost",onClick:Y}," Renvoyer le code ")):(U(),V("span",AF,"Renvoyer dans "+ve(S.value),1))],64)):(U(),V("button",{key:2,type:"button",class:"fb-button fb-button--primary",disabled:g.value==="sending"||!h(a),onClick:Y},ve(g.value==="sending"?"Envoi…":"Valider mon numéro"),9,xF))])):be("",!0),h(i).info?(U(),V("p",{key:1,class:"fb-info",innerHTML:h(i).info},null,8,CF)):be("",!0),h(l)?(U(),V("span",{key:2,id:s,class:"fb-error",role:"alert"},ve(h(c)),1)):be("",!0),b.value?(U(),V("span",kF,ve(b.value),1)):be("",!0)]))}});let Ad=null;function OF(e,t="fr"){return typeof window>"u"||window.google?.maps?.places?Promise.resolve():Ad||(Ad=new Promise((r,i)=>{const o="__houstonGoogleMapsLoaded";window[o]=()=>{window.google.maps.importLibrary("places").then(()=>r(),i)};const s=document.createElement("script");s.src=`https://maps.googleapis.com/maps/api/js?key=${encodeURIComponent(e)}&libraries=places&language=${t}&loading=async&callback=${o}`,s.async=!0,s.onerror=()=>i(new Error("Google Maps script failed to load")),document.head.appendChild(s)}),Ad)}const PF={class:"fb-field"},MF={key:0,class:"fb-address-ac-wrap"},LF={key:0,class:"fb-address-ban"},DF=["id","aria-expanded","value","placeholder"],FF={key:0,class:"fb-address-suggestions",role:"listbox"},UF=["aria-selected","onMousedown","onMouseenter"],BF={key:2,class:"fb-address-manual"},jF={class:"fb-field"},qF=["id","placeholder"],zF={class:"fb-field"},HF=["id"],VF={class:"fb-address-row"},WF={class:"fb-field"},GF=["id"],YF={class:"fb-field"},KF=["id"],XF={class:"fb-field"},JF=["id"],ZF=["innerHTML"],QF="https://data.geopf.fr/geocodage/completion/",eU=ot({__name:"FieldAdresse",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"address",i=`${r}-error`,o={};n.required&&(o.address_required=!0),i9(n.countries)&&(o.address_metropolitan=!0);const{model:s,showError:a,errorMessage:l,ctx:c}=Xt(n,o),u=ki(c.locale),d=Ar({...s.value||{}});dt(d,()=>{s.value={...d}},{deep:!0});const f=Re(null),p=Re(!1),m=pe(()=>FM(n.countries)),b=pe(()=>i9(n.countries)),g=Re(""),_=Re([]),y=Re(!1),T=Re(-1);let S,O=0,N=null;async function w(C){const F=++O;N?.abort(),N=typeof AbortController<"u"?new AbortController:null;try{const R=`${QF}?text=${encodeURIComponent(C)}&type=StreetAddress&maximumResponses=15`,z=await(await fetch(R,{signal:N?.signal})).json();if(F!==O)return;const K=Array.isArray(z?.results)?z.results:[];_.value=b.value?K.filter(M=>!H0(M.zipcode)):K,y.value=_.value.length>0,T.value=-1}catch(R){if(F!==O||R?.name==="AbortError")return;rr(R,{where:"FieldAdresse.ban"})}}function D(C){g.value=C,clearTimeout(S);const F=C.trim();if(F.length<3){_.value=[],y.value=!1;return}S=setTimeout(()=>w(F),220)}function Y(C){if(b.value&&H0(C.zipcode))return;clearTimeout(S),N?.abort();const F=`, ${C.zipcode??""} ${C.city??""}`,R=C.fulltext.endsWith(F)?C.fulltext.slice(0,-F.length):C.fulltext.split(",")[0];d.address=R||C.street||C.fulltext,d.postcode=C.zipcode,d.city=C.city,d.country="France",typeof C.y=="number"&&(d.latitude=C.y),typeof C.x=="number"&&(d.longitude=C.x),g.value=C.fulltext,y.value=!1,_.value=[]}function q(C){!y.value||!_.value.length||(C.key==="ArrowDown"?(C.preventDefault(),T.value=(T.value+1)%_.value.length):C.key==="ArrowUp"?(C.preventDefault(),T.value=(T.value-1+_.value.length)%_.value.length):C.key==="Enter"&&T.value>=0?(C.preventDefault(),Y(_.value[T.value])):C.key==="Escape"&&(y.value=!1))}function P(C,F,R){const G=oe=>C.find(te=>(te.types||[]).includes(oe)),z=oe=>oe?.longText??oe?.long_name??"",K=z(G("street_number")),M=z(G("route"));d.address=[K,M].filter(Boolean).join(" ")||R,d.city=z(G("locality"))||z(G("postal_town")),d.postcode=z(G("postal_code")),d.country=z(G("country")),F&&(d.latitude=typeof F.lat=="function"?F.lat():F.lat,d.longitude=typeof F.lng=="function"?F.lng():F.lng)}return Cr(async()=>{if(!m.value){if(!c.googleMapsApiKey.value){p.value=!0;return}try{await OF(c.googleMapsApiKey.value,c.locale.value);const C=window.google,F={},R=BM(n.countries);R.length&&(F.includedRegionCodes=R);const G=new C.maps.places.PlaceAutocompleteElement(F);G.id=r,f.value?.appendChild(G),G.addEventListener("gmp-select",async z=>{try{const K=z.placePrediction.toPlace();await K.fetchFields({fields:["addressComponents","location","formattedAddress"]}),P(K.addressComponents||[],K.location,K.formattedAddress||""),b.value&&H0(d.postcode)&&(p.value=!0)}catch(K){rr(K,{where:"FieldAdresse.select"})}})}catch(C){rr(C,{where:"FieldAdresse.load"}),p.value=!0}}}),(C,F)=>(U(),V("div",PF,[Ne(lt,{"for-id":h(r),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"]),!p.value&&!d.address?(U(),V("div",MF,[m.value?(U(),V("div",LF,[me("input",{id:h(r),class:"fb-input",type:"text",autocomplete:"off",role:"combobox","aria-autocomplete":"list","aria-expanded":y.value,value:g.value,placeholder:h(n).placeholder||h(u)("N_rue"),onInput:F[0]||(F[0]=R=>D(R.target.value)),onKeydown:q,onFocus:F[1]||(F[1]=R=>y.value=_.value.length>0),onBlur:F[2]||(F[2]=R=>y.value=!1)},null,40,DF),y.value?(U(),V("ul",FF,[(U(!0),V(et,null,yn(_.value,(R,G)=>(U(),V("li",{key:`${R.fulltext}-${G}`,class:ut(["fb-address-suggestion",{"is-active":G===T.value}]),role:"option","aria-selected":G===T.value,onMousedown:zo(z=>Y(R),["prevent"]),onMouseenter:z=>T.value=G},ve(R.fulltext),43,UF))),128))])):be("",!0)])):(U(),V("div",{key:1,ref_key:"autocompleteEl",ref:f,class:"fb-address-ac"},null,512))])):be("",!0),!p.value&&!d.address?(U(),V("button",{key:1,type:"button",class:"fb-address-toggle",onClick:F[3]||(F[3]=R=>p.value=!0)},ve(h(u)("trouvepasadresse")),1)):be("",!0),p.value||d.address?(U(),V("div",BF,[me("div",jF,[Et(me("input",{id:`${h(r)}-street`,"onUpdate:modelValue":F[4]||(F[4]=R=>d.address=R),class:"fb-input",type:"text",placeholder:h(u)("N_rue"),autocomplete:"address-line1"},null,8,qF),[[sn,d.address]])]),me("div",zF,[Ne(lt,{"for-id":`${h(r)}-compl`,label:h(u)("compl_addresse")},null,8,["for-id","label"]),Et(me("input",{id:`${h(r)}-compl`,"onUpdate:modelValue":F[5]||(F[5]=R=>d.complement=R),class:"fb-input",type:"text",autocomplete:"address-line2"},null,8,HF),[[sn,d.complement]])]),me("div",VF,[me("div",WF,[Ne(lt,{"for-id":`${h(r)}-cp`,label:h(u)("code_postal")},null,8,["for-id","label"]),Et(me("input",{id:`${h(r)}-cp`,"onUpdate:modelValue":F[6]||(F[6]=R=>d.postcode=R),class:"fb-input",type:"text",autocomplete:"postal-code"},null,8,GF),[[sn,d.postcode]])]),me("div",YF,[Ne(lt,{"for-id":`${h(r)}-city`,label:h(u)("ville")},null,8,["for-id","label"]),Et(me("input",{id:`${h(r)}-city`,"onUpdate:modelValue":F[7]||(F[7]=R=>d.city=R),class:"fb-input",type:"text",autocomplete:"address-level2"},null,8,KF),[[sn,d.city]])])]),me("div",XF,[Ne(lt,{"for-id":`${h(r)}-country`,label:h(u)("pays")},null,8,["for-id","label"]),Et(me("input",{id:`${h(r)}-country`,"onUpdate:modelValue":F[8]||(F[8]=R=>d.country=R),class:"fb-input",type:"text",autocomplete:"country-name"},null,8,JF),[[sn,d.country]])])])):be("",!0),h(n).info?(U(),V("p",{key:3,class:"fb-info",innerHTML:h(n).info},null,8,ZF)):be("",!0),h(a)?(U(),V("span",{key:4,id:i,class:"fb-error",role:"alert"},ve(h(n).forceErrorMessage||h(l)),1)):be("",!0)]))}}),tU={class:"fb-field"},nU={key:0,class:"fb-file-status"},rU={key:1,class:"fb-file-link"},iU=["href"],oU=["aria-label","onClick"],sU={key:2,class:"fb-file-btn"},aU=["innerHTML"],lU=["id","name","accept","onChange"],cU=["id","name","accept","onChange"],uU={class:"fb-mf-actions"},dU={key:0,class:"fb-info"},fU=["innerHTML"],pU={key:2,class:"fb-error",role:"alert"},mU=ot({__name:"FieldMultipleFiles",props:{field:{}},setup(e){const n=e.field,r=o_(n),i=n.save_to||"files",o=n.sizeMax??2560,s=n.validationLabel||n.label||i,a=mo(),l=ki(a.locale),c=Re([{data:void 0}]),u=a.form[i];Array.isArray(u)&&u.length&&(c.value=[...u]);const{value:d,errorMessage:f,meta:p,handleBlur:m}=Vo(`${s}_hidden_required`,n.required?{required:!0}:{},{label:s});function b(C){return typeof C=="string"?!0:typeof C.data=="string"&&C.data.startsWith("http")}const g=pe(()=>c.value.some(C=>typeof C!="string"&&C.uploading)),_=pe(()=>c.value.some(b)),y=pe(()=>!!n.required&&!!f.value&&(p.touched||p.dirty||a.submitAttempted.value));dt(c,()=>{const C=c.value.filter(F=>typeof F=="string"?!0:!!F.data).map(F=>typeof F=="string"?F:F.data);a.form[i]=C,d.value=_.value||g.value?"has_files":""},{deep:!0,immediate:!0});function T(C){a.bus.emit("show-popup",{title:n.label||"Fichiers",message:C})}function S(C){if(!r)return!0;const F=String(r).split(",").map(G=>G.trim().toLowerCase().replace(/^\./,"")).filter(Boolean);if(!F.length)return!0;const R=C.toLowerCase().match(/\.([^.\s]+)\s*$/)?.[1];return!!R&&F.includes(R)}async function O(C,F){const R=Array.from(F.target.files||[]);c.value.splice(C,1);for(const G of R){if(!S(G.name)){T(`Format non accepté. Formats acceptés : ${r}`);continue}if(G.size>o*1e3){T(l("file_max_size_error"));continue}if(G.name.toLowerCase().endsWith(".heic")){T(l("file_heic_error"));continue}const z=await N(G),K={data:z,uploading:!0,name:G.name};c.value.push(K);try{K.data=a.privateUploads.value?await a.api.uploadPrivateFile(a.formId,i,G):(await mt.post(`${a.server}/api/v2/submissions/upload`,{b64file:z,filename:G.name,operationId:a.operationId.value,save_to:i})).data.url,K.uploading=!1,c.value=[...c.value]}catch(M){const oe=c.value.indexOf(K);oe!==-1&&c.value.splice(oe,1);const te=M.response?.data?.errors?.[0];T(te||l("file_upload_failed")),rr(M,{where:"FieldMultipleFiles.upload",save_to:i})}}c.value.length||c.value.push({data:void 0})}function N(C){return new Promise(F=>{const R=new FileReader;R.onloadend=()=>F(R.result),R.readAsDataURL(C)})}function w(){c.value.push({data:void 0})}const D=pe(()=>{if(c.value.length<2)return!1;const C=c.value[c.value.length-1];return typeof C=="string"||!C.uploading});function Y(){D.value&&c.value.pop()}function q(C){c.value.splice(C,1),c.value.length||c.value.push({data:void 0})}function P(C){return typeof C=="string"?C:C.data}return(C,F)=>(U(),V("div",tU,[Ne(lt,{"for-id":h(i),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"]),(U(!0),V(et,null,yn(c.value,(R,G)=>(U(),V("div",{key:G,class:"fb-mf-row"},[typeof R!="string"&&R.uploading?(U(),V("div",nU," ["+ve(R.name)+"] "+ve(h(l)("multiple_file_upload_en_cours"))+"… ",1)):b(R)?(U(),V("div",rU,[me("a",{href:P(R),target:"_blank",rel:"noopener"},ve(h(s_)(P(R),typeof R=="string"?void 0:R.name)),9,iU),me("button",{type:"button",class:"fb-file-delete","aria-label":h(l)("file_delete"),onClick:z=>q(G)},[Ne(h(i_),{size:16})],8,oU)])):h(n).isButtonUpload?(U(),V("label",sU,[Ne(h(M9),{size:18}),me("span",{innerHTML:h(n).buttonUploadLabel||h(l)("file_upload_button")},null,8,aU),me("input",{id:`${h(i)}_${G}`,type:"file",class:"fb-file-hidden",name:`${h(i)}_file_${G}`,accept:h(r),multiple:"",onChange:z=>O(G,z),onBlur:F[0]||(F[0]=(...z)=>h(m)&&h(m)(...z))},null,40,lU)])):(U(),V("input",{key:3,id:`${h(i)}_${G}`,type:"file",class:"fb-file-input",name:`${h(i)}_file_${G}`,accept:h(r),multiple:"",onChange:z=>O(G,z),onBlur:F[1]||(F[1]=(...z)=>h(m)&&h(m)(...z))},null,40,cU))]))),128)),me("div",uU,[me("button",{type:"button",class:"fb-button fb-button--ghost fb-mf-btn",onClick:w},[Ne(h(P9),{size:16}),In(" "+ve(h(l)("multiple_file_add_file")),1)]),D.value?(U(),V("button",{key:0,type:"button",class:"fb-button fb-button--ghost fb-mf-btn",onClick:Y},[Ne(h(FD),{size:16}),In(" "+ve(h(l)("multiple_file_remove_file")),1)])):be("",!0)]),g.value?(U(),V("span",dU,ve(h(l)("multiple_file_patientez")),1)):be("",!0),h(n).info?(U(),V("p",{key:1,class:"fb-info",innerHTML:h(n).info},null,8,fU)):be("",!0),y.value?(U(),V("span",pU,ve(h(n).forceErrorMessage||h(f)||h(l)("file_select_required")),1)):be("",!0)]))}});function Ys(e){return(e||[]).map(t=>typeof t=="string"?{value:t.toLowerCase(),name:t}:{value:t.value,name:t.name??t.label??t.value,other:!!t.other})}const _U={class:"fb-field"},hU={class:"fb-label"},gU=["innerHTML"],yU={key:0,class:"fb-required-star"},bU={class:"fb-choice-list"},vU=["name","value"],$U={class:"fb-choice-label"},SU=["innerHTML"],EU=ot({__name:"FieldMultiCheckbox",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"field",i=`${r}-error`,{model:o,showError:s,errorMessage:a,handleBlur:l}=Xt(n),c=pe(()=>Ys(n.options)),u=Re(typeof o.value=="string"&&o.value?o.value.split(":"):[]);return dt(u,()=>{o.value=u.value.join(":")},{deep:!0}),(d,f)=>(U(),V("fieldset",_U,[me("legend",hU,[me("span",{innerHTML:h(n).label},null,8,gU),h(n).required?(U(),V("span",yU,"*")):be("",!0)]),me("div",bU,[(U(!0),V(et,null,yn(c.value,p=>(U(),V("label",{key:p.value,class:ut(["fb-choice",{"is-checked":u.value.includes(p.value)}])},[Et(me("input",{"onUpdate:modelValue":f[0]||(f[0]=m=>u.value=m),type:"checkbox",name:h(r),value:p.value,onBlur:f[1]||(f[1]=(...m)=>h(l)&&h(l)(...m))},null,40,vU),[[Em,u.value]]),me("span",$U,ve(p.name),1)],2))),128))]),h(n).info?(U(),V("p",{key:0,class:"fb-info",innerHTML:h(n).info},null,8,SU)):be("",!0),h(s)?(U(),V("span",{key:1,id:i,class:"fb-error",role:"alert"},ve(h(n).forceErrorMessage||h(a)),1)):be("",!0)]))}}),TU={class:"fb-recap"},wU=["innerHTML"],IU={key:0,class:"fb-recap-value"},AU={key:1,class:"fb-recap-value"},xU=ot({__name:"FieldRecap",props:{field:{}},setup(e){const n=e.field,{form:r}=mo(),i=pe(()=>n.save_to?r[n.save_to]:void 0),o=pe(()=>n.save_to==="address"&&i.value&&typeof i.value=="object"?i.value:null);return(s,a)=>(U(),V("div",TU,[me("div",{class:"fb-recap-label",innerHTML:h(n).label},null,8,wU),o.value?(U(),V("div",IU,[In(ve(o.value.address),1),o.value.complement?(U(),V(et,{key:0},[In(", "+ve(o.value.complement),1)],64)):be("",!0),o.value.postcode?(U(),V(et,{key:1},[In(", "+ve(o.value.postcode),1)],64)):be("",!0),In(" "+ve(o.value.city),1)])):(U(),V("div",AU,ve(i.value),1))]))}}),CU={class:"fb-field"},kU=["aria-label"],NU=["aria-checked","onClick","onKeydown"],RU={key:0,class:"fb-cem-hints"},OU=ot({__name:"FieldCustomerExpMetric",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"cem",i=`${r}-error`,{model:o,showError:s,errorMessage:a,handleBlur:l}=Xt(n),c=pe(()=>Number(n.numberOfItem)||10),u=pe(()=>Array.from({length:c.value+1},(_,y)=>y)),d=pe(()=>Number(n.numberOfRedItem)||0),f=pe(()=>Number(n.numberOfGreenItem)||0),p=pe(()=>n.hint0||""),m=pe(()=>n.hint10||"");function b(_){return c.value-_<f.value?"cem-green":_<d.value?"cem-red":"cem-yellow"}function g(_){o.value=_,l()}return(_,y)=>(U(),V("div",CU,[Ne(lt,{"for-id":h(r),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"]),me("ul",{class:"fb-cem",role:"radiogroup","aria-label":h(n).label},[(U(!0),V(et,null,yn(u.value,T=>(U(),V("li",{key:T,class:ut(["fb-cem-item",[b(T),{"is-active":h(o)===T}]]),role:"radio","aria-checked":h(o)===T,tabindex:"0",onClick:S=>g(T),onKeydown:[Fu(S=>g(T),["enter"]),Fu(zo(S=>g(T),["prevent"]),["space"])]},ve(T),43,NU))),128))],8,kU),p.value||m.value?(U(),V("div",RU,[me("span",null,ve(p.value?`0 – ${p.value}`:""),1),me("span",null,ve(m.value?`${c.value} – ${m.value}`:""),1)])):be("",!0),h(s)?(U(),V("span",{key:1,id:i,class:"fb-error",role:"alert"},ve(h(a)),1)):be("",!0)]))}}),PU={class:"fb-field"},MU=["id","name","value","list","placeholder","required","aria-invalid"],LU=["id"],DU=["value"],FU={key:1,class:"fb-ean-ok"},UU=["innerHTML"],BU=ot({__name:"FieldDatalist",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"field",i=`${r}-error`,o=pe(()=>Ys(n.options)),s=pe(()=>o.value.length>0),a={};s.value&&(a.one_of=o.value.map(_=>_.name));const{model:l,showError:c,errorMessage:u,controlClass:d,handleBlur:f,setValue:p}=Xt(n,a),m=Re(String(l.value??"")),b=Re(null);function g(_){if(m.value=_.target.value,p(m.value),s.value){const y=o.value.find(T=>T.name===m.value);b.value=y?y.value:null}}return(_,y)=>(U(),V("div",PU,[Ne(lt,{"for-id":h(r),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"]),me("input",{id:h(r),class:ut(["fb-input",h(d)]),type:"text",name:h(r),value:m.value,list:s.value?`${h(r)}-list`:void 0,placeholder:h(n).placeholder,autocomplete:"off",required:h(n).required||void 0,"aria-invalid":h(c)||void 0,onInput:g,onBlur:y[0]||(y[0]=(...T)=>h(f)&&h(f)(...T))},null,42,MU),s.value?(U(),V("datalist",{key:0,id:`${h(r)}-list`},[(U(!0),V(et,null,yn(o.value,T=>(U(),V("option",{key:T.value,value:T.name},null,8,DU))),128))],8,LU)):be("",!0),b.value?(U(),V("span",FU,[Ne(h(r_),{size:16}),In(" "+ve(b.value),1)])):be("",!0),h(n).info?(U(),V("p",{key:2,class:"fb-info",innerHTML:h(n).info},null,8,UU)):be("",!0),h(c)?(U(),V("span",{key:3,id:i,class:"fb-error",role:"alert"},ve(h(u)),1)):be("",!0)]))}}),jU={class:"fb-field"},qU={class:"fb-iban-title"},zU={class:"fb-ibanuk-row"},HU={class:"fb-field"},VU=["id","value","placeholder"],WU={key:0,class:"fb-error",role:"alert"},GU={class:"fb-field"},YU=["id","value","placeholder"],KU={key:0,class:"fb-error",role:"alert"},XU=ot({__name:"FieldIbanUK",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"iban_uk",i=mo(),o=ki(i.locale),s=i.form[r]||{},{value:a,errorMessage:l,meta:c,handleBlur:u}=Vo(o("iban_uk_sort_code"),{required:!!n.required,digits:6},{initialValue:s.sort_code||""}),{value:d,errorMessage:f,meta:p,handleBlur:m}=Vo(o("iban_uk_account_number"),pe(()=>({required:!!n.required,digits:8,iban_uk_modulus:[a.value]})),{initialValue:s.account_number||""});dt([a,d],()=>{i.form[r]={sort_code:a.value,account_number:d.value}});const b=pe(()=>!!l.value&&(c.touched||c.dirty)),g=pe(()=>!!f.value&&(p.touched||p.dirty));function _(T){a.value=T.target.value.replace(/\D/g,"").slice(0,6)}function y(T){d.value=T.target.value.replace(/\D/g,"").slice(0,8)}return(T,S)=>(U(),V("div",jU,[h(n).disableHolderField?be("",!0):(U(),V(et,{key:0},[me("h3",qU,ve(h(n).sectionTitle||h(o)("iban_section_title")),1),Ne(D9,{label:h(n).holderLabel||h(o)("iban_holder"),placeholder:h(n).holderPlaceholder||"Nom et prénom ou société",required:h(n).required},null,8,["label","placeholder","required"])],64)),Ne(lt,{"for-id":h(r),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"]),me("div",zU,[me("div",HU,[Ne(lt,{"for-id":`${h(r)}-sort`,label:h(o)("iban_uk_sort_code")},null,8,["for-id","label"]),me("input",{id:`${h(r)}-sort`,class:ut(["fb-input",{"fb-invalid":b.value}]),type:"text",inputmode:"numeric",value:h(a),placeholder:h(o)("iban_uk_sort_code_placeholder"),onInput:_,onBlur:S[0]||(S[0]=(...O)=>h(u)&&h(u)(...O))},null,42,VU),b.value?(U(),V("span",WU,ve(h(l)),1)):be("",!0)]),me("div",GU,[Ne(lt,{"for-id":`${h(r)}-account`,label:h(o)("iban_uk_account_number")},null,8,["for-id","label"]),me("input",{id:`${h(r)}-account`,class:ut(["fb-input",{"fb-invalid":g.value}]),type:"text",inputmode:"numeric",value:h(d),placeholder:h(o)("iban_uk_account_number_placeholder"),onInput:y,onBlur:S[1]||(S[1]=(...O)=>h(m)&&h(m)(...O))},null,42,YU),g.value?(U(),V("span",KU,ve(h(f)),1)):be("",!0)])])]))}});function l_(e,t=300){let n;const r=(...i)=>{n&&clearTimeout(n),n=setTimeout(()=>e(...i),t)};return r.cancel=()=>{n&&clearTimeout(n)},r}const JU={class:"fb-field"},ZU=["aria-expanded"],QU={key:0,class:"fb-ms-placeholder"},eB={key:1,class:"fb-ms-chips"},tB={key:0,class:"fb-ms-panel"},nB={class:"fb-ms-list"},rB={key:0,class:"fb-ms-empty"},iB=["checked","disabled","onChange"],oB={class:"fb-choice-label"},sB={key:1,class:"fb-ms-empty"},aB=["innerHTML"],lB=ot({__name:"FieldMultiSelect",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"multiselect",i=`${r}-error`,{model:o,showError:s,errorMessage:a,handleBlur:l}=Xt(n),c=pe(()=>Ys(n.options)),u=pe(()=>Number(n.nbMaxSelected)||0),d=pe(()=>Number(n.minSearchLength)||0),f=pe(()=>Number(n.maxDisplayResults)||0),p=pe(()=>n.multiple!==!1),m=typeof n.ajaxUrl=="string"?n.ajaxUrl:"",b=n.ajax===!0&&m.startsWith("http"),g=b&&m.includes("data-list/json/"),_=Re([]),y=Re({}),T=Re(!1),S=Re(!1),O=Re(!1);let N=0;const w=pe(()=>b?_.value:c.value);function D(ce){return typeof ce!="string"||!ce?[]:p.value?ce.split(":"):[ce]}const Y=Re(D(o.value));dt(Y,()=>{o.value=p.value?Y.value.join(":"):Y.value[0]??""},{deep:!0});const q=Re(!1),P=Re(""),C=pe(()=>P.value.length<d.value);function F(ce){for(const ye of ce)y.value[ye.value]=ye.name}function R(ce,ye){const Te=ye.toLowerCase();return ce.name.toLowerCase().includes(Te)||ce.value.toLowerCase().includes(Te)}const G=pe(()=>{if(C.value)return[];let ce=w.value;return!g&&P.value&&(ce=ce.filter(ye=>R(ye,P.value))),f.value>0&&ce.length>f.value?ce.slice(0,f.value):ce}),z=pe(()=>u.value>0&&Y.value.length>=u.value),K=pe(()=>q.value&&!T.value&&!C.value&&!G.value.length&&(!g||O.value));async function M(ce){const ye=++N;T.value=!0;try{const{data:Te}=await mt.get(m,g?{params:{search:ce}}:void 0);if(ye!==N)return;const le=Ys(Array.isArray(Te)?Te:[]);F(le),_.value=le,g||(S.value=!0),O.value=!0}catch{if(ye!==N)return;_.value=[],O.value=!0}finally{ye===N&&(T.value=!1)}}const oe=l_(ce=>{M(ce)},300);dt(P,ce=>{if(b){if(g){if(oe.cancel(),N+=1,_.value=[],!ce||C.value){T.value=!1,O.value=!1;return}T.value=!0,O.value=!1,oe(ce);return}C.value||S.value||oe(ce)}}),ks(()=>oe.cancel());function te(ce){const ye=w.value.find(Te=>Te.value===ce);if(ye&&(y.value[ce]=ye.name),!p.value)Y.value=Y.value[0]===ce?[]:[ce];else{const Te=Y.value.indexOf(ce);Te>=0?Y.value.splice(Te,1):z.value||Y.value.push(ce)}n.closeOnSelect&&(q.value=!1,P.value="")}function se(ce){const ye=Y.value.indexOf(ce);ye>=0&&Y.value.splice(ye,1)}const _e=ce=>y.value[ce]??w.value.find(ye=>ye.value===ce)?.name??ce;return(ce,ye)=>(U(),V("div",JU,[Ne(lt,{"for-id":h(r),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"]),me("div",{class:"fb-ms",onFocusout:ye[2]||(ye[2]=(...Te)=>h(l)&&h(l)(...Te))},[me("button",{type:"button",class:ut(["fb-input fb-ms-trigger",{"fb-invalid":h(s)}]),"aria-expanded":q.value,onClick:ye[0]||(ye[0]=Te=>q.value=!q.value)},[Y.value.length?(U(),V("span",eB,[(U(!0),V(et,null,yn(Y.value,Te=>(U(),V("span",{key:Te,class:"fb-ms-chip"},[In(ve(_e(Te))+" ",1),Ne(h(L9),{size:13,onClick:zo(le=>se(Te),["stop"])},null,8,["onClick"])]))),128))])):(U(),V("span",QU,ve(h(n).placeholder||"Sélectionnez…"),1)),Ne(h(LD),{size:18,class:"fb-ms-caret"})],10,ZU),q.value?(U(),V("div",tB,[Et(me("input",{"onUpdate:modelValue":ye[1]||(ye[1]=Te=>P.value=Te),class:"fb-input fb-ms-search",type:"text",placeholder:"Rechercher…"},null,512),[[sn,P.value]]),me("ul",nB,[T.value?(U(),V("li",rB,"…")):be("",!0),(U(!0),V(et,null,yn(G.value,Te=>(U(),V("li",{key:Te.value},[me("label",{class:ut(["fb-choice",{"is-checked":Y.value.includes(Te.value)}])},[me("input",{type:"checkbox",checked:Y.value.includes(Te.value),disabled:!Y.value.includes(Te.value)&&z.value,onChange:le=>te(Te.value)},null,40,iB),me("span",oB,ve(Te.name),1)],2)]))),128)),K.value?(U(),V("li",sB,"Aucun résultat")):be("",!0)])])):be("",!0)],32),h(n).info?(U(),V("p",{key:0,class:"fb-info",innerHTML:h(n).info},null,8,aB)):be("",!0),h(s)?(U(),V("span",{key:1,id:i,class:"fb-error",role:"alert"},ve(h(a)),1)):be("",!0)]))}}),cB={class:"fb-field"},uB=["id","accept"],dB={key:0,class:"fb-dz-list"},fB={key:0},pB=["href"],mB=["aria-label","onClick"],_B={key:1,class:"fb-info"},hB={key:2,class:"fb-error",role:"alert"},gB=ot({__name:"FieldMultipleFilesInOne",props:{field:{}},setup(e){const n=e.field,r=o_(n),i=n.save_to||"files",o=n.sizeMax??2560,s=n.validationLabel||n.label||i,a=pe(()=>Number(n.maxFiles)||0),l=mo(),c=ki(l.locale),u=Re([]),d=l.form[i];Array.isArray(d)&&(u.value=d.map(P=>({url:P,name:s_(String(P))})));const{value:f,errorMessage:p,meta:m,handleBlur:b}=Vo(`${s}_hidden_required`,n.required?{required:!0}:{},{label:s}),g=pe(()=>u.value.some(P=>P.uploading)),_=pe(()=>!!n.required&&!!p.value&&(m.touched||m.dirty||l.submitAttempted.value));dt(u,()=>{l.form[i]=u.value.filter(P=>P.url).map(P=>P.url),f.value=u.value.some(P=>P.url)||g.value?"has_files":""},{deep:!0,immediate:!0});const y=Re(!1),T=Re(null);function S(P){l.bus.emit("show-popup",{title:n.label||"Fichiers",message:P})}function O(P){if(!r)return!0;const C=String(r).split(",").map(R=>R.trim().toLowerCase().replace(/^\./,"")).filter(Boolean);if(!C.length)return!0;const F=P.toLowerCase().match(/\.([^.\s]+)\s*$/)?.[1];return!!F&&C.includes(F)}function N(P){return new Promise(C=>{const F=new FileReader;F.onloadend=()=>C(F.result),F.readAsDataURL(P)})}async function w(P){for(const C of Array.from(P)){if(a.value&&u.value.length>=a.value){S(c("multiple_files_max",{max:a.value}));break}if(!O(C.name)){S(`Format non accepté. Formats acceptés : ${r}`);continue}if(C.size>o*1e3){S(c("file_max_size_error"));continue}if(C.name.toLowerCase().endsWith(".heic")){S(c("file_heic_error"));continue}const F=await N(C),R={name:C.name,uploading:!0};u.value.push(R);try{R.url=l.privateUploads.value?await l.api.uploadPrivateFile(l.formId,i,C):(await mt.post(`${l.server}/api/v2/submissions/upload`,{b64file:F,filename:C.name,operationId:l.operationId.value,save_to:i})).data.url,R.uploading=!1,u.value=[...u.value]}catch(G){const z=u.value.indexOf(R);z!==-1&&u.value.splice(z,1),S(c("file_upload_failed")),rr(G,{where:"FieldMultipleFilesInOne.upload",save_to:i})}}}function D(P){P.preventDefault(),y.value=!1,P.dataTransfer?.files&&w(P.dataTransfer.files)}function Y(P){const C=P.target;C.files&&w(C.files),C.value="",b()}function q(P){u.value.splice(P,1)}return(P,C)=>(U(),V("div",cB,[Ne(lt,{"for-id":h(i),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"]),me("div",{class:ut(["fb-dropzone",{"is-drag":y.value}]),role:"button",tabindex:"0",onClick:C[0]||(C[0]=F=>T.value?.click()),onKeydown:C[1]||(C[1]=Fu(F=>T.value?.click(),["enter"])),onDragover:C[2]||(C[2]=zo(F=>y.value=!0,["prevent"])),onDragleave:C[3]||(C[3]=F=>y.value=!1),onDrop:D},[Ne(h(DD),{size:26}),me("span",null,ve(h(n).buttonUploadLabel||h(c)("multiple_files_drop")),1),me("input",{id:h(i),ref_key:"inputRef",ref:T,type:"file",class:"fb-file-hidden",accept:h(r),multiple:"",onChange:Y},null,40,uB)],34),u.value.length?(U(),V("ul",dB,[(U(!0),V(et,null,yn(u.value,(F,R)=>(U(),V("li",{key:R,class:"fb-file-link"},[F.uploading?(U(),V("span",fB,"["+ve(F.name)+"] "+ve(h(c)("multiple_file_upload_en_cours"))+"…",1)):(U(),V("a",{key:1,href:F.url,target:"_blank",rel:"noopener"},ve(F.name),9,pB)),me("button",{type:"button",class:"fb-file-delete","aria-label":h(c)("file_delete"),onClick:G=>q(R)},[Ne(h(i_),{size:16})],8,mB)]))),128))])):be("",!0),g.value?(U(),V("span",_B,ve(h(c)("multiple_file_patientez")),1)):be("",!0),_.value?(U(),V("span",hB,ve(h(p)||h(c)("file_select_required")),1)):be("",!0)]))}}),yB=["innerHTML"],bB=ot({__name:"FieldEstimateRefund",props:{field:{}},setup(e){const n=e.field,r=mo(),i=n.template||n.html||"",o=Re(""),s=l_(async()=>{try{const{data:a}=await mt.post(`${r.server}/api/v2/submissions/estimaterefund`,{...r.form,operationId:r.operationId.value}),l=Number(typeof a=="number"?a:a?.amount_to_refund??0),c=(l/100).toLocaleString("fr-FR",{style:"currency",currency:"EUR"});o.value=i.replace(/\{\{\s*amount_to_refund_raw\s*\}\}/g,String(l/100)).replace(/\{\{\s*amount_to_refund\s*\}\}/g,c)}catch(a){rr(a,{where:"FieldEstimateRefund"})}},500);return dt(()=>({...r.form}),s,{deep:!0}),Cr(s),(a,l)=>(U(),V("div",{class:"fb-blochtml",innerHTML:o.value},null,8,yB))}}),vB={class:"fb-field"},$B={class:"fb-label"},SB=["innerHTML"],EB={key:0,class:"fb-required-star"},TB={class:"fb-choice-list"},wB=["name","value"],IB=["innerHTML"],AB=ot({__name:"FieldRewardSelector",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"reward",i=`${r}-error`,{model:o,showError:s,errorMessage:a,handleBlur:l,ctx:c}=Xt(n),u=pe(()=>Ys(n.options)),d=Re({}),f=l_(async()=>{try{const{data:m}=await mt.post(`${c.server}/api/v2/submissions/estimaterefund`,{...c.form,operationId:c.operationId.value}),g=(Number(m?.amount_to_refund??0)/100).toLocaleString("fr-FR",{style:"currency",currency:"EUR"}),_={};for(const y of u.value)_[y.value]=y.name.replace(/\{\{\s*amount_to_refund\s*\}\}/g,g);d.value=_}catch(m){rr(m,{where:"FieldRewardSelector"})}},500);dt(()=>({...c.form}),f,{deep:!0}),Cr(f);const p=(m,b)=>d.value[m]??b;return(m,b)=>(U(),V("fieldset",vB,[me("legend",$B,[me("span",{innerHTML:h(n).label},null,8,SB),h(n).required?(U(),V("span",EB,"*")):be("",!0)]),me("div",TB,[(U(!0),V(et,null,yn(u.value,g=>(U(),V("label",{key:g.value,class:ut(["fb-choice",{"is-checked":h(o)===g.value}])},[Et(me("input",{"onUpdate:modelValue":b[0]||(b[0]=_=>_t(o)?o.value=_:null),type:"radio",name:h(r),value:g.value,onBlur:b[1]||(b[1]=(..._)=>h(l)&&h(l)(..._))},null,40,wB),[[Mu,h(o)]]),me("span",{class:"fb-choice-label",innerHTML:p(g.value,g.name)},null,8,IB)],2))),128))]),h(s)?(U(),V("span",{key:0,id:i,class:"fb-error",role:"alert"},ve(h(a)),1)):be("",!0)]))}}),xB={class:"fb-field"},CB={class:"fb-pp-num"},kB={class:"fb-field"},NB=["id","onUpdate:modelValue"],RB=["value"],OB=["id","onUpdate:modelValue"],PB={key:0,class:"fb-field"},MB=["onUpdate:modelValue"],LB={key:1,class:"fb-field"},DB=["onUpdate:modelValue"],FB={key:2,class:"fb-field"},UB=["onUpdate:modelValue"],BB={key:3,class:"fb-field"},jB=["onUpdate:modelValue"],qB=["onClick"],zB={key:1,class:"fb-error",role:"alert"},c_={Input:nL,Checkbox:aL,Radio:hL,Civilite:xL,Select:LL,InputNumber:BL,Textarea:HL,DateInput:YL,BlocHTML:O9,BlocHTMLsimple:O9,Iban:YD,File:sF,SecuriteSociale:dF,Devise:mF,EAN:bF,Phone:RF,Adresse:eU,MultipleFiles:mU,MultiCheckbox:EU,Recap:xU,CustomerExpMetric:OU,Datalist:BU,IbanUK:XU,MultiSelect:lB,MultipleFilesInOne:gB,EstimateRefund:bB,RewardSelector:AB,PrixProduits:ot({__name:"FieldPrixProduits",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"prix_produits",i=n.configuration||{},{model:o,showError:s,errorMessage:a,ctx:l}=Xt(n,i.displayQuantite?{prix_produits_quantity:!0}:{}),c=ki(l.locale),u=pe(()=>Ys(n.options)),d=pe(()=>u.value.length>0),f=pe(()=>Number(i.minProducts)||1),p=pe(()=>Number(i.maxProducts)||0),m=Array.isArray(o.value)&&o.value.length?o.value:Array.from({length:f.value},()=>({})),b=Ar(m.map(y=>({...y})));dt(b,()=>{o.value=b.filter(y=>y.produit||y.price||y.quantity||y.imei).map(y=>({...y,price:y.price||0}))},{deep:!0});function g(){(!p.value||b.length<p.value)&&b.push({})}function _(y){b.length>f.value&&b.splice(y,1)}return(y,T)=>(U(),V("div",xB,[Ne(lt,{"for-id":h(r),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"]),(U(!0),V(et,null,yn(b,(S,O)=>(U(),V("div",{key:O,class:"fb-pp-line"},[me("span",CB,ve(h(i).labelProductLine||h(c)("prix_produit_produit"))+" "+ve(O+1),1),me("div",kB,[Ne(lt,{"for-id":`${h(r)}-ref-${O}`,label:h(i).labelRef||h(c)("prix_produit_reference")},null,8,["for-id","label"]),d.value?Et((U(),V("select",{key:0,id:`${h(r)}-ref-${O}`,"onUpdate:modelValue":N=>S.produit=N,class:"fb-select"},[T[0]||(T[0]=me("option",{value:""},"—",-1)),(U(!0),V(et,null,yn(u.value,N=>(U(),V("option",{key:N.value,value:N.value},ve(N.name),9,RB))),128))],8,NB)),[[Lu,S.produit]]):Et((U(),V("input",{key:1,id:`${h(r)}-ref-${O}`,"onUpdate:modelValue":N=>S.produit=N,class:"fb-input",type:"text"},null,8,OB)),[[sn,S.produit]])]),h(i).displayDescription?(U(),V("div",PB,[Ne(lt,{label:h(i).labelDescription||h(c)("prix_produit_description")},null,8,["label"]),Et(me("input",{"onUpdate:modelValue":N=>S.description=N,class:"fb-input",type:"text"},null,8,MB),[[sn,S.description]])])):be("",!0),h(i).displayQuantite?(U(),V("div",LB,[Ne(lt,{label:h(i).labelQuantite||h(c)("prix_produit_quantite"),required:!!S.produit},null,8,["label","required"]),Et(me("input",{"onUpdate:modelValue":N=>S.quantity=N,class:"fb-input",type:"number",min:"1",step:"1"},null,8,DB),[[sn,S.quantity,void 0,{number:!0}]])])):be("",!0),h(i).displayPrix?(U(),V("div",FB,[Ne(lt,{label:h(i).labelPrix||h(c)("prix_produit_prix")},null,8,["label"]),Et(me("input",{"onUpdate:modelValue":N=>S.price=N,class:"fb-input",type:"number",step:"0.01",min:"0"},null,8,UB),[[sn,S.price,void 0,{number:!0}]])])):be("",!0),h(i).displayImei?(U(),V("div",BB,[Ne(lt,{label:h(i).labelImei||h(c)("prix_produit_imei")},null,8,["label"]),Et(me("input",{"onUpdate:modelValue":N=>S.imei=N,class:"fb-input",type:"text"},null,8,jB),[[sn,S.imei]])])):be("",!0),b.length>f.value?(U(),V("button",{key:4,type:"button",class:"fb-button fb-button--ghost fb-mf-btn",onClick:N=>_(O)},[Ne(h(i_),{size:16}),In(" "+ve(h(i).labelMoins||h(c)("prix_produit_remove")),1)],8,qB)):be("",!0)]))),128)),!p.value||b.length<p.value?(U(),V("button",{key:0,type:"button",class:"fb-button fb-button--ghost fb-mf-btn",onClick:g},[Ne(h(P9),{size:16}),In(" "+ve(h(i).labelPlus||h(c)("prix_produit_add")),1)])):be("",!0),h(s)?(U(),V("span",zB,ve(h(a)),1)):be("",!0)]))}})},HB={key:0,class:"fb-popup-title"},VB=["innerHTML"],WB={class:"fb-popup-actions"},GB=ot({__name:"FormPopup",props:{bus:{}},setup(e){const t=e,n=Re(!1),r=Re(""),i=Re(""),o=Re("OK"),s=Re(!0);function a(f){typeof f=="string"?(r.value=ho(f),i.value="",o.value="OK",s.value=!0):(r.value=ho(f.message||""),i.value=f.title||"",o.value=f.buttonText||"OK",s.value=f.closeOnOverlay!==!1),n.value=!0,document.body.style.overflow="hidden"}function l(){n.value=!1,document.body.style.overflow=""}function c(){s.value&&l()}function u(f){f.key==="Escape"&&n.value&&l()}let d;return Cr(()=>{d=t.bus.on("show-popup",a),document.addEventListener("keydown",u)}),ks(()=>{d?.(),document.removeEventListener("keydown",u),document.body.style.overflow=""}),(f,p)=>(U(),io(ET,{to:"body"},[n.value?(U(),V("div",{key:0,class:"fb-form fb-popup-overlay",role:"dialog","aria-modal":"true",onClick:c},[me("div",{class:"fb-popup",onClick:p[0]||(p[0]=zo(()=>{},["stop"]))},[i.value?(U(),V("h3",HB,ve(i.value),1)):be("",!0),me("div",{class:"fb-popup-body",innerHTML:r.value},null,8,VB),me("div",WB,[me("button",{type:"button",class:"fb-button fb-button--primary",onClick:l},ve(o.value),1)])])])):be("",!0)]))}}),YB=["type","disabled"],KB={key:0,class:"fb-spinner","aria-hidden":"true"},XB=ot({__name:"LoadingButton",props:{loading:{type:Boolean,default:!1},type:{default:"button"},variant:{default:"primary"},disabled:{type:Boolean,default:!1}},setup(e){return(t,n)=>(U(),V("button",{type:e.type,class:ut(["fb-button",e.variant==="ghost"?"fb-button--ghost":"fb-button--primary"]),disabled:e.disabled||e.loading},[e.loading?(U(),V("span",KB)):be("",!0),FT(t.$slots,"default")],10,YB))}}),JB={class:"fb-form"},ZB={key:0,class:"fb-error-update"},QB={key:0,class:"fb-progress","aria-hidden":"true"},ej={key:1,class:"fb-step-counter"},tj=["innerHTML"],nj={key:3,class:"fb-step-counter"},rj={key:4,class:"fb-mention"},ij={class:"fb-rgpd-wrap"},oj=["innerHTML"],sj={class:"fb-buttons"},aj=["textContent"],lj=["textContent"],cj=ot({__name:"HoustonForm",props:{server:{},formId:{},submissionId:{default:void 0},displayCurrentStep:{type:Boolean,default:!1},multiColumn:{type:Boolean,default:!1},stepMessage:{default:"Étape "},relay:{default:void 0},testmode:{default:void 0},uid:{default:void 0},hideError:{type:Boolean,default:!1},hideSteps:{type:Boolean,default:!1},rgpdMentions:{default:void 0}},emits:["results","on_error","form_submit_loading","upload_progress","step-up","step-down","too-early","too-late"],setup(e,{emit:t}){a9();const n=e,r=t,i=new Yx(n.server),o=new Kx,s=Ar({}),a=Re([]),l=Re(0),c=Re({}),u=Re({}),d=Re(!1),f=Re("fr"),p=Re(""),m=Re(""),b=Re(void 0),g=Re(!1),_=Ar({});let y;const T=()=>y?.abandon(l.value),S=ki(f),{validate:O}=BI(),N=pe(()=>l.value===a.value.length-1),w=pe(()=>!!n.testmode?.previewDossier&&!n.submissionId);function D(v){const E=new Set,x=/participationValide\s*===?\s*["']([A-Za-z0-9_]+)["']/g;for(const Q of v)for(const Z of Q.fields||[]){const ne=String(Z.displayIf??"");let xe;for(;xe=x.exec(ne);)E.add(xe[1])}return[...E]}function Y(v){const E=v.toLowerCase();return/(amount|montant|prix|refund|rembours|reward|estimate)/.test(E)?3500:/^_?id$|code|uid|numero|num_/.test(E)?"APERÇU":/first_?name|prenom/.test(E)?"Prénom":/last_?name|nom/.test(E)?"Nom":/mail/.test(E)?"apercu@exemple.fr":/phone|tel|mobile/.test(E)?"0600000000":"…"}function q(v,E){const x={participationValide:E},Q=/\{\{\s*this\.form\.(\w+)\s*\}\}/g;for(const Z of v)for(const ne of Z.fields||[]){const xe=String(ne.html??"");let Se;for(;Se=Q.exec(xe);)Se[1]in x||(x[Se[1]]=Y(Se[1]))}return x}const P=pe(()=>{const v=a.value.flatMap(x=>x.fields||[]).find(x=>x.save_to==="email"||x.type==="email"||x.name==="email"),E=v?.save_to?s[v.save_to]:void 0;return typeof E=="string"&&E.trim()?E.trim():""}),C=pe(()=>c.value.custom?.notice_uri||"");function F(v){return v?v.replace(/<br\s*\/?>/gi,"").replace(/ /g," ").replace(/<[^>]+>/g,"").trim()==="":!0}function R(v){return v.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function G(v,E){const x=v.custom?.notice_uri;return!F(v.custom?.notice)||!x?`<a id="noticelink">${E}</a>`:`<a id="noticelink" href="${x}" target="_blank" rel="noopener">${E}</a>`}const z=pe(()=>u.value.precedent&&u.value.precedent.length>0?u.value.precedent:S("precedent")),K=pe(()=>N.value||n.multiColumn?u.value.valider&&u.value.valider.length>0?u.value.valider:S("valider"):u.value.suivant&&u.value.suivant.length>0?u.value.suivant:S("suivant")),M=pe(()=>u.value.hasSpinner||u.value.hasSpinner===void 0),oe=pe(()=>Nb(u.value.displayIf,s)),te={server:n.server,api:i,formId:n.formId,operationId:p,form:s,locale:f,testmode:Re(n.testmode||{}),submitAttempted:g,googleMapsApiKey:m,phoneVerificationEmail:P,privateUploads:pe(()=>c.value.privateUploads===!0),bus:o};VM(te);function se(v){return Nb(v.displayIf,s)}Cr(async()=>{try{const v=await i.getForm(n.formId),{operation:E,formulaire:x}=v;if(c.value=E,p.value=E._id||"",n.relay)for(const ne in n.relay)s[ne]=n.relay[ne];const Q=x.form||[];if(x.type==="UPDATE")if(w.value){const ne=D(Q);n.testmode&&(n.testmode.statusOptions=ne);const xe=n.testmode?.previewStatus||ne[0]||"";n.testmode&&!n.testmode.previewStatus&&(n.testmode.previewStatus=xe),Object.assign(s,q(Q,xe))}else await _e();else x.type==="LINE_ITEM"?s._id=n.submissionId:(y=lC(i.server,n.formId,!!n.testmode?.active),window.addEventListener("pagehide",T));m.value=E.gmapkey||"",(v.lang||x.lang||E.lang)!=="fr"&&(f.value=x.lang||E.lang||"fr",HM(n9(f.value))),u.value=x.bouton_text||{},a.value=RD(x.form||[]),n.testmode&&(n.testmode.stepCount=a.value.length,n.testmode.currentStep=l.value);const Z=new Date;E.from&&Z<new Date(E.from)?r("too-early",E.from):E.to&&Z>new Date(E.to)&&r("too-late",E.to),ao("form_view",{form_id:n.formId,operation_id:p.value,step:l.value+1,total_steps:a.value.length})}catch(v){console.error("error while loading form data:",v),Zm(v,{phase:"load",formId:n.formId}),b.value="Impossible de charger le formulaire."}}),ks(()=>{T(),window.removeEventListener("pagehide",T)});async function _e(){if(!n.submissionId){b.value="No submission id";return}try{const v=await i.getSubmission(n.submissionId,n.uid);Object.assign(s,v)}catch{b.value=`Submission ${n.submissionId} not found or bad uid`}}function ce(){let v=a.value[l.value]?.fields.find(E=>E.component==="Adresse");return n.multiColumn&&!v&&a.value[1]&&(v=a.value[1].fields.find(E=>E.component==="Adresse")),v}function ye(v=!1){const E=ce();if(!E||!E.required||!se(E))return!0;const x=E.save_to?s[E.save_to]:void 0;return x&&typeof x=="object"&&x.address?!0:(v||(Fs("Alert","merci_renseigner_adresse"),o.emit("show-popup",{title:E.label||"Adresse",message:S("merci_renseigner_adresse")})),!1)}function Te(v){if(v?.save_to){if(!v.verified){delete _[v.save_to];return}_[v.save_to]={token:v.token,phone:v.phone}}}function le(){return(N.value||n.multiColumn?a.value:[a.value[l.value]]).flatMap(E=>E?.fields||[]).find(E=>{if(E.component!=="Phone"||!E.phoneVerificationSms||!se(E))return!1;const x=E.save_to?s[E.save_to]:void 0;if(!x)return!1;const Q=E.save_to?_[E.save_to]:void 0;return!Q||Q.phone!==x})}function ge(v=!1){const E=le();return E?(v||o.emit("show-popup",{title:"Erreur",message:`Veuillez valider le champ ${rd(E.validationLabel||E.label||"Téléphone")}.`}),!1):!0}function Ce(){ye()&&(g.value=!1,y?.stepDone(l.value),l.value++,Fs("Step",`step_${l.value}`),ao("form_step_change",{form_id:n.formId,operation_id:p.value,step:l.value+1,total_steps:a.value.length,direction:"forward"}),r("step-up",l.value))}function Me(){g.value=!1,l.value--,ao("form_step_change",{form_id:n.formId,operation_id:p.value,step:l.value+1,total_steps:a.value.length,direction:"backward"}),r("step-down",l.value)}function Ue(){return!!a.value[l.value]?.fields?.some(v=>v.required===!0&&se(v))}async function nt(){g.value=!0;const v=ye(!0),E=ge(!0),{valid:x,errors:Q}=await O();x&&v&&E?!N.value&&!n.multiColumn?Ce():await A():X(Q,v)}async function A(){if(c.value?.date_fin_regule&&new Date>new Date(c.value.date_fin_regule)){o.emit("show-popup",{title:S("error_title"),message:S("date_fin_regule_passee")||"La date limite de régularisation est dépassée. Le formulaire ne peut plus être soumis."}),Fs("Alert","date_fin_regule_passee"),y?.failed("date_limit"),ao("form_submit_error",{form_id:n.formId,operation_id:p.value,error_message:"date_fin_regule_passee",error_type:"date_limit_exceeded"});return}if(!d.value){d.value=!0,r("form_submit_loading",!0),Fs("Submit",n.formId),ao("form_submit",{form_id:n.formId,operation_id:p.value,step:l.value+1,total_steps:a.value.length});try{const v={...JSON.parse(JSON.stringify(s)),url:window.location.href,userAgent:window.navigator.userAgent,windowInnerResolution:`${window.innerWidth}x${window.innerHeight}`,fingerprint:eC(),testmode:n.testmode?{active:n.testmode.active,disableunique:n.testmode.disableunique,status:n.testmode.status,lot:n.testmode.lot}:void 0,_phoneVerificationTokens:{..._}},E=await i.submit(n.formId,v,x=>r("upload_progress",x));d.value=!1,r("form_submit_loading",!1),y?.submitted(l.value),r("results",E),ao("form_submit_success",{form_id:n.formId,operation_id:p.value,submission_id:E._id||E.id,lot:E.lot||"PERD"}),Fs("Success",n.formId)}catch(v){d.value=!1,r("form_submit_loading",!1),l.value=0,k(v)}}}function k(v){Zm(v,{phase:"submit",formId:n.formId});const E=v.response,x=E?.data;let Q=S("error_generic"),Z=!1;x?.message?Q=String(x.message):x?.error?(Array.isArray(x.error)?x.error:[x.error]).includes("Email domain not allowed")&&(Z=!0,Q=S("email_domain_not_allowed")):v.message&&(Q=String(v.message));const ne=E?E.status>=500?"server_error":Z?"email_domain":x?.codecheckErrors?"invalid_codes":"rejected":"network";y?.failed(ne),ao("form_submit_error",{form_id:n.formId,operation_id:p.value,error_message:Q,error_type:"submission_error"}),!n.hideError&&!Z&&o.emit("show-popup",{message:Q,title:S("error_title")}),r("on_error",E?.data??v??"Erreur inconnue")}function X(v,E){const x=[],Q=[];for(const Se of Object.keys(v)){const J=Se.replace(/_hidden_required$/,"");let ie=J,Be=J;for(const He of a.value){const H=He.fields.find(W=>W.save_to===Se||W.save_to===J||W.validationLabel===Se||W.validationLabel===J||W.label===Se||W.label===J);if(H?.save_to&&(Be=H.save_to),H?.label){ie=H.label;break}}x.push(rd(ie)),Q.push(Be)}if(!E){const Se=ce();Se?.label&&x.push(rd(Se.label)),Se?.save_to&&Q.push(Se.save_to)}const Z=le();Z&&(x.push(rd(Z.validationLabel||Z.label||"Téléphone")),Z.save_to&&Q.push(Z.save_to)),y?.errors(Q);const ne=[...new Set(x)].filter(Se=>Se.trim()!==""),xe=ne.length>0?`${S("Corrigez les erreurs")}<br><br><strong>${S("Champs concernés :")}</strong><ul><li>${ne.join("</li><li>")}</li></ul>`:S("Corrigez les erreurs");o.emit("show-popup",{title:S("Erreurs de validation"),message:xe}),ao("form_validation_error",{form_id:n.formId,operation_id:p.value,step:l.value+1,error_type:"validation_error"}),Fs("Alert","corrigez_les_erreurs")}const ae=v=>c_[v]??null;function ee(v){const E=v.save_to?s[v.save_to]:void 0;return E!==void 0&&E!==""}const re=pe(()=>{const v=S("noticetextlink"),E=G(c.value,v),x=n.rgpdMentions||c.value.custom?.rgpd_mentions;if(x&&x!=="<div><br></div>")return ho(x.replace("[notice]",E));const Q=R(String(c.value.dataManager||"Promodev")),ne=S("rgpd",{link:C.value}).replace(/<a\b[^>]*id=['"]noticelink['"][^>]*>[\s\S]*?<\/a>/i,E);return ho(`${Q} ${ne}`)});dt(l,v=>{n.testmode&&(n.testmode.currentStep=v)}),dt(()=>n.testmode?.gotoStep,v=>{typeof v=="number"&&v>=0&&v<a.value.length&&(v!==l.value&&(g.value=!1,l.value=v),n.testmode&&(n.testmode.gotoStep=null))}),dt(()=>n.testmode?.previewStatus,v=>{w.value&&typeof v=="string"&&(s.participationValide=v)});const $=Zp(c_);return dt(()=>c_,v=>$.value=v),(v,E)=>(U(),V("div",JB,[b.value?(U(),V("div",ZB,ve(b.value),1)):a.value.length>0?(U(),V("form",{key:1,novalidate:"",onFocusin:E[1]||(E[1]=x=>h(y)?.start()),onSubmit:zo(nt,["prevent"])},[!e.hideSteps&&a.value.length>1&&!e.multiColumn?(U(),V("div",QB,[(U(!0),V(et,null,yn(a.value,(x,Q)=>(U(),V("span",{key:Q,class:ut(["fb-progress-step",{"is-done":Q<l.value,"is-current":Q===l.value}])},null,2))),128))])):be("",!0),!e.hideSteps&&e.displayCurrentStep&&a.value[l.value].name?(U(),V("p",ej,ve(l.value+1)+"/"+ve(a.value.length),1)):be("",!0),!e.hideSteps&&a.value[l.value].name?(U(),V("h2",{key:2,class:"fb-step-title",innerHTML:a.value[l.value].name},null,8,tj)):!e.hideSteps&&a.value.length>1?(U(),V("p",nj,ve(e.stepMessage)+ve(l.value+1)+"/"+ve(a.value.length),1)):be("",!0),(U(!0),V(et,null,yn(a.value,(x,Q)=>Et((U(),V("div",{key:Q,class:ut(["fb-step",`fb-step-${Q}`])},[(U(!0),V(et,null,yn(x.fields,(Z,ne)=>(U(),V(et,{key:ne},[(Q===l.value||e.multiColumn)&&se(Z)&&Z.component!=="ApiField"&&ae(Z.component)?(U(),io(LT(ae(Z.component)),{key:0,field:Z,class:ut([{filled:ee(Z)},"fb-field-wrapper","fb-field--"+Z.save_to]),onPhoneVerification:Te},null,40,["field","class"])):be("",!0)],64))),128))],2)),[[kw,Q===l.value||e.multiColumn]])),128)),Ue()?(U(),V("p",rj," * "+ve(h(S)("champ_obligatoire")),1)):be("",!0),me("div",ij,[me("p",{class:"fb-rgpd","data-gab-path":"content.gdpr.mentions",innerHTML:re.value},null,8,oj)]),me("div",sj,[l.value>0?(U(),V("button",{key:0,type:"button",class:"fb-button fb-button--ghost",onClick:E[0]||(E[0]=x=>Me()),textContent:ve(z.value)},null,8,aj)):be("",!0),oe.value&&M.value?(U(),io(XB,{key:1,loading:d.value,type:"submit",variant:"primary"},{default:t2(()=>[In(ve(K.value),1)]),_:1},8,["loading"])):oe.value?(U(),V("button",{key:2,type:"submit",class:"fb-button fb-button--primary",textContent:ve(K.value)},null,8,lj)):be("",!0)])],32)):be("",!0),Ne(GB,{bus:h(o)},null,8,["bus"])]))}});function u_(e,t){return e.dataset[t]!==void 0&&e.dataset[t]!=="false"}function d_(){a9(),document.querySelectorAll("[data-houston-form]:not([data-fb-mounted])").forEach(e=>{const t=e.dataset.formId,n=e.dataset.server;if(!t||!n){console.warn("[form-builder-vue3] data-form-id et data-server requis.");return}e.setAttribute("data-fb-mounted","true");const r=tI(cj,{server:n,formId:t,submissionId:e.dataset.submissionId,uid:e.dataset.uid,multiColumn:u_(e,"multiColumn"),displayCurrentStep:u_(e,"displayCurrentStep"),hideError:u_(e,"hideError")});r.use(Pt);const i=e.dataset.sentryDsn;i&&Xx(r,{dsn:i}),r.mount(e)})}typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",d_):d_(),window.HoustonFormBuilder={mount:d_});const Ee=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,je=globalThis,Pi="10.51.0";function Mi(){return Jl(je),je}function Jl(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Pi,t[Pi]=t[Pi]||{}}function Ks(e,t,n=je){const r=n.__SENTRY__=n.__SENTRY__||{},i=r[Pi]=r[Pi]||{};return i[e]||(i[e]=t())}const f_=["debug","info","warn","error","log","assert","trace"],uj="Sentry Logger ",xd={};function Or(e){if(!("console"in je))return e();const t=je.console,n={},r=Object.keys(xd);r.forEach(i=>{const o=xd[i];n[i]=t[i],t[i]=o});try{return e()}finally{r.forEach(i=>{t[i]=n[i]})}}function dj(){m_().enabled=!0}function fj(){m_().enabled=!1}function F9(){return m_().enabled}function pj(...e){p_("log",...e)}function mj(...e){p_("warn",...e)}function _j(...e){p_("error",...e)}function p_(e,...t){Ee&&F9()&&Or(()=>{je.console[e](`${uj}[${e}]:`,...t)})}function m_(){return Ee?Ks("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const B={enable:dj,disable:fj,isEnabled:F9,log:pj,warn:mj,error:_j},U9=50,ri="?",B9=/\(error: (.*)\)/,j9=/captureMessage|captureException/;function q9(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,i=0)=>{const o=[],s=n.split(`
|
|
31
|
-
`);for(let a=r;a<s.length;a++){let l=s[a];l.length>1024&&(l=l.slice(0,1024));const c=
|
|
27
|
+
`,o=t.needIndent?t.needIndent:n!=="arrow",s=e.helpers||[],a=QO(e,{filename:r,breakLineCode:i,needIndent:o});a.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),a.indent(o),s.length>0&&(a.push(`const { ${v0(s.map(u=>`${u}: _${u}`),", ")} } = ctx`),a.newline()),a.push("return "),qs(a,e),a.deindent(o),a.push("}"),delete e.helpers;const{code:l,map:c}=a.context();return{ast:e,code:l,map:c?c.toJSON():void 0}};function oP(e,t={}){const n=Kt({},t),r=!!n.jit,i=!!n.minify,o=n.optimize==null?!0:n.optimize,a=KO(n).parse(e);return r?(o&&ZO(a),i&&js(a),{ast:a,code:""}):(JO(a,n),iP(a,n))}function sP(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(co().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(co().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function Qo(e){return at(e)&&T0(e)===0&&(_r(e,"b")||_r(e,"body"))}const Zv=["b","body"];function aP(e){return uo(e,Zv)}const Qv=["c","cases"];function lP(e){return uo(e,Qv,[])}const e3=["s","static"];function cP(e){return uo(e,e3)}const t3=["i","items"];function uP(e){return uo(e,t3,[])}const n3=["t","type"];function T0(e){return uo(e,n3)}const r3=["v","value"];function gd(e,t){const n=uo(e,r3);if(n!=null)return n;throw ql(t)}const i3=["m","modifier"];function dP(e){return uo(e,i3)}const o3=["k","key"];function fP(e){const t=uo(e,o3);if(t)return t;throw ql(6)}function uo(e,t,n){for(let r=0;r<t.length;r++){const i=t[r];if(_r(e,i)&&e[i]!=null)return e[i]}return n}const s3=[...Zv,...Qv,...e3,...t3,...o3,...i3,...r3,...n3];function ql(e){return new Error(`unhandled node type: ${e}`)}function w0(e){return n=>pP(n,e)}function pP(e,t){const n=aP(t);if(n==null)throw ql(0);if(T0(n)===1){const o=lP(n);return e.plural(o.reduce((s,a)=>[...s,a3(e,a)],[]))}else return a3(e,n)}function a3(e,t){const n=cP(t);if(n!=null)return e.type==="text"?n:e.normalize([n]);{const r=uP(t).reduce((i,o)=>[...i,I0(e,o)],[]);return e.normalize(r)}}function I0(e,t){const n=T0(t);switch(n){case 3:return gd(t,n);case 9:return gd(t,n);case 4:{const r=t;if(_r(r,"k")&&r.k)return e.interpolate(e.named(r.k));if(_r(r,"key")&&r.key)return e.interpolate(e.named(r.key));throw ql(n)}case 5:{const r=t;if(_r(r,"i")&&Qt(r.i))return e.interpolate(e.list(r.i));if(_r(r,"index")&&Qt(r.index))return e.interpolate(e.list(r.index));throw ql(n)}case 6:{const r=t,i=dP(r),o=fP(r);return e.linked(I0(e,o),i?I0(e,i):void 0,e.type)}case 7:return gd(t,n);case 8:return gd(t,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const mP=e=>e;let yd=$t();function _P(e,t={}){let n=!1;const r=t.onError||LO;return t.onError=i=>{n=!0,r(i)},{...oP(e,t),detectError:n}}function hP(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&Oe(e)){wt(t.warnHtmlMessage)&&t.warnHtmlMessage;const r=(t.onCacheKey||mP)(e),i=yd[r];if(i)return i;const{ast:o,detectError:s}=_P(e,{...t,location:!1,jit:!0}),a=w0(o);return s?a:yd[r]=a}else{if(!Qo(e))return(()=>e);const n=e.cacheKey;if(n){const r=yd[n];return r||(yd[n]=w0(e))}else return w0(e)}}let zl=null;function gP(e){zl=e}function yP(e,t,n){zl&&zl.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})}const bP=vP("function:translate");function vP(e){return t=>zl&&zl.emit(e,t)}const Ai={INVALID_ARGUMENT:MO,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},$P=24;function xi(e){return hd(e,null,void 0)}function A0(e,t){return t.locale!=null?l3(t.locale):l3(e.locale)}let x0;function l3(e){if(Oe(e))return e;if(Ut(e)){if(e.resolvedOnce&&x0!=null)return x0;if(e.constructor.name==="Function"){const t=e();if(mO(t))throw xi(Ai.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return x0=t}else throw xi(Ai.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw xi(Ai.NOT_SUPPORT_LOCALE_TYPE)}function SP(e,t,n){return[...new Set([n,...Ft(t)?t:at(t)?Object.keys(t).filter(r=>r!=="default"):Oe(t)?[t]:[n]])]}function EP(e,t,n){const r=Oe(n)?n:Hl,i=e;let o;at(t)?(i.__localeChainObjectCache||(i.__localeChainObjectCache=new WeakMap),o=i.__localeChainObjectCache.get(t),o||(o=new Map,i.__localeChainObjectCache.set(t,o))):(i.__localeChainCache||(i.__localeChainCache=new Map),o=i.__localeChainCache.get(t),o||(o=new Map,i.__localeChainCache.set(t,o)));const s=o.get(r);if(s)return s;const a=[];let l=[n];for(;Ft(l);)l=c3(a,l,t);const c=Ft(t)||!xt(t)?t:t.default?t.default:null;return l=Oe(c)?[c]:c,Ft(l)&&c3(a,l,!1),o.set(r,a),a}function c3(e,t,n){let r=!0;for(let i=0;i<t.length&&wt(r);i++){const o=t[i];Oe(o)&&(r=TP(e,t[i],n))}return r}function TP(e,t,n){let r;const i=t.split("-");do{const o=i.join("-");r=wP(e,o,n),i.splice(-1,1)}while(i.length&&r===!0);return r}function wP(e,t,n){let r=!1;if(!e.includes(t)&&(r=!0,t)){r=t[t.length-1]!=="!";const i=t.replace(/!/g,"");e.push(i),(Ft(n)||xt(n))&&n[i]&&(r=n[i])}return r}const fo=[];fo[0]={w:[0],i:[3,0],"[":[4],o:[7]},fo[1]={w:[1],".":[2],"[":[4],o:[7]},fo[2]={w:[2],i:[3,0],0:[3,0]},fo[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},fo[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},fo[5]={"'":[4,0],o:8,l:[5,0]},fo[6]={'"':[4,0],o:8,l:[6,0]};const IP=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function AP(e){return IP.test(e)}function xP(e){const t=e.charCodeAt(0),n=e.charCodeAt(e.length-1);return t===n&&(t===34||t===39)?e.slice(1,-1):e}function CP(e){if(e==null)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function kP(e){const t=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:AP(t)?xP(t):"*"+t}function NP(e){const t=[];let n=-1,r=0,i=0,o,s,a,l,c,u,d;const f=[];f[0]=()=>{s===void 0?s=a:s+=a},f[1]=()=>{s!==void 0&&(t.push(s),s=void 0)},f[2]=()=>{f[0](),i++},f[3]=()=>{if(i>0)i--,r=4,f[0]();else{if(i=0,s===void 0||(s=kP(s),s===!1))return!1;f[1]()}};function p(){const m=e[n+1];if(r===5&&m==="'"||r===6&&m==='"')return n++,a="\\"+m,f[0](),!0}for(;r!==null;)if(n++,o=e[n],!(o==="\\"&&p())){if(l=CP(o),d=fo[r],c=d[l]||d.l||8,c===8||(r=c[0],c[1]!==void 0&&(u=f[c[1]],u&&(a=o,u()===!1))))return;if(r===7)return t}}const u3=new Map;function RP(e,t){return at(e)?mn(e,t):null}function OP(e,t){if(!at(e))return null;let n=u3.get(t);if(n||(n=NP(t),n&&u3.set(t,n)),!n)return null;const r=n.length;let i=e,o=0;for(;o<r;){const s=n[o];if(s3.includes(s)&&Qo(i)||!at(i)||!_r(i,s))return null;const a=i[s];if(a===void 0||Ut(i))return null;i=a,o++}return i}const PP="11.4.17",bd=-1,Hl="en-US",vd="",d3=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function MP(){return{upper:(e,t)=>t==="text"&&Oe(e)?e.toUpperCase():t==="vnode"&&at(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&Oe(e)?e.toLowerCase():t==="vnode"&&at(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&Oe(e)?d3(e):t==="vnode"&&at(e)&&"__v_isVNode"in e?d3(e.children):e}}let f3;function LP(e){f3=e}let p3;function DP(e){p3=e}let m3;function FP(e){m3=e}let _3=null;const UP=e=>{_3=e},BP=()=>_3;let h3=null;const g3=e=>{h3=e},jP=()=>h3;let y3=0;function qP(e={}){const t=Ut(e.onWarn)?e.onWarn:hO,n=Oe(e.version)?e.version:PP,r=Oe(e.locale)||Ut(e.locale)?e.locale:Hl,i=Ut(r)?Hl:r,o=Ft(e.fallbackLocale)||xt(e.fallbackLocale)||Oe(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:i,s=xt(e.messages)?e.messages:C0(i),a=xt(e.datetimeFormats)?e.datetimeFormats:C0(i),l=xt(e.numberFormats)?e.numberFormats:C0(i),c=Kt($t(),e.modifiers,MP()),u=e.pluralRules||$t(),d=Ut(e.missing)?e.missing:null,f=wt(e.missingWarn)||Zo(e.missingWarn)?e.missingWarn:!0,p=wt(e.fallbackWarn)||Zo(e.fallbackWarn)?e.fallbackWarn:!0,m=!!e.fallbackFormat,b=!!e.unresolving,g=Ut(e.postTranslation)?e.postTranslation:null,_=xt(e.processor)?e.processor:null,y=wt(e.warnHtmlMessage)?e.warnHtmlMessage:!0,T=!!e.escapeParameter,S=Ut(e.messageCompiler)?e.messageCompiler:f3,O=Ut(e.messageResolver)?e.messageResolver:p3||RP,N=Ut(e.localeFallbacker)?e.localeFallbacker:m3||SP,w=at(e.fallbackContext)?e.fallbackContext:void 0,D=e,Y=at(D.__datetimeFormatters)?D.__datetimeFormatters:new Map,q=at(D.__numberFormatters)?D.__numberFormatters:new Map,P=at(D.__meta)?D.__meta:{};y3++;const C={version:n,cid:y3,locale:r,fallbackLocale:o,messages:s,modifiers:c,pluralRules:u,missing:d,missingWarn:f,fallbackWarn:p,fallbackFormat:m,unresolving:b,postTranslation:g,processor:_,warnHtmlMessage:y,escapeParameter:T,messageCompiler:S,messageResolver:O,localeFallbacker:N,fallbackContext:w,onWarn:t,__meta:P};return C.datetimeFormats=a,C.numberFormats=l,C.__datetimeFormatters=Y,C.__numberFormatters=q,__INTLIFY_PROD_DEVTOOLS__&&yP(C,n,P),C}const C0=e=>({[e]:$t()});function b3(e,t,n,r,i){const{missing:o,onWarn:s}=e;if(o!==null){const a=o(e,n,t,i);return Oe(a)?a:t}else return t}function v3(e,t){const n=e;at(t)?n.__localeChainObjectCache?.delete(t):n.__localeChainCache?.delete(t)}function $d(e,t,n){v3(e,n),e.fallbackContext&&v3(e.fallbackContext,n),e.localeFallbacker(e,n,t)}function zP(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function HP(e,t){const n=t.indexOf(e);if(n===-1)return!1;for(let r=n+1;r<t.length;r++)if(zP(e,t[r]))return!0;return!1}function $3(e,t,n,r,i,o,s){const{fallbackLocale:a,localeFallbacker:l,onWarn:c}=e,u=l(e,a,n);for(let d=0;d<u.length;d++){const f=u[d],p=mn(mn(r,f)||{},t);if(xt(p)&&Oe(f))return f;b3(e,t,f,i,s)}return null}function S3(e,t,n){let r=`${e}__${t}`;return xt(n)&&!y0(n)&&(r=`${r}__${JSON.stringify(n)}`),r}function E3(e,t,n){for(const r in n){const i=`${t}__${r}`;for(const o of e.keys())(o===i||o.startsWith(`${i}__`))&&e.delete(o)}}function T3(e,t,n,r){const[,i,o,s]=e;let a=n;return Oe(i)?t.key=i:xt(i)&&Object.keys(i).forEach(l=>{r.includes(l)?a[l]=i[l]:t[l]=i[l]}),Oe(o)?t.locale=o:xt(o)&&(a=o),xt(s)&&(a=s),a}function w3(e,...t){const{datetimeFormats:n,unresolving:r,onWarn:i}=e,{__datetimeFormatters:o}=e;if(!Oe(t[0])&&!qv(t[0])&&!Qt(t[0]))return vd;const[s,a,l,c]=k0(...t),u=wt(l.missingWarn)?l.missingWarn:e.missingWarn,d=wt(l.fallbackWarn)?l.fallbackWarn:e.fallbackWarn,f=!!l.part,p=A0(e,l);if(!Oe(s)||s===""){const y=new Intl.DateTimeFormat(p.replace(/!/g,""),c);return f?y.formatToParts(a):y.format(a)}const m=$3(e,s,p,n,u,d,"datetime format");if(!Oe(m))return r?bd:s;const b=n[m][s],g=S3(m,s,c);let _=o.get(g);return _||(_=new Intl.DateTimeFormat(m,Kt({},b,c)),o.set(g,_)),f?_.formatToParts(a):_.format(a)}const I3=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function k0(...e){const[t]=e,n=$t(),r=$t();let i;if(Oe(t)){const s=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!s)throw xi(Ai.INVALID_ISO_DATE_ARGUMENT);const a=s[3]?s[3].trim().startsWith("T")?`${s[1].trim()}${s[3].trim()}`:`${s[1].trim()}T${s[3].trim()}`:s[1].trim();i=new Date(a);try{i.toISOString()}catch{throw xi(Ai.INVALID_ISO_DATE_ARGUMENT)}}else if(qv(t)){if(isNaN(t.getTime()))throw xi(Ai.INVALID_DATE_ARGUMENT);i=t}else if(Qt(t))i=t;else throw xi(Ai.INVALID_ARGUMENT);const o=T3(e,n,r,I3);return[n.key||"",i,n,o]}function A3(e,t,n){E3(e.__datetimeFormatters,t,n)}function x3(e,...t){const{numberFormats:n,unresolving:r,onWarn:i}=e,{__numberFormatters:o}=e;if(!Qt(t[0]))return vd;const[s,a,l,c]=N0(...t),u=wt(l.missingWarn)?l.missingWarn:e.missingWarn,d=wt(l.fallbackWarn)?l.fallbackWarn:e.fallbackWarn,f=!!l.part,p=A0(e,l);if(!Oe(s)||s===""){const y=new Intl.NumberFormat(p.replace(/!/g,""),c);return f?y.formatToParts(a):y.format(a)}const m=$3(e,s,p,n,u,d,"number format");if(!Oe(m))return r?bd:s;const b=n[m][s],g=S3(m,s,c);let _=o.get(g);return _||(_=new Intl.NumberFormat(m,Kt({},b,c)),o.set(g,_)),f?_.formatToParts(a):_.format(a)}const C3=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function N0(...e){const[t]=e,n=$t(),r=$t();if(!Qt(t))throw xi(Ai.INVALID_ARGUMENT);const i=t,o=T3(e,n,r,C3);return[n.key||"",i,n,o]}function k3(e,t,n){E3(e.__numberFormatters,t,n)}const VP=e=>e,WP=e=>"",GP="text",YP=e=>e.length===0?"":v0(e),KP=_O;function R0(e,t){return e=Math.abs(e),t===2?e===1?0:1:Math.min(e,2)}function XP(e){const t=Qt(e.pluralIndex)?e.pluralIndex:-1;return Qt(e.named?.count)?e.named.count:Qt(e.named?.n)?e.named.n:t}function JP(e={}){const t=e.locale,n=XP(e),r=Oe(t)&&e.pluralRules&&Ut(mn(e.pluralRules,t))?e.pluralRules[t]:R0,i=r===R0?void 0:R0,o=y=>y[r(n,y.length,i)],s=e.list||[],a=y=>s[y],l=e.named||$t(),c=Qt(e.pluralIndex),u=y=>{const T=Hv(y)?mn(l,y):l[y];return c&&!T&&(y==="count"||y==="n")?e.pluralIndex:T};function d(y,T){const S=Ut(e.messages)?e.messages(y,!!T):at(e.messages)?e.messages[y]:!1;return S||(e.parent?e.parent.message(y):WP)}const f=y=>e.modifiers?mn(e.modifiers,y):VP,p=Ut(e.processor?.normalize)?e.processor.normalize:YP,m=Ut(e.processor?.interpolate)?e.processor.interpolate:KP,b=Oe(e.processor?.type)?e.processor.type:GP,_={list:a,named:u,plural:o,linked:(y,...T)=>{const[S,O]=T;let N="text",w="";T.length===1?at(S)?(w=S.modifier||w,N=S.type||N):Oe(S)&&(w=S||w):T.length===2&&(Oe(S)&&(w=S||w),Oe(O)&&(N=O||N));const D=d(y,!0)(_),Y=D===""||D===void 0?y:D,q=N==="vnode"&&Ft(Y)&&w?Y[0]:Y;if(!w)return q;const P=f(w);return Ut(P)?P(q,N):q},message:d,type:b,interpolate:m,normalize:p,values:Kt($t(),s,l,c?{count:u("count"),n:u("n")}:{})};return _}const N3=()=>"",Ci=e=>Ut(e),Sd=e=>Oe(e)||Qo(e)||Ci(e);function R3(e,...t){const{fallbackFormat:n,postTranslation:r,unresolving:i,messageCompiler:o,fallbackLocale:s,messages:a}=e,[l,c]=O0(...t),u=wt(c.missingWarn)?c.missingWarn:e.missingWarn,d=wt(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,f=wt(c.escapeParameter)?c.escapeParameter:e.escapeParameter,p=!!c.resolvedMessage,m=Oe(c.default)||wt(c.default)?wt(c.default)?o?l:()=>l:c.default:n?o?l:()=>l:null,b=n||m!=null&&(Oe(m)||Ut(m)),g=A0(e,c);f&&ZP(c);let[_,y,T]=p?[l,g,mn(a,g)||$t()]:O3(e,l,g,s,d,u),S=_,O=l;if(!p&&!Sd(S)&&b&&(S=m,O=S),!p&&(!Sd(S)||!Oe(y)))return i?bd:l;let N=!1;const w=()=>{N=!0},D=Ci(S)?S:P3(e,l,y,S,O,w);if(N)return S;const Y=tM(e,y,T,c),q=JP(Y),P=QP(e,D,q);let C=r?r(P,l):P;if(f&&Oe(C)&&(C=OO(C)),__INTLIFY_PROD_DEVTOOLS__){const F={timestamp:Date.now(),key:Oe(l)?l:Ci(S)?S.key:"",locale:y||(Ci(S)?S.locale:""),format:Oe(S)?S:Ci(S)?S.source:"",message:C};F.meta=Kt({},e.__meta,BP()||{}),bP(F)}return C}function ZP(e){if(Ft(e.list)&&(e.list=e.list.map(t=>Oe(t)?Wv(t):t)),at(e.named)){const t=e.named,n=$t();for(const r of Object.keys(t)){const i=t[r];n[r]=Oe(i)?Wv(i):i}e.named=n}}function O3(e,t,n,r,i,o){const{messages:s,onWarn:a,messageResolver:l,localeFallbacker:c}=e,u=c(e,r,n);let d=$t(),f,p=null;const m="translate";for(let b=0;b<u.length&&(f=u[b],d=mn(s,f)||$t(),(p=l(d,t))===null&&(p=mn(d,t)),!Sd(p));b++)if(!HP(f,u)){const g=b3(e,t,f,o,m);g!==t&&(p=g)}return[p,f,d]}function P3(e,t,n,r,i,o){const{messageCompiler:s,warnHtmlMessage:a}=e;if(Ci(r)){const c=r;return c.locale=c.locale||n,c.key=c.key||t,c}if(s==null){const c=(()=>r);return c.locale=n,c.key=t,c}const l=s(r,eM(e,n,i,r,a,o));return l.locale=n,l.key=t,l.source=r,l}function QP(e,t,n){return t(n)}function O0(...e){const[t,n,r]=e,i=$t();if(!Oe(t)&&!Qt(t)&&!Ci(t)&&!Qo(t))throw xi(Ai.INVALID_ARGUMENT);const o=Qt(t)?String(t):(Ci(t),t);return Qt(n)?i.plural=n:Oe(n)?i.default=n:xt(n)&&!y0(n)?i.named=n:Ft(n)&&(i.list=n),Qt(r)?i.plural=r:Oe(r)?i.default=r:xt(r)&&Kt(i,r),[o,i]}function eM(e,t,n,r,i,o){return{locale:t,key:n,warnHtmlMessage:i,onError:s=>{throw o&&o(s),s},onCacheKey:s=>uO(t,n,s)}}function tM(e,t,n,r){const{modifiers:i,pluralRules:o,messageResolver:s,fallbackLocale:a,fallbackWarn:l,missingWarn:c,fallbackContext:u}=e,f={locale:t,modifiers:i,pluralRules:o,messages:(p,m)=>{let b=s(n,p);if(b==null&&(u||m)){const[g,,_]=O3(u||e,p,t,a,l,c);b=g??s(_,p)}if(Oe(b)||Qo(b)){let g=!1;const y=P3(e,p,t,b,p,()=>{g=!0});return g?N3:y}else return Ci(b)?b:N3}};return e.processor&&(f.processor=e.processor),r.list&&(f.list=r.list),r.named&&(f.named=r.named),Qt(r.plural)&&(f.pluralIndex=r.plural),f}sP();const nM="11.4.17";function rM(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(co().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(co().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(co().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(co().__INTLIFY_PROD_DEVTOOLS__=!1)}const jn={UNEXPECTED_RETURN_TYPE:$P,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function Yn(e,...t){return hd(e,null,void 0)}const P0=lo("__translateVNode"),M0=lo("__datetimeParts"),L0=lo("__numberParts"),M3=lo("__setPluralRules"),L3=lo("__injectWithOption"),zs=lo("__dispose");let D3=null;{const e=co().__VUE_INSTANCE_SETTERS__;Ft(e)&&e.push(t=>{D3=t})}function po(e){return!!Hv(e)}function Vl(e){if(!at(e)||Qo(e))return e;for(const t in e)if(_r(e,t))if(!t.includes("."))at(e[t])&&Vl(e[t]);else{const n=t.split("."),r=n.length-1;let i=e,o=!1;for(let a=0;a<r;a++){if(n[a]==="__proto__")throw new Error(`unsafe key: ${n[a]}`);if(n[a]in i||(i[n[a]]=$t()),!at(i[n[a]])){o=!0;break}if(Qo(i[n[a]])&&(s3.includes(n[a+1])||n[a+1]==="cacheKey")){o=!0;break}i=i[n[a]]}o||(i[n[r]]=e[t],delete e[t]);const s=i[n[r]];at(s)&&Vl(s)}return e}function D0(e,t){const{messages:n,__i18n:r,messageResolver:i,flatJson:o}=t,s=xt(n)?n:Ft(r)?$t():{[e]:$t()};if(Ft(r)&&r.forEach(a=>{if("locale"in a&&"resource"in a){const{locale:l,resource:c}=a;if(l){if(po(l))return;s[l]=mn(s,l)||$t(),_d(c,s[l])}else _d(c,s)}else Oe(a)&&_d(JSON.parse(a),s)}),i==null&&o)for(const a in s)_r(s,a)&&Vl(s[a]);return s}function F3(e){return e.type}function U3(e,t,n){let r=at(t.messages)?t.messages:$t();"__i18nGlobal"in n&&(r=D0(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const i=Object.keys(r);i.length&&i.forEach(o=>{e.mergeLocaleMessage(o,r[o])});{if(at(t.datetimeFormats)){const o=Object.keys(t.datetimeFormats);o.length&&o.forEach(s=>{e.mergeDateTimeFormat(s,t.datetimeFormats[s])})}if(at(t.numberFormats)){const o=Object.keys(t.numberFormats);o.length&&o.forEach(s=>{e.mergeNumberFormat(s,t.numberFormats[s])})}}}function B3(e){return Ne(cl,null,e,0)}function Wl(){return D3??Os()}const j3="__INTLIFY_META__",q3=()=>[],iM=()=>!1;let z3=0;function H3(e){return((t,n,r,i)=>e(n,r,Wl()||void 0,i))}const oM=()=>{const e=Wl();let t=null;return e&&(t=F3(e)[j3])?{[j3]:t}:null};function Ed(e={}){const{__root:t,__injectWithOption:n}=e,r=t===void 0,i=e.flatJson,o=md?Re:Zp;let s=wt(e.inheritLocale)?e.inheritLocale:!0;const a=o(t&&s?t.locale.value:Oe(e.locale)?e.locale:Hl),l=o(t&&s?t.fallbackLocale.value:Oe(e.fallbackLocale)||Ft(e.fallbackLocale)||xt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:a.value),c=o(D0(a.value,e)),u=o(xt(e.datetimeFormats)?e.datetimeFormats:{[a.value]:{}}),d=o(xt(e.numberFormats)?e.numberFormats:{[a.value]:{}});let f=t?t.missingWarn:wt(e.missingWarn)||Zo(e.missingWarn)?e.missingWarn:!0,p=t?t.fallbackWarn:wt(e.fallbackWarn)||Zo(e.fallbackWarn)?e.fallbackWarn:!0,m=t?t.fallbackRoot:wt(e.fallbackRoot)?e.fallbackRoot:!0,b=!!e.fallbackFormat,g=Ut(e.missing)?e.missing:null,_=Ut(e.missing)?H3(e.missing):null,y=Ut(e.postTranslation)?e.postTranslation:null,T=t?t.warnHtmlMessage:wt(e.warnHtmlMessage)?e.warnHtmlMessage:!0,S=!!e.escapeParameter;const O=t?t.modifiers:xt(e.modifiers)?e.modifiers:{};let N=e.pluralRules||t&&t.pluralRules,w;w=(()=>{r&&g3(null);const J={version:nM,locale:a.value,fallbackLocale:l.value,messages:c.value,modifiers:O,pluralRules:N,missing:_===null?void 0:_,missingWarn:f,fallbackWarn:p,fallbackFormat:b,unresolving:!0,postTranslation:y===null?void 0:y,warnHtmlMessage:T,escapeParameter:S,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};J.datetimeFormats=u.value,J.numberFormats=d.value;const ie=qP(J);return r&&g3(ie),ie})(),$d(w,a.value,l.value);function Y(){return[a.value,l.value,c.value,u.value,d.value]}const q=pe({get:()=>a.value,set:J=>{w.locale=J,a.value=J}});function P(J){r||(w.fallbackContext=jP());try{return J()}finally{r||(w.fallbackContext=void 0)}}function C(J){P(()=>$d(w,a.value,J))}const F=pe({get:()=>l.value,set:J=>{l.value=J,w.fallbackLocale=l.value,C(l.value)}}),R=pe(()=>c.value),G=pe(()=>u.value),z=pe(()=>d.value);function K(){return Ut(y)?y:null}function M(J){y=J,w.postTranslation=J}function oe(){return g}function te(J){J!==null&&(_=H3(J)),g=J,w.missing=_}const se=(J,ie,Be,He,H,W)=>{Y();let ue;try{__INTLIFY_PROD_DEVTOOLS__,ue=P(()=>J(w))}finally{__INTLIFY_PROD_DEVTOOLS__}if(Be!=="translate exists"&&Qt(ue)&&ue===bd||Be==="translate exists"&&!ue){const[Ae,ke]=ie();return t&&m?He(t):H(Ae)}else{if(W(ue))return ue;throw Yn(jn.UNEXPECTED_RETURN_TYPE)}};function _e(...J){return se(ie=>Reflect.apply(R3,null,[ie,...J]),()=>O0(...J),"translate",ie=>Reflect.apply(ie.t,ie,[...J]),ie=>ie,ie=>Oe(ie))}function ce(...J){const[ie,Be,He]=J;if(He&&!at(He))throw Yn(jn.INVALID_ARGUMENT);return _e(ie,Be,Kt({resolvedMessage:!0},He||{}))}function ye(...J){return se(ie=>Reflect.apply(w3,null,[ie,...J]),()=>k0(...J),"datetime format",ie=>Reflect.apply(ie.d,ie,[...J]),()=>vd,ie=>Oe(ie)||Ft(ie))}function Te(...J){return se(ie=>Reflect.apply(x3,null,[ie,...J]),()=>N0(...J),"number format",ie=>Reflect.apply(ie.n,ie,[...J]),()=>vd,ie=>Oe(ie)||Ft(ie))}function le(J){return J.map(ie=>Oe(ie)||Qt(ie)||wt(ie)?B3(String(ie)):ie)}const Ce={normalize:le,interpolate:J=>J,type:"vnode"};function Me(...J){return se(ie=>{let Be;const He=ie;try{He.processor=Ce,Be=Reflect.apply(R3,null,[He,...J])}finally{He.processor=null}return Be},()=>O0(...J),"translate",ie=>ie[P0](...J),ie=>[B3(ie)],ie=>Ft(ie))}function Ue(...J){return se(ie=>Reflect.apply(x3,null,[ie,...J]),()=>N0(...J),"number format",ie=>ie[L0](...J),q3,ie=>Oe(ie)||Ft(ie))}function nt(...J){return se(ie=>Reflect.apply(w3,null,[ie,...J]),()=>k0(...J),"datetime format",ie=>ie[M0](...J),q3,ie=>Oe(ie)||Ft(ie))}function A(J){N=J,w.pluralRules=N}function k(J,ie){const Be=re(J),He=w.messageResolver(Be,ie);return He===null?mn(Be,ie):He}function X(J,ie){return se(()=>{if(!J)return!1;const Be=Oe(ie)?ie:a.value,He=Oe(ie)?[Be]:w.localeFallbacker(w,l.value,Be);for(let H=0;H<He.length;H++)if(Sd(k(He[H],J)))return!0;return!1},()=>[J],"translate exists",Be=>Reflect.apply(Be.te,Be,[J,ie]),iM,Be=>wt(Be))}function ae(J){let ie=null;const Be=w.localeFallbacker(w,l.value,a.value);for(let He=0;He<Be.length;He++){const H=k(Be[He],J);if(H!=null){ie=H;break}}return ie}function ee(J){const ie=ae(J);return ie??(t?t.tm(J)||{}:{})}function re(J){return mn(c.value,J)||{}}function $(J,ie){po(J)||(i&&Vl(ie),c.value[J]=ie,w.messages=c.value)}function v(J,ie){po(J)||(c.value[J]=mn(c.value,J)||{},i&&Vl(ie),_d(ie,c.value[J]),w.messages=c.value)}function E(J){return mn(u.value,J)||{}}function x(J,ie){po(J)||(u.value[J]=ie,w.datetimeFormats=u.value,A3(w,J,ie))}function Q(J,ie){po(J)||(u.value[J]=Kt(mn(u.value,J)||{},ie),w.datetimeFormats=u.value,A3(w,J,ie))}function Z(J){return mn(d.value,J)||{}}function ne(J,ie){po(J)||(d.value[J]=ie,w.numberFormats=d.value,k3(w,J,ie))}function xe(J,ie){po(J)||(d.value[J]=Kt(mn(d.value,J)||{},ie),w.numberFormats=d.value,k3(w,J,ie))}z3++,dt(l,()=>C(l.value),{deep:!0,flush:"sync"}),t&&md&&(dt(t.locale,J=>{s&&(a.value=J,w.locale=J,$d(w,a.value,l.value))}),dt(t.fallbackLocale,J=>{s&&(l.value=J,w.fallbackLocale=l.value,$d(w,a.value,l.value))}));const Se={id:z3,locale:q,fallbackLocale:F,get inheritLocale(){return s},set inheritLocale(J){s=J,J&&t&&(q.value=t.locale.value,F.value=t.fallbackLocale.value)},get availableLocales(){return Object.keys(c.value).sort()},messages:R,get modifiers(){return O},get pluralRules(){return N||{}},get isGlobal(){return r},get missingWarn(){return f},set missingWarn(J){f=J,w.missingWarn=f},get fallbackWarn(){return p},set fallbackWarn(J){p=J,w.fallbackWarn=p},get fallbackRoot(){return m},set fallbackRoot(J){m=J},get fallbackFormat(){return b},set fallbackFormat(J){b=J,w.fallbackFormat=b},get warnHtmlMessage(){return T},set warnHtmlMessage(J){T=J,w.warnHtmlMessage=J},get escapeParameter(){return S},set escapeParameter(J){S=J,w.escapeParameter=J},t:_e,getLocaleMessage:re,setLocaleMessage:$,mergeLocaleMessage:v,getPostTranslationHandler:K,setPostTranslationHandler:M,getMissingHandler:oe,setMissingHandler:te,[M3]:A};return Se.datetimeFormats=G,Se.numberFormats=z,Se.rt=ce,Se.te=X,Se.tm=ee,Se.d=ye,Se.n=Te,Se.getDateTimeFormat=E,Se.setDateTimeFormat=x,Se.mergeDateTimeFormat=Q,Se.getNumberFormat=Z,Se.setNumberFormat=ne,Se.mergeNumberFormat=xe,Se[L3]=n,Se[P0]=Me,Se[M0]=nt,Se[L0]=Ue,Se}const F0=new WeakMap;function Hs(e){if(!Zo(e))return!e;let t=F0.get(e);return t||(t=new RegExp(`^(?![\\s\\S]*(?:${e.source}))`,e.flags.replace(/[gy]/g,"")),F0.set(e,t),F0.set(t,e)),t}function sM(e){const t=Oe(e.locale)?e.locale:Hl,n=Oe(e.fallbackLocale)||Ft(e.fallbackLocale)||xt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,r=Ut(e.missing)?e.missing:void 0,i=wt(e.silentTranslationWarn)||Zo(e.silentTranslationWarn)?Hs(e.silentTranslationWarn):!0,o=wt(e.silentFallbackWarn)||Zo(e.silentFallbackWarn)?Hs(e.silentFallbackWarn):!0,s=wt(e.fallbackRoot)?e.fallbackRoot:!0,a=!!e.formatFallbackMessages,l=xt(e.modifiers)?e.modifiers:{},c=e.pluralizationRules,u=Ut(e.postTranslation)?e.postTranslation:void 0,d=Oe(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,f=!!e.escapeParameterHtml,p=wt(e.sync)?e.sync:!0;let m=e.messages;if(xt(e.sharedMessages)){const O=e.sharedMessages;m=Object.keys(O).reduce((w,D)=>{if(po(D))return w;const Y=mn(w,D)||(w[D]={});return Kt(Y,O[D]),w},m||{})}const{__i18n:b,__root:g,__injectWithOption:_}=e,y=e.datetimeFormats,T=e.numberFormats,S=e.flatJson;return{locale:t,fallbackLocale:n,messages:m,flatJson:S,datetimeFormats:y,numberFormats:T,missing:r,missingWarn:i,fallbackWarn:o,fallbackRoot:s,fallbackFormat:a,modifiers:l,pluralRules:c,postTranslation:u,warnHtmlMessage:d,escapeParameter:f,messageResolver:e.messageResolver,inheritLocale:p,__i18n:b,__root:g,__injectWithOption:_}}function U0(e={}){const t=Ed(sM(e)),{__extender:n}=e,r={id:t.id,get locale(){return t.locale.value},set locale(i){t.locale.value=i},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(i){t.fallbackLocale.value=i},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(i){t.setMissingHandler(i)},get silentTranslationWarn(){return Hs(t.missingWarn)},set silentTranslationWarn(i){t.missingWarn=Hs(i)},get silentFallbackWarn(){return Hs(t.fallbackWarn)},set silentFallbackWarn(i){t.fallbackWarn=Hs(i)},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(i){t.fallbackFormat=i},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(i){t.setPostTranslationHandler(i)},get sync(){return t.inheritLocale},set sync(i){t.inheritLocale=i},get warnHtmlInMessage(){return t.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(i){t.warnHtmlMessage=i!=="off"},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(i){t.escapeParameter=i},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...i){return Reflect.apply(t.t,t,[...i])},rt(...i){return Reflect.apply(t.rt,t,[...i])},te(i,o){return t.te(i,o)},tm(i){return t.tm(i)},getLocaleMessage(i){return t.getLocaleMessage(i)},setLocaleMessage(i,o){t.setLocaleMessage(i,o)},mergeLocaleMessage(i,o){t.mergeLocaleMessage(i,o)},d(...i){return Reflect.apply(t.d,t,[...i])},getDateTimeFormat(i){return t.getDateTimeFormat(i)},setDateTimeFormat(i,o){t.setDateTimeFormat(i,o)},mergeDateTimeFormat(i,o){t.mergeDateTimeFormat(i,o)},n(...i){return Reflect.apply(t.n,t,[...i])},getNumberFormat(i){return t.getNumberFormat(i)},setNumberFormat(i,o){t.setNumberFormat(i,o)},mergeNumberFormat(i,o){t.mergeNumberFormat(i,o)}};return r.__extender=n,r}function aM(e,t,n){return{beforeCreate(){const r=Wl();if(!r)throw Yn(jn.UNEXPECTED_ERROR);const i=this.$options;if(i.i18n){const o=Kt({},i.i18n);if(i.__i18n&&(o.__i18n=i.__i18n),o.__root=t,this===this.$root)this.$i18n=V3(e,o);else{o.__injectWithOption=!0,o.__extender=n.__vueI18nExtend,this.$i18n=U0(o);const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}}else if(i.__i18n)if(this===this.$root)this.$i18n=V3(e,i);else{this.$i18n=U0({__i18n:i.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const o=this.$i18n;o.__extender&&(o.__disposer=o.__extender(this.$i18n))}else this.$i18n=e;i.__i18nGlobal&&U3(t,i,i),this.$t=(...o)=>this.$i18n.t(...o),this.$rt=(...o)=>this.$i18n.rt(...o),this.$te=(o,s)=>this.$i18n.te(o,s),this.$d=(...o)=>this.$i18n.d(...o),this.$n=(...o)=>this.$i18n.n(...o),this.$tm=o=>this.$i18n.tm(o),n.__setInstance(r,this.$i18n)},mounted(){},unmounted(){const r=Wl();if(!r)throw Yn(jn.UNEXPECTED_ERROR);const i=this.$i18n;i&&(delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,i?.__disposer&&(i.__disposer(),delete i.__disposer,delete i.__extender),n.__deleteInstance(r),delete this.$i18n)}}}function V3(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[M3](t.pluralizationRules||e.pluralizationRules);const n=D0(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(r=>e.mergeLocaleMessage(r,n[r])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(r=>e.mergeDateTimeFormat(r,t.datetimeFormats[r])),t.numberFormats&&Object.keys(t.numberFormats).forEach(r=>e.mergeNumberFormat(r,t.numberFormats[r])),e}const B0={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function lM({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((r,i)=>[...r,...i.type===et?i.children:[i]],[]):t.reduce((n,r)=>{const i=e[r];return i&&(n[r]=i()),n},$t())}function W3(){return et}const G3=ot({name:"i18n-t",props:Kt({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>Qt(e)||!isNaN(e)}},B0),setup(e,t){const{slots:n,attrs:r}=t,i=e.i18n||j0({useScope:e.scope,__useComponent:!0});return()=>{const o=()=>{const l=Object.keys(n).filter(d=>d[0]!=="_"),c=$t();e.locale&&(c.locale=e.locale),e.plural!==void 0&&(c.plural=Oe(e.plural)?+e.plural:e.plural);const u=lM(t,l);return i[P0](e.keypath,u,c)},s=Kt($t(),r),a=Oe(e.tag)||at(e.tag)?e.tag:W3();return at(a)?qo(a,s,{default:o}):qo(a,s,o())}}});function cM(e){return Ft(e)&&!Oe(e[0])}function Y3(e,t,n,r){const{slots:i,attrs:o}=t;return()=>{const s=()=>{const c={part:!0};let u=$t();e.locale&&(c.locale=e.locale),Oe(e.format)?c.key=e.format:at(e.format)&&(Oe(e.format.key)&&(c.key=e.format.key),u=Object.keys(e.format).reduce((p,m)=>n.includes(m)?Kt($t(),p,{[m]:e.format[m]}):p,$t()));const d=r(e.value,c,u);let f=[c.key];return Ft(d)?f=d.map((p,m)=>{const b=i[p.type],g=b?b({[p.type]:p.value,index:m,parts:d}):[p.value];return cM(g)&&(g[0].key=`${p.type}-${m}`),g}):Oe(d)&&(f=[d]),f},a=Kt($t(),o),l=Oe(e.tag)||at(e.tag)?e.tag:W3();return at(l)?qo(l,a,{default:s}):qo(l,a,s())}}const K3=ot({name:"i18n-n",props:Kt({value:{type:Number,required:!0},format:{type:[String,Object]}},B0),setup(e,t){const n=e.i18n||j0({useScope:e.scope,__useComponent:!0});return Y3(e,t,C3,(...r)=>n[L0](...r))}});function uM(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const r=n.__getInstance(t);return r!=null?r.__composer:e.global.__composer}}function dM(e){const t=s=>{const{instance:a,value:l}=s;if(!a||!a.$)throw Yn(jn.UNEXPECTED_ERROR);const c=uM(e,a.$),u=X3(l);return[Reflect.apply(c.t,c,[...J3(u)]),c]};return{created:(s,a)=>{const[l,c]=t(a);md&&(s.__i18nWatcher=dt(c.locale,()=>{a.instance&&a.instance.$forceUpdate()})),s.__composer=c,s.textContent=l},unmounted:s=>{md&&s.__i18nWatcher&&(s.__i18nWatcher(),s.__i18nWatcher=void 0,delete s.__i18nWatcher),s.__composer&&(s.__composer=void 0,delete s.__composer)},beforeUpdate:(s,{value:a})=>{if(s.__composer){const l=s.__composer,c=X3(a);s.textContent=Reflect.apply(l.t,l,[...J3(c)])}},getSSRProps:s=>{const[a]=t(s);return{textContent:a}}}}function X3(e){if(Oe(e))return{path:e};if(xt(e)){if(!("path"in e))throw Yn(jn.REQUIRED_VALUE,"path");return e}else throw Yn(jn.INVALID_VALUE)}function J3(e){const{path:t,locale:n,args:r,choice:i,plural:o}=e,s={},a=r||{};return Oe(n)&&(s.locale=n),Qt(i)&&(s.plural=i),Qt(o)&&(s.plural=o),[t,a,s]}function fM(e,t,...n){const r=xt(n[0])?n[0]:{};(wt(r.globalInstall)?r.globalInstall:!0)&&([G3.name,"I18nT"].forEach(o=>e.component(o,G3)),[K3.name,"I18nN"].forEach(o=>e.component(o,K3)),[e$.name,"I18nD"].forEach(o=>e.component(o,e$))),e.directive("t",dM(t))}const pM=lo("global-vue-i18n");function mM(e={}){const t=__VUE_I18N_LEGACY_API__&&wt(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,n=wt(e.globalInjection)?e.globalInjection:!0,r=new Map,[i,o]=_M(e,t),s=lo("");function a(d){return r.get(d)||null}function l(d,f){r.set(d,f)}function c(d){r.delete(d)}const u={get mode(){return __VUE_I18N_LEGACY_API__&&t?"legacy":"composition"},install(d,...f){if(d.__VUE_I18N_SYMBOL__=s,d.provide(d.__VUE_I18N_SYMBOL__,u),xt(f[0])){const b=f[0];u.__composerExtend=b.__composerExtend,u.__vueI18nExtend=b.__vueI18nExtend}let p=null;!t&&n&&(p=SM(d,u.global)),__VUE_I18N_FULL_INSTALL__&&fM(d,u,...f),__VUE_I18N_LEGACY_API__&&t&&d.mixin(aM(o,o.__composer,u));const m=d.unmount;d.unmount=()=>{p&&p(),u.dispose(),m()}},get global(){return o},dispose(){i.stop()},__instances:r,__getInstance:a,__setInstance:l,__deleteInstance:c};return u}function j0(e={}){const t=Wl();if(t==null)throw Yn(jn.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw Yn(jn.NOT_INSTALLED);const n=hM(t),r=yM(n),i=F3(t),o=gM(e,i);if(o==="global")return U3(r,e,i),r;if(o==="parent"){let l=Z3(n,t,e.__useComponent);return l==null&&(l=r),l}if(o==="isolated"){if(n.mode!=="composition")throw Yn(jn.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const l=n,c=Kt({},e),u=Z3(n,t);c.__root=u||r;const d=Ed(c);return l.__composerExtend&&(d[zs]=l.__composerExtend(d)),A1()&&DE(()=>{const p=d[zs];p&&(p(),delete d[zs])}),d}const s=n;let a=s.__getInstance(t);if(a==null){const l=Kt({},e);"__i18n"in i&&(l.__i18n=i.__i18n),r&&(l.__root=r),a=Ed(l),s.__composerExtend&&(a[zs]=s.__composerExtend(a)),vM(s,t,a),s.__setInstance(t,a)}return a}function _M(e,t){const n=LE(),r=__VUE_I18N_LEGACY_API__&&t?n.run(()=>U0(e)):n.run(()=>Ed(e));if(r==null)throw Yn(jn.UNEXPECTED_ERROR);return[n,r]}function hM(e){const t=Uo(e.isCE?pM:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw Yn(e.isCE?jn.NOT_INSTALLED_WITH_PROVIDE:jn.UNEXPECTED_ERROR);return t}function gM(e,t){return y0(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function yM(e){return e.mode==="composition"?e.global:e.global.__composer}function Z3(e,t,n=!1){let r=null;const i=t.root;let o=bM(t,n);for(;o!=null;){const s=e;if(e.mode==="composition")r=s.__getInstance(o);else if(__VUE_I18N_LEGACY_API__){const a=s.__getInstance(o);a!=null&&(r=a.__composer,n&&r&&!r[L3]&&(r=null))}if(r!=null||i===o)break;o=o.parent}return r}function bM(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function vM(e,t,n){Cr(()=>{},t),am(()=>{const r=n;e.__deleteInstance(t);const i=r[zs];i&&(i(),delete r[zs])},t)}const $M=["locale","fallbackLocale","availableLocales"],Q3=["t","rt","d","n","tm","te"];function SM(e,t){const n=Object.create(null);return $M.forEach(i=>{const o=Object.getOwnPropertyDescriptor(t,i);if(!o)throw Yn(jn.UNEXPECTED_ERROR);const s=_t(o.value)?{get(){return o.value.value},set(a){o.value.value=a}}:{get(){return o.get&&o.get()}};Object.defineProperty(n,i,s)}),e.config.globalProperties.$i18n=n,Q3.forEach(i=>{const o=Object.getOwnPropertyDescriptor(t,i);if(!o||!o.value)throw Yn(jn.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${i}`,o)}),()=>{delete e.config.globalProperties.$i18n,Q3.forEach(i=>{delete e.config.globalProperties[`$${i}`]})}}const e$=ot({name:"i18n-d",props:Kt({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},B0),setup(e,t){const n=e.i18n||j0({useScope:e.scope,__useComponent:!0});return Y3(e,t,I3,(...r)=>n[M0](...r))}});if(rM(),LP(hP),DP(OP),FP(EP),__INTLIFY_PROD_DEVTOOLS__){const e=co();e.__INTLIFY__=!0,gP(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const t$={fr:{address_required:"L'adresse est obligatoire",address_metropolitan_only:"Cette offre n'est valable qu'en France métropolitaine et en Corse.",email_domain_not_allowed:"Ce domaine d'email n'est pas autorisé pour cette opération.",noticetextlink:"notice ci-jointe",suivant:"Suivant",valider:"Valider",multiselect_list_empty:"Commencez à taper",champ_obligatoire:"Champs obligatoires",iban_section_title:"Informations indiquées sur votre IBAN",iban_holder:"Titulaire du compte",iban_warning:"Depuis le 09/10/2025, l'IBAN saisi doit correspondre au titulaire du compte indiqué. Toute incohérence pourra bloquer le virement.",iban_uk_sort_code:"Sort Code",iban_uk_sort_code_placeholder:"6 chiffres",iban_uk_account_number:"Account Number",iban_uk_account_number_placeholder:"8 chiffres",rgpd:"traite les données recueillies sur la base de l’exécution d’un contrat pour traiter votre participation à cette opération. Pour en savoir plus sur la gestion de vos données personnelles et pour exercer vos droits, reportez-vous à la <a href='{link}' target='_blank' id='noticelink'>notice ci-jointe.</a>",blurry_document:"Ce document nous semble flou. Si vous êtes sûr de sa netteté, vous pouvez continuer, sinon, nous vous conseillons d'envoyer une autre image.",precedent:"Précédent",merci_renseigner_adresse:'Merci de renseigner votre adresse, ou cliquer sur "Je ne trouve pas mon adresse"',votre_adresse:"Votre Adresse *",changez_votre_adresse:"Modifiez votre adresse",N_rue:"Adresse",compl_addresse:"Complément d'adresse",ville:"Ville",code_postal:"Code postal",pays:"Pays",Madame:"Madame",Numero_identification:"Siren ou numéro DUNS *",Monsieur:"Monsieur","Corrigez les erreurs":"Veuillez vérifier les erreurs restantes dans le formulaire.",date_fin_regule_passee:"La date limite de régularisation est dépassée. Le formulaire ne peut plus être soumis.",trouvepasadresse:"Vous ne trouvez pas votre adresse ?",trouvepasreparateur:"Vous ne trouvez pas votre réparateur?",email_reparateur:"Email de votre réparateur *",enseigne_psa:"Nom de la société *",multiple_file_upload_en_cours:"Téléchargement en cours",multiple_file_aucun_fichier:"Aucun fichier",multiple_file_patientez:"Veuillez patienter, un ou plusieurs fichiers sont en cours de téléchargement. Ne validez pas le formulaire avant la fin de l'opération",multiple_file_add_file:"Ajouter un fichier",multiple_file_remove_file:"Retirer un fichier",file_max_size_error:"La taille du fichier est trop grande",file_heic_error:"Fichier iPhone .heic non supportés",file_max_size_info:"Taille maximale du fichier: {size} Mo",select_Précisez:"Veuillez préciser",prix_produit_produit:"Produit",prix_produit_reference:"Référence",prix_produit_description:"Description",prix_produit_quantite:"Quantité",prix_produit_prix:"Prix unitaire",prix_produit_imei:"IMEI",prix_produit_select_placeholder:"Sélectionnez une option",prix_produit_max_reached:"Limite de {max} produit(s) atteinte",prix_produit_error_select_ref:"Veuillez sélectionner une référence pour le produit {num}",prix_produit_error_select_refs:"Veuillez sélectionner une référence pour les produits {nums}",prix_produit_error_quantity:"Veuillez indiquer une quantité d’au moins 1 pour le produit {num}",prix_produit_error_price:"Le prix du produit {num} est requis",prix_produit_error_min_refs:"Veuillez sélectionner au moins {min} référence(s)","Erreurs de validation":"Erreurs de validation","Champs concernés :":"Champs concernés :",field_required:"Ce champ est obligatoire.",date_invalid:"La date n’est pas valide.",date_after:"La date doit être postérieure au {date}.",date_before:"La date doit être antérieure au {date}.",phone_invalid:"Le numéro de téléphone n’est pas valide.",phone_country_not_accepted:"Le numéro de téléphone n’est pas accepté pour ce pays.",phone_mobile_required:"Veuillez saisir un numéro de téléphone mobile.",phone_fixed_required:"Veuillez saisir un numéro de téléphone fixe.",iban_invalid:"L’IBAN saisi n’est pas valide.",iban_country_not_accepted:"Le pays de cet IBAN n’est pas accepté pour cette opération.",postalcode_invalid:"Le code postal n’est pas valide.",unique_email_used:"Cette adresse e-mail a déjà été utilisée pour participer.",unique_phone_used:"Ce numéro de téléphone a déjà été utilisé pour participer.",unique_value_used:"Cette valeur a déjà été utilisée pour participer.",unique_check_failed:"La vérification d’unicité a échoué, veuillez réessayer.",error_title:"Erreur",error_generic:"Une erreur est survenue",prix_produit_add:"Ajouter un produit",prix_produit_remove:"Retirer",file_selected:"1 fichier sélectionné",file_upload_failed:"L’envoi du fichier a échoué.",file_format_not_accepted:"Format non accepté. Formats acceptés : {formats}",file_select_required:"Veuillez sélectionner un fichier",file_upload_button:"Télécharger",file_delete:"Supprimer le fichier",multiple_files_max:"Maximum {max} fichier(s).",multiple_files_drop:"Déposez vos fichiers ou cliquez"},en:{address_required:"The address is required",address_metropolitan_only:"This offer is only valid in mainland France and Corsica.",email_domain_not_allowed:"This email domain is not allowed for this operation.",noticetextlink:"attached notice",suivant:"Next",valider:"Submit",champ_obligatoire:"Required fields",multiselect_list_empty:"Start typing",iban_section_title:"Information on your IBAN",iban_holder:"Account holder",iban_warning:"Since 09/10/2025, the entered IBAN must match the account holder indicated. Any inconsistency may block the transfer.",iban_uk_sort_code:"Sort Code",iban_uk_sort_code_placeholder:"6 digits",iban_uk_account_number:"Account Number",iban_uk_account_number_placeholder:"8 digits",rgpd:"processes the data collected on the basis of the performance of the contract to manage your participation in this operation. To learn more about how your personal data is managed and to exercise your rights, please refer to the <a href='{link}' target='_blank' id='noticelink'>attached notice</a>.",precedent:"Previous",merci_renseigner_adresse:`Please select a suggested address or click on "I can't find my address"`,trouvepasadresse:"I can't find my address",trouvepasreparateur:"You can't find it?",email_reparateur:"E-mail of your repairer *",enseigne_psa:"Company name *",Numero_identification:"DUNS number *",votre_adresse:"Your address *",changez_votre_adresse:"Edit your address",N_rue:"Number and street name",compl_addresse:"Additional address info",ville:"City",code_postal:"ZIP code",pays:"Country","Corrigez les erreurs":"Please check the remaining errors in the form.",date_fin_regule_passee:"The regularization deadline has passed. The form can no longer be submitted.",Madame:"Mrs.",Monsieur:"Mr.",multiple_file_upload_en_cours:"Upload in progress",multiple_file_aucun_fichier:"No file",multiple_file_patientez:"Please wait, one or more files are being uploaded. Do not submit the form until the operation is complete.",multiple_file_add_file:"Add a file",multiple_file_remove_file:"Remove a file",file_max_size_error:"The file size is too large",file_heic_error:"iPhone .heic files not supported",file_max_size_info:"Maximum file size: {size} MB",select_Précisez:"Please specify",prix_produit_produit:"Product",prix_produit_reference:"Reference",prix_produit_description:"Description",prix_produit_quantite:"Quantity",prix_produit_prix:"Unit price incl. tax",prix_produit_imei:"IMEI",prix_produit_select_placeholder:"Select an option",prix_produit_max_reached:"Limit of {max} product(s) reached",prix_produit_error_select_ref:"Please select a reference for product {num}",prix_produit_error_select_refs:"Please select a reference for products {nums}",prix_produit_error_quantity:"Please enter a quantity of at least 1 for product {num}",prix_produit_error_price:"The price of product {num} is required",prix_produit_error_min_refs:"Please select at least {min} reference(s)","Erreurs de validation":"Validation errors","Champs concernés :":"Affected fields:",field_required:"This field is required.",date_invalid:"The date is not valid.",date_after:"The date must be after {date}.",date_before:"The date must be before {date}.",phone_invalid:"The phone number is not valid.",phone_country_not_accepted:"Phone numbers from this country are not accepted.",phone_mobile_required:"Please enter a mobile phone number.",phone_fixed_required:"Please enter a landline number.",iban_invalid:"The IBAN entered is not valid.",iban_country_not_accepted:"IBANs from this country are not accepted for this operation.",postalcode_invalid:"The postcode is not valid.",unique_email_used:"This email address has already been used to take part.",unique_phone_used:"This phone number has already been used to take part.",unique_value_used:"This value has already been used to take part.",unique_check_failed:"The check failed. Please try again.",error_title:"Error",error_generic:"An error has occurred",prix_produit_add:"Add a product",prix_produit_remove:"Remove",file_selected:"1 file selected",file_upload_failed:"The file upload failed.",file_format_not_accepted:"Format not accepted. Accepted formats: {formats}",file_select_required:"Please select a file",file_upload_button:"Upload",file_delete:"Delete file",multiple_files_max:"Maximum {max} file(s).",multiple_files_drop:"Drop your files here or click"},es:{address_required:"La dirección es obligatoria",address_metropolitan_only:"Esta oferta solo es válida en Francia metropolitana y Córcega.",email_domain_not_allowed:"Este dominio de correo electrónico no está permitido para esta operación.",noticetextlink:"aviso adjunto",suivant:"próximo",valider:"Validar",champ_obligatoire:"campos obligatorios",iban_section_title:"Información indicada en su IBAN",iban_holder:"Titular de la cuenta",iban_warning:"Desde el 09/10/2025, el IBAN ingresado debe corresponder al titular de la cuenta indicado. Cualquier inconsistencia puede bloquear la transferencia.",rgpd:"trata los datos recopilados sobre la base de la ejecución del contrato para gestionar su participación en esta operación. Para obtener más información sobre la gestión de sus datos personales y ejercer sus derechos, <a href='{link}' target='_blank' id='noticelink'>consulte el aviso adjunto</a>.",precedent:"anterior",merci_renseigner_adresse:'Introduzca su dirección o haga clic en "No encuentro mi dirección"',votre_adresse:"Tu dirección *",changez_votre_adresse:"Cambie tu dirección",Numero_identification:"TO_TRANSLATE_ES D.U.N.S number *",N_rue:"Número y nombre de la calle",compl_addresse:"Información de dirección adicional",ville:"Ciudad",code_postal:"Código postal",pays:"País",Madame:"Señor",Monsieur:"Señora",trouvepasadresse:"No se pudo encontrar su dirección","Corrigez les erreurs":"Compruebe si hay errores en el formulario",date_fin_regule_passee:"La fecha límite de regularización ha pasado. El formulario ya no puede ser enviado.",trouvepasreparateur:"TO_TRANSLATE_ES_REPARATOR?",enseigne_psa:"TO_TRANSLATE_ES_ENSEIGNE",email_reparateur:"TO_TRANSLATE_ES_E-mail of your repairer *",multiple_file_upload_en_cours:"Subida en curso",multiple_file_aucun_fichier:"Ningún archivo",multiple_file_patientez:"Espere, uno o más archivos se están subiendo. No envíe el formulario hasta que se complete la operación.",multiple_file_add_file:"Agregar un archivo",multiple_file_remove_file:"Eliminar un archivo",file_max_size_error:"El tamaño del archivo es demasiado grande",file_heic_error:"Archivos iPhone .heic no soportados",file_max_size_info:"Tamaño máximo del archivo: {size} MB",select_Précisez:"Por favor, especifique",prix_produit_produit:"Producto",prix_produit_reference:"Referencia",prix_produit_description:"Descripción",prix_produit_quantite:"Cantidad",prix_produit_prix:"Precio unitario con IVA",prix_produit_imei:"IMEI",prix_produit_select_placeholder:"Seleccione una opción",prix_produit_max_reached:"Límite de {max} producto(s) alcanzado",prix_produit_error_select_ref:"Seleccione una referencia para el producto {num}",prix_produit_error_select_refs:"Seleccione una referencia para los productos {nums}",prix_produit_error_quantity:"Indique una cantidad de al menos 1 para el producto {num}",prix_produit_error_price:"El precio del producto {num} es obligatorio",prix_produit_error_min_refs:"Seleccione al menos {min} referencia(s)","Erreurs de validation":"Errores de validación","Champs concernés :":"Campos afectados:",field_required:"Este campo es obligatorio.",date_invalid:"La fecha no es válida.",date_after:"La fecha debe ser posterior al {date}.",date_before:"La fecha debe ser anterior al {date}.",phone_invalid:"El número de teléfono no es válido.",phone_country_not_accepted:"No se aceptan números de teléfono de este país.",phone_mobile_required:"Introduzca un número de teléfono móvil.",phone_fixed_required:"Introduzca un número de teléfono fijo.",iban_invalid:"El IBAN introducido no es válido.",iban_country_not_accepted:"No se aceptan IBAN de este país para esta operación.",postalcode_invalid:"El código postal no es válido.",unique_email_used:"Esta dirección de correo electrónico ya se ha utilizado para participar.",unique_phone_used:"Este número de teléfono ya se ha utilizado para participar.",unique_value_used:"Este valor ya se ha utilizado para participar.",unique_check_failed:"No se ha podido realizar la comprobación. Inténtelo de nuevo.",error_title:"Error",error_generic:"Se ha producido un error",prix_produit_add:"Añadir un producto",prix_produit_remove:"Eliminar",file_selected:"1 archivo seleccionado",file_upload_failed:"No se ha podido subir el archivo.",file_format_not_accepted:"Formato no aceptado. Formatos aceptados: {formats}",file_select_required:"Seleccione un archivo",file_upload_button:"Subir",file_delete:"Eliminar el archivo",multiple_files_max:"Máximo {max} archivo(s).",multiple_files_drop:"Arrastre sus archivos aquí o haga clic"},"es-cat":{address_required:"L'adreça és obligatòria",address_metropolitan_only:"Aquesta oferta només és vàlida a França metropolitana i Còrsega.",email_domain_not_allowed:"Aquest domini de correu electrònic no està permès per a aquesta operació.",noticetextlink:"avís adjunt",suivant:"Próximo",valider:"ubmitos",champ_obligatoire:"TO_TRANSLATE_ES CHAMPOS OBLIGANDO",iban_section_title:"Informació indicada al vostre IBAN",iban_holder:"Titular del compte",iban_warning:"Des del 09/10/2025, l'IBAN introduït ha de correspondre amb el titular del compte indicat. Qualsevol inconsistència pot bloquejar la transferència.",rgpd:"tracta les dades recollides sobre la base de l’execució del contracte per gestionar la vostra participació en aquesta operació. Per obtenir més informació sobre la gestió de les vostres dades personals i exercir els vostres drets, <a href='{link}' target='_blank' id='noticelink'>consulteu l'avís adjunt</a>.",precedent:"TO_TRANSLATE_ES PRECEDENTOS",merci_renseigner_adresse:'TO_TRANSLATE_ES Merci de renseigner votre adresse, ou cliquer sur "Je ne trouve pas mon adresse"',votre_adresse:"Adreça *",N_rue:"Carrer i número de casa",compl_addresse:"Informació addicional sobre l'adreça",ville:"TO_TRANSLATE_ES Ville",code_postal:"TO_TRANSLATE_ES Code postal",pays:"País",Numero_identification:"TO_TRANSLATE_ES_D.U.N.S number *",Madame:"TO_TRANSLATE_ES Madame",Monsieur:"TO_TRANSLATE_ES Monsieur",trouvepasreparateur:"TO_TRANSLATE_CAT_REPARATOR?","Corrigez les erreurs":"Compruebe si hay errores en el formulario",email_reparateur:"TO_TRANSLATE_CAT_E-mail of your repairer *",enseigne_psa:"TO_TRANSLATE_CAT_ENSEIGNE",file_max_size_error:"El tamaño del archivo es demasiado grande",file_heic_error:"Arxius iPhone .heic no compatibles",file_max_size_info:"Mida màxima del fitxer: {size} MB","Erreurs de validation":"Errors de validació","Champs concernés :":"Camps afectats:"},de:{address_required:"Die Adresse ist erforderlich",address_metropolitan_only:"Dieses Angebot gilt nur im französischen Festland und auf Korsika.",email_domain_not_allowed:"Diese E-Mail-Domain ist für diesen Vorgang nicht erlaubt.",noticetextlink:"beigefügte Mitteilung",suivant:"Weiter",valider:"validate",champ_obligatoire:"Pflichtangabe",iban_section_title:"Angaben auf Ihrer IBAN",iban_holder:"Kontoinhaber",iban_warning:"Seit dem 09.10.2025 muss die eingegebene IBAN dem angegebenen Kontoinhaber entsprechen. Jegliche Unstimmigkeit kann die Überweisung blockieren.",rgpd:"verarbeitet die erhobenen Daten auf Grundlage der Vertragserfüllung, um Ihre Teilnahme an dieser Aktion zu bearbeiten. Weitere Informationen zum Umgang mit Ihren personenbezogenen Daten und zur Ausübung Ihrer Rechte finden Sie in der <a href='{link}' target='_blank' id='noticelink'>beigefügten Mitteilung</a>.",multiselect_list_empty:"Mit der Eingabe beginnen",precedent:"zurück",blurry_document:"Dieses Dokument scheint unscharf zu sein. Wir empfehlen Ihnen, ein anderes Bild zu senden, um zu vermeiden, dass die Bewerbung abgelehnt wird.",merci_renseigner_adresse:'Bitte geben Sie Ihre Adresse ein, oder klicken Sie auf "Ich kann meine Adresse nicht finden".',votre_adresse:"Ihre Adresse *",changez_votre_adresse:"Ändern Sie Ihre Adresse",N_rue:"Strasse und Hausnummer *",compl_addresse:"Adresszusatz",Numero_identification:"Identifikationsnummer*",ville:"Ort",code_postal:"Postleitzahl",pays:"Land",Madame:"Frau",Monsieur:"Herr",trouvepasadresse:" Sie finden Ihre Adresse nicht?","Corrigez les erreurs":"Bitte überprüfen Sie Ihre eingabe.",trouvepasreparateur:"Sie finden Ihre reparatur nicht?",email_reparateur:"E-Mail Adresse *",enseigne_psa:"Firmenamme *",multiple_file_upload_en_cours:"Upload läuft",multiple_file_aucun_fichier:"Keine Datei",multiple_file_patientez:"Bitte warten Sie, eine oder mehrere Dateien werden hochgeladen. Senden Sie das Formular nicht ab, bevor der Vorgang abgeschlossen ist.",multiple_file_add_file:"Datei hinzufügen",multiple_file_remove_file:"Datei entfernen",file_max_size_error:"Die Dateigröße ist zu groß",file_heic_error:"iPhone .heic Dateien werden nicht unterstützt",file_max_size_info:"Maximale Dateigröße: {size} MB",select_Précisez:"Bitte präzisieren",prix_produit_produit:"Produkt",prix_produit_reference:"Referenz",prix_produit_description:"Beschreibung",prix_produit_quantite:"Menge",prix_produit_prix:"Stückpreis inkl. MwSt.",prix_produit_imei:"IMEI",prix_produit_select_placeholder:"Option auswählen",prix_produit_max_reached:"Limit von {max} Produkt(en) erreicht",prix_produit_error_select_ref:"Bitte wählen Sie eine Referenz für Produkt {num}",prix_produit_error_select_refs:"Bitte wählen Sie eine Referenz für die Produkte {nums}",prix_produit_error_quantity:"Bitte geben Sie für Produkt {num} eine Menge von mindestens 1 an",prix_produit_error_price:"Der Preis von Produkt {num} ist erforderlich",prix_produit_error_min_refs:"Bitte wählen Sie mindestens {min} Referenz(en)","Erreurs de validation":"Validierungsfehler","Champs concernés :":"Betroffene Felder:",date_fin_regule_passee:"Die Frist für die Nachreichung ist abgelaufen. Das Formular kann nicht mehr abgeschickt werden.",field_required:"Dies ist ein Pflichtfeld.",date_invalid:"Das Datum ist ungültig.",date_after:"Das Datum muss nach dem {date} liegen.",date_before:"Das Datum muss vor dem {date} liegen.",phone_invalid:"Die Telefonnummer ist ungültig.",phone_country_not_accepted:"Telefonnummern aus diesem Land werden nicht akzeptiert.",phone_mobile_required:"Bitte geben Sie eine Mobilfunknummer ein.",phone_fixed_required:"Bitte geben Sie eine Festnetznummer ein.",iban_invalid:"Die eingegebene IBAN ist ungültig.",iban_country_not_accepted:"IBANs aus diesem Land werden für diese Aktion nicht akzeptiert.",postalcode_invalid:"Die Postleitzahl ist ungültig.",unique_email_used:"Diese E-Mail-Adresse wurde bereits für eine Teilnahme verwendet.",unique_phone_used:"Diese Telefonnummer wurde bereits für eine Teilnahme verwendet.",unique_value_used:"Dieser Wert wurde bereits für eine Teilnahme verwendet.",unique_check_failed:"Die Überprüfung ist fehlgeschlagen. Bitte versuchen Sie es erneut.",error_title:"Fehler",error_generic:"Ein Fehler ist aufgetreten",prix_produit_add:"Produkt hinzufügen",prix_produit_remove:"Entfernen",file_selected:"1 Datei ausgewählt",file_upload_failed:"Das Hochladen der Datei ist fehlgeschlagen.",file_format_not_accepted:"Format nicht zulässig. Zulässige Formate: {formats}",file_select_required:"Bitte wählen Sie eine Datei aus",file_upload_button:"Hochladen",file_delete:"Datei löschen",multiple_files_max:"Maximal {max} Datei(en).",multiple_files_drop:"Dateien hierher ziehen oder klicken"},nl:{address_required:"Het adres is verplicht",address_metropolitan_only:"Deze actie is alleen geldig in Europees Frankrijk en Corsica.",email_domain_not_allowed:"Dit e-maildomein is niet toegestaan voor deze actie.",noticetextlink:"bijgevoegde mededeling",suivant:"volgend",valider:"bevestigen",multiselect_list_empty:"Begin met typen",iban_section_title:"Informatie op uw IBAN",iban_holder:"Rekeninghouder",iban_warning:"Vanaf 09/10/2025 moet de ingevoerde IBAN overeenkomen met de aangegeven rekeninghouder. Elke inconsistentie kan de overschrijving blokkeren.",rgpd:"verwerkt de verzamelde gegevens op basis van de uitvoering van de overeenkomst om uw deelname aan deze actie te beheren. Voor meer informatie over het beheer van uw persoonsgegevens en om uw rechten uit te oefenen, verwijzen wij u naar de <a href='{link}' target='_blank' id='noticelink'>bijgevoegde kennisgeving</a>.",champ_obligatoire:"verplichte velden",blurry_document:"Dit document ziet er wazig uit, wij adviseren u een andere afbeelding te sturen om te voorkomen dat het bestand wordt geweigerd.",precedent:"vorig",merci_renseigner_adresse:'Voer alstublieft uw adres in, of klik op "Ik kan mijn adres niet vinden"',votre_adresse:"Uw adres *",changez_votre_adresse:"Uw adres wijzigen",N_rue:"Straatnaam en huisnummer",compl_addresse:"Aanvullende adresinformatie",ville:"Stad",code_postal:"Postcode",pays:"Land",Madame:"Mevr",Monsieur:"Man","Corrigez les erreurs":"Controleer de resterende fouten in het formulier.",Numero_identification:"D.U.N.S nummer * (Identificatienummer)",trouvepasadresse:"Staat uw adres er niet bij?",trouvepasreparateur:"Ik kan mijn reparateur niet vinden?",email_reparateur:"Reparateur email *",enseigne_psa:"bedrijfsnaam *",multiple_file_upload_en_cours:"Upload bezig",multiple_file_aucun_fichier:"Geen bestand",multiple_file_patientez:"Even geduld aub, één of meerdere bestanden worden geüpload. Verzend het formulier niet voordat de operatie voltooid is.",multiple_file_add_file:"Bestand toevoegen",multiple_file_remove_file:"Bestand verwijderen",file_max_size_error:"De bestandsgrootte is te groot",file_heic_error:"iPhone .heic bestanden worden niet ondersteund",file_max_size_info:"Maximale bestandsgrootte: {size} MB",select_Précisez:"Gelieve te specificeren",prix_produit_produit:"Product",prix_produit_reference:"Referentie",prix_produit_description:"Beschrijving",prix_produit_quantite:"Aantal",prix_produit_prix:"Eenheidsprijs incl. btw",prix_produit_imei:"IMEI",prix_produit_select_placeholder:"Selecteer een optie",prix_produit_max_reached:"Limiet van {max} product(en) bereikt",prix_produit_error_select_ref:"Selecteer een referentie voor product {num}",prix_produit_error_select_refs:"Selecteer een referentie voor producten {nums}",prix_produit_error_quantity:"Het aantal van product {num} is vereist",prix_produit_error_price:"De prijs van product {num} is vereist",prix_produit_error_min_refs:"Selecteer minstens {min} referentie(s)","Erreurs de validation":"Validatiefouten","Champs concernés :":"Betreffende velden:",iban_uk_sort_code:"Sort Code",iban_uk_sort_code_placeholder:"6 cijfers",iban_uk_account_number:"Account Number",iban_uk_account_number_placeholder:"8 cijfers",date_fin_regule_passee:"De uiterste datum voor regularisatie is verstreken. Het formulier kan niet meer worden verzonden.",field_required:"Dit veld is verplicht.",date_invalid:"De datum is ongeldig.",date_after:"De datum moet na {date} liggen.",date_before:"De datum moet vóór {date} liggen.",phone_invalid:"Het telefoonnummer is ongeldig.",phone_country_not_accepted:"Het telefoonnummer wordt voor dit land niet geaccepteerd.",phone_mobile_required:"Vul een mobiel telefoonnummer in.",phone_fixed_required:"Vul een vast telefoonnummer in.",iban_invalid:"Deze IBAN is ongeldig.",iban_country_not_accepted:"IBAN's uit dit land worden voor deze actie niet geaccepteerd.",postalcode_invalid:"De postcode is ongeldig.",unique_email_used:"Dit e-mailadres is al gebruikt om deel te nemen.",unique_phone_used:"Dit telefoonnummer is al gebruikt om deel te nemen.",unique_value_used:"Deze waarde is al gebruikt om deel te nemen.",unique_check_failed:"De controle is mislukt, probeer het opnieuw.",error_title:"Fout",error_generic:"Er is een fout opgetreden",prix_produit_add:"Product toevoegen",prix_produit_remove:"Verwijderen",file_selected:"1 bestand geselecteerd",file_upload_failed:"Het uploaden van het bestand is mislukt.",file_format_not_accepted:"Formaat niet geaccepteerd. Geaccepteerde formaten: {formats}",file_select_required:"Selecteer een bestand",file_upload_button:"Uploaden",file_delete:"Bestand verwijderen",multiple_files_max:"Maximaal {max} bestand(en).",multiple_files_drop:"Sleep uw bestanden hierheen of klik"},"lu-fr":{address_required:"L'adresse est obligatoire",address_metropolitan_only:"Cette offre n'est valable qu'en France métropolitaine et en Corse.",email_domain_not_allowed:"Ce domaine d'email n'est pas autorisé pour cette opération.",noticetextlink:"notice ci-jointe",suivant:"Suivant",valider:"Valider",champ_obligatoire:"Champ obligatoire",iban_section_title:"Informations indiquées sur votre IBAN",iban_holder:"Titulaire du compte",iban_warning:"Depuis le 09/10/2025, l'IBAN saisi doit correspondre au titulaire du compte indiqué. Toute incohérence pourra bloquer le virement.",rgpd:"traite les données recueillies sur la base de l’exécution d’un contrat pour traiter votre participation à cette opération. Pour en savoir plus sur la gestion de vos données personnelles et pour exercer vos droits, reportez-vous à la <a href='{link}' target='_blank' id='noticelink'>notice ci-jointe</a>.",precedent:"Précédent",merci_renseigner_adresse:'Merci de renseigner votre adresse, ou cliquer sur "Je ne trouve pas mon adresse"',votre_adresse:"Votre Adresse *",N_rue:"N°, rue",compl_addresse:"Complément d'adresse",ville:"Ville",Numero_identification:"Numéro D.U.N.S *",code_postal:"Code postal *",pays:"Pays",Madame:"Madame",Monsieur:"Monsieur",trouvepasadresse:"Vous ne trouvez pas votre adresse ?",email_reparateur:"email de votre réparateur *",enseigne_psa:"Nom de la société *",file_max_size_error:"La taille du fichier est trop grande",file_heic_error:"Fichier iPhone .heic non supportés",file_max_size_info:"Taille maximale du fichier: {size} Mo","Erreurs de validation":"Erreurs de validation","Champs concernés :":"Champs concernés :"},"lu-nl":{address_required:"Het adres is verplicht",address_metropolitan_only:"Deze actie is alleen geldig in Europees Frankrijk en Corsica.",email_domain_not_allowed:"Dit e-maildomein is niet toegestaan voor deze actie.",noticetextlink:"bijgevoegde mededeling",suivant:"volgend",valider:"bevestigen",champ_obligatoire:"verplichte velden",iban_section_title:"Informatie op uw IBAN",iban_holder:"Rekeninghouder",iban_warning:"Vanaf 09/10/2025 moet de ingevoerde IBAN overeenkomen met de aangegeven rekeninghouder. Elke inconsistentie kan de overschrijving blokkeren.",rgpd:"behandelt d'Donnéeën, déi op Basis vun der Ausféierung vum Kontrakt gesammelt goufen, fir Är Participatioun un dëser Aktioun ze verwalten. Fir méi Informatiounen iwwer den Ëmgank mat Ären perséinlechen Daten a fir Är Rechter auszeüben, kuckt w.e.g. <a href='{link}' target='_blank' id='noticelink'>an d'ugeschloss Notiz</a>.",precedent:"vorig",merci_renseigner_adresse:'Voer alstublieft uw adres in, of klik op "Ik kan mijn adres niet vinden"',votre_adresse:"Jouw adres *",N_rue:"Straat en huisnummer",compl_addresse:"Aanvullende adresgegevens",ville:"Stad",code_postal:"Postcode",pays:"Land",Madame:"Mevr",Monsieur:"Man",Numero_identification:"D.U.N.S nummer *",trouvepasadresse:"Vind je je adres niet ?",trouvepasreparateur:"Ik kan mijn reparateur niet vinden?",email_reparateur:"Reparateur e-mail*",enseigne_psa:"bedrijfsnaam *",file_max_size_error:"De bestandsgrootte is te groot",file_heic_error:"iPhone .heic bestanden worden niet ondersteund",file_max_size_info:"Maximale bestandsgrootte: {size} MB","Erreurs de validation":"Validatiefouten","Champs concernés :":"Betreffende velden:"},"be-fr":{address_required:"L'adresse est obligatoire",address_metropolitan_only:"Cette offre n'est valable qu'en France métropolitaine et en Corse.",email_domain_not_allowed:"Ce domaine d'email n'est pas autorisé pour cette opération.",noticetextlink:"notice ci-jointe",suivant:"Suivant",valider:"Valider",champ_obligatoire:"Champ obligatoire",iban_section_title:"Informations indiquées sur votre IBAN",iban_holder:"Titulaire du compte",iban_warning:"Depuis le 09/10/2025, l'IBAN saisi doit correspondre au titulaire du compte indiqué. Toute incohérence pourra bloquer le virement.",rgpd:"traite les données recueillies sur la base de l’exécution d’un contrat pour traiter votre participation à cette opération. Pour en savoir plus sur la gestion de vos données personnelles et pour exercer vos droits, reportez-vous à la <a href='{link}' target='_blank' id='noticelink'>notice ci-jointe</a>.",precedent:"Précédent",merci_renseigner_adresse:'Merci de renseigner votre adresse, ou cliquer sur "Je ne trouve pas mon adresse"',votre_adresse:"Votre Adresse *",N_rue:"N°, rue",compl_addresse:"Complément d'adresse",ville:"Ville",code_postal:"Code postal",pays:"Pays",Madame:"Madame",Monsieur:"Monsieur",trouvepasadresse:"Vous ne trouvez pas votre adresse ?",enseigne_psa:"Nom de la société * ",Numero_identification:"numéro DUNS *",email_reparateur:"Email de votre réparateur *",file_max_size_error:"La taille du fichier est trop grande",file_heic_error:"Fichier iPhone .heic non supportés",file_max_size_info:"Taille maximale du fichier: {size} Mo","Erreurs de validation":"Erreurs de validation","Champs concernés :":"Champs concernés :"},"be-nl":{address_required:"Het adres is verplicht",address_metropolitan_only:"Deze actie is alleen geldig in Europees Frankrijk en Corsica.",email_domain_not_allowed:"Dit e-maildomein is niet toegestaan voor deze actie.",noticetextlink:"bijgevoegde mededeling",suivant:"volgend",valider:"bevestigen",champ_obligatoire:"verplichte velden",multiselect_list_empty:"Begin met typen",iban_section_title:"Informatie op uw IBAN",iban_holder:"Rekeninghouder",iban_warning:"Vanaf 09/10/2025 moet de ingevoerde IBAN overeenkomen met de aangegeven rekeninghouder. Elke inconsistentie kan de overschrijving blokkeren.",rgpd:"verwerkt de verzamelde gegevens op basis van de uitvoering van de overeenkomst om uw deelname aan deze actie te beheren. Voor meer informatie over het beheer van uw persoonlijke gegevens en om uw rechten uit te oefenen, raadpleeg de <a href='{link}' target='_blank' id='noticelink'>bijgevoegde mededeling</a>.",blurry_document:"Dit document ziet er wazig uit, wij adviseren u een andere afbeelding te sturen om te voorkomen dat het bestand wordt geweigerd.",precedent:"vorig",merci_renseigner_adresse:'Voer alstublieft uw adres in, of klik op "Ik kan mijn adres niet vinden"',votre_adresse:"Uw adres *","modifier votre adresse":"Uw adres wijzigen",N_rue:"Straatnaam en huisnummer",compl_addresse:"Aanvullende adresgegevens",trouvepasreparateur:"Ik kan mijn reparateur niet vinden?",enseigne_psa:"bedrijfsnaam *",ville:"Plaats",code_postal:"Postcode",pays:"Land",Numero_identification:"D.U.N.S nummer *",Madame:"Mevr",Monsieur:"Man",trouvepasadresse:"Vind je je adres niet ?",email_reparateur:"Reparateur e-mail*","Erreurs de validation":"Validatiefouten","Champs concernés :":"Betreffende velden:"},sl:{address_required:"Naslov je obvezen",address_metropolitan_only:"Ta ponudba velja samo za celinsko Francijo in Korziko.",noticetextlink:"priložené oznámenie",suivant:"TO_TRANSLATE_SL Suivant",valider:"TO_TRANSLATE_SL Valider",champ_obligatoire:"obvezna polja",iban_section_title:"Informacije navedene na vašem IBAN",iban_holder:"Imetnik računa",iban_warning:"Od 09/10/2025 mora vneseni IBAN ustrezati navedenemu imetniku računa. Vsaka neskladnost lahko blokira prenos.",precedent:"TO_TRANSLATE_SL Précédent",merci_renseigner_adresse:"Vnesite svoj naslov ali pa kliknite možnost »Ne najdem svojega naslova«",votre_adresse:"POŠTNI NASLOV *",N_rue:"Številka ulice",compl_addresse:"Dodatni naslov",ville:"Kraj",code_postal:"Poštna številka",pays:"Država",Madame:"Gospa",Monsieur:"Gospod",Numero_identification:"TO_TRANSLATE_SL_D.U.N.S nummer *",trouvepasadresse:"Ne najdem svojega naslova",trouvepasreparateur:"TO_TRANSLATE_SL_REPARATOR?",enseigne_psa:"TO_TRANSLATE_SL_ENSEIGNE",email_reparateur:"TO_TRANSLATE_SL_Email de votre réparateur *","Erreurs de validation":"Napake pri preverjanju","Champs concernés :":"Vplivana polja:"},bg:{address_required:"Адресът е задължителен",address_metropolitan_only:"Тази оферта е валидна само за континентална Франция и Корсика.",noticetextlink:"приложено известие",suivant:"TO_TRANSLATE_BG Suivant",valider:"TO_TRANSLATE_BG Valider",champ_obligatoire:"задължителни полета",iban_section_title:"Информация посочена във вашия IBAN",iban_holder:"Титуляр на сметката",iban_warning:"От 09/10/2025 въведеният IBAN трябва да съответства на посочения титуляр на сметката. Всяко несъответствие може да блокира превода.",precedent:"TO_TRANSLATE_BG Précédent",merci_renseigner_adresse:"Моля, попълнете адреса си или щракнете върху „Не намирам адреса си“",votre_adresse:"ПОЩЕНСКИ АДРЕС *",N_rue:"Улица, №",compl_addresse:"Други адресни данни",ville:"Град",code_postal:"Пощенски код",pays:"Държава",Madame:"Gospa",Monsieur:"Gospod",Numero_identification:"TO_TRANSLATE_BG_D.U.N.S nummer *",trouvepasadresse:"Не намирате адреса си?",trouvepasreparateur:"TO_TRANSLATE_BG_REPARATOR?",enseigne_psa:"TO_TRANSLATE_BG_ENSEIGNE",email_reparateur:"TO_TRANSLATE_BG_Email de votre réparateur *","Erreurs de validation":"Грешки при валидация","Champs concernés :":"Засегнати полета:"},ro:{address_required:"Adresa este obligatorie",address_metropolitan_only:"Această ofertă este valabilă doar în Franța metropolitană și Corsica.",noticetextlink:"notificare atasata",suivant:"TO_TRANSLATE_RO Suivant",valider:"TO_TRANSLATE_RO Valider",champ_obligatoire:"câmpuri obligatorii",iban_section_title:"Informații indicate pe IBAN-ul dvs.",iban_holder:"Titular de cont",iban_warning:"Din 09/10/2025, IBAN-ul introdus trebuie să corespundă titularului de cont indicat. Orice inconsecvență poate bloca transferul.",precedent:"TO_TRANSLATE_RO Précédent",merci_renseigner_adresse:"Vă rugăm să completați adresa dvs. sau să faceți clic pe „Nu îmi găsesc adresa”",votre_adresse:"ADRESA *",N_rue:"Număr Stradă",compl_addresse:"Alte detalii privind adresa",ville:"Oraș",code_postal:"Cod poștal",pays:"Țara",Madame:"Doamna",Monsieur:"Domnul",Numero_identification:"TO_TRANSLATE_RO_D.U.N.S nummer *",trouvepasadresse:"Nu vă puteți găsi adresa?",trouvepasreparateur:"TO_TRANSLATE_RO_REPARATOR?",enseigne_psa:"TO_TRANSLATE_RO_ENSEIGNE",email_reparateur:"TO_TRANSLATE_RO_Email de votre réparateur *","Erreurs de validation":"Erori de validare","Champs concernés :":"Câmpuri afectate:"},el:{address_required:"Η διεύθυνση είναι υποχρεωτική",address_metropolitan_only:"Η προσφορά ισχύει μόνο για τη μητροπολιτική Γαλλία και την Κορσική.",noticetextlink:"notice ci-jointe",suivant:"TO_TRANSLATE_RO Suivant",valider:"TO_TRANSLATE_RO Valider",champ_obligatoire:"Υποχρεωτικό πεδίο",iban_section_title:"Πληροφορίες που αναγράφονται στο IBAN σας",iban_holder:"Κάτοχος λογαριασμού",iban_warning:"Από τις 09/10/2025, το IBAN που εισάγεται πρέπει να αντιστοιχεί στον υποδεικνυόμενο κάτοχο λογαριασμού. Οποιαδήποτε ασυνέπεια μπορεί να μπλοκάρει τη μεταφορά.",precedent:"TO_TRANSLATE_RO Précédent",merci_renseigner_adresse:'Συμπληρώστε τη διεύθυνσή σας ή κάντε κλικ στο "Δεν μπορώ να βρω τη διεύθυνσή μου"',votre_adresse:"ΤΑΧ/ΚΗ ΔΙΕΥΘΥΝΣΗ *",N_rue:"Οδός και αριθμός",compl_addresse:"Λοιπά στοιχεία διεύθυνσης",ville:"Πόλη",code_postal:"Ταχυδρομικός κώδικας",pays:"Χώρα",Madame:"κυρία",Monsieur:"κύριος",Numero_identification:"TO_TRANSLATE_RO_D.U.N.S nummer *",trouvepasadresse:"Δεν μπορείτε να βρείτε τη διεύθυνσή σας;",trouvepasreparateur:"TO_TRANSLATE_RO_REPARATOR?",enseigne_psa:"TO_TRANSLATE_RO_ENSEIGNE",email_reparateur:"TO_TRANSLATE_RO_Email de votre réparateur *","Erreurs de validation":"Σφάλματα επικύρωσης","Champs concernés :":"Επηρεαζόμενα πεδία:"},it:{address_required:"L'indirizzo è obbligatorio",address_metropolitan_only:"Questa offerta è valida solo in Francia metropolitana e Corsica.",email_domain_not_allowed:"Questo dominio email non è consentito per questa operazione.",multiple_file_remove_file:"Rimuovere un file",multiple_file_add_file:"Aggiungere un file",changez_votre_adresse:"Modifica il tuo indirizzo",noticetextlink:"avviso allegato",suivant:"Successivo",valider:"Confermare",champ_obligatoire:"Campi obbligatori",iban_section_title:"Informazioni indicate sul vostro IBAN",iban_holder:"Titolare del conto",iban_warning:"Dal 09/10/2025, l'IBAN inserito deve corrispondere al titolare del conto indicato. Qualsiasi incoerenza può bloccare il bonifico.",precedent:"Precedente",merci_renseigner_adresse:'Si prega di inserire il proprio indirizzo o cliccare su "Non trovo il mio indirizzo"',votre_adresse:"Il tuo indirizzo",N_rue:"N°, via",compl_addresse:"Complemento d'indirizzo",ville:"Città",code_postal:"Codice di avviamento postale",pays:"Paese",Madame:"Signora",Monsieur:"Signore",Numero_identification:"Numero D.U.N.S *",trouvepasadresse:"Non trovi il tuo indirizzo?",trouvepasreparateur:"RIPARATORE?",enseigne_psa:"INSEGNA",email_reparateur:"Email del tuo riparatore *","Corrigez les erreurs":"Si prega di verificare gli errori rimanenti nel modulo.","Erreurs de validation":"Errori di convalida","Champs concernés :":"Campi interessati:",rgpd:"tratta i dati raccolti sulla base dell'esecuzione del contratto per gestire la sua partecipazione a questa operazione. Per saperne di più sulla gestione dei suoi dati personali e per esercitare i suoi diritti, consulti l'<a href='{link}' target='_blank' id='noticelink'>avviso allegato</a>.",date_fin_regule_passee:"Il termine per la regolarizzazione è scaduto. Il modulo non può più essere inviato.",multiple_file_upload_en_cours:"Caricamento in corso",multiple_file_patientez:"Attendere: uno o più file sono in fase di caricamento. Non convalidare il modulo prima del termine dell'operazione.",file_max_size_error:"Il file è troppo grande",file_heic_error:"I file iPhone .heic non sono supportati",select_Précisez:"Si prega di specificare",prix_produit_produit:"Prodotto",prix_produit_reference:"Riferimento",prix_produit_description:"Descrizione",prix_produit_quantite:"Quantità",prix_produit_prix:"Prezzo unitario IVA inclusa",prix_produit_imei:"IMEI",field_required:"Questo campo è obbligatorio.",date_invalid:"La data non è valida.",date_after:"La data deve essere successiva al {date}.",date_before:"La data deve essere precedente al {date}.",phone_invalid:"Il numero di telefono non è valido.",phone_country_not_accepted:"I numeri di telefono di questo Paese non sono accettati.",phone_mobile_required:"Si prega di inserire un numero di cellulare.",phone_fixed_required:"Si prega di inserire un numero di telefono fisso.",iban_invalid:"L'IBAN inserito non è valido.",iban_country_not_accepted:"Gli IBAN di questo Paese non sono accettati per questa operazione.",postalcode_invalid:"Il codice postale non è valido.",unique_email_used:"Questo indirizzo e-mail è già stato utilizzato per partecipare.",unique_phone_used:"Questo numero di telefono è già stato utilizzato per partecipare.",unique_value_used:"Questo valore è già stato utilizzato per partecipare.",unique_check_failed:"Verifica non riuscita. Si prega di riprovare.",error_title:"Errore",error_generic:"Si è verificato un errore",prix_produit_add:"Aggiungi un prodotto",prix_produit_remove:"Rimuovi",prix_produit_error_quantity:"Si prega di indicare una quantità di almeno 1 per il prodotto {num}",file_selected:"1 file selezionato",file_upload_failed:"Il caricamento del file non è riuscito.",file_format_not_accepted:"Formato non accettato. Formati accettati: {formats}",file_select_required:"Si prega di selezionare un file",file_upload_button:"Carica",file_delete:"Elimina il file",multiple_files_max:"Massimo {max} file.",multiple_files_drop:"Trascina qui i tuoi file o fai clic"},pl:{address_required:"Adres jest wymagany",address_metropolitan_only:"Ta oferta jest ważna tylko we Francji metropolitalnej i na Korsyce.",email_domain_not_allowed:"Ta domena e-mail nie jest dozwolona dla tej operacji.",noticetextlink:"załączoną informacją",suivant:"Następny",valider:"Zatwierdź",champ_obligatoire:"Pola Wymagane",iban_section_title:"Informacje podane na Twoim IBAN",iban_holder:"Posiadacz konta",iban_warning:"Od 09/10/2025 wprowadzony IBAN musi odpowiadać wskazanemu posiadaczowi konta. Wszelkie niezgodności mogą zablokować przelew.",rgpd:"przetwarza zebrane dane na podstawie wykonania umowy w celu zarządzania udziałem w tej akcji. Aby uzyskać więcej informacji na temat zarządzania Państwa danymi osobowymi i skorzystać ze swoich praw, prosimy zapoznać się z <a href='{link}' target='_blank' id='noticelink'>załączoną informacją</a>.",blurry_document:"Ten dokument jest niewyraźny, radzimy wysłać inny obraz, aby uniknąć odrzucenia pliku.",precedent:"Poprzedni",merci_renseigner_adresse:"Wpisz swój adres lub kliknij „Nie mogę znaleźć swojego adresuWpisz swój adres lub kliknij „Nie mogę znaleźć swojego adresu",votre_adresse:"Twój adres",N_rue:"Adres",compl_addresse:"Uzupełnienie adresu",Numero_identification:"Numer identyfikacyjny",ville:"Miasto",code_postal:"Kod pocztowy",pays:"Kraj",Madame:"Pani.",Monsieur:"Pan.",trouvepasadresse:"Nie możesz znaleźć swojego adresu?",trouvepasreparateur:"TO_TRANSLATE_PL_REPARATOR?",email_reparateur:"TO_TRANSLATE_PL_Email de votre réparateur *",enseigne_psa:"TO_TRANSLATE_PL_ENSEIGNE","Erreurs de validation":"Błędy walidacji","Champs concernés :":"Pola, których dotyczy:","Corrigez les erreurs":"Sprawdź pozostałe błędy w formularzu.",date_fin_regule_passee:"Termin na uzupełnienie zgłoszenia minął. Formularza nie można już przesłać.",multiple_file_upload_en_cours:"Przesyłanie w toku",multiple_file_patientez:"Proszę czekać, trwa przesyłanie jednego lub kilku plików. Nie zatwierdzaj formularza przed zakończeniem operacji.",multiple_file_add_file:"Dodaj plik",multiple_file_remove_file:"Usuń plik",file_max_size_error:"Plik jest za duży",file_heic_error:"Pliki iPhone .heic nie są obsługiwane",select_Précisez:"Proszę sprecyzować",prix_produit_produit:"Produkt",prix_produit_reference:"Numer referencyjny",prix_produit_description:"Opis",prix_produit_quantite:"Ilość",prix_produit_prix:"Cena jednostkowa brutto",prix_produit_imei:"IMEI",field_required:"To pole jest wymagane.",date_invalid:"Data jest nieprawidłowa.",date_after:"Data musi być późniejsza niż {date}.",date_before:"Data musi być wcześniejsza niż {date}.",phone_invalid:"Numer telefonu jest nieprawidłowy.",phone_country_not_accepted:"Numery telefonów z tego kraju nie są akceptowane.",phone_mobile_required:"Wpisz numer telefonu komórkowego.",phone_fixed_required:"Wpisz numer telefonu stacjonarnego.",iban_invalid:"Wprowadzony numer IBAN jest nieprawidłowy.",iban_country_not_accepted:"Numery IBAN z tego kraju nie są akceptowane w tej akcji.",postalcode_invalid:"Kod pocztowy jest nieprawidłowy.",unique_email_used:"Ten adres e-mail został już użyty do udziału w akcji.",unique_phone_used:"Ten numer telefonu został już użyty do udziału w akcji.",unique_value_used:"Ta wartość została już użyta do udziału w akcji.",unique_check_failed:"Weryfikacja nie powiodła się. Spróbuj ponownie.",error_title:"Błąd",error_generic:"Wystąpił błąd",prix_produit_add:"Dodaj produkt",prix_produit_remove:"Usuń",prix_produit_error_quantity:"Podaj ilość co najmniej 1 dla produktu {num}",file_selected:"Wybrano 1 plik",file_upload_failed:"Nie udało się przesłać pliku.",file_format_not_accepted:"Niedozwolony format. Dozwolone formaty: {formats}",file_select_required:"Wybierz plik",file_upload_button:"Prześlij",file_delete:"Usuń plik",multiple_files_max:"Maksymalna liczba plików: {max}.",multiple_files_drop:"Przeciągnij pliki tutaj lub kliknij"},pt:{address_required:"O endereço é obrigatório",address_metropolitan_only:"Esta oferta é válida apenas em França metropolitana e na Córsega.",email_domain_not_allowed:"Este domínio de e-mail não é permitido para esta operação.",noticetextlink:"aviso anexado",suivant:"Próximo",valider:"Validar",multiselect_list_empty:"Comece a dactilografar",champ_obligatoire:"Campo obrigatório",iban_section_title:"Informações indicadas no seu IBAN",iban_holder:"Titular da conta",iban_warning:"Desde 09/10/2025, o IBAN inserido deve corresponder ao titular da conta indicado. Qualquer inconsistência pode bloquear a transferência.",rgpd:"processa os dados recolhidos com base na execução do contrato para gerir a sua participação nesta ação. Para saber mais sobre a gestão dos seus dados pessoais e para exercer os seus direitos, consulte o <a href='{link}' target='_blank' id='noticelink'>aviso em anexo</a>.",blurry_document:"Este documento parece desfocado, aconselhamos a enviar outra imagem para evitar que o ficheiro seja recusado",precedent:"Anterior",merci_renseigner_adresse:' Introduzca su dirección o haga clic en "No encuentro mi dirección"',votre_adresse:"O seu endereço",changez_votre_adresse:"Altere o seu endereço",N_rue:"Endereço, linha 1",compl_addresse:"Endereço adicional",Numero_identification:"TO_TRANSLATE_PL_D.U.N.S nummer",ville:"Cidade",code_postal:"Código postal",pays:"País",Madame:"Senhora",Monsieur:"Senhor",trouvepasadresse:"Não consegue encontrar a sua morada?",trouvepasreparateur:"TO_TRANSLATE_PT_REPARATOR?",email_reparateur:"TO_TRANSLATE_PT_Email de votre réparateur *",enseigne_psa:"TO_TRANSLATE_PT_ENSEIGNE","Erreurs de validation":"Erros de validação","Champs concernés :":"Campos afetados:","Corrigez les erreurs":"Por favor, verifique os erros restantes no formulário.",date_fin_regule_passee:"O prazo de regularização terminou. O formulário já não pode ser submetido.",multiple_file_upload_en_cours:"Carregamento em curso",multiple_file_patientez:"Aguarde: um ou mais ficheiros estão a ser carregados. Não valide o formulário antes do fim da operação.",multiple_file_add_file:"Adicionar um ficheiro",multiple_file_remove_file:"Remover um ficheiro",file_max_size_error:"O ficheiro é demasiado grande",file_heic_error:"Ficheiros iPhone .heic não suportados",select_Précisez:"Por favor, especifique",prix_produit_produit:"Produto",prix_produit_reference:"Referência",prix_produit_description:"Descrição",prix_produit_quantite:"Quantidade",prix_produit_prix:"Preço unitário com IVA",prix_produit_imei:"IMEI",field_required:"Este campo é obrigatório.",date_invalid:"A data não é válida.",date_after:"A data deve ser posterior a {date}.",date_before:"A data deve ser anterior a {date}.",phone_invalid:"O número de telefone não é válido.",phone_country_not_accepted:"Não são aceites números de telefone deste país.",phone_mobile_required:"Introduza um número de telemóvel.",phone_fixed_required:"Introduza um número de telefone fixo.",iban_invalid:"O IBAN introduzido não é válido.",iban_country_not_accepted:"Não são aceites IBAN deste país para esta operação.",postalcode_invalid:"O código postal não é válido.",unique_email_used:"Este endereço de e-mail já foi utilizado para participar.",unique_phone_used:"Este número de telefone já foi utilizado para participar.",unique_value_used:"Este valor já foi utilizado para participar.",unique_check_failed:"Não foi possível efetuar a verificação. Tente novamente.",error_title:"Erro",error_generic:"Ocorreu um erro",prix_produit_add:"Adicionar um produto",prix_produit_remove:"Remover",prix_produit_error_quantity:"Indique uma quantidade de, pelo menos, 1 para o produto {num}",file_selected:"1 ficheiro selecionado",file_upload_failed:"Não foi possível carregar o ficheiro.",file_format_not_accepted:"Formato não aceite. Formatos aceites: {formats}",file_select_required:"Selecione um ficheiro",file_upload_button:"Carregar",file_delete:"Eliminar o ficheiro",multiple_files_max:"Máximo de {max} ficheiro(s).",multiple_files_drop:"Arraste os seus ficheiros para aqui ou clique"},no:{address_required:"The address is required",address_metropolitan_only:"This offer is only valid in mainland France and Corsica.",email_domain_not_allowed:"This email domain is not allowed for this operation.",noticetextlink:"attached notice",suivant:"Next",valider:"Submit",champ_obligatoire:"Required fields",multiselect_list_empty:"Start typing",iban_section_title:"Information on your IBAN",iban_holder:"Account holder",iban_warning:"Since 09/10/2025, the entered IBAN must match the account holder indicated. Any inconsistency may block the transfer.",iban_uk_sort_code:"Sort Code",iban_uk_sort_code_placeholder:"6 digits",iban_uk_account_number:"Account Number",iban_uk_account_number_placeholder:"8 digits",rgpd:"processes the data collected on the basis of the performance of the contract to manage your participation in this operation. To learn more about how your personal data is managed and to exercise your rights, please refer to the <a href='{link}' target='_blank' id='noticelink'>attached notice</a>.",precedent:"Previous",merci_renseigner_adresse:`Please select a suggested address or click on "I can't find my address"`,trouvepasadresse:"I can't find my address",trouvepasreparateur:"You can't find it?",email_reparateur:"E-mail of your repairer *",enseigne_psa:"Company name *",Numero_identification:"DUNS number *",votre_adresse:"Your address *",changez_votre_adresse:"Edit your address",N_rue:"Number and street name",compl_addresse:"Additional address info",ville:"City",code_postal:"ZIP code",pays:"Country","Corrigez les erreurs":"Please check the remaining errors in the form.",date_fin_regule_passee:"The regularization deadline has passed. The form can no longer be submitted.",Madame:"Mrs.",Monsieur:"Mr.",multiple_file_upload_en_cours:"Upload in progress",multiple_file_aucun_fichier:"No file",multiple_file_patientez:"Please wait, one or more files are being uploaded. Do not submit the form until the operation is complete.",multiple_file_add_file:"Add a file",multiple_file_remove_file:"Remove a file",file_max_size_error:"The file size is too large",file_heic_error:"iPhone .heic files not supported",file_max_size_info:"Maximum file size: {size} MB",select_Précisez:"Please specify",prix_produit_produit:"Product",prix_produit_reference:"Reference",prix_produit_description:"Description",prix_produit_quantite:"Quantity",prix_produit_prix:"Unit price incl. tax",prix_produit_imei:"IMEI",prix_produit_select_placeholder:"Select an option",prix_produit_max_reached:"Limit of {max} product(s) reached",prix_produit_error_select_ref:"Please select a reference for product {num}",prix_produit_error_select_refs:"Please select a reference for products {nums}",prix_produit_error_quantity:"The quantity of product {num} is required",prix_produit_error_price:"The price of product {num} is required",prix_produit_error_min_refs:"Please select at least {min} reference(s)","Erreurs de validation":"Validation errors","Champs concernés :":"Affected fields:"}},EM={"es-cat":["es","fr"],"lu-fr":["fr"],"be-fr":["fr"],"lu-nl":["nl","fr"],"be-nl":["nl","fr"],default:["fr"]},TM={fr:"fr","fr-fr":"fr","lu-fr":"lu-fr","be-fr":"be-fr",en:"en","en-gb":"en","en-uk":"en",uk:"en",es:"es","es-es":"es","es-cat":"es-cat",de:"de",nl:"nl","lu-nl":"lu-nl","be-nl":"be-nl",it:"it",pl:"pl",sl:"sl",si:"sl",bg:"bg",ro:"ro",el:"el",gr:"el",pt:"pt","pt-pt":"pt",no:"no",nb:"no",nn:"no","nb-no":"no","nn-no":"no"};function n$(e){const t=(e||"fr").toLowerCase(),n=TM[t]||t.split("-")[0];return t$[n]?n:"fr"}const Pt=mM({legacy:!1,locale:"fr",fallbackLocale:EM,messages:t$,missingWarn:!1,fallbackWarn:!1});function ki(e){return dt(e,t=>{Pt.global.locale.value=n$(t)},{immediate:!0}),(t,n)=>Pt.global.t(t,n??{})}function wM(e,t={}){if(e==null||e==="")return!0;const{phoneType:n="both",defaultCountry:r,acceptedCountries:i=[]}=t,o=jv(String(e)),s=lO(o,o.trim().startsWith("+")?void 0:r);if(!s||!s.isValid())return Pt.global.t("phone_invalid");if(i.length>0&&(!s.country||!i.includes(s.country)))return Pt.global.t("phone_country_not_accepted");const a=s.getType(),l=a==="MOBILE"||a==="FIXED_LINE_OR_MOBILE",c=a==="FIXED_LINE"||a==="FIXED_LINE_OR_MOBILE";return n==="mobile"&&!l?Pt.global.t("phone_mobile_required"):n==="fixed"&&!c?Pt.global.t("phone_fixed_required"):!0}function q0(e){return(e||"").replace(/\s+/g,"").toUpperCase()}function IM(e){return q0(e).slice(0,2)}const AM=["AD","AT","BE","BG","CH","CY","CZ","DE","DK","EE","ES","FI","FR","GB","GI","GR","HR","HU","IE","IS","IT","LI","LT","LU","LV","MC","MT","NL","NO","PL","PT","RO","SE","SI","SK","SM","VA"],xM={FR:27,BE:16,LU:20,DE:22,NL:18,ES:24,IT:27,PT:25,GB:22,IE:22,AT:20,PL:28,SI:19,BG:22,RO:24,GR:27,CH:21,MC:27};function CM(e){const t=q0(e);if(!/^[A-Z]{2}\d{2}[A-Z0-9]+$/.test(t))return!1;const n=xM[t.slice(0,2)];if(n&&t.length!==n)return!1;const r=t.slice(4)+t.slice(0,4);let i=0;for(const o of r){const s=o>="A"&&o<="Z"?(o.charCodeAt(0)-55).toString():o;for(const a of s)i=(i*10+Number(a))%97}return i===1}function kM(e){return q0(e).replace(/(.{4})/g,"$1 ").trim()}function NM(e){return e==null||e===""?!0:CM(String(e))||Pt.global.t("iban_invalid")}function RM(e,t=[]){if(e==null||e===""||t.length===0)return!0;const n=IM(String(e));return t.flatMap(i=>i.toUpperCase()==="SEPA"?AM:[i.toUpperCase()]).includes(n)||Pt.global.t("iban_country_not_accepted")}function OM(e,t){if(e==null||e==="")return!0;const n=String(e).replace(/\D/g,"");return String(t||"").replace(/\D/g,"").length!==6||n.length!==8,!0}function PM(e){const n=(e||"").replace(/\s+/g,"").toUpperCase().replace("2A","19").replace("2B","18");if(!/^\d{15}$/.test(n))return!1;const r=n.slice(0,13),i=Number(n.slice(13,15));return 97-Number(r)%97===i}function MM(e){return e==null||e===""?!0:PM(String(e))||"Le numéro de sécurité sociale n’est pas valide."}const r$=/^(?:0[1-9]|[1-8]\d|9[0-5])\d{3}$/,LM=/^(?:97|98)/;function z0(e){return Array.isArray(e)?e.flat(1/0).map(t=>String(t).toLowerCase()):[]}const DM=new Set(["fr","fr-metro","gp","mq","gf","re","yt","pm","bl","mf"]);function FM(e){const t=z0(e);return t.length>0&&t.every(n=>DM.has(n))}function i$(e){return z0(e).includes("fr-metro")}function UM(e){return r$.test(String(e??"").trim())}function H0(e){return LM.test(String(e??"").trim())}function BM(e){return z0(e).map(t=>t==="fr-metro"?"fr":t)}const o$={fr:/^\d{5}$/,"fr-metro":r$,be:/^[1-9]\d{3}$/,lu:/^[1-9]\d{3}$/,at:/^[1-9]\d{3}$/,nl:/^\d{4}\s?[A-Za-z]{2}$/,de:/^[1-9]\d{4}$/,no:/^(?!0000)\d{4}$/};function jM(e,t=[]){if(e==null||e==="")return!0;const n=String(e).trim(),i=t.map(s=>s.toLowerCase()).filter(s=>o$[s]);return i.length===0?!0:i.some(s=>o$[s].test(n))||Pt.global.t("postalcode_invalid")}async function qM(e,t){if(e==null||e==="")return!0;const{field:n,operationId:r,server:i}=t,o=(i||"").replace(/\/$/,"");try{const{data:s}=await mt.post(`${o}/api/check/${r}`,{operationId:r,[n]:e});return s?.status==="OK"?zM(n):!0}catch(s){return rr(s,{where:"uniqueRule",field:n,operationId:r}),Pt.global.t("unique_check_failed")}}function zM(e){return e==="email"?Pt.global.t("unique_email_used"):["phone","mobile_phone","fixed_phone"].includes(e)?Pt.global.t("unique_phone_used"):Pt.global.t("unique_value_used")}Un.extend(kb);function Vs(e){return Array.isArray(e)?e:e==null?[]:typeof e=="object"?Object.values(e):[e]}function V0(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}let s$=!1;function a$(){if(s$)return;s$=!0;const e={required:$C,email:fC,min:Fb,max:Lb,min_value:Ub,max_value:Db,numeric:yC,integer:pC,length:mC,digits:Pb,regex:Bb,one_of:Qm,not_one_of:_C,confirmed:dC,size:SC,between:Ob,url:EC,alpha_spaces:Rb};for(const[t,n]of Object.entries(e))xn(t,n);xn("phone",(t,n)=>wM(t,V0(n))),xn("iban",t=>NM(t)),xn("countryiban",(t,n)=>RM(t,Vs(n).map(String))),xn("iban_uk_modulus",(t,n)=>OM(t,String(Vs(n)[0]??""))),xn("securitesocialefr",t=>MM(t)),xn("checked",t=>t===!0?!0:Pt.global.t("field_required")),xn("address_required",t=>{const n=t;return n&&typeof n=="object"&&n.address?!0:Pt.global.t("address_required")}),xn("address_metropolitan",t=>{const n=t;return!n||typeof n!="object"||!n.postcode||UM(n.postcode)?!0:Pt.global.t("address_metropolitan_only")}),xn("prix_produits_quantity",t=>{const r=(Array.isArray(t)?t:[]).findIndex(i=>!(Number.isInteger(i.quantity)&&Number(i.quantity)>=1));return r===-1?!0:Pt.global.t("prix_produit_error_quantity",{num:r+1})}),xn("postalcode",(t,n)=>jM(t,Vs(n).map(String))),xn("unique",(t,n)=>{const r=V0(n);return qM(t,{field:String(r.field??""),operationId:String(r.operationId??""),server:String(r.server??"")})}),xn("date_range",(t,n)=>{if(t==null||t==="")return!0;const r=V0(n),i=Un(String(t),["DD/MM/YYYY","YYYY-MM-DD"],!0);if(!i.isValid())return Pt.global.t("date_invalid");const o=r.min?Un(String(r.min)):null,s=r.max?Un(String(r.max)):null;return o&&o.isValid()&&i.isBefore(o,"day")?Pt.global.t("date_after",{date:o.format("DD/MM/YYYY")}):s&&s.isValid()&&i.isAfter(s,"day")?Pt.global.t("date_before",{date:s.format("DD/MM/YYYY")}):!0}),xn("date_between",(t,n)=>{if(t==null||t==="")return!0;const[r,i]=Vs(n).map(s=>s?Un(String(s)):null),o=Un(String(t));return o.isValid()?r&&r.isValid()&&o.isBefore(r,"day")?Pt.global.t("date_after",{date:r.format("DD/MM/YYYY")}):i&&i.isValid()&&o.isAfter(i,"day")?Pt.global.t("date_before",{date:i.format("DD/MM/YYYY")}):!0:Pt.global.t("date_invalid")}),xn("before",(t,n)=>{if(!t)return!0;const r=Vs(n)[0],i=r?Un(String(r)):null;return!i||!i.isValid()||Un(String(t)).isBefore(i,"day")?!0:Pt.global.t("date_before",{date:i.format("DD/MM/YYYY")})}),xn("after",(t,n)=>{if(!t)return!0;const r=Vs(n)[0],i=r?Un(String(r)):null;return!i||!i.isValid()||Un(String(t)).isAfter(i,"day")?!0:Pt.global.t("date_after",{date:i.format("DD/MM/YYYY")})}),EI({generateMessage:xC({fr:CC,en:kC,es:NC,de:RC,nl:OC,it:PC,pl:MC,sl:LC,bg:DC,ro:FC,el:UC,pt:BC}),validateOnInput:!1,validateOnBlur:!0,validateOnChange:!0,validateOnModelUpdate:!1}),Wb("fr")}function HM(e){Wb(e)}const l$=Symbol("houston-form-context");function VM(e){il(l$,e)}function mo(){const e=Uo(l$);if(!e)throw new Error("useFormContext() doit être utilisé dans un champ rendu par <HoustonForm>.");return e}const c$={included:"one_of",not_included:"not_one_of"};function u$(e){const t={};for(const n of e.split("|").map(r=>r.trim()).filter(Boolean)){const r=n.indexOf(":"),i=r===-1?n:n.slice(0,r),o=r===-1?void 0:n.slice(r+1),s=c$[i]||i;if(o===void 0)t[s]=!0;else{const a=o.split(",");t[s]=a.length>1?a:a[0]}}return t}function WM(e){if(!e)return{};if(typeof e=="string")return u$(e);const t={};for(const[n,r]of Object.entries(e))t[c$[n]||n]=r;return t}function GM(e,t={}){const n={...e.type==="email"?{email:!0}:{},...e.validation?u$(e.validation):{},...WM(e.validationRules),...t};return e.required&&(n.required=!0),n}function Xt(e,t={}){const n=mo(),r=e.save_to||e.validationLabel||e.label||e.name||"field",i=pe(()=>GM(e,{...t,...e.unique&&e.save_to&&!n.testmode.value?.disableunique?{unique:{field:e.save_to,operationId:n.operationId.value,server:n.server}}:{}})),o=e.save_to&&e.save_to in n.form?n.form[e.save_to]:void 0,{value:s,errorMessage:a,meta:l,handleBlur:c,handleChange:u,validate:d,setValue:f}=Vo(r,i,{initialValue:o,label:e.validationLabel||e.label||void 0,syncVModel:!1});e.save_to&&dt(s,T=>{n.form[e.save_to]=T},{immediate:!0});const p=T=>T==null||T==="",m=pe(()=>!!a.value&&(l.touched||l.dirty||n.submitAttempted.value)),b=pe(()=>l.valid&&!a.value&&(l.touched||l.dirty)&&!p(s.value)),g=pe(()=>m.value?"error":b.value?"valid":"idle"),_=pe(()=>({"fb-invalid":m.value,"fb-valid":b.value})),y=pe({get:()=>s.value,set:T=>f(T)});return{ctx:n,validationName:r,value:s,model:y,errorMessage:a,showError:m,isValid:b,fieldState:g,controlClass:_,meta:l,handleBlur:c,handleChange:u,validate:d,setValue:f}}function d$(e,t){if(!t)return e;const n='<span class="fb-required-star">*</span>',r=e.match(/<\/[^>]+>$/);return r&&r.index!==void 0?e.slice(0,r.index)+n+e.slice(r.index):e+n}const YM=["for","innerHTML"],lt=ot({__name:"FieldLabel",props:{label:{},required:{type:Boolean},forId:{}},setup(e){const t=e,n=pe(()=>d$(t.label??"",t.required));return(r,i)=>(U(),V("label",{class:"fb-label",for:e.forId,innerHTML:n.value},null,8,YM))}}),KM={class:"fb-field"},XM=["id","type","name","required","inputmode","placeholder","aria-invalid"],JM={key:0,class:"fb-error",role:"alert"},ZM=ot({__name:"FieldConfirmation",props:{targetName:{},name:{},label:{},type:{},required:{type:Boolean},placeholder:{},inputmode:{}},setup(e){const t=e,n=Re(null),{value:r,errorMessage:i,meta:o,handleBlur:s}=Vo(t.name,{required:!!t.required,confirmed:`@${t.targetName}`},{label:t.label}),a=pe(()=>!!i.value&&(o.touched||o.dirty)),l=pe(()=>t.inputmode);return Cr(()=>{n.value?.addEventListener("paste",c=>c.preventDefault())}),(c,u)=>(U(),V("div",KM,[Ne(lt,{"for-id":e.name,label:e.label,required:e.required},null,8,["for-id","label","required"]),Et(me("input",{id:e.name,ref_key:"inputRef",ref:n,"onUpdate:modelValue":u[0]||(u[0]=d=>_t(r)?r.value=d:null),class:ut(["fb-input",{"fb-invalid":a.value}]),type:e.type||"text",name:e.name,required:e.required,inputmode:l.value,placeholder:e.placeholder,"aria-invalid":a.value||void 0,onBlur:u[1]||(u[1]=(...d)=>h(s)&&h(s)(...d))},null,42,XM),[[sy,h(r)]]),a.value?(U(),V("span",JM,ve(h(i)),1)):be("",!0)]))}}),QM={class:"fb-field"},eL=["id","type","name","required","autocomplete","placeholder","pattern","maxlength","inputmode","aria-invalid","aria-describedby"],tL=["innerHTML"],nL=ot({__name:"FieldInput",props:{field:{}},setup(e){const n=e.field,r=n.save_to||n.name||"field",i=`${r}-info`,o=`${r}-error`,{model:s,showError:a,errorMessage:l,controlClass:c,validationName:u,handleBlur:d}=Xt(n),f=pe(()=>[n.info?i:null,a.value?o:null].filter(Boolean).join(" ")||void 0),p=pe(()=>n.inputmode);return(m,b)=>(U(),V("div",null,[me("div",QM,[Ne(lt,{"for-id":h(r),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"]),Et(me("input",{id:h(r),"onUpdate:modelValue":b[0]||(b[0]=g=>_t(s)?s.value=g:null),class:ut(["fb-input",h(c)]),type:h(n).type||"text",name:h(u),required:h(n).required||void 0,autocomplete:h(n).autocomplete,placeholder:h(n).placeholder,pattern:h(n).pattern,maxlength:h(n).maxlength,inputmode:p.value,"aria-invalid":h(a)||void 0,"aria-describedby":f.value,onBlur:b[1]||(b[1]=(...g)=>h(d)&&h(d)(...g))},null,42,eL),[[sy,h(s)]]),h(n).info?(U(),V("p",{key:0,id:i,class:"fb-info",innerHTML:h(n).info},null,8,tL)):be("",!0),h(a)&&!h(n).hideErrorMessage?(U(),V("span",{key:1,id:o,class:"fb-error",role:"alert"},ve(h(n).forceErrorMessage||h(l)),1)):be("",!0)]),h(n).confirmation?(U(),io(ZM,{key:0,"target-name":h(u),name:`${h(r)}_confirmation`,label:h(n).confirmationLabel,type:h(n).type||"text",required:h(n).required,placeholder:h(n).placeholder,inputmode:h(n).inputmode},null,8,["target-name","name","label","type","required","placeholder","inputmode"])):be("",!0)]))}}),rL={class:"fb-field"},iL=["id","name","required","aria-invalid","aria-describedby"],oL=["innerHTML"],sL=["innerHTML"],aL=ot({__name:"FieldCheckbox",props:{field:{}},setup(e){const n=e.field,r=n.save_to||n.name||"field",i=`${r}-error`,o=d$(n.label??"",n.required),{model:s,showError:a,errorMessage:l,handleBlur:c}=Xt({...n,required:!1},n.required?{checked:!0}:{});return(u,d)=>(U(),V("div",rL,[me("label",{class:ut(["fb-choice",{"is-checked":!!h(s)}])},[Et(me("input",{id:h(r),"onUpdate:modelValue":d[0]||(d[0]=f=>_t(s)?s.value=f:null),type:"checkbox",name:h(r),required:h(n).required||void 0,"aria-invalid":h(a)||void 0,"aria-describedby":h(a)?i:void 0,onBlur:d[1]||(d[1]=(...f)=>h(c)&&h(c)(...f))},null,40,iL),[[Em,h(s)]]),me("span",{class:"fb-choice-label",innerHTML:h(o)},null,8,oL)],2),h(n).info?(U(),V("p",{key:0,class:"fb-info",innerHTML:h(n).info},null,8,sL)):be("",!0),h(a)?(U(),V("span",{key:1,id:i,class:"fb-error",role:"alert"},ve(h(n).forceErrorMessage||h(l)),1)):be("",!0)]))}}),lL={class:"fb-field"},cL={class:"fb-label"},uL=["innerHTML"],dL={key:0,class:"fb-required-star"},fL={class:"fb-choice-list"},pL=["name","value","required"],mL=["innerHTML"],_L=["innerHTML"],hL=ot({__name:"FieldRadio",props:{field:{}},setup(e){const n=e.field,r=n.save_to||n.name||"field",i=`${r}-error`,{model:o,showError:s,errorMessage:a,handleBlur:l}=Xt(n),c=pe(()=>(n.options||[]).map(u=>typeof u=="string"?{value:u.toLowerCase(),name:u}:{value:u.value,name:u.name??u.label??u.value}));return(u,d)=>(U(),V("fieldset",lL,[me("legend",cL,[me("span",{innerHTML:h(n).label},null,8,uL),h(n).required?(U(),V("span",dL,"*")):be("",!0)]),me("div",fL,[(U(!0),V(et,null,yn(c.value,(f,p)=>(U(),V("label",{key:p,class:ut(["fb-choice",{"is-checked":h(o)===f.value}])},[Et(me("input",{"onUpdate:modelValue":d[0]||(d[0]=m=>_t(o)?o.value=m:null),type:"radio",name:h(r),value:f.value,required:h(n).required||void 0,onBlur:d[1]||(d[1]=(...m)=>h(l)&&h(l)(...m))},null,40,pL),[[Mu,h(o)]]),me("span",{class:"fb-choice-label",innerHTML:f.name},null,8,mL)],2))),128))]),h(n).info?(U(),V("p",{key:0,class:"fb-info",innerHTML:h(n).info},null,8,_L)):be("",!0),h(s)?(U(),V("span",{key:1,id:i,class:"fb-error",role:"alert"},ve(h(n).forceErrorMessage||h(a)),1)):be("",!0)]))}}),gL={key:0,class:"fb-field fb-field--inline"},yL={class:"fb-label"},bL=["innerHTML"],vL={key:0,class:"fb-required-star"},$L={class:"fb-choice-list fb-choice-list--inline"},SL=["name","value","required"],EL={class:"fb-choice-label"},TL={key:1,class:"fb-field"},wL=["id","name","required"],IL={value:"madame"},AL={value:"monsieur"},xL=ot({__name:"FieldCivilite",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"civilite",i=`${r}-error`,{model:o,showError:s,errorMessage:a,handleBlur:l}=Xt(n),c=pe(()=>!!n.type&&n.type!=="radio"),u=pe(()=>n.LabelMadame||"Madame"),d=pe(()=>n.LabelMonsieur||"Monsieur"),f=pe(()=>[{value:"madame",name:u.value},{value:"monsieur",name:d.value}]);return(p,m)=>c.value?(U(),V("div",TL,[Ne(lt,{"for-id":h(r),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"]),Et(me("select",{id:h(r),"onUpdate:modelValue":m[2]||(m[2]=b=>_t(o)?o.value=b:null),class:ut(["fb-select",{"fb-invalid":h(s)}]),name:h(r),required:h(n).required||void 0,onBlur:m[3]||(m[3]=(...b)=>h(l)&&h(l)(...b))},[m[4]||(m[4]=me("option",{value:""}," ",-1)),me("option",IL,ve(u.value),1),me("option",AL,ve(d.value),1)],42,wL),[[Lu,h(o)]]),h(s)?(U(),V("span",{key:0,id:i,class:"fb-error",role:"alert"},ve(h(n).forceErrorMessage||h(a)),1)):be("",!0)])):(U(),V("fieldset",gL,[me("legend",yL,[me("span",{innerHTML:h(n).label},null,8,bL),h(n).required?(U(),V("span",vL,"*")):be("",!0)]),me("div",$L,[(U(!0),V(et,null,yn(f.value,b=>(U(),V("label",{key:b.value,class:ut(["fb-choice",{"is-checked":h(o)===b.value}])},[Et(me("input",{"onUpdate:modelValue":m[0]||(m[0]=g=>_t(o)?o.value=g:null),type:"radio",name:h(r),value:b.value,required:h(n).required||void 0,onBlur:m[1]||(m[1]=(...g)=>h(l)&&h(l)(...g))},null,40,SL),[[Mu,h(o)]]),me("span",EL,ve(b.name),1)],2))),128))]),h(s)?(U(),V("span",{key:0,id:i,class:"fb-error",role:"alert"},ve(h(n).forceErrorMessage||h(a)),1)):be("",!0)]))}}),CL={class:"fb-field"},kL=["id","name","required","autocomplete"],NL={key:0,value:""},RL=["value"],OL={key:1,class:"fb-subfield"},PL=["id","placeholder"],ML=["innerHTML"],LL=ot({__name:"FieldSelect",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"field",i=`${r}-error`,{model:o,showError:s,errorMessage:a,handleBlur:l,ctx:c}=Xt(n),u=ki(c.locale),d=pe(()=>(n.options||[]).map(g=>typeof g=="string"?{value:g.toLowerCase(),name:g,other:!1}:{value:g.value,name:g.name??g.label??g.value,other:!!g.other})),f=Re(""),p=Re("");Cr(()=>{const g=typeof o.value=="string"?o.value:"",_=g.split(":")[0];if(_&&d.value.length&&!d.value.some(y=>y.value===_)){o.value="";return}if(g.includes(":")){const[y,...T]=g.split(":");f.value=y,p.value=T.join(":")}else n.defaultOptionText||(f.value=g)});const m=pe(()=>d.value.find(g=>g.value===f.value)),b=pe(()=>!!m.value?.other);return dt([f,p],()=>{o.value=b.value?`${f.value}:${p.value}`:f.value}),(g,_)=>(U(),V("div",CL,[h(n).displayLabel!==!1?(U(),io(lt,{key:0,"for-id":h(r),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"])):be("",!0),Et(me("select",{id:h(r),"onUpdate:modelValue":_[0]||(_[0]=y=>f.value=y),class:ut(["fb-select",{"fb-invalid":h(s)}]),name:h(r),required:h(n).required||void 0,autocomplete:h(n).autocomplete,onBlur:_[1]||(_[1]=(...y)=>h(l)&&h(l)(...y))},[h(n).defaultOptionText!==void 0?(U(),V("option",NL,ve(h(n).defaultOptionText),1)):be("",!0),(U(!0),V(et,null,yn(d.value,(y,T)=>(U(),V("option",{key:T,value:y.value},ve(y.name),9,RL))),128))],42,kL),[[Lu,f.value]]),b.value?(U(),V("div",OL,[Ne(lt,{"for-id":`${h(r)}-other`,label:h(u)("select_Précisez")},null,8,["for-id","label"]),Et(me("input",{id:`${h(r)}-other`,"onUpdate:modelValue":_[2]||(_[2]=y=>p.value=y),class:"fb-input",type:"text",placeholder:h(u)("select_Précisez")},null,8,PL),[[sn,p.value]])])):be("",!0),h(n).info?(U(),V("p",{key:2,class:"fb-info",innerHTML:h(n).info},null,8,ML)):be("",!0),h(s)?(U(),V("span",{key:3,id:i,class:"fb-error",role:"alert"},ve(h(a)),1)):be("",!0)]))}}),DL={class:"fb-field"},FL=["id","name","required","autocomplete","placeholder","aria-invalid","aria-describedby"],UL=["innerHTML"],BL=ot({__name:"FieldInputNumber",props:{field:{}},setup(e){const n=e.field,r=n.save_to||n.name||"field",i=`${r}-error`,o=`${r}-info`,{model:s,showError:a,errorMessage:l,controlClass:c,handleBlur:u}=Xt(n);function d(f){const p=f.target;p.value!==""&&Number(p.value)<0&&(s.value=0)}return(f,p)=>(U(),V("div",DL,[Ne(lt,{"for-id":h(r),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"]),Et(me("input",{id:h(r),"onUpdate:modelValue":p[0]||(p[0]=m=>_t(s)?s.value=m:null),class:ut(["fb-input",h(c)]),type:"number",inputmode:"decimal",min:"0",name:h(r),required:h(n).required||void 0,autocomplete:h(n).autocomplete,placeholder:h(n).placeholder,"aria-invalid":h(a)||void 0,"aria-describedby":h(n).info?o:void 0,onInput:d,onBlur:p[1]||(p[1]=(...m)=>h(u)&&h(u)(...m))},null,42,FL),[[sn,h(s),void 0,{number:!0}]]),h(n).info?(U(),V("p",{key:0,id:o,class:"fb-info",innerHTML:h(n).info},null,8,UL)):be("",!0),h(a)?(U(),V("span",{key:1,id:i,class:"fb-error",role:"alert"},ve(h(l)),1)):be("",!0)]))}}),jL={class:"fb-field"},qL=["id","name","rows","required","placeholder","maxlength","aria-invalid","aria-describedby"],zL=["innerHTML"],HL=ot({__name:"FieldTextarea",props:{field:{}},setup(e){const n=e.field,r=n.save_to||n.name||"field",i=`${r}-error`,o=`${r}-info`,{model:s,showError:a,errorMessage:l,controlClass:c,handleBlur:u}=Xt(n),d=pe({get:()=>s.value??"",set:f=>s.value=f});return(f,p)=>(U(),V("div",jL,[Ne(lt,{"for-id":h(r),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"]),Et(me("textarea",{id:h(r),"onUpdate:modelValue":p[0]||(p[0]=m=>d.value=m),class:ut(["fb-textarea",h(c)]),name:h(r),rows:h(n).rows||4,required:h(n).required||void 0,placeholder:h(n).placeholder,maxlength:h(n).maxlength,"aria-invalid":h(a)||void 0,"aria-describedby":h(n).info?o:void 0,onBlur:p[1]||(p[1]=(...m)=>h(u)&&h(u)(...m))},null,42,qL),[[sn,d.value]]),h(n).info?(U(),V("p",{key:0,id:o,class:"fb-info",innerHTML:h(n).info},null,8,zL)):be("",!0),h(a)?(U(),V("span",{key:1,id:i,class:"fb-error",role:"alert"},ve(h(l)),1)):be("",!0)]))}}),VL={class:"fb-field"},WL=["id","name","value","min","max","required","aria-invalid"],GL=["innerHTML"],YL=ot({__name:"FieldDateInput",props:{field:{}},setup(e){const n=e.field,r=n.save_to||n.name||"field",i=`${r}-error`,o=n.min?Un(String(n.min)).format("YYYY-MM-DD"):void 0,s=n.dateMaxToday?Un().format("YYYY-MM-DD"):n.max?Un(String(n.max)).format("YYYY-MM-DD"):void 0,a={};o&&(a.min=o),s&&(a.max=s);const{model:l,showError:c,errorMessage:u,controlClass:d,handleBlur:f}=Xt(n,Object.keys(a).length?{date_range:a}:{}),p=Re("");dt(l,b=>{typeof b=="string"&&/^\d{2}\/\d{2}\/\d{4}$/.test(b)?p.value=b.split("/").reverse().join("-"):typeof b=="string"&&/^\d{4}-\d{2}-\d{2}/.test(b)&&(p.value=b.slice(0,10))},{immediate:!0});function m(b){const g=b.target.value;p.value=g,l.value=g?g.split("-").reverse().join("/"):""}return(b,g)=>(U(),V("div",VL,[Ne(lt,{"for-id":h(r),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"]),me("input",{id:h(r),class:ut(["fb-input",h(d)]),type:"date",name:h(r),value:p.value,min:h(o),max:h(s),required:h(n).required||void 0,"aria-invalid":h(c)||void 0,onInput:m,onBlur:g[0]||(g[0]=(..._)=>h(f)&&h(f)(..._))},null,42,WL),h(n).info?(U(),V("p",{key:0,class:"fb-info",innerHTML:h(n).info},null,8,GL)):be("",!0),h(c)?(U(),V("span",{key:1,id:i,class:"fb-error",role:"alert"},ve(h(n).forceErrorMessage||h(u)),1)):be("",!0)]))}});function f$(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function KL(e){if(Array.isArray(e))return e}function XL(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}function JL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
28
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZL(e,t){return KL(e)||XL(e,t)||QL(e,t)||JL()}function QL(e,t){if(e){if(typeof e=="string")return f$(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f$(e,t):void 0}}const p$=Object.entries,m$=Object.setPrototypeOf,eD=Object.isFrozen,_$=Object.getPrototypeOf,h$=Object.getOwnPropertyDescriptor;let _n=Object.freeze,bn=Object.seal,Ws=Object.create,g$=typeof Reflect<"u"&&Reflect,W0=g$.apply,G0=g$.construct;_n||(_n=function(t){return t}),bn||(bn=function(t){return t}),W0||(W0=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return t.apply(n,i)}),G0||(G0=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return new t(...r)});const Ni=jt(Array.prototype.forEach),tD=jt(Array.prototype.lastIndexOf),y$=jt(Array.prototype.pop),Gl=jt(Array.prototype.push),nD=jt(Array.prototype.slice),rD=jt(Array.prototype.splice),Gs=Array.isArray,Y0=E$(Set),K0=jt(Set.prototype.add),Yl=jt(Set.prototype.has),es=jt(String.prototype.toLowerCase),X0=jt(String.prototype.toString),b$=jt(String.prototype.match),Kl=jt(String.prototype.replace),v$=jt(String.prototype.indexOf),iD=jt(String.prototype.trim),oD=jt(Number.prototype.toString),sD=jt(Boolean.prototype.toString),$$=typeof BigInt>"u"?null:jt(BigInt.prototype.toString),S$=typeof Symbol>"u"?null:jt(Symbol.prototype.toString),Kn=jt(Object.prototype.hasOwnProperty),Xl=jt(Object.prototype.toString),vn=jt(RegExp.prototype.test),Ri=E$(TypeError);function jt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return W0(e,t,r)}}function E$(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return G0(e,n)}}function ft(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:es;if(m$&&m$(e,null),!Gs(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i=="string"){const o=n(i);o!==i&&(eD(t)||(t[r]=o),i=o)}e[i]=!0}return e}function aD(e){for(let t=0;t<e.length;t++)Kn(e,t)||(e[t]=null);return e}function ir(e){const t=Ws(null);for(const r of p$(e)){var n=ZL(r,2);const i=n[0],o=n[1];Kn(e,i)&&(Gs(o)?t[i]=aD(o):o&&typeof o=="object"&&o.constructor===Object?t[i]=ir(o):t[i]=o)}return t}function lD(e){switch(typeof e){case"string":return e;case"number":return oD(e);case"boolean":return sD(e);case"bigint":return $$?$$(e):"0";case"symbol":return S$?S$(e):"Symbol()";case"undefined":return Xl(e);case"function":case"object":{if(e===null)return Xl(e);const t=e,n=hr(t,"toString");if(typeof n=="function"){const r=n(t);return typeof r=="string"?r:Xl(r)}return Xl(e)}default:return Xl(e)}}function hr(e,t){for(;e!==null;){const r=h$(e,t);if(r){if(r.get)return jt(r.get);if(typeof r.value=="function")return jt(r.value)}e=_$(e)}function n(){return null}return n}function cD(e,t){for(;e!==null;){const n=h$(e,t);if(n)return n.get?jt(n.get):null;e=_$(e)}return null}function uD(e){try{return vn(e,""),!0}catch{return!1}}const T$=_n(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),J0=_n(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Z0=_n(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),dD=_n(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Q0=_n(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),fD=_n(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),w$=_n(["#text"]),I$=_n(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),e_=_n(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),A$=_n(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Td=_n(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),pD=bn(/{{[\w\W]*|^[\w\W]*}}/g),mD=bn(/<%[\w\W]*|^[\w\W]*%>/g),_D=bn(/\${[\w\W]*/g),hD=bn(/^data-[\-\w.\u00B7-\uFFFF]+$/),gD=bn(/^aria-[\-\w]+$/),x$=bn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),yD=bn(/^(?:\w+script|data):/i),bD=bn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),vD=bn(/^html$/i),$D=bn(/^[a-z][.\w]*(-[.\w]+)+$/i),t_=bn(/<[/\w!]/g),C$=bn(/<[/\w]/g),SD=bn(/<\/no(script|embed|frames)/i),k$=bn(/\/>/i),en={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},ED=_n(ft({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),TD=function(){return typeof window>"u"?null:window},wD=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(r=n.getAttribute(i));const o="dompurify"+(r?"#"+r:"");try{return t.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},N$=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},_o=function(t,n,r,i){return Kn(t,n)&&Gs(t[n])?ft(i.base?ir(i.base):{},t[n],i.transform):r},n_=function(t,n,r){const i=Kn(t,n)?t[n]:void 0;return i&&typeof i=="object"?ir(i):r()};function R$(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:TD();const t=he=>R$(he);if(t.version="3.4.17",t.removed=[],!e||!e.document||e.document.nodeType!==en.document||!e.Element)return t.isSupported=!1,t;let n=e.document;const r=n,i=r.currentScript;e.DocumentFragment;const o=e.HTMLTemplateElement,s=e.Node,a=e.Element,l=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const c=e.DOMParser,u=e.trustedTypes,d=a.prototype,f=hr(d,"cloneNode"),p=hr(d,"remove"),m=hr(d,"removeAttributeNode"),b=hr(d,"nextSibling"),g=hr(d,"childNodes"),_=hr(d,"parentNode"),y=hr(d,"shadowRoot"),T=hr(d,"attributes"),S=s&&s.prototype?hr(s.prototype,"nodeType"):null,O=s&&s.prototype?hr(s.prototype,"nodeName"):null,N=s&&s.prototype?hr(s.prototype,"ownerDocument"):null,w=function(I){return S?S(I):I.nodeType},D=function(I){return O?O(I):I.nodeName},Y=cD(d,"namespaceURI"),q=function(I){return Y?Y(I):I.namespaceURI};if(typeof o=="function"){const he=n.createElement("template");he.content&&he.content.ownerDocument&&(n=he.content.ownerDocument)}let P,C="",F,R=!1,G=0;const z=function(){if(G>0)throw Ri('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},K=function(I){z(),G++;try{return P.createHTML(I)}finally{G--}},M=function(I){z(),G++;try{return P.createScriptURL(I)}finally{G--}},oe=function(){return R||(F=wD(u,i),R=!0),F},te=n,se=te.implementation,_e=te.createNodeIterator,ce=te.createDocumentFragment,ye=te.getElementsByTagName,Te=r.importNode;let le=N$();t.isSupported=typeof p$=="function"&&typeof _=="function"&&se&&se.createHTMLDocument!==void 0;const ge=pD,Ce=mD,Me=_D,Ue=hD,nt=gD,A=yD,k=bD,X=$D;let ae=x$,ee=null;const re=ft({},[...T$,...J0,...Z0,...Q0,...w$]);let $=null;const v=ft({},[...I$,...e_,...A$,...Td]);let E=Object.seal(Ws(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),x=null,Q=null;const Z=Object.seal(Ws(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ne=!0,xe=!0,Se=!1,J=!0,ie=!1,Be=!0,He=!1,H=!1,W=null,ue=null,Ae=!1,ke=!1,De=!1,Le=!1,bt=!0,Wt=!1;const cn="user-content-";let St=!0,rn=!1,Yt=null,un={},ur=null;const Ba=ft({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let ja=null;const qa=ft({},["audio","video","img","source","image","track"]);let za=null;const sE=ft({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),xp="http://www.w3.org/1998/Math/MathML",Cp="http://www.w3.org/2000/svg",fi="http://www.w3.org/1999/xhtml";let Ha=fi,e1=!1,t1=null;const Vie=ft({},[xp,Cp,fi],X0),aE=_n(["mi","mo","mn","ms","mtext"]);let n1=ft({},aE);const lE=_n(["annotation-xml"]);let r1=ft({},lE);const Wie=ft({},["title","style","font","a","script"]);let eu=null;const Gie=["application/xhtml+xml","text/html"],Yie="text/html";let Zt=null,Va=null;const Kie=n.createElement("form"),cE=function(I){return I instanceof RegExp||I instanceof Function},i1=function(){let I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Va&&Va===I)return;(!I||typeof I!="object")&&(I={}),I=ir(I),eu=Gie.indexOf(I.PARSER_MEDIA_TYPE)===-1?Yie:I.PARSER_MEDIA_TYPE,Zt=eu==="application/xhtml+xml"?X0:es,ee=_o(I,"ALLOWED_TAGS",re,{transform:Zt}),$=_o(I,"ALLOWED_ATTR",v,{transform:Zt}),t1=_o(I,"ALLOWED_NAMESPACES",Vie,{transform:X0}),za=_o(I,"ADD_URI_SAFE_ATTR",sE,{transform:Zt,base:sE}),ja=_o(I,"ADD_DATA_URI_TAGS",qa,{transform:Zt,base:qa}),ur=_o(I,"FORBID_CONTENTS",Ba,{transform:Zt}),x=_o(I,"FORBID_TAGS",ir({}),{transform:Zt}),Q=_o(I,"FORBID_ATTR",ir({}),{transform:Zt}),un=Kn(I,"USE_PROFILES")?I.USE_PROFILES&&typeof I.USE_PROFILES=="object"?ir(I.USE_PROFILES):I.USE_PROFILES:!1,ne=I.ALLOW_ARIA_ATTR!==!1,xe=I.ALLOW_DATA_ATTR!==!1,Se=I.ALLOW_UNKNOWN_PROTOCOLS||!1,J=I.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ie=I.SAFE_FOR_TEMPLATES||!1,Be=I.SAFE_FOR_XML!==!1,He=I.WHOLE_DOCUMENT||!1,ke=I.RETURN_DOM||!1,De=I.RETURN_DOM_FRAGMENT||!1,Le=I.RETURN_TRUSTED_TYPE||!1,Ae=I.FORCE_BODY||!1,bt=I.SANITIZE_DOM!==!1,Wt=I.SANITIZE_NAMED_PROPS||!1,St=I.KEEP_CONTENT!==!1,rn=I.IN_PLACE||!1,ae=uD(I.ALLOWED_URI_REGEXP)?I.ALLOWED_URI_REGEXP:x$,Ha=typeof I.NAMESPACE=="string"?I.NAMESPACE:fi,n1=n_(I,"MATHML_TEXT_INTEGRATION_POINTS",()=>ft({},aE)),r1=n_(I,"HTML_INTEGRATION_POINTS",()=>ft({},lE));const j=n_(I,"CUSTOM_ELEMENT_HANDLING",()=>Ws(null));if(E=Ws(null),Kn(j,"tagNameCheck")&&cE(j.tagNameCheck)&&(E.tagNameCheck=j.tagNameCheck),Kn(j,"attributeNameCheck")&&cE(j.attributeNameCheck)&&(E.attributeNameCheck=j.attributeNameCheck),Kn(j,"allowCustomizedBuiltInElements")&&typeof j.allowCustomizedBuiltInElements=="boolean"&&(E.allowCustomizedBuiltInElements=j.allowCustomizedBuiltInElements),bn(E),ie&&(xe=!1),De&&(ke=!0),un&&(ee=ft({},w$),$=Ws(null),un.html===!0&&(ft(ee,T$),ft($,I$)),un.svg===!0&&(ft(ee,J0),ft($,e_),ft($,Td)),un.svgFilters===!0&&(ft(ee,Z0),ft($,e_),ft($,Td)),un.mathMl===!0&&(ft(ee,Q0),ft($,A$),ft($,Td))),Z.tagCheck=null,Z.attributeCheck=null,Kn(I,"ADD_TAGS")&&(typeof I.ADD_TAGS=="function"?Z.tagCheck=I.ADD_TAGS:Gs(I.ADD_TAGS)&&(ee===re&&(ee=ir(ee)),ft(ee,I.ADD_TAGS,Zt))),Kn(I,"ADD_ATTR")&&(typeof I.ADD_ATTR=="function"?Z.attributeCheck=I.ADD_ATTR:Gs(I.ADD_ATTR)&&($===v&&($=ir($)),ft($,I.ADD_ATTR,Zt))),Kn(I,"ADD_FORBID_CONTENTS")&&Gs(I.ADD_FORBID_CONTENTS)&&(ur===Ba&&(ur=ir(ur)),ft(ur,I.ADD_FORBID_CONTENTS,Zt)),St&&(ee["#text"]=!0),He&&ft(ee,["html","head","body"]),ee.table&&(ft(ee,["tbody"]),delete x.tbody),I.TRUSTED_TYPES_POLICY){if(typeof I.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ri('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof I.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ri('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const de=P;P=I.TRUSTED_TYPES_POLICY;try{C=K("")}catch(fe){throw P=de,fe}}else I.TRUSTED_TYPES_POLICY===null?(P=void 0,C=""):(P===void 0&&(P=oe()),P&&typeof C=="string"&&(C=K("")));_n&&_n(I),Va=I},uE=ft({},[...J0,...Z0,...dD]),dE=ft({},[...Q0,...fD]),Xie=function(I,j,de){return j.namespaceURI===fi?I==="svg":j.namespaceURI===xp?I==="svg"&&(de==="annotation-xml"||n1[de]):!!uE[I]},Jie=function(I,j,de){return j.namespaceURI===fi?I==="math":j.namespaceURI===Cp?I==="math"&&r1[de]:!!dE[I]},Zie=function(I,j,de){return j.namespaceURI===Cp&&!r1[de]||j.namespaceURI===xp&&!n1[de]?!1:!dE[I]&&(Wie[I]||!uE[I])},Qie=function(I){const j=q(I),de=es(D(I)),fe=_(I);let Fe,Ge;return fe&&w(fe)===en.element?(Fe={namespaceURI:q(fe)},Ge=es(D(fe))):(Fe={namespaceURI:Ha},Ge="template"),t1[j]?j===Cp?Xie(de,Fe,Ge):j===xp?Jie(de,Fe,Ge):j===fi?Zie(de,Fe,Ge):!!(eu==="application/xhtml+xml"&&t1[j]):!1},Oo=function(I){Gl(t.removed,{element:I});try{_(I).removeChild(I)}catch{if(p(I),!_(I))throw Ri("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},fE=function(I,j,de){try{m(I,j)}catch{try{I.removeAttribute(de)}catch{}}},o1=function(I){a1(I);const j=g(I);j&&Ni(nD(j),fe=>{try{p(fe)}catch{}});const de=w(I)===en.element?T(I):null;if(de)for(let fe=de.length-1;fe>=0;--fe){const Fe=de[fe],Ge=Fe&&Fe.name;typeof Ge=="string"&&fE(I,Fe,Ge)}},Wa=function(I,j,de){if(!de)try{de=j.getAttributeNode(I)}catch{de=null}Gl(t.removed,{attribute:de||null,from:j});try{de?m(j,de):j.removeAttribute(I)}catch{try{j.removeAttribute(I)}catch{}}if(I==="is")if(ke||De)try{Oo(j)}catch{}else try{j.setAttribute(I,"")}catch{}},pE=function(I){const j=T(I);if(j)for(let de=j.length-1;de>=0;--de){const fe=j[de],Fe=fe&&fe.name;typeof Fe!="string"||$[Zt(Fe)]||fE(I,fe,Fe)}},s1=function(I,j){let de=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const fe=[I];for(;fe.length>0;){const Fe=fe.pop();if(j(Fe)===!1)continue;if(de&&w(Fe)===en.element){const rt=y(Fe);Po(rt)&&fe.push(rt)}const Ge=g(Fe);if(Ge)for(let rt=Ge.length-1;rt>=0;--rt)fe.push(Ge[rt])}},a1=function(I){s1(I,j=>{w(j)===en.element&&pE(j)})},l1=function(I){const j=[];return s1(I,de=>{j.push(de)},!0),j},eoe=function(I,j){const de=Y0();Ni(l1(I),fe=>{w(fe)===en.element&&K0(de,fe)}),Ni(j,fe=>{w(fe)===en.element&&!Yl(de,fe)&&pE(fe)})},mE=function(I,j){let de=!1;return Ni(t.removed,fe=>{fe.element&&(de=de||fe.element===I,a1(fe.element))}),eoe(I,j),de},toe=8,noe=function(I,j){const de=Yt;let fe=null;const Fe=()=>(fe||(fe=Y0(),Ni(j,Ge=>{K0(fe,Ge)})),fe);for(let Ge=0;;Ge++){const rt=l1(I),dn=[I];let pi=!1;if(Ni(rt,Vn=>{w(Vn)===en.documentFragment?Gl(dn,Vn):!pi&&!Yl(de,Vn)&&(pi=Yl(Fe(),Vn))}),!pi)return;if(Ge>=toe)throw Ri("the tree kept changing during in-place sanitization; refusing to return it");Ni(dn,(Vn,Zn)=>{roe(Vn,Zn>0,I,Fe())})}},roe=function(I,j,de,fe){const Fe=c1(I);let Ge;for(;Ge=Fe.nextNode();)!Yl(fe,Ge)||Yl(Yt,Ge)||(j&&zr(le.uponSanitizeShadowNode,Ge,null),d1(Ge,de),f1(Ge,de),Po(Ge.content)&&nu(Ge.content))},ioe=function(I){Yt&&K0(Yt,I)},_E=function(I,j){return Be?I==="patchsrc"?!0:I==="for"&&j!=="label"&&j!=="output":!1},ooe=function(I){Be&&s1(I,j=>{const de=w(j);if(de===en.processingInstruction||de===en.comment&&vn(C$,j.data)){try{p(j)}catch{}return!1}if(de===en.element){const fe=j,Fe=Zt(D(j));try{fe.hasAttribute&&fe.hasAttribute("patchsrc")&&fe.removeAttribute("patchsrc"),fe.hasAttribute&&fe.hasAttribute("for")&&_E("for",Fe)&&fe.removeAttribute("for")}catch{}}return!0})},hE=function(I){let j=null,de=null;if(Ae)I="<remove></remove>"+I;else{const Ge=b$(I,/^[\r\n\t ]+/);de=Ge&&Ge[0]}eu==="application/xhtml+xml"&&Ha===fi&&(I='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+I+"</body></html>");const fe=P?K(I):I;if(Ha===fi)try{j=new c().parseFromString(fe,eu)}catch{}if(!j||!j.documentElement){j=se.createDocument(Ha,"template",null);try{j.documentElement.innerHTML=e1?C:fe}catch{}}const Fe=j.body||j.documentElement;return I&&de&&Fe.insertBefore(n.createTextNode(de),Fe.childNodes[0]||null),Ha===fi?ye.call(j,He?"html":"body")[0]:He?j.documentElement:Fe},c1=function(I){const j=N?N(I):I.ownerDocument;return _e.call(j||I,I,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},kp=function(I){return I=Kl(I,ge," "),I=Kl(I,Ce," "),I=Kl(I,Me," "),I},u1=function(I){var j;gE(I);const de=(j=I.querySelectorAll)===null||j===void 0?void 0:j.call(I,"template");de&&Ni(de,fe=>{Po(fe.content)&&u1(fe.content)})},gE=function(I){I.normalize();const j=N?N(I):I.ownerDocument,de=_e.call(j||I,I,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let fe=de.nextNode();for(;fe;)fe.data=kp(fe.data),fe=de.nextNode()},Np=function(I){const j=O?O(I):null;return typeof j!="string"||Zt(j)!=="form"?!1:typeof I.nodeName!="string"||typeof I.textContent!="string"||typeof I.removeChild!="function"||I.attributes!==T(I)||typeof I.removeAttribute!="function"||typeof I.removeAttributeNode!="function"||typeof I.getAttributeNode!="function"||typeof I.setAttribute!="function"||typeof I.namespaceURI!="string"||typeof I.insertBefore!="function"||typeof I.hasChildNodes!="function"||I.nodeType!==S(I)||I.childNodes!==g(I)},Po=function(I){if(!S||typeof I!="object"||I===null)return!1;try{return S(I)===en.documentFragment}catch{return!1}},tu=function(I){if(!S||typeof I!="object"||I===null)return!1;try{return typeof S(I)=="number"}catch{return!1}};function zr(he,I,j){he.length!==0&&Ni(he,de=>{de.call(t,I,j,Va)})}const soe=function(I,j){return!!(Be&&I.hasChildNodes()&&!tu(I.firstElementChild)&&vn(t_,I.textContent)&&vn(t_,I.innerHTML)||Be&&ED[j]&&w(I)===en.element&&q(I)===fi&&(tu(I.firstElementChild)||typeof I.textContent=="string"&&vn(t_,I.textContent))||I.nodeType===en.processingInstruction||Be&&I.nodeType===en.comment&&vn(C$,I.data))},Rp=function(I,j){if(I instanceof RegExp)return vn(I,j);if(I instanceof Function){for(var de=arguments.length,fe=new Array(de>2?de-2:0),Fe=2;Fe<de;Fe++)fe[Fe-2]=arguments[Fe];return!!I(j,...fe)}return!1},aoe=function(I,j,de){if(!x[j]&&vE(j)&&Rp(E.tagNameCheck,j))return!1;if(St&&!ur[j]&&!ur[es(j)]){const fe=_(I),Fe=g(I);if(Fe&&fe){const Ge=Fe.length;for(let rt=Ge-1;rt>=0;--rt){const dn=I===de?f(Fe[rt],!0):Fe[rt];fe.insertBefore(dn,b(I))}}}return Oo(I),!0},yE=function(I,j,de,fe){return I.length===0?j:j===de||j===fe?ir(j):j},Ga=function(I,j){return I===j||_(I)!==null?!1:(rn&&a1(I),!0)},d1=function(I,j){if(ioe(I),zr(le.beforeSanitizeElements,I,null),Ga(I,j))return!0;if(Np(I))return Oo(I),!0;const de=Zt(D(I));if(ee=yE(le.uponSanitizeElement,ee,re,W),zr(le.uponSanitizeElement,I,{tagName:de,allowedTags:ee}),Ga(I,j))return!0;if(soe(I,de))return Oo(I),!0;if(x[de]||!(Z.tagCheck instanceof Function&&Z.tagCheck(de))&&!ee[de]){const fe=aoe(I,de,j);return fe===!1&&(zr(le.afterSanitizeElements,I,null),Ga(I,j))?!0:fe}if(w(I)===en.element&&!Qie(I)||(de==="noscript"||de==="noembed"||de==="noframes")&&vn(SD,I.innerHTML))return Oo(I),!0;if(ie&&I.nodeType===en.text){const fe=kp(I.textContent);I.textContent!==fe&&(Gl(t.removed,{element:I.cloneNode()}),I.textContent=fe)}return zr(le.afterSanitizeElements,I,null),Ga(I,j)},bE=function(I,j,de){if(Q[j]||_E(j,I)||bt&&(j==="id"||j==="name")&&(de in n||de in Kie))return!1;const fe=$[j]||Z.attributeCheck instanceof Function&&Z.attributeCheck(j,I);return xe&&vn(Ue,j)||ne&&vn(nt,j)?!0:fe?za[j]||vn(ae,Kl(de,k,""))||(j==="src"||j==="xlink:href"||j==="href")&&I!=="script"&&v$(de,"data:")===0&&ja[I]||Se&&!vn(A,Kl(de,k,""))?!0:!de:vE(I)&&Rp(E.tagNameCheck,I)&&Rp(E.attributeNameCheck,j,I)||j==="is"&&E.allowCustomizedBuiltInElements&&Rp(E.tagNameCheck,de)},loe=ft({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),vE=function(I){return!loe[es(I)]&&vn(X,I)},coe=function(I,j,de,fe){if(P&&typeof u=="object"&&typeof u.getAttributeType=="function"&&!de)switch(u.getAttributeType(I,j)){case"TrustedHTML":return K(fe);case"TrustedScriptURL":return M(fe)}return fe},uoe=function(I,j,de,fe){try{return de?I.setAttributeNS(de,j,fe):I.setAttribute(j,fe),Np(I)?(Oo(I),!1):!0}catch{return Wa(j,I),!1}},$E=function(I,j){return Be&&vn(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,j)?!0:es(I)==="attributename"&&b$(j,"href")!==null},f1=function(I,j){if(zr(le.beforeSanitizeAttributes,I,null),Ga(I,j))return;const de=I.attributes;if(!de||Np(I))return;$=yE(le.uponSanitizeAttribute,$,v,ue);const fe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:$,forceKeepAttr:void 0};let Fe=de.length;const Ge=Zt(I.nodeName);for(;Fe--;){const rt=de[Fe],dn=rt.name,pi=rt.namespaceURI,Vn=rt.value,Zn=Zt(dn),Ya=Vn;let Qn=dn==="value"?Ya:iD(Ya),SE=!1;if(fe.attrName=Zn,fe.attrValue=Qn,fe.keepAttr=!0,fe.forceKeepAttr=void 0,zr(le.uponSanitizeAttribute,I,fe),Qn=fe.attrValue,Wt&&(Zn==="id"||Zn==="name")&&v$(Qn,cn)!==0&&(Wa(dn,I,rt),Qn=cn+Qn,SE=!0),$E(dn,Qn)){Wa(dn,I,rt);continue}if(!fe.forceKeepAttr){if(!fe.keepAttr){Wa(dn,I,rt);continue}if(!J&&vn(k$,Qn)){Wa(dn,I,rt);continue}if(ie&&(Qn=kp(Qn)),!bE(Ge,Zn,Qn)){Wa(dn,I,rt);continue}Qn=coe(Ge,Zn,pi,Qn),Qn!==Ya&&uoe(I,dn,pi,Qn)&&SE&&y$(t.removed)}}zr(le.afterSanitizeAttributes,I,null),Ga(I,j)},nu=function(I){let j=null;const de=c1(I);for(zr(le.beforeSanitizeShadowDOM,I,null);j=de.nextNode();)if(zr(le.uponSanitizeShadowNode,j,null),d1(j,I),f1(j,I),Po(j.content)&&nu(j.content),w(j)===en.element){const fe=y(j);Po(fe)&&(p1(fe),nu(fe))}ie&&gE(I),zr(le.afterSanitizeShadowDOM,I,null)},p1=function(I){const j=[{node:I,shadow:null}];for(;j.length>0;){const de=j.pop();if(de.shadow){nu(de.shadow);continue}const fe=de.node,Fe=w(fe)===en.element,Ge=g(fe);if(Ge)for(let rt=Ge.length-1;rt>=0;--rt)j.push({node:Ge[rt],shadow:null});if(Fe){const rt=O?O(fe):null;if(typeof rt=="string"&&Zt(rt)==="template"){const dn=fe.content;Po(dn)&&j.push({node:dn,shadow:null})}}if(Fe){const rt=y(fe);Po(rt)&&j.push({node:null,shadow:rt},{node:rt,shadow:null})}}};return t.sanitize=function(he){let I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},j=null,de=null,fe=null,Fe=null;if(e1=!he,e1&&(he="<!-->"),typeof he!="string"&&!tu(he)&&(he=lD(he),typeof he!="string"))throw Ri("dirty is not a string, aborting");if(!t.isSupported)return he;H?(ee=W,$=ue):i1(I),(le.uponSanitizeElement.length>0||le.uponSanitizeAttribute.length>0)&&(ee=ir(ee)),le.uponSanitizeAttribute.length>0&&($=ir($)),t.removed=[];const Ge=rn&&typeof he!="string"&&tu(he);let rt=[];const dn=Yt;if(Ge){ooe(he);const Zn=D(he);if(typeof Zn=="string"){const Ya=Zt(Zn);if(!ee[Ya]||x[Ya])throw o1(he),Ri("root node is forbidden and cannot be sanitized in-place")}if(Np(he))throw o1(he),Ri("root node is clobbered and cannot be sanitized in-place");rt=l1(he),Yt=Y0()}else if(tu(he))j=hE("<!---->"),de=j.ownerDocument.importNode(he,!0),de.nodeType===en.element&&de.nodeName==="BODY"||de.nodeName==="HTML"?j=de:j.appendChild(de),p1(j);else{if(!ke&&!ie&&!He&&he.indexOf("<")===-1)return P&&Le?K(he):he;if(j=hE(he),!j)return ke?null:Le?C:""}j&&Ae&&Oo(j.firstChild);const pi=Ge?he:j;try{Ge&&p1(he);const Zn=c1(pi);for(;fe=Zn.nextNode();)d1(fe,pi),f1(fe,pi),Po(fe.content)&&nu(fe.content);Ge&&noe(he,rt)}catch(Zn){throw Ge&&(o1(he),mE(he,rt)),Zn}finally{Yt=dn}if(Ge){if(mE(he,rt))throw Ri("a node selected for removal could not be safely returned; refusing to sanitize in place");return ie&&u1(he),he}if(ke){if(ie&&u1(j),De)for(Fe=ce.call(j.ownerDocument);j.firstChild;)Fe.appendChild(j.firstChild);else Fe=j;return($.shadowroot||$.shadowrootmode)&&(Fe=Te.call(r,Fe,!0)),Fe}let Vn=He?j.outerHTML:j.innerHTML;return He&&ee["!doctype"]&&j.ownerDocument&&j.ownerDocument.doctype&&j.ownerDocument.doctype.name&&vn(vD,j.ownerDocument.doctype.name)&&(Vn="<!DOCTYPE "+j.ownerDocument.doctype.name+`>
|
|
29
|
+
`+Vn),ie&&(Vn=kp(Vn)),P&&Le?K(Vn):Vn},t.setConfig=function(){let he=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};i1(he),H=!0,W=ee,ue=$},t.clearConfig=function(){Va=null,H=!1,W=null,ue=null,P=F,C=""},t.isValidAttribute=function(he,I,j){Va||i1({});const de=Zt(he),fe=Zt(I);return typeof j=="string"&&($E(I,j)||!J&&vn(k$,j))?!1:bE(de,fe,j)},t.addHook=function(he,I){typeof I=="function"&&Kn(le,he)&&Gl(le[he],I)},t.removeHook=function(he,I){if(Kn(le,he)){if(I!==void 0){const j=tD(le[he],I);return j===-1?void 0:rD(le[he],j,1)[0]}return y$(le[he])}},t.removeHooks=function(he){Kn(le,he)&&(le[he]=[])},t.removeAllHooks=function(){le=N$()},t}var ID=R$();const AD=["b","i","em","strong","u","s","small","sub","sup","p","br","hr","div","span","section","h1","h2","h3","h4","h5","h6","ul","ol","li","a","img","table","thead","tbody","tr","th","td","blockquote","pre","code","label","input","select","option"],xD=["href","target","rel","src","alt","width","height","class","id","style","data-umami-event","type","for","name","value"];function ho(e){return e?ID.sanitize(String(e),{ALLOWED_TAGS:AD,ALLOWED_ATTR:xD,ALLOW_DATA_ATTR:!1}):""}function wd(e){return String(e??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}const CD=["label","info","buttonUploadLabel","defaultOptionText","confirmationLabel"];function kD(e){return typeof e=="string"?ho(e):e&&typeof e=="object"&&typeof e.name=="string"?{...e,name:ho(e.name)}:e}function ND(e){const t={...e},n=t;for(const r of CD)typeof n[r]=="string"&&(n[r]=ho(n[r]));return Array.isArray(t.options)&&(t.options=t.options.map(kD)),t}function RD(e){return Array.isArray(e)?e.map(t=>({...t,name:typeof t.name=="string"?ho(t.name):t.name,fields:Array.isArray(t.fields)?t.fields.map(ND):t.fields})):[]}const OD=["innerHTML"],O$=ot({__name:"FieldBlocHtml",props:{field:{}},setup(e){const n=e.field,{form:r}=mo(),i=pe(()=>(n.html||"").replace(/\{\{\s*([\w.$]+)\s*\}\}/g,(s,a)=>{const l=a.replace(/^this\.form\./,"");if(l==="motif_nc_display"){const c=r.motif_nc_display,u=Array.isArray(c)?c.map(d=>String(d)):typeof c=="string"?c.split(`
|
|
30
|
+
`).filter(Boolean):[];return u.length?`<ul>${u.map(d=>`<li>${wd(d)}</li>`).join("")}</ul>`:wd(c)}if(l==="amount_to_refund"){const c=r.amount_to_refund;if(typeof c!="number")return wd(c);const u=c/100;return u%1===0?u.toString():u.toLocaleString("fr-FR",{minimumFractionDigits:2,maximumFractionDigits:2})}return wd(r[l])}));return(o,s)=>(U(),V("div",{class:"fb-blochtml",innerHTML:i.value},null,8,OD))}});const PD=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();var Id={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const MD=({size:e,strokeWidth:t=2,absoluteStrokeWidth:n,color:r,iconNode:i,name:o,class:s,...a},{slots:l})=>qo("svg",{...Id,width:e||Id.width,height:e||Id.height,stroke:r||Id.stroke,"stroke-width":n?Number(t)*24/Number(e):t,class:["lucide",`lucide-${PD(o??"icon")}`],...a},[...i.map(c=>qo(...c)),...l.default?[l.default()]:[]]);const Oi=(e,t)=>(n,{slots:r})=>qo(MD,{...n,iconNode:t,name:e},r);const r_=Oi("CheckIcon",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const LD=Oi("ChevronDownIcon",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const DD=Oi("CloudUploadIcon",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);const FD=Oi("MinusIcon",[["path",{d:"M5 12h14",key:"1ays0h"}]]);const P$=Oi("PlusIcon",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const i_=Oi("Trash2Icon",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);const UD=Oi("TriangleAlertIcon",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const M$=Oi("UploadIcon",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);const L$=Oi("XIcon",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),BD={class:"fb-field"},jD=["name","required","placeholder","aria-invalid"],qD={key:0,class:"fb-error",role:"alert"},D$=ot({__name:"FieldIbanHolder",props:{label:{},placeholder:{},required:{type:Boolean}},setup(e){const t=e,{form:n}=mo(),{value:r,errorMessage:i,meta:o,handleBlur:s}=Vo(t.label,t.required?{required:!0}:{},{initialValue:n.iban_holder??""});dt(r,l=>{n.iban_holder=l},{immediate:!0});const a=pe(()=>!!i.value&&(o.touched||o.dirty));return(l,c)=>(U(),V("div",BD,[Ne(lt,{"for-id":"iban_holder",label:e.label,required:e.required},null,8,["label","required"]),Et(me("input",{id:"iban_holder","onUpdate:modelValue":c[0]||(c[0]=u=>_t(r)?r.value=u:null),class:ut(["fb-input",{"fb-invalid":a.value}]),type:"text",name:e.label,required:e.required||void 0,placeholder:e.placeholder,"aria-invalid":a.value||void 0,onBlur:c[1]||(c[1]=(...u)=>h(s)&&h(s)(...u))},null,42,jD),[[sn,h(r)]]),a.value?(U(),V("span",qD,ve(h(i)),1)):be("",!0)]))}}),zD={class:"fb-field"},HD={class:"fb-iban-title"},VD=["id","name","value","placeholder","required","aria-invalid"],WD={key:1,class:"fb-iban-warning"},GD=["innerHTML"],YD=ot({__name:"FieldIban",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"iban",i=`${r}-error`,o=n.acceptedCountries||[],s={iban:!0};o.length&&(s.countryiban=o);const{model:a,showError:l,errorMessage:c,controlClass:u,handleBlur:d,ctx:f}=Xt(n,s),p=ki(f.locale);function m(b){a.value=kM(b.target.value)}return(b,g)=>(U(),V("div",zD,[h(n).disableHolderField?be("",!0):(U(),V(et,{key:0},[me("h3",HD,ve(h(n).sectionTitle||h(p)("iban_section_title")),1),Ne(D$,{label:h(n).holderLabel||h(p)("iban_holder"),placeholder:h(n).holderPlaceholder||"Nom et prénom ou société",required:h(n).required},null,8,["label","placeholder","required"])],64)),Ne(lt,{"for-id":h(r),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"]),me("input",{id:h(r),class:ut(["fb-input",h(u)]),type:"text",name:h(r),value:h(a),autocomplete:"off",spellcheck:"false",placeholder:h(n).placeholder,required:h(n).required||void 0,"aria-invalid":h(l)||void 0,onInput:m,onBlur:g[0]||(g[0]=(..._)=>h(d)&&h(d)(..._))},null,42,VD),h(n).disableHolderField?be("",!0):(U(),V("div",WD,[Ne(h(UD),{size:20,"aria-hidden":"true"}),me("p",null,ve(h(p)("iban_warning")),1)])),h(n).info?(U(),V("p",{key:2,class:"fb-info",innerHTML:h(n).info},null,8,GD)):be("",!0),h(l)?(U(),V("span",{key:3,id:i,class:"fb-error",role:"alert"},ve(h(n).forceErrorMessage||h(c)),1)):be("",!0)]))}}),o_=e=>e.accept&&e.allowDataFiles?`${e.accept},.csv,.json`:e.accept||"",s_=(e,t)=>{if(t)return t;const n=e.match(/\/f\/[0-9a-f]{24}\/[\w-]+\.(\w+)$/);return n?`document.${n[1]}`:decodeURI(e.split("/").slice(-1)[0])},KD={class:"fb-field"},XD={key:0,class:"fb-file-status"},JD={key:1,class:"fb-file-link"},ZD=["href"],QD=["aria-label"],eF={key:0,class:"fb-file-btn"},tF=["innerHTML"],nF=["id","name","accept","required"],rF=["id","name","accept","required","aria-invalid"],iF={key:2,class:"fb-file-selected"},oF=["innerHTML"],sF=ot({__name:"FieldFile",props:{field:{}},setup(e){const n=e.field,r=o_(n),i=n.save_to||"file",o=`${i}-error`,s=n.sizeMax??2560,{model:a,showError:l,errorMessage:c,handleBlur:u,ctx:d}=Xt(n),f=ki(d.locale),p=Re(null),m=Re(!1),b=Re(""),g=pe(()=>typeof a.value=="string"&&a.value.startsWith("http")),_=pe(()=>typeof a.value=="string"&&a.value.startsWith("data:"));function y(w){d.bus.emit("show-popup",{title:n.label||"Fichier",message:w})}function T(w){if(!r)return!0;const D=String(r).split(",").map(q=>q.trim().toLowerCase().replace(/^\./,"")).filter(Boolean);if(!D.length)return!0;const Y=w.toLowerCase().match(/\.([^.\s]+)\s*$/)?.[1];return!!Y&&D.includes(Y)}async function S(w){const D=w.target.files?.[0];if(!D)return;if(!T(D.name)){p.value&&(p.value.value=""),y(f("file_format_not_accepted",{formats:r}));return}if(D.size>s*1e3){p.value&&(p.value.value=""),y(f("file_max_size_error"));return}if(D.name.toLowerCase().endsWith(".heic")){p.value&&(p.value.value=""),y(f("file_heic_error"));return}if(b.value=D.name,d.privateUploads.value){await O(D);return}const Y=new FileReader;Y.onloadend=async()=>{const q=Y.result;if(n.isDirectUpload)try{m.value=!0;const{data:P}=await mt.post(`${d.server}/api/v2/submissions/upload`,{b64file:q,filename:D.name,operationId:d.operationId.value,save_to:n.save_to});a.value=P.url}catch(P){a.value="",p.value&&(p.value.value="");const C=P.response?.data?.errors?.[0];y(C||f("file_upload_failed")),rr(P,{where:"FieldFile.upload",save_to:n.save_to})}finally{m.value=!1}else a.value=q;u()},Y.readAsDataURL(D)}async function O(w){try{m.value=!0,a.value=await d.api.uploadPrivateFile(d.formId,n.save_to||"",w)}catch(D){a.value="",p.value&&(p.value.value="");const Y=D.response?.data?.errors?.[0];y(Y||f("file_upload_failed")),rr(D,{where:"FieldFile.uploadPrivate",save_to:n.save_to})}finally{m.value=!1}u()}function N(){a.value="",b.value="",p.value&&(p.value.value="")}return(w,D)=>(U(),V("div",KD,[Ne(lt,{"for-id":h(i),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"]),m.value?(U(),V("div",XD,ve(h(f)("multiple_file_upload_en_cours"))+"… ",1)):g.value?(U(),V("div",JD,[me("a",{href:String(h(a)),target:"_blank",rel:"noopener"},ve(h(s_)(String(h(a)),b.value)),9,ZD),me("button",{type:"button",class:"fb-file-delete","aria-label":h(f)("file_delete"),onClick:N},[Ne(h(L$),{size:16})],8,QD)])):be("",!0),!m.value&&!g.value?(U(),V(et,{key:2},[h(n).isButtonUpload?(U(),V("label",eF,[Ne(h(M$),{size:18}),me("span",{innerHTML:h(n).buttonUploadLabel||h(f)("file_upload_button")},null,8,tF),me("input",{id:h(i),ref_key:"inputRef",ref:p,type:"file",class:"fb-file-hidden",name:h(i),accept:h(r),required:!h(a)&&h(n).required?!0:void 0,onChange:S,onBlur:D[0]||(D[0]=(...Y)=>h(u)&&h(u)(...Y))},null,40,nF)])):(U(),V("input",{key:1,id:h(i),ref_key:"inputRef",ref:p,type:"file",class:"fb-file-input",name:h(i),accept:h(r),required:!h(a)&&h(n).required?!0:void 0,"aria-invalid":h(l)||void 0,onChange:S,onBlur:D[1]||(D[1]=(...Y)=>h(u)&&h(u)(...Y))},null,40,rF)),_.value?(U(),V("span",iF,[In(ve(h(f)("file_selected")),1),b.value?(U(),V(et,{key:0},[In(" — "+ve(b.value),1)],64)):be("",!0)])):be("",!0)],64)):be("",!0),h(n).info?(U(),V("p",{key:3,class:"fb-info",innerHTML:h(n).info},null,8,oF)):be("",!0),h(l)?(U(),V("span",{key:4,id:o,class:"fb-error",role:"alert"},ve(h(c)),1)):be("",!0)]))}});function aF(e){const t=(e||"").replace(/[^\dAB]/gi,"").toUpperCase().slice(0,15),n=[1,2,2,2,3,3,2],r=[];let i=0;for(const o of n){if(i>=t.length)break;r.push(t.slice(i,i+o)),i+=o}return r.join(" ")}const lF={class:"fb-field"},cF=["id","name","value","placeholder","required","aria-invalid"],uF=["innerHTML"],dF=ot({__name:"FieldSecuriteSociale",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"ssn",i=`${r}-error`,{model:o,showError:s,errorMessage:a,controlClass:l,handleBlur:c}=Xt(n,{securitesocialefr:!0});function u(d){o.value=aF(d.target.value)}return(d,f)=>(U(),V("div",lF,[Ne(lt,{"for-id":h(r),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"]),me("input",{id:h(r),class:ut(["fb-input",h(l)]),type:"text",inputmode:"numeric",name:h(r),value:h(o),placeholder:h(n).placeholder||"1 23 45 67 890 123 45",required:h(n).required||void 0,"aria-invalid":h(s)||void 0,onInput:u,onBlur:f[0]||(f[0]=(...p)=>h(c)&&h(c)(...p))},null,42,cF),h(n).info?(U(),V("p",{key:0,class:"fb-info",innerHTML:h(n).info},null,8,uF)):be("",!0),h(s)?(U(),V("span",{key:1,id:i,class:"fb-error",role:"alert"},ve(h(a)),1)):be("",!0)]))}}),fF={class:"fb-field"},pF=["id","name","placeholder","required","aria-invalid"],mF=ot({__name:"FieldDevise",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"devise",i=`${r}-error`,{model:o,showError:s,errorMessage:a,controlClass:l,handleBlur:c}=Xt(n,{min_value:0}),u=pe({get:()=>{const d=Number(o.value);return d?d/100:""},set:d=>{const f=Math.round(parseFloat(String(d))*100);o.value=Number.isNaN(f)?0:f}});return(d,f)=>(U(),V("div",fF,[Ne(lt,{"for-id":h(r),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"]),Et(me("input",{id:h(r),"onUpdate:modelValue":f[0]||(f[0]=p=>u.value=p),class:ut(["fb-input",h(l)]),type:"number",step:"0.01",inputmode:"decimal",name:h(r),placeholder:h(n).placeholder,required:h(n).required||void 0,"aria-invalid":h(s)||void 0,onBlur:f[1]||(f[1]=(...p)=>h(c)&&h(c)(...p))},null,42,pF),[[sn,u.value]]),h(s)?(U(),V("span",{key:0,id:i,class:"fb-error",role:"alert"},ve(h(n).forceErrorMessage||h(a)),1)):be("",!0)]))}});function a_(e){const t=(e||"").replace(/\D/g,"").slice(0,13);return t.length<=1?t:[t.slice(0,1),t.slice(1,7),t.slice(7,13)].filter(Boolean).join(" ")}const _F={class:"fb-field"},hF=["id","name","value","placeholder","required","aria-invalid"],gF={key:0,class:"fb-ean-ok"},yF=["innerHTML"],bF=ot({__name:"FieldEan",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"ean",i=`${r}-error`,o=pe(()=>(n.options||[]).map(y=>typeof y=="string"?{value:y,label:y}:{value:y.value,label:y.label??y.name??y.value})),s=pe(()=>o.value.length>0),a=pe(()=>o.value.map(y=>a_(y.label))),l={};s.value&&(l.one_of=a.value);const{model:c,showError:u,errorMessage:d,controlClass:f,handleBlur:p,setValue:m}=Xt(n,l),b=Re(a_(String(c.value??""))),g=Re(null);function _(y){b.value=a_(y.target.value);const T=b.value.replace(/\D/g,"");if(s.value){m(b.value);const S=o.value.find(O=>O.label.replace(/\D/g,"")===T);g.value=S?S.value:null}else m(T.length===13?T:""),g.value=null}return(y,T)=>(U(),V("div",_F,[Ne(lt,{"for-id":h(r),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"]),me("input",{id:h(r),class:ut(["fb-input",h(f)]),type:"text",inputmode:"numeric",name:h(r),value:b.value,placeholder:h(n).placeholder,required:h(n).required||void 0,"aria-invalid":h(u)||void 0,onInput:_,onBlur:T[0]||(T[0]=(...S)=>h(p)&&h(p)(...S))},null,42,hF),g.value?(U(),V("span",gF,[Ne(h(r_),{size:16}),In(" "+ve(g.value),1)])):be("",!0),h(n).info?(U(),V("p",{key:1,class:"fb-info",innerHTML:h(n).info},null,8,yF)):be("",!0),h(u)?(U(),V("span",{key:2,id:i,class:"fb-error",role:"alert"},ve(h(n).forceErrorMessage||h(d)),1)):be("",!0)]))}}),vF={class:"fb-field"},$F=["id","name","value","placeholder","required","disabled","autocomplete","aria-invalid"],SF={key:0,class:"fb-phone-verif","aria-live":"polite"},EF={key:0,class:"fb-phone-verified"},TF={class:"fb-phone-code"},wF=["onKeydown"],IF=["disabled"],AF={key:1,class:"fb-info"},xF=["disabled"],CF=["innerHTML"],kF={key:3,class:"fb-error",role:"alert"},NF=60,RF=ot({__name:"FieldPhone",props:{field:{}},emits:["phone-verification"],setup(e,{emit:t}){const n=e,r=t,i=n.field,o=i.save_to||"phone",s=`${o}-error`,{model:a,showError:l,errorMessage:c,controlClass:u,handleBlur:d,ctx:f}=Xt(i,{phone:{phoneType:i.phoneType||"both",defaultCountry:i.defaultCountry,acceptedCountries:i.acceptedCountries||[]}});function p(C){const F=C.target.value,R=jv(F);a.value=new pd(i.defaultCountry).input(R)}const m=Re(""),b=Re(""),g=Re("idle"),_=Re(!1),y=Re(0);let T;const S=pe(()=>{const C=y.value;return`${Math.floor(C/60)}:${String(C%60).padStart(2,"0")}`});function O(){y.value=NF,clearInterval(T),T=setInterval(()=>{y.value>0?y.value--:clearInterval(T)},1e3)}function N(){return{formulaireId:f.formId,field:i.save_to,phone:a.value,email:f.phoneVerificationEmail.value,url:window.location.href,testmode:f.testmode.value}}function w(C){return mt.isAxiosError(C)?C.response?.data?.message:void 0}function D(C){_.value=!0,clearInterval(T),r("phone-verification",{save_to:i.save_to,verified:!0,token:C,phone:a.value})}async function Y(){b.value="",g.value="sending";try{const{data:C}=await mt.post(`${f.server}/api/v2/phone-verification/request`,N());if(C.alreadyVerified){D();return}C.devCode&&console.info("[phone-verification] code:",C.devCode),g.value="codeSent",O()}catch(C){g.value="idle",b.value=w(C)||"L’envoi du code a échoué, veuillez réessayer.",rr(C,{where:"FieldPhone.request",save_to:i.save_to})}}async function q(){b.value="";try{const{data:C}=await mt.post(`${f.server}/api/v2/phone-verification/verify`,{...N(),code:m.value});D(C.token)}catch(C){b.value=w(C)||"Code incorrect, veuillez réessayer.",rr(C,{where:"FieldPhone.verify",save_to:i.save_to})}}function P(){m.value=m.value.replace(/\D/g,"").slice(0,6)}return ks(()=>clearInterval(T)),(C,F)=>(U(),V("div",vF,[Ne(lt,{"for-id":h(o),label:h(i).label,required:h(i).required},null,8,["for-id","label","required"]),me("input",{id:h(o),class:ut(["fb-input",h(u)]),type:"tel",inputmode:"tel",name:h(o),value:h(a),placeholder:h(i).placeholder,required:h(i).required||void 0,disabled:_.value,autocomplete:h(i).autocomplete?"tel":void 0,"aria-invalid":h(l)||void 0,onInput:p,onBlur:F[0]||(F[0]=(...R)=>h(d)&&h(d)(...R))},null,42,$F),h(i).phoneVerificationSms?(U(),V("div",SF,[_.value?(U(),V("span",EF,[Ne(h(r_),{size:16}),F[2]||(F[2]=In(" Numéro validé ",-1))])):g.value==="codeSent"?(U(),V(et,{key:1},[me("div",TF,[Et(me("input",{"onUpdate:modelValue":F[1]||(F[1]=R=>m.value=R),class:"fb-input",type:"text",inputmode:"numeric",autocomplete:"one-time-code",maxlength:"6",placeholder:"Code reçu par SMS",onInput:P,onKeydown:Fu(zo(q,["prevent"]),["enter"])},null,40,wF),[[sn,m.value]]),me("button",{type:"button",class:"fb-button fb-button--primary",disabled:m.value.length!==6,onClick:q}," Vérifier ",8,IF)]),F[3]||(F[3]=me("span",{class:"fb-info"}," Pensez à vérifier la réception de votre code dans vos spams SMS. ",-1)),y.value===0?(U(),V("button",{key:0,type:"button",class:"fb-button fb-button--ghost",onClick:Y}," Renvoyer le code ")):(U(),V("span",AF,"Renvoyer dans "+ve(S.value),1))],64)):(U(),V("button",{key:2,type:"button",class:"fb-button fb-button--primary",disabled:g.value==="sending"||!h(a),onClick:Y},ve(g.value==="sending"?"Envoi…":"Valider mon numéro"),9,xF))])):be("",!0),h(i).info?(U(),V("p",{key:1,class:"fb-info",innerHTML:h(i).info},null,8,CF)):be("",!0),h(l)?(U(),V("span",{key:2,id:s,class:"fb-error",role:"alert"},ve(h(c)),1)):be("",!0),b.value?(U(),V("span",kF,ve(b.value),1)):be("",!0)]))}});let Ad=null;function OF(e,t="fr"){return typeof window>"u"||window.google?.maps?.places?Promise.resolve():Ad||(Ad=new Promise((r,i)=>{const o="__houstonGoogleMapsLoaded";window[o]=()=>{window.google.maps.importLibrary("places").then(()=>r(),i)};const s=document.createElement("script");s.src=`https://maps.googleapis.com/maps/api/js?key=${encodeURIComponent(e)}&libraries=places&language=${t}&loading=async&callback=${o}`,s.async=!0,s.onerror=()=>i(new Error("Google Maps script failed to load")),document.head.appendChild(s)}),Ad)}const PF={class:"fb-field"},MF={key:0,class:"fb-address-ac-wrap"},LF={key:0,class:"fb-address-ban"},DF=["id","aria-expanded","value","placeholder"],FF={key:0,class:"fb-address-suggestions",role:"listbox"},UF=["aria-selected","onMousedown","onMouseenter"],BF={key:2,class:"fb-address-manual"},jF={class:"fb-field"},qF=["id","placeholder"],zF={class:"fb-field"},HF=["id"],VF={class:"fb-address-row"},WF={class:"fb-field"},GF=["id"],YF={class:"fb-field"},KF=["id"],XF={class:"fb-field"},JF=["id"],ZF=["innerHTML"],QF="https://data.geopf.fr/geocodage/completion/",eU=ot({__name:"FieldAdresse",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"address",i=`${r}-error`,o={};n.required&&(o.address_required=!0),i$(n.countries)&&(o.address_metropolitan=!0);const{model:s,showError:a,errorMessage:l,ctx:c}=Xt(n,o),u=ki(c.locale),d=Ar({...s.value||{}});dt(d,()=>{s.value={...d}},{deep:!0});const f=Re(null),p=Re(!1),m=pe(()=>FM(n.countries)),b=pe(()=>i$(n.countries)),g=Re(""),_=Re([]),y=Re(!1),T=Re(-1);let S,O=0,N=null;async function w(C){const F=++O;N?.abort(),N=typeof AbortController<"u"?new AbortController:null;try{const R=`${QF}?text=${encodeURIComponent(C)}&type=StreetAddress&maximumResponses=15`,z=await(await fetch(R,{signal:N?.signal})).json();if(F!==O)return;const K=Array.isArray(z?.results)?z.results:[];_.value=b.value?K.filter(M=>!H0(M.zipcode)):K,y.value=_.value.length>0,T.value=-1}catch(R){if(F!==O||R?.name==="AbortError")return;rr(R,{where:"FieldAdresse.ban"})}}function D(C){g.value=C,clearTimeout(S);const F=C.trim();if(F.length<3){_.value=[],y.value=!1;return}S=setTimeout(()=>w(F),220)}function Y(C){if(b.value&&H0(C.zipcode))return;clearTimeout(S),N?.abort();const F=`, ${C.zipcode??""} ${C.city??""}`,R=C.fulltext.endsWith(F)?C.fulltext.slice(0,-F.length):C.fulltext.split(",")[0];d.address=R||C.street||C.fulltext,d.postcode=C.zipcode,d.city=C.city,d.country="France",typeof C.y=="number"&&(d.latitude=C.y),typeof C.x=="number"&&(d.longitude=C.x),g.value=C.fulltext,y.value=!1,_.value=[]}function q(C){!y.value||!_.value.length||(C.key==="ArrowDown"?(C.preventDefault(),T.value=(T.value+1)%_.value.length):C.key==="ArrowUp"?(C.preventDefault(),T.value=(T.value-1+_.value.length)%_.value.length):C.key==="Enter"&&T.value>=0?(C.preventDefault(),Y(_.value[T.value])):C.key==="Escape"&&(y.value=!1))}function P(C,F,R){const G=oe=>C.find(te=>(te.types||[]).includes(oe)),z=oe=>oe?.longText??oe?.long_name??"",K=z(G("street_number")),M=z(G("route"));d.address=[K,M].filter(Boolean).join(" ")||R,d.city=z(G("locality"))||z(G("postal_town")),d.postcode=z(G("postal_code")),d.country=z(G("country")),F&&(d.latitude=typeof F.lat=="function"?F.lat():F.lat,d.longitude=typeof F.lng=="function"?F.lng():F.lng)}return Cr(async()=>{if(!m.value){if(!c.googleMapsApiKey.value){p.value=!0;return}try{await OF(c.googleMapsApiKey.value,c.locale.value);const C=window.google,F={},R=BM(n.countries);R.length&&(F.includedRegionCodes=R);const G=new C.maps.places.PlaceAutocompleteElement(F);G.id=r,f.value?.appendChild(G),G.addEventListener("gmp-select",async z=>{try{const K=z.placePrediction.toPlace();await K.fetchFields({fields:["addressComponents","location","formattedAddress"]}),P(K.addressComponents||[],K.location,K.formattedAddress||""),b.value&&H0(d.postcode)&&(p.value=!0)}catch(K){rr(K,{where:"FieldAdresse.select"})}})}catch(C){rr(C,{where:"FieldAdresse.load"}),p.value=!0}}}),(C,F)=>(U(),V("div",PF,[Ne(lt,{"for-id":h(r),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"]),!p.value&&!d.address?(U(),V("div",MF,[m.value?(U(),V("div",LF,[me("input",{id:h(r),class:"fb-input",type:"text",autocomplete:"off",role:"combobox","aria-autocomplete":"list","aria-expanded":y.value,value:g.value,placeholder:h(n).placeholder||h(u)("N_rue"),onInput:F[0]||(F[0]=R=>D(R.target.value)),onKeydown:q,onFocus:F[1]||(F[1]=R=>y.value=_.value.length>0),onBlur:F[2]||(F[2]=R=>y.value=!1)},null,40,DF),y.value?(U(),V("ul",FF,[(U(!0),V(et,null,yn(_.value,(R,G)=>(U(),V("li",{key:`${R.fulltext}-${G}`,class:ut(["fb-address-suggestion",{"is-active":G===T.value}]),role:"option","aria-selected":G===T.value,onMousedown:zo(z=>Y(R),["prevent"]),onMouseenter:z=>T.value=G},ve(R.fulltext),43,UF))),128))])):be("",!0)])):(U(),V("div",{key:1,ref_key:"autocompleteEl",ref:f,class:"fb-address-ac"},null,512))])):be("",!0),!p.value&&!d.address?(U(),V("button",{key:1,type:"button",class:"fb-address-toggle",onClick:F[3]||(F[3]=R=>p.value=!0)},ve(h(u)("trouvepasadresse")),1)):be("",!0),p.value||d.address?(U(),V("div",BF,[me("div",jF,[Et(me("input",{id:`${h(r)}-street`,"onUpdate:modelValue":F[4]||(F[4]=R=>d.address=R),class:"fb-input",type:"text",placeholder:h(u)("N_rue"),autocomplete:"address-line1"},null,8,qF),[[sn,d.address]])]),me("div",zF,[Ne(lt,{"for-id":`${h(r)}-compl`,label:h(u)("compl_addresse")},null,8,["for-id","label"]),Et(me("input",{id:`${h(r)}-compl`,"onUpdate:modelValue":F[5]||(F[5]=R=>d.complement=R),class:"fb-input",type:"text",autocomplete:"address-line2"},null,8,HF),[[sn,d.complement]])]),me("div",VF,[me("div",WF,[Ne(lt,{"for-id":`${h(r)}-cp`,label:h(u)("code_postal")},null,8,["for-id","label"]),Et(me("input",{id:`${h(r)}-cp`,"onUpdate:modelValue":F[6]||(F[6]=R=>d.postcode=R),class:"fb-input",type:"text",autocomplete:"postal-code"},null,8,GF),[[sn,d.postcode]])]),me("div",YF,[Ne(lt,{"for-id":`${h(r)}-city`,label:h(u)("ville")},null,8,["for-id","label"]),Et(me("input",{id:`${h(r)}-city`,"onUpdate:modelValue":F[7]||(F[7]=R=>d.city=R),class:"fb-input",type:"text",autocomplete:"address-level2"},null,8,KF),[[sn,d.city]])])]),me("div",XF,[Ne(lt,{"for-id":`${h(r)}-country`,label:h(u)("pays")},null,8,["for-id","label"]),Et(me("input",{id:`${h(r)}-country`,"onUpdate:modelValue":F[8]||(F[8]=R=>d.country=R),class:"fb-input",type:"text",autocomplete:"country-name"},null,8,JF),[[sn,d.country]])])])):be("",!0),h(n).info?(U(),V("p",{key:3,class:"fb-info",innerHTML:h(n).info},null,8,ZF)):be("",!0),h(a)?(U(),V("span",{key:4,id:i,class:"fb-error",role:"alert"},ve(h(n).forceErrorMessage||h(l)),1)):be("",!0)]))}}),tU={class:"fb-field"},nU={key:0,class:"fb-file-status"},rU={key:1,class:"fb-file-link"},iU=["href"],oU=["aria-label","onClick"],sU={key:2,class:"fb-file-btn"},aU=["innerHTML"],lU=["id","name","accept","onChange"],cU=["id","name","accept","onChange"],uU={class:"fb-mf-actions"},dU={key:0,class:"fb-info"},fU=["innerHTML"],pU={key:2,class:"fb-error",role:"alert"},mU=ot({__name:"FieldMultipleFiles",props:{field:{}},setup(e){const n=e.field,r=o_(n),i=n.save_to||"files",o=n.sizeMax??2560,s=n.validationLabel||n.label||i,a=mo(),l=ki(a.locale),c=Re([{data:void 0}]),u=a.form[i];Array.isArray(u)&&u.length&&(c.value=[...u]);const{value:d,errorMessage:f,meta:p,handleBlur:m}=Vo(`${s}_hidden_required`,n.required?{required:!0}:{},{label:s});function b(C){return typeof C=="string"?!0:typeof C.data=="string"&&C.data.startsWith("http")}const g=pe(()=>c.value.some(C=>typeof C!="string"&&C.uploading)),_=pe(()=>c.value.some(b)),y=pe(()=>!!n.required&&!!f.value&&(p.touched||p.dirty||a.submitAttempted.value));dt(c,()=>{const C=c.value.filter(F=>typeof F=="string"?!0:!!F.data).map(F=>typeof F=="string"?F:F.data);a.form[i]=C,d.value=_.value||g.value?"has_files":""},{deep:!0,immediate:!0});function T(C){a.bus.emit("show-popup",{title:n.label||"Fichiers",message:C})}function S(C){if(!r)return!0;const F=String(r).split(",").map(G=>G.trim().toLowerCase().replace(/^\./,"")).filter(Boolean);if(!F.length)return!0;const R=C.toLowerCase().match(/\.([^.\s]+)\s*$/)?.[1];return!!R&&F.includes(R)}async function O(C,F){const R=Array.from(F.target.files||[]);c.value.splice(C,1);for(const G of R){if(!S(G.name)){T(`Format non accepté. Formats acceptés : ${r}`);continue}if(G.size>o*1e3){T(l("file_max_size_error"));continue}if(G.name.toLowerCase().endsWith(".heic")){T(l("file_heic_error"));continue}const z=await N(G),K={data:z,uploading:!0,name:G.name};c.value.push(K);try{K.data=a.privateUploads.value?await a.api.uploadPrivateFile(a.formId,i,G):(await mt.post(`${a.server}/api/v2/submissions/upload`,{b64file:z,filename:G.name,operationId:a.operationId.value,save_to:i})).data.url,K.uploading=!1,c.value=[...c.value]}catch(M){const oe=c.value.indexOf(K);oe!==-1&&c.value.splice(oe,1);const te=M.response?.data?.errors?.[0];T(te||l("file_upload_failed")),rr(M,{where:"FieldMultipleFiles.upload",save_to:i})}}c.value.length||c.value.push({data:void 0})}function N(C){return new Promise(F=>{const R=new FileReader;R.onloadend=()=>F(R.result),R.readAsDataURL(C)})}function w(){c.value.push({data:void 0})}const D=pe(()=>{if(c.value.length<2)return!1;const C=c.value[c.value.length-1];return typeof C=="string"||!C.uploading});function Y(){D.value&&c.value.pop()}function q(C){c.value.splice(C,1),c.value.length||c.value.push({data:void 0})}function P(C){return typeof C=="string"?C:C.data}return(C,F)=>(U(),V("div",tU,[Ne(lt,{"for-id":h(i),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"]),(U(!0),V(et,null,yn(c.value,(R,G)=>(U(),V("div",{key:G,class:"fb-mf-row"},[typeof R!="string"&&R.uploading?(U(),V("div",nU," ["+ve(R.name)+"] "+ve(h(l)("multiple_file_upload_en_cours"))+"… ",1)):b(R)?(U(),V("div",rU,[me("a",{href:P(R),target:"_blank",rel:"noopener"},ve(h(s_)(P(R),typeof R=="string"?void 0:R.name)),9,iU),me("button",{type:"button",class:"fb-file-delete","aria-label":h(l)("file_delete"),onClick:z=>q(G)},[Ne(h(i_),{size:16})],8,oU)])):h(n).isButtonUpload?(U(),V("label",sU,[Ne(h(M$),{size:18}),me("span",{innerHTML:h(n).buttonUploadLabel||h(l)("file_upload_button")},null,8,aU),me("input",{id:`${h(i)}_${G}`,type:"file",class:"fb-file-hidden",name:`${h(i)}_file_${G}`,accept:h(r),multiple:"",onChange:z=>O(G,z),onBlur:F[0]||(F[0]=(...z)=>h(m)&&h(m)(...z))},null,40,lU)])):(U(),V("input",{key:3,id:`${h(i)}_${G}`,type:"file",class:"fb-file-input",name:`${h(i)}_file_${G}`,accept:h(r),multiple:"",onChange:z=>O(G,z),onBlur:F[1]||(F[1]=(...z)=>h(m)&&h(m)(...z))},null,40,cU))]))),128)),me("div",uU,[me("button",{type:"button",class:"fb-button fb-button--ghost fb-mf-btn",onClick:w},[Ne(h(P$),{size:16}),In(" "+ve(h(l)("multiple_file_add_file")),1)]),D.value?(U(),V("button",{key:0,type:"button",class:"fb-button fb-button--ghost fb-mf-btn",onClick:Y},[Ne(h(FD),{size:16}),In(" "+ve(h(l)("multiple_file_remove_file")),1)])):be("",!0)]),g.value?(U(),V("span",dU,ve(h(l)("multiple_file_patientez")),1)):be("",!0),h(n).info?(U(),V("p",{key:1,class:"fb-info",innerHTML:h(n).info},null,8,fU)):be("",!0),y.value?(U(),V("span",pU,ve(h(n).forceErrorMessage||h(f)||h(l)("file_select_required")),1)):be("",!0)]))}});function Ys(e){return(e||[]).map(t=>typeof t=="string"?{value:t.toLowerCase(),name:t}:{value:t.value,name:t.name??t.label??t.value,other:!!t.other})}const _U={class:"fb-field"},hU={class:"fb-label"},gU=["innerHTML"],yU={key:0,class:"fb-required-star"},bU={class:"fb-choice-list"},vU=["name","value"],$U={class:"fb-choice-label"},SU=["innerHTML"],EU=ot({__name:"FieldMultiCheckbox",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"field",i=`${r}-error`,{model:o,showError:s,errorMessage:a,handleBlur:l}=Xt(n),c=pe(()=>Ys(n.options)),u=Re(typeof o.value=="string"&&o.value?o.value.split(":"):[]);return dt(u,()=>{o.value=u.value.join(":")},{deep:!0}),(d,f)=>(U(),V("fieldset",_U,[me("legend",hU,[me("span",{innerHTML:h(n).label},null,8,gU),h(n).required?(U(),V("span",yU,"*")):be("",!0)]),me("div",bU,[(U(!0),V(et,null,yn(c.value,p=>(U(),V("label",{key:p.value,class:ut(["fb-choice",{"is-checked":u.value.includes(p.value)}])},[Et(me("input",{"onUpdate:modelValue":f[0]||(f[0]=m=>u.value=m),type:"checkbox",name:h(r),value:p.value,onBlur:f[1]||(f[1]=(...m)=>h(l)&&h(l)(...m))},null,40,vU),[[Em,u.value]]),me("span",$U,ve(p.name),1)],2))),128))]),h(n).info?(U(),V("p",{key:0,class:"fb-info",innerHTML:h(n).info},null,8,SU)):be("",!0),h(s)?(U(),V("span",{key:1,id:i,class:"fb-error",role:"alert"},ve(h(n).forceErrorMessage||h(a)),1)):be("",!0)]))}}),TU={class:"fb-recap"},wU=["innerHTML"],IU={key:0,class:"fb-recap-value"},AU={key:1,class:"fb-recap-value"},xU=ot({__name:"FieldRecap",props:{field:{}},setup(e){const n=e.field,{form:r}=mo(),i=pe(()=>n.save_to?r[n.save_to]:void 0),o=pe(()=>n.save_to==="address"&&i.value&&typeof i.value=="object"?i.value:null);return(s,a)=>(U(),V("div",TU,[me("div",{class:"fb-recap-label",innerHTML:h(n).label},null,8,wU),o.value?(U(),V("div",IU,[In(ve(o.value.address),1),o.value.complement?(U(),V(et,{key:0},[In(", "+ve(o.value.complement),1)],64)):be("",!0),o.value.postcode?(U(),V(et,{key:1},[In(", "+ve(o.value.postcode),1)],64)):be("",!0),In(" "+ve(o.value.city),1)])):(U(),V("div",AU,ve(i.value),1))]))}}),CU={class:"fb-field"},kU=["aria-label"],NU=["aria-checked","onClick","onKeydown"],RU={key:0,class:"fb-cem-hints"},OU=ot({__name:"FieldCustomerExpMetric",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"cem",i=`${r}-error`,{model:o,showError:s,errorMessage:a,handleBlur:l}=Xt(n),c=pe(()=>Number(n.numberOfItem)||10),u=pe(()=>Array.from({length:c.value+1},(_,y)=>y)),d=pe(()=>Number(n.numberOfRedItem)||0),f=pe(()=>Number(n.numberOfGreenItem)||0),p=pe(()=>n.hint0||""),m=pe(()=>n.hint10||"");function b(_){return c.value-_<f.value?"cem-green":_<d.value?"cem-red":"cem-yellow"}function g(_){o.value=_,l()}return(_,y)=>(U(),V("div",CU,[Ne(lt,{"for-id":h(r),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"]),me("ul",{class:"fb-cem",role:"radiogroup","aria-label":h(n).label},[(U(!0),V(et,null,yn(u.value,T=>(U(),V("li",{key:T,class:ut(["fb-cem-item",[b(T),{"is-active":h(o)===T}]]),role:"radio","aria-checked":h(o)===T,tabindex:"0",onClick:S=>g(T),onKeydown:[Fu(S=>g(T),["enter"]),Fu(zo(S=>g(T),["prevent"]),["space"])]},ve(T),43,NU))),128))],8,kU),p.value||m.value?(U(),V("div",RU,[me("span",null,ve(p.value?`0 – ${p.value}`:""),1),me("span",null,ve(m.value?`${c.value} – ${m.value}`:""),1)])):be("",!0),h(s)?(U(),V("span",{key:1,id:i,class:"fb-error",role:"alert"},ve(h(a)),1)):be("",!0)]))}}),PU={class:"fb-field"},MU=["id","name","value","list","placeholder","required","aria-invalid"],LU=["id"],DU=["value"],FU={key:1,class:"fb-ean-ok"},UU=["innerHTML"],BU=ot({__name:"FieldDatalist",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"field",i=`${r}-error`,o=pe(()=>Ys(n.options)),s=pe(()=>o.value.length>0),a={};s.value&&(a.one_of=o.value.map(_=>_.name));const{model:l,showError:c,errorMessage:u,controlClass:d,handleBlur:f,setValue:p}=Xt(n,a),m=Re(String(l.value??"")),b=Re(null);function g(_){if(m.value=_.target.value,p(m.value),s.value){const y=o.value.find(T=>T.name===m.value);b.value=y?y.value:null}}return(_,y)=>(U(),V("div",PU,[Ne(lt,{"for-id":h(r),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"]),me("input",{id:h(r),class:ut(["fb-input",h(d)]),type:"text",name:h(r),value:m.value,list:s.value?`${h(r)}-list`:void 0,placeholder:h(n).placeholder,autocomplete:"off",required:h(n).required||void 0,"aria-invalid":h(c)||void 0,onInput:g,onBlur:y[0]||(y[0]=(...T)=>h(f)&&h(f)(...T))},null,42,MU),s.value?(U(),V("datalist",{key:0,id:`${h(r)}-list`},[(U(!0),V(et,null,yn(o.value,T=>(U(),V("option",{key:T.value,value:T.name},null,8,DU))),128))],8,LU)):be("",!0),b.value?(U(),V("span",FU,[Ne(h(r_),{size:16}),In(" "+ve(b.value),1)])):be("",!0),h(n).info?(U(),V("p",{key:2,class:"fb-info",innerHTML:h(n).info},null,8,UU)):be("",!0),h(c)?(U(),V("span",{key:3,id:i,class:"fb-error",role:"alert"},ve(h(u)),1)):be("",!0)]))}}),jU={class:"fb-field"},qU={class:"fb-iban-title"},zU={class:"fb-ibanuk-row"},HU={class:"fb-field"},VU=["id","value","placeholder"],WU={key:0,class:"fb-error",role:"alert"},GU={class:"fb-field"},YU=["id","value","placeholder"],KU={key:0,class:"fb-error",role:"alert"},XU=ot({__name:"FieldIbanUK",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"iban_uk",i=mo(),o=ki(i.locale),s=i.form[r]||{},{value:a,errorMessage:l,meta:c,handleBlur:u}=Vo(o("iban_uk_sort_code"),{required:!!n.required,digits:6},{initialValue:s.sort_code||""}),{value:d,errorMessage:f,meta:p,handleBlur:m}=Vo(o("iban_uk_account_number"),pe(()=>({required:!!n.required,digits:8,iban_uk_modulus:[a.value]})),{initialValue:s.account_number||""});dt([a,d],()=>{i.form[r]={sort_code:a.value,account_number:d.value}});const b=pe(()=>!!l.value&&(c.touched||c.dirty)),g=pe(()=>!!f.value&&(p.touched||p.dirty));function _(T){a.value=T.target.value.replace(/\D/g,"").slice(0,6)}function y(T){d.value=T.target.value.replace(/\D/g,"").slice(0,8)}return(T,S)=>(U(),V("div",jU,[h(n).disableHolderField?be("",!0):(U(),V(et,{key:0},[me("h3",qU,ve(h(n).sectionTitle||h(o)("iban_section_title")),1),Ne(D$,{label:h(n).holderLabel||h(o)("iban_holder"),placeholder:h(n).holderPlaceholder||"Nom et prénom ou société",required:h(n).required},null,8,["label","placeholder","required"])],64)),Ne(lt,{"for-id":h(r),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"]),me("div",zU,[me("div",HU,[Ne(lt,{"for-id":`${h(r)}-sort`,label:h(o)("iban_uk_sort_code")},null,8,["for-id","label"]),me("input",{id:`${h(r)}-sort`,class:ut(["fb-input",{"fb-invalid":b.value}]),type:"text",inputmode:"numeric",value:h(a),placeholder:h(o)("iban_uk_sort_code_placeholder"),onInput:_,onBlur:S[0]||(S[0]=(...O)=>h(u)&&h(u)(...O))},null,42,VU),b.value?(U(),V("span",WU,ve(h(l)),1)):be("",!0)]),me("div",GU,[Ne(lt,{"for-id":`${h(r)}-account`,label:h(o)("iban_uk_account_number")},null,8,["for-id","label"]),me("input",{id:`${h(r)}-account`,class:ut(["fb-input",{"fb-invalid":g.value}]),type:"text",inputmode:"numeric",value:h(d),placeholder:h(o)("iban_uk_account_number_placeholder"),onInput:y,onBlur:S[1]||(S[1]=(...O)=>h(m)&&h(m)(...O))},null,42,YU),g.value?(U(),V("span",KU,ve(h(f)),1)):be("",!0)])])]))}});function l_(e,t=300){let n;const r=(...i)=>{n&&clearTimeout(n),n=setTimeout(()=>e(...i),t)};return r.cancel=()=>{n&&clearTimeout(n)},r}const JU={class:"fb-field"},ZU=["aria-expanded"],QU={key:0,class:"fb-ms-placeholder"},eB={key:1,class:"fb-ms-chips"},tB={key:0,class:"fb-ms-panel"},nB={class:"fb-ms-list"},rB={key:0,class:"fb-ms-empty"},iB=["checked","disabled","onChange"],oB={class:"fb-choice-label"},sB={key:1,class:"fb-ms-empty"},aB=["innerHTML"],lB=ot({__name:"FieldMultiSelect",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"multiselect",i=`${r}-error`,{model:o,showError:s,errorMessage:a,handleBlur:l}=Xt(n),c=pe(()=>Ys(n.options)),u=pe(()=>Number(n.nbMaxSelected)||0),d=pe(()=>Number(n.minSearchLength)||0),f=pe(()=>Number(n.maxDisplayResults)||0),p=pe(()=>n.multiple!==!1),m=typeof n.ajaxUrl=="string"?n.ajaxUrl:"",b=n.ajax===!0&&m.startsWith("http"),g=b&&m.includes("data-list/json/"),_=Re([]),y=Re({}),T=Re(!1),S=Re(!1),O=Re(!1);let N=0;const w=pe(()=>b?_.value:c.value);function D(ce){return typeof ce!="string"||!ce?[]:p.value?ce.split(":"):[ce]}const Y=Re(D(o.value));dt(Y,()=>{o.value=p.value?Y.value.join(":"):Y.value[0]??""},{deep:!0});const q=Re(!1),P=Re(""),C=pe(()=>P.value.length<d.value);function F(ce){for(const ye of ce)y.value[ye.value]=ye.name}function R(ce,ye){const Te=ye.toLowerCase();return ce.name.toLowerCase().includes(Te)||ce.value.toLowerCase().includes(Te)}const G=pe(()=>{if(C.value)return[];let ce=w.value;return!g&&P.value&&(ce=ce.filter(ye=>R(ye,P.value))),f.value>0&&ce.length>f.value?ce.slice(0,f.value):ce}),z=pe(()=>u.value>0&&Y.value.length>=u.value),K=pe(()=>q.value&&!T.value&&!C.value&&!G.value.length&&(!g||O.value));async function M(ce){const ye=++N;T.value=!0;try{const{data:Te}=await mt.get(m,g?{params:{search:ce}}:void 0);if(ye!==N)return;const le=Ys(Array.isArray(Te)?Te:[]);F(le),_.value=le,g||(S.value=!0),O.value=!0}catch{if(ye!==N)return;_.value=[],O.value=!0}finally{ye===N&&(T.value=!1)}}const oe=l_(ce=>{M(ce)},300);dt(P,ce=>{if(b){if(g){if(oe.cancel(),N+=1,_.value=[],!ce||C.value){T.value=!1,O.value=!1;return}T.value=!0,O.value=!1,oe(ce);return}C.value||S.value||oe(ce)}}),ks(()=>oe.cancel());function te(ce){const ye=w.value.find(Te=>Te.value===ce);if(ye&&(y.value[ce]=ye.name),!p.value)Y.value=Y.value[0]===ce?[]:[ce];else{const Te=Y.value.indexOf(ce);Te>=0?Y.value.splice(Te,1):z.value||Y.value.push(ce)}n.closeOnSelect&&(q.value=!1,P.value="")}function se(ce){const ye=Y.value.indexOf(ce);ye>=0&&Y.value.splice(ye,1)}const _e=ce=>y.value[ce]??w.value.find(ye=>ye.value===ce)?.name??ce;return(ce,ye)=>(U(),V("div",JU,[Ne(lt,{"for-id":h(r),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"]),me("div",{class:"fb-ms",onFocusout:ye[2]||(ye[2]=(...Te)=>h(l)&&h(l)(...Te))},[me("button",{type:"button",class:ut(["fb-input fb-ms-trigger",{"fb-invalid":h(s)}]),"aria-expanded":q.value,onClick:ye[0]||(ye[0]=Te=>q.value=!q.value)},[Y.value.length?(U(),V("span",eB,[(U(!0),V(et,null,yn(Y.value,Te=>(U(),V("span",{key:Te,class:"fb-ms-chip"},[In(ve(_e(Te))+" ",1),Ne(h(L$),{size:13,onClick:zo(le=>se(Te),["stop"])},null,8,["onClick"])]))),128))])):(U(),V("span",QU,ve(h(n).placeholder||"Sélectionnez…"),1)),Ne(h(LD),{size:18,class:"fb-ms-caret"})],10,ZU),q.value?(U(),V("div",tB,[Et(me("input",{"onUpdate:modelValue":ye[1]||(ye[1]=Te=>P.value=Te),class:"fb-input fb-ms-search",type:"text",placeholder:"Rechercher…"},null,512),[[sn,P.value]]),me("ul",nB,[T.value?(U(),V("li",rB,"…")):be("",!0),(U(!0),V(et,null,yn(G.value,Te=>(U(),V("li",{key:Te.value},[me("label",{class:ut(["fb-choice",{"is-checked":Y.value.includes(Te.value)}])},[me("input",{type:"checkbox",checked:Y.value.includes(Te.value),disabled:!Y.value.includes(Te.value)&&z.value,onChange:le=>te(Te.value)},null,40,iB),me("span",oB,ve(Te.name),1)],2)]))),128)),K.value?(U(),V("li",sB,"Aucun résultat")):be("",!0)])])):be("",!0)],32),h(n).info?(U(),V("p",{key:0,class:"fb-info",innerHTML:h(n).info},null,8,aB)):be("",!0),h(s)?(U(),V("span",{key:1,id:i,class:"fb-error",role:"alert"},ve(h(a)),1)):be("",!0)]))}}),cB={class:"fb-field"},uB=["id","accept"],dB={key:0,class:"fb-dz-list"},fB={key:0},pB=["href"],mB=["aria-label","onClick"],_B={key:1,class:"fb-info"},hB={key:2,class:"fb-error",role:"alert"},gB=ot({__name:"FieldMultipleFilesInOne",props:{field:{}},setup(e){const n=e.field,r=o_(n),i=n.save_to||"files",o=n.sizeMax??2560,s=n.validationLabel||n.label||i,a=pe(()=>Number(n.maxFiles)||0),l=mo(),c=ki(l.locale),u=Re([]),d=l.form[i];Array.isArray(d)&&(u.value=d.map(P=>({url:P,name:s_(String(P))})));const{value:f,errorMessage:p,meta:m,handleBlur:b}=Vo(`${s}_hidden_required`,n.required?{required:!0}:{},{label:s}),g=pe(()=>u.value.some(P=>P.uploading)),_=pe(()=>!!n.required&&!!p.value&&(m.touched||m.dirty||l.submitAttempted.value));dt(u,()=>{l.form[i]=u.value.filter(P=>P.url).map(P=>P.url),f.value=u.value.some(P=>P.url)||g.value?"has_files":""},{deep:!0,immediate:!0});const y=Re(!1),T=Re(null);function S(P){l.bus.emit("show-popup",{title:n.label||"Fichiers",message:P})}function O(P){if(!r)return!0;const C=String(r).split(",").map(R=>R.trim().toLowerCase().replace(/^\./,"")).filter(Boolean);if(!C.length)return!0;const F=P.toLowerCase().match(/\.([^.\s]+)\s*$/)?.[1];return!!F&&C.includes(F)}function N(P){return new Promise(C=>{const F=new FileReader;F.onloadend=()=>C(F.result),F.readAsDataURL(P)})}async function w(P){for(const C of Array.from(P)){if(a.value&&u.value.length>=a.value){S(c("multiple_files_max",{max:a.value}));break}if(!O(C.name)){S(`Format non accepté. Formats acceptés : ${r}`);continue}if(C.size>o*1e3){S(c("file_max_size_error"));continue}if(C.name.toLowerCase().endsWith(".heic")){S(c("file_heic_error"));continue}const F=await N(C),R={name:C.name,uploading:!0};u.value.push(R);try{R.url=l.privateUploads.value?await l.api.uploadPrivateFile(l.formId,i,C):(await mt.post(`${l.server}/api/v2/submissions/upload`,{b64file:F,filename:C.name,operationId:l.operationId.value,save_to:i})).data.url,R.uploading=!1,u.value=[...u.value]}catch(G){const z=u.value.indexOf(R);z!==-1&&u.value.splice(z,1),S(c("file_upload_failed")),rr(G,{where:"FieldMultipleFilesInOne.upload",save_to:i})}}}function D(P){P.preventDefault(),y.value=!1,P.dataTransfer?.files&&w(P.dataTransfer.files)}function Y(P){const C=P.target;C.files&&w(C.files),C.value="",b()}function q(P){u.value.splice(P,1)}return(P,C)=>(U(),V("div",cB,[Ne(lt,{"for-id":h(i),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"]),me("div",{class:ut(["fb-dropzone",{"is-drag":y.value}]),role:"button",tabindex:"0",onClick:C[0]||(C[0]=F=>T.value?.click()),onKeydown:C[1]||(C[1]=Fu(F=>T.value?.click(),["enter"])),onDragover:C[2]||(C[2]=zo(F=>y.value=!0,["prevent"])),onDragleave:C[3]||(C[3]=F=>y.value=!1),onDrop:D},[Ne(h(DD),{size:26}),me("span",null,ve(h(n).buttonUploadLabel||h(c)("multiple_files_drop")),1),me("input",{id:h(i),ref_key:"inputRef",ref:T,type:"file",class:"fb-file-hidden",accept:h(r),multiple:"",onChange:Y},null,40,uB)],34),u.value.length?(U(),V("ul",dB,[(U(!0),V(et,null,yn(u.value,(F,R)=>(U(),V("li",{key:R,class:"fb-file-link"},[F.uploading?(U(),V("span",fB,"["+ve(F.name)+"] "+ve(h(c)("multiple_file_upload_en_cours"))+"…",1)):(U(),V("a",{key:1,href:F.url,target:"_blank",rel:"noopener"},ve(F.name),9,pB)),me("button",{type:"button",class:"fb-file-delete","aria-label":h(c)("file_delete"),onClick:G=>q(R)},[Ne(h(i_),{size:16})],8,mB)]))),128))])):be("",!0),g.value?(U(),V("span",_B,ve(h(c)("multiple_file_patientez")),1)):be("",!0),_.value?(U(),V("span",hB,ve(h(p)||h(c)("file_select_required")),1)):be("",!0)]))}}),yB=["innerHTML"],bB=ot({__name:"FieldEstimateRefund",props:{field:{}},setup(e){const n=e.field,r=mo(),i=n.template||n.html||"",o=Re(""),s=l_(async()=>{try{const{data:a}=await mt.post(`${r.server}/api/v2/submissions/estimaterefund`,{...r.form,operationId:r.operationId.value}),l=Number(typeof a=="number"?a:a?.amount_to_refund??0),c=(l/100).toLocaleString("fr-FR",{style:"currency",currency:"EUR"});o.value=i.replace(/\{\{\s*amount_to_refund_raw\s*\}\}/g,String(l/100)).replace(/\{\{\s*amount_to_refund\s*\}\}/g,c)}catch(a){rr(a,{where:"FieldEstimateRefund"})}},500);return dt(()=>({...r.form}),s,{deep:!0}),Cr(s),(a,l)=>(U(),V("div",{class:"fb-blochtml",innerHTML:o.value},null,8,yB))}}),vB={class:"fb-field"},$B={class:"fb-label"},SB=["innerHTML"],EB={key:0,class:"fb-required-star"},TB={class:"fb-choice-list"},wB=["name","value"],IB=["innerHTML"],AB=ot({__name:"FieldRewardSelector",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"reward",i=`${r}-error`,{model:o,showError:s,errorMessage:a,handleBlur:l,ctx:c}=Xt(n),u=pe(()=>Ys(n.options)),d=Re({}),f=l_(async()=>{try{const{data:m}=await mt.post(`${c.server}/api/v2/submissions/estimaterefund`,{...c.form,operationId:c.operationId.value}),g=(Number(m?.amount_to_refund??0)/100).toLocaleString("fr-FR",{style:"currency",currency:"EUR"}),_={};for(const y of u.value)_[y.value]=y.name.replace(/\{\{\s*amount_to_refund\s*\}\}/g,g);d.value=_}catch(m){rr(m,{where:"FieldRewardSelector"})}},500);dt(()=>({...c.form}),f,{deep:!0}),Cr(f);const p=(m,b)=>d.value[m]??b;return(m,b)=>(U(),V("fieldset",vB,[me("legend",$B,[me("span",{innerHTML:h(n).label},null,8,SB),h(n).required?(U(),V("span",EB,"*")):be("",!0)]),me("div",TB,[(U(!0),V(et,null,yn(u.value,g=>(U(),V("label",{key:g.value,class:ut(["fb-choice",{"is-checked":h(o)===g.value}])},[Et(me("input",{"onUpdate:modelValue":b[0]||(b[0]=_=>_t(o)?o.value=_:null),type:"radio",name:h(r),value:g.value,onBlur:b[1]||(b[1]=(..._)=>h(l)&&h(l)(..._))},null,40,wB),[[Mu,h(o)]]),me("span",{class:"fb-choice-label",innerHTML:p(g.value,g.name)},null,8,IB)],2))),128))]),h(s)?(U(),V("span",{key:0,id:i,class:"fb-error",role:"alert"},ve(h(a)),1)):be("",!0)]))}}),xB={class:"fb-field"},CB={class:"fb-pp-num"},kB={class:"fb-field"},NB=["id","onUpdate:modelValue"],RB=["value"],OB=["id","onUpdate:modelValue"],PB={key:0,class:"fb-field"},MB=["onUpdate:modelValue"],LB={key:1,class:"fb-field"},DB=["onUpdate:modelValue"],FB={key:2,class:"fb-field"},UB=["onUpdate:modelValue"],BB={key:3,class:"fb-field"},jB=["onUpdate:modelValue"],qB=["onClick"],zB={key:1,class:"fb-error",role:"alert"},c_={Input:nL,Checkbox:aL,Radio:hL,Civilite:xL,Select:LL,InputNumber:BL,Textarea:HL,DateInput:YL,BlocHTML:O$,BlocHTMLsimple:O$,Iban:YD,File:sF,SecuriteSociale:dF,Devise:mF,EAN:bF,Phone:RF,Adresse:eU,MultipleFiles:mU,MultiCheckbox:EU,Recap:xU,CustomerExpMetric:OU,Datalist:BU,IbanUK:XU,MultiSelect:lB,MultipleFilesInOne:gB,EstimateRefund:bB,RewardSelector:AB,PrixProduits:ot({__name:"FieldPrixProduits",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"prix_produits",i=n.configuration||{},{model:o,showError:s,errorMessage:a,ctx:l}=Xt(n,i.displayQuantite?{prix_produits_quantity:!0}:{}),c=ki(l.locale),u=pe(()=>Ys(n.options)),d=pe(()=>u.value.length>0),f=pe(()=>Number(i.minProducts)||1),p=pe(()=>Number(i.maxProducts)||0),m=Array.isArray(o.value)&&o.value.length?o.value:Array.from({length:f.value},()=>({})),b=Ar(m.map(y=>({...y})));dt(b,()=>{o.value=b.filter(y=>y.produit||y.price||y.quantity||y.imei).map(y=>({...y,price:y.price||0}))},{deep:!0});function g(){(!p.value||b.length<p.value)&&b.push({})}function _(y){b.length>f.value&&b.splice(y,1)}return(y,T)=>(U(),V("div",xB,[Ne(lt,{"for-id":h(r),label:h(n).label,required:h(n).required},null,8,["for-id","label","required"]),(U(!0),V(et,null,yn(b,(S,O)=>(U(),V("div",{key:O,class:"fb-pp-line"},[me("span",CB,ve(h(i).labelProductLine||h(c)("prix_produit_produit"))+" "+ve(O+1),1),me("div",kB,[Ne(lt,{"for-id":`${h(r)}-ref-${O}`,label:h(i).labelRef||h(c)("prix_produit_reference")},null,8,["for-id","label"]),d.value?Et((U(),V("select",{key:0,id:`${h(r)}-ref-${O}`,"onUpdate:modelValue":N=>S.produit=N,class:"fb-select"},[T[0]||(T[0]=me("option",{value:""},"—",-1)),(U(!0),V(et,null,yn(u.value,N=>(U(),V("option",{key:N.value,value:N.value},ve(N.name),9,RB))),128))],8,NB)),[[Lu,S.produit]]):Et((U(),V("input",{key:1,id:`${h(r)}-ref-${O}`,"onUpdate:modelValue":N=>S.produit=N,class:"fb-input",type:"text"},null,8,OB)),[[sn,S.produit]])]),h(i).displayDescription?(U(),V("div",PB,[Ne(lt,{label:h(i).labelDescription||h(c)("prix_produit_description")},null,8,["label"]),Et(me("input",{"onUpdate:modelValue":N=>S.description=N,class:"fb-input",type:"text"},null,8,MB),[[sn,S.description]])])):be("",!0),h(i).displayQuantite?(U(),V("div",LB,[Ne(lt,{label:h(i).labelQuantite||h(c)("prix_produit_quantite"),required:!!S.produit},null,8,["label","required"]),Et(me("input",{"onUpdate:modelValue":N=>S.quantity=N,class:"fb-input",type:"number",min:"1",step:"1"},null,8,DB),[[sn,S.quantity,void 0,{number:!0}]])])):be("",!0),h(i).displayPrix?(U(),V("div",FB,[Ne(lt,{label:h(i).labelPrix||h(c)("prix_produit_prix")},null,8,["label"]),Et(me("input",{"onUpdate:modelValue":N=>S.price=N,class:"fb-input",type:"number",step:"0.01",min:"0"},null,8,UB),[[sn,S.price,void 0,{number:!0}]])])):be("",!0),h(i).displayImei?(U(),V("div",BB,[Ne(lt,{label:h(i).labelImei||h(c)("prix_produit_imei")},null,8,["label"]),Et(me("input",{"onUpdate:modelValue":N=>S.imei=N,class:"fb-input",type:"text"},null,8,jB),[[sn,S.imei]])])):be("",!0),b.length>f.value?(U(),V("button",{key:4,type:"button",class:"fb-button fb-button--ghost fb-mf-btn",onClick:N=>_(O)},[Ne(h(i_),{size:16}),In(" "+ve(h(i).labelMoins||h(c)("prix_produit_remove")),1)],8,qB)):be("",!0)]))),128)),!p.value||b.length<p.value?(U(),V("button",{key:0,type:"button",class:"fb-button fb-button--ghost fb-mf-btn",onClick:g},[Ne(h(P$),{size:16}),In(" "+ve(h(i).labelPlus||h(c)("prix_produit_add")),1)])):be("",!0),h(s)?(U(),V("span",zB,ve(h(a)),1)):be("",!0)]))}})},HB={key:0,class:"fb-popup-title"},VB=["innerHTML"],WB={class:"fb-popup-actions"},GB=ot({__name:"FormPopup",props:{bus:{}},setup(e){const t=e,n=Re(!1),r=Re(""),i=Re(""),o=Re("OK"),s=Re(!0);function a(f){typeof f=="string"?(r.value=ho(f),i.value="",o.value="OK",s.value=!0):(r.value=ho(f.message||""),i.value=f.title||"",o.value=f.buttonText||"OK",s.value=f.closeOnOverlay!==!1),n.value=!0,document.body.style.overflow="hidden"}function l(){n.value=!1,document.body.style.overflow=""}function c(){s.value&&l()}function u(f){f.key==="Escape"&&n.value&&l()}let d;return Cr(()=>{d=t.bus.on("show-popup",a),document.addEventListener("keydown",u)}),ks(()=>{d?.(),document.removeEventListener("keydown",u),document.body.style.overflow=""}),(f,p)=>(U(),io(ET,{to:"body"},[n.value?(U(),V("div",{key:0,class:"fb-form fb-popup-overlay",role:"dialog","aria-modal":"true",onClick:c},[me("div",{class:"fb-popup",onClick:p[0]||(p[0]=zo(()=>{},["stop"]))},[i.value?(U(),V("h3",HB,ve(i.value),1)):be("",!0),me("div",{class:"fb-popup-body",innerHTML:r.value},null,8,VB),me("div",WB,[me("button",{type:"button",class:"fb-button fb-button--primary",onClick:l},ve(o.value),1)])])])):be("",!0)]))}}),YB=["type","disabled"],KB={key:0,class:"fb-spinner","aria-hidden":"true"},XB=ot({__name:"LoadingButton",props:{loading:{type:Boolean,default:!1},type:{default:"button"},variant:{default:"primary"},disabled:{type:Boolean,default:!1}},setup(e){return(t,n)=>(U(),V("button",{type:e.type,class:ut(["fb-button",e.variant==="ghost"?"fb-button--ghost":"fb-button--primary"]),disabled:e.disabled||e.loading},[e.loading?(U(),V("span",KB)):be("",!0),FT(t.$slots,"default")],10,YB))}}),JB={class:"fb-form"},ZB={key:0,class:"fb-error-update"},QB={key:0,class:"fb-progress","aria-hidden":"true"},ej={key:1,class:"fb-step-counter"},tj=["innerHTML"],nj={key:3,class:"fb-step-counter"},rj={key:4,class:"fb-mention"},ij={class:"fb-rgpd-wrap"},oj=["innerHTML"],sj={class:"fb-buttons"},aj=["textContent"],lj=["textContent"],cj=ot({__name:"HoustonForm",props:{server:{},formId:{},submissionId:{default:void 0},displayCurrentStep:{type:Boolean,default:!1},multiColumn:{type:Boolean,default:!1},stepMessage:{default:"Étape "},relay:{default:void 0},testmode:{default:void 0},uid:{default:void 0},hideError:{type:Boolean,default:!1},hideSteps:{type:Boolean,default:!1},rgpdMentions:{default:void 0}},emits:["results","on_error","form_submit_loading","upload_progress","step-up","step-down","too-early","too-late"],setup(e,{emit:t}){a$();const n=e,r=t,i=new Yx(n.server),o=new Kx,s=Ar({}),a=Re([]),l=Re(0),c=Re({}),u=Re({}),d=Re(!1),f=Re("fr"),p=Re(""),m=Re(""),b=Re(void 0),g=Re(!1),_=Ar({});let y;const T=()=>y?.abandon(l.value),S=ki(f),{validate:O}=BI(),N=pe(()=>l.value===a.value.length-1),w=pe(()=>!!n.testmode?.previewDossier&&!n.submissionId);function D(v){const E=new Set,x=/participationValide\s*===?\s*["']([A-Za-z0-9_]+)["']/g;for(const Q of v)for(const Z of Q.fields||[]){const ne=String(Z.displayIf??"");let xe;for(;xe=x.exec(ne);)E.add(xe[1])}return[...E]}function Y(v){const E=v.toLowerCase();return/(amount|montant|prix|refund|rembours|reward|estimate)/.test(E)?3500:/^_?id$|code|uid|numero|num_/.test(E)?"APERÇU":/first_?name|prenom/.test(E)?"Prénom":/last_?name|nom/.test(E)?"Nom":/mail/.test(E)?"apercu@exemple.fr":/phone|tel|mobile/.test(E)?"0600000000":"…"}function q(v,E){const x={participationValide:E},Q=/\{\{\s*this\.form\.(\w+)\s*\}\}/g;for(const Z of v)for(const ne of Z.fields||[]){const xe=String(ne.html??"");let Se;for(;Se=Q.exec(xe);)Se[1]in x||(x[Se[1]]=Y(Se[1]))}return x}const P=pe(()=>{const v=a.value.flatMap(x=>x.fields||[]).find(x=>x.save_to==="email"||x.type==="email"||x.name==="email"),E=v?.save_to?s[v.save_to]:void 0;return typeof E=="string"&&E.trim()?E.trim():""}),C=pe(()=>c.value.custom?.notice_uri||"");function F(v){return v?v.replace(/<br\s*\/?>/gi,"").replace(/ /g," ").replace(/<[^>]+>/g,"").trim()==="":!0}function R(v){return v.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function G(v,E){const x=v.custom?.notice_uri;return!F(v.custom?.notice)||!x?`<a id="noticelink">${E}</a>`:`<a id="noticelink" href="${x}" target="_blank" rel="noopener">${E}</a>`}const z=pe(()=>u.value.precedent&&u.value.precedent.length>0?u.value.precedent:S("precedent")),K=pe(()=>N.value||n.multiColumn?u.value.valider&&u.value.valider.length>0?u.value.valider:S("valider"):u.value.suivant&&u.value.suivant.length>0?u.value.suivant:S("suivant")),M=pe(()=>u.value.hasSpinner||u.value.hasSpinner===void 0),oe=pe(()=>Nb(u.value.displayIf,s)),te={server:n.server,api:i,formId:n.formId,operationId:p,form:s,locale:f,testmode:Re(n.testmode||{}),submitAttempted:g,googleMapsApiKey:m,phoneVerificationEmail:P,privateUploads:pe(()=>c.value.privateUploads===!0),bus:o};VM(te);function se(v){return Nb(v.displayIf,s)}Cr(async()=>{try{const v=await i.getForm(n.formId),{operation:E,formulaire:x}=v;if(c.value=E,p.value=E._id||"",n.relay)for(const ne in n.relay)s[ne]=n.relay[ne];const Q=x.form||[];if(x.type==="UPDATE")if(w.value){const ne=D(Q);n.testmode&&(n.testmode.statusOptions=ne);const xe=n.testmode?.previewStatus||ne[0]||"";n.testmode&&!n.testmode.previewStatus&&(n.testmode.previewStatus=xe),Object.assign(s,q(Q,xe))}else await _e();else x.type==="LINE_ITEM"?s._id=n.submissionId:(y=lC(i.server,n.formId,!!n.testmode?.active),window.addEventListener("pagehide",T));m.value=E.gmapkey||"",(v.lang||x.lang||E.lang)!=="fr"&&(f.value=x.lang||E.lang||"fr",HM(n$(f.value))),u.value=x.bouton_text||{},a.value=RD(x.form||[]),n.testmode&&(n.testmode.stepCount=a.value.length,n.testmode.currentStep=l.value);const Z=new Date;E.from&&Z<new Date(E.from)?r("too-early",E.from):E.to&&Z>new Date(E.to)&&r("too-late",E.to),ao("form_view",{form_id:n.formId,operation_id:p.value,step:l.value+1,total_steps:a.value.length})}catch(v){console.error("error while loading form data:",v),Zm(v,{phase:"load",formId:n.formId}),b.value="Impossible de charger le formulaire."}}),ks(()=>{T(),window.removeEventListener("pagehide",T)});async function _e(){if(!n.submissionId){b.value="No submission id";return}try{const v=await i.getSubmission(n.submissionId,n.uid);Object.assign(s,v)}catch{b.value=`Submission ${n.submissionId} not found or bad uid`}}function ce(){let v=a.value[l.value]?.fields.find(E=>E.component==="Adresse");return n.multiColumn&&!v&&a.value[1]&&(v=a.value[1].fields.find(E=>E.component==="Adresse")),v}function ye(v=!1){const E=ce();if(!E||!E.required||!se(E))return!0;const x=E.save_to?s[E.save_to]:void 0;return x&&typeof x=="object"&&x.address?!0:(v||(Fs("Alert","merci_renseigner_adresse"),o.emit("show-popup",{title:E.label||"Adresse",message:S("merci_renseigner_adresse")})),!1)}function Te(v){if(v?.save_to){if(!v.verified){delete _[v.save_to];return}_[v.save_to]={token:v.token,phone:v.phone}}}function le(){return(N.value||n.multiColumn?a.value:[a.value[l.value]]).flatMap(E=>E?.fields||[]).find(E=>{if(E.component!=="Phone"||!E.phoneVerificationSms||!se(E))return!1;const x=E.save_to?s[E.save_to]:void 0;if(!x)return!1;const Q=E.save_to?_[E.save_to]:void 0;return!Q||Q.phone!==x})}function ge(v=!1){const E=le();return E?(v||o.emit("show-popup",{title:"Erreur",message:`Veuillez valider le champ ${rd(E.validationLabel||E.label||"Téléphone")}.`}),!1):!0}function Ce(){ye()&&(g.value=!1,y?.stepDone(l.value),l.value++,Fs("Step",`step_${l.value}`),ao("form_step_change",{form_id:n.formId,operation_id:p.value,step:l.value+1,total_steps:a.value.length,direction:"forward"}),r("step-up",l.value))}function Me(){g.value=!1,l.value--,ao("form_step_change",{form_id:n.formId,operation_id:p.value,step:l.value+1,total_steps:a.value.length,direction:"backward"}),r("step-down",l.value)}function Ue(){return!!a.value[l.value]?.fields?.some(v=>v.required===!0&&se(v))}async function nt(){g.value=!0;const v=ye(!0),E=ge(!0),{valid:x,errors:Q}=await O();x&&v&&E?!N.value&&!n.multiColumn?Ce():await A():X(Q,v)}async function A(){if(c.value?.date_fin_regule&&new Date>new Date(c.value.date_fin_regule)){o.emit("show-popup",{title:S("error_title"),message:S("date_fin_regule_passee")||"La date limite de régularisation est dépassée. Le formulaire ne peut plus être soumis."}),Fs("Alert","date_fin_regule_passee"),y?.failed("date_limit"),ao("form_submit_error",{form_id:n.formId,operation_id:p.value,error_message:"date_fin_regule_passee",error_type:"date_limit_exceeded"});return}if(!d.value){d.value=!0,r("form_submit_loading",!0),Fs("Submit",n.formId),ao("form_submit",{form_id:n.formId,operation_id:p.value,step:l.value+1,total_steps:a.value.length});try{const v={...JSON.parse(JSON.stringify(s)),url:window.location.href,userAgent:window.navigator.userAgent,windowInnerResolution:`${window.innerWidth}x${window.innerHeight}`,fingerprint:eC(),testmode:n.testmode?{active:n.testmode.active,disableunique:n.testmode.disableunique,status:n.testmode.status,lot:n.testmode.lot}:void 0,_phoneVerificationTokens:{..._}},E=await i.submit(n.formId,v,x=>r("upload_progress",x));d.value=!1,r("form_submit_loading",!1),y?.submitted(l.value),r("results",E),ao("form_submit_success",{form_id:n.formId,operation_id:p.value,submission_id:E._id||E.id,lot:E.lot||"PERD"}),Fs("Success",n.formId)}catch(v){d.value=!1,r("form_submit_loading",!1),l.value=0,k(v)}}}function k(v){Zm(v,{phase:"submit",formId:n.formId});const E=v.response,x=E?.data;let Q=S("error_generic"),Z=!1;x?.message?Q=String(x.message):x?.error?(Array.isArray(x.error)?x.error:[x.error]).includes("Email domain not allowed")&&(Z=!0,Q=S("email_domain_not_allowed")):v.message&&(Q=String(v.message));const ne=E?E.status>=500?"server_error":Z?"email_domain":x?.codecheckErrors?"invalid_codes":"rejected":"network";y?.failed(ne),ao("form_submit_error",{form_id:n.formId,operation_id:p.value,error_message:Q,error_type:"submission_error"}),!n.hideError&&!Z&&o.emit("show-popup",{message:Q,title:S("error_title")}),r("on_error",E?.data??v??"Erreur inconnue")}function X(v,E){const x=[],Q=[];for(const Se of Object.keys(v)){const J=Se.replace(/_hidden_required$/,"");let ie=J,Be=J;for(const He of a.value){const H=He.fields.find(W=>W.save_to===Se||W.save_to===J||W.validationLabel===Se||W.validationLabel===J||W.label===Se||W.label===J);if(H?.save_to&&(Be=H.save_to),H?.label){ie=H.label;break}}x.push(rd(ie)),Q.push(Be)}if(!E){const Se=ce();Se?.label&&x.push(rd(Se.label)),Se?.save_to&&Q.push(Se.save_to)}const Z=le();Z&&(x.push(rd(Z.validationLabel||Z.label||"Téléphone")),Z.save_to&&Q.push(Z.save_to)),y?.errors(Q);const ne=[...new Set(x)].filter(Se=>Se.trim()!==""),xe=ne.length>0?`${S("Corrigez les erreurs")}<br><br><strong>${S("Champs concernés :")}</strong><ul><li>${ne.join("</li><li>")}</li></ul>`:S("Corrigez les erreurs");o.emit("show-popup",{title:S("Erreurs de validation"),message:xe}),ao("form_validation_error",{form_id:n.formId,operation_id:p.value,step:l.value+1,error_type:"validation_error"}),Fs("Alert","corrigez_les_erreurs")}const ae=v=>c_[v]??null;function ee(v){const E=v.save_to?s[v.save_to]:void 0;return E!==void 0&&E!==""}const re=pe(()=>{const v=S("noticetextlink"),E=G(c.value,v),x=n.rgpdMentions||c.value.custom?.rgpd_mentions;if(x&&x!=="<div><br></div>")return ho(x.replace("[notice]",E));const Q=R(String(c.value.dataManager||"Promodev")),ne=S("rgpd",{link:C.value}).replace(/<a\b[^>]*id=['"]noticelink['"][^>]*>[\s\S]*?<\/a>/i,E);return ho(`${Q} ${ne}`)});dt(l,v=>{n.testmode&&(n.testmode.currentStep=v)}),dt(()=>n.testmode?.gotoStep,v=>{typeof v=="number"&&v>=0&&v<a.value.length&&(v!==l.value&&(g.value=!1,l.value=v),n.testmode&&(n.testmode.gotoStep=null))}),dt(()=>n.testmode?.previewStatus,v=>{w.value&&typeof v=="string"&&(s.participationValide=v)});const $=Zp(c_);return dt(()=>c_,v=>$.value=v),(v,E)=>(U(),V("div",JB,[b.value?(U(),V("div",ZB,ve(b.value),1)):a.value.length>0?(U(),V("form",{key:1,novalidate:"",onFocusin:E[1]||(E[1]=x=>h(y)?.start()),onSubmit:zo(nt,["prevent"])},[!e.hideSteps&&a.value.length>1&&!e.multiColumn?(U(),V("div",QB,[(U(!0),V(et,null,yn(a.value,(x,Q)=>(U(),V("span",{key:Q,class:ut(["fb-progress-step",{"is-done":Q<l.value,"is-current":Q===l.value}])},null,2))),128))])):be("",!0),!e.hideSteps&&e.displayCurrentStep&&a.value[l.value].name?(U(),V("p",ej,ve(l.value+1)+"/"+ve(a.value.length),1)):be("",!0),!e.hideSteps&&a.value[l.value].name?(U(),V("h2",{key:2,class:"fb-step-title",innerHTML:a.value[l.value].name},null,8,tj)):!e.hideSteps&&a.value.length>1?(U(),V("p",nj,ve(e.stepMessage)+ve(l.value+1)+"/"+ve(a.value.length),1)):be("",!0),(U(!0),V(et,null,yn(a.value,(x,Q)=>Et((U(),V("div",{key:Q,class:ut(["fb-step",`fb-step-${Q}`])},[(U(!0),V(et,null,yn(x.fields,(Z,ne)=>(U(),V(et,{key:ne},[(Q===l.value||e.multiColumn)&&se(Z)&&Z.component!=="ApiField"&&ae(Z.component)?(U(),io(LT(ae(Z.component)),{key:0,field:Z,class:ut([{filled:ee(Z)},"fb-field-wrapper","fb-field--"+Z.save_to]),onPhoneVerification:Te},null,40,["field","class"])):be("",!0)],64))),128))],2)),[[kw,Q===l.value||e.multiColumn]])),128)),Ue()?(U(),V("p",rj," * "+ve(h(S)("champ_obligatoire")),1)):be("",!0),me("div",ij,[me("p",{class:"fb-rgpd","data-gab-path":"content.gdpr.mentions",innerHTML:re.value},null,8,oj)]),me("div",sj,[l.value>0?(U(),V("button",{key:0,type:"button",class:"fb-button fb-button--ghost",onClick:E[0]||(E[0]=x=>Me()),textContent:ve(z.value)},null,8,aj)):be("",!0),oe.value&&M.value?(U(),io(XB,{key:1,loading:d.value,type:"submit",variant:"primary"},{default:t2(()=>[In(ve(K.value),1)]),_:1},8,["loading"])):oe.value?(U(),V("button",{key:2,type:"submit",class:"fb-button fb-button--primary",textContent:ve(K.value)},null,8,lj)):be("",!0)])],32)):be("",!0),Ne(GB,{bus:h(o)},null,8,["bus"])]))}});function u_(e,t){return e.dataset[t]!==void 0&&e.dataset[t]!=="false"}function d_(){a$(),document.querySelectorAll("[data-houston-form]:not([data-fb-mounted])").forEach(e=>{const t=e.dataset.formId,n=e.dataset.server;if(!t||!n){console.warn("[form-builder-vue3] data-form-id et data-server requis.");return}e.setAttribute("data-fb-mounted","true");const r=tI(cj,{server:n,formId:t,submissionId:e.dataset.submissionId,uid:e.dataset.uid,multiColumn:u_(e,"multiColumn"),displayCurrentStep:u_(e,"displayCurrentStep"),hideError:u_(e,"hideError")});r.use(Pt);const i=e.dataset.sentryDsn;i&&Xx(r,{dsn:i}),r.mount(e)})}typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",d_):d_(),window.HoustonFormBuilder={mount:d_});const Ee=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,je=globalThis,Pi="10.51.0";function Mi(){return Jl(je),je}function Jl(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Pi,t[Pi]=t[Pi]||{}}function Ks(e,t,n=je){const r=n.__SENTRY__=n.__SENTRY__||{},i=r[Pi]=r[Pi]||{};return i[e]||(i[e]=t())}const f_=["debug","info","warn","error","log","assert","trace"],uj="Sentry Logger ",xd={};function Or(e){if(!("console"in je))return e();const t=je.console,n={},r=Object.keys(xd);r.forEach(i=>{const o=xd[i];n[i]=t[i],t[i]=o});try{return e()}finally{r.forEach(i=>{t[i]=n[i]})}}function dj(){m_().enabled=!0}function fj(){m_().enabled=!1}function F$(){return m_().enabled}function pj(...e){p_("log",...e)}function mj(...e){p_("warn",...e)}function _j(...e){p_("error",...e)}function p_(e,...t){Ee&&F$()&&Or(()=>{je.console[e](`${uj}[${e}]:`,...t)})}function m_(){return Ee?Ks("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const B={enable:dj,disable:fj,isEnabled:F$,log:pj,warn:mj,error:_j},U$=50,ri="?",B$=/\(error: (.*)\)/,j$=/captureMessage|captureException/;function q$(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,i=0)=>{const o=[],s=n.split(`
|
|
31
|
+
`);for(let a=r;a<s.length;a++){let l=s[a];l.length>1024&&(l=l.slice(0,1024));const c=B$.test(l)?l.replace(B$,"$1"):l;if(!c.includes("Error: ")){for(const u of t){const d=u(c);if(d){o.push(d);break}}if(o.length>=U$+i)break}}return gj(o.slice(i))}}function hj(e){return Array.isArray(e)?q$(...e):e}function gj(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(Cd(t).function||"")&&t.pop(),t.reverse(),j$.test(Cd(t).function||"")&&(t.pop(),j$.test(Cd(t).function||"")&&t.pop()),t.slice(0,U$).map(n=>({...n,filename:n.filename||Cd(t).filename,function:n.function||ri}))}function Cd(e){return e[e.length-1]||{}}const __="<anonymous>";function Li(e){try{return!e||typeof e!="function"?__:e.name||__}catch{return __}}function h_(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}function z$(e){return"__v_isVNode"in e&&e.__v_isVNode?"[VueVNode]":"[VueViewModel]"}function yj(e){let t=e?.startsWith("file://")?e.slice(7):e;return t?.match(/\/[A-Z]:/)&&(t=t.slice(1)),t}const Zl={},H$={};function go(e,t){return Zl[e]=Zl[e]||[],Zl[e].push(t),()=>{const n=Zl[e];if(n){const r=n.indexOf(t);r!==-1&&n.splice(r,1)}}}function yo(e,t){if(!H$[e]){H$[e]=!0;try{t()}catch(n){Ee&&B.error(`Error while instrumenting ${e}`,n)}}}function gr(e,t){const n=e&&Zl[e];if(n)for(const r of n)try{r(t)}catch(i){Ee&&B.error(`Error while triggering instrumentation handler.
|
|
32
32
|
Type: ${e}
|
|
33
33
|
Name: ${Li(r)}
|
|
34
|
-
Error:`,i)}}let g_=null;function V9(e){const t="error";go(t,e),yo(t,bj)}function bj(){g_=je.onerror,je.onerror=function(e,t,n,r,i){return gr("error",{column:r,error:i,line:n,msg:e,url:t}),g_?g_.apply(this,arguments):!1},je.onerror.__SENTRY_INSTRUMENTED__=!0}let y_=null;function W9(e){const t="unhandledrejection";go(t,e),yo(t,vj)}function vj(){y_=je.onunhandledrejection,je.onunhandledrejection=function(e){return gr("unhandledrejection",e),y_?y_.apply(this,arguments):!0},je.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const G9=Object.prototype.toString;function Di(e){switch(G9.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Ui(e,Error)}}function Xs(e,t){return G9.call(e)===`[object ${t}]`}function Y9(e){return Xs(e,"ErrorEvent")}function K9(e){return Xs(e,"DOMError")}function $j(e){return Xs(e,"DOMException")}function Pr(e){return Xs(e,"String")}function kd(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Fi(e){return e===null||kd(e)||typeof e!="object"&&typeof e!="function"}function Xn(e){return Xs(e,"Object")}function Nd(e){return typeof Event<"u"&&Ui(e,Event)}function Sj(e){return typeof Element<"u"&&Ui(e,Element)}function Ej(e){return Xs(e,"RegExp")}function ts(e){return!!(e?.then&&typeof e.then=="function")}function Tj(e){return Xn(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Ui(e,t){try{return e instanceof t}catch{return!1}}function X9(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue||e.__v_isVNode))}function b_(e){return typeof Request<"u"&&Ui(e,Request)}const v_=je,wj=80;function an(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,i=[];let o=0,s=0;const a=" > ",l=a.length;let c;const u=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||wj;for(;n&&o++<r&&(c=Ij(n,u),!(c==="html"||o>1&&s+i.length*l+c.length>=d));)i.push(c),s+=c.length,n=n.parentNode;return i.reverse().join(a)}catch{return"<unknown>"}}function Ij(e,t){const n=e,r=[];if(!n?.tagName)return"";if(v_.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const i=t?.length?t.filter(o=>n.getAttribute(o)).map(o=>[o,n.getAttribute(o)]):null;if(i?.length)i.forEach(o=>{r.push(`[${o[0]}="${o[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const o=n.className;if(o&&Pr(o)){const s=o.split(/\s+/);for(const a of s)r.push(`.${a}`)}}for(const o of["aria-label","type","name","title","alt"]){const s=n.getAttribute(o);s&&r.push(`[${o}="${s}"]`)}return r.join("")}function ns(){try{return v_.document.location.href}catch{return""}}function $_(e,t=5){if(!v_.HTMLElement)return null;let n=e;for(let r=0;r<t;r++){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}function $n(e,t,n){if(!(t in e))return;const r=e[t];if(typeof r!="function")return;const i=n(r);typeof i=="function"&&J9(i,r);try{e[t]=i}catch{Ee&&B.log(`Failed to replace method "${t}" in object`,e)}}function Sn(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{Ee&&B.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function J9(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,Sn(e,"__sentry_original__",t)}catch{}}function S_(e){return e.__sentry_original__}function Z9(e){if(Di(e))return{message:e.message,name:e.name,stack:e.stack,...e$(e)};if(Nd(e)){const t={type:e.type,target:Q9(e.target),currentTarget:Q9(e.currentTarget),...e$(e)};return typeof CustomEvent<"u"&&Ui(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Q9(e){try{return Sj(e)?an(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function e$(e){return typeof e=="object"&&e!==null?Object.fromEntries(Object.entries(e)):{}}function Aj(e){const t=Object.keys(Z9(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}let Js;function Ql(e){if(Js!==void 0)return Js?Js(e):e();const t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=je;return t in n&&typeof n[t]=="function"?(Js=n[t],Js(e)):(Js=null,e())}function Bi(){return Ql(()=>Math.random())}function ec(){return Ql(()=>Date.now())}function tc(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function E_(e,t){let n=e;const r=n.length;if(r<=150)return n;t>r&&(t=r);let i=Math.max(t-60,0);i<5&&(i=0);let o=Math.min(i+140,r);return o>r-5&&(o=r),o===r&&(i=Math.max(o-140,0)),n=n.slice(i,o),i>0&&(n=`'{snip} ${n}`),o<r&&(n+=" {snip}"),n}function Rd(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const i=e[r];try{X9(i)?n.push(z9(i)):n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function nc(e,t,n=!1){return Pr(e)?Ej(t)?t.test(e):Pr(t)?n?e===t:e.includes(t):typeof t=="function"?t(e):!1:!1}function Mr(e,t=[],n=!1){return t.some(r=>nc(e,r,n))}function xj(){const e=je;return e.crypto||e.msCrypto}let T_;function Cj(){return Bi()*16}function ln(e=xj()){try{if(e?.randomUUID)return Ql(()=>e.randomUUID()).replace(/-/g,"")}catch{}return T_||(T_="10000000100040008000"+1e11),T_.replace(/[018]/g,t=>(t^(Cj()&15)>>t/4).toString(16))}function t$(e){return e.exception?.values?.[0]}function rs(e){const{message:t,event_id:n}=e;if(t)return t;const r=t$(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function w_(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=t||""),o.type||(o.type="Error")}function ji(e,t){const n=t$(e);if(!n)return;const r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism={...r,...i,...t},t&&"data"in t){const o={...i?.data,...t.data};n.mechanism.data=o}}function kj(e,t,n=5){if(t.lineno===void 0)return;const r=e.length,i=Math.max(Math.min(r-1,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,i-n),i).map(s=>E_(s,0));const o=Math.min(r-1,i);t.context_line=E_(e[o],t.colno||0),t.post_context=e.slice(Math.min(i+1,r),i+1+n).map(s=>E_(s,0))}function n$(e){if(Nj(e))return!0;try{Sn(e,"__sentry_captured__",!0)}catch{}return!1}function Nj(e){try{return e.__sentry_captured__}catch{}}const r$=1e3;function is(){return ec()/r$}function Rj(){const{performance:e}=je;if(!e?.now||!e.timeOrigin)return is;const t=e.timeOrigin;return()=>(t+Ql(()=>e.now()))/r$}let i$;function Ct(){return(i$??(i$=Rj()))()}let I_=null;function Oj(){const{performance:e}=je;if(!e?.now)return;const t=3e5,n=Ql(()=>e.now()),r=ec(),i=e.timeOrigin;if(typeof i=="number"&&Math.abs(i+n-r)<t)return i;const o=e.timing?.navigationStart;return typeof o=="number"&&Math.abs(o+n-r)<t?o:r-n}function tn(){return I_===null&&(I_=Oj()),I_}function Pj(e){const t=Ct(),n={sid:ln(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Lj(n)};return e&&Zs(n,e),n}function Zs(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||Ct(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:ln()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n: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),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Mj(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),Zs(e,n)}function Lj(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${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}}}function rc(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;const r={...e};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=rc(r[i],t[i],n-1));return r}function ii(){return ln()}function qi(){return ln().substring(16)}const A_="_sentrySpan";function oi(e,t){t?Sn(e,A_,t):delete e[A_]}function Qs(e){return e[A_]}const Dj=100;class Lr{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:ii(),sampleRand:Bi()}}clone(){const t=new Lr;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,oi(t,Qs(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Zs(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(t){return this._conversationId=t||void 0,this._notifyScopeListeners(),this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this.setTags({[t]:n})}setAttributes(t){return this._attributes={...this._attributes,...t},this._notifyScopeListeners(),this}setAttribute(t,n){return this.setAttributes({[t]:n})}removeAttribute(t){return t in this._attributes&&(delete this._attributes[t],this._notifyScopeListeners()),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,r=n instanceof Lr?n.getScopeData():Xn(n)?t:void 0,{tags:i,attributes:o,extra:s,user:a,contexts:l,level:c,fingerprint:u=[],propagationContext:d,conversationId:f}=r||{};return this._tags={...this._tags,...i},this._attributes={...this._attributes,...o},this._extra={...this._extra,...s},this._contexts={...this._contexts,...l},a&&Object.keys(a).length&&(this._user=a),c&&(this._level=c),u.length&&(this._fingerprint=u),d&&(this._propagationContext=d),f&&(this._conversationId=f),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,oi(this,void 0),this._attachments=[],this.setPropagationContext({traceId:ii(),sampleRand:Bi()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:Dj;if(r<=0)return this;const i={timestamp:is(),...t,message:t.message?tc(t.message,2048):t.message};return this._breadcrumbs.push(i),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),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(t){return this._attachments.push(t),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:Qs(this),conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=rc(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n?.event_id||ln();if(!this._client)return Ee&&B.warn("No client configured on scope - will not capture exception!"),r;const i=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:i,...n,event_id:r},this),r}captureMessage(t,n,r){const i=r?.event_id||ln();if(!this._client)return Ee&&B.warn("No client configured on scope - will not capture message!"),i;const o=r?.syntheticException??new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:o,...r,event_id:i},this),i}captureEvent(t,n){const r=t.event_id||n?.event_id||ln();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(Ee&&B.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function Fj(){return Ks("defaultCurrentScope",()=>new Lr)}function Uj(){return Ks("defaultIsolationScope",()=>new Lr)}const o$=e=>e instanceof Promise&&!e[s$],s$=Symbol("chained PromiseLike"),a$=(e,t,n)=>{const r=e.then(i=>(t(i),i),i=>{throw n(i),i});return o$(r)&&o$(e)?r:Bj(e,r)},Bj=(e,t)=>{let n=!1;for(const r in e){if(r in t)continue;n=!0;const i=e[r];typeof i=="function"?Object.defineProperty(t,r,{value:(...o)=>i.apply(e,o),enumerable:!0,configurable:!0,writable:!0}):t[r]=i}return n&&Object.assign(t,{[s$]:!0}),t};class jj{constructor(t,n){let r;t?r=t:r=new Lr;let i;n?i=n:i=new Lr,this._stack=[{scope:r}],this._isolationScope=i}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(i){throw this._popScope(),i}return ts(r)?a$(r,()=>this._popScope(),()=>this._popScope()):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function ea(){const e=Mi(),t=Jl(e);return t.stack=t.stack||new jj(Fj(),Uj())}function qj(e){return ea().withScope(e)}function zj(e,t){const n=ea();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function l$(e){return ea().withScope(()=>e(ea().getIsolationScope()))}function Hj(){return{withIsolationScope:l$,withScope:qj,withSetScope:zj,withSetIsolationScope:(e,t)=>l$(t),getCurrentScope:()=>ea().getScope(),getIsolationScope:()=>ea().getIsolationScope()}}function bo(e){const t=Jl(e);return t.acs?t.acs:Hj()}function Vj(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)&&Object.keys(e).includes("value")}function Wj(e,t){const{value:n,unit:r}=Vj(e)?e:{value:e,unit:void 0},i=Gj(n),o=r&&typeof r=="string"?{unit:r}:{};if(i)return{...i,...o};if(!t||t==="skip-undefined"&&n===void 0)return;let s="";try{s=JSON.stringify(n)??""}catch{}return{value:s,type:"string",...o}}function ta(e,t=!1){const n={};for(const[r,i]of Object.entries(e??{})){const o=Wj(i,t);o&&(n[r]=o)}return n}function c$(e){if(!e)return 0;let t=0;for(const[n,r]of Object.entries(e)){t+=n.length*2,t+=r.type.length*2,t+=(r.unit?.length??0)*2;const i=r.value;Array.isArray(i)?t+=u$(i[0])*i.length:Fi(i)?t+=u$(i):t+=100}return t}function u$(e){return typeof e=="string"?e.length*2:typeof e=="boolean"?4:typeof e=="number"?8:0}function Gj(e){const t=typeof e=="string"?"string":typeof e=="boolean"?"boolean":typeof e=="number"&&!Number.isNaN(e)?Number.isInteger(e)?"integer":"double":null;if(t)return{value:e,type:t}}function Ke(){const e=Mi();return bo(e).getCurrentScope()}function qt(){const e=Mi();return bo(e).getIsolationScope()}function os(){return Ks("globalScope",()=>new Lr)}function yr(...e){const t=Mi(),n=bo(t);if(e.length===2){const[r,i]=e;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(e[0])}function Yj(...e){const t=Mi(),n=bo(t);if(e.length===2){const[r,i]=e;return r?n.withSetIsolationScope(r,i):n.withIsolationScope(i)}return n.withIsolationScope(e[0])}function Ie(){return Ke().getClient()}function d$(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:i}=t,o={trace_id:n,span_id:i||qi()};return r&&(o.parent_span_id=r),o}const Jt="sentry.source",Od="sentry.sample_rate",f$="sentry.previous_trace_sample_rate",yt="sentry.op",it="sentry.origin",ic="sentry.idle_span_finish_reason",oc="sentry.measurement_unit",sc="sentry.measurement_value",Kj="sentry.release",Xj="sentry.environment",Jj="sentry.segment.name",Zj="sentry.segment.id",Qj="sentry.sdk.name",eq="sentry.sdk.version",tq="user.id",nq="user.email",rq="user.ip_address",iq="user.name",ac="sentry.custom_span_name",x_="sentry.profile_id",vo="sentry.exclusive_time",oq="http.request.method",sq="url.full",aq="sentry.link.type",lq="gen_ai.conversation.id",p$=0,lc=1,st=2;function m$(e){if(e<400&&e>=100)return{code:lc};if(e>=400&&e<500)switch(e){case 401:return{code:st,message:"unauthenticated"};case 403:return{code:st,message:"permission_denied"};case 404:return{code:st,message:"not_found"};case 409:return{code:st,message:"already_exists"};case 413:return{code:st,message:"failed_precondition"};case 429:return{code:st,message:"resource_exhausted"};case 499:return{code:st,message:"cancelled"};default:return{code:st,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:st,message:"unimplemented"};case 503:return{code:st,message:"unavailable"};case 504:return{code:st,message:"deadline_exceeded"};default:return{code:st,message:"internal_error"}}return{code:st,message:"internal_error"}}function cc(e,t){e.setAttribute("http.response.status_code",t);const n=m$(t);n.message!=="unknown_error"&&e.setStatus(n)}function cq(e){try{const t=je.WeakRef;if(typeof t=="function")return new t(e)}catch{}return e}function uq(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}const _$="_sentryScope",h$="_sentryIsolationScope";function dq(e,t,n){e&&(Sn(e,h$,cq(n)),Sn(e,_$,t))}function uc(e){const t=e;return{scope:t[_$],isolationScope:uq(t[h$])}}const Pd="sentry-",fq=8192;function C_(e){const t=pq(e);if(!t)return;const n=Object.entries(t).reduce((r,[i,o])=>{if(i.startsWith(Pd)){const s=i.slice(Pd.length);r[s]=o}return r},{});if(Object.keys(n).length>0)return n}function g$(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,i])=>(i&&(n[`${Pd}${r}`]=i),n),{});return mq(t)}function pq(e){if(!(!e||!Pr(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=y$(n);return Object.entries(r).forEach(([i,o])=>{t[i]=o}),t},{}):y$(e)}function y$(e){return e.split(",").map(t=>{const n=t.indexOf("=");if(n===-1)return[];const r=t.slice(0,n),i=t.slice(n+1);return[r,i].map(o=>{try{return decodeURIComponent(o.trim())}catch{return}})}).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function mq(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],i)=>{const o=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,s=i===0?o:`${t},${o}`;return s.length>fq?(Ee&&B.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):s},"")}const _q=/^o(\d+)\./,hq=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function gq(e){return e==="http"||e==="https"}function si(e,t=!1){const{host:n,path:r,pass:i,port:o,projectId:s,protocol:a,publicKey:l}=e;return`${a}://${l}${t&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${s}`}function b$(e){const t=hq.exec(e);if(!t){Or(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,i="",o="",s="",a=""]=t.slice(1);let l="",c=a;const u=c.split("/");if(u.length>1&&(l=u.slice(0,-1).join("/"),c=u.pop()),c){const d=c.match(/^\d+/);d&&(c=d[0])}return v$({host:o,pass:i,path:l,projectId:c,port:s,protocol:n,publicKey:r})}function v$(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function yq(e){if(!Ee)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(s=>e[s]?!1:(B.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:n.match(/^\d+$/)?gq(r)?t&&isNaN(parseInt(t,10))?(B.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(B.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(B.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function bq(e){return e.match(_q)?.[1]}function $$(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=bq(n)),r}function S$(e){const t=typeof e=="string"?b$(e):v$(e);if(!(!t||!yq(t)))return t}function ss(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}const E$=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function vq(e){if(!e)return;const t=e.match(E$);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function T$(e,t){const n=vq(e),r=C_(t);if(!n?.traceId)return{traceId:ii(),sampleRand:Bi()};const i=$q(n,r);r&&(r.sample_rand=i.toString());const{traceId:o,parentSpanId:s,parentSampled:a}=n;return{traceId:o,parentSpanId:s,sampled:a,dsc:r||{},sampleRand:i}}function w$(e=ii(),t=qi(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function I$(e=ii(),t=qi(),n){return`00-${e}-${t}-${n?"01":"00"}`}function $q(e,t){const n=ss(t?.sample_rand);if(n!==void 0)return n;const r=ss(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?Bi()*r:r+Bi()*(1-r):Bi()}function Sq(e,t){const n=$$(e);return t&&n&&t!==n?(B.log(`Won't continue trace because org IDs don't match (incoming baggage: ${t}, SDK options: ${n})`),!1):(e.getOptions().strictTraceContinuation||!1)&&(t&&!n||!t&&n)?(B.log(`Starting a new trace because strict trace continuation is enabled but one org ID is missing (incoming baggage: ${t}, Sentry client: ${n})`),!1):!0}const A$=0,Md=1;let x$=!1;function Eq(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:o,status:s,origin:a,links:l}=Je(e);return{parent_span_id:o,span_id:t,trace_id:n,data:r,op:i,status:s,origin:a,links:l}}function C$(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:Je(e).parent_span_id,o=uc(e).scope,s=r?o?.getPropagationContext().propagationSpanId||qi():t;return{parent_span_id:i,span_id:s,trace_id:n}}function k$(e){const{traceId:t,spanId:n}=e.spanContext(),r=Hi(e);return w$(t,n,r)}function Tq(e){const{traceId:t,spanId:n}=e.spanContext(),r=Hi(e);return I$(t,n,r)}function N$(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:n,traceFlags:r,...i},attributes:o})=>({span_id:t,trace_id:n,sampled:r===Md,attributes:o,...i}))}function R$(e){if(e?.length)return e.map(({context:{spanId:t,traceId:n,traceFlags:r},attributes:i})=>({span_id:t,trace_id:n,sampled:r===Md,attributes:i}))}function zi(e){return typeof e=="number"?O$(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?O$(e.getTime()):Ct()}function O$(e){return e>9999999999?e/1e3:e}function Je(e){if(L$(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(M$(e)){const{attributes:r,startTime:i,name:o,endTime:s,status:a,links:l}=e;return{span_id:t,trace_id:n,data:r,description:o,parent_span_id:P$(e),start_timestamp:zi(i),timestamp:zi(s)||void 0,status:D$(a),op:r[yt],origin:r[it],links:N$(l)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function Ld(e){if(L$(e))return e.getStreamedSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(M$(e)){const{attributes:r,startTime:i,name:o,endTime:s,status:a,links:l}=e;return{name:o,span_id:t,trace_id:n,parent_span_id:P$(e),start_timestamp:zi(i),end_timestamp:zi(s),is_segment:e===Dd(e),status:F$(a),attributes:r,links:R$(l)}}return{span_id:t,trace_id:n,start_timestamp:0,name:"",end_timestamp:0,status:"ok",is_segment:e===Dd(e)}}function P$(e){return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0}function wq(e){return{...e,attributes:ta(e.attributes),links:e.links?.map(t=>({...t,attributes:ta(t.attributes)}))}}function M$(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function L$(e){return typeof e.getSpanJSON=="function"}function Hi(e){const{traceFlags:t}=e.spanContext();return t===Md}function D$(e){if(!(!e||e.code===p$))return e.code===lc?"ok":e.message||"internal_error"}function F$(e){return!e||e.code===lc||e.code===p$||e.message==="cancelled"?"ok":"error"}const as="_sentryChildSpans",k_="_sentryRootSpan";function U$(e,t){const n=e[k_]||e;Sn(t,k_,n),e[as]?e[as].add(t):Sn(e,as,new Set([t]))}function Iq(e,t){e[as]&&e[as].delete(t)}function dc(e){const t=new Set;function n(r){if(!t.has(r)&&Hi(r)){t.add(r);const i=r[as]?Array.from(r[as]):[];for(const o of i)n(o)}}return n(e),Array.from(t)}const zt=Dd;function Dd(e){return e[k_]||e}function Ht(){const e=Mi(),t=bo(e);return t.getActiveSpan?t.getActiveSpan():Qs(Ke())}function Fd(){x$||(Or(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),x$=!0)}function Aq(e,t){e.updateName(t),e.setAttributes({[Jt]:"custom",[ac]:t})}let B$=!1;function j$(){if(B$)return;function e(){const t=Ht(),n=t&&zt(t);if(n){const r="internal_error";Ee&&B.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:st,message:r})}}e.tag="sentry_tracingErrorCallback",B$=!0,V9(e),W9(e)}function or(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||Ie()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function q$(e){B.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function fc(e,t){if(!t?.length)return!1;for(const n of t){if(kq(n)){if(e.description&&nc(e.description,n))return Ee&&q$(e),!0;continue}const r=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!r)continue;const i=n.name?e.description&&nc(e.description,n.name):!0,o=n.op?e.op&&nc(e.op,n.op):!0,s=n.attributes?Object.entries(n.attributes).every(([a,l])=>xq(e.attributes?.[a],l)):!0;if(i&&o&&s)return Ee&&q$(e),!0}return!1}function xq(e,t){return typeof e=="string"&&(typeof t=="string"||t instanceof RegExp)?nc(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e===t}function Cq(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const i of e)i.parent_span_id===r&&(i.parent_span_id=n)}function kq(e){return typeof e=="string"||e instanceof RegExp}const Ud="production",z$="_frozenDsc";function Bd(e,t){Sn(e,z$,t)}function H$(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i={environment:n.environment||Ud,release:n.release,public_key:r,trace_id:e,org_id:$$(t)};return t.emit("createDsc",i),i}function N_(e,t){const n=t.getPropagationContext();return n.dsc||H$(n.traceId,e)}function br(e){const t=Ie();if(!t)return{};const n=zt(e),r=Je(n),i=r.data,o=n.spanContext().traceState,s=o?.get("sentry.sample_rate")??i[Od]??i[f$];function a(m){return(typeof s=="number"||typeof s=="string")&&(m.sample_rate=`${s}`),m}const l=n[z$];if(l)return a(l);const c=o?.get("sentry.dsc"),u=c&&C_(c);if(u)return a(u);const d=H$(e.spanContext().traceId,t),f=i[Jt]??i["sentry.span.source"],p=r.description;return f!=="url"&&p&&(d.transaction=p),or()&&(d.sampled=String(Hi(n)),d.sample_rand=o?.get("sentry.sample_rand")??uc(n).scope?.getPropagationContext().sampleRand.toString()),a(d),t.emit("createDsc",d,n),d}function Nq(e){const t=br(e);return g$(t)}class sr{constructor(t={}){this._traceId=t.traceId||ii(),this._spanId=t.spanId||qi(),this.dropReason=t.dropReason}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:A$}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,n,r){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}}function Rq(e){return Sn(e,"_streamed",!0),e}function jd(e){return!!e&&typeof e=="function"&&"_streamed"in e&&!!e._streamed}const V$=Symbol.for("sentry.skipNormalization"),W$=Symbol.for("sentry.overrideNormalizationDepth");function Oq(e){Sn(e,V$,!0)}function Pq(e,t){Sn(e,W$,t)}function Mq(e){return!!e[V$]}function Lq(e){const t=e[W$];return typeof t=="number"?t:void 0}function En(e,t=100,n=1/0){try{return R_("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function G$(e,t=3,n=100*1024){const r=En(e,t);return Bq(r)>n?G$(e,t-1,n):r}function R_(e,t,n=1/0,r=1/0,i=jq()){const[o,s]=i;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=Dq(e,t);if(!a.startsWith("[object "))return a;if(Mq(t))return t;const l=Lq(t),c=l!==void 0?l:n;if(c===0)return a.replace("object ","");if(o(t))return"[Circular ~]";const u=t;if(u&&typeof u.toJSON=="function")try{const m=u.toJSON();return R_("",m,c-1,r,i)}catch{}const d=Array.isArray(t)?[]:{};let f=0;const p=Z9(t);for(const m in p){if(!Object.prototype.hasOwnProperty.call(p,m))continue;if(f>=r){d[m]="[MaxProperties ~]";break}const b=p[m];d[m]=R_(m,b,c-1,r,i),f++}return s(t),d}function Dq(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(X9(t))return z9(t);if(Tj(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${Li(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=Fq(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function Fq(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function Uq(e){return~-encodeURI(e).split(/%..|./).length}function Bq(e){return Uq(JSON.stringify(e))}function jq(){const e=new WeakSet;function t(r){return e.has(r)?!0:(e.add(r),!1)}function n(r){e.delete(r)}return[t,n]}function vr(e,t=[]){return[e,t]}function qq(e,t){const[n,r]=e;return[n,[...r,t]]}function ls(e,t){const n=e[1];for(const r of n){const i=r[0].type;if(t(r,i))return!0}return!1}function O_(e,t){return ls(e,(n,r)=>t.includes(r))}function qd(e){const t=Jl(je);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function zq(e){const t=Jl(je);return t.decodePolyfill?t.decodePolyfill(e):new TextDecoder().decode(e)}function zd(e){const[t,n]=e;let r=JSON.stringify(t);function i(o){typeof r=="string"?r=typeof o=="string"?r+o:[qd(r),o]:r.push(typeof o=="string"?qd(o):o)}for(const o of n){const[s,a]=o;if(i(`
|
|
34
|
+
Error:`,i)}}let g_=null;function V$(e){const t="error";go(t,e),yo(t,bj)}function bj(){g_=je.onerror,je.onerror=function(e,t,n,r,i){return gr("error",{column:r,error:i,line:n,msg:e,url:t}),g_?g_.apply(this,arguments):!1},je.onerror.__SENTRY_INSTRUMENTED__=!0}let y_=null;function W$(e){const t="unhandledrejection";go(t,e),yo(t,vj)}function vj(){y_=je.onunhandledrejection,je.onunhandledrejection=function(e){return gr("unhandledrejection",e),y_?y_.apply(this,arguments):!0},je.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const G$=Object.prototype.toString;function Di(e){switch(G$.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Ui(e,Error)}}function Xs(e,t){return G$.call(e)===`[object ${t}]`}function Y$(e){return Xs(e,"ErrorEvent")}function K$(e){return Xs(e,"DOMError")}function $j(e){return Xs(e,"DOMException")}function Pr(e){return Xs(e,"String")}function kd(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Fi(e){return e===null||kd(e)||typeof e!="object"&&typeof e!="function"}function Xn(e){return Xs(e,"Object")}function Nd(e){return typeof Event<"u"&&Ui(e,Event)}function Sj(e){return typeof Element<"u"&&Ui(e,Element)}function Ej(e){return Xs(e,"RegExp")}function ts(e){return!!(e?.then&&typeof e.then=="function")}function Tj(e){return Xn(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Ui(e,t){try{return e instanceof t}catch{return!1}}function X$(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue||e.__v_isVNode))}function b_(e){return typeof Request<"u"&&Ui(e,Request)}const v_=je,wj=80;function an(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,i=[];let o=0,s=0;const a=" > ",l=a.length;let c;const u=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||wj;for(;n&&o++<r&&(c=Ij(n,u),!(c==="html"||o>1&&s+i.length*l+c.length>=d));)i.push(c),s+=c.length,n=n.parentNode;return i.reverse().join(a)}catch{return"<unknown>"}}function Ij(e,t){const n=e,r=[];if(!n?.tagName)return"";if(v_.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const i=t?.length?t.filter(o=>n.getAttribute(o)).map(o=>[o,n.getAttribute(o)]):null;if(i?.length)i.forEach(o=>{r.push(`[${o[0]}="${o[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const o=n.className;if(o&&Pr(o)){const s=o.split(/\s+/);for(const a of s)r.push(`.${a}`)}}for(const o of["aria-label","type","name","title","alt"]){const s=n.getAttribute(o);s&&r.push(`[${o}="${s}"]`)}return r.join("")}function ns(){try{return v_.document.location.href}catch{return""}}function $_(e,t=5){if(!v_.HTMLElement)return null;let n=e;for(let r=0;r<t;r++){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}function $n(e,t,n){if(!(t in e))return;const r=e[t];if(typeof r!="function")return;const i=n(r);typeof i=="function"&&J$(i,r);try{e[t]=i}catch{Ee&&B.log(`Failed to replace method "${t}" in object`,e)}}function Sn(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{Ee&&B.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function J$(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,Sn(e,"__sentry_original__",t)}catch{}}function S_(e){return e.__sentry_original__}function Z$(e){if(Di(e))return{message:e.message,name:e.name,stack:e.stack,...e9(e)};if(Nd(e)){const t={type:e.type,target:Q$(e.target),currentTarget:Q$(e.currentTarget),...e9(e)};return typeof CustomEvent<"u"&&Ui(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Q$(e){try{return Sj(e)?an(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function e9(e){return typeof e=="object"&&e!==null?Object.fromEntries(Object.entries(e)):{}}function Aj(e){const t=Object.keys(Z$(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}let Js;function Ql(e){if(Js!==void 0)return Js?Js(e):e();const t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=je;return t in n&&typeof n[t]=="function"?(Js=n[t],Js(e)):(Js=null,e())}function Bi(){return Ql(()=>Math.random())}function ec(){return Ql(()=>Date.now())}function tc(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function E_(e,t){let n=e;const r=n.length;if(r<=150)return n;t>r&&(t=r);let i=Math.max(t-60,0);i<5&&(i=0);let o=Math.min(i+140,r);return o>r-5&&(o=r),o===r&&(i=Math.max(o-140,0)),n=n.slice(i,o),i>0&&(n=`'{snip} ${n}`),o<r&&(n+=" {snip}"),n}function Rd(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const i=e[r];try{X$(i)?n.push(z$(i)):n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function nc(e,t,n=!1){return Pr(e)?Ej(t)?t.test(e):Pr(t)?n?e===t:e.includes(t):typeof t=="function"?t(e):!1:!1}function Mr(e,t=[],n=!1){return t.some(r=>nc(e,r,n))}function xj(){const e=je;return e.crypto||e.msCrypto}let T_;function Cj(){return Bi()*16}function ln(e=xj()){try{if(e?.randomUUID)return Ql(()=>e.randomUUID()).replace(/-/g,"")}catch{}return T_||(T_="10000000100040008000"+1e11),T_.replace(/[018]/g,t=>(t^(Cj()&15)>>t/4).toString(16))}function t9(e){return e.exception?.values?.[0]}function rs(e){const{message:t,event_id:n}=e;if(t)return t;const r=t9(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function w_(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=t||""),o.type||(o.type="Error")}function ji(e,t){const n=t9(e);if(!n)return;const r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism={...r,...i,...t},t&&"data"in t){const o={...i?.data,...t.data};n.mechanism.data=o}}function kj(e,t,n=5){if(t.lineno===void 0)return;const r=e.length,i=Math.max(Math.min(r-1,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,i-n),i).map(s=>E_(s,0));const o=Math.min(r-1,i);t.context_line=E_(e[o],t.colno||0),t.post_context=e.slice(Math.min(i+1,r),i+1+n).map(s=>E_(s,0))}function n9(e){if(Nj(e))return!0;try{Sn(e,"__sentry_captured__",!0)}catch{}return!1}function Nj(e){try{return e.__sentry_captured__}catch{}}const r9=1e3;function is(){return ec()/r9}function Rj(){const{performance:e}=je;if(!e?.now||!e.timeOrigin)return is;const t=e.timeOrigin;return()=>(t+Ql(()=>e.now()))/r9}let i9;function Ct(){return(i9??(i9=Rj()))()}let I_=null;function Oj(){const{performance:e}=je;if(!e?.now)return;const t=3e5,n=Ql(()=>e.now()),r=ec(),i=e.timeOrigin;if(typeof i=="number"&&Math.abs(i+n-r)<t)return i;const o=e.timing?.navigationStart;return typeof o=="number"&&Math.abs(o+n-r)<t?o:r-n}function tn(){return I_===null&&(I_=Oj()),I_}function Pj(e){const t=Ct(),n={sid:ln(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Lj(n)};return e&&Zs(n,e),n}function Zs(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||Ct(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:ln()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n: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),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Mj(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),Zs(e,n)}function Lj(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${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}}}function rc(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;const r={...e};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=rc(r[i],t[i],n-1));return r}function ii(){return ln()}function qi(){return ln().substring(16)}const A_="_sentrySpan";function oi(e,t){t?Sn(e,A_,t):delete e[A_]}function Qs(e){return e[A_]}const Dj=100;class Lr{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:ii(),sampleRand:Bi()}}clone(){const t=new Lr;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,oi(t,Qs(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Zs(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(t){return this._conversationId=t||void 0,this._notifyScopeListeners(),this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this.setTags({[t]:n})}setAttributes(t){return this._attributes={...this._attributes,...t},this._notifyScopeListeners(),this}setAttribute(t,n){return this.setAttributes({[t]:n})}removeAttribute(t){return t in this._attributes&&(delete this._attributes[t],this._notifyScopeListeners()),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,r=n instanceof Lr?n.getScopeData():Xn(n)?t:void 0,{tags:i,attributes:o,extra:s,user:a,contexts:l,level:c,fingerprint:u=[],propagationContext:d,conversationId:f}=r||{};return this._tags={...this._tags,...i},this._attributes={...this._attributes,...o},this._extra={...this._extra,...s},this._contexts={...this._contexts,...l},a&&Object.keys(a).length&&(this._user=a),c&&(this._level=c),u.length&&(this._fingerprint=u),d&&(this._propagationContext=d),f&&(this._conversationId=f),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,oi(this,void 0),this._attachments=[],this.setPropagationContext({traceId:ii(),sampleRand:Bi()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:Dj;if(r<=0)return this;const i={timestamp:is(),...t,message:t.message?tc(t.message,2048):t.message};return this._breadcrumbs.push(i),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),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(t){return this._attachments.push(t),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:Qs(this),conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=rc(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n?.event_id||ln();if(!this._client)return Ee&&B.warn("No client configured on scope - will not capture exception!"),r;const i=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:i,...n,event_id:r},this),r}captureMessage(t,n,r){const i=r?.event_id||ln();if(!this._client)return Ee&&B.warn("No client configured on scope - will not capture message!"),i;const o=r?.syntheticException??new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:o,...r,event_id:i},this),i}captureEvent(t,n){const r=t.event_id||n?.event_id||ln();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(Ee&&B.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function Fj(){return Ks("defaultCurrentScope",()=>new Lr)}function Uj(){return Ks("defaultIsolationScope",()=>new Lr)}const o9=e=>e instanceof Promise&&!e[s9],s9=Symbol("chained PromiseLike"),a9=(e,t,n)=>{const r=e.then(i=>(t(i),i),i=>{throw n(i),i});return o9(r)&&o9(e)?r:Bj(e,r)},Bj=(e,t)=>{let n=!1;for(const r in e){if(r in t)continue;n=!0;const i=e[r];typeof i=="function"?Object.defineProperty(t,r,{value:(...o)=>i.apply(e,o),enumerable:!0,configurable:!0,writable:!0}):t[r]=i}return n&&Object.assign(t,{[s9]:!0}),t};class jj{constructor(t,n){let r;t?r=t:r=new Lr;let i;n?i=n:i=new Lr,this._stack=[{scope:r}],this._isolationScope=i}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(i){throw this._popScope(),i}return ts(r)?a9(r,()=>this._popScope(),()=>this._popScope()):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function ea(){const e=Mi(),t=Jl(e);return t.stack=t.stack||new jj(Fj(),Uj())}function qj(e){return ea().withScope(e)}function zj(e,t){const n=ea();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function l9(e){return ea().withScope(()=>e(ea().getIsolationScope()))}function Hj(){return{withIsolationScope:l9,withScope:qj,withSetScope:zj,withSetIsolationScope:(e,t)=>l9(t),getCurrentScope:()=>ea().getScope(),getIsolationScope:()=>ea().getIsolationScope()}}function bo(e){const t=Jl(e);return t.acs?t.acs:Hj()}function Vj(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)&&Object.keys(e).includes("value")}function Wj(e,t){const{value:n,unit:r}=Vj(e)?e:{value:e,unit:void 0},i=Gj(n),o=r&&typeof r=="string"?{unit:r}:{};if(i)return{...i,...o};if(!t||t==="skip-undefined"&&n===void 0)return;let s="";try{s=JSON.stringify(n)??""}catch{}return{value:s,type:"string",...o}}function ta(e,t=!1){const n={};for(const[r,i]of Object.entries(e??{})){const o=Wj(i,t);o&&(n[r]=o)}return n}function c9(e){if(!e)return 0;let t=0;for(const[n,r]of Object.entries(e)){t+=n.length*2,t+=r.type.length*2,t+=(r.unit?.length??0)*2;const i=r.value;Array.isArray(i)?t+=u9(i[0])*i.length:Fi(i)?t+=u9(i):t+=100}return t}function u9(e){return typeof e=="string"?e.length*2:typeof e=="boolean"?4:typeof e=="number"?8:0}function Gj(e){const t=typeof e=="string"?"string":typeof e=="boolean"?"boolean":typeof e=="number"&&!Number.isNaN(e)?Number.isInteger(e)?"integer":"double":null;if(t)return{value:e,type:t}}function Ke(){const e=Mi();return bo(e).getCurrentScope()}function qt(){const e=Mi();return bo(e).getIsolationScope()}function os(){return Ks("globalScope",()=>new Lr)}function yr(...e){const t=Mi(),n=bo(t);if(e.length===2){const[r,i]=e;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(e[0])}function Yj(...e){const t=Mi(),n=bo(t);if(e.length===2){const[r,i]=e;return r?n.withSetIsolationScope(r,i):n.withIsolationScope(i)}return n.withIsolationScope(e[0])}function Ie(){return Ke().getClient()}function d9(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:i}=t,o={trace_id:n,span_id:i||qi()};return r&&(o.parent_span_id=r),o}const Jt="sentry.source",Od="sentry.sample_rate",f9="sentry.previous_trace_sample_rate",yt="sentry.op",it="sentry.origin",ic="sentry.idle_span_finish_reason",oc="sentry.measurement_unit",sc="sentry.measurement_value",Kj="sentry.release",Xj="sentry.environment",Jj="sentry.segment.name",Zj="sentry.segment.id",Qj="sentry.sdk.name",eq="sentry.sdk.version",tq="user.id",nq="user.email",rq="user.ip_address",iq="user.name",ac="sentry.custom_span_name",x_="sentry.profile_id",vo="sentry.exclusive_time",oq="http.request.method",sq="url.full",aq="sentry.link.type",lq="gen_ai.conversation.id",p9=0,lc=1,st=2;function m9(e){if(e<400&&e>=100)return{code:lc};if(e>=400&&e<500)switch(e){case 401:return{code:st,message:"unauthenticated"};case 403:return{code:st,message:"permission_denied"};case 404:return{code:st,message:"not_found"};case 409:return{code:st,message:"already_exists"};case 413:return{code:st,message:"failed_precondition"};case 429:return{code:st,message:"resource_exhausted"};case 499:return{code:st,message:"cancelled"};default:return{code:st,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:st,message:"unimplemented"};case 503:return{code:st,message:"unavailable"};case 504:return{code:st,message:"deadline_exceeded"};default:return{code:st,message:"internal_error"}}return{code:st,message:"internal_error"}}function cc(e,t){e.setAttribute("http.response.status_code",t);const n=m9(t);n.message!=="unknown_error"&&e.setStatus(n)}function cq(e){try{const t=je.WeakRef;if(typeof t=="function")return new t(e)}catch{}return e}function uq(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}const _9="_sentryScope",h9="_sentryIsolationScope";function dq(e,t,n){e&&(Sn(e,h9,cq(n)),Sn(e,_9,t))}function uc(e){const t=e;return{scope:t[_9],isolationScope:uq(t[h9])}}const Pd="sentry-",fq=8192;function C_(e){const t=pq(e);if(!t)return;const n=Object.entries(t).reduce((r,[i,o])=>{if(i.startsWith(Pd)){const s=i.slice(Pd.length);r[s]=o}return r},{});if(Object.keys(n).length>0)return n}function g9(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,i])=>(i&&(n[`${Pd}${r}`]=i),n),{});return mq(t)}function pq(e){if(!(!e||!Pr(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=y9(n);return Object.entries(r).forEach(([i,o])=>{t[i]=o}),t},{}):y9(e)}function y9(e){return e.split(",").map(t=>{const n=t.indexOf("=");if(n===-1)return[];const r=t.slice(0,n),i=t.slice(n+1);return[r,i].map(o=>{try{return decodeURIComponent(o.trim())}catch{return}})}).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function mq(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],i)=>{const o=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,s=i===0?o:`${t},${o}`;return s.length>fq?(Ee&&B.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):s},"")}const _q=/^o(\d+)\./,hq=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function gq(e){return e==="http"||e==="https"}function si(e,t=!1){const{host:n,path:r,pass:i,port:o,projectId:s,protocol:a,publicKey:l}=e;return`${a}://${l}${t&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${s}`}function b9(e){const t=hq.exec(e);if(!t){Or(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,i="",o="",s="",a=""]=t.slice(1);let l="",c=a;const u=c.split("/");if(u.length>1&&(l=u.slice(0,-1).join("/"),c=u.pop()),c){const d=c.match(/^\d+/);d&&(c=d[0])}return v9({host:o,pass:i,path:l,projectId:c,port:s,protocol:n,publicKey:r})}function v9(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function yq(e){if(!Ee)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(s=>e[s]?!1:(B.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:n.match(/^\d+$/)?gq(r)?t&&isNaN(parseInt(t,10))?(B.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(B.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(B.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function bq(e){return e.match(_q)?.[1]}function $9(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=bq(n)),r}function S9(e){const t=typeof e=="string"?b9(e):v9(e);if(!(!t||!yq(t)))return t}function ss(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}const E9=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function vq(e){if(!e)return;const t=e.match(E9);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function T9(e,t){const n=vq(e),r=C_(t);if(!n?.traceId)return{traceId:ii(),sampleRand:Bi()};const i=$q(n,r);r&&(r.sample_rand=i.toString());const{traceId:o,parentSpanId:s,parentSampled:a}=n;return{traceId:o,parentSpanId:s,sampled:a,dsc:r||{},sampleRand:i}}function w9(e=ii(),t=qi(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function I9(e=ii(),t=qi(),n){return`00-${e}-${t}-${n?"01":"00"}`}function $q(e,t){const n=ss(t?.sample_rand);if(n!==void 0)return n;const r=ss(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?Bi()*r:r+Bi()*(1-r):Bi()}function Sq(e,t){const n=$9(e);return t&&n&&t!==n?(B.log(`Won't continue trace because org IDs don't match (incoming baggage: ${t}, SDK options: ${n})`),!1):(e.getOptions().strictTraceContinuation||!1)&&(t&&!n||!t&&n)?(B.log(`Starting a new trace because strict trace continuation is enabled but one org ID is missing (incoming baggage: ${t}, Sentry client: ${n})`),!1):!0}const A9=0,Md=1;let x9=!1;function Eq(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:o,status:s,origin:a,links:l}=Je(e);return{parent_span_id:o,span_id:t,trace_id:n,data:r,op:i,status:s,origin:a,links:l}}function C9(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:Je(e).parent_span_id,o=uc(e).scope,s=r?o?.getPropagationContext().propagationSpanId||qi():t;return{parent_span_id:i,span_id:s,trace_id:n}}function k9(e){const{traceId:t,spanId:n}=e.spanContext(),r=Hi(e);return w9(t,n,r)}function Tq(e){const{traceId:t,spanId:n}=e.spanContext(),r=Hi(e);return I9(t,n,r)}function N9(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:n,traceFlags:r,...i},attributes:o})=>({span_id:t,trace_id:n,sampled:r===Md,attributes:o,...i}))}function R9(e){if(e?.length)return e.map(({context:{spanId:t,traceId:n,traceFlags:r},attributes:i})=>({span_id:t,trace_id:n,sampled:r===Md,attributes:i}))}function zi(e){return typeof e=="number"?O9(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?O9(e.getTime()):Ct()}function O9(e){return e>9999999999?e/1e3:e}function Je(e){if(L9(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(M9(e)){const{attributes:r,startTime:i,name:o,endTime:s,status:a,links:l}=e;return{span_id:t,trace_id:n,data:r,description:o,parent_span_id:P9(e),start_timestamp:zi(i),timestamp:zi(s)||void 0,status:D9(a),op:r[yt],origin:r[it],links:N9(l)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function Ld(e){if(L9(e))return e.getStreamedSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(M9(e)){const{attributes:r,startTime:i,name:o,endTime:s,status:a,links:l}=e;return{name:o,span_id:t,trace_id:n,parent_span_id:P9(e),start_timestamp:zi(i),end_timestamp:zi(s),is_segment:e===Dd(e),status:F9(a),attributes:r,links:R9(l)}}return{span_id:t,trace_id:n,start_timestamp:0,name:"",end_timestamp:0,status:"ok",is_segment:e===Dd(e)}}function P9(e){return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0}function wq(e){return{...e,attributes:ta(e.attributes),links:e.links?.map(t=>({...t,attributes:ta(t.attributes)}))}}function M9(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function L9(e){return typeof e.getSpanJSON=="function"}function Hi(e){const{traceFlags:t}=e.spanContext();return t===Md}function D9(e){if(!(!e||e.code===p9))return e.code===lc?"ok":e.message||"internal_error"}function F9(e){return!e||e.code===lc||e.code===p9||e.message==="cancelled"?"ok":"error"}const as="_sentryChildSpans",k_="_sentryRootSpan";function U9(e,t){const n=e[k_]||e;Sn(t,k_,n),e[as]?e[as].add(t):Sn(e,as,new Set([t]))}function Iq(e,t){e[as]&&e[as].delete(t)}function dc(e){const t=new Set;function n(r){if(!t.has(r)&&Hi(r)){t.add(r);const i=r[as]?Array.from(r[as]):[];for(const o of i)n(o)}}return n(e),Array.from(t)}const zt=Dd;function Dd(e){return e[k_]||e}function Ht(){const e=Mi(),t=bo(e);return t.getActiveSpan?t.getActiveSpan():Qs(Ke())}function Fd(){x9||(Or(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),x9=!0)}function Aq(e,t){e.updateName(t),e.setAttributes({[Jt]:"custom",[ac]:t})}let B9=!1;function j9(){if(B9)return;function e(){const t=Ht(),n=t&&zt(t);if(n){const r="internal_error";Ee&&B.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:st,message:r})}}e.tag="sentry_tracingErrorCallback",B9=!0,V$(e),W$(e)}function or(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||Ie()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function q9(e){B.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function fc(e,t){if(!t?.length)return!1;for(const n of t){if(kq(n)){if(e.description&&nc(e.description,n))return Ee&&q9(e),!0;continue}const r=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!r)continue;const i=n.name?e.description&&nc(e.description,n.name):!0,o=n.op?e.op&&nc(e.op,n.op):!0,s=n.attributes?Object.entries(n.attributes).every(([a,l])=>xq(e.attributes?.[a],l)):!0;if(i&&o&&s)return Ee&&q9(e),!0}return!1}function xq(e,t){return typeof e=="string"&&(typeof t=="string"||t instanceof RegExp)?nc(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e===t}function Cq(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const i of e)i.parent_span_id===r&&(i.parent_span_id=n)}function kq(e){return typeof e=="string"||e instanceof RegExp}const Ud="production",z9="_frozenDsc";function Bd(e,t){Sn(e,z9,t)}function H9(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i={environment:n.environment||Ud,release:n.release,public_key:r,trace_id:e,org_id:$9(t)};return t.emit("createDsc",i),i}function N_(e,t){const n=t.getPropagationContext();return n.dsc||H9(n.traceId,e)}function br(e){const t=Ie();if(!t)return{};const n=zt(e),r=Je(n),i=r.data,o=n.spanContext().traceState,s=o?.get("sentry.sample_rate")??i[Od]??i[f9];function a(m){return(typeof s=="number"||typeof s=="string")&&(m.sample_rate=`${s}`),m}const l=n[z9];if(l)return a(l);const c=o?.get("sentry.dsc"),u=c&&C_(c);if(u)return a(u);const d=H9(e.spanContext().traceId,t),f=i[Jt]??i["sentry.span.source"],p=r.description;return f!=="url"&&p&&(d.transaction=p),or()&&(d.sampled=String(Hi(n)),d.sample_rand=o?.get("sentry.sample_rand")??uc(n).scope?.getPropagationContext().sampleRand.toString()),a(d),t.emit("createDsc",d,n),d}function Nq(e){const t=br(e);return g9(t)}class sr{constructor(t={}){this._traceId=t.traceId||ii(),this._spanId=t.spanId||qi(),this.dropReason=t.dropReason}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:A9}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,n,r){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}}function Rq(e){return Sn(e,"_streamed",!0),e}function jd(e){return!!e&&typeof e=="function"&&"_streamed"in e&&!!e._streamed}const V9=Symbol.for("sentry.skipNormalization"),W9=Symbol.for("sentry.overrideNormalizationDepth");function Oq(e){Sn(e,V9,!0)}function Pq(e,t){Sn(e,W9,t)}function Mq(e){return!!e[V9]}function Lq(e){const t=e[W9];return typeof t=="number"?t:void 0}function En(e,t=100,n=1/0){try{return R_("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function G9(e,t=3,n=100*1024){const r=En(e,t);return Bq(r)>n?G9(e,t-1,n):r}function R_(e,t,n=1/0,r=1/0,i=jq()){const[o,s]=i;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=Dq(e,t);if(!a.startsWith("[object "))return a;if(Mq(t))return t;const l=Lq(t),c=l!==void 0?l:n;if(c===0)return a.replace("object ","");if(o(t))return"[Circular ~]";const u=t;if(u&&typeof u.toJSON=="function")try{const m=u.toJSON();return R_("",m,c-1,r,i)}catch{}const d=Array.isArray(t)?[]:{};let f=0;const p=Z$(t);for(const m in p){if(!Object.prototype.hasOwnProperty.call(p,m))continue;if(f>=r){d[m]="[MaxProperties ~]";break}const b=p[m];d[m]=R_(m,b,c-1,r,i),f++}return s(t),d}function Dq(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(X$(t))return z$(t);if(Tj(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${Li(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=Fq(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function Fq(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function Uq(e){return~-encodeURI(e).split(/%..|./).length}function Bq(e){return Uq(JSON.stringify(e))}function jq(){const e=new WeakSet;function t(r){return e.has(r)?!0:(e.add(r),!1)}function n(r){e.delete(r)}return[t,n]}function vr(e,t=[]){return[e,t]}function qq(e,t){const[n,r]=e;return[n,[...r,t]]}function ls(e,t){const n=e[1];for(const r of n){const i=r[0].type;if(t(r,i))return!0}return!1}function O_(e,t){return ls(e,(n,r)=>t.includes(r))}function qd(e){const t=Jl(je);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function zq(e){const t=Jl(je);return t.decodePolyfill?t.decodePolyfill(e):new TextDecoder().decode(e)}function zd(e){const[t,n]=e;let r=JSON.stringify(t);function i(o){typeof r=="string"?r=typeof o=="string"?r+o:[qd(r),o]:r.push(typeof o=="string"?qd(o):o)}for(const o of n){const[s,a]=o;if(i(`
|
|
35
35
|
${JSON.stringify(s)}
|
|
36
|
-
`),typeof a=="string"||a instanceof Uint8Array)i(a);else{let l;try{l=JSON.stringify(a)}catch{l=JSON.stringify(En(a))}i(l)}}return typeof r=="string"?r:Hq(r)}function Hq(e){const t=e.reduce((i,o)=>i+o.length,0),n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}function Vq(e){let t=typeof e=="string"?qd(e):e;function n(s){const a=t.subarray(0,s);return t=t.subarray(s+1),a}function r(){let s=t.indexOf(10);return s<0&&(s=t.length),JSON.parse(zq(n(s)))}const i=r(),o=[];for(;t.length;){const s=r(),a=typeof s.length=="number"?s.length:void 0;o.push([s,a?n(a):r()])}return[i,o]}function Wq(e){return[{type:"span"},e]}function Gq(e){const t=typeof e.data=="string"?qd(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const
|
|
36
|
+
`),typeof a=="string"||a instanceof Uint8Array)i(a);else{let l;try{l=JSON.stringify(a)}catch{l=JSON.stringify(En(a))}i(l)}}return typeof r=="string"?r:Hq(r)}function Hq(e){const t=e.reduce((i,o)=>i+o.length,0),n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}function Vq(e){let t=typeof e=="string"?qd(e):e;function n(s){const a=t.subarray(0,s);return t=t.subarray(s+1),a}function r(){let s=t.indexOf(10);return s<0&&(s=t.length),JSON.parse(zq(n(s)))}const i=r(),o=[];for(;t.length;){const s=r(),a=typeof s.length=="number"?s.length:void 0;o.push([s,a?n(a):r()])}return[i,o]}function Wq(e){return[{type:"span"},e]}function Gq(e){const t=typeof e.data=="string"?qd(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const Y9={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 Yq(e){return e in Y9}function K9(e){return Yq(e)?Y9[e]:e}function pc(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function X9(e,t,n,r){const i=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:si(r)},...i&&{trace:i}}}function Kq(e,t){if(!t)return e;const n=e.sdk||{};return 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}function Xq(e,t,n,r){const i=pc(n),o={sent_at:new Date().toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:si(t)}},s="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return vr(o,[s])}function Jq(e,t,n,r){const i=pc(n),o=e.type&&e.type!=="replay_event"?e.type:"event";Kq(e,n?.sdk);const s=X9(e,i,r,t);return delete e.sdkProcessingMetadata,vr(s,[[{type:o},e]])}function Zq(e,t){function n(p){return!!p.trace_id&&!!p.public_key}const r=br(e[0]),i=t?.getDsn(),o=t?.getOptions().tunnel,s={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!o&&i&&{dsn:si(i)}},{beforeSendSpan:a,ignoreSpans:l}=t?.getOptions()||{},c=l?.length?e.filter(p=>{const m=Je(p);return!fc({description:m.description,op:m.op,attributes:m.data},l)}):e,u=e.length-c.length;u&&t?.recordDroppedEvent("before_send","span",u);const d=a?p=>{const m=Je(p),b=jd(a)?m:a(m);return b||(Fd(),m)}:Je,f=[];for(const p of c){const m=d(p);m&&f.push(Wq(m))}return vr(s,f)}function Qq(e){if(!Ee)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=Je(e),{spanId:i}=e.spanContext(),o=Hi(e),s=zt(e),a=s===e,l=`[Tracing] Starting ${o?"sampled":"unsampled"} ${a?"root ":""}span`,c=[`op: ${n}`,`name: ${t}`,`ID: ${i}`];if(r&&c.push(`parent ID: ${r}`),!a){const{op:u,description:d}=Je(s);c.push(`root ID: ${s.spanContext().spanId}`),u&&c.push(`root op: ${u}`),d&&c.push(`root description: ${d}`)}B.log(`${l}
|
|
37
37
|
${c.join(`
|
|
38
|
-
`)}`)}function ez(e){if(!Ee)return;const{description:t="< unknown name >",op:n="< unknown op >"}=Je(e),{spanId:r}=e.spanContext(),o=zt(e)===e,s=`[Tracing] Finishing "${n}" ${o?"root ":""}span "${t}" with ID ${r}`;B.log(s)}function J$(e,t,n,r=Ht()){const i=r&&zt(r);i&&(Ee&&B.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),i.addEvent(e,{[sc]:t,[oc]:n}))}function Z$(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},i=r[oc],o=r[sc];typeof i=="string"&&typeof o=="number"&&(t[n.name]={value:o,unit:i})}),t}function Vi(e){return e.getOptions().traceLifecycle==="stream"}const Q$=1e3;class Hd{constructor(t={}){this._traceId=t.traceId||ii(),this._spanId=t.spanId||qi(),this._startTime=t.startTimestamp||Ct(),this._links=t.links,this._attributes={},this.setAttributes({[it]:"manual",[yt]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}addLink(t){return this._links?this._links.push(t):this._links=[t],this}addLinks(t){return this._links?this._links.push(...t):this._links=t,this}recordException(t,n){}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?Md:A$}}setAttribute(t,n){return n===void 0?delete this._attributes[t]:this._attributes[t]=n,this}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._startTime=zi(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(Jt,"custom"),this}end(t){this._endTime||(this._endTime=zi(t),ez(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[yt],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:D$(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[it],profile_id:this._attributes[x_],exclusive_time:this._attributes[vo],measurements:Z$(this._events),is_segment:this._isStandaloneSpan&&zt(this)===this||void 0,segment_id:this._isStandaloneSpan?zt(this).spanContext().spanId:void 0,links:N$(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===zt(this),status:F$(this._status),attributes:this._attributes,links:R$(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){Ee&&B.log("[Tracing] Adding an event to span:",t);const i=e4(n)?n:r||Ct(),o=e4(n)?{}:n||{},s={name:t,time:zi(i),attributes:o};return this._events.push(s),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=Ie();if(t&&(t.emit("spanEnd",this),this._isStandaloneSpan||t.emit("afterSpanEnd",this)),!(this._isStandaloneSpan||this===zt(this)))return;if(this._isStandaloneSpan){this._sampled?nz(Zq([this],t)):(Ee&&B.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}else if(t&&Vi(t)){t.emit("afterSegmentSpanEnd",this);return}const r=this._convertSpanToTransaction();r&&(uc(this).scope||Ke()).captureEvent(r)}_convertSpanToTransaction(){if(!t4(Je(this)))return;this._name||(Ee&&B.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=uc(this),r=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;const o=dc(this).filter(u=>u!==this&&!tz(u)).map(u=>Je(u)).filter(t4),s=this._attributes[Jt];delete this._attributes[ac],o.forEach(u=>{delete u.data[ac]});const a={contexts:{trace:Eq(this)},spans:o.length>Q$?o.sort((u,d)=>u.start_timestamp-d.start_timestamp).slice(0,Q$):o,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:br(this)},request:r,...s&&{transaction_info:{source:s}}},l=Z$(this._events);return l&&Object.keys(l).length&&(Ee&&B.log("[Measurements] Adding measurements to transaction event",JSON.stringify(l,void 0,2)),a.measurements=l),a}}function e4(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function t4(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function tz(e){return e instanceof Hd&&e.isStandaloneSpan()}function nz(e){const t=Ie();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function P_(e,t,n=()=>{},r=()=>{}){let i;try{i=e()}catch(o){throw t(o),n(),o}return rz(i,t,n,r)}function rz(e,t,n,r){return ts(e)?a$(e,i=>{n(),r(i)},i=>{t(i),n()}):(n(),r(e),e)}function iz(e,t,n){if(!or(e))return[!1];let r,i;typeof e.tracesSampler=="function"?(i=e.tracesSampler({...t,inheritOrSampleWith:a=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):a}),r=!0):t.parentSampled!==void 0?i=t.parentSampled:typeof e.tracesSampleRate<"u"&&(i=e.tracesSampleRate,r=!0);const o=ss(i);if(o===void 0)return Ee&&B.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(i)} of type ${JSON.stringify(typeof i)}.`),[!1];if(!o)return Ee&&B.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,o,r];const s=n<o;return s||Ee&&B.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(i)})`),[s,o,r]}const M_="__SENTRY_SUPPRESS_TRACING__";function ai(e,t){const n=na();if(n.startSpan)return n.startSpan(e,t);const r=D_(e),{forceTransaction:i,parentSpan:o,scope:s}=e,a=s?.clone();return yr(a,()=>o4(o)(()=>{const c=Ke(),u=F_(c,o),d=Ie(),f=e.onlyIfParent&&!u,p=f?new sr:L_({parentSpan:u,spanArguments:r,forceTransaction:i,scope:c});return f&&d?.recordDroppedEvent("no_parent_span","span"),(!s4(p)||!u)&&oi(c,p),P_(()=>t(p),()=>{const{status:m}=Je(p);p.isRecording()&&(!m||m==="ok")&&p.setStatus({code:st,message:"internal_error"})},()=>{p.end()})}))}function Wi(e,t){const n=na();if(n.startSpanManual)return n.startSpanManual(e,t);const r=D_(e),{forceTransaction:i,parentSpan:o,scope:s}=e,a=s?.clone();return yr(a,()=>o4(o)(()=>{const c=Ke(),u=F_(c,o),d=e.onlyIfParent&&!u,f=d?new sr:L_({parentSpan:u,spanArguments:r,forceTransaction:i,scope:c});return d&&Ie()?.recordDroppedEvent("no_parent_span","span"),(!s4(f)||!u)&&oi(c,f),P_(()=>t(f,()=>f.end()),()=>{const{status:p}=Je(f);f.isRecording()&&(!p||p==="ok")&&f.setStatus({code:st,message:"internal_error"})})}))}function li(e){const t=na();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=D_(e),{forceTransaction:r,parentSpan:i}=e;return(e.scope?s=>yr(e.scope,s):i!==void 0?s=>mc(i,s):s=>s())(()=>{const s=Ke(),a=F_(s,i),l=Ie();return e.onlyIfParent&&!a?(l?.recordDroppedEvent("no_parent_span","span"),new sr):L_({parentSpan:a,spanArguments:n,forceTransaction:r,scope:s})})}const oz=(e,t)=>{const n=Mi(),r=bo(n);if(r.continueTrace)return r.continueTrace(e,t);const{sentryTrace:i,baggage:o}=e,s=Ie(),a=C_(o);return s&&!Sq(s,a?.org_id)?r4(t):yr(l=>{const c=T$(i,o);return l.setPropagationContext(c),oi(l,void 0),t()})};function mc(e,t){const n=na();return n.withActiveSpan?n.withActiveSpan(e,t):yr(r=>(oi(r,e||void 0),t(r)))}function n4(e){const t=na();return t.suppressTracing?t.suppressTracing(e):yr(n=>{n.setSDKProcessingMetadata({[M_]:!0});const r=e();return n.setSDKProcessingMetadata({[M_]:void 0}),r})}function r4(e){const t=na();return t.startNewTrace?t.startNewTrace(e):yr(n=>(n.setPropagationContext({traceId:ii(),sampleRand:Bi()}),Ee&&B.log(`Starting a new trace with id ${n.getPropagationContext().traceId}`),mc(null,e)))}function L_({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!or()){const a=new sr;if(n||!e){const l={sampled:"false",sample_rate:"0",transaction:t.name,...br(a)};Bd(a,l)}return a}const i=Ie();if(az(i,t))return U_(r)||i?.recordDroppedEvent("ignored","span"),new sr({dropReason:"ignored",traceId:e?.spanContext().traceId??r.getPropagationContext().traceId});const o=qt();let s;if(e&&!n)s=sz(e,r,t),U$(e,s);else if(e){const a=br(e),{traceId:l,spanId:c}=e.spanContext(),u=Hi(e);s=i4({traceId:l,parentSpanId:c,...t},r,u),Bd(s,a)}else{const{traceId:a,dsc:l,parentSpanId:c,sampled:u}={...o.getPropagationContext(),...r.getPropagationContext()};s=i4({traceId:a,parentSpanId:c,...t},r,u),l&&Bd(s,l)}return Qq(s),dq(s,r,o),s}function D_(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=zi(e.startTime),delete r.startTime,r}return n}function na(){const e=Mi();return bo(e)}function i4(e,t,n){const r=Ie(),i=r?.getOptions()||{},{name:o=""}=e,s={spanAttributes:{...e.attributes},spanName:o,parentSampled:n};r?.emit("beforeSampling",s,{decision:!1});const a=s.parentSampled??n,l=s.spanAttributes,c=t.getPropagationContext(),u=U_(t),[d,f,p]=u?[!1]:iz(i,{name:o,parentSampled:a,attributes:l,parentSampleRate:ss(c.dsc?.sample_rate)},c.sampleRand),m=new Hd({...e,attributes:{[Jt]:"custom",[Od]:f!==void 0&&p?f:void 0,...l},sampled:d});return!d&&r&&!u&&(Ee&&B.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate",Vi(r)?"span":"transaction")),r&&r.emit("spanStart",m),m}function sz(e,t,n){const{spanId:r,traceId:i}=e.spanContext(),o=U_(t),s=o?!1:Hi(e),a=s?new Hd({...n,parentSpanId:r,traceId:i,sampled:s}):new sr({traceId:i});U$(e,a);const l=Ie();return l&&(Vi(l)&&a instanceof sr&&(e instanceof sr&&e.dropReason?(a.dropReason=e.dropReason,l.recordDroppedEvent(e.dropReason,"span")):o||(a.dropReason="sample_rate",l.recordDroppedEvent("sample_rate","span"))),l.emit("spanStart",a),n.endTimestamp&&(l.emit("spanEnd",a),l.emit("afterSpanEnd",a))),a}function F_(e,t){if(t)return t;if(t===null)return;const n=Qs(e);if(!n)return;const r=Ie();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?zt(n):n}function o4(e){return e!==void 0?t=>mc(e,t):t=>t()}function az(e,t){const n=e?.getOptions().ignoreSpans;return!e||!Vi(e)||!n?.length?!1:fc({description:t.name||"",op:t.attributes?.[yt]||t.op,attributes:t.attributes},n)}function s4(e){return e instanceof sr&&e.dropReason==="ignored"}function U_(e){return e.getScopeData().sdkProcessingMetadata[M_]===!0}const Vd={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},lz="heartbeatFailed",cz="idleTimeout",uz="finalTimeout",dz="externalFinish";function a4(e,t={}){const n=new Map;let r=!1,i,o=dz,s=!t.disableAutoFinish;const a=[],{idleTimeout:l=Vd.idleTimeout,finalTimeout:c=Vd.finalTimeout,childSpanTimeout:u=Vd.childSpanTimeout,beforeSpanEnd:d,trimIdleSpanEndTimestamp:f=!0}=t,p=Ie();if(!p||!or()){const w=new sr,D={sample_rate:"0",sampled:"false",...br(w)};return Bd(w,D),w}const m=Ke(),b=Ht(),g=fz(e);g.end=new Proxy(g.end,{apply(w,D,Y){if(d&&d(g),D instanceof sr)return;const[q,...P]=Y,C=q||Ct(),F=zi(C),R=dc(g).filter(te=>te!==g),G=Je(g);if(!R.length||!f)return N(F),Reflect.apply(w,D,[F,...P]);const z=p.getOptions().ignoreSpans,K=R?.reduce((te,se)=>{const _e=Je(se);return!_e.timestamp||z&&fc({description:_e.description,op:_e.op,attributes:_e.data},z)?te:te?Math.max(te,_e.timestamp):_e.timestamp},void 0),M=G.start_timestamp,oe=Math.min(M?M+c/1e3:1/0,Math.max(M||-1/0,Math.min(F,K||1/0)));return N(oe),Reflect.apply(w,D,[oe,...P])}});function _(){i&&(clearTimeout(i),i=void 0)}function y(w){_(),i=setTimeout(()=>{!r&&n.size===0&&s&&(o=cz,g.end(w))},l)}function T(w){i=setTimeout(()=>{!r&&s&&(o=lz,g.end(w))},u)}function S(w){_(),n.set(w,!0);const D=Ct();T(D+u/1e3)}function O(w){if(n.has(w)&&n.delete(w),n.size===0){const D=Ct();y(D+l/1e3)}}function N(w){r=!0,n.clear(),a.forEach(R=>R()),oi(m,b);const D=Je(g),{start_timestamp:Y}=D;if(!Y)return;D.data[ic]||g.setAttribute(ic,o);const P=D.status;(!P||P==="unknown")&&g.setStatus({code:lc}),B.log(`[Tracing] Idle span "${D.op}" finished`);const C=dc(g).filter(R=>R!==g);let F=0;C.forEach(R=>{R.isRecording()&&(R.setStatus({code:st,message:"cancelled"}),R.end(w),Ee&&B.log("[Tracing] Cancelling span since span ended early",JSON.stringify(R,void 0,2)));const G=Je(R),{timestamp:z=0,start_timestamp:K=0}=G,M=K<=w,oe=(c+l)/1e3,te=z-K<=oe;if(Ee){const se=JSON.stringify(R,void 0,2);M?te||B.log("[Tracing] Discarding span since it finished after idle span final timeout",se):B.log("[Tracing] Discarding span since it happened after idle span was finished",se)}(!te||!M)&&(Iq(g,R),F++)}),F>0&&g.setAttribute("sentry.idle_span_discarded_spans",F)}return a.push(p.on("spanStart",w=>{if(r||w===g||Je(w).timestamp||w instanceof Hd&&w.isStandaloneSpan())return;dc(g).includes(w)&&S(w.spanContext().spanId)})),a.push(p.on("spanEnd",w=>{r||O(w.spanContext().spanId)})),a.push(p.on("idleSpanEnableAutoFinish",w=>{w===g&&(s=!0,y(),n.size&&T())})),t.disableAutoFinish||y(),setTimeout(()=>{r||(g.setStatus({code:st,message:"deadline_exceeded"}),o=uz,g.end())},c),g}function fz(e){const t=li(e);return oi(Ke(),t),Ee&&B.log("[Tracing] Started span is an idle span"),t}function pz(e,t){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=t;mz(e,t),r&&gz(e,r),yz(e,n),_z(e,i),hz(e,o)}function l4(e,t){const{extra:n,tags:r,attributes:i,user:o,contexts:s,level:a,sdkProcessingMetadata:l,breadcrumbs:c,fingerprint:u,eventProcessors:d,attachments:f,propagationContext:p,transactionName:m,span:b}=t;_c(e,"extra",n),_c(e,"tags",r),_c(e,"attributes",i),_c(e,"user",o),_c(e,"contexts",s),e.sdkProcessingMetadata=rc(e.sdkProcessingMetadata,l,2),a&&(e.level=a),m&&(e.transactionName=m),b&&(e.span=b),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...p}}function _c(e,t,n){e[t]=rc(e[t],n,1)}function hc(e,t){const n=os().getScopeData();return e&&l4(n,e.getScopeData()),t&&l4(n,t.getScopeData()),n}function mz(e,t){const{extra:n,tags:r,user:i,contexts:o,level:s,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(i).length&&(e.user={...i,...e.user}),Object.keys(o).length&&(e.contexts={...o,...e.contexts}),s&&(e.level=s),a&&e.type!=="transaction"&&(e.transaction=a)}function _z(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function hz(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function gz(e,t){e.contexts={trace:C$(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:br(t),...e.sdkProcessingMetadata};const n=zt(t),r=Je(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function yz(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}function bz(e,t){const n=Ld(e),r=Dd(e),i=Ld(r),{isolationScope:o,scope:s}=uc(e),a=hc(o,s);vz(n,i,t,a);const l=e.kind;Tz(n,l),n.is_segment&&t.emit("processSegmentSpan",n),t.emit("processSpan",n);const{beforeSendSpan:c}=t.getOptions(),u=c&&jd(c)?$z(n,c):n,d=u.attributes?.[Jt];return d&&$r(u,{"sentry.span.source":d}),{...wq(u),_segmentSpan:r}}function vz(e,t,n,r){const i=n.getSdkMetadata(),{release:o,environment:s,sendDefaultPii:a}=n.getOptions();$r(e,{[Kj]:o,[Xj]:s,[Jj]:t.name,[Zj]:t.span_id,[Qj]:i?.sdk?.name,[eq]:i?.sdk?.version,...a?{[tq]:r.user?.id,[nq]:r.user?.email,[rq]:r.user?.ip_address,[iq]:r.user?.username}:{},...r.attributes})}function $z(e,t){const n=t(e);return n||(Fd(),e)}function $r(e,t){const n=e.attributes??(e.attributes={});Object.entries(t).forEach(([r,i])=>{i!=null&&!(r in n)&&(n[r]=i)})}const Sz=1,Ez=2;function Tz(e,t){const n=e.attributes;if(!n)return;const r=n["http.request.method"]||n["http.method"];if(r){wz(e,n,t,r);return}const i=n["db.system.name"]||n["db.system"],o=typeof n[yt]=="string"&&`${n[yt]}`.startsWith("cache.");if(i&&!o){Iz(e,n);return}if(n["rpc.service"]){$r(e,{[yt]:"rpc"});return}if(n["messaging.system"]){$r(e,{[yt]:"message"});return}const s=n["faas.trigger"];s&&$r(e,{[yt]:`${s}`})}function wz(e,t,n,r){const i=["http"];n===Ez?i.push("client"):n===Sz&&i.push("server"),t["sentry.http.prefetch"]&&i.push("prefetch"),$r(e,{[yt]:i.join(".")});const o=t[ac];if(typeof o=="string"){e.name=o;return}if(t[Jt]==="custom")return;const s=t["http.route"];typeof s=="string"?(e.name=`${r} ${s}`,$r(e,{[Jt]:"route"})):$r(e,{[Jt]:"url"})}function Iz(e,t){$r(e,{[yt]:"db"});const n=t[ac];if(typeof n=="string"){e.name=n;return}if(t[Jt]==="custom")return;const r=t["db.statement"];r&&(e.name=`${r}`,$r(e,{[Jt]:"task"}))}const B_=0,c4=1,u4=2;function gc(e){return new yc(t=>{t(e)})}function j_(e){return new yc((t,n)=>{n(e)})}class yc{constructor(t){this._state=B_,this._handlers=[],this._runExecutor(t)}then(t,n){return new yc((r,i)=>{this._handlers.push([!1,o=>{if(!t)r(o);else try{r(t(o))}catch(s){i(s)}},o=>{if(!n)i(o);else try{r(n(o))}catch(s){i(s)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new yc((n,r)=>{let i,o;return this.then(s=>{o=!1,i=s,t&&t()},s=>{o=!0,i=s,t&&t()}).then(()=>{if(o){r(i);return}n(i)})})}_executeHandlers(){if(this._state===B_)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===c4&&n[1](this._value),this._state===u4&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(o,s)=>{if(this._state===B_){if(ts(s)){s.then(r,i);return}this._state=o,this._value=s,this._executeHandlers()}},r=o=>{n(c4,o)},i=o=>{n(u4,o)};try{t(r,i)}catch(o){i(o)}}}function Az(e,t,n,r=0){try{const i=q_(t,n,e,r);return ts(i)?i:gc(i)}catch(i){return j_(i)}}function q_(e,t,n,r){const i=n[r];if(!e||!i)return e;const o=i({...e},t);return Ee&&o===null&&B.log(`Event processor "${i.id||"?"}" dropped event`),ts(o)?o.then(s=>q_(s,t,n,r+1)):q_(o,t,n,r+1)}let cs,d4,f4,$o;function p4(e){const t=je._sentryDebugIds,n=je._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],i=n?Object.keys(n):[];if($o&&r.length===d4&&i.length===f4)return $o;d4=r.length,f4=i.length,$o={},cs||(cs={});const o=(s,a)=>{for(const l of s){const c=a[l],u=cs?.[l];if(u&&$o&&c)$o[u[0]]=c,cs&&(cs[l]=[u[0],c]);else if(c){const d=e(l);for(let f=d.length-1;f>=0;f--){const m=d[f]?.filename;if(m&&$o&&cs){$o[m]=c,cs[l]=[m,c];break}}}}};return t&&o(r,t),n&&o(i,n),$o}function xz(e,t){const n=p4(e);if(!n)return[];const r=[];for(const i of t){const o=yj(i);o&&n[o]&&r.push({type:"sourcemap",code_file:i,debug_id:n[o]})}return r}function m4(e,t,n,r,i,o){const{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,l={...t,event_id:t.event_id||n.event_id||ln(),timestamp:t.timestamp||is()},c=n.integrations||e.integrations.map(_=>_.name);Cz(l,e),Rz(l,c),i&&i.emit("applyFrameMetadata",t),t.type===void 0&&kz(l,e.stackParser);const u=Pz(r,n.captureContext);n.mechanism&&ji(l,n.mechanism);const d=i?i.getEventProcessors():[],f=hc(o,u),p=[...n.attachments||[],...f.attachments];p.length&&(n.attachments=p),pz(l,f);const m=[...d,...f.eventProcessors];return(n.data&&n.data.__sentry__===!0?gc(l):Az(m,l,n)).then(_=>(_&&Nz(_),typeof s=="number"&&s>0?Oz(_,s,a):_))}function Cz(e,t){const{environment:n,release:r,dist:i,maxValueLength:o}=t;e.environment=e.environment||n||Ud,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i);const s=e.request;s?.url&&o&&(s.url=tc(s.url,o)),o&&e.exception?.values?.forEach(a=>{a.value&&(a.value=tc(a.value,o))})}function kz(e,t){const n=p4(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(i=>{i.filename&&(i.debug_id=n[i.filename])})})}function Nz(e){const t={};if(e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(i=>{i.debug_id&&(i.abs_path?t[i.abs_path]=i.debug_id:i.filename&&(t[i.filename]=i.debug_id),delete i.debug_id)})}),Object.keys(t).length===0)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(([r,i])=>{n.push({type:"sourcemap",code_file:r,debug_id:i})})}function Rz(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Oz(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:En(i.data,t,n)}}))},...e.user&&{user:En(e.user,t,n)},...e.contexts&&{contexts:En(e.contexts,t,n)},...e.extra&&{extra:En(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=En(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(i=>({...i,...i.data&&{data:En(i.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=En(e.contexts.flags,3,n)),r}function Pz(e,t){if(!t)return e;const n=e?e.clone():new Lr;return n.update(t),n}function Mz(e){if(e)return Lz(e)?{captureContext:e}:Fz(e)?{captureContext:e}:e}function Lz(e){return e instanceof Lr||typeof e=="function"}const Dz=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Fz(e){return Object.keys(e).some(t=>Dz.includes(t))}function It(e,t){return Ke().captureException(e,Mz(t))}function _4(e,t){const n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return Ke().captureMessage(e,n,r)}function ra(e,t){return Ke().captureEvent(e,t)}function h4(e,t){qt().setContext(e,t)}function Uz(e){qt().setExtras(e)}function Bz(e,t){qt().setExtra(e,t)}function jz(e){qt().setTags(e)}function qz(e,t){qt().setTag(e,t)}function zz(e){qt().setUser(e)}function Hz(e){qt().setConversationId(e)}function g4(){return qt().lastEventId()}async function Vz(e){const t=Ie();return t?t.flush(e):(Ee&&B.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}async function Wz(e){const t=Ie();return t?t.close(e):(Ee&&B.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))}function Gz(){return!!Ie()}function y4(){const e=Ie();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function b4(e){qt().addEventProcessor(e)}function z_(e){const t=qt(),{user:n}=hc(t,Ke()),{userAgent:r}=je.navigator||{},i=Pj({user:n,...r&&{userAgent:r},...e}),o=t.getSession();return o?.status==="ok"&&Zs(o,{status:"exited"}),H_(),t.setSession(i),i}function H_(){const e=qt(),n=Ke().getSession()||e.getSession();n&&Mj(n),v4(),e.setSession()}function v4(){const e=qt(),t=Ie(),n=e.getSession();n&&t&&t.captureSession(n)}function Wd(e=!1){if(e){H_();return}v4()}const Yz="7";function $4(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function Kz(e){return`${$4(e)}${e.projectId}/envelope/`}function Xz(e,t){const n={sentry_version:Yz};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function S4(e,t,n){return t||`${Kz(e)}?${Xz(e,n)}`}function Jz(e,t){const n=S$(e);if(!n)return"";const r=`${$4(n)}embed/error-page/`;let i=`dsn=${si(n)}`;for(const o in t)if(o!=="dsn"&&o!=="onClose")if(o==="user"){const s=t.user;if(!s)continue;s.name&&(i+=`&name=${encodeURIComponent(s.name)}`),s.email&&(i+=`&email=${encodeURIComponent(s.email)}`)}else i+=`&${encodeURIComponent(o)}=${encodeURIComponent(t[o])}`;return`${r}?${i}`}const E4=[];function Zz(e){const t={};return e.forEach(n=>{const{name:r}=n,i=t[r];i&&!i.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function Qz(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(i=>{i.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const i=n(t);r=Array.isArray(i)?i:[i]}else r=t;return Zz(r)}function eH(e,t){const n={};return t.forEach(r=>{r?.beforeSetup&&r.beforeSetup(e)}),t.forEach(r=>{r&&w4(e,r,n)}),n}function T4(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function w4(e,t,n){if(n[t.name]){Ee&&B.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!E4.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),E4.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(i,o)=>r(i,o,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),i=Object.assign((o,s)=>r(o,s,e),{id:t.name});e.addEventProcessor(i)}["processSpan","processSegmentSpan"].forEach(r=>{const i=t[r];typeof i=="function"&&e.on(r,o=>i.call(t,o,e))}),Ee&&B.log(`Integration installed: ${t.name}`)}function V_(e){const t=Ie();if(!t){Ee&&B.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function Rbe(e){return e}const tH="sentry.timestamp.sequence";let W_=0,G_;function I4(e){const t=Math.floor(e*1e3);G_!==void 0&&t!==G_&&(W_=0);const n=W_;return W_++,G_=t,{key:tH,value:{value:n,type:"integer"}}}function A4(e,t){return t?yr(t,()=>{const n=Ht(),r=n?C$(n):d$(t);return[n?br(n):N_(e,t),r]}):[void 0,void 0]}const nH={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function rH(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function iH(e,t,n,r){const i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(i.dsn=si(r)),vr(i,[rH(e)])}const oH=100;function ci(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}function sH(e,t){const n=Y_(),r=x4(e);r===void 0?n.set(e,[t]):r.length>=oH?(Yd(e,r),n.set(e,[t])):n.set(e,[...r,t])}function Gd(e,t=Ke(),n=sH){const r=t?.getClient()??Ie();if(!r){Ee&&B.warn("No client available to capture log.");return}const{release:i,environment:o,enableLogs:s=!1,beforeSendLog:a}=r.getOptions();if(!s){Ee&&B.warn("logging option not enabled, log will not be captured.");return}const[,l]=A4(r,t),c={...e.attributes},{user:{id:u,email:d,username:f},attributes:p={}}=hc(qt(),t);ci(c,"user.id",u,!1),ci(c,"user.email",d,!1),ci(c,"user.name",f,!1),ci(c,"sentry.release",i),ci(c,"sentry.environment",o);const{name:m,version:b}=r.getSdkMetadata()?.sdk??{};ci(c,"sentry.sdk.name",m),ci(c,"sentry.sdk.version",b);const g=r.getIntegrationByName("Replay"),_=g?.getReplayId(!0);ci(c,"sentry.replay_id",_),_&&g?.getRecordingMode()==="buffer"&&ci(c,"sentry._internal.replay_is_buffering",!0);const y=e.message;if(kd(y)){const{__sentry_template_string__:F,__sentry_template_values__:R=[]}=y;R?.length&&(c["sentry.message.template"]=F),R.forEach((G,z)=>{c[`sentry.message.parameter.${z}`]=G})}const T=Qs(t);ci(c,"sentry.trace.parent_span_id",T?.spanContext().spanId);const S={...e,attributes:c};r.emit("beforeCaptureLog",S);const O=a?Or(()=>a(S)):S;if(!O){r.recordDroppedEvent("before_send","log_item",1),Ee&&B.warn("beforeSendLog returned null, log will not be captured.");return}const{level:N,message:w,attributes:D={},severityNumber:Y}=O,q=Ct(),P=I4(q),C={timestamp:q,level:N,body:w,trace_id:l?.trace_id,severity_number:Y??nH[N],attributes:{...ta(p),...ta(D,!0),[P.key]:P.value}};n(r,C),r.emit("afterCaptureLog",O)}function Yd(e,t){const n=t??x4(e)??[];if(n.length===0)return;const r=e.getOptions(),i=iH(n,r._metadata,r.tunnel,e.getDsn());Y_().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(i)}function x4(e){return Y_().get(e)}function Y_(){return Ks("clientToLogBufferMap",()=>new WeakMap)}function aH(e){return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{items:e}]}function lH(e,t,n,r){const i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(i.dsn=si(r)),vr(i,[aH(e)])}const cH=1e3;function Gi(e,t,n,r=!0){n&&(r||!(t in e))&&(e[t]=n)}function uH(e,t){const n=X_(),r=C4(e);r===void 0?n.set(e,[t]):r.length>=cH?(K_(e,r),n.set(e,[t])):n.set(e,[...r,t])}function dH(e,t,n){const{release:r,environment:i}=t.getOptions(),o={...e.attributes};Gi(o,"user.id",n.id,!1),Gi(o,"user.email",n.email,!1),Gi(o,"user.name",n.username,!1),Gi(o,"sentry.release",r),Gi(o,"sentry.environment",i);const{name:s,version:a}=t.getSdkMetadata()?.sdk??{};Gi(o,"sentry.sdk.name",s),Gi(o,"sentry.sdk.version",a);const l=t.getIntegrationByName("Replay"),c=l?.getReplayId(!0);return Gi(o,"sentry.replay_id",c),c&&l?.getRecordingMode()==="buffer"&&Gi(o,"sentry._internal.replay_is_buffering",!0),{...e,attributes:o}}function fH(e,t,n,r){const[,i]=A4(t,n),o=Qs(n),s=o?o.spanContext().traceId:i?.trace_id,a=o?o.spanContext().spanId:void 0,l=Ct(),c=I4(l);return{timestamp:l,trace_id:s??"",span_id:a,name:e.name,type:e.type,unit:e.unit,value:e.value,attributes:{...ta(r),...ta(e.attributes,"skip-undefined"),[c.key]:c.value}}}function pH(e,t){const n=t?.scope??Ke(),r=t?.captureSerializedMetric??uH,i=n?.getClient()??Ie();if(!i){Ee&&B.warn("No client available to capture metric.");return}const{_experiments:o,enableMetrics:s,beforeSendMetric:a}=i.getOptions();if(!(s??o?.enableMetrics??!0)){Ee&&B.warn("metrics option not enabled, metric will not be captured.");return}const{user:c,attributes:u}=hc(qt(),n),d=dH(e,i,c);i.emit("processMetric",d);const f=a||o?.beforeSendMetric,p=f?f(d):d;if(!p){Ee&&B.log("`beforeSendMetric` returned `null`, will not send metric.");return}const m=fH(p,i,n,u);Ee&&B.log("[Metric]",m),r(i,m),i.emit("afterCaptureMetric",p)}function K_(e,t){const n=t??C4(e)??[];if(n.length===0)return;const r=e.getOptions(),i=lH(n,r._metadata,r.tunnel,e.getDsn());X_().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(i)}function C4(e){return X_().get(e)}function X_(){return Ks("clientToMetricBufferMap",()=>new WeakMap)}function Kd(e){return typeof e=="object"&&typeof e.unref=="function"&&e.unref(),e}const J_=Symbol.for("SentryBufferFullError");function Z_(e=100){const t=new Set;function n(){return t.size<e}function r(s){t.delete(s)}function i(s){if(!n())return j_(J_);const a=s();return t.add(a),a.then(()=>r(a),()=>r(a)),a}function o(s){if(!t.size)return gc(!0);const a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!s)return a;const l=[a,new Promise(c=>Kd(setTimeout(()=>c(!1),s)))];return Promise.race(l)}return{get $(){return Array.from(t)},add:i,drain:o}}const mH=60*1e3;function k4(e,t=ec()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?mH:r-t}function _H(e,t){return e[t]||e.all||0}function N4(e,t,n=ec()){return _H(e,t)>n}function R4(e,{statusCode:t,headers:n},r=ec()){const i={...e},o=n?.["x-sentry-rate-limits"],s=n?.["retry-after"];if(o)for(const a of o.trim().split(",")){const[l,c,,,u]=a.split(":",5),d=parseInt(l,10),f=(isNaN(d)?60:d)*1e3;if(!c)i.all=r+f;else for(const p of c.split(";"))p==="metric_bucket"?(!u||u.split(";").includes("custom"))&&(i[p]=r+f):i[p]=r+f}else s?i.all=r+k4(s,r):t===429&&(i.all=r+60*1e3);return i}const O4=64;function P4(e,t,n=Z_(e.bufferSize||O4)){let r={};const i=s=>n.drain(s);function o(s){const a=[];if(ls(s,(d,f)=>{const p=K$(f);N4(r,p)?e.recordDroppedEvent("ratelimit_backoff",p):a.push(d)}),a.length===0)return Promise.resolve({});const l=vr(s[0],a),c=d=>{if(O_(l,["client_report"])){Ee&&B.warn(`Dropping client report. Will not send outcomes (reason: ${d}).`);return}ls(l,(f,p)=>{e.recordDroppedEvent(d,K$(p))})},u=()=>t({body:zd(l)}).then(d=>d.statusCode===413?(Ee&&B.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),c("send_error"),d):(Ee&&d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&B.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=R4(r,d),d),d=>{throw c("network_error"),Ee&&B.error("Encountered error running transport request:",d),d});return n.add(u).then(d=>d,d=>{if(d===J_)return Ee&&B.error("Skipped sending event because buffer is full."),c("queue_overflow"),Promise.resolve({});throw d})}return{send:o,flush:i}}function hH(e,t,n){const r=[{type:"client_report"},{timestamp:is(),discarded_events:e}];return vr(t?{dsn:t}:{},[r])}function M4(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}function gH(e){const{trace_id:t,parent_span_id:n,span_id:r,status:i,origin:o,data:s,op:a}=e.contexts?.trace??{};return{data:s??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:i,timestamp:e.timestamp,trace_id:t??"",origin:o,profile_id:s?.[x_],exclusive_time:s?.[vo],measurements:e.measurements,is_segment:!0}}function yH(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[x_]:e.profile_id},...e.exclusive_time&&{[vo]:e.exclusive_time}}}},measurements:e.measurements}}const L4="Not capturing exception because it's already been captured.",D4="Discarded session because of missing or non-string release",F4=Symbol.for("SentryInternalError"),U4=Symbol.for("SentryDoNotSendEventError"),bH=5e3;function Xd(e){return{message:e,[F4]:!0}}function Q_(e){return{message:e,[U4]:!0}}function B4(e){return!!e&&typeof e=="object"&&F4 in e}function j4(e){return!!e&&typeof e=="object"&&U4 in e}function q4(e,t,n,r,i){let o=0,s,a=!1;e.on(n,()=>{o=0,clearTimeout(s),a=!1}),e.on(t,l=>{o+=r(l),o>=8e5?i(e):a||(a=!0,s=Kd(setTimeout(()=>{i(e)},bH)))}),e.on("flush",()=>{i(e)})}class vH{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=Z_(t.transportOptions?.bufferSize??O4),t.dsn?this._dsn=S$(t.dsn):Ee&&B.warn("No DSN provided, client will not send events."),this._dsn){const r=S4(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:r})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&q4(this,"afterCaptureLog","flushLogs",TH,Yd),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&q4(this,"afterCaptureMetric","flushMetrics",EH,K_)}captureException(t,n,r){const i=ln();if(n$(t))return Ee&&B.log(L4),i;const o={event_id:i,...n};return this._process(()=>this.eventFromException(t,o).then(s=>this._captureEvent(s,o,r)).then(s=>s),"error"),o.event_id}captureMessage(t,n,r,i){const o={event_id:ln(),...r},s=kd(t)?t:String(t),a=Fi(t),l=a?this.eventFromMessage(s,n,o):this.eventFromException(t,o);return this._process(()=>l.then(c=>this._captureEvent(c,o,i)),a?"unknown":"error"),o.event_id}captureEvent(t,n,r){const i=ln();if(n?.originalException&&n$(n.originalException))return Ee&&B.log(L4),i;const o={event_id:i,...n},s=t.sdkProcessingMetadata||{},a=s.capturedSpanScope,l=s.capturedSpanIsolationScope,c=z4(t.type);return this._process(()=>this._captureEvent(t,o,a||r,l),c),o.event_id}captureSession(t){this.sendSession(t),Zs(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(t){const n=this._transport;if(!n)return!0;this.emit("flush");const r=await this._isClientDoneProcessing(t),i=await n.flush(t);return r&&i}async close(t){Yd(this);const n=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),n}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];!n&&t.beforeSetup&&t.beforeSetup(this),w4(this,t,this._integrations),n||T4(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=Jq(t,this._dsn,this._options._metadata,this._options.tunnel);for(const i of n.attachments||[])r=qq(r,Gq(i));this.sendEnvelope(r).then(i=>this.emit("afterSendEvent",t,i))}sendSession(t){const{release:n,environment:r=Ud}=this._options;if("aggregates"in t){const o=t.attrs||{};if(!o.release&&!n){Ee&&B.warn(D4);return}o.release=o.release||n,o.environment=o.environment||r,t.attrs=o}else{if(!t.release&&!n){Ee&&B.warn(D4);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const i=Xq(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(i)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const i=`${t}:${n}`;Ee&&B.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+r}}on(t,n){const r=this._hooks[t]=this._hooks[t]||new Set,i=(...o)=>n(...o);return r.add(i),()=>{r.delete(i)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(i=>i(...n))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(n){return Ee&&B.error("Error while sending envelope:",n),{}}return Ee&&B.error("Transport disabled"),{}}registerCleanup(t){}dispose(){}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=eH(this,t),T4(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",i=!1;const o=n.exception?.values;if(o){i=!0,r=!1;for(const l of o)if(l.mechanism?.handled===!1){r=!0;break}}const s=t.status==="ok";(s&&t.errors===0||s&&r)&&(Zs(t,{...r&&{status:"crashed"},errors:t.errors||Number(i||r)}),this.captureSession(t))}async _isClientDoneProcessing(t){let n=0;for(;!t||n<t;){if(await new Promise(r=>setTimeout(r,1)),!this._numProcessing)return!0;n++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,i){const o=this.getOptions(),s=Object.keys(this._integrations);return!n.integrations&&s?.length&&(n.integrations=s),this.emit("preprocessEvent",t,n),t.type||i.setLastEventId(t.event_id||n.event_id),m4(o,t,n,r,this,i).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:{...a.contexts?.trace,...d$(r)},...a.contexts};const l=N_(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:l,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=Ke(),i=qt()){return Ee&&eh(t)&&B.log(`Captured error event \`${M4(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,i).then(o=>o.event_id,o=>{Ee&&(j4(o)?B.log(o.message):B4(o)?B.warn(o.message):B.warn(o))})}_processEvent(t,n,r,i){const o=this.getOptions(),{sampleRate:s}=o,a=H4(t),l=eh(t),u=`before send for type \`${t.type||"error"}\``,d=typeof s>"u"?void 0:ss(s);if(l&&typeof d=="number"&&Bi()>d)return this.recordDroppedEvent("sample_rate","error"),j_(Q_(`Discarding event because it's not included in the random sample (sampling rate = ${s})`));const f=z4(t.type);return this._prepareEvent(t,n,r,i).then(p=>{if(p===null)throw this.recordDroppedEvent("event_processor",f),Q_("An event processor returned `null`, will not send event.");if(n.data?.__sentry__===!0)return p;const b=SH(this,o,p,n);return $H(b,u)}).then(p=>{if(p===null){if(this.recordDroppedEvent("before_send",f),a){const _=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",_)}throw Q_(`${u} returned \`null\`, will not send event.`)}const m=r.getSession()||i.getSession();if(l&&m&&this._updateSessionFromEvent(m,p),a){const g=p.sdkProcessingMetadata?.spanCountBeforeProcessing||0,_=p.spans?p.spans.length:0,y=g-_;y>0&&this.recordDroppedEvent("before_send","span",y)}const b=p.transaction_info;if(a&&b&&p.transaction!==t.transaction){const g="custom";p.transaction_info={...b,source:g}}return this.sendEvent(p,n),p}).then(null,p=>{throw j4(p)||B4(p)?p:(this.captureException(p,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:p}),Xd(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
39
|
-
Reason: ${p}`))})}_process(t,n){this._numProcessing++,this._promiseBuffer.add(t).then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r===J_&&this.recordDroppedEvent("queue_overflow",n),r))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[i,o]=n.split(":");return{reason:i,category:o,quantity:r}})}_flushOutcomes(){Ee&&B.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){Ee&&B.log("No outcomes to send");return}if(!this._dsn){Ee&&B.log("No dsn provided, will not send outcomes");return}Ee&&B.log("Sending outcomes:",t);const n=hH(t,this._options.tunnel&&si(this._dsn));this.sendEnvelope(n)}}function z4(e){return e==="replay_event"?"replay":e||"error"}function $H(e,t){const n=`${t} must return \`null\` or a valid event.`;if(ts(e))return e.then(r=>{if(!Xn(r)&&r!==null)throw Xd(n);return r},r=>{throw Xd(`${t} rejected with ${r}`)});if(!Xn(e)&&e!==null)throw Xd(n);return e}function SH(e,t,n,r){const{beforeSend:i,beforeSendTransaction:o,ignoreSpans:s}=t,a=!jd(t.beforeSendSpan)&&t.beforeSendSpan;let l=n;if(eh(l)&&i)return i(l,r);if(H4(l)){if(a||s){const c=gH(l);if(s?.length&&fc({description:c.description,op:c.op,attributes:c.data},s))return null;if(a){const u=a(c);u?l=rc(n,yH(u)):Fd()}if(l.spans){const u=[],d=l.spans;for(const p of d){if(s?.length&&fc({description:p.description,op:p.op,attributes:p.data},s)){Cq(d,p);continue}if(a){const m=a(p);m?u.push(m):(Fd(),u.push(p))}else u.push(p)}const f=l.spans.length-u.length;f&&e.recordDroppedEvent("before_send","span",f),l.spans=u}}if(o){if(l.spans){const c=l.spans.length;l.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:c}}return o(l,r)}}return l}function eh(e){return e.type===void 0}function H4(e){return e.type==="transaction"}function EH(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+V4(e.attributes)}function TH(e){let t=0;return e.message&&(t+=e.message.length*2),t+V4(e.attributes)}function V4(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*W4(n[0]):Fi(n)?t+=W4(n):t+=100}),t}function W4(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function wH(e){return Di(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function G4(e){return wH(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}function IH(e,t){t.debug===!0&&(Ee?B.enable():Or(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Ke().update(t.initialScope);const r=new e(t);return Y4(r),r.init(),r}function Y4(e){Ke().setClient(e)}const th=100,nh=5e3,AH=36e5;function xH(e){function t(...n){Ee&&B.log("[Offline]:",...n)}return n=>{const r=e(n);if(!n.createStore)throw new Error("No `createStore` function was provided");const i=n.createStore(n);let o=nh,s;function a(d,f,p){return O_(d,["client_report"])?!1:n.shouldStore?n.shouldStore(d,f,p):!0}function l(d){s&&clearTimeout(s),s=Kd(setTimeout(async()=>{s=void 0;const f=await i.shift();f&&(t("Attempting to send previously queued event"),f[0].sent_at=new Date().toISOString(),u(f,!0).catch(p=>{t("Failed to retry sending",p)}))},d))}function c(){s||(l(o),o=Math.min(o*2,AH))}async function u(d,f=!1){if(!f&&O_(d,["replay_event","replay_recording"]))return await i.push(d),l(th),{};try{if(n.shouldSend&&await n.shouldSend(d)===!1)throw new Error("Envelope not sent because `shouldSend` callback returned false");const p=await r.send(d);let m=th;if(p){if(p.headers?.["retry-after"])m=k4(p.headers["retry-after"]);else if(p.headers?.["x-sentry-rate-limits"])m=6e4;else if((p.statusCode||0)>=400)return p}return l(m),o=nh,p}catch(p){if(await a(d,p,o))return f?await i.unshift(d):await i.push(d),c(),t("Error sending. Event queued.",p),{};throw p}}return n.flushAtStartup&&c(),{send:u,flush:d=>(d===void 0&&(o=nh,l(th)),r.flush(d))}}}const Jd="MULTIPLEXED_TRANSPORT_EXTRA_KEY";function K4(e,t){let n;return ls(e,(r,i)=>(t.includes(i)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}function CH(e,t){return n=>{const r=e(n);return{...r,send:async i=>{const o=K4(i,["event","transaction","profile","replay_event"]);return o&&(o.release=t),r.send(i)}}}}function kH(e,t){return vr(t?{...e[0],dsn:t}:e[0],e[1])}function NH(e,t){return n=>{const r=e(n),i=new Map,o=t||(c=>{const u=c.getEvent();return u?.extra?.[Jd]&&Array.isArray(u.extra[Jd])?u.extra[Jd]:[]});function s(c,u){const d=u?`${c}:${u}`:c;let f=i.get(d);if(!f){const p=
|
|
38
|
+
`)}`)}function ez(e){if(!Ee)return;const{description:t="< unknown name >",op:n="< unknown op >"}=Je(e),{spanId:r}=e.spanContext(),o=zt(e)===e,s=`[Tracing] Finishing "${n}" ${o?"root ":""}span "${t}" with ID ${r}`;B.log(s)}function J9(e,t,n,r=Ht()){const i=r&&zt(r);i&&(Ee&&B.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),i.addEvent(e,{[sc]:t,[oc]:n}))}function Z9(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},i=r[oc],o=r[sc];typeof i=="string"&&typeof o=="number"&&(t[n.name]={value:o,unit:i})}),t}function Vi(e){return e.getOptions().traceLifecycle==="stream"}const Q9=1e3;class Hd{constructor(t={}){this._traceId=t.traceId||ii(),this._spanId=t.spanId||qi(),this._startTime=t.startTimestamp||Ct(),this._links=t.links,this._attributes={},this.setAttributes({[it]:"manual",[yt]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}addLink(t){return this._links?this._links.push(t):this._links=[t],this}addLinks(t){return this._links?this._links.push(...t):this._links=t,this}recordException(t,n){}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?Md:A9}}setAttribute(t,n){return n===void 0?delete this._attributes[t]:this._attributes[t]=n,this}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._startTime=zi(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(Jt,"custom"),this}end(t){this._endTime||(this._endTime=zi(t),ez(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[yt],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:D9(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[it],profile_id:this._attributes[x_],exclusive_time:this._attributes[vo],measurements:Z9(this._events),is_segment:this._isStandaloneSpan&&zt(this)===this||void 0,segment_id:this._isStandaloneSpan?zt(this).spanContext().spanId:void 0,links:N9(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===zt(this),status:F9(this._status),attributes:this._attributes,links:R9(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){Ee&&B.log("[Tracing] Adding an event to span:",t);const i=e4(n)?n:r||Ct(),o=e4(n)?{}:n||{},s={name:t,time:zi(i),attributes:o};return this._events.push(s),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=Ie();if(t&&(t.emit("spanEnd",this),this._isStandaloneSpan||t.emit("afterSpanEnd",this)),!(this._isStandaloneSpan||this===zt(this)))return;if(this._isStandaloneSpan){this._sampled?nz(Zq([this],t)):(Ee&&B.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}else if(t&&Vi(t)){t.emit("afterSegmentSpanEnd",this);return}const r=this._convertSpanToTransaction();r&&(uc(this).scope||Ke()).captureEvent(r)}_convertSpanToTransaction(){if(!t4(Je(this)))return;this._name||(Ee&&B.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=uc(this),r=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;const o=dc(this).filter(u=>u!==this&&!tz(u)).map(u=>Je(u)).filter(t4),s=this._attributes[Jt];delete this._attributes[ac],o.forEach(u=>{delete u.data[ac]});const a={contexts:{trace:Eq(this)},spans:o.length>Q9?o.sort((u,d)=>u.start_timestamp-d.start_timestamp).slice(0,Q9):o,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:br(this)},request:r,...s&&{transaction_info:{source:s}}},l=Z9(this._events);return l&&Object.keys(l).length&&(Ee&&B.log("[Measurements] Adding measurements to transaction event",JSON.stringify(l,void 0,2)),a.measurements=l),a}}function e4(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function t4(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function tz(e){return e instanceof Hd&&e.isStandaloneSpan()}function nz(e){const t=Ie();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function P_(e,t,n=()=>{},r=()=>{}){let i;try{i=e()}catch(o){throw t(o),n(),o}return rz(i,t,n,r)}function rz(e,t,n,r){return ts(e)?a9(e,i=>{n(),r(i)},i=>{t(i),n()}):(n(),r(e),e)}function iz(e,t,n){if(!or(e))return[!1];let r,i;typeof e.tracesSampler=="function"?(i=e.tracesSampler({...t,inheritOrSampleWith:a=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):a}),r=!0):t.parentSampled!==void 0?i=t.parentSampled:typeof e.tracesSampleRate<"u"&&(i=e.tracesSampleRate,r=!0);const o=ss(i);if(o===void 0)return Ee&&B.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(i)} of type ${JSON.stringify(typeof i)}.`),[!1];if(!o)return Ee&&B.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,o,r];const s=n<o;return s||Ee&&B.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(i)})`),[s,o,r]}const M_="__SENTRY_SUPPRESS_TRACING__";function ai(e,t){const n=na();if(n.startSpan)return n.startSpan(e,t);const r=D_(e),{forceTransaction:i,parentSpan:o,scope:s}=e,a=s?.clone();return yr(a,()=>o4(o)(()=>{const c=Ke(),u=F_(c,o),d=Ie(),f=e.onlyIfParent&&!u,p=f?new sr:L_({parentSpan:u,spanArguments:r,forceTransaction:i,scope:c});return f&&d?.recordDroppedEvent("no_parent_span","span"),(!s4(p)||!u)&&oi(c,p),P_(()=>t(p),()=>{const{status:m}=Je(p);p.isRecording()&&(!m||m==="ok")&&p.setStatus({code:st,message:"internal_error"})},()=>{p.end()})}))}function Wi(e,t){const n=na();if(n.startSpanManual)return n.startSpanManual(e,t);const r=D_(e),{forceTransaction:i,parentSpan:o,scope:s}=e,a=s?.clone();return yr(a,()=>o4(o)(()=>{const c=Ke(),u=F_(c,o),d=e.onlyIfParent&&!u,f=d?new sr:L_({parentSpan:u,spanArguments:r,forceTransaction:i,scope:c});return d&&Ie()?.recordDroppedEvent("no_parent_span","span"),(!s4(f)||!u)&&oi(c,f),P_(()=>t(f,()=>f.end()),()=>{const{status:p}=Je(f);f.isRecording()&&(!p||p==="ok")&&f.setStatus({code:st,message:"internal_error"})})}))}function li(e){const t=na();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=D_(e),{forceTransaction:r,parentSpan:i}=e;return(e.scope?s=>yr(e.scope,s):i!==void 0?s=>mc(i,s):s=>s())(()=>{const s=Ke(),a=F_(s,i),l=Ie();return e.onlyIfParent&&!a?(l?.recordDroppedEvent("no_parent_span","span"),new sr):L_({parentSpan:a,spanArguments:n,forceTransaction:r,scope:s})})}const oz=(e,t)=>{const n=Mi(),r=bo(n);if(r.continueTrace)return r.continueTrace(e,t);const{sentryTrace:i,baggage:o}=e,s=Ie(),a=C_(o);return s&&!Sq(s,a?.org_id)?r4(t):yr(l=>{const c=T9(i,o);return l.setPropagationContext(c),oi(l,void 0),t()})};function mc(e,t){const n=na();return n.withActiveSpan?n.withActiveSpan(e,t):yr(r=>(oi(r,e||void 0),t(r)))}function n4(e){const t=na();return t.suppressTracing?t.suppressTracing(e):yr(n=>{n.setSDKProcessingMetadata({[M_]:!0});const r=e();return n.setSDKProcessingMetadata({[M_]:void 0}),r})}function r4(e){const t=na();return t.startNewTrace?t.startNewTrace(e):yr(n=>(n.setPropagationContext({traceId:ii(),sampleRand:Bi()}),Ee&&B.log(`Starting a new trace with id ${n.getPropagationContext().traceId}`),mc(null,e)))}function L_({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!or()){const a=new sr;if(n||!e){const l={sampled:"false",sample_rate:"0",transaction:t.name,...br(a)};Bd(a,l)}return a}const i=Ie();if(az(i,t))return U_(r)||i?.recordDroppedEvent("ignored","span"),new sr({dropReason:"ignored",traceId:e?.spanContext().traceId??r.getPropagationContext().traceId});const o=qt();let s;if(e&&!n)s=sz(e,r,t),U9(e,s);else if(e){const a=br(e),{traceId:l,spanId:c}=e.spanContext(),u=Hi(e);s=i4({traceId:l,parentSpanId:c,...t},r,u),Bd(s,a)}else{const{traceId:a,dsc:l,parentSpanId:c,sampled:u}={...o.getPropagationContext(),...r.getPropagationContext()};s=i4({traceId:a,parentSpanId:c,...t},r,u),l&&Bd(s,l)}return Qq(s),dq(s,r,o),s}function D_(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=zi(e.startTime),delete r.startTime,r}return n}function na(){const e=Mi();return bo(e)}function i4(e,t,n){const r=Ie(),i=r?.getOptions()||{},{name:o=""}=e,s={spanAttributes:{...e.attributes},spanName:o,parentSampled:n};r?.emit("beforeSampling",s,{decision:!1});const a=s.parentSampled??n,l=s.spanAttributes,c=t.getPropagationContext(),u=U_(t),[d,f,p]=u?[!1]:iz(i,{name:o,parentSampled:a,attributes:l,parentSampleRate:ss(c.dsc?.sample_rate)},c.sampleRand),m=new Hd({...e,attributes:{[Jt]:"custom",[Od]:f!==void 0&&p?f:void 0,...l},sampled:d});return!d&&r&&!u&&(Ee&&B.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate",Vi(r)?"span":"transaction")),r&&r.emit("spanStart",m),m}function sz(e,t,n){const{spanId:r,traceId:i}=e.spanContext(),o=U_(t),s=o?!1:Hi(e),a=s?new Hd({...n,parentSpanId:r,traceId:i,sampled:s}):new sr({traceId:i});U9(e,a);const l=Ie();return l&&(Vi(l)&&a instanceof sr&&(e instanceof sr&&e.dropReason?(a.dropReason=e.dropReason,l.recordDroppedEvent(e.dropReason,"span")):o||(a.dropReason="sample_rate",l.recordDroppedEvent("sample_rate","span"))),l.emit("spanStart",a),n.endTimestamp&&(l.emit("spanEnd",a),l.emit("afterSpanEnd",a))),a}function F_(e,t){if(t)return t;if(t===null)return;const n=Qs(e);if(!n)return;const r=Ie();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?zt(n):n}function o4(e){return e!==void 0?t=>mc(e,t):t=>t()}function az(e,t){const n=e?.getOptions().ignoreSpans;return!e||!Vi(e)||!n?.length?!1:fc({description:t.name||"",op:t.attributes?.[yt]||t.op,attributes:t.attributes},n)}function s4(e){return e instanceof sr&&e.dropReason==="ignored"}function U_(e){return e.getScopeData().sdkProcessingMetadata[M_]===!0}const Vd={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},lz="heartbeatFailed",cz="idleTimeout",uz="finalTimeout",dz="externalFinish";function a4(e,t={}){const n=new Map;let r=!1,i,o=dz,s=!t.disableAutoFinish;const a=[],{idleTimeout:l=Vd.idleTimeout,finalTimeout:c=Vd.finalTimeout,childSpanTimeout:u=Vd.childSpanTimeout,beforeSpanEnd:d,trimIdleSpanEndTimestamp:f=!0}=t,p=Ie();if(!p||!or()){const w=new sr,D={sample_rate:"0",sampled:"false",...br(w)};return Bd(w,D),w}const m=Ke(),b=Ht(),g=fz(e);g.end=new Proxy(g.end,{apply(w,D,Y){if(d&&d(g),D instanceof sr)return;const[q,...P]=Y,C=q||Ct(),F=zi(C),R=dc(g).filter(te=>te!==g),G=Je(g);if(!R.length||!f)return N(F),Reflect.apply(w,D,[F,...P]);const z=p.getOptions().ignoreSpans,K=R?.reduce((te,se)=>{const _e=Je(se);return!_e.timestamp||z&&fc({description:_e.description,op:_e.op,attributes:_e.data},z)?te:te?Math.max(te,_e.timestamp):_e.timestamp},void 0),M=G.start_timestamp,oe=Math.min(M?M+c/1e3:1/0,Math.max(M||-1/0,Math.min(F,K||1/0)));return N(oe),Reflect.apply(w,D,[oe,...P])}});function _(){i&&(clearTimeout(i),i=void 0)}function y(w){_(),i=setTimeout(()=>{!r&&n.size===0&&s&&(o=cz,g.end(w))},l)}function T(w){i=setTimeout(()=>{!r&&s&&(o=lz,g.end(w))},u)}function S(w){_(),n.set(w,!0);const D=Ct();T(D+u/1e3)}function O(w){if(n.has(w)&&n.delete(w),n.size===0){const D=Ct();y(D+l/1e3)}}function N(w){r=!0,n.clear(),a.forEach(R=>R()),oi(m,b);const D=Je(g),{start_timestamp:Y}=D;if(!Y)return;D.data[ic]||g.setAttribute(ic,o);const P=D.status;(!P||P==="unknown")&&g.setStatus({code:lc}),B.log(`[Tracing] Idle span "${D.op}" finished`);const C=dc(g).filter(R=>R!==g);let F=0;C.forEach(R=>{R.isRecording()&&(R.setStatus({code:st,message:"cancelled"}),R.end(w),Ee&&B.log("[Tracing] Cancelling span since span ended early",JSON.stringify(R,void 0,2)));const G=Je(R),{timestamp:z=0,start_timestamp:K=0}=G,M=K<=w,oe=(c+l)/1e3,te=z-K<=oe;if(Ee){const se=JSON.stringify(R,void 0,2);M?te||B.log("[Tracing] Discarding span since it finished after idle span final timeout",se):B.log("[Tracing] Discarding span since it happened after idle span was finished",se)}(!te||!M)&&(Iq(g,R),F++)}),F>0&&g.setAttribute("sentry.idle_span_discarded_spans",F)}return a.push(p.on("spanStart",w=>{if(r||w===g||Je(w).timestamp||w instanceof Hd&&w.isStandaloneSpan())return;dc(g).includes(w)&&S(w.spanContext().spanId)})),a.push(p.on("spanEnd",w=>{r||O(w.spanContext().spanId)})),a.push(p.on("idleSpanEnableAutoFinish",w=>{w===g&&(s=!0,y(),n.size&&T())})),t.disableAutoFinish||y(),setTimeout(()=>{r||(g.setStatus({code:st,message:"deadline_exceeded"}),o=uz,g.end())},c),g}function fz(e){const t=li(e);return oi(Ke(),t),Ee&&B.log("[Tracing] Started span is an idle span"),t}function pz(e,t){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=t;mz(e,t),r&&gz(e,r),yz(e,n),_z(e,i),hz(e,o)}function l4(e,t){const{extra:n,tags:r,attributes:i,user:o,contexts:s,level:a,sdkProcessingMetadata:l,breadcrumbs:c,fingerprint:u,eventProcessors:d,attachments:f,propagationContext:p,transactionName:m,span:b}=t;_c(e,"extra",n),_c(e,"tags",r),_c(e,"attributes",i),_c(e,"user",o),_c(e,"contexts",s),e.sdkProcessingMetadata=rc(e.sdkProcessingMetadata,l,2),a&&(e.level=a),m&&(e.transactionName=m),b&&(e.span=b),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...p}}function _c(e,t,n){e[t]=rc(e[t],n,1)}function hc(e,t){const n=os().getScopeData();return e&&l4(n,e.getScopeData()),t&&l4(n,t.getScopeData()),n}function mz(e,t){const{extra:n,tags:r,user:i,contexts:o,level:s,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(i).length&&(e.user={...i,...e.user}),Object.keys(o).length&&(e.contexts={...o,...e.contexts}),s&&(e.level=s),a&&e.type!=="transaction"&&(e.transaction=a)}function _z(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function hz(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function gz(e,t){e.contexts={trace:C9(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:br(t),...e.sdkProcessingMetadata};const n=zt(t),r=Je(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function yz(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}function bz(e,t){const n=Ld(e),r=Dd(e),i=Ld(r),{isolationScope:o,scope:s}=uc(e),a=hc(o,s);vz(n,i,t,a);const l=e.kind;Tz(n,l),n.is_segment&&t.emit("processSegmentSpan",n),t.emit("processSpan",n);const{beforeSendSpan:c}=t.getOptions(),u=c&&jd(c)?$z(n,c):n,d=u.attributes?.[Jt];return d&&$r(u,{"sentry.span.source":d}),{...wq(u),_segmentSpan:r}}function vz(e,t,n,r){const i=n.getSdkMetadata(),{release:o,environment:s,sendDefaultPii:a}=n.getOptions();$r(e,{[Kj]:o,[Xj]:s,[Jj]:t.name,[Zj]:t.span_id,[Qj]:i?.sdk?.name,[eq]:i?.sdk?.version,...a?{[tq]:r.user?.id,[nq]:r.user?.email,[rq]:r.user?.ip_address,[iq]:r.user?.username}:{},...r.attributes})}function $z(e,t){const n=t(e);return n||(Fd(),e)}function $r(e,t){const n=e.attributes??(e.attributes={});Object.entries(t).forEach(([r,i])=>{i!=null&&!(r in n)&&(n[r]=i)})}const Sz=1,Ez=2;function Tz(e,t){const n=e.attributes;if(!n)return;const r=n["http.request.method"]||n["http.method"];if(r){wz(e,n,t,r);return}const i=n["db.system.name"]||n["db.system"],o=typeof n[yt]=="string"&&`${n[yt]}`.startsWith("cache.");if(i&&!o){Iz(e,n);return}if(n["rpc.service"]){$r(e,{[yt]:"rpc"});return}if(n["messaging.system"]){$r(e,{[yt]:"message"});return}const s=n["faas.trigger"];s&&$r(e,{[yt]:`${s}`})}function wz(e,t,n,r){const i=["http"];n===Ez?i.push("client"):n===Sz&&i.push("server"),t["sentry.http.prefetch"]&&i.push("prefetch"),$r(e,{[yt]:i.join(".")});const o=t[ac];if(typeof o=="string"){e.name=o;return}if(t[Jt]==="custom")return;const s=t["http.route"];typeof s=="string"?(e.name=`${r} ${s}`,$r(e,{[Jt]:"route"})):$r(e,{[Jt]:"url"})}function Iz(e,t){$r(e,{[yt]:"db"});const n=t[ac];if(typeof n=="string"){e.name=n;return}if(t[Jt]==="custom")return;const r=t["db.statement"];r&&(e.name=`${r}`,$r(e,{[Jt]:"task"}))}const B_=0,c4=1,u4=2;function gc(e){return new yc(t=>{t(e)})}function j_(e){return new yc((t,n)=>{n(e)})}class yc{constructor(t){this._state=B_,this._handlers=[],this._runExecutor(t)}then(t,n){return new yc((r,i)=>{this._handlers.push([!1,o=>{if(!t)r(o);else try{r(t(o))}catch(s){i(s)}},o=>{if(!n)i(o);else try{r(n(o))}catch(s){i(s)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new yc((n,r)=>{let i,o;return this.then(s=>{o=!1,i=s,t&&t()},s=>{o=!0,i=s,t&&t()}).then(()=>{if(o){r(i);return}n(i)})})}_executeHandlers(){if(this._state===B_)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===c4&&n[1](this._value),this._state===u4&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(o,s)=>{if(this._state===B_){if(ts(s)){s.then(r,i);return}this._state=o,this._value=s,this._executeHandlers()}},r=o=>{n(c4,o)},i=o=>{n(u4,o)};try{t(r,i)}catch(o){i(o)}}}function Az(e,t,n,r=0){try{const i=q_(t,n,e,r);return ts(i)?i:gc(i)}catch(i){return j_(i)}}function q_(e,t,n,r){const i=n[r];if(!e||!i)return e;const o=i({...e},t);return Ee&&o===null&&B.log(`Event processor "${i.id||"?"}" dropped event`),ts(o)?o.then(s=>q_(s,t,n,r+1)):q_(o,t,n,r+1)}let cs,d4,f4,$o;function p4(e){const t=je._sentryDebugIds,n=je._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],i=n?Object.keys(n):[];if($o&&r.length===d4&&i.length===f4)return $o;d4=r.length,f4=i.length,$o={},cs||(cs={});const o=(s,a)=>{for(const l of s){const c=a[l],u=cs?.[l];if(u&&$o&&c)$o[u[0]]=c,cs&&(cs[l]=[u[0],c]);else if(c){const d=e(l);for(let f=d.length-1;f>=0;f--){const m=d[f]?.filename;if(m&&$o&&cs){$o[m]=c,cs[l]=[m,c];break}}}}};return t&&o(r,t),n&&o(i,n),$o}function xz(e,t){const n=p4(e);if(!n)return[];const r=[];for(const i of t){const o=yj(i);o&&n[o]&&r.push({type:"sourcemap",code_file:i,debug_id:n[o]})}return r}function m4(e,t,n,r,i,o){const{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,l={...t,event_id:t.event_id||n.event_id||ln(),timestamp:t.timestamp||is()},c=n.integrations||e.integrations.map(_=>_.name);Cz(l,e),Rz(l,c),i&&i.emit("applyFrameMetadata",t),t.type===void 0&&kz(l,e.stackParser);const u=Pz(r,n.captureContext);n.mechanism&&ji(l,n.mechanism);const d=i?i.getEventProcessors():[],f=hc(o,u),p=[...n.attachments||[],...f.attachments];p.length&&(n.attachments=p),pz(l,f);const m=[...d,...f.eventProcessors];return(n.data&&n.data.__sentry__===!0?gc(l):Az(m,l,n)).then(_=>(_&&Nz(_),typeof s=="number"&&s>0?Oz(_,s,a):_))}function Cz(e,t){const{environment:n,release:r,dist:i,maxValueLength:o}=t;e.environment=e.environment||n||Ud,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i);const s=e.request;s?.url&&o&&(s.url=tc(s.url,o)),o&&e.exception?.values?.forEach(a=>{a.value&&(a.value=tc(a.value,o))})}function kz(e,t){const n=p4(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(i=>{i.filename&&(i.debug_id=n[i.filename])})})}function Nz(e){const t={};if(e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(i=>{i.debug_id&&(i.abs_path?t[i.abs_path]=i.debug_id:i.filename&&(t[i.filename]=i.debug_id),delete i.debug_id)})}),Object.keys(t).length===0)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(([r,i])=>{n.push({type:"sourcemap",code_file:r,debug_id:i})})}function Rz(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Oz(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:En(i.data,t,n)}}))},...e.user&&{user:En(e.user,t,n)},...e.contexts&&{contexts:En(e.contexts,t,n)},...e.extra&&{extra:En(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=En(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(i=>({...i,...i.data&&{data:En(i.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=En(e.contexts.flags,3,n)),r}function Pz(e,t){if(!t)return e;const n=e?e.clone():new Lr;return n.update(t),n}function Mz(e){if(e)return Lz(e)?{captureContext:e}:Fz(e)?{captureContext:e}:e}function Lz(e){return e instanceof Lr||typeof e=="function"}const Dz=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Fz(e){return Object.keys(e).some(t=>Dz.includes(t))}function It(e,t){return Ke().captureException(e,Mz(t))}function _4(e,t){const n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return Ke().captureMessage(e,n,r)}function ra(e,t){return Ke().captureEvent(e,t)}function h4(e,t){qt().setContext(e,t)}function Uz(e){qt().setExtras(e)}function Bz(e,t){qt().setExtra(e,t)}function jz(e){qt().setTags(e)}function qz(e,t){qt().setTag(e,t)}function zz(e){qt().setUser(e)}function Hz(e){qt().setConversationId(e)}function g4(){return qt().lastEventId()}async function Vz(e){const t=Ie();return t?t.flush(e):(Ee&&B.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}async function Wz(e){const t=Ie();return t?t.close(e):(Ee&&B.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))}function Gz(){return!!Ie()}function y4(){const e=Ie();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function b4(e){qt().addEventProcessor(e)}function z_(e){const t=qt(),{user:n}=hc(t,Ke()),{userAgent:r}=je.navigator||{},i=Pj({user:n,...r&&{userAgent:r},...e}),o=t.getSession();return o?.status==="ok"&&Zs(o,{status:"exited"}),H_(),t.setSession(i),i}function H_(){const e=qt(),n=Ke().getSession()||e.getSession();n&&Mj(n),v4(),e.setSession()}function v4(){const e=qt(),t=Ie(),n=e.getSession();n&&t&&t.captureSession(n)}function Wd(e=!1){if(e){H_();return}v4()}const Yz="7";function $4(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function Kz(e){return`${$4(e)}${e.projectId}/envelope/`}function Xz(e,t){const n={sentry_version:Yz};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function S4(e,t,n){return t||`${Kz(e)}?${Xz(e,n)}`}function Jz(e,t){const n=S9(e);if(!n)return"";const r=`${$4(n)}embed/error-page/`;let i=`dsn=${si(n)}`;for(const o in t)if(o!=="dsn"&&o!=="onClose")if(o==="user"){const s=t.user;if(!s)continue;s.name&&(i+=`&name=${encodeURIComponent(s.name)}`),s.email&&(i+=`&email=${encodeURIComponent(s.email)}`)}else i+=`&${encodeURIComponent(o)}=${encodeURIComponent(t[o])}`;return`${r}?${i}`}const E4=[];function Zz(e){const t={};return e.forEach(n=>{const{name:r}=n,i=t[r];i&&!i.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function Qz(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(i=>{i.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const i=n(t);r=Array.isArray(i)?i:[i]}else r=t;return Zz(r)}function eH(e,t){const n={};return t.forEach(r=>{r?.beforeSetup&&r.beforeSetup(e)}),t.forEach(r=>{r&&w4(e,r,n)}),n}function T4(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function w4(e,t,n){if(n[t.name]){Ee&&B.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!E4.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),E4.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(i,o)=>r(i,o,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),i=Object.assign((o,s)=>r(o,s,e),{id:t.name});e.addEventProcessor(i)}["processSpan","processSegmentSpan"].forEach(r=>{const i=t[r];typeof i=="function"&&e.on(r,o=>i.call(t,o,e))}),Ee&&B.log(`Integration installed: ${t.name}`)}function V_(e){const t=Ie();if(!t){Ee&&B.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function uve(e){return e}const tH="sentry.timestamp.sequence";let W_=0,G_;function I4(e){const t=Math.floor(e*1e3);G_!==void 0&&t!==G_&&(W_=0);const n=W_;return W_++,G_=t,{key:tH,value:{value:n,type:"integer"}}}function A4(e,t){return t?yr(t,()=>{const n=Ht(),r=n?C9(n):d9(t);return[n?br(n):N_(e,t),r]}):[void 0,void 0]}const nH={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function rH(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function iH(e,t,n,r){const i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(i.dsn=si(r)),vr(i,[rH(e)])}const oH=100;function ci(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}function sH(e,t){const n=Y_(),r=x4(e);r===void 0?n.set(e,[t]):r.length>=oH?(Yd(e,r),n.set(e,[t])):n.set(e,[...r,t])}function Gd(e,t=Ke(),n=sH){const r=t?.getClient()??Ie();if(!r){Ee&&B.warn("No client available to capture log.");return}const{release:i,environment:o,enableLogs:s=!1,beforeSendLog:a}=r.getOptions();if(!s){Ee&&B.warn("logging option not enabled, log will not be captured.");return}const[,l]=A4(r,t),c={...e.attributes},{user:{id:u,email:d,username:f},attributes:p={}}=hc(qt(),t);ci(c,"user.id",u,!1),ci(c,"user.email",d,!1),ci(c,"user.name",f,!1),ci(c,"sentry.release",i),ci(c,"sentry.environment",o);const{name:m,version:b}=r.getSdkMetadata()?.sdk??{};ci(c,"sentry.sdk.name",m),ci(c,"sentry.sdk.version",b);const g=r.getIntegrationByName("Replay"),_=g?.getReplayId(!0);ci(c,"sentry.replay_id",_),_&&g?.getRecordingMode()==="buffer"&&ci(c,"sentry._internal.replay_is_buffering",!0);const y=e.message;if(kd(y)){const{__sentry_template_string__:F,__sentry_template_values__:R=[]}=y;R?.length&&(c["sentry.message.template"]=F),R.forEach((G,z)=>{c[`sentry.message.parameter.${z}`]=G})}const T=Qs(t);ci(c,"sentry.trace.parent_span_id",T?.spanContext().spanId);const S={...e,attributes:c};r.emit("beforeCaptureLog",S);const O=a?Or(()=>a(S)):S;if(!O){r.recordDroppedEvent("before_send","log_item",1),Ee&&B.warn("beforeSendLog returned null, log will not be captured.");return}const{level:N,message:w,attributes:D={},severityNumber:Y}=O,q=Ct(),P=I4(q),C={timestamp:q,level:N,body:w,trace_id:l?.trace_id,severity_number:Y??nH[N],attributes:{...ta(p),...ta(D,!0),[P.key]:P.value}};n(r,C),r.emit("afterCaptureLog",O)}function Yd(e,t){const n=t??x4(e)??[];if(n.length===0)return;const r=e.getOptions(),i=iH(n,r._metadata,r.tunnel,e.getDsn());Y_().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(i)}function x4(e){return Y_().get(e)}function Y_(){return Ks("clientToLogBufferMap",()=>new WeakMap)}function aH(e){return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{items:e}]}function lH(e,t,n,r){const i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(i.dsn=si(r)),vr(i,[aH(e)])}const cH=1e3;function Gi(e,t,n,r=!0){n&&(r||!(t in e))&&(e[t]=n)}function uH(e,t){const n=X_(),r=C4(e);r===void 0?n.set(e,[t]):r.length>=cH?(K_(e,r),n.set(e,[t])):n.set(e,[...r,t])}function dH(e,t,n){const{release:r,environment:i}=t.getOptions(),o={...e.attributes};Gi(o,"user.id",n.id,!1),Gi(o,"user.email",n.email,!1),Gi(o,"user.name",n.username,!1),Gi(o,"sentry.release",r),Gi(o,"sentry.environment",i);const{name:s,version:a}=t.getSdkMetadata()?.sdk??{};Gi(o,"sentry.sdk.name",s),Gi(o,"sentry.sdk.version",a);const l=t.getIntegrationByName("Replay"),c=l?.getReplayId(!0);return Gi(o,"sentry.replay_id",c),c&&l?.getRecordingMode()==="buffer"&&Gi(o,"sentry._internal.replay_is_buffering",!0),{...e,attributes:o}}function fH(e,t,n,r){const[,i]=A4(t,n),o=Qs(n),s=o?o.spanContext().traceId:i?.trace_id,a=o?o.spanContext().spanId:void 0,l=Ct(),c=I4(l);return{timestamp:l,trace_id:s??"",span_id:a,name:e.name,type:e.type,unit:e.unit,value:e.value,attributes:{...ta(r),...ta(e.attributes,"skip-undefined"),[c.key]:c.value}}}function pH(e,t){const n=t?.scope??Ke(),r=t?.captureSerializedMetric??uH,i=n?.getClient()??Ie();if(!i){Ee&&B.warn("No client available to capture metric.");return}const{_experiments:o,enableMetrics:s,beforeSendMetric:a}=i.getOptions();if(!(s??o?.enableMetrics??!0)){Ee&&B.warn("metrics option not enabled, metric will not be captured.");return}const{user:c,attributes:u}=hc(qt(),n),d=dH(e,i,c);i.emit("processMetric",d);const f=a||o?.beforeSendMetric,p=f?f(d):d;if(!p){Ee&&B.log("`beforeSendMetric` returned `null`, will not send metric.");return}const m=fH(p,i,n,u);Ee&&B.log("[Metric]",m),r(i,m),i.emit("afterCaptureMetric",p)}function K_(e,t){const n=t??C4(e)??[];if(n.length===0)return;const r=e.getOptions(),i=lH(n,r._metadata,r.tunnel,e.getDsn());X_().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(i)}function C4(e){return X_().get(e)}function X_(){return Ks("clientToMetricBufferMap",()=>new WeakMap)}function Kd(e){return typeof e=="object"&&typeof e.unref=="function"&&e.unref(),e}const J_=Symbol.for("SentryBufferFullError");function Z_(e=100){const t=new Set;function n(){return t.size<e}function r(s){t.delete(s)}function i(s){if(!n())return j_(J_);const a=s();return t.add(a),a.then(()=>r(a),()=>r(a)),a}function o(s){if(!t.size)return gc(!0);const a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!s)return a;const l=[a,new Promise(c=>Kd(setTimeout(()=>c(!1),s)))];return Promise.race(l)}return{get $(){return Array.from(t)},add:i,drain:o}}const mH=60*1e3;function k4(e,t=ec()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?mH:r-t}function _H(e,t){return e[t]||e.all||0}function N4(e,t,n=ec()){return _H(e,t)>n}function R4(e,{statusCode:t,headers:n},r=ec()){const i={...e},o=n?.["x-sentry-rate-limits"],s=n?.["retry-after"];if(o)for(const a of o.trim().split(",")){const[l,c,,,u]=a.split(":",5),d=parseInt(l,10),f=(isNaN(d)?60:d)*1e3;if(!c)i.all=r+f;else for(const p of c.split(";"))p==="metric_bucket"?(!u||u.split(";").includes("custom"))&&(i[p]=r+f):i[p]=r+f}else s?i.all=r+k4(s,r):t===429&&(i.all=r+60*1e3);return i}const O4=64;function P4(e,t,n=Z_(e.bufferSize||O4)){let r={};const i=s=>n.drain(s);function o(s){const a=[];if(ls(s,(d,f)=>{const p=K9(f);N4(r,p)?e.recordDroppedEvent("ratelimit_backoff",p):a.push(d)}),a.length===0)return Promise.resolve({});const l=vr(s[0],a),c=d=>{if(O_(l,["client_report"])){Ee&&B.warn(`Dropping client report. Will not send outcomes (reason: ${d}).`);return}ls(l,(f,p)=>{e.recordDroppedEvent(d,K9(p))})},u=()=>t({body:zd(l)}).then(d=>d.statusCode===413?(Ee&&B.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),c("send_error"),d):(Ee&&d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&B.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=R4(r,d),d),d=>{throw c("network_error"),Ee&&B.error("Encountered error running transport request:",d),d});return n.add(u).then(d=>d,d=>{if(d===J_)return Ee&&B.error("Skipped sending event because buffer is full."),c("queue_overflow"),Promise.resolve({});throw d})}return{send:o,flush:i}}function hH(e,t,n){const r=[{type:"client_report"},{timestamp:is(),discarded_events:e}];return vr(t?{dsn:t}:{},[r])}function M4(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}function gH(e){const{trace_id:t,parent_span_id:n,span_id:r,status:i,origin:o,data:s,op:a}=e.contexts?.trace??{};return{data:s??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:i,timestamp:e.timestamp,trace_id:t??"",origin:o,profile_id:s?.[x_],exclusive_time:s?.[vo],measurements:e.measurements,is_segment:!0}}function yH(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[x_]:e.profile_id},...e.exclusive_time&&{[vo]:e.exclusive_time}}}},measurements:e.measurements}}const L4="Not capturing exception because it's already been captured.",D4="Discarded session because of missing or non-string release",F4=Symbol.for("SentryInternalError"),U4=Symbol.for("SentryDoNotSendEventError"),bH=5e3;function Xd(e){return{message:e,[F4]:!0}}function Q_(e){return{message:e,[U4]:!0}}function B4(e){return!!e&&typeof e=="object"&&F4 in e}function j4(e){return!!e&&typeof e=="object"&&U4 in e}function q4(e,t,n,r,i){let o=0,s,a=!1;e.on(n,()=>{o=0,clearTimeout(s),a=!1}),e.on(t,l=>{o+=r(l),o>=8e5?i(e):a||(a=!0,s=Kd(setTimeout(()=>{i(e)},bH)))}),e.on("flush",()=>{i(e)})}class vH{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=Z_(t.transportOptions?.bufferSize??O4),t.dsn?this._dsn=S9(t.dsn):Ee&&B.warn("No DSN provided, client will not send events."),this._dsn){const r=S4(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:r})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&q4(this,"afterCaptureLog","flushLogs",TH,Yd),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&q4(this,"afterCaptureMetric","flushMetrics",EH,K_)}captureException(t,n,r){const i=ln();if(n9(t))return Ee&&B.log(L4),i;const o={event_id:i,...n};return this._process(()=>this.eventFromException(t,o).then(s=>this._captureEvent(s,o,r)).then(s=>s),"error"),o.event_id}captureMessage(t,n,r,i){const o={event_id:ln(),...r},s=kd(t)?t:String(t),a=Fi(t),l=a?this.eventFromMessage(s,n,o):this.eventFromException(t,o);return this._process(()=>l.then(c=>this._captureEvent(c,o,i)),a?"unknown":"error"),o.event_id}captureEvent(t,n,r){const i=ln();if(n?.originalException&&n9(n.originalException))return Ee&&B.log(L4),i;const o={event_id:i,...n},s=t.sdkProcessingMetadata||{},a=s.capturedSpanScope,l=s.capturedSpanIsolationScope,c=z4(t.type);return this._process(()=>this._captureEvent(t,o,a||r,l),c),o.event_id}captureSession(t){this.sendSession(t),Zs(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(t){const n=this._transport;if(!n)return!0;this.emit("flush");const r=await this._isClientDoneProcessing(t),i=await n.flush(t);return r&&i}async close(t){Yd(this);const n=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),n}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];!n&&t.beforeSetup&&t.beforeSetup(this),w4(this,t,this._integrations),n||T4(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=Jq(t,this._dsn,this._options._metadata,this._options.tunnel);for(const i of n.attachments||[])r=qq(r,Gq(i));this.sendEnvelope(r).then(i=>this.emit("afterSendEvent",t,i))}sendSession(t){const{release:n,environment:r=Ud}=this._options;if("aggregates"in t){const o=t.attrs||{};if(!o.release&&!n){Ee&&B.warn(D4);return}o.release=o.release||n,o.environment=o.environment||r,t.attrs=o}else{if(!t.release&&!n){Ee&&B.warn(D4);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const i=Xq(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(i)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const i=`${t}:${n}`;Ee&&B.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+r}}on(t,n){const r=this._hooks[t]=this._hooks[t]||new Set,i=(...o)=>n(...o);return r.add(i),()=>{r.delete(i)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(i=>i(...n))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(n){return Ee&&B.error("Error while sending envelope:",n),{}}return Ee&&B.error("Transport disabled"),{}}registerCleanup(t){}dispose(){}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=eH(this,t),T4(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",i=!1;const o=n.exception?.values;if(o){i=!0,r=!1;for(const l of o)if(l.mechanism?.handled===!1){r=!0;break}}const s=t.status==="ok";(s&&t.errors===0||s&&r)&&(Zs(t,{...r&&{status:"crashed"},errors:t.errors||Number(i||r)}),this.captureSession(t))}async _isClientDoneProcessing(t){let n=0;for(;!t||n<t;){if(await new Promise(r=>setTimeout(r,1)),!this._numProcessing)return!0;n++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,i){const o=this.getOptions(),s=Object.keys(this._integrations);return!n.integrations&&s?.length&&(n.integrations=s),this.emit("preprocessEvent",t,n),t.type||i.setLastEventId(t.event_id||n.event_id),m4(o,t,n,r,this,i).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:{...a.contexts?.trace,...d9(r)},...a.contexts};const l=N_(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:l,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=Ke(),i=qt()){return Ee&&eh(t)&&B.log(`Captured error event \`${M4(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,i).then(o=>o.event_id,o=>{Ee&&(j4(o)?B.log(o.message):B4(o)?B.warn(o.message):B.warn(o))})}_processEvent(t,n,r,i){const o=this.getOptions(),{sampleRate:s}=o,a=H4(t),l=eh(t),u=`before send for type \`${t.type||"error"}\``,d=typeof s>"u"?void 0:ss(s);if(l&&typeof d=="number"&&Bi()>d)return this.recordDroppedEvent("sample_rate","error"),j_(Q_(`Discarding event because it's not included in the random sample (sampling rate = ${s})`));const f=z4(t.type);return this._prepareEvent(t,n,r,i).then(p=>{if(p===null)throw this.recordDroppedEvent("event_processor",f),Q_("An event processor returned `null`, will not send event.");if(n.data?.__sentry__===!0)return p;const b=SH(this,o,p,n);return $H(b,u)}).then(p=>{if(p===null){if(this.recordDroppedEvent("before_send",f),a){const _=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",_)}throw Q_(`${u} returned \`null\`, will not send event.`)}const m=r.getSession()||i.getSession();if(l&&m&&this._updateSessionFromEvent(m,p),a){const g=p.sdkProcessingMetadata?.spanCountBeforeProcessing||0,_=p.spans?p.spans.length:0,y=g-_;y>0&&this.recordDroppedEvent("before_send","span",y)}const b=p.transaction_info;if(a&&b&&p.transaction!==t.transaction){const g="custom";p.transaction_info={...b,source:g}}return this.sendEvent(p,n),p}).then(null,p=>{throw j4(p)||B4(p)?p:(this.captureException(p,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:p}),Xd(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
39
|
+
Reason: ${p}`))})}_process(t,n){this._numProcessing++,this._promiseBuffer.add(t).then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r===J_&&this.recordDroppedEvent("queue_overflow",n),r))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[i,o]=n.split(":");return{reason:i,category:o,quantity:r}})}_flushOutcomes(){Ee&&B.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){Ee&&B.log("No outcomes to send");return}if(!this._dsn){Ee&&B.log("No dsn provided, will not send outcomes");return}Ee&&B.log("Sending outcomes:",t);const n=hH(t,this._options.tunnel&&si(this._dsn));this.sendEnvelope(n)}}function z4(e){return e==="replay_event"?"replay":e||"error"}function $H(e,t){const n=`${t} must return \`null\` or a valid event.`;if(ts(e))return e.then(r=>{if(!Xn(r)&&r!==null)throw Xd(n);return r},r=>{throw Xd(`${t} rejected with ${r}`)});if(!Xn(e)&&e!==null)throw Xd(n);return e}function SH(e,t,n,r){const{beforeSend:i,beforeSendTransaction:o,ignoreSpans:s}=t,a=!jd(t.beforeSendSpan)&&t.beforeSendSpan;let l=n;if(eh(l)&&i)return i(l,r);if(H4(l)){if(a||s){const c=gH(l);if(s?.length&&fc({description:c.description,op:c.op,attributes:c.data},s))return null;if(a){const u=a(c);u?l=rc(n,yH(u)):Fd()}if(l.spans){const u=[],d=l.spans;for(const p of d){if(s?.length&&fc({description:p.description,op:p.op,attributes:p.data},s)){Cq(d,p);continue}if(a){const m=a(p);m?u.push(m):(Fd(),u.push(p))}else u.push(p)}const f=l.spans.length-u.length;f&&e.recordDroppedEvent("before_send","span",f),l.spans=u}}if(o){if(l.spans){const c=l.spans.length;l.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:c}}return o(l,r)}}return l}function eh(e){return e.type===void 0}function H4(e){return e.type==="transaction"}function EH(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+V4(e.attributes)}function TH(e){let t=0;return e.message&&(t+=e.message.length*2),t+V4(e.attributes)}function V4(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*W4(n[0]):Fi(n)?t+=W4(n):t+=100}),t}function W4(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function wH(e){return Di(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function G4(e){return wH(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}function IH(e,t){t.debug===!0&&(Ee?B.enable():Or(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Ke().update(t.initialScope);const r=new e(t);return Y4(r),r.init(),r}function Y4(e){Ke().setClient(e)}const th=100,nh=5e3,AH=36e5;function xH(e){function t(...n){Ee&&B.log("[Offline]:",...n)}return n=>{const r=e(n);if(!n.createStore)throw new Error("No `createStore` function was provided");const i=n.createStore(n);let o=nh,s;function a(d,f,p){return O_(d,["client_report"])?!1:n.shouldStore?n.shouldStore(d,f,p):!0}function l(d){s&&clearTimeout(s),s=Kd(setTimeout(async()=>{s=void 0;const f=await i.shift();f&&(t("Attempting to send previously queued event"),f[0].sent_at=new Date().toISOString(),u(f,!0).catch(p=>{t("Failed to retry sending",p)}))},d))}function c(){s||(l(o),o=Math.min(o*2,AH))}async function u(d,f=!1){if(!f&&O_(d,["replay_event","replay_recording"]))return await i.push(d),l(th),{};try{if(n.shouldSend&&await n.shouldSend(d)===!1)throw new Error("Envelope not sent because `shouldSend` callback returned false");const p=await r.send(d);let m=th;if(p){if(p.headers?.["retry-after"])m=k4(p.headers["retry-after"]);else if(p.headers?.["x-sentry-rate-limits"])m=6e4;else if((p.statusCode||0)>=400)return p}return l(m),o=nh,p}catch(p){if(await a(d,p,o))return f?await i.unshift(d):await i.push(d),c(),t("Error sending. Event queued.",p),{};throw p}}return n.flushAtStartup&&c(),{send:u,flush:d=>(d===void 0&&(o=nh,l(th)),r.flush(d))}}}const Jd="MULTIPLEXED_TRANSPORT_EXTRA_KEY";function K4(e,t){let n;return ls(e,(r,i)=>(t.includes(i)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}function CH(e,t){return n=>{const r=e(n);return{...r,send:async i=>{const o=K4(i,["event","transaction","profile","replay_event"]);return o&&(o.release=t),r.send(i)}}}}function kH(e,t){return vr(t?{...e[0],dsn:t}:e[0],e[1])}function NH(e,t){return n=>{const r=e(n),i=new Map,o=t||(c=>{const u=c.getEvent();return u?.extra?.[Jd]&&Array.isArray(u.extra[Jd])?u.extra[Jd]:[]});function s(c,u){const d=u?`${c}:${u}`:c;let f=i.get(d);if(!f){const p=b9(c);if(!p)return;const m=S4(p,n.tunnel);f=u?CH(e,u)({...n,url:m}):e({...n,url:m}),i.set(d,f)}return[c,f]}async function a(c){function u(m){const b=m?.length?m:["event"];return K4(c,b)}const d=o({envelope:c,getEvent:u}).map(m=>typeof m=="string"?s(m,void 0):s(m.dsn,m.release)).filter(m=>!!m),f=d.length?d:[["",r]];return(await Promise.all(f.map(([m,b])=>b.send(kH(c,m)))))[0]}async function l(c){const u=[...i.values(),r];return(await Promise.all(u.map(f=>f.flush(c)))).every(f=>f)}return{send:a,flush:l}}}const RH="thismessage:/";function rh(e){return"isRelative"in e}function ih(e,t){const n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=n?RH:void 0;try{if("canParse"in URL&&!URL.canParse(e,r))return;const i=new URL(e,r);return n?{isRelative:n,pathname:i.pathname,search:i.search,hash:i.hash}:i}catch{}}function OH(e){if(rh(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 X4(e){return e.split(/[?#]/,1)[0]}function So(e,t=!0){if(e.startsWith("data:")){const n=e.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",i=e.includes(";base64,"),o=e.indexOf(",");let s="";if(t&&o!==-1){const a=e.slice(o+1);s=a.length>10?`${a.slice(0,10)}... [truncated]`:a}return`data:${r}${i?",base64":""}${s?`,${s}`:""}`}return e}function J4(e,t){const n=t?.getDsn(),r=t?.getOptions().tunnel;return MH(e,n)||PH(e,r)}function PH(e,t){return t?Z4(e)===Z4(t):!1}function MH(e,t){const n=ih(e);return!n||rh(n)||!t?!1:LH(n.hostname,t.host)&&/(^|&|\?)sentry_key=/.test(n.search)}function LH(e,t){return e===t||t.length>0&&e.endsWith(`.${t}`)}function Z4(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function Q4(e,...t){const n=new String(String.raw(e,...t));return n.__sentry_template_string__=e.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),n.__sentry_template_values__=t,n}const DH=Q4;function FH(e){"aggregates"in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function e8(e,t,n=[t],r="npm"){const i=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};i.name||(i.name=`sentry.javascript.${t}`,i.packages=n.map(o=>({name:`${r}:@sentry/${o}`,version:Pi})),i.version=Pi)}function oh(e={}){const t=e.client||Ie();if(!y4()||!t)return{};const n=Mi(),r=bo(n);if(r.getTraceData)return r.getTraceData(e);const i=e.scope||Ke(),o=e.span||Ht(),s=o?k9(o):UH(i),a=o?br(o):N_(t,i),l=g9(a);if(!E9.test(s))return B.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const u={"sentry-trace":s,baggage:l};return e.propagateTraceparent&&(u.traceparent=o?Tq(o):BH(i)),u}function UH(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return w9(t,r,n)}function BH(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return I9(t,r,n)}function jH(e,t,n){let r,i,o;const s=n?.maxWait?Math.max(n.maxWait,t):0,a=n?.setTimeoutImpl||setTimeout;function l(){return c(),r=e(),r}function c(){i!==void 0&&clearTimeout(i),o!==void 0&&clearTimeout(o),i=o=void 0}function u(){return i!==void 0||o!==void 0?l():r}function d(){return i&&clearTimeout(i),i=a(l,t),s&&o===void 0&&(o=a(l,s)),r}return d.cancel=c,d.flush=u,d}const qH=100;function Dr(e,t){const n=Ie(),r=qt();if(!n)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=qH}=n.getOptions();if(o<=0)return;const a={timestamp:is(),...e},l=i?Or(()=>i(a,t)):a;l!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",l,t),r.addBreadcrumb(l,o))}let t8;const zH="FunctionToString",n8=new WeakMap,r8=(()=>({name:zH,setupOnce(){t8=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=S_(this),n=n8.has(Ie())&&t!==void 0?t:this;return t8.apply(n,e)}}catch{}},setup(e){n8.set(e,!0)}})),HH=[/^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$/],VH="EventFilters",i8=(e={})=>{let t;return{name:VH,setup(n){const r=n.getOptions();t=s8(e,r)},processEvent(n,r,i){if(!t){const o=i.getOptions();t=s8(e,o)}return WH(n,t)?null:n}}},o8=((e={})=>({...i8(e),name:"InboundFilters"}));function s8(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:HH],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function WH(e,t){if(e.type){if(e.type==="transaction"&&YH(e,t.ignoreTransactions))return Ee&&B.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
40
40
|
Event: ${rs(e)}`),!0}else{if(GH(e,t.ignoreErrors))return Ee&&B.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
41
41
|
Event: ${rs(e)}`),!0;if(ZH(e))return Ee&&B.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
42
42
|
Event: ${rs(e)}`),!0;if(KH(e,t.denyUrls))return Ee&&B.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
@@ -44,7 +44,7 @@ Event: ${rs(e)}.
|
|
|
44
44
|
Url: ${Zd(e)}`),!0;if(!XH(e,t.allowUrls))return Ee&&B.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
45
45
|
Event: ${rs(e)}.
|
|
46
46
|
Url: ${Zd(e)}`),!0}return!1}function GH(e,t){return t?.length?M4(e).some(n=>Mr(n,t)):!1}function YH(e,t){if(!t?.length)return!1;const n=e.transaction;return n?Mr(n,t):!1}function KH(e,t){if(!t?.length)return!1;const n=Zd(e);return n?Mr(n,t):!1}function XH(e,t){if(!t?.length)return!0;const n=Zd(e);return n?Mr(n,t):!0}function JH(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function Zd(e){try{const n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?JH(n):null}catch{return Ee&&B.error(`Cannot extract url for event ${rs(e)}`),null}}function ZH(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function QH(e,t,n,r,i,o){if(!i.exception?.values||!o||!Ui(o.originalException,Error))return;const s=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;s&&(i.exception.values=sh(e,t,r,o.originalException,n,i.exception.values,s,0))}function sh(e,t,n,r,i,o,s,a){if(o.length>=n+1)return o;let l=[...o];if(Ui(r[i],Error)){l8(s,a,r);const c=e(t,r[i]),u=l.length;c8(c,i,u,a),l=sh(e,t,n,r[i],i,[c,...l],c,u)}return a8(r)&&r.errors.forEach((c,u)=>{if(Ui(c,Error)){l8(s,a,r);const d=e(t,c),f=l.length;c8(d,`errors[${u}]`,f,a),l=sh(e,t,n,c,i,[d,...l],d,f)}}),l}function a8(e){return Array.isArray(e.errors)}function l8(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...a8(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function c8(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}const u8=new Map,d8=new Set;function eV(e){if(je._sentryModuleMetadata)for(const t of Object.keys(je._sentryModuleMetadata)){const n=je._sentryModuleMetadata[t];if(d8.has(t))continue;d8.add(t);const r=e(t);for(const i of r.reverse())if(i.filename){u8.set(i.filename,n);break}}}function tV(e,t){return eV(e),u8.get(t)}function f8(e,t){t.exception?.values?.forEach(n=>{n.stacktrace?.frames?.forEach(r=>{if(!r.filename||r.module_metadata)return;const i=tV(e,r.filename);i&&(r.module_metadata=i)})})}function p8(e){e.exception?.values?.forEach(t=>{t.stacktrace?.frames?.forEach(n=>{delete n.module_metadata})})}const nV=()=>({name:"ModuleMetadata",setup(e){e.on("beforeEnvelope",t=>{ls(t,(n,r)=>{if(r==="event"){const i=Array.isArray(n)?n[1]:void 0;i&&(p8(i),n[1]=i)}})}),e.on("applyFrameMetadata",t=>{if(t.type)return;const n=e.getOptions().stackParser;f8(n,t)})}});function ah(e){const t="console",n=go(t,e);return yo(t,rV),n}function rV(){"console"in je&&f_.forEach(function(e){e in je.console&&$n(je.console,e,function(t){return xd[e]=t,function(...n){gr("console",{args:n,level:e}),xd[e]?.apply(je.console,n)}})})}function Qd(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const iV="CaptureConsole",oV=((e={})=>{const t=e.levels||f_,n=e.handled??!0;return{name:iV,setup(r){"console"in je&&ah(({args:i,level:o})=>{Ie()!==r||!t.includes(o)||sV(i,o,n)})}}});function sV(e,t,n){const r=Qd(t),i=new Error,o={level:Qd(t),extra:{arguments:e}};yr(s=>{if(s.addEventProcessor(c=>(c.logger="console",ji(c,{handled:n,type:"auto.core.capture_console"}),c)),t==="assert"){if(!e[0]){const c=`Assertion failed: ${Rd(e.slice(1)," ")||"console.assert"}`;s.setExtra("arguments",e.slice(1)),s.captureMessage(c,r,{captureContext:o,syntheticException:i})}return}const a=e.find(c=>c instanceof Error);if(a){It(a,o);return}const l=Rd(e," ");s.captureMessage(l,r,{captureContext:o,syntheticException:i})})}const aV="Dedupe",m8=(()=>{let e;return{name:aV,processEvent(t){if(t.type)return t;try{if(lV(t,e))return Ee&&B.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}});function lV(e,t){return t?!!(cV(e,t)||uV(e,t)):!1}function cV(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!h8(e,t)||!_8(e,t))}function uV(e,t){const n=g8(t),r=g8(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!h8(e,t)||!_8(e,t))}function _8(e,t){let n=h_(e),r=h_(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let i=0;i<r.length;i++){const o=r[i],s=n[i];if(o.filename!==s.filename||o.lineno!==s.lineno||o.colno!==s.colno||o.function!==s.function)return!1}return!0}function h8(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function g8(e){return e.exception?.values?.[0]}const dV="ExtraErrorData",fV=((e={})=>{const{depth:t=3,captureErrorCause:n=!0}=e;return{name:dV,processEvent(r,i,o){const{maxValueLength:s}=o.getOptions();return pV(r,i,t,n,s)}}});function pV(e,t={},n,r,i){if(!t.originalException||!Di(t.originalException))return e;const o=t.originalException.name||t.originalException.constructor.name,s=y8(t.originalException,r,i);if(s){const a={...e.contexts},l=En(s,n);return Xn(l)&&(Oq(l),a[o]=l),{...e,contexts:a}}return e}function y8(e,t,n){try{const r=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],i={};for(const o of Object.keys(e)){if(r.indexOf(o)!==-1)continue;const s=e[o];i[o]=Di(s)||typeof s=="string"?n?tc(`${s}`,n):`${s}`:s}if(t&&e.cause!==void 0)if(Di(e.cause)){const o=e.cause.name||e.cause.constructor.name;i.cause={[o]:y8(e.cause,!1,n)}}else i.cause=e.cause;if(typeof e.toJSON=="function"){const o=e.toJSON();for(const s of Object.keys(o)){const a=o[s];i[s]=Di(a)?a.toString():a}}return i}catch(r){Ee&&B.error("Unable to extract extra data from the Error object:",r)}return null}function mV(e,t){let n=0;for(let r=e.length-1;r>=0;r--){const i=e[r];i==="."?e.splice(r,1):i===".."?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}const _V=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function hV(e){const t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=_V.exec(t);return n?n.slice(1):[]}function b8(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const i=r>=0?e[r]:"/";i&&(t=`${i}/${t}`,n=i.charAt(0)==="/")}return t=mV(t.split("/").filter(r=>!!r),!n).join("/"),(n?"/":"")+t||"."}function v8(e){let t=0;for(;t<e.length&&e[t]==="";t++);let n=e.length-1;for(;n>=0&&e[n]==="";n--);return t>n?[]:e.slice(t,n-t+1)}function gV(e,t){e=b8(e).slice(1),t=b8(t).slice(1);const n=v8(e.split("/")),r=v8(t.split("/")),i=Math.min(n.length,r.length);let o=i;for(let a=0;a<i;a++)if(n[a]!==r[a]){o=a;break}let s=[];for(let a=o;a<n.length;a++)s.push("..");return s=s.concat(r.slice(o)),s.join("/")}function yV(e,t){return hV(e)[2]||""}const bV="RewriteFrames",vV=(e={})=>{const t=e.root,n=e.prefix||"app:///",r="window"in je&&!!je.window,i=e.iteratee||$V({isBrowser:r,root:t,prefix:n});function o(a){try{return{...a,exception:{...a.exception,values:a.exception.values.map(l=>({...l,...l.stacktrace&&{stacktrace:s(l.stacktrace)}}))}}}catch{return a}}function s(a){return{...a,frames:a?.frames?.map(l=>i(l))}}return{name:bV,processEvent(a){let l=a;return a.exception&&Array.isArray(a.exception.values)&&(l=o(l)),l}}};function $V({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;const i=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes("\\")&&!r.filename.includes("/"),o=/^\//.test(r.filename);if(e){if(t){const s=r.filename;s.indexOf(t)===0&&(r.filename=s.replace(t,n))}}else if(i||o){const s=i?r.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):r.filename,a=t?gV(t,s):yV(s);r.filename=`${n}${a}`}return r}}const SV=["reauthenticate","signInAnonymously","signInWithOAuth","signInWithIdToken","signInWithOtp","signInWithPassword","signInWithSSO","signOut","signUp","verifyOtp"],EV=["createUser","deleteUser","listUsers","getUserById","updateUserById","inviteUserByEmail"],TV={eq:"eq",neq:"neq",gt:"gt",gte:"gte",lt:"lt",lte:"lte",like:"like","like(all)":"likeAllOf","like(any)":"likeAnyOf",ilike:"ilike","ilike(all)":"ilikeAllOf","ilike(any)":"ilikeAnyOf",is:"is",in:"in",cs:"contains",cd:"containedBy",sr:"rangeGt",nxl:"rangeGte",sl:"rangeLt",nxr:"rangeLte",adj:"rangeAdjacent",ov:"overlaps",fts:"",plfts:"plain",phfts:"phrase",wfts:"websearch",not:"not"},$8=["select","insert","upsert","update","delete"];function ef(e){try{e.__SENTRY_INSTRUMENTED__=!0}catch{}}function tf(e){try{return e.__SENTRY_INSTRUMENTED__}catch{return!1}}function S8(e,t){if(Object.keys(t).length>0)return t;if(Array.isArray(e)&&e.length>0)return e}function wV(e,t){return S8(e,t)!==void 0}function IV(e,t={}){switch(e){case"GET":return"select";case"POST":return t.Prefer?.includes("resolution=")?"upsert":"insert";case"PATCH":return"update";case"DELETE":return"delete";default:return"<unknown-op>"}}function AV(e,t){if(t===""||t==="*")return"select(*)";if(e==="select")return`select(${t})`;if(e==="or"||e.endsWith(".or"))return`${e}${t}`;const[n,...r]=t.split(".");let i;return n?.startsWith("fts")?i="textSearch":n?.startsWith("plfts")?i="textSearch[plain]":n?.startsWith("phfts")?i="textSearch[phrase]":n?.startsWith("wfts")?i="textSearch[websearch]":i=n&&TV[n]||"filter",`${i}(${e}, ${r.join(".")})`}function E8(e,t=!1){return new Proxy(e,{apply(n,r,i){return ai({name:`auth ${t?"(admin) ":""}${e.name}`,attributes:{[it]:"auto.db.supabase",[yt]:"db","db.system":"postgresql","db.operation":`auth.${t?"admin.":""}${e.name}`}},o=>Reflect.apply(n,r,i).then(s=>(s&&typeof s=="object"&&"error"in s&&s.error?(o.setStatus({code:st}),It(s.error,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}})):o.setStatus({code:lc}),o.end(),s)).catch(s=>{throw o.setStatus({code:st}),o.end(),It(s,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}}),s}).then(...i))}})}function xV(e){const t=e.auth;if(!(!t||tf(e.auth))){for(const n of SV){const r=t[n];r&&typeof e.auth[n]=="function"&&(e.auth[n]=E8(r))}for(const n of EV){const r=t.admin[n];r&&typeof e.auth.admin[n]=="function"&&(e.auth.admin[n]=E8(r,!0))}ef(e.auth)}}function CV(e){tf(e.prototype.from)||(e.prototype.from=new Proxy(e.prototype.from,{apply(t,n,r){const i=Reflect.apply(t,n,r),o=i.constructor;return NV(o),i}}),ef(e.prototype.from))}function kV(e){tf(e.prototype.then)||(e.prototype.then=new Proxy(e.prototype.then,{apply(t,n,r){const i=$8,o=n,s=IV(o.method,o.headers);if(!i.includes(s)||!o?.url?.pathname||typeof o.url.pathname!="string")return Reflect.apply(t,n,r);const a=o.url.pathname.split("/"),l=a.length>0?a[a.length-1]:"",c=[];for(const[y,T]of o.url.searchParams.entries())c.push(AV(y,T));const u=Object.create(null);if(Xn(o.body))for(const[y,T]of Object.entries(o.body))u[y]=T;const d=!!Ie()?.getOptions().sendDefaultPii,f=S8(o.body,u),p=s==="select"?"":`${s}${wV(o.body,u)?"(...) ":""}`,m=d?c.join(" "):c.length>0?"[redacted]":"",b=[p.trimEnd(),m].filter(Boolean).join(" "),g=b?`${b} from(${l})`:`from(${l})`,_={"db.table":l,"db.schema":o.schema,"db.url":o.url.origin,"db.sdk":o.headers["X-Client-Info"],"db.system":"postgresql","db.operation":s,[it]:"auto.db.supabase",[yt]:"db"};return c.length&&d&&(_["db.query"]=c),f!==void 0&&d&&(_["db.body"]=f),ai({name:g,attributes:_},y=>Reflect.apply(t,n,[]).then(T=>{if(y&&(T&&typeof T=="object"&&"status"in T&&cc(y,T.status||500),y.end()),T?.error){const N=new Error(T.error.message);T.error.code&&(N.code=T.error.code),T.error.details&&(N.details=T.error.details);const w={};c.length&&d&&(w.query=c),f!==void 0&&d&&(w.body=f),It(N,D=>(D.addEventProcessor(Y=>(ji(Y,{handled:!1,type:"auto.db.supabase.postgres"}),Y)),D.setContext("supabase",w),D))}const S={type:"supabase",category:`db.${s}`,message:g},O={};return c.length&&d&&(O.query=c),f!==void 0&&d&&(O.body=f),Object.keys(O).length&&(S.data=O),Dr(S),T},T=>{throw y&&(cc(y,500),y.end()),T}).then(...r))}}),ef(e.prototype.then))}function NV(e){for(const t of $8)tf(e.prototype[t])||(e.prototype[t]=new Proxy(e.prototype[t],{apply(n,r,i){const o=Reflect.apply(n,r,i),s=o.constructor;return Ee&&B.log(`Instrumenting ${t} operation's PostgRESTFilterBuilder`),kV(s),o}}),ef(e.prototype[t]))}const T8=e=>{if(!e){Ee&&B.warn("Supabase integration was not installed because no Supabase client was provided.");return}const t=e.constructor===Function?e:e.constructor;CV(t),xV(e)},RV="Supabase",OV=(e=>({setupOnce(){T8(e)},name:RV})),PV=e=>OV(e.supabaseClient),MV=10,LV="ZodErrors";function DV(e){return Di(e)&&e.name==="ZodError"&&Array.isArray(e.issues)}function FV(e){return{...e,path:"path"in e&&Array.isArray(e.path)?e.path.join("."):void 0,keys:"keys"in e?JSON.stringify(e.keys):void 0,unionErrors:"unionErrors"in e?JSON.stringify(e.unionErrors):void 0}}function UV(e){return e.map(t=>typeof t=="number"?"<array>":t).join(".")}function BV(e){const t=new Set;for(const r of e.issues){const i=UV(r.path);i.length>0&&t.add(i)}const n=Array.from(t);if(n.length===0){let r="variable";if(e.issues.length>0){const i=e.issues[0];i!==void 0&&"expected"in i&&typeof i.expected=="string"&&(r=i.expected)}return`Failed to validate ${r}`}return`Failed to validate keys: ${tc(n.join(", "),100)}`}function jV(e,t=!1,n,r){if(!n.exception?.values||!r.originalException||!DV(r.originalException)||r.originalException.issues.length===0)return n;try{const o=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(FV);return t&&(Array.isArray(r.attachments)||(r.attachments=[]),r.attachments.push({filename:"zod_issues.json",data:JSON.stringify({issues:o})})),{...n,exception:{...n.exception,values:[{...n.exception.values[0],value:BV(r.originalException)},...n.exception.values.slice(1)]},extra:{...n.extra,"zoderror.issues":o.slice(0,e)}}}catch(i){return{...n,extra:{...n.extra,"zoderrors sentry integration parse error":{message:"an exception was thrown while processing ZodError within applyZodErrorsToEvent()",error:i instanceof Error?`${i.name}: ${i.message}
|
|
47
|
-
${i.stack}`:"unknown"}}}}}const qV=((e={})=>{const t=e.limit??MV;return{name:LV,processEvent(n,r){return jV(t,e.saveZodIssuesAsAttachment,n,r)}}}),zV=e=>({name:"ThirdPartyErrorsFilter",setup(t){t.on("beforeEnvelope",n=>{ls(n,(r,i)=>{if(i==="event"){const o=Array.isArray(r)?r[1]:void 0;o&&(p8(o),r[1]=o)}})}),t.on("applyFrameMetadata",n=>{if(n.type)return;const r=t.getOptions().stackParser;f8(r,n)})},processEvent(t){const n=VV(t,e.ignoreSentryInternalFrames);if(n){const r=e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="apply-tag-if-contains-third-party-frames"?"some":"every";if(n[r](o=>!o.some(s=>e.filterKeys.includes(s)))){if(e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="drop-error-if-exclusively-contains-third-party-frames")return null;t.tags={...t.tags,third_party_code:!0}}}return t}});function HV(e,t){if(t!==0||!e.context_line||!e.filename||!e.filename.includes("sentry")||!e.filename.includes("helpers")||!e.context_line.includes(GV))return!1;if(e.pre_context){const n=e.pre_context.length;for(let r=0;r<n;r++)if(e.pre_context[r]?.includes(WV))return!0}return!1}function VV(e,t){const n=h_(e);if(n)return n.filter((r,i)=>!r.filename||r.lineno==null&&r.colno==null&&r.instruction_addr==null?!1:!t||!HV(r,i)).map(r=>r.module_metadata?Object.keys(r.module_metadata).filter(i=>i.startsWith(w8)).map(i=>i.slice(w8.length)):[])}const w8="_sentryBundlerPluginAppKey:",WV="Attempt to invoke user-land function",GV="fn.apply(this, wrappedArguments)",YV=100,KV=10,nf="flag.evaluation.";function ia(e){if(e.type)return e;const n=Ke().getScopeData().contexts.flags,r=n?n.values:[];return r.length&&(e.contexts===void 0&&(e.contexts={}),e.contexts.flags={values:[...r]}),e}function ds(e,t,n=YV){const r=Ke().getScopeData().contexts;r.flags||(r.flags={values:[]});const i=r.flags.values;XV(i,e,t,n)}function XV(e,t,n,r){if(typeof n!="boolean")return;if(e.length>r){Ee&&B.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${r}`);return}const i=e.findIndex(o=>o.flag===t);i!==-1&&e.splice(i,1),e.length===r&&e.shift(),e.push({flag:t,result:n})}function fs(e,t,n=KV){if(typeof t!="boolean")return;const r=Ht();if(!r)return;const i=Je(r).data;if(`${nf}${e}`in i){r.setAttribute(`${nf}${e}`,t);return}Object.keys(i).filter(s=>s.startsWith(nf)).length<n&&r.setAttribute(`${nf}${e}`,t)}const JV=()=>({name:"FeatureFlags",processEvent(e,t,n){return ia(e)},addFeatureFlag(e,t){ds(e,t),fs(e,t)}}),ZV=({growthbookClass:e})=>({name:"GrowthBook",setupOnce(){const t=e.prototype;typeof t.isOn=="function"&&$n(t,"isOn",I8),typeof t.getFeatureValue=="function"&&$n(t,"getFeatureValue",I8)},processEvent(t,n,r){return ia(t)}});function I8(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"&&(ds(n,r),fs(n,r)),r}}const QV="ConversationId",eW=(()=>({name:QV,setup(e){e.on("spanStart",t=>{const n=Ke().getScopeData(),r=qt().getScopeData(),i=n.conversationId||r.conversationId;if(i){const{op:o,data:s,description:a}=Je(t);if(!o?.startsWith("gen_ai.")&&!s["ai.operationId"]&&!a?.startsWith("ai."))return;t.setAttribute(lq,i)}})}}));function tW(e,t,n,r,i){if(!e.fetchData)return;const{method:o,url:s}=e.fetchData,a=or()&&t(s);if(e.endTimestamp){const p=e.fetchData.__span;if(!p)return;const m=r[p];m&&(a&&(iW(m,e),nW(m,e,i)),delete r[p]);return}const{spanOrigin:l="auto.http.browser",propagateTraceparent:c=!1}=typeof i=="object"?i:{spanOrigin:i},u=Ie(),d=!!Ht(),f=a&&d?li(aW(s,o,l)):new sr;if(a&&!d&&u?.recordDroppedEvent("no_parent_span","span"),e.fetchData.__span=f.spanContext().spanId,r[f.spanContext().spanId]=f,n(e.fetchData.url)){const p=e.args[0],m={...e.args[1]||{}},b=rW(p,m,or()&&d?f:void 0,c);b&&(e.args[1]=m,m.headers=b)}if(u){const p={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};u.emit("beforeOutgoingRequestSpan",f,p)}return f}function nW(e,t,n){(typeof n=="object"&&n!==null?n.onRequestSpanEnd:void 0)?.(e,{headers:t.response?.headers,error:t.error})}function rW(e,t,n,r){const i=oh({span:n,propagateTraceparent:r}),o=i["sentry-trace"],s=i.baggage,a=i.traceparent;if(!o)return;const l=t.headers||(b_(e)?e.headers:void 0);if(l)if(oW(l)){const c=new Headers(l);if(c.get("sentry-trace")||c.set("sentry-trace",o),r&&a&&!c.get("traceparent")&&c.set("traceparent",a),s){const u=c.get("baggage");u?rf(u)||c.set("baggage",`${u},${s}`):c.set("baggage",s)}return c}else if(sW(l)){const c=[...l];c.find(d=>d[0]==="sentry-trace")||c.push(["sentry-trace",o]),r&&a&&!c.find(d=>d[0]==="traceparent")&&c.push(["traceparent",a]);const u=l.find(d=>d[0]==="baggage"&&typeof d[1]=="string"&&rf(d[1]));return s&&!u&&c.push(["baggage",s]),c}else{const c="sentry-trace"in l?l["sentry-trace"]:void 0,u="traceparent"in l?l.traceparent:void 0,d="baggage"in l?l.baggage:void 0,f=d?Array.isArray(d)?[...d]:[d]:[],p=d&&(Array.isArray(d)?d.find(b=>rf(b)):rf(d));s&&!p&&f.push(s);const m=Object.assign({},l,{"sentry-trace":c??o,baggage:f.length>0?f.join(","):void 0});return r&&a&&!u&&(m.traceparent=a),m}else return{...i}}function iW(e,t){if(t.response){cc(e,t.response.status);const n=t.response?.headers?.get("content-length");if(n){const r=parseInt(n);r>0&&e.setAttribute("http.response_content_length",r)}}else t.error&&e.setStatus({code:st,message:"internal_error"});e.end()}function rf(e){return typeof e!="string"?!1:e.split(",").some(t=>t.trim().startsWith(Pd))}function oW(e){return typeof Headers<"u"&&Ui(e,Headers)}function sW(e){return Array.isArray(e)?e.every(t=>Array.isArray(t)&&t.length===2&&typeof t[0]=="string"):!1}function aW(e,t,n){if(e.startsWith("data:")){const o=So(e);return{name:`${t} ${o}`,attributes:A8(e,void 0,t,n)}}const r=ih(e),i=r?OH(r):e;return{name:`${t} ${i}`,attributes:A8(e,r,t,n)}}function A8(e,t,n,r){const i={url:So(e),type:"fetch","http.method":n,[it]:r,[yt]:"http.client"};return t&&(rh(t)||(i["http.url"]=So(t.href),i["server.address"]=t.host),t.search&&(i["http.query"]=t.search),t.hash&&(i["http.fragment"]=t.hash)),i}function x8(e,t={},n=Ke()){const{message:r,name:i,email:o,url:s,source:a,associatedEventId:l,tags:c}=e,u={contexts:{feedback:{contact_email:o,name:i,message:r,url:s,source:a,associated_event_id:l}},type:"feedback",level:"info",tags:c},d=n?.getClient()||Ie();return d&&d.emit("beforeSendFeedback",u,t),n.captureEvent(u,t)}function oa(e,t,n,r,i){Gd({level:e,message:t,attributes:n,severityNumber:i},r)}function lW(e,t,{scope:n}={}){oa("trace",e,t,n)}function cW(e,t,{scope:n}={}){oa("debug",e,t,n)}function uW(e,t,{scope:n}={}){oa("info",e,t,n)}function dW(e,t,{scope:n}={}){oa("warn",e,t,n)}function fW(e,t,{scope:n}={}){oa("error",e,t,n)}function pW(e,t,{scope:n}={}){oa("fatal",e,t,n)}const mW=Object.freeze(Object.defineProperty({__proto__:null,debug:cW,error:fW,fatal:pW,fmt:DH,info:uW,trace:lW,warn:dW},Symbol.toStringTag,{value:"Module"}));function of(e,t,n){return"util"in je&&typeof je.util.format=="function"?je.util.format(...e):_W(e,t,n)}function _W(e,t,n){return e.map(r=>Fi(r)?String(r):JSON.stringify(En(r,t,n))).join(" ")}function C8(e){return/%[sdifocO]/.test(e)}function k8(e,t){const n={},r=new Array(t.length).fill("{}").join(" ");return n["sentry.message.template"]=`${e} ${r}`,t.forEach((i,o)=>{n[`sentry.message.parameter.${o}`]=i}),n}const hW="ConsoleLogs",N8={[it]:"auto.log.console"},gW=((e={})=>{const t=e.levels||f_;return{name:hW,setup(n){const{enableLogs:r,normalizeDepth:i=3,normalizeMaxBreadth:o=1e3}=n.getOptions();if(!r){Ee&&B.warn("`enableLogs` is not enabled, ConsoleLogs integration disabled");return}const s=ah(({args:a,level:l})=>{if(Ie()!==n||!t.includes(l))return;const c=a[0],u=a.slice(1);if(l==="assert"){if(!c){const m=u.length>0?`Assertion failed: ${of(u,i,o)}`:"Assertion failed";Gd({level:"error",message:m,attributes:N8})}return}const d=l==="log",f=a.length>1&&typeof a[0]=="string"&&!C8(a[0]),p={...N8,...f?k8(c,u):{}};Gd({level:d?"info":l,message:of(a,i,o),severityNumber:d?10:void 0,attributes:p})});n.registerCleanup(s)}}});function lh(e,t,n,r){pH({type:e,name:t,value:n,unit:r?.unit,attributes:r?.attributes},{scope:r?.scope})}function yW(e,t=1,n){lh("counter",e,t,n)}function bW(e,t,n){lh("gauge",e,t,n)}function ch(e,t,n){lh("distribution",e,t,n)}const vW=Object.freeze(Object.defineProperty({__proto__:null,count:yW,distribution:ch,gauge:bW},Symbol.toStringTag,{value:"Module"})),$W=["trace","debug","info","warn","error","fatal"];function SW(e={}){const t=new Set(e.levels??$W),n=e.client;return{log(r){const{type:i,level:o,message:s,args:a,tag:l,date:c,...u}=r,d=n||Ie();if(!d)return;const f=wW(i,o);if(!t.has(f))return;const{normalizeDepth:p=3,normalizeMaxBreadth:m=1e3}=d.getOptions(),b={};for(const[_,y]of Object.entries(u))b[_]=En(y,p,m);b["sentry.origin"]="auto.log.consola",l&&(b["consola.tag"]=l),i&&(b["consola.type"]=i),o!=null&&typeof o=="number"&&(b["consola.level"]=o);const g=AW(IW(a,p,m),p,m);g?.attributes&&Object.assign(b,g.attributes),Gd({level:f,message:g?.message||s||a&&of(a,p,m)||"",attributes:b})}}}const EW={silent:"trace",fatal:"fatal",error:"error",warn:"warn",log:"info",info:"info",success:"info",fail:"error",ready:"info",start:"info",box:"info",debug:"debug",trace:"trace",verbose:"debug",critical:"fatal",notice:"info"},TW={0:"fatal",1:"warn",2:"info",3:"info",4:"debug",5:"trace"};function wW(e,t){if(e==="verbose")return"debug";if(e==="silent")return"trace";if(e){const n=EW[e];if(n)return n}if(typeof t=="number"){const n=TW[t];if(n)return n}return"info"}function IW(e,t,n){if(!e?.length)return{message:""};const r=of(e,t,n),i=e[0];if(Xn(i)){const o=typeof e[1]=="string"?2:1,s=e.slice(o);return{message:r,attributes:i,messageParameters:s}}else{const o=e.slice(1),s=o.length>0&&typeof i=="string"&&!C8(i);return{message:r,messageTemplate:s?i:void 0,messageParameters:s?o:void 0}}}function AW(e,t,n){const{message:r,attributes:i,messageTemplate:o,messageParameters:s}=e,a={};if(o&&s){const l=k8(o,s);for(const[c,u]of Object.entries(l))a[c]=c.startsWith("sentry.message.parameter.")?En(u,t,n):u}else s&&s.length>0&&s.forEach((l,c)=>{a[`sentry.message.parameter.${c}`]=En(l,t,n)});return{message:r,attributes:{...En(i,t,n),...a}}}const xW="gen_ai.prompt",bc="gen_ai.system",Tn="gen_ai.request.model",uh="gen_ai.request.stream",sf="gen_ai.request.temperature",dh="gen_ai.request.max_tokens",af="gen_ai.request.frequency_penalty",fh="gen_ai.request.presence_penalty",lf="gen_ai.request.top_p",R8="gen_ai.request.top_k",O8="gen_ai.request.encoding_format",P8="gen_ai.request.dimensions",sa="gen_ai.response.finish_reasons",aa="gen_ai.response.model",cf="gen_ai.response.id",CW="gen_ai.response.stop_reason",ps="gen_ai.usage.input_tokens",ms="gen_ai.usage.output_tokens",Eo="gen_ai.usage.total_tokens",Fr="gen_ai.operation.name",_s="sentry.sdk_meta.gen_ai.input.messages.original_length",la="gen_ai.input.messages",vc="gen_ai.system_instructions",ui="gen_ai.response.text",$c="gen_ai.request.available_tools",kW="gen_ai.response.streaming",To="gen_ai.response.tool_calls",uf="gen_ai.agent.name",NW="gen_ai.pipeline.name",ph="gen_ai.conversation.id",RW="gen_ai.usage.cache_creation_input_tokens",OW="gen_ai.usage.cache_read_input_tokens",PW="gen_ai.invoke_agent",mh="gen_ai.embeddings.input",M8="gen_ai.embeddings",L8="gen_ai.execute_tool",D8="gen_ai.tool.name",MW="gen_ai.tool.call.id",LW="gen_ai.tool.type",F8="gen_ai.tool.input",U8="gen_ai.tool.output",DW="gen_ai.tool.description";function ca(e){return!e||typeof e!="object"?!1:UW(e)||j8(e)||FW(e)||q8(e)||z8(e)||BW(e)||jW(e)||qW(e)||zW(e)||HW(e)||VW(e)||WW(e)}function FW(e){return"image_url"in e?typeof e.image_url=="string"?e.image_url.startsWith("data:"):B8(e):!1}function B8(e){return"image_url"in e&&!!e.image_url&&typeof e.image_url=="object"&&"url"in e.image_url&&typeof e.image_url.url=="string"&&e.image_url.url.startsWith("data:")}function UW(e){return"type"in e&&typeof e.type=="string"&&"source"in e&&ca(e.source)}function j8(e){return"inlineData"in e&&!!e.inlineData&&typeof e.inlineData=="object"&&"data"in e.inlineData&&typeof e.inlineData.data=="string"}function q8(e){return"type"in e&&e.type==="input_audio"&&"input_audio"in e&&!!e.input_audio&&typeof e.input_audio=="object"&&"data"in e.input_audio&&typeof e.input_audio.data=="string"}function z8(e){return"type"in e&&e.type==="file"&&"file"in e&&!!e.file&&typeof e.file=="object"&&"file_data"in e.file&&typeof e.file.file_data=="string"}function BW(e){return"media_type"in e&&typeof e.media_type=="string"&&"data"in e}function jW(e){return"type"in e&&e.type==="file"&&"mediaType"in e&&typeof e.mediaType=="string"&&"data"in e&&typeof e.data=="string"&&!e.data.startsWith("http://")&&!e.data.startsWith("https://")}function qW(e){return"type"in e&&e.type==="image"&&"image"in e&&typeof e.image=="string"&&!e.image.startsWith("http://")&&!e.image.startsWith("https://")}function zW(e){return"type"in e&&(e.type==="blob"||e.type==="base64")}function HW(e){return"b64_json"in e}function VW(e){return"type"in e&&"result"in e&&e.type==="image_generation"}function WW(e){return"uri"in e&&typeof e.uri=="string"&&e.uri.startsWith("data:")}const Sc="[Blob substitute]",GW=["image_url","data","content","b64_json","result","uri","image"];function Ec(e){const t={...e};ca(t.source)&&(t.source=Ec(t.source)),j8(e)&&(t.inlineData={...e.inlineData,data:Sc}),B8(e)&&(t.image_url={...e.image_url,url:Sc}),q8(e)&&(t.input_audio={...e.input_audio,data:Sc}),z8(e)&&(t.file={...e.file,file_data:Sc});for(const n of GW)typeof t[n]=="string"&&(t[n]=Sc);return t}const H8=2e4,df=e=>new TextEncoder().encode(e).length,_h=e=>df(JSON.stringify(e));function ff(e,t){if(df(e)<=t)return e;let n=0,r=e.length,i="";for(;n<=r;){const o=Math.floor((n+r)/2),s=e.slice(0,o);df(s)<=t?(i=s,n=o+1):r=o-1}return i}function YW(e){return typeof e=="string"?e:"text"in e&&typeof e.text=="string"?e.text:""}function V8(e,t){return typeof e=="string"?t:{...e,text:t}}function KW(e){return e!==null&&typeof e=="object"&&"content"in e&&typeof e.content=="string"}function W8(e){return e!==null&&typeof e=="object"&&"content"in e&&Array.isArray(e.content)}function G8(e){return e!==null&&typeof e=="object"&&"parts"in e&&Array.isArray(e.parts)&&e.parts.length>0}function XW(e,t){const n={...e,content:""},r=_h(n),i=t-r;if(i<=0)return[];const o=ff(e.content,i);return[{...e,content:o}]}function JW(e){return"parts"in e&&Array.isArray(e.parts)?{key:"parts",items:e.parts}:"content"in e&&Array.isArray(e.content)?{key:"content",items:e.content}:{key:null,items:[]}}function ZW(e,t){const{key:n,items:r}=JW(e);if(n===null||r.length===0)return[];const i=r.map(l=>V8(l,"")),o=_h({...e,[n]:i});let s=t-o;if(s<=0)return[];const a=[];for(const l of r){const c=YW(l),u=df(c);if(u<=s)a.push(l),s-=u;else if(a.length===0){const d=ff(c,s);d&&a.push(V8(l,d));break}else break}return a.length<=0?[]:[{...e,[n]:a}]}function QW(e,t){if(!e)return[];if(typeof e=="string"){const n=ff(e,t);return n?[n]:[]}return typeof e!="object"?[]:KW(e)?XW(e,t):W8(e)||G8(e)?ZW(e,t):[]}function hh(e){return e.map(n=>{let r;return n&&typeof n=="object"&&(W8(n)?r={...n,content:hh(n.content)}:"content"in n&&ca(n.content)&&(r={...n,content:Ec(n.content)}),G8(n)&&(r={...r??n,parts:hh(n.parts)}),ca(r)?r=Ec(r):ca(n)&&(r=Ec(n))),r??n})}function eG(e,t){if(!Array.isArray(e)||e.length===0)return e;const n=t-2,r=e[e.length-1],i=hh([r]),o=i[0];return _h(o)<=n?i:QW(o,n)}function tG(e){return eG(e,H8)}function nG(e){return ff(e,H8)}function hs(e){const t=!!Ie()?.getOptions().sendDefaultPii;return{...e,recordInputs:e?.recordInputs??t,recordOutputs:e?.recordOutputs??t}}function Yi(e){const t=Ie();return e??!(t&&Vi(t))}function gh(e,t){return e?`${e}.${t}`:t}function rG(e,t,n,r,i){if(t!==void 0&&e.setAttributes({[ps]:t}),n!==void 0&&e.setAttributes({[ms]:n}),t!==void 0||n!==void 0||r!==void 0||i!==void 0){const o=(t??0)+(n??0)+(r??0)+(i??0);e.setAttributes({[Eo]:o})}}function pf(e,t,n){if(!e.isRecording())return;const r={[kW]:!0};t.responseId&&(r[cf]=t.responseId),t.responseModel&&(r[aa]=t.responseModel),t.promptTokens!==void 0&&(r[ps]=t.promptTokens),t.completionTokens!==void 0&&(r[ms]=t.completionTokens),t.totalTokens!==void 0?r[Eo]=t.totalTokens:(t.promptTokens!==void 0||t.completionTokens!==void 0||t.cacheCreationInputTokens!==void 0||t.cacheReadInputTokens!==void 0)&&(r[Eo]=(t.promptTokens??0)+(t.completionTokens??0)+(t.cacheCreationInputTokens??0)+(t.cacheReadInputTokens??0)),t.finishReasons.length&&(r[sa]=JSON.stringify(t.finishReasons)),n&&t.responseTexts.length&&(r[ui]=t.responseTexts.join("")),n&&t.toolCalls.length&&(r[To]=JSON.stringify(t.toolCalls)),e.setAttributes(r),e.end()}function ua(e){return typeof e=="string"?e:JSON.stringify(e)}function da(e){if(typeof e=="string")return nG(e);if(Array.isArray(e)){const t=tG(e);return JSON.stringify(t)}return JSON.stringify(e)}function Tc(e){if(!Array.isArray(e))return{systemInstructions:void 0,filteredMessages:e};const t=e.findIndex(s=>s&&typeof s=="object"&&"role"in s&&s.role==="system");if(t===-1)return{systemInstructions:void 0,filteredMessages:e};const n=e[t],r=typeof n.content=="string"?n.content:n.content!==void 0?JSON.stringify(n.content):void 0;if(!r)return{systemInstructions:void 0,filteredMessages:e};const i=JSON.stringify([{type:"text",content:r}]),o=[...e.slice(0,t),...e.slice(t+1)];return{systemInstructions:i,filteredMessages:o}}async function iG(e,t,n){const r=e.catch(s=>{throw It(s,{mechanism:{handled:!1,type:n}}),s}),i=await t,o=await r;return o&&typeof o=="object"&&"data"in o?{...o,data:i}:i}function mf(e,t,n){return ts(e)?new Proxy(e,{get(r,i){const s=i in Promise.prototype||i===Symbol.toStringTag?t:r,a=Reflect.get(s,i);return i==="withResponse"&&typeof a=="function"?function(){const c=a.call(r);return iG(c,t,n)}:typeof a=="function"?a.bind(s):a}}):t}const oG={"responses.create":{operation:"chat"},"chat.completions.create":{operation:"chat"},"embeddings.create":{operation:"embeddings"},"conversations.create":{operation:"chat"}},sG=["response.created","response.in_progress","response.failed","response.completed","response.incomplete","response.queued","response.output_text.delta",...["response.output_item.added","response.function_call_arguments.delta","response.function_call_arguments.done","response.output_item.done"]];function aG(e){return e!==null&&typeof e=="object"&&"type"in e&&typeof e.type=="string"&&e.type.startsWith("response.")}function lG(e){return e!==null&&typeof e=="object"&&"object"in e&&e.object==="chat.completion.chunk"}function cG(e,t,n){if(!t||typeof t!="object")return;const r=t,i={};if(typeof r.id=="string"&&(i[cf]=r.id),typeof r.model=="string"&&(i[aa]=r.model),r.object==="conversation"&&typeof r.id=="string"&&(i[ph]=r.id),r.usage&&typeof r.usage=="object"){const o=r.usage,s=o.prompt_tokens??o.input_tokens;typeof s=="number"&&(i[ps]=s);const a=o.completion_tokens??o.output_tokens;typeof a=="number"&&(i[ms]=a),typeof o.total_tokens=="number"&&(i[Eo]=o.total_tokens)}if(Array.isArray(r.choices)){const o=r.choices,s=o.map(a=>a.finish_reason).filter(a=>typeof a=="string");if(s.length>0&&(i[sa]=JSON.stringify(s)),n){const a=o.map(c=>c.message?.content||"");i[ui]=JSON.stringify(a);const l=o.map(c=>c.message?.tool_calls).filter(c=>Array.isArray(c)&&c.length>0).flat();l.length>0&&(i[To]=JSON.stringify(l))}}if(typeof r.status=="string"&&(i[sa]||(i[sa]=JSON.stringify([r.status]))),n&&(typeof r.output_text=="string"&&!i[ui]&&(i[ui]=r.output_text),Array.isArray(r.output)&&r.output.length>0&&!i[To])){const o=r.output.filter(s=>s?.type==="function_call");o.length>0&&(i[To]=JSON.stringify(o))}e.setAttributes(i)}function uG(e){if("conversation"in e&&typeof e.conversation=="string")return e.conversation;if("previous_response_id"in e&&typeof e.previous_response_id=="string")return e.previous_response_id}function dG(e){const t={[Tn]:e.model??"unknown"};"temperature"in e&&(t[sf]=e.temperature),"top_p"in e&&(t[lf]=e.top_p),"frequency_penalty"in e&&(t[af]=e.frequency_penalty),"presence_penalty"in e&&(t[fh]=e.presence_penalty),"stream"in e&&(t[uh]=e.stream),"encoding_format"in e&&(t[O8]=e.encoding_format),"dimensions"in e&&(t[P8]=e.dimensions);const n=uG(e);return n&&(t[ph]=n),t}function fG(e,t){for(const n of e){const r=n.index;if(!(r===void 0||!n.function))if(!(r in t.chatCompletionToolCalls))t.chatCompletionToolCalls[r]={...n,function:{name:n.function.name,arguments:n.function.arguments||""}};else{const i=t.chatCompletionToolCalls[r];n.function.arguments&&i?.function&&(i.function.arguments+=n.function.arguments)}}}function pG(e,t,n){t.responseId=e.id??t.responseId,t.responseModel=e.model??t.responseModel,e.usage&&(t.promptTokens=e.usage.prompt_tokens,t.completionTokens=e.usage.completion_tokens,t.totalTokens=e.usage.total_tokens);for(const r of e.choices??[])n&&(r.delta?.content&&t.responseTexts.push(r.delta.content),r.delta?.tool_calls&&fG(r.delta.tool_calls,t)),r.finish_reason&&t.finishReasons.push(r.finish_reason)}function mG(e,t,n,r){if(!(e&&typeof e=="object")){t.eventTypes.push("unknown:non-object");return}if(e instanceof Error){r.setStatus({code:st,message:"internal_error"}),It(e,{mechanism:{handled:!1,type:"auto.ai.openai.stream-response"}});return}if(!("type"in e))return;const i=e;if(!sG.includes(i.type)){t.eventTypes.push(i.type);return}if(n&&(i.type==="response.output_item.done"&&"item"in i&&t.responsesApiToolCalls.push(i.item),i.type==="response.output_text.delta"&&"delta"in i&&i.delta)){t.responseTexts.push(i.delta);return}if("response"in i){const{response:o}=i;t.responseId=o.id??t.responseId,t.responseModel=o.model??t.responseModel,o.usage&&(t.promptTokens=o.usage.input_tokens,t.completionTokens=o.usage.output_tokens,t.totalTokens=o.usage.total_tokens),o.status&&t.finishReasons.push(o.status),n&&o.output_text&&t.responseTexts.push(o.output_text)}}async function*_G(e,t,n){const r={eventTypes:[],responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,totalTokens:void 0,chatCompletionToolCalls:{},responsesApiToolCalls:[]};try{for await(const i of e)lG(i)?pG(i,r,n):aG(i)&&mG(i,r,n,t),yield i}finally{const i=[...Object.values(r.chatCompletionToolCalls),...r.responsesApiToolCalls];pf(t,{...r,toolCalls:i},n)}}function hG(e){const t=Array.isArray(e.tools)?e.tools:[],r=e.web_search_options&&typeof e.web_search_options=="object"?[{type:"web_search_options",...e.web_search_options}]:[],i=[...t,...r];if(i.length!==0)try{return JSON.stringify(i)}catch(o){Ee&&B.error("Failed to serialize OpenAI tools:",o);return}}function gG(e,t){const n={[bc]:"openai",[Fr]:t,[it]:"auto.ai.openai"};if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){const r=e[0],i=hG(r);i&&(n[$c]=i),Object.assign(n,dG(r))}else n[Tn]="unknown";return n}function Y8(e,t,n,r){if(n==="embeddings"&&"input"in t){const a=t.input;if(a==null||typeof a=="string"&&a.length===0||Array.isArray(a)&&a.length===0)return;e.setAttribute(mh,typeof a=="string"?a:JSON.stringify(a));return}const i="input"in t?t.input:"messages"in t?t.messages:void 0;if(!i||Array.isArray(i)&&i.length===0)return;const{systemInstructions:o,filteredMessages:s}=Tc(i);o&&e.setAttribute(vc,o),e.setAttribute(la,r?da(s):ua(s)),Array.isArray(s)?e.setAttribute(_s,s.length):e.setAttribute(_s,1)}function yG(e,t,n,r,i){return function(...s){const a=n.operation||"unknown",l=gG(s,a),c=l[Tn]||"unknown",u=s[0],d=u&&typeof u=="object"&&u.stream===!0,f={name:`${a} ${c}`,op:`gen_ai.${a}`,attributes:l};if(d){let b;const g=Wi(f,_=>(b=e.apply(r,s),i.recordInputs&&u&&Y8(_,u,a,Yi(i.enableTruncation)),(async()=>{try{const y=await b;return _G(y,_,i.recordOutputs??!1)}catch(y){throw _.setStatus({code:st,message:"internal_error"}),It(y,{mechanism:{handled:!1,type:"auto.ai.openai.stream",data:{function:t}}}),_.end(),y}})()));return mf(b,g,"auto.ai.openai")}let p;const m=ai(f,b=>(p=e.apply(r,s),i.recordInputs&&u&&Y8(b,u,a,Yi(i.enableTruncation)),p.then(g=>(cG(b,g,i.recordOutputs),g),g=>{throw It(g,{mechanism:{handled:!1,type:"auto.ai.openai",data:{function:t}}}),g})));return mf(p,m,"auto.ai.openai")}}function K8(e,t="",n){return new Proxy(e,{get(r,i){const o=r[i],s=gh(t,String(i)),a=oG[s];return typeof o=="function"&&a?yG(o,s,a,r,n):typeof o=="function"?o.bind(r):o&&typeof o=="object"?K8(o,s,n):o}})}function bG(e,t){return K8(e,"",hs(t))}const vG={"messages.create":{operation:"chat"},"messages.stream":{operation:"chat",streaming:!0},"messages.countTokens":{operation:"chat"},"models.get":{operation:"models"},"completions.create":{operation:"chat"},"models.retrieve":{operation:"models"},"beta.messages.create":{operation:"chat"}};function $G(e,t,n){if(Array.isArray(t)&&t.length===0)return;const{systemInstructions:r,filteredMessages:i}=Tc(t);r&&e.setAttributes({[vc]:r});const o=Array.isArray(i)?i.length:1;e.setAttributes({[la]:n?da(i):ua(i),[_s]:o})}const SG={invalid_request_error:"invalid_argument",authentication_error:"unauthenticated",permission_error:"permission_denied",not_found_error:"not_found",request_too_large:"failed_precondition",rate_limit_error:"resource_exhausted",api_error:"internal_error",overloaded_error:"unavailable"};function X8(e){return e&&SG[e]||"internal_error"}function EG(e,t){t.error&&(e.setStatus({code:st,message:X8(t.error.type)}),It(t.error,{mechanism:{handled:!1,type:"auto.ai.anthropic.anthropic_error"}}))}function TG(e){const{system:t,messages:n,input:r}=e,i=typeof t=="string"?[{role:"system",content:e.system}]:[],o=Array.isArray(r)?r:r!=null?[r]:void 0,s=Array.isArray(n)?n:n!=null?[n]:[],a=o??s;return[...i,...a]}function wG(e,t){return"type"in e&&typeof e.type=="string"&&e.type==="error"?(t.setStatus({code:st,message:X8(e.error?.type)}),It(e.error,{mechanism:{handled:!1,type:"auto.ai.anthropic.anthropic_error"}}),!0):!1}function IG(e,t){if(e.type==="message_delta"&&e.usage&&"output_tokens"in e.usage&&typeof e.usage.output_tokens=="number"&&(t.completionTokens=e.usage.output_tokens),e.message){const n=e.message;n.id&&(t.responseId=n.id),n.model&&(t.responseModel=n.model),n.stop_reason&&t.finishReasons.push(n.stop_reason),n.usage&&(typeof n.usage.input_tokens=="number"&&(t.promptTokens=n.usage.input_tokens),typeof n.usage.cache_creation_input_tokens=="number"&&(t.cacheCreationInputTokens=n.usage.cache_creation_input_tokens),typeof n.usage.cache_read_input_tokens=="number"&&(t.cacheReadInputTokens=n.usage.cache_read_input_tokens))}}function AG(e,t){e.type!=="content_block_start"||typeof e.index!="number"||!e.content_block||(e.content_block.type==="tool_use"||e.content_block.type==="server_tool_use")&&(t.activeToolBlocks[e.index]={id:e.content_block.id,name:e.content_block.name,inputJsonParts:[]})}function xG(e,t,n){if(!(e.type!=="content_block_delta"||!e.delta)){if(typeof e.index=="number"&&"partial_json"in e.delta&&typeof e.delta.partial_json=="string"){const r=t.activeToolBlocks[e.index];r&&r.inputJsonParts.push(e.delta.partial_json)}n&&typeof e.delta.text=="string"&&t.responseTexts.push(e.delta.text)}}function CG(e,t){if(e.type!=="content_block_stop"||typeof e.index!="number")return;const n=t.activeToolBlocks[e.index];if(!n)return;const r=n.inputJsonParts.join("");let i;try{i=r?JSON.parse(r):{}}catch{i={__unparsed:r}}t.toolCalls.push({type:"tool_use",id:n.id,name:n.name,input:i}),delete t.activeToolBlocks[e.index]}function J8(e,t,n,r){!(e&&typeof e=="object")||wG(e,r)||(IG(e,t),AG(e,t),xG(e,t,n),CG(e,t))}async function*kG(e,t,n){const r={responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};try{for await(const i of e)J8(i,r,n,t),yield i}finally{pf(t,r,n)}}function NG(e,t,n){const r={responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};return e.on("streamEvent",i=>{J8(i,r,n,t)}),e.on("message",()=>{pf(t,r,n)}),e.on("error",i=>{It(i,{mechanism:{handled:!1,type:"auto.ai.anthropic.stream_error"}}),t.isRecording()&&(t.setStatus({code:st,message:"internal_error"}),t.end())}),e}function RG(e,t,n){const r={[bc]:"anthropic",[Fr]:n,[it]:"auto.ai.anthropic"};if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){const i=e[0];i.tools&&Array.isArray(i.tools)&&(r[$c]=JSON.stringify(i.tools)),r[Tn]=i.model??"unknown","temperature"in i&&(r[sf]=i.temperature),"top_p"in i&&(r[lf]=i.top_p),"stream"in i&&(r[uh]=i.stream),"top_k"in i&&(r[R8]=i.top_k),"frequency_penalty"in i&&(r[af]=i.frequency_penalty),"max_tokens"in i&&(r[dh]=i.max_tokens)}else t==="models.retrieve"||t==="models.get"?r[Tn]=e[0]:r[Tn]="unknown";return r}function yh(e,t,n){const r=TG(t);$G(e,r,n),"prompt"in t&&e.setAttributes({[xW]:JSON.stringify(t.prompt)})}function OG(e,t){if("content"in t&&Array.isArray(t.content)){e.setAttributes({[ui]:t.content.map(r=>r.text).filter(r=>!!r).join("")});const n=[];for(const r of t.content)(r.type==="tool_use"||r.type==="server_tool_use")&&n.push(r);n.length>0&&e.setAttributes({[To]:JSON.stringify(n)})}"completion"in t&&e.setAttributes({[ui]:t.completion}),"input_tokens"in t&&e.setAttributes({[ui]:JSON.stringify(t.input_tokens)})}function PG(e,t){"id"in t&&"model"in t&&(e.setAttributes({[cf]:t.id,[aa]:t.model}),"usage"in t&&t.usage&&rG(e,t.usage.input_tokens,t.usage.output_tokens,t.usage.cache_creation_input_tokens,t.usage.cache_read_input_tokens))}function MG(e,t,n){if(!(!t||typeof t!="object")){if("type"in t&&t.type==="error"){EG(e,t);return}n&&OG(e,t),PG(e,t)}}function Z8(e,t,n){throw It(e,{mechanism:{handled:!1,type:"auto.ai.anthropic",data:{function:n}}}),t.isRecording()&&(t.setStatus({code:st,message:"internal_error"}),t.end()),e}function LG(e,t,n,r,i,o,s,a,l,c,u){const d=i[Tn]??"unknown",f={name:`${o} ${d}`,op:`gen_ai.${o}`,attributes:i};if(c&&!u){let p;const m=Wi(f,b=>(p=e.apply(n,r),l.recordInputs&&a&&yh(b,a,Yi(l.enableTruncation)),(async()=>{try{const g=await p;return kG(g,b,l.recordOutputs??!1)}catch(g){return Z8(g,b,s)}})()));return mf(p,m,"auto.ai.anthropic")}else return Wi(f,p=>{try{l.recordInputs&&a&&yh(p,a,Yi(l.enableTruncation));const m=t.apply(n,r);return NG(m,p,l.recordOutputs??!1)}catch(m){return Z8(m,p,s)}})}function DG(e,t,n,r,i){return new Proxy(e,{apply(o,s,a){const l=n.operation||"unknown",c=RG(a,t,l),u=c[Tn]??"unknown",d=typeof a[0]=="object"?a[0]:void 0,f=!!d?.stream,p=n.streaming===!0;if(f||p)return LG(e,o,r,a,c,l,t,d,i,f,p);let m;const b=ai({name:`${l} ${u}`,op:`gen_ai.${l}`,attributes:c},g=>(m=o.apply(r,a),i.recordInputs&&d&&yh(g,d,Yi(i.enableTruncation)),m.then(_=>(MG(g,_,i.recordOutputs),_),_=>{throw It(_,{mechanism:{handled:!1,type:"auto.ai.anthropic",data:{function:t}}}),_})));return mf(m,b,"auto.ai.anthropic")}})}function Q8(e,t="",n){return new Proxy(e,{get(r,i){const o=r[i],s=gh(t,String(i)),a=vG[s];return typeof o=="function"&&a?DG(o,s,a,r,n):typeof o=="function"?o.bind(r):o&&typeof o=="object"?Q8(o,s,n):o}})}function FG(e,t){return Q8(e,"",hs(t))}const UG={"models.generateContent":{operation:"generate_content"},"models.generateContentStream":{operation:"generate_content",streaming:!0},"models.embedContent":{operation:"embeddings"},"chats.create":{proxyResultPath:"chat"},"chat.sendMessage":{operation:"chat"},"chat.sendMessageStream":{operation:"chat",streaming:!0}},BG="google_genai";function jG(e,t){const n=e?.promptFeedback;if(n?.blockReason){const r=n.blockReasonMessage??n.blockReason;return t.setStatus({code:st,message:"internal_error"}),It(`Content blocked: ${r}`,{mechanism:{handled:!1,type:"auto.ai.google_genai"}}),!0}return!1}function qG(e,t){typeof e.responseId=="string"&&(t.responseId=e.responseId),typeof e.modelVersion=="string"&&(t.responseModel=e.modelVersion);const n=e.usageMetadata;n&&(typeof n.promptTokenCount=="number"&&(t.promptTokens=n.promptTokenCount),typeof n.candidatesTokenCount=="number"&&(t.completionTokens=n.candidatesTokenCount),typeof n.totalTokenCount=="number"&&(t.totalTokens=n.totalTokenCount))}function zG(e,t,n){Array.isArray(e.functionCalls)&&t.toolCalls.push(...e.functionCalls);for(const r of e.candidates??[]){r?.finishReason&&!t.finishReasons.includes(r.finishReason)&&t.finishReasons.push(r.finishReason);for(const i of r?.content?.parts??[])n&&i.text&&t.responseTexts.push(i.text),i.functionCall&&t.toolCalls.push({type:"function",id:i.functionCall.id,name:i.functionCall.name,arguments:i.functionCall.args})}}function HG(e,t,n,r){!e||jG(e,r)||(qG(e,t),zG(e,t,n))}async function*VG(e,t,n){const r={responseTexts:[],finishReasons:[],toolCalls:[]};try{for await(const i of e)HG(i,r,n,t),yield i}finally{pf(t,r,n)}}function wc(e,t="user"){return typeof e=="string"?[{role:t,content:e}]:Array.isArray(e)?e.flatMap(n=>wc(n,t)):typeof e!="object"||!e?[]:"role"in e&&typeof e.role=="string"?[e]:"parts"in e?[{...e,role:t}]:[{role:t,content:e}]}function e5(e,t){if("model"in e&&typeof e.model=="string")return e.model;if(t&&typeof t=="object"){const n=t;if("model"in n&&typeof n.model=="string")return n.model;if("modelVersion"in n&&typeof n.modelVersion=="string")return n.modelVersion}return"unknown"}function WG(e){const t={};return"temperature"in e&&typeof e.temperature=="number"&&(t[sf]=e.temperature),"topP"in e&&typeof e.topP=="number"&&(t[lf]=e.topP),"topK"in e&&typeof e.topK=="number"&&(t[R8]=e.topK),"maxOutputTokens"in e&&typeof e.maxOutputTokens=="number"&&(t[dh]=e.maxOutputTokens),"frequencyPenalty"in e&&typeof e.frequencyPenalty=="number"&&(t[af]=e.frequencyPenalty),"presencePenalty"in e&&typeof e.presencePenalty=="number"&&(t[fh]=e.presencePenalty),t}function GG(e,t,n){const r={[bc]:BG,[Fr]:e,[it]:"auto.ai.google_genai"};if(t){if(r[Tn]=e5(t,n),"config"in t&&typeof t.config=="object"&&t.config){const i=t.config;if(Object.assign(r,WG(i)),"tools"in i&&Array.isArray(i.tools)){const o=i.tools.flatMap(s=>s.functionDeclarations);r[$c]=JSON.stringify(o)}}}else r[Tn]=e5({},n);return r}function t5(e,t,n,r){if(n){const o=t.contents;o!=null&&e.setAttribute(mh,typeof o=="string"?o:JSON.stringify(o));return}const i=[];if("config"in t&&t.config&&typeof t.config=="object"&&"systemInstruction"in t.config&&t.config.systemInstruction&&i.push(...wc(t.config.systemInstruction,"system")),"history"in t&&i.push(...wc(t.history,"user")),"contents"in t&&i.push(...wc(t.contents,"user")),"message"in t&&i.push(...wc(t.message,"user")),Array.isArray(i)&&i.length){const{systemInstructions:o,filteredMessages:s}=Tc(i);o&&e.setAttribute(vc,o);const a=Array.isArray(s)?s.length:0;e.setAttributes({[_s]:a,[la]:r?da(s):ua(s)})}}function YG(e,t,n){if(!(!t||typeof t!="object")){if(t.modelVersion&&e.setAttribute(aa,t.modelVersion),t.usageMetadata&&typeof t.usageMetadata=="object"){const r=t.usageMetadata;typeof r.promptTokenCount=="number"&&e.setAttributes({[ps]:r.promptTokenCount}),typeof r.candidatesTokenCount=="number"&&e.setAttributes({[ms]:r.candidatesTokenCount}),typeof r.totalTokenCount=="number"&&e.setAttributes({[Eo]:r.totalTokenCount})}if(n&&Array.isArray(t.candidates)&&t.candidates.length>0){const r=t.candidates.map(i=>i.content?.parts&&Array.isArray(i.content.parts)?i.content.parts.map(o=>typeof o.text=="string"?o.text:"").filter(o=>o.length>0).join(""):"").filter(i=>i.length>0);r.length>0&&e.setAttributes({[ui]:r.join("")})}if(n&&t.functionCalls){const r=t.functionCalls;Array.isArray(r)&&r.length>0&&e.setAttributes({[To]:JSON.stringify(r)})}}}function KG(e,t,n,r,i){const o=n.operation==="embeddings";return new Proxy(e,{apply(s,a,l){const c=n.operation||"unknown",u=l[0],d=GG(c,u,r),f=d[Tn]??"unknown";return n.streaming?Wi({name:`${c} ${f}`,op:`gen_ai.${c}`,attributes:d},async p=>{try{i.recordInputs&&u&&t5(p,u,o,Yi(i.enableTruncation));const m=await s.apply(r,l);return VG(m,p,!!i.recordOutputs)}catch(m){throw p.setStatus({code:st,message:"internal_error"}),It(m,{mechanism:{handled:!1,type:"auto.ai.google_genai",data:{function:t}}}),p.end(),m}}):ai({name:`${c} ${f}`,op:`gen_ai.${c}`,attributes:d},p=>(i.recordInputs&&u&&t5(p,u,o,Yi(i.enableTruncation)),P_(()=>s.apply(r,l),m=>{It(m,{mechanism:{handled:!1,type:"auto.ai.google_genai",data:{function:t}}})},()=>{},m=>{o||YG(p,m,i.recordOutputs)})))}})}function bh(e,t="",n){return new Proxy(e,{get:(r,i,o)=>{const s=Reflect.get(r,i,o),a=gh(t,String(i)),l=UG[a];if(typeof s=="function"&&l){const c=l.operation?KG(s,a,l,r,n):s.bind(r);return l.proxyResultPath?function(...u){const d=c(...u);return d&&typeof d=="object"?bh(d,l.proxyResultPath,n):d}:c}return typeof s=="function"?s.bind(r):s&&typeof s=="object"?bh(s,a,n):s}})}function XG(e,t){return bh(e,"",hs(t))}const fa="auto.ai.langchain",JG={human:"user",ai:"assistant",assistant:"assistant",system:"system",function:"function",tool:"tool"},Sr=(e,t,n)=>{n!=null&&(e[t]=n)},ar=(e,t,n)=>{const r=Number(n);Number.isNaN(r)||(e[t]=r)};function gs(e){if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function pa(e){if(Array.isArray(e))try{const t=e.map(n=>n&&typeof n=="object"&&ca(n)?Ec(n):n);return JSON.stringify(t)}catch{return String(e)}return gs(e)}function Ic(e){const t=e.toLowerCase();return JG[t]??t}function n5(e){return e.includes("System")?"system":e.includes("Human")?"user":e.includes("AI")||e.includes("Assistant")?"assistant":e.includes("Function")?"function":e.includes("Tool")?"tool":"user"}function r5(e){if(!(!e||Array.isArray(e)))return e.invocation_params}function vh(e){return e.map(t=>{const n=t._getType;if(typeof n=="function"){const i=n.call(t);return{role:Ic(i),content:pa(t.content)}}if(t.lc===1&&t.kwargs){const i=t.id,o=Array.isArray(i)&&i.length>0?i[i.length-1]:"",s=typeof o=="string"?n5(o):"user";return{role:Ic(s),content:pa(t.kwargs?.content)}}if(t.type){const i=String(t.type).toLowerCase();return{role:Ic(i),content:pa(t.content)}}if(t.role)return{role:Ic(String(t.role)),content:pa(t.content)};const r=t.constructor?.name;return r&&r!=="Object"?{role:Ic(n5(r)),content:pa(t.content)}:{role:"user",content:pa(t.content)}})}function ZG(e,t,n){const r={},i="kwargs"in e?e.kwargs:void 0,o=t?.temperature??n?.ls_temperature??i?.temperature;ar(r,sf,o);const s=t?.max_tokens??n?.ls_max_tokens??i?.max_tokens;ar(r,dh,s);const a=t?.top_p??i?.top_p;ar(r,lf,a);const l=t?.frequency_penalty;ar(r,af,l);const c=t?.presence_penalty;return ar(r,fh,c),t&&"stream"in t&&Sr(r,uh,!!t.stream),r}function i5(e,t,n,r,i){return{[bc]:gs(e??"langchain"),[Fr]:"chat",[Tn]:gs(t),[it]:fa,...ZG(n,r,i)}}function QG(e,t,n,r,i,o){const s=o?.ls_provider,a=i?.model??o?.ls_model_name??"unknown",l=i5(s,a,e,i,o);if(n&&Array.isArray(t)&&t.length>0){Sr(l,_s,t.length);const c=t.map(u=>({role:"user",content:u}));Sr(l,la,r?da(c):ua(c))}return l}function eY(e,t,n,r,i,o){const s=o?.ls_provider??e.id?.[2],a=i?.model??o?.ls_model_name??"unknown",l=i5(s,a,e,i,o);if(n&&Array.isArray(t)&&t.length>0){const c=vh(t.flat()),{systemInstructions:u,filteredMessages:d}=Tc(c);u&&Sr(l,vc,u);const f=Array.isArray(d)?d.length:0;Sr(l,_s,f),Sr(l,la,r?da(d):ua(d))}return l}function tY(e,t){const n=[],r=e.flat();for(const i of r){const s=i.message?.tool_calls;if(Array.isArray(s)&&s.length>0)n.push(...s);else{const a=i.message?.content;if(Array.isArray(a))for(const l of a){const c=l;c.type==="tool_use"&&n.push(c)}}}n.length>0&&Sr(t,To,gs(n))}function nY(e,t){if(!e)return;const n=e.tokenUsage,r=e.usage;if(n)ar(t,ps,n.promptTokens),ar(t,ms,n.completionTokens),ar(t,Eo,n.totalTokens);else if(r){ar(t,ps,r.input_tokens),ar(t,ms,r.output_tokens);const i=Number(r.input_tokens),o=Number(r.output_tokens),s=(Number.isNaN(i)?0:i)+(Number.isNaN(o)?0:o);s>0&&ar(t,Eo,s),r.cache_creation_input_tokens!==void 0&&ar(t,RW,r.cache_creation_input_tokens),r.cache_read_input_tokens!==void 0&&ar(t,OW,r.cache_read_input_tokens)}}function rY(e,t){if(!e)return;const n={};if(Array.isArray(e.generations)){const c=e.generations.flat().map(u=>u.generationInfo?.finish_reason?u.generationInfo.finish_reason:u.generation_info?.finish_reason?u.generation_info.finish_reason:null).filter(u=>typeof u=="string");if(c.length>0&&Sr(n,sa,gs(c)),tY(e.generations,n),t){const u=e.generations.flat().map(d=>d.text??d.message?.content).filter(d=>typeof d=="string");u.length>0&&Sr(n,ui,gs(u))}}nY(e.llmOutput,n);const r=e.llmOutput,o=e.generations?.[0]?.[0]?.message,s=r?.model_name??r?.model??o?.response_metadata?.model_name;s&&Sr(n,aa,s);const a=r?.id??o?.id;a&&Sr(n,cf,a);const l=r?.stop_reason??o?.response_metadata?.finish_reason;return l&&Sr(n,CW,gs(l)),n}function $h(e){const t={},n=e?.lc_agent_name;return typeof n=="string"&&(t[uf]=n),t}function iY(e){const t=e?.invocation_params?.tools??e?.options?.tools;if(!Array.isArray(t)||t.length===0)return;const n=t.map(r=>{const i=r.function;return{type:"function",name:r.name??i?.name??"",description:r.description??i?.description}});return JSON.stringify(n)}function Sh(e={}){const{recordInputs:t,recordOutputs:n}=hs(e),r=Yi(e.enableTruncation),i=new Map,o=a=>{const l=i.get(a);l?.isRecording()&&(l.end(),i.delete(a))},s={lc_serializable:!1,lc_namespace:["langchain_core","callbacks","sentry"],lc_secrets:void 0,lc_attributes:void 0,lc_aliases:void 0,lc_serializable_keys:void 0,lc_id:["langchain_core","callbacks","sentry"],lc_kwargs:{},name:"SentryCallbackHandler",ignoreLLM:!1,ignoreChain:!1,ignoreAgent:!1,ignoreRetriever:!1,ignoreCustomEvent:!1,raiseError:!1,awaitHandlers:!0,handleLLMStart(a,l,c,u,d,f,p,m){const b=r5(f),g=QG(a,l,t,r,b,p),_=g[Tn],y=g[Fr];Wi({name:`${y} ${_}`,op:"gen_ai.chat",attributes:{...$h(p),...g,[yt]:"gen_ai.chat"}},T=>(i.set(c,T),T))},handleChatModelStart(a,l,c,u,d,f,p,m){const b=r5(f),g=eY(a,l,t,r,b,p),_=iY(d);_&&(g[$c]=_);const y=g[Tn],T=g[Fr];Wi({name:`${T} ${y}`,op:"gen_ai.chat",attributes:{...$h(p),...g,[yt]:"gen_ai.chat"}},S=>(i.set(c,S),S))},handleLLMEnd(a,l,c,u,d){const f=i.get(l);if(f?.isRecording()){const p=rY(a,n);p&&f.setAttributes(p),o(l)}},handleLLMError(a,l){const c=i.get(l);c?.isRecording()&&(c.setStatus({code:st,message:"internal_error"}),o(l)),It(a,{mechanism:{handled:!1,type:`${fa}.llm_error_handler`}})},handleChainStart(a,l,c,u,d,f,p,m){if(f?.__sentry_langgraph__)return;const b=m||a.name||"unknown_chain",g={[it]:"auto.ai.langchain","langchain.chain.name":b};t&&(g["langchain.chain.inputs"]=JSON.stringify(l)),Wi({name:`chain ${b}`,op:"gen_ai.invoke_agent",attributes:{...g,[yt]:"gen_ai.invoke_agent"}},_=>(i.set(c,_),_))},handleChainEnd(a,l){const c=i.get(l);c?.isRecording()&&(n&&c.setAttributes({"langchain.chain.outputs":JSON.stringify(a)}),o(l))},handleChainError(a,l){const c=i.get(l);c?.isRecording()&&(c.setStatus({code:st,message:"internal_error"}),o(l)),It(a,{mechanism:{handled:!1,type:`${fa}.chain_error_handler`}})},handleToolStart(a,l,c,u,d,f,p){if(f?.__sentry_langgraph__)return;const m=p||a.name||"unknown_tool",b={...$h(f),[it]:fa,[Fr]:"execute_tool",[D8]:m};t&&(b[F8]=l),Wi({name:`execute_tool ${m}`,op:"gen_ai.execute_tool",attributes:{...b,[yt]:"gen_ai.execute_tool"}},g=>(i.set(c,g),g))},handleToolEnd(a,l){const c=i.get(l);if(c?.isRecording()){if(n){const u=a,d=u&&typeof u=="object"&&"content"in u?u.content:a;c.setAttributes({[U8]:typeof d=="string"?d:JSON.stringify(d)})}o(l)}},handleToolError(a,l){const c=i.get(l);c?.isRecording()&&(c.setStatus({code:st,message:"internal_error"}),o(l)),It(a,{mechanism:{handled:!1,type:`${fa}.tool_error_handler`}})},copy(){return s},toJSON(){return{lc:1,type:"not_implemented",id:s.lc_id}},toJSONNotImplemented(){return{lc:1,type:"not_implemented",id:s.lc_id}}};return s}const Eh="auto.ai.langgraph";function oY(e){const t=e[0];if(typeof t!="object"||!t||!("llm"in t)||!t.llm||typeof t.llm!="object")return null;const n=t.llm;return typeof n.modelName!="string"&&typeof n.model!="string"?null:n}function sY(e){const t=e[0];return typeof t=="object"&&t&&"name"in t&&typeof t.name=="string"?t.name:null}function aY(e,t,n){const r="__sentry_tool_wrapped__";for(const i of e){if(!i||typeof i!="object")continue;const o=i,s=o.invoke;if(typeof s!="function"||Object.prototype.hasOwnProperty.call(o,r))continue;const a=typeof o.name=="string"?o.name:"unknown_tool",l=typeof o.description=="string"?o.description:void 0,c=new Proxy(s,{apply(u,d,f){const p={[it]:Eh,[yt]:L8,[Fr]:"execute_tool",[D8]:a,[LW]:"function"},b=f[1]?.metadata?.lc_agent_name??n;typeof b=="string"&&(p[uf]=b),l&&(p[DW]=l);const g=f[0];if(typeof g=="object"&&g&&("id"in g&&typeof g.id=="string"&&(p[MW]=g.id),t.recordInputs)){const _="args"in g&&typeof g.args=="object"?g.args:g;try{p[F8]=JSON.stringify(_)}catch{}}return ai({op:L8,name:`execute_tool ${a}`,attributes:p},async _=>{try{const y=await Reflect.apply(u,d,f);if(t.recordOutputs)try{const T=y,S=T&&typeof T=="object"&&"content"in T?T.content:y;_.setAttribute(U8,typeof S=="string"?S:JSON.stringify(S))}catch{}return y}catch(y){throw _.setStatus({code:st,message:"internal_error"}),It(y,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),y}})}});o.invoke=c,Object.defineProperty(o,r,{value:!0,enumerable:!1})}return e}function lY(e){if(!e||e.length===0)return null;const t=[];for(const n of e)if(n&&typeof n=="object"){const r=n.tool_calls;r&&Array.isArray(r)&&t.push(...r)}return t.length>0?t:null}function cY(e){const t=e;let n=0,r=0,i=0;if(t.usage_metadata&&typeof t.usage_metadata=="object"){const o=t.usage_metadata;return typeof o.input_tokens=="number"&&(n=o.input_tokens),typeof o.output_tokens=="number"&&(r=o.output_tokens),typeof o.total_tokens=="number"&&(i=o.total_tokens),{inputTokens:n,outputTokens:r,totalTokens:i}}if(t.response_metadata&&typeof t.response_metadata=="object"){const o=t.response_metadata;if(o.tokenUsage&&typeof o.tokenUsage=="object"){const s=o.tokenUsage;typeof s.promptTokens=="number"&&(n=s.promptTokens),typeof s.completionTokens=="number"&&(r=s.completionTokens),typeof s.totalTokens=="number"&&(i=s.totalTokens)}}return{inputTokens:n,outputTokens:r,totalTokens:i}}function uY(e,t){const n=t;if(n.response_metadata&&typeof n.response_metadata=="object"){const r=n.response_metadata;r.model_name&&typeof r.model_name=="string"&&e.setAttribute(aa,r.model_name),r.finish_reason&&typeof r.finish_reason=="string"&&e.setAttribute(sa,[r.finish_reason])}}function dY(e){if(!e.builder?.nodes?.tools?.runnable?.tools)return null;const t=e.builder?.nodes?.tools?.runnable?.tools;return!t||!Array.isArray(t)||t.length===0?null:t.map(n=>({name:n.lc_kwargs?.name,description:n.lc_kwargs?.description,schema:n.lc_kwargs?.schema}))}function fY(e,t,n){const i=n?.messages;if(!i||!Array.isArray(i))return;const o=t?.length??0,s=i.length>o?i.slice(o):[];if(s.length===0)return;const a=lY(s);a&&e.setAttribute(To,JSON.stringify(a));const l=vh(s);e.setAttribute(ui,JSON.stringify(l));let c=0,u=0,d=0;for(const f of s){const p=cY(f);c+=p.inputTokens,u+=p.outputTokens,d+=p.totalTokens,uY(e,f)}c>0&&e.setAttribute(ps,c),u>0&&e.setAttribute(ms,u),d>0&&e.setAttribute(Eo,d)}function pY(e,t){if(!e)return[t];if(Array.isArray(e))return e.includes(t)?e:[...e,t];const n=e;return typeof n.addHandler=="function"&&(Array.isArray(n.handlers)&&n.handlers.includes(t)||n.addHandler(t)),e}let Th=!1;const _f="__sentry_patched__";function mY(e,t){if(Object.prototype.hasOwnProperty.call(e,_f))return e;const n=Sh(t),r=new Proxy(e,{apply(i,o,s){return Th?Reflect.apply(i,o,s):ai({op:"gen_ai.create_agent",name:"create_agent",attributes:{[it]:Eh,[yt]:"gen_ai.create_agent",[Fr]:"create_agent"}},a=>{try{const l=Reflect.apply(i,o,s),c=s.length>0?s[0]:{};c?.name&&typeof c.name=="string"&&(a.setAttribute(uf,c.name),a.updateName(`create_agent ${c.name}`));const u=l.invoke;return u&&typeof u=="function"&&(l.invoke=o5(u.bind(l),l,c,t,void 0,n)),l}catch(l){throw a.setStatus({code:st,message:"internal_error"}),It(l,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),l}})}});return Object.defineProperty(r,_f,{value:!0,enumerable:!1}),r}function o5(e,t,n,r,i,o){return new Proxy(e,{apply(s,a,l){const c=i?.modelName??i?.model;return ai({op:"gen_ai.invoke_agent",name:"invoke_agent",attributes:{[it]:Eh,[yt]:PW,[Fr]:"invoke_agent"}},async u=>{try{const d=n?.name;d&&typeof d=="string"&&(u.setAttribute(NW,d),u.setAttribute(uf,d),u.updateName(`invoke_agent ${d}`)),c&&u.setAttribute(Tn,c);const m=(l.length>1?l[1]:void 0)?.configurable?.thread_id;if(m&&typeof m=="string"&&u.setAttribute(ph,m),o){const S=l[1]??{};l[1]=S;const O=S.metadata??{};S.metadata={...O,__sentry_langgraph__:!0,...typeof d=="string"?{lc_agent_name:d}:{}},S.callbacks=pY(S.callbacks,o)}const b=dY(t);b&&u.setAttribute($c,JSON.stringify(b));const g=r.recordInputs,_=r.recordOutputs,y=l.length>0?l[0]?.messages??[]:[];if(y&&g){const S=vh(y),{systemInstructions:O,filteredMessages:N}=Tc(S);O&&u.setAttribute(vc,O);const w=Yi(r.enableTruncation),D=Array.isArray(N)?N.length:0;u.setAttributes({[la]:w?da(N):ua(N),[_s]:D})}const T=await Reflect.apply(s,a,l);return _&&fY(u,y??null,T),T}catch(d){throw u.setStatus({code:st,message:"internal_error"}),It(d,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),d}})}})}function _Y(e,t){if(Object.prototype.hasOwnProperty.call(e,_f))return e;const n=hs(t),r=Sh(n),i=new Proxy(e,{apply(o,s,a){const l=oY(a),c=sY(a),u=a[0];u&&Array.isArray(u.tools)&&u.tools.length>0&&aY(u.tools,n,c??void 0),Th=!0;let d;try{d=Reflect.apply(o,s,a)}finally{Th=!1}const f=d.invoke;if(f&&typeof f=="function"){const p={};c&&(p.name=c),d.invoke=o5(f.bind(d),d,p,n,l,r)}return d}});return Object.defineProperty(i,_f,{value:!0,enumerable:!1}),i}function hY(e,t){return e.compile=mY(e.compile,hs(t)),e}function gY(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function yY(){return"npm"}function bY(){return!gY()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function Ac(){return typeof window<"u"&&(!bY()||vY())}function vY(){return je.process?.type==="renderer"}function $Y(e,t,n){const r=n.getOptions(),i=n.getDsn(),o=r.tunnel,s=pc(r._metadata),a={sent_at:new Date().toISOString(),...SY(t)&&{trace:t},...s&&{sdk:s},...!!o&&i&&{dsn:si(i)}},l=r.sendDefaultPii?"auto":"never",c=[{type:"span",item_count:e.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...Ac()&&{ingest_settings:{infer_ip:l,infer_user_agent:l}},items:e}];return vr(a,[c])}function SY(e){return!!e.trace_id&&!!e.public_key}function EY(e){let t=156;if(t+=e.name.length*2,t+=c$(e.attributes),e.links&&e.links.length>0){const r=e.links[0]?.attributes,i=100+(r?c$(r):0);t+=i*e.links.length}return t}const s5=1e3,TY=5e6;class wY{constructor(t,n){this._traceBuckets=new Map,this._client=t;const{maxSpanLimit:r,flushInterval:i,maxTraceWeightInBytes:o}=n??{};this._maxSpanLimit=r&&r>0&&r<=s5?r:s5,this._flushInterval=i&&i>0?i:5e3,this._maxTraceWeight=o&&o>0?o:TY,this._client.on("flush",()=>{this.drain()}),this._client.on("close",()=>{this._traceBuckets.forEach(s=>{clearTimeout(s.timeout)}),this._traceBuckets.clear()})}add(t){const n=t.trace_id;let r=this._traceBuckets.get(n);r||(r={spans:new Set,size:0,timeout:Kd(setTimeout(()=>{this.flush(n)},this._flushInterval))},this._traceBuckets.set(n,r)),r.spans.add(t),r.size+=EY(t),(r.spans.size>=this._maxSpanLimit||r.size>=this._maxTraceWeight)&&this.flush(n)}drain(){this._traceBuckets.size&&(Ee&&B.log(`Flushing span tree map with ${this._traceBuckets.size} traces`),this._traceBuckets.forEach((t,n)=>{this.flush(n)}))}flush(t){const n=this._traceBuckets.get(t);if(!n)return;if(!n.spans.size){this._removeTrace(t);return}const r=Array.from(n.spans),i=r[0]?._segmentSpan;if(!i){Ee&&B.warn("No segment span reference found on span JSON, cannot compute DSC"),this._removeTrace(t);return}const o=br(i),s=r.map(l=>{const{_segmentSpan:c,...u}=l;return u}),a=$Y(s,o,this._client);Ee&&B.log(`Sending span envelope for trace ${t} with ${s.length} spans`),this._client.sendEnvelope(a).then(null,l=>{Ee&&B.error("Error while sending streamed span envelope:",l)}),this._removeTrace(t)}_removeTrace(t){const n=this._traceBuckets.get(t);n&&clearTimeout(n.timeout),this._traceBuckets.delete(t)}}function a5(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const ma=je;function IY(){return"history"in ma&&!!ma.history}function AY(){if(!("fetch"in ma))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function wh(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function l5(){if(typeof EdgeRuntime=="string")return!0;if(!AY())return!1;if(wh(ma.fetch))return!0;let e=!1;const t=ma.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=wh(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){Ee&&B.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function xY(){return"ReportingObserver"in ma}function Ih(e,t){const n="fetch",r=go(n,e);return yo(n,()=>c5(void 0,t)),r}function CY(e){const t="fetch-body-resolved",n=go(t,e);return yo(t,()=>c5(NY)),n}function c5(e,t=!1){t&&!l5()||$n(je,"fetch",function(n){return function(...r){const i=new Error,{method:o,url:s}=RY(r),a={args:r,fetchData:{method:o,url:s},startTimestamp:Ct()*1e3,virtualError:i,headers:OY(r)};return e||gr("fetch",{...a}),n.apply(je,r).then(async l=>(e?e(l):gr("fetch",{...a,endTimestamp:Ct()*1e3,response:l}),l),l=>{gr("fetch",{...a,endTimestamp:Ct()*1e3,error:l}),Di(l)&&l.stack===void 0&&(l.stack=i.stack,Sn(l,"framesToPop",1));const u=Ie()?.getOptions().enhanceFetchErrorMessages??"always";if(u!==!1&&l instanceof TypeError&&(l.message==="Failed to fetch"||l.message==="Load failed"||l.message==="NetworkError when attempting to fetch resource."))try{const p=new URL(a.fetchData.url).host;u==="always"?l.message=`${l.message} (${p})`:Sn(l,"__sentry_fetch_url_host__",p)}catch{}throw l})}})}async function kY(e,t){if(e?.body){const n=e.body,r=n.getReader(),i=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let o=!0;for(;o;){let s;try{s=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:a}=await r.read();clearTimeout(s),a&&(t(),o=!1)}catch{o=!1}finally{clearTimeout(s)}}clearTimeout(i),r.releaseLock(),n.cancel().then(null,()=>{})}}function NY(e){let t;try{t=e.clone()}catch{return}kY(t,()=>{gr("fetch-body-resolved",{endTimestamp:Ct()*1e3,response:e})})}function hf(e,t){return!!e&&typeof e=="object"&&!!e[t]}function u5(e){return typeof e=="string"?e:e?hf(e,"url")?e.url:e.toString?e.toString():"":""}function RY(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:u5(n),method:hf(r,"method")?String(r.method).toUpperCase():b_(n)&&hf(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:u5(t),method:hf(t,"method")?String(t.method).toUpperCase():"GET"}}function OY(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(b_(t))return new Headers(t.headers)}catch{}}function PY(e){const t=e.constructor?.name??"";return t.includes("OpenAI")?"openai":t.includes("Google")?"google_genai":t.includes("Mistral")?"mistralai":t.includes("Vertex")?"google_vertexai":t.includes("Bedrock")?"aws_bedrock":t.includes("Ollama")?"ollama":t.includes("Cloudflare")?"cloudflare":t.includes("Cohere")?"cohere":"langchain"}function MY(e){const t=e??{},n={[it]:fa,[yt]:M8,[Fr]:"embeddings",[Tn]:t.model??"unknown"};return n[bc]=PY(t),"dimensions"in t&&(n[P8]=t.dimensions),"encodingFormat"in t&&(n[O8]=t.encodingFormat),n}function d5(e,t={}){const{recordInputs:n}=hs(t);return new Proxy(e,{apply(r,i,o){const s=MY(i),a=s[Tn]||"unknown";if(n){const l=o[0];l!=null&&(s[mh]=typeof l=="string"?l:JSON.stringify(l))}return ai({name:`embeddings ${a}`,op:M8,attributes:s},()=>Reflect.apply(r,i,o).then(void 0,l=>{throw It(l,{mechanism:{handled:!1,type:"auto.ai.langchain"}}),l}))}})}function LY(e,t){const n=e;return typeof n.embedQuery=="function"&&(n.embedQuery=d5(n.embedQuery,t)),typeof n.embedDocuments=="function"&&(n.embedDocuments=d5(n.embedDocuments,t)),e}const Ur=je,kt=Ur.document,xc=Ur.navigator,f5="Report a Bug",DY="Cancel",FY="Send Bug Report",UY="Confirm",BY="Report a Bug",jY="your.email@example.org",qY="Email",zY="What's the bug? What did you expect?",HY="Description",VY="Your Name",WY="Name",GY="Thank you for your report!",YY="(required)",KY="Add a screenshot",XY="Remove screenshot",JY="Highlight",ZY="Hide",QY="Remove",p5="Unable to submit feedback with empty message",m5="No client setup, cannot send feedback.",_5="Unable to determine if Feedback was correctly sent.",h5="Unable to send feedback. This could be because this domain is not in your list of allowed domains.",g5="Unable to send feedback. This could be because of network issues, or because you are using an ad-blocker.",eK="widget",tK="api",nK=5e3,rK={ERROR_EMPTY_MESSAGE:p5,ERROR_NO_CLIENT:m5,ERROR_TIMEOUT:_5,ERROR_FORBIDDEN:h5,ERROR_GENERIC:g5};function gf(e,t){return t?.[e]??rK[e]}function y5(e,t){return new Error(gf(e,t))}const b5=(e,t={includeReplay:!0})=>{const n=t.errorMessages;if(!e.message)throw y5("ERROR_EMPTY_MESSAGE",n);const r=Ie();if(!r)throw y5("ERROR_NO_CLIENT",n);e.tags&&Object.keys(e.tags).length&&Ke().setTags(e.tags);const i=x8({source:tK,url:ns(),...e},t);return new Promise((o,s)=>{const a=setTimeout(()=>{l(),s(gf("ERROR_TIMEOUT",n))},3e4),l=r.on("afterSendEvent",(c,u)=>{if(c.event_id===i)return clearTimeout(a),l(),u?.statusCode&&u.statusCode>=200&&u.statusCode<300?o(i):u?.statusCode===403?s(gf("ERROR_FORBIDDEN",n)):s(gf("ERROR_GENERIC",n))})})},yf=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function iK(){return!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(xc.userAgent)||/Macintosh/i.test(xc.userAgent)&&xc.maxTouchPoints&&xc.maxTouchPoints>1||!isSecureContext)}function bf(e,t){return{...e,...t,tags:{...e.tags,...t.tags},onFormOpen:()=>{t.onFormOpen?.(),e.onFormOpen?.()},onFormClose:()=>{t.onFormClose?.(),e.onFormClose?.()},onSubmitSuccess:(n,r)=>{t.onSubmitSuccess?.(n,r),e.onSubmitSuccess?.(n,r)},onSubmitError:n=>{t.onSubmitError?.(n),e.onSubmitError?.(n)},onFormSubmitted:()=>{t.onFormSubmitted?.(),e.onFormSubmitted?.()},themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function oK(e){const t=kt.createElement("style");return t.textContent=`
|
|
47
|
+
${i.stack}`:"unknown"}}}}}const qV=((e={})=>{const t=e.limit??MV;return{name:LV,processEvent(n,r){return jV(t,e.saveZodIssuesAsAttachment,n,r)}}}),zV=e=>({name:"ThirdPartyErrorsFilter",setup(t){t.on("beforeEnvelope",n=>{ls(n,(r,i)=>{if(i==="event"){const o=Array.isArray(r)?r[1]:void 0;o&&(p8(o),r[1]=o)}})}),t.on("applyFrameMetadata",n=>{if(n.type)return;const r=t.getOptions().stackParser;f8(r,n)})},processEvent(t){const n=VV(t,e.ignoreSentryInternalFrames);if(n){const r=e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="apply-tag-if-contains-third-party-frames"?"some":"every";if(n[r](o=>!o.some(s=>e.filterKeys.includes(s)))){if(e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="drop-error-if-exclusively-contains-third-party-frames")return null;t.tags={...t.tags,third_party_code:!0}}}return t}});function HV(e,t){if(t!==0||!e.context_line||!e.filename||!e.filename.includes("sentry")||!e.filename.includes("helpers")||!e.context_line.includes(GV))return!1;if(e.pre_context){const n=e.pre_context.length;for(let r=0;r<n;r++)if(e.pre_context[r]?.includes(WV))return!0}return!1}function VV(e,t){const n=h_(e);if(n)return n.filter((r,i)=>!r.filename||r.lineno==null&&r.colno==null&&r.instruction_addr==null?!1:!t||!HV(r,i)).map(r=>r.module_metadata?Object.keys(r.module_metadata).filter(i=>i.startsWith(w8)).map(i=>i.slice(w8.length)):[])}const w8="_sentryBundlerPluginAppKey:",WV="Attempt to invoke user-land function",GV="fn.apply(this, wrappedArguments)",YV=100,KV=10,nf="flag.evaluation.";function ia(e){if(e.type)return e;const n=Ke().getScopeData().contexts.flags,r=n?n.values:[];return r.length&&(e.contexts===void 0&&(e.contexts={}),e.contexts.flags={values:[...r]}),e}function ds(e,t,n=YV){const r=Ke().getScopeData().contexts;r.flags||(r.flags={values:[]});const i=r.flags.values;XV(i,e,t,n)}function XV(e,t,n,r){if(typeof n!="boolean")return;if(e.length>r){Ee&&B.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${r}`);return}const i=e.findIndex(o=>o.flag===t);i!==-1&&e.splice(i,1),e.length===r&&e.shift(),e.push({flag:t,result:n})}function fs(e,t,n=KV){if(typeof t!="boolean")return;const r=Ht();if(!r)return;const i=Je(r).data;if(`${nf}${e}`in i){r.setAttribute(`${nf}${e}`,t);return}Object.keys(i).filter(s=>s.startsWith(nf)).length<n&&r.setAttribute(`${nf}${e}`,t)}const JV=()=>({name:"FeatureFlags",processEvent(e,t,n){return ia(e)},addFeatureFlag(e,t){ds(e,t),fs(e,t)}}),ZV=({growthbookClass:e})=>({name:"GrowthBook",setupOnce(){const t=e.prototype;typeof t.isOn=="function"&&$n(t,"isOn",I8),typeof t.getFeatureValue=="function"&&$n(t,"getFeatureValue",I8)},processEvent(t,n,r){return ia(t)}});function I8(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"&&(ds(n,r),fs(n,r)),r}}const QV="ConversationId",eW=(()=>({name:QV,setup(e){e.on("spanStart",t=>{const n=Ke().getScopeData(),r=qt().getScopeData(),i=n.conversationId||r.conversationId;if(i){const{op:o,data:s,description:a}=Je(t);if(!o?.startsWith("gen_ai.")&&!s["ai.operationId"]&&!a?.startsWith("ai."))return;t.setAttribute(lq,i)}})}}));function tW(e,t,n,r,i){if(!e.fetchData)return;const{method:o,url:s}=e.fetchData,a=or()&&t(s);if(e.endTimestamp){const p=e.fetchData.__span;if(!p)return;const m=r[p];m&&(a&&(iW(m,e),nW(m,e,i)),delete r[p]);return}const{spanOrigin:l="auto.http.browser",propagateTraceparent:c=!1}=typeof i=="object"?i:{spanOrigin:i},u=Ie(),d=!!Ht(),f=a&&d?li(aW(s,o,l)):new sr;if(a&&!d&&u?.recordDroppedEvent("no_parent_span","span"),e.fetchData.__span=f.spanContext().spanId,r[f.spanContext().spanId]=f,n(e.fetchData.url)){const p=e.args[0],m={...e.args[1]||{}},b=rW(p,m,or()&&d?f:void 0,c);b&&(e.args[1]=m,m.headers=b)}if(u){const p={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};u.emit("beforeOutgoingRequestSpan",f,p)}return f}function nW(e,t,n){(typeof n=="object"&&n!==null?n.onRequestSpanEnd:void 0)?.(e,{headers:t.response?.headers,error:t.error})}function rW(e,t,n,r){const i=oh({span:n,propagateTraceparent:r}),o=i["sentry-trace"],s=i.baggage,a=i.traceparent;if(!o)return;const l=t.headers||(b_(e)?e.headers:void 0);if(l)if(oW(l)){const c=new Headers(l);if(c.get("sentry-trace")||c.set("sentry-trace",o),r&&a&&!c.get("traceparent")&&c.set("traceparent",a),s){const u=c.get("baggage");u?rf(u)||c.set("baggage",`${u},${s}`):c.set("baggage",s)}return c}else if(sW(l)){const c=[...l];c.find(d=>d[0]==="sentry-trace")||c.push(["sentry-trace",o]),r&&a&&!c.find(d=>d[0]==="traceparent")&&c.push(["traceparent",a]);const u=l.find(d=>d[0]==="baggage"&&typeof d[1]=="string"&&rf(d[1]));return s&&!u&&c.push(["baggage",s]),c}else{const c="sentry-trace"in l?l["sentry-trace"]:void 0,u="traceparent"in l?l.traceparent:void 0,d="baggage"in l?l.baggage:void 0,f=d?Array.isArray(d)?[...d]:[d]:[],p=d&&(Array.isArray(d)?d.find(b=>rf(b)):rf(d));s&&!p&&f.push(s);const m=Object.assign({},l,{"sentry-trace":c??o,baggage:f.length>0?f.join(","):void 0});return r&&a&&!u&&(m.traceparent=a),m}else return{...i}}function iW(e,t){if(t.response){cc(e,t.response.status);const n=t.response?.headers?.get("content-length");if(n){const r=parseInt(n);r>0&&e.setAttribute("http.response_content_length",r)}}else t.error&&e.setStatus({code:st,message:"internal_error"});e.end()}function rf(e){return typeof e!="string"?!1:e.split(",").some(t=>t.trim().startsWith(Pd))}function oW(e){return typeof Headers<"u"&&Ui(e,Headers)}function sW(e){return Array.isArray(e)?e.every(t=>Array.isArray(t)&&t.length===2&&typeof t[0]=="string"):!1}function aW(e,t,n){if(e.startsWith("data:")){const o=So(e);return{name:`${t} ${o}`,attributes:A8(e,void 0,t,n)}}const r=ih(e),i=r?OH(r):e;return{name:`${t} ${i}`,attributes:A8(e,r,t,n)}}function A8(e,t,n,r){const i={url:So(e),type:"fetch","http.method":n,[it]:r,[yt]:"http.client"};return t&&(rh(t)||(i["http.url"]=So(t.href),i["server.address"]=t.host),t.search&&(i["http.query"]=t.search),t.hash&&(i["http.fragment"]=t.hash)),i}function x8(e,t={},n=Ke()){const{message:r,name:i,email:o,url:s,source:a,associatedEventId:l,tags:c}=e,u={contexts:{feedback:{contact_email:o,name:i,message:r,url:s,source:a,associated_event_id:l}},type:"feedback",level:"info",tags:c},d=n?.getClient()||Ie();return d&&d.emit("beforeSendFeedback",u,t),n.captureEvent(u,t)}function oa(e,t,n,r,i){Gd({level:e,message:t,attributes:n,severityNumber:i},r)}function lW(e,t,{scope:n}={}){oa("trace",e,t,n)}function cW(e,t,{scope:n}={}){oa("debug",e,t,n)}function uW(e,t,{scope:n}={}){oa("info",e,t,n)}function dW(e,t,{scope:n}={}){oa("warn",e,t,n)}function fW(e,t,{scope:n}={}){oa("error",e,t,n)}function pW(e,t,{scope:n}={}){oa("fatal",e,t,n)}const mW=Object.freeze(Object.defineProperty({__proto__:null,debug:cW,error:fW,fatal:pW,fmt:DH,info:uW,trace:lW,warn:dW},Symbol.toStringTag,{value:"Module"}));function of(e,t,n){return"util"in je&&typeof je.util.format=="function"?je.util.format(...e):_W(e,t,n)}function _W(e,t,n){return e.map(r=>Fi(r)?String(r):JSON.stringify(En(r,t,n))).join(" ")}function C8(e){return/%[sdifocO]/.test(e)}function k8(e,t){const n={},r=new Array(t.length).fill("{}").join(" ");return n["sentry.message.template"]=`${e} ${r}`,t.forEach((i,o)=>{n[`sentry.message.parameter.${o}`]=i}),n}const hW="ConsoleLogs",N8={[it]:"auto.log.console"},gW=((e={})=>{const t=e.levels||f_;return{name:hW,setup(n){const{enableLogs:r,normalizeDepth:i=3,normalizeMaxBreadth:o=1e3}=n.getOptions();if(!r){Ee&&B.warn("`enableLogs` is not enabled, ConsoleLogs integration disabled");return}const s=ah(({args:a,level:l})=>{if(Ie()!==n||!t.includes(l))return;const c=a[0],u=a.slice(1);if(l==="assert"){if(!c){const m=u.length>0?`Assertion failed: ${of(u,i,o)}`:"Assertion failed";Gd({level:"error",message:m,attributes:N8})}return}const d=l==="log",f=a.length>1&&typeof a[0]=="string"&&!C8(a[0]),p={...N8,...f?k8(c,u):{}};Gd({level:d?"info":l,message:of(a,i,o),severityNumber:d?10:void 0,attributes:p})});n.registerCleanup(s)}}});function lh(e,t,n,r){pH({type:e,name:t,value:n,unit:r?.unit,attributes:r?.attributes},{scope:r?.scope})}function yW(e,t=1,n){lh("counter",e,t,n)}function bW(e,t,n){lh("gauge",e,t,n)}function ch(e,t,n){lh("distribution",e,t,n)}const vW=Object.freeze(Object.defineProperty({__proto__:null,count:yW,distribution:ch,gauge:bW},Symbol.toStringTag,{value:"Module"})),$W=["trace","debug","info","warn","error","fatal"];function SW(e={}){const t=new Set(e.levels??$W),n=e.client;return{log(r){const{type:i,level:o,message:s,args:a,tag:l,date:c,...u}=r,d=n||Ie();if(!d)return;const f=wW(i,o);if(!t.has(f))return;const{normalizeDepth:p=3,normalizeMaxBreadth:m=1e3}=d.getOptions(),b={};for(const[_,y]of Object.entries(u))b[_]=En(y,p,m);b["sentry.origin"]="auto.log.consola",l&&(b["consola.tag"]=l),i&&(b["consola.type"]=i),o!=null&&typeof o=="number"&&(b["consola.level"]=o);const g=AW(IW(a,p,m),p,m);g?.attributes&&Object.assign(b,g.attributes),Gd({level:f,message:g?.message||s||a&&of(a,p,m)||"",attributes:b})}}}const EW={silent:"trace",fatal:"fatal",error:"error",warn:"warn",log:"info",info:"info",success:"info",fail:"error",ready:"info",start:"info",box:"info",debug:"debug",trace:"trace",verbose:"debug",critical:"fatal",notice:"info"},TW={0:"fatal",1:"warn",2:"info",3:"info",4:"debug",5:"trace"};function wW(e,t){if(e==="verbose")return"debug";if(e==="silent")return"trace";if(e){const n=EW[e];if(n)return n}if(typeof t=="number"){const n=TW[t];if(n)return n}return"info"}function IW(e,t,n){if(!e?.length)return{message:""};const r=of(e,t,n),i=e[0];if(Xn(i)){const o=typeof e[1]=="string"?2:1,s=e.slice(o);return{message:r,attributes:i,messageParameters:s}}else{const o=e.slice(1),s=o.length>0&&typeof i=="string"&&!C8(i);return{message:r,messageTemplate:s?i:void 0,messageParameters:s?o:void 0}}}function AW(e,t,n){const{message:r,attributes:i,messageTemplate:o,messageParameters:s}=e,a={};if(o&&s){const l=k8(o,s);for(const[c,u]of Object.entries(l))a[c]=c.startsWith("sentry.message.parameter.")?En(u,t,n):u}else s&&s.length>0&&s.forEach((l,c)=>{a[`sentry.message.parameter.${c}`]=En(l,t,n)});return{message:r,attributes:{...En(i,t,n),...a}}}const xW="gen_ai.prompt",bc="gen_ai.system",Tn="gen_ai.request.model",uh="gen_ai.request.stream",sf="gen_ai.request.temperature",dh="gen_ai.request.max_tokens",af="gen_ai.request.frequency_penalty",fh="gen_ai.request.presence_penalty",lf="gen_ai.request.top_p",R8="gen_ai.request.top_k",O8="gen_ai.request.encoding_format",P8="gen_ai.request.dimensions",sa="gen_ai.response.finish_reasons",aa="gen_ai.response.model",cf="gen_ai.response.id",CW="gen_ai.response.stop_reason",ps="gen_ai.usage.input_tokens",ms="gen_ai.usage.output_tokens",Eo="gen_ai.usage.total_tokens",Fr="gen_ai.operation.name",_s="sentry.sdk_meta.gen_ai.input.messages.original_length",la="gen_ai.input.messages",vc="gen_ai.system_instructions",ui="gen_ai.response.text",$c="gen_ai.request.available_tools",kW="gen_ai.response.streaming",To="gen_ai.response.tool_calls",uf="gen_ai.agent.name",NW="gen_ai.pipeline.name",ph="gen_ai.conversation.id",RW="gen_ai.usage.cache_creation_input_tokens",OW="gen_ai.usage.cache_read_input_tokens",PW="gen_ai.invoke_agent",mh="gen_ai.embeddings.input",M8="gen_ai.embeddings",L8="gen_ai.execute_tool",D8="gen_ai.tool.name",MW="gen_ai.tool.call.id",LW="gen_ai.tool.type",F8="gen_ai.tool.input",U8="gen_ai.tool.output",DW="gen_ai.tool.description";function ca(e){return!e||typeof e!="object"?!1:UW(e)||j8(e)||FW(e)||q8(e)||z8(e)||BW(e)||jW(e)||qW(e)||zW(e)||HW(e)||VW(e)||WW(e)}function FW(e){return"image_url"in e?typeof e.image_url=="string"?e.image_url.startsWith("data:"):B8(e):!1}function B8(e){return"image_url"in e&&!!e.image_url&&typeof e.image_url=="object"&&"url"in e.image_url&&typeof e.image_url.url=="string"&&e.image_url.url.startsWith("data:")}function UW(e){return"type"in e&&typeof e.type=="string"&&"source"in e&&ca(e.source)}function j8(e){return"inlineData"in e&&!!e.inlineData&&typeof e.inlineData=="object"&&"data"in e.inlineData&&typeof e.inlineData.data=="string"}function q8(e){return"type"in e&&e.type==="input_audio"&&"input_audio"in e&&!!e.input_audio&&typeof e.input_audio=="object"&&"data"in e.input_audio&&typeof e.input_audio.data=="string"}function z8(e){return"type"in e&&e.type==="file"&&"file"in e&&!!e.file&&typeof e.file=="object"&&"file_data"in e.file&&typeof e.file.file_data=="string"}function BW(e){return"media_type"in e&&typeof e.media_type=="string"&&"data"in e}function jW(e){return"type"in e&&e.type==="file"&&"mediaType"in e&&typeof e.mediaType=="string"&&"data"in e&&typeof e.data=="string"&&!e.data.startsWith("http://")&&!e.data.startsWith("https://")}function qW(e){return"type"in e&&e.type==="image"&&"image"in e&&typeof e.image=="string"&&!e.image.startsWith("http://")&&!e.image.startsWith("https://")}function zW(e){return"type"in e&&(e.type==="blob"||e.type==="base64")}function HW(e){return"b64_json"in e}function VW(e){return"type"in e&&"result"in e&&e.type==="image_generation"}function WW(e){return"uri"in e&&typeof e.uri=="string"&&e.uri.startsWith("data:")}const Sc="[Blob substitute]",GW=["image_url","data","content","b64_json","result","uri","image"];function Ec(e){const t={...e};ca(t.source)&&(t.source=Ec(t.source)),j8(e)&&(t.inlineData={...e.inlineData,data:Sc}),B8(e)&&(t.image_url={...e.image_url,url:Sc}),q8(e)&&(t.input_audio={...e.input_audio,data:Sc}),z8(e)&&(t.file={...e.file,file_data:Sc});for(const n of GW)typeof t[n]=="string"&&(t[n]=Sc);return t}const H8=2e4,df=e=>new TextEncoder().encode(e).length,_h=e=>df(JSON.stringify(e));function ff(e,t){if(df(e)<=t)return e;let n=0,r=e.length,i="";for(;n<=r;){const o=Math.floor((n+r)/2),s=e.slice(0,o);df(s)<=t?(i=s,n=o+1):r=o-1}return i}function YW(e){return typeof e=="string"?e:"text"in e&&typeof e.text=="string"?e.text:""}function V8(e,t){return typeof e=="string"?t:{...e,text:t}}function KW(e){return e!==null&&typeof e=="object"&&"content"in e&&typeof e.content=="string"}function W8(e){return e!==null&&typeof e=="object"&&"content"in e&&Array.isArray(e.content)}function G8(e){return e!==null&&typeof e=="object"&&"parts"in e&&Array.isArray(e.parts)&&e.parts.length>0}function XW(e,t){const n={...e,content:""},r=_h(n),i=t-r;if(i<=0)return[];const o=ff(e.content,i);return[{...e,content:o}]}function JW(e){return"parts"in e&&Array.isArray(e.parts)?{key:"parts",items:e.parts}:"content"in e&&Array.isArray(e.content)?{key:"content",items:e.content}:{key:null,items:[]}}function ZW(e,t){const{key:n,items:r}=JW(e);if(n===null||r.length===0)return[];const i=r.map(l=>V8(l,"")),o=_h({...e,[n]:i});let s=t-o;if(s<=0)return[];const a=[];for(const l of r){const c=YW(l),u=df(c);if(u<=s)a.push(l),s-=u;else if(a.length===0){const d=ff(c,s);d&&a.push(V8(l,d));break}else break}return a.length<=0?[]:[{...e,[n]:a}]}function QW(e,t){if(!e)return[];if(typeof e=="string"){const n=ff(e,t);return n?[n]:[]}return typeof e!="object"?[]:KW(e)?XW(e,t):W8(e)||G8(e)?ZW(e,t):[]}function hh(e){return e.map(n=>{let r;return n&&typeof n=="object"&&(W8(n)?r={...n,content:hh(n.content)}:"content"in n&&ca(n.content)&&(r={...n,content:Ec(n.content)}),G8(n)&&(r={...r??n,parts:hh(n.parts)}),ca(r)?r=Ec(r):ca(n)&&(r=Ec(n))),r??n})}function eG(e,t){if(!Array.isArray(e)||e.length===0)return e;const n=t-2,r=e[e.length-1],i=hh([r]),o=i[0];return _h(o)<=n?i:QW(o,n)}function tG(e){return eG(e,H8)}function nG(e){return ff(e,H8)}function hs(e){const t=!!Ie()?.getOptions().sendDefaultPii;return{...e,recordInputs:e?.recordInputs??t,recordOutputs:e?.recordOutputs??t}}function Yi(e){const t=Ie();return e??!(t&&Vi(t))}function gh(e,t){return e?`${e}.${t}`:t}function rG(e,t,n,r,i){if(t!==void 0&&e.setAttributes({[ps]:t}),n!==void 0&&e.setAttributes({[ms]:n}),t!==void 0||n!==void 0||r!==void 0||i!==void 0){const o=(t??0)+(n??0)+(r??0)+(i??0);e.setAttributes({[Eo]:o})}}function pf(e,t,n){if(!e.isRecording())return;const r={[kW]:!0};t.responseId&&(r[cf]=t.responseId),t.responseModel&&(r[aa]=t.responseModel),t.promptTokens!==void 0&&(r[ps]=t.promptTokens),t.completionTokens!==void 0&&(r[ms]=t.completionTokens),t.totalTokens!==void 0?r[Eo]=t.totalTokens:(t.promptTokens!==void 0||t.completionTokens!==void 0||t.cacheCreationInputTokens!==void 0||t.cacheReadInputTokens!==void 0)&&(r[Eo]=(t.promptTokens??0)+(t.completionTokens??0)+(t.cacheCreationInputTokens??0)+(t.cacheReadInputTokens??0)),t.finishReasons.length&&(r[sa]=JSON.stringify(t.finishReasons)),n&&t.responseTexts.length&&(r[ui]=t.responseTexts.join("")),n&&t.toolCalls.length&&(r[To]=JSON.stringify(t.toolCalls)),e.setAttributes(r),e.end()}function ua(e){return typeof e=="string"?e:JSON.stringify(e)}function da(e){if(typeof e=="string")return nG(e);if(Array.isArray(e)){const t=tG(e);return JSON.stringify(t)}return JSON.stringify(e)}function Tc(e){if(!Array.isArray(e))return{systemInstructions:void 0,filteredMessages:e};const t=e.findIndex(s=>s&&typeof s=="object"&&"role"in s&&s.role==="system");if(t===-1)return{systemInstructions:void 0,filteredMessages:e};const n=e[t],r=typeof n.content=="string"?n.content:n.content!==void 0?JSON.stringify(n.content):void 0;if(!r)return{systemInstructions:void 0,filteredMessages:e};const i=JSON.stringify([{type:"text",content:r}]),o=[...e.slice(0,t),...e.slice(t+1)];return{systemInstructions:i,filteredMessages:o}}async function iG(e,t,n){const r=e.catch(s=>{throw It(s,{mechanism:{handled:!1,type:n}}),s}),i=await t,o=await r;return o&&typeof o=="object"&&"data"in o?{...o,data:i}:i}function mf(e,t,n){return ts(e)?new Proxy(e,{get(r,i){const s=i in Promise.prototype||i===Symbol.toStringTag?t:r,a=Reflect.get(s,i);return i==="withResponse"&&typeof a=="function"?function(){const c=a.call(r);return iG(c,t,n)}:typeof a=="function"?a.bind(s):a}}):t}const oG={"responses.create":{operation:"chat"},"chat.completions.create":{operation:"chat"},"embeddings.create":{operation:"embeddings"},"conversations.create":{operation:"chat"}},sG=["response.created","response.in_progress","response.failed","response.completed","response.incomplete","response.queued","response.output_text.delta",...["response.output_item.added","response.function_call_arguments.delta","response.function_call_arguments.done","response.output_item.done"]];function aG(e){return e!==null&&typeof e=="object"&&"type"in e&&typeof e.type=="string"&&e.type.startsWith("response.")}function lG(e){return e!==null&&typeof e=="object"&&"object"in e&&e.object==="chat.completion.chunk"}function cG(e,t,n){if(!t||typeof t!="object")return;const r=t,i={};if(typeof r.id=="string"&&(i[cf]=r.id),typeof r.model=="string"&&(i[aa]=r.model),r.object==="conversation"&&typeof r.id=="string"&&(i[ph]=r.id),r.usage&&typeof r.usage=="object"){const o=r.usage,s=o.prompt_tokens??o.input_tokens;typeof s=="number"&&(i[ps]=s);const a=o.completion_tokens??o.output_tokens;typeof a=="number"&&(i[ms]=a),typeof o.total_tokens=="number"&&(i[Eo]=o.total_tokens)}if(Array.isArray(r.choices)){const o=r.choices,s=o.map(a=>a.finish_reason).filter(a=>typeof a=="string");if(s.length>0&&(i[sa]=JSON.stringify(s)),n){const a=o.map(c=>c.message?.content||"");i[ui]=JSON.stringify(a);const l=o.map(c=>c.message?.tool_calls).filter(c=>Array.isArray(c)&&c.length>0).flat();l.length>0&&(i[To]=JSON.stringify(l))}}if(typeof r.status=="string"&&(i[sa]||(i[sa]=JSON.stringify([r.status]))),n&&(typeof r.output_text=="string"&&!i[ui]&&(i[ui]=r.output_text),Array.isArray(r.output)&&r.output.length>0&&!i[To])){const o=r.output.filter(s=>s?.type==="function_call");o.length>0&&(i[To]=JSON.stringify(o))}e.setAttributes(i)}function uG(e){if("conversation"in e&&typeof e.conversation=="string")return e.conversation;if("previous_response_id"in e&&typeof e.previous_response_id=="string")return e.previous_response_id}function dG(e){const t={[Tn]:e.model??"unknown"};"temperature"in e&&(t[sf]=e.temperature),"top_p"in e&&(t[lf]=e.top_p),"frequency_penalty"in e&&(t[af]=e.frequency_penalty),"presence_penalty"in e&&(t[fh]=e.presence_penalty),"stream"in e&&(t[uh]=e.stream),"encoding_format"in e&&(t[O8]=e.encoding_format),"dimensions"in e&&(t[P8]=e.dimensions);const n=uG(e);return n&&(t[ph]=n),t}function fG(e,t){for(const n of e){const r=n.index;if(!(r===void 0||!n.function))if(!(r in t.chatCompletionToolCalls))t.chatCompletionToolCalls[r]={...n,function:{name:n.function.name,arguments:n.function.arguments||""}};else{const i=t.chatCompletionToolCalls[r];n.function.arguments&&i?.function&&(i.function.arguments+=n.function.arguments)}}}function pG(e,t,n){t.responseId=e.id??t.responseId,t.responseModel=e.model??t.responseModel,e.usage&&(t.promptTokens=e.usage.prompt_tokens,t.completionTokens=e.usage.completion_tokens,t.totalTokens=e.usage.total_tokens);for(const r of e.choices??[])n&&(r.delta?.content&&t.responseTexts.push(r.delta.content),r.delta?.tool_calls&&fG(r.delta.tool_calls,t)),r.finish_reason&&t.finishReasons.push(r.finish_reason)}function mG(e,t,n,r){if(!(e&&typeof e=="object")){t.eventTypes.push("unknown:non-object");return}if(e instanceof Error){r.setStatus({code:st,message:"internal_error"}),It(e,{mechanism:{handled:!1,type:"auto.ai.openai.stream-response"}});return}if(!("type"in e))return;const i=e;if(!sG.includes(i.type)){t.eventTypes.push(i.type);return}if(n&&(i.type==="response.output_item.done"&&"item"in i&&t.responsesApiToolCalls.push(i.item),i.type==="response.output_text.delta"&&"delta"in i&&i.delta)){t.responseTexts.push(i.delta);return}if("response"in i){const{response:o}=i;t.responseId=o.id??t.responseId,t.responseModel=o.model??t.responseModel,o.usage&&(t.promptTokens=o.usage.input_tokens,t.completionTokens=o.usage.output_tokens,t.totalTokens=o.usage.total_tokens),o.status&&t.finishReasons.push(o.status),n&&o.output_text&&t.responseTexts.push(o.output_text)}}async function*_G(e,t,n){const r={eventTypes:[],responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,totalTokens:void 0,chatCompletionToolCalls:{},responsesApiToolCalls:[]};try{for await(const i of e)lG(i)?pG(i,r,n):aG(i)&&mG(i,r,n,t),yield i}finally{const i=[...Object.values(r.chatCompletionToolCalls),...r.responsesApiToolCalls];pf(t,{...r,toolCalls:i},n)}}function hG(e){const t=Array.isArray(e.tools)?e.tools:[],r=e.web_search_options&&typeof e.web_search_options=="object"?[{type:"web_search_options",...e.web_search_options}]:[],i=[...t,...r];if(i.length!==0)try{return JSON.stringify(i)}catch(o){Ee&&B.error("Failed to serialize OpenAI tools:",o);return}}function gG(e,t){const n={[bc]:"openai",[Fr]:t,[it]:"auto.ai.openai"};if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){const r=e[0],i=hG(r);i&&(n[$c]=i),Object.assign(n,dG(r))}else n[Tn]="unknown";return n}function Y8(e,t,n,r){if(n==="embeddings"&&"input"in t){const a=t.input;if(a==null||typeof a=="string"&&a.length===0||Array.isArray(a)&&a.length===0)return;e.setAttribute(mh,typeof a=="string"?a:JSON.stringify(a));return}const i="input"in t?t.input:"messages"in t?t.messages:void 0;if(!i||Array.isArray(i)&&i.length===0)return;const{systemInstructions:o,filteredMessages:s}=Tc(i);o&&e.setAttribute(vc,o),e.setAttribute(la,r?da(s):ua(s)),Array.isArray(s)?e.setAttribute(_s,s.length):e.setAttribute(_s,1)}function yG(e,t,n,r,i){return function(...s){const a=n.operation||"unknown",l=gG(s,a),c=l[Tn]||"unknown",u=s[0],d=u&&typeof u=="object"&&u.stream===!0,f={name:`${a} ${c}`,op:`gen_ai.${a}`,attributes:l};if(d){let b;const g=Wi(f,_=>(b=e.apply(r,s),i.recordInputs&&u&&Y8(_,u,a,Yi(i.enableTruncation)),(async()=>{try{const y=await b;return _G(y,_,i.recordOutputs??!1)}catch(y){throw _.setStatus({code:st,message:"internal_error"}),It(y,{mechanism:{handled:!1,type:"auto.ai.openai.stream",data:{function:t}}}),_.end(),y}})()));return mf(b,g,"auto.ai.openai")}let p;const m=ai(f,b=>(p=e.apply(r,s),i.recordInputs&&u&&Y8(b,u,a,Yi(i.enableTruncation)),p.then(g=>(cG(b,g,i.recordOutputs),g),g=>{throw It(g,{mechanism:{handled:!1,type:"auto.ai.openai",data:{function:t}}}),g})));return mf(p,m,"auto.ai.openai")}}function K8(e,t="",n){return new Proxy(e,{get(r,i){const o=r[i],s=gh(t,String(i)),a=oG[s];return typeof o=="function"&&a?yG(o,s,a,r,n):typeof o=="function"?o.bind(r):o&&typeof o=="object"?K8(o,s,n):o}})}function bG(e,t){return K8(e,"",hs(t))}const vG={"messages.create":{operation:"chat"},"messages.stream":{operation:"chat",streaming:!0},"messages.countTokens":{operation:"chat"},"models.get":{operation:"models"},"completions.create":{operation:"chat"},"models.retrieve":{operation:"models"},"beta.messages.create":{operation:"chat"}};function $G(e,t,n){if(Array.isArray(t)&&t.length===0)return;const{systemInstructions:r,filteredMessages:i}=Tc(t);r&&e.setAttributes({[vc]:r});const o=Array.isArray(i)?i.length:1;e.setAttributes({[la]:n?da(i):ua(i),[_s]:o})}const SG={invalid_request_error:"invalid_argument",authentication_error:"unauthenticated",permission_error:"permission_denied",not_found_error:"not_found",request_too_large:"failed_precondition",rate_limit_error:"resource_exhausted",api_error:"internal_error",overloaded_error:"unavailable"};function X8(e){return e&&SG[e]||"internal_error"}function EG(e,t){t.error&&(e.setStatus({code:st,message:X8(t.error.type)}),It(t.error,{mechanism:{handled:!1,type:"auto.ai.anthropic.anthropic_error"}}))}function TG(e){const{system:t,messages:n,input:r}=e,i=typeof t=="string"?[{role:"system",content:e.system}]:[],o=Array.isArray(r)?r:r!=null?[r]:void 0,s=Array.isArray(n)?n:n!=null?[n]:[],a=o??s;return[...i,...a]}function wG(e,t){return"type"in e&&typeof e.type=="string"&&e.type==="error"?(t.setStatus({code:st,message:X8(e.error?.type)}),It(e.error,{mechanism:{handled:!1,type:"auto.ai.anthropic.anthropic_error"}}),!0):!1}function IG(e,t){if(e.type==="message_delta"&&e.usage&&"output_tokens"in e.usage&&typeof e.usage.output_tokens=="number"&&(t.completionTokens=e.usage.output_tokens),e.message){const n=e.message;n.id&&(t.responseId=n.id),n.model&&(t.responseModel=n.model),n.stop_reason&&t.finishReasons.push(n.stop_reason),n.usage&&(typeof n.usage.input_tokens=="number"&&(t.promptTokens=n.usage.input_tokens),typeof n.usage.cache_creation_input_tokens=="number"&&(t.cacheCreationInputTokens=n.usage.cache_creation_input_tokens),typeof n.usage.cache_read_input_tokens=="number"&&(t.cacheReadInputTokens=n.usage.cache_read_input_tokens))}}function AG(e,t){e.type!=="content_block_start"||typeof e.index!="number"||!e.content_block||(e.content_block.type==="tool_use"||e.content_block.type==="server_tool_use")&&(t.activeToolBlocks[e.index]={id:e.content_block.id,name:e.content_block.name,inputJsonParts:[]})}function xG(e,t,n){if(!(e.type!=="content_block_delta"||!e.delta)){if(typeof e.index=="number"&&"partial_json"in e.delta&&typeof e.delta.partial_json=="string"){const r=t.activeToolBlocks[e.index];r&&r.inputJsonParts.push(e.delta.partial_json)}n&&typeof e.delta.text=="string"&&t.responseTexts.push(e.delta.text)}}function CG(e,t){if(e.type!=="content_block_stop"||typeof e.index!="number")return;const n=t.activeToolBlocks[e.index];if(!n)return;const r=n.inputJsonParts.join("");let i;try{i=r?JSON.parse(r):{}}catch{i={__unparsed:r}}t.toolCalls.push({type:"tool_use",id:n.id,name:n.name,input:i}),delete t.activeToolBlocks[e.index]}function J8(e,t,n,r){!(e&&typeof e=="object")||wG(e,r)||(IG(e,t),AG(e,t),xG(e,t,n),CG(e,t))}async function*kG(e,t,n){const r={responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};try{for await(const i of e)J8(i,r,n,t),yield i}finally{pf(t,r,n)}}function NG(e,t,n){const r={responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};return e.on("streamEvent",i=>{J8(i,r,n,t)}),e.on("message",()=>{pf(t,r,n)}),e.on("error",i=>{It(i,{mechanism:{handled:!1,type:"auto.ai.anthropic.stream_error"}}),t.isRecording()&&(t.setStatus({code:st,message:"internal_error"}),t.end())}),e}function RG(e,t,n){const r={[bc]:"anthropic",[Fr]:n,[it]:"auto.ai.anthropic"};if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){const i=e[0];i.tools&&Array.isArray(i.tools)&&(r[$c]=JSON.stringify(i.tools)),r[Tn]=i.model??"unknown","temperature"in i&&(r[sf]=i.temperature),"top_p"in i&&(r[lf]=i.top_p),"stream"in i&&(r[uh]=i.stream),"top_k"in i&&(r[R8]=i.top_k),"frequency_penalty"in i&&(r[af]=i.frequency_penalty),"max_tokens"in i&&(r[dh]=i.max_tokens)}else t==="models.retrieve"||t==="models.get"?r[Tn]=e[0]:r[Tn]="unknown";return r}function yh(e,t,n){const r=TG(t);$G(e,r,n),"prompt"in t&&e.setAttributes({[xW]:JSON.stringify(t.prompt)})}function OG(e,t){if("content"in t&&Array.isArray(t.content)){e.setAttributes({[ui]:t.content.map(r=>r.text).filter(r=>!!r).join("")});const n=[];for(const r of t.content)(r.type==="tool_use"||r.type==="server_tool_use")&&n.push(r);n.length>0&&e.setAttributes({[To]:JSON.stringify(n)})}"completion"in t&&e.setAttributes({[ui]:t.completion}),"input_tokens"in t&&e.setAttributes({[ui]:JSON.stringify(t.input_tokens)})}function PG(e,t){"id"in t&&"model"in t&&(e.setAttributes({[cf]:t.id,[aa]:t.model}),"usage"in t&&t.usage&&rG(e,t.usage.input_tokens,t.usage.output_tokens,t.usage.cache_creation_input_tokens,t.usage.cache_read_input_tokens))}function MG(e,t,n){if(!(!t||typeof t!="object")){if("type"in t&&t.type==="error"){EG(e,t);return}n&&OG(e,t),PG(e,t)}}function Z8(e,t,n){throw It(e,{mechanism:{handled:!1,type:"auto.ai.anthropic",data:{function:n}}}),t.isRecording()&&(t.setStatus({code:st,message:"internal_error"}),t.end()),e}function LG(e,t,n,r,i,o,s,a,l,c,u){const d=i[Tn]??"unknown",f={name:`${o} ${d}`,op:`gen_ai.${o}`,attributes:i};if(c&&!u){let p;const m=Wi(f,b=>(p=e.apply(n,r),l.recordInputs&&a&&yh(b,a,Yi(l.enableTruncation)),(async()=>{try{const g=await p;return kG(g,b,l.recordOutputs??!1)}catch(g){return Z8(g,b,s)}})()));return mf(p,m,"auto.ai.anthropic")}else return Wi(f,p=>{try{l.recordInputs&&a&&yh(p,a,Yi(l.enableTruncation));const m=t.apply(n,r);return NG(m,p,l.recordOutputs??!1)}catch(m){return Z8(m,p,s)}})}function DG(e,t,n,r,i){return new Proxy(e,{apply(o,s,a){const l=n.operation||"unknown",c=RG(a,t,l),u=c[Tn]??"unknown",d=typeof a[0]=="object"?a[0]:void 0,f=!!d?.stream,p=n.streaming===!0;if(f||p)return LG(e,o,r,a,c,l,t,d,i,f,p);let m;const b=ai({name:`${l} ${u}`,op:`gen_ai.${l}`,attributes:c},g=>(m=o.apply(r,a),i.recordInputs&&d&&yh(g,d,Yi(i.enableTruncation)),m.then(_=>(MG(g,_,i.recordOutputs),_),_=>{throw It(_,{mechanism:{handled:!1,type:"auto.ai.anthropic",data:{function:t}}}),_})));return mf(m,b,"auto.ai.anthropic")}})}function Q8(e,t="",n){return new Proxy(e,{get(r,i){const o=r[i],s=gh(t,String(i)),a=vG[s];return typeof o=="function"&&a?DG(o,s,a,r,n):typeof o=="function"?o.bind(r):o&&typeof o=="object"?Q8(o,s,n):o}})}function FG(e,t){return Q8(e,"",hs(t))}const UG={"models.generateContent":{operation:"generate_content"},"models.generateContentStream":{operation:"generate_content",streaming:!0},"models.embedContent":{operation:"embeddings"},"chats.create":{proxyResultPath:"chat"},"chat.sendMessage":{operation:"chat"},"chat.sendMessageStream":{operation:"chat",streaming:!0}},BG="google_genai";function jG(e,t){const n=e?.promptFeedback;if(n?.blockReason){const r=n.blockReasonMessage??n.blockReason;return t.setStatus({code:st,message:"internal_error"}),It(`Content blocked: ${r}`,{mechanism:{handled:!1,type:"auto.ai.google_genai"}}),!0}return!1}function qG(e,t){typeof e.responseId=="string"&&(t.responseId=e.responseId),typeof e.modelVersion=="string"&&(t.responseModel=e.modelVersion);const n=e.usageMetadata;n&&(typeof n.promptTokenCount=="number"&&(t.promptTokens=n.promptTokenCount),typeof n.candidatesTokenCount=="number"&&(t.completionTokens=n.candidatesTokenCount),typeof n.totalTokenCount=="number"&&(t.totalTokens=n.totalTokenCount))}function zG(e,t,n){Array.isArray(e.functionCalls)&&t.toolCalls.push(...e.functionCalls);for(const r of e.candidates??[]){r?.finishReason&&!t.finishReasons.includes(r.finishReason)&&t.finishReasons.push(r.finishReason);for(const i of r?.content?.parts??[])n&&i.text&&t.responseTexts.push(i.text),i.functionCall&&t.toolCalls.push({type:"function",id:i.functionCall.id,name:i.functionCall.name,arguments:i.functionCall.args})}}function HG(e,t,n,r){!e||jG(e,r)||(qG(e,t),zG(e,t,n))}async function*VG(e,t,n){const r={responseTexts:[],finishReasons:[],toolCalls:[]};try{for await(const i of e)HG(i,r,n,t),yield i}finally{pf(t,r,n)}}function wc(e,t="user"){return typeof e=="string"?[{role:t,content:e}]:Array.isArray(e)?e.flatMap(n=>wc(n,t)):typeof e!="object"||!e?[]:"role"in e&&typeof e.role=="string"?[e]:"parts"in e?[{...e,role:t}]:[{role:t,content:e}]}function e5(e,t){if("model"in e&&typeof e.model=="string")return e.model;if(t&&typeof t=="object"){const n=t;if("model"in n&&typeof n.model=="string")return n.model;if("modelVersion"in n&&typeof n.modelVersion=="string")return n.modelVersion}return"unknown"}function WG(e){const t={};return"temperature"in e&&typeof e.temperature=="number"&&(t[sf]=e.temperature),"topP"in e&&typeof e.topP=="number"&&(t[lf]=e.topP),"topK"in e&&typeof e.topK=="number"&&(t[R8]=e.topK),"maxOutputTokens"in e&&typeof e.maxOutputTokens=="number"&&(t[dh]=e.maxOutputTokens),"frequencyPenalty"in e&&typeof e.frequencyPenalty=="number"&&(t[af]=e.frequencyPenalty),"presencePenalty"in e&&typeof e.presencePenalty=="number"&&(t[fh]=e.presencePenalty),t}function GG(e,t,n){const r={[bc]:BG,[Fr]:e,[it]:"auto.ai.google_genai"};if(t){if(r[Tn]=e5(t,n),"config"in t&&typeof t.config=="object"&&t.config){const i=t.config;if(Object.assign(r,WG(i)),"tools"in i&&Array.isArray(i.tools)){const o=i.tools.flatMap(s=>s.functionDeclarations);r[$c]=JSON.stringify(o)}}}else r[Tn]=e5({},n);return r}function t5(e,t,n,r){if(n){const o=t.contents;o!=null&&e.setAttribute(mh,typeof o=="string"?o:JSON.stringify(o));return}const i=[];if("config"in t&&t.config&&typeof t.config=="object"&&"systemInstruction"in t.config&&t.config.systemInstruction&&i.push(...wc(t.config.systemInstruction,"system")),"history"in t&&i.push(...wc(t.history,"user")),"contents"in t&&i.push(...wc(t.contents,"user")),"message"in t&&i.push(...wc(t.message,"user")),Array.isArray(i)&&i.length){const{systemInstructions:o,filteredMessages:s}=Tc(i);o&&e.setAttribute(vc,o);const a=Array.isArray(s)?s.length:0;e.setAttributes({[_s]:a,[la]:r?da(s):ua(s)})}}function YG(e,t,n){if(!(!t||typeof t!="object")){if(t.modelVersion&&e.setAttribute(aa,t.modelVersion),t.usageMetadata&&typeof t.usageMetadata=="object"){const r=t.usageMetadata;typeof r.promptTokenCount=="number"&&e.setAttributes({[ps]:r.promptTokenCount}),typeof r.candidatesTokenCount=="number"&&e.setAttributes({[ms]:r.candidatesTokenCount}),typeof r.totalTokenCount=="number"&&e.setAttributes({[Eo]:r.totalTokenCount})}if(n&&Array.isArray(t.candidates)&&t.candidates.length>0){const r=t.candidates.map(i=>i.content?.parts&&Array.isArray(i.content.parts)?i.content.parts.map(o=>typeof o.text=="string"?o.text:"").filter(o=>o.length>0).join(""):"").filter(i=>i.length>0);r.length>0&&e.setAttributes({[ui]:r.join("")})}if(n&&t.functionCalls){const r=t.functionCalls;Array.isArray(r)&&r.length>0&&e.setAttributes({[To]:JSON.stringify(r)})}}}function KG(e,t,n,r,i){const o=n.operation==="embeddings";return new Proxy(e,{apply(s,a,l){const c=n.operation||"unknown",u=l[0],d=GG(c,u,r),f=d[Tn]??"unknown";return n.streaming?Wi({name:`${c} ${f}`,op:`gen_ai.${c}`,attributes:d},async p=>{try{i.recordInputs&&u&&t5(p,u,o,Yi(i.enableTruncation));const m=await s.apply(r,l);return VG(m,p,!!i.recordOutputs)}catch(m){throw p.setStatus({code:st,message:"internal_error"}),It(m,{mechanism:{handled:!1,type:"auto.ai.google_genai",data:{function:t}}}),p.end(),m}}):ai({name:`${c} ${f}`,op:`gen_ai.${c}`,attributes:d},p=>(i.recordInputs&&u&&t5(p,u,o,Yi(i.enableTruncation)),P_(()=>s.apply(r,l),m=>{It(m,{mechanism:{handled:!1,type:"auto.ai.google_genai",data:{function:t}}})},()=>{},m=>{o||YG(p,m,i.recordOutputs)})))}})}function bh(e,t="",n){return new Proxy(e,{get:(r,i,o)=>{const s=Reflect.get(r,i,o),a=gh(t,String(i)),l=UG[a];if(typeof s=="function"&&l){const c=l.operation?KG(s,a,l,r,n):s.bind(r);return l.proxyResultPath?function(...u){const d=c(...u);return d&&typeof d=="object"?bh(d,l.proxyResultPath,n):d}:c}return typeof s=="function"?s.bind(r):s&&typeof s=="object"?bh(s,a,n):s}})}function XG(e,t){return bh(e,"",hs(t))}const fa="auto.ai.langchain",JG={human:"user",ai:"assistant",assistant:"assistant",system:"system",function:"function",tool:"tool"},Sr=(e,t,n)=>{n!=null&&(e[t]=n)},ar=(e,t,n)=>{const r=Number(n);Number.isNaN(r)||(e[t]=r)};function gs(e){if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function pa(e){if(Array.isArray(e))try{const t=e.map(n=>n&&typeof n=="object"&&ca(n)?Ec(n):n);return JSON.stringify(t)}catch{return String(e)}return gs(e)}function Ic(e){const t=e.toLowerCase();return JG[t]??t}function n5(e){return e.includes("System")?"system":e.includes("Human")?"user":e.includes("AI")||e.includes("Assistant")?"assistant":e.includes("Function")?"function":e.includes("Tool")?"tool":"user"}function r5(e){if(!(!e||Array.isArray(e)))return e.invocation_params}function vh(e){return e.map(t=>{const n=t._getType;if(typeof n=="function"){const i=n.call(t);return{role:Ic(i),content:pa(t.content)}}if(t.lc===1&&t.kwargs){const i=t.id,o=Array.isArray(i)&&i.length>0?i[i.length-1]:"",s=typeof o=="string"?n5(o):"user";return{role:Ic(s),content:pa(t.kwargs?.content)}}if(t.type){const i=String(t.type).toLowerCase();return{role:Ic(i),content:pa(t.content)}}if(t.role)return{role:Ic(String(t.role)),content:pa(t.content)};const r=t.constructor?.name;return r&&r!=="Object"?{role:Ic(n5(r)),content:pa(t.content)}:{role:"user",content:pa(t.content)}})}function ZG(e,t,n){const r={},i="kwargs"in e?e.kwargs:void 0,o=t?.temperature??n?.ls_temperature??i?.temperature;ar(r,sf,o);const s=t?.max_tokens??n?.ls_max_tokens??i?.max_tokens;ar(r,dh,s);const a=t?.top_p??i?.top_p;ar(r,lf,a);const l=t?.frequency_penalty;ar(r,af,l);const c=t?.presence_penalty;return ar(r,fh,c),t&&"stream"in t&&Sr(r,uh,!!t.stream),r}function i5(e,t,n,r,i){return{[bc]:gs(e??"langchain"),[Fr]:"chat",[Tn]:gs(t),[it]:fa,...ZG(n,r,i)}}function QG(e,t,n,r,i,o){const s=o?.ls_provider,a=i?.model??o?.ls_model_name??"unknown",l=i5(s,a,e,i,o);if(n&&Array.isArray(t)&&t.length>0){Sr(l,_s,t.length);const c=t.map(u=>({role:"user",content:u}));Sr(l,la,r?da(c):ua(c))}return l}function eY(e,t,n,r,i,o){const s=o?.ls_provider??e.id?.[2],a=i?.model??o?.ls_model_name??"unknown",l=i5(s,a,e,i,o);if(n&&Array.isArray(t)&&t.length>0){const c=vh(t.flat()),{systemInstructions:u,filteredMessages:d}=Tc(c);u&&Sr(l,vc,u);const f=Array.isArray(d)?d.length:0;Sr(l,_s,f),Sr(l,la,r?da(d):ua(d))}return l}function tY(e,t){const n=[],r=e.flat();for(const i of r){const s=i.message?.tool_calls;if(Array.isArray(s)&&s.length>0)n.push(...s);else{const a=i.message?.content;if(Array.isArray(a))for(const l of a){const c=l;c.type==="tool_use"&&n.push(c)}}}n.length>0&&Sr(t,To,gs(n))}function nY(e,t){if(!e)return;const n=e.tokenUsage,r=e.usage;if(n)ar(t,ps,n.promptTokens),ar(t,ms,n.completionTokens),ar(t,Eo,n.totalTokens);else if(r){ar(t,ps,r.input_tokens),ar(t,ms,r.output_tokens);const i=Number(r.input_tokens),o=Number(r.output_tokens),s=(Number.isNaN(i)?0:i)+(Number.isNaN(o)?0:o);s>0&&ar(t,Eo,s),r.cache_creation_input_tokens!==void 0&&ar(t,RW,r.cache_creation_input_tokens),r.cache_read_input_tokens!==void 0&&ar(t,OW,r.cache_read_input_tokens)}}function rY(e,t){if(!e)return;const n={};if(Array.isArray(e.generations)){const c=e.generations.flat().map(u=>u.generationInfo?.finish_reason?u.generationInfo.finish_reason:u.generation_info?.finish_reason?u.generation_info.finish_reason:null).filter(u=>typeof u=="string");if(c.length>0&&Sr(n,sa,gs(c)),tY(e.generations,n),t){const u=e.generations.flat().map(d=>d.text??d.message?.content).filter(d=>typeof d=="string");u.length>0&&Sr(n,ui,gs(u))}}nY(e.llmOutput,n);const r=e.llmOutput,o=e.generations?.[0]?.[0]?.message,s=r?.model_name??r?.model??o?.response_metadata?.model_name;s&&Sr(n,aa,s);const a=r?.id??o?.id;a&&Sr(n,cf,a);const l=r?.stop_reason??o?.response_metadata?.finish_reason;return l&&Sr(n,CW,gs(l)),n}function $h(e){const t={},n=e?.lc_agent_name;return typeof n=="string"&&(t[uf]=n),t}function iY(e){const t=e?.invocation_params?.tools??e?.options?.tools;if(!Array.isArray(t)||t.length===0)return;const n=t.map(r=>{const i=r.function;return{type:"function",name:r.name??i?.name??"",description:r.description??i?.description}});return JSON.stringify(n)}function Sh(e={}){const{recordInputs:t,recordOutputs:n}=hs(e),r=Yi(e.enableTruncation),i=new Map,o=a=>{const l=i.get(a);l?.isRecording()&&(l.end(),i.delete(a))},s={lc_serializable:!1,lc_namespace:["langchain_core","callbacks","sentry"],lc_secrets:void 0,lc_attributes:void 0,lc_aliases:void 0,lc_serializable_keys:void 0,lc_id:["langchain_core","callbacks","sentry"],lc_kwargs:{},name:"SentryCallbackHandler",ignoreLLM:!1,ignoreChain:!1,ignoreAgent:!1,ignoreRetriever:!1,ignoreCustomEvent:!1,raiseError:!1,awaitHandlers:!0,handleLLMStart(a,l,c,u,d,f,p,m){const b=r5(f),g=QG(a,l,t,r,b,p),_=g[Tn],y=g[Fr];Wi({name:`${y} ${_}`,op:"gen_ai.chat",attributes:{...$h(p),...g,[yt]:"gen_ai.chat"}},T=>(i.set(c,T),T))},handleChatModelStart(a,l,c,u,d,f,p,m){const b=r5(f),g=eY(a,l,t,r,b,p),_=iY(d);_&&(g[$c]=_);const y=g[Tn],T=g[Fr];Wi({name:`${T} ${y}`,op:"gen_ai.chat",attributes:{...$h(p),...g,[yt]:"gen_ai.chat"}},S=>(i.set(c,S),S))},handleLLMEnd(a,l,c,u,d){const f=i.get(l);if(f?.isRecording()){const p=rY(a,n);p&&f.setAttributes(p),o(l)}},handleLLMError(a,l){const c=i.get(l);c?.isRecording()&&(c.setStatus({code:st,message:"internal_error"}),o(l)),It(a,{mechanism:{handled:!1,type:`${fa}.llm_error_handler`}})},handleChainStart(a,l,c,u,d,f,p,m){if(f?.__sentry_langgraph__)return;const b=m||a.name||"unknown_chain",g={[it]:"auto.ai.langchain","langchain.chain.name":b};t&&(g["langchain.chain.inputs"]=JSON.stringify(l)),Wi({name:`chain ${b}`,op:"gen_ai.invoke_agent",attributes:{...g,[yt]:"gen_ai.invoke_agent"}},_=>(i.set(c,_),_))},handleChainEnd(a,l){const c=i.get(l);c?.isRecording()&&(n&&c.setAttributes({"langchain.chain.outputs":JSON.stringify(a)}),o(l))},handleChainError(a,l){const c=i.get(l);c?.isRecording()&&(c.setStatus({code:st,message:"internal_error"}),o(l)),It(a,{mechanism:{handled:!1,type:`${fa}.chain_error_handler`}})},handleToolStart(a,l,c,u,d,f,p){if(f?.__sentry_langgraph__)return;const m=p||a.name||"unknown_tool",b={...$h(f),[it]:fa,[Fr]:"execute_tool",[D8]:m};t&&(b[F8]=l),Wi({name:`execute_tool ${m}`,op:"gen_ai.execute_tool",attributes:{...b,[yt]:"gen_ai.execute_tool"}},g=>(i.set(c,g),g))},handleToolEnd(a,l){const c=i.get(l);if(c?.isRecording()){if(n){const u=a,d=u&&typeof u=="object"&&"content"in u?u.content:a;c.setAttributes({[U8]:typeof d=="string"?d:JSON.stringify(d)})}o(l)}},handleToolError(a,l){const c=i.get(l);c?.isRecording()&&(c.setStatus({code:st,message:"internal_error"}),o(l)),It(a,{mechanism:{handled:!1,type:`${fa}.tool_error_handler`}})},copy(){return s},toJSON(){return{lc:1,type:"not_implemented",id:s.lc_id}},toJSONNotImplemented(){return{lc:1,type:"not_implemented",id:s.lc_id}}};return s}const Eh="auto.ai.langgraph";function oY(e){const t=e[0];if(typeof t!="object"||!t||!("llm"in t)||!t.llm||typeof t.llm!="object")return null;const n=t.llm;return typeof n.modelName!="string"&&typeof n.model!="string"?null:n}function sY(e){const t=e[0];return typeof t=="object"&&t&&"name"in t&&typeof t.name=="string"?t.name:null}function aY(e,t,n){const r="__sentry_tool_wrapped__";for(const i of e){if(!i||typeof i!="object")continue;const o=i,s=o.invoke;if(typeof s!="function"||Object.prototype.hasOwnProperty.call(o,r))continue;const a=typeof o.name=="string"?o.name:"unknown_tool",l=typeof o.description=="string"?o.description:void 0,c=new Proxy(s,{apply(u,d,f){const p={[it]:Eh,[yt]:L8,[Fr]:"execute_tool",[D8]:a,[LW]:"function"},b=f[1]?.metadata?.lc_agent_name??n;typeof b=="string"&&(p[uf]=b),l&&(p[DW]=l);const g=f[0];if(typeof g=="object"&&g&&("id"in g&&typeof g.id=="string"&&(p[MW]=g.id),t.recordInputs)){const _="args"in g&&typeof g.args=="object"?g.args:g;try{p[F8]=JSON.stringify(_)}catch{}}return ai({op:L8,name:`execute_tool ${a}`,attributes:p},async _=>{try{const y=await Reflect.apply(u,d,f);if(t.recordOutputs)try{const T=y,S=T&&typeof T=="object"&&"content"in T?T.content:y;_.setAttribute(U8,typeof S=="string"?S:JSON.stringify(S))}catch{}return y}catch(y){throw _.setStatus({code:st,message:"internal_error"}),It(y,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),y}})}});o.invoke=c,Object.defineProperty(o,r,{value:!0,enumerable:!1})}return e}function lY(e){if(!e||e.length===0)return null;const t=[];for(const n of e)if(n&&typeof n=="object"){const r=n.tool_calls;r&&Array.isArray(r)&&t.push(...r)}return t.length>0?t:null}function cY(e){const t=e;let n=0,r=0,i=0;if(t.usage_metadata&&typeof t.usage_metadata=="object"){const o=t.usage_metadata;return typeof o.input_tokens=="number"&&(n=o.input_tokens),typeof o.output_tokens=="number"&&(r=o.output_tokens),typeof o.total_tokens=="number"&&(i=o.total_tokens),{inputTokens:n,outputTokens:r,totalTokens:i}}if(t.response_metadata&&typeof t.response_metadata=="object"){const o=t.response_metadata;if(o.tokenUsage&&typeof o.tokenUsage=="object"){const s=o.tokenUsage;typeof s.promptTokens=="number"&&(n=s.promptTokens),typeof s.completionTokens=="number"&&(r=s.completionTokens),typeof s.totalTokens=="number"&&(i=s.totalTokens)}}return{inputTokens:n,outputTokens:r,totalTokens:i}}function uY(e,t){const n=t;if(n.response_metadata&&typeof n.response_metadata=="object"){const r=n.response_metadata;r.model_name&&typeof r.model_name=="string"&&e.setAttribute(aa,r.model_name),r.finish_reason&&typeof r.finish_reason=="string"&&e.setAttribute(sa,[r.finish_reason])}}function dY(e){if(!e.builder?.nodes?.tools?.runnable?.tools)return null;const t=e.builder?.nodes?.tools?.runnable?.tools;return!t||!Array.isArray(t)||t.length===0?null:t.map(n=>({name:n.lc_kwargs?.name,description:n.lc_kwargs?.description,schema:n.lc_kwargs?.schema}))}function fY(e,t,n){const i=n?.messages;if(!i||!Array.isArray(i))return;const o=t?.length??0,s=i.length>o?i.slice(o):[];if(s.length===0)return;const a=lY(s);a&&e.setAttribute(To,JSON.stringify(a));const l=vh(s);e.setAttribute(ui,JSON.stringify(l));let c=0,u=0,d=0;for(const f of s){const p=cY(f);c+=p.inputTokens,u+=p.outputTokens,d+=p.totalTokens,uY(e,f)}c>0&&e.setAttribute(ps,c),u>0&&e.setAttribute(ms,u),d>0&&e.setAttribute(Eo,d)}function pY(e,t){if(!e)return[t];if(Array.isArray(e))return e.includes(t)?e:[...e,t];const n=e;return typeof n.addHandler=="function"&&(Array.isArray(n.handlers)&&n.handlers.includes(t)||n.addHandler(t)),e}let Th=!1;const _f="__sentry_patched__";function mY(e,t){if(Object.prototype.hasOwnProperty.call(e,_f))return e;const n=Sh(t),r=new Proxy(e,{apply(i,o,s){return Th?Reflect.apply(i,o,s):ai({op:"gen_ai.create_agent",name:"create_agent",attributes:{[it]:Eh,[yt]:"gen_ai.create_agent",[Fr]:"create_agent"}},a=>{try{const l=Reflect.apply(i,o,s),c=s.length>0?s[0]:{};c?.name&&typeof c.name=="string"&&(a.setAttribute(uf,c.name),a.updateName(`create_agent ${c.name}`));const u=l.invoke;return u&&typeof u=="function"&&(l.invoke=o5(u.bind(l),l,c,t,void 0,n)),l}catch(l){throw a.setStatus({code:st,message:"internal_error"}),It(l,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),l}})}});return Object.defineProperty(r,_f,{value:!0,enumerable:!1}),r}function o5(e,t,n,r,i,o){return new Proxy(e,{apply(s,a,l){const c=i?.modelName??i?.model;return ai({op:"gen_ai.invoke_agent",name:"invoke_agent",attributes:{[it]:Eh,[yt]:PW,[Fr]:"invoke_agent"}},async u=>{try{const d=n?.name;d&&typeof d=="string"&&(u.setAttribute(NW,d),u.setAttribute(uf,d),u.updateName(`invoke_agent ${d}`)),c&&u.setAttribute(Tn,c);const m=(l.length>1?l[1]:void 0)?.configurable?.thread_id;if(m&&typeof m=="string"&&u.setAttribute(ph,m),o){const S=l[1]??{};l[1]=S;const O=S.metadata??{};S.metadata={...O,__sentry_langgraph__:!0,...typeof d=="string"?{lc_agent_name:d}:{}},S.callbacks=pY(S.callbacks,o)}const b=dY(t);b&&u.setAttribute($c,JSON.stringify(b));const g=r.recordInputs,_=r.recordOutputs,y=l.length>0?l[0]?.messages??[]:[];if(y&&g){const S=vh(y),{systemInstructions:O,filteredMessages:N}=Tc(S);O&&u.setAttribute(vc,O);const w=Yi(r.enableTruncation),D=Array.isArray(N)?N.length:0;u.setAttributes({[la]:w?da(N):ua(N),[_s]:D})}const T=await Reflect.apply(s,a,l);return _&&fY(u,y??null,T),T}catch(d){throw u.setStatus({code:st,message:"internal_error"}),It(d,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),d}})}})}function _Y(e,t){if(Object.prototype.hasOwnProperty.call(e,_f))return e;const n=hs(t),r=Sh(n),i=new Proxy(e,{apply(o,s,a){const l=oY(a),c=sY(a),u=a[0];u&&Array.isArray(u.tools)&&u.tools.length>0&&aY(u.tools,n,c??void 0),Th=!0;let d;try{d=Reflect.apply(o,s,a)}finally{Th=!1}const f=d.invoke;if(f&&typeof f=="function"){const p={};c&&(p.name=c),d.invoke=o5(f.bind(d),d,p,n,l,r)}return d}});return Object.defineProperty(i,_f,{value:!0,enumerable:!1}),i}function hY(e,t){return e.compile=mY(e.compile,hs(t)),e}function gY(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function yY(){return"npm"}function bY(){return!gY()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function Ac(){return typeof window<"u"&&(!bY()||vY())}function vY(){return je.process?.type==="renderer"}function $Y(e,t,n){const r=n.getOptions(),i=n.getDsn(),o=r.tunnel,s=pc(r._metadata),a={sent_at:new Date().toISOString(),...SY(t)&&{trace:t},...s&&{sdk:s},...!!o&&i&&{dsn:si(i)}},l=r.sendDefaultPii?"auto":"never",c=[{type:"span",item_count:e.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...Ac()&&{ingest_settings:{infer_ip:l,infer_user_agent:l}},items:e}];return vr(a,[c])}function SY(e){return!!e.trace_id&&!!e.public_key}function EY(e){let t=156;if(t+=e.name.length*2,t+=c9(e.attributes),e.links&&e.links.length>0){const r=e.links[0]?.attributes,i=100+(r?c9(r):0);t+=i*e.links.length}return t}const s5=1e3,TY=5e6;class wY{constructor(t,n){this._traceBuckets=new Map,this._client=t;const{maxSpanLimit:r,flushInterval:i,maxTraceWeightInBytes:o}=n??{};this._maxSpanLimit=r&&r>0&&r<=s5?r:s5,this._flushInterval=i&&i>0?i:5e3,this._maxTraceWeight=o&&o>0?o:TY,this._client.on("flush",()=>{this.drain()}),this._client.on("close",()=>{this._traceBuckets.forEach(s=>{clearTimeout(s.timeout)}),this._traceBuckets.clear()})}add(t){const n=t.trace_id;let r=this._traceBuckets.get(n);r||(r={spans:new Set,size:0,timeout:Kd(setTimeout(()=>{this.flush(n)},this._flushInterval))},this._traceBuckets.set(n,r)),r.spans.add(t),r.size+=EY(t),(r.spans.size>=this._maxSpanLimit||r.size>=this._maxTraceWeight)&&this.flush(n)}drain(){this._traceBuckets.size&&(Ee&&B.log(`Flushing span tree map with ${this._traceBuckets.size} traces`),this._traceBuckets.forEach((t,n)=>{this.flush(n)}))}flush(t){const n=this._traceBuckets.get(t);if(!n)return;if(!n.spans.size){this._removeTrace(t);return}const r=Array.from(n.spans),i=r[0]?._segmentSpan;if(!i){Ee&&B.warn("No segment span reference found on span JSON, cannot compute DSC"),this._removeTrace(t);return}const o=br(i),s=r.map(l=>{const{_segmentSpan:c,...u}=l;return u}),a=$Y(s,o,this._client);Ee&&B.log(`Sending span envelope for trace ${t} with ${s.length} spans`),this._client.sendEnvelope(a).then(null,l=>{Ee&&B.error("Error while sending streamed span envelope:",l)}),this._removeTrace(t)}_removeTrace(t){const n=this._traceBuckets.get(t);n&&clearTimeout(n.timeout),this._traceBuckets.delete(t)}}function a5(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const ma=je;function IY(){return"history"in ma&&!!ma.history}function AY(){if(!("fetch"in ma))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function wh(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function l5(){if(typeof EdgeRuntime=="string")return!0;if(!AY())return!1;if(wh(ma.fetch))return!0;let e=!1;const t=ma.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=wh(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){Ee&&B.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function xY(){return"ReportingObserver"in ma}function Ih(e,t){const n="fetch",r=go(n,e);return yo(n,()=>c5(void 0,t)),r}function CY(e){const t="fetch-body-resolved",n=go(t,e);return yo(t,()=>c5(NY)),n}function c5(e,t=!1){t&&!l5()||$n(je,"fetch",function(n){return function(...r){const i=new Error,{method:o,url:s}=RY(r),a={args:r,fetchData:{method:o,url:s},startTimestamp:Ct()*1e3,virtualError:i,headers:OY(r)};return e||gr("fetch",{...a}),n.apply(je,r).then(async l=>(e?e(l):gr("fetch",{...a,endTimestamp:Ct()*1e3,response:l}),l),l=>{gr("fetch",{...a,endTimestamp:Ct()*1e3,error:l}),Di(l)&&l.stack===void 0&&(l.stack=i.stack,Sn(l,"framesToPop",1));const u=Ie()?.getOptions().enhanceFetchErrorMessages??"always";if(u!==!1&&l instanceof TypeError&&(l.message==="Failed to fetch"||l.message==="Load failed"||l.message==="NetworkError when attempting to fetch resource."))try{const p=new URL(a.fetchData.url).host;u==="always"?l.message=`${l.message} (${p})`:Sn(l,"__sentry_fetch_url_host__",p)}catch{}throw l})}})}async function kY(e,t){if(e?.body){const n=e.body,r=n.getReader(),i=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let o=!0;for(;o;){let s;try{s=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:a}=await r.read();clearTimeout(s),a&&(t(),o=!1)}catch{o=!1}finally{clearTimeout(s)}}clearTimeout(i),r.releaseLock(),n.cancel().then(null,()=>{})}}function NY(e){let t;try{t=e.clone()}catch{return}kY(t,()=>{gr("fetch-body-resolved",{endTimestamp:Ct()*1e3,response:e})})}function hf(e,t){return!!e&&typeof e=="object"&&!!e[t]}function u5(e){return typeof e=="string"?e:e?hf(e,"url")?e.url:e.toString?e.toString():"":""}function RY(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:u5(n),method:hf(r,"method")?String(r.method).toUpperCase():b_(n)&&hf(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:u5(t),method:hf(t,"method")?String(t.method).toUpperCase():"GET"}}function OY(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(b_(t))return new Headers(t.headers)}catch{}}function PY(e){const t=e.constructor?.name??"";return t.includes("OpenAI")?"openai":t.includes("Google")?"google_genai":t.includes("Mistral")?"mistralai":t.includes("Vertex")?"google_vertexai":t.includes("Bedrock")?"aws_bedrock":t.includes("Ollama")?"ollama":t.includes("Cloudflare")?"cloudflare":t.includes("Cohere")?"cohere":"langchain"}function MY(e){const t=e??{},n={[it]:fa,[yt]:M8,[Fr]:"embeddings",[Tn]:t.model??"unknown"};return n[bc]=PY(t),"dimensions"in t&&(n[P8]=t.dimensions),"encodingFormat"in t&&(n[O8]=t.encodingFormat),n}function d5(e,t={}){const{recordInputs:n}=hs(t);return new Proxy(e,{apply(r,i,o){const s=MY(i),a=s[Tn]||"unknown";if(n){const l=o[0];l!=null&&(s[mh]=typeof l=="string"?l:JSON.stringify(l))}return ai({name:`embeddings ${a}`,op:M8,attributes:s},()=>Reflect.apply(r,i,o).then(void 0,l=>{throw It(l,{mechanism:{handled:!1,type:"auto.ai.langchain"}}),l}))}})}function LY(e,t){const n=e;return typeof n.embedQuery=="function"&&(n.embedQuery=d5(n.embedQuery,t)),typeof n.embedDocuments=="function"&&(n.embedDocuments=d5(n.embedDocuments,t)),e}const Ur=je,kt=Ur.document,xc=Ur.navigator,f5="Report a Bug",DY="Cancel",FY="Send Bug Report",UY="Confirm",BY="Report a Bug",jY="your.email@example.org",qY="Email",zY="What's the bug? What did you expect?",HY="Description",VY="Your Name",WY="Name",GY="Thank you for your report!",YY="(required)",KY="Add a screenshot",XY="Remove screenshot",JY="Highlight",ZY="Hide",QY="Remove",p5="Unable to submit feedback with empty message",m5="No client setup, cannot send feedback.",_5="Unable to determine if Feedback was correctly sent.",h5="Unable to send feedback. This could be because this domain is not in your list of allowed domains.",g5="Unable to send feedback. This could be because of network issues, or because you are using an ad-blocker.",eK="widget",tK="api",nK=5e3,rK={ERROR_EMPTY_MESSAGE:p5,ERROR_NO_CLIENT:m5,ERROR_TIMEOUT:_5,ERROR_FORBIDDEN:h5,ERROR_GENERIC:g5};function gf(e,t){return t?.[e]??rK[e]}function y5(e,t){return new Error(gf(e,t))}const b5=(e,t={includeReplay:!0})=>{const n=t.errorMessages;if(!e.message)throw y5("ERROR_EMPTY_MESSAGE",n);const r=Ie();if(!r)throw y5("ERROR_NO_CLIENT",n);e.tags&&Object.keys(e.tags).length&&Ke().setTags(e.tags);const i=x8({source:tK,url:ns(),...e},t);return new Promise((o,s)=>{const a=setTimeout(()=>{l(),s(gf("ERROR_TIMEOUT",n))},3e4),l=r.on("afterSendEvent",(c,u)=>{if(c.event_id===i)return clearTimeout(a),l(),u?.statusCode&&u.statusCode>=200&&u.statusCode<300?o(i):u?.statusCode===403?s(gf("ERROR_FORBIDDEN",n)):s(gf("ERROR_GENERIC",n))})})},yf=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function iK(){return!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(xc.userAgent)||/Macintosh/i.test(xc.userAgent)&&xc.maxTouchPoints&&xc.maxTouchPoints>1||!isSecureContext)}function bf(e,t){return{...e,...t,tags:{...e.tags,...t.tags},onFormOpen:()=>{t.onFormOpen?.(),e.onFormOpen?.()},onFormClose:()=>{t.onFormClose?.(),e.onFormClose?.()},onSubmitSuccess:(n,r)=>{t.onSubmitSuccess?.(n,r),e.onSubmitSuccess?.(n,r)},onSubmitError:n=>{t.onSubmitError?.(n),e.onSubmitError?.(n)},onFormSubmitted:()=>{t.onFormSubmitted?.(),e.onFormSubmitted?.()},themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function oK(e){const t=kt.createElement("style");return t.textContent=`
|
|
48
48
|
.widget__actor {
|
|
49
49
|
position: fixed;
|
|
50
50
|
z-index: var(--z-index);
|
|
@@ -514,22 +514,22 @@ ${BK}
|
|
|
514
514
|
.editor__rect:hover button {
|
|
515
515
|
opacity: 1;
|
|
516
516
|
}
|
|
517
|
-
`,e&&t.setAttribute("nonce",e),t}function WK({h:e}){return function({action:n,setAction:r,options:i}){return e("div",{class:"editor__tool-container"},e("div",{class:"editor__tool-bar"},e("button",{type:"button",class:`editor__tool ${n==="highlight"?"editor__tool--active":""}`,onClick:()=>{r(n==="highlight"?"":"highlight")}},i.highlightToolText),e("button",{type:"button",class:`editor__tool ${n==="hide"?"editor__tool--active":""}`,onClick:()=>{r(n==="hide"?"":"hide")}},i.hideToolText)))}}function GK({hooks:e}){function t(){const[n,r]=e.useState(Ur.devicePixelRatio??1);return e.useEffect(()=>{const i=()=>{r(Ur.devicePixelRatio)},o=matchMedia(`(resolution: ${Ur.devicePixelRatio}dppx)`);return o.addEventListener("change",i),()=>{o.removeEventListener("change",i)}},[]),n}return function({onBeforeScreenshot:r,onScreenshot:i,onAfterScreenshot:o,onError:s}){const a=t();e.useEffect(()=>{(async()=>{r();const c=await xc.mediaDevices.getDisplayMedia({video:{width:Ur.innerWidth*a,height:Ur.innerHeight*a},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),u=kt.createElement("video");await new Promise((d,f)=>{u.srcObject=c,u.onloadedmetadata=()=>{i(u,a),c.getTracks().forEach(p=>p.stop()),d()},u.play().catch(f)}),o()})().catch(s)},[])}}function YK(e,t,n){switch(e.type){case"highlight":{t.shadowColor="rgba(0, 0, 0, 0.7)",t.shadowBlur=50,t.fillStyle=n,t.fillRect(e.x-1,e.y-1,e.w+2,e.h+2),t.clearRect(e.x,e.y,e.w,e.h);break}case"hide":t.fillStyle="rgb(0, 0, 0)",t.fillRect(e.x,e.y,e.w,e.h);break}}function Io(e,t,n){if(!e)return;const r=e.getContext("2d",t);r&&n(e,r)}function Uh(e,t){Io(e,{alpha:!0},(n,r)=>{r.drawImage(t,0,0,t.width,t.height,0,0,n.width,n.height)})}function Bh(e,t,n){Io(e,{alpha:!0},(r,i)=>{n.length&&(i.fillStyle="rgba(0, 0, 0, 0.25)",i.fillRect(0,0,r.width,r.height)),n.forEach(o=>{YK(o,i,t)})})}function KK({h:e,hooks:t,outputBuffer:n,dialog:r,options:i}){const o=GK({hooks:t}),s=WK({h:e}),a=HK({h:e}),l={__html:VK(i.styleNonce).innerText},c=r.el.style,u=({screenshot:d})=>{const[f,p]=t.useState("highlight"),[m,b]=t.useState([]),g=t.useRef(null),_=t.useRef(null),y=t.useRef(null),T=t.useRef(null),[S,O]=t.useState(1),N=t.useMemo(()=>{const C=kt.getElementById(i.id);if(!C)return"white";const F=getComputedStyle(C);return F.getPropertyValue("--button-primary-background")||F.getPropertyValue("--accent-background")},[i.id]);t.useLayoutEffect(()=>{const C=()=>{const F=g.current;F&&(Io(d.canvas,{alpha:!1},R=>{const G=Math.min(F.clientWidth/R.width,F.clientHeight/R.height);O(G)}),(F.clientHeight===0||F.clientWidth===0)&&setTimeout(C,0))};return C(),Ur.addEventListener("resize",C),()=>{Ur.removeEventListener("resize",C)}},[d]);const w=t.useCallback((C,F)=>{Io(C,{alpha:!0},(R,G)=>{G.scale(F,F),R.width=d.canvas.width,R.height=d.canvas.height})},[d]);t.useEffect(()=>{w(_.current,d.dpi),Uh(_.current,d.canvas)},[d]),t.useEffect(()=>{w(y.current,d.dpi),Io(y.current,{alpha:!0},(C,F)=>{F.clearRect(0,0,C.width,C.height)}),Bh(y.current,N,m)},[m,N]),t.useEffect(()=>{w(n,d.dpi),Uh(n,d.canvas),Io(kt.createElement("canvas"),{alpha:!0},(C,F)=>{F.scale(d.dpi,d.dpi),C.width=d.canvas.width,C.height=d.canvas.height,Bh(C,N,m),Uh(n,C)})},[m,d,N]);const D=C=>{if(!f||!T.current)return;const F=T.current.getBoundingClientRect(),R={type:f,x:C.offsetX/S,y:C.offsetY/S},G=(M,oe)=>{const te=(oe.clientX-F.x)/S,se=(oe.clientY-F.y)/S;return{type:M.type,x:Math.min(M.x,te),y:Math.min(M.y,se),w:Math.abs(te-M.x),h:Math.abs(se-M.y)}},z=M=>{Io(y.current,{alpha:!0},(oe,te)=>{te.clearRect(0,0,oe.width,oe.height)}),Bh(y.current,N,[...m,G(R,M)])},K=M=>{const oe=G(R,M);oe.w*S>=1&&oe.h*S>=1&&b(te=>[...te,oe]),kt.removeEventListener("mousemove",z),kt.removeEventListener("mouseup",K)};kt.addEventListener("mousemove",z),kt.addEventListener("mouseup",K)},Y=t.useCallback(C=>F=>{F.preventDefault(),F.stopPropagation(),b(R=>{const G=[...R];return G.splice(C,1),G})},[]),q={width:`${d.canvas.width*S}px`,height:`${d.canvas.height*S}px`},P=C=>{C.stopPropagation()};return e("div",{class:"editor"},e("style",{nonce:i.styleNonce,dangerouslySetInnerHTML:l}),e("div",{class:"editor__image-container"},e("div",{class:"editor__canvas-container",ref:g},e("canvas",{ref:_,id:"background",style:q}),e("canvas",{ref:y,id:"foreground",style:q}),e("div",{ref:T,onMouseDown:D,style:q},m.map((C,F)=>e("div",{key:F,class:"editor__rect",style:{top:`${C.y*S}px`,left:`${C.x*S}px`,width:`${C.w*S}px`,height:`${C.h*S}px`}},e("button",{"aria-label":i.removeHighlightText,onClick:Y(F),onMouseDown:P,onMouseUp:P,type:"button"},e(a,null))))))),e(s,{options:i,action:f,setAction:p}))};return function({onError:f}){const[p,m]=t.useState();return o({onBeforeScreenshot:t.useCallback(()=>{c.display="none"},[]),onScreenshot:t.useCallback((b,g)=>{Io(kt.createElement("canvas"),{alpha:!1},(_,y)=>{y.scale(g,g),_.width=b.videoWidth,_.height=b.videoHeight,y.drawImage(b,0,0,_.width,_.height),m({canvas:_,dpi:g})}),n.width=b.videoWidth,n.height=b.videoHeight},[]),onAfterScreenshot:t.useCallback(()=>{c.display="block"},[]),onError:t.useCallback(b=>{c.display="block",f(b)},[])}),p?e(u,{screenshot:p}):e("div",null)}}const XK=(()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{const i=kt.createElement("canvas");return{input:KK({h:e,hooks:t,outputBuffer:i,dialog:n,options:r}),value:async()=>{const o=await new Promise(s=>{i.toBlob(s,"image/png")});if(o)return{data:new Uint8Array(await o.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}}}}})),Pe=je;let jh=0;function K5(){return jh>0}function JK(){jh++,setTimeout(()=>{jh--})}function ba(e,t={}){function n(i){return typeof i=="function"}if(!n(e))return e;try{const i=e.__sentry_wrapped__;if(i)return typeof i=="function"?i:e;if(S_(e))return e}catch{return e}const r=function(...i){try{const o=i.map(s=>ba(s,t));return e.apply(this,o)}catch(o){throw JK(),yr(s=>{s.addEventProcessor(a=>(t.mechanism&&(w_(a,void 0),ji(a,t.mechanism)),a.extra={...a.extra,arguments:i},a)),It(o)}),o}};try{for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}catch{}J9(r,e),Sn(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function xf(){const e=ns(),{referrer:t}=Pe.document||{},{userAgent:n}=Pe.navigator||{},r={...t&&{Referer:t},...n&&{"User-Agent":n}};return{url:e,headers:r}}const ZK=["replayIntegration","replayCanvasIntegration","feedbackIntegration","feedbackModalIntegration","feedbackScreenshotIntegration","captureConsoleIntegration","contextLinesIntegration","linkedErrorsIntegration","dedupeIntegration","extraErrorDataIntegration","graphqlClientIntegration","httpClientIntegration","reportingObserverIntegration","rewriteFramesIntegration","browserProfilingIntegration","moduleMetadataIntegration","instrumentAnthropicAiClient","instrumentOpenAiClient","instrumentGoogleGenAIClient","instrumentLangGraph","createLangChainCallbackHandler","instrumentLangChainEmbeddings"],QK={replayCanvasIntegration:"replay-canvas",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot"};function eX(e){return QK[e]||e.replace("Integration","").toLowerCase()}const X5=Pe;async function J5(e,t){const n=ZK.includes(e)?eX(e):void 0,r=X5.Sentry=X5.Sentry||{};if(!n)throw new Error(`Cannot lazy load integration: ${e}`);const i=r[e];if(typeof i=="function"&&!("_isShim"in i))return i;const o=tX(n),s=Pe.document.createElement("script");s.src=o,s.crossOrigin="anonymous",s.referrerPolicy="strict-origin",t&&s.setAttribute("nonce",t);const a=new Promise((d,f)=>{s.addEventListener("load",()=>d()),s.addEventListener("error",f)}),l=Pe.document.currentScript,c=Pe.document.body||Pe.document.head||l?.parentElement;if(c)c.appendChild(s);else throw new Error(`Could not find parent element to insert lazy-loaded ${e} script`);try{await a}catch{throw new Error(`Error when loading integration: ${e}`)}const u=r[e];if(typeof u!="function")throw new Error(`Could not load integration: ${e}`);return u}function tX(e){const n=Ie()?.getOptions()?.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${Pi}/${e}.min.js`,n).toString()}const nX=T5({lazyLoadIntegration:J5}),Z5=T5({getModalIntegration:()=>zK,getScreenshotIntegration:()=>XK});function Cf(e,t){const n=zh(e,t),r={type:aX(t),value:lX(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function rX(e,t,n,r){const o=Ie()?.getOptions().normalizeDepth,s=dX(t),a={__serialized__:G$(t,o)};if(s)return{exception:{values:[Cf(e,s)]},extra:a};const l={exception:{values:[{type:Nd(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:cX(t,{isUnhandledRejection:r})}]},extra:a};if(n){const c=zh(e,n);c.length&&(l.exception.values[0].stacktrace={frames:c})}return l}function qh(e,t){return{exception:{values:[Cf(e,t)]}}}function zh(e,t){const n=t.stacktrace||t.stack||"",r=oX(t),i=sX(t);try{return e(n,r,i)}catch{}return[]}const iX=/Minified React error #\d+;/i;function oX(e){return e&&iX.test(e.message)?1:0}function sX(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function Q5(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function aX(e){const t=e?.name;return!t&&Q5(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function lX(e){const t=e?.message;return Q5(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?G4(t.error):G4(e):"No error message"}function e6(e,t,n,r){const i=n?.syntheticException||void 0,o=kf(e,t,i,r);return ji(o),o.level="error",n?.event_id&&(o.event_id=n.event_id),gc(o)}function t6(e,t,n="info",r,i){const o=r?.syntheticException||void 0,s=Hh(e,t,o,i);return s.level=n,r?.event_id&&(s.event_id=r.event_id),gc(s)}function kf(e,t,n,r,i){let o;if(Y9(t)&&t.error)return qh(e,t.error);if(K9(t)||$j(t)){const s=t;if("stack"in t)o=qh(e,t);else{const a=s.name||(K9(s)?"DOMError":"DOMException"),l=s.message?`${a}: ${s.message}`:a;o=Hh(e,l,n,r),w_(o,l)}return"code"in s&&(o.tags={...o.tags,"DOMException.code":`${s.code}`}),o}return Di(t)?qh(e,t):Xn(t)||Nd(t)?(o=rX(e,t,n,i),ji(o,{synthetic:!0}),o):(o=Hh(e,t,n,r),w_(o,`${t}`),ji(o,{synthetic:!0}),o)}function Hh(e,t,n,r){const i={};if(r&&n){const o=zh(e,n);o.length&&(i.exception={values:[{value:t,stacktrace:{frames:o}}]}),ji(i,{synthetic:!0})}if(kd(t)){const{__sentry_template_string__:o,__sentry_template_values__:s}=t;return i.logentry={message:o,params:s},i}return i.message=t,i}function cX(e,{isUnhandledRejection:t}){const n=Aj(e),r=t?"promise rejection":"exception";return Y9(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Nd(e)?`Event \`${uX(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function uX(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function dX(e){return Object.values(e).find(t=>t instanceof Error)}class n6 extends vH{constructor(t){const n=fX(t),r=Pe.SENTRY_SDK_SOURCE||yY();e8(n,"browser",["browser"],r),n._metadata?.sdk&&(n._metadata.sdk.settings={infer_ip:n.sendDefaultPii?"auto":"never",...n._metadata.sdk.settings}),super(n);const{sendDefaultPii:i,sendClientReports:o,enableLogs:s,_experiments:a,enableMetrics:l}=this._options,c=l??a?.enableMetrics??!0;Pe.document&&(o||s||c)&&Pe.document.addEventListener("visibilitychange",()=>{Pe.document.visibilityState==="hidden"&&(o&&this._flushOutcomes(),s&&Yd(this),c&&K_(this))}),i&&this.on("beforeSendSession",FH)}eventFromException(t,n){return e6(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return t6(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,i){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,i)}}function fX(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:Pe.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const Br=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ze=je,pX=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",Rc=(e,t,n,r)=>{let i,o;return s=>{t.value>=0&&(s||r)&&(o=t.value-(i??0),(o||i===void 0)&&(i=t.value,t.delta=o,t.rating=pX(t.value,n),e(t)))}},Oc=(e=!0)=>{const t=Ze.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},va=()=>Oc()?.activationStart??0;function Ao(e,t,n){Ze.document&&Ze.addEventListener(e,t,n)}function Nf(e,t,n){Ze.document&&Ze.removeEventListener(e,t,n)}let $a=-1;const r6=new Set,mX=()=>Ze.document?.visibilityState==="hidden"&&!Ze.document?.prerendering?0:1/0,Rf=e=>{if(_X(e)&&$a>-1){if(e.type==="visibilitychange"||e.type==="pagehide")for(const t of r6)t();isFinite($a)||($a=e.type==="visibilitychange"?e.timeStamp:0,Nf("prerenderingchange",Rf,!0))}},Pc=()=>{if(Ze.document&&$a<0){const e=va();$a=(Ze.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(n=>n.name==="hidden"&&n.startTime>e)[0]?.startTime)??mX(),Ao("visibilitychange",Rf,!0),Ao("pagehide",Rf,!0),Ao("prerenderingchange",Rf,!0)}return{get firstHiddenTime(){return $a},onHidden(e){r6.add(e)}}};function _X(e){return e.type==="pagehide"||Ze.document?.visibilityState==="hidden"}const hX=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,Mc=(e,t=-1)=>{const n=Oc();let r="navigate";return n&&(Ze.document?.prerendering||va()>0?r="prerender":Ze.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:hX(),navigationType:r}},Vh=new WeakMap;function Wh(e,t){try{return Vh.get(e)||Vh.set(e,new t),Vh.get(e)}catch{return new t}}class Of{constructor(){Of.prototype.__init.call(this),Of.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(t){if(t.hadRecentInput)return;const n=this._sessionEntries[0],r=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this._sessionValue+=t.value,this._sessionEntries.push(t)):(this._sessionValue=t.value,this._sessionEntries=[t]),this._onAfterProcessingUnexpectedShift?.(t)}}const Sa=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(i=>{Promise.resolve().then(()=>{t(i.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},Gh=e=>{let t=!1;return()=>{t||(e(),t=!0)}},Pf=e=>{Ze.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},gX=[1800,3e3],yX=(e,t={})=>{Pf(()=>{const n=Pc(),r=Mc("FCP");let i;const s=Sa("paint",a=>{for(const l of a)l.name==="first-contentful-paint"&&(s.disconnect(),l.startTime<n.firstHiddenTime&&(r.value=Math.max(l.startTime-va(),0),r.entries.push(l),i(!0)))});s&&(i=Rc(e,r,gX,t.reportAllChanges))})},bX=[.1,.25],vX=(e,t={})=>{yX(Gh(()=>{const n=Mc("CLS",0);let r;const i=Pc(),o=Wh(t,Of),s=l=>{for(const c of l)o._processEntry(c);o._sessionValue>n.value&&(n.value=o._sessionValue,n.entries=o._sessionEntries,r())},a=Sa("layout-shift",s);a&&(r=Rc(e,n,bX,t.reportAllChanges),i.onHidden(()=>{s(a.takeRecords()),r(!0)}),Ze?.setTimeout?.(r))}))};let i6=0,Yh=1/0,Mf=0;const $X=e=>{e.forEach(t=>{t.interactionId&&(Yh=Math.min(Yh,t.interactionId),Mf=Math.max(Mf,t.interactionId),i6=Mf?(Mf-Yh)/7+1:0)})};let Kh;const o6=()=>Kh?i6:performance.interactionCount||0,SX=()=>{"interactionCount"in performance||Kh||(Kh=Sa("event",$X,{type:"event",buffered:!0,durationThreshold:0}))},Xh=10;let s6=0;const EX=()=>o6()-s6;class Lf{constructor(){Lf.prototype.__init.call(this),Lf.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){s6=o6(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const t=Math.min(this._longestInteractionList.length-1,Math.floor(EX()/50));return this._longestInteractionList[t]}_processEntry(t){if(this._onBeforeProcessingEntry?.(t),!(t.interactionId||t.entryType==="first-input"))return;const n=this._longestInteractionList.at(-1);let r=this._longestInteractionMap.get(t.interactionId);if(r||this._longestInteractionList.length<Xh||t.duration>n._latency){if(r?t.duration>r._latency?(r.entries=[t],r._latency=t.duration):t.duration===r._latency&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],_latency:t.duration},this._longestInteractionMap.set(r.id,r),this._longestInteractionList.push(r)),this._longestInteractionList.sort((i,o)=>o._latency-i._latency),this._longestInteractionList.length>Xh){const i=this._longestInteractionList.splice(Xh);for(const o of i)this._longestInteractionMap.delete(o.id)}this._onAfterProcessingINPCandidate?.(r)}}}const a6=e=>{const t=Ze.requestIdleCallback||Ze.setTimeout;Ze.document?.visibilityState==="hidden"?e():(e=Gh(e),Ao("visibilitychange",e,{once:!0,capture:!0}),Ao("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),Nf("visibilitychange",e,{capture:!0}),Nf("pagehide",e,{capture:!0})}))},TX=[200,500],wX=40,IX=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return;const n=Pc();Pf(()=>{SX();const r=Mc("INP");let i;const o=Wh(t,Lf),s=l=>{a6(()=>{for(const u of l)o._processEntry(u);const c=o._estimateP98LongestInteraction();c&&c._latency!==r.value&&(r.value=c._latency,r.entries=c.entries,i())})},a=Sa("event",s,{durationThreshold:t.durationThreshold??wX});i=Rc(e,r,TX,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{s(a.takeRecords()),i(!0)}))})};class AX{_processEntry(t){this._onBeforeProcessingEntry?.(t)}}const xX=[2500,4e3],CX=(e,t={})=>{Pf(()=>{const n=Pc(),r=Mc("LCP");let i;const o=Wh(t,AX),s=l=>{t.reportAllChanges||(l=l.slice(-1));for(const c of l)o._processEntry(c),c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-va(),0),r.entries=[c],i())},a=Sa("largest-contentful-paint",s);if(a){i=Rc(e,r,xX,t.reportAllChanges);const l=Gh(()=>{s(a.takeRecords()),a.disconnect(),i(!0)}),c=u=>{u.isTrusted&&(a6(l),Nf(u.type,c,{capture:!0}))};for(const u of["keydown","click","visibilitychange"])Ao(u,c,{capture:!0})}})},kX=[800,1800],Jh=e=>{Ze.document?.prerendering?Pf(()=>Jh(e)):Ze.document?.readyState!=="complete"?addEventListener("load",()=>Jh(e),!0):setTimeout(e)},NX=(e,t={})=>{const n=Mc("TTFB"),r=Rc(e,n,kX,t.reportAllChanges);Jh(()=>{const i=Oc();i&&(n.value=Math.max(i.responseStart-va(),0),n.entries=[i],r(!0))})},Lc={},Df={};let l6,c6,u6,d6;function Ff(e,t=!1){return Bf("cls",e,OX,l6,t)}function Uf(e,t=!1){return Bf("lcp",e,PX,c6,t)}function RX(e){return Bf("ttfb",e,MX,u6)}function Zh(e){return Bf("inp",e,LX,d6)}function $s(e,t){return f6(e,t),Df[e]||(DX(e),Df[e]=!0),p6(e,t)}function Dc(e,t){const n=Lc[e];if(n?.length)for(const r of n)try{r(t)}catch(i){Br&&B.error(`Error while triggering instrumentation handler.
|
|
517
|
+
`,e&&t.setAttribute("nonce",e),t}function WK({h:e}){return function({action:n,setAction:r,options:i}){return e("div",{class:"editor__tool-container"},e("div",{class:"editor__tool-bar"},e("button",{type:"button",class:`editor__tool ${n==="highlight"?"editor__tool--active":""}`,onClick:()=>{r(n==="highlight"?"":"highlight")}},i.highlightToolText),e("button",{type:"button",class:`editor__tool ${n==="hide"?"editor__tool--active":""}`,onClick:()=>{r(n==="hide"?"":"hide")}},i.hideToolText)))}}function GK({hooks:e}){function t(){const[n,r]=e.useState(Ur.devicePixelRatio??1);return e.useEffect(()=>{const i=()=>{r(Ur.devicePixelRatio)},o=matchMedia(`(resolution: ${Ur.devicePixelRatio}dppx)`);return o.addEventListener("change",i),()=>{o.removeEventListener("change",i)}},[]),n}return function({onBeforeScreenshot:r,onScreenshot:i,onAfterScreenshot:o,onError:s}){const a=t();e.useEffect(()=>{(async()=>{r();const c=await xc.mediaDevices.getDisplayMedia({video:{width:Ur.innerWidth*a,height:Ur.innerHeight*a},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),u=kt.createElement("video");await new Promise((d,f)=>{u.srcObject=c,u.onloadedmetadata=()=>{i(u,a),c.getTracks().forEach(p=>p.stop()),d()},u.play().catch(f)}),o()})().catch(s)},[])}}function YK(e,t,n){switch(e.type){case"highlight":{t.shadowColor="rgba(0, 0, 0, 0.7)",t.shadowBlur=50,t.fillStyle=n,t.fillRect(e.x-1,e.y-1,e.w+2,e.h+2),t.clearRect(e.x,e.y,e.w,e.h);break}case"hide":t.fillStyle="rgb(0, 0, 0)",t.fillRect(e.x,e.y,e.w,e.h);break}}function Io(e,t,n){if(!e)return;const r=e.getContext("2d",t);r&&n(e,r)}function Uh(e,t){Io(e,{alpha:!0},(n,r)=>{r.drawImage(t,0,0,t.width,t.height,0,0,n.width,n.height)})}function Bh(e,t,n){Io(e,{alpha:!0},(r,i)=>{n.length&&(i.fillStyle="rgba(0, 0, 0, 0.25)",i.fillRect(0,0,r.width,r.height)),n.forEach(o=>{YK(o,i,t)})})}function KK({h:e,hooks:t,outputBuffer:n,dialog:r,options:i}){const o=GK({hooks:t}),s=WK({h:e}),a=HK({h:e}),l={__html:VK(i.styleNonce).innerText},c=r.el.style,u=({screenshot:d})=>{const[f,p]=t.useState("highlight"),[m,b]=t.useState([]),g=t.useRef(null),_=t.useRef(null),y=t.useRef(null),T=t.useRef(null),[S,O]=t.useState(1),N=t.useMemo(()=>{const C=kt.getElementById(i.id);if(!C)return"white";const F=getComputedStyle(C);return F.getPropertyValue("--button-primary-background")||F.getPropertyValue("--accent-background")},[i.id]);t.useLayoutEffect(()=>{const C=()=>{const F=g.current;F&&(Io(d.canvas,{alpha:!1},R=>{const G=Math.min(F.clientWidth/R.width,F.clientHeight/R.height);O(G)}),(F.clientHeight===0||F.clientWidth===0)&&setTimeout(C,0))};return C(),Ur.addEventListener("resize",C),()=>{Ur.removeEventListener("resize",C)}},[d]);const w=t.useCallback((C,F)=>{Io(C,{alpha:!0},(R,G)=>{G.scale(F,F),R.width=d.canvas.width,R.height=d.canvas.height})},[d]);t.useEffect(()=>{w(_.current,d.dpi),Uh(_.current,d.canvas)},[d]),t.useEffect(()=>{w(y.current,d.dpi),Io(y.current,{alpha:!0},(C,F)=>{F.clearRect(0,0,C.width,C.height)}),Bh(y.current,N,m)},[m,N]),t.useEffect(()=>{w(n,d.dpi),Uh(n,d.canvas),Io(kt.createElement("canvas"),{alpha:!0},(C,F)=>{F.scale(d.dpi,d.dpi),C.width=d.canvas.width,C.height=d.canvas.height,Bh(C,N,m),Uh(n,C)})},[m,d,N]);const D=C=>{if(!f||!T.current)return;const F=T.current.getBoundingClientRect(),R={type:f,x:C.offsetX/S,y:C.offsetY/S},G=(M,oe)=>{const te=(oe.clientX-F.x)/S,se=(oe.clientY-F.y)/S;return{type:M.type,x:Math.min(M.x,te),y:Math.min(M.y,se),w:Math.abs(te-M.x),h:Math.abs(se-M.y)}},z=M=>{Io(y.current,{alpha:!0},(oe,te)=>{te.clearRect(0,0,oe.width,oe.height)}),Bh(y.current,N,[...m,G(R,M)])},K=M=>{const oe=G(R,M);oe.w*S>=1&&oe.h*S>=1&&b(te=>[...te,oe]),kt.removeEventListener("mousemove",z),kt.removeEventListener("mouseup",K)};kt.addEventListener("mousemove",z),kt.addEventListener("mouseup",K)},Y=t.useCallback(C=>F=>{F.preventDefault(),F.stopPropagation(),b(R=>{const G=[...R];return G.splice(C,1),G})},[]),q={width:`${d.canvas.width*S}px`,height:`${d.canvas.height*S}px`},P=C=>{C.stopPropagation()};return e("div",{class:"editor"},e("style",{nonce:i.styleNonce,dangerouslySetInnerHTML:l}),e("div",{class:"editor__image-container"},e("div",{class:"editor__canvas-container",ref:g},e("canvas",{ref:_,id:"background",style:q}),e("canvas",{ref:y,id:"foreground",style:q}),e("div",{ref:T,onMouseDown:D,style:q},m.map((C,F)=>e("div",{key:F,class:"editor__rect",style:{top:`${C.y*S}px`,left:`${C.x*S}px`,width:`${C.w*S}px`,height:`${C.h*S}px`}},e("button",{"aria-label":i.removeHighlightText,onClick:Y(F),onMouseDown:P,onMouseUp:P,type:"button"},e(a,null))))))),e(s,{options:i,action:f,setAction:p}))};return function({onError:f}){const[p,m]=t.useState();return o({onBeforeScreenshot:t.useCallback(()=>{c.display="none"},[]),onScreenshot:t.useCallback((b,g)=>{Io(kt.createElement("canvas"),{alpha:!1},(_,y)=>{y.scale(g,g),_.width=b.videoWidth,_.height=b.videoHeight,y.drawImage(b,0,0,_.width,_.height),m({canvas:_,dpi:g})}),n.width=b.videoWidth,n.height=b.videoHeight},[]),onAfterScreenshot:t.useCallback(()=>{c.display="block"},[]),onError:t.useCallback(b=>{c.display="block",f(b)},[])}),p?e(u,{screenshot:p}):e("div",null)}}const XK=(()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{const i=kt.createElement("canvas");return{input:KK({h:e,hooks:t,outputBuffer:i,dialog:n,options:r}),value:async()=>{const o=await new Promise(s=>{i.toBlob(s,"image/png")});if(o)return{data:new Uint8Array(await o.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}}}}})),Pe=je;let jh=0;function K5(){return jh>0}function JK(){jh++,setTimeout(()=>{jh--})}function ba(e,t={}){function n(i){return typeof i=="function"}if(!n(e))return e;try{const i=e.__sentry_wrapped__;if(i)return typeof i=="function"?i:e;if(S_(e))return e}catch{return e}const r=function(...i){try{const o=i.map(s=>ba(s,t));return e.apply(this,o)}catch(o){throw JK(),yr(s=>{s.addEventProcessor(a=>(t.mechanism&&(w_(a,void 0),ji(a,t.mechanism)),a.extra={...a.extra,arguments:i},a)),It(o)}),o}};try{for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}catch{}J$(r,e),Sn(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function xf(){const e=ns(),{referrer:t}=Pe.document||{},{userAgent:n}=Pe.navigator||{},r={...t&&{Referer:t},...n&&{"User-Agent":n}};return{url:e,headers:r}}const ZK=["replayIntegration","replayCanvasIntegration","feedbackIntegration","feedbackModalIntegration","feedbackScreenshotIntegration","captureConsoleIntegration","contextLinesIntegration","linkedErrorsIntegration","dedupeIntegration","extraErrorDataIntegration","graphqlClientIntegration","httpClientIntegration","reportingObserverIntegration","rewriteFramesIntegration","browserProfilingIntegration","moduleMetadataIntegration","instrumentAnthropicAiClient","instrumentOpenAiClient","instrumentGoogleGenAIClient","instrumentLangGraph","createLangChainCallbackHandler","instrumentLangChainEmbeddings"],QK={replayCanvasIntegration:"replay-canvas",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot"};function eX(e){return QK[e]||e.replace("Integration","").toLowerCase()}const X5=Pe;async function J5(e,t){const n=ZK.includes(e)?eX(e):void 0,r=X5.Sentry=X5.Sentry||{};if(!n)throw new Error(`Cannot lazy load integration: ${e}`);const i=r[e];if(typeof i=="function"&&!("_isShim"in i))return i;const o=tX(n),s=Pe.document.createElement("script");s.src=o,s.crossOrigin="anonymous",s.referrerPolicy="strict-origin",t&&s.setAttribute("nonce",t);const a=new Promise((d,f)=>{s.addEventListener("load",()=>d()),s.addEventListener("error",f)}),l=Pe.document.currentScript,c=Pe.document.body||Pe.document.head||l?.parentElement;if(c)c.appendChild(s);else throw new Error(`Could not find parent element to insert lazy-loaded ${e} script`);try{await a}catch{throw new Error(`Error when loading integration: ${e}`)}const u=r[e];if(typeof u!="function")throw new Error(`Could not load integration: ${e}`);return u}function tX(e){const n=Ie()?.getOptions()?.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${Pi}/${e}.min.js`,n).toString()}const nX=T5({lazyLoadIntegration:J5}),Z5=T5({getModalIntegration:()=>zK,getScreenshotIntegration:()=>XK});function Cf(e,t){const n=zh(e,t),r={type:aX(t),value:lX(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function rX(e,t,n,r){const o=Ie()?.getOptions().normalizeDepth,s=dX(t),a={__serialized__:G9(t,o)};if(s)return{exception:{values:[Cf(e,s)]},extra:a};const l={exception:{values:[{type:Nd(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:cX(t,{isUnhandledRejection:r})}]},extra:a};if(n){const c=zh(e,n);c.length&&(l.exception.values[0].stacktrace={frames:c})}return l}function qh(e,t){return{exception:{values:[Cf(e,t)]}}}function zh(e,t){const n=t.stacktrace||t.stack||"",r=oX(t),i=sX(t);try{return e(n,r,i)}catch{}return[]}const iX=/Minified React error #\d+;/i;function oX(e){return e&&iX.test(e.message)?1:0}function sX(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function Q5(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function aX(e){const t=e?.name;return!t&&Q5(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function lX(e){const t=e?.message;return Q5(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?G4(t.error):G4(e):"No error message"}function e6(e,t,n,r){const i=n?.syntheticException||void 0,o=kf(e,t,i,r);return ji(o),o.level="error",n?.event_id&&(o.event_id=n.event_id),gc(o)}function t6(e,t,n="info",r,i){const o=r?.syntheticException||void 0,s=Hh(e,t,o,i);return s.level=n,r?.event_id&&(s.event_id=r.event_id),gc(s)}function kf(e,t,n,r,i){let o;if(Y$(t)&&t.error)return qh(e,t.error);if(K$(t)||$j(t)){const s=t;if("stack"in t)o=qh(e,t);else{const a=s.name||(K$(s)?"DOMError":"DOMException"),l=s.message?`${a}: ${s.message}`:a;o=Hh(e,l,n,r),w_(o,l)}return"code"in s&&(o.tags={...o.tags,"DOMException.code":`${s.code}`}),o}return Di(t)?qh(e,t):Xn(t)||Nd(t)?(o=rX(e,t,n,i),ji(o,{synthetic:!0}),o):(o=Hh(e,t,n,r),w_(o,`${t}`),ji(o,{synthetic:!0}),o)}function Hh(e,t,n,r){const i={};if(r&&n){const o=zh(e,n);o.length&&(i.exception={values:[{value:t,stacktrace:{frames:o}}]}),ji(i,{synthetic:!0})}if(kd(t)){const{__sentry_template_string__:o,__sentry_template_values__:s}=t;return i.logentry={message:o,params:s},i}return i.message=t,i}function cX(e,{isUnhandledRejection:t}){const n=Aj(e),r=t?"promise rejection":"exception";return Y$(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Nd(e)?`Event \`${uX(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function uX(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function dX(e){return Object.values(e).find(t=>t instanceof Error)}class n6 extends vH{constructor(t){const n=fX(t),r=Pe.SENTRY_SDK_SOURCE||yY();e8(n,"browser",["browser"],r),n._metadata?.sdk&&(n._metadata.sdk.settings={infer_ip:n.sendDefaultPii?"auto":"never",...n._metadata.sdk.settings}),super(n);const{sendDefaultPii:i,sendClientReports:o,enableLogs:s,_experiments:a,enableMetrics:l}=this._options,c=l??a?.enableMetrics??!0;Pe.document&&(o||s||c)&&Pe.document.addEventListener("visibilitychange",()=>{Pe.document.visibilityState==="hidden"&&(o&&this._flushOutcomes(),s&&Yd(this),c&&K_(this))}),i&&this.on("beforeSendSession",FH)}eventFromException(t,n){return e6(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return t6(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,i){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,i)}}function fX(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:Pe.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const Br=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ze=je,pX=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",Rc=(e,t,n,r)=>{let i,o;return s=>{t.value>=0&&(s||r)&&(o=t.value-(i??0),(o||i===void 0)&&(i=t.value,t.delta=o,t.rating=pX(t.value,n),e(t)))}},Oc=(e=!0)=>{const t=Ze.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},va=()=>Oc()?.activationStart??0;function Ao(e,t,n){Ze.document&&Ze.addEventListener(e,t,n)}function Nf(e,t,n){Ze.document&&Ze.removeEventListener(e,t,n)}let $a=-1;const r6=new Set,mX=()=>Ze.document?.visibilityState==="hidden"&&!Ze.document?.prerendering?0:1/0,Rf=e=>{if(_X(e)&&$a>-1){if(e.type==="visibilitychange"||e.type==="pagehide")for(const t of r6)t();isFinite($a)||($a=e.type==="visibilitychange"?e.timeStamp:0,Nf("prerenderingchange",Rf,!0))}},Pc=()=>{if(Ze.document&&$a<0){const e=va();$a=(Ze.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(n=>n.name==="hidden"&&n.startTime>e)[0]?.startTime)??mX(),Ao("visibilitychange",Rf,!0),Ao("pagehide",Rf,!0),Ao("prerenderingchange",Rf,!0)}return{get firstHiddenTime(){return $a},onHidden(e){r6.add(e)}}};function _X(e){return e.type==="pagehide"||Ze.document?.visibilityState==="hidden"}const hX=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,Mc=(e,t=-1)=>{const n=Oc();let r="navigate";return n&&(Ze.document?.prerendering||va()>0?r="prerender":Ze.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:hX(),navigationType:r}},Vh=new WeakMap;function Wh(e,t){try{return Vh.get(e)||Vh.set(e,new t),Vh.get(e)}catch{return new t}}class Of{constructor(){Of.prototype.__init.call(this),Of.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(t){if(t.hadRecentInput)return;const n=this._sessionEntries[0],r=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this._sessionValue+=t.value,this._sessionEntries.push(t)):(this._sessionValue=t.value,this._sessionEntries=[t]),this._onAfterProcessingUnexpectedShift?.(t)}}const Sa=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(i=>{Promise.resolve().then(()=>{t(i.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},Gh=e=>{let t=!1;return()=>{t||(e(),t=!0)}},Pf=e=>{Ze.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},gX=[1800,3e3],yX=(e,t={})=>{Pf(()=>{const n=Pc(),r=Mc("FCP");let i;const s=Sa("paint",a=>{for(const l of a)l.name==="first-contentful-paint"&&(s.disconnect(),l.startTime<n.firstHiddenTime&&(r.value=Math.max(l.startTime-va(),0),r.entries.push(l),i(!0)))});s&&(i=Rc(e,r,gX,t.reportAllChanges))})},bX=[.1,.25],vX=(e,t={})=>{yX(Gh(()=>{const n=Mc("CLS",0);let r;const i=Pc(),o=Wh(t,Of),s=l=>{for(const c of l)o._processEntry(c);o._sessionValue>n.value&&(n.value=o._sessionValue,n.entries=o._sessionEntries,r())},a=Sa("layout-shift",s);a&&(r=Rc(e,n,bX,t.reportAllChanges),i.onHidden(()=>{s(a.takeRecords()),r(!0)}),Ze?.setTimeout?.(r))}))};let i6=0,Yh=1/0,Mf=0;const $X=e=>{e.forEach(t=>{t.interactionId&&(Yh=Math.min(Yh,t.interactionId),Mf=Math.max(Mf,t.interactionId),i6=Mf?(Mf-Yh)/7+1:0)})};let Kh;const o6=()=>Kh?i6:performance.interactionCount||0,SX=()=>{"interactionCount"in performance||Kh||(Kh=Sa("event",$X,{type:"event",buffered:!0,durationThreshold:0}))},Xh=10;let s6=0;const EX=()=>o6()-s6;class Lf{constructor(){Lf.prototype.__init.call(this),Lf.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){s6=o6(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const t=Math.min(this._longestInteractionList.length-1,Math.floor(EX()/50));return this._longestInteractionList[t]}_processEntry(t){if(this._onBeforeProcessingEntry?.(t),!(t.interactionId||t.entryType==="first-input"))return;const n=this._longestInteractionList.at(-1);let r=this._longestInteractionMap.get(t.interactionId);if(r||this._longestInteractionList.length<Xh||t.duration>n._latency){if(r?t.duration>r._latency?(r.entries=[t],r._latency=t.duration):t.duration===r._latency&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],_latency:t.duration},this._longestInteractionMap.set(r.id,r),this._longestInteractionList.push(r)),this._longestInteractionList.sort((i,o)=>o._latency-i._latency),this._longestInteractionList.length>Xh){const i=this._longestInteractionList.splice(Xh);for(const o of i)this._longestInteractionMap.delete(o.id)}this._onAfterProcessingINPCandidate?.(r)}}}const a6=e=>{const t=Ze.requestIdleCallback||Ze.setTimeout;Ze.document?.visibilityState==="hidden"?e():(e=Gh(e),Ao("visibilitychange",e,{once:!0,capture:!0}),Ao("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),Nf("visibilitychange",e,{capture:!0}),Nf("pagehide",e,{capture:!0})}))},TX=[200,500],wX=40,IX=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return;const n=Pc();Pf(()=>{SX();const r=Mc("INP");let i;const o=Wh(t,Lf),s=l=>{a6(()=>{for(const u of l)o._processEntry(u);const c=o._estimateP98LongestInteraction();c&&c._latency!==r.value&&(r.value=c._latency,r.entries=c.entries,i())})},a=Sa("event",s,{durationThreshold:t.durationThreshold??wX});i=Rc(e,r,TX,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{s(a.takeRecords()),i(!0)}))})};class AX{_processEntry(t){this._onBeforeProcessingEntry?.(t)}}const xX=[2500,4e3],CX=(e,t={})=>{Pf(()=>{const n=Pc(),r=Mc("LCP");let i;const o=Wh(t,AX),s=l=>{t.reportAllChanges||(l=l.slice(-1));for(const c of l)o._processEntry(c),c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-va(),0),r.entries=[c],i())},a=Sa("largest-contentful-paint",s);if(a){i=Rc(e,r,xX,t.reportAllChanges);const l=Gh(()=>{s(a.takeRecords()),a.disconnect(),i(!0)}),c=u=>{u.isTrusted&&(a6(l),Nf(u.type,c,{capture:!0}))};for(const u of["keydown","click","visibilitychange"])Ao(u,c,{capture:!0})}})},kX=[800,1800],Jh=e=>{Ze.document?.prerendering?Pf(()=>Jh(e)):Ze.document?.readyState!=="complete"?addEventListener("load",()=>Jh(e),!0):setTimeout(e)},NX=(e,t={})=>{const n=Mc("TTFB"),r=Rc(e,n,kX,t.reportAllChanges);Jh(()=>{const i=Oc();i&&(n.value=Math.max(i.responseStart-va(),0),n.entries=[i],r(!0))})},Lc={},Df={};let l6,c6,u6,d6;function Ff(e,t=!1){return Bf("cls",e,OX,l6,t)}function Uf(e,t=!1){return Bf("lcp",e,PX,c6,t)}function RX(e){return Bf("ttfb",e,MX,u6)}function Zh(e){return Bf("inp",e,LX,d6)}function $s(e,t){return f6(e,t),Df[e]||(DX(e),Df[e]=!0),p6(e,t)}function Dc(e,t){const n=Lc[e];if(n?.length)for(const r of n)try{r(t)}catch(i){Br&&B.error(`Error while triggering instrumentation handler.
|
|
518
518
|
Type: ${e}
|
|
519
519
|
Name: ${Li(r)}
|
|
520
|
-
Error:`,i)}}function OX(){return vX(e=>{Dc("cls",{metric:e}),l6=e},{reportAllChanges:!0})}function PX(){return CX(e=>{Dc("lcp",{metric:e}),c6=e},{reportAllChanges:!0})}function MX(){return NX(e=>{Dc("ttfb",{metric:e}),u6=e})}function LX(){return IX(e=>{Dc("inp",{metric:e}),d6=e})}function Bf(e,t,n,r,i=!1){f6(e,t);let o;return Df[e]||(o=n(),Df[e]=!0),r&&t({metric:r}),p6(e,t,i?o:void 0)}function DX(e){const t={};e==="event"&&(t.durationThreshold=0),Sa(e,n=>{Dc(e,{entries:n})},t)}function f6(e,t){Lc[e]=Lc[e]||[],Lc[e].push(t)}function p6(e,t,n){return()=>{n&&n();const r=Lc[e];if(!r)return;const i=r.indexOf(t);i!==-1&&r.splice(i,1)}}function FX(e){return"duration"in e}const UX=e=>{const t=n=>{(n.type==="pagehide"||Ze.document?.visibilityState==="hidden")&&e(n)};Ao("visibilitychange",t,{capture:!0,once:!0}),Ao("pagehide",t,{capture:!0,once:!0})};function Qh(e){return typeof e=="number"&&isFinite(e)}function xo(e,t,n,{...r}){const i=Je(e).start_timestamp;return i&&i>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),mc(e,()=>{const o=li({startTime:t,...r});return o&&o.end(n),o})}function eg(e){const t=Ie();if(!t)return;const{name:n,transaction:r,attributes:i,startTime:o}=e,{release:s,environment:a,sendDefaultPii:l}=t.getOptions(),u=t.getIntegrationByName("Replay")?.getReplayId(),d=Ke(),f=d.getUser(),p=f!==void 0?f.email||f.id||f.ip_address:void 0;let m;try{m=d.getScopeData().contexts.profile.profile_id}catch{}const b={release:s,environment:a,user:p||void 0,profile_id:m||void 0,replay_id:u||void 0,transaction:r,"user_agent.original":Ze.navigator?.userAgent,"client.address":l?"{{auto}}":void 0,...i};return li({name:n,attributes:b,startTime:o,experimental:{standalone:!0}})}function Ea(){return Ze.addEventListener&&Ze.performance}function Bt(e){return e/1e3}function BX(e){let t="unknown",n="unknown",r="";for(const i of e){if(i==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(i))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=i}return r===e&&(t=r),{name:t,version:n}}function jf(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function qf(e,t){let n,r=!1;function i(a){!r&&n&&t(a,n.spanContext().spanId,n),r=!0}UX(()=>{i("pagehide")});const o=e.on("beforeStartNavigationSpan",(a,l)=>{l?.isRedirect||(i("navigation"),o(),s())}),s=e.on("afterStartPageLoadSpan",a=>{n=a,s()})}function jX(e){let t=0,n;if(!jf("layout-shift"))return;const r=Ff(({metric:i})=>{const o=i.entries[i.entries.length-1];o&&(t=i.value,n=o)},!0);qf(e,(i,o)=>{qX(t,n,o,i),r()})}function qX(e,t,n,r){Br&&B.log(`Sending CLS span (${e})`);const i=t?Bt((tn()||0)+t.startTime):Ct(),o=Ke().getScopeData().transactionName,s=t?an(t.sources[0]?.node):"Layout shift",a={[it]:"auto.http.browser.cls",[yt]:"ui.webvital.cls",[vo]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((c,u)=>{a[`cls.source.${u+1}`]=an(c.node)});const l=eg({name:s,transaction:o,attributes:a,startTime:i});l&&(l.addEvent("cls",{[oc]:"",[sc]:e}),l.end(i))}const zX=6e4;function Fc(e){return e!=null&&e>0&&e<=zX}function HX(e){let t=0,n;if(!jf("largest-contentful-paint"))return;const r=Uf(({metric:i})=>{const o=i.entries[i.entries.length-1];!o||!Fc(i.value)||(t=i.value,n=o)},!0);qf(e,(i,o)=>{VX(t,n,o,i),r()})}function VX(e,t,n,r){if(!Fc(e))return;Br&&B.log(`Sending LCP span (${e})`);const i=Bt((tn()||0)+(t?.startTime||0)),o=Ke().getScopeData().transactionName,s=t?an(t.element):"Largest contentful paint",a={[it]:"auto.http.browser.lcp",[yt]:"ui.webvital.lcp",[vo]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(a["lcp.element"]=an(t.element)),t.id&&(a["lcp.id"]=t.id),t.url&&(a["lcp.url"]=t.url),t.loadTime!=null&&(a["lcp.loadTime"]=t.loadTime),t.renderTime!=null&&(a["lcp.renderTime"]=t.renderTime),t.size!=null&&(a["lcp.size"]=t.size));const l=eg({name:s,transaction:o,attributes:a,startTime:i});l&&(l.addEvent("lcp",{[oc]:"millisecond",[sc]:e}),l.end(i))}function Er(e){return e&&((tn()||performance.timeOrigin)+e)/1e3}function m6(e){const t={};if(e.nextHopProtocol!=null){const{name:n,version:r}=BX(e.nextHopProtocol);t["network.protocol.version"]=r,t["network.protocol.name"]=n}return tn()||Ea()?.timeOrigin?WX({...t,"http.request.redirect_start":Er(e.redirectStart),"http.request.redirect_end":Er(e.redirectEnd),"http.request.worker_start":Er(e.workerStart),"http.request.fetch_start":Er(e.fetchStart),"http.request.domain_lookup_start":Er(e.domainLookupStart),"http.request.domain_lookup_end":Er(e.domainLookupEnd),"http.request.connect_start":Er(e.connectStart),"http.request.secure_connection_start":Er(e.secureConnectionStart),"http.request.connection_end":Er(e.connectEnd),"http.request.request_start":Er(e.requestStart),"http.request.response_start":Er(e.responseStart),"http.request.response_end":Er(e.responseEnd),"http.request.time_to_first_byte":e.responseStart!=null?e.responseStart/1e3:void 0}):t}function WX(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}const GX=2147483647;let _6=0,qn={},Jn,zf;function YX({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=Ea();if(r&&tn()){r.mark&&Ze.performance.mark("sentry-tracing-init");const i=t?HX(n):t===!1?QX():void 0,o=e?jX(n):e===!1?ZX():void 0,s=eJ();return()=>{s(),i?.(),o?.()}}return()=>{}}function KX(){$s("longtask",({entries:e})=>{const t=Ht();if(!t)return;const{op:n,start_timestamp:r}=Je(t);for(const i of e){const o=Bt(tn()+i.startTime),s=Bt(i.duration);n==="navigation"&&r&&o<r||xo(t,o,o+s,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[it]:"auto.ui.browser.metrics"}})}})}function XX(){new PerformanceObserver(t=>{const n=Ht();if(n)for(const r of t.getEntries()){if(!r.scripts[0])continue;const i=Bt(tn()+r.startTime),{start_timestamp:o,op:s}=Je(n);if(s==="navigation"&&o&&i<o)continue;const a=Bt(r.duration),l={[it]:"auto.ui.browser.metrics"},c=r.scripts[0],{invoker:u,invokerType:d,sourceURL:f,sourceFunctionName:p,sourceCharPosition:m}=c;l["browser.script.invoker"]=u,l["browser.script.invoker_type"]=d,f&&(l["code.filepath"]=f),p&&(l["code.function"]=p),m!==-1&&(l["browser.script.source_char_position"]=m),xo(n,i,i+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:l})}}).observe({type:"long-animation-frame",buffered:!0})}function JX(){$s("event",({entries:e})=>{const t=Ht();if(t){for(const n of e)if(n.name==="click"){const r=Bt(tn()+n.startTime),i=Bt(n.duration),o={name:an(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[it]:"auto.ui.browser.metrics"}},s=$_(n.target);s&&(o.attributes["ui.component_name"]=s),xo(t,r,r+i,o)}}})}function ZX(){return Ff(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(qn.cls={value:e.value,unit:""},zf=t)},!0)}function QX(){return Uf(({metric:e})=>{const t=e.entries[e.entries.length-1];!t||!Fc(e.value)||(qn.lcp={value:e.value,unit:"millisecond"},Jn=t)},!0)}function eJ(){return RX(({metric:e})=>{e.entries[e.entries.length-1]&&(qn.ttfb={value:e.value,unit:"millisecond"})})}function tJ(e,t){const n=Ea(),r=tn();if(!n?.getEntries||!r)return;const{spanStreamingEnabled:i,ignorePerformanceApiSpans:o,ignoreResourceSpans:s,recordClsOnPageloadSpan:a,recordLcpOnPageloadSpan:l}=t,c=Bt(r),u=n.getEntries(),{op:d,start_timestamp:f}=Je(e);if(u.slice(_6).forEach(p=>{const m=Bt(p.startTime),b=Bt(Math.max(0,p.duration));if(!(d==="navigation"&&f&&c+m<f))switch(p.entryType){case"navigation":{oJ(e,p,c);break}case"mark":case"paint":case"measure":{rJ(e,p,m,b,c,o);const g=Pc(),_=p.startTime<g.firstHiddenTime;p.name==="first-paint"&&_&&(qn.fp={value:p.startTime,unit:"millisecond"}),p.name==="first-contentful-paint"&&_&&(qn.fcp={value:p.startTime,unit:"millisecond"});break}case"resource":{lJ(e,p,p.name,m,b,c,s);break}}}),_6=Math.max(u.length-1,0),cJ(e,i),d==="pageload"){if(fJ(qn),i){const p=(m,b,g)=>{const _=g??`browser.web_vital.${m}.value`;e.setAttribute(_,b),Br&&B.log("Setting web vital attribute",{[_]:b},"on pageload span")};["ttfb","fp","fcp"].forEach(m=>{qn[m]&&p(m,qn[m].value)}),qn["ttfb.requestTime"]&&p("ttfb.requestTime",qn["ttfb.requestTime"].value,"browser.web_vital.ttfb.request_time")}else a||delete qn.cls,l||delete qn.lcp,Object.entries(qn).forEach(([p,m])=>{J$(p,m.value,m.unit)}),uJ(e,t);e.setAttribute(i?"browser.performance.time_origin":"performance.timeOrigin",c),e.setAttribute(i?"browser.performance.navigation.activation_start":"performance.activationStart",va())}Jn=void 0,zf=void 0,qn={}}function nJ(e){if(e?.entryType==="measure")try{return e.detail.devtools.track==="Components ⚛"}catch{return}}function rJ(e,t,n,r,i,o){if(nJ(t)||["mark","measure"].includes(t.entryType)&&Mr(t.name,o))return;const s=Oc(!1),a=Bt(s?s.requestStart:0),l=i+Math.max(n,a),c=i+n,u=c+r,d={[it]:"auto.resource.browser.metrics"};l!==c&&(d["sentry.browser.measure_happened_before_request"]=!0,d["sentry.browser.measure_start_time"]=l),iJ(d,t),l<=u&&xo(e,l,u,{name:t.name,op:t.entryType,attributes:d})}function iJ(e,t){try{const n=t.detail;if(!n)return;if(typeof n=="object"){for(const[r,i]of Object.entries(n))if(i&&Fi(i))e[`sentry.browser.measure.detail.${r}`]=i;else if(i!==void 0)try{e[`sentry.browser.measure.detail.${r}`]=JSON.stringify(i)}catch{}return}if(Fi(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function oJ(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Hf(e,t,r,n)}),Hf(e,t,"secureConnection",n,"TLS/SSL"),Hf(e,t,"fetch",n,"cache"),Hf(e,t,"domainLookup",n,"DNS"),aJ(e,t,n)}function Hf(e,t,n,r,i=n){const o=sJ(n),s=t[o],a=t[`${n}Start`];!a||!s||xo(e,r+Bt(a),r+Bt(s),{op:`browser.${i}`,name:t.name,attributes:{[it]:"auto.ui.browser.metrics",...n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function sJ(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function aJ(e,t,n){const r=n+Bt(t.requestStart),i=n+Bt(t.responseEnd),o=n+Bt(t.responseStart);t.responseEnd&&(xo(e,r,i,{op:"browser.request",name:t.name,attributes:{[it]:"auto.ui.browser.metrics"}}),xo(e,o,i,{op:"browser.response",name:t.name,attributes:{[it]:"auto.ui.browser.metrics"}}))}function lJ(e,t,n,r,i,o,s){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const a=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(s?.includes(a))return;const l={[it]:"auto.resource.browser.metrics"},c=us(n);c.protocol&&(l["url.scheme"]=c.protocol.split(":").pop()),c.host&&(l["server.address"]=c.host),l["url.same_origin"]=n.includes(Ze.location.origin),dJ(t,l,[["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 u={...l,...m6(t)},d=o+r,f=d+i;xo(e,d,f,{name:n.replace(Ze.location.origin,""),op:a,attributes:u})}function cJ(e,t){const n=Ze.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),Qh(r.rtt)&&(qn["connection.rtt"]={value:r.rtt,unit:"millisecond"},t&&e.setAttribute("network.connection.rtt",r.rtt))),Qh(n.deviceMemory)&&(t?e.setAttribute("device.memory.estimated_capacity",n.deviceMemory):e.setAttribute("deviceMemory",`${n.deviceMemory} GB`)),Qh(n.hardwareConcurrency)&&(t?e.setAttribute("device.processor_count",n.hardwareConcurrency):e.setAttribute("hardwareConcurrency",String(n.hardwareConcurrency)))}function uJ(e,t){Jn&&t.recordLcpOnPageloadSpan&&(Jn.element&&e.setAttribute("lcp.element",an(Jn.element)),Jn.id&&e.setAttribute("lcp.id",Jn.id),Jn.url&&e.setAttribute("lcp.url",Jn.url.trim().slice(0,200)),Jn.loadTime!=null&&e.setAttribute("lcp.loadTime",Jn.loadTime),Jn.renderTime!=null&&e.setAttribute("lcp.renderTime",Jn.renderTime),e.setAttribute("lcp.size",Jn.size)),zf?.sources&&t.recordClsOnPageloadSpan&&zf.sources.forEach((n,r)=>e.setAttribute(`cls.source.${r+1}`,an(n.node)))}function dJ(e,t,n){n.forEach(([r,i])=>{const o=e[r];o!=null&&(typeof o=="number"&&o<GX||typeof o=="string")&&(t[i]=o)})}function fJ(e){const t=Oc(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}const pJ="ElementTiming",mJ=(()=>({name:pJ,setup(){!Ea()||!tn()||$s("element",({entries:t})=>{for(const n of t){const r=n;if(!r.identifier)continue;const i=r.identifier,o=r.name,s=r.renderTime,a=r.loadTime,l={"sentry.origin":"auto.ui.browser.element_timing","ui.element.identifier":i};o&&(l["ui.element.paint_type"]=o),r.id&&(l["ui.element.id"]=r.id),r.element&&(l["ui.element.type"]=r.element.tagName.toLowerCase()),r.url&&(l["ui.element.url"]=r.url),r.naturalWidth&&(l["ui.element.width"]=r.naturalWidth),r.naturalHeight&&(l["ui.element.height"]=r.naturalHeight),s>0&&ch("ui.element.render_time",s,{unit:"millisecond",attributes:l}),a>0&&ch("ui.element.load_time",a,{unit:"millisecond",attributes:l})}})}})),tg=[],Uc=new Map,Ta=new Map,h6=60;function _J(){if(Ea()&&tn()){const t=hJ();return()=>{t()}}return()=>{}}const Bc={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"};function hJ(){return Zh(gJ)}const gJ=({metric:e})=>{if(e.value==null)return;const t=Bt(e.value);if(t>h6)return;const n=e.entries.find(m=>m.duration===e.value&&Bc[m.name]);if(!n)return;const{interactionId:r}=n,i=Bc[n.name],o=Bt(tn()+n.startTime),s=Ht(),a=s?zt(s):void 0,l=r!=null?Uc.get(r):void 0,c=l?.span||a,u=c?Je(c).description:Ke().getScopeData().transactionName,d=l?.elementName||an(n.target),f={[it]:"auto.http.browser.inp",[yt]:`ui.interaction.${i}`,[vo]:n.duration},p=eg({name:d,transaction:u,attributes:f,startTime:o});p&&(p.addEvent("inp",{[oc]:"millisecond",[sc]:e.value}),p.end(o+t))};function yJ(e){return e!=null?Uc.get(e):void 0}function bJ(){const e=Object.keys(Bc);Ac()&&e.forEach(i=>{Ze.addEventListener(i,t,{capture:!0,passive:!0})});function t(i){const o=i.target;if(!o)return;const s=an(o),a=Math.round(i.timeStamp);if(Ta.set(a,s),Ta.size>50){const l=Ta.keys().next().value;l!==void 0&&Ta.delete(l)}}function n(i){const o=Math.round(i.startTime);let s=Ta.get(o);if(!s)for(let a=-5;a<=5;a++){const l=Ta.get(o+a);if(l){s=l;break}}return s||"<unknown>"}const r=({entries:i})=>{const o=Ht(),s=o&&zt(o);i.forEach(a=>{if(!FX(a))return;const l=a.interactionId;if(l==null||Uc.has(l))return;const c=a.target?an(a.target):n(a);if(tg.length>10){const u=tg.shift();Uc.delete(u)}tg.push(l),Uc.set(l,{span:s,elementName:c})})};$s("event",r),$s("first-input",r)}function ng(e){const{name:t,op:n,origin:r,metricName:i,value:o,attributes:s,parentSpan:a,reportEvent:l,startTime:c,endTime:u}=e,d=Ke().getScopeData().transactionName,f={[it]:r,[yt]:n,[vo]:0,[`browser.web_vital.${i}.value`]:o,"sentry.transaction":d,"user_agent.original":Ze.navigator?.userAgent,...s};a&&Ld(a).attributes?.[yt]==="pageload"&&(f["sentry.pageload.span_id"]=a.spanContext().spanId),l&&(f[`browser.web_vital.${i}.report_event`]=l);const p=li({name:t,attributes:f,startTime:c,parentSpan:a});p&&p.end(u??c)}function vJ(e){let t=0,n;if(!jf("largest-contentful-paint"))return;const r=Uf(({metric:i})=>{const o=i.entries[i.entries.length-1];!o||!Fc(i.value)||(t=i.value,n=o)},!0);qf(e,(i,o,s)=>{$J(t,n,s,i),r()})}function $J(e,t,n,r){if(!Fc(e))return;Br&&B.log(`Sending LCP span (${e})`);const i=tn()||0,o=Bt(i),s=Bt(i+(t?.startTime||0)),a=t?an(t.element):"Largest contentful paint",l={};t?.element&&(l["browser.web_vital.lcp.element"]=an(t.element)),t?.id&&(l["browser.web_vital.lcp.id"]=t.id),t?.url&&(l["browser.web_vital.lcp.url"]=t.url),t?.loadTime!=null&&(l["browser.web_vital.lcp.load_time"]=t.loadTime),t?.renderTime!=null&&(l["browser.web_vital.lcp.render_time"]=t.renderTime),t?.size!=null&&(l["browser.web_vital.lcp.size"]=t.size),ng({name:a,op:"ui.webvital.lcp",origin:"auto.http.browser.lcp",metricName:"lcp",value:e,attributes:l,parentSpan:n,reportEvent:r,startTime:o,endTime:s})}function SJ(e){let t=0,n;if(!jf("layout-shift"))return;const r=Ff(({metric:i})=>{const o=i.entries[i.entries.length-1];o&&(t=i.value,n=o)},!0);qf(e,(i,o,s)=>{EJ(t,n,s,i),r()})}function EJ(e,t,n,r){Br&&B.log(`Sending CLS span (${e})`);const i=t?Bt((tn()||0)+t.startTime):Ct(),o=t?an(t.sources[0]?.node):"Layout shift",s={};t?.sources&&t.sources.forEach((a,l)=>{s[`browser.web_vital.cls.source.${l+1}`]=an(a.node)}),ng({name:o,op:"ui.webvital.cls",origin:"auto.http.browser.cls",metricName:"cls",value:e,attributes:s,parentSpan:n,reportEvent:r,startTime:i})}function TJ(){if(!Ea()||!tn())return;Zh(({metric:n})=>{if(n.value==null||Bt(n.value)>h6)return;const i=n.entries.find(o=>o.duration===n.value&&Bc[o.name]);i&&wJ(n.value,i)})}function wJ(e,t){Br&&B.log(`Sending INP span (${e})`);const n=Bt(tn()+t.startTime),r=Bt(e),i=Bc[t.name],o=yJ(t.interactionId),s=Ht(),a=s?zt(s):void 0,l=o?.span||a,c=l?Ld(l).name:Ke().getScopeData().transactionName,u=o?.elementName||an(t.target);ng({name:u,op:`ui.interaction.${i}`,origin:"auto.http.browser.inp",metricName:"inp",value:e,attributes:{[vo]:t.duration,"sentry.transaction":c},startTime:n,endTime:n+r,parentSpan:l})}const IJ=1e3;let g6,rg,ig;function y6(e){go("dom",e),yo("dom",AJ)}function AJ(){if(!Ze.document)return;const e=gr.bind(null,"dom"),t=b6(e,!0);Ze.document.addEventListener("click",t,!1),Ze.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const i=Ze[n]?.prototype;i?.hasOwnProperty?.("addEventListener")&&($n(i,"addEventListener",function(o){return function(s,a,l){if(s==="click"||s=="keypress")try{const c=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},u=c[s]=c[s]||{refCount:0};if(!u.handler){const d=b6(e);u.handler=d,o.call(this,s,d,l)}u.refCount++}catch{}return o.call(this,s,a,l)}}),$n(i,"removeEventListener",function(o){return function(s,a,l){if(s==="click"||s=="keypress")try{const c=this.__sentry_instrumentation_handlers__||{},u=c[s];u&&(u.refCount--,u.refCount<=0&&(o.call(this,s,u.handler,l),u.handler=void 0,delete c[s]),Object.keys(c).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return o.call(this,s,a,l)}}))})}function xJ(e){if(e.type!==rg)return!1;try{if(!e.target||e.target._sentryId!==ig)return!1}catch{}return!0}function CJ(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function b6(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=kJ(n);if(CJ(n.type,r))return;Sn(n,"_sentryCaptured",!0),r&&!r._sentryId&&Sn(r,"_sentryId",ln());const i=n.type==="keypress"?"input":n.type;xJ(n)||(e({event:n,name:i,global:t}),rg=n.type,ig=r?r._sentryId:void 0),clearTimeout(g6),g6=Ze.setTimeout(()=>{ig=void 0,rg=void 0},IJ)}}function kJ(e){try{return e.target}catch{return null}}let Vf;function Wf(e){const t="history";go(t,e),yo(t,NJ)}function NJ(){if(Ze.addEventListener("popstate",()=>{const t=Ze.location.href,n=Vf;if(Vf=t,n===t)return;gr("history",{from:n,to:t})}),!IY())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const i=Vf,o=RJ(String(r));if(Vf=o,i===o)return t.apply(this,n);gr("history",{from:i,to:o})}return t.apply(this,n)}}$n(Ze.history,"pushState",e),$n(Ze.history,"replaceState",e)}function RJ(e){try{return new URL(e,Ze.location.origin).toString()}catch{return e}}const Gf={};function og(e){const t=Gf[e];if(t)return t;let n=Ze[e];if(wh(n))return Gf[e]=n.bind(Ze);const r=Ze.document;if(r&&typeof r.createElement=="function")try{const i=r.createElement("iframe");i.hidden=!0,r.head.appendChild(i);const o=i.contentWindow;o?.[e]&&(n=o[e]),r.head.removeChild(i)}catch(i){Br&&B.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,i)}return n&&(Gf[e]=n.bind(Ze))}function OJ(e){Gf[e]=void 0}function jc(...e){return og("setTimeout")(...e)}const Xi="__sentry_xhr_v3__";function sg(e){go("xhr",e),yo("xhr",PJ)}function PJ(){if(!Ze.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const i=new Error,o=Ct()*1e3,s=Pr(r[0])?r[0].toUpperCase():void 0,a=MJ(r[1]);if(!s||!a)return t.apply(n,r);n[Xi]={method:s,url:a,request_headers:{}},s==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const l=()=>{const c=n[Xi];if(c&&n.readyState===4){try{c.status_code=n.status}catch{}const u={endTimestamp:Ct()*1e3,startTimestamp:o,xhr:n,virtualError:i};gr("xhr",u)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(c,u,d){return l(),c.apply(u,d)}}):n.addEventListener("readystatechange",l),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(c,u,d){const[f,p]=d,m=u[Xi];return m&&Pr(f)&&Pr(p)&&(m.request_headers[f.toLowerCase()]=p),c.apply(u,d)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const i=n[Xi];if(!i)return t.apply(n,r);r[0]!==void 0&&(i.body=r[0]);const o={startTimestamp:Ct()*1e3,xhr:n};return gr("xhr",o),t.apply(n,r)}})}function MJ(e){if(Pr(e))return e;try{return e.toString()}catch{}}const LJ=Symbol.for("sentry__originalRequestBody");function v6(e){return new URLSearchParams(e).toString()}function Yf(e,t=B){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[v6(e)];if(!e)return[void 0]}catch(n){return Br&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Br&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function ag(e=[]){if(e.length>=2&&e[1]&&typeof e[1]=="object"&&"body"in e[1])return e[1].body;if(e.length>=1&&e[0]instanceof Request){const n=e[0][LJ];return n!==void 0?n:void 0}}function $6(e){let t;try{t=e.getAllResponseHeaders()}catch(n){return Br&&B.error(n,"Failed to get xhr response headers",e),{}}return t?t.split(`\r
|
|
521
|
-
`).reduce((n,r)=>{const[i,o]=r.split(": ");return o&&(n[i.toLowerCase()]=o),n},{}):{}}const DJ=40;function lg(e,t=og("fetch")){let n=0,r=0;async function i(o){const s=o.body.length;n+=s,r++;const a={body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const l=await t(e.url,a);return{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}}catch(l){throw OJ("fetch"),l}finally{n-=s,r--}}return P4(e,i,Z_(e.bufferSize||DJ))}const $e=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function FJ(){const e=Ie();if(!e){$e&&B.warn("No Sentry client available, profiling is not started");return}if(!e.getIntegrationByName("BrowserProfiling")){$e&&B.warn("BrowserProfiling integration is not available");return}e.emit("startUIProfiler")}function UJ(){const e=Ie();if(!e){$e&&B.warn("No Sentry client available, profiling is not started");return}if(!e.getIntegrationByName("BrowserProfiling")){$e&&B.warn("ProfilingIntegration is not available");return}e.emit("stopUIProfiler")}const BJ={startProfiler:FJ,stopProfiler:UJ},jJ=10,qJ=20,zJ=30,HJ=40,VJ=50;function wa(e,t,n,r){const i={filename:e,function:t==="<anonymous>"?ri:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}const WJ=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,GJ=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,YJ=/\((\S*)(?::(\d+))(?::(\d+))\)/,KJ=/at (.+?) ?\(data:(.+?),/,S6=[zJ,e=>{const t=e.match(KJ);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=WJ.exec(e);if(n){const[,i,o,s]=n;return wa(i,ri,+o,+s)}const r=GJ.exec(e);if(r){if(r[2]?.indexOf("eval")===0){const a=YJ.exec(r[2]);a&&(r[2]=a[1],r[3]=a[2],r[4]=a[3])}const[o,s]=I6(r[1]||ri,r[2]);return wa(s,o,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],XJ=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,JJ=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,E6=[VJ,e=>{const t=XJ.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const o=JJ.exec(t[3]);o&&(t[1]=t[1]||"eval",t[3]=o[1],t[4]=o[2],t[5]="")}let r=t[3],i=t[1]||ri;return[i,r]=I6(i,r),wa(r,i,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],ZJ=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,QJ=[HJ,e=>{const t=ZJ.exec(e);return t?wa(t[2],t[1]||ri,+t[3],t[4]?+t[4]:void 0):void 0}],eZ=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,tZ=[jJ,e=>{const t=eZ.exec(e);return t?wa(t[2],t[3]||ri,+t[1]):void 0}],nZ=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,rZ=[qJ,e=>{const t=nZ.exec(e);return t?wa(t[5],t[3]||t[4]||ri,+t[1],+t[2]):void 0}],T6=[S6,E6],w6=q9(...T6),I6=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:ri,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};function iZ(e,{metadata:t,tunnel:n,dsn:r}){const i={event_id:e.event_id,sent_at:new Date().toISOString(),...t?.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:si(r)}},o=oZ(e);return vr(i,[o])}function oZ(e){return[{type:"user_report"},e]}const Kf=1024,sZ="Breadcrumbs",A6=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:sZ,setup(n){t.console&&ah(cZ(n)),t.dom&&y6(lZ(n,t.dom)),t.xhr&&sg(uZ(n)),t.fetch&&Ih(dZ(n)),t.history&&Wf(fZ(n)),t.sentry&&n.on("beforeSendEvent",aZ(n))}}});function aZ(e){return function(n){Ie()===e&&Dr({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:rs(n)},{event:n})}}function lZ(e,t){return function(r){if(Ie()!==e)return;let i,o,s=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>Kf&&($e&&B.warn(`\`dom.maxStringLength\` cannot exceed ${Kf}, but a value of ${a} was configured. Sentry will use ${Kf} instead.`),a=Kf),typeof s=="string"&&(s=[s]);try{const c=r.event,u=pZ(c)?c.target:c;i=an(u,{keyAttrs:s,maxStringLength:a}),o=$_(u)}catch{i="<unknown>"}if(i.length===0)return;const l={category:`ui.${r.name}`,message:i};o&&(l.data={"ui.component_name":o}),Dr(l,{event:r.event,name:r.name,global:r.global})}}function cZ(e){return function(n){if(Ie()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:Qd(n.level),message:Rd(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${Rd(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Dr(r,{input:n.args,level:n.level})}}function uZ(e){return function(n){if(Ie()!==e)return;const{startTimestamp:r,endTimestamp:i}=n,o=n.xhr[Xi];if(!r||!i||!o)return;const{method:s,url:a,status_code:l,body:c}=o,u={method:s,url:a,status_code:l},d={xhr:n.xhr,input:c,startTimestamp:r,endTimestamp:i},f={category:"xhr",data:u,type:"http",level:a5(l)};e.emit("beforeOutgoingRequestBreadcrumb",f,d),Dr(f,d)}}function dZ(e){return function(n){if(Ie()!==e)return;const{startTimestamp:r,endTimestamp:i}=n;if(i&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const o={data:n.error,input:n.args,startTimestamp:r,endTimestamp:i},s={category:"fetch",data:n.fetchData,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",s,o),Dr(s,o)}else{const o=n.response,s={...n.fetchData,status_code:o?.status},a={input:n.args,response:o,startTimestamp:r,endTimestamp:i},l={category:"fetch",data:s,type:"http",level:a5(s.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",l,a),Dr(l,a)}}}function fZ(e){return function(n){if(Ie()!==e)return;let r=n.from,i=n.to;const o=us(Pe.location.href);let s=r?us(r):void 0;const a=us(i);s?.path||(s=o),o.protocol===a.protocol&&o.host===a.host&&(i=a.relative),o.protocol===s.protocol&&o.host===s.host&&(r=s.relative),Dr({category:"navigation",data:{from:r,to:i}})}}function pZ(e){return!!e&&!!e.target}const mZ="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(","),_Z="BrowserApiErrors",x6=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:_Z,setupOnce(){t.setTimeout&&$n(Pe,"setTimeout",C6),t.setInterval&&$n(Pe,"setInterval",C6),t.requestAnimationFrame&&$n(Pe,"requestAnimationFrame",hZ),t.XMLHttpRequest&&"XMLHttpRequest"in Pe&&$n(XMLHttpRequest.prototype,"send",gZ);const n=t.eventTarget;n&&(Array.isArray(n)?n:mZ).forEach(i=>yZ(i,t))}}});function C6(e){return function(...t){const n=t[0];return t[0]=ba(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${Li(e)}`}}),e.apply(this,t)}}function hZ(e){return function(t){return e.apply(this,[ba(t,{mechanism:{data:{handler:Li(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function gZ(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in n&&typeof n[i]=="function"&&$n(n,i,function(o){const s={mechanism:{data:{handler:Li(o)},handled:!1,type:`auto.browser.browserapierrors.xhr.${i}`}},a=S_(o);return a&&(s.mechanism.data.handler=Li(a)),ba(o,s)})}),e.apply(this,t)}}function yZ(e,t){const r=Pe[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&($n(r,"addEventListener",function(i){return function(o,s,a){try{bZ(s)&&(s.handleEvent=ba(s.handleEvent,{mechanism:{data:{handler:Li(s),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&vZ(this,o,s),i.apply(this,[o,ba(s,{mechanism:{data:{handler:Li(s),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),a])}}),$n(r,"removeEventListener",function(i){return function(o,s,a){try{const l=s.__sentry_wrapped__;l&&i.call(this,o,l,a)}catch{}return i.call(this,o,s,a)}}))}function bZ(e){return typeof e.handleEvent=="function"}function vZ(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const k6=(e={})=>{const t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(typeof Pe.document>"u"){$e&&B.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}z_({ignoreDuration:!0}),Wd();const n=qt();let r=n.getUser();n.addScopeListener(i=>{const o=i.getUser();(r?.id!==o?.id||r?.ip_address!==o?.ip_address)&&(Wd(),r=o)}),t==="route"&&Wf(({from:i,to:o})=>{i!==o&&(z_({ignoreDuration:!0}),Wd())})}}},$Z="CultureContext",N6=(()=>({name:$Z,preprocessEvent(e){const t=R6();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){const t=R6();t&&$r(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}}));function R6(){try{const e=Pe.Intl;if(!e)return;const t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}const SZ="GlobalHandlers",O6=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:SZ,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(EZ(n),L6("onerror")),t.onunhandledrejection&&(TZ(n),L6("onunhandledrejection"))}}});function EZ(e){V9(t=>{const{stackParser:n,attachStacktrace:r}=D6();if(Ie()!==e||K5())return;const{msg:i,url:o,line:s,column:a,error:l}=t,c=wZ(kf(n,l||i,void 0,r,!1),o,s,a);c.level="error",ra(c,{originalException:l,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function TZ(e){W9(t=>{const{stackParser:n,attachStacktrace:r}=D6();if(Ie()!==e||K5())return;const i=P6(t),o=Fi(i)?M6(i):kf(n,i,void 0,r,!0);o.level="error",ra(o,{originalException:i,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function P6(e){if(Fi(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}function M6(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function wZ(e,t,n,r){const i=e.exception=e.exception||{},o=i.values=i.values||[],s=o[0]=o[0]||{},a=s.stacktrace=s.stacktrace||{},l=a.frames=a.frames||[];return l.length===0&&l.push({colno:r,lineno:n,filename:IZ(t)??ns(),function:ri,in_app:!0}),e}function L6(e){$e&&B.log(`Global Handler attached: ${e}`)}function D6(){return Ie()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function IZ(e){if(!(!Pr(e)||e.length===0))return e.startsWith("data:")?`<${So(e,!1)}>`:e}const F6=()=>({name:"HttpContext",preprocessEvent(e){if(!Pe.navigator&&!Pe.location&&!Pe.document)return;const t=xf(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}},processSegmentSpan(e){if(!Pe.navigator&&!Pe.location&&!Pe.document)return;const t=xf();$r(e,{"url.full":t.url||void 0,"http.request.header.user_agent":t.headers["User-Agent"],"http.request.header.referer":t.headers.Referer})}}),AZ="cause",xZ=5,CZ="LinkedErrors",U6=((e={})=>{const t=e.limit||xZ,n=e.key||AZ;return{name:CZ,preprocessEvent(r,i,o){const s=o.getOptions();QH(Cf,s.stackParser,n,t,r,i)}}}),kZ="SpotlightBrowser",NZ=((e={})=>{const t=e.sidecarUrl||"http://localhost:8969/stream";return{name:kZ,setup:()=>{$e&&B.log("Using Sidecar URL",t)},processEvent:n=>PZ(n)?null:n,afterAllSetup:n=>{RZ(n,t)}}});function RZ(e,t){const n=og("fetch");let r=0;e.on("beforeEnvelope",i=>{if(r>3){B.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:",r);return}n(t,{method:"POST",body:zd(i),headers:{"Content-Type":"application/x-sentry-envelope"},mode:"cors"}).then(o=>{o.status>=200&&o.status<400&&(r=0)},o=>{r++,B.error("Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/",o)})})}const OZ=NZ;function PZ(e){return!!(e.type==="transaction"&&e.spans&&e.contexts?.trace&&e.contexts.trace.op==="ui.action.click"&&e.spans.some(({description:t})=>t?.includes("#sentry-spotlight")))}function MZ(){return LZ()?($e&&Or(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function LZ(){if(typeof Pe.window>"u")return!1;const e=Pe;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;const n=ns();return!(Pe===Pe.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(n))}function cg(e){return[o8(),r8(),eW(),x6(),A6(),O6(),U6(),m8(),F6(),N6(),k6()]}function DZ(e={}){const t=!e.skipBrowserExtensionCheck&&MZ();let n=e.defaultIntegrations==null?cg():e.defaultIntegrations;const r={...e,enabled:t?!1:e.enabled,stackParser:hj(e.stackParser||w6),integrations:Qz({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||lg};return IH(n6,r)}function FZ(){}function UZ(e){e()}function BZ(e={}){const t=Pe.document,n=t?.head||t?.body;if(!n){$e&&B.error("[showReportDialog] Global document not defined");return}const r=Ke(),o=Ie()?.getDsn();if(!o){$e&&B.error("[showReportDialog] DSN not configured");return}const s={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||g4()},a=Pe.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=Jz(o,s);const{onLoad:l,onClose:c}=s;if(l&&(a.onload=l),c){const u=d=>{if(d.data==="__sentry_reportdialog_closed__")try{c()}finally{Pe.removeEventListener("message",u)}};Pe.addEventListener("message",u)}n.appendChild(a)}const jZ=je,qZ="ReportingObserver",B6=new WeakMap,zZ=((e={})=>{const t=e.types||["crash","deprecation","intervention"];function n(r){if(B6.has(Ie()))for(const i of r)yr(o=>{o.setExtra("url",i.url);const s=`ReportingObserver [${i.type}]`;let a="No details available";if(i.body){const l={};for(const c in i.body)l[c]=i.body[c];if(o.setExtra("body",l),i.type==="crash"){const c=i.body;a=[c.crashId||"",c.reason||""].join(" ").trim()||a}else a=i.body.message||a}_4(`${s}: ${a}`)})}return{name:qZ,setupOnce(){if(!xY())return;new jZ.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(r){B6.set(r,!0)}}}),HZ="HttpClient",VZ=((e={})=>{const t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:HZ,setup(n){QZ(n,t),eQ(n,t)}}});function WZ(e,t,n,r,i){if(z6(e,n.status,n.url)){const o=tQ(t,r);let s,a,l,c;V6()&&([s,l]=j6("Cookie",o),[a,c]=j6("Set-Cookie",n));const u=H6({url:o.url,method:o.method,status:n.status,requestHeaders:s,responseHeaders:a,requestCookies:l,responseCookies:c,error:i,type:"fetch"});ra(u)}}function j6(e,t){const n=KZ(t.headers);let r;try{const i=n[e]||n[e.toLowerCase()]||void 0;i&&(r=q6(i))}catch{}return[n,r]}function GZ(e,t,n,r,i){if(z6(e,t.status,t.responseURL)){let o,s,a;if(V6()){try{const c=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;c&&(s=q6(c))}catch{}try{a=XZ(t)}catch{}o=r}const l=H6({url:t.responseURL,method:n,status:t.status,requestHeaders:o,responseHeaders:a,responseCookies:s,error:i,type:"xhr"});ra(l)}}function YZ(e){if(e){const t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function q6(e){return e.split("; ").reduce((t,n)=>{const[r,i]=n.split("=");return r&&i&&(t[r]=i),t},{})}function KZ(e){const t={};return e.forEach((n,r)=>{t[r]=n}),t}function XZ(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
|
|
520
|
+
Error:`,i)}}function OX(){return vX(e=>{Dc("cls",{metric:e}),l6=e},{reportAllChanges:!0})}function PX(){return CX(e=>{Dc("lcp",{metric:e}),c6=e},{reportAllChanges:!0})}function MX(){return NX(e=>{Dc("ttfb",{metric:e}),u6=e})}function LX(){return IX(e=>{Dc("inp",{metric:e}),d6=e})}function Bf(e,t,n,r,i=!1){f6(e,t);let o;return Df[e]||(o=n(),Df[e]=!0),r&&t({metric:r}),p6(e,t,i?o:void 0)}function DX(e){const t={};e==="event"&&(t.durationThreshold=0),Sa(e,n=>{Dc(e,{entries:n})},t)}function f6(e,t){Lc[e]=Lc[e]||[],Lc[e].push(t)}function p6(e,t,n){return()=>{n&&n();const r=Lc[e];if(!r)return;const i=r.indexOf(t);i!==-1&&r.splice(i,1)}}function FX(e){return"duration"in e}const UX=e=>{const t=n=>{(n.type==="pagehide"||Ze.document?.visibilityState==="hidden")&&e(n)};Ao("visibilitychange",t,{capture:!0,once:!0}),Ao("pagehide",t,{capture:!0,once:!0})};function Qh(e){return typeof e=="number"&&isFinite(e)}function xo(e,t,n,{...r}){const i=Je(e).start_timestamp;return i&&i>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),mc(e,()=>{const o=li({startTime:t,...r});return o&&o.end(n),o})}function eg(e){const t=Ie();if(!t)return;const{name:n,transaction:r,attributes:i,startTime:o}=e,{release:s,environment:a,sendDefaultPii:l}=t.getOptions(),u=t.getIntegrationByName("Replay")?.getReplayId(),d=Ke(),f=d.getUser(),p=f!==void 0?f.email||f.id||f.ip_address:void 0;let m;try{m=d.getScopeData().contexts.profile.profile_id}catch{}const b={release:s,environment:a,user:p||void 0,profile_id:m||void 0,replay_id:u||void 0,transaction:r,"user_agent.original":Ze.navigator?.userAgent,"client.address":l?"{{auto}}":void 0,...i};return li({name:n,attributes:b,startTime:o,experimental:{standalone:!0}})}function Ea(){return Ze.addEventListener&&Ze.performance}function Bt(e){return e/1e3}function BX(e){let t="unknown",n="unknown",r="";for(const i of e){if(i==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(i))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=i}return r===e&&(t=r),{name:t,version:n}}function jf(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function qf(e,t){let n,r=!1;function i(a){!r&&n&&t(a,n.spanContext().spanId,n),r=!0}UX(()=>{i("pagehide")});const o=e.on("beforeStartNavigationSpan",(a,l)=>{l?.isRedirect||(i("navigation"),o(),s())}),s=e.on("afterStartPageLoadSpan",a=>{n=a,s()})}function jX(e){let t=0,n;if(!jf("layout-shift"))return;const r=Ff(({metric:i})=>{const o=i.entries[i.entries.length-1];o&&(t=i.value,n=o)},!0);qf(e,(i,o)=>{qX(t,n,o,i),r()})}function qX(e,t,n,r){Br&&B.log(`Sending CLS span (${e})`);const i=t?Bt((tn()||0)+t.startTime):Ct(),o=Ke().getScopeData().transactionName,s=t?an(t.sources[0]?.node):"Layout shift",a={[it]:"auto.http.browser.cls",[yt]:"ui.webvital.cls",[vo]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((c,u)=>{a[`cls.source.${u+1}`]=an(c.node)});const l=eg({name:s,transaction:o,attributes:a,startTime:i});l&&(l.addEvent("cls",{[oc]:"",[sc]:e}),l.end(i))}const zX=6e4;function Fc(e){return e!=null&&e>0&&e<=zX}function HX(e){let t=0,n;if(!jf("largest-contentful-paint"))return;const r=Uf(({metric:i})=>{const o=i.entries[i.entries.length-1];!o||!Fc(i.value)||(t=i.value,n=o)},!0);qf(e,(i,o)=>{VX(t,n,o,i),r()})}function VX(e,t,n,r){if(!Fc(e))return;Br&&B.log(`Sending LCP span (${e})`);const i=Bt((tn()||0)+(t?.startTime||0)),o=Ke().getScopeData().transactionName,s=t?an(t.element):"Largest contentful paint",a={[it]:"auto.http.browser.lcp",[yt]:"ui.webvital.lcp",[vo]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(a["lcp.element"]=an(t.element)),t.id&&(a["lcp.id"]=t.id),t.url&&(a["lcp.url"]=t.url),t.loadTime!=null&&(a["lcp.loadTime"]=t.loadTime),t.renderTime!=null&&(a["lcp.renderTime"]=t.renderTime),t.size!=null&&(a["lcp.size"]=t.size));const l=eg({name:s,transaction:o,attributes:a,startTime:i});l&&(l.addEvent("lcp",{[oc]:"millisecond",[sc]:e}),l.end(i))}function Er(e){return e&&((tn()||performance.timeOrigin)+e)/1e3}function m6(e){const t={};if(e.nextHopProtocol!=null){const{name:n,version:r}=BX(e.nextHopProtocol);t["network.protocol.version"]=r,t["network.protocol.name"]=n}return tn()||Ea()?.timeOrigin?WX({...t,"http.request.redirect_start":Er(e.redirectStart),"http.request.redirect_end":Er(e.redirectEnd),"http.request.worker_start":Er(e.workerStart),"http.request.fetch_start":Er(e.fetchStart),"http.request.domain_lookup_start":Er(e.domainLookupStart),"http.request.domain_lookup_end":Er(e.domainLookupEnd),"http.request.connect_start":Er(e.connectStart),"http.request.secure_connection_start":Er(e.secureConnectionStart),"http.request.connection_end":Er(e.connectEnd),"http.request.request_start":Er(e.requestStart),"http.request.response_start":Er(e.responseStart),"http.request.response_end":Er(e.responseEnd),"http.request.time_to_first_byte":e.responseStart!=null?e.responseStart/1e3:void 0}):t}function WX(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}const GX=2147483647;let _6=0,qn={},Jn,zf;function YX({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=Ea();if(r&&tn()){r.mark&&Ze.performance.mark("sentry-tracing-init");const i=t?HX(n):t===!1?QX():void 0,o=e?jX(n):e===!1?ZX():void 0,s=eJ();return()=>{s(),i?.(),o?.()}}return()=>{}}function KX(){$s("longtask",({entries:e})=>{const t=Ht();if(!t)return;const{op:n,start_timestamp:r}=Je(t);for(const i of e){const o=Bt(tn()+i.startTime),s=Bt(i.duration);n==="navigation"&&r&&o<r||xo(t,o,o+s,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[it]:"auto.ui.browser.metrics"}})}})}function XX(){new PerformanceObserver(t=>{const n=Ht();if(n)for(const r of t.getEntries()){if(!r.scripts[0])continue;const i=Bt(tn()+r.startTime),{start_timestamp:o,op:s}=Je(n);if(s==="navigation"&&o&&i<o)continue;const a=Bt(r.duration),l={[it]:"auto.ui.browser.metrics"},c=r.scripts[0],{invoker:u,invokerType:d,sourceURL:f,sourceFunctionName:p,sourceCharPosition:m}=c;l["browser.script.invoker"]=u,l["browser.script.invoker_type"]=d,f&&(l["code.filepath"]=f),p&&(l["code.function"]=p),m!==-1&&(l["browser.script.source_char_position"]=m),xo(n,i,i+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:l})}}).observe({type:"long-animation-frame",buffered:!0})}function JX(){$s("event",({entries:e})=>{const t=Ht();if(t){for(const n of e)if(n.name==="click"){const r=Bt(tn()+n.startTime),i=Bt(n.duration),o={name:an(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[it]:"auto.ui.browser.metrics"}},s=$_(n.target);s&&(o.attributes["ui.component_name"]=s),xo(t,r,r+i,o)}}})}function ZX(){return Ff(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(qn.cls={value:e.value,unit:""},zf=t)},!0)}function QX(){return Uf(({metric:e})=>{const t=e.entries[e.entries.length-1];!t||!Fc(e.value)||(qn.lcp={value:e.value,unit:"millisecond"},Jn=t)},!0)}function eJ(){return RX(({metric:e})=>{e.entries[e.entries.length-1]&&(qn.ttfb={value:e.value,unit:"millisecond"})})}function tJ(e,t){const n=Ea(),r=tn();if(!n?.getEntries||!r)return;const{spanStreamingEnabled:i,ignorePerformanceApiSpans:o,ignoreResourceSpans:s,recordClsOnPageloadSpan:a,recordLcpOnPageloadSpan:l}=t,c=Bt(r),u=n.getEntries(),{op:d,start_timestamp:f}=Je(e);if(u.slice(_6).forEach(p=>{const m=Bt(p.startTime),b=Bt(Math.max(0,p.duration));if(!(d==="navigation"&&f&&c+m<f))switch(p.entryType){case"navigation":{oJ(e,p,c);break}case"mark":case"paint":case"measure":{rJ(e,p,m,b,c,o);const g=Pc(),_=p.startTime<g.firstHiddenTime;p.name==="first-paint"&&_&&(qn.fp={value:p.startTime,unit:"millisecond"}),p.name==="first-contentful-paint"&&_&&(qn.fcp={value:p.startTime,unit:"millisecond"});break}case"resource":{lJ(e,p,p.name,m,b,c,s);break}}}),_6=Math.max(u.length-1,0),cJ(e,i),d==="pageload"){if(fJ(qn),i){const p=(m,b,g)=>{const _=g??`browser.web_vital.${m}.value`;e.setAttribute(_,b),Br&&B.log("Setting web vital attribute",{[_]:b},"on pageload span")};["ttfb","fp","fcp"].forEach(m=>{qn[m]&&p(m,qn[m].value)}),qn["ttfb.requestTime"]&&p("ttfb.requestTime",qn["ttfb.requestTime"].value,"browser.web_vital.ttfb.request_time")}else a||delete qn.cls,l||delete qn.lcp,Object.entries(qn).forEach(([p,m])=>{J9(p,m.value,m.unit)}),uJ(e,t);e.setAttribute(i?"browser.performance.time_origin":"performance.timeOrigin",c),e.setAttribute(i?"browser.performance.navigation.activation_start":"performance.activationStart",va())}Jn=void 0,zf=void 0,qn={}}function nJ(e){if(e?.entryType==="measure")try{return e.detail.devtools.track==="Components ⚛"}catch{return}}function rJ(e,t,n,r,i,o){if(nJ(t)||["mark","measure"].includes(t.entryType)&&Mr(t.name,o))return;const s=Oc(!1),a=Bt(s?s.requestStart:0),l=i+Math.max(n,a),c=i+n,u=c+r,d={[it]:"auto.resource.browser.metrics"};l!==c&&(d["sentry.browser.measure_happened_before_request"]=!0,d["sentry.browser.measure_start_time"]=l),iJ(d,t),l<=u&&xo(e,l,u,{name:t.name,op:t.entryType,attributes:d})}function iJ(e,t){try{const n=t.detail;if(!n)return;if(typeof n=="object"){for(const[r,i]of Object.entries(n))if(i&&Fi(i))e[`sentry.browser.measure.detail.${r}`]=i;else if(i!==void 0)try{e[`sentry.browser.measure.detail.${r}`]=JSON.stringify(i)}catch{}return}if(Fi(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function oJ(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Hf(e,t,r,n)}),Hf(e,t,"secureConnection",n,"TLS/SSL"),Hf(e,t,"fetch",n,"cache"),Hf(e,t,"domainLookup",n,"DNS"),aJ(e,t,n)}function Hf(e,t,n,r,i=n){const o=sJ(n),s=t[o],a=t[`${n}Start`];!a||!s||xo(e,r+Bt(a),r+Bt(s),{op:`browser.${i}`,name:t.name,attributes:{[it]:"auto.ui.browser.metrics",...n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function sJ(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function aJ(e,t,n){const r=n+Bt(t.requestStart),i=n+Bt(t.responseEnd),o=n+Bt(t.responseStart);t.responseEnd&&(xo(e,r,i,{op:"browser.request",name:t.name,attributes:{[it]:"auto.ui.browser.metrics"}}),xo(e,o,i,{op:"browser.response",name:t.name,attributes:{[it]:"auto.ui.browser.metrics"}}))}function lJ(e,t,n,r,i,o,s){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const a=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(s?.includes(a))return;const l={[it]:"auto.resource.browser.metrics"},c=us(n);c.protocol&&(l["url.scheme"]=c.protocol.split(":").pop()),c.host&&(l["server.address"]=c.host),l["url.same_origin"]=n.includes(Ze.location.origin),dJ(t,l,[["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 u={...l,...m6(t)},d=o+r,f=d+i;xo(e,d,f,{name:n.replace(Ze.location.origin,""),op:a,attributes:u})}function cJ(e,t){const n=Ze.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),Qh(r.rtt)&&(qn["connection.rtt"]={value:r.rtt,unit:"millisecond"},t&&e.setAttribute("network.connection.rtt",r.rtt))),Qh(n.deviceMemory)&&(t?e.setAttribute("device.memory.estimated_capacity",n.deviceMemory):e.setAttribute("deviceMemory",`${n.deviceMemory} GB`)),Qh(n.hardwareConcurrency)&&(t?e.setAttribute("device.processor_count",n.hardwareConcurrency):e.setAttribute("hardwareConcurrency",String(n.hardwareConcurrency)))}function uJ(e,t){Jn&&t.recordLcpOnPageloadSpan&&(Jn.element&&e.setAttribute("lcp.element",an(Jn.element)),Jn.id&&e.setAttribute("lcp.id",Jn.id),Jn.url&&e.setAttribute("lcp.url",Jn.url.trim().slice(0,200)),Jn.loadTime!=null&&e.setAttribute("lcp.loadTime",Jn.loadTime),Jn.renderTime!=null&&e.setAttribute("lcp.renderTime",Jn.renderTime),e.setAttribute("lcp.size",Jn.size)),zf?.sources&&t.recordClsOnPageloadSpan&&zf.sources.forEach((n,r)=>e.setAttribute(`cls.source.${r+1}`,an(n.node)))}function dJ(e,t,n){n.forEach(([r,i])=>{const o=e[r];o!=null&&(typeof o=="number"&&o<GX||typeof o=="string")&&(t[i]=o)})}function fJ(e){const t=Oc(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}const pJ="ElementTiming",mJ=(()=>({name:pJ,setup(){!Ea()||!tn()||$s("element",({entries:t})=>{for(const n of t){const r=n;if(!r.identifier)continue;const i=r.identifier,o=r.name,s=r.renderTime,a=r.loadTime,l={"sentry.origin":"auto.ui.browser.element_timing","ui.element.identifier":i};o&&(l["ui.element.paint_type"]=o),r.id&&(l["ui.element.id"]=r.id),r.element&&(l["ui.element.type"]=r.element.tagName.toLowerCase()),r.url&&(l["ui.element.url"]=r.url),r.naturalWidth&&(l["ui.element.width"]=r.naturalWidth),r.naturalHeight&&(l["ui.element.height"]=r.naturalHeight),s>0&&ch("ui.element.render_time",s,{unit:"millisecond",attributes:l}),a>0&&ch("ui.element.load_time",a,{unit:"millisecond",attributes:l})}})}})),tg=[],Uc=new Map,Ta=new Map,h6=60;function _J(){if(Ea()&&tn()){const t=hJ();return()=>{t()}}return()=>{}}const Bc={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"};function hJ(){return Zh(gJ)}const gJ=({metric:e})=>{if(e.value==null)return;const t=Bt(e.value);if(t>h6)return;const n=e.entries.find(m=>m.duration===e.value&&Bc[m.name]);if(!n)return;const{interactionId:r}=n,i=Bc[n.name],o=Bt(tn()+n.startTime),s=Ht(),a=s?zt(s):void 0,l=r!=null?Uc.get(r):void 0,c=l?.span||a,u=c?Je(c).description:Ke().getScopeData().transactionName,d=l?.elementName||an(n.target),f={[it]:"auto.http.browser.inp",[yt]:`ui.interaction.${i}`,[vo]:n.duration},p=eg({name:d,transaction:u,attributes:f,startTime:o});p&&(p.addEvent("inp",{[oc]:"millisecond",[sc]:e.value}),p.end(o+t))};function yJ(e){return e!=null?Uc.get(e):void 0}function bJ(){const e=Object.keys(Bc);Ac()&&e.forEach(i=>{Ze.addEventListener(i,t,{capture:!0,passive:!0})});function t(i){const o=i.target;if(!o)return;const s=an(o),a=Math.round(i.timeStamp);if(Ta.set(a,s),Ta.size>50){const l=Ta.keys().next().value;l!==void 0&&Ta.delete(l)}}function n(i){const o=Math.round(i.startTime);let s=Ta.get(o);if(!s)for(let a=-5;a<=5;a++){const l=Ta.get(o+a);if(l){s=l;break}}return s||"<unknown>"}const r=({entries:i})=>{const o=Ht(),s=o&&zt(o);i.forEach(a=>{if(!FX(a))return;const l=a.interactionId;if(l==null||Uc.has(l))return;const c=a.target?an(a.target):n(a);if(tg.length>10){const u=tg.shift();Uc.delete(u)}tg.push(l),Uc.set(l,{span:s,elementName:c})})};$s("event",r),$s("first-input",r)}function ng(e){const{name:t,op:n,origin:r,metricName:i,value:o,attributes:s,parentSpan:a,reportEvent:l,startTime:c,endTime:u}=e,d=Ke().getScopeData().transactionName,f={[it]:r,[yt]:n,[vo]:0,[`browser.web_vital.${i}.value`]:o,"sentry.transaction":d,"user_agent.original":Ze.navigator?.userAgent,...s};a&&Ld(a).attributes?.[yt]==="pageload"&&(f["sentry.pageload.span_id"]=a.spanContext().spanId),l&&(f[`browser.web_vital.${i}.report_event`]=l);const p=li({name:t,attributes:f,startTime:c,parentSpan:a});p&&p.end(u??c)}function vJ(e){let t=0,n;if(!jf("largest-contentful-paint"))return;const r=Uf(({metric:i})=>{const o=i.entries[i.entries.length-1];!o||!Fc(i.value)||(t=i.value,n=o)},!0);qf(e,(i,o,s)=>{$J(t,n,s,i),r()})}function $J(e,t,n,r){if(!Fc(e))return;Br&&B.log(`Sending LCP span (${e})`);const i=tn()||0,o=Bt(i),s=Bt(i+(t?.startTime||0)),a=t?an(t.element):"Largest contentful paint",l={};t?.element&&(l["browser.web_vital.lcp.element"]=an(t.element)),t?.id&&(l["browser.web_vital.lcp.id"]=t.id),t?.url&&(l["browser.web_vital.lcp.url"]=t.url),t?.loadTime!=null&&(l["browser.web_vital.lcp.load_time"]=t.loadTime),t?.renderTime!=null&&(l["browser.web_vital.lcp.render_time"]=t.renderTime),t?.size!=null&&(l["browser.web_vital.lcp.size"]=t.size),ng({name:a,op:"ui.webvital.lcp",origin:"auto.http.browser.lcp",metricName:"lcp",value:e,attributes:l,parentSpan:n,reportEvent:r,startTime:o,endTime:s})}function SJ(e){let t=0,n;if(!jf("layout-shift"))return;const r=Ff(({metric:i})=>{const o=i.entries[i.entries.length-1];o&&(t=i.value,n=o)},!0);qf(e,(i,o,s)=>{EJ(t,n,s,i),r()})}function EJ(e,t,n,r){Br&&B.log(`Sending CLS span (${e})`);const i=t?Bt((tn()||0)+t.startTime):Ct(),o=t?an(t.sources[0]?.node):"Layout shift",s={};t?.sources&&t.sources.forEach((a,l)=>{s[`browser.web_vital.cls.source.${l+1}`]=an(a.node)}),ng({name:o,op:"ui.webvital.cls",origin:"auto.http.browser.cls",metricName:"cls",value:e,attributes:s,parentSpan:n,reportEvent:r,startTime:i})}function TJ(){if(!Ea()||!tn())return;Zh(({metric:n})=>{if(n.value==null||Bt(n.value)>h6)return;const i=n.entries.find(o=>o.duration===n.value&&Bc[o.name]);i&&wJ(n.value,i)})}function wJ(e,t){Br&&B.log(`Sending INP span (${e})`);const n=Bt(tn()+t.startTime),r=Bt(e),i=Bc[t.name],o=yJ(t.interactionId),s=Ht(),a=s?zt(s):void 0,l=o?.span||a,c=l?Ld(l).name:Ke().getScopeData().transactionName,u=o?.elementName||an(t.target);ng({name:u,op:`ui.interaction.${i}`,origin:"auto.http.browser.inp",metricName:"inp",value:e,attributes:{[vo]:t.duration,"sentry.transaction":c},startTime:n,endTime:n+r,parentSpan:l})}const IJ=1e3;let g6,rg,ig;function y6(e){go("dom",e),yo("dom",AJ)}function AJ(){if(!Ze.document)return;const e=gr.bind(null,"dom"),t=b6(e,!0);Ze.document.addEventListener("click",t,!1),Ze.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const i=Ze[n]?.prototype;i?.hasOwnProperty?.("addEventListener")&&($n(i,"addEventListener",function(o){return function(s,a,l){if(s==="click"||s=="keypress")try{const c=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},u=c[s]=c[s]||{refCount:0};if(!u.handler){const d=b6(e);u.handler=d,o.call(this,s,d,l)}u.refCount++}catch{}return o.call(this,s,a,l)}}),$n(i,"removeEventListener",function(o){return function(s,a,l){if(s==="click"||s=="keypress")try{const c=this.__sentry_instrumentation_handlers__||{},u=c[s];u&&(u.refCount--,u.refCount<=0&&(o.call(this,s,u.handler,l),u.handler=void 0,delete c[s]),Object.keys(c).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return o.call(this,s,a,l)}}))})}function xJ(e){if(e.type!==rg)return!1;try{if(!e.target||e.target._sentryId!==ig)return!1}catch{}return!0}function CJ(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function b6(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=kJ(n);if(CJ(n.type,r))return;Sn(n,"_sentryCaptured",!0),r&&!r._sentryId&&Sn(r,"_sentryId",ln());const i=n.type==="keypress"?"input":n.type;xJ(n)||(e({event:n,name:i,global:t}),rg=n.type,ig=r?r._sentryId:void 0),clearTimeout(g6),g6=Ze.setTimeout(()=>{ig=void 0,rg=void 0},IJ)}}function kJ(e){try{return e.target}catch{return null}}let Vf;function Wf(e){const t="history";go(t,e),yo(t,NJ)}function NJ(){if(Ze.addEventListener("popstate",()=>{const t=Ze.location.href,n=Vf;if(Vf=t,n===t)return;gr("history",{from:n,to:t})}),!IY())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const i=Vf,o=RJ(String(r));if(Vf=o,i===o)return t.apply(this,n);gr("history",{from:i,to:o})}return t.apply(this,n)}}$n(Ze.history,"pushState",e),$n(Ze.history,"replaceState",e)}function RJ(e){try{return new URL(e,Ze.location.origin).toString()}catch{return e}}const Gf={};function og(e){const t=Gf[e];if(t)return t;let n=Ze[e];if(wh(n))return Gf[e]=n.bind(Ze);const r=Ze.document;if(r&&typeof r.createElement=="function")try{const i=r.createElement("iframe");i.hidden=!0,r.head.appendChild(i);const o=i.contentWindow;o?.[e]&&(n=o[e]),r.head.removeChild(i)}catch(i){Br&&B.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,i)}return n&&(Gf[e]=n.bind(Ze))}function OJ(e){Gf[e]=void 0}function jc(...e){return og("setTimeout")(...e)}const Xi="__sentry_xhr_v3__";function sg(e){go("xhr",e),yo("xhr",PJ)}function PJ(){if(!Ze.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const i=new Error,o=Ct()*1e3,s=Pr(r[0])?r[0].toUpperCase():void 0,a=MJ(r[1]);if(!s||!a)return t.apply(n,r);n[Xi]={method:s,url:a,request_headers:{}},s==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const l=()=>{const c=n[Xi];if(c&&n.readyState===4){try{c.status_code=n.status}catch{}const u={endTimestamp:Ct()*1e3,startTimestamp:o,xhr:n,virtualError:i};gr("xhr",u)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(c,u,d){return l(),c.apply(u,d)}}):n.addEventListener("readystatechange",l),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(c,u,d){const[f,p]=d,m=u[Xi];return m&&Pr(f)&&Pr(p)&&(m.request_headers[f.toLowerCase()]=p),c.apply(u,d)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const i=n[Xi];if(!i)return t.apply(n,r);r[0]!==void 0&&(i.body=r[0]);const o={startTimestamp:Ct()*1e3,xhr:n};return gr("xhr",o),t.apply(n,r)}})}function MJ(e){if(Pr(e))return e;try{return e.toString()}catch{}}const LJ=Symbol.for("sentry__originalRequestBody");function v6(e){return new URLSearchParams(e).toString()}function Yf(e,t=B){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[v6(e)];if(!e)return[void 0]}catch(n){return Br&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Br&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function ag(e=[]){if(e.length>=2&&e[1]&&typeof e[1]=="object"&&"body"in e[1])return e[1].body;if(e.length>=1&&e[0]instanceof Request){const n=e[0][LJ];return n!==void 0?n:void 0}}function $6(e){let t;try{t=e.getAllResponseHeaders()}catch(n){return Br&&B.error(n,"Failed to get xhr response headers",e),{}}return t?t.split(`\r
|
|
521
|
+
`).reduce((n,r)=>{const[i,o]=r.split(": ");return o&&(n[i.toLowerCase()]=o),n},{}):{}}const DJ=40;function lg(e,t=og("fetch")){let n=0,r=0;async function i(o){const s=o.body.length;n+=s,r++;const a={body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const l=await t(e.url,a);return{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}}catch(l){throw OJ("fetch"),l}finally{n-=s,r--}}return P4(e,i,Z_(e.bufferSize||DJ))}const $e=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function FJ(){const e=Ie();if(!e){$e&&B.warn("No Sentry client available, profiling is not started");return}if(!e.getIntegrationByName("BrowserProfiling")){$e&&B.warn("BrowserProfiling integration is not available");return}e.emit("startUIProfiler")}function UJ(){const e=Ie();if(!e){$e&&B.warn("No Sentry client available, profiling is not started");return}if(!e.getIntegrationByName("BrowserProfiling")){$e&&B.warn("ProfilingIntegration is not available");return}e.emit("stopUIProfiler")}const BJ={startProfiler:FJ,stopProfiler:UJ},jJ=10,qJ=20,zJ=30,HJ=40,VJ=50;function wa(e,t,n,r){const i={filename:e,function:t==="<anonymous>"?ri:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}const WJ=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,GJ=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,YJ=/\((\S*)(?::(\d+))(?::(\d+))\)/,KJ=/at (.+?) ?\(data:(.+?),/,S6=[zJ,e=>{const t=e.match(KJ);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=WJ.exec(e);if(n){const[,i,o,s]=n;return wa(i,ri,+o,+s)}const r=GJ.exec(e);if(r){if(r[2]?.indexOf("eval")===0){const a=YJ.exec(r[2]);a&&(r[2]=a[1],r[3]=a[2],r[4]=a[3])}const[o,s]=I6(r[1]||ri,r[2]);return wa(s,o,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],XJ=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,JJ=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,E6=[VJ,e=>{const t=XJ.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const o=JJ.exec(t[3]);o&&(t[1]=t[1]||"eval",t[3]=o[1],t[4]=o[2],t[5]="")}let r=t[3],i=t[1]||ri;return[i,r]=I6(i,r),wa(r,i,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],ZJ=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,QJ=[HJ,e=>{const t=ZJ.exec(e);return t?wa(t[2],t[1]||ri,+t[3],t[4]?+t[4]:void 0):void 0}],eZ=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,tZ=[jJ,e=>{const t=eZ.exec(e);return t?wa(t[2],t[3]||ri,+t[1]):void 0}],nZ=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,rZ=[qJ,e=>{const t=nZ.exec(e);return t?wa(t[5],t[3]||t[4]||ri,+t[1],+t[2]):void 0}],T6=[S6,E6],w6=q$(...T6),I6=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:ri,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};function iZ(e,{metadata:t,tunnel:n,dsn:r}){const i={event_id:e.event_id,sent_at:new Date().toISOString(),...t?.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:si(r)}},o=oZ(e);return vr(i,[o])}function oZ(e){return[{type:"user_report"},e]}const Kf=1024,sZ="Breadcrumbs",A6=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:sZ,setup(n){t.console&&ah(cZ(n)),t.dom&&y6(lZ(n,t.dom)),t.xhr&&sg(uZ(n)),t.fetch&&Ih(dZ(n)),t.history&&Wf(fZ(n)),t.sentry&&n.on("beforeSendEvent",aZ(n))}}});function aZ(e){return function(n){Ie()===e&&Dr({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:rs(n)},{event:n})}}function lZ(e,t){return function(r){if(Ie()!==e)return;let i,o,s=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>Kf&&($e&&B.warn(`\`dom.maxStringLength\` cannot exceed ${Kf}, but a value of ${a} was configured. Sentry will use ${Kf} instead.`),a=Kf),typeof s=="string"&&(s=[s]);try{const c=r.event,u=pZ(c)?c.target:c;i=an(u,{keyAttrs:s,maxStringLength:a}),o=$_(u)}catch{i="<unknown>"}if(i.length===0)return;const l={category:`ui.${r.name}`,message:i};o&&(l.data={"ui.component_name":o}),Dr(l,{event:r.event,name:r.name,global:r.global})}}function cZ(e){return function(n){if(Ie()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:Qd(n.level),message:Rd(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${Rd(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Dr(r,{input:n.args,level:n.level})}}function uZ(e){return function(n){if(Ie()!==e)return;const{startTimestamp:r,endTimestamp:i}=n,o=n.xhr[Xi];if(!r||!i||!o)return;const{method:s,url:a,status_code:l,body:c}=o,u={method:s,url:a,status_code:l},d={xhr:n.xhr,input:c,startTimestamp:r,endTimestamp:i},f={category:"xhr",data:u,type:"http",level:a5(l)};e.emit("beforeOutgoingRequestBreadcrumb",f,d),Dr(f,d)}}function dZ(e){return function(n){if(Ie()!==e)return;const{startTimestamp:r,endTimestamp:i}=n;if(i&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const o={data:n.error,input:n.args,startTimestamp:r,endTimestamp:i},s={category:"fetch",data:n.fetchData,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",s,o),Dr(s,o)}else{const o=n.response,s={...n.fetchData,status_code:o?.status},a={input:n.args,response:o,startTimestamp:r,endTimestamp:i},l={category:"fetch",data:s,type:"http",level:a5(s.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",l,a),Dr(l,a)}}}function fZ(e){return function(n){if(Ie()!==e)return;let r=n.from,i=n.to;const o=us(Pe.location.href);let s=r?us(r):void 0;const a=us(i);s?.path||(s=o),o.protocol===a.protocol&&o.host===a.host&&(i=a.relative),o.protocol===s.protocol&&o.host===s.host&&(r=s.relative),Dr({category:"navigation",data:{from:r,to:i}})}}function pZ(e){return!!e&&!!e.target}const mZ="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(","),_Z="BrowserApiErrors",x6=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:_Z,setupOnce(){t.setTimeout&&$n(Pe,"setTimeout",C6),t.setInterval&&$n(Pe,"setInterval",C6),t.requestAnimationFrame&&$n(Pe,"requestAnimationFrame",hZ),t.XMLHttpRequest&&"XMLHttpRequest"in Pe&&$n(XMLHttpRequest.prototype,"send",gZ);const n=t.eventTarget;n&&(Array.isArray(n)?n:mZ).forEach(i=>yZ(i,t))}}});function C6(e){return function(...t){const n=t[0];return t[0]=ba(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${Li(e)}`}}),e.apply(this,t)}}function hZ(e){return function(t){return e.apply(this,[ba(t,{mechanism:{data:{handler:Li(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function gZ(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in n&&typeof n[i]=="function"&&$n(n,i,function(o){const s={mechanism:{data:{handler:Li(o)},handled:!1,type:`auto.browser.browserapierrors.xhr.${i}`}},a=S_(o);return a&&(s.mechanism.data.handler=Li(a)),ba(o,s)})}),e.apply(this,t)}}function yZ(e,t){const r=Pe[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&($n(r,"addEventListener",function(i){return function(o,s,a){try{bZ(s)&&(s.handleEvent=ba(s.handleEvent,{mechanism:{data:{handler:Li(s),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&vZ(this,o,s),i.apply(this,[o,ba(s,{mechanism:{data:{handler:Li(s),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),a])}}),$n(r,"removeEventListener",function(i){return function(o,s,a){try{const l=s.__sentry_wrapped__;l&&i.call(this,o,l,a)}catch{}return i.call(this,o,s,a)}}))}function bZ(e){return typeof e.handleEvent=="function"}function vZ(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const k6=(e={})=>{const t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(typeof Pe.document>"u"){$e&&B.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}z_({ignoreDuration:!0}),Wd();const n=qt();let r=n.getUser();n.addScopeListener(i=>{const o=i.getUser();(r?.id!==o?.id||r?.ip_address!==o?.ip_address)&&(Wd(),r=o)}),t==="route"&&Wf(({from:i,to:o})=>{i!==o&&(z_({ignoreDuration:!0}),Wd())})}}},$Z="CultureContext",N6=(()=>({name:$Z,preprocessEvent(e){const t=R6();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){const t=R6();t&&$r(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}}));function R6(){try{const e=Pe.Intl;if(!e)return;const t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}const SZ="GlobalHandlers",O6=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:SZ,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(EZ(n),L6("onerror")),t.onunhandledrejection&&(TZ(n),L6("onunhandledrejection"))}}});function EZ(e){V$(t=>{const{stackParser:n,attachStacktrace:r}=D6();if(Ie()!==e||K5())return;const{msg:i,url:o,line:s,column:a,error:l}=t,c=wZ(kf(n,l||i,void 0,r,!1),o,s,a);c.level="error",ra(c,{originalException:l,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function TZ(e){W$(t=>{const{stackParser:n,attachStacktrace:r}=D6();if(Ie()!==e||K5())return;const i=P6(t),o=Fi(i)?M6(i):kf(n,i,void 0,r,!0);o.level="error",ra(o,{originalException:i,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function P6(e){if(Fi(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}function M6(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function wZ(e,t,n,r){const i=e.exception=e.exception||{},o=i.values=i.values||[],s=o[0]=o[0]||{},a=s.stacktrace=s.stacktrace||{},l=a.frames=a.frames||[];return l.length===0&&l.push({colno:r,lineno:n,filename:IZ(t)??ns(),function:ri,in_app:!0}),e}function L6(e){$e&&B.log(`Global Handler attached: ${e}`)}function D6(){return Ie()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function IZ(e){if(!(!Pr(e)||e.length===0))return e.startsWith("data:")?`<${So(e,!1)}>`:e}const F6=()=>({name:"HttpContext",preprocessEvent(e){if(!Pe.navigator&&!Pe.location&&!Pe.document)return;const t=xf(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}},processSegmentSpan(e){if(!Pe.navigator&&!Pe.location&&!Pe.document)return;const t=xf();$r(e,{"url.full":t.url||void 0,"http.request.header.user_agent":t.headers["User-Agent"],"http.request.header.referer":t.headers.Referer})}}),AZ="cause",xZ=5,CZ="LinkedErrors",U6=((e={})=>{const t=e.limit||xZ,n=e.key||AZ;return{name:CZ,preprocessEvent(r,i,o){const s=o.getOptions();QH(Cf,s.stackParser,n,t,r,i)}}}),kZ="SpotlightBrowser",NZ=((e={})=>{const t=e.sidecarUrl||"http://localhost:8969/stream";return{name:kZ,setup:()=>{$e&&B.log("Using Sidecar URL",t)},processEvent:n=>PZ(n)?null:n,afterAllSetup:n=>{RZ(n,t)}}});function RZ(e,t){const n=og("fetch");let r=0;e.on("beforeEnvelope",i=>{if(r>3){B.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:",r);return}n(t,{method:"POST",body:zd(i),headers:{"Content-Type":"application/x-sentry-envelope"},mode:"cors"}).then(o=>{o.status>=200&&o.status<400&&(r=0)},o=>{r++,B.error("Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/",o)})})}const OZ=NZ;function PZ(e){return!!(e.type==="transaction"&&e.spans&&e.contexts?.trace&&e.contexts.trace.op==="ui.action.click"&&e.spans.some(({description:t})=>t?.includes("#sentry-spotlight")))}function MZ(){return LZ()?($e&&Or(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function LZ(){if(typeof Pe.window>"u")return!1;const e=Pe;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;const n=ns();return!(Pe===Pe.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(n))}function cg(e){return[o8(),r8(),eW(),x6(),A6(),O6(),U6(),m8(),F6(),N6(),k6()]}function DZ(e={}){const t=!e.skipBrowserExtensionCheck&&MZ();let n=e.defaultIntegrations==null?cg():e.defaultIntegrations;const r={...e,enabled:t?!1:e.enabled,stackParser:hj(e.stackParser||w6),integrations:Qz({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||lg};return IH(n6,r)}function FZ(){}function UZ(e){e()}function BZ(e={}){const t=Pe.document,n=t?.head||t?.body;if(!n){$e&&B.error("[showReportDialog] Global document not defined");return}const r=Ke(),o=Ie()?.getDsn();if(!o){$e&&B.error("[showReportDialog] DSN not configured");return}const s={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||g4()},a=Pe.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=Jz(o,s);const{onLoad:l,onClose:c}=s;if(l&&(a.onload=l),c){const u=d=>{if(d.data==="__sentry_reportdialog_closed__")try{c()}finally{Pe.removeEventListener("message",u)}};Pe.addEventListener("message",u)}n.appendChild(a)}const jZ=je,qZ="ReportingObserver",B6=new WeakMap,zZ=((e={})=>{const t=e.types||["crash","deprecation","intervention"];function n(r){if(B6.has(Ie()))for(const i of r)yr(o=>{o.setExtra("url",i.url);const s=`ReportingObserver [${i.type}]`;let a="No details available";if(i.body){const l={};for(const c in i.body)l[c]=i.body[c];if(o.setExtra("body",l),i.type==="crash"){const c=i.body;a=[c.crashId||"",c.reason||""].join(" ").trim()||a}else a=i.body.message||a}_4(`${s}: ${a}`)})}return{name:qZ,setupOnce(){if(!xY())return;new jZ.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(r){B6.set(r,!0)}}}),HZ="HttpClient",VZ=((e={})=>{const t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:HZ,setup(n){QZ(n,t),eQ(n,t)}}});function WZ(e,t,n,r,i){if(z6(e,n.status,n.url)){const o=tQ(t,r);let s,a,l,c;V6()&&([s,l]=j6("Cookie",o),[a,c]=j6("Set-Cookie",n));const u=H6({url:o.url,method:o.method,status:n.status,requestHeaders:s,responseHeaders:a,requestCookies:l,responseCookies:c,error:i,type:"fetch"});ra(u)}}function j6(e,t){const n=KZ(t.headers);let r;try{const i=n[e]||n[e.toLowerCase()]||void 0;i&&(r=q6(i))}catch{}return[n,r]}function GZ(e,t,n,r,i){if(z6(e,t.status,t.responseURL)){let o,s,a;if(V6()){try{const c=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;c&&(s=q6(c))}catch{}try{a=XZ(t)}catch{}o=r}const l=H6({url:t.responseURL,method:n,status:t.status,requestHeaders:o,responseHeaders:a,responseCookies:s,error:i,type:"xhr"});ra(l)}}function YZ(e){if(e){const t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function q6(e){return e.split("; ").reduce((t,n)=>{const[r,i]=n.split("=");return r&&i&&(t[r]=i),t},{})}function KZ(e){const t={};return e.forEach((n,r)=>{t[r]=n}),t}function XZ(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
|
|
522
522
|
`).reduce((n,r)=>{const[i,o]=r.split(": ");return i&&o&&(n[i]=o),n},{}):{}}function JZ(e,t){return e.some(n=>typeof n=="string"?t.includes(n):n.test(t))}function ZZ(e,t){return e.some(n=>typeof n=="number"?n===t:t>=n[0]&&t<=n[1])}function QZ(e,t){l5()&&Ih(n=>{if(Ie()!==e)return;const{response:r,args:i,error:o,virtualError:s}=n,[a,l]=i;r&&WZ(t,a,r,l,o||s)},!1)}function eQ(e,t){"XMLHttpRequest"in je&&sg(n=>{if(Ie()!==e)return;const{error:r,virtualError:i}=n,o=n.xhr,s=o[Xi];if(!s)return;const{method:a,request_headers:l}=s;try{GZ(t,o,a,l,r||i)}catch(c){$e&&B.warn("Error while extracting response event form XHR response",c)}})}function z6(e,t,n){return ZZ(e.failedRequestStatusCodes,t)&&JZ(e.failedRequestTargets,n)&&!J4(n,Ie())}function H6(e){const t=Ie(),n=t&&e.error&&e.error instanceof Error?e.error.stack:void 0,r=n&&t?t.getOptions().stackParser(n,0,1):void 0,i=`HTTP Client Error with status code: ${e.status}`,o={message:i,exception:{values:[{type:"Error",value:i,stacktrace:r?{frames:r}:void 0}]},request:{url:e.url,method:e.method,headers:e.requestHeaders,cookies:e.requestCookies},contexts:{response:{status_code:e.status,headers:e.responseHeaders,cookies:e.responseCookies,body_size:YZ(e.responseHeaders)}}};return ji(o,{type:`auto.http.client.${e.type}`,handled:!1}),o}function tQ(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request(e,t)}function V6(){const e=Ie();return e?!!e.getOptions().sendDefaultPii:!1}const ug=je,nQ=7,rQ="ContextLines",iQ=((e={})=>{const t=e.frameContextLines!=null?e.frameContextLines:nQ;return{name:rQ,processEvent(n){return oQ(n,t)}}});function oQ(e,t){const n=ug.document,r=ug.location&&X4(ug.location.href);if(!n||!r)return e;const i=e.exception?.values;if(!i?.length)return e;const o=n.documentElement.innerHTML;if(!o)return e;const s=["<!DOCTYPE html>","<html>",...o.split(`
|
|
523
|
-
`),"</html>"];return i.forEach(a=>{const l=a.stacktrace;l?.frames&&(l.frames=l.frames.map(c=>sQ(c,s,r,t)))}),e}function sQ(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||kj(t,e,r),e}const aQ="GraphQLClient",lQ=(e=>({name:aQ,setup(t){cQ(t,e),uQ(t,e)}}));function cQ(e,t){e.on("beforeOutgoingRequestSpan",(n,r)=>{const o=Je(n).data||{};if(!(o[yt]==="http.client"))return;const l=o[sq]||o["http.url"]||o.url,c=o[oq]||o["http.method"];if(!Pr(l)||!Pr(c))return;const{endpoints:u}=t,d=Mr(l,u),f=G6(r);if(d&&f){const p=Y6(f);if(p){const m=W6(p);n.updateName(`${c} ${l} (${m})`),Jf(p)&&n.setAttribute("graphql.document",p.query),Zf(p)&&(n.setAttribute("graphql.persisted_query.hash.sha256",p.extensions.persistedQuery.sha256Hash),n.setAttribute("graphql.persisted_query.version",p.extensions.persistedQuery.version))}}})}function uQ(e,t){e.on("beforeOutgoingRequestBreadcrumb",(n,r)=>{const{category:i,type:o,data:s}=n;if(o==="http"&&(i==="fetch"||i==="xhr")){const u=s?.url,{endpoints:d}=t,f=Mr(u,d),p=G6(r);if(f&&s&&p){const m=Y6(p);if(!s.graphql&&m){const b=W6(m);s["graphql.operation"]=b,Jf(m)&&(s["graphql.document"]=m.query),Zf(m)&&(s["graphql.persisted_query.hash.sha256"]=m.extensions.persistedQuery.sha256Hash,s["graphql.persisted_query.version"]=m.extensions.persistedQuery.version)}}}})}function W6(e){if(Zf(e))return`persisted ${e.operationName}`;if(Jf(e)){const{query:t,operationName:n}=e,{operationName:r=n,operationType:i}=dQ(t);return r?`${i} ${r}`:`${i}`}return"unknown"}function G6(e){const t="xhr"in e;let n;if(t){const r=e.xhr[Xi];n=r&&Yf(r.body)[0]}else{const r=ag(e.input);n=Yf(r)[0]}return n}function dQ(e){const t=/^(?:\s*)(query|mutation|subscription)(?:\s*)(\w+)(?:\s*)[{(]/,n=/^(?:\s*)(query|mutation|subscription)(?:\s*)[{(]/,r=e.match(t);if(r)return{operationType:r[1],operationName:r[2]};const i=e.match(n);return i?{operationType:i[1],operationName:void 0}:{operationType:void 0,operationName:void 0}}function Xf(e){return typeof e=="object"&&e!==null}function Jf(e){return Xf(e)&&typeof e.query=="string"}function Zf(e){return Xf(e)&&typeof e.operationName=="string"&&Xf(e.extensions)&&Xf(e.extensions.persistedQuery)&&typeof e.extensions.persistedQuery.sha256Hash=="string"&&typeof e.extensions.persistedQuery.version=="number"}function Y6(e){try{const t=JSON.parse(e);return Jf(t)||Zf(t)?t:void 0}catch{return}}const fQ=lQ,pQ=(e={})=>{const t=["script"];function n(r,i,o=0){if(!r)return;const s="shadowRoot"in r&&r.shadowRoot?r.shadowRoot.children:r.children;for(const a of s){if(!(a instanceof HTMLElement))continue;const l=$_(a,1)||void 0,c=a.tagName.toLowerCase();if(t.includes(c))continue;const u=e.onElement?.({element:a,componentName:l,tagName:c,depth:o})||{};if(u==="skip")continue;if(u==="children"){n(a,i,o+1);continue}const{x:d,y:f,width:p,height:m}=a.getBoundingClientRect(),b={identifier:a.id||void 0,type:l||c,visible:!0,alpha:1,height:m,width:p,x:d,y:f,...u},g=[];b.children=g,n(a,b.children,o+1),i.push(b)}}return{name:"ViewHierarchy",processEvent:(r,i)=>{if(r.type!==void 0||e.shouldAttach?.(r,i)===!1)return r;const o={rendering_system:"DOM",positioning:"absolute",windows:[]};n(e.rootElement?.()||Pe.document.body,o.windows);const s={filename:"view-hierarchy.json",attachmentType:"event.view_hierarchy",contentType:"application/json",data:JSON.stringify(o)};return i.attachments=i.attachments||[],i.attachments.push(s),r}}},Mt=je,dg="sentryReplaySession",mQ="replay_event",fg="Unable to send Replay",_Q=3e5,hQ=9e5,gQ=5e3,yQ=5500,bQ=6e4,vQ=5e3,$Q=3,K6=15e4,Qf=5e3,SQ=3e3,EQ=300,pg=2e7,TQ=4999,wQ=5e4,X6=36e5;var IQ=Object.defineProperty,AQ=(e,t,n)=>t in e?IQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,J6=(e,t,n)=>AQ(e,typeof t!="symbol"?t+"":t,n),nn=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(nn||{});function xQ(e){return e.nodeType===e.ELEMENT_NODE}function qc(e){return e?.host?.shadowRoot===e}function zc(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function CQ(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function kQ(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function ep(e){try{const t=e.rules||e.cssRules;return t?CQ(Array.from(t,Z6).join("")):null}catch{return null}}function NQ(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,i=r[n],o=r.getPropertyPriority(i);t+=`${i}:${r.getPropertyValue(i)}${o?" !important":""};`}return`${e.selectorText} { ${t} }`}function Z6(e){let t;if(OQ(e))try{t=ep(e.styleSheet)||kQ(e)}catch{}else if(PQ(e)){let n=e.cssText;const r=e.selectorText.includes(":"),i=typeof e.style.all=="string"&&e.style.all;if(i&&(n=NQ(e)),r&&(n=RQ(n)),r||i)return n}return t||e.cssText}function RQ(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function OQ(e){return"styleSheet"in e}function PQ(e){return"selectorText"in e}let Q6=class{constructor(){J6(this,"idNodeMap",new Map),J6(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(n,i)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function MQ(){return new Q6}function tp({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function Hc({isMasked:e,element:t,value:n,maskInputFn:r}){let i=n||"";return e?(r&&(i=r(i,t)),"*".repeat(i.length)):i}function Ia(e){return e.toLowerCase()}function mg(e){return e.toUpperCase()}const eS="__rrweb_original__";function LQ(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let i=0;i<e.height;i+=n){const o=t.getImageData,s=eS in o?o[eS]:o;if(new Uint32Array(s.call(t,r,i,Math.min(n,e.width-r),Math.min(n,e.height-i)).data.buffer).some(l=>l!==0))return!1}return!0}function _g(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Ia(t):null}function np(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function tS(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i;return n.pathname.match(r)?.[1]??null}const nS={};function rS(e){const t=nS[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);const o=i.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(i)}catch{}return nS[e]=r.bind(window)}function hg(...e){return rS("setTimeout")(...e)}function iS(...e){return rS("clearTimeout")(...e)}function oS(e){try{return e.contentDocument}catch{}}let DQ=1;const FQ=new RegExp("[^a-z0-9-_:]"),Vc=-2;function gg(){return DQ++}function UQ(e){if(e instanceof HTMLFormElement)return"form";const t=Ia(e.tagName);return FQ.test(t)?"div":t}function BQ(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let Aa,sS;const jQ=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,qQ=/^(?:[a-z+]+:)?\/\//i,zQ=/^www\..*/i,HQ=/^(data:)([^,]*),(.*)/i;function VQ(e,t){if(!e||t.size===0)return e;try{const n=e.split(";"),r=[];for(let i of n){if(i=i.trim(),!i)continue;const o=i.indexOf(":");if(o===-1){r.push(i);continue}const s=i.slice(0,o).trim();t.has(s)||r.push(i)}return r.join("; ")+(r.length>0&&e.endsWith(";")?";":"")}catch(n){return console.warn("Error filtering CSS properties:",n),e}}function rp(e,t){return(e||"").replace(jQ,(n,r,i,o,s,a)=>{const l=i||s||a,c=r||o||"";if(!l)return n;if(qQ.test(l)||zQ.test(l))return`url(${c}${l}${c})`;if(HQ.test(l))return`url(${c}${l}${c})`;if(l[0]==="/")return`url(${c}${BQ(t)+l}${c})`;const u=t.split("/"),d=l.split("/");u.pop();for(const f of d)f!=="."&&(f===".."?u.pop():u.push(f));return`url(${c}${u.join("/")}${c})`})}const WQ=/^[^ \t\n\r\u000c]+/,GQ=/^[, \t\n\r\u000c]+/;function YQ(e,t){if(t.trim()==="")return t;let n=0;function r(o){let s;const a=o.exec(t.substring(n));return a?(s=a[0],n+=s.length,s):""}const i=[];for(;r(GQ),!(n>=t.length);){let o=r(WQ);if(o.slice(-1)===",")o=xa(e,o.substring(0,o.length-1)),i.push(o);else{let s="";o=xa(e,o);let a=!1;for(;;){const l=t.charAt(n);if(l===""){i.push((o+s).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){n+=1,i.push((o+s).trim());break}else l==="("&&(a=!0);s+=l,n+=1}}}return i.join(", ")}const aS=new WeakMap;function xa(e,t){return!t||t.trim()===""?t:ip(e,t)}function KQ(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function ip(e,t){let n=aS.get(e);if(n||(n=e.createElement("a"),aS.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function lS(e,t,n,r,i,o,s){if(!r)return r;if(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#"))return xa(e,r);if(n==="xlink:href"&&r[0]!=="#")return xa(e,r);if(n==="background"&&(t==="table"||t==="td"||t==="th"))return xa(e,r);if(n==="srcset")return YQ(e,r);if(n==="style"){let a=rp(r,ip(e));return s&&s.size>0&&(a=VQ(a,s)),a}else if(t==="object"&&n==="data")return xa(e,r);return typeof o=="function"?o(n,r,i):r}function cS(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function XQ(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let i=e.classList.length;i--;){const o=e.classList[i];if(t.test(o))return!0}if(n)return e.matches(n)}catch{}return!1}function JQ(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Ss(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Ss(e.parentNode,t,n,r+1)}function Ca(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(JQ(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function ka(e,t,n,r,i,o){try{const s=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(s===null)return!1;if(s.tagName==="INPUT"){const c=s.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(c))return!0}let a=-1,l=-1;if(o){if(l=Ss(s,Ca(r,i)),l<0)return!0;a=Ss(s,Ca(t,n),l>=0?l:1/0)}else{if(a=Ss(s,Ca(t,n)),a<0)return!1;l=Ss(s,Ca(r,i),a>=0?a:1/0)}return a>=0?l>=0?a<=l:!0:l>=0?!1:!!o}catch{}return!!o}function ZQ(e,t,n){const r=e.contentWindow;if(!r)return;let i=!1,o;try{o=r.document.readyState}catch{return}if(o!=="complete"){const a=hg(()=>{i||(t(),i=!0)},n);e.addEventListener("load",()=>{iS(a),i=!0,t()});return}const s="about:blank";if(r.location.href!==s||e.src===s||e.src==="")return hg(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function QQ(e,t,n){let r=!1,i;try{i=e.sheet}catch{return}if(i)return;const o=hg(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{iS(o),r=!0,t()})}function eee(e,t){const{doc:n,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskAttributeFn:l,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,inlineStylesheet:p,maskInputOptions:m={},maskTextFn:b,maskInputFn:g,dataURLOptions:_={},inlineImages:y,recordCanvas:T,keepIframeSrcFn:S,newlyAddedElement:O=!1,ignoreCSSAttributes:N}=t,w=tee(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:nn.Document,childNodes:[],compatMode:e.compatMode}:{type:nn.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:nn.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:w};case e.ELEMENT_NODE:return ree(e,{doc:n,blockClass:i,blockSelector:o,unblockSelector:s,inlineStylesheet:p,maskAttributeFn:l,maskInputOptions:m,maskInputFn:g,dataURLOptions:_,inlineImages:y,recordCanvas:T,keepIframeSrcFn:S,newlyAddedElement:O,rootId:w,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,ignoreCSSAttributes:N});case e.TEXT_NODE:return nee(e,{doc:n,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,maskTextFn:b,maskInputOptions:m,maskInputFn:g,rootId:w});case e.CDATA_SECTION_NODE:return{type:nn.CDATA,textContent:"",rootId:w};case e.COMMENT_NODE:return{type:nn.Comment,textContent:e.textContent||"",rootId:w};default:return!1}}function tee(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function nee(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:i,maskTextSelector:o,unmaskTextSelector:s,maskTextFn:a,maskInputOptions:l,maskInputFn:c,rootId:u}=t,d=e.parentNode&&e.parentNode.tagName;let f=e.textContent;const p=d==="STYLE"?!0:void 0,m=d==="SCRIPT"?!0:void 0,b=d==="TEXTAREA"?!0:void 0;if(p&&f){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(f=ep(e.parentNode.sheet))}catch(_){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${_}`,e)}f=rp(f,ip(t.doc))}m&&(f="SCRIPT_PLACEHOLDER");const g=ka(e,r,o,i,s,n);if(!p&&!m&&!b&&f&&g&&(f=a?a(f,e.parentElement):f.replace(/[\S]/g,"*")),b&&f&&(l.textarea||g)&&(f=c?c(f,e.parentNode):f.replace(/[\S]/g,"*")),d==="OPTION"&&f){const _=tp({type:null,tagName:d,maskInputOptions:l});f=Hc({isMasked:ka(e,r,o,i,s,_),element:e,value:f,maskInputFn:c})}return{type:nn.Text,textContent:f||"",isStyle:p,rootId:u}}function ree(e,t){const{doc:n,blockClass:r,blockSelector:i,unblockSelector:o,inlineStylesheet:s,maskInputOptions:a={},maskAttributeFn:l,maskInputFn:c,dataURLOptions:u={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:m=!1,rootId:b,maskTextClass:g,unmaskTextClass:_,maskTextSelector:y,unmaskTextSelector:T,ignoreCSSAttributes:S}=t,O=XQ(e,r,i,o),N=UQ(e);let w={};const D=e.attributes.length;for(let q=0;q<D;q++){const P=e.attributes[q];P.name&&!cS(N,P.name,P.value)&&(w[P.name]=lS(n,N,Ia(P.name),P.value,e,l,S))}if(N==="link"&&s){const q=Array.from(n.styleSheets).find(C=>C.href===e.href);let P=null;q&&(P=ep(q)),P&&(w.rel=null,w.href=null,w.crossorigin=null,w._cssText=rp(P,q.href))}if(N==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const q=ep(e.sheet);q&&(w._cssText=rp(q,ip(n)))}if(N==="input"||N==="textarea"||N==="select"||N==="option"){const q=e,P=_g(q),C=np(q,mg(N),P),F=q.checked;if(P!=="submit"&&P!=="button"&&C){const R=ka(q,g,y,_,T,tp({type:P,tagName:mg(N),maskInputOptions:a}));w.value=Hc({isMasked:R,element:q,value:C,maskInputFn:c})}F&&(w.checked=F)}if(N==="option"&&(e.selected&&!a.select?w.selected=!0:delete w.selected),N==="canvas"&&f){if(e.__context==="2d")LQ(e)||(w.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){const q=e.toDataURL(u.type,u.quality),P=n.createElement("canvas");P.width=e.width,P.height=e.height;const C=P.toDataURL(u.type,u.quality);q!==C&&(w.rr_dataURL=q)}}if(N==="img"&&d){Aa||(Aa=n.createElement("canvas"),sS=Aa.getContext("2d"));const q=e,P=q.currentSrc||q.getAttribute("src")||"<unknown-src>",C=q.crossOrigin,F=()=>{q.removeEventListener("load",F);try{Aa.width=q.naturalWidth,Aa.height=q.naturalHeight,sS.drawImage(q,0,0),w.rr_dataURL=Aa.toDataURL(u.type,u.quality)}catch(R){if(q.crossOrigin!=="anonymous"){q.crossOrigin="anonymous",q.complete&&q.naturalWidth!==0?F():q.addEventListener("load",F);return}else console.warn(`Cannot inline img src=${P}! Error: ${R}`)}q.crossOrigin==="anonymous"&&(C?w.crossOrigin=C:q.removeAttribute("crossorigin"))};q.complete&&q.naturalWidth!==0?F():q.addEventListener("load",F)}if((N==="audio"||N==="video")&&(w.rr_mediaState=e.paused?"paused":"played",w.rr_mediaCurrentTime=e.currentTime),m||(e.scrollLeft&&(w.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(w.rr_scrollTop=e.scrollTop)),O){const{width:q,height:P}=e.getBoundingClientRect();w={class:w.class,rr_width:`${q}px`,rr_height:`${P}px`}}N==="iframe"&&!p(w.src)&&(!O&&!oS(e)&&(w.rr_src=w.src),delete w.src);let Y;try{customElements.get(N)&&(Y=!0)}catch{}return{type:nn.Element,tagName:N,attributes:w,childNodes:[],isSVG:KQ(e)||void 0,needBlock:O,rootId:b,isCustom:Y}}function Lt(e){return e==null?"":e.toLowerCase()}function iee(e,t){if(t.comment&&e.type===nn.Comment)return!0;if(e.type===nn.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&tS(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(Lt(e.attributes.name).match(/^msapplication-tile(image|color)$/)||Lt(e.attributes.name)==="application-name"||Lt(e.attributes.rel)==="icon"||Lt(e.attributes.rel)==="apple-touch-icon"||Lt(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&Lt(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Lt(e.attributes.property).match(/^(og|twitter|fb):/)||Lt(e.attributes.name).match(/^(og|twitter):/)||Lt(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(Lt(e.attributes.name)==="robots"||Lt(e.attributes.name)==="googlebot"||Lt(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(Lt(e.attributes.name)==="author"||Lt(e.attributes.name)==="generator"||Lt(e.attributes.name)==="framework"||Lt(e.attributes.name)==="publisher"||Lt(e.attributes.name)==="progid"||Lt(e.attributes.property).match(/^article:/)||Lt(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(Lt(e.attributes.name)==="google-site-verification"||Lt(e.attributes.name)==="yandex-verification"||Lt(e.attributes.name)==="csrf-token"||Lt(e.attributes.name)==="p:domain_verify"||Lt(e.attributes.name)==="verify-v1"||Lt(e.attributes.name)==="verification"||Lt(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Na(e,t){const{doc:n,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:f=!1,inlineStylesheet:p=!0,maskInputOptions:m={},maskAttributeFn:b,maskTextFn:g,maskInputFn:_,slimDOMOptions:y,dataURLOptions:T={},inlineImages:S=!1,recordCanvas:O=!1,onSerialize:N,onIframeLoad:w,iframeLoadTimeout:D=5e3,onBlockedImageLoad:Y,onStylesheetLoad:q,stylesheetLoadTimeout:P=5e3,keepIframeSrcFn:C=()=>!1,newlyAddedElement:F=!1,ignoreCSSAttributes:R}=t;let{preserveWhiteSpace:G=!0}=t;const z=eee(e,{doc:n,mirror:r,blockClass:i,blockSelector:o,maskAllText:a,unblockSelector:s,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:b,maskTextFn:g,maskInputFn:_,dataURLOptions:T,inlineImages:S,recordCanvas:O,keepIframeSrcFn:C,newlyAddedElement:F,ignoreCSSAttributes:R});if(!z)return console.warn(e,"not serialized"),null;let K;r.hasNode(e)?K=r.getId(e):iee(z,y)||!G&&z.type===nn.Text&&!z.isStyle&&!z.textContent.replace(/^\s+|\s+$/gm,"").length?K=Vc:K=gg();const M=Object.assign(z,{id:K});if(r.add(e,M),K===Vc)return null;N&&N(e);let oe=!f;if(M.type===nn.Element){oe=oe&&!M.needBlock;const te=e.shadowRoot;te&&zc(te)&&(M.isShadowHost=!0)}if((M.type===nn.Document||M.type===nn.Element)&&oe){y.headWhitespace&&M.type===nn.Element&&M.tagName==="head"&&(G=!1);const te={doc:n,mirror:r,blockClass:i,blockSelector:o,maskAllText:a,unblockSelector:s,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:f,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:b,maskTextFn:g,maskInputFn:_,slimDOMOptions:y,dataURLOptions:T,inlineImages:S,recordCanvas:O,preserveWhiteSpace:G,onSerialize:N,onIframeLoad:w,iframeLoadTimeout:D,onBlockedImageLoad:Y,onStylesheetLoad:q,stylesheetLoadTimeout:P,keepIframeSrcFn:C,ignoreCSSAttributes:R},se=e.childNodes?Array.from(e.childNodes):[];for(const _e of se){const ce=Na(_e,te);ce&&M.childNodes.push(ce)}if(xQ(e)&&e.shadowRoot)for(const _e of Array.from(e.shadowRoot.childNodes)){const ce=Na(_e,te);ce&&(zc(e.shadowRoot)&&(ce.isShadow=!0),M.childNodes.push(ce))}}if(e.parentNode&&qc(e.parentNode)&&zc(e.parentNode)&&(M.isShadow=!0),M.type===nn.Element&&M.tagName==="iframe"&&!M.needBlock&&ZQ(e,()=>{const te=oS(e);if(te&&w){const se=Na(te,{doc:te,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:b,maskTextFn:g,maskInputFn:_,slimDOMOptions:y,dataURLOptions:T,inlineImages:S,recordCanvas:O,preserveWhiteSpace:G,onSerialize:N,onIframeLoad:w,iframeLoadTimeout:D,onStylesheetLoad:q,stylesheetLoadTimeout:P,keepIframeSrcFn:C,ignoreCSSAttributes:R});se&&w(e,se)}},D),M.type===nn.Element&&M.tagName==="img"&&!e.complete&&M.needBlock){const te=e,se=()=>{if(te.isConnected&&!te.complete&&Y)try{const _e=te.getBoundingClientRect();_e.width>0&&_e.height>0&&Y(te,M,_e)}catch{}te.removeEventListener("load",se)};te.isConnected&&te.addEventListener("load",se)}return M.type===nn.Element&&M.tagName==="link"&&typeof M.attributes.rel=="string"&&(M.attributes.rel==="stylesheet"||M.attributes.rel==="preload"&&typeof M.attributes.href=="string"&&tS(M.attributes.href)==="css")&&QQ(e,()=>{if(q){const te=Na(e,{doc:n,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:b,maskTextFn:g,maskInputFn:_,slimDOMOptions:y,dataURLOptions:T,inlineImages:S,recordCanvas:O,preserveWhiteSpace:G,onSerialize:N,onIframeLoad:w,iframeLoadTimeout:D,onStylesheetLoad:q,stylesheetLoadTimeout:P,keepIframeSrcFn:C,ignoreCSSAttributes:R});te&&q(e,te)}},P),M.type===nn.Element&&delete M.needBlock,M}function oee(e,t){const{mirror:n=new Q6,blockClass:r="rr-block",blockSelector:i=null,unblockSelector:o=null,maskAllText:s=!1,maskTextClass:a="rr-mask",unmaskTextClass:l=null,maskTextSelector:c=null,unmaskTextSelector:u=null,inlineStylesheet:d=!0,inlineImages:f=!1,recordCanvas:p=!1,maskAllInputs:m=!1,maskAttributeFn:b,maskTextFn:g,maskInputFn:_,slimDOM:y=!1,dataURLOptions:T,preserveWhiteSpace:S,onSerialize:O,onIframeLoad:N,iframeLoadTimeout:w,onBlockedImageLoad:D,onStylesheetLoad:Y,stylesheetLoadTimeout:q,keepIframeSrcFn:P=()=>!1,ignoreCSSAttributes:C=new Set([])}=t||{};return Na(e,{doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,maskAllText:s,maskTextClass:a,unmaskTextClass:l,maskTextSelector:c,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:m===!1?{}:m,maskAttributeFn:b,maskTextFn:g,maskInputFn:_,slimDOMOptions:y===!0||y==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:y==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:y===!1?{}:y,dataURLOptions:T,inlineImages:f,recordCanvas:p,preserveWhiteSpace:S,onSerialize:O,onIframeLoad:N,iframeLoadTimeout:w,onBlockedImageLoad:D,onStylesheetLoad:Y,stylesheetLoadTimeout:q,keepIframeSrcFn:P,newlyAddedElement:!1,ignoreCSSAttributes:C})}function zn(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Ra=`Please stop import mirror directly. Instead of that,\r
|
|
523
|
+
`),"</html>"];return i.forEach(a=>{const l=a.stacktrace;l?.frames&&(l.frames=l.frames.map(c=>sQ(c,s,r,t)))}),e}function sQ(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||kj(t,e,r),e}const aQ="GraphQLClient",lQ=(e=>({name:aQ,setup(t){cQ(t,e),uQ(t,e)}}));function cQ(e,t){e.on("beforeOutgoingRequestSpan",(n,r)=>{const o=Je(n).data||{};if(!(o[yt]==="http.client"))return;const l=o[sq]||o["http.url"]||o.url,c=o[oq]||o["http.method"];if(!Pr(l)||!Pr(c))return;const{endpoints:u}=t,d=Mr(l,u),f=G6(r);if(d&&f){const p=Y6(f);if(p){const m=W6(p);n.updateName(`${c} ${l} (${m})`),Jf(p)&&n.setAttribute("graphql.document",p.query),Zf(p)&&(n.setAttribute("graphql.persisted_query.hash.sha256",p.extensions.persistedQuery.sha256Hash),n.setAttribute("graphql.persisted_query.version",p.extensions.persistedQuery.version))}}})}function uQ(e,t){e.on("beforeOutgoingRequestBreadcrumb",(n,r)=>{const{category:i,type:o,data:s}=n;if(o==="http"&&(i==="fetch"||i==="xhr")){const u=s?.url,{endpoints:d}=t,f=Mr(u,d),p=G6(r);if(f&&s&&p){const m=Y6(p);if(!s.graphql&&m){const b=W6(m);s["graphql.operation"]=b,Jf(m)&&(s["graphql.document"]=m.query),Zf(m)&&(s["graphql.persisted_query.hash.sha256"]=m.extensions.persistedQuery.sha256Hash,s["graphql.persisted_query.version"]=m.extensions.persistedQuery.version)}}}})}function W6(e){if(Zf(e))return`persisted ${e.operationName}`;if(Jf(e)){const{query:t,operationName:n}=e,{operationName:r=n,operationType:i}=dQ(t);return r?`${i} ${r}`:`${i}`}return"unknown"}function G6(e){const t="xhr"in e;let n;if(t){const r=e.xhr[Xi];n=r&&Yf(r.body)[0]}else{const r=ag(e.input);n=Yf(r)[0]}return n}function dQ(e){const t=/^(?:\s*)(query|mutation|subscription)(?:\s*)(\w+)(?:\s*)[{(]/,n=/^(?:\s*)(query|mutation|subscription)(?:\s*)[{(]/,r=e.match(t);if(r)return{operationType:r[1],operationName:r[2]};const i=e.match(n);return i?{operationType:i[1],operationName:void 0}:{operationType:void 0,operationName:void 0}}function Xf(e){return typeof e=="object"&&e!==null}function Jf(e){return Xf(e)&&typeof e.query=="string"}function Zf(e){return Xf(e)&&typeof e.operationName=="string"&&Xf(e.extensions)&&Xf(e.extensions.persistedQuery)&&typeof e.extensions.persistedQuery.sha256Hash=="string"&&typeof e.extensions.persistedQuery.version=="number"}function Y6(e){try{const t=JSON.parse(e);return Jf(t)||Zf(t)?t:void 0}catch{return}}const fQ=lQ,pQ=(e={})=>{const t=["script"];function n(r,i,o=0){if(!r)return;const s="shadowRoot"in r&&r.shadowRoot?r.shadowRoot.children:r.children;for(const a of s){if(!(a instanceof HTMLElement))continue;const l=$_(a,1)||void 0,c=a.tagName.toLowerCase();if(t.includes(c))continue;const u=e.onElement?.({element:a,componentName:l,tagName:c,depth:o})||{};if(u==="skip")continue;if(u==="children"){n(a,i,o+1);continue}const{x:d,y:f,width:p,height:m}=a.getBoundingClientRect(),b={identifier:a.id||void 0,type:l||c,visible:!0,alpha:1,height:m,width:p,x:d,y:f,...u},g=[];b.children=g,n(a,b.children,o+1),i.push(b)}}return{name:"ViewHierarchy",processEvent:(r,i)=>{if(r.type!==void 0||e.shouldAttach?.(r,i)===!1)return r;const o={rendering_system:"DOM",positioning:"absolute",windows:[]};n(e.rootElement?.()||Pe.document.body,o.windows);const s={filename:"view-hierarchy.json",attachmentType:"event.view_hierarchy",contentType:"application/json",data:JSON.stringify(o)};return i.attachments=i.attachments||[],i.attachments.push(s),r}}},Mt=je,dg="sentryReplaySession",mQ="replay_event",fg="Unable to send Replay",_Q=3e5,hQ=9e5,gQ=5e3,yQ=5500,bQ=6e4,vQ=5e3,$Q=3,K6=15e4,Qf=5e3,SQ=3e3,EQ=300,pg=2e7,TQ=4999,wQ=5e4,X6=36e5;var IQ=Object.defineProperty,AQ=(e,t,n)=>t in e?IQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,J6=(e,t,n)=>AQ(e,typeof t!="symbol"?t+"":t,n),nn=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(nn||{});function xQ(e){return e.nodeType===e.ELEMENT_NODE}function qc(e){return e?.host?.shadowRoot===e}function zc(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function CQ(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function kQ(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function ep(e){try{const t=e.rules||e.cssRules;return t?CQ(Array.from(t,Z6).join("")):null}catch{return null}}function NQ(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,i=r[n],o=r.getPropertyPriority(i);t+=`${i}:${r.getPropertyValue(i)}${o?" !important":""};`}return`${e.selectorText} { ${t} }`}function Z6(e){let t;if(OQ(e))try{t=ep(e.styleSheet)||kQ(e)}catch{}else if(PQ(e)){let n=e.cssText;const r=e.selectorText.includes(":"),i=typeof e.style.all=="string"&&e.style.all;if(i&&(n=NQ(e)),r&&(n=RQ(n)),r||i)return n}return t||e.cssText}function RQ(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function OQ(e){return"styleSheet"in e}function PQ(e){return"selectorText"in e}let Q6=class{constructor(){J6(this,"idNodeMap",new Map),J6(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(n,i)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function MQ(){return new Q6}function tp({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function Hc({isMasked:e,element:t,value:n,maskInputFn:r}){let i=n||"";return e?(r&&(i=r(i,t)),"*".repeat(i.length)):i}function Ia(e){return e.toLowerCase()}function mg(e){return e.toUpperCase()}const e7="__rrweb_original__";function LQ(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let i=0;i<e.height;i+=n){const o=t.getImageData,s=e7 in o?o[e7]:o;if(new Uint32Array(s.call(t,r,i,Math.min(n,e.width-r),Math.min(n,e.height-i)).data.buffer).some(l=>l!==0))return!1}return!0}function _g(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Ia(t):null}function np(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function t7(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i;return n.pathname.match(r)?.[1]??null}const n7={};function r7(e){const t=n7[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);const o=i.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(i)}catch{}return n7[e]=r.bind(window)}function hg(...e){return r7("setTimeout")(...e)}function i7(...e){return r7("clearTimeout")(...e)}function o7(e){try{return e.contentDocument}catch{}}let DQ=1;const FQ=new RegExp("[^a-z0-9-_:]"),Vc=-2;function gg(){return DQ++}function UQ(e){if(e instanceof HTMLFormElement)return"form";const t=Ia(e.tagName);return FQ.test(t)?"div":t}function BQ(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let Aa,s7;const jQ=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,qQ=/^(?:[a-z+]+:)?\/\//i,zQ=/^www\..*/i,HQ=/^(data:)([^,]*),(.*)/i;function VQ(e,t){if(!e||t.size===0)return e;try{const n=e.split(";"),r=[];for(let i of n){if(i=i.trim(),!i)continue;const o=i.indexOf(":");if(o===-1){r.push(i);continue}const s=i.slice(0,o).trim();t.has(s)||r.push(i)}return r.join("; ")+(r.length>0&&e.endsWith(";")?";":"")}catch(n){return console.warn("Error filtering CSS properties:",n),e}}function rp(e,t){return(e||"").replace(jQ,(n,r,i,o,s,a)=>{const l=i||s||a,c=r||o||"";if(!l)return n;if(qQ.test(l)||zQ.test(l))return`url(${c}${l}${c})`;if(HQ.test(l))return`url(${c}${l}${c})`;if(l[0]==="/")return`url(${c}${BQ(t)+l}${c})`;const u=t.split("/"),d=l.split("/");u.pop();for(const f of d)f!=="."&&(f===".."?u.pop():u.push(f));return`url(${c}${u.join("/")}${c})`})}const WQ=/^[^ \t\n\r\u000c]+/,GQ=/^[, \t\n\r\u000c]+/;function YQ(e,t){if(t.trim()==="")return t;let n=0;function r(o){let s;const a=o.exec(t.substring(n));return a?(s=a[0],n+=s.length,s):""}const i=[];for(;r(GQ),!(n>=t.length);){let o=r(WQ);if(o.slice(-1)===",")o=xa(e,o.substring(0,o.length-1)),i.push(o);else{let s="";o=xa(e,o);let a=!1;for(;;){const l=t.charAt(n);if(l===""){i.push((o+s).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){n+=1,i.push((o+s).trim());break}else l==="("&&(a=!0);s+=l,n+=1}}}return i.join(", ")}const a7=new WeakMap;function xa(e,t){return!t||t.trim()===""?t:ip(e,t)}function KQ(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function ip(e,t){let n=a7.get(e);if(n||(n=e.createElement("a"),a7.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function l7(e,t,n,r,i,o,s){if(!r)return r;if(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#"))return xa(e,r);if(n==="xlink:href"&&r[0]!=="#")return xa(e,r);if(n==="background"&&(t==="table"||t==="td"||t==="th"))return xa(e,r);if(n==="srcset")return YQ(e,r);if(n==="style"){let a=rp(r,ip(e));return s&&s.size>0&&(a=VQ(a,s)),a}else if(t==="object"&&n==="data")return xa(e,r);return typeof o=="function"?o(n,r,i):r}function c7(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function XQ(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let i=e.classList.length;i--;){const o=e.classList[i];if(t.test(o))return!0}if(n)return e.matches(n)}catch{}return!1}function JQ(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Ss(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Ss(e.parentNode,t,n,r+1)}function Ca(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(JQ(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function ka(e,t,n,r,i,o){try{const s=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(s===null)return!1;if(s.tagName==="INPUT"){const c=s.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(c))return!0}let a=-1,l=-1;if(o){if(l=Ss(s,Ca(r,i)),l<0)return!0;a=Ss(s,Ca(t,n),l>=0?l:1/0)}else{if(a=Ss(s,Ca(t,n)),a<0)return!1;l=Ss(s,Ca(r,i),a>=0?a:1/0)}return a>=0?l>=0?a<=l:!0:l>=0?!1:!!o}catch{}return!!o}function ZQ(e,t,n){const r=e.contentWindow;if(!r)return;let i=!1,o;try{o=r.document.readyState}catch{return}if(o!=="complete"){const a=hg(()=>{i||(t(),i=!0)},n);e.addEventListener("load",()=>{i7(a),i=!0,t()});return}const s="about:blank";if(r.location.href!==s||e.src===s||e.src==="")return hg(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function QQ(e,t,n){let r=!1,i;try{i=e.sheet}catch{return}if(i)return;const o=hg(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{i7(o),r=!0,t()})}function eee(e,t){const{doc:n,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskAttributeFn:l,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,inlineStylesheet:p,maskInputOptions:m={},maskTextFn:b,maskInputFn:g,dataURLOptions:_={},inlineImages:y,recordCanvas:T,keepIframeSrcFn:S,newlyAddedElement:O=!1,ignoreCSSAttributes:N}=t,w=tee(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:nn.Document,childNodes:[],compatMode:e.compatMode}:{type:nn.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:nn.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:w};case e.ELEMENT_NODE:return ree(e,{doc:n,blockClass:i,blockSelector:o,unblockSelector:s,inlineStylesheet:p,maskAttributeFn:l,maskInputOptions:m,maskInputFn:g,dataURLOptions:_,inlineImages:y,recordCanvas:T,keepIframeSrcFn:S,newlyAddedElement:O,rootId:w,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,ignoreCSSAttributes:N});case e.TEXT_NODE:return nee(e,{doc:n,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,maskTextFn:b,maskInputOptions:m,maskInputFn:g,rootId:w});case e.CDATA_SECTION_NODE:return{type:nn.CDATA,textContent:"",rootId:w};case e.COMMENT_NODE:return{type:nn.Comment,textContent:e.textContent||"",rootId:w};default:return!1}}function tee(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function nee(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:i,maskTextSelector:o,unmaskTextSelector:s,maskTextFn:a,maskInputOptions:l,maskInputFn:c,rootId:u}=t,d=e.parentNode&&e.parentNode.tagName;let f=e.textContent;const p=d==="STYLE"?!0:void 0,m=d==="SCRIPT"?!0:void 0,b=d==="TEXTAREA"?!0:void 0;if(p&&f){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(f=ep(e.parentNode.sheet))}catch(_){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${_}`,e)}f=rp(f,ip(t.doc))}m&&(f="SCRIPT_PLACEHOLDER");const g=ka(e,r,o,i,s,n);if(!p&&!m&&!b&&f&&g&&(f=a?a(f,e.parentElement):f.replace(/[\S]/g,"*")),b&&f&&(l.textarea||g)&&(f=c?c(f,e.parentNode):f.replace(/[\S]/g,"*")),d==="OPTION"&&f){const _=tp({type:null,tagName:d,maskInputOptions:l});f=Hc({isMasked:ka(e,r,o,i,s,_),element:e,value:f,maskInputFn:c})}return{type:nn.Text,textContent:f||"",isStyle:p,rootId:u}}function ree(e,t){const{doc:n,blockClass:r,blockSelector:i,unblockSelector:o,inlineStylesheet:s,maskInputOptions:a={},maskAttributeFn:l,maskInputFn:c,dataURLOptions:u={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:m=!1,rootId:b,maskTextClass:g,unmaskTextClass:_,maskTextSelector:y,unmaskTextSelector:T,ignoreCSSAttributes:S}=t,O=XQ(e,r,i,o),N=UQ(e);let w={};const D=e.attributes.length;for(let q=0;q<D;q++){const P=e.attributes[q];P.name&&!c7(N,P.name,P.value)&&(w[P.name]=l7(n,N,Ia(P.name),P.value,e,l,S))}if(N==="link"&&s){const q=Array.from(n.styleSheets).find(C=>C.href===e.href);let P=null;q&&(P=ep(q)),P&&(w.rel=null,w.href=null,w.crossorigin=null,w._cssText=rp(P,q.href))}if(N==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const q=ep(e.sheet);q&&(w._cssText=rp(q,ip(n)))}if(N==="input"||N==="textarea"||N==="select"||N==="option"){const q=e,P=_g(q),C=np(q,mg(N),P),F=q.checked;if(P!=="submit"&&P!=="button"&&C){const R=ka(q,g,y,_,T,tp({type:P,tagName:mg(N),maskInputOptions:a}));w.value=Hc({isMasked:R,element:q,value:C,maskInputFn:c})}F&&(w.checked=F)}if(N==="option"&&(e.selected&&!a.select?w.selected=!0:delete w.selected),N==="canvas"&&f){if(e.__context==="2d")LQ(e)||(w.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){const q=e.toDataURL(u.type,u.quality),P=n.createElement("canvas");P.width=e.width,P.height=e.height;const C=P.toDataURL(u.type,u.quality);q!==C&&(w.rr_dataURL=q)}}if(N==="img"&&d){Aa||(Aa=n.createElement("canvas"),s7=Aa.getContext("2d"));const q=e,P=q.currentSrc||q.getAttribute("src")||"<unknown-src>",C=q.crossOrigin,F=()=>{q.removeEventListener("load",F);try{Aa.width=q.naturalWidth,Aa.height=q.naturalHeight,s7.drawImage(q,0,0),w.rr_dataURL=Aa.toDataURL(u.type,u.quality)}catch(R){if(q.crossOrigin!=="anonymous"){q.crossOrigin="anonymous",q.complete&&q.naturalWidth!==0?F():q.addEventListener("load",F);return}else console.warn(`Cannot inline img src=${P}! Error: ${R}`)}q.crossOrigin==="anonymous"&&(C?w.crossOrigin=C:q.removeAttribute("crossorigin"))};q.complete&&q.naturalWidth!==0?F():q.addEventListener("load",F)}if((N==="audio"||N==="video")&&(w.rr_mediaState=e.paused?"paused":"played",w.rr_mediaCurrentTime=e.currentTime),m||(e.scrollLeft&&(w.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(w.rr_scrollTop=e.scrollTop)),O){const{width:q,height:P}=e.getBoundingClientRect();w={class:w.class,rr_width:`${q}px`,rr_height:`${P}px`}}N==="iframe"&&!p(w.src)&&(!O&&!o7(e)&&(w.rr_src=w.src),delete w.src);let Y;try{customElements.get(N)&&(Y=!0)}catch{}return{type:nn.Element,tagName:N,attributes:w,childNodes:[],isSVG:KQ(e)||void 0,needBlock:O,rootId:b,isCustom:Y}}function Lt(e){return e==null?"":e.toLowerCase()}function iee(e,t){if(t.comment&&e.type===nn.Comment)return!0;if(e.type===nn.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&t7(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(Lt(e.attributes.name).match(/^msapplication-tile(image|color)$/)||Lt(e.attributes.name)==="application-name"||Lt(e.attributes.rel)==="icon"||Lt(e.attributes.rel)==="apple-touch-icon"||Lt(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&Lt(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Lt(e.attributes.property).match(/^(og|twitter|fb):/)||Lt(e.attributes.name).match(/^(og|twitter):/)||Lt(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(Lt(e.attributes.name)==="robots"||Lt(e.attributes.name)==="googlebot"||Lt(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(Lt(e.attributes.name)==="author"||Lt(e.attributes.name)==="generator"||Lt(e.attributes.name)==="framework"||Lt(e.attributes.name)==="publisher"||Lt(e.attributes.name)==="progid"||Lt(e.attributes.property).match(/^article:/)||Lt(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(Lt(e.attributes.name)==="google-site-verification"||Lt(e.attributes.name)==="yandex-verification"||Lt(e.attributes.name)==="csrf-token"||Lt(e.attributes.name)==="p:domain_verify"||Lt(e.attributes.name)==="verify-v1"||Lt(e.attributes.name)==="verification"||Lt(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Na(e,t){const{doc:n,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:f=!1,inlineStylesheet:p=!0,maskInputOptions:m={},maskAttributeFn:b,maskTextFn:g,maskInputFn:_,slimDOMOptions:y,dataURLOptions:T={},inlineImages:S=!1,recordCanvas:O=!1,onSerialize:N,onIframeLoad:w,iframeLoadTimeout:D=5e3,onBlockedImageLoad:Y,onStylesheetLoad:q,stylesheetLoadTimeout:P=5e3,keepIframeSrcFn:C=()=>!1,newlyAddedElement:F=!1,ignoreCSSAttributes:R}=t;let{preserveWhiteSpace:G=!0}=t;const z=eee(e,{doc:n,mirror:r,blockClass:i,blockSelector:o,maskAllText:a,unblockSelector:s,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:b,maskTextFn:g,maskInputFn:_,dataURLOptions:T,inlineImages:S,recordCanvas:O,keepIframeSrcFn:C,newlyAddedElement:F,ignoreCSSAttributes:R});if(!z)return console.warn(e,"not serialized"),null;let K;r.hasNode(e)?K=r.getId(e):iee(z,y)||!G&&z.type===nn.Text&&!z.isStyle&&!z.textContent.replace(/^\s+|\s+$/gm,"").length?K=Vc:K=gg();const M=Object.assign(z,{id:K});if(r.add(e,M),K===Vc)return null;N&&N(e);let oe=!f;if(M.type===nn.Element){oe=oe&&!M.needBlock;const te=e.shadowRoot;te&&zc(te)&&(M.isShadowHost=!0)}if((M.type===nn.Document||M.type===nn.Element)&&oe){y.headWhitespace&&M.type===nn.Element&&M.tagName==="head"&&(G=!1);const te={doc:n,mirror:r,blockClass:i,blockSelector:o,maskAllText:a,unblockSelector:s,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:f,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:b,maskTextFn:g,maskInputFn:_,slimDOMOptions:y,dataURLOptions:T,inlineImages:S,recordCanvas:O,preserveWhiteSpace:G,onSerialize:N,onIframeLoad:w,iframeLoadTimeout:D,onBlockedImageLoad:Y,onStylesheetLoad:q,stylesheetLoadTimeout:P,keepIframeSrcFn:C,ignoreCSSAttributes:R},se=e.childNodes?Array.from(e.childNodes):[];for(const _e of se){const ce=Na(_e,te);ce&&M.childNodes.push(ce)}if(xQ(e)&&e.shadowRoot)for(const _e of Array.from(e.shadowRoot.childNodes)){const ce=Na(_e,te);ce&&(zc(e.shadowRoot)&&(ce.isShadow=!0),M.childNodes.push(ce))}}if(e.parentNode&&qc(e.parentNode)&&zc(e.parentNode)&&(M.isShadow=!0),M.type===nn.Element&&M.tagName==="iframe"&&!M.needBlock&&ZQ(e,()=>{const te=o7(e);if(te&&w){const se=Na(te,{doc:te,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:b,maskTextFn:g,maskInputFn:_,slimDOMOptions:y,dataURLOptions:T,inlineImages:S,recordCanvas:O,preserveWhiteSpace:G,onSerialize:N,onIframeLoad:w,iframeLoadTimeout:D,onStylesheetLoad:q,stylesheetLoadTimeout:P,keepIframeSrcFn:C,ignoreCSSAttributes:R});se&&w(e,se)}},D),M.type===nn.Element&&M.tagName==="img"&&!e.complete&&M.needBlock){const te=e,se=()=>{if(te.isConnected&&!te.complete&&Y)try{const _e=te.getBoundingClientRect();_e.width>0&&_e.height>0&&Y(te,M,_e)}catch{}te.removeEventListener("load",se)};te.isConnected&&te.addEventListener("load",se)}return M.type===nn.Element&&M.tagName==="link"&&typeof M.attributes.rel=="string"&&(M.attributes.rel==="stylesheet"||M.attributes.rel==="preload"&&typeof M.attributes.href=="string"&&t7(M.attributes.href)==="css")&&QQ(e,()=>{if(q){const te=Na(e,{doc:n,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:b,maskTextFn:g,maskInputFn:_,slimDOMOptions:y,dataURLOptions:T,inlineImages:S,recordCanvas:O,preserveWhiteSpace:G,onSerialize:N,onIframeLoad:w,iframeLoadTimeout:D,onStylesheetLoad:q,stylesheetLoadTimeout:P,keepIframeSrcFn:C,ignoreCSSAttributes:R});te&&q(e,te)}},P),M.type===nn.Element&&delete M.needBlock,M}function oee(e,t){const{mirror:n=new Q6,blockClass:r="rr-block",blockSelector:i=null,unblockSelector:o=null,maskAllText:s=!1,maskTextClass:a="rr-mask",unmaskTextClass:l=null,maskTextSelector:c=null,unmaskTextSelector:u=null,inlineStylesheet:d=!0,inlineImages:f=!1,recordCanvas:p=!1,maskAllInputs:m=!1,maskAttributeFn:b,maskTextFn:g,maskInputFn:_,slimDOM:y=!1,dataURLOptions:T,preserveWhiteSpace:S,onSerialize:O,onIframeLoad:N,iframeLoadTimeout:w,onBlockedImageLoad:D,onStylesheetLoad:Y,stylesheetLoadTimeout:q,keepIframeSrcFn:P=()=>!1,ignoreCSSAttributes:C=new Set([])}=t||{};return Na(e,{doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,maskAllText:s,maskTextClass:a,unmaskTextClass:l,maskTextSelector:c,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:m===!1?{}:m,maskAttributeFn:b,maskTextFn:g,maskInputFn:_,slimDOMOptions:y===!0||y==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:y==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:y===!1?{}:y,dataURLOptions:T,inlineImages:f,recordCanvas:p,preserveWhiteSpace:S,onSerialize:O,onIframeLoad:N,iframeLoadTimeout:w,onBlockedImageLoad:D,onStylesheetLoad:Y,stylesheetLoadTimeout:q,keepIframeSrcFn:P,newlyAddedElement:!1,ignoreCSSAttributes:C})}function zn(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Ra=`Please stop import mirror directly. Instead of that,\r
|
|
524
524
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
525
|
-
or you can use record.mirror to access the mirror instance during recording.`;let uS={map:{},getId(){return console.error(Ra),-1},getNode(){return console.error(Ra),null},removeNodeFromMap(){console.error(Ra)},has(){return console.error(Ra),!1},reset(){console.error(Ra)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(uS=new Proxy(uS,{get(e,t,n){return t==="map"&&console.error(Ra),Reflect.get(e,t,n)}}));function Wc(e,t,n={}){let r=null,i=0;return function(...o){const s=Date.now();!i&&n.leading===!1&&(i=s);const a=t-(s-i),l=this;a<=0||a>t?(r&&(fee(r),r=null),i=s,e.apply(l,o)):!r&&n.trailing!==!1&&(r=sp(()=>{i=n.leading===!1?0:Date.now(),r=null,e.apply(l,o)},a))}}function dS(e,t,n,r,i=window){const o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(s){sp(()=>{n.set.call(this,s)},0),o&&o.set&&o.set.call(this,s)}}),()=>dS(e,t,o||{},!0)}function yg(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}let op=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(op=()=>new Date().getTime());function fS(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0}}function pS(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function mS(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function _S(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function cr(e,t,n,r,i){if(!e)return!1;const o=_S(e);if(!o)return!1;const s=Ca(t,n);if(!i){const c=r&&o.matches(r);return s(o)&&!c}const a=Ss(o,s);let l=-1;return a<0?!1:(r&&(l=Ss(o,Ca(null,r))),a>-1&&l<0?!0:a<l)}function see(e,t){return t.getId(e)!==-1}function bg(e,t){return t.getId(e)===Vc}function hS(e,t){if(qc(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?hS(e.parentNode,t):!0:!0}function vg(e){return!!e.changedTouches}function aee(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function gS(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function yS(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function $g(e){return!!e?.shadowRoot}class lee{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function bS(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function cee(e){let t=e,n;for(;n=bS(t);)t=n;return t}function uee(e){const t=e.ownerDocument;if(!t)return!1;const n=cee(e);return t.contains(n)}function vS(e){const t=e.ownerDocument;return t?t.contains(e)||uee(e):!1}const $S={};function Sg(e){const t=$S[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);const o=i.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(i)}catch{}return $S[e]=r.bind(window)}function dee(...e){return Sg("requestAnimationFrame")(...e)}function sp(...e){return Sg("setTimeout")(...e)}function fee(...e){return Sg("clearTimeout")(...e)}var Qe=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(Qe||{}),Xe=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(Xe||{}),Hn=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(Hn||{}),Ji=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Ji||{}),Oa=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Oa||{});function Eg(e){try{return e.contentDocument}catch{}}function pee(e){try{return e.contentWindow}catch{}}function SS(e){return"__ln"in e}class mee{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=n?.next||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&SS(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&SS(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){const n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const ES=(e,t)=>`${e}@${t}`;class _ee{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Set,r=new mee,i=l=>{let c=l,u=Vc;for(;u===Vc;)c=c&&c.nextSibling,u=c&&this.mirror.getId(c);return u},o=l=>{if(!l.parentNode||!vS(l))return;const c=qc(l.parentNode)?this.mirror.getId(bS(l)):this.mirror.getId(l.parentNode),u=i(l);if(c===-1||u===-1)return r.addNode(l);const d=Na(l,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:f=>{gS(f,this.mirror)&&!cr(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(f),yS(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),$g(l)&&this.shadowDomManager.addShadowRoot(l.shadowRoot,this.doc)},onIframeLoad:(f,p)=>{cr(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(f,p),f.contentWindow&&this.canvasManager.addWindow(f.contentWindow),this.shadowDomManager.observeAttachShadow(f))},onStylesheetLoad:(f,p)=>{this.stylesheetManager.attachLinkElement(f,p)},onBlockedImageLoad:(f,p,{width:m,height:b})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:p.id,attributes:{style:{width:`${m}px`,height:`${b}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});d&&(t.push({parentId:c,nextId:u,node:d}),n.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const l of this.movedSet)TS(this.removes,l,this.mirror)&&!this.movedSet.has(l.parentNode)||o(l);for(const l of this.addedSet)!wS(this.droppedSet,l)&&!TS(this.removes,l,this.mirror)||wS(this.movedSet,l)?o(l):this.droppedSet.add(l);let s=null;for(;r.length;){let l=null;if(s){const c=this.mirror.getId(s.value.parentNode),u=i(s.value);c!==-1&&u!==-1&&(l=s)}if(!l){let c=r.tail;for(;c;){const u=c;if(c=c.previous,u){const d=this.mirror.getId(u.value.parentNode);if(i(u.value)===-1)continue;if(d!==-1){l=u;break}else{const p=u.value;if(p.parentNode&&p.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const m=p.parentNode.host;if(this.mirror.getId(m)!==-1){l=u;break}}}}}}if(!l){for(;r.head;)r.removeNode(r.head.value);break}s=l.previous,r.removeNode(l.value),o(l.value)}const a={texts:this.texts.map(l=>({id:this.mirror.getId(l.node),value:l.value})).filter(l=>!n.has(l.id)).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>{const{attributes:c}=l;if(typeof c.style=="string"){const u=JSON.stringify(l.styleDiff),d=JSON.stringify(l._unchangedStyles);u.length<c.style.length&&(u+d).split("var(").length===c.style.split("var(").length&&(c.style=l.styleDiff)}return{id:this.mirror.getId(l.node),attributes:c}}).filter(l=>!n.has(l.id)).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(!bg(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!cr(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:ka(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,_S(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,i=t.target.getAttribute(r);if(r==="value"){const s=_g(n),a=n.tagName;i=np(n,a,s);const l=tp({maskInputOptions:this.maskInputOptions,tagName:a,type:s}),c=ka(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,l);i=Hc({isMasked:c,element:n,value:i,maskInputFn:this.maskInputFn})}if(cr(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||i===t.oldValue)return;let o=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!Eg(n))r="rr_src";else return;if(o||(o={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(t.target,o)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!cS(n.tagName,r)&&(o.attributes[r]=lS(this.doc,Ia(n.tagName),Ia(r),i,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const s=this.unattachedDoc.createElement("span");t.oldValue&&s.setAttribute("style",t.oldValue);for(const a of Array.from(n.style)){const l=n.style.getPropertyValue(a),c=n.style.getPropertyPriority(a);l!==s.style.getPropertyValue(a)||c!==s.style.getPropertyPriority(a)?c===""?o.styleDiff[a]=l:o.styleDiff[a]=[l,c]:o._unchangedStyles[a]=[l,c]}for(const a of Array.from(s.style))n.style.getPropertyValue(a)===""&&(o.styleDiff[a]=!1)}break}case"childList":{if(cr(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),i=qc(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);cr(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||bg(n,this.mirror)||!see(n,this.mirror)||(this.addedSet.has(n)?(Tg(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||hS(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[ES(r,i)]?Tg(this.movedSet,n):this.removes.push({parentId:i,id:r,isShadow:qc(t.target)&&zc(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(bg(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[ES(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);cr(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEach(r=>this.genAdds(r)),$g(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager","ignoreCSSAttributes"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Tg(e,t){e.delete(t),t.childNodes?.forEach(n=>Tg(e,n))}function TS(e,t,n){return e.length===0?!1:hee(e,t,n)}function hee(e,t,n){let r=t.parentNode;for(;r;){const i=n.getId(r);if(e.some(o=>o.id===i))return!0;r=r.parentNode}return!1}function wS(e,t){return e.size===0?!1:IS(e,t)}function IS(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:IS(e,n):!1}let Gc;function gee(e){Gc=e}function yee(){Gc=void 0}const ct=e=>Gc?(...n)=>{try{return e(...n)}catch(r){if(Gc&&Gc(r)===!0)return()=>{};throw r}}:e,Pa=[];function Yc(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function AS(e,t){const n=new _ee;Pa.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const i=window?.Zone?.__symbol__?.("MutationObserver");i&&window[i]&&(r=window[i]);const o=new r(ct(s=>{e.onMutation&&e.onMutation(s)===!1||n.processMutations.bind(n)(s)}));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function bee({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const i=typeof t.mousemove=="number"?t.mousemove:50,o=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let s=[],a;const l=Wc(ct(d=>{const f=Date.now()-a;e(s.map(p=>(p.timeOffset-=f,p)),d),s=[],a=null}),o),c=ct(Wc(ct(d=>{const f=Yc(d),{clientX:p,clientY:m}=vg(d)?d.changedTouches[0]:d;a||(a=op()),s.push({x:p,y:m,id:r.getId(f),timeOffset:op()-a}),l(typeof DragEvent<"u"&&d instanceof DragEvent?Xe.Drag:d instanceof MouseEvent?Xe.MouseMove:Xe.TouchMove)}),i,{trailing:!1})),u=[zn("mousemove",c,n),zn("touchmove",c,n),zn("drag",c,n)];return ct(()=>{u.forEach(d=>d())})}function vee({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,sampling:s}){if(s.mouseInteraction===!1)return()=>{};const a=s.mouseInteraction===!0||s.mouseInteraction===void 0?{}:s.mouseInteraction,l=[];let c=null;const u=d=>f=>{const p=Yc(f);if(cr(p,r,i,o,!0))return;let m=null,b=d;if("pointerType"in f){switch(f.pointerType){case"mouse":m=Ji.Mouse;break;case"touch":m=Ji.Touch;break;case"pen":m=Ji.Pen;break}m===Ji.Touch?Hn[d]===Hn.MouseDown?b="TouchStart":Hn[d]===Hn.MouseUp&&(b="TouchEnd"):Ji.Pen}else vg(f)&&(m=Ji.Touch);m!==null?(c=m,(b.startsWith("Touch")&&m===Ji.Touch||b.startsWith("Mouse")&&m===Ji.Mouse)&&(m=null)):Hn[d]===Hn.Click&&(m=c,c=null);const g=vg(f)?f.changedTouches[0]:f;if(!g)return;const _=n.getId(p),{clientX:y,clientY:T}=g;ct(e)({type:Hn[b],id:_,x:y,y:T,...m!==null&&{pointerType:m}})};return Object.keys(Hn).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&a[d]!==!1).forEach(d=>{let f=Ia(d);const p=u(d);if(window.PointerEvent)switch(Hn[d]){case Hn.MouseDown:case Hn.MouseUp:f=f.replace("mouse","pointer");break;case Hn.TouchStart:case Hn.TouchEnd:return}l.push(zn(f,p,t))}),ct(()=>{l.forEach(d=>d())})}function xS({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,sampling:s}){const a=ct(Wc(ct(l=>{const c=Yc(l);if(!c||cr(c,r,i,o,!0))return;const u=n.getId(c);if(c===t&&t.defaultView){const d=fS(t.defaultView);e({id:u,x:d.left,y:d.top})}else e({id:u,x:c.scrollLeft,y:c.scrollTop})}),s.scroll||100));return zn("scroll",a,t)}function $ee({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const i=ct(Wc(ct(()=>{const o=pS(),s=mS();(n!==o||r!==s)&&(e({width:Number(s),height:Number(o)}),n=o,r=s)}),200));return zn("resize",i,t)}const See=["INPUT","TEXTAREA","SELECT"],CS=new WeakMap;function Eee({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,ignoreClass:s,ignoreSelector:a,maskInputOptions:l,maskInputFn:c,sampling:u,userTriggeredOnInput:d,maskTextClass:f,unmaskTextClass:p,maskTextSelector:m,unmaskTextSelector:b}){function g(w){let D=Yc(w);const Y=w.isTrusted,q=D&&mg(D.tagName);if(q==="OPTION"&&(D=D.parentElement),!D||!q||See.indexOf(q)<0||cr(D,r,i,o,!0))return;const P=D;if(P.classList.contains(s)||a&&P.matches(a))return;const C=_g(D);let F=np(P,q,C),R=!1;const G=tp({maskInputOptions:l,tagName:q,type:C}),z=ka(D,f,m,p,b,G);(C==="radio"||C==="checkbox")&&(R=D.checked),F=Hc({isMasked:z,element:D,value:F,maskInputFn:c}),_(D,d?{text:F,isChecked:R,userTriggered:Y}:{text:F,isChecked:R});const K=D.name;C==="radio"&&K&&R&&t.querySelectorAll(`input[type="radio"][name="${K}"]`).forEach(M=>{if(M!==D){const oe=Hc({isMasked:z,element:M,value:np(M,q,C),maskInputFn:c});_(M,d?{text:oe,isChecked:!R,userTriggered:!1}:{text:oe,isChecked:!R})}})}function _(w,D){const Y=CS.get(w);if(!Y||Y.text!==D.text||Y.isChecked!==D.isChecked){CS.set(w,D);const q=n.getId(w);ct(e)({...D,id:q})}}const T=(u.input==="last"?["change"]:["input","change"]).map(w=>zn(w,ct(g),t)),S=t.defaultView;if(!S)return()=>{T.forEach(w=>w())};const O=S.Object.getOwnPropertyDescriptor(S.HTMLInputElement.prototype,"value"),N=[[S.HTMLInputElement.prototype,"value"],[S.HTMLInputElement.prototype,"checked"],[S.HTMLSelectElement.prototype,"value"],[S.HTMLTextAreaElement.prototype,"value"],[S.HTMLSelectElement.prototype,"selectedIndex"],[S.HTMLOptionElement.prototype,"selected"]];return O&&O.set&&T.push(...N.map(w=>dS(w[0],w[1],{set(){ct(g)({target:this,isTrusted:!1})}},!1,S))),ct(()=>{T.forEach(w=>w())})}function ap(e){const t=[];function n(r,i){if(lp("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||lp("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||lp("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||lp("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const s=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(s)}else if(r.parentStyleSheet){const s=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(s)}return i}return n(e,t)}function Co(e,t,n){let r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function Tee({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:ct((u,d,f)=>{const[p,m]=f,{id:b,styleId:g}=Co(d,t,n.styleMirror);return(b&&b!==-1||g&&g!==-1)&&e({id:b,styleId:g,adds:[{rule:p,index:m}]}),u.apply(d,f)})});const o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:ct((u,d,f)=>{const[p]=f,{id:m,styleId:b}=Co(d,t,n.styleMirror);return(m&&m!==-1||b&&b!==-1)&&e({id:m,styleId:b,removes:[{index:p}]}),u.apply(d,f)})});let s;r.CSSStyleSheet.prototype.replace&&(s=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:ct((u,d,f)=>{const[p]=f,{id:m,styleId:b}=Co(d,t,n.styleMirror);return(m&&m!==-1||b&&b!==-1)&&e({id:m,styleId:b,replace:p}),u.apply(d,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:ct((u,d,f)=>{const[p]=f,{id:m,styleId:b}=Co(d,t,n.styleMirror);return(m&&m!==-1||b&&b!==-1)&&e({id:m,styleId:b,replaceSync:p}),u.apply(d,f)})}));const l={};cp("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(cp("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),cp("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),cp("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));const c={};return Object.entries(l).forEach(([u,d])=>{c[u]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(c[u].insertRule,{apply:ct((f,p,m)=>{const[b,g]=m,{id:_,styleId:y}=Co(p.parentStyleSheet,t,n.styleMirror);return(_&&_!==-1||y&&y!==-1)&&e({id:_,styleId:y,adds:[{rule:b,index:[...ap(p),g||0]}]}),f.apply(p,m)})}),d.prototype.deleteRule=new Proxy(c[u].deleteRule,{apply:ct((f,p,m)=>{const[b]=m,{id:g,styleId:_}=Co(p.parentStyleSheet,t,n.styleMirror);return(g&&g!==-1||_&&_!==-1)&&e({id:g,styleId:_,removes:[{index:[...ap(p),b]}]}),f.apply(p,m)})})}),ct(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=o,s&&(r.CSSStyleSheet.prototype.replace=s),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([u,d])=>{d.prototype.insertRule=c[u].insertRule,d.prototype.deleteRule=c[u].deleteRule})})}function kS({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const i=n.nodeName==="#document"?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,o=i?.prototype?Object.getOwnPropertyDescriptor(i?.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!i||!o?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){return o.get?.call(this)},set(s){const a=o.set?.call(this,s);if(r!==null&&r!==-1)try{t.adoptStyleSheets(s,r)}catch{}return a}}),ct(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))}function wee({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){const o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:ct((a,l,c)=>{const[u,d,f]=c;if(n.has(u))return o.apply(l,[u,d,f]);const{id:p,styleId:m}=Co(l.parentRule?.parentStyleSheet,t,r.styleMirror);return(p&&p!==-1||m&&m!==-1)&&e({id:p,styleId:m,set:{property:u,value:d,priority:f},index:ap(l.parentRule)}),a.apply(l,c)})});const s=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:ct((a,l,c)=>{const[u]=c;if(n.has(u))return s.apply(l,[u]);const{id:d,styleId:f}=Co(l.parentRule?.parentStyleSheet,t,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,remove:{property:u},index:ap(l.parentRule)}),a.apply(l,c)})}),ct(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=s})}function Iee({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:i,sampling:o,doc:s}){const a=ct(c=>Wc(ct(u=>{const d=Yc(u);if(!d||cr(d,t,n,r,!0))return;const{currentTime:f,volume:p,muted:m,playbackRate:b}=d;e({type:c,id:i.getId(d),currentTime:f,volume:p,muted:m,playbackRate:b})}),o.media||500)),l=[zn("play",a(Oa.Play),s),zn("pause",a(Oa.Pause),s),zn("seeked",a(Oa.Seeked),s),zn("volumechange",a(Oa.VolumeChange),s),zn("ratechange",a(Oa.RateChange),s)];return ct(()=>{l.forEach(c=>c())})}function Aee({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],i=new WeakMap,o=n.FontFace;n.FontFace=function(l,c,u){const d=new o(l,c,u);return i.set(d,{family:l,buffer:typeof c!="string",descriptors:u,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),d};const s=yg(t.fonts,"add",function(a){return function(l){return sp(ct(()=>{const c=i.get(l);c&&(e(c),i.delete(l))}),0),a.apply(this,[l])}});return r.push(()=>{n.FontFace=o}),r.push(s),ct(()=>{r.forEach(a=>a())})}function xee(e){const{doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,selectionCb:s}=e;let a=!0;const l=ct(()=>{const c=t.getSelection();if(!c||a&&c?.isCollapsed)return;a=c.isCollapsed||!1;const u=[],d=c.rangeCount||0;for(let f=0;f<d;f++){const p=c.getRangeAt(f),{startContainer:m,startOffset:b,endContainer:g,endOffset:_}=p;cr(m,r,i,o,!0)||cr(g,r,i,o,!0)||u.push({start:n.getId(m),startOffset:b,end:n.getId(g),endOffset:_})}s({ranges:u})});return l(),zn("selectionchange",l)}function Cee({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:yg(n.customElements,"define",function(i){return function(o,s,a){try{t({define:{name:o}})}catch{}return i.apply(this,[o,s,a])}})}function kee(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=AS(e,e.doc));const i=bee(e),o=vee(e),s=xS(e),a=$ee(e,{win:n}),l=Eee(e),c=Iee(e);let u=()=>{},d=()=>{},f=()=>{},p=()=>{};e.recordDOM&&(u=Tee(e,{win:n}),d=kS(e,e.doc),f=wee(e,{win:n}),e.collectFonts&&(p=Aee(e)));const m=xee(e),b=Cee(e),g=[];for(const _ of e.plugins)g.push(_.observer(_.callback,n,_.options));return ct(()=>{Pa.forEach(_=>_.reset()),r?.disconnect(),i(),o(),s(),a(),l(),c(),u(),d(),f(),p(),m(),b(),g.forEach(_=>_())})}function lp(e){return typeof window[e]<"u"}function cp(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class wg{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,i){const o=r||this.getIdToRemoteIdMap(t),s=i||this.getRemoteIdToIdMap(t);let a=o.get(n);return a||(a=this.generateIdFn(),o.set(n,a),s.set(a,n)),a}getIds(t,n){const r=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return n.map(o=>this.getId(t,o,r,i))}getRemoteId(t,n,r){const i=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const o=i.get(n);return o||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(i=>this.getRemoteId(t,i,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}class Nee{constructor(){this.crossOriginIframeMirror=new wg(gg),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class Ree{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new wg(gg),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new wg(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&t.contentWindow?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(t);const r=Eg(t);r&&r.adoptedStyleSheets&&r.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(r.adoptedStyleSheets,this.mirror.getId(r))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const i=this.crossOriginIframeMap.get(t.source);if(!i)return;const o=this.transformCrossOriginEvent(i,n.data.event);o&&this.wrappedEmit(o,n.data.isCheckout)}transformCrossOriginEvent(t,n){switch(n.type){case Qe.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:Qe.IncrementalSnapshot,data:{source:Xe.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Qe.Meta:case Qe.Load:case Qe.DomContentLoaded:return!1;case Qe.Plugin:return n;case Qe.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case Qe.IncrementalSnapshot:switch(n.data.source){case Xe.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);const i=this.crossOriginIframeRootIdMap.get(t);i&&this.patchRootIdOnNode(r.node,i)}),n.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case Xe.Drag:case Xe.TouchMove:case Xe.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case Xe.ViewportResize:return!1;case Xe.MediaInteraction:case Xe.MouseInteraction:case Xe.Scroll:case Xe.CanvasMutation:case Xe.Input:return this.replaceIds(n.data,t,["id"]),n;case Xe.StyleSheetRule:case Xe.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case Xe.Font:return n;case Xe.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case Xe.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),n.data.styles?.forEach(r=>{this.replaceStyleIds(r,t,["styleId"])}),n}}return!1}replace(t,n,r,i){for(const o of i)!Array.isArray(n[o])&&typeof n[o]!="number"||(Array.isArray(n[o])?n[o]=t.getIds(r,n[o]):n[o]=t.getId(r,n[o]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==nn.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class Oee{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class Pee{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!zc(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=AS({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(xS({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),sp(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(kS({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const n=Eg(t),r=pee(t);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(yg(t.prototype,"attachShadow",function(i){return function(o){const s=i.call(this,o);return this.shadowRoot&&vS(this)&&r.addShadowRoot(this.shadowRoot,n),s}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}for(var NS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Mee=typeof Uint8Array>"u"?[]:new Uint8Array(256),up=0;up<NS.length;up++)Mee[NS.charCodeAt(up)]=up;class RS{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class Lee{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new lee,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const r={id:n,styleIds:[]},i=[];for(const o of t){let s;this.styleMirror.has(o)?s=this.styleMirror.getId(o):(s=this.styleMirror.add(o),i.push({styleId:s,rules:Array.from(o.rules||CSSRule,(a,l)=>({rule:Z6(a),index:l}))})),r.styleIds.push(s)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class Dee{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(i=>i!==n)}add(t,n){this.active||(this.active=!0,dee(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let Gt,dp;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const jr=MQ();function qr(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:o=null,unblockSelector:s=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,maskAllText:c=!1,maskTextClass:u="rr-mask",unmaskTextClass:d=null,maskTextSelector:f=null,unmaskTextSelector:p=null,inlineStylesheet:m=!0,maskAllInputs:b,maskInputOptions:g,slimDOMOptions:_,maskAttributeFn:y,maskInputFn:T,maskTextFn:S,maxCanvasSize:O=null,packFn:N,sampling:w={},dataURLOptions:D={},mousemoveWait:Y,recordDOM:q=!0,recordCanvas:P=!1,recordCrossOriginIframes:C=!1,recordAfter:F=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:R=!1,collectFonts:G=!1,inlineImages:z=!1,plugins:K,keepIframeSrcFn:M=()=>!1,ignoreCSSAttributes:oe=new Set([]),errorHandler:te,onMutation:se,getCanvasManager:_e}=e;gee(te);const ce=C?window.parent===window:!0;let ye=!1;if(!ce)try{window.parent.document&&(ye=!1)}catch{ye=!0}if(ce&&!t)throw new Error("emit function is required");if(!ce&&!ye)return()=>{};Y!==void 0&&w.mousemove===void 0&&(w.mousemove=Y),jr.reset();const Te=b===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:g!==void 0?g:{},le=_===!0||_==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:_==="all",headMetaDescKeywords:_==="all"}:_||{};aee();let ge,Ce=0;const Me=E=>{for(const x of K||[])x.eventProcessor&&(E=x.eventProcessor(E));return N&&!ye&&(E=N(E)),E};Gt=(E,x)=>{const Q=E;if(Q.timestamp=op(),Pa[0]?.isFrozen()&&Q.type!==Qe.FullSnapshot&&!(Q.type===Qe.IncrementalSnapshot&&Q.data.source===Xe.Mutation)&&Pa.forEach(Z=>Z.unfreeze()),ce)t?.(Me(Q),x);else if(ye){const Z={type:"rrweb",event:Me(Q),origin:window.location.origin,isCheckout:x};window.parent.postMessage(Z,"*")}if(Q.type===Qe.FullSnapshot)ge=Q,Ce=0;else if(Q.type===Qe.IncrementalSnapshot){if(Q.data.source===Xe.Mutation&&Q.data.isAttachIframe)return;Ce++;const Z=r&&Ce>=r,ne=n&&ge&&Q.timestamp-ge.timestamp>n;(Z||ne)&&v(!0)}};const Ue=E=>{Gt({type:Qe.IncrementalSnapshot,data:{source:Xe.Mutation,...E}})},nt=E=>Gt({type:Qe.IncrementalSnapshot,data:{source:Xe.Scroll,...E}}),A=E=>Gt({type:Qe.IncrementalSnapshot,data:{source:Xe.CanvasMutation,...E}}),k=E=>Gt({type:Qe.IncrementalSnapshot,data:{source:Xe.AdoptedStyleSheet,...E}}),X=new Lee({mutationCb:Ue,adoptedStyleSheetCb:k}),ae=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new Nee:new Ree({mirror:jr,mutationCb:Ue,stylesheetManager:X,recordCrossOriginIframes:C,wrappedEmit:Gt});for(const E of K||[])E.getMirror&&E.getMirror({nodeMirror:jr,crossOriginIframeMirror:ae.crossOriginIframeMirror,crossOriginIframeStyleMirror:ae.crossOriginIframeStyleMirror});const ee=new Dee,re=Uee(_e,{mirror:jr,win:window,mutationCb:E=>Gt({type:Qe.IncrementalSnapshot,data:{source:Xe.CanvasMutation,...E}}),recordCanvas:P,blockClass:i,blockSelector:o,unblockSelector:s,maxCanvasSize:O,sampling:w.canvas,dataURLOptions:D,errorHandler:te}),$=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Oee:new Pee({mutationCb:Ue,scrollCb:nt,bypassOptions:{onMutation:se,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:m,maskInputOptions:Te,dataURLOptions:D,maskAttributeFn:y,maskTextFn:S,maskInputFn:T,recordCanvas:P,inlineImages:z,sampling:w,slimDOMOptions:le,iframeManager:ae,stylesheetManager:X,canvasManager:re,keepIframeSrcFn:M,processedNodeManager:ee,ignoreCSSAttributes:oe},mirror:jr}),v=(E=!1)=>{if(!q)return;Gt({type:Qe.Meta,data:{href:window.location.href,width:mS(),height:pS()}},E),X.reset(),$.init(),Pa.forEach(Q=>Q.lock());const x=oee(document,{mirror:jr,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:m,maskAllInputs:Te,maskAttributeFn:y,maskInputFn:T,maskTextFn:S,slimDOM:le,dataURLOptions:D,recordCanvas:P,inlineImages:z,onSerialize:Q=>{gS(Q,jr)&&ae.addIframe(Q),yS(Q,jr)&&X.trackLinkElement(Q),$g(Q)&&$.addShadowRoot(Q.shadowRoot,document)},onIframeLoad:(Q,Z)=>{ae.attachIframe(Q,Z),Q.contentWindow&&re.addWindow(Q.contentWindow),$.observeAttachShadow(Q)},onStylesheetLoad:(Q,Z)=>{X.attachLinkElement(Q,Z)},onBlockedImageLoad:(Q,Z,{width:ne,height:xe})=>{Ue({adds:[],removes:[],texts:[],attributes:[{id:Z.id,attributes:{style:{width:`${ne}px`,height:`${xe}px`}}}]})},keepIframeSrcFn:M,ignoreCSSAttributes:oe});if(!x)return console.warn("Failed to snapshot the document");Gt({type:Qe.FullSnapshot,data:{node:x,initialOffset:fS(window)}}),Pa.forEach(Q=>Q.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&X.adoptStyleSheets(document.adoptedStyleSheets,jr.getId(document))};dp=v;try{const E=[],x=Z=>ct(kee)({onMutation:se,mutationCb:Ue,mousemoveCb:(ne,xe)=>Gt({type:Qe.IncrementalSnapshot,data:{source:xe,positions:ne}}),mouseInteractionCb:ne=>Gt({type:Qe.IncrementalSnapshot,data:{source:Xe.MouseInteraction,...ne}}),scrollCb:nt,viewportResizeCb:ne=>Gt({type:Qe.IncrementalSnapshot,data:{source:Xe.ViewportResize,...ne}}),inputCb:ne=>Gt({type:Qe.IncrementalSnapshot,data:{source:Xe.Input,...ne}}),mediaInteractionCb:ne=>Gt({type:Qe.IncrementalSnapshot,data:{source:Xe.MediaInteraction,...ne}}),styleSheetRuleCb:ne=>Gt({type:Qe.IncrementalSnapshot,data:{source:Xe.StyleSheetRule,...ne}}),styleDeclarationCb:ne=>Gt({type:Qe.IncrementalSnapshot,data:{source:Xe.StyleDeclaration,...ne}}),canvasMutationCb:A,fontCb:ne=>Gt({type:Qe.IncrementalSnapshot,data:{source:Xe.Font,...ne}}),selectionCb:ne=>{Gt({type:Qe.IncrementalSnapshot,data:{source:Xe.Selection,...ne}})},customElementCb:ne=>{Gt({type:Qe.IncrementalSnapshot,data:{source:Xe.CustomElement,...ne}})},blockClass:i,ignoreClass:a,ignoreSelector:l,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,maskInputOptions:Te,inlineStylesheet:m,sampling:w,recordDOM:q,recordCanvas:P,inlineImages:z,userTriggeredOnInput:R,collectFonts:G,doc:Z,maskAttributeFn:y,maskInputFn:T,maskTextFn:S,keepIframeSrcFn:M,blockSelector:o,unblockSelector:s,slimDOMOptions:le,dataURLOptions:D,mirror:jr,iframeManager:ae,stylesheetManager:X,shadowDomManager:$,processedNodeManager:ee,canvasManager:re,ignoreCSSAttributes:oe,plugins:K?.filter(ne=>ne.observer)?.map(ne=>({observer:ne.observer,options:ne.options,callback:xe=>Gt({type:Qe.Plugin,data:{plugin:ne.name,payload:xe}})}))||[]},{});ae.addLoadListener(Z=>{try{E.push(x(Z.contentDocument))}catch(ne){console.warn(ne)}});const Q=()=>{v(),E.push(x(document))};return document.readyState==="interactive"||document.readyState==="complete"?Q():(E.push(zn("DOMContentLoaded",()=>{Gt({type:Qe.DomContentLoaded,data:{}}),F==="DOMContentLoaded"&&Q()})),E.push(zn("load",()=>{Gt({type:Qe.Load,data:{}}),F==="load"&&Q()},window))),()=>{E.forEach(Z=>Z()),ee.destroy(),dp=void 0,yee()}}catch(E){console.warn(E)}}function Fee(e){if(!dp)throw new Error("please take full snapshot after start recording");dp(e)}qr.mirror=jr,qr.takeFullSnapshot=Fee;function Uee(e,t){try{return e?e(t):new RS}catch{return console.warn("Unable to initialize CanvasManager"),new RS}}var OS;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(OS||(OS={}));const Bee=3,jee=5;function Ig(e){return e>9999999999?e:e*1e3}function Ag(e){return e>9999999999?e/1e3:e}function Kc(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:Qe.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:En(t,10,1e3)}}),t.category==="console")))}const qee="button,a";function PS(e){return e.closest(qee)||e}function MS(e){const t=LS(e);return!t||!(t instanceof Element)?t:PS(t)}function LS(e){return zee(e)?e.target:e}function zee(e){return typeof e=="object"&&!!e&&"target"in e}let ko;function Hee(e){return ko||(ko=[],Vee()),ko.push(e),()=>{const t=ko?ko.indexOf(e):-1;t>-1&&ko.splice(t,1)}}function Vee(){$n(Mt,"open",function(e){return function(...t){if(ko)try{ko.forEach(n=>n())}catch{}return e.apply(Mt,t)}})}const Wee=new Set([Xe.Mutation,Xe.StyleSheetRule,Xe.StyleDeclaration,Xe.AdoptedStyleSheet,Xe.CanvasMutation,Xe.Selection,Xe.MediaInteraction]);function Gee(e,t,n){e.handleClick(t,n)}class Yee{constructor(t,n,r=Kc){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scrollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const t=Hee(()=>{this._lastMutation=DS()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(Xee(n,this._ignoreSelector)||!Jee(t))return;const r={timestamp:Ag(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(i=>i.node===r.node&&Math.abs(i.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=Ag(t)}registerScroll(t=Date.now()){this._lastScroll=Ag(t)}registerClick(t){const n=PS(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){const t=[],n=DS();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(const r of t){const i=this._clicks.indexOf(r);i>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(i,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,i=t.mutationAfter&&t.mutationAfter<=this._threshold,o=!r&&!i,{clickCount:s,clickBreadcrumb:a}=t;if(o){const l=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,c=l<this._timeout*1e3?"mutation":"timeout",u={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:Mt.location.href,route:n.getCurrentRoute(),timeAfterClickMs:l,endReason:c,clickCount:s||1}};this._addBreadcrumbEvent(n,u);return}if(s>1){const l={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:Mt.location.href,route:n.getCurrentRoute(),clickCount:s,metric:!0}};this._addBreadcrumbEvent(n,l)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=jc(()=>this._checkClicks(),1e3)}}const Kee=["A","BUTTON","INPUT"];function Xee(e,t){return!!(!Kee.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function Jee(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function DS(){return Date.now()/1e3}function Zee(e,t){try{if(!Qee(t))return;const{source:n}=t.data;if(Wee.has(n)&&e.registerMutation(t.timestamp),n===Xe.Scroll&&e.registerScroll(t.timestamp),ete(t)){const{type:r,id:i}=t.data,o=qr.mirror.getNode(i);o instanceof HTMLElement&&r===Hn.Click&&e.registerClick(o)}}catch{}}function Qee(e){return e.type===Bee}function ete(e){return e.data.source===Xe.MouseInteraction}function di(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var fp=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(fp||{});const tte=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function nte(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if(tte.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const rte=e=>t=>{if(!e.isEnabled())return;const n=ite(t);if(!n)return;const r=t.name==="click",i=r?t.event:void 0;r&&e.clickDetector&&i?.target&&!i.altKey&&!i.metaKey&&!i.ctrlKey&&!i.shiftKey&&Gee(e.clickDetector,n,MS(t.event)),Kc(e,n)};function FS(e,t){const n=qr.mirror.getId(e),r=n&&qr.mirror.getNode(n),i=r&&qr.mirror.getMeta(r),o=i&&ste(i)?i:null;return{message:t,data:o?{nodeId:n,node:{id:n,tagName:o.tagName,textContent:Array.from(o.childNodes).map(s=>s.type===fp.Text&&s.textContent).filter(Boolean).map(s=>s.trim()).join(""),attributes:nte(o.attributes)}}:{}}}function ite(e){const{target:t,message:n}=ote(e);return di({category:`ui.${e.name}`,...FS(t,n)})}function ote(e){const t=e.name==="click";let n,r=null;try{r=t?MS(e.event):LS(e.event),n=an(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function ste(e){return e.type===fp.Element}function ate(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=lte(t);n&&Kc(e,n)}function lte(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:o,target:s}=e;if(!s||cte(s)||!o)return null;const a=t||r||i,l=o.length===1;if(!a&&l)return null;const c=an(s,{maxStringLength:200})||"<unknown>",u=FS(s,c);return di({category:"ui.keyDown",message:c,data:{...u.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:o}})}function cte(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const ute={resource:_te,paint:pte,navigation:mte};function xg(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function dte(e){return e.map(fte).filter(Boolean)}function fte(e){const t=ute[e.entryType];return t?t(e):null}function Ma(e){return((tn()||Mt.performance.timeOrigin)+e)/1e3}function pte(e){const{duration:t,entryType:n,name:r,startTime:i}=e,o=Ma(i);return{type:n,name:r,start:o,end:o+t,data:void 0}}function mte(e){const{entryType:t,name:n,decodedBodySize:r,duration:i,domComplete:o,encodedBodySize:s,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,domInteractive:c,loadEventStart:u,loadEventEnd:d,redirectCount:f,startTime:p,transferSize:m,type:b}=e;return i===0?null:{type:`${t}.${b}`,start:Ma(p),end:Ma(o),name:n,data:{size:m,decodedBodySize:r,encodedBodySize:s,duration:i,domInteractive:c,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,loadEventStart:u,loadEventEnd:d,domComplete:o,redirectCount:f}}}function _te(e){const{entryType:t,initiatorType:n,name:r,responseEnd:i,startTime:o,decodedBodySize:s,encodedBodySize:a,responseStatus:l,transferSize:c}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:Ma(o),end:Ma(i),name:r,data:{size:c,statusCode:l,decodedBodySize:s,encodedBodySize:a}}}function hte(e){const t=e.entries[e.entries.length-1],n=t?.element?[t.element]:void 0;return Cg(e,"largest-contentful-paint",n)}function gte(e){return e.sources!==void 0}function yte(e){const t=[],n=[];for(const r of e.entries)if(gte(r)){const i=[];for(const o of r.sources)if(o.node){n.push(o.node);const s=qr.mirror.getId(o.node);s&&i.push(s)}t.push({value:r.value,nodeIds:i.length?i:void 0})}return Cg(e,"cumulative-layout-shift",n,t)}function bte(e){const t=e.entries[e.entries.length-1],n=t?.target?[t.target]:void 0;return Cg(e,"interaction-to-next-paint",n)}function Cg(e,t,n,r){const i=e.value,o=e.rating,s=Ma(i);return{type:"web-vital",name:t,start:s,end:s,data:{value:i,size:i,rating:o,nodeIds:n?n.map(a=>qr.mirror.getId(a)):void 0,attributions:r}}}function vte(e){function t(i){e.performanceEntries.includes(i)||e.performanceEntries.push(i)}function n({entries:i}){i.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(i=>{r.push($s(i,n))}),r.push(Uf(xg(hte,e)),Ff(xg(yte,e)),Zh(xg(bte,e))),()=>{r.forEach(i=>i())}}const Ve=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,$te='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new n(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort(function(t,n){return t.f-n.f}),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort(function(t,n){return p[n.s]-p[t.s]||t.f-n.f});s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[s[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(s[t]^s[t+1]<<A^s[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function Ste(){const e=new Blob([$te]);return URL.createObjectURL(e)}const US=["log","warn","error"],pp="[Replay] ";function kg(e,t="info"){Dr({category:"console",data:{logger:"replay"},level:t,message:`${pp}${e}`},{level:t})}function Ete(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return Ve?(US.forEach(r=>{n[r]=(...i)=>{B[r](pp,...i),t&&kg(i.join(""),Qd(r))}}),n.exception=(r,...i)=>{i.length&&n.error&&n.error(...i),B.error(pp,r),e?It(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&kg(r,"error")},n.infoTick=(...r)=>{B.log(pp,...r),t&&setTimeout(()=>kg(r[0]),0)}):US.forEach(r=>{n[r]=()=>{}}),n}const We=Ete();class Ng extends Error{constructor(){super(`Event buffer exceeded maximum size of ${pg}.`)}}class BS{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>pg)throw new Ng;this.events.push(t)}finish(){return new Promise(t=>{const n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let t=null;for(const{timestamp:n}of this.events)(t===null||n<t)&&(t=n);return t===null?t:Ig(t)}}class Rg{constructor(t){Rg.prototype.__init.call(this),this._worker=t,this._id=0,this._pending=new Map,this._worker.addEventListener("message",this._onMessage)}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():(Ve&&We.warn("Received worker message with unsuccessful status",r),n(new Error("Received worker message with unsuccessful status")))},{once:!0}),this._worker.addEventListener("error",r=>{Ve&&We.warn("Failed to load Replay compression worker",r),n(new Error(`Failed to load Replay compression worker: ${r instanceof ErrorEvent&&r.message?r.message:"Unknown error. This can happen due to CSP policy restrictions, network issues, or the worker script failing to load."}`))},{once:!0})}),this._ensureReadyPromise)}destroy(){Ve&&We.log("Destroying compression worker"),this._worker.removeEventListener("message",this._onMessage),this._pending.forEach(t=>t.reject(new Error("Worker destroyed"))),this._pending.clear(),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((i,o)=>{this._pending.set(r,{method:t,resolve:i,reject:o});try{this._worker.postMessage({id:r,method:t,arg:n})}catch(s){this._pending.delete(r),o(s)}})}__init(){this._onMessage=({data:t})=>{const n=t;if(typeof n.id!="number")return;const r=this._pending.get(n.id);if(!(!r||r.method!==n.method)){if(this._pending.delete(n.id),!n.success){Ve&&We.error("Error in compression worker: ",n.response),r.reject(new Error("Error in compression worker"));return}r.resolve(n.response)}}}_getAndIncrementId(){return this._id++}}class Tte{constructor(t){this._worker=new Rg(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const n=Ig(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>pg?Promise.reject(new Ng):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{Ve&&We.exception(t,'Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class wte{constructor(t){this._fallback=new BS,this._compression=new Tte(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}set waitForCheckout(t){this._used.waitForCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){Ve&&We.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n,waitForCheckout:r}=this._fallback,i=[];for(const o of t)i.push(this._compression.addEvent(o));this._compression.hasCheckout=n,this._compression.waitForCheckout=r,this._used=this._compression;try{await Promise.all(i),this._fallback.clear()}catch(o){Ve&&We.exception(o,"Failed to add events when switching buffers.")}}}function Ite({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=Ate(t);if(n)return n}return Ve&&We.log("Using simple buffer"),new BS}function Ate(e){try{const t=e||xte();if(!t)return;Ve&&We.log(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new wte(n)}catch(t){Ve&&We.exception(t,"Failed to create compression worker")}}function xte(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?Ste():""}function Og(){try{return"sessionStorage"in Mt&&!!Mt.sessionStorage}catch{return!1}}function Cte(e){kte(),e.session=void 0}function kte(){if(Og())try{Mt.sessionStorage.removeItem(dg)}catch{}}function jS(e){return e===void 0?!1:Math.random()<e}function mp(e){if(Og())try{Mt.sessionStorage.setItem(dg,JSON.stringify(e))}catch{}}function qS(e){const t=Date.now(),n=e.id||ln(),r=e.started||t,i=e.lastActivity||t,o=e.segmentId||0,s=e.sampled,a=e.previousSessionId,l=e.dirty||!1;return{id:n,started:r,lastActivity:i,segmentId:o,sampled:s,previousSessionId:a,dirty:l}}function Nte(e,t){return jS(e)?"session":t?"buffer":!1}function zS({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const i=Nte(e,t),o=qS({sampled:i,previousSessionId:r});return n&&mp(o),o}function Rte(){if(!Og())return null;try{const e=Mt.sessionStorage.getItem(dg);if(!e)return null;const t=JSON.parse(e);return Ve&&We.infoTick("Loading existing session"),qS(t)}catch{return null}}function Pg(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function HS(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return Pg(e.started,t,r)||Pg(e.lastActivity,n,r)}function VS(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!HS(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function Mg({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const i=r.stickySession&&Rte();return i?VS(i,{sessionIdleExpire:e,maxReplayDuration:t})?(Ve&&We.infoTick("Session in sessionStorage is expired, creating new one..."),zS(r,{previousSessionId:i.id})):i:(Ve&&We.infoTick("Creating new session"),zS(r,{previousSessionId:n}))}function Ote(e){return e.type===Qe.Custom}function Lg(e,t,n){return GS(e,t)?(WS(e,t,n),!0):!1}function Pte(e,t,n){return GS(e,t)?WS(e,t,n):Promise.resolve(null)}async function WS(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const i=e.recordingMode==="buffer";try{n&&i&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const o=e.getOptions(),s=Mte(t,o.beforeAddRecordingEvent);return s?await r.addEvent(s):void 0}catch(o){const s=o&&o instanceof Ng,a=s?"eventBufferOverflow":"eventBufferError",l=Ie();if(l){const c=s?"buffer_overflow":"internal_sdk_error";l.recordDroppedEvent(c,"replay")}if(s&&i)return r.clear(),r.waitForCheckout=!0,null;e.handleException(o),await e.stop({reason:a})}}function GS(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=Ig(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(Ve&&We.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function Mte(e,t){try{if(typeof t=="function"&&Ote(e))return t(e)}catch(n){return Ve&&We.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function Dg(e){return!e.type}function Fg(e){return e.type==="transaction"}function Lte(e){return e.type==="replay_event"}function YS(e){return e.type==="feedback"}function Dte(e){return(t,n)=>{if(!e.isEnabled()||!Dg(t)&&!Fg(t))return;const r=n.statusCode;if(!(!r||r<200||r>=300)){if(Fg(t)){Fte(e,t);return}Ute(e,t)}}}function Fte(e,t){const n=e.getContext();t.contexts?.trace?.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function Ute(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags?.replayId)return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||jc(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(i){e.handleException(i)}})}function Bte(e){return t=>{!e.isEnabled()||!Dg(t)||jte(e,t)}}function jte(e,t){const n=t.exception?.values?.[0]?.value;if(typeof n=="string"&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const r=di({category:"replay.hydrate-error",data:{url:ns()}});Kc(e,r)}}function qte(e){const t=Ie();t&&t.on("beforeAddBreadcrumb",n=>zte(e,n))}function zte(e,t){if(!e.isEnabled()||!KS(t))return;const n=Hte(t);n&&Kc(e,n)}function Hte(e){return!KS(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?Vte(e):di(e)}function Vte(e){const t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return di(e);let n=!1;const r=t.map(i=>{if(!i)return i;if(typeof i=="string")return i.length>Qf?(n=!0,`${i.slice(0,Qf)}…`):i;if(typeof i=="object")try{const o=En(i,7);return JSON.stringify(o).length>Qf?(n=!0,`${JSON.stringify(o,null,2).slice(0,Qf)}…`):o}catch{}return i});return di({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function KS(e){return!!e.category}function Wte(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function XS(){const e=Ke().getPropagationContext().dsc;e&&delete e.replay_id;const t=Ht();if(t){const n=br(t);delete n.replay_id}}function Gte(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:Qe.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function Yte(e,t){return e.recordingMode!=="buffer"||t.message===fg||!t.exception||t.type?!1:jS(e.getOptions().errorSampleRate)}function Kte(e){return Object.assign((t,n)=>{if(!e.isEnabled()||e.isPaused())return t;if(Lte(t))return delete t.breadcrumbs,t;if(!Dg(t)&&!Fg(t)&&!YS(t))return t;if(!e.checkAndHandleExpiredSession())return XS(),t;if(YS(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),Gte(e,t),t;if(Wte(t,n)&&!e.getOptions()._experiments.captureExceptions)return Ve&&We.log("Ignoring error from rrweb internals",t),null;const i=Yte(e,t);if((i||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),i&&e.recordingMode==="buffer"&&e.session?.sampled==="buffer"){const s=e.session;s.dirty=!0,e.getOptions().stickySession&&mp(s)}return t},{id:"Replay"})}function _p(e,t){return t.map(({type:n,start:r,end:i,name:o,data:s})=>{const a=e.throttledAddEvent({type:Qe.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:o,startTimestamp:r,endTimestamp:i,data:s}}});return typeof a=="string"?Promise.resolve(null):a})}function Xte(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function Jte(e){return t=>{if(!e.isEnabled())return;const n=Xte(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(_p(e,[n]),!1)))}}function Zte(e,t){return Ve&&e.getOptions()._experiments.traceInternals?!1:J4(t,Ie())}function JS(e,t){e.isEnabled()&&t!==null&&(Zte(e,t.name)||e.addUpdate(()=>(_p(e,[t]),!0)))}function hp(e){if(!e)return;const t=new TextEncoder;try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=v6(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function ZS(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function gp(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function QS(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:i,method:o,statusCode:s,request:a,response:l}=t;return{type:e,start:n/1e3,end:r/1e3,name:i,data:{method:o,statusCode:s,request:a,response:l}}}function Xc(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function No(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:i,warnings:o}=Qte(n);return r.body=i,o?.length&&(r._meta={warnings:o}),r}function Ug(e,t){return Object.entries(e).reduce((n,[r,i])=>{const o=r.toLowerCase();return t.includes(o)&&e[r]&&(n[o]=i),n},{})}function Qte(e){if(!e||typeof e!="string")return{body:e};const t=e.length>K6,n=ene(e);if(t){const r=e.slice(0,K6);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function ene(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function yp(e,t){const n=tne(e);return Mr(n,t)}function tne(e,t=Mt.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(Mt.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function nne(e,t,n){try{const r=await ine(e,t,n),i=QS("resource.fetch",r);JS(n.replay,i)}catch(r){Ve&&We.exception(r,"Failed to capture fetch breadcrumb")}}function rne(e,t){const{input:n,response:r}=t,i=n?ag(n):void 0,o=hp(i),s=r?ZS(r.headers.get("content-length")):void 0;o!==void 0&&(e.data.request_body_size=o),s!==void 0&&(e.data.response_body_size=s)}async function ine(e,t,n){const r=Date.now(),{startTimestamp:i=r,endTimestamp:o=r}=t,{url:s,method:a,status_code:l=0,request_body_size:c,response_body_size:u}=e.data,d=yp(s,n.networkDetailAllowUrls)&&!yp(s,n.networkDetailDenyUrls),f=d?one(n,t.input,c):Xc(c),p=await sne(d,n,t.response,u);return{startTimestamp:i,endTimestamp:o,url:s,method:a,statusCode:l,request:f,response:p}}function one({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const i=n?cne(n,t):{};if(!e)return No(i,r,void 0);const o=ag(n),[s,a]=Yf(o,We),l=No(i,r,s);return a?gp(l,a):l}async function sne(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,i){if(!e&&i!==void 0)return Xc(i);const o=r?e7(r.headers,n):{};if(!r||!t&&i!==void 0)return No(o,i,void 0);const[s,a]=await lne(r),l=ane(s,{networkCaptureBodies:t,responseBodySize:i,captureDetails:e,headers:o});return a?gp(l,a):l}function ane(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:i}){try{const o=e?.length&&n===void 0?hp(e):n;return r?t?No(i,o,e):No(i,o,void 0):Xc(o)}catch(o){return Ve&&We.exception(o,"Failed to serialize response body"),No(i,n,void 0)}}async function lne(e){const t=une(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await dne(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(Ve&&We.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(Ve&&We.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function e7(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function cne(e,t){return e.length===1&&typeof e[0]!="string"?t7(e[0],t):e.length===2?t7(e[1],t):{}}function t7(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?e7(n,t):Array.isArray(n)?{}:Ug(n,t):{}}function une(e){try{return e.clone()}catch(t){Ve&&We.exception(t,"Failed to clone response body")}}function dne(e){return new Promise((t,n)=>{const r=jc(()=>n(new Error("Timeout while trying to read response body")),500);fne(e).then(i=>t(i),i=>n(i)).finally(()=>clearTimeout(r))})}async function fne(e){return await e.text()}async function pne(e,t,n){try{const r=_ne(e,t,n),i=QS("resource.xhr",r);JS(n.replay,i)}catch(r){Ve&&We.exception(r,"Failed to capture xhr breadcrumb")}}function mne(e,t){const{xhr:n,input:r}=t;if(!n)return;const i=hp(r),o=n.getResponseHeader("content-length")?ZS(n.getResponseHeader("content-length")):yne(n.response,n.responseType);i!==void 0&&(e.data.request_body_size=i),o!==void 0&&(e.data.response_body_size=o)}function _ne(e,t,n){const r=Date.now(),{startTimestamp:i=r,endTimestamp:o=r,input:s,xhr:a}=t,{url:l,method:c,status_code:u=0,request_body_size:d,response_body_size:f}=e.data;if(!l)return null;if(!a||!yp(l,n.networkDetailAllowUrls)||yp(l,n.networkDetailDenyUrls)){const N=Xc(d),w=Xc(f);return{startTimestamp:i,endTimestamp:o,url:l,method:c,statusCode:u,request:N,response:w}}const p=a[Xi],m=p?Ug(p.request_headers,n.networkRequestHeaders):{},b=Ug($6(a),n.networkResponseHeaders),[g,_]=n.networkCaptureBodies?Yf(s,We):[void 0],[y,T]=n.networkCaptureBodies?hne(a):[void 0],S=No(m,d,g),O=No(b,f,y);return{startTimestamp:i,endTimestamp:o,url:l,method:c,statusCode:u,request:_?gp(S,_):S,response:T?gp(O,T):O}}function hne(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return gne(e.response,e.responseType)}catch(n){t.push(n)}return Ve&&We.warn("Failed to get xhr response body",...t),[void 0]}function gne(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch(n){return Ve&&We.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Ve&&We.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function yne(e,t){try{const n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return hp(n)}catch{return}}function bne(e){const t=Ie();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:s}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:s};t&&t.on("beforeAddBreadcrumb",(l,c)=>vne(a,l,c))}catch{}}function vne(e,t,n){if(t.data)try{$ne(t)&&Ene(n)&&(mne(t,n),pne(t,n,e)),Sne(t)&&Tne(n)&&(rne(t,n),nne(t,n,e))}catch(r){Ve&&We.exception(r,"Error when enriching network breadcrumb")}}function $ne(e){return e.category==="xhr"}function Sne(e){return e.category==="fetch"}function Ene(e){return e?.xhr}function Tne(e){return e?.response}function wne(e){const t=Ie();y6(rte(e)),Wf(Jte(e)),qte(e),bne(e);const n=Kte(e);b4(n),t&&(t.on("beforeSendEvent",Bte(e)),t.on("afterSendEvent",Dte(e)),t.on("createDsc",r=>{const i=e.getSessionId();i&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(r.replay_id=i)}),t.on("spanStart",r=>{e.lastActiveSpan=r}),t.on("spanEnd",r=>{e.lastActiveSpan=r}),t.on("beforeSendFeedback",async(r,i)=>{const o=e.getSessionId();i?.includeReplay&&e.isEnabled()&&o&&r.contexts?.feedback&&(r.contexts.feedback.source==="api"&&await e.sendBufferedReplayOrFlush(),r.contexts.feedback.replay_id=o)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}async function Ine(e){try{return Promise.all(_p(e,[Ane(Mt.performance.memory)]))}catch{return[]}}function Ane(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,i=Date.now()/1e3;return{type:"memory",name:"memory",start:i,end:i,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function xne(e,t,n){return jH(e,t,{...n,setTimeoutImpl:jc})}const bp=je.navigator;function Cne(){return/iPhone|iPad|iPod/i.test(bp?.userAgent??"")||/Macintosh/i.test(bp?.userAgent??"")&&bp?.maxTouchPoints&&bp?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function kne(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){Ve&&We.warn("Received replay event after session expired.");return}const i=r||!t;t=!0,Nne(n),e.clickDetector&&Zee(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&i&&e.setInitialState(),!Lg(e,n,i))return!0;if(!i)return!1;const o=e.session;if(One(e,i),e.recordingMode==="buffer"&&o&&e.eventBuffer&&!o.dirty){const s=e.eventBuffer.getEarliestTimestamp();s&&(Ve&&We.log(`Updating session start time to earliest event in buffer to ${new Date(s)}`),o.started=s,e.getOptions().stickySession&&mp(o))}return o?.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function Nne(e){const t=e.data;if(!(e.type!==Qe.IncrementalSnapshot||!t||typeof t!="object"||!("source"in t)||t.source!==Xe.Mutation||!("attributes"in t)||!Array.isArray(t.attributes)))for(const n of t.attributes){const r=qr.mirror.getNode(n.id),i=r&&qr.mirror.getMeta(r);if(i?.type===fp.Element)for(const[o,s]of Object.entries(n.attributes))s===null?delete i.attributes[o]:i.attributes[o]=s}}function Rne(e){const t=e.getOptions();return{type:Qe.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function One(e,t){!t||e.session?.segmentId!==0||Lg(e,Rne(e),!1)}function Pne(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Mne(e,t,n,r){return vr(X$(e,pc(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function Lne({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
|
|
526
|
-
`;if(typeof e=="string")n=`${r}${e}`;else{const o=new TextEncoder().encode(r);n=new Uint8Array(o.length+e.length),n.set(o),n.set(e,o.length)}return n}async function Dne({client:e,scope:t,replayId:n,event:r}){const i=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,o={event_id:n,integrations:i};e.emit("preprocessEvent",r,o);const s=await m4(e.getOptions(),r,o,t,e,qt());if(!s)return null;e.emit("postprocessEvent",s,o),s.platform=s.platform||"javascript";const a=e.getSdkMetadata(),{name:l,version:c,settings:u}=a?.sdk||{};return s.sdk={...s.sdk,name:l||"sentry.javascript.unknown",version:c||"0.0.0",settings:u},s}async function Fne({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:i,session:o}){const s=Lne({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:l,traceIds:c,initialTimestamp:u}=r,d=Ie(),f=Ke(),p=d?.getTransport(),m=d?.getDsn();if(!d||!p||!m||!o.sampled)return Promise.resolve({});const b={type:mQ,replay_start_timestamp:u/1e3,timestamp:i/1e3,error_ids:l,trace_ids:c,urls:a,replay_id:t,segment_id:n,replay_type:o.sampled},g=await Dne({scope:f,client:d,replayId:t,event:b});if(!g)return d.recordDroppedEvent("event_processor","replay"),Ve&&We.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete g.sdkProcessingMetadata;const _=Mne(g,s,m,d.getOptions().tunnel);let y;try{y=await p.send(_)}catch(S){const O=new Error(fg);try{O.cause=S}catch{}throw O}const T=R4({},y);if(N4(T,"replay"))throw new Bg(T);if(typeof y.statusCode=="number"&&(y.statusCode<200||y.statusCode>=300))throw new n7(y.statusCode);return y}class n7 extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class Bg extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}class r7 extends Error{constructor(){super("Session is too long, not sending replay")}}async function i7(e,t={count:0,interval:vQ}){const{recordingData:n,onError:r}=e;if(n.length)try{return await Fne(e),!0}catch(i){if(i instanceof n7||i instanceof Bg)throw i;if(h4("Replays",{_retryCount:t.count}),r&&r(i),t.count>=$Q){const o=new Error(`${fg} - max retries exceeded`);try{o.cause=i}catch{}throw o}return t.interval*=++t.count,new Promise((o,s)=>{jc(async()=>{try{await i7(e,t),o(!0)}catch(a){s(a)}},t.interval)})}}const o7="__THROTTLED",Une="__SKIPPED";function Bne(e,t,n){const r=new Map,i=a=>{const l=a-n;r.forEach((c,u)=>{u<l&&r.delete(u)})},o=()=>[...r.values()].reduce((a,l)=>a+l,0);let s=!1;return(...a)=>{const l=Math.floor(Date.now()/1e3);if(i(l),o()>=t){const u=s;return s=!0,u?Une:o7}s=!1;const c=r.get(l)||0;return r.set(l,c+1),e(...a)}}class jne{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:_Q,sessionIdleExpire:hQ},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=t,this._debouncedFlush=xne(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=Bne((s,a)=>Pte(this,s,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:i}=this.getOptions(),o=r?{threshold:Math.min(SQ,r),timeout:r,scrollTimeout:EQ,ignoreSelector:i?i.join(","):""}:void 0;if(o&&(this.clickDetector=new Yee(this,o)),Ve){const s=t._experiments;We.setConfig({captureExceptions:!!s.captureExceptions,traceInternals:!!s.traceInternals})}this._handleVisibilityChange=()=>{Mt.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const s=di({category:"ui.blur"});this._doChangeToBackgroundTasks(s)},this._handleWindowFocus=()=>{const s=di({category:"ui.focus"});this._doChangeToForegroundTasks(s)},this._handleKeyboardEvent=s=>{ate(this,s)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){Ve&&We.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:r}=this._options,i=n<=0&&r<=0;if(this._requiresManualStart=i,!i){if(this._initializeSessionForSampling(t),!this.session){Ve&&We.exception(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",Ve&&We.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){Ve&&We.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){Ve&&We.log("Buffering is in progress, call `flush()` to save the replay");return}Ve&&We.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=Mg({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled){Ve&&We.log("Buffering is in progress, call `flush()` to save the replay");return}Ve&&We.infoTick("Starting replay in buffer mode");const t=Mg({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=qr({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:bQ}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:kne(this),...Cne(),onMutation:this._onMutationHandler.bind(this),...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this.handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){if(!this._isEnabled)return;this._isEnabled=!1,this.recordingMode="buffer";const r=n??"manual";Ie()?.emit("replayEnd",{sessionId:this.session?.id,reason:r});try{Ve&&We.log(`Stopping Replay triggered by ${r}`),XS(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,Cte(this)}catch(i){this.handleException(i)}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),Ve&&We.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),Ve&&We.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();Ve&&We.log("Converting buffer to session"),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this.session.dirty=!1,this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const n=t();this.recordingMode==="buffer"||!this._isEnabled||n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(t){if(!(t&&this.session?.sampled===!1))return this.session?.id}checkAndHandleExpiredSession(){if(this._lastActivity&&Pg(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session?.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${Mt.location.pathname}${Mt.location.hash}${Mt.location.search}`,n=`${Mt.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){const r=this._throttledAddEvent(t,n);if(r===o7){const i=di({category:"replay.throttled"});this.addUpdate(()=>!Lg(this,{type:jee,timestamp:i.timestamp||0,data:{tag:"breadcrumb",payload:i,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||Ht(),n=t&&zt(t),i=(n&&Je(n).data||{})[Jt];if(!(!n||!i||!["route","custom"].includes(i)))return Je(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Ite({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.session&&Ie()?.emit("replayStart",{sessionId:this.session.id,recordingMode:this.recordingMode}),this.startRecording()}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=Mg({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const t=this.session;return VS(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"sessionExpired"}),this.initializeSampling(t.id))}_addListeners(){try{Mt.document.addEventListener("visibilitychange",this._handleVisibilityChange),Mt.addEventListener("blur",this._handleWindowBlur),Mt.addEventListener("focus",this._handleWindowFocus),Mt.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(wne(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=vte(this)}_removeListeners(){try{Mt.document.removeEventListener("visibilitychange",this._handleVisibilityChange),Mt.removeEventListener("blur",this._handleWindowBlur),Mt.removeEventListener("focus",this._handleWindowFocus),Mt.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){!this.session||HS(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){Ve&&We.log("Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:Qe.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=dte(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const n=this._context.initialTimestamp/1e3;t=t.filter(r=>r.start>=n)}return Promise.all(_p(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||this._requiresManualStart||t.segmentId)return;const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){Ve&&We.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await Ine(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new r7;const r=this._popEventContext(),i=this.session.segmentId++;this._maybeSaveSession();const o=await this.eventBuffer.finish();await i7({replayId:t,recordingData:o,segmentId:i,eventContext:r,session:this.session,timestamp:n,onError:s=>this.handleException(s)})}catch(n){this.handleException(n),this.stop({reason:"sendError"});const r=Ie();if(r){let i;n instanceof Bg?i="ratelimit_backoff":n instanceof r7?i="invalid":i="send_error",r.recordDroppedEvent(i,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){Ve&&We.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,i=Date.now()-n;this._debouncedFlush.cancel();const o=i<this._options.minReplayDuration,s=i>this._options.maxReplayDuration+5e3;if(o||s){Ve&&We.log(`Session duration (${Math.floor(i/1e3)}s) is too ${o?"short":"long"}, not sending replay.`),o&&this._debouncedFlush();return}const a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&Ve&&We.log("Flushing initial segment without checkout.");const l=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(c){this.handleException(c)}finally{this._flushLock=void 0,l&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&mp(this.session)}_onMutationHandler(t){const{ignoreMutations:n}=this._options._experiments;if(n?.length&&t.some(a=>{const l=Pne(a.target),c=n.join(",");return l?.matches(c)}))return!1;const r=t.length,i=this._options.mutationLimit,o=this._options.mutationBreadcrumbLimit,s=i&&r>i;if(r>o||s){const a=di({category:"replay.mutations",data:{count:r,limit:s}});this._createCustomBreadcrumb(a)}return s?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function Jc(e,t){return[...e,...t].join(",")}function qne({mask:e,unmask:t,block:n,unblock:r,ignore:i}){const o=["base","iframe[srcdoc]:not([src])"],s=Jc(e,[".sentry-mask","[data-sentry-mask]"]),a=Jc(t,[]);return{maskTextSelector:s,unmaskTextSelector:a,blockSelector:Jc(n,[".sentry-block","[data-sentry-block]",...o]),unblockSelector:Jc(r,[]),ignoreSelector:Jc(i,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function zne({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:i,value:o}){if(i.unmaskTextSelector&&e.matches(i.unmaskTextSelector))return o;const s=n.includes(t),a=r&&t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"");return s||a?o.replace(/[\S]/g,"*"):o}const s7='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',Hne=["content-length","content-type","accept"],Vne=Symbol.for("sentry__originalRequestBody");let a7=!1,l7=!1;function Wne(){if(typeof Request>"u"||l7)return;const e=Request;try{const t=function(n,r){const i=new e(n,r);return r?.body!=null&&(i[Vne]=r.body),i};t.prototype=e.prototype,je.Request=t,l7=!0}catch{}}const Gne=(e=>new Yne(e));class Yne{constructor({flushMinDelay:t=gQ,flushMaxDelay:n=yQ,minReplayDuration:r=TQ,maxReplayDuration:i=X6,stickySession:o=!0,useCompression:s=!0,workerUrl:a,_experiments:l={},maskAllText:c=!0,maskAllInputs:u=!0,blockAllMedia:d=!0,mutationBreadcrumbLimit:f=750,mutationLimit:p=1e4,slowClickTimeout:m=7e3,slowClickIgnoreSelectors:b=[],networkDetailAllowUrls:g=[],networkDetailDenyUrls:_=[],networkCaptureBodies:y=!0,networkRequestHeaders:T=[],networkResponseHeaders:S=[],mask:O=[],maskAttributes:N=["title","placeholder","aria-label"],unmask:w=[],block:D=[],unblock:Y=[],ignore:q=[],maskFn:P,beforeAddRecordingEvent:C,beforeErrorSampling:F,onError:R,attachRawBodyFromRequest:G=!1}={}){this.name="Replay";const z=qne({mask:O,unmask:w,block:D,unblock:Y,ignore:q});if(this._recordingOptions={maskAllInputs:u,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:P,maskInputFn:P,maskAttributeFn:(K,M,oe)=>zne({maskAttributes:N,maskAllText:c,privacyOptions:z,key:K,value:M,el:oe}),...z,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:K=>{try{K.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!l.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,wQ),maxReplayDuration:Math.min(i,X6),stickySession:o,useCompression:s,workerUrl:a,blockAllMedia:d,maskAllInputs:u,maskAllText:c,mutationBreadcrumbLimit:f,mutationLimit:p,slowClickTimeout:m,slowClickIgnoreSelectors:b,networkDetailAllowUrls:g,networkDetailDenyUrls:_,networkCaptureBodies:y,networkRequestHeaders:c7(T),networkResponseHeaders:c7(S),beforeAddRecordingEvent:C,beforeErrorSampling:F,onError:R,attachRawBodyFromRequest:G,_experiments:l},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${s7}`:s7,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&Ac())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return a7}set _isInitialized(t){a7=t}afterAllSetup(t){!Ac()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&Wne(),this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session",reason:"manual"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(t){if(this._replay?.isEnabled())return this._replay.getSessionId(t)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=Kne(this._initialOptions,t);this._replay=new jne({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}function Kne(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},i=ss(n.replaysSessionSampleRate),o=ss(n.replaysOnErrorSampleRate);return i==null&&o==null&&Or(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),i!=null&&(r.sessionSampleRate=i),o!=null&&(r.errorSampleRate=o),r}function c7(e){return[...Hne,...e.map(t=>t.toLowerCase())]}function Xne(){return Ie()?.getIntegrationByName("Replay")}var Jne=Object.defineProperty,Zne=(e,t,n)=>t in e?Jne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,u7=(e,t,n)=>Zne(e,typeof t!="symbol"?t+"":t,n);class Qne{constructor(){u7(this,"idNodeMap",new Map),u7(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(n,i)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function ere(){return new Qne}function tre(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function jg(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:jg(e.parentNode,t,n,r+1)}function d7(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(tre(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}const La=`Please stop import mirror directly. Instead of that,\r
|
|
525
|
+
or you can use record.mirror to access the mirror instance during recording.`;let u7={map:{},getId(){return console.error(Ra),-1},getNode(){return console.error(Ra),null},removeNodeFromMap(){console.error(Ra)},has(){return console.error(Ra),!1},reset(){console.error(Ra)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(u7=new Proxy(u7,{get(e,t,n){return t==="map"&&console.error(Ra),Reflect.get(e,t,n)}}));function Wc(e,t,n={}){let r=null,i=0;return function(...o){const s=Date.now();!i&&n.leading===!1&&(i=s);const a=t-(s-i),l=this;a<=0||a>t?(r&&(fee(r),r=null),i=s,e.apply(l,o)):!r&&n.trailing!==!1&&(r=sp(()=>{i=n.leading===!1?0:Date.now(),r=null,e.apply(l,o)},a))}}function d7(e,t,n,r,i=window){const o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(s){sp(()=>{n.set.call(this,s)},0),o&&o.set&&o.set.call(this,s)}}),()=>d7(e,t,o||{},!0)}function yg(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}let op=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(op=()=>new Date().getTime());function f7(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0}}function p7(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function m7(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function _7(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function cr(e,t,n,r,i){if(!e)return!1;const o=_7(e);if(!o)return!1;const s=Ca(t,n);if(!i){const c=r&&o.matches(r);return s(o)&&!c}const a=Ss(o,s);let l=-1;return a<0?!1:(r&&(l=Ss(o,Ca(null,r))),a>-1&&l<0?!0:a<l)}function see(e,t){return t.getId(e)!==-1}function bg(e,t){return t.getId(e)===Vc}function h7(e,t){if(qc(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?h7(e.parentNode,t):!0:!0}function vg(e){return!!e.changedTouches}function aee(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function g7(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function y7(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function $g(e){return!!e?.shadowRoot}class lee{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function b7(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function cee(e){let t=e,n;for(;n=b7(t);)t=n;return t}function uee(e){const t=e.ownerDocument;if(!t)return!1;const n=cee(e);return t.contains(n)}function v7(e){const t=e.ownerDocument;return t?t.contains(e)||uee(e):!1}const $7={};function Sg(e){const t=$7[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);const o=i.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(i)}catch{}return $7[e]=r.bind(window)}function dee(...e){return Sg("requestAnimationFrame")(...e)}function sp(...e){return Sg("setTimeout")(...e)}function fee(...e){return Sg("clearTimeout")(...e)}var Qe=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(Qe||{}),Xe=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(Xe||{}),Hn=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(Hn||{}),Ji=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Ji||{}),Oa=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Oa||{});function Eg(e){try{return e.contentDocument}catch{}}function pee(e){try{return e.contentWindow}catch{}}function S7(e){return"__ln"in e}class mee{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=n?.next||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&S7(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&S7(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){const n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const E7=(e,t)=>`${e}@${t}`;class _ee{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Set,r=new mee,i=l=>{let c=l,u=Vc;for(;u===Vc;)c=c&&c.nextSibling,u=c&&this.mirror.getId(c);return u},o=l=>{if(!l.parentNode||!v7(l))return;const c=qc(l.parentNode)?this.mirror.getId(b7(l)):this.mirror.getId(l.parentNode),u=i(l);if(c===-1||u===-1)return r.addNode(l);const d=Na(l,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:f=>{g7(f,this.mirror)&&!cr(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(f),y7(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),$g(l)&&this.shadowDomManager.addShadowRoot(l.shadowRoot,this.doc)},onIframeLoad:(f,p)=>{cr(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(f,p),f.contentWindow&&this.canvasManager.addWindow(f.contentWindow),this.shadowDomManager.observeAttachShadow(f))},onStylesheetLoad:(f,p)=>{this.stylesheetManager.attachLinkElement(f,p)},onBlockedImageLoad:(f,p,{width:m,height:b})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:p.id,attributes:{style:{width:`${m}px`,height:`${b}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});d&&(t.push({parentId:c,nextId:u,node:d}),n.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const l of this.movedSet)T7(this.removes,l,this.mirror)&&!this.movedSet.has(l.parentNode)||o(l);for(const l of this.addedSet)!w7(this.droppedSet,l)&&!T7(this.removes,l,this.mirror)||w7(this.movedSet,l)?o(l):this.droppedSet.add(l);let s=null;for(;r.length;){let l=null;if(s){const c=this.mirror.getId(s.value.parentNode),u=i(s.value);c!==-1&&u!==-1&&(l=s)}if(!l){let c=r.tail;for(;c;){const u=c;if(c=c.previous,u){const d=this.mirror.getId(u.value.parentNode);if(i(u.value)===-1)continue;if(d!==-1){l=u;break}else{const p=u.value;if(p.parentNode&&p.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const m=p.parentNode.host;if(this.mirror.getId(m)!==-1){l=u;break}}}}}}if(!l){for(;r.head;)r.removeNode(r.head.value);break}s=l.previous,r.removeNode(l.value),o(l.value)}const a={texts:this.texts.map(l=>({id:this.mirror.getId(l.node),value:l.value})).filter(l=>!n.has(l.id)).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>{const{attributes:c}=l;if(typeof c.style=="string"){const u=JSON.stringify(l.styleDiff),d=JSON.stringify(l._unchangedStyles);u.length<c.style.length&&(u+d).split("var(").length===c.style.split("var(").length&&(c.style=l.styleDiff)}return{id:this.mirror.getId(l.node),attributes:c}}).filter(l=>!n.has(l.id)).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(!bg(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!cr(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:ka(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,_7(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,i=t.target.getAttribute(r);if(r==="value"){const s=_g(n),a=n.tagName;i=np(n,a,s);const l=tp({maskInputOptions:this.maskInputOptions,tagName:a,type:s}),c=ka(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,l);i=Hc({isMasked:c,element:n,value:i,maskInputFn:this.maskInputFn})}if(cr(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||i===t.oldValue)return;let o=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!Eg(n))r="rr_src";else return;if(o||(o={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(t.target,o)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!c7(n.tagName,r)&&(o.attributes[r]=l7(this.doc,Ia(n.tagName),Ia(r),i,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const s=this.unattachedDoc.createElement("span");t.oldValue&&s.setAttribute("style",t.oldValue);for(const a of Array.from(n.style)){const l=n.style.getPropertyValue(a),c=n.style.getPropertyPriority(a);l!==s.style.getPropertyValue(a)||c!==s.style.getPropertyPriority(a)?c===""?o.styleDiff[a]=l:o.styleDiff[a]=[l,c]:o._unchangedStyles[a]=[l,c]}for(const a of Array.from(s.style))n.style.getPropertyValue(a)===""&&(o.styleDiff[a]=!1)}break}case"childList":{if(cr(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),i=qc(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);cr(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||bg(n,this.mirror)||!see(n,this.mirror)||(this.addedSet.has(n)?(Tg(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||h7(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[E7(r,i)]?Tg(this.movedSet,n):this.removes.push({parentId:i,id:r,isShadow:qc(t.target)&&zc(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(bg(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[E7(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);cr(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEach(r=>this.genAdds(r)),$g(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager","ignoreCSSAttributes"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Tg(e,t){e.delete(t),t.childNodes?.forEach(n=>Tg(e,n))}function T7(e,t,n){return e.length===0?!1:hee(e,t,n)}function hee(e,t,n){let r=t.parentNode;for(;r;){const i=n.getId(r);if(e.some(o=>o.id===i))return!0;r=r.parentNode}return!1}function w7(e,t){return e.size===0?!1:I7(e,t)}function I7(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:I7(e,n):!1}let Gc;function gee(e){Gc=e}function yee(){Gc=void 0}const ct=e=>Gc?(...n)=>{try{return e(...n)}catch(r){if(Gc&&Gc(r)===!0)return()=>{};throw r}}:e,Pa=[];function Yc(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function A7(e,t){const n=new _ee;Pa.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const i=window?.Zone?.__symbol__?.("MutationObserver");i&&window[i]&&(r=window[i]);const o=new r(ct(s=>{e.onMutation&&e.onMutation(s)===!1||n.processMutations.bind(n)(s)}));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function bee({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const i=typeof t.mousemove=="number"?t.mousemove:50,o=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let s=[],a;const l=Wc(ct(d=>{const f=Date.now()-a;e(s.map(p=>(p.timeOffset-=f,p)),d),s=[],a=null}),o),c=ct(Wc(ct(d=>{const f=Yc(d),{clientX:p,clientY:m}=vg(d)?d.changedTouches[0]:d;a||(a=op()),s.push({x:p,y:m,id:r.getId(f),timeOffset:op()-a}),l(typeof DragEvent<"u"&&d instanceof DragEvent?Xe.Drag:d instanceof MouseEvent?Xe.MouseMove:Xe.TouchMove)}),i,{trailing:!1})),u=[zn("mousemove",c,n),zn("touchmove",c,n),zn("drag",c,n)];return ct(()=>{u.forEach(d=>d())})}function vee({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,sampling:s}){if(s.mouseInteraction===!1)return()=>{};const a=s.mouseInteraction===!0||s.mouseInteraction===void 0?{}:s.mouseInteraction,l=[];let c=null;const u=d=>f=>{const p=Yc(f);if(cr(p,r,i,o,!0))return;let m=null,b=d;if("pointerType"in f){switch(f.pointerType){case"mouse":m=Ji.Mouse;break;case"touch":m=Ji.Touch;break;case"pen":m=Ji.Pen;break}m===Ji.Touch?Hn[d]===Hn.MouseDown?b="TouchStart":Hn[d]===Hn.MouseUp&&(b="TouchEnd"):Ji.Pen}else vg(f)&&(m=Ji.Touch);m!==null?(c=m,(b.startsWith("Touch")&&m===Ji.Touch||b.startsWith("Mouse")&&m===Ji.Mouse)&&(m=null)):Hn[d]===Hn.Click&&(m=c,c=null);const g=vg(f)?f.changedTouches[0]:f;if(!g)return;const _=n.getId(p),{clientX:y,clientY:T}=g;ct(e)({type:Hn[b],id:_,x:y,y:T,...m!==null&&{pointerType:m}})};return Object.keys(Hn).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&a[d]!==!1).forEach(d=>{let f=Ia(d);const p=u(d);if(window.PointerEvent)switch(Hn[d]){case Hn.MouseDown:case Hn.MouseUp:f=f.replace("mouse","pointer");break;case Hn.TouchStart:case Hn.TouchEnd:return}l.push(zn(f,p,t))}),ct(()=>{l.forEach(d=>d())})}function x7({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,sampling:s}){const a=ct(Wc(ct(l=>{const c=Yc(l);if(!c||cr(c,r,i,o,!0))return;const u=n.getId(c);if(c===t&&t.defaultView){const d=f7(t.defaultView);e({id:u,x:d.left,y:d.top})}else e({id:u,x:c.scrollLeft,y:c.scrollTop})}),s.scroll||100));return zn("scroll",a,t)}function $ee({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const i=ct(Wc(ct(()=>{const o=p7(),s=m7();(n!==o||r!==s)&&(e({width:Number(s),height:Number(o)}),n=o,r=s)}),200));return zn("resize",i,t)}const See=["INPUT","TEXTAREA","SELECT"],C7=new WeakMap;function Eee({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,ignoreClass:s,ignoreSelector:a,maskInputOptions:l,maskInputFn:c,sampling:u,userTriggeredOnInput:d,maskTextClass:f,unmaskTextClass:p,maskTextSelector:m,unmaskTextSelector:b}){function g(w){let D=Yc(w);const Y=w.isTrusted,q=D&&mg(D.tagName);if(q==="OPTION"&&(D=D.parentElement),!D||!q||See.indexOf(q)<0||cr(D,r,i,o,!0))return;const P=D;if(P.classList.contains(s)||a&&P.matches(a))return;const C=_g(D);let F=np(P,q,C),R=!1;const G=tp({maskInputOptions:l,tagName:q,type:C}),z=ka(D,f,m,p,b,G);(C==="radio"||C==="checkbox")&&(R=D.checked),F=Hc({isMasked:z,element:D,value:F,maskInputFn:c}),_(D,d?{text:F,isChecked:R,userTriggered:Y}:{text:F,isChecked:R});const K=D.name;C==="radio"&&K&&R&&t.querySelectorAll(`input[type="radio"][name="${K}"]`).forEach(M=>{if(M!==D){const oe=Hc({isMasked:z,element:M,value:np(M,q,C),maskInputFn:c});_(M,d?{text:oe,isChecked:!R,userTriggered:!1}:{text:oe,isChecked:!R})}})}function _(w,D){const Y=C7.get(w);if(!Y||Y.text!==D.text||Y.isChecked!==D.isChecked){C7.set(w,D);const q=n.getId(w);ct(e)({...D,id:q})}}const T=(u.input==="last"?["change"]:["input","change"]).map(w=>zn(w,ct(g),t)),S=t.defaultView;if(!S)return()=>{T.forEach(w=>w())};const O=S.Object.getOwnPropertyDescriptor(S.HTMLInputElement.prototype,"value"),N=[[S.HTMLInputElement.prototype,"value"],[S.HTMLInputElement.prototype,"checked"],[S.HTMLSelectElement.prototype,"value"],[S.HTMLTextAreaElement.prototype,"value"],[S.HTMLSelectElement.prototype,"selectedIndex"],[S.HTMLOptionElement.prototype,"selected"]];return O&&O.set&&T.push(...N.map(w=>d7(w[0],w[1],{set(){ct(g)({target:this,isTrusted:!1})}},!1,S))),ct(()=>{T.forEach(w=>w())})}function ap(e){const t=[];function n(r,i){if(lp("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||lp("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||lp("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||lp("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const s=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(s)}else if(r.parentStyleSheet){const s=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(s)}return i}return n(e,t)}function Co(e,t,n){let r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function Tee({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:ct((u,d,f)=>{const[p,m]=f,{id:b,styleId:g}=Co(d,t,n.styleMirror);return(b&&b!==-1||g&&g!==-1)&&e({id:b,styleId:g,adds:[{rule:p,index:m}]}),u.apply(d,f)})});const o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:ct((u,d,f)=>{const[p]=f,{id:m,styleId:b}=Co(d,t,n.styleMirror);return(m&&m!==-1||b&&b!==-1)&&e({id:m,styleId:b,removes:[{index:p}]}),u.apply(d,f)})});let s;r.CSSStyleSheet.prototype.replace&&(s=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:ct((u,d,f)=>{const[p]=f,{id:m,styleId:b}=Co(d,t,n.styleMirror);return(m&&m!==-1||b&&b!==-1)&&e({id:m,styleId:b,replace:p}),u.apply(d,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:ct((u,d,f)=>{const[p]=f,{id:m,styleId:b}=Co(d,t,n.styleMirror);return(m&&m!==-1||b&&b!==-1)&&e({id:m,styleId:b,replaceSync:p}),u.apply(d,f)})}));const l={};cp("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(cp("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),cp("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),cp("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));const c={};return Object.entries(l).forEach(([u,d])=>{c[u]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(c[u].insertRule,{apply:ct((f,p,m)=>{const[b,g]=m,{id:_,styleId:y}=Co(p.parentStyleSheet,t,n.styleMirror);return(_&&_!==-1||y&&y!==-1)&&e({id:_,styleId:y,adds:[{rule:b,index:[...ap(p),g||0]}]}),f.apply(p,m)})}),d.prototype.deleteRule=new Proxy(c[u].deleteRule,{apply:ct((f,p,m)=>{const[b]=m,{id:g,styleId:_}=Co(p.parentStyleSheet,t,n.styleMirror);return(g&&g!==-1||_&&_!==-1)&&e({id:g,styleId:_,removes:[{index:[...ap(p),b]}]}),f.apply(p,m)})})}),ct(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=o,s&&(r.CSSStyleSheet.prototype.replace=s),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([u,d])=>{d.prototype.insertRule=c[u].insertRule,d.prototype.deleteRule=c[u].deleteRule})})}function k7({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const i=n.nodeName==="#document"?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,o=i?.prototype?Object.getOwnPropertyDescriptor(i?.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!i||!o?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){return o.get?.call(this)},set(s){const a=o.set?.call(this,s);if(r!==null&&r!==-1)try{t.adoptStyleSheets(s,r)}catch{}return a}}),ct(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))}function wee({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){const o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:ct((a,l,c)=>{const[u,d,f]=c;if(n.has(u))return o.apply(l,[u,d,f]);const{id:p,styleId:m}=Co(l.parentRule?.parentStyleSheet,t,r.styleMirror);return(p&&p!==-1||m&&m!==-1)&&e({id:p,styleId:m,set:{property:u,value:d,priority:f},index:ap(l.parentRule)}),a.apply(l,c)})});const s=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:ct((a,l,c)=>{const[u]=c;if(n.has(u))return s.apply(l,[u]);const{id:d,styleId:f}=Co(l.parentRule?.parentStyleSheet,t,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,remove:{property:u},index:ap(l.parentRule)}),a.apply(l,c)})}),ct(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=s})}function Iee({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:i,sampling:o,doc:s}){const a=ct(c=>Wc(ct(u=>{const d=Yc(u);if(!d||cr(d,t,n,r,!0))return;const{currentTime:f,volume:p,muted:m,playbackRate:b}=d;e({type:c,id:i.getId(d),currentTime:f,volume:p,muted:m,playbackRate:b})}),o.media||500)),l=[zn("play",a(Oa.Play),s),zn("pause",a(Oa.Pause),s),zn("seeked",a(Oa.Seeked),s),zn("volumechange",a(Oa.VolumeChange),s),zn("ratechange",a(Oa.RateChange),s)];return ct(()=>{l.forEach(c=>c())})}function Aee({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],i=new WeakMap,o=n.FontFace;n.FontFace=function(l,c,u){const d=new o(l,c,u);return i.set(d,{family:l,buffer:typeof c!="string",descriptors:u,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),d};const s=yg(t.fonts,"add",function(a){return function(l){return sp(ct(()=>{const c=i.get(l);c&&(e(c),i.delete(l))}),0),a.apply(this,[l])}});return r.push(()=>{n.FontFace=o}),r.push(s),ct(()=>{r.forEach(a=>a())})}function xee(e){const{doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,selectionCb:s}=e;let a=!0;const l=ct(()=>{const c=t.getSelection();if(!c||a&&c?.isCollapsed)return;a=c.isCollapsed||!1;const u=[],d=c.rangeCount||0;for(let f=0;f<d;f++){const p=c.getRangeAt(f),{startContainer:m,startOffset:b,endContainer:g,endOffset:_}=p;cr(m,r,i,o,!0)||cr(g,r,i,o,!0)||u.push({start:n.getId(m),startOffset:b,end:n.getId(g),endOffset:_})}s({ranges:u})});return l(),zn("selectionchange",l)}function Cee({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:yg(n.customElements,"define",function(i){return function(o,s,a){try{t({define:{name:o}})}catch{}return i.apply(this,[o,s,a])}})}function kee(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=A7(e,e.doc));const i=bee(e),o=vee(e),s=x7(e),a=$ee(e,{win:n}),l=Eee(e),c=Iee(e);let u=()=>{},d=()=>{},f=()=>{},p=()=>{};e.recordDOM&&(u=Tee(e,{win:n}),d=k7(e,e.doc),f=wee(e,{win:n}),e.collectFonts&&(p=Aee(e)));const m=xee(e),b=Cee(e),g=[];for(const _ of e.plugins)g.push(_.observer(_.callback,n,_.options));return ct(()=>{Pa.forEach(_=>_.reset()),r?.disconnect(),i(),o(),s(),a(),l(),c(),u(),d(),f(),p(),m(),b(),g.forEach(_=>_())})}function lp(e){return typeof window[e]<"u"}function cp(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class wg{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,i){const o=r||this.getIdToRemoteIdMap(t),s=i||this.getRemoteIdToIdMap(t);let a=o.get(n);return a||(a=this.generateIdFn(),o.set(n,a),s.set(a,n)),a}getIds(t,n){const r=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return n.map(o=>this.getId(t,o,r,i))}getRemoteId(t,n,r){const i=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const o=i.get(n);return o||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(i=>this.getRemoteId(t,i,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}class Nee{constructor(){this.crossOriginIframeMirror=new wg(gg),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class Ree{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new wg(gg),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new wg(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&t.contentWindow?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(t);const r=Eg(t);r&&r.adoptedStyleSheets&&r.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(r.adoptedStyleSheets,this.mirror.getId(r))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const i=this.crossOriginIframeMap.get(t.source);if(!i)return;const o=this.transformCrossOriginEvent(i,n.data.event);o&&this.wrappedEmit(o,n.data.isCheckout)}transformCrossOriginEvent(t,n){switch(n.type){case Qe.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:Qe.IncrementalSnapshot,data:{source:Xe.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Qe.Meta:case Qe.Load:case Qe.DomContentLoaded:return!1;case Qe.Plugin:return n;case Qe.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case Qe.IncrementalSnapshot:switch(n.data.source){case Xe.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);const i=this.crossOriginIframeRootIdMap.get(t);i&&this.patchRootIdOnNode(r.node,i)}),n.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case Xe.Drag:case Xe.TouchMove:case Xe.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case Xe.ViewportResize:return!1;case Xe.MediaInteraction:case Xe.MouseInteraction:case Xe.Scroll:case Xe.CanvasMutation:case Xe.Input:return this.replaceIds(n.data,t,["id"]),n;case Xe.StyleSheetRule:case Xe.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case Xe.Font:return n;case Xe.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case Xe.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),n.data.styles?.forEach(r=>{this.replaceStyleIds(r,t,["styleId"])}),n}}return!1}replace(t,n,r,i){for(const o of i)!Array.isArray(n[o])&&typeof n[o]!="number"||(Array.isArray(n[o])?n[o]=t.getIds(r,n[o]):n[o]=t.getId(r,n[o]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==nn.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class Oee{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class Pee{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!zc(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=A7({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(x7({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),sp(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(k7({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const n=Eg(t),r=pee(t);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(yg(t.prototype,"attachShadow",function(i){return function(o){const s=i.call(this,o);return this.shadowRoot&&v7(this)&&r.addShadowRoot(this.shadowRoot,n),s}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}for(var N7="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Mee=typeof Uint8Array>"u"?[]:new Uint8Array(256),up=0;up<N7.length;up++)Mee[N7.charCodeAt(up)]=up;class R7{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class Lee{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new lee,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const r={id:n,styleIds:[]},i=[];for(const o of t){let s;this.styleMirror.has(o)?s=this.styleMirror.getId(o):(s=this.styleMirror.add(o),i.push({styleId:s,rules:Array.from(o.rules||CSSRule,(a,l)=>({rule:Z6(a),index:l}))})),r.styleIds.push(s)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class Dee{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(i=>i!==n)}add(t,n){this.active||(this.active=!0,dee(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let Gt,dp;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const jr=MQ();function qr(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:o=null,unblockSelector:s=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,maskAllText:c=!1,maskTextClass:u="rr-mask",unmaskTextClass:d=null,maskTextSelector:f=null,unmaskTextSelector:p=null,inlineStylesheet:m=!0,maskAllInputs:b,maskInputOptions:g,slimDOMOptions:_,maskAttributeFn:y,maskInputFn:T,maskTextFn:S,maxCanvasSize:O=null,packFn:N,sampling:w={},dataURLOptions:D={},mousemoveWait:Y,recordDOM:q=!0,recordCanvas:P=!1,recordCrossOriginIframes:C=!1,recordAfter:F=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:R=!1,collectFonts:G=!1,inlineImages:z=!1,plugins:K,keepIframeSrcFn:M=()=>!1,ignoreCSSAttributes:oe=new Set([]),errorHandler:te,onMutation:se,getCanvasManager:_e}=e;gee(te);const ce=C?window.parent===window:!0;let ye=!1;if(!ce)try{window.parent.document&&(ye=!1)}catch{ye=!0}if(ce&&!t)throw new Error("emit function is required");if(!ce&&!ye)return()=>{};Y!==void 0&&w.mousemove===void 0&&(w.mousemove=Y),jr.reset();const Te=b===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:g!==void 0?g:{},le=_===!0||_==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:_==="all",headMetaDescKeywords:_==="all"}:_||{};aee();let ge,Ce=0;const Me=E=>{for(const x of K||[])x.eventProcessor&&(E=x.eventProcessor(E));return N&&!ye&&(E=N(E)),E};Gt=(E,x)=>{const Q=E;if(Q.timestamp=op(),Pa[0]?.isFrozen()&&Q.type!==Qe.FullSnapshot&&!(Q.type===Qe.IncrementalSnapshot&&Q.data.source===Xe.Mutation)&&Pa.forEach(Z=>Z.unfreeze()),ce)t?.(Me(Q),x);else if(ye){const Z={type:"rrweb",event:Me(Q),origin:window.location.origin,isCheckout:x};window.parent.postMessage(Z,"*")}if(Q.type===Qe.FullSnapshot)ge=Q,Ce=0;else if(Q.type===Qe.IncrementalSnapshot){if(Q.data.source===Xe.Mutation&&Q.data.isAttachIframe)return;Ce++;const Z=r&&Ce>=r,ne=n&&ge&&Q.timestamp-ge.timestamp>n;(Z||ne)&&v(!0)}};const Ue=E=>{Gt({type:Qe.IncrementalSnapshot,data:{source:Xe.Mutation,...E}})},nt=E=>Gt({type:Qe.IncrementalSnapshot,data:{source:Xe.Scroll,...E}}),A=E=>Gt({type:Qe.IncrementalSnapshot,data:{source:Xe.CanvasMutation,...E}}),k=E=>Gt({type:Qe.IncrementalSnapshot,data:{source:Xe.AdoptedStyleSheet,...E}}),X=new Lee({mutationCb:Ue,adoptedStyleSheetCb:k}),ae=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new Nee:new Ree({mirror:jr,mutationCb:Ue,stylesheetManager:X,recordCrossOriginIframes:C,wrappedEmit:Gt});for(const E of K||[])E.getMirror&&E.getMirror({nodeMirror:jr,crossOriginIframeMirror:ae.crossOriginIframeMirror,crossOriginIframeStyleMirror:ae.crossOriginIframeStyleMirror});const ee=new Dee,re=Uee(_e,{mirror:jr,win:window,mutationCb:E=>Gt({type:Qe.IncrementalSnapshot,data:{source:Xe.CanvasMutation,...E}}),recordCanvas:P,blockClass:i,blockSelector:o,unblockSelector:s,maxCanvasSize:O,sampling:w.canvas,dataURLOptions:D,errorHandler:te}),$=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Oee:new Pee({mutationCb:Ue,scrollCb:nt,bypassOptions:{onMutation:se,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:m,maskInputOptions:Te,dataURLOptions:D,maskAttributeFn:y,maskTextFn:S,maskInputFn:T,recordCanvas:P,inlineImages:z,sampling:w,slimDOMOptions:le,iframeManager:ae,stylesheetManager:X,canvasManager:re,keepIframeSrcFn:M,processedNodeManager:ee,ignoreCSSAttributes:oe},mirror:jr}),v=(E=!1)=>{if(!q)return;Gt({type:Qe.Meta,data:{href:window.location.href,width:m7(),height:p7()}},E),X.reset(),$.init(),Pa.forEach(Q=>Q.lock());const x=oee(document,{mirror:jr,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:m,maskAllInputs:Te,maskAttributeFn:y,maskInputFn:T,maskTextFn:S,slimDOM:le,dataURLOptions:D,recordCanvas:P,inlineImages:z,onSerialize:Q=>{g7(Q,jr)&&ae.addIframe(Q),y7(Q,jr)&&X.trackLinkElement(Q),$g(Q)&&$.addShadowRoot(Q.shadowRoot,document)},onIframeLoad:(Q,Z)=>{ae.attachIframe(Q,Z),Q.contentWindow&&re.addWindow(Q.contentWindow),$.observeAttachShadow(Q)},onStylesheetLoad:(Q,Z)=>{X.attachLinkElement(Q,Z)},onBlockedImageLoad:(Q,Z,{width:ne,height:xe})=>{Ue({adds:[],removes:[],texts:[],attributes:[{id:Z.id,attributes:{style:{width:`${ne}px`,height:`${xe}px`}}}]})},keepIframeSrcFn:M,ignoreCSSAttributes:oe});if(!x)return console.warn("Failed to snapshot the document");Gt({type:Qe.FullSnapshot,data:{node:x,initialOffset:f7(window)}}),Pa.forEach(Q=>Q.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&X.adoptStyleSheets(document.adoptedStyleSheets,jr.getId(document))};dp=v;try{const E=[],x=Z=>ct(kee)({onMutation:se,mutationCb:Ue,mousemoveCb:(ne,xe)=>Gt({type:Qe.IncrementalSnapshot,data:{source:xe,positions:ne}}),mouseInteractionCb:ne=>Gt({type:Qe.IncrementalSnapshot,data:{source:Xe.MouseInteraction,...ne}}),scrollCb:nt,viewportResizeCb:ne=>Gt({type:Qe.IncrementalSnapshot,data:{source:Xe.ViewportResize,...ne}}),inputCb:ne=>Gt({type:Qe.IncrementalSnapshot,data:{source:Xe.Input,...ne}}),mediaInteractionCb:ne=>Gt({type:Qe.IncrementalSnapshot,data:{source:Xe.MediaInteraction,...ne}}),styleSheetRuleCb:ne=>Gt({type:Qe.IncrementalSnapshot,data:{source:Xe.StyleSheetRule,...ne}}),styleDeclarationCb:ne=>Gt({type:Qe.IncrementalSnapshot,data:{source:Xe.StyleDeclaration,...ne}}),canvasMutationCb:A,fontCb:ne=>Gt({type:Qe.IncrementalSnapshot,data:{source:Xe.Font,...ne}}),selectionCb:ne=>{Gt({type:Qe.IncrementalSnapshot,data:{source:Xe.Selection,...ne}})},customElementCb:ne=>{Gt({type:Qe.IncrementalSnapshot,data:{source:Xe.CustomElement,...ne}})},blockClass:i,ignoreClass:a,ignoreSelector:l,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,maskInputOptions:Te,inlineStylesheet:m,sampling:w,recordDOM:q,recordCanvas:P,inlineImages:z,userTriggeredOnInput:R,collectFonts:G,doc:Z,maskAttributeFn:y,maskInputFn:T,maskTextFn:S,keepIframeSrcFn:M,blockSelector:o,unblockSelector:s,slimDOMOptions:le,dataURLOptions:D,mirror:jr,iframeManager:ae,stylesheetManager:X,shadowDomManager:$,processedNodeManager:ee,canvasManager:re,ignoreCSSAttributes:oe,plugins:K?.filter(ne=>ne.observer)?.map(ne=>({observer:ne.observer,options:ne.options,callback:xe=>Gt({type:Qe.Plugin,data:{plugin:ne.name,payload:xe}})}))||[]},{});ae.addLoadListener(Z=>{try{E.push(x(Z.contentDocument))}catch(ne){console.warn(ne)}});const Q=()=>{v(),E.push(x(document))};return document.readyState==="interactive"||document.readyState==="complete"?Q():(E.push(zn("DOMContentLoaded",()=>{Gt({type:Qe.DomContentLoaded,data:{}}),F==="DOMContentLoaded"&&Q()})),E.push(zn("load",()=>{Gt({type:Qe.Load,data:{}}),F==="load"&&Q()},window))),()=>{E.forEach(Z=>Z()),ee.destroy(),dp=void 0,yee()}}catch(E){console.warn(E)}}function Fee(e){if(!dp)throw new Error("please take full snapshot after start recording");dp(e)}qr.mirror=jr,qr.takeFullSnapshot=Fee;function Uee(e,t){try{return e?e(t):new R7}catch{return console.warn("Unable to initialize CanvasManager"),new R7}}var O7;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(O7||(O7={}));const Bee=3,jee=5;function Ig(e){return e>9999999999?e:e*1e3}function Ag(e){return e>9999999999?e/1e3:e}function Kc(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:Qe.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:En(t,10,1e3)}}),t.category==="console")))}const qee="button,a";function P7(e){return e.closest(qee)||e}function M7(e){const t=L7(e);return!t||!(t instanceof Element)?t:P7(t)}function L7(e){return zee(e)?e.target:e}function zee(e){return typeof e=="object"&&!!e&&"target"in e}let ko;function Hee(e){return ko||(ko=[],Vee()),ko.push(e),()=>{const t=ko?ko.indexOf(e):-1;t>-1&&ko.splice(t,1)}}function Vee(){$n(Mt,"open",function(e){return function(...t){if(ko)try{ko.forEach(n=>n())}catch{}return e.apply(Mt,t)}})}const Wee=new Set([Xe.Mutation,Xe.StyleSheetRule,Xe.StyleDeclaration,Xe.AdoptedStyleSheet,Xe.CanvasMutation,Xe.Selection,Xe.MediaInteraction]);function Gee(e,t,n){e.handleClick(t,n)}class Yee{constructor(t,n,r=Kc){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scrollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const t=Hee(()=>{this._lastMutation=D7()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(Xee(n,this._ignoreSelector)||!Jee(t))return;const r={timestamp:Ag(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(i=>i.node===r.node&&Math.abs(i.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=Ag(t)}registerScroll(t=Date.now()){this._lastScroll=Ag(t)}registerClick(t){const n=P7(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){const t=[],n=D7();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(const r of t){const i=this._clicks.indexOf(r);i>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(i,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,i=t.mutationAfter&&t.mutationAfter<=this._threshold,o=!r&&!i,{clickCount:s,clickBreadcrumb:a}=t;if(o){const l=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,c=l<this._timeout*1e3?"mutation":"timeout",u={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:Mt.location.href,route:n.getCurrentRoute(),timeAfterClickMs:l,endReason:c,clickCount:s||1}};this._addBreadcrumbEvent(n,u);return}if(s>1){const l={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:Mt.location.href,route:n.getCurrentRoute(),clickCount:s,metric:!0}};this._addBreadcrumbEvent(n,l)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=jc(()=>this._checkClicks(),1e3)}}const Kee=["A","BUTTON","INPUT"];function Xee(e,t){return!!(!Kee.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function Jee(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function D7(){return Date.now()/1e3}function Zee(e,t){try{if(!Qee(t))return;const{source:n}=t.data;if(Wee.has(n)&&e.registerMutation(t.timestamp),n===Xe.Scroll&&e.registerScroll(t.timestamp),ete(t)){const{type:r,id:i}=t.data,o=qr.mirror.getNode(i);o instanceof HTMLElement&&r===Hn.Click&&e.registerClick(o)}}catch{}}function Qee(e){return e.type===Bee}function ete(e){return e.data.source===Xe.MouseInteraction}function di(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var fp=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(fp||{});const tte=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function nte(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if(tte.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const rte=e=>t=>{if(!e.isEnabled())return;const n=ite(t);if(!n)return;const r=t.name==="click",i=r?t.event:void 0;r&&e.clickDetector&&i?.target&&!i.altKey&&!i.metaKey&&!i.ctrlKey&&!i.shiftKey&&Gee(e.clickDetector,n,M7(t.event)),Kc(e,n)};function F7(e,t){const n=qr.mirror.getId(e),r=n&&qr.mirror.getNode(n),i=r&&qr.mirror.getMeta(r),o=i&&ste(i)?i:null;return{message:t,data:o?{nodeId:n,node:{id:n,tagName:o.tagName,textContent:Array.from(o.childNodes).map(s=>s.type===fp.Text&&s.textContent).filter(Boolean).map(s=>s.trim()).join(""),attributes:nte(o.attributes)}}:{}}}function ite(e){const{target:t,message:n}=ote(e);return di({category:`ui.${e.name}`,...F7(t,n)})}function ote(e){const t=e.name==="click";let n,r=null;try{r=t?M7(e.event):L7(e.event),n=an(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function ste(e){return e.type===fp.Element}function ate(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=lte(t);n&&Kc(e,n)}function lte(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:o,target:s}=e;if(!s||cte(s)||!o)return null;const a=t||r||i,l=o.length===1;if(!a&&l)return null;const c=an(s,{maxStringLength:200})||"<unknown>",u=F7(s,c);return di({category:"ui.keyDown",message:c,data:{...u.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:o}})}function cte(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const ute={resource:_te,paint:pte,navigation:mte};function xg(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function dte(e){return e.map(fte).filter(Boolean)}function fte(e){const t=ute[e.entryType];return t?t(e):null}function Ma(e){return((tn()||Mt.performance.timeOrigin)+e)/1e3}function pte(e){const{duration:t,entryType:n,name:r,startTime:i}=e,o=Ma(i);return{type:n,name:r,start:o,end:o+t,data:void 0}}function mte(e){const{entryType:t,name:n,decodedBodySize:r,duration:i,domComplete:o,encodedBodySize:s,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,domInteractive:c,loadEventStart:u,loadEventEnd:d,redirectCount:f,startTime:p,transferSize:m,type:b}=e;return i===0?null:{type:`${t}.${b}`,start:Ma(p),end:Ma(o),name:n,data:{size:m,decodedBodySize:r,encodedBodySize:s,duration:i,domInteractive:c,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,loadEventStart:u,loadEventEnd:d,domComplete:o,redirectCount:f}}}function _te(e){const{entryType:t,initiatorType:n,name:r,responseEnd:i,startTime:o,decodedBodySize:s,encodedBodySize:a,responseStatus:l,transferSize:c}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:Ma(o),end:Ma(i),name:r,data:{size:c,statusCode:l,decodedBodySize:s,encodedBodySize:a}}}function hte(e){const t=e.entries[e.entries.length-1],n=t?.element?[t.element]:void 0;return Cg(e,"largest-contentful-paint",n)}function gte(e){return e.sources!==void 0}function yte(e){const t=[],n=[];for(const r of e.entries)if(gte(r)){const i=[];for(const o of r.sources)if(o.node){n.push(o.node);const s=qr.mirror.getId(o.node);s&&i.push(s)}t.push({value:r.value,nodeIds:i.length?i:void 0})}return Cg(e,"cumulative-layout-shift",n,t)}function bte(e){const t=e.entries[e.entries.length-1],n=t?.target?[t.target]:void 0;return Cg(e,"interaction-to-next-paint",n)}function Cg(e,t,n,r){const i=e.value,o=e.rating,s=Ma(i);return{type:"web-vital",name:t,start:s,end:s,data:{value:i,size:i,rating:o,nodeIds:n?n.map(a=>qr.mirror.getId(a)):void 0,attributions:r}}}function vte(e){function t(i){e.performanceEntries.includes(i)||e.performanceEntries.push(i)}function n({entries:i}){i.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(i=>{r.push($s(i,n))}),r.push(Uf(xg(hte,e)),Ff(xg(yte,e)),Zh(xg(bte,e))),()=>{r.forEach(i=>i())}}const Ve=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,$te='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new n(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort(function(t,n){return t.f-n.f}),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort(function(t,n){return p[n.s]-p[t.s]||t.f-n.f});s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[s[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(s[t]^s[t+1]<<A^s[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function Ste(){const e=new Blob([$te]);return URL.createObjectURL(e)}const U7=["log","warn","error"],pp="[Replay] ";function kg(e,t="info"){Dr({category:"console",data:{logger:"replay"},level:t,message:`${pp}${e}`},{level:t})}function Ete(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return Ve?(U7.forEach(r=>{n[r]=(...i)=>{B[r](pp,...i),t&&kg(i.join(""),Qd(r))}}),n.exception=(r,...i)=>{i.length&&n.error&&n.error(...i),B.error(pp,r),e?It(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&kg(r,"error")},n.infoTick=(...r)=>{B.log(pp,...r),t&&setTimeout(()=>kg(r[0]),0)}):U7.forEach(r=>{n[r]=()=>{}}),n}const We=Ete();class Ng extends Error{constructor(){super(`Event buffer exceeded maximum size of ${pg}.`)}}class B7{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>pg)throw new Ng;this.events.push(t)}finish(){return new Promise(t=>{const n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let t=null;for(const{timestamp:n}of this.events)(t===null||n<t)&&(t=n);return t===null?t:Ig(t)}}class Rg{constructor(t){Rg.prototype.__init.call(this),this._worker=t,this._id=0,this._pending=new Map,this._worker.addEventListener("message",this._onMessage)}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():(Ve&&We.warn("Received worker message with unsuccessful status",r),n(new Error("Received worker message with unsuccessful status")))},{once:!0}),this._worker.addEventListener("error",r=>{Ve&&We.warn("Failed to load Replay compression worker",r),n(new Error(`Failed to load Replay compression worker: ${r instanceof ErrorEvent&&r.message?r.message:"Unknown error. This can happen due to CSP policy restrictions, network issues, or the worker script failing to load."}`))},{once:!0})}),this._ensureReadyPromise)}destroy(){Ve&&We.log("Destroying compression worker"),this._worker.removeEventListener("message",this._onMessage),this._pending.forEach(t=>t.reject(new Error("Worker destroyed"))),this._pending.clear(),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((i,o)=>{this._pending.set(r,{method:t,resolve:i,reject:o});try{this._worker.postMessage({id:r,method:t,arg:n})}catch(s){this._pending.delete(r),o(s)}})}__init(){this._onMessage=({data:t})=>{const n=t;if(typeof n.id!="number")return;const r=this._pending.get(n.id);if(!(!r||r.method!==n.method)){if(this._pending.delete(n.id),!n.success){Ve&&We.error("Error in compression worker: ",n.response),r.reject(new Error("Error in compression worker"));return}r.resolve(n.response)}}}_getAndIncrementId(){return this._id++}}class Tte{constructor(t){this._worker=new Rg(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const n=Ig(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>pg?Promise.reject(new Ng):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{Ve&&We.exception(t,'Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class wte{constructor(t){this._fallback=new B7,this._compression=new Tte(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}set waitForCheckout(t){this._used.waitForCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){Ve&&We.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n,waitForCheckout:r}=this._fallback,i=[];for(const o of t)i.push(this._compression.addEvent(o));this._compression.hasCheckout=n,this._compression.waitForCheckout=r,this._used=this._compression;try{await Promise.all(i),this._fallback.clear()}catch(o){Ve&&We.exception(o,"Failed to add events when switching buffers.")}}}function Ite({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=Ate(t);if(n)return n}return Ve&&We.log("Using simple buffer"),new B7}function Ate(e){try{const t=e||xte();if(!t)return;Ve&&We.log(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new wte(n)}catch(t){Ve&&We.exception(t,"Failed to create compression worker")}}function xte(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?Ste():""}function Og(){try{return"sessionStorage"in Mt&&!!Mt.sessionStorage}catch{return!1}}function Cte(e){kte(),e.session=void 0}function kte(){if(Og())try{Mt.sessionStorage.removeItem(dg)}catch{}}function j7(e){return e===void 0?!1:Math.random()<e}function mp(e){if(Og())try{Mt.sessionStorage.setItem(dg,JSON.stringify(e))}catch{}}function q7(e){const t=Date.now(),n=e.id||ln(),r=e.started||t,i=e.lastActivity||t,o=e.segmentId||0,s=e.sampled,a=e.previousSessionId,l=e.dirty||!1;return{id:n,started:r,lastActivity:i,segmentId:o,sampled:s,previousSessionId:a,dirty:l}}function Nte(e,t){return j7(e)?"session":t?"buffer":!1}function z7({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const i=Nte(e,t),o=q7({sampled:i,previousSessionId:r});return n&&mp(o),o}function Rte(){if(!Og())return null;try{const e=Mt.sessionStorage.getItem(dg);if(!e)return null;const t=JSON.parse(e);return Ve&&We.infoTick("Loading existing session"),q7(t)}catch{return null}}function Pg(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function H7(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return Pg(e.started,t,r)||Pg(e.lastActivity,n,r)}function V7(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!H7(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function Mg({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const i=r.stickySession&&Rte();return i?V7(i,{sessionIdleExpire:e,maxReplayDuration:t})?(Ve&&We.infoTick("Session in sessionStorage is expired, creating new one..."),z7(r,{previousSessionId:i.id})):i:(Ve&&We.infoTick("Creating new session"),z7(r,{previousSessionId:n}))}function Ote(e){return e.type===Qe.Custom}function Lg(e,t,n){return G7(e,t)?(W7(e,t,n),!0):!1}function Pte(e,t,n){return G7(e,t)?W7(e,t,n):Promise.resolve(null)}async function W7(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const i=e.recordingMode==="buffer";try{n&&i&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const o=e.getOptions(),s=Mte(t,o.beforeAddRecordingEvent);return s?await r.addEvent(s):void 0}catch(o){const s=o&&o instanceof Ng,a=s?"eventBufferOverflow":"eventBufferError",l=Ie();if(l){const c=s?"buffer_overflow":"internal_sdk_error";l.recordDroppedEvent(c,"replay")}if(s&&i)return r.clear(),r.waitForCheckout=!0,null;e.handleException(o),await e.stop({reason:a})}}function G7(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=Ig(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(Ve&&We.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function Mte(e,t){try{if(typeof t=="function"&&Ote(e))return t(e)}catch(n){return Ve&&We.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function Dg(e){return!e.type}function Fg(e){return e.type==="transaction"}function Lte(e){return e.type==="replay_event"}function Y7(e){return e.type==="feedback"}function Dte(e){return(t,n)=>{if(!e.isEnabled()||!Dg(t)&&!Fg(t))return;const r=n.statusCode;if(!(!r||r<200||r>=300)){if(Fg(t)){Fte(e,t);return}Ute(e,t)}}}function Fte(e,t){const n=e.getContext();t.contexts?.trace?.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function Ute(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags?.replayId)return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||jc(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(i){e.handleException(i)}})}function Bte(e){return t=>{!e.isEnabled()||!Dg(t)||jte(e,t)}}function jte(e,t){const n=t.exception?.values?.[0]?.value;if(typeof n=="string"&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const r=di({category:"replay.hydrate-error",data:{url:ns()}});Kc(e,r)}}function qte(e){const t=Ie();t&&t.on("beforeAddBreadcrumb",n=>zte(e,n))}function zte(e,t){if(!e.isEnabled()||!K7(t))return;const n=Hte(t);n&&Kc(e,n)}function Hte(e){return!K7(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?Vte(e):di(e)}function Vte(e){const t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return di(e);let n=!1;const r=t.map(i=>{if(!i)return i;if(typeof i=="string")return i.length>Qf?(n=!0,`${i.slice(0,Qf)}…`):i;if(typeof i=="object")try{const o=En(i,7);return JSON.stringify(o).length>Qf?(n=!0,`${JSON.stringify(o,null,2).slice(0,Qf)}…`):o}catch{}return i});return di({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function K7(e){return!!e.category}function Wte(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function X7(){const e=Ke().getPropagationContext().dsc;e&&delete e.replay_id;const t=Ht();if(t){const n=br(t);delete n.replay_id}}function Gte(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:Qe.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function Yte(e,t){return e.recordingMode!=="buffer"||t.message===fg||!t.exception||t.type?!1:j7(e.getOptions().errorSampleRate)}function Kte(e){return Object.assign((t,n)=>{if(!e.isEnabled()||e.isPaused())return t;if(Lte(t))return delete t.breadcrumbs,t;if(!Dg(t)&&!Fg(t)&&!Y7(t))return t;if(!e.checkAndHandleExpiredSession())return X7(),t;if(Y7(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),Gte(e,t),t;if(Wte(t,n)&&!e.getOptions()._experiments.captureExceptions)return Ve&&We.log("Ignoring error from rrweb internals",t),null;const i=Yte(e,t);if((i||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),i&&e.recordingMode==="buffer"&&e.session?.sampled==="buffer"){const s=e.session;s.dirty=!0,e.getOptions().stickySession&&mp(s)}return t},{id:"Replay"})}function _p(e,t){return t.map(({type:n,start:r,end:i,name:o,data:s})=>{const a=e.throttledAddEvent({type:Qe.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:o,startTimestamp:r,endTimestamp:i,data:s}}});return typeof a=="string"?Promise.resolve(null):a})}function Xte(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function Jte(e){return t=>{if(!e.isEnabled())return;const n=Xte(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(_p(e,[n]),!1)))}}function Zte(e,t){return Ve&&e.getOptions()._experiments.traceInternals?!1:J4(t,Ie())}function J7(e,t){e.isEnabled()&&t!==null&&(Zte(e,t.name)||e.addUpdate(()=>(_p(e,[t]),!0)))}function hp(e){if(!e)return;const t=new TextEncoder;try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=v6(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function Z7(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function gp(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function Q7(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:i,method:o,statusCode:s,request:a,response:l}=t;return{type:e,start:n/1e3,end:r/1e3,name:i,data:{method:o,statusCode:s,request:a,response:l}}}function Xc(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function No(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:i,warnings:o}=Qte(n);return r.body=i,o?.length&&(r._meta={warnings:o}),r}function Ug(e,t){return Object.entries(e).reduce((n,[r,i])=>{const o=r.toLowerCase();return t.includes(o)&&e[r]&&(n[o]=i),n},{})}function Qte(e){if(!e||typeof e!="string")return{body:e};const t=e.length>K6,n=ene(e);if(t){const r=e.slice(0,K6);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function ene(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function yp(e,t){const n=tne(e);return Mr(n,t)}function tne(e,t=Mt.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(Mt.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function nne(e,t,n){try{const r=await ine(e,t,n),i=Q7("resource.fetch",r);J7(n.replay,i)}catch(r){Ve&&We.exception(r,"Failed to capture fetch breadcrumb")}}function rne(e,t){const{input:n,response:r}=t,i=n?ag(n):void 0,o=hp(i),s=r?Z7(r.headers.get("content-length")):void 0;o!==void 0&&(e.data.request_body_size=o),s!==void 0&&(e.data.response_body_size=s)}async function ine(e,t,n){const r=Date.now(),{startTimestamp:i=r,endTimestamp:o=r}=t,{url:s,method:a,status_code:l=0,request_body_size:c,response_body_size:u}=e.data,d=yp(s,n.networkDetailAllowUrls)&&!yp(s,n.networkDetailDenyUrls),f=d?one(n,t.input,c):Xc(c),p=await sne(d,n,t.response,u);return{startTimestamp:i,endTimestamp:o,url:s,method:a,statusCode:l,request:f,response:p}}function one({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const i=n?cne(n,t):{};if(!e)return No(i,r,void 0);const o=ag(n),[s,a]=Yf(o,We),l=No(i,r,s);return a?gp(l,a):l}async function sne(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,i){if(!e&&i!==void 0)return Xc(i);const o=r?eS(r.headers,n):{};if(!r||!t&&i!==void 0)return No(o,i,void 0);const[s,a]=await lne(r),l=ane(s,{networkCaptureBodies:t,responseBodySize:i,captureDetails:e,headers:o});return a?gp(l,a):l}function ane(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:i}){try{const o=e?.length&&n===void 0?hp(e):n;return r?t?No(i,o,e):No(i,o,void 0):Xc(o)}catch(o){return Ve&&We.exception(o,"Failed to serialize response body"),No(i,n,void 0)}}async function lne(e){const t=une(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await dne(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(Ve&&We.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(Ve&&We.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function eS(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function cne(e,t){return e.length===1&&typeof e[0]!="string"?tS(e[0],t):e.length===2?tS(e[1],t):{}}function tS(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?eS(n,t):Array.isArray(n)?{}:Ug(n,t):{}}function une(e){try{return e.clone()}catch(t){Ve&&We.exception(t,"Failed to clone response body")}}function dne(e){return new Promise((t,n)=>{const r=jc(()=>n(new Error("Timeout while trying to read response body")),500);fne(e).then(i=>t(i),i=>n(i)).finally(()=>clearTimeout(r))})}async function fne(e){return await e.text()}async function pne(e,t,n){try{const r=_ne(e,t,n),i=Q7("resource.xhr",r);J7(n.replay,i)}catch(r){Ve&&We.exception(r,"Failed to capture xhr breadcrumb")}}function mne(e,t){const{xhr:n,input:r}=t;if(!n)return;const i=hp(r),o=n.getResponseHeader("content-length")?Z7(n.getResponseHeader("content-length")):yne(n.response,n.responseType);i!==void 0&&(e.data.request_body_size=i),o!==void 0&&(e.data.response_body_size=o)}function _ne(e,t,n){const r=Date.now(),{startTimestamp:i=r,endTimestamp:o=r,input:s,xhr:a}=t,{url:l,method:c,status_code:u=0,request_body_size:d,response_body_size:f}=e.data;if(!l)return null;if(!a||!yp(l,n.networkDetailAllowUrls)||yp(l,n.networkDetailDenyUrls)){const N=Xc(d),w=Xc(f);return{startTimestamp:i,endTimestamp:o,url:l,method:c,statusCode:u,request:N,response:w}}const p=a[Xi],m=p?Ug(p.request_headers,n.networkRequestHeaders):{},b=Ug($6(a),n.networkResponseHeaders),[g,_]=n.networkCaptureBodies?Yf(s,We):[void 0],[y,T]=n.networkCaptureBodies?hne(a):[void 0],S=No(m,d,g),O=No(b,f,y);return{startTimestamp:i,endTimestamp:o,url:l,method:c,statusCode:u,request:_?gp(S,_):S,response:T?gp(O,T):O}}function hne(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return gne(e.response,e.responseType)}catch(n){t.push(n)}return Ve&&We.warn("Failed to get xhr response body",...t),[void 0]}function gne(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch(n){return Ve&&We.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Ve&&We.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function yne(e,t){try{const n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return hp(n)}catch{return}}function bne(e){const t=Ie();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:s}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:s};t&&t.on("beforeAddBreadcrumb",(l,c)=>vne(a,l,c))}catch{}}function vne(e,t,n){if(t.data)try{$ne(t)&&Ene(n)&&(mne(t,n),pne(t,n,e)),Sne(t)&&Tne(n)&&(rne(t,n),nne(t,n,e))}catch(r){Ve&&We.exception(r,"Error when enriching network breadcrumb")}}function $ne(e){return e.category==="xhr"}function Sne(e){return e.category==="fetch"}function Ene(e){return e?.xhr}function Tne(e){return e?.response}function wne(e){const t=Ie();y6(rte(e)),Wf(Jte(e)),qte(e),bne(e);const n=Kte(e);b4(n),t&&(t.on("beforeSendEvent",Bte(e)),t.on("afterSendEvent",Dte(e)),t.on("createDsc",r=>{const i=e.getSessionId();i&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(r.replay_id=i)}),t.on("spanStart",r=>{e.lastActiveSpan=r}),t.on("spanEnd",r=>{e.lastActiveSpan=r}),t.on("beforeSendFeedback",async(r,i)=>{const o=e.getSessionId();i?.includeReplay&&e.isEnabled()&&o&&r.contexts?.feedback&&(r.contexts.feedback.source==="api"&&await e.sendBufferedReplayOrFlush(),r.contexts.feedback.replay_id=o)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}async function Ine(e){try{return Promise.all(_p(e,[Ane(Mt.performance.memory)]))}catch{return[]}}function Ane(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,i=Date.now()/1e3;return{type:"memory",name:"memory",start:i,end:i,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function xne(e,t,n){return jH(e,t,{...n,setTimeoutImpl:jc})}const bp=je.navigator;function Cne(){return/iPhone|iPad|iPod/i.test(bp?.userAgent??"")||/Macintosh/i.test(bp?.userAgent??"")&&bp?.maxTouchPoints&&bp?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function kne(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){Ve&&We.warn("Received replay event after session expired.");return}const i=r||!t;t=!0,Nne(n),e.clickDetector&&Zee(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&i&&e.setInitialState(),!Lg(e,n,i))return!0;if(!i)return!1;const o=e.session;if(One(e,i),e.recordingMode==="buffer"&&o&&e.eventBuffer&&!o.dirty){const s=e.eventBuffer.getEarliestTimestamp();s&&(Ve&&We.log(`Updating session start time to earliest event in buffer to ${new Date(s)}`),o.started=s,e.getOptions().stickySession&&mp(o))}return o?.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function Nne(e){const t=e.data;if(!(e.type!==Qe.IncrementalSnapshot||!t||typeof t!="object"||!("source"in t)||t.source!==Xe.Mutation||!("attributes"in t)||!Array.isArray(t.attributes)))for(const n of t.attributes){const r=qr.mirror.getNode(n.id),i=r&&qr.mirror.getMeta(r);if(i?.type===fp.Element)for(const[o,s]of Object.entries(n.attributes))s===null?delete i.attributes[o]:i.attributes[o]=s}}function Rne(e){const t=e.getOptions();return{type:Qe.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function One(e,t){!t||e.session?.segmentId!==0||Lg(e,Rne(e),!1)}function Pne(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Mne(e,t,n,r){return vr(X9(e,pc(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function Lne({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
|
|
526
|
+
`;if(typeof e=="string")n=`${r}${e}`;else{const o=new TextEncoder().encode(r);n=new Uint8Array(o.length+e.length),n.set(o),n.set(e,o.length)}return n}async function Dne({client:e,scope:t,replayId:n,event:r}){const i=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,o={event_id:n,integrations:i};e.emit("preprocessEvent",r,o);const s=await m4(e.getOptions(),r,o,t,e,qt());if(!s)return null;e.emit("postprocessEvent",s,o),s.platform=s.platform||"javascript";const a=e.getSdkMetadata(),{name:l,version:c,settings:u}=a?.sdk||{};return s.sdk={...s.sdk,name:l||"sentry.javascript.unknown",version:c||"0.0.0",settings:u},s}async function Fne({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:i,session:o}){const s=Lne({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:l,traceIds:c,initialTimestamp:u}=r,d=Ie(),f=Ke(),p=d?.getTransport(),m=d?.getDsn();if(!d||!p||!m||!o.sampled)return Promise.resolve({});const b={type:mQ,replay_start_timestamp:u/1e3,timestamp:i/1e3,error_ids:l,trace_ids:c,urls:a,replay_id:t,segment_id:n,replay_type:o.sampled},g=await Dne({scope:f,client:d,replayId:t,event:b});if(!g)return d.recordDroppedEvent("event_processor","replay"),Ve&&We.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete g.sdkProcessingMetadata;const _=Mne(g,s,m,d.getOptions().tunnel);let y;try{y=await p.send(_)}catch(S){const O=new Error(fg);try{O.cause=S}catch{}throw O}const T=R4({},y);if(N4(T,"replay"))throw new Bg(T);if(typeof y.statusCode=="number"&&(y.statusCode<200||y.statusCode>=300))throw new nS(y.statusCode);return y}class nS extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class Bg extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}class rS extends Error{constructor(){super("Session is too long, not sending replay")}}async function iS(e,t={count:0,interval:vQ}){const{recordingData:n,onError:r}=e;if(n.length)try{return await Fne(e),!0}catch(i){if(i instanceof nS||i instanceof Bg)throw i;if(h4("Replays",{_retryCount:t.count}),r&&r(i),t.count>=$Q){const o=new Error(`${fg} - max retries exceeded`);try{o.cause=i}catch{}throw o}return t.interval*=++t.count,new Promise((o,s)=>{jc(async()=>{try{await iS(e,t),o(!0)}catch(a){s(a)}},t.interval)})}}const oS="__THROTTLED",Une="__SKIPPED";function Bne(e,t,n){const r=new Map,i=a=>{const l=a-n;r.forEach((c,u)=>{u<l&&r.delete(u)})},o=()=>[...r.values()].reduce((a,l)=>a+l,0);let s=!1;return(...a)=>{const l=Math.floor(Date.now()/1e3);if(i(l),o()>=t){const u=s;return s=!0,u?Une:oS}s=!1;const c=r.get(l)||0;return r.set(l,c+1),e(...a)}}class jne{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:_Q,sessionIdleExpire:hQ},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=t,this._debouncedFlush=xne(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=Bne((s,a)=>Pte(this,s,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:i}=this.getOptions(),o=r?{threshold:Math.min(SQ,r),timeout:r,scrollTimeout:EQ,ignoreSelector:i?i.join(","):""}:void 0;if(o&&(this.clickDetector=new Yee(this,o)),Ve){const s=t._experiments;We.setConfig({captureExceptions:!!s.captureExceptions,traceInternals:!!s.traceInternals})}this._handleVisibilityChange=()=>{Mt.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const s=di({category:"ui.blur"});this._doChangeToBackgroundTasks(s)},this._handleWindowFocus=()=>{const s=di({category:"ui.focus"});this._doChangeToForegroundTasks(s)},this._handleKeyboardEvent=s=>{ate(this,s)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){Ve&&We.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:r}=this._options,i=n<=0&&r<=0;if(this._requiresManualStart=i,!i){if(this._initializeSessionForSampling(t),!this.session){Ve&&We.exception(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",Ve&&We.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){Ve&&We.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){Ve&&We.log("Buffering is in progress, call `flush()` to save the replay");return}Ve&&We.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=Mg({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled){Ve&&We.log("Buffering is in progress, call `flush()` to save the replay");return}Ve&&We.infoTick("Starting replay in buffer mode");const t=Mg({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=qr({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:bQ}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:kne(this),...Cne(),onMutation:this._onMutationHandler.bind(this),...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this.handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){if(!this._isEnabled)return;this._isEnabled=!1,this.recordingMode="buffer";const r=n??"manual";Ie()?.emit("replayEnd",{sessionId:this.session?.id,reason:r});try{Ve&&We.log(`Stopping Replay triggered by ${r}`),X7(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,Cte(this)}catch(i){this.handleException(i)}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),Ve&&We.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),Ve&&We.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();Ve&&We.log("Converting buffer to session"),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this.session.dirty=!1,this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const n=t();this.recordingMode==="buffer"||!this._isEnabled||n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(t){if(!(t&&this.session?.sampled===!1))return this.session?.id}checkAndHandleExpiredSession(){if(this._lastActivity&&Pg(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session?.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${Mt.location.pathname}${Mt.location.hash}${Mt.location.search}`,n=`${Mt.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){const r=this._throttledAddEvent(t,n);if(r===oS){const i=di({category:"replay.throttled"});this.addUpdate(()=>!Lg(this,{type:jee,timestamp:i.timestamp||0,data:{tag:"breadcrumb",payload:i,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||Ht(),n=t&&zt(t),i=(n&&Je(n).data||{})[Jt];if(!(!n||!i||!["route","custom"].includes(i)))return Je(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Ite({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.session&&Ie()?.emit("replayStart",{sessionId:this.session.id,recordingMode:this.recordingMode}),this.startRecording()}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=Mg({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const t=this.session;return V7(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"sessionExpired"}),this.initializeSampling(t.id))}_addListeners(){try{Mt.document.addEventListener("visibilitychange",this._handleVisibilityChange),Mt.addEventListener("blur",this._handleWindowBlur),Mt.addEventListener("focus",this._handleWindowFocus),Mt.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(wne(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=vte(this)}_removeListeners(){try{Mt.document.removeEventListener("visibilitychange",this._handleVisibilityChange),Mt.removeEventListener("blur",this._handleWindowBlur),Mt.removeEventListener("focus",this._handleWindowFocus),Mt.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){!this.session||H7(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){Ve&&We.log("Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:Qe.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=dte(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const n=this._context.initialTimestamp/1e3;t=t.filter(r=>r.start>=n)}return Promise.all(_p(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||this._requiresManualStart||t.segmentId)return;const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){Ve&&We.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await Ine(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new rS;const r=this._popEventContext(),i=this.session.segmentId++;this._maybeSaveSession();const o=await this.eventBuffer.finish();await iS({replayId:t,recordingData:o,segmentId:i,eventContext:r,session:this.session,timestamp:n,onError:s=>this.handleException(s)})}catch(n){this.handleException(n),this.stop({reason:"sendError"});const r=Ie();if(r){let i;n instanceof Bg?i="ratelimit_backoff":n instanceof rS?i="invalid":i="send_error",r.recordDroppedEvent(i,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){Ve&&We.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,i=Date.now()-n;this._debouncedFlush.cancel();const o=i<this._options.minReplayDuration,s=i>this._options.maxReplayDuration+5e3;if(o||s){Ve&&We.log(`Session duration (${Math.floor(i/1e3)}s) is too ${o?"short":"long"}, not sending replay.`),o&&this._debouncedFlush();return}const a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&Ve&&We.log("Flushing initial segment without checkout.");const l=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(c){this.handleException(c)}finally{this._flushLock=void 0,l&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&mp(this.session)}_onMutationHandler(t){const{ignoreMutations:n}=this._options._experiments;if(n?.length&&t.some(a=>{const l=Pne(a.target),c=n.join(",");return l?.matches(c)}))return!1;const r=t.length,i=this._options.mutationLimit,o=this._options.mutationBreadcrumbLimit,s=i&&r>i;if(r>o||s){const a=di({category:"replay.mutations",data:{count:r,limit:s}});this._createCustomBreadcrumb(a)}return s?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function Jc(e,t){return[...e,...t].join(",")}function qne({mask:e,unmask:t,block:n,unblock:r,ignore:i}){const o=["base","iframe[srcdoc]:not([src])"],s=Jc(e,[".sentry-mask","[data-sentry-mask]"]),a=Jc(t,[]);return{maskTextSelector:s,unmaskTextSelector:a,blockSelector:Jc(n,[".sentry-block","[data-sentry-block]",...o]),unblockSelector:Jc(r,[]),ignoreSelector:Jc(i,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function zne({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:i,value:o}){if(i.unmaskTextSelector&&e.matches(i.unmaskTextSelector))return o;const s=n.includes(t),a=r&&t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"");return s||a?o.replace(/[\S]/g,"*"):o}const sS='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',Hne=["content-length","content-type","accept"],Vne=Symbol.for("sentry__originalRequestBody");let aS=!1,lS=!1;function Wne(){if(typeof Request>"u"||lS)return;const e=Request;try{const t=function(n,r){const i=new e(n,r);return r?.body!=null&&(i[Vne]=r.body),i};t.prototype=e.prototype,je.Request=t,lS=!0}catch{}}const Gne=(e=>new Yne(e));class Yne{constructor({flushMinDelay:t=gQ,flushMaxDelay:n=yQ,minReplayDuration:r=TQ,maxReplayDuration:i=X6,stickySession:o=!0,useCompression:s=!0,workerUrl:a,_experiments:l={},maskAllText:c=!0,maskAllInputs:u=!0,blockAllMedia:d=!0,mutationBreadcrumbLimit:f=750,mutationLimit:p=1e4,slowClickTimeout:m=7e3,slowClickIgnoreSelectors:b=[],networkDetailAllowUrls:g=[],networkDetailDenyUrls:_=[],networkCaptureBodies:y=!0,networkRequestHeaders:T=[],networkResponseHeaders:S=[],mask:O=[],maskAttributes:N=["title","placeholder","aria-label"],unmask:w=[],block:D=[],unblock:Y=[],ignore:q=[],maskFn:P,beforeAddRecordingEvent:C,beforeErrorSampling:F,onError:R,attachRawBodyFromRequest:G=!1}={}){this.name="Replay";const z=qne({mask:O,unmask:w,block:D,unblock:Y,ignore:q});if(this._recordingOptions={maskAllInputs:u,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:P,maskInputFn:P,maskAttributeFn:(K,M,oe)=>zne({maskAttributes:N,maskAllText:c,privacyOptions:z,key:K,value:M,el:oe}),...z,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:K=>{try{K.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!l.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,wQ),maxReplayDuration:Math.min(i,X6),stickySession:o,useCompression:s,workerUrl:a,blockAllMedia:d,maskAllInputs:u,maskAllText:c,mutationBreadcrumbLimit:f,mutationLimit:p,slowClickTimeout:m,slowClickIgnoreSelectors:b,networkDetailAllowUrls:g,networkDetailDenyUrls:_,networkCaptureBodies:y,networkRequestHeaders:cS(T),networkResponseHeaders:cS(S),beforeAddRecordingEvent:C,beforeErrorSampling:F,onError:R,attachRawBodyFromRequest:G,_experiments:l},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${sS}`:sS,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&Ac())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return aS}set _isInitialized(t){aS=t}afterAllSetup(t){!Ac()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&Wne(),this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session",reason:"manual"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(t){if(this._replay?.isEnabled())return this._replay.getSessionId(t)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=Kne(this._initialOptions,t);this._replay=new jne({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}function Kne(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},i=ss(n.replaysSessionSampleRate),o=ss(n.replaysOnErrorSampleRate);return i==null&&o==null&&Or(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),i!=null&&(r.sessionSampleRate=i),o!=null&&(r.errorSampleRate=o),r}function cS(e){return[...Hne,...e.map(t=>t.toLowerCase())]}function Xne(){return Ie()?.getIntegrationByName("Replay")}var Jne=Object.defineProperty,Zne=(e,t,n)=>t in e?Jne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,uS=(e,t,n)=>Zne(e,typeof t!="symbol"?t+"":t,n);class Qne{constructor(){uS(this,"idNodeMap",new Map),uS(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(n,i)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function ere(){return new Qne}function tre(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function jg(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:jg(e.parentNode,t,n,r+1)}function dS(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(tre(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}const La=`Please stop import mirror directly. Instead of that,\r
|
|
527
527
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
528
|
-
or you can use record.mirror to access the mirror instance during recording.`;let f7={map:{},getId(){return console.error(La),-1},getNode(){return console.error(La),null},removeNodeFromMap(){console.error(La)},has(){return console.error(La),!1},reset(){console.error(La)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(f7=new Proxy(f7,{get(e,t,n){return t==="map"&&console.error(La),Reflect.get(e,t,n)}}));function qg(e,t,n,r,i=window){const o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(s){_7(()=>{n.set.call(this,s)},0),o&&o.set&&o.set.call(this,s)}}),()=>qg(e,t,o||{},!0)}function zg(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}Date.now().toString();function nre(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function vp(e,t,n,r,i){if(!e)return!1;const o=nre(e);if(!o)return!1;const s=d7(t,n),a=jg(o,s);let l=-1;return a<0?!1:(r&&(l=jg(o,d7(null,r))),a>-1&&l<0?!0:a<l)}const p7={};function m7(e){const t=p7[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);const o=i.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(i)}catch{}return p7[e]=r.bind(window)}function Es(...e){return m7("requestAnimationFrame")(...e)}function _7(...e){return m7("setTimeout")(...e)}var Da=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Da||{});let $p;function rre(e){$p=e}const Hg=e=>$p?(...n)=>{try{return e(...n)}catch(r){if($p&&$p(r)===!0)return()=>{};throw r}}:e;for(var Fa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ire=typeof Uint8Array>"u"?[]:new Uint8Array(256),Sp=0;Sp<Fa.length;Sp++)ire[Fa.charCodeAt(Sp)]=Sp;var ore=function(e){var t=new Uint8Array(e),n,r=t.length,i="";for(n=0;n<r;n+=3)i+=Fa[t[n]>>2],i+=Fa[(t[n]&3)<<4|t[n+1]>>4],i+=Fa[(t[n+1]&15)<<2|t[n+2]>>6],i+=Fa[t[n+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const h7=new Map;function sre(e,t){let n=h7.get(e);return n||(n=new Map,h7.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const g7=(e,t,n)=>{if(!e||!(b7(e,t)||typeof e=="object"))return;const r=e.constructor.name,i=sre(n,r);let o=i.indexOf(e);return o===-1&&(o=i.length,i.push(e)),o};function Ep(e,t,n){if(e instanceof Array)return e.map(r=>Ep(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const r=e.constructor.name,i=ore(e);return{rr_type:r,base64:i}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Ep(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:i}=e;return{rr_type:r,src:i}}else if(e instanceof HTMLCanvasElement){const r="HTMLImageElement",i=e.toDataURL();return{rr_type:r,src:i}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Ep(e.data,t,n),e.width,e.height]};if(b7(e,t)||typeof e=="object"){const r=e.constructor.name,i=g7(e,t,n);return{rr_type:r,index:i}}}}return e}const y7=(e,t,n)=>e.map(r=>Ep(r,t,n)),b7=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof t[i]=="function").find(i=>e instanceof t[i]);function are(e,t,n,r,i){const o=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const a of s)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;const l=zg(t.CanvasRenderingContext2D.prototype,a,function(c){return function(...u){return vp(this.canvas,n,r,i,!0)||_7(()=>{const d=y7(u,t,this);e(this.canvas,{type:Da["2D"],property:a,args:d})},0),c.apply(this,u)}});o.push(l)}catch{const l=qg(t.CanvasRenderingContext2D.prototype,a,{set(c){e(this.canvas,{type:Da["2D"],property:a,args:[c],setter:!0})}});o.push(l)}return()=>{o.forEach(a=>a())}}function lre(e){return e==="experimental-webgl"?"webgl":e}function v7(e,t,n,r,i){const o=[];try{const s=zg(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(l,...c){if(!vp(this,t,n,r,!0)){const u=lre(l);if("__context"in this||(this.__context=u),i&&["webgl","webgl2"].includes(u))if(c[0]&&typeof c[0]=="object"){const d=c[0];d.preserveDrawingBuffer||(d.preserveDrawingBuffer=!0)}else c.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[l,...c])}});o.push(s)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{o.forEach(s=>s())}}function $7(e,t,n,r,i,o,s,a){const l=[],c=Object.getOwnPropertyNames(e);for(const u of c)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(u))try{if(typeof e[u]!="function")continue;const d=zg(e,u,function(f){return function(...p){const m=f.apply(this,p);if(g7(m,a,this),"tagName"in this.canvas&&!vp(this.canvas,r,i,o,!0)){const b=y7(p,a,this),g={type:t,property:u,args:b};n(this.canvas,g)}return m}});l.push(d)}catch{const d=qg(e,u,{set(f){n(this.canvas,{type:t,property:u,args:[f],setter:!0})}});l.push(d)}return l}function cre(e,t,n,r,i,o){const s=[];return s.push(...$7(t.WebGLRenderingContext.prototype,Da.WebGL,e,n,r,i,o,t)),typeof t.WebGL2RenderingContext<"u"&&s.push(...$7(t.WebGL2RenderingContext.prototype,Da.WebGL2,e,n,r,i,o,t)),()=>{s.forEach(a=>a())}}const ure='for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="undefined"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s="";for(a=0;a<r;a+=3)s+=e[n[a]>>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!("OffscreenCanvas"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+"-"+t;if("OffscreenCanvas"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext("2d");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return""}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext("bitmaprenderer"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:"low"});w?.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};';function dre(){const e=new Blob([ure]);return URL.createObjectURL(e)}class fre{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.shadowDoms=new Set,this.windowsSet=new WeakSet,this.windows=[],this.restoreHandlers=[],this.frozen=!1,this.locked=!1,this.snapshotInProgressMap=new Map,this.worker=null,this.lastSnapshotTime=0,this.processMutation=(a,l)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(l)};const{enableManualSnapshot:n,sampling:r="all",win:i,recordCanvas:o,errorHandler:s}=t;t.sampling=r,this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.options=t,s&&rre(s),(o&&typeof r=="number"||n)&&(this.worker=this.initFPSWorker()),this.addWindow(i),!n&&Hg(()=>{o&&r==="all"&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),o&&typeof r=="number"&&this.initCanvasFPSObserver()})()}reset(){this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.windowsSet=new WeakSet,this.windows=[],this.shadowDoms=new Set,this.worker?.terminate(),this.worker=null,this.snapshotInProgressMap=new Map}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}addWindow(t){const{sampling:n="all",blockClass:r,blockSelector:i,unblockSelector:o,recordCanvas:s,enableManualSnapshot:a}=this.options;if(!this.windowsSet.has(t)){if(a){this.windowsSet.add(t),this.windows.push(new WeakRef(t));return}Hg(()=>{if(s&&n==="all"&&this.initCanvasMutationObserver(t,r,i,o),s&&typeof n=="number"){const l=v7(t,r,i,o,!0);this.restoreHandlers.push(()=>{l()})}})(),this.windowsSet.add(t),this.windows.push(new WeakRef(t))}}addShadowRoot(t){this.shadowDoms.add(new WeakRef(t))}resetShadowRoots(){this.shadowDoms=new Set}snapshot(t,n){if(n?.skipRequestAnimationFrame){this.takeSnapshot(performance.now(),!0,t);return}Es(r=>this.takeSnapshot(r,!0,t))}initFPSWorker(){const t=new Worker(dre());return t.onmessage=n=>{const r=n.data,{id:i}=r;if(this.snapshotInProgressMap.set(i,!1),!("base64"in r))return;const{base64:o,type:s,width:a,height:l}=r;this.mutationCb({id:i,type:Da["2D"],commands:[{property:"clearRect",args:[0,0,a,l]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:o}],type:s}]},0,0,a,l]}]})},t}initCanvasFPSObserver(){let t;if(!this.windows.length&&!this.shadowDoms.size)return;const n=r=>{this.takeSnapshot(r,!1),t=Es(n)};t=Es(n),this.restoreHandlers.push(()=>{t&&cancelAnimationFrame(t)})}initCanvasMutationObserver(t,n,r,i){const o=v7(t,n,r,i,!1),s=are(this.processMutation.bind(this),t,n,r,i),a=cre(this.processMutation.bind(this),t,n,r,i,this.mirror);this.restoreHandlers.push(()=>{o(),s(),a()})}getCanvasElements(t,n,r){const i=[],o=s=>{s.querySelectorAll("canvas").forEach(a=>{vp(a,t,n,r)||i.push(a)})};for(const s of this.windows){const a=s.deref();let l;try{l=a&&a.document}catch{}l&&o(l)}for(const s of this.shadowDoms){const a=s.deref();a&&o(a)}return i}takeSnapshot(t,n,r){const{sampling:i,blockClass:o,blockSelector:s,unblockSelector:a,dataURLOptions:l,maxCanvasSize:c}=this.options,d=1e3/(i==="all"?2:i||2);return this.lastSnapshotTime&&t-this.lastSnapshotTime<d?!1:(this.lastSnapshotTime=t,(r?[r]:this.getCanvasElements(o,s,a)).forEach(m=>{const b=this.mirror.getId(m);if(!(!this.mirror.hasNode(m)||!m.width||!m.height||this.snapshotInProgressMap.get(b))){if(this.snapshotInProgressMap.set(b,!0),!n&&["webgl","webgl2"].includes(m.__context)){const g=m.getContext(m.__context);g?.getContextAttributes()?.preserveDrawingBuffer===!1&&g.clear(g.COLOR_BUFFER_BIT)}createImageBitmap(m).then(g=>{this.worker?.postMessage({id:b,bitmap:g,width:m.width,height:m.height,dataURLOptions:l,maxCanvasSize:c},[g])}).catch(g=>{Hg(()=>{throw this.snapshotInProgressMap.delete(b),g})()})}}),!0)}startPendingCanvasMutationFlusher(){Es(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,Es(t)};Es(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),Es(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;const i=r.map(s=>{const{type:a,...l}=s;return l}),{type:o}=r[0];this.mutationCb({id:n,type:o,commands:i}),this.pendingCanvasMutations.delete(t)}}try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}ere();var S7;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(S7||(S7={}));const E7={low:{sampling:{canvas:1},dataURLOptions:{type:"image/webp",quality:.25}},medium:{sampling:{canvas:2},dataURLOptions:{type:"image/webp",quality:.4}},high:{sampling:{canvas:4},dataURLOptions:{type:"image/webp",quality:.5}}},pre="ReplayCanvas",Tp=1280,mre=((e={})=>{const[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,Tp):Tp,n?Math.min(n,Tp):Tp]};let i,o;const s=new Promise(a=>o=a);return{name:pre,getOptions(){const{quality:a,enableManualSnapshot:l,maxCanvasSize:c}=r;return{enableManualSnapshot:l,recordCanvas:!0,getCanvasManager:u=>{const d=new fre({...u,enableManualSnapshot:l,maxCanvasSize:c,errorHandler:f=>{try{typeof f=="object"&&(f.__rrweb__=!0)}catch{}}});return i=d,o(d),d},...E7[a]||E7.medium}},async snapshot(a,l){(i||await s).snapshot(a,l)}}});function _re(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function T7(e){try{return new URL(e,Pe.location.origin).href}catch{return}}function hre(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function w7(e){try{return new Headers(e)}catch{return}}const I7=new WeakMap,Vg=new Map,Wg={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function A7(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:i,shouldCreateSpanForRequest:o,enableHTTPTimings:s,tracePropagationTargets:a,onRequestSpanStart:l,onRequestSpanEnd:c}={...Wg,...t},u=typeof o=="function"?o:m=>!0,d=m=>yre(m,a),f={},p=e.getOptions().propagateTraceparent;n&&(e.addEventProcessor(m=>(m.type==="transaction"&&m.spans&&m.spans.forEach(b=>{if(b.op==="http.client"){const g=Vg.get(b.span_id);g&&(b.timestamp=g/1e3,Vg.delete(b.span_id))}}),m)),i&&CY(m=>{if(m.response){const b=I7.get(m.response);b&&m.endTimestamp&&Vg.set(b,m.endTimestamp)}}),Ih(m=>{const b=tW(m,u,d,f,{propagateTraceparent:p,onRequestSpanEnd:c});if(m.response&&m.fetchData.__span&&I7.set(m.response,m.fetchData.__span),b){const g=T7(m.fetchData.url),_=g?us(g).host:void 0;b.setAttributes({"http.url":g?So(g):void 0,"server.address":_}),s&&x7(b,e),l?.(b,{headers:m.headers})}})),r&&sg(m=>{const b=bre(m,u,d,f,p,c);b&&(s&&x7(b,e),l?.(b,{headers:w7(m.xhr.__sentry_xhr_v3__?.request_headers)}))})}const gre=300;function x7(e,t){const{url:n}=Je(e).data;if(!n||typeof n!="string")return;let r=()=>void setTimeout(i);if(Vi(t)){const o=e.end.bind(e);e.end=s=>{const a=s??Ct();let l=!1;const c=()=>{l||(l=!0,setTimeout(i),o(a),clearTimeout(u))};r=c;const u=setTimeout(c,gre)}}const i=$s("resource",({entries:o})=>{o.forEach(s=>{hre(s)&&s.name.endsWith(n)&&(e.setAttributes(m6(s)),r())})})}function yre(e,t){const n=ns();if(n){let r,i;try{r=new URL(e,n),i=new URL(n).origin}catch{return!1}const o=r.origin===i;return t?Mr(r.toString(),t)||o&&Mr(r.pathname,t):o}else{const r=!!e.match(/^\/(?!\/)/);return t?Mr(e,t):r}}function bre(e,t,n,r,i,o){const s=e.xhr,a=s?.[Xi];if(!s||s.__sentry_own_request__||!a)return;const{url:l,method:c}=a,u=or()&&t(l);if(e.endTimestamp){const _=s.__sentry_xhr_span_id__;if(!_)return;const y=r[_];y&&(u&&a.status_code!==void 0&&(cc(y,a.status_code),y.end(),o?.(y,{headers:w7($6(s)),error:e.error})),delete r[_]);return}const d=T7(l),f=us(d||l),p=So(X4(l)),m=Ie(),b=!!Ht(),g=u&&b?li({name:`${c} ${p}`,attributes:{url:So(l),type:"xhr","http.method":c,"http.url":d?So(d):void 0,"server.address":f?.host,[it]:"auto.http.browser",[yt]:"http.client",...f?.search&&{"http.query":f?.search},...f?.hash&&{"http.fragment":f?.hash}}}):new sr;return u&&!b&&m?.recordDroppedEvent("no_parent_span","span"),s.__sentry_xhr_span_id__=g.spanContext().spanId,r[s.__sentry_xhr_span_id__]=g,n(l)&&vre(s,or()&&b?g:void 0,i),m&&m.emit("beforeOutgoingRequestSpan",g,e),g}function vre(e,t,n){const{"sentry-trace":r,baggage:i,traceparent:o}=oh({span:t,propagateTraceparent:n});r&&$re(e,r,i,o)}function $re(e,t,n,r){const i=e.__sentry_xhr_v3__?.request_headers;if(!(i?.["sentry-trace"]||!e.setRequestHeader))try{if(e.setRequestHeader("sentry-trace",t),r&&!i?.traceparent&&e.setRequestHeader("traceparent",r),n){const o=i?.baggage;(!o||!_re(o))&&e.setRequestHeader("baggage",n)}}catch{}}function Sre(){Pe.document?Pe.document.addEventListener("visibilitychange",()=>{const e=Ht();if(!e)return;const t=zt(e);if(Pe.document.hidden&&t){const n="cancelled",{op:r,status:i}=Je(t);$e&&B.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),i||t.setStatus({code:st,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):$e&&B.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const Ere=3600,C7="sentry_previous_trace",Tre="sentry.previous_trace";function wre(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let i=r?xre():void 0;e.on("spanStart",s=>{if(zt(s)!==s)return;const a=Ke().getPropagationContext();i=Ire(i,s,a),r&&Are(i)});let o=!0;n&&e.on("beforeSampling",s=>{if(!i)return;const a=Ke(),l=a.getPropagationContext();if(o&&l.parentSpanId){o=!1;return}a.setPropagationContext({...l,dsc:{...l.dsc,sample_rate:String(i.sampleRate),sampled:String(Gg(i.spanContext))},sampleRand:i.sampleRand}),s.parentSampled=Gg(i.spanContext),s.parentSampleRate=i.sampleRate,s.spanAttributes={...s.spanAttributes,[f$]:i.sampleRate}})}function Ire(e,t,n){const r=Je(t);function i(){try{return Number(n.dsc?.sample_rate)??Number(r.data?.[Od])}catch{return 0}}const o={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:i(),sampleRand:n.sampleRand};if(!e)return o;const s=e.spanContext;return s.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=Ere&&($e&&B.log(`Adding previous_trace \`${JSON.stringify(s)}\` link to span \`${JSON.stringify({op:r.op,...t.spanContext()})}\``),t.addLink({context:s,attributes:{[aq]:"previous_trace"}}),t.setAttribute(Tre,`${s.traceId}-${s.spanId}-${Gg(s)?1:0}`)),o)}function Are(e){try{Pe.sessionStorage.setItem(C7,JSON.stringify(e))}catch(t){$e&&B.warn("Could not store previous trace in sessionStorage",t)}}function xre(){try{const e=Pe.sessionStorage?.getItem(C7);return JSON.parse(e)}catch{return}}function Gg(e){return e.traceFlags===1}const Cre="BrowserTracing",kre=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function k7(){const e=Pe.navigator;return e?.userAgent?kre.test(e.userAgent):!1}const Nre={...Vd,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...Wg},N7=((e={})=>{"enableElementTiming"in e&&Or(()=>{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=Pe.document,{enableInp:r,enableLongTask:i,enableLongAnimationFrame:o,_experiments:{enableInteractions:s,enableStandaloneClsSpans:a,enableStandaloneLcpSpans:l},beforeStartSpan:c,idleTimeout:u,finalTimeout:d,childSpanTimeout:f,markBackgroundSpan:p,traceFetch:m,traceXHR:b,trackFetchStreamPerformance:g,shouldCreateSpanForRequest:_,enableHTTPTimings:y,ignoreResourceSpans:T,ignorePerformanceApiSpans:S,instrumentPageLoad:O,instrumentNavigation:N,detectRedirects:w,linkPreviousTrace:D,consistentTraceSampling:Y,enableReportPageLoaded:q,onRequestSpanStart:P,onRequestSpanEnd:C}={...Nre,...e},F=k7();let R,G,z;function K(M,oe,te=!0){const se=oe.op==="pageload",_e=oe.name,ce=c?c(oe):oe,ye=ce.attributes||{};if(_e!==ce.name&&(ye[Jt]="custom",ce.attributes=ye),!te){const ge=is();li({...ce,startTime:ge}).end(ge);return}t.name=ce.name,t.source=ye[Jt];const Te=a4(ce,{idleTimeout:u,finalTimeout:d,childSpanTimeout:f,disableAutoFinish:se,beforeSpanEnd:ge=>{R?.();const Ce=Vi(M);tJ(ge,{recordClsOnPageloadSpan:!Ce&&!a,recordLcpOnPageloadSpan:!Ce&&!l,ignoreResourceSpans:T,ignorePerformanceApiSpans:S,spanStreamingEnabled:Ce}),L7(M,void 0);const Me=Ke(),Ue=Me.getPropagationContext();Me.setPropagationContext({...Ue,traceId:Te.spanContext().traceId,sampled:Hi(Te),dsc:br(ge)}),se&&(z=void 0)},trimIdleSpanEndTimestamp:!q});se&&q&&(z=Te),L7(M,Te);function le(){n&&["interactive","complete"].includes(n.readyState)&&M.emit("idleSpanEnableAutoFinish",Te)}se&&!q&&n&&(n.addEventListener("readystatechange",()=>{le()}),le())}return{name:Cre,setup(M){if(F){$e&&B.log("[Tracing] Skipping browserTracingIntegration setup for bot user agent.");return}j$();const oe=Vi(M);if(R=YX({recordClsStandaloneSpans:oe?void 0:a||!1,recordLcpStandaloneSpans:oe?void 0:l||!1,client:M}),oe?(vJ(M),SJ(M),r&&TJ()):r&&_J(),o&&je.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?.includes("long-animation-frame")?XX():i&&KX(),s&&JX(),w&&n){const se=()=>{G=Ct()};addEventListener("click",se,{capture:!0}),addEventListener("keydown",se,{capture:!0,passive:!0})}function te(){const se=Zc(M);se&&!Je(se).timestamp&&($e&&B.log(`[Tracing] Finishing current active span with op: ${Je(se).op}`),se.setAttribute(ic,"cancelled"),se.end())}M.on("startNavigationSpan",(se,_e)=>{if(Ie()!==M)return;if(_e?.isRedirect){$e&&B.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),K(M,{op:"navigation.redirect",...se},!1);return}G=void 0,te(),qt().setPropagationContext({traceId:ii(),sampleRand:Math.random(),propagationSpanId:or()?void 0:qi()});const ce=Ke();ce.setPropagationContext({traceId:ii(),sampleRand:Math.random(),propagationSpanId:or()?void 0:qi()}),ce.setSDKProcessingMetadata({normalizedRequest:void 0}),K(M,{op:"navigation",...se,parentSpan:null,forceTransaction:!0})}),M.on("startPageLoadSpan",(se,_e={})=>{if(Ie()!==M)return;te();const ce=_e.sentryTrace||O7("sentry-trace")||P7("sentry-trace"),ye=_e.baggage||O7("baggage")||P7("baggage"),Te=T$(ce,ye),le=Ke();le.setPropagationContext(Te),or()||(le.getPropagationContext().propagationSpanId=qi()),le.setSDKProcessingMetadata({normalizedRequest:xf()}),K(M,{op:"pageload",...se})}),M.on("endPageloadSpan",()=>{q&&z&&(z.setAttribute(ic,"reportPageLoaded"),z.end())})},afterAllSetup(M){if(F)return;let oe=ns();if(D!=="off"&&wre(M,{linkPreviousTrace:D,consistentTraceSampling:Y}),Pe.location){if(O){const te=tn();R7(M,{name:Pe.location.pathname,startTime:te?te/1e3:void 0,attributes:{[Jt]:"url",[it]:"auto.pageload.browser"}})}N&&Wf(({to:te,from:se})=>{if(se===void 0&&oe?.indexOf(te)!==-1){oe=void 0;return}oe=void 0;const _e=ih(te),ce=Zc(M),ye=ce&&w&&Ore(ce,G);Yg(M,{name:_e?.pathname||Pe.location.pathname,attributes:{[Jt]:"url",[it]:"auto.navigation.browser"}},{url:te,isRedirect:ye})})}p&&Sre(),s&&Rre(M,u,d,f,t),r&&bJ(),A7(M,{traceFetch:m,traceXHR:b,trackFetchStreamPerformance:g,tracePropagationTargets:M.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:_,enableHTTPTimings:y,onRequestSpanStart:P,onRequestSpanEnd:C})}}});function R7(e,t,n){e.emit("startPageLoadSpan",t,n),Ke().setTransactionName(t.name);const r=Zc(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function Yg(e,t,n){const{url:r,isRedirect:i}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:i}),e.emit("startNavigationSpan",t,{isRedirect:i});const o=Ke();return o.setTransactionName(t.name),r&&!i&&o.setSDKProcessingMetadata({normalizedRequest:{...xf(),url:r}}),Zc(e)}function O7(e){return Pe.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function P7(e){return Pe.performance?.getEntriesByType?.("navigation")[0]?.serverTiming?.find(r=>r.name===e)?.description}function Rre(e,t,n,r,i){const o=Pe.document;let s;const a=()=>{const l="ui.action.click",c=Zc(e);if(c){const u=Je(c).op;if(["navigation","pageload"].includes(u)){$e&&B.warn(`[Tracing] Did not create ${l} span because a pageload or navigation span is in progress.`);return}}if(s&&(s.setAttribute(ic,"interactionInterrupted"),s.end(),s=void 0),!i.name){$e&&B.warn(`[Tracing] Did not create ${l} transaction because _latestRouteName is missing.`);return}s=a4({name:i.name,op:l,attributes:{[Jt]:i.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};o&&addEventListener("click",a,{capture:!0})}const M7="_sentry_idleSpan";function Zc(e){return e[M7]}function L7(e,t){Sn(e,M7,t)}const D7=1.5;function Ore(e,t){const n=Je(e),r=is(),i=n.start_timestamp;return!(r-i>D7||t&&r-t<=D7)}function Pre(e=Ie()){e?.emit("endPageloadSpan")}function Mre(e){const t=Ht();if(t===e)return;const n=Ke();e.end=new Proxy(e.end,{apply(r,i,o){return oi(n,t),Reflect.apply(r,i,o)}}),oi(n,e)}const Lre=()=>({name:"SpanStreaming",beforeSetup(e){const t=e.getOptions();t.traceLifecycle||($e&&B.log('[SpanStreaming] setting `traceLifecycle` to "stream"'),t.traceLifecycle="stream")},setup(e){const t="SpanStreaming integration requires",n="Falling back to static trace lifecycle.",r=e.getOptions();if(!Vi(e)){r.traceLifecycle="static",$e&&B.warn(`${t} \`traceLifecycle\` to be set to "stream"! ${n}`);return}const i=r.beforeSendSpan;if(i&&!jd(i)){r.traceLifecycle="static",$e&&B.warn(`${t} a beforeSendSpan callback using \`withStreamedSpan\`! ${n}`);return}const o=new wY(e);e.on("afterSpanEnd",s=>{Hi(s)&&o.add(bz(s,e))}),e.on("afterSegmentSpanEnd",s=>{const a=s.spanContext().traceId;setTimeout(()=>{o.flush(a)},500)})}});function Ua(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Dre(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=Ua(n);return i=>r.then(o=>i(o.transaction(t,"readwrite").objectStore(t)))}function Kg(e){return Ua(e.getAllKeys())}function Fre(e,t,n){return e(r=>Kg(r).then(i=>{if(!(i.length>=n))return r.put(t,Math.max(...i,0)+1),Ua(r.transaction)}))}function Ure(e,t,n){return e(r=>Kg(r).then(i=>{if(!(i.length>=n))return r.put(t,Math.min(...i,0)-1),Ua(r.transaction)}))}function Bre(e){return e(t=>Kg(t).then(n=>{const r=n[0];if(r!=null)return Ua(t.get(r)).then(i=>(t.delete(r),Ua(t.transaction).then(()=>i)))}))}function jre(e){let t;function n(){return t==null&&(t=Dre(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{push:async r=>{try{const i=zd(r);await Fre(n(),i,e.maxQueueSize||30)}catch{}},unshift:async r=>{try{const i=zd(r);await Ure(n(),i,e.maxQueueSize||30)}catch{}},shift:async()=>{try{const r=await Bre(n());if(r)return Vq(r)}catch{}}}}function qre(e){return t=>{const n=e({...t,createStore:jre});return Pe.addEventListener("online",async r=>{await n.flush()}),n}}function zre(e=lg){return qre(xH(e))}const F7=1e6,Hre="window"in je&&je.window===je&&typeof importScripts>"u",Ro=String(0),wp=Hre?"main":"worker",Ip=Pe.navigator;let U7="",B7="",j7="",Xg=Ip?.userAgent||"",q7="";const Vre=Ip?.language||Ip?.languages?.[0]||"";function Wre(e){return typeof e=="object"&&e!==null&&"getHighEntropyValues"in e}const z7=Ip?.userAgentData;Wre(z7)&&z7.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{if(U7=e.platform||"",j7=e.architecture||"",q7=e.model||"",B7=e.platformVersion||"",e.fullVersionList?.length){const t=e.fullVersionList[e.fullVersionList.length-1];Xg=`${t.brand} ${t.version}`}}).catch(e=>{});function Gre(e){return!("thread_metadata"in e)}function Yre(e){return Gre(e)?eie(e):e}function Kre(e){const t=e.contexts?.trace?.trace_id;return typeof t=="string"&&t.length!==32&&$e&&B.log(`[Profiling] Invalid traceId: ${t} on profiled event`),typeof t!="string"?"":t}function Xre(e,t,n,r){if(r.type!=="transaction")throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(n==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);const i=Kre(r),o=Yre(n),s=t||(typeof r.start_timestamp=="number"?r.start_timestamp*1e3:Ct()*1e3),a=typeof r.timestamp=="number"?r.timestamp*1e3:Ct()*1e3;return{event_id:e,timestamp:new Date(s).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||Ud,runtime:{name:"javascript",version:Pe.navigator.userAgent},os:{name:U7,version:B7,build_number:Xg},device:{locale:Vre,model:q7,manufacturer:Xg,architecture:j7,is_emulator:!1},debug_meta:{images:V7(n.resources)},profile:o,transactions:[{name:r.transaction||"",id:r.event_id||ln(),trace_id:i,active_thread_id:Ro,relative_start_ns:"0",relative_end_ns:((a-s)*1e6).toFixed(0)}]}}function Jre(e,t,n){if(e==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${e} instead.`);const r=Qre(e),i=t.getOptions(),o=t.getSdkMetadata?.()?.sdk;return{chunk_id:ln(),client_sdk:{name:o?.name??"sentry.javascript.browser",version:o?.version??"0.0.0"},profiler_id:n||ln(),platform:"javascript",version:"2",release:i.release??"",environment:i.environment??"production",debug_meta:{images:V7(e.resources)},profile:r}}function Zre(e){try{if(!e||typeof e!="object")return{reason:"chunk is not an object"};const t=r=>typeof r=="string"&&/^[a-f0-9]{32}$/.test(r);if(!t(e.profiler_id))return{reason:"missing or invalid profiler_id"};if(!t(e.chunk_id))return{reason:"missing or invalid chunk_id"};if(!e.client_sdk)return{reason:"missing client_sdk metadata"};const n=e.profile;return n?!Array.isArray(n.frames)||!n.frames.length?{reason:"profile has no frames"}:!Array.isArray(n.stacks)||!n.stacks.length?{reason:"profile has no stacks"}:!Array.isArray(n.samples)||!n.samples.length?{reason:"profile has no samples"}:{valid:!0}:{reason:"missing profile data"}}catch(t){return{reason:`unknown validation error: ${t}`}}}function Qre(e){const t=[];for(let a=0;a<e.frames.length;a++){const l=e.frames[a];l&&(t[a]={function:l.name,abs_path:typeof l.resourceId=="number"?e.resources[l.resourceId]:void 0,lineno:l.line,colno:l.column})}const n=[];for(let a=0;a<e.stacks.length;a++){const l=e.stacks[a];if(!l)continue;const c=[];let u=l;for(;u;)c.push(u.frameId),u=u.parentId===void 0?void 0:e.stacks[u.parentId];n[a]=c}const r=tn(),i=typeof performance.timeOrigin=="number"?performance.timeOrigin:r||0,o=i-(r||i),s=[];for(let a=0;a<e.samples.length;a++){const l=e.samples[a];if(!l)continue;const c=(i+(l.timestamp-o))/1e3;s[a]={stack_id:l.stackId??0,thread_id:Ro,timestamp:c}}return{frames:t,stacks:n,samples:s,thread_metadata:{[Ro]:{name:wp}}}}function H7(e){return Je(e).op==="pageload"}function eie(e){let t,n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[Ro]:{name:wp}}},i=e.samples[0];if(!i)return r;const o=i.timestamp,s=tn(),a=typeof performance.timeOrigin=="number"?performance.timeOrigin:s||0,l=a-(s||a);return e.samples.forEach((c,u)=>{if(c.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[u]={elapsed_since_start_ns:((c.timestamp+l-o)*F7).toFixed(0),stack_id:t,thread_id:Ro};return}let d=e.stacks[c.stackId];const f=[];for(;d;){f.push(d.frameId);const m=e.frames[d.frameId];m&&r.frames[d.frameId]===void 0&&(r.frames[d.frameId]={function:m.name,abs_path:typeof m.resourceId=="number"?e.resources[m.resourceId]:void 0,lineno:m.line,colno:m.column}),d=d.parentId===void 0?void 0:e.stacks[d.parentId]}const p={elapsed_since_start_ns:((c.timestamp+l-o)*F7).toFixed(0),stack_id:n,thread_id:Ro};r.stacks[n]=f,r.samples[u]=p,n++}),r}function tie(e,t){if(!t.length)return e;for(const n of t)e[1].push([{type:"profile"},n]);return e}function nie(e){const t=[];return ls(e,(n,r)=>{if(r==="transaction")for(let i=1;i<n.length;i++)n[i]?.contexts?.profile?.profile_id&&t.push(n[i])}),t}function V7(e){const r=Ie()?.getOptions()?.stackParser;return r?xz(r,e):[]}function W7(e){return typeof e!="number"&&typeof e!="boolean"||typeof e=="number"&&isNaN(e)?($e&&B.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e===!0||e===!1?!0:e<0||e>1?($e&&B.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function rie(e){return e.samples.length<2?($e&&B.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):e.frames.length?!0:($e&&B.log("[Profiling] Discarding profile because it contains no frames"),!1)}let Jg=!1;const G7=3e4;function iie(e){return typeof e=="function"}function Y7(){const e=Pe.Profiler;if(!iie(e)){$e&&B.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}const t=10,n=Math.floor(G7/t);try{return new e({sampleInterval:t,maxBufferSize:n})}catch{$e&&(B.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),B.log("[Profiling] Disabling profiling for current user session.")),Jg=!0}}function K7(e){if(Jg)return $e&&B.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return $e&&B.log("[Profiling] Discarding profile because root span was not sampled."),!1;const n=Ie()?.getOptions();if(!n)return $e&&B.log("[Profiling] Profiling disabled, no options found."),!1;const r=n.profilesSampleRate;return W7(r)?r?(r===!0?!0:Math.random()<r)?!0:($e&&B.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1):($e&&B.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):($e&&B.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}function oie(e){if(Jg)return $e&&B.log("[Profiling] Profiling has been disabled for the duration of the current user session as the JS Profiler could not be started."),!1;if(e.profileLifecycle!=="trace"&&e.profileLifecycle!=="manual")return $e&&B.warn("[Profiling] Session not sampled. Invalid `profileLifecycle` option."),!1;const t=e.profileSessionSampleRate;return W7(t)?t?Math.random()<=t:($e&&B.log("[Profiling] Discarding profile because profileSessionSampleRate is not defined or set to 0"),!1):($e&&B.warn("[Profiling] Discarding profile because of invalid profileSessionSampleRate."),!1)}function Ap(e){return typeof e.profilesSampleRate<"u"}function sie(e,t,n,r){return rie(n)?Xre(e,t,n,r):null}const Ts=new Map;function aie(){return Ts.size}function lie(e){const t=Ts.get(e);return t&&Ts.delete(e),t}function cie(e,t){if(Ts.set(e,t),Ts.size>30){const n=Ts.keys().next().value;n!==void 0&&Ts.delete(n)}}function uie(e){return!e?.contexts?.profile||!e.contexts||(e.contexts.trace?.trace_id&&(e.contexts.trace={...e.contexts.trace,data:{...e.contexts.trace.data??{},"thread.id":Ro,"thread.name":wp}}),e.spans?.forEach(t=>{t.data={...t.data||{},"thread.id":Ro,"thread.name":wp}})),e}function X7(e){let t;H7(e)&&(t=Ct()*1e3);const n=Y7();if(!n)return;$e&&B.log(`[Profiling] started profiling span: ${Je(e).description}`);const r=ln();let i=null;Ke().setContext("profile",{profile_id:r,start_timestamp:t});async function o(){if(e&&n){if(i){$e&&B.log("[Profiling] profile for:",Je(e).description,"already exists, returning early");return}return n.stop().then(c=>{if(s&&(Pe.clearTimeout(s),s=void 0),$e&&B.log(`[Profiling] stopped profiling of span: ${Je(e).description}`),!c){$e&&B.log(`[Profiling] profiler returned null profile for: ${Je(e).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started");return}i=c,cie(r,c)}).catch(c=>{$e&&B.log("[Profiling] error while stopping profiler:",c)})}}let s=Pe.setTimeout(()=>{$e&&B.log("[Profiling] max profile duration elapsed, stopping profiling for:",Je(e).description),o()},G7);const a=e.end.bind(e);function l(){return e?(o().then(()=>{a()},()=>{a()}),e):a()}e.end=l}const die=6e4,fie=3e5;class pie{constructor(){this._client=void 0,this._profiler=void 0,this._chunkTimer=void 0,this._profilerId=void 0,this._isRunning=!1,this._sessionSampled=!1,this._lifecycleMode=void 0,this._activeRootSpanIds=new Set,this._rootSpanTimeouts=new Map}initialize(t){const n=t.getOptions().profileLifecycle,r=oie(t.getOptions());$e&&B.log(`[Profiling] Initializing profiler (lifecycle='${n}').`),r||$e&&B.log("[Profiling] Session not sampled. Skipping lifecycle profiler initialization."),this._profilerId=ln(),this._client=t,this._sessionSampled=r,this._lifecycleMode=n,n==="trace"&&this._setupTraceLifecycleListeners(t)}start(){if(this._lifecycleMode==="trace"){$e&&B.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.start()` are ignored in trace mode.');return}if(this._isRunning){$e&&B.warn("[Profiling] Profile session is already running, `uiProfiler.start()` is a no-op.");return}if(!this._sessionSampled){$e&&B.warn("[Profiling] Session is not sampled, `uiProfiler.start()` is a no-op.");return}this._beginProfiling()}stop(){if(this._lifecycleMode==="trace"){$e&&B.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.stop()` are ignored in trace mode.');return}if(!this._isRunning){$e&&B.warn("[Profiling] Profiler is not running, `uiProfiler.stop()` is a no-op.");return}this._endProfiling()}notifyRootSpanActive(t){if(this._lifecycleMode!=="trace"||!this._sessionSampled)return;const n=t.spanContext().spanId;if(!n||this._activeRootSpanIds.has(n))return;this._registerTraceRootSpan(n);const r=this._activeRootSpanIds.size;r===1&&($e&&B.log("[Profiling] Detected already active root span during setup. Active root spans now:",r),this._beginProfiling())}_beginProfiling(){if(!this._isRunning){if(this._isRunning=!0,$e&&B.log("[Profiling] Started profiling with profiler ID:",this._profilerId),os().setContext("profile",{profiler_id:this._profilerId}),this._startProfilerInstance(),!this._profiler){$e&&B.log("[Profiling] Failed to start JS Profiler; stopping."),this._resetProfilerInfo();return}this._startPeriodicChunking()}}_endProfiling(){this._isRunning&&(this._isRunning=!1,this._chunkTimer&&(clearTimeout(this._chunkTimer),this._chunkTimer=void 0),this._clearAllRootSpanTimeouts(),this._collectCurrentChunk().catch(t=>{$e&&B.error("[Profiling] Failed to collect current profile chunk on `stop()`:",t)}),this._lifecycleMode==="manual"&&os().setContext("profile",{}))}_setupTraceLifecycleListeners(t){t.on("spanStart",n=>{if(!this._sessionSampled){$e&&B.log("[Profiling] Span not profiled because of negative sampling decision for user session.");return}if(n!==zt(n))return;if(!n.isRecording()){$e&&B.log("[Profiling] Discarding profile because root span was not sampled.");return}const r=n.spanContext().spanId;if(!r||this._activeRootSpanIds.has(r))return;this._registerTraceRootSpan(r);const i=this._activeRootSpanIds.size;i===1&&($e&&B.log(`[Profiling] Root span ${r} started. Profiling active while there are active root spans (count=${i}).`),this._beginProfiling())}),t.on("spanEnd",n=>{if(!this._sessionSampled)return;const r=n.spanContext().spanId;if(!r||!this._activeRootSpanIds.has(r))return;this._activeRootSpanIds.delete(r);const i=this._activeRootSpanIds.size;$e&&B.log(`[Profiling] Root span with ID ${r} ended. Will continue profiling for as long as there are active root spans (currently: ${i}).`),i===0&&(this._collectCurrentChunk().catch(o=>{$e&&B.error("[Profiling] Failed to collect current profile chunk on last `spanEnd`:",o)}),this._endProfiling())})}_resetProfilerInfo(){this._isRunning=!1,os().setContext("profile",{})}_clearAllRootSpanTimeouts(){this._rootSpanTimeouts.forEach(t=>clearTimeout(t)),this._rootSpanTimeouts.clear()}_registerTraceRootSpan(t){this._activeRootSpanIds.add(t);const n=setTimeout(()=>this._onRootSpanTimeout(t),fie);this._rootSpanTimeouts.set(t,n)}_startProfilerInstance(){if(this._profiler?.stopped===!1)return;const t=Y7();if(!t){$e&&B.log("[Profiling] Failed to start JS Profiler.");return}this._profiler=t}_startPeriodicChunking(){this._isRunning&&(this._chunkTimer=setTimeout(()=>{if(this._collectCurrentChunk().catch(t=>{$e&&B.error("[Profiling] Failed to collect current profile chunk during periodic chunking:",t)}),this._isRunning){if(this._startProfilerInstance(),!this._profiler){this._resetProfilerInfo();return}this._startPeriodicChunking()}},die))}_onRootSpanTimeout(t){this._rootSpanTimeouts.has(t)&&(this._rootSpanTimeouts.delete(t),this._activeRootSpanIds.has(t)&&($e&&B.log(`[Profiling] Reached 5-minute timeout for root span ${t}. You likely started a manual root span that never called \`.end()\`.`),this._activeRootSpanIds.delete(t),this._activeRootSpanIds.size===0&&this._endProfiling()))}async _collectCurrentChunk(){const t=this._profiler;if(this._profiler=void 0,!!t)try{const n=await t.stop(),r=Jre(n,this._client,this._profilerId),i=Zre(r);if("reason"in i){$e&&B.log("[Profiling] Discarding invalid profile chunk (this is probably a bug in the SDK):",i.reason);return}this._sendProfileChunk(r),$e&&B.log("[Profiling] Collected browser profile chunk.")}catch(n){$e&&B.log("[Profiling] Error while stopping JS Profiler for chunk:",n)}}_sendProfileChunk(t){const n=this._client,r=pc(n.getSdkMetadata?.()),i=n.getDsn(),o=n.getOptions().tunnel,s=vr({event_id:ln(),sent_at:new Date().toISOString(),...r&&{sdk:r},...!!o&&i&&{dsn:si(i)}},[[{type:"profile_chunk",platform:"javascript"},t]]);n.sendEnvelope(s).then(null,a=>{$e&&B.error("Error while sending profile chunk envelope:",a)})}}const mie="BrowserProfiling",_ie=(()=>({name:mie,setup(e){const t=e.getOptions(),n=new pie;if(!Ap(t)&&!t.profileLifecycle&&(t.profileLifecycle="manual"),Ap(t)&&!t.profilesSampleRate){$e&&B.log("[Profiling] Profiling disabled, no profiling options found.");return}const r=Ht(),i=r&&zt(r);if(Ap(t)&&t.profileSessionSampleRate!==void 0&&$e&&B.warn("[Profiling] Both legacy profiling (`profilesSampleRate`) and UI profiling settings are defined. `profileSessionSampleRate` has no effect when legacy profiling is enabled."),Ap(t))i&&H7(i)&&K7(i)&&X7(i),e.on("spanStart",o=>{o===zt(o)&&K7(o)&&X7(o)}),e.on("beforeEnvelope",o=>{if(!aie())return;const s=nie(o);if(!s.length)return;const a=[];for(const l of s){const c=l?.contexts,u=c?.profile?.profile_id,d=c?.profile?.start_timestamp;if(typeof u!="string"){$e&&B.log("[Profiling] cannot find profile for a span without a profile context");continue}if(!u){$e&&B.log("[Profiling] cannot find profile for a span without a profile context");continue}c?.profile&&delete c.profile;const f=lie(u);if(!f){$e&&B.log(`[Profiling] Could not retrieve profile for span: ${u}`);continue}const p=sie(u,d,f,l);p&&a.push(p)}tie(o,a)});else{const o=t.profileLifecycle;if(e.on("startUIProfiler",()=>n.start()),e.on("stopUIProfiler",()=>n.stop()),o==="manual")n.initialize(e);else if(o==="trace"){if(!or(t)){$e&&B.warn("[Profiling] `profileLifecycle` is 'trace' but tracing is disabled. Set a `tracesSampleRate` or `tracesSampler` to enable span tracing.");return}n.initialize(e),i&&n.notifyRootSpanActive(i),Pe.setTimeout(()=>{const s=Ht(),a=s&&zt(s);a&&n.notifyRootSpanActive(a)},0)}}},processEvent(e){return uie(e)}})),hie=()=>({name:"LaunchDarkly",processEvent(e,t,n){return ia(e)}});function gie(){return{name:"sentry-flag-auditor",type:"flag-used",synchronous:!0,method:(e,t,n)=>{ds(e,t.value),fs(e,t.value)}}}const yie=()=>({name:"OpenFeature",processEvent(e,t,n){return ia(e)}});class bie{after(t,n){ds(n.flagKey,n.value),fs(n.flagKey,n.value)}error(t,n,r){ds(t.flagKey,t.defaultValue),fs(t.flagKey,t.defaultValue)}}const vie=({featureFlagClientClass:e})=>({name:"Unleash",setupOnce(){const t=e.prototype;$n(t,"isEnabled",$ie)},processEvent(t,n,r){return ia(t)}});function $ie(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"?(ds(n,r),fs(n,r)):$e&&B.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}const Sie=(({growthbookClass:e})=>ZV({growthbookClass:e})),Eie=({featureFlagClient:e})=>({name:"Statsig",setup(t){e.on("gate_evaluation",n=>{ds(n.gate.name,n.gate.value),fs(n.gate.name,n.gate.value)})},processEvent(t,n,r){return ia(t)}});async function Tie(){const e=Ie();if(!e)return"no-client-active";if(!e.getDsn())return"no-dsn-configured";const r=e.getOptions().tunnel||"https://o447951.ingest.sentry.io/api/4509632503087104/envelope/?sentry_version=7&sentry_key=c1dfb07d783ad5325c245c1fd3725390&sentry_client=sentry.javascript.browser%2F1.33.7";try{await n4(()=>fetch(r,{body:"{}",method:"POST",mode:"cors",credentials:"omit"}))}catch{return"sentry-unreachable"}}const wie="WebWorker",Iie=({worker:e})=>({name:wie,setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach(t=>J7(t))},addWorker:t=>J7(t)});function J7(e){e.addEventListener("message",t=>{if(Cie(t.data)){if(t.stopImmediatePropagation(),t.data._sentryDebugIds&&($e&&B.log("Sentry debugId web worker message received",t.data),Pe._sentryDebugIds={...t.data._sentryDebugIds,...Pe._sentryDebugIds}),t.data._sentryModuleMetadata&&($e&&B.log("Sentry module metadata web worker message received",t.data),Pe._sentryModuleMetadata={...t.data._sentryModuleMetadata,...Pe._sentryModuleMetadata}),t.data._sentryWasmImages){$e&&B.log("Sentry WASM images web worker message received",t.data);const n=Pe._sentryWasmImages||[],r=t.data._sentryWasmImages.filter(i=>Xn(i)&&typeof i.code_file=="string"&&!n.some(o=>o.code_file===i.code_file));Pe._sentryWasmImages=[...n,...r]}t.data._sentryWorkerError&&($e&&B.log("Sentry worker rejection message received",t.data._sentryWorkerError),Aie(t.data._sentryWorkerError))}})}function Aie(e){const t=Ie();if(!t)return;const n=t.getOptions().stackParser,r=t.getOptions().attachStacktrace,i=e.reason,o=Fi(i)?M6(i):kf(n,i,void 0,r,!0);o.level="error",e.filename&&(o.contexts={...o.contexts,worker:{filename:e.filename}}),ra(o,{originalException:i,mechanism:{handled:!1,type:"auto.browser.web_worker.onunhandledrejection"}}),$e&&B.log("Captured worker unhandled rejection",i)}function xie({self:e}){e.postMessage({_sentryMessage:!0,_sentryDebugIds:e._sentryDebugIds??void 0,_sentryModuleMetadata:e._sentryModuleMetadata??void 0}),e.addEventListener("unhandledrejection",t=>{const r={reason:P6(t),filename:e.location?.href};e.postMessage({_sentryMessage:!0,_sentryWorkerError:r}),$e&&B.log("[Sentry Worker] Forwarding unhandled rejection to parent",r)}),$e&&B.log("[Sentry Worker] Registered worker with unhandled rejection handling")}function Cie(e){if(!Xn(e)||e._sentryMessage!==!0)return!1;const t="_sentryDebugIds"in e,n="_sentryModuleMetadata"in e,r="_sentryWorkerError"in e,i="_sentryWasmImages"in e;return!(!t&&!n&&!r&&!i||t&&!(Xn(e._sentryDebugIds)||e._sentryDebugIds===void 0)||n&&!(Xn(e._sentryModuleMetadata)||e._sentryModuleMetadata===void 0)||r&&!Xn(e._sentryWorkerError)||i&&(!Array.isArray(e._sentryWasmImages)||!e._sentryWasmImages.every(o=>Xn(o)&&typeof o.code_file=="string")))}const Z7=["activate","mount"],Q7=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,kie=/(?:^|[-_])(\w)/g,Nie=e=>e.replace(kie,t=>t.toUpperCase()).replace(/[-_]/g,""),Rie="<Root>",Zg="<Anonymous>",Oie=(e,t)=>e.repeat(t),Qc=(e,t)=>{if(!e)return Zg;if(e.$root===e)return Rie;if(!e.$options)return Zg;const n=e.$options;let r=n.name||n._componentTag||n.__name;const i=n.__file;if(!r&&i){const o=i.match(/([^/\\]+)\.vue$/);o&&(r=o[1])}return(r?`<${Nie(r)}>`:Zg)+(i&&t!==!1?` at ${i}`:"")},Pie=e=>{if(e&&(e._isVue||e.__isVue)&&e.$parent){const t=[];let n=0;for(;e;){if(t.length>0){const i=t[t.length-1];if(i.constructor===e.constructor){n++,e=e.$parent;continue}else n>0&&(t[t.length-1]=[i,n],n=0)}t.push(e),e=e.$parent}return`
|
|
528
|
+
or you can use record.mirror to access the mirror instance during recording.`;let fS={map:{},getId(){return console.error(La),-1},getNode(){return console.error(La),null},removeNodeFromMap(){console.error(La)},has(){return console.error(La),!1},reset(){console.error(La)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(fS=new Proxy(fS,{get(e,t,n){return t==="map"&&console.error(La),Reflect.get(e,t,n)}}));function qg(e,t,n,r,i=window){const o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(s){_S(()=>{n.set.call(this,s)},0),o&&o.set&&o.set.call(this,s)}}),()=>qg(e,t,o||{},!0)}function zg(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}Date.now().toString();function nre(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function vp(e,t,n,r,i){if(!e)return!1;const o=nre(e);if(!o)return!1;const s=dS(t,n),a=jg(o,s);let l=-1;return a<0?!1:(r&&(l=jg(o,dS(null,r))),a>-1&&l<0?!0:a<l)}const pS={};function mS(e){const t=pS[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);const o=i.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(i)}catch{}return pS[e]=r.bind(window)}function Es(...e){return mS("requestAnimationFrame")(...e)}function _S(...e){return mS("setTimeout")(...e)}var Da=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Da||{});let $p;function rre(e){$p=e}const Hg=e=>$p?(...n)=>{try{return e(...n)}catch(r){if($p&&$p(r)===!0)return()=>{};throw r}}:e;for(var Fa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ire=typeof Uint8Array>"u"?[]:new Uint8Array(256),Sp=0;Sp<Fa.length;Sp++)ire[Fa.charCodeAt(Sp)]=Sp;var ore=function(e){var t=new Uint8Array(e),n,r=t.length,i="";for(n=0;n<r;n+=3)i+=Fa[t[n]>>2],i+=Fa[(t[n]&3)<<4|t[n+1]>>4],i+=Fa[(t[n+1]&15)<<2|t[n+2]>>6],i+=Fa[t[n+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const hS=new Map;function sre(e,t){let n=hS.get(e);return n||(n=new Map,hS.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const gS=(e,t,n)=>{if(!e||!(bS(e,t)||typeof e=="object"))return;const r=e.constructor.name,i=sre(n,r);let o=i.indexOf(e);return o===-1&&(o=i.length,i.push(e)),o};function Ep(e,t,n){if(e instanceof Array)return e.map(r=>Ep(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const r=e.constructor.name,i=ore(e);return{rr_type:r,base64:i}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Ep(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:i}=e;return{rr_type:r,src:i}}else if(e instanceof HTMLCanvasElement){const r="HTMLImageElement",i=e.toDataURL();return{rr_type:r,src:i}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Ep(e.data,t,n),e.width,e.height]};if(bS(e,t)||typeof e=="object"){const r=e.constructor.name,i=gS(e,t,n);return{rr_type:r,index:i}}}}return e}const yS=(e,t,n)=>e.map(r=>Ep(r,t,n)),bS=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof t[i]=="function").find(i=>e instanceof t[i]);function are(e,t,n,r,i){const o=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const a of s)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;const l=zg(t.CanvasRenderingContext2D.prototype,a,function(c){return function(...u){return vp(this.canvas,n,r,i,!0)||_S(()=>{const d=yS(u,t,this);e(this.canvas,{type:Da["2D"],property:a,args:d})},0),c.apply(this,u)}});o.push(l)}catch{const l=qg(t.CanvasRenderingContext2D.prototype,a,{set(c){e(this.canvas,{type:Da["2D"],property:a,args:[c],setter:!0})}});o.push(l)}return()=>{o.forEach(a=>a())}}function lre(e){return e==="experimental-webgl"?"webgl":e}function vS(e,t,n,r,i){const o=[];try{const s=zg(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(l,...c){if(!vp(this,t,n,r,!0)){const u=lre(l);if("__context"in this||(this.__context=u),i&&["webgl","webgl2"].includes(u))if(c[0]&&typeof c[0]=="object"){const d=c[0];d.preserveDrawingBuffer||(d.preserveDrawingBuffer=!0)}else c.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[l,...c])}});o.push(s)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{o.forEach(s=>s())}}function $S(e,t,n,r,i,o,s,a){const l=[],c=Object.getOwnPropertyNames(e);for(const u of c)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(u))try{if(typeof e[u]!="function")continue;const d=zg(e,u,function(f){return function(...p){const m=f.apply(this,p);if(gS(m,a,this),"tagName"in this.canvas&&!vp(this.canvas,r,i,o,!0)){const b=yS(p,a,this),g={type:t,property:u,args:b};n(this.canvas,g)}return m}});l.push(d)}catch{const d=qg(e,u,{set(f){n(this.canvas,{type:t,property:u,args:[f],setter:!0})}});l.push(d)}return l}function cre(e,t,n,r,i,o){const s=[];return s.push(...$S(t.WebGLRenderingContext.prototype,Da.WebGL,e,n,r,i,o,t)),typeof t.WebGL2RenderingContext<"u"&&s.push(...$S(t.WebGL2RenderingContext.prototype,Da.WebGL2,e,n,r,i,o,t)),()=>{s.forEach(a=>a())}}const ure='for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="undefined"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s="";for(a=0;a<r;a+=3)s+=e[n[a]>>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!("OffscreenCanvas"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+"-"+t;if("OffscreenCanvas"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext("2d");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return""}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext("bitmaprenderer"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:"low"});w?.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};';function dre(){const e=new Blob([ure]);return URL.createObjectURL(e)}class fre{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.shadowDoms=new Set,this.windowsSet=new WeakSet,this.windows=[],this.restoreHandlers=[],this.frozen=!1,this.locked=!1,this.snapshotInProgressMap=new Map,this.worker=null,this.lastSnapshotTime=0,this.processMutation=(a,l)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(l)};const{enableManualSnapshot:n,sampling:r="all",win:i,recordCanvas:o,errorHandler:s}=t;t.sampling=r,this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.options=t,s&&rre(s),(o&&typeof r=="number"||n)&&(this.worker=this.initFPSWorker()),this.addWindow(i),!n&&Hg(()=>{o&&r==="all"&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),o&&typeof r=="number"&&this.initCanvasFPSObserver()})()}reset(){this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.windowsSet=new WeakSet,this.windows=[],this.shadowDoms=new Set,this.worker?.terminate(),this.worker=null,this.snapshotInProgressMap=new Map}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}addWindow(t){const{sampling:n="all",blockClass:r,blockSelector:i,unblockSelector:o,recordCanvas:s,enableManualSnapshot:a}=this.options;if(!this.windowsSet.has(t)){if(a){this.windowsSet.add(t),this.windows.push(new WeakRef(t));return}Hg(()=>{if(s&&n==="all"&&this.initCanvasMutationObserver(t,r,i,o),s&&typeof n=="number"){const l=vS(t,r,i,o,!0);this.restoreHandlers.push(()=>{l()})}})(),this.windowsSet.add(t),this.windows.push(new WeakRef(t))}}addShadowRoot(t){this.shadowDoms.add(new WeakRef(t))}resetShadowRoots(){this.shadowDoms=new Set}snapshot(t,n){if(n?.skipRequestAnimationFrame){this.takeSnapshot(performance.now(),!0,t);return}Es(r=>this.takeSnapshot(r,!0,t))}initFPSWorker(){const t=new Worker(dre());return t.onmessage=n=>{const r=n.data,{id:i}=r;if(this.snapshotInProgressMap.set(i,!1),!("base64"in r))return;const{base64:o,type:s,width:a,height:l}=r;this.mutationCb({id:i,type:Da["2D"],commands:[{property:"clearRect",args:[0,0,a,l]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:o}],type:s}]},0,0,a,l]}]})},t}initCanvasFPSObserver(){let t;if(!this.windows.length&&!this.shadowDoms.size)return;const n=r=>{this.takeSnapshot(r,!1),t=Es(n)};t=Es(n),this.restoreHandlers.push(()=>{t&&cancelAnimationFrame(t)})}initCanvasMutationObserver(t,n,r,i){const o=vS(t,n,r,i,!1),s=are(this.processMutation.bind(this),t,n,r,i),a=cre(this.processMutation.bind(this),t,n,r,i,this.mirror);this.restoreHandlers.push(()=>{o(),s(),a()})}getCanvasElements(t,n,r){const i=[],o=s=>{s.querySelectorAll("canvas").forEach(a=>{vp(a,t,n,r)||i.push(a)})};for(const s of this.windows){const a=s.deref();let l;try{l=a&&a.document}catch{}l&&o(l)}for(const s of this.shadowDoms){const a=s.deref();a&&o(a)}return i}takeSnapshot(t,n,r){const{sampling:i,blockClass:o,blockSelector:s,unblockSelector:a,dataURLOptions:l,maxCanvasSize:c}=this.options,d=1e3/(i==="all"?2:i||2);return this.lastSnapshotTime&&t-this.lastSnapshotTime<d?!1:(this.lastSnapshotTime=t,(r?[r]:this.getCanvasElements(o,s,a)).forEach(m=>{const b=this.mirror.getId(m);if(!(!this.mirror.hasNode(m)||!m.width||!m.height||this.snapshotInProgressMap.get(b))){if(this.snapshotInProgressMap.set(b,!0),!n&&["webgl","webgl2"].includes(m.__context)){const g=m.getContext(m.__context);g?.getContextAttributes()?.preserveDrawingBuffer===!1&&g.clear(g.COLOR_BUFFER_BIT)}createImageBitmap(m).then(g=>{this.worker?.postMessage({id:b,bitmap:g,width:m.width,height:m.height,dataURLOptions:l,maxCanvasSize:c},[g])}).catch(g=>{Hg(()=>{throw this.snapshotInProgressMap.delete(b),g})()})}}),!0)}startPendingCanvasMutationFlusher(){Es(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,Es(t)};Es(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),Es(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;const i=r.map(s=>{const{type:a,...l}=s;return l}),{type:o}=r[0];this.mutationCb({id:n,type:o,commands:i}),this.pendingCanvasMutations.delete(t)}}try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}ere();var SS;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(SS||(SS={}));const ES={low:{sampling:{canvas:1},dataURLOptions:{type:"image/webp",quality:.25}},medium:{sampling:{canvas:2},dataURLOptions:{type:"image/webp",quality:.4}},high:{sampling:{canvas:4},dataURLOptions:{type:"image/webp",quality:.5}}},pre="ReplayCanvas",Tp=1280,mre=((e={})=>{const[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,Tp):Tp,n?Math.min(n,Tp):Tp]};let i,o;const s=new Promise(a=>o=a);return{name:pre,getOptions(){const{quality:a,enableManualSnapshot:l,maxCanvasSize:c}=r;return{enableManualSnapshot:l,recordCanvas:!0,getCanvasManager:u=>{const d=new fre({...u,enableManualSnapshot:l,maxCanvasSize:c,errorHandler:f=>{try{typeof f=="object"&&(f.__rrweb__=!0)}catch{}}});return i=d,o(d),d},...ES[a]||ES.medium}},async snapshot(a,l){(i||await s).snapshot(a,l)}}});function _re(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function TS(e){try{return new URL(e,Pe.location.origin).href}catch{return}}function hre(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function wS(e){try{return new Headers(e)}catch{return}}const IS=new WeakMap,Vg=new Map,Wg={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function AS(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:i,shouldCreateSpanForRequest:o,enableHTTPTimings:s,tracePropagationTargets:a,onRequestSpanStart:l,onRequestSpanEnd:c}={...Wg,...t},u=typeof o=="function"?o:m=>!0,d=m=>yre(m,a),f={},p=e.getOptions().propagateTraceparent;n&&(e.addEventProcessor(m=>(m.type==="transaction"&&m.spans&&m.spans.forEach(b=>{if(b.op==="http.client"){const g=Vg.get(b.span_id);g&&(b.timestamp=g/1e3,Vg.delete(b.span_id))}}),m)),i&&CY(m=>{if(m.response){const b=IS.get(m.response);b&&m.endTimestamp&&Vg.set(b,m.endTimestamp)}}),Ih(m=>{const b=tW(m,u,d,f,{propagateTraceparent:p,onRequestSpanEnd:c});if(m.response&&m.fetchData.__span&&IS.set(m.response,m.fetchData.__span),b){const g=TS(m.fetchData.url),_=g?us(g).host:void 0;b.setAttributes({"http.url":g?So(g):void 0,"server.address":_}),s&&xS(b,e),l?.(b,{headers:m.headers})}})),r&&sg(m=>{const b=bre(m,u,d,f,p,c);b&&(s&&xS(b,e),l?.(b,{headers:wS(m.xhr.__sentry_xhr_v3__?.request_headers)}))})}const gre=300;function xS(e,t){const{url:n}=Je(e).data;if(!n||typeof n!="string")return;let r=()=>void setTimeout(i);if(Vi(t)){const o=e.end.bind(e);e.end=s=>{const a=s??Ct();let l=!1;const c=()=>{l||(l=!0,setTimeout(i),o(a),clearTimeout(u))};r=c;const u=setTimeout(c,gre)}}const i=$s("resource",({entries:o})=>{o.forEach(s=>{hre(s)&&s.name.endsWith(n)&&(e.setAttributes(m6(s)),r())})})}function yre(e,t){const n=ns();if(n){let r,i;try{r=new URL(e,n),i=new URL(n).origin}catch{return!1}const o=r.origin===i;return t?Mr(r.toString(),t)||o&&Mr(r.pathname,t):o}else{const r=!!e.match(/^\/(?!\/)/);return t?Mr(e,t):r}}function bre(e,t,n,r,i,o){const s=e.xhr,a=s?.[Xi];if(!s||s.__sentry_own_request__||!a)return;const{url:l,method:c}=a,u=or()&&t(l);if(e.endTimestamp){const _=s.__sentry_xhr_span_id__;if(!_)return;const y=r[_];y&&(u&&a.status_code!==void 0&&(cc(y,a.status_code),y.end(),o?.(y,{headers:wS($6(s)),error:e.error})),delete r[_]);return}const d=TS(l),f=us(d||l),p=So(X4(l)),m=Ie(),b=!!Ht(),g=u&&b?li({name:`${c} ${p}`,attributes:{url:So(l),type:"xhr","http.method":c,"http.url":d?So(d):void 0,"server.address":f?.host,[it]:"auto.http.browser",[yt]:"http.client",...f?.search&&{"http.query":f?.search},...f?.hash&&{"http.fragment":f?.hash}}}):new sr;return u&&!b&&m?.recordDroppedEvent("no_parent_span","span"),s.__sentry_xhr_span_id__=g.spanContext().spanId,r[s.__sentry_xhr_span_id__]=g,n(l)&&vre(s,or()&&b?g:void 0,i),m&&m.emit("beforeOutgoingRequestSpan",g,e),g}function vre(e,t,n){const{"sentry-trace":r,baggage:i,traceparent:o}=oh({span:t,propagateTraceparent:n});r&&$re(e,r,i,o)}function $re(e,t,n,r){const i=e.__sentry_xhr_v3__?.request_headers;if(!(i?.["sentry-trace"]||!e.setRequestHeader))try{if(e.setRequestHeader("sentry-trace",t),r&&!i?.traceparent&&e.setRequestHeader("traceparent",r),n){const o=i?.baggage;(!o||!_re(o))&&e.setRequestHeader("baggage",n)}}catch{}}function Sre(){Pe.document?Pe.document.addEventListener("visibilitychange",()=>{const e=Ht();if(!e)return;const t=zt(e);if(Pe.document.hidden&&t){const n="cancelled",{op:r,status:i}=Je(t);$e&&B.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),i||t.setStatus({code:st,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):$e&&B.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const Ere=3600,CS="sentry_previous_trace",Tre="sentry.previous_trace";function wre(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let i=r?xre():void 0;e.on("spanStart",s=>{if(zt(s)!==s)return;const a=Ke().getPropagationContext();i=Ire(i,s,a),r&&Are(i)});let o=!0;n&&e.on("beforeSampling",s=>{if(!i)return;const a=Ke(),l=a.getPropagationContext();if(o&&l.parentSpanId){o=!1;return}a.setPropagationContext({...l,dsc:{...l.dsc,sample_rate:String(i.sampleRate),sampled:String(Gg(i.spanContext))},sampleRand:i.sampleRand}),s.parentSampled=Gg(i.spanContext),s.parentSampleRate=i.sampleRate,s.spanAttributes={...s.spanAttributes,[f9]:i.sampleRate}})}function Ire(e,t,n){const r=Je(t);function i(){try{return Number(n.dsc?.sample_rate)??Number(r.data?.[Od])}catch{return 0}}const o={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:i(),sampleRand:n.sampleRand};if(!e)return o;const s=e.spanContext;return s.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=Ere&&($e&&B.log(`Adding previous_trace \`${JSON.stringify(s)}\` link to span \`${JSON.stringify({op:r.op,...t.spanContext()})}\``),t.addLink({context:s,attributes:{[aq]:"previous_trace"}}),t.setAttribute(Tre,`${s.traceId}-${s.spanId}-${Gg(s)?1:0}`)),o)}function Are(e){try{Pe.sessionStorage.setItem(CS,JSON.stringify(e))}catch(t){$e&&B.warn("Could not store previous trace in sessionStorage",t)}}function xre(){try{const e=Pe.sessionStorage?.getItem(CS);return JSON.parse(e)}catch{return}}function Gg(e){return e.traceFlags===1}const Cre="BrowserTracing",kre=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function kS(){const e=Pe.navigator;return e?.userAgent?kre.test(e.userAgent):!1}const Nre={...Vd,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...Wg},NS=((e={})=>{"enableElementTiming"in e&&Or(()=>{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=Pe.document,{enableInp:r,enableLongTask:i,enableLongAnimationFrame:o,_experiments:{enableInteractions:s,enableStandaloneClsSpans:a,enableStandaloneLcpSpans:l},beforeStartSpan:c,idleTimeout:u,finalTimeout:d,childSpanTimeout:f,markBackgroundSpan:p,traceFetch:m,traceXHR:b,trackFetchStreamPerformance:g,shouldCreateSpanForRequest:_,enableHTTPTimings:y,ignoreResourceSpans:T,ignorePerformanceApiSpans:S,instrumentPageLoad:O,instrumentNavigation:N,detectRedirects:w,linkPreviousTrace:D,consistentTraceSampling:Y,enableReportPageLoaded:q,onRequestSpanStart:P,onRequestSpanEnd:C}={...Nre,...e},F=kS();let R,G,z;function K(M,oe,te=!0){const se=oe.op==="pageload",_e=oe.name,ce=c?c(oe):oe,ye=ce.attributes||{};if(_e!==ce.name&&(ye[Jt]="custom",ce.attributes=ye),!te){const ge=is();li({...ce,startTime:ge}).end(ge);return}t.name=ce.name,t.source=ye[Jt];const Te=a4(ce,{idleTimeout:u,finalTimeout:d,childSpanTimeout:f,disableAutoFinish:se,beforeSpanEnd:ge=>{R?.();const Ce=Vi(M);tJ(ge,{recordClsOnPageloadSpan:!Ce&&!a,recordLcpOnPageloadSpan:!Ce&&!l,ignoreResourceSpans:T,ignorePerformanceApiSpans:S,spanStreamingEnabled:Ce}),LS(M,void 0);const Me=Ke(),Ue=Me.getPropagationContext();Me.setPropagationContext({...Ue,traceId:Te.spanContext().traceId,sampled:Hi(Te),dsc:br(ge)}),se&&(z=void 0)},trimIdleSpanEndTimestamp:!q});se&&q&&(z=Te),LS(M,Te);function le(){n&&["interactive","complete"].includes(n.readyState)&&M.emit("idleSpanEnableAutoFinish",Te)}se&&!q&&n&&(n.addEventListener("readystatechange",()=>{le()}),le())}return{name:Cre,setup(M){if(F){$e&&B.log("[Tracing] Skipping browserTracingIntegration setup for bot user agent.");return}j9();const oe=Vi(M);if(R=YX({recordClsStandaloneSpans:oe?void 0:a||!1,recordLcpStandaloneSpans:oe?void 0:l||!1,client:M}),oe?(vJ(M),SJ(M),r&&TJ()):r&&_J(),o&&je.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?.includes("long-animation-frame")?XX():i&&KX(),s&&JX(),w&&n){const se=()=>{G=Ct()};addEventListener("click",se,{capture:!0}),addEventListener("keydown",se,{capture:!0,passive:!0})}function te(){const se=Zc(M);se&&!Je(se).timestamp&&($e&&B.log(`[Tracing] Finishing current active span with op: ${Je(se).op}`),se.setAttribute(ic,"cancelled"),se.end())}M.on("startNavigationSpan",(se,_e)=>{if(Ie()!==M)return;if(_e?.isRedirect){$e&&B.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),K(M,{op:"navigation.redirect",...se},!1);return}G=void 0,te(),qt().setPropagationContext({traceId:ii(),sampleRand:Math.random(),propagationSpanId:or()?void 0:qi()});const ce=Ke();ce.setPropagationContext({traceId:ii(),sampleRand:Math.random(),propagationSpanId:or()?void 0:qi()}),ce.setSDKProcessingMetadata({normalizedRequest:void 0}),K(M,{op:"navigation",...se,parentSpan:null,forceTransaction:!0})}),M.on("startPageLoadSpan",(se,_e={})=>{if(Ie()!==M)return;te();const ce=_e.sentryTrace||OS("sentry-trace")||PS("sentry-trace"),ye=_e.baggage||OS("baggage")||PS("baggage"),Te=T9(ce,ye),le=Ke();le.setPropagationContext(Te),or()||(le.getPropagationContext().propagationSpanId=qi()),le.setSDKProcessingMetadata({normalizedRequest:xf()}),K(M,{op:"pageload",...se})}),M.on("endPageloadSpan",()=>{q&&z&&(z.setAttribute(ic,"reportPageLoaded"),z.end())})},afterAllSetup(M){if(F)return;let oe=ns();if(D!=="off"&&wre(M,{linkPreviousTrace:D,consistentTraceSampling:Y}),Pe.location){if(O){const te=tn();RS(M,{name:Pe.location.pathname,startTime:te?te/1e3:void 0,attributes:{[Jt]:"url",[it]:"auto.pageload.browser"}})}N&&Wf(({to:te,from:se})=>{if(se===void 0&&oe?.indexOf(te)!==-1){oe=void 0;return}oe=void 0;const _e=ih(te),ce=Zc(M),ye=ce&&w&&Ore(ce,G);Yg(M,{name:_e?.pathname||Pe.location.pathname,attributes:{[Jt]:"url",[it]:"auto.navigation.browser"}},{url:te,isRedirect:ye})})}p&&Sre(),s&&Rre(M,u,d,f,t),r&&bJ(),AS(M,{traceFetch:m,traceXHR:b,trackFetchStreamPerformance:g,tracePropagationTargets:M.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:_,enableHTTPTimings:y,onRequestSpanStart:P,onRequestSpanEnd:C})}}});function RS(e,t,n){e.emit("startPageLoadSpan",t,n),Ke().setTransactionName(t.name);const r=Zc(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function Yg(e,t,n){const{url:r,isRedirect:i}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:i}),e.emit("startNavigationSpan",t,{isRedirect:i});const o=Ke();return o.setTransactionName(t.name),r&&!i&&o.setSDKProcessingMetadata({normalizedRequest:{...xf(),url:r}}),Zc(e)}function OS(e){return Pe.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function PS(e){return Pe.performance?.getEntriesByType?.("navigation")[0]?.serverTiming?.find(r=>r.name===e)?.description}function Rre(e,t,n,r,i){const o=Pe.document;let s;const a=()=>{const l="ui.action.click",c=Zc(e);if(c){const u=Je(c).op;if(["navigation","pageload"].includes(u)){$e&&B.warn(`[Tracing] Did not create ${l} span because a pageload or navigation span is in progress.`);return}}if(s&&(s.setAttribute(ic,"interactionInterrupted"),s.end(),s=void 0),!i.name){$e&&B.warn(`[Tracing] Did not create ${l} transaction because _latestRouteName is missing.`);return}s=a4({name:i.name,op:l,attributes:{[Jt]:i.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};o&&addEventListener("click",a,{capture:!0})}const MS="_sentry_idleSpan";function Zc(e){return e[MS]}function LS(e,t){Sn(e,MS,t)}const DS=1.5;function Ore(e,t){const n=Je(e),r=is(),i=n.start_timestamp;return!(r-i>DS||t&&r-t<=DS)}function Pre(e=Ie()){e?.emit("endPageloadSpan")}function Mre(e){const t=Ht();if(t===e)return;const n=Ke();e.end=new Proxy(e.end,{apply(r,i,o){return oi(n,t),Reflect.apply(r,i,o)}}),oi(n,e)}const Lre=()=>({name:"SpanStreaming",beforeSetup(e){const t=e.getOptions();t.traceLifecycle||($e&&B.log('[SpanStreaming] setting `traceLifecycle` to "stream"'),t.traceLifecycle="stream")},setup(e){const t="SpanStreaming integration requires",n="Falling back to static trace lifecycle.",r=e.getOptions();if(!Vi(e)){r.traceLifecycle="static",$e&&B.warn(`${t} \`traceLifecycle\` to be set to "stream"! ${n}`);return}const i=r.beforeSendSpan;if(i&&!jd(i)){r.traceLifecycle="static",$e&&B.warn(`${t} a beforeSendSpan callback using \`withStreamedSpan\`! ${n}`);return}const o=new wY(e);e.on("afterSpanEnd",s=>{Hi(s)&&o.add(bz(s,e))}),e.on("afterSegmentSpanEnd",s=>{const a=s.spanContext().traceId;setTimeout(()=>{o.flush(a)},500)})}});function Ua(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Dre(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=Ua(n);return i=>r.then(o=>i(o.transaction(t,"readwrite").objectStore(t)))}function Kg(e){return Ua(e.getAllKeys())}function Fre(e,t,n){return e(r=>Kg(r).then(i=>{if(!(i.length>=n))return r.put(t,Math.max(...i,0)+1),Ua(r.transaction)}))}function Ure(e,t,n){return e(r=>Kg(r).then(i=>{if(!(i.length>=n))return r.put(t,Math.min(...i,0)-1),Ua(r.transaction)}))}function Bre(e){return e(t=>Kg(t).then(n=>{const r=n[0];if(r!=null)return Ua(t.get(r)).then(i=>(t.delete(r),Ua(t.transaction).then(()=>i)))}))}function jre(e){let t;function n(){return t==null&&(t=Dre(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{push:async r=>{try{const i=zd(r);await Fre(n(),i,e.maxQueueSize||30)}catch{}},unshift:async r=>{try{const i=zd(r);await Ure(n(),i,e.maxQueueSize||30)}catch{}},shift:async()=>{try{const r=await Bre(n());if(r)return Vq(r)}catch{}}}}function qre(e){return t=>{const n=e({...t,createStore:jre});return Pe.addEventListener("online",async r=>{await n.flush()}),n}}function zre(e=lg){return qre(xH(e))}const FS=1e6,Hre="window"in je&&je.window===je&&typeof importScripts>"u",Ro=String(0),wp=Hre?"main":"worker",Ip=Pe.navigator;let US="",BS="",jS="",Xg=Ip?.userAgent||"",qS="";const Vre=Ip?.language||Ip?.languages?.[0]||"";function Wre(e){return typeof e=="object"&&e!==null&&"getHighEntropyValues"in e}const zS=Ip?.userAgentData;Wre(zS)&&zS.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{if(US=e.platform||"",jS=e.architecture||"",qS=e.model||"",BS=e.platformVersion||"",e.fullVersionList?.length){const t=e.fullVersionList[e.fullVersionList.length-1];Xg=`${t.brand} ${t.version}`}}).catch(e=>{});function Gre(e){return!("thread_metadata"in e)}function Yre(e){return Gre(e)?eie(e):e}function Kre(e){const t=e.contexts?.trace?.trace_id;return typeof t=="string"&&t.length!==32&&$e&&B.log(`[Profiling] Invalid traceId: ${t} on profiled event`),typeof t!="string"?"":t}function Xre(e,t,n,r){if(r.type!=="transaction")throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(n==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);const i=Kre(r),o=Yre(n),s=t||(typeof r.start_timestamp=="number"?r.start_timestamp*1e3:Ct()*1e3),a=typeof r.timestamp=="number"?r.timestamp*1e3:Ct()*1e3;return{event_id:e,timestamp:new Date(s).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||Ud,runtime:{name:"javascript",version:Pe.navigator.userAgent},os:{name:US,version:BS,build_number:Xg},device:{locale:Vre,model:qS,manufacturer:Xg,architecture:jS,is_emulator:!1},debug_meta:{images:VS(n.resources)},profile:o,transactions:[{name:r.transaction||"",id:r.event_id||ln(),trace_id:i,active_thread_id:Ro,relative_start_ns:"0",relative_end_ns:((a-s)*1e6).toFixed(0)}]}}function Jre(e,t,n){if(e==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${e} instead.`);const r=Qre(e),i=t.getOptions(),o=t.getSdkMetadata?.()?.sdk;return{chunk_id:ln(),client_sdk:{name:o?.name??"sentry.javascript.browser",version:o?.version??"0.0.0"},profiler_id:n||ln(),platform:"javascript",version:"2",release:i.release??"",environment:i.environment??"production",debug_meta:{images:VS(e.resources)},profile:r}}function Zre(e){try{if(!e||typeof e!="object")return{reason:"chunk is not an object"};const t=r=>typeof r=="string"&&/^[a-f0-9]{32}$/.test(r);if(!t(e.profiler_id))return{reason:"missing or invalid profiler_id"};if(!t(e.chunk_id))return{reason:"missing or invalid chunk_id"};if(!e.client_sdk)return{reason:"missing client_sdk metadata"};const n=e.profile;return n?!Array.isArray(n.frames)||!n.frames.length?{reason:"profile has no frames"}:!Array.isArray(n.stacks)||!n.stacks.length?{reason:"profile has no stacks"}:!Array.isArray(n.samples)||!n.samples.length?{reason:"profile has no samples"}:{valid:!0}:{reason:"missing profile data"}}catch(t){return{reason:`unknown validation error: ${t}`}}}function Qre(e){const t=[];for(let a=0;a<e.frames.length;a++){const l=e.frames[a];l&&(t[a]={function:l.name,abs_path:typeof l.resourceId=="number"?e.resources[l.resourceId]:void 0,lineno:l.line,colno:l.column})}const n=[];for(let a=0;a<e.stacks.length;a++){const l=e.stacks[a];if(!l)continue;const c=[];let u=l;for(;u;)c.push(u.frameId),u=u.parentId===void 0?void 0:e.stacks[u.parentId];n[a]=c}const r=tn(),i=typeof performance.timeOrigin=="number"?performance.timeOrigin:r||0,o=i-(r||i),s=[];for(let a=0;a<e.samples.length;a++){const l=e.samples[a];if(!l)continue;const c=(i+(l.timestamp-o))/1e3;s[a]={stack_id:l.stackId??0,thread_id:Ro,timestamp:c}}return{frames:t,stacks:n,samples:s,thread_metadata:{[Ro]:{name:wp}}}}function HS(e){return Je(e).op==="pageload"}function eie(e){let t,n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[Ro]:{name:wp}}},i=e.samples[0];if(!i)return r;const o=i.timestamp,s=tn(),a=typeof performance.timeOrigin=="number"?performance.timeOrigin:s||0,l=a-(s||a);return e.samples.forEach((c,u)=>{if(c.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[u]={elapsed_since_start_ns:((c.timestamp+l-o)*FS).toFixed(0),stack_id:t,thread_id:Ro};return}let d=e.stacks[c.stackId];const f=[];for(;d;){f.push(d.frameId);const m=e.frames[d.frameId];m&&r.frames[d.frameId]===void 0&&(r.frames[d.frameId]={function:m.name,abs_path:typeof m.resourceId=="number"?e.resources[m.resourceId]:void 0,lineno:m.line,colno:m.column}),d=d.parentId===void 0?void 0:e.stacks[d.parentId]}const p={elapsed_since_start_ns:((c.timestamp+l-o)*FS).toFixed(0),stack_id:n,thread_id:Ro};r.stacks[n]=f,r.samples[u]=p,n++}),r}function tie(e,t){if(!t.length)return e;for(const n of t)e[1].push([{type:"profile"},n]);return e}function nie(e){const t=[];return ls(e,(n,r)=>{if(r==="transaction")for(let i=1;i<n.length;i++)n[i]?.contexts?.profile?.profile_id&&t.push(n[i])}),t}function VS(e){const r=Ie()?.getOptions()?.stackParser;return r?xz(r,e):[]}function WS(e){return typeof e!="number"&&typeof e!="boolean"||typeof e=="number"&&isNaN(e)?($e&&B.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e===!0||e===!1?!0:e<0||e>1?($e&&B.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function rie(e){return e.samples.length<2?($e&&B.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):e.frames.length?!0:($e&&B.log("[Profiling] Discarding profile because it contains no frames"),!1)}let Jg=!1;const GS=3e4;function iie(e){return typeof e=="function"}function YS(){const e=Pe.Profiler;if(!iie(e)){$e&&B.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}const t=10,n=Math.floor(GS/t);try{return new e({sampleInterval:t,maxBufferSize:n})}catch{$e&&(B.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),B.log("[Profiling] Disabling profiling for current user session.")),Jg=!0}}function KS(e){if(Jg)return $e&&B.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return $e&&B.log("[Profiling] Discarding profile because root span was not sampled."),!1;const n=Ie()?.getOptions();if(!n)return $e&&B.log("[Profiling] Profiling disabled, no options found."),!1;const r=n.profilesSampleRate;return WS(r)?r?(r===!0?!0:Math.random()<r)?!0:($e&&B.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1):($e&&B.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):($e&&B.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}function oie(e){if(Jg)return $e&&B.log("[Profiling] Profiling has been disabled for the duration of the current user session as the JS Profiler could not be started."),!1;if(e.profileLifecycle!=="trace"&&e.profileLifecycle!=="manual")return $e&&B.warn("[Profiling] Session not sampled. Invalid `profileLifecycle` option."),!1;const t=e.profileSessionSampleRate;return WS(t)?t?Math.random()<=t:($e&&B.log("[Profiling] Discarding profile because profileSessionSampleRate is not defined or set to 0"),!1):($e&&B.warn("[Profiling] Discarding profile because of invalid profileSessionSampleRate."),!1)}function Ap(e){return typeof e.profilesSampleRate<"u"}function sie(e,t,n,r){return rie(n)?Xre(e,t,n,r):null}const Ts=new Map;function aie(){return Ts.size}function lie(e){const t=Ts.get(e);return t&&Ts.delete(e),t}function cie(e,t){if(Ts.set(e,t),Ts.size>30){const n=Ts.keys().next().value;n!==void 0&&Ts.delete(n)}}function uie(e){return!e?.contexts?.profile||!e.contexts||(e.contexts.trace?.trace_id&&(e.contexts.trace={...e.contexts.trace,data:{...e.contexts.trace.data??{},"thread.id":Ro,"thread.name":wp}}),e.spans?.forEach(t=>{t.data={...t.data||{},"thread.id":Ro,"thread.name":wp}})),e}function XS(e){let t;HS(e)&&(t=Ct()*1e3);const n=YS();if(!n)return;$e&&B.log(`[Profiling] started profiling span: ${Je(e).description}`);const r=ln();let i=null;Ke().setContext("profile",{profile_id:r,start_timestamp:t});async function o(){if(e&&n){if(i){$e&&B.log("[Profiling] profile for:",Je(e).description,"already exists, returning early");return}return n.stop().then(c=>{if(s&&(Pe.clearTimeout(s),s=void 0),$e&&B.log(`[Profiling] stopped profiling of span: ${Je(e).description}`),!c){$e&&B.log(`[Profiling] profiler returned null profile for: ${Je(e).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started");return}i=c,cie(r,c)}).catch(c=>{$e&&B.log("[Profiling] error while stopping profiler:",c)})}}let s=Pe.setTimeout(()=>{$e&&B.log("[Profiling] max profile duration elapsed, stopping profiling for:",Je(e).description),o()},GS);const a=e.end.bind(e);function l(){return e?(o().then(()=>{a()},()=>{a()}),e):a()}e.end=l}const die=6e4,fie=3e5;class pie{constructor(){this._client=void 0,this._profiler=void 0,this._chunkTimer=void 0,this._profilerId=void 0,this._isRunning=!1,this._sessionSampled=!1,this._lifecycleMode=void 0,this._activeRootSpanIds=new Set,this._rootSpanTimeouts=new Map}initialize(t){const n=t.getOptions().profileLifecycle,r=oie(t.getOptions());$e&&B.log(`[Profiling] Initializing profiler (lifecycle='${n}').`),r||$e&&B.log("[Profiling] Session not sampled. Skipping lifecycle profiler initialization."),this._profilerId=ln(),this._client=t,this._sessionSampled=r,this._lifecycleMode=n,n==="trace"&&this._setupTraceLifecycleListeners(t)}start(){if(this._lifecycleMode==="trace"){$e&&B.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.start()` are ignored in trace mode.');return}if(this._isRunning){$e&&B.warn("[Profiling] Profile session is already running, `uiProfiler.start()` is a no-op.");return}if(!this._sessionSampled){$e&&B.warn("[Profiling] Session is not sampled, `uiProfiler.start()` is a no-op.");return}this._beginProfiling()}stop(){if(this._lifecycleMode==="trace"){$e&&B.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.stop()` are ignored in trace mode.');return}if(!this._isRunning){$e&&B.warn("[Profiling] Profiler is not running, `uiProfiler.stop()` is a no-op.");return}this._endProfiling()}notifyRootSpanActive(t){if(this._lifecycleMode!=="trace"||!this._sessionSampled)return;const n=t.spanContext().spanId;if(!n||this._activeRootSpanIds.has(n))return;this._registerTraceRootSpan(n);const r=this._activeRootSpanIds.size;r===1&&($e&&B.log("[Profiling] Detected already active root span during setup. Active root spans now:",r),this._beginProfiling())}_beginProfiling(){if(!this._isRunning){if(this._isRunning=!0,$e&&B.log("[Profiling] Started profiling with profiler ID:",this._profilerId),os().setContext("profile",{profiler_id:this._profilerId}),this._startProfilerInstance(),!this._profiler){$e&&B.log("[Profiling] Failed to start JS Profiler; stopping."),this._resetProfilerInfo();return}this._startPeriodicChunking()}}_endProfiling(){this._isRunning&&(this._isRunning=!1,this._chunkTimer&&(clearTimeout(this._chunkTimer),this._chunkTimer=void 0),this._clearAllRootSpanTimeouts(),this._collectCurrentChunk().catch(t=>{$e&&B.error("[Profiling] Failed to collect current profile chunk on `stop()`:",t)}),this._lifecycleMode==="manual"&&os().setContext("profile",{}))}_setupTraceLifecycleListeners(t){t.on("spanStart",n=>{if(!this._sessionSampled){$e&&B.log("[Profiling] Span not profiled because of negative sampling decision for user session.");return}if(n!==zt(n))return;if(!n.isRecording()){$e&&B.log("[Profiling] Discarding profile because root span was not sampled.");return}const r=n.spanContext().spanId;if(!r||this._activeRootSpanIds.has(r))return;this._registerTraceRootSpan(r);const i=this._activeRootSpanIds.size;i===1&&($e&&B.log(`[Profiling] Root span ${r} started. Profiling active while there are active root spans (count=${i}).`),this._beginProfiling())}),t.on("spanEnd",n=>{if(!this._sessionSampled)return;const r=n.spanContext().spanId;if(!r||!this._activeRootSpanIds.has(r))return;this._activeRootSpanIds.delete(r);const i=this._activeRootSpanIds.size;$e&&B.log(`[Profiling] Root span with ID ${r} ended. Will continue profiling for as long as there are active root spans (currently: ${i}).`),i===0&&(this._collectCurrentChunk().catch(o=>{$e&&B.error("[Profiling] Failed to collect current profile chunk on last `spanEnd`:",o)}),this._endProfiling())})}_resetProfilerInfo(){this._isRunning=!1,os().setContext("profile",{})}_clearAllRootSpanTimeouts(){this._rootSpanTimeouts.forEach(t=>clearTimeout(t)),this._rootSpanTimeouts.clear()}_registerTraceRootSpan(t){this._activeRootSpanIds.add(t);const n=setTimeout(()=>this._onRootSpanTimeout(t),fie);this._rootSpanTimeouts.set(t,n)}_startProfilerInstance(){if(this._profiler?.stopped===!1)return;const t=YS();if(!t){$e&&B.log("[Profiling] Failed to start JS Profiler.");return}this._profiler=t}_startPeriodicChunking(){this._isRunning&&(this._chunkTimer=setTimeout(()=>{if(this._collectCurrentChunk().catch(t=>{$e&&B.error("[Profiling] Failed to collect current profile chunk during periodic chunking:",t)}),this._isRunning){if(this._startProfilerInstance(),!this._profiler){this._resetProfilerInfo();return}this._startPeriodicChunking()}},die))}_onRootSpanTimeout(t){this._rootSpanTimeouts.has(t)&&(this._rootSpanTimeouts.delete(t),this._activeRootSpanIds.has(t)&&($e&&B.log(`[Profiling] Reached 5-minute timeout for root span ${t}. You likely started a manual root span that never called \`.end()\`.`),this._activeRootSpanIds.delete(t),this._activeRootSpanIds.size===0&&this._endProfiling()))}async _collectCurrentChunk(){const t=this._profiler;if(this._profiler=void 0,!!t)try{const n=await t.stop(),r=Jre(n,this._client,this._profilerId),i=Zre(r);if("reason"in i){$e&&B.log("[Profiling] Discarding invalid profile chunk (this is probably a bug in the SDK):",i.reason);return}this._sendProfileChunk(r),$e&&B.log("[Profiling] Collected browser profile chunk.")}catch(n){$e&&B.log("[Profiling] Error while stopping JS Profiler for chunk:",n)}}_sendProfileChunk(t){const n=this._client,r=pc(n.getSdkMetadata?.()),i=n.getDsn(),o=n.getOptions().tunnel,s=vr({event_id:ln(),sent_at:new Date().toISOString(),...r&&{sdk:r},...!!o&&i&&{dsn:si(i)}},[[{type:"profile_chunk",platform:"javascript"},t]]);n.sendEnvelope(s).then(null,a=>{$e&&B.error("Error while sending profile chunk envelope:",a)})}}const mie="BrowserProfiling",_ie=(()=>({name:mie,setup(e){const t=e.getOptions(),n=new pie;if(!Ap(t)&&!t.profileLifecycle&&(t.profileLifecycle="manual"),Ap(t)&&!t.profilesSampleRate){$e&&B.log("[Profiling] Profiling disabled, no profiling options found.");return}const r=Ht(),i=r&&zt(r);if(Ap(t)&&t.profileSessionSampleRate!==void 0&&$e&&B.warn("[Profiling] Both legacy profiling (`profilesSampleRate`) and UI profiling settings are defined. `profileSessionSampleRate` has no effect when legacy profiling is enabled."),Ap(t))i&&HS(i)&&KS(i)&&XS(i),e.on("spanStart",o=>{o===zt(o)&&KS(o)&&XS(o)}),e.on("beforeEnvelope",o=>{if(!aie())return;const s=nie(o);if(!s.length)return;const a=[];for(const l of s){const c=l?.contexts,u=c?.profile?.profile_id,d=c?.profile?.start_timestamp;if(typeof u!="string"){$e&&B.log("[Profiling] cannot find profile for a span without a profile context");continue}if(!u){$e&&B.log("[Profiling] cannot find profile for a span without a profile context");continue}c?.profile&&delete c.profile;const f=lie(u);if(!f){$e&&B.log(`[Profiling] Could not retrieve profile for span: ${u}`);continue}const p=sie(u,d,f,l);p&&a.push(p)}tie(o,a)});else{const o=t.profileLifecycle;if(e.on("startUIProfiler",()=>n.start()),e.on("stopUIProfiler",()=>n.stop()),o==="manual")n.initialize(e);else if(o==="trace"){if(!or(t)){$e&&B.warn("[Profiling] `profileLifecycle` is 'trace' but tracing is disabled. Set a `tracesSampleRate` or `tracesSampler` to enable span tracing.");return}n.initialize(e),i&&n.notifyRootSpanActive(i),Pe.setTimeout(()=>{const s=Ht(),a=s&&zt(s);a&&n.notifyRootSpanActive(a)},0)}}},processEvent(e){return uie(e)}})),hie=()=>({name:"LaunchDarkly",processEvent(e,t,n){return ia(e)}});function gie(){return{name:"sentry-flag-auditor",type:"flag-used",synchronous:!0,method:(e,t,n)=>{ds(e,t.value),fs(e,t.value)}}}const yie=()=>({name:"OpenFeature",processEvent(e,t,n){return ia(e)}});class bie{after(t,n){ds(n.flagKey,n.value),fs(n.flagKey,n.value)}error(t,n,r){ds(t.flagKey,t.defaultValue),fs(t.flagKey,t.defaultValue)}}const vie=({featureFlagClientClass:e})=>({name:"Unleash",setupOnce(){const t=e.prototype;$n(t,"isEnabled",$ie)},processEvent(t,n,r){return ia(t)}});function $ie(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"?(ds(n,r),fs(n,r)):$e&&B.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}const Sie=(({growthbookClass:e})=>ZV({growthbookClass:e})),Eie=({featureFlagClient:e})=>({name:"Statsig",setup(t){e.on("gate_evaluation",n=>{ds(n.gate.name,n.gate.value),fs(n.gate.name,n.gate.value)})},processEvent(t,n,r){return ia(t)}});async function Tie(){const e=Ie();if(!e)return"no-client-active";if(!e.getDsn())return"no-dsn-configured";const r=e.getOptions().tunnel||"https://o447951.ingest.sentry.io/api/4509632503087104/envelope/?sentry_version=7&sentry_key=c1dfb07d783ad5325c245c1fd3725390&sentry_client=sentry.javascript.browser%2F1.33.7";try{await n4(()=>fetch(r,{body:"{}",method:"POST",mode:"cors",credentials:"omit"}))}catch{return"sentry-unreachable"}}const wie="WebWorker",Iie=({worker:e})=>({name:wie,setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach(t=>JS(t))},addWorker:t=>JS(t)});function JS(e){e.addEventListener("message",t=>{if(Cie(t.data)){if(t.stopImmediatePropagation(),t.data._sentryDebugIds&&($e&&B.log("Sentry debugId web worker message received",t.data),Pe._sentryDebugIds={...t.data._sentryDebugIds,...Pe._sentryDebugIds}),t.data._sentryModuleMetadata&&($e&&B.log("Sentry module metadata web worker message received",t.data),Pe._sentryModuleMetadata={...t.data._sentryModuleMetadata,...Pe._sentryModuleMetadata}),t.data._sentryWasmImages){$e&&B.log("Sentry WASM images web worker message received",t.data);const n=Pe._sentryWasmImages||[],r=t.data._sentryWasmImages.filter(i=>Xn(i)&&typeof i.code_file=="string"&&!n.some(o=>o.code_file===i.code_file));Pe._sentryWasmImages=[...n,...r]}t.data._sentryWorkerError&&($e&&B.log("Sentry worker rejection message received",t.data._sentryWorkerError),Aie(t.data._sentryWorkerError))}})}function Aie(e){const t=Ie();if(!t)return;const n=t.getOptions().stackParser,r=t.getOptions().attachStacktrace,i=e.reason,o=Fi(i)?M6(i):kf(n,i,void 0,r,!0);o.level="error",e.filename&&(o.contexts={...o.contexts,worker:{filename:e.filename}}),ra(o,{originalException:i,mechanism:{handled:!1,type:"auto.browser.web_worker.onunhandledrejection"}}),$e&&B.log("Captured worker unhandled rejection",i)}function xie({self:e}){e.postMessage({_sentryMessage:!0,_sentryDebugIds:e._sentryDebugIds??void 0,_sentryModuleMetadata:e._sentryModuleMetadata??void 0}),e.addEventListener("unhandledrejection",t=>{const r={reason:P6(t),filename:e.location?.href};e.postMessage({_sentryMessage:!0,_sentryWorkerError:r}),$e&&B.log("[Sentry Worker] Forwarding unhandled rejection to parent",r)}),$e&&B.log("[Sentry Worker] Registered worker with unhandled rejection handling")}function Cie(e){if(!Xn(e)||e._sentryMessage!==!0)return!1;const t="_sentryDebugIds"in e,n="_sentryModuleMetadata"in e,r="_sentryWorkerError"in e,i="_sentryWasmImages"in e;return!(!t&&!n&&!r&&!i||t&&!(Xn(e._sentryDebugIds)||e._sentryDebugIds===void 0)||n&&!(Xn(e._sentryModuleMetadata)||e._sentryModuleMetadata===void 0)||r&&!Xn(e._sentryWorkerError)||i&&(!Array.isArray(e._sentryWasmImages)||!e._sentryWasmImages.every(o=>Xn(o)&&typeof o.code_file=="string")))}const ZS=["activate","mount"],QS=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,kie=/(?:^|[-_])(\w)/g,Nie=e=>e.replace(kie,t=>t.toUpperCase()).replace(/[-_]/g,""),Rie="<Root>",Zg="<Anonymous>",Oie=(e,t)=>e.repeat(t),Qc=(e,t)=>{if(!e)return Zg;if(e.$root===e)return Rie;if(!e.$options)return Zg;const n=e.$options;let r=n.name||n._componentTag||n.__name;const i=n.__file;if(!r&&i){const o=i.match(/([^/\\]+)\.vue$/);o&&(r=o[1])}return(r?`<${Nie(r)}>`:Zg)+(i&&t!==!1?` at ${i}`:"")},Pie=e=>{if(e&&(e._isVue||e.__isVue)&&e.$parent){const t=[];let n=0;for(;e;){if(t.length>0){const i=t[t.length-1];if(i.constructor===e.constructor){n++,e=e.$parent;continue}else n>0&&(t[t.length-1]=[i,n],n=0)}t.push(e),e=e.$parent}return`
|
|
529
529
|
|
|
530
530
|
found in
|
|
531
531
|
|
|
532
532
|
${t.map((i,o)=>`${(o===0?"---> ":Oie(" ",5+o*2))+(Array.isArray(i)?`${Qc(i[0])}... (${i[1]} recursive calls)`:Qc(i))}`).join(`
|
|
533
533
|
`)}`}return`
|
|
534
534
|
|
|
535
|
-
(found in ${Qc(e)})`},eE=(e,t)=>{const{errorHandler:n}=e.config;e.config.errorHandler=(r,i,o)=>{const s=Qc(i,!1),a=i?Pie(i):"",l={componentName:s,lifecycleHook:o,trace:a};if(t?.attachProps!==!1&&i&&(i.$options?.propsData?l.propsData=i.$options.propsData:i.$props&&(l.propsData=i.$props)),setTimeout(()=>{It(r,{captureContext:{contexts:{vue:l}},mechanism:{handled:!!n,type:"auto.function.vue.error_handler"}})}),typeof n=="function"&&e.config.errorHandler)n.call(e,r,i,o);else throw r}},tE="ui.vue",Mie={activate:["activated","deactivated"],create:["beforeCreate","created"],unmount:["beforeUnmount","unmounted"],destroy:["beforeDestroy","destroyed"],mount:["beforeMount","mounted"],update:["beforeUpdate","updated"]};function Qg(e,t,n){e.$_sentryRootComponentSpanTimer&&clearTimeout(e.$_sentryRootComponentSpanTimer),e.$_sentryRootComponentSpanTimer=setTimeout(()=>{e.$root?.$_sentryRootComponentSpan&&(e.$root.$_sentryRootComponentSpan.end(t),e.$root.$_sentryRootComponentSpan=void 0)},n)}function Lie(e,t){function n(i){return i.replace(/^<([^\s]*)>(?: at [^\s]*)?$/,"$1")}return e.some(i=>n(t)===n(i))}const nE=(e={})=>{const t=(e.hooks||[]).concat(
|
|
535
|
+
(found in ${Qc(e)})`},eE=(e,t)=>{const{errorHandler:n}=e.config;e.config.errorHandler=(r,i,o)=>{const s=Qc(i,!1),a=i?Pie(i):"",l={componentName:s,lifecycleHook:o,trace:a};if(t?.attachProps!==!1&&i&&(i.$options?.propsData?l.propsData=i.$options.propsData:i.$props&&(l.propsData=i.$props)),setTimeout(()=>{It(r,{captureContext:{contexts:{vue:l}},mechanism:{handled:!!n,type:"auto.function.vue.error_handler"}})}),typeof n=="function"&&e.config.errorHandler)n.call(e,r,i,o);else throw r}},tE="ui.vue",Mie={activate:["activated","deactivated"],create:["beforeCreate","created"],unmount:["beforeUnmount","unmounted"],destroy:["beforeDestroy","destroyed"],mount:["beforeMount","mounted"],update:["beforeUpdate","updated"]};function Qg(e,t,n){e.$_sentryRootComponentSpanTimer&&clearTimeout(e.$_sentryRootComponentSpanTimer),e.$_sentryRootComponentSpanTimer=setTimeout(()=>{e.$root?.$_sentryRootComponentSpan&&(e.$root.$_sentryRootComponentSpan.end(t),e.$root.$_sentryRootComponentSpan=void 0)},n)}function Lie(e,t){function n(i){return i.replace(/^<([^\s]*)>(?: at [^\s]*)?$/,"$1")}return e.some(i=>n(t)===n(i))}const nE=(e={})=>{const t=(e.hooks||[]).concat(ZS).filter((i,o,s)=>s.indexOf(i)===o),n={},r=e.timeout||2e3;for(const i of t){const o=Mie[i];if(!o){QS&&B.warn(`Unknown hook: ${i}`);continue}for(const s of o)n[s]=function(){const a=this.$root===this;a&&(this.$_sentryRootComponentSpan=this.$_sentryRootComponentSpan||li({name:"Application Render",op:`${tE}.render`,attributes:{[it]:"auto.ui.vue"},onlyIfParent:!0}),Qg(this,Ct(),r));const l=Qc(this,!1);if(!(a||(Array.isArray(e.trackComponents)?Lie(e.trackComponents,l):e.trackComponents))){Qg(this,Ct(),r);return}this.$_sentryComponentSpans=this.$_sentryComponentSpans||{};const u=s===o[0],d=this.$root?.$_sentryRootComponentSpan||Ht();if(u){if(d){const f=this.$_sentryComponentSpans[i];f&&f.end(),this.$_sentryComponentSpans[i]=li({name:`Vue ${l}`,op:`${tE}.${i}`,attributes:{[it]:"auto.ui.vue"},onlyIfParent:!0})}}else{const f=this.$_sentryComponentSpans[i];if(!f)return;f.end(),Qg(this,Ct(),r)}}}return n},Die={Vue:je.Vue,attachProps:!0,attachErrorHandler:!0,tracingOptions:{hooks:ZS,timeout:2e3,trackComponents:!1}},Fie="Vue",rE=(e={})=>({name:Fie,setup(t){const n={...Die,...t.getOptions(),...e};if(!n.Vue&&!n.app){Or(()=>{console.warn("[@sentry/vue]: Misconfigured SDK. Vue specific errors will not be captured. Update your `Sentry.init` call with an appropriate config option: `app` (Application Instance - Vue 3) or `Vue` (Vue Constructor - Vue 2).")});return}n.app?(Array.isArray(n.app)?n.app:[n.app]).forEach(i=>iE(i,n)):n.Vue&&iE(n.Vue,n)}}),iE=(e,t)=>{QS&&e._instance?.isMounted===!0&&Or(()=>{console.warn("[@sentry/vue]: Misconfigured SDK. Vue app is already mounted. Make sure to call `app.mount()` after `Sentry.init()`.")}),t.attachErrorHandler&&eE(e,t),or(t)&&e.mixin(nE(t.tracingOptions))};function Uie(e={}){const t={defaultIntegrations:[...cg(),rE()],...e};return e8(t,"vue"),DZ(t)}function Bie(e,t,n){let r=!1;const i="mode"in e;e.onError(o=>It(o,{mechanism:{handled:!1}})),e.beforeEach((o,s,...a)=>{const l=r?void 0:jie(),c={};for(const f of Object.keys(o.params))c[`url.path.parameter.${f}`]=o.params[f],c[`params.${f}`]=o.params[f];for(const f of Object.keys(o.query)){const p=o.query[f];p&&(c[`query.${f}`]=p)}let u=o.path,d="url";if(o.name&&t.routeLabel!=="path")u=o.name.toString(),d="custom";else if(o.matched.length>0){const f=o.matched.length-1;u=o.matched[f].path,d="route"}if(Ke().setTransactionName(u),t.instrumentPageLoad&&l&&(Je(l).data[Jt]!=="custom"&&(l.updateName(u),l.setAttribute(Jt,d)),l.setAttributes({...c,[it]:"auto.pageload.vue"}),r=!0),t.instrumentNavigation&&!l&&n({name:u,op:"navigation",attributes:{...c,[it]:"auto.navigation.vue",[Jt]:d}}),i){const f=a[0];typeof f=="function"&&f()}})}function jie(){const e=Ht(),t=e&&zt(e);return t&&Je(t).op==="pageload"?t:void 0}function qie(e={}){if(!e.router)return NS(e);const t=NS({...e,instrumentNavigation:!1}),{router:n,instrumentNavigation:r=!0,instrumentPageLoad:i=!0,routeLabel:o="name"}=e;return{...t,afterAllSetup(s){t.afterAllSetup(s),Bie(n,{routeLabel:o,instrumentNavigation:r,instrumentPageLoad:i},l=>{Yg(s,l)})}}}const zie={attachPiniaState:!0,addBreadcrumbs:!0,actionTransformer:e=>e,stateTransformer:e=>e},oE=(e,t)=>{const n={};try{return Object.keys(e.state.value).forEach(r=>{n[r]=e.state.value[r]}),t?t(n):n}catch{return n}},Hie=Object.freeze(Object.defineProperty({__proto__:null,BrowserClient:n6,MULTIPLEXED_TRANSPORT_EXTRA_KEY:Jd,OpenFeatureIntegrationHook:bie,SDK_VERSION:Pi,SEMANTIC_ATTRIBUTE_SENTRY_OP:yt,SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN:it,SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE:Od,SEMANTIC_ATTRIBUTE_SENTRY_SOURCE:Jt,Scope:Lr,WINDOW:Pe,addBreadcrumb:Dr,addEventProcessor:b4,addIntegration:V_,attachErrorHandler:eE,breadcrumbsIntegration:A6,browserApiErrorsIntegration:x6,browserProfilingIntegration:_ie,browserSessionIntegration:k6,browserTracingIntegration:qie,buildLaunchDarklyFlagUsedHandler:gie,captureConsoleIntegration:oV,captureEvent:ra,captureException:It,captureFeedback:x8,captureMessage:_4,captureSession:Wd,chromeStackLineParser:S6,close:Wz,consoleLoggingIntegration:gW,contextLinesIntegration:iQ,continueTrace:oz,createConsolaReporter:SW,createLangChainCallbackHandler:Sh,createSentryPiniaPlugin:e=>{const t={...zie,...e};return({store:r,pinia:i})=>{t.attachPiniaState!==!1&&os().addEventProcessor((o,s)=>{try{const l=`pinia_state_all_stores_${new Date().toTimeString().split(" ")[0]}.json`;s.attachments?.some(u=>u.filename.startsWith("pinia_state_all_stores_"))||(s.attachments=[...s.attachments||[],{filename:l,data:JSON.stringify(oE(i,t.stateTransformer))}])}catch{}return o}),r.$onAction(o=>{o.after(()=>{const s=t.actionTransformer(o.name);typeof s<"u"&&s!==null&&t.addBreadcrumbs!==!1&&Dr({category:"pinia.action",message:`Store: ${r.$id} | Action: ${s}`,level:"info"});const a=oE(i,t.stateTransformer),l=Ke(),c=l.getScopeData().contexts.state;if(typeof a<"u"&&a!==null){const f=Ie()?.getOptions()?.normalizeDepth||3,m={...c||{},state:{type:"pinia",value:a}};Pq(m,3+f),l.setContext("state",m)}else l.setContext("state",{...c||{},state:{type:"pinia",value:"undefined"}})})})}},createTracingMixins:nE,createTransport:P4,createUserFeedbackEnvelope:iZ,cultureContextIntegration:N6,dedupeIntegration:m8,defaultRequestInstrumentationOptions:Wg,defaultStackLineParsers:T6,defaultStackParser:w6,diagnoseSdkConnectivity:Tie,elementTimingIntegration:mJ,endSession:H_,eventFiltersIntegration:i8,eventFromException:e6,eventFromMessage:t6,exceptionFromError:Cf,extraErrorDataIntegration:fV,featureFlagsIntegration:JV,feedbackAsyncIntegration:nX,feedbackIntegration:Z5,feedbackSyncIntegration:Z5,flush:Vz,forceLoad:FZ,functionToStringIntegration:r8,geckoStackLineParser:E6,getActiveSpan:Ht,getClient:Ie,getCurrentScope:Ke,getDefaultIntegrations:cg,getFeedback:uK,getGlobalScope:os,getIsolationScope:qt,getReplay:Xne,getRootSpan:zt,getSpanDescendants:dc,getSpanStatusFromHttpCode:m9,getTraceData:oh,globalHandlersIntegration:O6,graphqlClientIntegration:fQ,growthbookIntegration:Sie,httpClientIntegration:VZ,httpContextIntegration:F6,inboundFiltersIntegration:o8,init:Uie,instrumentAnthropicAiClient:FG,instrumentCreateReactAgent:_Y,instrumentGoogleGenAIClient:XG,instrumentLangChainEmbeddings:LY,instrumentLangGraph:hY,instrumentOpenAiClient:bG,instrumentOutgoingRequests:AS,instrumentSupabaseClient:T8,isBotUserAgent:kS,isEnabled:y4,isInitialized:Gz,lastEventId:g4,launchDarklyIntegration:hie,lazyLoadIntegration:J5,linkedErrorsIntegration:U6,logger:mW,makeBrowserOfflineTransport:zre,makeFetchTransport:lg,makeMultiplexedTransport:NH,metrics:vW,moduleMetadataIntegration:nV,onLoad:UZ,openFeatureIntegration:yie,opera10StackLineParser:tZ,opera11StackLineParser:rZ,parameterize:Q4,registerSpanErrorInstrumentation:j9,registerWebWorker:xie,replayCanvasIntegration:mre,replayIntegration:Gne,reportPageLoaded:Pre,reportingObserverIntegration:zZ,rewriteFramesIntegration:vV,sendFeedback:b5,setActiveSpanInBrowser:Mre,setContext:h4,setConversationId:Hz,setCurrentClient:Y4,setExtra:Bz,setExtras:Uz,setHttpStatus:cc,setMeasurement:J9,setTag:qz,setTags:jz,setUser:zz,showReportDialog:BZ,spanStreamingIntegration:Lre,spanToBaggageHeader:Nq,spanToJSON:Je,spanToTraceHeader:k9,spotlightBrowserIntegration:OZ,startBrowserTracingNavigationSpan:Yg,startBrowserTracingPageLoadSpan:RS,startInactiveSpan:li,startNewTrace:r4,startSession:z_,startSpan:ai,startSpanManual:Wi,statsigIntegration:Eie,supabaseIntegration:PV,suppressTracing:n4,thirdPartyErrorFilterIntegration:zV,uiProfiler:BJ,unleashIntegration:vie,updateSpanName:Aq,viewHierarchyIntegration:pQ,vueIntegration:rE,webWorkerIntegration:Iie,winjsStackLineParser:QJ,withActiveSpan:mc,withIsolationScope:Yj,withScope:yr,withStreamedSpan:Rq,zodErrorsIntegration:qV},Symbol.toStringTag,{value:"Module"}))})();
|