@leatcom/portal-sessions 0.0.68 → 0.0.70-beta.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.
@@ -1,4 +1,4 @@
1
- (function(_t,k){typeof exports=="object"&&typeof module<"u"?k(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],k):(_t=typeof globalThis<"u"?globalThis:_t||self,k(_t.PortalSessions={},_t.React,_t.ReactDOM))})(this,function(_t,k,wi){"use strict";var h9=Object.defineProperty;var p9=(_t,k,wi)=>k in _t?h9(_t,k,{enumerable:!0,configurable:!0,writable:!0,value:wi}):_t[k]=wi;var Qb=(_t,k,wi)=>(p9(_t,typeof k!="symbol"?k+"":k,wi),wi);function Jb(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}function Zb(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const de=Jb(k);var qi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ju={exports:{}},Fs={};/**
1
+ (function(St,k){typeof exports=="object"&&typeof module<"u"?k(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],k):(St=typeof globalThis<"u"?globalThis:St||self,k(St.PortalSessions={},St.React,St.ReactDOM))})(this,function(St,k,bi){"use strict";var x9=Object.defineProperty;var _9=(St,k,bi)=>k in St?x9(St,k,{enumerable:!0,configurable:!0,writable:!0,value:bi}):St[k]=bi;var ew=(St,k,bi)=>(_9(St,typeof k!="symbol"?k+"":k,bi),bi);function tw(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}function nw(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const se=tw(k);var Fi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ju(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Lu={exports:{}},Bs={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var oh;function Xb(){if(oh)return Fs;oh=1;var e=k,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function o(c,u,d){var f,p={},l=null,v=null;d!==void 0&&(l=""+d),u.key!==void 0&&(l=""+u.key),u.ref!==void 0&&(v=u.ref);for(f in u)r.call(u,f)&&!s.hasOwnProperty(f)&&(p[f]=u[f]);if(c&&c.defaultProps)for(f in u=c.defaultProps,u)p[f]===void 0&&(p[f]=u[f]);return{$$typeof:t,type:c,key:l,ref:v,props:p,_owner:i.current}}return Fs.Fragment=n,Fs.jsx=o,Fs.jsxs=o,Fs}var Us={};/**
9
+ */var ch;function rw(){if(ch)return Bs;ch=1;var e=k,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function o(c,u,d){var f,h={},l=null,b=null;d!==void 0&&(l=""+d),u.key!==void 0&&(l=""+u.key),u.ref!==void 0&&(b=u.ref);for(f in u)r.call(u,f)&&!s.hasOwnProperty(f)&&(h[f]=u[f]);if(c&&c.defaultProps)for(f in u=c.defaultProps,u)h[f]===void 0&&(h[f]=u[f]);return{$$typeof:t,type:c,key:l,ref:b,props:h,_owner:i.current}}return Bs.Fragment=n,Bs.jsx=o,Bs.jsxs=o,Bs}var Fs={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,20 +14,20 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var ah;function ew(){return ah||(ah=1,process.env.NODE_ENV!=="production"&&function(){var e=k,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),l=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),a=Symbol.iterator,h="@@iterator";function y(G){if(G===null||typeof G!="object")return null;var ve=a&&G[a]||G[h];return typeof ve=="function"?ve:null}var g=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(G){{for(var ve=arguments.length,Te=new Array(ve>1?ve-1:0),Me=1;Me<ve;Me++)Te[Me-1]=arguments[Me];w("error",G,Te)}}function w(G,ve,Te){{var Me=g.ReactDebugCurrentFrame,Ze=Me.getStackAddendum();Ze!==""&&(ve+="%s",Te=Te.concat([Ze]));var gt=Te.map(function(Xe){return String(Xe)});gt.unshift("Warning: "+ve),Function.prototype.apply.call(console[G],console,gt)}}var E=!1,S=!1,A=!1,T=!1,O=!1,N;N=Symbol.for("react.module.reference");function D(G){return!!(typeof G=="string"||typeof G=="function"||G===r||G===s||O||G===i||G===d||G===f||T||G===v||E||S||A||typeof G=="object"&&G!==null&&(G.$$typeof===l||G.$$typeof===p||G.$$typeof===o||G.$$typeof===c||G.$$typeof===u||G.$$typeof===N||G.getModuleId!==void 0))}function U(G,ve,Te){var Me=G.displayName;if(Me)return Me;var Ze=ve.displayName||ve.name||"";return Ze!==""?Te+"("+Ze+")":Te}function q(G){return G.displayName||"Context"}function F(G){if(G==null)return null;if(typeof G.tag=="number"&&b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof G=="function")return G.displayName||G.name||null;if(typeof G=="string")return G;switch(G){case r:return"Fragment";case n:return"Portal";case s:return"Profiler";case i:return"StrictMode";case d:return"Suspense";case f:return"SuspenseList"}if(typeof G=="object")switch(G.$$typeof){case c:var ve=G;return q(ve)+".Consumer";case o:var Te=G;return q(Te._context)+".Provider";case u:return U(G,G.render,"ForwardRef");case p:var Me=G.displayName||null;return Me!==null?Me:F(G.type)||"Memo";case l:{var Ze=G,gt=Ze._payload,Xe=Ze._init;try{return F(Xe(gt))}catch{return null}}}return null}var V=Object.assign,R=0,L,W,z,Z,te,re,he;function ce(){}ce.__reactDisabledLog=!0;function ye(){{if(R===0){L=console.log,W=console.info,z=console.warn,Z=console.error,te=console.group,re=console.groupCollapsed,he=console.groupEnd;var G={configurable:!0,enumerable:!0,value:ce,writable:!0};Object.defineProperties(console,{info:G,log:G,warn:G,error:G,group:G,groupCollapsed:G,groupEnd:G})}R++}}function le(){{if(R--,R===0){var G={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:V({},G,{value:L}),info:V({},G,{value:W}),warn:V({},G,{value:z}),error:V({},G,{value:Z}),group:V({},G,{value:te}),groupCollapsed:V({},G,{value:re}),groupEnd:V({},G,{value:he})})}R<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var $=g.ReactCurrentDispatcher,H;function X(G,ve,Te){{if(H===void 0)try{throw Error()}catch(Ze){var Me=Ze.stack.trim().match(/\n( *(at )?)/);H=Me&&Me[1]||""}return`
18
- `+H+G}}var C=!1,j;{var B=typeof WeakMap=="function"?WeakMap:Map;j=new B}function M(G,ve){if(!G||C)return"";{var Te=j.get(G);if(Te!==void 0)return Te}var Me;C=!0;var Ze=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var gt;gt=$.current,$.current=null,ye();try{if(ve){var Xe=function(){throw Error()};if(Object.defineProperty(Xe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Xe,[])}catch(Zt){Me=Zt}Reflect.construct(G,[],Xe)}else{try{Xe.call()}catch(Zt){Me=Zt}G.call(Xe.prototype)}}else{try{throw Error()}catch(Zt){Me=Zt}G()}}catch(Zt){if(Zt&&Me&&typeof Zt.stack=="string"){for(var He=Zt.stack.split(`
19
- `),dn=Me.stack.split(`
20
- `),Rt=He.length-1,xt=dn.length-1;Rt>=1&&xt>=0&&He[Rt]!==dn[xt];)xt--;for(;Rt>=1&&xt>=0;Rt--,xt--)if(He[Rt]!==dn[xt]){if(Rt!==1||xt!==1)do if(Rt--,xt--,xt<0||He[Rt]!==dn[xt]){var Nn=`
21
- `+He[Rt].replace(" at new "," at ");return G.displayName&&Nn.includes("<anonymous>")&&(Nn=Nn.replace("<anonymous>",G.displayName)),typeof G=="function"&&j.set(G,Nn),Nn}while(Rt>=1&&xt>=0);break}}}finally{C=!1,$.current=gt,le(),Error.prepareStackTrace=Ze}var Qn=G?G.displayName||G.name:"",Br=Qn?X(Qn):"";return typeof G=="function"&&j.set(G,Br),Br}function ee(G,ve,Te){return M(G,!1)}function J(G){var ve=G.prototype;return!!(ve&&ve.isReactComponent)}function Q(G,ve,Te){if(G==null)return"";if(typeof G=="function")return M(G,J(G));if(typeof G=="string")return X(G);switch(G){case d:return X("Suspense");case f:return X("SuspenseList")}if(typeof G=="object")switch(G.$$typeof){case u:return ee(G.render);case p:return Q(G.type,ve,Te);case l:{var Me=G,Ze=Me._payload,gt=Me._init;try{return Q(gt(Ze),ve,Te)}catch{}}}return""}var Y=Object.prototype.hasOwnProperty,pe={},ge=g.ReactDebugCurrentFrame;function ue(G){if(G){var ve=G._owner,Te=Q(G.type,G._source,ve?ve.type:null);ge.setExtraStackFrame(Te)}else ge.setExtraStackFrame(null)}function ie(G,ve,Te,Me,Ze){{var gt=Function.call.bind(Y);for(var Xe in G)if(gt(G,Xe)){var He=void 0;try{if(typeof G[Xe]!="function"){var dn=Error((Me||"React class")+": "+Te+" type `"+Xe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof G[Xe]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw dn.name="Invariant Violation",dn}He=G[Xe](ve,Xe,Me,Te,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Rt){He=Rt}He&&!(He instanceof Error)&&(ue(Ze),b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Me||"React class",Te,Xe,typeof He),ue(null)),He instanceof Error&&!(He.message in pe)&&(pe[He.message]=!0,ue(Ze),b("Failed %s type: %s",Te,He.message),ue(null))}}}var be=Array.isArray;function oe(G){return be(G)}function Ce(G){{var ve=typeof Symbol=="function"&&Symbol.toStringTag,Te=ve&&G[Symbol.toStringTag]||G.constructor.name||"Object";return Te}}function _e(G){try{return We(G),!1}catch{return!0}}function We(G){return""+G}function rt(G){if(_e(G))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ce(G)),We(G)}var vt=g.ReactCurrentOwner,ht={key:!0,ref:!0,__self:!0,__source:!0},Kn,ct,nn;nn={};function pt(G){if(Y.call(G,"ref")){var ve=Object.getOwnPropertyDescriptor(G,"ref").get;if(ve&&ve.isReactWarning)return!1}return G.ref!==void 0}function Re(G){if(Y.call(G,"key")){var ve=Object.getOwnPropertyDescriptor(G,"key").get;if(ve&&ve.isReactWarning)return!1}return G.key!==void 0}function ln(G,ve){if(typeof G.ref=="string"&&vt.current&&ve&&vt.current.stateNode!==ve){var Te=F(vt.current.type);nn[Te]||(b('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',F(vt.current.type),G.ref),nn[Te]=!0)}}function Lt(G,ve){{var Te=function(){Kn||(Kn=!0,b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",ve))};Te.isReactWarning=!0,Object.defineProperty(G,"key",{get:Te,configurable:!0})}}function hn(G,ve){{var Te=function(){ct||(ct=!0,b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",ve))};Te.isReactWarning=!0,Object.defineProperty(G,"ref",{get:Te,configurable:!0})}}var rn=function(G,ve,Te,Me,Ze,gt,Xe){var He={$$typeof:t,type:G,key:ve,ref:Te,props:Xe,_owner:gt};return He._store={},Object.defineProperty(He._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(He,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Me}),Object.defineProperty(He,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ze}),Object.freeze&&(Object.freeze(He.props),Object.freeze(He)),He};function pn(G,ve,Te,Me,Ze){{var gt,Xe={},He=null,dn=null;Te!==void 0&&(rt(Te),He=""+Te),Re(ve)&&(rt(ve.key),He=""+ve.key),pt(ve)&&(dn=ve.ref,ln(ve,Ze));for(gt in ve)Y.call(ve,gt)&&!ht.hasOwnProperty(gt)&&(Xe[gt]=ve[gt]);if(G&&G.defaultProps){var Rt=G.defaultProps;for(gt in Rt)Xe[gt]===void 0&&(Xe[gt]=Rt[gt])}if(He||dn){var xt=typeof G=="function"?G.displayName||G.name||"Unknown":G;He&&Lt(Xe,xt),dn&&hn(Xe,xt)}return rn(G,He,dn,Ze,Me,vt.current,Xe)}}var Rn=g.ReactCurrentOwner,Fn=g.ReactDebugCurrentFrame;function xn(G){if(G){var ve=G._owner,Te=Q(G.type,G._source,ve?ve.type:null);Fn.setExtraStackFrame(Te)}else Fn.setExtraStackFrame(null)}var mn;mn=!1;function At(G){return typeof G=="object"&&G!==null&&G.$$typeof===t}function zn(){{if(Rn.current){var G=F(Rn.current.type);if(G)return`
17
+ */var uh;function iw(){return uh||(uh=1,process.env.NODE_ENV!=="production"&&function(){var e=k,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),l=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen"),a=Symbol.iterator,p="@@iterator";function y(G){if(G===null||typeof G!="object")return null;var ve=a&&G[a]||G[p];return typeof ve=="function"?ve:null}var g=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(G){{for(var ve=arguments.length,Te=new Array(ve>1?ve-1:0),Me=1;Me<ve;Me++)Te[Me-1]=arguments[Me];w("error",G,Te)}}function w(G,ve,Te){{var Me=g.ReactDebugCurrentFrame,Ze=Me.getStackAddendum();Ze!==""&&(ve+="%s",Te=Te.concat([Ze]));var gt=Te.map(function(Xe){return String(Xe)});gt.unshift("Warning: "+ve),Function.prototype.apply.call(console[G],console,gt)}}var E=!1,S=!1,A=!1,T=!1,O=!1,N;N=Symbol.for("react.module.reference");function D(G){return!!(typeof G=="string"||typeof G=="function"||G===r||G===s||O||G===i||G===d||G===f||T||G===b||E||S||A||typeof G=="object"&&G!==null&&(G.$$typeof===l||G.$$typeof===h||G.$$typeof===o||G.$$typeof===c||G.$$typeof===u||G.$$typeof===N||G.getModuleId!==void 0))}function U(G,ve,Te){var Me=G.displayName;if(Me)return Me;var Ze=ve.displayName||ve.name||"";return Ze!==""?Te+"("+Ze+")":Te}function V(G){return G.displayName||"Context"}function F(G){if(G==null)return null;if(typeof G.tag=="number"&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof G=="function")return G.displayName||G.name||null;if(typeof G=="string")return G;switch(G){case r:return"Fragment";case n:return"Portal";case s:return"Profiler";case i:return"StrictMode";case d:return"Suspense";case f:return"SuspenseList"}if(typeof G=="object")switch(G.$$typeof){case c:var ve=G;return V(ve)+".Consumer";case o:var Te=G;return V(Te._context)+".Provider";case u:return U(G,G.render,"ForwardRef");case h:var Me=G.displayName||null;return Me!==null?Me:F(G.type)||"Memo";case l:{var Ze=G,gt=Ze._payload,Xe=Ze._init;try{return F(Xe(gt))}catch{return null}}}return null}var q=Object.assign,R=0,L,W,z,Z,te,re,he;function ue(){}ue.__reactDisabledLog=!0;function ye(){{if(R===0){L=console.log,W=console.info,z=console.warn,Z=console.error,te=console.group,re=console.groupCollapsed,he=console.groupEnd;var G={configurable:!0,enumerable:!0,value:ue,writable:!0};Object.defineProperties(console,{info:G,log:G,warn:G,error:G,group:G,groupCollapsed:G,groupEnd:G})}R++}}function de(){{if(R--,R===0){var G={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:q({},G,{value:L}),info:q({},G,{value:W}),warn:q({},G,{value:z}),error:q({},G,{value:Z}),group:q({},G,{value:te}),groupCollapsed:q({},G,{value:re}),groupEnd:q({},G,{value:he})})}R<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var $=g.ReactCurrentDispatcher,H;function X(G,ve,Te){{if(H===void 0)try{throw Error()}catch(Ze){var Me=Ze.stack.trim().match(/\n( *(at )?)/);H=Me&&Me[1]||""}return`
18
+ `+H+G}}var C=!1,j;{var B=typeof WeakMap=="function"?WeakMap:Map;j=new B}function M(G,ve){if(!G||C)return"";{var Te=j.get(G);if(Te!==void 0)return Te}var Me;C=!0;var Ze=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var gt;gt=$.current,$.current=null,ye();try{if(ve){var Xe=function(){throw Error()};if(Object.defineProperty(Xe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Xe,[])}catch(Zt){Me=Zt}Reflect.construct(G,[],Xe)}else{try{Xe.call()}catch(Zt){Me=Zt}G.call(Xe.prototype)}}else{try{throw Error()}catch(Zt){Me=Zt}G()}}catch(Zt){if(Zt&&Me&&typeof Zt.stack=="string"){for(var Ge=Zt.stack.split(`
19
+ `),fn=Me.stack.split(`
20
+ `),Ot=Ge.length-1,xt=fn.length-1;Ot>=1&&xt>=0&&Ge[Ot]!==fn[xt];)xt--;for(;Ot>=1&&xt>=0;Ot--,xt--)if(Ge[Ot]!==fn[xt]){if(Ot!==1||xt!==1)do if(Ot--,xt--,xt<0||Ge[Ot]!==fn[xt]){var Nn=`
21
+ `+Ge[Ot].replace(" at new "," at ");return G.displayName&&Nn.includes("<anonymous>")&&(Nn=Nn.replace("<anonymous>",G.displayName)),typeof G=="function"&&j.set(G,Nn),Nn}while(Ot>=1&&xt>=0);break}}}finally{C=!1,$.current=gt,de(),Error.prepareStackTrace=Ze}var Jn=G?G.displayName||G.name:"",Lr=Jn?X(Jn):"";return typeof G=="function"&&j.set(G,Lr),Lr}function ee(G,ve,Te){return M(G,!1)}function J(G){var ve=G.prototype;return!!(ve&&ve.isReactComponent)}function Q(G,ve,Te){if(G==null)return"";if(typeof G=="function")return M(G,J(G));if(typeof G=="string")return X(G);switch(G){case d:return X("Suspense");case f:return X("SuspenseList")}if(typeof G=="object")switch(G.$$typeof){case u:return ee(G.render);case h:return Q(G.type,ve,Te);case l:{var Me=G,Ze=Me._payload,gt=Me._init;try{return Q(gt(Ze),ve,Te)}catch{}}}return""}var Y=Object.prototype.hasOwnProperty,pe={},ge=g.ReactDebugCurrentFrame;function le(G){if(G){var ve=G._owner,Te=Q(G.type,G._source,ve?ve.type:null);ge.setExtraStackFrame(Te)}else ge.setExtraStackFrame(null)}function ie(G,ve,Te,Me,Ze){{var gt=Function.call.bind(Y);for(var Xe in G)if(gt(G,Xe)){var Ge=void 0;try{if(typeof G[Xe]!="function"){var fn=Error((Me||"React class")+": "+Te+" type `"+Xe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof G[Xe]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw fn.name="Invariant Violation",fn}Ge=G[Xe](ve,Xe,Me,Te,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ot){Ge=Ot}Ge&&!(Ge instanceof Error)&&(le(Ze),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Me||"React class",Te,Xe,typeof Ge),le(null)),Ge instanceof Error&&!(Ge.message in pe)&&(pe[Ge.message]=!0,le(Ze),v("Failed %s type: %s",Te,Ge.message),le(null))}}}var be=Array.isArray;function ae(G){return be(G)}function Ce(G){{var ve=typeof Symbol=="function"&&Symbol.toStringTag,Te=ve&&G[Symbol.toStringTag]||G.constructor.name||"Object";return Te}}function _e(G){try{return Ye(G),!1}catch{return!0}}function Ye(G){return""+G}function rt(G){if(_e(G))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ce(G)),Ye(G)}var yt=g.ReactCurrentOwner,pt={key:!0,ref:!0,__self:!0,__source:!0},zn,ut,rn;rn={};function mt(G){if(Y.call(G,"ref")){var ve=Object.getOwnPropertyDescriptor(G,"ref").get;if(ve&&ve.isReactWarning)return!1}return G.ref!==void 0}function Re(G){if(Y.call(G,"key")){var ve=Object.getOwnPropertyDescriptor(G,"key").get;if(ve&&ve.isReactWarning)return!1}return G.key!==void 0}function dn(G,ve){if(typeof G.ref=="string"&&yt.current&&ve&&yt.current.stateNode!==ve){var Te=F(yt.current.type);rn[Te]||(v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',F(yt.current.type),G.ref),rn[Te]=!0)}}function Bt(G,ve){{var Te=function(){zn||(zn=!0,v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",ve))};Te.isReactWarning=!0,Object.defineProperty(G,"key",{get:Te,configurable:!0})}}function pn(G,ve){{var Te=function(){ut||(ut=!0,v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",ve))};Te.isReactWarning=!0,Object.defineProperty(G,"ref",{get:Te,configurable:!0})}}var sn=function(G,ve,Te,Me,Ze,gt,Xe){var Ge={$$typeof:t,type:G,key:ve,ref:Te,props:Xe,_owner:gt};return Ge._store={},Object.defineProperty(Ge._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Ge,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Me}),Object.defineProperty(Ge,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ze}),Object.freeze&&(Object.freeze(Ge.props),Object.freeze(Ge)),Ge};function mn(G,ve,Te,Me,Ze){{var gt,Xe={},Ge=null,fn=null;Te!==void 0&&(rt(Te),Ge=""+Te),Re(ve)&&(rt(ve.key),Ge=""+ve.key),mt(ve)&&(fn=ve.ref,dn(ve,Ze));for(gt in ve)Y.call(ve,gt)&&!pt.hasOwnProperty(gt)&&(Xe[gt]=ve[gt]);if(G&&G.defaultProps){var Ot=G.defaultProps;for(gt in Ot)Xe[gt]===void 0&&(Xe[gt]=Ot[gt])}if(Ge||fn){var xt=typeof G=="function"?G.displayName||G.name||"Unknown":G;Ge&&Bt(Xe,xt),fn&&pn(Xe,xt)}return sn(G,Ge,fn,Ze,Me,yt.current,Xe)}}var Rn=g.ReactCurrentOwner,Fn=g.ReactDebugCurrentFrame;function _n(G){if(G){var ve=G._owner,Te=Q(G.type,G._source,ve?ve.type:null);Fn.setExtraStackFrame(Te)}else Fn.setExtraStackFrame(null)}var gn;gn=!1;function At(G){return typeof G=="object"&&G!==null&&G.$$typeof===t}function Qn(){{if(Rn.current){var G=F(Rn.current.type);if(G)return`
22
22
 
23
- Check the render method of \``+G+"`."}return""}}function Ae(G){return""}var Ke={};function Pe(G){{var ve=zn();if(!ve){var Te=typeof G=="string"?G:G.displayName||G.name;Te&&(ve=`
23
+ Check the render method of \``+G+"`."}return""}}function Ae(G){return""}var We={};function Pe(G){{var ve=Qn();if(!ve){var Te=typeof G=="string"?G:G.displayName||G.name;Te&&(ve=`
24
24
 
25
- Check the top-level render call using <`+Te+">.")}return ve}}function Ge(G,ve){{if(!G._store||G._store.validated||G.key!=null)return;G._store.validated=!0;var Te=Pe(ve);if(Ke[Te])return;Ke[Te]=!0;var Me="";G&&G._owner&&G._owner!==Rn.current&&(Me=" It was passed a child from "+F(G._owner.type)+"."),xn(G),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Te,Me),xn(null)}}function Ot(G,ve){{if(typeof G!="object")return;if(oe(G))for(var Te=0;Te<G.length;Te++){var Me=G[Te];At(Me)&&Ge(Me,ve)}else if(At(G))G._store&&(G._store.validated=!0);else if(G){var Ze=y(G);if(typeof Ze=="function"&&Ze!==G.entries)for(var gt=Ze.call(G),Xe;!(Xe=gt.next()).done;)At(Xe.value)&&Ge(Xe.value,ve)}}}function js(G){{var ve=G.type;if(ve==null||typeof ve=="string")return;var Te;if(typeof ve=="function")Te=ve.propTypes;else if(typeof ve=="object"&&(ve.$$typeof===u||ve.$$typeof===p))Te=ve.propTypes;else return;if(Te){var Me=F(ve);ie(Te,G.props,"prop",Me,G)}else if(ve.PropTypes!==void 0&&!mn){mn=!0;var Ze=F(ve);b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ze||"Unknown")}typeof ve.getDefaultProps=="function"&&!ve.getDefaultProps.isReactClassApproved&&b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function bi(G){{for(var ve=Object.keys(G.props),Te=0;Te<ve.length;Te++){var Me=ve[Te];if(Me!=="children"&&Me!=="key"){xn(G),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Me),xn(null);break}}G.ref!==null&&(xn(G),b("Invalid attribute `ref` supplied to `React.Fragment`."),xn(null))}}var Ls={};function ua(G,ve,Te,Me,Ze,gt){{var Xe=D(G);if(!Xe){var He="";(G===void 0||typeof G=="object"&&G!==null&&Object.keys(G).length===0)&&(He+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var dn=Ae();dn?He+=dn:He+=zn();var Rt;G===null?Rt="null":oe(G)?Rt="array":G!==void 0&&G.$$typeof===t?(Rt="<"+(F(G.type)||"Unknown")+" />",He=" Did you accidentally export a JSX literal instead of a component?"):Rt=typeof G,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Rt,He)}var xt=pn(G,ve,Te,Ze,gt);if(xt==null)return xt;if(Xe){var Nn=ve.children;if(Nn!==void 0)if(Me)if(oe(Nn)){for(var Qn=0;Qn<Nn.length;Qn++)Ot(Nn[Qn],G);Object.freeze&&Object.freeze(Nn)}else b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ot(Nn,G)}if(Y.call(ve,"key")){var Br=F(G),Zt=Object.keys(ve).filter(function(la){return la!=="key"}),Fr=Zt.length>0?"{key: someKey, "+Zt.join(": ..., ")+": ...}":"{key: someKey}";if(!Ls[Br+Fr]){var Au=Zt.length>0?"{"+Zt.join(": ..., ")+": ...}":"{}";b(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+Te+">.")}return ve}}function $e(G,ve){{if(!G._store||G._store.validated||G.key!=null)return;G._store.validated=!0;var Te=Pe(ve);if(We[Te])return;We[Te]=!0;var Me="";G&&G._owner&&G._owner!==Rn.current&&(Me=" It was passed a child from "+F(G._owner.type)+"."),_n(G),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Te,Me),_n(null)}}function kt(G,ve){{if(typeof G!="object")return;if(ae(G))for(var Te=0;Te<G.length;Te++){var Me=G[Te];At(Me)&&$e(Me,ve)}else if(At(G))G._store&&(G._store.validated=!0);else if(G){var Ze=y(G);if(typeof Ze=="function"&&Ze!==G.entries)for(var gt=Ze.call(G),Xe;!(Xe=gt.next()).done;)At(Xe.value)&&$e(Xe.value,ve)}}}function Ps(G){{var ve=G.type;if(ve==null||typeof ve=="string")return;var Te;if(typeof ve=="function")Te=ve.propTypes;else if(typeof ve=="object"&&(ve.$$typeof===u||ve.$$typeof===h))Te=ve.propTypes;else return;if(Te){var Me=F(ve);ie(Te,G.props,"prop",Me,G)}else if(ve.PropTypes!==void 0&&!gn){gn=!0;var Ze=F(ve);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ze||"Unknown")}typeof ve.getDefaultProps=="function"&&!ve.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function vi(G){{for(var ve=Object.keys(G.props),Te=0;Te<ve.length;Te++){var Me=ve[Te];if(Me!=="children"&&Me!=="key"){_n(G),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Me),_n(null);break}}G.ref!==null&&(_n(G),v("Invalid attribute `ref` supplied to `React.Fragment`."),_n(null))}}var js={};function ua(G,ve,Te,Me,Ze,gt){{var Xe=D(G);if(!Xe){var Ge="";(G===void 0||typeof G=="object"&&G!==null&&Object.keys(G).length===0)&&(Ge+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var fn=Ae();fn?Ge+=fn:Ge+=Qn();var Ot;G===null?Ot="null":ae(G)?Ot="array":G!==void 0&&G.$$typeof===t?(Ot="<"+(F(G.type)||"Unknown")+" />",Ge=" Did you accidentally export a JSX literal instead of a component?"):Ot=typeof G,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ot,Ge)}var xt=mn(G,ve,Te,Ze,gt);if(xt==null)return xt;if(Xe){var Nn=ve.children;if(Nn!==void 0)if(Me)if(ae(Nn)){for(var Jn=0;Jn<Nn.length;Jn++)kt(Nn[Jn],G);Object.freeze&&Object.freeze(Nn)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else kt(Nn,G)}if(Y.call(ve,"key")){var Lr=F(G),Zt=Object.keys(ve).filter(function(la){return la!=="key"}),Br=Zt.length>0?"{key: someKey, "+Zt.join(": ..., ")+": ...}":"{key: someKey}";if(!js[Lr+Br]){var Tu=Zt.length>0?"{"+Zt.join(": ..., ")+": ...}":"{}";v(`A props object containing a "key" prop is being spread into JSX:
26
26
  let props = %s;
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,Fr,Br,Au,Br),Ls[Br+Fr]=!0}}return G===r?bi(xt):js(xt),xt}}function Kf(G,ve,Te){return ua(G,ve,Te,!0)}function xu(G,ve,Te){return ua(G,ve,Te,!1)}var _u=xu,Cu=Kf;Us.Fragment=r,Us.jsx=_u,Us.jsxs=Cu}()),Us}process.env.NODE_ENV==="production"?ju.exports=Xb():ju.exports=ew();var m=ju.exports;/**
30
+ <%s key={someKey} {...props} />`,Br,Lr,Tu,Lr),js[Lr+Br]=!0}}return G===r?vi(xt):Ps(xt),xt}}function Qf(G,ve,Te){return ua(G,ve,Te,!0)}function _u(G,ve,Te){return ua(G,ve,Te,!1)}var Cu=_u,Au=Qf;Fs.Fragment=r,Fs.jsx=Cu,Fs.jsxs=Au}()),Fs}process.env.NODE_ENV==="production"?Lu.exports=rw():Lu.exports=iw();var m=Lu.exports;/**
31
31
  * @remix-run/router v1.16.1
32
32
  *
33
33
  * Copyright (c) Remix Software Inc.
@@ -36,7 +36,7 @@ React keys must be passed directly to JSX without using spread:
36
36
  * LICENSE.md file in the root directory of this source tree.
37
37
  *
38
38
  * @license MIT
39
- */function ha(){return ha=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ha.apply(this,arguments)}var $r;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})($r||($r={}));function tw(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:n,v5Compat:r=!1}=e,i;i=t.map((v,a)=>f(v,typeof v=="string"?null:v.state,a===0?"default":void 0));let s=u(n??i.length-1),o=$r.Pop,c=null;function u(v){return Math.min(Math.max(v,0),i.length-1)}function d(){return i[s]}function f(v,a,h){a===void 0&&(a=null);let y=rw(i?d().pathname:"/",v,a,h);return Un(y.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(v)),y}function p(v){return typeof v=="string"?v:pa(v)}return{get index(){return s},get action(){return o},get location(){return d()},createHref:p,createURL(v){return new URL(p(v),"http://localhost")},encodeLocation(v){let a=typeof v=="string"?Ei(v):v;return{pathname:a.pathname||"",search:a.search||"",hash:a.hash||""}},push(v,a){o=$r.Push;let h=f(v,a);s+=1,i.splice(s,i.length,h),r&&c&&c({action:o,location:h,delta:1})},replace(v,a){o=$r.Replace;let h=f(v,a);i[s]=h,r&&c&&c({action:o,location:h,delta:0})},go(v){o=$r.Pop;let a=u(s+v),h=i[a];s=a,c&&c({action:o,location:h,delta:v})},listen(v){return c=v,()=>{c=null}}}}function Ye(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Un(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function nw(){return Math.random().toString(36).substr(2,8)}function rw(e,t,n,r){return n===void 0&&(n=null),ha({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ei(t):t,{state:n,key:t&&t.key||r||nw()})}function pa(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Ei(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var ch;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(ch||(ch={}));function uh(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Ei(t):t,i=Gr(r.pathname||"/",n);if(i==null)return null;let s=lh(e);iw(s);let o=null;for(let c=0;o==null&&c<s.length;++c){let u=mw(i);o=hw(s[c],u)}return o}function lh(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(s,o,c)=>{let u={relativePath:c===void 0?s.path||"":c,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};u.relativePath.startsWith("/")&&(Ye(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let d=xr([r,u.relativePath]),f=n.concat(u);s.children&&s.children.length>0&&(Ye(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+d+'".')),lh(s.children,t,f,d)),!(s.path==null&&!s.index)&&t.push({path:d,score:dw(d,s.index),routesMeta:f})};return e.forEach((s,o)=>{var c;if(s.path===""||!((c=s.path)!=null&&c.includes("?")))i(s,o);else for(let u of dh(s.path))i(s,o,u)}),t}function dh(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=dh(r.join("/")),c=[];return c.push(...o.map(u=>u===""?s:[s,u].join("/"))),i&&c.push(...o),c.map(u=>e.startsWith("/")&&u===""?"/":u)}function iw(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:fw(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const sw=/^:[\w-]+$/,ow=3,aw=2,cw=1,uw=10,lw=-2,fh=e=>e==="*";function dw(e,t){let n=e.split("/"),r=n.length;return n.some(fh)&&(r+=lw),t&&(r+=aw),n.filter(i=>!fh(i)).reduce((i,s)=>i+(sw.test(s)?ow:s===""?cw:uw),r)}function fw(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function hw(e,t){let{routesMeta:n}=e,r={},i="/",s=[];for(let o=0;o<n.length;++o){let c=n[o],u=o===n.length-1,d=i==="/"?t:t.slice(i.length)||"/",f=Lu({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d);if(!f)return null;Object.assign(r,f.params);let p=c.route;s.push({params:r,pathname:xr([i,f.pathname]),pathnameBase:bw(xr([i,f.pathnameBase])),route:p}),f.pathnameBase!=="/"&&(i=xr([i,f.pathnameBase]))}return s}function Lu(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=pw(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),c=i.slice(1);return{params:r.reduce((d,f,p)=>{let{paramName:l,isOptional:v}=f;if(l==="*"){let h=c[p]||"";o=s.slice(0,s.length-h.length).replace(/(.)\/+$/,"$1")}const a=c[p];return v&&!a?d[l]=void 0:d[l]=(a||"").replace(/%2F/g,"/"),d},{}),pathname:s,pathnameBase:o,pattern:e}}function pw(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Un(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,c,u)=>(r.push({paramName:c,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function mw(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Un(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Gr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function gw(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Ei(e):e;return{pathname:n?n.startsWith("/")?n:yw(n,t):t,search:ww(r),hash:Ew(i)}}function yw(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Bu(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function vw(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Fu(e,t){let n=vw(e);return t?n.map((r,i)=>i===e.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Uu(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Ei(e):(i=ha({},e),Ye(!i.pathname||!i.pathname.includes("?"),Bu("?","pathname","search",i)),Ye(!i.pathname||!i.pathname.includes("#"),Bu("#","pathname","hash",i)),Ye(!i.search||!i.search.includes("#"),Bu("#","search","hash",i)));let s=e===""||i.pathname==="",o=s?"/":i.pathname,c;if(o==null)c=n;else{let p=t.length-1;if(!r&&o.startsWith("..")){let l=o.split("/");for(;l[0]==="..";)l.shift(),p-=1;i.pathname=l.join("/")}c=p>=0?t[p]:"/"}let u=gw(i,c),d=o&&o!=="/"&&o.endsWith("/"),f=(s||o===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(d||f)&&(u.pathname+="/"),u}const xr=e=>e.join("/").replace(/\/\/+/g,"/"),bw=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),ww=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Ew=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Sw(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const hh=["post","put","patch","delete"];new Set(hh);const xw=["get",...hh];new Set(xw);/**
39
+ */function ha(){return ha=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ha.apply(this,arguments)}var qr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(qr||(qr={}));function sw(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:n,v5Compat:r=!1}=e,i;i=t.map((b,a)=>f(b,typeof b=="string"?null:b.state,a===0?"default":void 0));let s=u(n??i.length-1),o=qr.Pop,c=null;function u(b){return Math.min(Math.max(b,0),i.length-1)}function d(){return i[s]}function f(b,a,p){a===void 0&&(a=null);let y=aw(i?d().pathname:"/",b,a,p);return Un(y.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(b)),y}function h(b){return typeof b=="string"?b:pa(b)}return{get index(){return s},get action(){return o},get location(){return d()},createHref:h,createURL(b){return new URL(h(b),"http://localhost")},encodeLocation(b){let a=typeof b=="string"?wi(b):b;return{pathname:a.pathname||"",search:a.search||"",hash:a.hash||""}},push(b,a){o=qr.Push;let p=f(b,a);s+=1,i.splice(s,i.length,p),r&&c&&c({action:o,location:p,delta:1})},replace(b,a){o=qr.Replace;let p=f(b,a);i[s]=p,r&&c&&c({action:o,location:p,delta:0})},go(b){o=qr.Pop;let a=u(s+b),p=i[a];s=a,c&&c({action:o,location:p,delta:b})},listen(b){return c=b,()=>{c=null}}}}function He(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Un(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function ow(){return Math.random().toString(36).substr(2,8)}function aw(e,t,n,r){return n===void 0&&(n=null),ha({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?wi(t):t,{state:n,key:t&&t.key||r||ow()})}function pa(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function wi(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var lh;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(lh||(lh={}));function dh(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?wi(t):t,i=$r(r.pathname||"/",n);if(i==null)return null;let s=fh(e);cw(s);let o=null;for(let c=0;o==null&&c<s.length;++c){let u=bw(i);o=yw(s[c],u)}return o}function fh(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(s,o,c)=>{let u={relativePath:c===void 0?s.path||"":c,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};u.relativePath.startsWith("/")&&(He(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let d=Er([r,u.relativePath]),f=n.concat(u);s.children&&s.children.length>0&&(He(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+d+'".')),fh(s.children,t,f,d)),!(s.path==null&&!s.index)&&t.push({path:d,score:mw(d,s.index),routesMeta:f})};return e.forEach((s,o)=>{var c;if(s.path===""||!((c=s.path)!=null&&c.includes("?")))i(s,o);else for(let u of hh(s.path))i(s,o,u)}),t}function hh(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=hh(r.join("/")),c=[];return c.push(...o.map(u=>u===""?s:[s,u].join("/"))),i&&c.push(...o),c.map(u=>e.startsWith("/")&&u===""?"/":u)}function cw(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:gw(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const uw=/^:[\w-]+$/,lw=3,dw=2,fw=1,hw=10,pw=-2,ph=e=>e==="*";function mw(e,t){let n=e.split("/"),r=n.length;return n.some(ph)&&(r+=pw),t&&(r+=dw),n.filter(i=>!ph(i)).reduce((i,s)=>i+(uw.test(s)?lw:s===""?fw:hw),r)}function gw(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function yw(e,t){let{routesMeta:n}=e,r={},i="/",s=[];for(let o=0;o<n.length;++o){let c=n[o],u=o===n.length-1,d=i==="/"?t:t.slice(i.length)||"/",f=Bu({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d);if(!f)return null;Object.assign(r,f.params);let h=c.route;s.push({params:r,pathname:Er([i,f.pathname]),pathnameBase:xw(Er([i,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(i=Er([i,f.pathnameBase]))}return s}function Bu(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=vw(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),c=i.slice(1);return{params:r.reduce((d,f,h)=>{let{paramName:l,isOptional:b}=f;if(l==="*"){let p=c[h]||"";o=s.slice(0,s.length-p.length).replace(/(.)\/+$/,"$1")}const a=c[h];return b&&!a?d[l]=void 0:d[l]=(a||"").replace(/%2F/g,"/"),d},{}),pathname:s,pathnameBase:o,pattern:e}}function vw(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Un(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,c,u)=>(r.push({paramName:c,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function bw(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Un(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function $r(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function ww(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?wi(e):e;return{pathname:n?n.startsWith("/")?n:Ew(n,t):t,search:_w(r),hash:Cw(i)}}function Ew(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Fu(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Sw(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Uu(e,t){let n=Sw(e);return t?n.map((r,i)=>i===e.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Vu(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=wi(e):(i=ha({},e),He(!i.pathname||!i.pathname.includes("?"),Fu("?","pathname","search",i)),He(!i.pathname||!i.pathname.includes("#"),Fu("#","pathname","hash",i)),He(!i.search||!i.search.includes("#"),Fu("#","search","hash",i)));let s=e===""||i.pathname==="",o=s?"/":i.pathname,c;if(o==null)c=n;else{let h=t.length-1;if(!r&&o.startsWith("..")){let l=o.split("/");for(;l[0]==="..";)l.shift(),h-=1;i.pathname=l.join("/")}c=h>=0?t[h]:"/"}let u=ww(i,c),d=o&&o!=="/"&&o.endsWith("/"),f=(s||o===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(d||f)&&(u.pathname+="/"),u}const Er=e=>e.join("/").replace(/\/\/+/g,"/"),xw=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),_w=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Cw=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Aw(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const mh=["post","put","patch","delete"];new Set(mh);const Tw=["get",...mh];new Set(Tw);/**
40
40
  * React Router v6.23.1
41
41
  *
42
42
  * Copyright (c) Remix Software Inc.
@@ -45,9 +45,9 @@ React keys must be passed directly to JSX without using spread:
45
45
  * LICENSE.md file in the root directory of this source tree.
46
46
  *
47
47
  * @license MIT
48
- */function qs(){return qs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qs.apply(this,arguments)}const Vs=de.createContext(null);process.env.NODE_ENV!=="production"&&(Vs.displayName="DataRouter");const qu=de.createContext(null);process.env.NODE_ENV!=="production"&&(qu.displayName="DataRouterState");const _w=de.createContext(null);process.env.NODE_ENV!=="production"&&(_w.displayName="Await");const qn=de.createContext(null);process.env.NODE_ENV!=="production"&&(qn.displayName="Navigation");const Vi=de.createContext(null);process.env.NODE_ENV!=="production"&&(Vi.displayName="Location");const Jn=de.createContext({outlet:null,matches:[],isDataRoute:!1});process.env.NODE_ENV!=="production"&&(Jn.displayName="Route");const Vu=de.createContext(null);process.env.NODE_ENV!=="production"&&(Vu.displayName="RouteError");function Cw(e,t){let{relative:n}=t===void 0?{}:t;$i()||(process.env.NODE_ENV!=="production"?Ye(!1,"useHref() may be used only in the context of a <Router> component."):Ye(!1));let{basename:r,navigator:i}=de.useContext(qn),{hash:s,pathname:o,search:c}=$s(e,{relative:n}),u=o;return r!=="/"&&(u=o==="/"?r:xr([r,o])),i.createHref({pathname:u,search:c,hash:s})}function $i(){return de.useContext(Vi)!=null}function Yt(){return $i()||(process.env.NODE_ENV!=="production"?Ye(!1,"useLocation() may be used only in the context of a <Router> component."):Ye(!1)),de.useContext(Vi).location}function Aw(){return de.useContext(Vi).navigationType}const ph="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function mh(e){de.useContext(qn).static||de.useLayoutEffect(e)}function Tt(){let{isDataRoute:e}=de.useContext(Jn);return e?Uw():Tw()}function Tw(){$i()||(process.env.NODE_ENV!=="production"?Ye(!1,"useNavigate() may be used only in the context of a <Router> component."):Ye(!1));let e=de.useContext(Vs),{basename:t,future:n,navigator:r}=de.useContext(qn),{matches:i}=de.useContext(Jn),{pathname:s}=Yt(),o=JSON.stringify(Fu(i,n.v7_relativeSplatPath)),c=de.useRef(!1);return mh(()=>{c.current=!0}),de.useCallback(function(d,f){if(f===void 0&&(f={}),process.env.NODE_ENV!=="production"&&Un(c.current,ph),!c.current)return;if(typeof d=="number"){r.go(d);return}let p=Uu(d,JSON.parse(o),s,f.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:xr([t,p.pathname])),(f.replace?r.replace:r.push)(p,f.state,f)},[t,r,o,s,e])}function gh(){let{matches:e}=de.useContext(Jn),t=e[e.length-1];return t?t.params:{}}function $s(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=de.useContext(qn),{matches:i}=de.useContext(Jn),{pathname:s}=Yt(),o=JSON.stringify(Fu(i,r.v7_relativeSplatPath));return de.useMemo(()=>Uu(e,JSON.parse(o),s,n==="path"),[e,o,s,n])}function Iw(e,t){return kw(e,t)}function kw(e,t,n,r){$i()||(process.env.NODE_ENV!=="production"?Ye(!1,"useRoutes() may be used only in the context of a <Router> component."):Ye(!1));let{navigator:i}=de.useContext(qn),{matches:s}=de.useContext(Jn),o=s[s.length-1],c=o?o.params:{},u=o?o.pathname:"/",d=o?o.pathnameBase:"/",f=o&&o.route;if(process.env.NODE_ENV!=="production"){let b=f&&f.path||"";bh(u,!f||b.endsWith("*"),"You rendered descendant <Routes> (or called `useRoutes()`) at "+('"'+u+'" (under <Route path="'+b+'">) but the ')+`parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
48
+ */function Us(){return Us=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Us.apply(this,arguments)}const Vs=se.createContext(null);process.env.NODE_ENV!=="production"&&(Vs.displayName="DataRouter");const qu=se.createContext(null);process.env.NODE_ENV!=="production"&&(qu.displayName="DataRouterState");const Iw=se.createContext(null);process.env.NODE_ENV!=="production"&&(Iw.displayName="Await");const Vn=se.createContext(null);process.env.NODE_ENV!=="production"&&(Vn.displayName="Navigation");const Ui=se.createContext(null);process.env.NODE_ENV!=="production"&&(Ui.displayName="Location");const Zn=se.createContext({outlet:null,matches:[],isDataRoute:!1});process.env.NODE_ENV!=="production"&&(Zn.displayName="Route");const $u=se.createContext(null);process.env.NODE_ENV!=="production"&&($u.displayName="RouteError");function kw(e,t){let{relative:n}=t===void 0?{}:t;Vi()||(process.env.NODE_ENV!=="production"?He(!1,"useHref() may be used only in the context of a <Router> component."):He(!1));let{basename:r,navigator:i}=se.useContext(Vn),{hash:s,pathname:o,search:c}=qs(e,{relative:n}),u=o;return r!=="/"&&(u=o==="/"?r:Er([r,o])),i.createHref({pathname:u,search:c,hash:s})}function Vi(){return se.useContext(Ui)!=null}function Yt(){return Vi()||(process.env.NODE_ENV!=="production"?He(!1,"useLocation() may be used only in the context of a <Router> component."):He(!1)),se.useContext(Ui).location}function Ow(){return se.useContext(Ui).navigationType}const gh="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function yh(e){se.useContext(Vn).static||se.useLayoutEffect(e)}function Mt(){let{isDataRoute:e}=se.useContext(Zn);return e?Gw():Rw()}function Rw(){Vi()||(process.env.NODE_ENV!=="production"?He(!1,"useNavigate() may be used only in the context of a <Router> component."):He(!1));let e=se.useContext(Vs),{basename:t,future:n,navigator:r}=se.useContext(Vn),{matches:i}=se.useContext(Zn),{pathname:s}=Yt(),o=JSON.stringify(Uu(i,n.v7_relativeSplatPath)),c=se.useRef(!1);return yh(()=>{c.current=!0}),se.useCallback(function(d,f){if(f===void 0&&(f={}),process.env.NODE_ENV!=="production"&&Un(c.current,gh),!c.current)return;if(typeof d=="number"){r.go(d);return}let h=Vu(d,JSON.parse(o),s,f.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:Er([t,h.pathname])),(f.replace?r.replace:r.push)(h,f.state,f)},[t,r,o,s,e])}function vh(){let{matches:e}=se.useContext(Zn),t=e[e.length-1];return t?t.params:{}}function qs(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=se.useContext(Vn),{matches:i}=se.useContext(Zn),{pathname:s}=Yt(),o=JSON.stringify(Uu(i,r.v7_relativeSplatPath));return se.useMemo(()=>Vu(e,JSON.parse(o),s,n==="path"),[e,o,s,n])}function Nw(e,t){return Mw(e,t)}function Mw(e,t,n,r){Vi()||(process.env.NODE_ENV!=="production"?He(!1,"useRoutes() may be used only in the context of a <Router> component."):He(!1));let{navigator:i}=se.useContext(Vn),{matches:s}=se.useContext(Zn),o=s[s.length-1],c=o?o.params:{},u=o?o.pathname:"/",d=o?o.pathnameBase:"/",f=o&&o.route;if(process.env.NODE_ENV!=="production"){let v=f&&f.path||"";Eh(u,!f||v.endsWith("*"),"You rendered descendant <Routes> (or called `useRoutes()`) at "+('"'+u+'" (under <Route path="'+v+'">) but the ')+`parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
49
49
 
50
- `+('Please change the parent <Route path="'+b+'"> to <Route ')+('path="'+(b==="/"?"*":b+"/*")+'">.'))}let p=Yt(),l;if(t){var v;let b=typeof t=="string"?Ei(t):t;d==="/"||(v=b.pathname)!=null&&v.startsWith(d)||(process.env.NODE_ENV!=="production"?Ye(!1,"When overriding the location using `<Routes location>` or `useRoutes(routes, location)`, the location pathname must begin with the portion of the URL pathname that was "+('matched by all parent routes. The current pathname base is "'+d+'" ')+('but pathname "'+b.pathname+'" was given in the `location` prop.')):Ye(!1)),l=b}else l=p;let a=l.pathname||"/",h=a;if(d!=="/"){let b=d.replace(/^\//,"").split("/");h="/"+a.replace(/^\//,"").split("/").slice(b.length).join("/")}let y=uh(e,{pathname:h});process.env.NODE_ENV!=="production"&&(process.env.NODE_ENV!=="production"&&Un(f||y!=null,'No routes matched location "'+l.pathname+l.search+l.hash+'" '),process.env.NODE_ENV!=="production"&&Un(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,'Matched leaf route at location "'+l.pathname+l.search+l.hash+'" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.'));let g=Dw(y&&y.map(b=>Object.assign({},b,{params:Object.assign({},c,b.params),pathname:xr([d,i.encodeLocation?i.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?d:xr([d,i.encodeLocation?i.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),s,n,r);return t&&g?de.createElement(Vi.Provider,{value:{location:qs({pathname:"/",search:"",hash:"",state:null,key:"default"},l),navigationType:$r.Pop}},g):g}function Ow(){let e=Fw(),t=Sw(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},o=null;return process.env.NODE_ENV!=="production"&&(console.error("Error handled by React Router default ErrorBoundary:",e),o=de.createElement(de.Fragment,null,de.createElement("p",null,"💿 Hey developer 👋"),de.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",de.createElement("code",{style:s},"ErrorBoundary")," or"," ",de.createElement("code",{style:s},"errorElement")," prop on your route."))),de.createElement(de.Fragment,null,de.createElement("h2",null,"Unexpected Application Error!"),de.createElement("h3",{style:{fontStyle:"italic"}},t),n?de.createElement("pre",{style:i},n):null,o)}const Rw=de.createElement(Ow,null);class Nw extends de.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?de.createElement(Jn.Provider,{value:this.props.routeContext},de.createElement(Vu.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Mw(e){let{routeContext:t,match:n,children:r}=e,i=de.useContext(Vs);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),de.createElement(Jn.Provider,{value:t},r)}function Dw(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var s;if((s=n)!=null&&s.errors)e=n.matches;else return null}let o=e,c=(i=n)==null?void 0:i.errors;if(c!=null){let f=o.findIndex(p=>p.route.id&&(c==null?void 0:c[p.route.id])!==void 0);f>=0||(process.env.NODE_ENV!=="production"?Ye(!1,"Could not find a matching route for errors on route IDs: "+Object.keys(c).join(",")):Ye(!1)),o=o.slice(0,Math.min(o.length,f+1))}let u=!1,d=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f<o.length;f++){let p=o[f];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(d=f),p.route.id){let{loaderData:l,errors:v}=n,a=p.route.loader&&l[p.route.id]===void 0&&(!v||v[p.route.id]===void 0);if(p.route.lazy||a){u=!0,d>=0?o=o.slice(0,d+1):o=[o[0]];break}}}return o.reduceRight((f,p,l)=>{let v,a=!1,h=null,y=null;n&&(v=c&&p.route.id?c[p.route.id]:void 0,h=p.route.errorElement||Rw,u&&(d<0&&l===0?(bh("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),a=!0,y=null):d===l&&(a=!0,y=p.route.hydrateFallbackElement||null)));let g=t.concat(o.slice(0,l+1)),b=()=>{let w;return v?w=h:a?w=y:p.route.Component?w=de.createElement(p.route.Component,null):p.route.element?w=p.route.element:w=f,de.createElement(Mw,{match:p,routeContext:{outlet:f,matches:g,isDataRoute:n!=null},children:w})};return n&&(p.route.ErrorBoundary||p.route.errorElement||l===0)?de.createElement(Nw,{location:n.location,revalidation:n.revalidation,component:h,error:v,children:b(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):b()},null)}var yh=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(yh||{}),Gs=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Gs||{});function $u(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function Pw(e){let t=de.useContext(Vs);return t||(process.env.NODE_ENV!=="production"?Ye(!1,$u(e)):Ye(!1)),t}function jw(e){let t=de.useContext(qu);return t||(process.env.NODE_ENV!=="production"?Ye(!1,$u(e)):Ye(!1)),t}function Lw(e){let t=de.useContext(Jn);return t||(process.env.NODE_ENV!=="production"?Ye(!1,$u(e)):Ye(!1)),t}function Gu(e){let t=Lw(e),n=t.matches[t.matches.length-1];return n.route.id||(process.env.NODE_ENV!=="production"?Ye(!1,e+' can only be used on routes that contain a unique "id"'):Ye(!1)),n.route.id}function Bw(){return Gu(Gs.UseRouteId)}function Fw(){var e;let t=de.useContext(Vu),n=jw(Gs.UseRouteError),r=Gu(Gs.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Uw(){let{router:e}=Pw(yh.UseNavigateStable),t=Gu(Gs.UseNavigateStable),n=de.useRef(!1);return mh(()=>{n.current=!0}),de.useCallback(function(i,s){s===void 0&&(s={}),process.env.NODE_ENV!=="production"&&Un(n.current,ph),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,qs({fromRouteId:t},s)))},[e,t])}const vh={};function bh(e,t,n){!t&&!vh[e]&&(vh[e]=!0,process.env.NODE_ENV!=="production"&&Un(!1,n))}const wh=de["startTransition"];function Eh(e){let{basename:t,children:n,initialEntries:r,initialIndex:i,future:s}=e,o=de.useRef();o.current==null&&(o.current=tw({initialEntries:r,initialIndex:i,v5Compat:!0}));let c=o.current,[u,d]=de.useState({action:c.action,location:c.location}),{v7_startTransition:f}=s||{},p=de.useCallback(l=>{f&&wh?wh(()=>d(l)):d(l)},[d,f]);return de.useLayoutEffect(()=>c.listen(p),[c,p]),de.createElement(qw,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:c,future:s})}function Hs(e){let{to:t,replace:n,state:r,relative:i}=e;$i()||(process.env.NODE_ENV!=="production"?Ye(!1,"<Navigate> may be used only in the context of a <Router> component."):Ye(!1));let{future:s,static:o}=de.useContext(qn);process.env.NODE_ENV!=="production"&&Un(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:c}=de.useContext(Jn),{pathname:u}=Yt(),d=Tt(),f=Uu(t,Fu(c,s.v7_relativeSplatPath),u,i==="path"),p=JSON.stringify(f);return de.useEffect(()=>d(JSON.parse(p),{replace:n,state:r,relative:i}),[d,p,i,n,r]),null}function Oe(e){process.env.NODE_ENV!=="production"?Ye(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>."):Ye(!1)}function qw(e){let{basename:t="/",children:n=null,location:r,navigationType:i=$r.Pop,navigator:s,static:o=!1,future:c}=e;$i()&&(process.env.NODE_ENV!=="production"?Ye(!1,"You cannot render a <Router> inside another <Router>. You should never have more than one in your app."):Ye(!1));let u=t.replace(/^\/*/,"/"),d=de.useMemo(()=>({basename:u,navigator:s,static:o,future:qs({v7_relativeSplatPath:!1},c)}),[u,c,s,o]);typeof r=="string"&&(r=Ei(r));let{pathname:f="/",search:p="",hash:l="",state:v=null,key:a="default"}=r,h=de.useMemo(()=>{let y=Gr(f,u);return y==null?null:{location:{pathname:y,search:p,hash:l,state:v,key:a},navigationType:i}},[u,f,p,l,v,a,i]);return process.env.NODE_ENV!=="production"&&Un(h!=null,'<Router basename="'+u+'"> is not able to match the URL '+('"'+f+p+l+'" because it does not start with the ')+"basename, so the <Router> won't render anything."),h==null?null:de.createElement(qn.Provider,{value:d},de.createElement(Vi.Provider,{children:n,value:h}))}function ur(e){let{children:t,location:n}=e;return Iw(ma(t),n)}new Promise(()=>{});function ma(e,t){t===void 0&&(t=[]);let n=[];return de.Children.forEach(e,(r,i)=>{if(!de.isValidElement(r))return;let s=[...t,i];if(r.type===de.Fragment){n.push.apply(n,ma(r.props.children,s));return}r.type!==Oe&&(process.env.NODE_ENV!=="production"?Ye(!1,"["+(typeof r.type=="string"?r.type:r.type.name)+"] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>"):Ye(!1)),!r.props.index||!r.props.children||(process.env.NODE_ENV!=="production"?Ye(!1,"An index route cannot have child routes."):Ye(!1));let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=ma(r.props.children,s)),n.push(o)}),n}/**
50
+ `+('Please change the parent <Route path="'+v+'"> to <Route ')+('path="'+(v==="/"?"*":v+"/*")+'">.'))}let h=Yt(),l;if(t){var b;let v=typeof t=="string"?wi(t):t;d==="/"||(b=v.pathname)!=null&&b.startsWith(d)||(process.env.NODE_ENV!=="production"?He(!1,"When overriding the location using `<Routes location>` or `useRoutes(routes, location)`, the location pathname must begin with the portion of the URL pathname that was "+('matched by all parent routes. The current pathname base is "'+d+'" ')+('but pathname "'+v.pathname+'" was given in the `location` prop.')):He(!1)),l=v}else l=h;let a=l.pathname||"/",p=a;if(d!=="/"){let v=d.replace(/^\//,"").split("/");p="/"+a.replace(/^\//,"").split("/").slice(v.length).join("/")}let y=dh(e,{pathname:p});process.env.NODE_ENV!=="production"&&(process.env.NODE_ENV!=="production"&&Un(f||y!=null,'No routes matched location "'+l.pathname+l.search+l.hash+'" '),process.env.NODE_ENV!=="production"&&Un(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,'Matched leaf route at location "'+l.pathname+l.search+l.hash+'" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.'));let g=Bw(y&&y.map(v=>Object.assign({},v,{params:Object.assign({},c,v.params),pathname:Er([d,i.encodeLocation?i.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?d:Er([d,i.encodeLocation?i.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),s,n,r);return t&&g?se.createElement(Ui.Provider,{value:{location:Us({pathname:"/",search:"",hash:"",state:null,key:"default"},l),navigationType:qr.Pop}},g):g}function Dw(){let e=$w(),t=Aw(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},o=null;return process.env.NODE_ENV!=="production"&&(console.error("Error handled by React Router default ErrorBoundary:",e),o=se.createElement(se.Fragment,null,se.createElement("p",null,"💿 Hey developer 👋"),se.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",se.createElement("code",{style:s},"ErrorBoundary")," or"," ",se.createElement("code",{style:s},"errorElement")," prop on your route."))),se.createElement(se.Fragment,null,se.createElement("h2",null,"Unexpected Application Error!"),se.createElement("h3",{style:{fontStyle:"italic"}},t),n?se.createElement("pre",{style:i},n):null,o)}const Pw=se.createElement(Dw,null);class jw extends se.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?se.createElement(Zn.Provider,{value:this.props.routeContext},se.createElement($u.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Lw(e){let{routeContext:t,match:n,children:r}=e,i=se.useContext(Vs);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),se.createElement(Zn.Provider,{value:t},r)}function Bw(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var s;if((s=n)!=null&&s.errors)e=n.matches;else return null}let o=e,c=(i=n)==null?void 0:i.errors;if(c!=null){let f=o.findIndex(h=>h.route.id&&(c==null?void 0:c[h.route.id])!==void 0);f>=0||(process.env.NODE_ENV!=="production"?He(!1,"Could not find a matching route for errors on route IDs: "+Object.keys(c).join(",")):He(!1)),o=o.slice(0,Math.min(o.length,f+1))}let u=!1,d=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f<o.length;f++){let h=o[f];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(d=f),h.route.id){let{loaderData:l,errors:b}=n,a=h.route.loader&&l[h.route.id]===void 0&&(!b||b[h.route.id]===void 0);if(h.route.lazy||a){u=!0,d>=0?o=o.slice(0,d+1):o=[o[0]];break}}}return o.reduceRight((f,h,l)=>{let b,a=!1,p=null,y=null;n&&(b=c&&h.route.id?c[h.route.id]:void 0,p=h.route.errorElement||Pw,u&&(d<0&&l===0?(Eh("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),a=!0,y=null):d===l&&(a=!0,y=h.route.hydrateFallbackElement||null)));let g=t.concat(o.slice(0,l+1)),v=()=>{let w;return b?w=p:a?w=y:h.route.Component?w=se.createElement(h.route.Component,null):h.route.element?w=h.route.element:w=f,se.createElement(Lw,{match:h,routeContext:{outlet:f,matches:g,isDataRoute:n!=null},children:w})};return n&&(h.route.ErrorBoundary||h.route.errorElement||l===0)?se.createElement(jw,{location:n.location,revalidation:n.revalidation,component:p,error:b,children:v(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):v()},null)}var bh=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(bh||{}),$s=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}($s||{});function Gu(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function Fw(e){let t=se.useContext(Vs);return t||(process.env.NODE_ENV!=="production"?He(!1,Gu(e)):He(!1)),t}function Uw(e){let t=se.useContext(qu);return t||(process.env.NODE_ENV!=="production"?He(!1,Gu(e)):He(!1)),t}function Vw(e){let t=se.useContext(Zn);return t||(process.env.NODE_ENV!=="production"?He(!1,Gu(e)):He(!1)),t}function Hu(e){let t=Vw(e),n=t.matches[t.matches.length-1];return n.route.id||(process.env.NODE_ENV!=="production"?He(!1,e+' can only be used on routes that contain a unique "id"'):He(!1)),n.route.id}function qw(){return Hu($s.UseRouteId)}function $w(){var e;let t=se.useContext($u),n=Uw($s.UseRouteError),r=Hu($s.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Gw(){let{router:e}=Fw(bh.UseNavigateStable),t=Hu($s.UseNavigateStable),n=se.useRef(!1);return yh(()=>{n.current=!0}),se.useCallback(function(i,s){s===void 0&&(s={}),process.env.NODE_ENV!=="production"&&Un(n.current,gh),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Us({fromRouteId:t},s)))},[e,t])}const wh={};function Eh(e,t,n){!t&&!wh[e]&&(wh[e]=!0,process.env.NODE_ENV!=="production"&&Un(!1,n))}const Sh=se["startTransition"];function xh(e){let{basename:t,children:n,initialEntries:r,initialIndex:i,future:s}=e,o=se.useRef();o.current==null&&(o.current=sw({initialEntries:r,initialIndex:i,v5Compat:!0}));let c=o.current,[u,d]=se.useState({action:c.action,location:c.location}),{v7_startTransition:f}=s||{},h=se.useCallback(l=>{f&&Sh?Sh(()=>d(l)):d(l)},[d,f]);return se.useLayoutEffect(()=>c.listen(h),[c,h]),se.createElement(Hw,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:c,future:s})}function Gs(e){let{to:t,replace:n,state:r,relative:i}=e;Vi()||(process.env.NODE_ENV!=="production"?He(!1,"<Navigate> may be used only in the context of a <Router> component."):He(!1));let{future:s,static:o}=se.useContext(Vn);process.env.NODE_ENV!=="production"&&Un(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:c}=se.useContext(Zn),{pathname:u}=Yt(),d=Mt(),f=Vu(t,Uu(c,s.v7_relativeSplatPath),u,i==="path"),h=JSON.stringify(f);return se.useEffect(()=>d(JSON.parse(h),{replace:n,state:r,relative:i}),[d,h,i,n,r]),null}function Oe(e){process.env.NODE_ENV!=="production"?He(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>."):He(!1)}function Hw(e){let{basename:t="/",children:n=null,location:r,navigationType:i=qr.Pop,navigator:s,static:o=!1,future:c}=e;Vi()&&(process.env.NODE_ENV!=="production"?He(!1,"You cannot render a <Router> inside another <Router>. You should never have more than one in your app."):He(!1));let u=t.replace(/^\/*/,"/"),d=se.useMemo(()=>({basename:u,navigator:s,static:o,future:Us({v7_relativeSplatPath:!1},c)}),[u,c,s,o]);typeof r=="string"&&(r=wi(r));let{pathname:f="/",search:h="",hash:l="",state:b=null,key:a="default"}=r,p=se.useMemo(()=>{let y=$r(f,u);return y==null?null:{location:{pathname:y,search:h,hash:l,state:b,key:a},navigationType:i}},[u,f,h,l,b,a,i]);return process.env.NODE_ENV!=="production"&&Un(p!=null,'<Router basename="'+u+'"> is not able to match the URL '+('"'+f+h+l+'" because it does not start with the ')+"basename, so the <Router> won't render anything."),p==null?null:se.createElement(Vn.Provider,{value:d},se.createElement(Ui.Provider,{children:n,value:p}))}function ur(e){let{children:t,location:n}=e;return Nw(ma(t),n)}new Promise(()=>{});function ma(e,t){t===void 0&&(t=[]);let n=[];return se.Children.forEach(e,(r,i)=>{if(!se.isValidElement(r))return;let s=[...t,i];if(r.type===se.Fragment){n.push.apply(n,ma(r.props.children,s));return}r.type!==Oe&&(process.env.NODE_ENV!=="production"?He(!1,"["+(typeof r.type=="string"?r.type:r.type.name)+"] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>"):He(!1)),!r.props.index||!r.props.children||(process.env.NODE_ENV!=="production"?He(!1,"An index route cannot have child routes."):He(!1));let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=ma(r.props.children,s)),n.push(o)}),n}/**
51
51
  * React Router DOM v6.23.1
52
52
  *
53
53
  * Copyright (c) Remix Software Inc.
@@ -56,12 +56,12 @@ React keys must be passed directly to JSX without using spread:
56
56
  * LICENSE.md file in the root directory of this source tree.
57
57
  *
58
58
  * @license MIT
59
- */function Gi(){return Gi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gi.apply(this,arguments)}function Hu(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}const ga="get",ya="application/x-www-form-urlencoded";function va(e){return e!=null&&typeof e.tagName=="string"}function Vw(e){return va(e)&&e.tagName.toLowerCase()==="button"}function $w(e){return va(e)&&e.tagName.toLowerCase()==="form"}function Gw(e){return va(e)&&e.tagName.toLowerCase()==="input"}function Hw(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Yw(e,t){return e.button===0&&(!t||t==="_self")&&!Hw(e)}let ba=null;function Ww(){if(ba===null)try{new FormData(document.createElement("form"),0),ba=!1}catch{ba=!0}return ba}const Kw=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Yu(e){return e!=null&&!Kw.has(e)?(process.env.NODE_ENV!=="production"&&Un(!1,'"'+e+'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` '+('and will default to "'+ya+'"')),null):e}function zw(e,t){let n,r,i,s,o;if($w(e)){let c=e.getAttribute("action");r=c?Gr(c,t):null,n=e.getAttribute("method")||ga,i=Yu(e.getAttribute("enctype"))||ya,s=new FormData(e)}else if(Vw(e)||Gw(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let u=e.getAttribute("formaction")||c.getAttribute("action");if(r=u?Gr(u,t):null,n=e.getAttribute("formmethod")||c.getAttribute("method")||ga,i=Yu(e.getAttribute("formenctype"))||Yu(c.getAttribute("enctype"))||ya,s=new FormData(c,e),!Ww()){let{name:d,type:f,value:p}=e;if(f==="image"){let l=d?d+".":"";s.append(l+"x","0"),s.append(l+"y","0")}else d&&s.append(d,p)}}else{if(va(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=ga,r=null,i=ya,o=e}return s&&i==="text/plain"&&(o=s,s=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:s,body:o}}const Qw=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],Jw=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],Zw=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","unstable_viewTransition"],Xw="6";try{window.__reactRouterVersion=Xw}catch{}const Sh=de.createContext({isTransitioning:!1});process.env.NODE_ENV!=="production"&&(Sh.displayName="ViewTransition");const eE=de.createContext(new Map);process.env.NODE_ENV!=="production"&&(eE.displayName="Fetchers"),process.env.NODE_ENV;const tE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",nE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,xh=de.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:c,target:u,to:d,preventScrollReset:f,unstable_viewTransition:p}=t,l=Hu(t,Qw),{basename:v}=de.useContext(qn),a,h=!1;if(typeof d=="string"&&nE.test(d)&&(a=d,tE))try{let w=new URL(window.location.href),E=d.startsWith("//")?new URL(w.protocol+d):new URL(d),S=Gr(E.pathname,v);E.origin===w.origin&&S!=null?d=S+E.search+E.hash:h=!0}catch{process.env.NODE_ENV!=="production"&&Un(!1,'<Link to="'+d+'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.')}let y=Cw(d,{relative:i}),g=sE(d,{replace:o,state:c,target:u,preventScrollReset:f,relative:i,unstable_viewTransition:p});function b(w){r&&r(w),w.defaultPrevented||g(w)}return de.createElement("a",Gi({},l,{href:a||y,onClick:h||s?r:b,ref:n,target:u}))});process.env.NODE_ENV!=="production"&&(xh.displayName="Link");const _h=de.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:s="",end:o=!1,style:c,to:u,unstable_viewTransition:d,children:f}=t,p=Hu(t,Jw),l=$s(u,{relative:p.relative}),v=Yt(),a=de.useContext(qu),{navigator:h,basename:y}=de.useContext(qn),g=a!=null&&dE(l)&&d===!0,b=h.encodeLocation?h.encodeLocation(l).pathname:l.pathname,w=v.pathname,E=a&&a.navigation&&a.navigation.location?a.navigation.location.pathname:null;i||(w=w.toLowerCase(),E=E?E.toLowerCase():null,b=b.toLowerCase()),E&&y&&(E=Gr(E,y)||E);const S=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let A=w===b||!o&&w.startsWith(b)&&w.charAt(S)==="/",T=E!=null&&(E===b||!o&&E.startsWith(b)&&E.charAt(b.length)==="/"),O={isActive:A,isPending:T,isTransitioning:g},N=A?r:void 0,D;typeof s=="function"?D=s(O):D=[s,A?"active":null,T?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let U=typeof c=="function"?c(O):c;return de.createElement(xh,Gi({},p,{"aria-current":N,className:D,ref:n,style:U,to:u,unstable_viewTransition:d}),typeof f=="function"?f(O):f)});process.env.NODE_ENV!=="production"&&(_h.displayName="NavLink");const rE=de.forwardRef((e,t)=>{let{fetcherKey:n,navigate:r,reloadDocument:i,replace:s,state:o,method:c=ga,action:u,onSubmit:d,relative:f,preventScrollReset:p,unstable_viewTransition:l}=e,v=Hu(e,Zw),a=uE(),h=lE(u,{relative:f}),y=c.toLowerCase()==="get"?"get":"post",g=b=>{if(d&&d(b),b.defaultPrevented)return;b.preventDefault();let w=b.nativeEvent.submitter,E=(w==null?void 0:w.getAttribute("formmethod"))||c;a(w||b.currentTarget,{fetcherKey:n,method:E,navigate:r,replace:s,state:o,relative:f,preventScrollReset:p,unstable_viewTransition:l})};return de.createElement("form",Gi({ref:t,method:y,action:h,onSubmit:i?d:g},v))});process.env.NODE_ENV!=="production"&&(rE.displayName="Form"),process.env.NODE_ENV;var wa;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(wa||(wa={}));var Ch;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Ch||(Ch={}));function iE(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function Ah(e){let t=de.useContext(Vs);return t||(process.env.NODE_ENV!=="production"?Ye(!1,iE(e)):Ye(!1)),t}function sE(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,unstable_viewTransition:c}=t===void 0?{}:t,u=Tt(),d=Yt(),f=$s(e,{relative:o});return de.useCallback(p=>{if(Yw(p,n)){p.preventDefault();let l=r!==void 0?r:pa(d)===pa(f);u(e,{replace:l,state:i,preventScrollReset:s,relative:o,unstable_viewTransition:c})}},[d,u,f,r,i,n,e,s,o,c])}function oE(){if(typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}let aE=0,cE=()=>"__"+String(++aE)+"__";function uE(){let{router:e}=Ah(wa.UseSubmit),{basename:t}=de.useContext(qn),n=Bw();return de.useCallback(function(r,i){i===void 0&&(i={}),oE();let{action:s,method:o,encType:c,formData:u,body:d}=zw(r,t);if(i.navigate===!1){let f=i.fetcherKey||cE();e.fetch(f,n,i.action||s,{preventScrollReset:i.preventScrollReset,formData:u,body:d,formMethod:i.method||o,formEncType:i.encType||c,unstable_flushSync:i.unstable_flushSync})}else e.navigate(i.action||s,{preventScrollReset:i.preventScrollReset,formData:u,body:d,formMethod:i.method||o,formEncType:i.encType||c,replace:i.replace,state:i.state,fromRouteId:n,unstable_flushSync:i.unstable_flushSync,unstable_viewTransition:i.unstable_viewTransition})},[e,t,n])}function lE(e,t){let{relative:n}=t===void 0?{}:t,{basename:r}=de.useContext(qn),i=de.useContext(Jn);i||(process.env.NODE_ENV!=="production"?Ye(!1,"useFormAction must be used inside a RouteContext"):Ye(!1));let[s]=i.matches.slice(-1),o=Gi({},$s(e||".",{relative:n})),c=Yt();if(e==null){o.search=c.search;let u=new URLSearchParams(o.search);u.has("index")&&u.get("index")===""&&(u.delete("index"),o.search=u.toString()?"?"+u.toString():"")}return(!e||e===".")&&s.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:xr([r,o.pathname])),pa(o)}function dE(e,t){t===void 0&&(t={});let n=de.useContext(Sh);n==null&&(process.env.NODE_ENV!=="production"?Ye(!1,"`unstable_useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"):Ye(!1));let{basename:r}=Ah(wa.useViewTransitionState),i=$s(e,{relative:t.relative});if(!n.isTransitioning)return!1;let s=Gr(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Gr(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Lu(i.pathname,o)!=null||Lu(i.pathname,s)!=null}var ut=(e=>(e.GENERIC="GENERIC",e.GIFTCARD="GIFTCARD",e.REDEEM_GIFTCARD="REDEEM_GIFTCARD",e.TOP_UP_GIFTCARD="TOP_UP_GIFTCARD",e.PORTAL="PORTAL",e.PAY_PREPAID="PAY_PREPAID",e.TOP_UP_PREPAID="TOP_UP_PREPAID",e.POINTS_TRANSACTION="POINTS_TRANSACTION",e.VOUCHER="VOUCHER",e))(ut||{}),Dt=(e=>(e.GENERIC="/generic",e.GIFTCARD="/giftcard",e.PORTAL="/portal",e.PAY_PREPAID="/pay-prepaid",e.TOP_UP_PREPAID="/top-up-prepaid",e.POINTS_TRANSACTION="/points-transaction",e.VOUCHER="/voucher",e))(Dt||{}),Hr=(e=>(e.GIFTCARD_TRANSACTION="giftcard_transaction",e.VOUCHER_REDEEMED="voucher_redeemed",e.REWARD_RECEPTION="reward_reception",e.PREPAID_TRANSACTION="prepaid_transaction",e))(Hr||{}),Ea=(e=>(e[e.INPUT_INVALID=1003]="INPUT_INVALID",e[e.CONTACT_NOT_FOUND=55031]="CONTACT_NOT_FOUND",e))(Ea||{}),Hi=(e=>(e.USER="user",e.ENVIRONMENT="environment",e))(Hi||{});const fE={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class Sa{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||fE,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,i){return i&&!this.debug?null:(typeof t[0]=="string"&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new Sa(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Sa(this.logger,t)}}var lr=new Sa;class xa{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(o=>{let[c,u]=o;for(let d=0;d<u;d++)c(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(o=>{let[c,u]=o;for(let d=0;d<u;d++)c.apply(c,[t,...r])})}}function Ys(){let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n}function Th(e){return e==null?"":""+e}function hE(e,t,n){e.forEach(r=>{t[r]&&(n[r]=t[r])})}const pE=/###/g;function Ws(e,t,n){function r(c){return c&&c.indexOf("###")>-1?c.replace(pE,"."):c}function i(){return!e||typeof e=="string"}const s=typeof t!="string"?t:t.split(".");let o=0;for(;o<s.length-1;){if(i())return{};const c=r(s[o]);!e[c]&&n&&(e[c]=new n),Object.prototype.hasOwnProperty.call(e,c)?e=e[c]:e={},++o}return i()?{}:{obj:e,k:r(s[o])}}function Ih(e,t,n){const{obj:r,k:i}=Ws(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let s=t[t.length-1],o=t.slice(0,t.length-1),c=Ws(e,o,Object);for(;c.obj===void 0&&o.length;)s=`${o[o.length-1]}.${s}`,o=o.slice(0,o.length-1),c=Ws(e,o,Object),c&&c.obj&&typeof c.obj[`${c.k}.${s}`]<"u"&&(c.obj=void 0);c.obj[`${c.k}.${s}`]=n}function mE(e,t,n,r){const{obj:i,k:s}=Ws(e,t,Object);i[s]=i[s]||[],i[s].push(n)}function _a(e,t){const{obj:n,k:r}=Ws(e,t);if(n)return n[r]}function gE(e,t,n){const r=_a(e,n);return r!==void 0?r:_a(t,n)}function kh(e,t,n){for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):kh(e[r],t[r],n):e[r]=t[r]);return e}function Yi(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var yE={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function vE(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>yE[t]):e}class bE{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const wE=[" ",",","?","!",";"],EE=new bE(20);function SE(e,t,n){t=t||"",n=n||"";const r=wE.filter(o=>t.indexOf(o)<0&&n.indexOf(o)<0);if(r.length===0)return!0;const i=EE.getRegExp(`(${r.map(o=>o==="?"?"\\?":o).join("|")})`);let s=!i.test(e);if(!s){const o=e.indexOf(n);o>0&&!i.test(e.substring(0,o))&&(s=!0)}return s}function Wu(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let i=e;for(let s=0;s<r.length;){if(!i||typeof i!="object")return;let o,c="";for(let u=s;u<r.length;++u)if(u!==s&&(c+=n),c+=r[u],o=i[c],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&u<r.length-1)continue;s+=u-s+1;break}i=o}return i}function Ca(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}class Oh extends xa{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let c;t.indexOf(".")>-1?c=t.split("."):(c=[t,n],r&&(Array.isArray(r)?c.push(...r):typeof r=="string"&&s?c.push(...r.split(s)):c.push(r)));const u=_a(this.data,c);return!u&&!n&&!r&&t.indexOf(".")>-1&&(t=c[0],n=c[1],r=c.slice(2).join(".")),u||!o||typeof r!="string"?u:Wu(this.data&&this.data[t]&&this.data[t][n],r,s)}addResource(t,n,r,i){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let c=[t,n];r&&(c=c.concat(o?r.split(o):r)),t.indexOf(".")>-1&&(c=t.split("."),i=n,n=c[1]),this.addNamespaces(n),Ih(this.data,c,i),s.silent||this.emit("added",t,n,r,i)}addResources(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const s in r)(typeof r[s]=="string"||Array.isArray(r[s]))&&this.addResource(t,n,s,r[s],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},c=[t,n];t.indexOf(".")>-1&&(c=t.split("."),i=r,r=n,n=c[1]),this.addNamespaces(n);let u=_a(this.data,c)||{};o.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?kh(u,r,s):u={...u,...r},Ih(this.data,c,u),o.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var Rh={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(s=>{this.processors[s]&&(t=this.processors[s].process(t,n,r,i))}),t}};const Nh={};class Aa extends xa{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),hE(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=lr.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let s=n.ns||this.options.defaultNS||[];const o=r&&t.indexOf(r)>-1,c=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!SE(t,r,i);if(o&&!c){const u=t.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:t,namespaces:s};const d=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(d[0])>-1)&&(s=d.shift()),t=d.join(i)}return typeof s=="string"&&(s=[s]),{key:t,namespaces:s}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:o,namespaces:c}=this.extractFromKey(t[t.length-1],n),u=c[c.length-1],d=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&d.toLowerCase()==="cimode"){if(f){const E=n.nsSeparator||this.options.nsSeparator;return i?{res:`${u}${E}${o}`,usedKey:o,exactUsedKey:o,usedLng:d,usedNS:u,usedParams:this.getUsedParamsDetails(n)}:`${u}${E}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:d,usedNS:u,usedParams:this.getUsedParamsDetails(n)}:o}const p=this.resolve(t,n);let l=p&&p.res;const v=p&&p.usedKey||o,a=p&&p.exactUsedKey||o,h=Object.prototype.toString.apply(l),y=["[object Number]","[object Function]","[object RegExp]"],g=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject;if(b&&l&&(typeof l!="string"&&typeof l!="boolean"&&typeof l!="number")&&y.indexOf(h)<0&&!(typeof g=="string"&&Array.isArray(l))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const E=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,l,{...n,ns:c}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(p.res=E,p.usedParams=this.getUsedParamsDetails(n),p):E}if(s){const E=Array.isArray(l),S=E?[]:{},A=E?a:v;for(const T in l)if(Object.prototype.hasOwnProperty.call(l,T)){const O=`${A}${s}${T}`;S[T]=this.translate(O,{...n,joinArrays:!1,ns:c}),S[T]===O&&(S[T]=l[T])}l=S}}else if(b&&typeof g=="string"&&Array.isArray(l))l=l.join(g),l&&(l=this.extendTranslation(l,t,n,r));else{let E=!1,S=!1;const A=n.count!==void 0&&typeof n.count!="string",T=Aa.hasDefaultValue(n),O=A?this.pluralResolver.getSuffix(d,n.count,n):"",N=n.ordinal&&A?this.pluralResolver.getSuffix(d,n.count,{ordinal:!1}):"",D=A&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),U=D&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${O}`]||n[`defaultValue${N}`]||n.defaultValue;!this.isValidLookup(l)&&T&&(E=!0,l=U),this.isValidLookup(l)||(S=!0,l=o);const F=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&S?void 0:l,V=T&&U!==l&&this.options.updateMissing;if(S||E||V){if(this.logger.log(V?"updateKey":"missingKey",d,u,o,V?U:l),s){const z=this.resolve(o,{...n,keySeparator:!1});z&&z.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let R=[];const L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&L&&L[0])for(let z=0;z<L.length;z++)R.push(L[z]);else this.options.saveMissingTo==="all"?R=this.languageUtils.toResolveHierarchy(n.lng||this.language):R.push(n.lng||this.language);const W=(z,Z,te)=>{const re=T&&te!==l?te:F;this.options.missingKeyHandler?this.options.missingKeyHandler(z,u,Z,re,V,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(z,u,Z,re,V,n),this.emit("missingKey",z,u,Z,l)};this.options.saveMissing&&(this.options.saveMissingPlurals&&A?R.forEach(z=>{const Z=this.pluralResolver.getSuffixes(z,n);D&&n[`defaultValue${this.options.pluralSeparator}zero`]&&Z.indexOf(`${this.options.pluralSeparator}zero`)<0&&Z.push(`${this.options.pluralSeparator}zero`),Z.forEach(te=>{W([z],o+te,n[`defaultValue${te}`]||U)})}):W(R,o,U))}l=this.extendTranslation(l,t,n,p,r),S&&l===o&&this.options.appendNamespaceToMissingKey&&(l=`${u}:${o}`),(S||E)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?l=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}:${o}`:o,E?l:void 0):l=this.options.parseMissingKeyHandler(l))}return i?(p.res=l,p.usedParams=this.getUsedParamsDetails(n),p):l}extendTranslation(t,n,r,i,s){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const d=typeof t=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(d){const l=t.match(this.interpolator.nestingRegexp);f=l&&l.length}let p=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),t=this.interpolator.interpolate(t,p,r.lng||this.language,r),d){const l=t.match(this.interpolator.nestingRegexp),v=l&&l.length;f<v&&(r.nest=!1)}!r.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(r.lng=i.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var l=arguments.length,v=new Array(l),a=0;a<l;a++)v[a]=arguments[a];return s&&s[0]===v[0]&&!r.context?(o.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${n[0]}`),null):o.translate(...v,n)},r)),r.interpolation&&this.interpolator.reset()}const c=r.postProcess||this.options.postProcess,u=typeof c=="string"?[c]:c;return t!=null&&u&&u.length&&r.applyPostProcessor!==!1&&(t=Rh.handle(u,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,i,s,o,c;return typeof t=="string"&&(t=[t]),t.forEach(u=>{if(this.isValidLookup(r))return;const d=this.extractFromKey(u,n),f=d.key;i=f;let p=d.namespaces;this.options.fallbackNS&&(p=p.concat(this.options.fallbackNS));const l=n.count!==void 0&&typeof n.count!="string",v=l&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),a=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",h=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);p.forEach(y=>{this.isValidLookup(r)||(c=y,!Nh[`${h[0]}-${y}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(c)&&(Nh[`${h[0]}-${y}`]=!0,this.logger.warn(`key "${i}" for languages "${h.join(", ")}" won't get resolved as namespace "${c}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach(g=>{if(this.isValidLookup(r))return;o=g;const b=[f];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(b,f,g,y,n);else{let E;l&&(E=this.pluralResolver.getSuffix(g,n.count,n));const S=`${this.options.pluralSeparator}zero`,A=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(l&&(b.push(f+E),n.ordinal&&E.indexOf(A)===0&&b.push(f+E.replace(A,this.options.pluralSeparator)),v&&b.push(f+S)),a){const T=`${f}${this.options.contextSeparator}${n.context}`;b.push(T),l&&(b.push(T+E),n.ordinal&&E.indexOf(A)===0&&b.push(T+E.replace(A,this.options.pluralSeparator)),v&&b.push(T+S))}}let w;for(;w=b.pop();)this.isValidLookup(r)||(s=w,r=this.getResource(g,y,w,n))}))})}),{res:r,usedKey:i,exactUsedKey:s,usedLng:o,usedNS:c}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&typeof t.replace!="string";let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const s of n)delete i[s]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}function Ku(e){return e.charAt(0).toUpperCase()+e.slice(1)}class Mh{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=lr.create("languageUtils")}getScriptPartFromCode(t){if(t=Ca(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Ca(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(i=>i.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Ku(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Ku(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=Ku(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(s=>{if(s===i)return s;if(!(s.indexOf("-")<0&&i.indexOf("-")<0)&&(s.indexOf("-")>0&&i.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===i||s.indexOf(i)===0&&i.length>1))return s})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),i=[],s=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(t))):typeof t=="string"&&s(this.formatLanguageCode(t)),r.forEach(o=>{i.indexOf(o)<0&&s(this.formatLanguageCode(o))}),i}}let xE=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],_E={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}};const CE=["v1","v2","v3"],AE=["v4"],Dh={zero:0,one:1,two:2,few:3,many:4,other:5};function TE(){const e={};return xE.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:_E[t.fc]}})}),e}class IE{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=lr.create("pluralResolver"),(!this.options.compatibilityJSON||AE.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=TE()}addRule(t,n){this.rules[t]=n}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(Ca(t==="dev"?"en":t),{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((i,s)=>Dh[i]-Dh[s]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):r.numbers.map(i=>this.getSuffix(t,i,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,r);return i?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:this.getSuffixRetroCompatible(i,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let i=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const s=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?s():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!CE.includes(this.options.compatibilityJSON)}}function Ph(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=gE(e,t,n);return!s&&i&&typeof n=="string"&&(s=Wu(e,n,r),s===void 0&&(s=Wu(t,n,r))),s}class kE{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=lr.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:i,prefix:s,prefixEscaped:o,suffix:c,suffixEscaped:u,formatSeparator:d,unescapeSuffix:f,unescapePrefix:p,nestingPrefix:l,nestingPrefixEscaped:v,nestingSuffix:a,nestingSuffixEscaped:h,nestingOptionsSeparator:y,maxReplaces:g,alwaysFormat:b}=t.interpolation;this.escape=n!==void 0?n:vE,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=s?Yi(s):o||"{{",this.suffix=c?Yi(c):u||"}}",this.formatSeparator=d||",",this.unescapePrefix=f?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=l?Yi(l):v||Yi("$t("),this.nestingSuffix=a?Yi(a):h||Yi(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=g||1e3,this.alwaysFormat=b!==void 0?b:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,i){let s,o,c;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function d(a){return a.replace(/\$/g,"$$$$")}const f=a=>{if(a.indexOf(this.formatSeparator)<0){const b=Ph(n,u,a,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(b,void 0,r,{...i,...n,interpolationkey:a}):b}const h=a.split(this.formatSeparator),y=h.shift().trim(),g=h.join(this.formatSeparator).trim();return this.format(Ph(n,u,y,this.options.keySeparator,this.options.ignoreJSONStructure),g,r,{...i,...n,interpolationkey:y})};this.resetRegExp();const p=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,l=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:a=>d(a)},{regex:this.regexp,safeValue:a=>this.escapeValue?d(this.escape(a)):d(a)}].forEach(a=>{for(c=0;s=a.regex.exec(t);){const h=s[1].trim();if(o=f(h),o===void 0)if(typeof p=="function"){const g=p(t,s,i);o=typeof g=="string"?g:""}else if(i&&Object.prototype.hasOwnProperty.call(i,h))o="";else if(l){o=s[0];continue}else this.logger.warn(`missed to pass in variable ${h} for interpolating ${t}`),o="";else typeof o!="string"&&!this.useRawValueToEscape&&(o=Th(o));const y=a.safeValue(o);if(t=t.replace(s[0],y),l?(a.regex.lastIndex+=o.length,a.regex.lastIndex-=s[0].length):a.regex.lastIndex=0,c++,c>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,s,o;function c(u,d){const f=this.nestingOptionsSeparator;if(u.indexOf(f)<0)return u;const p=u.split(new RegExp(`${f}[ ]*{`));let l=`{${p[1]}`;u=p[0],l=this.interpolate(l,o);const v=l.match(/'/g),a=l.match(/"/g);(v&&v.length%2===0&&!a||a.length%2!==0)&&(l=l.replace(/'/g,'"'));try{o=JSON.parse(l),d&&(o={...d,...o})}catch(h){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,h),`${u}${f}${l}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,u}for(;i=this.nestingRegexp.exec(t);){let u=[];o={...r},o=o.replace&&typeof o.replace!="string"?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let d=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const f=i[1].split(this.formatSeparator).map(p=>p.trim());i[1]=f.shift(),u=f,d=!0}if(s=n(c.call(this,i[1].trim(),o),o),s&&i[0]===t&&typeof s!="string")return s;typeof s!="string"&&(s=Th(s)),s||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),s=""),d&&(s=u.reduce((f,p)=>this.format(f,p,r.lng,{...r,interpolationkey:i[1].trim()}),s.trim())),t=t.replace(i[0],s),this.regexp.lastIndex=0}return t}}function OE(e){let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(o=>{if(o){const[c,...u]=o.split(":"),d=u.join(":").trim().replace(/^'+|'+$/g,""),f=c.trim();n[f]||(n[f]=d),d==="false"&&(n[f]=!1),d==="true"&&(n[f]=!0),isNaN(d)||(n[f]=parseInt(d,10))}})}return{formatName:t,formatOptions:n}}function Wi(e){const t={};return function(r,i,s){const o=i+JSON.stringify(s);let c=t[o];return c||(c=e(Ca(i),s),t[o]=c),c(r)}}class RE{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=lr.create("formatter"),this.options=t,this.formats={number:Wi((n,r)=>{const i=new Intl.NumberFormat(n,{...r});return s=>i.format(s)}),currency:Wi((n,r)=>{const i=new Intl.NumberFormat(n,{...r,style:"currency"});return s=>i.format(s)}),datetime:Wi((n,r)=>{const i=new Intl.DateTimeFormat(n,{...r});return s=>i.format(s)}),relativetime:Wi((n,r)=>{const i=new Intl.RelativeTimeFormat(n,{...r});return s=>i.format(s,r.range||"day")}),list:Wi((n,r)=>{const i=new Intl.ListFormat(n,{...r});return s=>i.format(s)})},this.init(t)}init(t){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Wi(n)}format(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((c,u)=>{const{formatName:d,formatOptions:f}=OE(u);if(this.formats[d]){let p=c;try{const l=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},v=l.locale||l.lng||i.locale||i.lng||r;p=this.formats[d](c,v,{...f,...i,...l})}catch(l){this.logger.warn(l)}return p}else this.logger.warn(`there was no format function for ${d}`);return c},t)}}function NE(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}class ME extends xa{constructor(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=lr.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,i.backend,i)}queueLoad(t,n,r,i){const s={},o={},c={},u={};return t.forEach(d=>{let f=!0;n.forEach(p=>{const l=`${d}|${p}`;!r.reload&&this.store.hasResourceBundle(d,p)?this.state[l]=2:this.state[l]<0||(this.state[l]===1?o[l]===void 0&&(o[l]=!0):(this.state[l]=1,f=!1,o[l]===void 0&&(o[l]=!0),s[l]===void 0&&(s[l]=!0),u[p]===void 0&&(u[p]=!0)))}),f||(c[d]=!0)}),(Object.keys(s).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(s),pending:Object.keys(o),toLoadLanguages:Object.keys(c),toLoadNamespaces:Object.keys(u)}}loaded(t,n,r){const i=t.split("|"),s=i[0],o=i[1];n&&this.emit("failedLoading",s,o,n),r&&this.store.addResourceBundle(s,o,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2;const c={};this.queue.forEach(u=>{mE(u.loaded,[s],o),NE(u,t),n&&u.errors.push(n),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(d=>{c[d]||(c[d]={});const f=u.loaded[d];f.length&&f.forEach(p=>{c[d][p]===void 0&&(c[d][p]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",c),this.queue=this.queue.filter(u=>!u.done)}read(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:s,callback:o});return}this.readingCalls++;const c=(d,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const p=this.waitingReads.shift();this.read(p.lng,p.ns,p.fcName,p.tried,p.wait,p.callback)}if(d&&f&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,i+1,s*2,o)},s);return}o(d,f)},u=this.backend[r].bind(this.backend);if(u.length===2){try{const d=u(t,n);d&&typeof d.then=="function"?d.then(f=>c(null,f)).catch(c):c(null,d)}catch(d){c(d)}return}return u(t,n,c)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);const s=this.queueLoad(t,n,r,i);if(!s.toLoad.length)return s.pending.length||i(),null;s.toLoad.forEach(o=>{this.loadOne(o)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),i=r[0],s=r[1];this.read(i,s,"read",void 0,void 0,(o,c)=>{o&&this.logger.warn(`${n}loading namespace ${s} for language ${i} failed`,o),!o&&c&&this.logger.log(`${n}loaded namespace ${s} for language ${i}`,c),this.loaded(t,o,c)})}saveMissing(t,n,r,i,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const u={...o,isUpdate:s},d=this.backend.create.bind(this.backend);if(d.length<6)try{let f;d.length===5?f=d(t,n,r,i,u):f=d(t,n,r,i),f&&typeof f.then=="function"?f.then(p=>c(null,p)).catch(c):c(null,f)}catch(f){c(f)}else d(t,n,r,i,c,u)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}function jh(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){let n={};if(typeof t[1]=="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(i=>{n[i]=r[i]})}return n},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function Lh(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function Ta(){}function DE(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}class Ks extends xa{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Lh(t),this.services={},this.logger=lr,this.modules={external:[]},DE(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=jh();this.options={...i,...this.options,...Lh(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function s(f){return f?typeof f=="function"?new f:f:null}if(!this.options.isClone){this.modules.logger?lr.init(s(this.modules.logger),this.options):lr.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:typeof Intl<"u"&&(f=RE);const p=new Mh(this.options);this.store=new Oh(this.options.resources,this.options);const l=this.services;l.logger=lr,l.resourceStore=this.store,l.languageUtils=p,l.pluralResolver=new IE(p,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),f&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(l.formatter=s(f),l.formatter.init(l,this.options),this.options.interpolation.format=l.formatter.format.bind(l.formatter)),l.interpolator=new kE(this.options),l.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},l.backendConnector=new ME(s(this.modules.backend),l.resourceStore,l,this.options),l.backendConnector.on("*",function(v){for(var a=arguments.length,h=new Array(a>1?a-1:0),y=1;y<a;y++)h[y-1]=arguments[y];t.emit(v,...h)}),this.modules.languageDetector&&(l.languageDetector=s(this.modules.languageDetector),l.languageDetector.init&&l.languageDetector.init(l,this.options.detection,this.options)),this.modules.i18nFormat&&(l.i18nFormat=s(this.modules.i18nFormat),l.i18nFormat.init&&l.i18nFormat.init(this)),this.translator=new Aa(this.services,this.options),this.translator.on("*",function(v){for(var a=arguments.length,h=new Array(a>1?a-1:0),y=1;y<a;y++)h[y-1]=arguments[y];t.emit(v,...h)}),this.modules.external.forEach(v=>{v.init&&v.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Ta),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(f=>{this[f]=function(){return t.store[f](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(f=>{this[f]=function(){return t.store[f](...arguments),t}});const u=Ys(),d=()=>{const f=(p,l)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),u.resolve(l),r(p,l)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return f(null,this.t.bind(this));this.changeLanguage(this.options.lng,f)};return this.options.resources||!this.options.initImmediate?d():setTimeout(d,0),u}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ta;const i=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const s=[],o=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(d=>{d!=="cimode"&&s.indexOf(d)<0&&s.push(d)})};i?o(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>o(u)),this.options.preload&&this.options.preload.forEach(c=>o(c)),this.services.backendConnector.load(s,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(c)})}else r(null)}reloadResources(t,n,r){const i=Ys();return t||(t=this.languages),n||(n=this.options.ns),r||(r=Ta),this.services.backendConnector.reload(t,n,s=>{i.resolve(),r(s)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Rh.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const i=Ys();this.emit("languageChanging",t);const s=u=>{this.language=u,this.languages=this.services.languageUtils.toResolveHierarchy(u),this.resolvedLanguage=void 0,this.setResolvedLanguage(u)},o=(u,d)=>{d?(s(d),this.translator.changeLanguage(d),this.isLanguageChangingTo=void 0,this.emit("languageChanged",d),this.logger.log("languageChanged",d)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),n&&n(u,function(){return r.t(...arguments)})},c=u=>{!t&&!u&&this.services.languageDetector&&(u=[]);const d=typeof u=="string"?u:this.services.languageUtils.getBestMatchFromCodes(u);d&&(this.language||s(d),this.translator.language||this.translator.changeLanguage(d),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(d)),this.loadResources(d,f=>{o(f,d)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(t),i}getFixedT(t,n,r){var i=this;const s=function(o,c){let u;if(typeof c!="object"){for(var d=arguments.length,f=new Array(d>2?d-2:0),p=2;p<d;p++)f[p-2]=arguments[p];u=i.options.overloadTranslationOptionHandler([o,c].concat(f))}else u={...c};u.lng=u.lng||s.lng,u.lngs=u.lngs||s.lngs,u.ns=u.ns||s.ns,u.keyPrefix=u.keyPrefix||r||s.keyPrefix;const l=i.options.keySeparator||".";let v;return u.keyPrefix&&Array.isArray(o)?v=o.map(a=>`${u.keyPrefix}${l}${a}`):v=u.keyPrefix?`${u.keyPrefix}${l}${o}`:o,i.t(v,u)};return typeof t=="string"?s.lng=t:s.lngs=t,s.ns=n,s.keyPrefix=r,s}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const o=(c,u)=>{const d=this.services.backendConnector.state[`${c}|${u}`];return d===-1||d===2};if(n.precheck){const c=n.precheck(this,o);if(c!==void 0)return c}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(r,t)&&(!i||o(s,t)))}loadNamespaces(t,n){const r=Ys();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Ys();typeof t=="string"&&(t=[t]);const i=this.options.preload||[],s=t.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return s.length?(this.options.preload=i.concat(s),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new Mh(jh());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Ks(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ta;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},s=new Ks(i);return(t.debug!==void 0||t.prefix!==void 0)&&(s.logger=s.logger.clone(t)),["store","services","language"].forEach(c=>{s[c]=this[c]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},r&&(s.store=new Oh(this.store.data,i),s.services.resourceStore=s.store),s.translator=new Aa(s.services,i),s.translator.on("*",function(c){for(var u=arguments.length,d=new Array(u>1?u-1:0),f=1;f<u;f++)d[f-1]=arguments[f];s.emit(c,...d)}),s.init(i,n),s.translator.options=i,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Wt=Ks.createInstance();Wt.createInstance=Ks.createInstance,Wt.createInstance,Wt.dir,Wt.init,Wt.loadResources,Wt.reloadResources,Wt.use,Wt.changeLanguage,Wt.getFixedT,Wt.t,Wt.exists,Wt.setDefaultNamespace,Wt.hasLoadedNamespace,Wt.loadNamespaces,Wt.loadLanguages;function Bh(e,t){return function(){return e.apply(t,arguments)}}const{toString:PE}=Object.prototype,{getPrototypeOf:zu}=Object,Ia=(e=>t=>{const n=PE.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Zn=e=>(e=e.toLowerCase(),t=>Ia(t)===e),ka=e=>t=>typeof t===e,{isArray:Ki}=Array,zs=ka("undefined");function jE(e){return e!==null&&!zs(e)&&e.constructor!==null&&!zs(e.constructor)&&Vn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Fh=Zn("ArrayBuffer");function LE(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Fh(e.buffer),t}const BE=ka("string"),Vn=ka("function"),Uh=ka("number"),Oa=e=>e!==null&&typeof e=="object",FE=e=>e===!0||e===!1,Ra=e=>{if(Ia(e)!=="object")return!1;const t=zu(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},UE=Zn("Date"),qE=Zn("File"),VE=Zn("Blob"),$E=Zn("FileList"),GE=e=>Oa(e)&&Vn(e.pipe),HE=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Vn(e.append)&&((t=Ia(e))==="formdata"||t==="object"&&Vn(e.toString)&&e.toString()==="[object FormData]"))},YE=Zn("URLSearchParams"),[WE,KE,zE,QE]=["ReadableStream","Request","Response","Headers"].map(Zn),JE=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Qs(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Ki(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),o=s.length;let c;for(r=0;r<o;r++)c=s[r],t.call(null,e[c],c,e)}}function qh(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const Vh=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,$h=e=>!zs(e)&&e!==Vh;function Qu(){const{caseless:e}=$h(this)&&this||{},t={},n=(r,i)=>{const s=e&&qh(t,i)||i;Ra(t[s])&&Ra(r)?t[s]=Qu(t[s],r):Ra(r)?t[s]=Qu({},r):Ki(r)?t[s]=r.slice():t[s]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Qs(arguments[r],n);return t}const ZE=(e,t,n,{allOwnKeys:r}={})=>(Qs(t,(i,s)=>{n&&Vn(i)?e[s]=Bh(i,n):e[s]=i},{allOwnKeys:r}),e),XE=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),eS=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},tS=(e,t,n,r)=>{let i,s,o;const c={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)o=i[s],(!r||r(o,e,t))&&!c[o]&&(t[o]=e[o],c[o]=!0);e=n!==!1&&zu(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},nS=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},rS=e=>{if(!e)return null;if(Ki(e))return e;let t=e.length;if(!Uh(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},iS=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&zu(Uint8Array)),sS=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const s=i.value;t.call(e,s[0],s[1])}},oS=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},aS=Zn("HTMLFormElement"),cS=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Gh=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),uS=Zn("RegExp"),Hh=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Qs(n,(i,s)=>{let o;(o=t(i,s,e))!==!1&&(r[s]=o||i)}),Object.defineProperties(e,r)},lS=e=>{Hh(e,(t,n)=>{if(Vn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Vn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},dS=(e,t)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return Ki(e)?r(e):r(String(e).split(t)),n},fS=()=>{},hS=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Ju="abcdefghijklmnopqrstuvwxyz",Yh="0123456789",Wh={DIGIT:Yh,ALPHA:Ju,ALPHA_DIGIT:Ju+Ju.toUpperCase()+Yh},pS=(e=16,t=Wh.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function mS(e){return!!(e&&Vn(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const gS=e=>{const t=new Array(10),n=(r,i)=>{if(Oa(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const s=Ki(r)?[]:{};return Qs(r,(o,c)=>{const u=n(o,i+1);!zs(u)&&(s[c]=u)}),t[i]=void 0,s}}return r};return n(e,0)},yS=Zn("AsyncFunction"),fe={isArray:Ki,isArrayBuffer:Fh,isBuffer:jE,isFormData:HE,isArrayBufferView:LE,isString:BE,isNumber:Uh,isBoolean:FE,isObject:Oa,isPlainObject:Ra,isReadableStream:WE,isRequest:KE,isResponse:zE,isHeaders:QE,isUndefined:zs,isDate:UE,isFile:qE,isBlob:VE,isRegExp:uS,isFunction:Vn,isStream:GE,isURLSearchParams:YE,isTypedArray:iS,isFileList:$E,forEach:Qs,merge:Qu,extend:ZE,trim:JE,stripBOM:XE,inherits:eS,toFlatObject:tS,kindOf:Ia,kindOfTest:Zn,endsWith:nS,toArray:rS,forEachEntry:sS,matchAll:oS,isHTMLForm:aS,hasOwnProperty:Gh,hasOwnProp:Gh,reduceDescriptors:Hh,freezeMethods:lS,toObjectSet:dS,toCamelCase:cS,noop:fS,toFiniteNumber:hS,findKey:qh,global:Vh,isContextDefined:$h,ALPHABET:Wh,generateString:pS,isSpecCompliantForm:mS,toJSONObject:gS,isAsyncFn:yS,isThenable:e=>e&&(Oa(e)||Vn(e))&&Vn(e.then)&&Vn(e.catch)};function Ve(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}fe.inherits(Ve,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:fe.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Kh=Ve.prototype,zh={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{zh[e]={value:e}}),Object.defineProperties(Ve,zh),Object.defineProperty(Kh,"isAxiosError",{value:!0}),Ve.from=(e,t,n,r,i,s)=>{const o=Object.create(Kh);return fe.toFlatObject(e,o,function(u){return u!==Error.prototype},c=>c!=="isAxiosError"),Ve.call(o,e.message,t,n,r,i),o.cause=e,o.name=e.name,s&&Object.assign(o,s),o};const vS=null;function Zu(e){return fe.isPlainObject(e)||fe.isArray(e)}function Qh(e){return fe.endsWith(e,"[]")?e.slice(0,-2):e}function Jh(e,t,n){return e?e.concat(t).map(function(i,s){return i=Qh(i),!n&&s?"["+i+"]":i}).join(n?".":""):t}function bS(e){return fe.isArray(e)&&!e.some(Zu)}const wS=fe.toFlatObject(fe,{},null,function(t){return/^is[A-Z]/.test(t)});function Na(e,t,n){if(!fe.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=fe.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,y){return!fe.isUndefined(y[h])});const r=n.metaTokens,i=n.visitor||f,s=n.dots,o=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&fe.isSpecCompliantForm(t);if(!fe.isFunction(i))throw new TypeError("visitor must be a function");function d(a){if(a===null)return"";if(fe.isDate(a))return a.toISOString();if(!u&&fe.isBlob(a))throw new Ve("Blob is not supported. Use a Buffer instead.");return fe.isArrayBuffer(a)||fe.isTypedArray(a)?u&&typeof Blob=="function"?new Blob([a]):Buffer.from(a):a}function f(a,h,y){let g=a;if(a&&!y&&typeof a=="object"){if(fe.endsWith(h,"{}"))h=r?h:h.slice(0,-2),a=JSON.stringify(a);else if(fe.isArray(a)&&bS(a)||(fe.isFileList(a)||fe.endsWith(h,"[]"))&&(g=fe.toArray(a)))return h=Qh(h),g.forEach(function(w,E){!(fe.isUndefined(w)||w===null)&&t.append(o===!0?Jh([h],E,s):o===null?h:h+"[]",d(w))}),!1}return Zu(a)?!0:(t.append(Jh(y,h,s),d(a)),!1)}const p=[],l=Object.assign(wS,{defaultVisitor:f,convertValue:d,isVisitable:Zu});function v(a,h){if(!fe.isUndefined(a)){if(p.indexOf(a)!==-1)throw Error("Circular reference detected in "+h.join("."));p.push(a),fe.forEach(a,function(g,b){(!(fe.isUndefined(g)||g===null)&&i.call(t,g,fe.isString(b)?b.trim():b,h,l))===!0&&v(g,h?h.concat(b):[b])}),p.pop()}}if(!fe.isObject(e))throw new TypeError("data must be an object");return v(e),t}function Zh(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Xu(e,t){this._pairs=[],e&&Na(e,this,t)}const Xh=Xu.prototype;Xh.append=function(t,n){this._pairs.push([t,n])},Xh.toString=function(t){const n=t?function(r){return t.call(this,r,Zh)}:Zh;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function ES(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ep(e,t,n){if(!t)return e;const r=n&&n.encode||ES,i=n&&n.serialize;let s;if(i?s=i(t,n):s=fe.isURLSearchParams(t)?t.toString():new Xu(t,n).toString(r),s){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class tp{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){fe.forEach(this.handlers,function(r){r!==null&&t(r)})}}const np={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},SS={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Xu,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},el=typeof window<"u"&&typeof document<"u",xS=(e=>el&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),_S=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",CS=el&&window.location.href||"http://localhost",Xn={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:el,hasStandardBrowserEnv:xS,hasStandardBrowserWebWorkerEnv:_S,origin:CS},Symbol.toStringTag,{value:"Module"})),...SS};function AS(e,t){return Na(e,new Xn.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,s){return Xn.isNode&&fe.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function TS(e){return fe.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function IS(e){const t={},n=Object.keys(e);let r;const i=n.length;let s;for(r=0;r<i;r++)s=n[r],t[s]=e[s];return t}function rp(e){function t(n,r,i,s){let o=n[s++];if(o==="__proto__")return!0;const c=Number.isFinite(+o),u=s>=n.length;return o=!o&&fe.isArray(i)?i.length:o,u?(fe.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!c):((!i[o]||!fe.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],s)&&fe.isArray(i[o])&&(i[o]=IS(i[o])),!c)}if(fe.isFormData(e)&&fe.isFunction(e.entries)){const n={};return fe.forEachEntry(e,(r,i)=>{t(TS(r),i,n,0)}),n}return null}function kS(e,t,n){if(fe.isString(e))try{return(t||JSON.parse)(e),fe.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Js={transitional:np,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,s=fe.isObject(t);if(s&&fe.isHTMLForm(t)&&(t=new FormData(t)),fe.isFormData(t))return i?JSON.stringify(rp(t)):t;if(fe.isArrayBuffer(t)||fe.isBuffer(t)||fe.isStream(t)||fe.isFile(t)||fe.isBlob(t)||fe.isReadableStream(t))return t;if(fe.isArrayBufferView(t))return t.buffer;if(fe.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return AS(t,this.formSerializer).toString();if((c=fe.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Na(c?{"files[]":t}:t,u&&new u,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),kS(t)):t}],transformResponse:[function(t){const n=this.transitional||Js.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(fe.isResponse(t)||fe.isReadableStream(t))return t;if(t&&fe.isString(t)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(c){if(o)throw c.name==="SyntaxError"?Ve.from(c,Ve.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Xn.classes.FormData,Blob:Xn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};fe.forEach(["delete","get","head","post","put","patch"],e=>{Js.headers[e]={}});const OS=fe.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),RS=e=>{const t={};let n,r,i;return e&&e.split(`
60
- `).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&OS[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},ip=Symbol("internals");function Zs(e){return e&&String(e).trim().toLowerCase()}function Ma(e){return e===!1||e==null?e:fe.isArray(e)?e.map(Ma):String(e)}function NS(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const MS=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function tl(e,t,n,r,i){if(fe.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!fe.isString(t)){if(fe.isString(r))return t.indexOf(r)!==-1;if(fe.isRegExp(r))return r.test(t)}}function DS(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function PS(e,t){const n=fe.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,s,o){return this[r].call(this,t,i,s,o)},configurable:!0})})}class _n{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function s(c,u,d){const f=Zs(u);if(!f)throw new Error("header name must be a non-empty string");const p=fe.findKey(i,f);(!p||i[p]===void 0||d===!0||d===void 0&&i[p]!==!1)&&(i[p||u]=Ma(c))}const o=(c,u)=>fe.forEach(c,(d,f)=>s(d,f,u));if(fe.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(fe.isString(t)&&(t=t.trim())&&!MS(t))o(RS(t),n);else if(fe.isHeaders(t))for(const[c,u]of t.entries())s(u,c,r);else t!=null&&s(n,t,r);return this}get(t,n){if(t=Zs(t),t){const r=fe.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return NS(i);if(fe.isFunction(n))return n.call(this,i,r);if(fe.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Zs(t),t){const r=fe.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||tl(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function s(o){if(o=Zs(o),o){const c=fe.findKey(r,o);c&&(!n||tl(r,r[c],c,n))&&(delete r[c],i=!0)}}return fe.isArray(t)?t.forEach(s):s(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const s=n[r];(!t||tl(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const n=this,r={};return fe.forEach(this,(i,s)=>{const o=fe.findKey(r,s);if(o){n[o]=Ma(i),delete n[s];return}const c=t?DS(s):String(s).trim();c!==s&&delete n[s],n[c]=Ma(i),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return fe.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&fe.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
61
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[ip]=this[ip]={accessors:{}}).accessors,i=this.prototype;function s(o){const c=Zs(o);r[c]||(PS(i,o),r[c]=!0)}return fe.isArray(t)?t.forEach(s):s(t),this}}_n.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),fe.reduceDescriptors(_n.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),fe.freezeMethods(_n);function nl(e,t){const n=this||Js,r=t||n,i=_n.from(r.headers);let s=r.data;return fe.forEach(e,function(c){s=c.call(n,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function sp(e){return!!(e&&e.__CANCEL__)}function zi(e,t,n){Ve.call(this,e??"canceled",Ve.ERR_CANCELED,t,n),this.name="CanceledError"}fe.inherits(zi,Ve,{__CANCEL__:!0});function op(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ve("Request failed with status code "+n.status,[Ve.ERR_BAD_REQUEST,Ve.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function jS(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function LS(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,s=0,o;return t=t!==void 0?t:1e3,function(u){const d=Date.now(),f=r[s];o||(o=d),n[i]=u,r[i]=d;let p=s,l=0;for(;p!==i;)l+=n[p++],p=p%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),d-o<t)return;const v=f&&d-f;return v?Math.round(l*1e3/v):void 0}}function BS(e,t){let n=0;const r=1e3/t;let i=null;return function(){const o=this===!0,c=Date.now();if(o||c-n>r)return i&&(clearTimeout(i),i=null),n=c,e.apply(null,arguments);i||(i=setTimeout(()=>(i=null,n=Date.now(),e.apply(null,arguments)),r-(c-n)))}}const Da=(e,t,n=3)=>{let r=0;const i=LS(50,250);return BS(s=>{const o=s.loaded,c=s.lengthComputable?s.total:void 0,u=o-r,d=i(u),f=o<=c;r=o;const p={loaded:o,total:c,progress:c?o/c:void 0,bytes:u,rate:d||void 0,estimated:d&&c&&f?(c-o)/d:void 0,event:s,lengthComputable:c!=null};p[t?"download":"upload"]=!0,e(p)},n)},FS=Xn.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(s){let o=s;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(o){const c=fe.isString(o)?i(o):o;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}(),US=Xn.hasStandardBrowserEnv?{write(e,t,n,r,i,s){const o=[e+"="+encodeURIComponent(t)];fe.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),fe.isString(r)&&o.push("path="+r),fe.isString(i)&&o.push("domain="+i),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function qS(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function VS(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ap(e,t){return e&&!qS(t)?VS(e,t):t}const cp=e=>e instanceof _n?{...e}:e;function Si(e,t){t=t||{};const n={};function r(d,f,p){return fe.isPlainObject(d)&&fe.isPlainObject(f)?fe.merge.call({caseless:p},d,f):fe.isPlainObject(f)?fe.merge({},f):fe.isArray(f)?f.slice():f}function i(d,f,p){if(fe.isUndefined(f)){if(!fe.isUndefined(d))return r(void 0,d,p)}else return r(d,f,p)}function s(d,f){if(!fe.isUndefined(f))return r(void 0,f)}function o(d,f){if(fe.isUndefined(f)){if(!fe.isUndefined(d))return r(void 0,d)}else return r(void 0,f)}function c(d,f,p){if(p in t)return r(d,f);if(p in e)return r(void 0,d)}const u={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:c,headers:(d,f)=>i(cp(d),cp(f),!0)};return fe.forEach(Object.keys(Object.assign({},e,t)),function(f){const p=u[f]||i,l=p(e[f],t[f],f);fe.isUndefined(l)&&p!==c||(n[f]=l)}),n}const up=e=>{const t=Si({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:c}=t;t.headers=o=_n.from(o),t.url=ep(ap(t.baseURL,t.url),e.params,e.paramsSerializer),c&&o.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let u;if(fe.isFormData(n)){if(Xn.hasStandardBrowserEnv||Xn.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((u=o.getContentType())!==!1){const[d,...f]=u?u.split(";").map(p=>p.trim()).filter(Boolean):[];o.setContentType([d||"multipart/form-data",...f].join("; "))}}if(Xn.hasStandardBrowserEnv&&(r&&fe.isFunction(r)&&(r=r(t)),r||r!==!1&&FS(t.url))){const d=i&&s&&US.read(s);d&&o.set(i,d)}return t},$S=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const i=up(e);let s=i.data;const o=_n.from(i.headers).normalize();let{responseType:c}=i,u;function d(){i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let f=new XMLHttpRequest;f.open(i.method.toUpperCase(),i.url,!0),f.timeout=i.timeout;function p(){if(!f)return;const v=_n.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),h={data:!c||c==="text"||c==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:v,config:e,request:f};op(function(g){n(g),d()},function(g){r(g),d()},h),f=null}"onloadend"in f?f.onloadend=p:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(p)},f.onabort=function(){f&&(r(new Ve("Request aborted",Ve.ECONNABORTED,i,f)),f=null)},f.onerror=function(){r(new Ve("Network Error",Ve.ERR_NETWORK,i,f)),f=null},f.ontimeout=function(){let a=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const h=i.transitional||np;i.timeoutErrorMessage&&(a=i.timeoutErrorMessage),r(new Ve(a,h.clarifyTimeoutError?Ve.ETIMEDOUT:Ve.ECONNABORTED,i,f)),f=null},s===void 0&&o.setContentType(null),"setRequestHeader"in f&&fe.forEach(o.toJSON(),function(a,h){f.setRequestHeader(h,a)}),fe.isUndefined(i.withCredentials)||(f.withCredentials=!!i.withCredentials),c&&c!=="json"&&(f.responseType=i.responseType),typeof i.onDownloadProgress=="function"&&f.addEventListener("progress",Da(i.onDownloadProgress,!0)),typeof i.onUploadProgress=="function"&&f.upload&&f.upload.addEventListener("progress",Da(i.onUploadProgress)),(i.cancelToken||i.signal)&&(u=v=>{f&&(r(!v||v.type?new zi(null,e,f):v),f.abort(),f=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const l=jS(i.url);if(l&&Xn.protocols.indexOf(l)===-1){r(new Ve("Unsupported protocol "+l+":",Ve.ERR_BAD_REQUEST,e));return}f.send(s||null)})},GS=(e,t)=>{let n=new AbortController,r;const i=function(u){if(!r){r=!0,o();const d=u instanceof Error?u:this.reason;n.abort(d instanceof Ve?d:new zi(d instanceof Error?d.message:d))}};let s=t&&setTimeout(()=>{i(new Ve(`timeout ${t} of ms exceeded`,Ve.ETIMEDOUT))},t);const o=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(u=>{u&&(u.removeEventListener?u.removeEventListener("abort",i):u.unsubscribe(i))}),e=null)};e.forEach(u=>u&&u.addEventListener&&u.addEventListener("abort",i));const{signal:c}=n;return c.unsubscribe=o,[c,()=>{s&&clearTimeout(s),s=null}]},HS=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},YS=async function*(e,t,n){for await(const r of e)yield*HS(ArrayBuffer.isView(r)?r:await n(String(r)),t)},lp=(e,t,n,r,i)=>{const s=YS(e,t,i);let o=0;return new ReadableStream({type:"bytes",async pull(c){const{done:u,value:d}=await s.next();if(u){c.close(),r();return}let f=d.byteLength;n&&n(o+=f),c.enqueue(new Uint8Array(d))},cancel(c){return r(c),s.return()}},{highWaterMark:2})},dp=(e,t)=>{const n=e!=null;return r=>setTimeout(()=>t({lengthComputable:n,total:e,loaded:r}))},Pa=typeof fetch<"u",fp=Pa&&typeof ReadableStream<"u",rl=Pa&&(typeof TextEncoder<"u"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),WS=fp&&(()=>{let e=!1;const t=new Request(Xn.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),hp=64*1024,il=fp&&!!(()=>{try{return fe.isReadableStream(new Response("").body)}catch{}})(),ja={stream:il&&(e=>e.body)};Pa&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ja[t]&&(ja[t]=fe.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Ve(`Response type '${t}' is not supported`,Ve.ERR_NOT_SUPPORT,r)})})})(new Response);const KS=async e=>{if(e==null)return 0;if(fe.isBlob(e))return e.size;if(fe.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(fe.isArrayBufferView(e))return e.byteLength;if(fe.isURLSearchParams(e)&&(e=e+""),fe.isString(e))return(await rl(e)).byteLength},zS=async(e,t)=>{const n=fe.toFiniteNumber(e.getContentLength());return n??KS(t)},sl={http:vS,xhr:$S,fetch:Pa&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:s,timeout:o,onDownloadProgress:c,onUploadProgress:u,responseType:d,headers:f,withCredentials:p="same-origin",fetchOptions:l}=up(e);d=d?(d+"").toLowerCase():"text";let[v,a]=i||s||o?GS([i,s],o):[],h,y;const g=()=>{!h&&setTimeout(()=>{v&&v.unsubscribe()}),h=!0};let b;try{if(u&&WS&&n!=="get"&&n!=="head"&&(b=await zS(f,r))!==0){let A=new Request(t,{method:"POST",body:r,duplex:"half"}),T;fe.isFormData(r)&&(T=A.headers.get("content-type"))&&f.setContentType(T),A.body&&(r=lp(A.body,hp,dp(b,Da(u)),null,rl))}fe.isString(p)||(p=p?"cors":"omit"),y=new Request(t,{...l,signal:v,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",withCredentials:p});let w=await fetch(y);const E=il&&(d==="stream"||d==="response");if(il&&(c||E)){const A={};["status","statusText","headers"].forEach(O=>{A[O]=w[O]});const T=fe.toFiniteNumber(w.headers.get("content-length"));w=new Response(lp(w.body,hp,c&&dp(T,Da(c,!0)),E&&g,rl),A)}d=d||"text";let S=await ja[fe.findKey(ja,d)||"text"](w,e);return!E&&g(),a&&a(),await new Promise((A,T)=>{op(A,T,{data:S,headers:_n.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:y})})}catch(w){throw g(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new Ve("Network Error",Ve.ERR_NETWORK,e,y),{cause:w.cause||w}):Ve.from(w,w&&w.code,e,y)}})};fe.forEach(sl,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const pp=e=>`- ${e}`,QS=e=>fe.isFunction(e)||e===null||e===!1,mp={getAdapter:e=>{e=fe.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let s=0;s<t;s++){n=e[s];let o;if(r=n,!QS(n)&&(r=sl[(o=String(n)).toLowerCase()],r===void 0))throw new Ve(`Unknown adapter '${o}'`);if(r)break;i[o||"#"+s]=r}if(!r){const s=Object.entries(i).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let o=t?s.length>1?`since :
62
- `+s.map(pp).join(`
63
- `):" "+pp(s[0]):"as no adapter specified";throw new Ve("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:sl};function ol(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new zi(null,e)}function gp(e){return ol(e),e.headers=_n.from(e.headers),e.data=nl.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),mp.getAdapter(e.adapter||Js.adapter)(e).then(function(r){return ol(e),r.data=nl.call(e,e.transformResponse,r),r.headers=_n.from(r.headers),r},function(r){return sp(r)||(ol(e),r&&r.response&&(r.response.data=nl.call(e,e.transformResponse,r.response),r.response.headers=_n.from(r.response.headers))),Promise.reject(r)})}const yp="1.7.1",al={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{al[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const vp={};al.transitional=function(t,n,r){function i(s,o){return"[Axios v"+yp+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return(s,o,c)=>{if(t===!1)throw new Ve(i(o," has been removed"+(n?" in "+n:"")),Ve.ERR_DEPRECATED);return n&&!vp[o]&&(vp[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,o,c):!0}};function JS(e,t,n){if(typeof e!="object")throw new Ve("options must be an object",Ve.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const s=r[i],o=t[s];if(o){const c=e[s],u=c===void 0||o(c,s,e);if(u!==!0)throw new Ve("option "+s+" must be "+u,Ve.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ve("Unknown option "+s,Ve.ERR_BAD_OPTION)}}const cl={assertOptions:JS,validators:al},Yr=cl.validators;class xi{constructor(t){this.defaults=t,this.interceptors={request:new tp,response:new tp}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
64
- `+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Si(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&cl.assertOptions(r,{silentJSONParsing:Yr.transitional(Yr.boolean),forcedJSONParsing:Yr.transitional(Yr.boolean),clarifyTimeoutError:Yr.transitional(Yr.boolean)},!1),i!=null&&(fe.isFunction(i)?n.paramsSerializer={serialize:i}:cl.assertOptions(i,{encode:Yr.function,serialize:Yr.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=s&&fe.merge(s.common,s[n.method]);s&&fe.forEach(["delete","get","head","post","put","patch","common"],a=>{delete s[a]}),n.headers=_n.concat(o,s);const c=[];let u=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(u=u&&h.synchronous,c.unshift(h.fulfilled,h.rejected))});const d=[];this.interceptors.response.forEach(function(h){d.push(h.fulfilled,h.rejected)});let f,p=0,l;if(!u){const a=[gp.bind(this),void 0];for(a.unshift.apply(a,c),a.push.apply(a,d),l=a.length,f=Promise.resolve(n);p<l;)f=f.then(a[p++],a[p++]);return f}l=c.length;let v=n;for(p=0;p<l;){const a=c[p++],h=c[p++];try{v=a(v)}catch(y){h.call(this,y);break}}try{f=gp.call(this,v)}catch(a){return Promise.reject(a)}for(p=0,l=d.length;p<l;)f=f.then(d[p++],d[p++]);return f}getUri(t){t=Si(this.defaults,t);const n=ap(t.baseURL,t.url);return ep(n,t.params,t.paramsSerializer)}}fe.forEach(["delete","get","head","options"],function(t){xi.prototype[t]=function(n,r){return this.request(Si(r||{},{method:t,url:n,data:(r||{}).data}))}}),fe.forEach(["post","put","patch"],function(t){function n(r){return function(s,o,c){return this.request(Si(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}xi.prototype[t]=n(),xi.prototype[t+"Form"]=n(!0)});class ul{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(c=>{r.subscribe(c),s=c}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},t(function(s,o,c){r.reason||(r.reason=new zi(s,o,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new ul(function(i){t=i}),cancel:t}}}function ZS(e){return function(n){return e.apply(null,n)}}function XS(e){return fe.isObject(e)&&e.isAxiosError===!0}const ll={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ll).forEach(([e,t])=>{ll[t]=e});function bp(e){const t=new xi(e),n=Bh(xi.prototype.request,t);return fe.extend(n,xi.prototype,t,{allOwnKeys:!0}),fe.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return bp(Si(e,i))},n}const Gt=bp(Js);Gt.Axios=xi,Gt.CanceledError=zi,Gt.CancelToken=ul,Gt.isCancel=sp,Gt.VERSION=yp,Gt.toFormData=Na,Gt.AxiosError=Ve,Gt.Cancel=Gt.CanceledError,Gt.all=function(t){return Promise.all(t)},Gt.spread=ZS,Gt.isAxiosError=XS,Gt.mergeConfig=Si,Gt.AxiosHeaders=_n,Gt.formToJSON=e=>rp(fe.isHTMLForm(e)?new FormData(e):e),Gt.getAdapter=mp.getAdapter,Gt.HttpStatusCode=ll,Gt.default=Gt;function wp(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=wp(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Wr(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=wp(e))&&(r&&(r+=" "),r+=t);return r}const Xs=e=>typeof e=="number"&&!isNaN(e),_i=e=>typeof e=="string",Mn=e=>typeof e=="function",La=e=>_i(e)||Mn(e)?e:null,dl=e=>k.isValidElement(e)||_i(e)||Mn(e)||Xs(e);function ex(e,t,n){n===void 0&&(n=300);const{scrollHeight:r,style:i}=e;requestAnimationFrame(()=>{i.minHeight="initial",i.height=r+"px",i.transition=`all ${n}ms`,requestAnimationFrame(()=>{i.height="0",i.padding="0",i.margin="0",setTimeout(t,n)})})}function Ba(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:i=!0,collapseDuration:s=300}=e;return function(o){let{children:c,position:u,preventExitTransition:d,done:f,nodeRef:p,isIn:l,playToast:v}=o;const a=r?`${t}--${u}`:t,h=r?`${n}--${u}`:n,y=k.useRef(0);return k.useLayoutEffect(()=>{const g=p.current,b=a.split(" "),w=E=>{E.target===p.current&&(v(),g.removeEventListener("animationend",w),g.removeEventListener("animationcancel",w),y.current===0&&E.type!=="animationcancel"&&g.classList.remove(...b))};g.classList.add(...b),g.addEventListener("animationend",w),g.addEventListener("animationcancel",w)},[]),k.useEffect(()=>{const g=p.current,b=()=>{g.removeEventListener("animationend",b),i?ex(g,f,s):f()};l||(d?b():(y.current=1,g.className+=` ${h}`,g.addEventListener("animationend",b)))},[l]),k.createElement(k.Fragment,null,c)}}function Ep(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const yn=new Map;let eo=[];const fl=new Set,tx=e=>fl.forEach(t=>t(e)),Sp=()=>yn.size>0;function xp(e,t){var n;if(t)return!((n=yn.get(t))==null||!n.isToastActive(e));let r=!1;return yn.forEach(i=>{i.isToastActive(e)&&(r=!0)}),r}function _p(e,t){dl(e)&&(Sp()||eo.push({content:e,options:t}),yn.forEach(n=>{n.buildToast(e,t)}))}function Cp(e,t){yn.forEach(n=>{t!=null&&t!=null&&t.containerId?(t==null?void 0:t.containerId)===n.id&&n.toggle(e,t==null?void 0:t.id):n.toggle(e,t==null?void 0:t.id)})}function nx(e){const{subscribe:t,getSnapshot:n,setProps:r}=k.useRef(function(s){const o=s.containerId||1;return{subscribe(c){const u=function(f,p,l){let v=1,a=0,h=[],y=[],g=[],b=p;const w=new Map,E=new Set,S=()=>{g=Array.from(w.values()),E.forEach(O=>O())},A=O=>{y=O==null?[]:y.filter(N=>N!==O),S()},T=O=>{const{toastId:N,onOpen:D,updateId:U,children:q}=O.props,F=U==null;O.staleId&&w.delete(O.staleId),w.set(N,O),y=[...y,O.props.toastId].filter(V=>V!==O.staleId),S(),l(Ep(O,F?"added":"updated")),F&&Mn(D)&&D(k.isValidElement(q)&&q.props)};return{id:f,props:b,observe:O=>(E.add(O),()=>E.delete(O)),toggle:(O,N)=>{w.forEach(D=>{N!=null&&N!==D.props.toastId||Mn(D.toggle)&&D.toggle(O)})},removeToast:A,toasts:w,clearQueue:()=>{a-=h.length,h=[]},buildToast:(O,N)=>{if((he=>{let{containerId:ce,toastId:ye,updateId:le}=he;const $=ce?ce!==f:f!==1,H=w.has(ye)&&le==null;return $||H})(N))return;const{toastId:D,updateId:U,data:q,staleId:F,delay:V}=N,R=()=>{A(D)},L=U==null;L&&a++;const W={...b,style:b.toastStyle,key:v++,...Object.fromEntries(Object.entries(N).filter(he=>{let[ce,ye]=he;return ye!=null})),toastId:D,updateId:U,data:q,closeToast:R,isIn:!1,className:La(N.className||b.toastClassName),bodyClassName:La(N.bodyClassName||b.bodyClassName),progressClassName:La(N.progressClassName||b.progressClassName),autoClose:!N.isLoading&&(z=N.autoClose,Z=b.autoClose,z===!1||Xs(z)&&z>0?z:Z),deleteToast(){const he=w.get(D),{onClose:ce,children:ye}=he.props;Mn(ce)&&ce(k.isValidElement(ye)&&ye.props),l(Ep(he,"removed")),w.delete(D),a--,a<0&&(a=0),h.length>0?T(h.shift()):S()}};var z,Z;W.closeButton=b.closeButton,N.closeButton===!1||dl(N.closeButton)?W.closeButton=N.closeButton:N.closeButton===!0&&(W.closeButton=!dl(b.closeButton)||b.closeButton);let te=O;k.isValidElement(O)&&!_i(O.type)?te=k.cloneElement(O,{closeToast:R,toastProps:W,data:q}):Mn(O)&&(te=O({closeToast:R,toastProps:W,data:q}));const re={content:te,props:W,staleId:F};b.limit&&b.limit>0&&a>b.limit&&L?h.push(re):Xs(V)?setTimeout(()=>{T(re)},V):T(re)},setProps(O){b=O},setToggle:(O,N)=>{w.get(O).toggle=N},isToastActive:O=>y.some(N=>N===O),getSnapshot:()=>b.newestOnTop?g.reverse():g}}(o,s,tx);yn.set(o,u);const d=u.observe(c);return eo.forEach(f=>_p(f.content,f.options)),eo=[],()=>{d(),yn.delete(o)}},setProps(c){var u;(u=yn.get(o))==null||u.setProps(c)},getSnapshot(){var c;return(c=yn.get(o))==null?void 0:c.getSnapshot()}}}(e)).current;r(e);const i=k.useSyncExternalStore(t,n,n);return{getToastToRender:function(s){if(!i)return[];const o=new Map;return i.forEach(c=>{const{position:u}=c.props;o.has(u)||o.set(u,[]),o.get(u).push(c)}),Array.from(o,c=>s(c[0],c[1]))},isToastActive:xp,count:i==null?void 0:i.length}}function rx(e){const[t,n]=k.useState(!1),[r,i]=k.useState(!1),s=k.useRef(null),o=k.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:c,pauseOnHover:u,closeToast:d,onClick:f,closeOnClick:p}=e;var l,v;function a(){n(!0)}function h(){n(!1)}function y(w){const E=s.current;o.canDrag&&E&&(o.didMove=!0,t&&h(),o.delta=e.draggableDirection==="x"?w.clientX-o.start:w.clientY-o.start,o.start!==w.clientX&&(o.canCloseOnClick=!1),E.style.transform=`translate3d(${e.draggableDirection==="x"?`${o.delta}px, var(--y)`:`0, calc(${o.delta}px + var(--y))`},0)`,E.style.opacity=""+(1-Math.abs(o.delta/o.removalDistance)))}function g(){document.removeEventListener("pointermove",y),document.removeEventListener("pointerup",g);const w=s.current;if(o.canDrag&&o.didMove&&w){if(o.canDrag=!1,Math.abs(o.delta)>o.removalDistance)return i(!0),e.closeToast(),void e.collapseAll();w.style.transition="transform 0.2s, opacity 0.2s",w.style.removeProperty("transform"),w.style.removeProperty("opacity")}}(v=yn.get((l={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||v.setToggle(l.id,l.fn),k.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||h(),window.addEventListener("focus",a),window.addEventListener("blur",h),()=>{window.removeEventListener("focus",a),window.removeEventListener("blur",h)}},[e.pauseOnFocusLoss]);const b={onPointerDown:function(w){if(e.draggable===!0||e.draggable===w.pointerType){o.didMove=!1,document.addEventListener("pointermove",y),document.addEventListener("pointerup",g);const E=s.current;o.canCloseOnClick=!0,o.canDrag=!0,E.style.transition="none",e.draggableDirection==="x"?(o.start=w.clientX,o.removalDistance=E.offsetWidth*(e.draggablePercent/100)):(o.start=w.clientY,o.removalDistance=E.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(w){const{top:E,bottom:S,left:A,right:T}=s.current.getBoundingClientRect();w.nativeEvent.type!=="touchend"&&e.pauseOnHover&&w.clientX>=A&&w.clientX<=T&&w.clientY>=E&&w.clientY<=S?h():a()}};return c&&u&&(b.onMouseEnter=h,e.stacked||(b.onMouseLeave=a)),p&&(b.onClick=w=>{f&&f(w),o.canCloseOnClick&&d()}),{playToast:a,pauseToast:h,isRunning:t,preventExitTransition:r,toastRef:s,eventHandlers:b}}function ix(e){let{delay:t,isRunning:n,closeToast:r,type:i="default",hide:s,className:o,style:c,controlledProgress:u,progress:d,rtl:f,isIn:p,theme:l}=e;const v=s||u&&d===0,a={...c,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};u&&(a.transform=`scaleX(${d})`);const h=Wr("Toastify__progress-bar",u?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${l}`,`Toastify__progress-bar--${i}`,{"Toastify__progress-bar--rtl":f}),y=Mn(o)?o({rtl:f,type:i,defaultClassName:h}):Wr(h,o),g={[u&&d>=1?"onTransitionEnd":"onAnimationEnd"]:u&&d<1?null:()=>{p&&r()}};return k.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":v},k.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${l} Toastify__progress-bar--${i}`}),k.createElement("div",{role:"progressbar","aria-hidden":v?"true":"false","aria-label":"notification timer",className:y,style:a,...g}))}let sx=1;const Ap=()=>""+sx++;function ox(e){return e&&(_i(e.toastId)||Xs(e.toastId))?e.toastId:Ap()}function to(e,t){return _p(e,t),t.toastId}function Fa(e,t){return{...t,type:t&&t.type||e,toastId:ox(t)}}function Ua(e){return(t,n)=>to(t,Fa(e,n))}function Ue(e,t){return to(e,Fa("default",t))}Ue.loading=(e,t)=>to(e,Fa("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),Ue.promise=function(e,t,n){let r,{pending:i,error:s,success:o}=t;i&&(r=_i(i)?Ue.loading(i,n):Ue.loading(i.render,{...n,...i}));const c={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},u=(f,p,l)=>{if(p==null)return void Ue.dismiss(r);const v={type:f,...c,...n,data:l},a=_i(p)?{render:p}:p;return r?Ue.update(r,{...v,...a}):Ue(a.render,{...v,...a}),l},d=Mn(e)?e():e;return d.then(f=>u("success",o,f)).catch(f=>u("error",s,f)),d},Ue.success=Ua("success"),Ue.info=Ua("info"),Ue.error=Ua("error"),Ue.warning=Ua("warning"),Ue.warn=Ue.warning,Ue.dark=(e,t)=>to(e,Fa("default",{theme:"dark",...t})),Ue.dismiss=function(e){(function(t){var n;if(Sp()){if(t==null||_i(n=t)||Xs(n))yn.forEach(r=>{r.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){const r=yn.get(t.containerId);r?r.removeToast(t.id):yn.forEach(i=>{i.removeToast(t.id)})}}else eo=eo.filter(r=>t!=null&&r.options.toastId!==t)})(e)},Ue.clearWaitingQueue=function(e){e===void 0&&(e={}),yn.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},Ue.isActive=xp,Ue.update=function(e,t){t===void 0&&(t={});const n=((r,i)=>{var s;let{containerId:o}=i;return(s=yn.get(o||1))==null?void 0:s.toasts.get(r)})(e,t);if(n){const{props:r,content:i}=n,s={delay:100,...r,...t,toastId:t.toastId||e,updateId:Ap()};s.toastId!==e&&(s.staleId=e);const o=s.render||i;delete s.render,to(o,s)}},Ue.done=e=>{Ue.update(e,{progress:1})},Ue.onChange=function(e){return fl.add(e),()=>{fl.delete(e)}},Ue.play=e=>Cp(!0,e),Ue.pause=e=>Cp(!1,e);const ax=typeof window<"u"?k.useLayoutEffect:k.useEffect,qa=e=>{let{theme:t,type:n,isLoading:r,...i}=e;return k.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...i})},hl={info:function(e){return k.createElement(qa,{...e},k.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return k.createElement(qa,{...e},k.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return k.createElement(qa,{...e},k.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return k.createElement(qa,{...e},k.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return k.createElement("div",{className:"Toastify__spinner"})}},cx=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:i,playToast:s}=rx(e),{closeButton:o,children:c,autoClose:u,onClick:d,type:f,hideProgressBar:p,closeToast:l,transition:v,position:a,className:h,style:y,bodyClassName:g,bodyStyle:b,progressClassName:w,progressStyle:E,updateId:S,role:A,progress:T,rtl:O,toastId:N,deleteToast:D,isIn:U,isLoading:q,closeOnClick:F,theme:V}=e,R=Wr("Toastify__toast",`Toastify__toast-theme--${V}`,`Toastify__toast--${f}`,{"Toastify__toast--rtl":O},{"Toastify__toast--close-on-click":F}),L=Mn(h)?h({rtl:O,position:a,type:f,defaultClassName:R}):Wr(R,h),W=function(re){let{theme:he,type:ce,isLoading:ye,icon:le}=re,$=null;const H={theme:he,type:ce};return le===!1||(Mn(le)?$=le({...H,isLoading:ye}):k.isValidElement(le)?$=k.cloneElement(le,H):ye?$=hl.spinner():(X=>X in hl)(ce)&&($=hl[ce](H))),$}(e),z=!!T||!u,Z={closeToast:l,type:f,theme:V};let te=null;return o===!1||(te=Mn(o)?o(Z):k.isValidElement(o)?k.cloneElement(o,Z):function(re){let{closeToast:he,theme:ce,ariaLabel:ye="close"}=re;return k.createElement("button",{className:`Toastify__close-button Toastify__close-button--${ce}`,type:"button",onClick:le=>{le.stopPropagation(),he(le)},"aria-label":ye},k.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},k.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(Z)),k.createElement(v,{isIn:U,done:D,position:a,preventExitTransition:n,nodeRef:r,playToast:s},k.createElement("div",{id:N,onClick:d,"data-in":U,className:L,...i,style:y,ref:r},k.createElement("div",{...U&&{role:A},className:Mn(g)?g({type:f}):Wr("Toastify__toast-body",g),style:b},W!=null&&k.createElement("div",{className:Wr("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!q})},W),k.createElement("div",null,c)),te,k.createElement(ix,{...S&&!z?{key:`pb-${S}`}:{},rtl:O,theme:V,delay:u,isRunning:t,isIn:U,closeToast:l,hide:p,type:f,style:E,className:w,controlledProgress:z,progress:T||0})))},Va=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},ux=Ba(Va("bounce",!0));Ba(Va("slide",!0)),Ba(Va("zoom")),Ba(Va("flip"));const lx={position:"top-right",transition:ux,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function Tp(e){let t={...lx,...e};const n=e.stacked,[r,i]=k.useState(!0),s=k.useRef(null),{getToastToRender:o,isToastActive:c,count:u}=nx(t),{className:d,style:f,rtl:p,containerId:l}=t;function v(h){const y=Wr("Toastify__toast-container",`Toastify__toast-container--${h}`,{"Toastify__toast-container--rtl":p});return Mn(d)?d({position:h,rtl:p,defaultClassName:y}):Wr(y,La(d))}function a(){n&&(i(!0),Ue.play())}return ax(()=>{if(n){var h;const y=s.current.querySelectorAll('[data-in="true"]'),g=12,b=(h=t.position)==null?void 0:h.includes("top");let w=0,E=0;Array.from(y).reverse().forEach((S,A)=>{const T=S;T.classList.add("Toastify__toast--stacked"),A>0&&(T.dataset.collapsed=`${r}`),T.dataset.pos||(T.dataset.pos=b?"top":"bot");const O=w*(r?.2:1)+(r?0:g*A);T.style.setProperty("--y",`${b?O:-1*O}px`),T.style.setProperty("--g",`${g}`),T.style.setProperty("--s",""+(1-(r?E:0))),w+=T.offsetHeight,E+=.025})}},[r,u,n]),k.createElement("div",{ref:s,className:"Toastify",id:l,onMouseEnter:()=>{n&&(i(!1),Ue.pause())},onMouseLeave:a},o((h,y)=>{const g=y.length?{...f}:{...f,pointerEvents:"none"};return k.createElement("div",{className:v(h),style:g,key:`container-${h}`},y.map(b=>{let{content:w,props:E}=b;return k.createElement(cx,{...E,stacked:n,collapseAll:a,isIn:c(E.toastId,E.containerId),style:E.style,key:`toast-${E.key}`},w)}))}))}const dx=e=>{var n,r,i,s;const t=(n=e.response)==null?void 0:n.status;if(t&&t!==401){const o=(r=e.response)==null?void 0:r.data;console.table(o);const c=(i=e.response)==null?void 0:i.data.errors,u=m.jsxs("div",{children:[m.jsx("p",{children:(s=e.response)==null?void 0:s.data.message}),c&&Object.keys(c).map(d=>c[d].map(f=>m.jsx("li",{children:f},f)))]});Ue.error(u)}return Promise.reject(e)};class fx{constructor(){Qb(this,"instance",Gt.create())}initialize(t,n){this.instance=Gt.create({baseURL:n||"https://api.piggy.eu",headers:{Authorization:`Bearer ${t}`}}),this.instance.interceptors.response.use(void 0,dx)}}const wt=new fx;var pl={exports:{}},ml={};/**
59
+ */function qi(){return qi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qi.apply(this,arguments)}function Yu(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}const ga="get",ya="application/x-www-form-urlencoded";function va(e){return e!=null&&typeof e.tagName=="string"}function Yw(e){return va(e)&&e.tagName.toLowerCase()==="button"}function Ww(e){return va(e)&&e.tagName.toLowerCase()==="form"}function Kw(e){return va(e)&&e.tagName.toLowerCase()==="input"}function zw(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Qw(e,t){return e.button===0&&(!t||t==="_self")&&!zw(e)}let ba=null;function Jw(){if(ba===null)try{new FormData(document.createElement("form"),0),ba=!1}catch{ba=!0}return ba}const Zw=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Wu(e){return e!=null&&!Zw.has(e)?(process.env.NODE_ENV!=="production"&&Un(!1,'"'+e+'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` '+('and will default to "'+ya+'"')),null):e}function Xw(e,t){let n,r,i,s,o;if(Ww(e)){let c=e.getAttribute("action");r=c?$r(c,t):null,n=e.getAttribute("method")||ga,i=Wu(e.getAttribute("enctype"))||ya,s=new FormData(e)}else if(Yw(e)||Kw(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let u=e.getAttribute("formaction")||c.getAttribute("action");if(r=u?$r(u,t):null,n=e.getAttribute("formmethod")||c.getAttribute("method")||ga,i=Wu(e.getAttribute("formenctype"))||Wu(c.getAttribute("enctype"))||ya,s=new FormData(c,e),!Jw()){let{name:d,type:f,value:h}=e;if(f==="image"){let l=d?d+".":"";s.append(l+"x","0"),s.append(l+"y","0")}else d&&s.append(d,h)}}else{if(va(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=ga,r=null,i=ya,o=e}return s&&i==="text/plain"&&(o=s,s=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:s,body:o}}const eE=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],tE=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],nE=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","unstable_viewTransition"],rE="6";try{window.__reactRouterVersion=rE}catch{}const _h=se.createContext({isTransitioning:!1});process.env.NODE_ENV!=="production"&&(_h.displayName="ViewTransition");const iE=se.createContext(new Map);process.env.NODE_ENV!=="production"&&(iE.displayName="Fetchers"),process.env.NODE_ENV;const sE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",oE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ch=se.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:c,target:u,to:d,preventScrollReset:f,unstable_viewTransition:h}=t,l=Yu(t,eE),{basename:b}=se.useContext(Vn),a,p=!1;if(typeof d=="string"&&oE.test(d)&&(a=d,sE))try{let w=new URL(window.location.href),E=d.startsWith("//")?new URL(w.protocol+d):new URL(d),S=$r(E.pathname,b);E.origin===w.origin&&S!=null?d=S+E.search+E.hash:p=!0}catch{process.env.NODE_ENV!=="production"&&Un(!1,'<Link to="'+d+'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.')}let y=kw(d,{relative:i}),g=uE(d,{replace:o,state:c,target:u,preventScrollReset:f,relative:i,unstable_viewTransition:h});function v(w){r&&r(w),w.defaultPrevented||g(w)}return se.createElement("a",qi({},l,{href:a||y,onClick:p||s?r:v,ref:n,target:u}))});process.env.NODE_ENV!=="production"&&(Ch.displayName="Link");const Ah=se.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:s="",end:o=!1,style:c,to:u,unstable_viewTransition:d,children:f}=t,h=Yu(t,tE),l=qs(u,{relative:h.relative}),b=Yt(),a=se.useContext(qu),{navigator:p,basename:y}=se.useContext(Vn),g=a!=null&&mE(l)&&d===!0,v=p.encodeLocation?p.encodeLocation(l).pathname:l.pathname,w=b.pathname,E=a&&a.navigation&&a.navigation.location?a.navigation.location.pathname:null;i||(w=w.toLowerCase(),E=E?E.toLowerCase():null,v=v.toLowerCase()),E&&y&&(E=$r(E,y)||E);const S=v!=="/"&&v.endsWith("/")?v.length-1:v.length;let A=w===v||!o&&w.startsWith(v)&&w.charAt(S)==="/",T=E!=null&&(E===v||!o&&E.startsWith(v)&&E.charAt(v.length)==="/"),O={isActive:A,isPending:T,isTransitioning:g},N=A?r:void 0,D;typeof s=="function"?D=s(O):D=[s,A?"active":null,T?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let U=typeof c=="function"?c(O):c;return se.createElement(Ch,qi({},h,{"aria-current":N,className:D,ref:n,style:U,to:u,unstable_viewTransition:d}),typeof f=="function"?f(O):f)});process.env.NODE_ENV!=="production"&&(Ah.displayName="NavLink");const aE=se.forwardRef((e,t)=>{let{fetcherKey:n,navigate:r,reloadDocument:i,replace:s,state:o,method:c=ga,action:u,onSubmit:d,relative:f,preventScrollReset:h,unstable_viewTransition:l}=e,b=Yu(e,nE),a=hE(),p=pE(u,{relative:f}),y=c.toLowerCase()==="get"?"get":"post",g=v=>{if(d&&d(v),v.defaultPrevented)return;v.preventDefault();let w=v.nativeEvent.submitter,E=(w==null?void 0:w.getAttribute("formmethod"))||c;a(w||v.currentTarget,{fetcherKey:n,method:E,navigate:r,replace:s,state:o,relative:f,preventScrollReset:h,unstable_viewTransition:l})};return se.createElement("form",qi({ref:t,method:y,action:p,onSubmit:i?d:g},b))});process.env.NODE_ENV!=="production"&&(aE.displayName="Form"),process.env.NODE_ENV;var wa;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(wa||(wa={}));var Th;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Th||(Th={}));function cE(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function Ih(e){let t=se.useContext(Vs);return t||(process.env.NODE_ENV!=="production"?He(!1,cE(e)):He(!1)),t}function uE(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,unstable_viewTransition:c}=t===void 0?{}:t,u=Mt(),d=Yt(),f=qs(e,{relative:o});return se.useCallback(h=>{if(Qw(h,n)){h.preventDefault();let l=r!==void 0?r:pa(d)===pa(f);u(e,{replace:l,state:i,preventScrollReset:s,relative:o,unstable_viewTransition:c})}},[d,u,f,r,i,n,e,s,o,c])}function lE(){if(typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}let dE=0,fE=()=>"__"+String(++dE)+"__";function hE(){let{router:e}=Ih(wa.UseSubmit),{basename:t}=se.useContext(Vn),n=qw();return se.useCallback(function(r,i){i===void 0&&(i={}),lE();let{action:s,method:o,encType:c,formData:u,body:d}=Xw(r,t);if(i.navigate===!1){let f=i.fetcherKey||fE();e.fetch(f,n,i.action||s,{preventScrollReset:i.preventScrollReset,formData:u,body:d,formMethod:i.method||o,formEncType:i.encType||c,unstable_flushSync:i.unstable_flushSync})}else e.navigate(i.action||s,{preventScrollReset:i.preventScrollReset,formData:u,body:d,formMethod:i.method||o,formEncType:i.encType||c,replace:i.replace,state:i.state,fromRouteId:n,unstable_flushSync:i.unstable_flushSync,unstable_viewTransition:i.unstable_viewTransition})},[e,t,n])}function pE(e,t){let{relative:n}=t===void 0?{}:t,{basename:r}=se.useContext(Vn),i=se.useContext(Zn);i||(process.env.NODE_ENV!=="production"?He(!1,"useFormAction must be used inside a RouteContext"):He(!1));let[s]=i.matches.slice(-1),o=qi({},qs(e||".",{relative:n})),c=Yt();if(e==null){o.search=c.search;let u=new URLSearchParams(o.search);u.has("index")&&u.get("index")===""&&(u.delete("index"),o.search=u.toString()?"?"+u.toString():"")}return(!e||e===".")&&s.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:Er([r,o.pathname])),pa(o)}function mE(e,t){t===void 0&&(t={});let n=se.useContext(_h);n==null&&(process.env.NODE_ENV!=="production"?He(!1,"`unstable_useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"):He(!1));let{basename:r}=Ih(wa.useViewTransitionState),i=qs(e,{relative:t.relative});if(!n.isTransitioning)return!1;let s=$r(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=$r(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Bu(i.pathname,o)!=null||Bu(i.pathname,s)!=null}function kh(e,t){return function(){return e.apply(t,arguments)}}const{toString:gE}=Object.prototype,{getPrototypeOf:Ku}=Object,Ea=(e=>t=>{const n=gE.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Xn=e=>(e=e.toLowerCase(),t=>Ea(t)===e),Sa=e=>t=>typeof t===e,{isArray:$i}=Array,Hs=Sa("undefined");function yE(e){return e!==null&&!Hs(e)&&e.constructor!==null&&!Hs(e.constructor)&&qn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Oh=Xn("ArrayBuffer");function vE(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Oh(e.buffer),t}const bE=Sa("string"),qn=Sa("function"),Rh=Sa("number"),xa=e=>e!==null&&typeof e=="object",wE=e=>e===!0||e===!1,_a=e=>{if(Ea(e)!=="object")return!1;const t=Ku(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},EE=Xn("Date"),SE=Xn("File"),xE=Xn("Blob"),_E=Xn("FileList"),CE=e=>xa(e)&&qn(e.pipe),AE=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||qn(e.append)&&((t=Ea(e))==="formdata"||t==="object"&&qn(e.toString)&&e.toString()==="[object FormData]"))},TE=Xn("URLSearchParams"),[IE,kE,OE,RE]=["ReadableStream","Request","Response","Headers"].map(Xn),NE=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ys(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),$i(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),o=s.length;let c;for(r=0;r<o;r++)c=s[r],t.call(null,e[c],c,e)}}function Nh(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const Mh=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Dh=e=>!Hs(e)&&e!==Mh;function zu(){const{caseless:e}=Dh(this)&&this||{},t={},n=(r,i)=>{const s=e&&Nh(t,i)||i;_a(t[s])&&_a(r)?t[s]=zu(t[s],r):_a(r)?t[s]=zu({},r):$i(r)?t[s]=r.slice():t[s]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Ys(arguments[r],n);return t}const ME=(e,t,n,{allOwnKeys:r}={})=>(Ys(t,(i,s)=>{n&&qn(i)?e[s]=kh(i,n):e[s]=i},{allOwnKeys:r}),e),DE=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),PE=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},jE=(e,t,n,r)=>{let i,s,o;const c={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)o=i[s],(!r||r(o,e,t))&&!c[o]&&(t[o]=e[o],c[o]=!0);e=n!==!1&&Ku(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},LE=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},BE=e=>{if(!e)return null;if($i(e))return e;let t=e.length;if(!Rh(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},FE=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ku(Uint8Array)),UE=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const s=i.value;t.call(e,s[0],s[1])}},VE=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},qE=Xn("HTMLFormElement"),$E=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Ph=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),GE=Xn("RegExp"),jh=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ys(n,(i,s)=>{let o;(o=t(i,s,e))!==!1&&(r[s]=o||i)}),Object.defineProperties(e,r)},HE=e=>{jh(e,(t,n)=>{if(qn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(qn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},YE=(e,t)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return $i(e)?r(e):r(String(e).split(t)),n},WE=()=>{},KE=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Qu="abcdefghijklmnopqrstuvwxyz",Lh="0123456789",Bh={DIGIT:Lh,ALPHA:Qu,ALPHA_DIGIT:Qu+Qu.toUpperCase()+Lh},zE=(e=16,t=Bh.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function QE(e){return!!(e&&qn(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const JE=e=>{const t=new Array(10),n=(r,i)=>{if(xa(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const s=$i(r)?[]:{};return Ys(r,(o,c)=>{const u=n(o,i+1);!Hs(u)&&(s[c]=u)}),t[i]=void 0,s}}return r};return n(e,0)},ZE=Xn("AsyncFunction"),fe={isArray:$i,isArrayBuffer:Oh,isBuffer:yE,isFormData:AE,isArrayBufferView:vE,isString:bE,isNumber:Rh,isBoolean:wE,isObject:xa,isPlainObject:_a,isReadableStream:IE,isRequest:kE,isResponse:OE,isHeaders:RE,isUndefined:Hs,isDate:EE,isFile:SE,isBlob:xE,isRegExp:GE,isFunction:qn,isStream:CE,isURLSearchParams:TE,isTypedArray:FE,isFileList:_E,forEach:Ys,merge:zu,extend:ME,trim:NE,stripBOM:DE,inherits:PE,toFlatObject:jE,kindOf:Ea,kindOfTest:Xn,endsWith:LE,toArray:BE,forEachEntry:UE,matchAll:VE,isHTMLForm:qE,hasOwnProperty:Ph,hasOwnProp:Ph,reduceDescriptors:jh,freezeMethods:HE,toObjectSet:YE,toCamelCase:$E,noop:WE,toFiniteNumber:KE,findKey:Nh,global:Mh,isContextDefined:Dh,ALPHABET:Bh,generateString:zE,isSpecCompliantForm:QE,toJSONObject:JE,isAsyncFn:ZE,isThenable:e=>e&&(xa(e)||qn(e))&&qn(e.then)&&qn(e.catch)};function Ve(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}fe.inherits(Ve,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:fe.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Fh=Ve.prototype,Uh={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Uh[e]={value:e}}),Object.defineProperties(Ve,Uh),Object.defineProperty(Fh,"isAxiosError",{value:!0}),Ve.from=(e,t,n,r,i,s)=>{const o=Object.create(Fh);return fe.toFlatObject(e,o,function(u){return u!==Error.prototype},c=>c!=="isAxiosError"),Ve.call(o,e.message,t,n,r,i),o.cause=e,o.name=e.name,s&&Object.assign(o,s),o};const XE=null;function Ju(e){return fe.isPlainObject(e)||fe.isArray(e)}function Vh(e){return fe.endsWith(e,"[]")?e.slice(0,-2):e}function qh(e,t,n){return e?e.concat(t).map(function(i,s){return i=Vh(i),!n&&s?"["+i+"]":i}).join(n?".":""):t}function eS(e){return fe.isArray(e)&&!e.some(Ju)}const tS=fe.toFlatObject(fe,{},null,function(t){return/^is[A-Z]/.test(t)});function Ca(e,t,n){if(!fe.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=fe.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,y){return!fe.isUndefined(y[p])});const r=n.metaTokens,i=n.visitor||f,s=n.dots,o=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&fe.isSpecCompliantForm(t);if(!fe.isFunction(i))throw new TypeError("visitor must be a function");function d(a){if(a===null)return"";if(fe.isDate(a))return a.toISOString();if(!u&&fe.isBlob(a))throw new Ve("Blob is not supported. Use a Buffer instead.");return fe.isArrayBuffer(a)||fe.isTypedArray(a)?u&&typeof Blob=="function"?new Blob([a]):Buffer.from(a):a}function f(a,p,y){let g=a;if(a&&!y&&typeof a=="object"){if(fe.endsWith(p,"{}"))p=r?p:p.slice(0,-2),a=JSON.stringify(a);else if(fe.isArray(a)&&eS(a)||(fe.isFileList(a)||fe.endsWith(p,"[]"))&&(g=fe.toArray(a)))return p=Vh(p),g.forEach(function(w,E){!(fe.isUndefined(w)||w===null)&&t.append(o===!0?qh([p],E,s):o===null?p:p+"[]",d(w))}),!1}return Ju(a)?!0:(t.append(qh(y,p,s),d(a)),!1)}const h=[],l=Object.assign(tS,{defaultVisitor:f,convertValue:d,isVisitable:Ju});function b(a,p){if(!fe.isUndefined(a)){if(h.indexOf(a)!==-1)throw Error("Circular reference detected in "+p.join("."));h.push(a),fe.forEach(a,function(g,v){(!(fe.isUndefined(g)||g===null)&&i.call(t,g,fe.isString(v)?v.trim():v,p,l))===!0&&b(g,p?p.concat(v):[v])}),h.pop()}}if(!fe.isObject(e))throw new TypeError("data must be an object");return b(e),t}function $h(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Zu(e,t){this._pairs=[],e&&Ca(e,this,t)}const Gh=Zu.prototype;Gh.append=function(t,n){this._pairs.push([t,n])},Gh.toString=function(t){const n=t?function(r){return t.call(this,r,$h)}:$h;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function nS(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Hh(e,t,n){if(!t)return e;const r=n&&n.encode||nS,i=n&&n.serialize;let s;if(i?s=i(t,n):s=fe.isURLSearchParams(t)?t.toString():new Zu(t,n).toString(r),s){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class Yh{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){fe.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Wh={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},rS={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Zu,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Xu=typeof window<"u"&&typeof document<"u",iS=(e=>Xu&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),sS=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",oS=Xu&&window.location.href||"http://localhost",er={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Xu,hasStandardBrowserEnv:iS,hasStandardBrowserWebWorkerEnv:sS,origin:oS},Symbol.toStringTag,{value:"Module"})),...rS};function aS(e,t){return Ca(e,new er.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,s){return er.isNode&&fe.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function cS(e){return fe.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function uS(e){const t={},n=Object.keys(e);let r;const i=n.length;let s;for(r=0;r<i;r++)s=n[r],t[s]=e[s];return t}function Kh(e){function t(n,r,i,s){let o=n[s++];if(o==="__proto__")return!0;const c=Number.isFinite(+o),u=s>=n.length;return o=!o&&fe.isArray(i)?i.length:o,u?(fe.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!c):((!i[o]||!fe.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],s)&&fe.isArray(i[o])&&(i[o]=uS(i[o])),!c)}if(fe.isFormData(e)&&fe.isFunction(e.entries)){const n={};return fe.forEachEntry(e,(r,i)=>{t(cS(r),i,n,0)}),n}return null}function lS(e,t,n){if(fe.isString(e))try{return(t||JSON.parse)(e),fe.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Ws={transitional:Wh,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,s=fe.isObject(t);if(s&&fe.isHTMLForm(t)&&(t=new FormData(t)),fe.isFormData(t))return i?JSON.stringify(Kh(t)):t;if(fe.isArrayBuffer(t)||fe.isBuffer(t)||fe.isStream(t)||fe.isFile(t)||fe.isBlob(t)||fe.isReadableStream(t))return t;if(fe.isArrayBufferView(t))return t.buffer;if(fe.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return aS(t,this.formSerializer).toString();if((c=fe.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Ca(c?{"files[]":t}:t,u&&new u,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),lS(t)):t}],transformResponse:[function(t){const n=this.transitional||Ws.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(fe.isResponse(t)||fe.isReadableStream(t))return t;if(t&&fe.isString(t)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(c){if(o)throw c.name==="SyntaxError"?Ve.from(c,Ve.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:er.classes.FormData,Blob:er.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};fe.forEach(["delete","get","head","post","put","patch"],e=>{Ws.headers[e]={}});const dS=fe.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),fS=e=>{const t={};let n,r,i;return e&&e.split(`
60
+ `).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&dS[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},zh=Symbol("internals");function Ks(e){return e&&String(e).trim().toLowerCase()}function Aa(e){return e===!1||e==null?e:fe.isArray(e)?e.map(Aa):String(e)}function hS(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const pS=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function el(e,t,n,r,i){if(fe.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!fe.isString(t)){if(fe.isString(r))return t.indexOf(r)!==-1;if(fe.isRegExp(r))return r.test(t)}}function mS(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function gS(e,t){const n=fe.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,s,o){return this[r].call(this,t,i,s,o)},configurable:!0})})}class Cn{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function s(c,u,d){const f=Ks(u);if(!f)throw new Error("header name must be a non-empty string");const h=fe.findKey(i,f);(!h||i[h]===void 0||d===!0||d===void 0&&i[h]!==!1)&&(i[h||u]=Aa(c))}const o=(c,u)=>fe.forEach(c,(d,f)=>s(d,f,u));if(fe.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(fe.isString(t)&&(t=t.trim())&&!pS(t))o(fS(t),n);else if(fe.isHeaders(t))for(const[c,u]of t.entries())s(u,c,r);else t!=null&&s(n,t,r);return this}get(t,n){if(t=Ks(t),t){const r=fe.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return hS(i);if(fe.isFunction(n))return n.call(this,i,r);if(fe.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ks(t),t){const r=fe.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||el(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function s(o){if(o=Ks(o),o){const c=fe.findKey(r,o);c&&(!n||el(r,r[c],c,n))&&(delete r[c],i=!0)}}return fe.isArray(t)?t.forEach(s):s(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const s=n[r];(!t||el(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const n=this,r={};return fe.forEach(this,(i,s)=>{const o=fe.findKey(r,s);if(o){n[o]=Aa(i),delete n[s];return}const c=t?mS(s):String(s).trim();c!==s&&delete n[s],n[c]=Aa(i),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return fe.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&fe.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
61
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[zh]=this[zh]={accessors:{}}).accessors,i=this.prototype;function s(o){const c=Ks(o);r[c]||(gS(i,o),r[c]=!0)}return fe.isArray(t)?t.forEach(s):s(t),this}}Cn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),fe.reduceDescriptors(Cn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),fe.freezeMethods(Cn);function tl(e,t){const n=this||Ws,r=t||n,i=Cn.from(r.headers);let s=r.data;return fe.forEach(e,function(c){s=c.call(n,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function Qh(e){return!!(e&&e.__CANCEL__)}function Gi(e,t,n){Ve.call(this,e??"canceled",Ve.ERR_CANCELED,t,n),this.name="CanceledError"}fe.inherits(Gi,Ve,{__CANCEL__:!0});function Jh(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ve("Request failed with status code "+n.status,[Ve.ERR_BAD_REQUEST,Ve.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function yS(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function vS(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,s=0,o;return t=t!==void 0?t:1e3,function(u){const d=Date.now(),f=r[s];o||(o=d),n[i]=u,r[i]=d;let h=s,l=0;for(;h!==i;)l+=n[h++],h=h%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),d-o<t)return;const b=f&&d-f;return b?Math.round(l*1e3/b):void 0}}function bS(e,t){let n=0;const r=1e3/t;let i=null;return function(){const o=this===!0,c=Date.now();if(o||c-n>r)return i&&(clearTimeout(i),i=null),n=c,e.apply(null,arguments);i||(i=setTimeout(()=>(i=null,n=Date.now(),e.apply(null,arguments)),r-(c-n)))}}const Ta=(e,t,n=3)=>{let r=0;const i=vS(50,250);return bS(s=>{const o=s.loaded,c=s.lengthComputable?s.total:void 0,u=o-r,d=i(u),f=o<=c;r=o;const h={loaded:o,total:c,progress:c?o/c:void 0,bytes:u,rate:d||void 0,estimated:d&&c&&f?(c-o)/d:void 0,event:s,lengthComputable:c!=null};h[t?"download":"upload"]=!0,e(h)},n)},wS=er.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(s){let o=s;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(o){const c=fe.isString(o)?i(o):o;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}(),ES=er.hasStandardBrowserEnv?{write(e,t,n,r,i,s){const o=[e+"="+encodeURIComponent(t)];fe.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),fe.isString(r)&&o.push("path="+r),fe.isString(i)&&o.push("domain="+i),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function SS(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function xS(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Zh(e,t){return e&&!SS(t)?xS(e,t):t}const Xh=e=>e instanceof Cn?{...e}:e;function Ei(e,t){t=t||{};const n={};function r(d,f,h){return fe.isPlainObject(d)&&fe.isPlainObject(f)?fe.merge.call({caseless:h},d,f):fe.isPlainObject(f)?fe.merge({},f):fe.isArray(f)?f.slice():f}function i(d,f,h){if(fe.isUndefined(f)){if(!fe.isUndefined(d))return r(void 0,d,h)}else return r(d,f,h)}function s(d,f){if(!fe.isUndefined(f))return r(void 0,f)}function o(d,f){if(fe.isUndefined(f)){if(!fe.isUndefined(d))return r(void 0,d)}else return r(void 0,f)}function c(d,f,h){if(h in t)return r(d,f);if(h in e)return r(void 0,d)}const u={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:c,headers:(d,f)=>i(Xh(d),Xh(f),!0)};return fe.forEach(Object.keys(Object.assign({},e,t)),function(f){const h=u[f]||i,l=h(e[f],t[f],f);fe.isUndefined(l)&&h!==c||(n[f]=l)}),n}const ep=e=>{const t=Ei({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:c}=t;t.headers=o=Cn.from(o),t.url=Hh(Zh(t.baseURL,t.url),e.params,e.paramsSerializer),c&&o.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let u;if(fe.isFormData(n)){if(er.hasStandardBrowserEnv||er.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((u=o.getContentType())!==!1){const[d,...f]=u?u.split(";").map(h=>h.trim()).filter(Boolean):[];o.setContentType([d||"multipart/form-data",...f].join("; "))}}if(er.hasStandardBrowserEnv&&(r&&fe.isFunction(r)&&(r=r(t)),r||r!==!1&&wS(t.url))){const d=i&&s&&ES.read(s);d&&o.set(i,d)}return t},_S=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const i=ep(e);let s=i.data;const o=Cn.from(i.headers).normalize();let{responseType:c}=i,u;function d(){i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let f=new XMLHttpRequest;f.open(i.method.toUpperCase(),i.url,!0),f.timeout=i.timeout;function h(){if(!f)return;const b=Cn.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),p={data:!c||c==="text"||c==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:b,config:e,request:f};Jh(function(g){n(g),d()},function(g){r(g),d()},p),f=null}"onloadend"in f?f.onloadend=h:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(h)},f.onabort=function(){f&&(r(new Ve("Request aborted",Ve.ECONNABORTED,i,f)),f=null)},f.onerror=function(){r(new Ve("Network Error",Ve.ERR_NETWORK,i,f)),f=null},f.ontimeout=function(){let a=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const p=i.transitional||Wh;i.timeoutErrorMessage&&(a=i.timeoutErrorMessage),r(new Ve(a,p.clarifyTimeoutError?Ve.ETIMEDOUT:Ve.ECONNABORTED,i,f)),f=null},s===void 0&&o.setContentType(null),"setRequestHeader"in f&&fe.forEach(o.toJSON(),function(a,p){f.setRequestHeader(p,a)}),fe.isUndefined(i.withCredentials)||(f.withCredentials=!!i.withCredentials),c&&c!=="json"&&(f.responseType=i.responseType),typeof i.onDownloadProgress=="function"&&f.addEventListener("progress",Ta(i.onDownloadProgress,!0)),typeof i.onUploadProgress=="function"&&f.upload&&f.upload.addEventListener("progress",Ta(i.onUploadProgress)),(i.cancelToken||i.signal)&&(u=b=>{f&&(r(!b||b.type?new Gi(null,e,f):b),f.abort(),f=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const l=yS(i.url);if(l&&er.protocols.indexOf(l)===-1){r(new Ve("Unsupported protocol "+l+":",Ve.ERR_BAD_REQUEST,e));return}f.send(s||null)})},CS=(e,t)=>{let n=new AbortController,r;const i=function(u){if(!r){r=!0,o();const d=u instanceof Error?u:this.reason;n.abort(d instanceof Ve?d:new Gi(d instanceof Error?d.message:d))}};let s=t&&setTimeout(()=>{i(new Ve(`timeout ${t} of ms exceeded`,Ve.ETIMEDOUT))},t);const o=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(u=>{u&&(u.removeEventListener?u.removeEventListener("abort",i):u.unsubscribe(i))}),e=null)};e.forEach(u=>u&&u.addEventListener&&u.addEventListener("abort",i));const{signal:c}=n;return c.unsubscribe=o,[c,()=>{s&&clearTimeout(s),s=null}]},AS=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},TS=async function*(e,t,n){for await(const r of e)yield*AS(ArrayBuffer.isView(r)?r:await n(String(r)),t)},tp=(e,t,n,r,i)=>{const s=TS(e,t,i);let o=0;return new ReadableStream({type:"bytes",async pull(c){const{done:u,value:d}=await s.next();if(u){c.close(),r();return}let f=d.byteLength;n&&n(o+=f),c.enqueue(new Uint8Array(d))},cancel(c){return r(c),s.return()}},{highWaterMark:2})},np=(e,t)=>{const n=e!=null;return r=>setTimeout(()=>t({lengthComputable:n,total:e,loaded:r}))},Ia=typeof fetch<"u",rp=Ia&&typeof ReadableStream<"u",nl=Ia&&(typeof TextEncoder<"u"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),IS=rp&&(()=>{let e=!1;const t=new Request(er.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),ip=64*1024,rl=rp&&!!(()=>{try{return fe.isReadableStream(new Response("").body)}catch{}})(),ka={stream:rl&&(e=>e.body)};Ia&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ka[t]&&(ka[t]=fe.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Ve(`Response type '${t}' is not supported`,Ve.ERR_NOT_SUPPORT,r)})})})(new Response);const kS=async e=>{if(e==null)return 0;if(fe.isBlob(e))return e.size;if(fe.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(fe.isArrayBufferView(e))return e.byteLength;if(fe.isURLSearchParams(e)&&(e=e+""),fe.isString(e))return(await nl(e)).byteLength},OS=async(e,t)=>{const n=fe.toFiniteNumber(e.getContentLength());return n??kS(t)},il={http:XE,xhr:_S,fetch:Ia&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:s,timeout:o,onDownloadProgress:c,onUploadProgress:u,responseType:d,headers:f,withCredentials:h="same-origin",fetchOptions:l}=ep(e);d=d?(d+"").toLowerCase():"text";let[b,a]=i||s||o?CS([i,s],o):[],p,y;const g=()=>{!p&&setTimeout(()=>{b&&b.unsubscribe()}),p=!0};let v;try{if(u&&IS&&n!=="get"&&n!=="head"&&(v=await OS(f,r))!==0){let A=new Request(t,{method:"POST",body:r,duplex:"half"}),T;fe.isFormData(r)&&(T=A.headers.get("content-type"))&&f.setContentType(T),A.body&&(r=tp(A.body,ip,np(v,Ta(u)),null,nl))}fe.isString(h)||(h=h?"cors":"omit"),y=new Request(t,{...l,signal:b,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",withCredentials:h});let w=await fetch(y);const E=rl&&(d==="stream"||d==="response");if(rl&&(c||E)){const A={};["status","statusText","headers"].forEach(O=>{A[O]=w[O]});const T=fe.toFiniteNumber(w.headers.get("content-length"));w=new Response(tp(w.body,ip,c&&np(T,Ta(c,!0)),E&&g,nl),A)}d=d||"text";let S=await ka[fe.findKey(ka,d)||"text"](w,e);return!E&&g(),a&&a(),await new Promise((A,T)=>{Jh(A,T,{data:S,headers:Cn.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:y})})}catch(w){throw g(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new Ve("Network Error",Ve.ERR_NETWORK,e,y),{cause:w.cause||w}):Ve.from(w,w&&w.code,e,y)}})};fe.forEach(il,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const sp=e=>`- ${e}`,RS=e=>fe.isFunction(e)||e===null||e===!1,op={getAdapter:e=>{e=fe.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let s=0;s<t;s++){n=e[s];let o;if(r=n,!RS(n)&&(r=il[(o=String(n)).toLowerCase()],r===void 0))throw new Ve(`Unknown adapter '${o}'`);if(r)break;i[o||"#"+s]=r}if(!r){const s=Object.entries(i).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let o=t?s.length>1?`since :
62
+ `+s.map(sp).join(`
63
+ `):" "+sp(s[0]):"as no adapter specified";throw new Ve("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:il};function sl(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Gi(null,e)}function ap(e){return sl(e),e.headers=Cn.from(e.headers),e.data=tl.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),op.getAdapter(e.adapter||Ws.adapter)(e).then(function(r){return sl(e),r.data=tl.call(e,e.transformResponse,r),r.headers=Cn.from(r.headers),r},function(r){return Qh(r)||(sl(e),r&&r.response&&(r.response.data=tl.call(e,e.transformResponse,r.response),r.response.headers=Cn.from(r.response.headers))),Promise.reject(r)})}const cp="1.7.1",ol={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ol[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const up={};ol.transitional=function(t,n,r){function i(s,o){return"[Axios v"+cp+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return(s,o,c)=>{if(t===!1)throw new Ve(i(o," has been removed"+(n?" in "+n:"")),Ve.ERR_DEPRECATED);return n&&!up[o]&&(up[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,o,c):!0}};function NS(e,t,n){if(typeof e!="object")throw new Ve("options must be an object",Ve.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const s=r[i],o=t[s];if(o){const c=e[s],u=c===void 0||o(c,s,e);if(u!==!0)throw new Ve("option "+s+" must be "+u,Ve.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ve("Unknown option "+s,Ve.ERR_BAD_OPTION)}}const al={assertOptions:NS,validators:ol},Gr=al.validators;class Si{constructor(t){this.defaults=t,this.interceptors={request:new Yh,response:new Yh}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
64
+ `+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ei(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&al.assertOptions(r,{silentJSONParsing:Gr.transitional(Gr.boolean),forcedJSONParsing:Gr.transitional(Gr.boolean),clarifyTimeoutError:Gr.transitional(Gr.boolean)},!1),i!=null&&(fe.isFunction(i)?n.paramsSerializer={serialize:i}:al.assertOptions(i,{encode:Gr.function,serialize:Gr.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=s&&fe.merge(s.common,s[n.method]);s&&fe.forEach(["delete","get","head","post","put","patch","common"],a=>{delete s[a]}),n.headers=Cn.concat(o,s);const c=[];let u=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(n)===!1||(u=u&&p.synchronous,c.unshift(p.fulfilled,p.rejected))});const d=[];this.interceptors.response.forEach(function(p){d.push(p.fulfilled,p.rejected)});let f,h=0,l;if(!u){const a=[ap.bind(this),void 0];for(a.unshift.apply(a,c),a.push.apply(a,d),l=a.length,f=Promise.resolve(n);h<l;)f=f.then(a[h++],a[h++]);return f}l=c.length;let b=n;for(h=0;h<l;){const a=c[h++],p=c[h++];try{b=a(b)}catch(y){p.call(this,y);break}}try{f=ap.call(this,b)}catch(a){return Promise.reject(a)}for(h=0,l=d.length;h<l;)f=f.then(d[h++],d[h++]);return f}getUri(t){t=Ei(this.defaults,t);const n=Zh(t.baseURL,t.url);return Hh(n,t.params,t.paramsSerializer)}}fe.forEach(["delete","get","head","options"],function(t){Si.prototype[t]=function(n,r){return this.request(Ei(r||{},{method:t,url:n,data:(r||{}).data}))}}),fe.forEach(["post","put","patch"],function(t){function n(r){return function(s,o,c){return this.request(Ei(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}Si.prototype[t]=n(),Si.prototype[t+"Form"]=n(!0)});class cl{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(c=>{r.subscribe(c),s=c}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},t(function(s,o,c){r.reason||(r.reason=new Gi(s,o,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new cl(function(i){t=i}),cancel:t}}}function MS(e){return function(n){return e.apply(null,n)}}function DS(e){return fe.isObject(e)&&e.isAxiosError===!0}const ul={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ul).forEach(([e,t])=>{ul[t]=e});function lp(e){const t=new Si(e),n=kh(Si.prototype.request,t);return fe.extend(n,Si.prototype,t,{allOwnKeys:!0}),fe.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return lp(Ei(e,i))},n}const Dt=lp(Ws);Dt.Axios=Si,Dt.CanceledError=Gi,Dt.CancelToken=cl,Dt.isCancel=Qh,Dt.VERSION=cp,Dt.toFormData=Ca,Dt.AxiosError=Ve,Dt.Cancel=Dt.CanceledError,Dt.all=function(t){return Promise.all(t)},Dt.spread=MS,Dt.isAxiosError=DS,Dt.mergeConfig=Ei,Dt.AxiosHeaders=Cn,Dt.formToJSON=e=>Kh(fe.isHTMLForm(e)?new FormData(e):e),Dt.getAdapter=op.getAdapter,Dt.HttpStatusCode=ul,Dt.default=Dt;const PS={UNAUTHORIZED:401,MAINTENANCE_MODE:503},dp=e=>{var n,r;const t=(n=e.response)==null?void 0:n.status;if(t&&t!==PS.UNAUTHORIZED){const i=(r=e.response)==null?void 0:r.data;console.table(i)}return Promise.reject(e)};class jS{constructor(){ew(this,"instance",Dt.create())}initialize(t,n){this.instance=Dt.create({baseURL:n||"https://api.piggy.eu",headers:{Authorization:`Bearer ${t}`}}),this.instance.interceptors.response.use(void 0,dp)}}const _t=new jS;var ll={exports:{}},dl={};/**
65
65
  * @license React
66
66
  * use-sync-external-store-shim.production.min.js
67
67
  *
@@ -69,7 +69,7 @@ React keys must be passed directly to JSX without using spread:
69
69
  *
70
70
  * This source code is licensed under the MIT license found in the
71
71
  * LICENSE file in the root directory of this source tree.
72
- */var Ip;function hx(){if(Ip)return ml;Ip=1;var e=k;function t(p,l){return p===l&&(p!==0||1/p===1/l)||p!==p&&l!==l}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,s=e.useLayoutEffect,o=e.useDebugValue;function c(p,l){var v=l(),a=r({inst:{value:v,getSnapshot:l}}),h=a[0].inst,y=a[1];return s(function(){h.value=v,h.getSnapshot=l,u(h)&&y({inst:h})},[p,v,l]),i(function(){return u(h)&&y({inst:h}),p(function(){u(h)&&y({inst:h})})},[p]),o(v),v}function u(p){var l=p.getSnapshot;p=p.value;try{var v=l();return!n(p,v)}catch{return!0}}function d(p,l){return l()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:c;return ml.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,ml}var gl={};/**
72
+ */var fp;function LS(){if(fp)return dl;fp=1;var e=k;function t(h,l){return h===l&&(h!==0||1/h===1/l)||h!==h&&l!==l}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,s=e.useLayoutEffect,o=e.useDebugValue;function c(h,l){var b=l(),a=r({inst:{value:b,getSnapshot:l}}),p=a[0].inst,y=a[1];return s(function(){p.value=b,p.getSnapshot=l,u(p)&&y({inst:p})},[h,b,l]),i(function(){return u(p)&&y({inst:p}),h(function(){u(p)&&y({inst:p})})},[h]),o(b),b}function u(h){var l=h.getSnapshot;h=h.value;try{var b=l();return!n(h,b)}catch{return!0}}function d(h,l){return l()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:c;return dl.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,dl}var fl={};/**
73
73
  * @license React
74
74
  * use-sync-external-store-shim.development.js
75
75
  *
@@ -77,11 +77,11 @@ React keys must be passed directly to JSX without using spread:
77
77
  *
78
78
  * This source code is licensed under the MIT license found in the
79
79
  * LICENSE file in the root directory of this source tree.
80
- */var kp;function px(){return kp||(kp=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=k,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(w){{for(var E=arguments.length,S=new Array(E>1?E-1:0),A=1;A<E;A++)S[A-1]=arguments[A];r("error",w,S)}}function r(w,E,S){{var A=t.ReactDebugCurrentFrame,T=A.getStackAddendum();T!==""&&(E+="%s",S=S.concat([T]));var O=S.map(function(N){return String(N)});O.unshift("Warning: "+E),Function.prototype.apply.call(console[w],console,O)}}function i(w,E){return w===E&&(w!==0||1/w===1/E)||w!==w&&E!==E}var s=typeof Object.is=="function"?Object.is:i,o=e.useState,c=e.useEffect,u=e.useLayoutEffect,d=e.useDebugValue,f=!1,p=!1;function l(w,E,S){f||e.startTransition!==void 0&&(f=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var A=E();if(!p){var T=E();s(A,T)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),p=!0)}var O=o({inst:{value:A,getSnapshot:E}}),N=O[0].inst,D=O[1];return u(function(){N.value=A,N.getSnapshot=E,v(N)&&D({inst:N})},[w,A,E]),c(function(){v(N)&&D({inst:N});var U=function(){v(N)&&D({inst:N})};return w(U)},[w]),d(A),A}function v(w){var E=w.getSnapshot,S=w.value;try{var A=E();return!s(S,A)}catch{return!0}}function a(w,E,S){return E()}var h=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",y=!h,g=y?a:l,b=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:g;gl.useSyncExternalStore=b,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),gl}process.env.NODE_ENV==="production"?pl.exports=hx():pl.exports=px();var mx=pl.exports;const Kr=()=>{},Cn=Kr(),yl=Object,at=e=>e===Cn,dr=e=>typeof e=="function",zr=(e,t)=>({...e,...t}),gx=e=>dr(e.then),$a=new WeakMap;let yx=0;const no=e=>{const t=typeof e,n=e&&e.constructor,r=n==Date;let i,s;if(yl(e)===e&&!r&&n!=RegExp){if(i=$a.get(e),i)return i;if(i=++yx+"~",$a.set(e,i),n==Array){for(i="@",s=0;s<e.length;s++)i+=no(e[s])+",";$a.set(e,i)}if(n==yl){i="#";const o=yl.keys(e).sort();for(;!at(s=o.pop());)at(e[s])||(i+=s+":"+no(e[s])+",");$a.set(e,i)}}else i=r?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return i},_r=new WeakMap,vl={},Ga={},bl="undefined",Ha=typeof window!=bl,wl=typeof document!=bl,vx=()=>Ha&&typeof window.requestAnimationFrame!=bl,Op=(e,t)=>{const n=_r.get(e);return[()=>!at(t)&&e.get(t)||vl,r=>{if(!at(t)){const i=e.get(t);t in Ga||(Ga[t]=i),n[5](t,zr(i,r),i||vl)}},n[6],()=>!at(t)&&t in Ga?Ga[t]:!at(t)&&e.get(t)||vl]};let El=!0;const bx=()=>El,[Sl,xl]=Ha&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Kr,Kr],wx=()=>{const e=wl&&document.visibilityState;return at(e)||e!=="hidden"},Ex=e=>(wl&&document.addEventListener("visibilitychange",e),Sl("focus",e),()=>{wl&&document.removeEventListener("visibilitychange",e),xl("focus",e)}),Sx=e=>{const t=()=>{El=!0,e()},n=()=>{El=!1};return Sl("online",t),Sl("offline",n),()=>{xl("online",t),xl("offline",n)}},xx={isOnline:bx,isVisible:wx},_x={initFocus:Ex,initReconnect:Sx},Rp=!k.useId,ro=!Ha||"Deno"in window,Cx=e=>vx()?window.requestAnimationFrame(e):setTimeout(e,1),_l=ro?k.useEffect:k.useLayoutEffect,Cl=typeof navigator<"u"&&navigator.connection,Np=!ro&&Cl&&(["slow-2g","2g"].includes(Cl.effectiveType)||Cl.saveData),Al=e=>{if(dr(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?no(e):"",[e,t]};let Ax=0;const Tl=()=>++Ax,Mp=0,Dp=1,Pp=2;var io={__proto__:null,ERROR_REVALIDATE_EVENT:3,FOCUS_EVENT:Mp,MUTATE_EVENT:Pp,RECONNECT_EVENT:Dp};async function jp(...e){const[t,n,r,i]=e,s=zr({populateCache:!0,throwOnError:!0},typeof i=="boolean"?{revalidate:i}:i||{});let o=s.populateCache;const c=s.rollbackOnError;let u=s.optimisticData;const d=l=>typeof c=="function"?c(l):c!==!1,f=s.throwOnError;if(dr(n)){const l=n,v=[],a=t.keys();for(const h of a)!/^\$(inf|sub)\$/.test(h)&&l(t.get(h)._k)&&v.push(h);return Promise.all(v.map(p))}return p(n);async function p(l){const[v]=Al(l);if(!v)return;const[a,h]=Op(t,v),[y,g,b,w]=_r.get(t),E=()=>{const F=y[v];return(dr(s.revalidate)?s.revalidate(a().data,l):s.revalidate!==!1)&&(delete b[v],delete w[v],F&&F[0])?F[0](Pp).then(()=>a().data):a().data};if(e.length<3)return E();let S=r,A;const T=Tl();g[v]=[T,0];const O=!at(u),N=a(),D=N.data,U=N._c,q=at(U)?D:U;if(O&&(u=dr(u)?u(q,D):u,h({data:u,_c:q})),dr(S))try{S=S(q)}catch(F){A=F}if(S&&gx(S))if(S=await S.catch(F=>{A=F}),T!==g[v][0]){if(A)throw A;return S}else A&&O&&d(A)&&(o=!0,h({data:q,_c:Cn}));if(o&&!A)if(dr(o)){const F=o(S,q);h({data:F,error:Cn,_c:Cn})}else h({data:S,error:Cn,_c:Cn});if(g[v][1]=Tl(),Promise.resolve(E()).then(()=>{h({_c:Cn})}),A){if(f)throw A;return}return S}}const Lp=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},Tx=(e,t)=>{if(!_r.has(e)){const n=zr(_x,t),r={},i=jp.bind(Cn,e);let s=Kr;const o={},c=(f,p)=>{const l=o[f]||[];return o[f]=l,l.push(p),()=>l.splice(l.indexOf(p),1)},u=(f,p,l)=>{e.set(f,p);const v=o[f];if(v)for(const a of v)a(p,l)},d=()=>{if(!_r.has(e)&&(_r.set(e,[r,{},{},{},i,u,c]),!ro)){const f=n.initFocus(setTimeout.bind(Cn,Lp.bind(Cn,r,Mp))),p=n.initReconnect(setTimeout.bind(Cn,Lp.bind(Cn,r,Dp)));s=()=>{f&&f(),p&&p(),_r.delete(e)}}};return d(),[e,i,d,s]}return[e,_r.get(e)[4]]},Ix=(e,t,n,r,i)=>{const s=n.errorRetryCount,o=i.retryCount,c=~~((Math.random()+.5)*(1<<(o<8?o:8)))*n.errorRetryInterval;!at(s)&&o>s||setTimeout(r,c,i)},kx=(e,t)=>no(e)==no(t),[Bp,Ox]=Tx(new Map),Rx=zr({onLoadingSlow:Kr,onSuccess:Kr,onError:Kr,onErrorRetry:Ix,onDiscarded:Kr,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Np?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:Np?5e3:3e3,compare:kx,isPaused:()=>!1,cache:Bp,mutate:Ox,fallback:{}},xx),Nx=(e,t)=>{const n=zr(e,t);if(t){const{use:r,fallback:i}=e,{use:s,fallback:o}=t;r&&s&&(n.use=r.concat(s)),i&&o&&(n.fallback=zr(i,o))}return n},Mx=k.createContext({}),Dx="$inf$",Fp=Ha&&window.__SWR_DEVTOOLS_USE__,Px=Fp?window.__SWR_DEVTOOLS_USE__:[],jx=()=>{Fp&&(window.__SWR_DEVTOOLS_REACT__=k)},Lx=e=>dr(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],Bx=()=>zr(Rx,k.useContext(Mx)),Fx=e=>(t,n,r)=>e(t,n&&((...s)=>{const[o]=Al(t),[,,,c]=_r.get(Bp);if(o.startsWith(Dx))return n(...s);const u=c[o];return at(u)?n(...s):(delete c[o],u)}),r),Ux=Px.concat(Fx),qx=e=>function(...n){const r=Bx(),[i,s,o]=Lx(n),c=Nx(r,o);let u=e;const{use:d}=c,f=(d||[]).concat(Ux);for(let p=f.length;p--;)u=f[p](u);return u(i,s||c.fetcher||null,c)},Vx=(e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const i=r.indexOf(n);i>=0&&(r[i]=r[r.length-1],r.pop())}};jx();const Up=k.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)}),Il={dedupe:!0},$x=qx((e,t,n)=>{const{cache:r,compare:i,suspense:s,fallbackData:o,revalidateOnMount:c,revalidateIfStale:u,refreshInterval:d,refreshWhenHidden:f,refreshWhenOffline:p,keepPreviousData:l}=n,[v,a,h,y]=_r.get(r),[g,b]=Al(e),w=k.useRef(!1),E=k.useRef(!1),S=k.useRef(g),A=k.useRef(t),T=k.useRef(n),O=()=>T.current,N=()=>O().isVisible()&&O().isOnline(),[D,U,q,F]=Op(r,g),V=k.useRef({}).current,R=at(o)?n.fallback[g]:o,L=(M,ee)=>{for(const J in V){const Q=J;if(Q==="data"){if(!i(M[Q],ee[Q])&&(!at(M[Q])||!i(le,ee[Q])))return!1}else if(ee[Q]!==M[Q])return!1}return!0},W=k.useMemo(()=>{const M=!g||!t?!1:at(c)?O().isPaused()||s?!1:at(u)?!0:u:c,ee=ue=>{const ie=zr(ue);return delete ie._k,M?{isValidating:!0,isLoading:!0,...ie}:ie},J=D(),Q=F(),Y=ee(J),pe=J===Q?Y:ee(Q);let ge=Y;return[()=>{const ue=ee(D());return L(ue,ge)?(ge.data=ue.data,ge.isLoading=ue.isLoading,ge.isValidating=ue.isValidating,ge.error=ue.error,ge):(ge=ue,ue)},()=>pe]},[r,g]),z=mx.useSyncExternalStore(k.useCallback(M=>q(g,(ee,J)=>{L(J,ee)||M()}),[r,g]),W[0],W[1]),Z=!w.current,te=v[g]&&v[g].length>0,re=z.data,he=at(re)?R:re,ce=z.error,ye=k.useRef(he),le=l?at(re)?ye.current:re:he,$=te&&!at(ce)?!1:Z&&!at(c)?c:O().isPaused()?!1:s?at(he)?!1:u:at(he)||u,H=!!(g&&t&&Z&&$),X=at(z.isValidating)?H:z.isValidating,C=at(z.isLoading)?H:z.isLoading,j=k.useCallback(async M=>{const ee=A.current;if(!g||!ee||E.current||O().isPaused())return!1;let J,Q,Y=!0;const pe=M||{},ge=!h[g]||!pe.dedupe,ue=()=>Rp?!E.current&&g===S.current&&w.current:g===S.current,ie={isValidating:!1,isLoading:!1},be=()=>{U(ie)},oe=()=>{const _e=h[g];_e&&_e[1]===Q&&delete h[g]},Ce={isValidating:!0};at(D().data)&&(Ce.isLoading=!0);try{if(ge&&(U(Ce),n.loadingTimeout&&at(D().data)&&setTimeout(()=>{Y&&ue()&&O().onLoadingSlow(g,n)},n.loadingTimeout),h[g]=[ee(b),Tl()]),[J,Q]=h[g],J=await J,ge&&setTimeout(oe,n.dedupingInterval),!h[g]||h[g][1]!==Q)return ge&&ue()&&O().onDiscarded(g),!1;ie.error=Cn;const _e=a[g];if(!at(_e)&&(Q<=_e[0]||Q<=_e[1]||_e[1]===0))return be(),ge&&ue()&&O().onDiscarded(g),!1;const We=D().data;ie.data=i(We,J)?We:J,ge&&ue()&&O().onSuccess(J,g,n)}catch(_e){oe();const We=O(),{shouldRetryOnError:rt}=We;We.isPaused()||(ie.error=_e,ge&&ue()&&(We.onError(_e,g,We),(rt===!0||dr(rt)&&rt(_e))&&(!O().revalidateOnFocus||!O().revalidateOnReconnect||N())&&We.onErrorRetry(_e,g,We,vt=>{const ht=v[g];ht&&ht[0]&&ht[0](io.ERROR_REVALIDATE_EVENT,vt)},{retryCount:(pe.retryCount||0)+1,dedupe:!0})))}return Y=!1,be(),!0},[g,r]),B=k.useCallback((...M)=>jp(r,S.current,...M),[]);if(_l(()=>{A.current=t,T.current=n,at(re)||(ye.current=re)}),_l(()=>{if(!g)return;const M=j.bind(Cn,Il);let ee=0;const Q=Vx(g,v,(Y,pe={})=>{if(Y==io.FOCUS_EVENT){const ge=Date.now();O().revalidateOnFocus&&ge>ee&&N()&&(ee=ge+O().focusThrottleInterval,M())}else if(Y==io.RECONNECT_EVENT)O().revalidateOnReconnect&&N()&&M();else{if(Y==io.MUTATE_EVENT)return j();if(Y==io.ERROR_REVALIDATE_EVENT)return j(pe)}});return E.current=!1,S.current=g,w.current=!0,U({_k:b}),$&&(at(he)||ro?M():Cx(M)),()=>{E.current=!0,Q()}},[g]),_l(()=>{let M;function ee(){const Q=dr(d)?d(D().data):d;Q&&M!==-1&&(M=setTimeout(J,Q))}function J(){!D().error&&(f||O().isVisible())&&(p||O().isOnline())?j(Il).then(ee):ee()}return ee(),()=>{M&&(clearTimeout(M),M=-1)}},[d,f,p,g]),k.useDebugValue(le),s&&at(he)&&g){if(!Rp&&ro)throw new Error("Fallback data is required when using suspense in SSR.");A.current=t,T.current=n,E.current=!1;const M=y[g];if(!at(M)){const ee=B(M);Up(ee)}if(at(ce)){const ee=j(Il);at(le)||(ee.status="fulfilled",ee.value=!0),Up(ee)}else throw ce}return{mutate:B,get data(){return V.data=!0,le},get error(){return V.error=!0,ce},get isValidating(){return V.isValidating=!0,X},get isLoading(){return V.isLoading=!0,C}}}),Cr=(e,t)=>{const n=u=>wt.instance.get(u,{params:t}),{data:r,error:i,isLoading:s,isValidating:o,mutate:c}=$x(e,n,{shouldRetryOnError:!1,revalidateIfStale:!1});return{data:r,error:i,isLoading:s,isValidating:o,mutate:c}},mt=(e="")=>`/api/v1/portal-sessions/${localStorage.getItem("portal_session_uuid")}/${e}`,Gx="brand-kit",qp={get:()=>wt.instance.get(mt(Gx))},Vp="contact-attributes",$p={get:()=>wt.instance.get(mt(Vp)),update:e=>wt.instance.put(mt(Vp),e)},Gp="contact-identifiers",Hx={create:e=>wt.instance.post(mt(Gp),e),clear:e=>wt.instance.delete(mt(Gp),{params:e})},Ya="contacts",er={get:(e,t)=>wt.instance.get(mt(Ya),{params:{contact_uuid:e,email:t}}),exists:e=>wt.instance.get(`${mt(Ya)}/exists`,{params:{email:e}}),create:e=>wt.instance.post(`${mt(Ya)}`,{email:e}),linkIdentifier:(e,t)=>wt.instance.post(`${mt(Ya)}/link-identifier`,{contact_identifier_value:e,email:t})},Yx="credit-receptions",Wx={create:e=>wt.instance.post(`${mt(Yx)}/create`,e)},Hp="giftcards",kl={get:e=>wt.instance.get(`${mt(Hp)}/${e}`),transaction:(e,t)=>wt.instance.post(`${mt(Hp)}/transaction`,{uuid:e,amount_in_cents:t})};var Yp=(e=>(e[e.CREDIT_RECEPTION=1]="CREDIT_RECEPTION",e[e.PHYSICAL_REWARD_RECEPTION=2]="PHYSICAL_REWARD_RECEPTION",e[e.DIGITAL_REWARD_RECEPTION=3]="DIGITAL_REWARD_RECEPTION",e))(Yp||{});const Wp="/api/v1/portal-sessions/",so={create:e=>wt.instance.post(Wp,e),setContact:(e,t)=>wt.instance.put(Wp+e,t),checkCode:e=>wt.instance.get(mt(`check-code/${e}`))};var oo=(e=>(e.IDENTIFIER="identifier",e.EMAIL="email",e))(oo||{});const Kx="prepaid",Kp={transaction:e=>wt.instance.post(`${mt(Kx)}/transaction`,e)},zp="rewards",zx={get:e=>wt.instance.get(`${mt(zp)}/${e}`),claim:e=>wt.instance.post(`${mt(zp)}/claim/`,{uuid:e})},Qp="subscriptions",Ol={get:()=>wt.instance.get(mt(Qp)),update:e=>wt.instance.put(mt(Qp),e)};var Jp=(e=>(e.SUBSCRIBED="SUBSCRIBED",e.UNSUBSCRIBED="UNSUBSCRIBED",e.PENDING_CONFIRMATION="PENDING_CONFIRMATION",e))(Jp||{}),Qr=(e=>(e.OPT_OUT="OPT_OUT",e.OPT_IN="OPT_IN",e.DOUBLE_OPT_IN="DOUBLE_OPT_IN",e.FUNCTIONAL="FUNCTIONAL",e))(Qr||{});const Rl="vouchers",Nl={get:e=>wt.instance.get(`${mt(Rl)}/${e}`),redeemById:e=>wt.instance.post(`${mt(Rl)}/redeem/${e}`),redeemByCode:e=>wt.instance.post(`${mt(Rl)}/redeem`,{code:e})};var Qi=(e=>(e.INACTIVE="INACTIVE",e.ACTIVE="ACTIVE",e.EXPIRED="EXPIRED",e.LOCKED="LOCKED",e.REDEEMED="REDEEMED",e.DEACTIVATED="DEACTIVATED",e))(Qi||{});const Ji=(e,t="EUR")=>new Intl.NumberFormat(Wt.language,{style:"currency",currency:t??"EUR"}).format(e/100),ao=e=>{window.parent.postMessage(e,"*")},Zp=(e,t)=>Math.abs(Math.round((t.getTime()-e.getTime())/(1e3*3600*24))),Xp=(e,t)=>Math.abs(Math.round((t.getTime()-e.getTime())/(1e3*3600*24*7))),em=(e,t)=>Math.abs(Math.round((t.getTime()-e.getTime())/(1e3*3600*24*365.25))),Qx=async(e,t)=>{const{data:{data:n}}=await er.get(e);n&&t(n)},co=async(e,t,n,r)=>{const i=await so.setContact(e,{email:t,contact_identifier_value:n});r&&Qx(i.data.data.contact.uuid,r)};function Jx(){if(console&&console.warn){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];typeof t[0]=="string"&&(t[0]=`react-i18next:: ${t[0]}`),console.warn(...t)}}const tm={};function Ml(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];typeof t[0]=="string"&&tm[t[0]]||(typeof t[0]=="string"&&(tm[t[0]]=new Date),Jx(...t))}const nm=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}};function rm(e,t,n){e.loadNamespaces(t,nm(e,n))}function im(e,t,n,r){typeof n=="string"&&(n=[n]),n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,nm(e,r))}function Zx(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=t.languages[0],i=t.options?t.options.fallbackLng:!1,s=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const o=(c,u)=>{const d=t.services.backendConnector.state[`${c}|${u}`];return d===-1||d===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!o(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||o(r,e)&&(!i||o(s,e)))}function Xx(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!t.languages||!t.languages.length?(Ml("i18n.languages were undefined or empty",t.languages),!0):t.options.ignoreJSONStructure!==void 0?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(i,s)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!s(i.isLanguageChangingTo,e))return!1}}):Zx(e,t,n)}const e_=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,t_={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},n_=e=>t_[e];let Dl={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(e_,n_)};function r_(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Dl={...Dl,...e}}function i_(){return Dl}let sm;function s_(e){sm=e}function o_(){return sm}const a_={type:"3rdParty",init(e){r_(e.options.react),s_(e)}},c_=k.createContext();class u_{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const l_=(e,t)=>{const n=k.useRef();return k.useEffect(()=>{n.current=e},[e,t]),n.current};function om(e,t,n,r){return e.getFixedT(t,n,r)}function d_(e,t,n,r){return k.useCallback(om(e,t,n,r),[e,t,n,r])}function et(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=t,{i18n:r,defaultNS:i}=k.useContext(c_)||{},s=n||r||o_();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new u_),!s){Ml("You will need to pass in an i18next instance by using initReactI18next");const E=(A,T)=>typeof T=="string"?T:T&&typeof T=="object"&&typeof T.defaultValue=="string"?T.defaultValue:Array.isArray(A)?A[A.length-1]:A,S=[E,{},!1];return S.t=E,S.i18n={},S.ready=!1,S}s.options.react&&s.options.react.wait!==void 0&&Ml("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...i_(),...s.options.react,...t},{useSuspense:c,keyPrefix:u}=o;let d=i||s.options&&s.options.defaultNS;d=typeof d=="string"?[d]:d||["translation"],s.reportNamespaces.addUsedNamespaces&&s.reportNamespaces.addUsedNamespaces(d);const f=(s.isInitialized||s.initializedStoreOnce)&&d.every(E=>Xx(E,s,o)),p=d_(s,t.lng||null,o.nsMode==="fallback"?d:d[0],u),l=()=>p,v=()=>om(s,t.lng||null,o.nsMode==="fallback"?d:d[0],u),[a,h]=k.useState(l);let y=d.join();t.lng&&(y=`${t.lng}${y}`);const g=l_(y),b=k.useRef(!0);k.useEffect(()=>{const{bindI18n:E,bindI18nStore:S}=o;b.current=!0,!f&&!c&&(t.lng?im(s,t.lng,d,()=>{b.current&&h(v)}):rm(s,d,()=>{b.current&&h(v)})),f&&g&&g!==y&&b.current&&h(v);function A(){b.current&&h(v)}return E&&s&&s.on(E,A),S&&s&&s.store.on(S,A),()=>{b.current=!1,E&&s&&E.split(" ").forEach(T=>s.off(T,A)),S&&s&&S.split(" ").forEach(T=>s.store.off(T,A))}},[s,y]),k.useEffect(()=>{b.current&&f&&h(l)},[s,u,f]);const w=[a,s,f];if(w.t=a,w.i18n=s,w.ready=f,f||!f&&!c)return w;throw new Promise(E=>{t.lng?im(s,t.lng,d,()=>E()):rm(s,d,()=>E())})}function Jr({value:e,start:t=0,duration:n=1e3,currency:r="EUR",asCurrency:i=!1}){const[s,o]=k.useState(t),c=()=>{const u=t>e?t-e:e-t;return u<=1e3?1:u/1e3};return k.useEffect(()=>{const u=setInterval(()=>{t>e?o(d=>Math.max(d-c(),e)):o(d=>Math.min(d+c(),e)),s===e&&clearInterval(u)},n/e);return()=>clearInterval(u)},[s,n,t,e]),m.jsx("div",{"data-testid":"animated-counter",children:i?Ji(s,r):s})}const f_=(e,t,n)=>{const r=e[t];return r?typeof r=="function"?r():Promise.resolve(r):new Promise((i,s)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(s.bind(null,new Error("Unknown variable dynamic import: "+t+(t.split("/").length!==n?". Note that variables only represent file names one level deep.":""))))})},h_=({svgComponent:e,...t})=>m.jsx(e,{...t});function am(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=am(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function p_(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=am(e))&&(r&&(r+=" "),r+=t);return r}const cm=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,um=p_,Zi=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return um(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=t,o=Object.keys(i).map(d=>{const f=n==null?void 0:n[d],p=s==null?void 0:s[d];if(f===null)return null;const l=cm(f)||cm(p);return i[d][l]}),c=n&&Object.entries(n).reduce((d,f)=>{let[p,l]=f;return l===void 0||(d[p]=l),d},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,f)=>{let{class:p,className:l,...v}=f;return Object.entries(v).every(a=>{let[h,y]=a;return Array.isArray(y)?y.includes({...s,...c}[h]):{...s,...c}[h]===y})?[...d,p,l]:d},[]);return um(e,o,u,n==null?void 0:n.class,n==null?void 0:n.className)},m_=Zi("aspect-square",{variants:{size:{"2xs":"h-3 w-3",xs:"h-4 w-4",sm:"h-5 w-5",md:"h-6 w-6",lg:"h-7 w-7",xl:"h-8 w-8","2xl":"h-10 w-10"},variant:{primary:"fill-none stroke-core-white-900 stroke-[1.5]",secondary:"fill-none stroke-core-gray-400 stroke-[1.5] active:stroke-core-gray-900 ",discovery:"fill-none stroke-core-primary-500 stroke-[1.5] ",destructive:"fill-none stroke-core-red-700 stroke-[1.5] ",placeholder:"fill-none stroke-core-gray-300 stroke-[1.5]"},outline:{true:[],false:[]}},compoundVariants:[{variant:"placeholder",outline:!1,class:"fill-core-gray-300 stroke-width-0"}],defaultVariants:{variant:"placeholder",size:"md"}}),en=({icon:e="user",size:t="md",variant:n="placeholder",outline:r=!0})=>{if(k.isValidElement(e))return"span";const i=g_(e);return i?m.jsx(h_,{svgComponent:i,className:m_({variant:n,size:t,outline:r})}):null};function g_(e){const[t,n]=k.useState(null),r=async()=>{try{const i=(await f_(Object.assign({"../../assets/svg/calendar.svg":()=>Promise.resolve().then(()=>d3),"../../assets/svg/camera-switch.svg":()=>Promise.resolve().then(()=>f3),"../../assets/svg/caret-left.svg":()=>Promise.resolve().then(()=>h3),"../../assets/svg/close.svg":()=>Promise.resolve().then(()=>p3),"../../assets/svg/crossBlack.svg":()=>Promise.resolve().then(()=>m3),"../../assets/svg/dollar.svg":()=>Promise.resolve().then(()=>g3),"../../assets/svg/edit.svg":()=>Promise.resolve().then(()=>y3),"../../assets/svg/home.svg":()=>Promise.resolve().then(()=>v3),"../../assets/svg/information.svg":()=>Promise.resolve().then(()=>b3),"../../assets/svg/mail.svg":()=>Promise.resolve().then(()=>w3),"../../assets/svg/settings.svg":()=>Promise.resolve().then(()=>E3),"../../assets/svg/shopping-bag.svg":()=>Promise.resolve().then(()=>S3),"../../assets/svg/star.svg":()=>Promise.resolve().then(()=>x3),"../../assets/svg/user.svg":()=>Promise.resolve().then(()=>_3)}),`../../assets/svg/${e}.svg`,5)).default;n(()=>i)}catch(i){console.error(`Failed to import icon: ${e}`,i),n(null)}};return k.useEffect(()=>{r()},[e]),t}const y_=Zi("bg-core-primary-500 text-core-white-900 relative inline-flex aspect-square shrink-0 items-center antialiased rounded-full overflow-hidden uppercase",{variants:{size:{xs:"h-6 w-6 text-xs ",sm:"h-8 w-8 text-sm",md:"h-10 w-10 text-base",lg:"h-12 w-12 text-lg",xl:"h-14 w-14 text-xl","2xl":"h-16 w-16 text-2xl"}},defaultVariants:{size:"sm"}}),v_=({src:e,alt:t})=>m.jsx("img",{src:e,alt:t,className:"bg-core-white-900 aspect-square w-full grow rounded-full object-cover object-center"}),b_=({initials:e})=>m.jsx("div",{className:"h-full w-full content-center text-center",children:e}),Pl=({src:e,alt:t,initials:n,size:r})=>m.jsxs("div",{className:y_({size:r}),children:[e&&m.jsx(v_,{src:e,alt:t}),e&&!n&&m.jsx("div",{className:"flex grow h-full w-full bg-core-gray-100 justify-center items-center",children:m.jsx(en,{icon:"user",variant:"placeholder",outline:!1,size:r})}),!e&&n&&m.jsx(b_,{initials:n}),!e&&!n&&m.jsx("div",{className:"flex grow h-full w-full bg-core-gray-100 justify-center items-center",children:m.jsx(en,{icon:"user",variant:"placeholder",outline:!1,size:r})})]});Pl.displayName="Avatar";const w_=Zi("inline-flex items-center rounded-lg px-2 py-1 antialiased",{variants:{color:{primary:"text-core-primary-700 outline-core-primary-200 bg-core-primary-50",gray:"text-core-gray-700 outline-core-gray-200 bg-core-gray-50"},size:{sm:"text-xs leading-4 ",md:"text-sm leading-5 "},stroke:{true:"outline outline-1",false:""}},defaultVariants:{color:"primary",size:"sm",stroke:!1}}),jl=({label:e,color:t="primary",size:n="sm",stroke:r=!1})=>m.jsx("span",{className:w_({color:t,size:n,stroke:r}),children:e});jl.displayName="Badge";function E_({body:e}){return m.jsxs("div",{className:"flex gap-3 rounded-r-lg border-l-2 border-core-primary-500 bg-core-gray-50 p-4 text-sm",children:[m.jsx(en,{icon:"information",variant:"discovery"}),m.jsx("div",{children:e})]})}var lm={exports:{}};/*!
80
+ */var hp;function BS(){return hp||(hp=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=k,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(w){{for(var E=arguments.length,S=new Array(E>1?E-1:0),A=1;A<E;A++)S[A-1]=arguments[A];r("error",w,S)}}function r(w,E,S){{var A=t.ReactDebugCurrentFrame,T=A.getStackAddendum();T!==""&&(E+="%s",S=S.concat([T]));var O=S.map(function(N){return String(N)});O.unshift("Warning: "+E),Function.prototype.apply.call(console[w],console,O)}}function i(w,E){return w===E&&(w!==0||1/w===1/E)||w!==w&&E!==E}var s=typeof Object.is=="function"?Object.is:i,o=e.useState,c=e.useEffect,u=e.useLayoutEffect,d=e.useDebugValue,f=!1,h=!1;function l(w,E,S){f||e.startTransition!==void 0&&(f=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var A=E();if(!h){var T=E();s(A,T)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),h=!0)}var O=o({inst:{value:A,getSnapshot:E}}),N=O[0].inst,D=O[1];return u(function(){N.value=A,N.getSnapshot=E,b(N)&&D({inst:N})},[w,A,E]),c(function(){b(N)&&D({inst:N});var U=function(){b(N)&&D({inst:N})};return w(U)},[w]),d(A),A}function b(w){var E=w.getSnapshot,S=w.value;try{var A=E();return!s(S,A)}catch{return!0}}function a(w,E,S){return E()}var p=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",y=!p,g=y?a:l,v=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:g;fl.useSyncExternalStore=v,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),fl}process.env.NODE_ENV==="production"?ll.exports=LS():ll.exports=BS();var FS=ll.exports;const Hr=()=>{},An=Hr(),hl=Object,at=e=>e===An,lr=e=>typeof e=="function",Yr=(e,t)=>({...e,...t}),US=e=>lr(e.then),Oa=new WeakMap;let VS=0;const zs=e=>{const t=typeof e,n=e&&e.constructor,r=n==Date;let i,s;if(hl(e)===e&&!r&&n!=RegExp){if(i=Oa.get(e),i)return i;if(i=++VS+"~",Oa.set(e,i),n==Array){for(i="@",s=0;s<e.length;s++)i+=zs(e[s])+",";Oa.set(e,i)}if(n==hl){i="#";const o=hl.keys(e).sort();for(;!at(s=o.pop());)at(e[s])||(i+=s+":"+zs(e[s])+",");Oa.set(e,i)}}else i=r?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return i},Sr=new WeakMap,pl={},Ra={},ml="undefined",Na=typeof window!=ml,gl=typeof document!=ml,qS=()=>Na&&typeof window.requestAnimationFrame!=ml,pp=(e,t)=>{const n=Sr.get(e);return[()=>!at(t)&&e.get(t)||pl,r=>{if(!at(t)){const i=e.get(t);t in Ra||(Ra[t]=i),n[5](t,Yr(i,r),i||pl)}},n[6],()=>!at(t)&&t in Ra?Ra[t]:!at(t)&&e.get(t)||pl]};let yl=!0;const $S=()=>yl,[vl,bl]=Na&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Hr,Hr],GS=()=>{const e=gl&&document.visibilityState;return at(e)||e!=="hidden"},HS=e=>(gl&&document.addEventListener("visibilitychange",e),vl("focus",e),()=>{gl&&document.removeEventListener("visibilitychange",e),bl("focus",e)}),YS=e=>{const t=()=>{yl=!0,e()},n=()=>{yl=!1};return vl("online",t),vl("offline",n),()=>{bl("online",t),bl("offline",n)}},WS={isOnline:$S,isVisible:GS},KS={initFocus:HS,initReconnect:YS},mp=!k.useId,Qs=!Na||"Deno"in window,zS=e=>qS()?window.requestAnimationFrame(e):setTimeout(e,1),wl=Qs?k.useEffect:k.useLayoutEffect,El=typeof navigator<"u"&&navigator.connection,gp=!Qs&&El&&(["slow-2g","2g"].includes(El.effectiveType)||El.saveData),Sl=e=>{if(lr(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?zs(e):"",[e,t]};let QS=0;const xl=()=>++QS,yp=0,vp=1,bp=2;var Js={__proto__:null,ERROR_REVALIDATE_EVENT:3,FOCUS_EVENT:yp,MUTATE_EVENT:bp,RECONNECT_EVENT:vp};async function wp(...e){const[t,n,r,i]=e,s=Yr({populateCache:!0,throwOnError:!0},typeof i=="boolean"?{revalidate:i}:i||{});let o=s.populateCache;const c=s.rollbackOnError;let u=s.optimisticData;const d=l=>typeof c=="function"?c(l):c!==!1,f=s.throwOnError;if(lr(n)){const l=n,b=[],a=t.keys();for(const p of a)!/^\$(inf|sub)\$/.test(p)&&l(t.get(p)._k)&&b.push(p);return Promise.all(b.map(h))}return h(n);async function h(l){const[b]=Sl(l);if(!b)return;const[a,p]=pp(t,b),[y,g,v,w]=Sr.get(t),E=()=>{const F=y[b];return(lr(s.revalidate)?s.revalidate(a().data,l):s.revalidate!==!1)&&(delete v[b],delete w[b],F&&F[0])?F[0](bp).then(()=>a().data):a().data};if(e.length<3)return E();let S=r,A;const T=xl();g[b]=[T,0];const O=!at(u),N=a(),D=N.data,U=N._c,V=at(U)?D:U;if(O&&(u=lr(u)?u(V,D):u,p({data:u,_c:V})),lr(S))try{S=S(V)}catch(F){A=F}if(S&&US(S))if(S=await S.catch(F=>{A=F}),T!==g[b][0]){if(A)throw A;return S}else A&&O&&d(A)&&(o=!0,p({data:V,_c:An}));if(o&&!A)if(lr(o)){const F=o(S,V);p({data:F,error:An,_c:An})}else p({data:S,error:An,_c:An});if(g[b][1]=xl(),Promise.resolve(E()).then(()=>{p({_c:An})}),A){if(f)throw A;return}return S}}const Ep=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},JS=(e,t)=>{if(!Sr.has(e)){const n=Yr(KS,t),r={},i=wp.bind(An,e);let s=Hr;const o={},c=(f,h)=>{const l=o[f]||[];return o[f]=l,l.push(h),()=>l.splice(l.indexOf(h),1)},u=(f,h,l)=>{e.set(f,h);const b=o[f];if(b)for(const a of b)a(h,l)},d=()=>{if(!Sr.has(e)&&(Sr.set(e,[r,{},{},{},i,u,c]),!Qs)){const f=n.initFocus(setTimeout.bind(An,Ep.bind(An,r,yp))),h=n.initReconnect(setTimeout.bind(An,Ep.bind(An,r,vp)));s=()=>{f&&f(),h&&h(),Sr.delete(e)}}};return d(),[e,i,d,s]}return[e,Sr.get(e)[4]]},ZS=(e,t,n,r,i)=>{const s=n.errorRetryCount,o=i.retryCount,c=~~((Math.random()+.5)*(1<<(o<8?o:8)))*n.errorRetryInterval;!at(s)&&o>s||setTimeout(r,c,i)},XS=(e,t)=>zs(e)==zs(t),[Sp,ex]=JS(new Map),tx=Yr({onLoadingSlow:Hr,onSuccess:Hr,onError:Hr,onErrorRetry:ZS,onDiscarded:Hr,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:gp?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:gp?5e3:3e3,compare:XS,isPaused:()=>!1,cache:Sp,mutate:ex,fallback:{}},WS),nx=(e,t)=>{const n=Yr(e,t);if(t){const{use:r,fallback:i}=e,{use:s,fallback:o}=t;r&&s&&(n.use=r.concat(s)),i&&o&&(n.fallback=Yr(i,o))}return n},rx=k.createContext({}),ix="$inf$",xp=Na&&window.__SWR_DEVTOOLS_USE__,sx=xp?window.__SWR_DEVTOOLS_USE__:[],ox=()=>{xp&&(window.__SWR_DEVTOOLS_REACT__=k)},ax=e=>lr(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],cx=()=>Yr(tx,k.useContext(rx)),ux=e=>(t,n,r)=>e(t,n&&((...s)=>{const[o]=Sl(t),[,,,c]=Sr.get(Sp);if(o.startsWith(ix))return n(...s);const u=c[o];return at(u)?n(...s):(delete c[o],u)}),r),lx=sx.concat(ux),dx=e=>function(...n){const r=cx(),[i,s,o]=ax(n),c=nx(r,o);let u=e;const{use:d}=c,f=(d||[]).concat(lx);for(let h=f.length;h--;)u=f[h](u);return u(i,s||c.fetcher||null,c)},fx=(e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const i=r.indexOf(n);i>=0&&(r[i]=r[r.length-1],r.pop())}};ox();const _p=k.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)}),_l={dedupe:!0},hx=dx((e,t,n)=>{const{cache:r,compare:i,suspense:s,fallbackData:o,revalidateOnMount:c,revalidateIfStale:u,refreshInterval:d,refreshWhenHidden:f,refreshWhenOffline:h,keepPreviousData:l}=n,[b,a,p,y]=Sr.get(r),[g,v]=Sl(e),w=k.useRef(!1),E=k.useRef(!1),S=k.useRef(g),A=k.useRef(t),T=k.useRef(n),O=()=>T.current,N=()=>O().isVisible()&&O().isOnline(),[D,U,V,F]=pp(r,g),q=k.useRef({}).current,R=at(o)?n.fallback[g]:o,L=(M,ee)=>{for(const J in q){const Q=J;if(Q==="data"){if(!i(M[Q],ee[Q])&&(!at(M[Q])||!i(de,ee[Q])))return!1}else if(ee[Q]!==M[Q])return!1}return!0},W=k.useMemo(()=>{const M=!g||!t?!1:at(c)?O().isPaused()||s?!1:at(u)?!0:u:c,ee=le=>{const ie=Yr(le);return delete ie._k,M?{isValidating:!0,isLoading:!0,...ie}:ie},J=D(),Q=F(),Y=ee(J),pe=J===Q?Y:ee(Q);let ge=Y;return[()=>{const le=ee(D());return L(le,ge)?(ge.data=le.data,ge.isLoading=le.isLoading,ge.isValidating=le.isValidating,ge.error=le.error,ge):(ge=le,le)},()=>pe]},[r,g]),z=FS.useSyncExternalStore(k.useCallback(M=>V(g,(ee,J)=>{L(J,ee)||M()}),[r,g]),W[0],W[1]),Z=!w.current,te=b[g]&&b[g].length>0,re=z.data,he=at(re)?R:re,ue=z.error,ye=k.useRef(he),de=l?at(re)?ye.current:re:he,$=te&&!at(ue)?!1:Z&&!at(c)?c:O().isPaused()?!1:s?at(he)?!1:u:at(he)||u,H=!!(g&&t&&Z&&$),X=at(z.isValidating)?H:z.isValidating,C=at(z.isLoading)?H:z.isLoading,j=k.useCallback(async M=>{const ee=A.current;if(!g||!ee||E.current||O().isPaused())return!1;let J,Q,Y=!0;const pe=M||{},ge=!p[g]||!pe.dedupe,le=()=>mp?!E.current&&g===S.current&&w.current:g===S.current,ie={isValidating:!1,isLoading:!1},be=()=>{U(ie)},ae=()=>{const _e=p[g];_e&&_e[1]===Q&&delete p[g]},Ce={isValidating:!0};at(D().data)&&(Ce.isLoading=!0);try{if(ge&&(U(Ce),n.loadingTimeout&&at(D().data)&&setTimeout(()=>{Y&&le()&&O().onLoadingSlow(g,n)},n.loadingTimeout),p[g]=[ee(v),xl()]),[J,Q]=p[g],J=await J,ge&&setTimeout(ae,n.dedupingInterval),!p[g]||p[g][1]!==Q)return ge&&le()&&O().onDiscarded(g),!1;ie.error=An;const _e=a[g];if(!at(_e)&&(Q<=_e[0]||Q<=_e[1]||_e[1]===0))return be(),ge&&le()&&O().onDiscarded(g),!1;const Ye=D().data;ie.data=i(Ye,J)?Ye:J,ge&&le()&&O().onSuccess(J,g,n)}catch(_e){ae();const Ye=O(),{shouldRetryOnError:rt}=Ye;Ye.isPaused()||(ie.error=_e,ge&&le()&&(Ye.onError(_e,g,Ye),(rt===!0||lr(rt)&&rt(_e))&&(!O().revalidateOnFocus||!O().revalidateOnReconnect||N())&&Ye.onErrorRetry(_e,g,Ye,yt=>{const pt=b[g];pt&&pt[0]&&pt[0](Js.ERROR_REVALIDATE_EVENT,yt)},{retryCount:(pe.retryCount||0)+1,dedupe:!0})))}return Y=!1,be(),!0},[g,r]),B=k.useCallback((...M)=>wp(r,S.current,...M),[]);if(wl(()=>{A.current=t,T.current=n,at(re)||(ye.current=re)}),wl(()=>{if(!g)return;const M=j.bind(An,_l);let ee=0;const Q=fx(g,b,(Y,pe={})=>{if(Y==Js.FOCUS_EVENT){const ge=Date.now();O().revalidateOnFocus&&ge>ee&&N()&&(ee=ge+O().focusThrottleInterval,M())}else if(Y==Js.RECONNECT_EVENT)O().revalidateOnReconnect&&N()&&M();else{if(Y==Js.MUTATE_EVENT)return j();if(Y==Js.ERROR_REVALIDATE_EVENT)return j(pe)}});return E.current=!1,S.current=g,w.current=!0,U({_k:v}),$&&(at(he)||Qs?M():zS(M)),()=>{E.current=!0,Q()}},[g]),wl(()=>{let M;function ee(){const Q=lr(d)?d(D().data):d;Q&&M!==-1&&(M=setTimeout(J,Q))}function J(){!D().error&&(f||O().isVisible())&&(h||O().isOnline())?j(_l).then(ee):ee()}return ee(),()=>{M&&(clearTimeout(M),M=-1)}},[d,f,h,g]),k.useDebugValue(de),s&&at(he)&&g){if(!mp&&Qs)throw new Error("Fallback data is required when using suspense in SSR.");A.current=t,T.current=n,E.current=!1;const M=y[g];if(!at(M)){const ee=B(M);_p(ee)}if(at(ue)){const ee=j(_l);at(de)||(ee.status="fulfilled",ee.value=!0),_p(ee)}else throw ue}return{mutate:B,get data(){return q.data=!0,de},get error(){return q.error=!0,ue},get isValidating(){return q.isValidating=!0,X},get isLoading(){return q.isLoading=!0,C}}});function Hi(){const e=(s,o={},c={})=>i("GET",s,o,c),t=(s,o={},c={})=>i("POST",s,o,c),n=(s,o={},c={})=>i("PUT",s,o,c),r=s=>i("DELETE",s),i=(s,o,c={},u={})=>{const d=sessionStorage.getItem("apiHost"),f=d?JSON.parse(d):"https://api.piggy.eu",h=Dt.create({baseURL:`${f}/api/v1/portal-sessions`,headers:{Authorization:`Bearer ${localStorage.getItem("apiKey")}`},...u});return h.interceptors.response.use(void 0,dp),h.request({method:s,url:o,params:s=="GET"?c:{},data:c})};return{get:e,post:t,put:n,destroy:r}}const $n=e=>{const t=Hi(),n=u=>t.get(u,e.params),{data:r,error:i,isLoading:s,isValidating:o,mutate:c}=hx(e.url,n,{shouldRetryOnError:!1,revalidateIfStale:!1});return k.useEffect(()=>{r&&e.onData&&e.onData(r==null?void 0:r.data.data,r==null?void 0:r.data.meta)},[r]),{data:r,pending:o,error:i,isLoading:s,isValidating:o,mutate:c}},Wt=(e="")=>`/api/v1/portal-sessions/${localStorage.getItem("portal_session_uuid")}/${e}`,Cp="contact-attributes",Ap={get:()=>_t.instance.get(Wt(Cp)),update:e=>_t.instance.put(Wt(Cp),e)},Tp="contact-identifiers",px={create:e=>_t.instance.post(Wt(Tp),e),clear:e=>_t.instance.delete(Wt(Tp),{params:e})},Ma="contacts",Zs={get:(e,t)=>_t.instance.get(Wt(Ma),{params:{contact_uuid:e,email:t}}),exists:e=>_t.instance.get(`${Wt(Ma)}/exists`,{params:{email:e}}),create:e=>_t.instance.post(`${Wt(Ma)}`,{email:e}),linkIdentifier:(e,t)=>_t.instance.post(`${Wt(Ma)}/link-identifier`,{contact_identifier_value:e,email:t})},mx="credit-receptions",gx={create:e=>_t.instance.post(`${Wt(mx)}/create`,e)},Ip="giftcards",Cl={get:e=>_t.instance.get(`${Wt(Ip)}/${e}`),transaction:(e,t)=>_t.instance.post(`${Wt(Ip)}/transaction`,{uuid:e,amount_in_cents:t})};var kp=(e=>(e[e.CREDIT_RECEPTION=1]="CREDIT_RECEPTION",e[e.PHYSICAL_REWARD_RECEPTION=2]="PHYSICAL_REWARD_RECEPTION",e[e.DIGITAL_REWARD_RECEPTION=3]="DIGITAL_REWARD_RECEPTION",e))(kp||{});const Op="/api/v1/portal-sessions/",Al={create:e=>_t.instance.post(Op,e),setContact:(e,t)=>_t.instance.put(Op+e,t),checkCode:e=>_t.instance.get(Wt(`check-code/${e}`))};var Xs=(e=>(e.IDENTIFIER="identifier",e.EMAIL="email",e))(Xs||{});const yx="prepaid",Rp={transaction:e=>_t.instance.post(`${Wt(yx)}/transaction`,e)},Np="rewards",vx={get:e=>_t.instance.get(`${Wt(Np)}/${e}`),claim:e=>_t.instance.post(`${Wt(Np)}/claim/`,{uuid:e})},Mp="subscriptions",Tl={get:()=>_t.instance.get(Wt(Mp)),update:e=>_t.instance.put(Wt(Mp),e)};var Dp=(e=>(e.SUBSCRIBED="SUBSCRIBED",e.UNSUBSCRIBED="UNSUBSCRIBED",e.PENDING_CONFIRMATION="PENDING_CONFIRMATION",e))(Dp||{}),Wr=(e=>(e.OPT_OUT="OPT_OUT",e.OPT_IN="OPT_IN",e.DOUBLE_OPT_IN="DOUBLE_OPT_IN",e.FUNCTIONAL="FUNCTIONAL",e))(Wr||{});const Il="vouchers",Pp={get:e=>_t.instance.get(`${Wt(Il)}/${e}`),redeemById:e=>_t.instance.post(`${Wt(Il)}/redeem/${e}`),redeemByCode:e=>_t.instance.post(`${Wt(Il)}/redeem`,{code:e})};var Yi=(e=>(e.INACTIVE="INACTIVE",e.ACTIVE="ACTIVE",e.EXPIRED="EXPIRED",e.LOCKED="LOCKED",e.REDEEMED="REDEEMED",e.DEACTIVATED="DEACTIVATED",e))(Yi||{}),lt=(e=>(e.GENERIC="GENERIC",e.GIFTCARD="GIFTCARD",e.REDEEM_GIFTCARD="REDEEM_GIFTCARD",e.TOP_UP_GIFTCARD="TOP_UP_GIFTCARD",e.PORTAL="PORTAL",e.PAY_PREPAID="PAY_PREPAID",e.TOP_UP_PREPAID="TOP_UP_PREPAID",e.POINTS_TRANSACTION="POINTS_TRANSACTION",e.VOUCHER="VOUCHER",e))(lt||{}),dt=(e=>(e.GENERIC="/generic",e.GIFTCARD="/giftcard",e.PORTAL="/portal",e.PAY_PREPAID="/pay-prepaid",e.TOP_UP_PREPAID="/top-up-prepaid",e.POINTS_TRANSACTION="/points-transaction",e.VOUCHER="/voucher",e))(dt||{}),Kr=(e=>(e.GIFTCARD_TRANSACTION="giftcard_transaction",e.VOUCHER_REDEEMED="voucher_redeemed",e.REWARD_RECEPTION="reward_reception",e.PREPAID_TRANSACTION="prepaid_transaction",e))(Kr||{}),Da=(e=>(e[e.INPUT_INVALID=1003]="INPUT_INVALID",e[e.CONTACT_NOT_FOUND=55031]="CONTACT_NOT_FOUND",e))(Da||{}),Wi=(e=>(e.USER="user",e.ENVIRONMENT="environment",e))(Wi||{});const bx={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class Pa{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||bx,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,i){return i&&!this.debug?null:(typeof t[0]=="string"&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new Pa(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Pa(this.logger,t)}}var dr=new Pa;class ja{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(o=>{let[c,u]=o;for(let d=0;d<u;d++)c(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(o=>{let[c,u]=o;for(let d=0;d<u;d++)c.apply(c,[t,...r])})}}function eo(){let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n}function jp(e){return e==null?"":""+e}function wx(e,t,n){e.forEach(r=>{t[r]&&(n[r]=t[r])})}const Ex=/###/g;function to(e,t,n){function r(c){return c&&c.indexOf("###")>-1?c.replace(Ex,"."):c}function i(){return!e||typeof e=="string"}const s=typeof t!="string"?t:t.split(".");let o=0;for(;o<s.length-1;){if(i())return{};const c=r(s[o]);!e[c]&&n&&(e[c]=new n),Object.prototype.hasOwnProperty.call(e,c)?e=e[c]:e={},++o}return i()?{}:{obj:e,k:r(s[o])}}function Lp(e,t,n){const{obj:r,k:i}=to(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let s=t[t.length-1],o=t.slice(0,t.length-1),c=to(e,o,Object);for(;c.obj===void 0&&o.length;)s=`${o[o.length-1]}.${s}`,o=o.slice(0,o.length-1),c=to(e,o,Object),c&&c.obj&&typeof c.obj[`${c.k}.${s}`]<"u"&&(c.obj=void 0);c.obj[`${c.k}.${s}`]=n}function Sx(e,t,n,r){const{obj:i,k:s}=to(e,t,Object);i[s]=i[s]||[],i[s].push(n)}function La(e,t){const{obj:n,k:r}=to(e,t);if(n)return n[r]}function xx(e,t,n){const r=La(e,n);return r!==void 0?r:La(t,n)}function Bp(e,t,n){for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):Bp(e[r],t[r],n):e[r]=t[r]);return e}function Ki(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var _x={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function Cx(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>_x[t]):e}class Ax{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const Tx=[" ",",","?","!",";"],Ix=new Ax(20);function kx(e,t,n){t=t||"",n=n||"";const r=Tx.filter(o=>t.indexOf(o)<0&&n.indexOf(o)<0);if(r.length===0)return!0;const i=Ix.getRegExp(`(${r.map(o=>o==="?"?"\\?":o).join("|")})`);let s=!i.test(e);if(!s){const o=e.indexOf(n);o>0&&!i.test(e.substring(0,o))&&(s=!0)}return s}function kl(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let i=e;for(let s=0;s<r.length;){if(!i||typeof i!="object")return;let o,c="";for(let u=s;u<r.length;++u)if(u!==s&&(c+=n),c+=r[u],o=i[c],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&u<r.length-1)continue;s+=u-s+1;break}i=o}return i}function Ba(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}class Fp extends ja{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let c;t.indexOf(".")>-1?c=t.split("."):(c=[t,n],r&&(Array.isArray(r)?c.push(...r):typeof r=="string"&&s?c.push(...r.split(s)):c.push(r)));const u=La(this.data,c);return!u&&!n&&!r&&t.indexOf(".")>-1&&(t=c[0],n=c[1],r=c.slice(2).join(".")),u||!o||typeof r!="string"?u:kl(this.data&&this.data[t]&&this.data[t][n],r,s)}addResource(t,n,r,i){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let c=[t,n];r&&(c=c.concat(o?r.split(o):r)),t.indexOf(".")>-1&&(c=t.split("."),i=n,n=c[1]),this.addNamespaces(n),Lp(this.data,c,i),s.silent||this.emit("added",t,n,r,i)}addResources(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const s in r)(typeof r[s]=="string"||Array.isArray(r[s]))&&this.addResource(t,n,s,r[s],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},c=[t,n];t.indexOf(".")>-1&&(c=t.split("."),i=r,r=n,n=c[1]),this.addNamespaces(n);let u=La(this.data,c)||{};o.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?Bp(u,r,s):u={...u,...r},Lp(this.data,c,u),o.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var Up={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(s=>{this.processors[s]&&(t=this.processors[s].process(t,n,r,i))}),t}};const Vp={};class Fa extends ja{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),wx(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=dr.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let s=n.ns||this.options.defaultNS||[];const o=r&&t.indexOf(r)>-1,c=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!kx(t,r,i);if(o&&!c){const u=t.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:t,namespaces:s};const d=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(d[0])>-1)&&(s=d.shift()),t=d.join(i)}return typeof s=="string"&&(s=[s]),{key:t,namespaces:s}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:o,namespaces:c}=this.extractFromKey(t[t.length-1],n),u=c[c.length-1],d=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&d.toLowerCase()==="cimode"){if(f){const E=n.nsSeparator||this.options.nsSeparator;return i?{res:`${u}${E}${o}`,usedKey:o,exactUsedKey:o,usedLng:d,usedNS:u,usedParams:this.getUsedParamsDetails(n)}:`${u}${E}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:d,usedNS:u,usedParams:this.getUsedParamsDetails(n)}:o}const h=this.resolve(t,n);let l=h&&h.res;const b=h&&h.usedKey||o,a=h&&h.exactUsedKey||o,p=Object.prototype.toString.apply(l),y=["[object Number]","[object Function]","[object RegExp]"],g=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject;if(v&&l&&(typeof l!="string"&&typeof l!="boolean"&&typeof l!="number")&&y.indexOf(p)<0&&!(typeof g=="string"&&Array.isArray(l))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const E=this.options.returnedObjectHandler?this.options.returnedObjectHandler(b,l,{...n,ns:c}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(h.res=E,h.usedParams=this.getUsedParamsDetails(n),h):E}if(s){const E=Array.isArray(l),S=E?[]:{},A=E?a:b;for(const T in l)if(Object.prototype.hasOwnProperty.call(l,T)){const O=`${A}${s}${T}`;S[T]=this.translate(O,{...n,joinArrays:!1,ns:c}),S[T]===O&&(S[T]=l[T])}l=S}}else if(v&&typeof g=="string"&&Array.isArray(l))l=l.join(g),l&&(l=this.extendTranslation(l,t,n,r));else{let E=!1,S=!1;const A=n.count!==void 0&&typeof n.count!="string",T=Fa.hasDefaultValue(n),O=A?this.pluralResolver.getSuffix(d,n.count,n):"",N=n.ordinal&&A?this.pluralResolver.getSuffix(d,n.count,{ordinal:!1}):"",D=A&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),U=D&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${O}`]||n[`defaultValue${N}`]||n.defaultValue;!this.isValidLookup(l)&&T&&(E=!0,l=U),this.isValidLookup(l)||(S=!0,l=o);const F=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&S?void 0:l,q=T&&U!==l&&this.options.updateMissing;if(S||E||q){if(this.logger.log(q?"updateKey":"missingKey",d,u,o,q?U:l),s){const z=this.resolve(o,{...n,keySeparator:!1});z&&z.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let R=[];const L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&L&&L[0])for(let z=0;z<L.length;z++)R.push(L[z]);else this.options.saveMissingTo==="all"?R=this.languageUtils.toResolveHierarchy(n.lng||this.language):R.push(n.lng||this.language);const W=(z,Z,te)=>{const re=T&&te!==l?te:F;this.options.missingKeyHandler?this.options.missingKeyHandler(z,u,Z,re,q,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(z,u,Z,re,q,n),this.emit("missingKey",z,u,Z,l)};this.options.saveMissing&&(this.options.saveMissingPlurals&&A?R.forEach(z=>{const Z=this.pluralResolver.getSuffixes(z,n);D&&n[`defaultValue${this.options.pluralSeparator}zero`]&&Z.indexOf(`${this.options.pluralSeparator}zero`)<0&&Z.push(`${this.options.pluralSeparator}zero`),Z.forEach(te=>{W([z],o+te,n[`defaultValue${te}`]||U)})}):W(R,o,U))}l=this.extendTranslation(l,t,n,h,r),S&&l===o&&this.options.appendNamespaceToMissingKey&&(l=`${u}:${o}`),(S||E)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?l=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}:${o}`:o,E?l:void 0):l=this.options.parseMissingKeyHandler(l))}return i?(h.res=l,h.usedParams=this.getUsedParamsDetails(n),h):l}extendTranslation(t,n,r,i,s){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const d=typeof t=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(d){const l=t.match(this.interpolator.nestingRegexp);f=l&&l.length}let h=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),t=this.interpolator.interpolate(t,h,r.lng||this.language,r),d){const l=t.match(this.interpolator.nestingRegexp),b=l&&l.length;f<b&&(r.nest=!1)}!r.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(r.lng=i.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var l=arguments.length,b=new Array(l),a=0;a<l;a++)b[a]=arguments[a];return s&&s[0]===b[0]&&!r.context?(o.logger.warn(`It seems you are nesting recursively key: ${b[0]} in key: ${n[0]}`),null):o.translate(...b,n)},r)),r.interpolation&&this.interpolator.reset()}const c=r.postProcess||this.options.postProcess,u=typeof c=="string"?[c]:c;return t!=null&&u&&u.length&&r.applyPostProcessor!==!1&&(t=Up.handle(u,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,i,s,o,c;return typeof t=="string"&&(t=[t]),t.forEach(u=>{if(this.isValidLookup(r))return;const d=this.extractFromKey(u,n),f=d.key;i=f;let h=d.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const l=n.count!==void 0&&typeof n.count!="string",b=l&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),a=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",p=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);h.forEach(y=>{this.isValidLookup(r)||(c=y,!Vp[`${p[0]}-${y}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(c)&&(Vp[`${p[0]}-${y}`]=!0,this.logger.warn(`key "${i}" for languages "${p.join(", ")}" won't get resolved as namespace "${c}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach(g=>{if(this.isValidLookup(r))return;o=g;const v=[f];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(v,f,g,y,n);else{let E;l&&(E=this.pluralResolver.getSuffix(g,n.count,n));const S=`${this.options.pluralSeparator}zero`,A=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(l&&(v.push(f+E),n.ordinal&&E.indexOf(A)===0&&v.push(f+E.replace(A,this.options.pluralSeparator)),b&&v.push(f+S)),a){const T=`${f}${this.options.contextSeparator}${n.context}`;v.push(T),l&&(v.push(T+E),n.ordinal&&E.indexOf(A)===0&&v.push(T+E.replace(A,this.options.pluralSeparator)),b&&v.push(T+S))}}let w;for(;w=v.pop();)this.isValidLookup(r)||(s=w,r=this.getResource(g,y,w,n))}))})}),{res:r,usedKey:i,exactUsedKey:s,usedLng:o,usedNS:c}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&typeof t.replace!="string";let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const s of n)delete i[s]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}function Ol(e){return e.charAt(0).toUpperCase()+e.slice(1)}class qp{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=dr.create("languageUtils")}getScriptPartFromCode(t){if(t=Ba(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Ba(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(i=>i.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Ol(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Ol(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=Ol(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(s=>{if(s===i)return s;if(!(s.indexOf("-")<0&&i.indexOf("-")<0)&&(s.indexOf("-")>0&&i.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===i||s.indexOf(i)===0&&i.length>1))return s})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),i=[],s=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(t))):typeof t=="string"&&s(this.formatLanguageCode(t)),r.forEach(o=>{i.indexOf(o)<0&&s(this.formatLanguageCode(o))}),i}}let Ox=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Rx={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}};const Nx=["v1","v2","v3"],Mx=["v4"],$p={zero:0,one:1,two:2,few:3,many:4,other:5};function Dx(){const e={};return Ox.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:Rx[t.fc]}})}),e}class Px{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=dr.create("pluralResolver"),(!this.options.compatibilityJSON||Mx.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Dx()}addRule(t,n){this.rules[t]=n}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(Ba(t==="dev"?"en":t),{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((i,s)=>$p[i]-$p[s]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):r.numbers.map(i=>this.getSuffix(t,i,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,r);return i?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:this.getSuffixRetroCompatible(i,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let i=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const s=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?s():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!Nx.includes(this.options.compatibilityJSON)}}function Gp(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=xx(e,t,n);return!s&&i&&typeof n=="string"&&(s=kl(e,n,r),s===void 0&&(s=kl(t,n,r))),s}class jx{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=dr.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:i,prefix:s,prefixEscaped:o,suffix:c,suffixEscaped:u,formatSeparator:d,unescapeSuffix:f,unescapePrefix:h,nestingPrefix:l,nestingPrefixEscaped:b,nestingSuffix:a,nestingSuffixEscaped:p,nestingOptionsSeparator:y,maxReplaces:g,alwaysFormat:v}=t.interpolation;this.escape=n!==void 0?n:Cx,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=s?Ki(s):o||"{{",this.suffix=c?Ki(c):u||"}}",this.formatSeparator=d||",",this.unescapePrefix=f?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=l?Ki(l):b||Ki("$t("),this.nestingSuffix=a?Ki(a):p||Ki(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=g||1e3,this.alwaysFormat=v!==void 0?v:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,i){let s,o,c;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function d(a){return a.replace(/\$/g,"$$$$")}const f=a=>{if(a.indexOf(this.formatSeparator)<0){const v=Gp(n,u,a,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(v,void 0,r,{...i,...n,interpolationkey:a}):v}const p=a.split(this.formatSeparator),y=p.shift().trim(),g=p.join(this.formatSeparator).trim();return this.format(Gp(n,u,y,this.options.keySeparator,this.options.ignoreJSONStructure),g,r,{...i,...n,interpolationkey:y})};this.resetRegExp();const h=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,l=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:a=>d(a)},{regex:this.regexp,safeValue:a=>this.escapeValue?d(this.escape(a)):d(a)}].forEach(a=>{for(c=0;s=a.regex.exec(t);){const p=s[1].trim();if(o=f(p),o===void 0)if(typeof h=="function"){const g=h(t,s,i);o=typeof g=="string"?g:""}else if(i&&Object.prototype.hasOwnProperty.call(i,p))o="";else if(l){o=s[0];continue}else this.logger.warn(`missed to pass in variable ${p} for interpolating ${t}`),o="";else typeof o!="string"&&!this.useRawValueToEscape&&(o=jp(o));const y=a.safeValue(o);if(t=t.replace(s[0],y),l?(a.regex.lastIndex+=o.length,a.regex.lastIndex-=s[0].length):a.regex.lastIndex=0,c++,c>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,s,o;function c(u,d){const f=this.nestingOptionsSeparator;if(u.indexOf(f)<0)return u;const h=u.split(new RegExp(`${f}[ ]*{`));let l=`{${h[1]}`;u=h[0],l=this.interpolate(l,o);const b=l.match(/'/g),a=l.match(/"/g);(b&&b.length%2===0&&!a||a.length%2!==0)&&(l=l.replace(/'/g,'"'));try{o=JSON.parse(l),d&&(o={...d,...o})}catch(p){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,p),`${u}${f}${l}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,u}for(;i=this.nestingRegexp.exec(t);){let u=[];o={...r},o=o.replace&&typeof o.replace!="string"?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let d=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const f=i[1].split(this.formatSeparator).map(h=>h.trim());i[1]=f.shift(),u=f,d=!0}if(s=n(c.call(this,i[1].trim(),o),o),s&&i[0]===t&&typeof s!="string")return s;typeof s!="string"&&(s=jp(s)),s||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),s=""),d&&(s=u.reduce((f,h)=>this.format(f,h,r.lng,{...r,interpolationkey:i[1].trim()}),s.trim())),t=t.replace(i[0],s),this.regexp.lastIndex=0}return t}}function Lx(e){let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(o=>{if(o){const[c,...u]=o.split(":"),d=u.join(":").trim().replace(/^'+|'+$/g,""),f=c.trim();n[f]||(n[f]=d),d==="false"&&(n[f]=!1),d==="true"&&(n[f]=!0),isNaN(d)||(n[f]=parseInt(d,10))}})}return{formatName:t,formatOptions:n}}function zi(e){const t={};return function(r,i,s){const o=i+JSON.stringify(s);let c=t[o];return c||(c=e(Ba(i),s),t[o]=c),c(r)}}class Bx{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=dr.create("formatter"),this.options=t,this.formats={number:zi((n,r)=>{const i=new Intl.NumberFormat(n,{...r});return s=>i.format(s)}),currency:zi((n,r)=>{const i=new Intl.NumberFormat(n,{...r,style:"currency"});return s=>i.format(s)}),datetime:zi((n,r)=>{const i=new Intl.DateTimeFormat(n,{...r});return s=>i.format(s)}),relativetime:zi((n,r)=>{const i=new Intl.RelativeTimeFormat(n,{...r});return s=>i.format(s,r.range||"day")}),list:zi((n,r)=>{const i=new Intl.ListFormat(n,{...r});return s=>i.format(s)})},this.init(t)}init(t){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=zi(n)}format(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((c,u)=>{const{formatName:d,formatOptions:f}=Lx(u);if(this.formats[d]){let h=c;try{const l=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},b=l.locale||l.lng||i.locale||i.lng||r;h=this.formats[d](c,b,{...f,...i,...l})}catch(l){this.logger.warn(l)}return h}else this.logger.warn(`there was no format function for ${d}`);return c},t)}}function Fx(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}class Ux extends ja{constructor(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=dr.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,i.backend,i)}queueLoad(t,n,r,i){const s={},o={},c={},u={};return t.forEach(d=>{let f=!0;n.forEach(h=>{const l=`${d}|${h}`;!r.reload&&this.store.hasResourceBundle(d,h)?this.state[l]=2:this.state[l]<0||(this.state[l]===1?o[l]===void 0&&(o[l]=!0):(this.state[l]=1,f=!1,o[l]===void 0&&(o[l]=!0),s[l]===void 0&&(s[l]=!0),u[h]===void 0&&(u[h]=!0)))}),f||(c[d]=!0)}),(Object.keys(s).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(s),pending:Object.keys(o),toLoadLanguages:Object.keys(c),toLoadNamespaces:Object.keys(u)}}loaded(t,n,r){const i=t.split("|"),s=i[0],o=i[1];n&&this.emit("failedLoading",s,o,n),r&&this.store.addResourceBundle(s,o,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2;const c={};this.queue.forEach(u=>{Sx(u.loaded,[s],o),Fx(u,t),n&&u.errors.push(n),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(d=>{c[d]||(c[d]={});const f=u.loaded[d];f.length&&f.forEach(h=>{c[d][h]===void 0&&(c[d][h]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",c),this.queue=this.queue.filter(u=>!u.done)}read(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:s,callback:o});return}this.readingCalls++;const c=(d,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(d&&f&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,i+1,s*2,o)},s);return}o(d,f)},u=this.backend[r].bind(this.backend);if(u.length===2){try{const d=u(t,n);d&&typeof d.then=="function"?d.then(f=>c(null,f)).catch(c):c(null,d)}catch(d){c(d)}return}return u(t,n,c)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);const s=this.queueLoad(t,n,r,i);if(!s.toLoad.length)return s.pending.length||i(),null;s.toLoad.forEach(o=>{this.loadOne(o)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),i=r[0],s=r[1];this.read(i,s,"read",void 0,void 0,(o,c)=>{o&&this.logger.warn(`${n}loading namespace ${s} for language ${i} failed`,o),!o&&c&&this.logger.log(`${n}loaded namespace ${s} for language ${i}`,c),this.loaded(t,o,c)})}saveMissing(t,n,r,i,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const u={...o,isUpdate:s},d=this.backend.create.bind(this.backend);if(d.length<6)try{let f;d.length===5?f=d(t,n,r,i,u):f=d(t,n,r,i),f&&typeof f.then=="function"?f.then(h=>c(null,h)).catch(c):c(null,f)}catch(f){c(f)}else d(t,n,r,i,c,u)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}function Hp(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){let n={};if(typeof t[1]=="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(i=>{n[i]=r[i]})}return n},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function Yp(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function Ua(){}function Vx(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}class no extends ja{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Yp(t),this.services={},this.logger=dr,this.modules={external:[]},Vx(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=Hp();this.options={...i,...this.options,...Yp(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function s(f){return f?typeof f=="function"?new f:f:null}if(!this.options.isClone){this.modules.logger?dr.init(s(this.modules.logger),this.options):dr.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:typeof Intl<"u"&&(f=Bx);const h=new qp(this.options);this.store=new Fp(this.options.resources,this.options);const l=this.services;l.logger=dr,l.resourceStore=this.store,l.languageUtils=h,l.pluralResolver=new Px(h,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),f&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(l.formatter=s(f),l.formatter.init(l,this.options),this.options.interpolation.format=l.formatter.format.bind(l.formatter)),l.interpolator=new jx(this.options),l.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},l.backendConnector=new Ux(s(this.modules.backend),l.resourceStore,l,this.options),l.backendConnector.on("*",function(b){for(var a=arguments.length,p=new Array(a>1?a-1:0),y=1;y<a;y++)p[y-1]=arguments[y];t.emit(b,...p)}),this.modules.languageDetector&&(l.languageDetector=s(this.modules.languageDetector),l.languageDetector.init&&l.languageDetector.init(l,this.options.detection,this.options)),this.modules.i18nFormat&&(l.i18nFormat=s(this.modules.i18nFormat),l.i18nFormat.init&&l.i18nFormat.init(this)),this.translator=new Fa(this.services,this.options),this.translator.on("*",function(b){for(var a=arguments.length,p=new Array(a>1?a-1:0),y=1;y<a;y++)p[y-1]=arguments[y];t.emit(b,...p)}),this.modules.external.forEach(b=>{b.init&&b.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Ua),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(f=>{this[f]=function(){return t.store[f](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(f=>{this[f]=function(){return t.store[f](...arguments),t}});const u=eo(),d=()=>{const f=(h,l)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),u.resolve(l),r(h,l)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return f(null,this.t.bind(this));this.changeLanguage(this.options.lng,f)};return this.options.resources||!this.options.initImmediate?d():setTimeout(d,0),u}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ua;const i=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const s=[],o=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(d=>{d!=="cimode"&&s.indexOf(d)<0&&s.push(d)})};i?o(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>o(u)),this.options.preload&&this.options.preload.forEach(c=>o(c)),this.services.backendConnector.load(s,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(c)})}else r(null)}reloadResources(t,n,r){const i=eo();return t||(t=this.languages),n||(n=this.options.ns),r||(r=Ua),this.services.backendConnector.reload(t,n,s=>{i.resolve(),r(s)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Up.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const i=eo();this.emit("languageChanging",t);const s=u=>{this.language=u,this.languages=this.services.languageUtils.toResolveHierarchy(u),this.resolvedLanguage=void 0,this.setResolvedLanguage(u)},o=(u,d)=>{d?(s(d),this.translator.changeLanguage(d),this.isLanguageChangingTo=void 0,this.emit("languageChanged",d),this.logger.log("languageChanged",d)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),n&&n(u,function(){return r.t(...arguments)})},c=u=>{!t&&!u&&this.services.languageDetector&&(u=[]);const d=typeof u=="string"?u:this.services.languageUtils.getBestMatchFromCodes(u);d&&(this.language||s(d),this.translator.language||this.translator.changeLanguage(d),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(d)),this.loadResources(d,f=>{o(f,d)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(t),i}getFixedT(t,n,r){var i=this;const s=function(o,c){let u;if(typeof c!="object"){for(var d=arguments.length,f=new Array(d>2?d-2:0),h=2;h<d;h++)f[h-2]=arguments[h];u=i.options.overloadTranslationOptionHandler([o,c].concat(f))}else u={...c};u.lng=u.lng||s.lng,u.lngs=u.lngs||s.lngs,u.ns=u.ns||s.ns,u.keyPrefix=u.keyPrefix||r||s.keyPrefix;const l=i.options.keySeparator||".";let b;return u.keyPrefix&&Array.isArray(o)?b=o.map(a=>`${u.keyPrefix}${l}${a}`):b=u.keyPrefix?`${u.keyPrefix}${l}${o}`:o,i.t(b,u)};return typeof t=="string"?s.lng=t:s.lngs=t,s.ns=n,s.keyPrefix=r,s}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const o=(c,u)=>{const d=this.services.backendConnector.state[`${c}|${u}`];return d===-1||d===2};if(n.precheck){const c=n.precheck(this,o);if(c!==void 0)return c}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(r,t)&&(!i||o(s,t)))}loadNamespaces(t,n){const r=eo();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=eo();typeof t=="string"&&(t=[t]);const i=this.options.preload||[],s=t.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return s.length?(this.options.preload=i.concat(s),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new qp(Hp());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new no(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ua;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},s=new no(i);return(t.debug!==void 0||t.prefix!==void 0)&&(s.logger=s.logger.clone(t)),["store","services","language"].forEach(c=>{s[c]=this[c]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},r&&(s.store=new Fp(this.store.data,i),s.services.resourceStore=s.store),s.translator=new Fa(s.services,i),s.translator.on("*",function(c){for(var u=arguments.length,d=new Array(u>1?u-1:0),f=1;f<u;f++)d[f-1]=arguments[f];s.emit(c,...d)}),s.init(i,n),s.translator.options=i,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Kt=no.createInstance();Kt.createInstance=no.createInstance,Kt.createInstance,Kt.dir,Kt.init,Kt.loadResources,Kt.reloadResources,Kt.use,Kt.changeLanguage,Kt.getFixedT,Kt.t,Kt.exists,Kt.setDefaultNamespace,Kt.hasLoadedNamespace,Kt.loadNamespaces,Kt.loadLanguages;const Qi=(e,t="EUR")=>new Intl.NumberFormat(Kt.language,{style:"currency",currency:t??"EUR"}).format(e/100),ro=e=>{window.parent.postMessage(e,"*")},Rl=(e,t)=>Math.abs(Math.round((t.getTime()-e.getTime())/(1e3*3600*24))),Wp=(e,t)=>Math.abs(Math.round((t.getTime()-e.getTime())/(1e3*3600*24*7))),Kp=(e,t)=>Math.abs(Math.round((t.getTime()-e.getTime())/(1e3*3600*24*365.25))),qx=async(e,t)=>{const{data:{data:n}}=await Zs.get(e);n&&t(n)},Va=async(e,t,n,r)=>{const i=await Al.setContact(e,{email:t,contact_identifier_value:n});r&&qx(i.data.data.contact.uuid,r)};function $x(){if(console&&console.warn){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];typeof t[0]=="string"&&(t[0]=`react-i18next:: ${t[0]}`),console.warn(...t)}}const zp={};function Nl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];typeof t[0]=="string"&&zp[t[0]]||(typeof t[0]=="string"&&(zp[t[0]]=new Date),$x(...t))}const Qp=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}};function Jp(e,t,n){e.loadNamespaces(t,Qp(e,n))}function Zp(e,t,n,r){typeof n=="string"&&(n=[n]),n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,Qp(e,r))}function Gx(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=t.languages[0],i=t.options?t.options.fallbackLng:!1,s=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const o=(c,u)=>{const d=t.services.backendConnector.state[`${c}|${u}`];return d===-1||d===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!o(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||o(r,e)&&(!i||o(s,e)))}function Hx(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!t.languages||!t.languages.length?(Nl("i18n.languages were undefined or empty",t.languages),!0):t.options.ignoreJSONStructure!==void 0?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(i,s)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!s(i.isLanguageChangingTo,e))return!1}}):Gx(e,t,n)}const Yx=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Wx={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},Kx=e=>Wx[e];let Ml={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(Yx,Kx)};function zx(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ml={...Ml,...e}}function Qx(){return Ml}let Xp;function Jx(e){Xp=e}function Zx(){return Xp}const Xx={type:"3rdParty",init(e){zx(e.options.react),Jx(e)}},e2=k.createContext();class t2{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const n2=(e,t)=>{const n=k.useRef();return k.useEffect(()=>{n.current=e},[e,t]),n.current};function em(e,t,n,r){return e.getFixedT(t,n,r)}function r2(e,t,n,r){return k.useCallback(em(e,t,n,r),[e,t,n,r])}function et(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=t,{i18n:r,defaultNS:i}=k.useContext(e2)||{},s=n||r||Zx();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new t2),!s){Nl("You will need to pass in an i18next instance by using initReactI18next");const E=(A,T)=>typeof T=="string"?T:T&&typeof T=="object"&&typeof T.defaultValue=="string"?T.defaultValue:Array.isArray(A)?A[A.length-1]:A,S=[E,{},!1];return S.t=E,S.i18n={},S.ready=!1,S}s.options.react&&s.options.react.wait!==void 0&&Nl("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...Qx(),...s.options.react,...t},{useSuspense:c,keyPrefix:u}=o;let d=i||s.options&&s.options.defaultNS;d=typeof d=="string"?[d]:d||["translation"],s.reportNamespaces.addUsedNamespaces&&s.reportNamespaces.addUsedNamespaces(d);const f=(s.isInitialized||s.initializedStoreOnce)&&d.every(E=>Hx(E,s,o)),h=r2(s,t.lng||null,o.nsMode==="fallback"?d:d[0],u),l=()=>h,b=()=>em(s,t.lng||null,o.nsMode==="fallback"?d:d[0],u),[a,p]=k.useState(l);let y=d.join();t.lng&&(y=`${t.lng}${y}`);const g=n2(y),v=k.useRef(!0);k.useEffect(()=>{const{bindI18n:E,bindI18nStore:S}=o;v.current=!0,!f&&!c&&(t.lng?Zp(s,t.lng,d,()=>{v.current&&p(b)}):Jp(s,d,()=>{v.current&&p(b)})),f&&g&&g!==y&&v.current&&p(b);function A(){v.current&&p(b)}return E&&s&&s.on(E,A),S&&s&&s.store.on(S,A),()=>{v.current=!1,E&&s&&E.split(" ").forEach(T=>s.off(T,A)),S&&s&&S.split(" ").forEach(T=>s.store.off(T,A))}},[s,y]),k.useEffect(()=>{v.current&&f&&p(l)},[s,u,f]);const w=[a,s,f];if(w.t=a,w.i18n=s,w.ready=f,f||!f&&!c)return w;throw new Promise(E=>{t.lng?Zp(s,t.lng,d,()=>E()):Jp(s,d,()=>E())})}function zr({value:e,start:t=0,duration:n=1e3,currency:r="EUR",asCurrency:i=!1}){const[s,o]=k.useState(t),c=()=>{const u=t>e?t-e:e-t;return u<=1e3?1:u/1e3};return k.useEffect(()=>{const u=setInterval(()=>{t>e?o(d=>Math.max(d-c(),e)):o(d=>Math.min(d+c(),e)),s===e&&clearInterval(u)},n/e);return()=>clearInterval(u)},[s,n,t,e]),m.jsx("div",{"data-testid":"animated-counter",children:i?Qi(s,r):s})}const i2=(e,t,n)=>{const r=e[t];return r?typeof r=="function"?r():Promise.resolve(r):new Promise((i,s)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(s.bind(null,new Error("Unknown variable dynamic import: "+t+(t.split("/").length!==n?". Note that variables only represent file names one level deep.":""))))})},s2=({svgComponent:e,...t})=>m.jsx(e,{...t});function tm(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=tm(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function o2(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=tm(e))&&(r&&(r+=" "),r+=t);return r}const nm=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,rm=o2,Ji=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return rm(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=t,o=Object.keys(i).map(d=>{const f=n==null?void 0:n[d],h=s==null?void 0:s[d];if(f===null)return null;const l=nm(f)||nm(h);return i[d][l]}),c=n&&Object.entries(n).reduce((d,f)=>{let[h,l]=f;return l===void 0||(d[h]=l),d},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,f)=>{let{class:h,className:l,...b}=f;return Object.entries(b).every(a=>{let[p,y]=a;return Array.isArray(y)?y.includes({...s,...c}[p]):{...s,...c}[p]===y})?[...d,h,l]:d},[]);return rm(e,o,u,n==null?void 0:n.class,n==null?void 0:n.className)},a2=Ji("aspect-square",{variants:{size:{"2xs":"h-3 w-3",xs:"h-4 w-4",sm:"h-5 w-5",md:"h-6 w-6",lg:"h-7 w-7",xl:"h-8 w-8","2xl":"h-10 w-10"},variant:{primary:"fill-none stroke-core-white-900 stroke-[1.5]",secondary:"fill-none stroke-core-gray-400 stroke-[1.5] active:stroke-core-gray-900 ",discovery:"fill-none stroke-core-primary-500 stroke-[1.5] ",destructive:"fill-none stroke-core-red-700 stroke-[1.5] ",placeholder:"fill-none stroke-core-gray-300 stroke-[1.5]"},outline:{true:[],false:[]}},compoundVariants:[{variant:"placeholder",outline:!1,class:"fill-core-gray-300 stroke-width-0"}],defaultVariants:{variant:"placeholder",size:"md"}}),en=({icon:e="user",size:t="md",variant:n="placeholder",outline:r=!0})=>{if(k.isValidElement(e))return"span";const i=c2(e);return i?m.jsx(s2,{svgComponent:i,className:a2({variant:n,size:t,outline:r})}):null};function c2(e){const[t,n]=k.useState(null),r=async()=>{try{const i=(await i2(Object.assign({"../../assets/svg/calendar.svg":()=>Promise.resolve().then(()=>v8),"../../assets/svg/camera-switch.svg":()=>Promise.resolve().then(()=>b8),"../../assets/svg/caret-left.svg":()=>Promise.resolve().then(()=>w8),"../../assets/svg/close.svg":()=>Promise.resolve().then(()=>E8),"../../assets/svg/crossBlack.svg":()=>Promise.resolve().then(()=>S8),"../../assets/svg/dollar.svg":()=>Promise.resolve().then(()=>x8),"../../assets/svg/edit.svg":()=>Promise.resolve().then(()=>_8),"../../assets/svg/home.svg":()=>Promise.resolve().then(()=>C8),"../../assets/svg/information.svg":()=>Promise.resolve().then(()=>A8),"../../assets/svg/mail.svg":()=>Promise.resolve().then(()=>T8),"../../assets/svg/notificationErrorV2.svg":()=>Promise.resolve().then(()=>I8),"../../assets/svg/notificationSuccessV2.svg":()=>Promise.resolve().then(()=>k8),"../../assets/svg/notificationWarningV2.svg":()=>Promise.resolve().then(()=>O8),"../../assets/svg/settings.svg":()=>Promise.resolve().then(()=>R8),"../../assets/svg/shopping-bag.svg":()=>Promise.resolve().then(()=>N8),"../../assets/svg/star.svg":()=>Promise.resolve().then(()=>M8),"../../assets/svg/user.svg":()=>Promise.resolve().then(()=>D8)}),`../../assets/svg/${e}.svg`,5)).default;n(()=>i)}catch(i){console.error(`Failed to import icon: ${e}`,i),n(null)}};return k.useEffect(()=>{r()},[e]),t}const u2=Ji("bg-core-primary-500 text-core-white-900 relative inline-flex aspect-square shrink-0 items-center antialiased rounded-full overflow-hidden uppercase",{variants:{size:{xs:"h-6 w-6 text-xs ",sm:"h-8 w-8 text-sm",md:"h-10 w-10 text-base",lg:"h-12 w-12 text-lg",xl:"h-14 w-14 text-xl","2xl":"h-16 w-16 text-2xl"}},defaultVariants:{size:"sm"}}),l2=({src:e,alt:t})=>m.jsx("img",{src:e,alt:t,className:"bg-core-white-900 aspect-square w-full grow rounded-full object-cover object-center"}),d2=({initials:e})=>m.jsx("div",{className:"h-full w-full content-center text-center",children:e}),Dl=({src:e,alt:t,initials:n,size:r})=>m.jsxs("div",{className:u2({size:r}),children:[e&&m.jsx(l2,{src:e,alt:t}),e&&!n&&m.jsx("div",{className:"flex grow h-full w-full bg-core-gray-100 justify-center items-center",children:m.jsx(en,{icon:"user",variant:"placeholder",outline:!1,size:r})}),!e&&n&&m.jsx(d2,{initials:n}),!e&&!n&&m.jsx("div",{className:"flex grow h-full w-full bg-core-gray-100 justify-center items-center",children:m.jsx(en,{icon:"user",variant:"placeholder",outline:!1,size:r})})]});Dl.displayName="Avatar";const f2=Ji("inline-flex items-center rounded-lg px-2 py-1 antialiased",{variants:{color:{primary:"text-core-primary-700 outline-core-primary-200 bg-core-primary-50",gray:"text-core-gray-700 outline-core-gray-200 bg-core-gray-50"},size:{sm:"text-xs leading-4 ",md:"text-sm leading-5 "},stroke:{true:"outline outline-1",false:""}},defaultVariants:{color:"primary",size:"sm",stroke:!1}}),Pl=({label:e,color:t="primary",size:n="sm",stroke:r=!1})=>m.jsx("span",{className:f2({color:t,size:n,stroke:r}),children:e});Pl.displayName="Badge";function h2({body:e}){return m.jsxs("div",{className:"flex gap-3 rounded-r-lg border-l-2 border-core-primary-500 bg-core-gray-50 p-4 text-sm",children:[m.jsx(en,{icon:"information",variant:"discovery"}),m.jsx("div",{children:e})]})}var im={exports:{}};/*!
81
81
  Copyright (c) 2018 Jed Watson.
82
82
  Licensed under the MIT License (MIT), see
83
83
  http://jedwatson.github.io/classnames
84
- */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",o=0;o<arguments.length;o++){var c=arguments[o];c&&(s=i(s,r(c)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var o="";for(var c in s)t.call(s,c)&&s[c]&&(o=i(o,c));return o}function i(s,o){return o?s?s+" "+o:s+o:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(lm);var S_=lm.exports;const fn=Pu(S_);function Xi(e){return m.jsxs("svg",{...e,"aria-hidden":"true",role:"status",className:fn("inline h-5 w-5 animate-spin fill-[#E5E7EB]",e.className),viewBox:"0 0 100 101",fill:"red",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentFill"}),m.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentColor"})]})}const x_=Zi("group inline-flex shrink-0 select-none items-center justify-center font-medium transition-colors duration-100 antialiased rounded-lg hover:shadow-none focus:outline-0 focus:outline-core-primary-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none",{variants:{size:{sm:"h-8 gap-1 px-2 py-1 text-xs leading-4",md:"h-10 gap-1 px-3 py-2 text-sm leading-5",lg:"h-12 gap-1 px-3 py-3 text-base leading-6"},variant:{primary:"bg-core-primary-500 text-core-white-900 outline-primary hover:bg-core-primary-600 disabled:bg-core-primary-disabled",secondary:"box-border border border-core-gray-200 bg-core-white-900 shadow-xs hover:bg-core-gray-50 disabled:opacity-30",destructive:"bg-core-red-500 text-core-white-900 hover:bg-core-red-600 focus:outline-core-red-500 disabled:bg-core-red-200","destructive-outline":"box-border border border-core-red-200 text-core-red-700 shadow-xs hover:bg-core-red-50 focus:outline-core-red-500 disabled:opacity-40","link-gray":"bg-transparent hover:bg-surface hover:underline underline-offset-2 disabled:opacity-30"}},compoundVariants:[{variant:"link-gray",size:["md","lg"],class:"px-0 py-0"}],defaultVariants:{variant:"primary",size:"md"}}),dm={primary:"primary",secondary:"secondary",destructive:"primary","destructive-outline":"destructive","link-gray":"secondary"},fm={md:"sm",lg:"md"},lt=({after:e,before:t,className:n,label:r="button",variant:i="primary",size:s="md",loading:o=!1,disabled:c=!1,onClick:u,...d})=>{const[f,p]=k.useState(o),l=h=>{u&&!f&&(p(!0),Promise.resolve(u(h)).finally(()=>p(!1)))},v=h=>{var y;return fn("group-hover:opacity-70 ",(y=h.props)==null?void 0:y.className)},a=h=>{var y;return((y=h.props)==null?void 0:y.icon)??"user"};return m.jsxs("button",{className:fn(x_({variant:i,size:s}),n),disabled:c||f,onClick:l,...d,children:[m.jsxs("span",{className:`flex items-center gap-1 ${f&&"opacity-0"}`,children:[t&&m.jsx(en,{className:v(t),icon:a(t),variant:dm[i],size:fm[s]}),m.jsx("span",{children:r}),e&&m.jsx(en,{className:fn(v(e),`${f&&"opacity-0"}`),icon:a(e),variant:dm[i],size:fm[s]})]}),f&&m.jsx(Xi,{className:"absolute"})]})};lt.displayName="Button";function Pt({children:e,id:t=k.useId()}){return m.jsx("div",{id:t,className:"flex h-full max-h-full flex-col bg-white md:h-fit md:rounded-lg md:border md:shadow-md",children:e})}function It({children:e}){return m.jsx("div",{className:"grow overflow-y-auto px-6 py-4",children:e})}function Kt({children:e}){return m.jsx("div",{className:"border-t px-6 py-4",children:e})}function kt({children:e}){return m.jsx("div",{className:"border-b px-6",children:e})}const hm=({children:e,className:t,description:n,disabled:r,required:i=!1,tooltip:s,htmlFor:o})=>!e&&!s&&!n?null:m.jsx("label",{htmlFor:o,className:"inline-flex text-core-gray-800 shrink-0 items-center gap-1 antialiased ",children:m.jsxs("div",{className:fn("inline-flex cursor-pointer items-center gap-1 text-sm font-medium leading-6",t,r&&"pointer-events-none text-core-gray-300"),children:[e?m.jsx("span",{className:fn(r&&"pointer-events-none text-core-gray-300"),children:e}):null,n?m.jsx("span",{className:fn("font-normal text-core-gray-500",r&&"text-current"),children:n}):null,i?m.jsx("span",{className:"font-normal text-core-red-500",children:"*"}):null]})}),pm=({helperText:e,error:t,disabled:n})=>e?m.jsx("span",{className:fn("text-start text-sm leading-6 text-core-gray-500 antialiased ",t&&"text-core-red-500",n&&"text-core-gray-300"),children:e}):null;hm.displayName="Label",pm.displayName="HelperText";const vn=Object.assign(hm,{Helper:pm}),__=({id:e,defaultChecked:t=!1,disabled:n,onChange:r})=>{const i=n,[s,o]=k.useState(t),c=u=>{i||o(!s),r&&r(u.target.checked)};return m.jsx("div",{className:"flex h-6 w-6 items-center justify-center",children:m.jsx("input",{className:"h-4 w-4 rounded border border-core-gray-200 bg-core-white-900 text-core-primary-500 shadow-xs hover:border-core-gray-300 hover:shadow-none checked:bg-core-primary-500focus:outline-0 focus:ring-core-primary-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:border disabled:border-core-gray-200 disabled:bg-core-gray-50 disabled:shadow-none disabled:checked:bg-core-gray-200",id:e,type:"checkbox",checked:s,onChange:c,disabled:i})})},mm=k.createContext(null);function gm(e=!1){const t=k.useContext(mm);if(!t&&!e)throw new Error("Checkbox.Item must be used within a CheckboxGroup or CheckboxGroup.Root");return t}const ym=k.forwardRef(({children:e,description:t,disabled:n,helperText:r,id:i,label:s,required:o,tooltip:c},u)=>{const d=k.useId(),f=i??d,p=s??t??c??r?m.jsxs("div",{className:"inline-flex flex-col",children:[m.jsx(vn,{className:"cursor-default",description:t,required:o,tooltip:c,htmlFor:f,disabled:n,children:s}),m.jsx(vn.Helper,{disabled:n,helperText:r})]}):null;return m.jsx(mm.Provider,{value:{disabled:n},children:m.jsxs("div",{ref:u,"aria-describedby":r?`${f}__describer`:void 0,"aria-labelledby":s?`${f}__label`:void 0,className:"flex flex-col gap-4",role:"group",children:[s??r??t??c?m.jsx("div",{className:"flex flex-col",children:p}):null,e?m.jsx("div",{className:fn("flex flex-col gap-2"),children:e}):null]})})});ym.displayName="CheckboxGroup",Object.assign(ym,{Item:({disabled:e,label:t,defaultChecked:n})=>{const r=gm(),{disabled:i}=r??{};return m.jsx(Wa,{disabled:e??i,label:t,defaultChecked:n})}});const Wa=({id:e,children:t,defaultChecked:n=!1,description:r,disabled:i,helperText:s,label:o,required:c=!1,tooltip:u,onChange:d})=>{const f=k.useId(),p=e??f,l=!!gm(!0),v=o??r??u??s?m.jsxs("div",{className:"inline-flex flex-col",children:[m.jsx(vn,{className:fn(l&&"font-normal"),description:r,required:c,tooltip:u,htmlFor:p,disabled:i,children:o}),m.jsx(vn.Helper,{disabled:i,helperText:s})]}):null;return m.jsxs("div",{className:"flex gap-3",children:[m.jsx(__,{id:p,defaultChecked:n,disabled:i,onChange:d}),t||v]})};Wa.displayName="Checkbox";var vm={exports:{}};/*!
84
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",o=0;o<arguments.length;o++){var c=arguments[o];c&&(s=i(s,r(c)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var o="";for(var c in s)t.call(s,c)&&s[c]&&(o=i(o,c));return o}function i(s,o){return o?s?s+" "+o:s+o:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(im);var p2=im.exports;const hn=ju(p2);function io(e){return m.jsxs("svg",{...e,"aria-hidden":"true",role:"status",className:hn("inline h-5 w-5 animate-spin fill-[#E5E7EB]",e.className),viewBox:"0 0 100 101",fill:"red",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentFill"}),m.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentColor"})]})}const m2=Ji("group inline-flex shrink-0 select-none items-center justify-center font-medium transition-colors duration-100 antialiased rounded-lg hover:shadow-none focus:outline-0 focus:outline-core-primary-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none",{variants:{size:{sm:"h-8 gap-1 px-2 py-1 text-xs leading-4",md:"h-10 gap-1 px-3 py-2 text-sm leading-5",lg:"h-12 gap-1 px-3 py-3 text-base leading-6"},variant:{primary:"bg-core-primary-500 text-core-white-900 outline-primary hover:bg-core-primary-600 disabled:bg-core-primary-disabled",secondary:"box-border border border-core-gray-200 bg-core-white-900 shadow-xs hover:bg-core-gray-50 disabled:opacity-30",destructive:"bg-core-red-500 text-core-white-900 hover:bg-core-red-600 focus:outline-core-red-500 disabled:bg-core-red-200","destructive-outline":"box-border border border-core-red-200 text-core-red-700 shadow-xs hover:bg-core-red-50 focus:outline-core-red-500 disabled:opacity-40","link-gray":"bg-transparent hover:bg-surface hover:underline underline-offset-2 disabled:opacity-30"}},compoundVariants:[{variant:"link-gray",size:["md","lg"],class:"px-0 py-0"}],defaultVariants:{variant:"primary",size:"md"}}),sm={primary:"primary",secondary:"secondary",destructive:"primary","destructive-outline":"destructive","link-gray":"secondary"},om={md:"sm",lg:"md"},ct=({after:e,before:t,className:n,label:r="button",variant:i="primary",size:s="md",loading:o=!1,disabled:c=!1,onClick:u,...d})=>{const[f,h]=k.useState(o),l=p=>{u&&!f&&(h(!0),Promise.resolve(u(p)).finally(()=>h(!1)))},b=p=>{var y;return hn("group-hover:opacity-70 ",(y=p.props)==null?void 0:y.className)},a=p=>{var y;return((y=p.props)==null?void 0:y.icon)??"user"};return m.jsxs("button",{className:hn(m2({variant:i,size:s}),n),disabled:c||f,onClick:l,...d,children:[m.jsxs("span",{className:`flex items-center gap-1 ${f&&"opacity-0"}`,children:[t&&m.jsx(en,{className:b(t),icon:a(t),variant:sm[i],size:om[s]}),m.jsx("span",{children:r}),e&&m.jsx(en,{className:hn(b(e),`${f&&"opacity-0"}`),icon:a(e),variant:sm[i],size:om[s]})]}),f&&m.jsx(io,{className:"absolute"})]})};ct.displayName="Button";function Pt({children:e,id:t=k.useId()}){return m.jsx("div",{id:t,className:"flex h-full max-h-full flex-col bg-white md:h-fit md:rounded-lg md:border md:shadow-md",children:e})}function Tt({children:e}){return m.jsx("div",{className:"grow overflow-y-auto px-6 py-4",children:e})}function tn({children:e}){return m.jsx("div",{className:"border-t px-6 py-4",children:e})}function jt({children:e}){return m.jsx("div",{className:"border-b px-6",children:e})}const am=({children:e,className:t,description:n,disabled:r,required:i=!1,tooltip:s,htmlFor:o})=>!e&&!s&&!n?null:m.jsx("label",{htmlFor:o,className:"inline-flex text-core-gray-800 shrink-0 items-center gap-1 antialiased ",children:m.jsxs("div",{className:hn("inline-flex cursor-pointer items-center gap-1 text-sm font-medium leading-6",t,r&&"pointer-events-none text-core-gray-300"),children:[e?m.jsx("span",{className:hn(r&&"pointer-events-none text-core-gray-300"),children:e}):null,n?m.jsx("span",{className:hn("font-normal text-core-gray-500",r&&"text-current"),children:n}):null,i?m.jsx("span",{className:"font-normal text-core-red-500",children:"*"}):null]})}),cm=({helperText:e,error:t,disabled:n})=>e?m.jsx("span",{className:hn("text-start text-sm leading-6 text-core-gray-500 antialiased ",t&&"text-core-red-500",n&&"text-core-gray-300"),children:e}):null;am.displayName="Label",cm.displayName="HelperText";const vn=Object.assign(am,{Helper:cm}),g2=({id:e,defaultChecked:t=!1,disabled:n,onChange:r})=>{const i=n,[s,o]=k.useState(t),c=u=>{i||o(!s),r&&r(u.target.checked)};return m.jsx("div",{className:"flex h-6 w-6 items-center justify-center",children:m.jsx("input",{className:"h-4 w-4 rounded border border-core-gray-200 bg-core-white-900 text-core-primary-500 shadow-xs hover:border-core-gray-300 hover:shadow-none checked:bg-core-primary-500focus:outline-0 focus:ring-core-primary-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:border disabled:border-core-gray-200 disabled:bg-core-gray-50 disabled:shadow-none disabled:checked:bg-core-gray-200",id:e,type:"checkbox",checked:s,onChange:c,disabled:i})})},um=k.createContext(null);function lm(e=!1){const t=k.useContext(um);if(!t&&!e)throw new Error("Checkbox.Item must be used within a CheckboxGroup or CheckboxGroup.Root");return t}const dm=k.forwardRef(({children:e,description:t,disabled:n,helperText:r,id:i,label:s,required:o,tooltip:c},u)=>{const d=k.useId(),f=i??d,h=s??t??c??r?m.jsxs("div",{className:"inline-flex flex-col",children:[m.jsx(vn,{className:"cursor-default",description:t,required:o,tooltip:c,htmlFor:f,disabled:n,children:s}),m.jsx(vn.Helper,{disabled:n,helperText:r})]}):null;return m.jsx(um.Provider,{value:{disabled:n},children:m.jsxs("div",{ref:u,"aria-describedby":r?`${f}__describer`:void 0,"aria-labelledby":s?`${f}__label`:void 0,className:"flex flex-col gap-4",role:"group",children:[s??r??t??c?m.jsx("div",{className:"flex flex-col",children:h}):null,e?m.jsx("div",{className:hn("flex flex-col gap-2"),children:e}):null]})})});dm.displayName="CheckboxGroup",Object.assign(dm,{Item:({disabled:e,label:t,defaultChecked:n})=>{const r=lm(),{disabled:i}=r??{};return m.jsx(qa,{disabled:e??i,label:t,defaultChecked:n})}});const qa=({id:e,children:t,defaultChecked:n=!1,description:r,disabled:i,helperText:s,label:o,required:c=!1,tooltip:u,onChange:d})=>{const f=k.useId(),h=e??f,l=!!lm(!0),b=o??r??u??s?m.jsxs("div",{className:"inline-flex flex-col",children:[m.jsx(vn,{className:hn(l&&"font-normal"),description:r,required:c,tooltip:u,htmlFor:h,disabled:i,children:o}),m.jsx(vn.Helper,{disabled:i,helperText:s})]}):null;return m.jsxs("div",{className:"flex gap-3",children:[m.jsx(g2,{id:h,defaultChecked:n,disabled:i,onChange:d}),t||b]})};qa.displayName="Checkbox";var fm={exports:{}};/*!
85
85
  *
86
86
  * react-simple-keyboard v3.7.121
87
87
  * https://github.com/hodgef/react-simple-keyboard
@@ -91,52 +91,52 @@ React keys must be passed directly to JSX without using spread:
91
91
  * This source code is licensed under the MIT license found in the
92
92
  * LICENSE file in the root directory of this source tree.
93
93
  *
94
- */(function(e,t){(function(n,r){e.exports=r(k)})(qi,function(n){return function(){var r={981:function(){typeof Element>"u"||"remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)}),typeof self<"u"&&"document"in self&&((!("classList"in document.createElement("_"))||document.createElementNS&&!("classList"in document.createElementNS("http://www.w3.org/2000/svg","g")))&&function(c){if("Element"in c){var u="classList",d="prototype",f=c.Element[d],p=Object,l=String[d].trim||function(){return this.replace(/^\s+|\s+$/g,"")},v=Array[d].indexOf||function(E){for(var S=0,A=this.length;S<A;S++)if(S in this&&this[S]===E)return S;return-1},a=function(E,S){this.name=E,this.code=DOMException[E],this.message=S},h=function(E,S){if(S==="")throw new a("SYNTAX_ERR","The token must not be empty.");if(/\s/.test(S))throw new a("INVALID_CHARACTER_ERR","The token must not contain space characters.");return v.call(E,S)},y=function(E){for(var S=l.call(E.getAttribute("class")||""),A=S?S.split(/\s+/):[],T=0,O=A.length;T<O;T++)this.push(A[T]);this._updateClassName=function(){E.setAttribute("class",this.toString())}},g=y[d]=[],b=function(){return new y(this)};if(a[d]=Error[d],g.item=function(E){return this[E]||null},g.contains=function(E){return~h(this,E+"")},g.add=function(){var E,S=arguments,A=0,T=S.length,O=!1;do~h(this,E=S[A]+"")||(this.push(E),O=!0);while(++A<T);O&&this._updateClassName()},g.remove=function(){var E,S,A=arguments,T=0,O=A.length,N=!1;do for(S=h(this,E=A[T]+"");~S;)this.splice(S,1),N=!0,S=h(this,E);while(++T<O);N&&this._updateClassName()},g.toggle=function(E,S){var A=this.contains(E),T=A?S!==!0&&"remove":S!==!1&&"add";return T&&this[T](E),S===!0||S===!1?S:!A},g.replace=function(E,S){var A=h(E+"");~A&&(this.splice(A,1,S),this._updateClassName())},g.toString=function(){return this.join(" ")},p.defineProperty){var w={get:b,enumerable:!0,configurable:!0};try{p.defineProperty(f,u,w)}catch(E){E.number!==void 0&&E.number!==-2146823252||(w.enumerable=!1,p.defineProperty(f,u,w))}}else p[d].__defineGetter__&&f.__defineGetter__(u,b)}}(self),function(){var c=document.createElement("_");if(c.classList.add("c1","c2"),!c.classList.contains("c2")){var u=function(f){var p=DOMTokenList.prototype[f];DOMTokenList.prototype[f]=function(l){var v,a=arguments.length;for(v=0;v<a;v++)l=arguments[v],p.call(this,l)}};u("add"),u("remove")}if(c.classList.toggle("c3",!1),c.classList.contains("c3")){var d=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(f,p){return 1 in arguments&&!this.contains(f)==!p?p:d.call(this,f)}}"replace"in document.createElement("_").classList||(DOMTokenList.prototype.replace=function(f,p){var l=this.toString().split(" "),v=l.indexOf(f+"");~v&&(l=l.slice(v),this.remove.apply(this,l),this.add(p),this.add.apply(this,l.slice(1)))}),c=null}())},548:function(c){c.exports=function(){var u={9306:function(l,v,a){var h=a(4901),y=a(6823),g=TypeError;l.exports=function(b){if(h(b))return b;throw new g(y(b)+" is not a function")}},5548:function(l,v,a){var h=a(3517),y=a(6823),g=TypeError;l.exports=function(b){if(h(b))return b;throw new g(y(b)+" is not a constructor")}},3506:function(l,v,a){var h=a(3925),y=String,g=TypeError;l.exports=function(b){if(h(b))return b;throw new g("Can't set "+y(b)+" as a prototype")}},6469:function(l,v,a){var h=a(8227),y=a(2360),g=a(4913).f,b=h("unscopables"),w=Array.prototype;w[b]===void 0&&g(w,b,{configurable:!0,value:y(null)}),l.exports=function(E){w[b][E]=!0}},7829:function(l,v,a){var h=a(8183).charAt;l.exports=function(y,g,b){return g+(b?h(y,g).length:1)}},8551:function(l,v,a){var h=a(34),y=String,g=TypeError;l.exports=function(b){if(h(b))return b;throw new g(y(b)+" is not an object")}},235:function(l,v,a){var h=a(9213).forEach,y=a(4598)("forEach");l.exports=y?[].forEach:function(g){return h(this,g,arguments.length>1?arguments[1]:void 0)}},7916:function(l,v,a){var h=a(6080),y=a(9565),g=a(8981),b=a(6319),w=a(4209),E=a(3517),S=a(6198),A=a(4659),T=a(81),O=a(851),N=Array;l.exports=function(D){var U=g(D),q=E(this),F=arguments.length,V=F>1?arguments[1]:void 0,R=V!==void 0;R&&(V=h(V,F>2?arguments[2]:void 0));var L,W,z,Z,te,re,he=O(U),ce=0;if(!he||this===N&&w(he))for(L=S(U),W=q?new this(L):N(L);L>ce;ce++)re=R?V(U[ce],ce):U[ce],A(W,ce,re);else for(W=q?new this:[],te=(Z=T(U,he)).next;!(z=y(te,Z)).done;ce++)re=R?b(Z,V,[z.value,ce],!0):z.value,A(W,ce,re);return W.length=ce,W}},9617:function(l,v,a){var h=a(5397),y=a(5610),g=a(6198),b=function(w){return function(E,S,A){var T=h(E),O=g(T);if(O===0)return!w&&-1;var N,D=y(A,O);if(w&&S!=S){for(;O>D;)if((N=T[D++])!=N)return!0}else for(;O>D;D++)if((w||D in T)&&T[D]===S)return w||D||0;return!w&&-1}};l.exports={includes:b(!0),indexOf:b(!1)}},9213:function(l,v,a){var h=a(6080),y=a(9504),g=a(7055),b=a(8981),w=a(6198),E=a(1469),S=y([].push),A=function(T){var O=T===1,N=T===2,D=T===3,U=T===4,q=T===6,F=T===7,V=T===5||q;return function(R,L,W,z){for(var Z,te,re=b(R),he=g(re),ce=w(he),ye=h(L,W),le=0,$=z||E,H=O?$(R,ce):N||F?$(R,0):void 0;ce>le;le++)if((V||le in he)&&(te=ye(Z=he[le],le,re),T))if(O)H[le]=te;else if(te)switch(T){case 3:return!0;case 5:return Z;case 6:return le;case 2:S(H,Z)}else switch(T){case 4:return!1;case 7:S(H,Z)}return q?-1:D||U?U:H}};l.exports={forEach:A(0),map:A(1),filter:A(2),some:A(3),every:A(4),find:A(5),findIndex:A(6),filterReject:A(7)}},597:function(l,v,a){var h=a(9039),y=a(8227),g=a(7388),b=y("species");l.exports=function(w){return g>=51||!h(function(){var E=[];return(E.constructor={})[b]=function(){return{foo:1}},E[w](Boolean).foo!==1})}},4598:function(l,v,a){var h=a(9039);l.exports=function(y,g){var b=[][y];return!!b&&h(function(){b.call(null,g||function(){return 1},1)})}},926:function(l,v,a){var h=a(9306),y=a(8981),g=a(7055),b=a(6198),w=TypeError,E="Reduce of empty array with no initial value",S=function(A){return function(T,O,N,D){var U=y(T),q=g(U),F=b(U);if(h(O),F===0&&N<2)throw new w(E);var V=A?F-1:0,R=A?-1:1;if(N<2)for(;;){if(V in q){D=q[V],V+=R;break}if(V+=R,A?V<0:F<=V)throw new w(E)}for(;A?V>=0:F>V;V+=R)V in q&&(D=O(D,q[V],V,U));return D}};l.exports={left:S(!1),right:S(!0)}},4527:function(l,v,a){var h=a(3724),y=a(4376),g=TypeError,b=Object.getOwnPropertyDescriptor,w=h&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(E){return E instanceof TypeError}}();l.exports=w?function(E,S){if(y(E)&&!b(E,"length").writable)throw new g("Cannot set read only .length");return E.length=S}:function(E,S){return E.length=S}},7680:function(l,v,a){var h=a(9504);l.exports=h([].slice)},4488:function(l,v,a){var h=a(7680),y=Math.floor,g=function(b,w){var E=b.length;if(E<8)for(var S,A,T=1;T<E;){for(A=T,S=b[T];A&&w(b[A-1],S)>0;)b[A]=b[--A];A!==T++&&(b[A]=S)}else for(var O=y(E/2),N=g(h(b,0,O),w),D=g(h(b,O),w),U=N.length,q=D.length,F=0,V=0;F<U||V<q;)b[F+V]=F<U&&V<q?w(N[F],D[V])<=0?N[F++]:D[V++]:F<U?N[F++]:D[V++];return b};l.exports=g},7433:function(l,v,a){var h=a(4376),y=a(3517),g=a(34),b=a(8227)("species"),w=Array;l.exports=function(E){var S;return h(E)&&(S=E.constructor,(y(S)&&(S===w||h(S.prototype))||g(S)&&(S=S[b])===null)&&(S=void 0)),S===void 0?w:S}},1469:function(l,v,a){var h=a(7433);l.exports=function(y,g){return new(h(y))(g===0?0:g)}},6319:function(l,v,a){var h=a(8551),y=a(9539);l.exports=function(g,b,w,E){try{return E?b(h(w)[0],w[1]):b(w)}catch(S){y(g,"throw",S)}}},4428:function(l,v,a){var h=a(8227)("iterator"),y=!1;try{var g=0,b={next:function(){return{done:!!g++}},return:function(){y=!0}};b[h]=function(){return this},Array.from(b,function(){throw 2})}catch{}l.exports=function(w,E){try{if(!E&&!y)return!1}catch{return!1}var S=!1;try{var A={};A[h]=function(){return{next:function(){return{done:S=!0}}}},w(A)}catch{}return S}},4576:function(l,v,a){var h=a(9504),y=h({}.toString),g=h("".slice);l.exports=function(b){return g(y(b),8,-1)}},6955:function(l,v,a){var h=a(2140),y=a(4901),g=a(4576),b=a(8227)("toStringTag"),w=Object,E=g(function(){return arguments}())==="Arguments";l.exports=h?g:function(S){var A,T,O;return S===void 0?"Undefined":S===null?"Null":typeof(T=function(N,D){try{return N[D]}catch{}}(A=w(S),b))=="string"?T:E?g(A):(O=g(A))==="Object"&&y(A.callee)?"Arguments":O}},7740:function(l,v,a){var h=a(9297),y=a(5031),g=a(7347),b=a(4913);l.exports=function(w,E,S){for(var A=y(E),T=b.f,O=g.f,N=0;N<A.length;N++){var D=A[N];h(w,D)||S&&h(S,D)||T(w,D,O(E,D))}}},1436:function(l,v,a){var h=a(8227)("match");l.exports=function(y){var g=/./;try{"/./"[y](g)}catch{try{return g[h]=!1,"/./"[y](g)}catch{}}return!1}},2211:function(l,v,a){var h=a(9039);l.exports=!h(function(){function y(){}return y.prototype.constructor=null,Object.getPrototypeOf(new y)!==y.prototype})},2529:function(l){l.exports=function(v,a){return{value:v,done:a}}},6699:function(l,v,a){var h=a(3724),y=a(4913),g=a(6980);l.exports=h?function(b,w,E){return y.f(b,w,g(1,E))}:function(b,w,E){return b[w]=E,b}},6980:function(l){l.exports=function(v,a){return{enumerable:!(1&v),configurable:!(2&v),writable:!(4&v),value:a}}},4659:function(l,v,a){var h=a(3724),y=a(4913),g=a(6980);l.exports=function(b,w,E){h?y.f(b,w,g(0,E)):b[w]=E}},3640:function(l,v,a){var h=a(8551),y=a(4270),g=TypeError;l.exports=function(b){if(h(this),b==="string"||b==="default")b="string";else if(b!=="number")throw new g("Incorrect hint");return y(this,b)}},2106:function(l,v,a){var h=a(283),y=a(4913);l.exports=function(g,b,w){return w.get&&h(w.get,b,{getter:!0}),w.set&&h(w.set,b,{setter:!0}),y.f(g,b,w)}},6840:function(l,v,a){var h=a(4901),y=a(4913),g=a(283),b=a(9433);l.exports=function(w,E,S,A){A||(A={});var T=A.enumerable,O=A.name!==void 0?A.name:E;if(h(S)&&g(S,O,A),A.global)T?w[E]=S:b(E,S);else{try{A.unsafe?w[E]&&(T=!0):delete w[E]}catch{}T?w[E]=S:y.f(w,E,{value:S,enumerable:!1,configurable:!A.nonConfigurable,writable:!A.nonWritable})}return w}},9433:function(l,v,a){var h=a(4475),y=Object.defineProperty;l.exports=function(g,b){try{y(h,g,{value:b,configurable:!0,writable:!0})}catch{h[g]=b}return b}},4606:function(l,v,a){var h=a(6823),y=TypeError;l.exports=function(g,b){if(!delete g[b])throw new y("Cannot delete property "+h(b)+" of "+h(g))}},3724:function(l,v,a){var h=a(9039);l.exports=!h(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})},4055:function(l,v,a){var h=a(4475),y=a(34),g=h.document,b=y(g)&&y(g.createElement);l.exports=function(w){return b?g.createElement(w):{}}},6837:function(l){var v=TypeError;l.exports=function(a){if(a>9007199254740991)throw v("Maximum allowed index exceeded");return a}},7400:function(l){l.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},9296:function(l,v,a){var h=a(4055)("span").classList,y=h&&h.constructor&&h.constructor.prototype;l.exports=y===Object.prototype?void 0:y},8834:function(l,v,a){var h=a(9392).match(/firefox\/(\d+)/i);l.exports=!!h&&+h[1]},3202:function(l,v,a){var h=a(9392);l.exports=/MSIE|Trident/.test(h)},9088:function(l,v,a){var h=a(4475),y=a(4576);l.exports=y(h.process)==="process"},9392:function(l){l.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},7388:function(l,v,a){var h,y,g=a(4475),b=a(9392),w=g.process,E=g.Deno,S=w&&w.versions||E&&E.version,A=S&&S.v8;A&&(y=(h=A.split("."))[0]>0&&h[0]<4?1:+(h[0]+h[1])),!y&&b&&(!(h=b.match(/Edge\/(\d+)/))||h[1]>=74)&&(h=b.match(/Chrome\/(\d+)/))&&(y=+h[1]),l.exports=y},9160:function(l,v,a){var h=a(9392).match(/AppleWebKit\/(\d+)\./);l.exports=!!h&&+h[1]},8727:function(l){l.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6518:function(l,v,a){var h=a(4475),y=a(7347).f,g=a(6699),b=a(6840),w=a(9433),E=a(7740),S=a(2796);l.exports=function(A,T){var O,N,D,U,q,F=A.target,V=A.global,R=A.stat;if(O=V?h:R?h[F]||w(F,{}):h[F]&&h[F].prototype)for(N in T){if(U=T[N],D=A.dontCallGetSet?(q=y(O,N))&&q.value:O[N],!S(V?N:F+(R?".":"#")+N,A.forced)&&D!==void 0){if(typeof U==typeof D)continue;E(U,D)}(A.sham||D&&D.sham)&&g(U,"sham",!0),b(O,N,U,A)}}},9039:function(l){l.exports=function(v){try{return!!v()}catch{return!0}}},9228:function(l,v,a){a(7495);var h=a(9565),y=a(6840),g=a(7323),b=a(9039),w=a(8227),E=a(6699),S=w("species"),A=RegExp.prototype;l.exports=function(T,O,N,D){var U=w(T),q=!b(function(){var L={};return L[U]=function(){return 7},""[T](L)!==7}),F=q&&!b(function(){var L=!1,W=/a/;return T==="split"&&((W={}).constructor={},W.constructor[S]=function(){return W},W.flags="",W[U]=/./[U]),W.exec=function(){return L=!0,null},W[U](""),!L});if(!q||!F||N){var V=/./[U],R=O(U,""[T],function(L,W,z,Z,te){var re=W.exec;return re===g||re===A.exec?q&&!te?{done:!0,value:h(V,W,z,Z)}:{done:!0,value:h(L,z,W,Z)}:{done:!1}});y(String.prototype,T,R[0]),y(A,U,R[1])}D&&E(A[U],"sham",!0)}},8745:function(l,v,a){var h=a(616),y=Function.prototype,g=y.apply,b=y.call;l.exports=typeof Reflect=="object"&&Reflect.apply||(h?b.bind(g):function(){return b.apply(g,arguments)})},6080:function(l,v,a){var h=a(7476),y=a(9306),g=a(616),b=h(h.bind);l.exports=function(w,E){return y(w),E===void 0?w:g?b(w,E):function(){return w.apply(E,arguments)}}},616:function(l,v,a){var h=a(9039);l.exports=!h(function(){var y=(function(){}).bind();return typeof y!="function"||y.hasOwnProperty("prototype")})},9565:function(l,v,a){var h=a(616),y=Function.prototype.call;l.exports=h?y.bind(y):function(){return y.apply(y,arguments)}},350:function(l,v,a){var h=a(3724),y=a(9297),g=Function.prototype,b=h&&Object.getOwnPropertyDescriptor,w=y(g,"name"),E=w&&(function(){}).name==="something",S=w&&(!h||h&&b(g,"name").configurable);l.exports={EXISTS:w,PROPER:E,CONFIGURABLE:S}},6706:function(l,v,a){var h=a(9504),y=a(9306);l.exports=function(g,b,w){try{return h(y(Object.getOwnPropertyDescriptor(g,b)[w]))}catch{}}},7476:function(l,v,a){var h=a(4576),y=a(9504);l.exports=function(g){if(h(g)==="Function")return y(g)}},9504:function(l,v,a){var h=a(616),y=Function.prototype,g=y.call,b=h&&y.bind.bind(g,g);l.exports=h?b:function(w){return function(){return g.apply(w,arguments)}}},7751:function(l,v,a){var h=a(4475),y=a(4901);l.exports=function(g,b){return arguments.length<2?(w=h[g],y(w)?w:void 0):h[g]&&h[g][b];var w}},851:function(l,v,a){var h=a(6955),y=a(5966),g=a(4117),b=a(6269),w=a(8227)("iterator");l.exports=function(E){if(!g(E))return y(E,w)||y(E,"@@iterator")||b[h(E)]}},81:function(l,v,a){var h=a(9565),y=a(9306),g=a(8551),b=a(6823),w=a(851),E=TypeError;l.exports=function(S,A){var T=arguments.length<2?w(S):A;if(y(T))return g(h(T,S));throw new E(b(S)+" is not iterable")}},6933:function(l,v,a){var h=a(9504),y=a(4376),g=a(4901),b=a(4576),w=a(655),E=h([].push);l.exports=function(S){if(g(S))return S;if(y(S)){for(var A=S.length,T=[],O=0;O<A;O++){var N=S[O];typeof N=="string"?E(T,N):typeof N!="number"&&b(N)!=="Number"&&b(N)!=="String"||E(T,w(N))}var D=T.length,U=!0;return function(q,F){if(U)return U=!1,F;if(y(this))return F;for(var V=0;V<D;V++)if(T[V]===q)return F}}}},5966:function(l,v,a){var h=a(9306),y=a(4117);l.exports=function(g,b){var w=g[b];return y(w)?void 0:h(w)}},2478:function(l,v,a){var h=a(9504),y=a(8981),g=Math.floor,b=h("".charAt),w=h("".replace),E=h("".slice),S=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,A=/\$([$&'`]|\d{1,2})/g;l.exports=function(T,O,N,D,U,q){var F=N+T.length,V=D.length,R=A;return U!==void 0&&(U=y(U),R=S),w(q,R,function(L,W){var z;switch(b(W,0)){case"$":return"$";case"&":return T;case"`":return E(O,0,N);case"'":return E(O,F);case"<":z=U[E(W,1,-1)];break;default:var Z=+W;if(Z===0)return L;if(Z>V){var te=g(Z/10);return te===0?L:te<=V?D[te-1]===void 0?b(W,1):D[te-1]+b(W,1):L}z=D[Z-1]}return z===void 0?"":z})}},4475:function(l,v,a){var h=function(y){return y&&y.Math===Math&&y};l.exports=h(typeof globalThis=="object"&&globalThis)||h(typeof window=="object"&&window)||h(typeof self=="object"&&self)||h(typeof a.g=="object"&&a.g)||h(typeof this=="object"&&this)||function(){return this}()||Function("return this")()},9297:function(l,v,a){var h=a(9504),y=a(8981),g=h({}.hasOwnProperty);l.exports=Object.hasOwn||function(b,w){return g(y(b),w)}},421:function(l){l.exports={}},397:function(l,v,a){var h=a(7751);l.exports=h("document","documentElement")},5917:function(l,v,a){var h=a(3724),y=a(9039),g=a(4055);l.exports=!h&&!y(function(){return Object.defineProperty(g("div"),"a",{get:function(){return 7}}).a!==7})},7055:function(l,v,a){var h=a(9504),y=a(9039),g=a(4576),b=Object,w=h("".split);l.exports=y(function(){return!b("z").propertyIsEnumerable(0)})?function(E){return g(E)==="String"?w(E,""):b(E)}:b},3167:function(l,v,a){var h=a(4901),y=a(34),g=a(2967);l.exports=function(b,w,E){var S,A;return g&&h(S=w.constructor)&&S!==E&&y(A=S.prototype)&&A!==E.prototype&&g(b,A),b}},3706:function(l,v,a){var h=a(9504),y=a(4901),g=a(7629),b=h(Function.toString);y(g.inspectSource)||(g.inspectSource=function(w){return b(w)}),l.exports=g.inspectSource},1181:function(l,v,a){var h,y,g,b=a(8622),w=a(4475),E=a(34),S=a(6699),A=a(9297),T=a(7629),O=a(6119),N=a(421),D="Object already initialized",U=w.TypeError,q=w.WeakMap;if(b||T.state){var F=T.state||(T.state=new q);F.get=F.get,F.has=F.has,F.set=F.set,h=function(R,L){if(F.has(R))throw new U(D);return L.facade=R,F.set(R,L),L},y=function(R){return F.get(R)||{}},g=function(R){return F.has(R)}}else{var V=O("state");N[V]=!0,h=function(R,L){if(A(R,V))throw new U(D);return L.facade=R,S(R,V,L),L},y=function(R){return A(R,V)?R[V]:{}},g=function(R){return A(R,V)}}l.exports={set:h,get:y,has:g,enforce:function(R){return g(R)?y(R):h(R,{})},getterFor:function(R){return function(L){var W;if(!E(L)||(W=y(L)).type!==R)throw new U("Incompatible receiver, "+R+" required");return W}}}},4209:function(l,v,a){var h=a(8227),y=a(6269),g=h("iterator"),b=Array.prototype;l.exports=function(w){return w!==void 0&&(y.Array===w||b[g]===w)}},4376:function(l,v,a){var h=a(4576);l.exports=Array.isArray||function(y){return h(y)==="Array"}},4901:function(l){var v=typeof document=="object"&&document.all;l.exports=v===void 0&&v!==void 0?function(a){return typeof a=="function"||a===v}:function(a){return typeof a=="function"}},3517:function(l,v,a){var h=a(9504),y=a(9039),g=a(4901),b=a(6955),w=a(7751),E=a(3706),S=function(){},A=w("Reflect","construct"),T=/^\s*(?:class|function)\b/,O=h(T.exec),N=!T.test(S),D=function(q){if(!g(q))return!1;try{return A(S,[],q),!0}catch{return!1}},U=function(q){if(!g(q))return!1;switch(b(q)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return N||!!O(T,E(q))}catch{return!0}};U.sham=!0,l.exports=!A||y(function(){var q;return D(D.call)||!D(Object)||!D(function(){q=!0})||q})?U:D},2796:function(l,v,a){var h=a(9039),y=a(4901),g=/#|\.prototype\./,b=function(T,O){var N=E[w(T)];return N===A||N!==S&&(y(O)?h(O):!!O)},w=b.normalize=function(T){return String(T).replace(g,".").toLowerCase()},E=b.data={},S=b.NATIVE="N",A=b.POLYFILL="P";l.exports=b},2087:function(l,v,a){var h=a(34),y=Math.floor;l.exports=Number.isInteger||function(g){return!h(g)&&isFinite(g)&&y(g)===g}},4117:function(l){l.exports=function(v){return v==null}},34:function(l,v,a){var h=a(4901);l.exports=function(y){return typeof y=="object"?y!==null:h(y)}},3925:function(l,v,a){var h=a(34);l.exports=function(y){return h(y)||y===null}},6395:function(l){l.exports=!1},788:function(l,v,a){var h=a(34),y=a(4576),g=a(8227)("match");l.exports=function(b){var w;return h(b)&&((w=b[g])!==void 0?!!w:y(b)==="RegExp")}},757:function(l,v,a){var h=a(7751),y=a(4901),g=a(1625),b=a(7040),w=Object;l.exports=b?function(E){return typeof E=="symbol"}:function(E){var S=h("Symbol");return y(S)&&g(S.prototype,w(E))}},9539:function(l,v,a){var h=a(9565),y=a(8551),g=a(5966);l.exports=function(b,w,E){var S,A;y(b);try{if(!(S=g(b,"return"))){if(w==="throw")throw E;return E}S=h(S,b)}catch(T){A=!0,S=T}if(w==="throw")throw E;if(A)throw S;return y(S),E}},3994:function(l,v,a){var h=a(7657).IteratorPrototype,y=a(2360),g=a(6980),b=a(687),w=a(6269),E=function(){return this};l.exports=function(S,A,T,O){var N=A+" Iterator";return S.prototype=y(h,{next:g(+!O,T)}),b(S,N,!1,!0),w[N]=E,S}},1088:function(l,v,a){var h=a(6518),y=a(9565),g=a(6395),b=a(350),w=a(4901),E=a(3994),S=a(2787),A=a(2967),T=a(687),O=a(6699),N=a(6840),D=a(8227),U=a(6269),q=a(7657),F=b.PROPER,V=b.CONFIGURABLE,R=q.IteratorPrototype,L=q.BUGGY_SAFARI_ITERATORS,W=D("iterator"),z="keys",Z="values",te="entries",re=function(){return this};l.exports=function(he,ce,ye,le,$,H,X){E(ye,ce,le);var C,j,B,M=function(ue){if(ue===$&&pe)return pe;if(!L&&ue&&ue in Q)return Q[ue];switch(ue){case z:case Z:case te:return function(){return new ye(this,ue)}}return function(){return new ye(this)}},ee=ce+" Iterator",J=!1,Q=he.prototype,Y=Q[W]||Q["@@iterator"]||$&&Q[$],pe=!L&&Y||M($),ge=ce==="Array"&&Q.entries||Y;if(ge&&(C=S(ge.call(new he)))!==Object.prototype&&C.next&&(g||S(C)===R||(A?A(C,R):w(C[W])||N(C,W,re)),T(C,ee,!0,!0),g&&(U[ee]=re)),F&&$===Z&&Y&&Y.name!==Z&&(!g&&V?O(Q,"name",Z):(J=!0,pe=function(){return y(Y,this)})),$)if(j={values:M(Z),keys:H?pe:M(z),entries:M(te)},X)for(B in j)(L||J||!(B in Q))&&N(Q,B,j[B]);else h({target:ce,proto:!0,forced:L||J},j);return g&&!X||Q[W]===pe||N(Q,W,pe,{name:$}),U[ce]=pe,j}},7657:function(l,v,a){var h,y,g,b=a(9039),w=a(4901),E=a(34),S=a(2360),A=a(2787),T=a(6840),O=a(8227),N=a(6395),D=O("iterator"),U=!1;[].keys&&("next"in(g=[].keys())?(y=A(A(g)))!==Object.prototype&&(h=y):U=!0),!E(h)||b(function(){var q={};return h[D].call(q)!==q})?h={}:N&&(h=S(h)),w(h[D])||T(h,D,function(){return this}),l.exports={IteratorPrototype:h,BUGGY_SAFARI_ITERATORS:U}},6269:function(l){l.exports={}},6198:function(l,v,a){var h=a(8014);l.exports=function(y){return h(y.length)}},283:function(l,v,a){var h=a(9504),y=a(9039),g=a(4901),b=a(9297),w=a(3724),E=a(350).CONFIGURABLE,S=a(3706),A=a(1181),T=A.enforce,O=A.get,N=String,D=Object.defineProperty,U=h("".slice),q=h("".replace),F=h([].join),V=w&&!y(function(){return D(function(){},"length",{value:8}).length!==8}),R=String(String).split("String"),L=l.exports=function(W,z,Z){U(N(z),0,7)==="Symbol("&&(z="["+q(N(z),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),Z&&Z.getter&&(z="get "+z),Z&&Z.setter&&(z="set "+z),(!b(W,"name")||E&&W.name!==z)&&(w?D(W,"name",{value:z,configurable:!0}):W.name=z),V&&Z&&b(Z,"arity")&&W.length!==Z.arity&&D(W,"length",{value:Z.arity});try{Z&&b(Z,"constructor")&&Z.constructor?w&&D(W,"prototype",{writable:!1}):W.prototype&&(W.prototype=void 0)}catch{}var te=T(W);return b(te,"source")||(te.source=F(R,typeof z=="string"?z:"")),W};Function.prototype.toString=L(function(){return g(this)&&O(this).source||S(this)},"toString")},741:function(l){var v=Math.ceil,a=Math.floor;l.exports=Math.trunc||function(h){var y=+h;return(y>0?a:v)(y)}},5749:function(l,v,a){var h=a(788),y=TypeError;l.exports=function(g){if(h(g))throw new y("The method doesn't accept regular expressions");return g}},4213:function(l,v,a){var h=a(3724),y=a(9504),g=a(9565),b=a(9039),w=a(1072),E=a(3717),S=a(8773),A=a(8981),T=a(7055),O=Object.assign,N=Object.defineProperty,D=y([].concat);l.exports=!O||b(function(){if(h&&O({b:1},O(N({},"a",{enumerable:!0,get:function(){N(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var U={},q={},F=Symbol("assign detection"),V="abcdefghijklmnopqrst";return U[F]=7,V.split("").forEach(function(R){q[R]=R}),O({},U)[F]!==7||w(O({},q)).join("")!==V})?function(U,q){for(var F=A(U),V=arguments.length,R=1,L=E.f,W=S.f;V>R;)for(var z,Z=T(arguments[R++]),te=L?D(w(Z),L(Z)):w(Z),re=te.length,he=0;re>he;)z=te[he++],h&&!g(W,Z,z)||(F[z]=Z[z]);return F}:O},2360:function(l,v,a){var h,y=a(8551),g=a(6801),b=a(8727),w=a(421),E=a(397),S=a(4055),A=a(6119),T="prototype",O="script",N=A("IE_PROTO"),D=function(){},U=function(V){return"<"+O+">"+V+"</"+O+">"},q=function(V){V.write(U("")),V.close();var R=V.parentWindow.Object;return V=null,R},F=function(){try{h=new ActiveXObject("htmlfile")}catch{}var V,R,L;F=typeof document<"u"?document.domain&&h?q(h):(R=S("iframe"),L="java"+O+":",R.style.display="none",E.appendChild(R),R.src=String(L),(V=R.contentWindow.document).open(),V.write(U("document.F=Object")),V.close(),V.F):q(h);for(var W=b.length;W--;)delete F[T][b[W]];return F()};w[N]=!0,l.exports=Object.create||function(V,R){var L;return V!==null?(D[T]=y(V),L=new D,D[T]=null,L[N]=V):L=F(),R===void 0?L:g.f(L,R)}},6801:function(l,v,a){var h=a(3724),y=a(8686),g=a(4913),b=a(8551),w=a(5397),E=a(1072);v.f=h&&!y?Object.defineProperties:function(S,A){b(S);for(var T,O=w(A),N=E(A),D=N.length,U=0;D>U;)g.f(S,T=N[U++],O[T]);return S}},4913:function(l,v,a){var h=a(3724),y=a(5917),g=a(8686),b=a(8551),w=a(6969),E=TypeError,S=Object.defineProperty,A=Object.getOwnPropertyDescriptor,T="enumerable",O="configurable",N="writable";v.f=h?g?function(D,U,q){if(b(D),U=w(U),b(q),typeof D=="function"&&U==="prototype"&&"value"in q&&N in q&&!q[N]){var F=A(D,U);F&&F[N]&&(D[U]=q.value,q={configurable:O in q?q[O]:F[O],enumerable:T in q?q[T]:F[T],writable:!1})}return S(D,U,q)}:S:function(D,U,q){if(b(D),U=w(U),b(q),y)try{return S(D,U,q)}catch{}if("get"in q||"set"in q)throw new E("Accessors not supported");return"value"in q&&(D[U]=q.value),D}},7347:function(l,v,a){var h=a(3724),y=a(9565),g=a(8773),b=a(6980),w=a(5397),E=a(6969),S=a(9297),A=a(5917),T=Object.getOwnPropertyDescriptor;v.f=h?T:function(O,N){if(O=w(O),N=E(N),A)try{return T(O,N)}catch{}if(S(O,N))return b(!y(g.f,O,N),O[N])}},298:function(l,v,a){var h=a(4576),y=a(5397),g=a(8480).f,b=a(7680),w=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];l.exports.f=function(E){return w&&h(E)==="Window"?function(S){try{return g(S)}catch{return b(w)}}(E):g(y(E))}},8480:function(l,v,a){var h=a(1828),y=a(8727).concat("length","prototype");v.f=Object.getOwnPropertyNames||function(g){return h(g,y)}},3717:function(l,v){v.f=Object.getOwnPropertySymbols},2787:function(l,v,a){var h=a(9297),y=a(4901),g=a(8981),b=a(6119),w=a(2211),E=b("IE_PROTO"),S=Object,A=S.prototype;l.exports=w?S.getPrototypeOf:function(T){var O=g(T);if(h(O,E))return O[E];var N=O.constructor;return y(N)&&O instanceof N?N.prototype:O instanceof S?A:null}},1625:function(l,v,a){var h=a(9504);l.exports=h({}.isPrototypeOf)},1828:function(l,v,a){var h=a(9504),y=a(9297),g=a(5397),b=a(9617).indexOf,w=a(421),E=h([].push);l.exports=function(S,A){var T,O=g(S),N=0,D=[];for(T in O)!y(w,T)&&y(O,T)&&E(D,T);for(;A.length>N;)y(O,T=A[N++])&&(~b(D,T)||E(D,T));return D}},1072:function(l,v,a){var h=a(1828),y=a(8727);l.exports=Object.keys||function(g){return h(g,y)}},8773:function(l,v){var a={}.propertyIsEnumerable,h=Object.getOwnPropertyDescriptor,y=h&&!a.call({1:2},1);v.f=y?function(g){var b=h(this,g);return!!b&&b.enumerable}:a},2551:function(l,v,a){var h=a(6395),y=a(4475),g=a(9039),b=a(9160);l.exports=h||!g(function(){if(!(b&&b<535)){var w=Math.random();__defineSetter__.call(null,w,function(){}),delete y[w]}})},2967:function(l,v,a){var h=a(6706),y=a(34),g=a(7750),b=a(3506);l.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var w,E=!1,S={};try{(w=h(Object.prototype,"__proto__","set"))(S,[]),E=S instanceof Array}catch{}return function(A,T){return g(A),b(T),y(A)&&(E?w(A,T):A.__proto__=T),A}}():void 0)},3179:function(l,v,a){var h=a(2140),y=a(6955);l.exports=h?{}.toString:function(){return"[object "+y(this)+"]"}},4270:function(l,v,a){var h=a(9565),y=a(4901),g=a(34),b=TypeError;l.exports=function(w,E){var S,A;if(E==="string"&&y(S=w.toString)&&!g(A=h(S,w))||y(S=w.valueOf)&&!g(A=h(S,w))||E!=="string"&&y(S=w.toString)&&!g(A=h(S,w)))return A;throw new b("Can't convert object to primitive value")}},5031:function(l,v,a){var h=a(7751),y=a(9504),g=a(8480),b=a(3717),w=a(8551),E=y([].concat);l.exports=h("Reflect","ownKeys")||function(S){var A=g.f(w(S)),T=b.f;return T?E(A,T(S)):A}},9167:function(l,v,a){var h=a(4475);l.exports=h},1056:function(l,v,a){var h=a(4913).f;l.exports=function(y,g,b){b in y||h(y,b,{configurable:!0,get:function(){return g[b]},set:function(w){g[b]=w}})}},6682:function(l,v,a){var h=a(9565),y=a(8551),g=a(4901),b=a(4576),w=a(7323),E=TypeError;l.exports=function(S,A){var T=S.exec;if(g(T)){var O=h(T,S,A);return O!==null&&y(O),O}if(b(S)==="RegExp")return h(w,S,A);throw new E("RegExp#exec called on incompatible receiver")}},7323:function(l,v,a){var h,y,g=a(9565),b=a(9504),w=a(655),E=a(7979),S=a(8429),A=a(5745),T=a(2360),O=a(1181).get,N=a(3635),D=a(8814),U=A("native-string-replace",String.prototype.replace),q=RegExp.prototype.exec,F=q,V=b("".charAt),R=b("".indexOf),L=b("".replace),W=b("".slice),z=(y=/b*/g,g(q,h=/a/,"a"),g(q,y,"a"),h.lastIndex!==0||y.lastIndex!==0),Z=S.BROKEN_CARET,te=/()??/.exec("")[1]!==void 0;(z||te||Z||N||D)&&(F=function(re){var he,ce,ye,le,$,H,X,C=this,j=O(C),B=w(re),M=j.raw;if(M)return M.lastIndex=C.lastIndex,he=g(F,M,B),C.lastIndex=M.lastIndex,he;var ee=j.groups,J=Z&&C.sticky,Q=g(E,C),Y=C.source,pe=0,ge=B;if(J&&(Q=L(Q,"y",""),R(Q,"g")===-1&&(Q+="g"),ge=W(B,C.lastIndex),C.lastIndex>0&&(!C.multiline||C.multiline&&V(B,C.lastIndex-1)!==`
95
- `)&&(Y="(?: "+Y+")",ge=" "+ge,pe++),ce=new RegExp("^(?:"+Y+")",Q)),te&&(ce=new RegExp("^"+Y+"$(?!\\s)",Q)),z&&(ye=C.lastIndex),le=g(q,J?ce:C,ge),J?le?(le.input=W(le.input,pe),le[0]=W(le[0],pe),le.index=C.lastIndex,C.lastIndex+=le[0].length):C.lastIndex=0:z&&le&&(C.lastIndex=C.global?le.index+le[0].length:ye),te&&le&&le.length>1&&g(U,le[0],ce,function(){for($=1;$<arguments.length-2;$++)arguments[$]===void 0&&(le[$]=void 0)}),le&&ee)for(le.groups=H=T(null),$=0;$<ee.length;$++)H[(X=ee[$])[0]]=le[X[1]];return le}),l.exports=F},7979:function(l,v,a){var h=a(8551);l.exports=function(){var y=h(this),g="";return y.hasIndices&&(g+="d"),y.global&&(g+="g"),y.ignoreCase&&(g+="i"),y.multiline&&(g+="m"),y.dotAll&&(g+="s"),y.unicode&&(g+="u"),y.unicodeSets&&(g+="v"),y.sticky&&(g+="y"),g}},1034:function(l,v,a){var h=a(9565),y=a(9297),g=a(1625),b=a(7979),w=RegExp.prototype;l.exports=function(E){var S=E.flags;return S!==void 0||"flags"in w||y(E,"flags")||!g(w,E)?S:h(b,E)}},8429:function(l,v,a){var h=a(9039),y=a(4475).RegExp,g=h(function(){var E=y("a","y");return E.lastIndex=2,E.exec("abcd")!==null}),b=g||h(function(){return!y("a","y").sticky}),w=g||h(function(){var E=y("^r","gy");return E.lastIndex=2,E.exec("str")!==null});l.exports={BROKEN_CARET:w,MISSED_STICKY:b,UNSUPPORTED_Y:g}},3635:function(l,v,a){var h=a(9039),y=a(4475).RegExp;l.exports=h(function(){var g=y(".","s");return!(g.dotAll&&g.test(`
96
- `)&&g.flags==="s")})},8814:function(l,v,a){var h=a(9039),y=a(4475).RegExp;l.exports=h(function(){var g=y("(?<a>b)","g");return g.exec("b").groups.a!=="b"||"b".replace(g,"$<a>c")!=="bc"})},7750:function(l,v,a){var h=a(4117),y=TypeError;l.exports=function(g){if(h(g))throw new y("Can't call method on "+g);return g}},7633:function(l,v,a){var h=a(7751),y=a(2106),g=a(8227),b=a(3724),w=g("species");l.exports=function(E){var S=h(E);b&&S&&!S[w]&&y(S,w,{configurable:!0,get:function(){return this}})}},687:function(l,v,a){var h=a(4913).f,y=a(9297),g=a(8227)("toStringTag");l.exports=function(b,w,E){b&&!E&&(b=b.prototype),b&&!y(b,g)&&h(b,g,{configurable:!0,value:w})}},6119:function(l,v,a){var h=a(5745),y=a(3392),g=h("keys");l.exports=function(b){return g[b]||(g[b]=y(b))}},7629:function(l,v,a){var h=a(6395),y=a(4475),g=a(9433),b="__core-js_shared__",w=l.exports=y[b]||g(b,{});(w.versions||(w.versions=[])).push({version:"3.37.1",mode:h?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE",source:"https://github.com/zloirock/core-js"})},5745:function(l,v,a){var h=a(7629);l.exports=function(y,g){return h[y]||(h[y]=g||{})}},2293:function(l,v,a){var h=a(8551),y=a(5548),g=a(4117),b=a(8227)("species");l.exports=function(w,E){var S,A=h(w).constructor;return A===void 0||g(S=h(A)[b])?E:y(S)}},8183:function(l,v,a){var h=a(9504),y=a(1291),g=a(655),b=a(7750),w=h("".charAt),E=h("".charCodeAt),S=h("".slice),A=function(T){return function(O,N){var D,U,q=g(b(O)),F=y(N),V=q.length;return F<0||F>=V?T?"":void 0:(D=E(q,F))<55296||D>56319||F+1===V||(U=E(q,F+1))<56320||U>57343?T?w(q,F):D:T?S(q,F,F+2):U-56320+(D-55296<<10)+65536}};l.exports={codeAt:A(!1),charAt:A(!0)}},706:function(l,v,a){var h=a(350).PROPER,y=a(9039),g=a(7452);l.exports=function(b){return y(function(){return!!g[b]()||"​…᠎"[b]()!=="​…᠎"||h&&g[b].name!==b})}},3802:function(l,v,a){var h=a(9504),y=a(7750),g=a(655),b=a(7452),w=h("".replace),E=RegExp("^["+b+"]+"),S=RegExp("(^|[^"+b+"])["+b+"]+$"),A=function(T){return function(O){var N=g(y(O));return 1&T&&(N=w(N,E,"")),2&T&&(N=w(N,S,"$1")),N}};l.exports={start:A(1),end:A(2),trim:A(3)}},4495:function(l,v,a){var h=a(7388),y=a(9039),g=a(4475).String;l.exports=!!Object.getOwnPropertySymbols&&!y(function(){var b=Symbol("symbol detection");return!g(b)||!(Object(b)instanceof Symbol)||!Symbol.sham&&h&&h<41})},8242:function(l,v,a){var h=a(9565),y=a(7751),g=a(8227),b=a(6840);l.exports=function(){var w=y("Symbol"),E=w&&w.prototype,S=E&&E.valueOf,A=g("toPrimitive");E&&!E[A]&&b(E,A,function(T){return h(S,this)},{arity:1})}},1296:function(l,v,a){var h=a(4495);l.exports=h&&!!Symbol.for&&!!Symbol.keyFor},1240:function(l,v,a){var h=a(9504);l.exports=h(1 .valueOf)},5610:function(l,v,a){var h=a(1291),y=Math.max,g=Math.min;l.exports=function(b,w){var E=h(b);return E<0?y(E+w,0):g(E,w)}},5397:function(l,v,a){var h=a(7055),y=a(7750);l.exports=function(g){return h(y(g))}},1291:function(l,v,a){var h=a(741);l.exports=function(y){var g=+y;return g!=g||g===0?0:h(g)}},8014:function(l,v,a){var h=a(1291),y=Math.min;l.exports=function(g){var b=h(g);return b>0?y(b,9007199254740991):0}},8981:function(l,v,a){var h=a(7750),y=Object;l.exports=function(g){return y(h(g))}},2777:function(l,v,a){var h=a(9565),y=a(34),g=a(757),b=a(5966),w=a(4270),E=a(8227),S=TypeError,A=E("toPrimitive");l.exports=function(T,O){if(!y(T)||g(T))return T;var N,D=b(T,A);if(D){if(O===void 0&&(O="default"),N=h(D,T,O),!y(N)||g(N))return N;throw new S("Can't convert object to primitive value")}return O===void 0&&(O="number"),w(T,O)}},6969:function(l,v,a){var h=a(2777),y=a(757);l.exports=function(g){var b=h(g,"string");return y(b)?b:b+""}},2140:function(l,v,a){var h={};h[a(8227)("toStringTag")]="z",l.exports=String(h)==="[object z]"},655:function(l,v,a){var h=a(6955),y=String;l.exports=function(g){if(h(g)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return y(g)}},6823:function(l){var v=String;l.exports=function(a){try{return v(a)}catch{return"Object"}}},3392:function(l,v,a){var h=a(9504),y=0,g=Math.random(),b=h(1 .toString);l.exports=function(w){return"Symbol("+(w===void 0?"":w)+")_"+b(++y+g,36)}},7040:function(l,v,a){var h=a(4495);l.exports=h&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},8686:function(l,v,a){var h=a(3724),y=a(9039);l.exports=h&&y(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})},8622:function(l,v,a){var h=a(4475),y=a(4901),g=h.WeakMap;l.exports=y(g)&&/native code/.test(String(g))},511:function(l,v,a){var h=a(9167),y=a(9297),g=a(1951),b=a(4913).f;l.exports=function(w){var E=h.Symbol||(h.Symbol={});y(E,w)||b(E,w,{value:g.f(w)})}},1951:function(l,v,a){var h=a(8227);v.f=h},8227:function(l,v,a){var h=a(4475),y=a(5745),g=a(9297),b=a(3392),w=a(4495),E=a(7040),S=h.Symbol,A=y("wks"),T=E?S.for||S:S&&S.withoutSetter||b;l.exports=function(O){return g(A,O)||(A[O]=w&&g(S,O)?S[O]:T("Symbol."+O)),A[O]}},7452:function(l){l.exports=`
97
- \v\f\r                 \u2028\u2029\uFEFF`},8706:function(l,v,a){var h=a(6518),y=a(9039),g=a(4376),b=a(34),w=a(8981),E=a(6198),S=a(6837),A=a(4659),T=a(1469),O=a(597),N=a(8227),D=a(7388),U=N("isConcatSpreadable"),q=D>=51||!y(function(){var V=[];return V[U]=!1,V.concat()[0]!==V}),F=function(V){if(!b(V))return!1;var R=V[U];return R!==void 0?!!R:g(V)};h({target:"Array",proto:!0,arity:1,forced:!q||!O("concat")},{concat:function(V){var R,L,W,z,Z,te=w(this),re=T(te,0),he=0;for(R=-1,W=arguments.length;R<W;R++)if(F(Z=R===-1?te:arguments[R]))for(z=E(Z),S(he+z),L=0;L<z;L++,he++)L in Z&&A(re,he,Z[L]);else S(he+1),A(re,he++,Z);return re.length=he,re}})},2008:function(l,v,a){var h=a(6518),y=a(9213).filter;h({target:"Array",proto:!0,forced:!a(597)("filter")},{filter:function(g){return y(this,g,arguments.length>1?arguments[1]:void 0)}})},3418:function(l,v,a){var h=a(6518),y=a(7916);h({target:"Array",stat:!0,forced:!a(4428)(function(g){Array.from(g)})},{from:y})},4423:function(l,v,a){var h=a(6518),y=a(9617).includes,g=a(9039),b=a(6469);h({target:"Array",proto:!0,forced:g(function(){return!Array(1).includes()})},{includes:function(w){return y(this,w,arguments.length>1?arguments[1]:void 0)}}),b("includes")},5276:function(l,v,a){var h=a(6518),y=a(7476),g=a(9617).indexOf,b=a(4598),w=y([].indexOf),E=!!w&&1/w([1],1,-0)<0;h({target:"Array",proto:!0,forced:E||!b("indexOf")},{indexOf:function(S){var A=arguments.length>1?arguments[1]:void 0;return E?w(this,S,A)||0:g(this,S,A)}})},3792:function(l,v,a){var h=a(5397),y=a(6469),g=a(6269),b=a(1181),w=a(4913).f,E=a(1088),S=a(2529),A=a(6395),T=a(3724),O="Array Iterator",N=b.set,D=b.getterFor(O);l.exports=E(Array,"Array",function(q,F){N(this,{type:O,target:h(q),index:0,kind:F})},function(){var q=D(this),F=q.target,V=q.index++;if(!F||V>=F.length)return q.target=void 0,S(void 0,!0);switch(q.kind){case"keys":return S(V,!1);case"values":return S(F[V],!1)}return S([V,F[V]],!1)},"values");var U=g.Arguments=g.Array;if(y("keys"),y("values"),y("entries"),!A&&T&&U.name!=="values")try{w(U,"name",{value:"values"})}catch{}},8598:function(l,v,a){var h=a(6518),y=a(9504),g=a(7055),b=a(5397),w=a(4598),E=y([].join);h({target:"Array",proto:!0,forced:g!==Object||!w("join",",")},{join:function(S){return E(b(this),S===void 0?",":S)}})},2062:function(l,v,a){var h=a(6518),y=a(9213).map;h({target:"Array",proto:!0,forced:!a(597)("map")},{map:function(g){return y(this,g,arguments.length>1?arguments[1]:void 0)}})},2712:function(l,v,a){var h=a(6518),y=a(926).left,g=a(4598),b=a(7388);h({target:"Array",proto:!0,forced:!a(9088)&&b>79&&b<83||!g("reduce")},{reduce:function(w){var E=arguments.length;return y(this,w,E,E>1?arguments[1]:void 0)}})},4782:function(l,v,a){var h=a(6518),y=a(4376),g=a(3517),b=a(34),w=a(5610),E=a(6198),S=a(5397),A=a(4659),T=a(8227),O=a(597),N=a(7680),D=O("slice"),U=T("species"),q=Array,F=Math.max;h({target:"Array",proto:!0,forced:!D},{slice:function(V,R){var L,W,z,Z=S(this),te=E(Z),re=w(V,te),he=w(R===void 0?te:R,te);if(y(Z)&&(L=Z.constructor,(g(L)&&(L===q||y(L.prototype))||b(L)&&(L=L[U])===null)&&(L=void 0),L===q||L===void 0))return N(Z,re,he);for(W=new(L===void 0?q:L)(F(he-re,0)),z=0;re<he;re++,z++)re in Z&&A(W,z,Z[re]);return W.length=z,W}})},6910:function(l,v,a){var h=a(6518),y=a(9504),g=a(9306),b=a(8981),w=a(6198),E=a(4606),S=a(655),A=a(9039),T=a(4488),O=a(4598),N=a(8834),D=a(3202),U=a(7388),q=a(9160),F=[],V=y(F.sort),R=y(F.push),L=A(function(){F.sort(void 0)}),W=A(function(){F.sort(null)}),z=O("sort"),Z=!A(function(){if(U)return U<70;if(!(N&&N>3)){if(D)return!0;if(q)return q<603;var te,re,he,ce,ye="";for(te=65;te<76;te++){switch(re=String.fromCharCode(te),te){case 66:case 69:case 70:case 72:he=3;break;case 68:case 71:he=4;break;default:he=2}for(ce=0;ce<47;ce++)F.push({k:re+ce,v:he})}for(F.sort(function(le,$){return $.v-le.v}),ce=0;ce<F.length;ce++)re=F[ce].k.charAt(0),ye.charAt(ye.length-1)!==re&&(ye+=re);return ye!=="DGBEFHACIJK"}});h({target:"Array",proto:!0,forced:L||!W||!z||!Z},{sort:function(te){te!==void 0&&g(te);var re=b(this);if(Z)return te===void 0?V(re):V(re,te);var he,ce,ye=[],le=w(re);for(ce=0;ce<le;ce++)ce in re&&R(ye,re[ce]);for(T(ye,function($){return function(H,X){return X===void 0?-1:H===void 0?1:$!==void 0?+$(H,X)||0:S(H)>S(X)?1:-1}}(te)),he=w(ye),ce=0;ce<he;)re[ce]=ye[ce++];for(;ce<le;)E(re,ce++);return re}})},4554:function(l,v,a){var h=a(6518),y=a(8981),g=a(5610),b=a(1291),w=a(6198),E=a(4527),S=a(6837),A=a(1469),T=a(4659),O=a(4606),N=a(597)("splice"),D=Math.max,U=Math.min;h({target:"Array",proto:!0,forced:!N},{splice:function(q,F){var V,R,L,W,z,Z,te=y(this),re=w(te),he=g(q,re),ce=arguments.length;for(ce===0?V=R=0:ce===1?(V=0,R=re-he):(V=ce-2,R=U(D(b(F),0),re-he)),S(re+V-R),L=A(te,R),W=0;W<R;W++)(z=he+W)in te&&T(L,W,te[z]);if(L.length=R,V<R){for(W=he;W<re-R;W++)Z=W+V,(z=W+R)in te?te[Z]=te[z]:O(te,Z);for(W=re;W>re-R+V;W--)O(te,W-1)}else if(V>R)for(W=re-R;W>he;W--)Z=W+V-1,(z=W+R-1)in te?te[Z]=te[z]:O(te,Z);for(W=0;W<V;W++)te[W+he]=arguments[W+2];return E(te,re-R+V),L}})},739:function(l,v,a){var h=a(6518),y=a(9039),g=a(8981),b=a(2777);h({target:"Date",proto:!0,arity:1,forced:y(function(){return new Date(NaN).toJSON()!==null||Date.prototype.toJSON.call({toISOString:function(){return 1}})!==1})},{toJSON:function(w){var E=g(this),S=b(E,"number");return typeof S!="number"||isFinite(S)?E.toISOString():null}})},9572:function(l,v,a){var h=a(9297),y=a(6840),g=a(3640),b=a(8227)("toPrimitive"),w=Date.prototype;h(w,b)||y(w,b,g)},2010:function(l,v,a){var h=a(3724),y=a(350).EXISTS,g=a(9504),b=a(2106),w=Function.prototype,E=g(w.toString),S=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,A=g(S.exec);h&&!y&&b(w,"name",{configurable:!0,get:function(){try{return A(S,E(this))[1]}catch{return""}}})},3110:function(l,v,a){var h=a(6518),y=a(7751),g=a(8745),b=a(9565),w=a(9504),E=a(9039),S=a(4901),A=a(757),T=a(7680),O=a(6933),N=a(4495),D=String,U=y("JSON","stringify"),q=w(/./.exec),F=w("".charAt),V=w("".charCodeAt),R=w("".replace),L=w(1 .toString),W=/[\uD800-\uDFFF]/g,z=/^[\uD800-\uDBFF]$/,Z=/^[\uDC00-\uDFFF]$/,te=!N||E(function(){var ye=y("Symbol")("stringify detection");return U([ye])!=="[null]"||U({a:ye})!=="{}"||U(Object(ye))!=="{}"}),re=E(function(){return U("\uDF06\uD834")!=='"\\udf06\\ud834"'||U("\uDEAD")!=='"\\udead"'}),he=function(ye,le){var $=T(arguments),H=O(le);if(S(H)||ye!==void 0&&!A(ye))return $[1]=function(X,C){if(S(H)&&(C=b(H,this,D(X),C)),!A(C))return C},g(U,null,$)},ce=function(ye,le,$){var H=F($,le-1),X=F($,le+1);return q(z,ye)&&!q(Z,X)||q(Z,ye)&&!q(z,H)?"\\u"+L(V(ye,0),16):ye};U&&h({target:"JSON",stat:!0,arity:3,forced:te||re},{stringify:function(ye,le,$){var H=T(arguments),X=g(te?he:U,null,H);return re&&typeof X=="string"?R(X,W,ce):X}})},2892:function(l,v,a){var h=a(6518),y=a(6395),g=a(3724),b=a(4475),w=a(9167),E=a(9504),S=a(2796),A=a(9297),T=a(3167),O=a(1625),N=a(757),D=a(2777),U=a(9039),q=a(8480).f,F=a(7347).f,V=a(4913).f,R=a(1240),L=a(3802).trim,W="Number",z=b[W],Z=w[W],te=z.prototype,re=b.TypeError,he=E("".slice),ce=E("".charCodeAt),ye=function(X){var C,j,B,M,ee,J,Q,Y,pe=D(X,"number");if(N(pe))throw new re("Cannot convert a Symbol value to a number");if(typeof pe=="string"&&pe.length>2){if(pe=L(pe),(C=ce(pe,0))===43||C===45){if((j=ce(pe,2))===88||j===120)return NaN}else if(C===48){switch(ce(pe,1)){case 66:case 98:B=2,M=49;break;case 79:case 111:B=8,M=55;break;default:return+pe}for(J=(ee=he(pe,2)).length,Q=0;Q<J;Q++)if((Y=ce(ee,Q))<48||Y>M)return NaN;return parseInt(ee,B)}}return+pe},le=S(W,!z(" 0o1")||!z("0b1")||z("+0x1")),$=function(X){var C,j=arguments.length<1?0:z(function(B){var M=D(B,"number");return typeof M=="bigint"?M:ye(M)}(X));return O(te,C=this)&&U(function(){R(C)})?T(Object(j),this,$):j};$.prototype=te,le&&!y&&(te.constructor=$),h({global:!0,constructor:!0,wrap:!0,forced:le},{Number:$});var H=function(X,C){for(var j,B=g?q(C):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),M=0;B.length>M;M++)A(C,j=B[M])&&!A(X,j)&&V(X,j,F(C,j))};y&&Z&&H(w[W],Z),(le||y)&&H(w[W],z)},2637:function(l,v,a){a(6518)({target:"Number",stat:!0},{isInteger:a(2087)})},9085:function(l,v,a){var h=a(6518),y=a(4213);h({target:"Object",stat:!0,arity:2,forced:Object.assign!==y},{assign:y})},7427:function(l,v,a){var h=a(6518),y=a(3724),g=a(2551),b=a(9306),w=a(8981),E=a(4913);y&&h({target:"Object",proto:!0,forced:g},{__defineGetter__:function(S,A){E.f(w(this),S,{get:b(A),enumerable:!0,configurable:!0})}})},3851:function(l,v,a){var h=a(6518),y=a(9039),g=a(5397),b=a(7347).f,w=a(3724);h({target:"Object",stat:!0,forced:!w||y(function(){b(1)}),sham:!w},{getOwnPropertyDescriptor:function(E,S){return b(g(E),S)}})},1278:function(l,v,a){var h=a(6518),y=a(3724),g=a(5031),b=a(5397),w=a(7347),E=a(4659);h({target:"Object",stat:!0,sham:!y},{getOwnPropertyDescriptors:function(S){for(var A,T,O=b(S),N=w.f,D=g(O),U={},q=0;D.length>q;)(T=N(O,A=D[q++]))!==void 0&&E(U,A,T);return U}})},1480:function(l,v,a){var h=a(6518),y=a(9039),g=a(298).f;h({target:"Object",stat:!0,forced:y(function(){return!Object.getOwnPropertyNames(1)})},{getOwnPropertyNames:g})},9773:function(l,v,a){var h=a(6518),y=a(4495),g=a(9039),b=a(3717),w=a(8981);h({target:"Object",stat:!0,forced:!y||g(function(){b.f(1)})},{getOwnPropertySymbols:function(E){var S=b.f;return S?S(w(E)):[]}})},9432:function(l,v,a){var h=a(6518),y=a(8981),g=a(1072);h({target:"Object",stat:!0,forced:a(9039)(function(){g(1)})},{keys:function(b){return g(y(b))}})},6099:function(l,v,a){var h=a(2140),y=a(6840),g=a(3179);h||y(Object.prototype,"toString",g,{unsafe:!0})},4864:function(l,v,a){var h=a(3724),y=a(4475),g=a(9504),b=a(2796),w=a(3167),E=a(6699),S=a(2360),A=a(8480).f,T=a(1625),O=a(788),N=a(655),D=a(1034),U=a(8429),q=a(1056),F=a(6840),V=a(9039),R=a(9297),L=a(1181).enforce,W=a(7633),z=a(8227),Z=a(3635),te=a(8814),re=z("match"),he=y.RegExp,ce=he.prototype,ye=y.SyntaxError,le=g(ce.exec),$=g("".charAt),H=g("".replace),X=g("".indexOf),C=g("".slice),j=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,B=/a/g,M=/a/g,ee=new he(B)!==B,J=U.MISSED_STICKY,Q=U.UNSUPPORTED_Y;if(b("RegExp",h&&(!ee||J||Z||te||V(function(){return M[re]=!1,he(B)!==B||he(M)===M||String(he(B,"i"))!=="/a/i"})))){for(var Y=function(ue,ie){var be,oe,Ce,_e,We,rt,vt=T(ce,this),ht=O(ue),Kn=ie===void 0,ct=[],nn=ue;if(!vt&&ht&&Kn&&ue.constructor===Y)return ue;if((ht||T(ce,ue))&&(ue=ue.source,Kn&&(ie=D(nn))),ue=ue===void 0?"":N(ue),ie=ie===void 0?"":N(ie),nn=ue,Z&&"dotAll"in B&&(oe=!!ie&&X(ie,"s")>-1)&&(ie=H(ie,/s/g,"")),be=ie,J&&"sticky"in B&&(Ce=!!ie&&X(ie,"y")>-1)&&Q&&(ie=H(ie,/y/g,"")),te&&(_e=function(pt){for(var Re,ln=pt.length,Lt=0,hn="",rn=[],pn=S(null),Rn=!1,Fn=!1,xn=0,mn="";Lt<=ln;Lt++){if((Re=$(pt,Lt))==="\\")Re+=$(pt,++Lt);else if(Re==="]")Rn=!1;else if(!Rn)switch(!0){case Re==="[":Rn=!0;break;case Re==="(":le(j,C(pt,Lt+1))&&(Lt+=2,Fn=!0),hn+=Re,xn++;continue;case(Re===">"&&Fn):if(mn===""||R(pn,mn))throw new ye("Invalid capture group name");pn[mn]=!0,rn[rn.length]=[mn,xn],Fn=!1,mn="";continue}Fn?mn+=Re:hn+=Re}return[hn,rn]}(ue),ue=_e[0],ct=_e[1]),We=w(he(ue,ie),vt?this:ce,Y),(oe||Ce||ct.length)&&(rt=L(We),oe&&(rt.dotAll=!0,rt.raw=Y(function(pt){for(var Re,ln=pt.length,Lt=0,hn="",rn=!1;Lt<=ln;Lt++)(Re=$(pt,Lt))!=="\\"?rn||Re!=="."?(Re==="["?rn=!0:Re==="]"&&(rn=!1),hn+=Re):hn+="[\\s\\S]":hn+=Re+$(pt,++Lt);return hn}(ue),be)),Ce&&(rt.sticky=!0),ct.length&&(rt.groups=ct)),ue!==nn)try{E(We,"source",nn===""?"(?:)":nn)}catch{}return We},pe=A(he),ge=0;pe.length>ge;)q(Y,he,pe[ge++]);ce.constructor=Y,Y.prototype=ce,F(y,"RegExp",Y,{constructor:!0})}W("RegExp")},7495:function(l,v,a){var h=a(6518),y=a(7323);h({target:"RegExp",proto:!0,forced:/./.exec!==y},{exec:y})},8781:function(l,v,a){var h=a(350).PROPER,y=a(6840),g=a(8551),b=a(655),w=a(9039),E=a(1034),S="toString",A=RegExp.prototype,T=A[S],O=w(function(){return T.call({source:"a",flags:"b"})!=="/a/b"}),N=h&&T.name!==S;(O||N)&&y(A,S,function(){var D=g(this);return"/"+b(D.source)+"/"+b(E(D))},{unsafe:!0})},1699:function(l,v,a){var h=a(6518),y=a(9504),g=a(5749),b=a(7750),w=a(655),E=a(1436),S=y("".indexOf);h({target:"String",proto:!0,forced:!E("includes")},{includes:function(A){return!!~S(w(b(this)),w(g(A)),arguments.length>1?arguments[1]:void 0)}})},7764:function(l,v,a){var h=a(8183).charAt,y=a(655),g=a(1181),b=a(1088),w=a(2529),E="String Iterator",S=g.set,A=g.getterFor(E);b(String,"String",function(T){S(this,{type:E,string:y(T),index:0})},function(){var T,O=A(this),N=O.string,D=O.index;return D>=N.length?w(void 0,!0):(T=h(N,D),O.index+=T.length,w(T,!1))})},8543:function(l,v,a){var h=a(6518),y=a(9565),g=a(7476),b=a(3994),w=a(2529),E=a(7750),S=a(8014),A=a(655),T=a(8551),O=a(4117),N=a(4576),D=a(788),U=a(1034),q=a(5966),F=a(6840),V=a(9039),R=a(8227),L=a(2293),W=a(7829),z=a(6682),Z=a(1181),te=a(6395),re=R("matchAll"),he="RegExp String",ce=he+" Iterator",ye=Z.set,le=Z.getterFor(ce),$=RegExp.prototype,H=TypeError,X=g("".indexOf),C=g("".matchAll),j=!!C&&!V(function(){C("a",/./)}),B=b(function(ee,J,Q,Y){ye(this,{type:ce,regexp:ee,string:J,global:Q,unicode:Y,done:!1})},he,function(){var ee=le(this);if(ee.done)return w(void 0,!0);var J=ee.regexp,Q=ee.string,Y=z(J,Q);return Y===null?(ee.done=!0,w(void 0,!0)):ee.global?(A(Y[0])===""&&(J.lastIndex=W(Q,S(J.lastIndex),ee.unicode)),w(Y,!1)):(ee.done=!0,w(Y,!1))}),M=function(ee){var J,Q,Y,pe=T(this),ge=A(ee),ue=L(pe,RegExp),ie=A(U(pe));return J=new ue(ue===RegExp?pe.source:pe,ie),Q=!!~X(ie,"g"),Y=!!~X(ie,"u"),J.lastIndex=S(pe.lastIndex),new B(J,ge,Q,Y)};h({target:"String",proto:!0,forced:j},{matchAll:function(ee){var J,Q,Y,pe,ge=E(this);if(O(ee)){if(j)return C(ge,ee)}else{if(D(ee)&&(J=A(E(U(ee))),!~X(J,"g")))throw new H("`.matchAll` does not allow non-global regexes");if(j)return C(ge,ee);if((Y=q(ee,re))===void 0&&te&&N(ee)==="RegExp"&&(Y=M),Y)return y(Y,ee,ge)}return Q=A(ge),pe=new RegExp(ee,"g"),te?y(M,pe,Q):pe[re](Q)}}),te||re in $||F($,re,M)},1761:function(l,v,a){var h=a(9565),y=a(9228),g=a(8551),b=a(4117),w=a(8014),E=a(655),S=a(7750),A=a(5966),T=a(7829),O=a(6682);y("match",function(N,D,U){return[function(q){var F=S(this),V=b(q)?void 0:A(q,N);return V?h(V,q,F):new RegExp(q)[N](E(F))},function(q){var F=g(this),V=E(q),R=U(D,F,V);if(R.done)return R.value;if(!F.global)return O(F,V);var L=F.unicode;F.lastIndex=0;for(var W,z=[],Z=0;(W=O(F,V))!==null;){var te=E(W[0]);z[Z]=te,te===""&&(F.lastIndex=T(V,w(F.lastIndex),L)),Z++}return Z===0?null:z}]})},5440:function(l,v,a){var h=a(8745),y=a(9565),g=a(9504),b=a(9228),w=a(9039),E=a(8551),S=a(4901),A=a(4117),T=a(1291),O=a(8014),N=a(655),D=a(7750),U=a(7829),q=a(5966),F=a(2478),V=a(6682),R=a(8227)("replace"),L=Math.max,W=Math.min,z=g([].concat),Z=g([].push),te=g("".indexOf),re=g("".slice),he="a".replace(/./,"$0")==="$0",ce=!!/./[R]&&/./[R]("a","$0")==="";b("replace",function(ye,le,$){var H=ce?"$":"$0";return[function(X,C){var j=D(this),B=A(X)?void 0:q(X,R);return B?y(B,X,j,C):y(le,N(j),X,C)},function(X,C){var j=E(this),B=N(X);if(typeof C=="string"&&te(C,H)===-1&&te(C,"$<")===-1){var M=$(le,j,B,C);if(M.done)return M.value}var ee=S(C);ee||(C=N(C));var J,Q=j.global;Q&&(J=j.unicode,j.lastIndex=0);for(var Y,pe=[];(Y=V(j,B))!==null&&(Z(pe,Y),Q);)N(Y[0])===""&&(j.lastIndex=U(B,O(j.lastIndex),J));for(var ge,ue="",ie=0,be=0;be<pe.length;be++){for(var oe,Ce=N((Y=pe[be])[0]),_e=L(W(T(Y.index),B.length),0),We=[],rt=1;rt<Y.length;rt++)Z(We,(ge=Y[rt])===void 0?ge:String(ge));var vt=Y.groups;if(ee){var ht=z([Ce],We,_e,B);vt!==void 0&&Z(ht,vt),oe=N(h(C,void 0,ht))}else oe=F(Ce,B,_e,We,vt,C);_e>=ie&&(ue+=re(B,ie,_e)+oe,ie=_e+Ce.length)}return ue+re(B,ie)}]},!!w(function(){var ye=/./;return ye.exec=function(){var le=[];return le.groups={a:"7"},le},"".replace(ye,"$<a>")!=="7"})||!he||ce)},744:function(l,v,a){var h=a(9565),y=a(9504),g=a(9228),b=a(8551),w=a(4117),E=a(7750),S=a(2293),A=a(7829),T=a(8014),O=a(655),N=a(5966),D=a(6682),U=a(8429),q=a(9039),F=U.UNSUPPORTED_Y,V=Math.min,R=y([].push),L=y("".slice),W=!q(function(){var Z=/(?:)/,te=Z.exec;Z.exec=function(){return te.apply(this,arguments)};var re="ab".split(Z);return re.length!==2||re[0]!=="a"||re[1]!=="b"}),z="abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length;g("split",function(Z,te,re){var he="0".split(void 0,0).length?function(ce,ye){return ce===void 0&&ye===0?[]:h(te,this,ce,ye)}:te;return[function(ce,ye){var le=E(this),$=w(ce)?void 0:N(ce,Z);return $?h($,ce,le,ye):h(he,O(le),ce,ye)},function(ce,ye){var le=b(this),$=O(ce);if(!z){var H=re(he,le,$,ye,he!==te);if(H.done)return H.value}var X=S(le,RegExp),C=le.unicode,j=(le.ignoreCase?"i":"")+(le.multiline?"m":"")+(le.unicode?"u":"")+(F?"g":"y"),B=new X(F?"^(?:"+le.source+")":le,j),M=ye===void 0?4294967295:ye>>>0;if(M===0)return[];if($.length===0)return D(B,$)===null?[$]:[];for(var ee=0,J=0,Q=[];J<$.length;){B.lastIndex=F?0:J;var Y,pe=D(B,F?L($,J):$);if(pe===null||(Y=V(T(B.lastIndex+(F?J:0)),$.length))===ee)J=A($,J,C);else{if(R(Q,L($,ee,J)),Q.length===M)return Q;for(var ge=1;ge<=pe.length-1;ge++)if(R(Q,pe[ge]),Q.length===M)return Q;J=ee=Y}}return R(Q,L($,ee)),Q}]},z||!W,F)},2762:function(l,v,a){var h=a(6518),y=a(3802).trim;h({target:"String",proto:!0,forced:a(706)("trim")},{trim:function(){return y(this)}})},6761:function(l,v,a){var h=a(6518),y=a(4475),g=a(9565),b=a(9504),w=a(6395),E=a(3724),S=a(4495),A=a(9039),T=a(9297),O=a(1625),N=a(8551),D=a(5397),U=a(6969),q=a(655),F=a(6980),V=a(2360),R=a(1072),L=a(8480),W=a(298),z=a(3717),Z=a(7347),te=a(4913),re=a(6801),he=a(8773),ce=a(6840),ye=a(2106),le=a(5745),$=a(6119),H=a(421),X=a(3392),C=a(8227),j=a(1951),B=a(511),M=a(8242),ee=a(687),J=a(1181),Q=a(9213).forEach,Y=$("hidden"),pe="Symbol",ge="prototype",ue=J.set,ie=J.getterFor(pe),be=Object[ge],oe=y.Symbol,Ce=oe&&oe[ge],_e=y.RangeError,We=y.TypeError,rt=y.QObject,vt=Z.f,ht=te.f,Kn=W.f,ct=he.f,nn=b([].push),pt=le("symbols"),Re=le("op-symbols"),ln=le("wks"),Lt=!rt||!rt[ge]||!rt[ge].findChild,hn=function(Ae,Ke,Pe){var Ge=vt(be,Ke);Ge&&delete be[Ke],ht(Ae,Ke,Pe),Ge&&Ae!==be&&ht(be,Ke,Ge)},rn=E&&A(function(){return V(ht({},"a",{get:function(){return ht(this,"a",{value:7}).a}})).a!==7})?hn:ht,pn=function(Ae,Ke){var Pe=pt[Ae]=V(Ce);return ue(Pe,{type:pe,tag:Ae,description:Ke}),E||(Pe.description=Ke),Pe},Rn=function(Ae,Ke,Pe){Ae===be&&Rn(Re,Ke,Pe),N(Ae);var Ge=U(Ke);return N(Pe),T(pt,Ge)?(Pe.enumerable?(T(Ae,Y)&&Ae[Y][Ge]&&(Ae[Y][Ge]=!1),Pe=V(Pe,{enumerable:F(0,!1)})):(T(Ae,Y)||ht(Ae,Y,F(1,V(null))),Ae[Y][Ge]=!0),rn(Ae,Ge,Pe)):ht(Ae,Ge,Pe)},Fn=function(Ae,Ke){N(Ae);var Pe=D(Ke),Ge=R(Pe).concat(zn(Pe));return Q(Ge,function(Ot){E&&!g(xn,Pe,Ot)||Rn(Ae,Ot,Pe[Ot])}),Ae},xn=function(Ae){var Ke=U(Ae),Pe=g(ct,this,Ke);return!(this===be&&T(pt,Ke)&&!T(Re,Ke))&&(!(Pe||!T(this,Ke)||!T(pt,Ke)||T(this,Y)&&this[Y][Ke])||Pe)},mn=function(Ae,Ke){var Pe=D(Ae),Ge=U(Ke);if(Pe!==be||!T(pt,Ge)||T(Re,Ge)){var Ot=vt(Pe,Ge);return!Ot||!T(pt,Ge)||T(Pe,Y)&&Pe[Y][Ge]||(Ot.enumerable=!0),Ot}},At=function(Ae){var Ke=Kn(D(Ae)),Pe=[];return Q(Ke,function(Ge){T(pt,Ge)||T(H,Ge)||nn(Pe,Ge)}),Pe},zn=function(Ae){var Ke=Ae===be,Pe=Kn(Ke?Re:D(Ae)),Ge=[];return Q(Pe,function(Ot){!T(pt,Ot)||Ke&&!T(be,Ot)||nn(Ge,pt[Ot])}),Ge};S||(oe=function(){if(O(Ce,this))throw new We("Symbol is not a constructor");var Ae=arguments.length&&arguments[0]!==void 0?q(arguments[0]):void 0,Ke=X(Ae),Pe=function(Ge){var Ot=this===void 0?y:this;Ot===be&&g(Pe,Re,Ge),T(Ot,Y)&&T(Ot[Y],Ke)&&(Ot[Y][Ke]=!1);var js=F(1,Ge);try{rn(Ot,Ke,js)}catch(bi){if(!(bi instanceof _e))throw bi;hn(Ot,Ke,js)}};return E&&Lt&&rn(be,Ke,{configurable:!0,set:Pe}),pn(Ke,Ae)},ce(Ce=oe[ge],"toString",function(){return ie(this).tag}),ce(oe,"withoutSetter",function(Ae){return pn(X(Ae),Ae)}),he.f=xn,te.f=Rn,re.f=Fn,Z.f=mn,L.f=W.f=At,z.f=zn,j.f=function(Ae){return pn(C(Ae),Ae)},E&&(ye(Ce,"description",{configurable:!0,get:function(){return ie(this).description}}),w||ce(be,"propertyIsEnumerable",xn,{unsafe:!0}))),h({global:!0,constructor:!0,wrap:!0,forced:!S,sham:!S},{Symbol:oe}),Q(R(ln),function(Ae){B(Ae)}),h({target:pe,stat:!0,forced:!S},{useSetter:function(){Lt=!0},useSimple:function(){Lt=!1}}),h({target:"Object",stat:!0,forced:!S,sham:!E},{create:function(Ae,Ke){return Ke===void 0?V(Ae):Fn(V(Ae),Ke)},defineProperty:Rn,defineProperties:Fn,getOwnPropertyDescriptor:mn}),h({target:"Object",stat:!0,forced:!S},{getOwnPropertyNames:At}),M(),ee(oe,pe),H[Y]=!0},9463:function(l,v,a){var h=a(6518),y=a(3724),g=a(4475),b=a(9504),w=a(9297),E=a(4901),S=a(1625),A=a(655),T=a(2106),O=a(7740),N=g.Symbol,D=N&&N.prototype;if(y&&E(N)&&(!("description"in D)||N().description!==void 0)){var U={},q=function(){var Z=arguments.length<1||arguments[0]===void 0?void 0:A(arguments[0]),te=S(D,this)?new N(Z):Z===void 0?N():N(Z);return Z===""&&(U[te]=!0),te};O(q,N),q.prototype=D,D.constructor=q;var F=String(N("description detection"))==="Symbol(description detection)",V=b(D.valueOf),R=b(D.toString),L=/^Symbol\((.*)\)[^)]+$/,W=b("".replace),z=b("".slice);T(D,"description",{configurable:!0,get:function(){var Z=V(this);if(w(U,Z))return"";var te=R(Z),re=F?z(te,7,-1):W(te,L,"$1");return re===""?void 0:re}}),h({global:!0,constructor:!0,forced:!0},{Symbol:q})}},1510:function(l,v,a){var h=a(6518),y=a(7751),g=a(9297),b=a(655),w=a(5745),E=a(1296),S=w("string-to-symbol-registry"),A=w("symbol-to-string-registry");h({target:"Symbol",stat:!0,forced:!E},{for:function(T){var O=b(T);if(g(S,O))return S[O];var N=y("Symbol")(O);return S[O]=N,A[N]=O,N}})},2259:function(l,v,a){a(511)("iterator")},2675:function(l,v,a){a(6761),a(1510),a(7812),a(3110),a(9773)},7812:function(l,v,a){var h=a(6518),y=a(9297),g=a(757),b=a(6823),w=a(5745),E=a(1296),S=w("symbol-to-string-registry");h({target:"Symbol",stat:!0,forced:!E},{keyFor:function(A){if(!g(A))throw new TypeError(b(A)+" is not a symbol");if(y(S,A))return S[A]}})},5700:function(l,v,a){var h=a(511),y=a(8242);h("toPrimitive"),y()},8344:function(l,v,a){a(8543)},3500:function(l,v,a){var h=a(4475),y=a(7400),g=a(9296),b=a(235),w=a(6699),E=function(A){if(A&&A.forEach!==b)try{w(A,"forEach",b)}catch{A.forEach=b}};for(var S in y)y[S]&&E(h[S]&&h[S].prototype);E(g)},2953:function(l,v,a){var h=a(4475),y=a(7400),g=a(9296),b=a(3792),w=a(6699),E=a(687),S=a(8227)("iterator"),A=b.values,T=function(N,D){if(N){if(N[S]!==A)try{w(N,S,A)}catch{N[S]=A}if(E(N,D,!0),y[D]){for(var U in b)if(N[U]!==b[U])try{w(N,U,b[U])}catch{N[U]=b[U]}}}};for(var O in y)T(h[O]&&h[O].prototype,O);T(g,"DOMTokenList")}},d={};function f(l){var v=d[l];if(v!==void 0)return v.exports;var a=d[l]={exports:{}};return u[l].call(a.exports,a,a.exports,f),a.exports}f.d=function(l,v){for(var a in v)f.o(v,a)&&!f.o(l,a)&&Object.defineProperty(l,a,{enumerable:!0,get:v[a]})},f.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),f.o=function(l,v){return Object.prototype.hasOwnProperty.call(l,v)},f.r=function(l){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})};var p={};return function(){function l($){return function(H){if(Array.isArray(H))return a(H)}($)||function(H){if(typeof Symbol<"u"&&H[Symbol.iterator]!=null||H["@@iterator"]!=null)return Array.from(H)}($)||v($)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
98
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function v($,H){if($){if(typeof $=="string")return a($,H);var X=Object.prototype.toString.call($).slice(8,-1);return X==="Object"&&$.constructor&&(X=$.constructor.name),X==="Map"||X==="Set"?Array.from($):X==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(X)?a($,H):void 0}}function a($,H){(H==null||H>$.length)&&(H=$.length);for(var X=0,C=new Array(H);X<H;X++)C[X]=$[X];return C}function h($){return h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},h($)}function y($,H){for(var X=0;X<H.length;X++){var C=H[X];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty($,b(C.key),C)}}function g($,H,X){return(H=b(H))in $?Object.defineProperty($,H,{value:X,enumerable:!0,configurable:!0,writable:!0}):$[H]=X,$}function b($){var H=function(X,C){if(h(X)!="object"||!X)return X;var j=X[Symbol.toPrimitive];if(j!==void 0){var B=j.call(X,C||"default");if(h(B)!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(X)}($,"string");return h(H)=="symbol"?H:H+""}f.r(p),f.d(p,{SimpleKeyboard:function(){return ye},default:function(){return le}}),f(5276),f(8598),f(4782),f(4554),f(2010),f(7427),f(6099),f(7495),f(8781),f(5440),f(744),f(2762),typeof Element>"u"||"remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)}),typeof self<"u"&&"document"in self&&((!("classList"in document.createElement("_"))||document.createElementNS&&!("classList"in document.createElementNS("http://www.w3.org/2000/svg","g")))&&function($){if("Element"in $){var H="classList",X="prototype",C=$.Element[X],j=Object,B=String[X].trim||function(){return this.replace(/^\s+|\s+$/g,"")},M=Array[X].indexOf||function(ue){for(var ie=0,be=this.length;ie<be;ie++)if(ie in this&&this[ie]===ue)return ie;return-1},ee=function(ue,ie){this.name=ue,this.code=DOMException[ue],this.message=ie},J=function(ue,ie){if(ie==="")throw new ee("SYNTAX_ERR","The token must not be empty.");if(/\s/.test(ie))throw new ee("INVALID_CHARACTER_ERR","The token must not contain space characters.");return M.call(ue,ie)},Q=function(ue){for(var ie=B.call(ue.getAttribute("class")||""),be=ie?ie.split(/\s+/):[],oe=0,Ce=be.length;oe<Ce;oe++)this.push(be[oe]);this._updateClassName=function(){ue.setAttribute("class",this.toString())}},Y=Q[X]=[],pe=function(){return new Q(this)};if(ee[X]=Error[X],Y.item=function(ue){return this[ue]||null},Y.contains=function(ue){return~J(this,ue+"")},Y.add=function(){var ue,ie=arguments,be=0,oe=ie.length,Ce=!1;do~J(this,ue=ie[be]+"")||(this.push(ue),Ce=!0);while(++be<oe);Ce&&this._updateClassName()},Y.remove=function(){var ue,ie,be=arguments,oe=0,Ce=be.length,_e=!1;do for(ie=J(this,ue=be[oe]+"");~ie;)this.splice(ie,1),_e=!0,ie=J(this,ue);while(++oe<Ce);_e&&this._updateClassName()},Y.toggle=function(ue,ie){var be=this.contains(ue),oe=be?ie!==!0&&"remove":ie!==!1&&"add";return oe&&this[oe](ue),ie===!0||ie===!1?ie:!be},Y.replace=function(ue,ie){var be=J(ue+"");~be&&(this.splice(be,1,ie),this._updateClassName())},Y.toString=function(){return this.join(" ")},j.defineProperty){var ge={get:pe,enumerable:!0,configurable:!0};try{j.defineProperty(C,H,ge)}catch(ue){ue.number!==void 0&&ue.number!==-2146823252||(ge.enumerable=!1,j.defineProperty(C,H,ge))}}else j[X].__defineGetter__&&C.__defineGetter__(H,pe)}}(self),function(){var $=document.createElement("_");if($.classList.add("c1","c2"),!$.classList.contains("c2")){var H=function(C){var j=DOMTokenList.prototype[C];DOMTokenList.prototype[C]=function(B){var M,ee=arguments.length;for(M=0;M<ee;M++)B=arguments[M],j.call(this,B)}};H("add"),H("remove")}if($.classList.toggle("c3",!1),$.classList.contains("c3")){var X=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(C,j){return 1 in arguments&&!this.contains(C)==!j?j:X.call(this,C)}}"replace"in document.createElement("_").classList||(DOMTokenList.prototype.replace=function(C,j){var B=this.toString().split(" "),M=B.indexOf(C+"");~M&&(B=B.slice(M),this.remove.apply(this,B),this.add(j),this.add.apply(this,B.slice(1)))}),$=null}()),f(2675),f(9463),f(2259),f(5700),f(8706),f(2008),f(3418),f(4423),f(3792),f(2062),f(6910),f(739),f(9572),f(2892),f(9085),f(3851),f(1278),f(9432),f(4864),f(1699),f(7764),f(8344),f(3500),f(2953),f(2712),f(2637),f(1480),f(1761);var w=function(){return $=function C(j){var B=j.getOptions,M=j.getCaretPosition,ee=j.getCaretPositionEnd,J=j.dispatch;(function(Q,Y){if(!(Q instanceof Y))throw new TypeError("Cannot call a class as a function")})(this,C),g(this,"getOptions",void 0),g(this,"getCaretPosition",void 0),g(this,"getCaretPositionEnd",void 0),g(this,"dispatch",void 0),g(this,"maxLengthReached",void 0),g(this,"isStandardButton",function(Q){return Q&&!(Q[0]==="{"&&Q[Q.length-1]==="}")}),this.getOptions=B,this.getCaretPosition=M,this.getCaretPositionEnd=ee,this.dispatch=J,C.bindMethods(C,this)},H=[{key:"getButtonType",value:function(C){return C.includes("{")&&C.includes("}")&&C!=="{//}"?"functionBtn":"standardBtn"}},{key:"getButtonClass",value:function(C){var j=this.getButtonType(C),B=C.replace("{","").replace("}",""),M="";return j!=="standardBtn"&&(M=" hg-button-".concat(B)),"hg-".concat(j).concat(M)}},{key:"getDefaultDiplay",value:function(){return{"{bksp}":"backspace","{backspace}":"backspace","{enter}":"< enter","{shift}":"shift","{shiftleft}":"shift","{shiftright}":"shift","{alt}":"alt","{s}":"shift","{tab}":"tab","{lock}":"caps","{capslock}":"caps","{accept}":"Submit","{space}":" ","{//}":" ","{esc}":"esc","{escape}":"esc","{f1}":"f1","{f2}":"f2","{f3}":"f3","{f4}":"f4","{f5}":"f5","{f6}":"f6","{f7}":"f7","{f8}":"f8","{f9}":"f9","{f10}":"f10","{f11}":"f11","{f12}":"f12","{numpaddivide}":"/","{numlock}":"lock","{arrowup}":"↑","{arrowleft}":"←","{arrowdown}":"↓","{arrowright}":"→","{prtscr}":"print","{scrolllock}":"scroll","{pause}":"pause","{insert}":"ins","{home}":"home","{pageup}":"up","{delete}":"del","{forwarddelete}":"del","{end}":"end","{pagedown}":"down","{numpadmultiply}":"*","{numpadsubtract}":"-","{numpadadd}":"+","{numpadenter}":"enter","{period}":".","{numpaddecimal}":".","{numpad0}":"0","{numpad1}":"1","{numpad2}":"2","{numpad3}":"3","{numpad4}":"4","{numpad5}":"5","{numpad6}":"6","{numpad7}":"7","{numpad8}":"8","{numpad9}":"9"}}},{key:"getButtonDisplayName",value:function(C,j){return(j=arguments.length>2&&arguments[2]!==void 0&&arguments[2]?Object.assign({},this.getDefaultDiplay(),j):j||this.getDefaultDiplay())[C]||C}},{key:"getUpdatedInput",value:function(C,j,B){var M=arguments.length>3&&arguments[3]!==void 0?arguments[3]:B,ee=arguments.length>4&&arguments[4]!==void 0&&arguments[4],J=this.getOptions(),Q=[B,M,ee],Y=j;return(C==="{bksp}"||C==="{backspace}")&&Y.length>0?Y=this.removeAt.apply(this,[Y].concat(Q)):(C==="{delete}"||C==="{forwarddelete}")&&Y.length>0?Y=this.removeForwardsAt.apply(this,[Y].concat(Q)):C==="{space}"?Y=this.addStringAt.apply(this,[Y," "].concat(Q)):C!=="{tab}"||typeof J.tabCharOnTab=="boolean"&&J.tabCharOnTab===!1?C!=="{enter}"&&C!=="{numpadenter}"||!J.newLineOnEnter?C.includes("numpad")&&Number.isInteger(Number(C[C.length-2]))?Y=this.addStringAt.apply(this,[Y,C[C.length-2]].concat(Q)):C==="{numpaddivide}"?Y=this.addStringAt.apply(this,[Y,"/"].concat(Q)):C==="{numpadmultiply}"?Y=this.addStringAt.apply(this,[Y,"*"].concat(Q)):C==="{numpadsubtract}"?Y=this.addStringAt.apply(this,[Y,"-"].concat(Q)):C==="{numpadadd}"?Y=this.addStringAt.apply(this,[Y,"+"].concat(Q)):C==="{numpaddecimal}"?Y=this.addStringAt.apply(this,[Y,"."].concat(Q)):C==="{"||C==="}"?Y=this.addStringAt.apply(this,[Y,C].concat(Q)):C.includes("{")||C.includes("}")||(Y=this.addStringAt.apply(this,[Y,C].concat(Q))):Y=this.addStringAt.apply(this,[Y,`
99
- `].concat(Q)):Y=this.addStringAt.apply(this,[Y," "].concat(Q)),J.debug&&console.log("Input will be: "+Y),Y}},{key:"updateCaretPos",value:function(C){var j=arguments.length>1&&arguments[1]!==void 0&&arguments[1],B=this.updateCaretPosAction(C,j);this.dispatch(function(M){M.setCaretPosition(B)})}},{key:"updateCaretPosAction",value:function(C){var j=arguments.length>1&&arguments[1]!==void 0&&arguments[1],B=this.getOptions(),M=this.getCaretPosition();return M!=null&&(j?M>0&&(M-=C):M+=C),B.debug&&console.log("Caret at:",M),M}},{key:"addStringAt",value:function(C,j){var B,M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:C.length,ee=arguments.length>3&&arguments[3]!==void 0?arguments[3]:C.length,J=arguments.length>4&&arguments[4]!==void 0&&arguments[4];return M||M===0?(B=[C.slice(0,M),j,C.slice(ee)].join(""),this.isMaxLengthReached()||J&&this.updateCaretPos(j.length)):B=C+j,B}},{key:"removeAt",value:function(C){var j,B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:C.length,M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:C.length,ee=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(B===0&&M===0)return C;if(B===M){var J=/([\uD800-\uDBFF][\uDC00-\uDFFF])/g;B&&B>=0?C.substring(B-2,B).match(J)?(j=C.substr(0,B-2)+C.substr(B),ee&&this.updateCaretPos(2,!0)):(j=C.substr(0,B-1)+C.substr(B),ee&&this.updateCaretPos(1,!0)):C.slice(-2).match(J)?(j=C.slice(0,-2),ee&&this.updateCaretPos(2,!0)):(j=C.slice(0,-1),ee&&this.updateCaretPos(1,!0))}else j=C.slice(0,B)+C.slice(M),ee&&this.dispatch(function(Q){Q.setCaretPosition(B)});return j}},{key:"removeForwardsAt",value:function(C){var j,B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:C.length,M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:C.length,ee=arguments.length>3&&arguments[3]!==void 0&&arguments[3];return C!=null&&C.length&&B!==null?(B===M?j=C.substring(B,B+2).match(/([\uD800-\uDBFF][\uDC00-\uDFFF])/g)?C.substr(0,B)+C.substr(B+2):C.substr(0,B)+C.substr(B+1):(j=C.slice(0,B)+C.slice(M),ee&&this.dispatch(function(J){J.setCaretPosition(B)})),j):C}},{key:"handleMaxLength",value:function(C,j){var B=this.getOptions(),M=B.maxLength,ee=C[B.inputName||"default"],J=j.length-1>=M;if(j.length<=ee.length)return!1;if(Number.isInteger(M))return B.debug&&console.log("maxLength (num) reached:",J),J?(this.maxLengthReached=!0,!0):(this.maxLengthReached=!1,!1);if(h(M)==="object"){var Q=j.length-1>=M[B.inputName||"default"];return B.debug&&console.log("maxLength (obj) reached:",Q),Q?(this.maxLengthReached=!0,!0):(this.maxLengthReached=!1,!1)}}},{key:"isMaxLengthReached",value:function(){return!!this.maxLengthReached}},{key:"isTouchDevice",value:function(){return"ontouchstart"in window||navigator.maxTouchPoints}},{key:"pointerEventsSupported",value:function(){return!!window.PointerEvent}},{key:"camelCase",value:function(C){return C?C.toLowerCase().trim().split(/[.\-_\s]/g).reduce(function(j,B){return B.length?j+B[0].toUpperCase()+B.slice(1):j}):""}},{key:"chunkArray",value:function(C,j){return l(Array(Math.ceil(C.length/j))).map(function(B,M){return C.slice(j*M,j+j*M)})}},{key:"escapeRegex",value:function(C){return C.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}},{key:"getRtlOffset",value:function(C,j){var B=C,M=j.indexOf("‫");return M<C&&M!=-1&&B--,j.indexOf("‬")<C&&M!=-1&&B--,B<0?0:B}}],X=[{key:"bindMethods",value:function(C,j){var B,M=function(J,Q){var Y=typeof Symbol<"u"&&J[Symbol.iterator]||J["@@iterator"];if(!Y){if(Array.isArray(J)||(Y=v(J))||Q){Y&&(J=Y);var pe=0,ge=function(){};return{s:ge,n:function(){return pe>=J.length?{done:!0}:{done:!1,value:J[pe++]}},e:function(oe){throw oe},f:ge}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
100
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ue,ie=!0,be=!1;return{s:function(){Y=Y.call(J)},n:function(){var oe=Y.next();return ie=oe.done,oe},e:function(oe){be=!0,ue=oe},f:function(){try{ie||Y.return==null||Y.return()}finally{if(be)throw ue}}}}(Object.getOwnPropertyNames(C.prototype));try{for(M.s();!(B=M.n()).done;){var ee=B.value;ee==="constructor"||ee==="bindMethods"||(j[ee]=j[ee].bind(j))}}catch(J){M.e(J)}finally{M.f()}}}],H&&y($.prototype,H),X&&y($,X),Object.defineProperty($,"prototype",{writable:!1}),$;var $,H,X}();g(w,"noop",function(){});var E=w;function S($){return S=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},S($)}function A($,H){for(var X=0;X<H.length;X++){var C=H[X];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty($,O(C.key),C)}}function T($,H,X){return(H=O(H))in $?Object.defineProperty($,H,{value:X,enumerable:!0,configurable:!0,writable:!0}):$[H]=X,$}function O($){var H=function(X,C){if(S(X)!="object"||!X)return X;var j=X[Symbol.toPrimitive];if(j!==void 0){var B=j.call(X,C);if(S(B)!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(X)}($,"string");return S(H)=="symbol"?H:H+""}var N=function(){return $=function C(j){var B=this,M=j.dispatch,ee=j.getOptions;(function(J,Q){if(!(J instanceof Q))throw new TypeError("Cannot call a class as a function")})(this,C),T(this,"getOptions",void 0),T(this,"dispatch",void 0),T(this,"isModifierKey",function(J){return J.altKey||J.ctrlKey||J.shiftKey||["Tab","CapsLock","Esc","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(J.code||J.key||B.keyCodeToKey(J==null?void 0:J.keyCode))}),this.dispatch=M,this.getOptions=ee,E.bindMethods(C,this)},(H=[{key:"handleHighlightKeyDown",value:function(C){var j=this.getOptions();j.physicalKeyboardHighlightPreventDefault&&this.isModifierKey(C)&&(C.preventDefault(),C.stopImmediatePropagation());var B=this.getSimpleKeyboardLayoutKey(C);this.dispatch(function(M){var ee,J,Q=M.getButtonElement(B),Y=M.getButtonElement("{".concat(B,"}"));if(Q)ee=Q,J=B;else{if(!Y)return;ee=Y,J="{".concat(B,"}")}var pe,ge,ue,ie,be=function(Ce){Ce.style.background=j.physicalKeyboardHighlightBgColor||"#dadce4",Ce.style.color=j.physicalKeyboardHighlightTextColor||"black"};if(ee)if(Array.isArray(ee)){if(ee.forEach(function(Ce){return be(Ce)}),j.physicalKeyboardHighlightPress)if(j.physicalKeyboardHighlightPressUsePointerEvents)(pe=ee[0])===null||pe===void 0||(ge=pe.onpointerdown)===null||ge===void 0||ge.call(pe,C);else if(j.physicalKeyboardHighlightPressUseClick){var oe;(oe=ee[0])===null||oe===void 0||oe.click()}else M.handleButtonClicked(J,C)}else be(ee),j.physicalKeyboardHighlightPress&&(j.physicalKeyboardHighlightPressUsePointerEvents?(ue=ee)===null||ue===void 0||(ie=ue.onpointerdown)===null||ie===void 0||ie.call(ue,C):j.physicalKeyboardHighlightPressUseClick?ee.click():M.handleButtonClicked(J,C))})}},{key:"handleHighlightKeyUp",value:function(C){var j=this.getOptions();j.physicalKeyboardHighlightPreventDefault&&this.isModifierKey(C)&&(C.preventDefault(),C.stopImmediatePropagation());var B=this.getSimpleKeyboardLayoutKey(C);this.dispatch(function(M){var ee,J,Q,Y=M.getButtonElement(B)||M.getButtonElement("{".concat(B,"}")),pe=function(ge){ge.removeAttribute&&ge.removeAttribute("style")};Y&&(Array.isArray(Y)?(Y.forEach(function(ge){return pe(ge)}),j.physicalKeyboardHighlightPressUsePointerEvents&&((ee=Y[0])===null||ee===void 0||(J=ee.onpointerup)===null||J===void 0||J.call(ee,C))):(pe(Y),j.physicalKeyboardHighlightPressUsePointerEvents&&(Y==null||(Q=Y.onpointerup)===null||Q===void 0||Q.call(Y,C))))})}},{key:"getSimpleKeyboardLayoutKey",value:function(C){var j,B="",M=C.code||C.key||this.keyCodeToKey(C==null?void 0:C.keyCode);return(B=M!=null&&M.includes("Numpad")||M!=null&&M.includes("Shift")||M!=null&&M.includes("Space")||M!=null&&M.includes("Backspace")||M!=null&&M.includes("Control")||M!=null&&M.includes("Alt")||M!=null&&M.includes("Meta")?C.code||"":C.key||this.keyCodeToKey(C==null?void 0:C.keyCode)||"").length>1?(j=B)===null||j===void 0?void 0:j.toLowerCase():B}},{key:"keyCodeToKey",value:function(C){return{8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",91:"Meta",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9",106:"NumpadMultiply",107:"NumpadAdd",109:"NumpadSubtract",110:"NumpadDecimal",111:"NumpadDivide",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"}[C]||""}}])&&A($.prototype,H),X&&A($,X),Object.defineProperty($,"prototype",{writable:!1}),$;var $,H,X}();function D($){return D=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},D($)}function U($,H){for(var X=0;X<H.length;X++){var C=H[X];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty($,F(C.key),C)}}function q($,H,X){return(H=F(H))in $?Object.defineProperty($,H,{value:X,enumerable:!0,configurable:!0,writable:!0}):$[H]=X,$}function F($){var H=function(X,C){if(D(X)!="object"||!X)return X;var j=X[Symbol.toPrimitive];if(j!==void 0){var B=j.call(X,C);if(D(B)!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(X)}($,"string");return D(H)=="symbol"?H:H+""}var V=function(){return $=function C(j){var B=j.utilities,M=j.options;(function(ee,J){if(!(ee instanceof J))throw new TypeError("Cannot call a class as a function")})(this,C),q(this,"utilities",void 0),q(this,"options",void 0),q(this,"candidateBoxElement",void 0),q(this,"pageIndex",0),q(this,"pageSize",void 0),this.utilities=B,this.options=M,E.bindMethods(C,this),this.pageSize=this.utilities.getOptions().layoutCandidatesPageSize||5},H=[{key:"destroy",value:function(){this.candidateBoxElement&&(this.candidateBoxElement.remove(),this.pageIndex=0)}},{key:"show",value:function(C){var j=this,B=C.candidateValue,M=C.targetElement,ee=C.onSelect;if(B&&B.length){var J=this.utilities.chunkArray(B.split(" "),this.pageSize);this.renderPage({candidateListPages:J,targetElement:M,pageIndex:this.pageIndex,nbPages:J.length,onItemSelected:function(Q,Y){ee(Q,Y),j.destroy()}})}}},{key:"renderPage",value:function(C){var j,B=this,M=C.candidateListPages,ee=C.targetElement,J=C.pageIndex,Q=C.nbPages,Y=C.onItemSelected;(j=this.candidateBoxElement)===null||j===void 0||j.remove(),this.candidateBoxElement=document.createElement("div"),this.candidateBoxElement.className="hg-candidate-box";var pe=document.createElement("ul");pe.className="hg-candidate-box-list",M[J].forEach(function(_e){var We,rt=document.createElement("li"),vt=function(){var ht=new(B.options.useTouchEvents?TouchEvent:MouseEvent)("click");return Object.defineProperty(ht,"target",{value:rt}),ht};rt.className="hg-candidate-box-list-item",rt.innerHTML=((We=B.options.display)===null||We===void 0?void 0:We[_e])||_e,B.options.useTouchEvents?rt.ontouchstart=function(ht){return Y(_e,ht||vt())}:rt.onclick=function(){var ht=arguments.length>0&&arguments[0]!==void 0?arguments[0]:vt();return Y(_e,ht)},pe.appendChild(rt)});var ge=J>0,ue=document.createElement("div");ue.classList.add("hg-candidate-box-prev"),ge&&ue.classList.add("hg-candidate-box-btn-active");var ie=function(){ge&&B.renderPage({candidateListPages:M,targetElement:ee,pageIndex:J-1,nbPages:Q,onItemSelected:Y})};this.options.useTouchEvents?ue.ontouchstart=ie:ue.onclick=ie,this.candidateBoxElement.appendChild(ue),this.candidateBoxElement.appendChild(pe);var be=J<Q-1,oe=document.createElement("div");oe.classList.add("hg-candidate-box-next"),be&&oe.classList.add("hg-candidate-box-btn-active");var Ce=function(){be&&B.renderPage({candidateListPages:M,targetElement:ee,pageIndex:J+1,nbPages:Q,onItemSelected:Y})};this.options.useTouchEvents?oe.ontouchstart=Ce:oe.onclick=Ce,this.candidateBoxElement.appendChild(oe),ee.prepend(this.candidateBoxElement)}}],H&&U($.prototype,H),X&&U($,X),Object.defineProperty($,"prototype",{writable:!1}),$;var $,H,X}(),R=V;function L($){return function(H){if(Array.isArray(H))return W(H)}($)||function(H){if(typeof Symbol<"u"&&H[Symbol.iterator]!=null||H["@@iterator"]!=null)return Array.from(H)}($)||function(H,X){if(H){if(typeof H=="string")return W(H,X);var C=Object.prototype.toString.call(H).slice(8,-1);return C==="Object"&&H.constructor&&(C=H.constructor.name),C==="Map"||C==="Set"?Array.from(H):C==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C)?W(H,X):void 0}}($)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
101
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function W($,H){(H==null||H>$.length)&&(H=$.length);for(var X=0,C=new Array(H);X<H;X++)C[X]=$[X];return C}function z($){return z=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},z($)}function Z($,H){var X=Object.keys($);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols($);H&&(C=C.filter(function(j){return Object.getOwnPropertyDescriptor($,j).enumerable})),X.push.apply(X,C)}return X}function te($,H){for(var X=0;X<H.length;X++){var C=H[X];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty($,he(C.key),C)}}function re($,H,X){return(H=he(H))in $?Object.defineProperty($,H,{value:X,enumerable:!0,configurable:!0,writable:!0}):$[H]=X,$}function he($){var H=function(X,C){if(z(X)!="object"||!X)return X;var j=X[Symbol.toPrimitive];if(j!==void 0){var B=j.call(X,C);if(z(B)!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(X)}($,"string");return z(H)=="symbol"?H:H+""}var ce=function(){return $=function C(j,B){var M=this;if(function(ie,be){if(!(ie instanceof be))throw new TypeError("Cannot call a class as a function")}(this,C),re(this,"input",void 0),re(this,"options",void 0),re(this,"utilities",void 0),re(this,"caretPosition",void 0),re(this,"caretPositionEnd",void 0),re(this,"keyboardDOM",void 0),re(this,"keyboardPluginClasses",void 0),re(this,"keyboardDOMClass",void 0),re(this,"buttonElements",void 0),re(this,"currentInstanceName",void 0),re(this,"allKeyboardInstances",void 0),re(this,"keyboardInstanceNames",void 0),re(this,"isFirstKeyboardInstance",void 0),re(this,"physicalKeyboard",void 0),re(this,"modules",void 0),re(this,"activeButtonClass",void 0),re(this,"holdInteractionTimeout",void 0),re(this,"holdTimeout",void 0),re(this,"isMouseHold",void 0),re(this,"initialized",void 0),re(this,"candidateBox",void 0),re(this,"keyboardRowsDOM",void 0),re(this,"defaultName","default"),re(this,"activeInputElement",null),re(this,"handleParams",function(ie,be){var oe,Ce,_e;if(typeof ie=="string")oe=ie.split(".").join(""),Ce=document.querySelector(".".concat(oe)),_e=be;else if(ie instanceof HTMLDivElement){if(!ie.className)throw console.warn("Any DOM element passed as parameter must have a class."),new Error("KEYBOARD_DOM_CLASS_ERROR");oe=ie.className.split(" ")[0],Ce=ie,_e=be}else oe="simple-keyboard",Ce=document.querySelector(".".concat(oe)),_e=ie;return{keyboardDOMClass:oe,keyboardDOM:Ce,options:_e}}),re(this,"getOptions",function(){return M.options}),re(this,"getCaretPosition",function(){return M.caretPosition}),re(this,"getCaretPositionEnd",function(){return M.caretPositionEnd}),re(this,"registerModule",function(ie,be){M.modules[ie]||(M.modules[ie]={}),be(M.modules[ie])}),re(this,"getKeyboardClassString",function(){for(var ie=arguments.length,be=new Array(ie),oe=0;oe<ie;oe++)be[oe]=arguments[oe];return[M.keyboardDOMClass].concat(be).filter(function(Ce){return!!Ce}).join(" ")}),typeof window<"u"){var ee=this.handleParams(j,B),J=ee.keyboardDOMClass,Q=ee.keyboardDOM,Y=ee.options,pe=Y===void 0?{}:Y;this.utilities=new E({getOptions:this.getOptions,getCaretPosition:this.getCaretPosition,getCaretPositionEnd:this.getCaretPositionEnd,dispatch:this.dispatch}),this.caretPosition=null,this.caretPositionEnd=null,this.keyboardDOM=Q,this.options=function(ie){for(var be=1;be<arguments.length;be++){var oe=arguments[be]!=null?arguments[be]:{};be%2?Z(Object(oe),!0).forEach(function(Ce){re(ie,Ce,oe[Ce])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ie,Object.getOwnPropertyDescriptors(oe)):Z(Object(oe)).forEach(function(Ce){Object.defineProperty(ie,Ce,Object.getOwnPropertyDescriptor(oe,Ce))})}return ie}({layoutName:"default",theme:"hg-theme-default",inputName:"default",preventMouseDownDefault:!1,enableLayoutCandidates:!0,excludeFromLayout:{}},pe),this.keyboardPluginClasses="",E.bindMethods(C,this);var ge=this.options.inputName,ue=ge===void 0?this.defaultName:ge;if(this.input={},this.input[ue]="",this.keyboardDOMClass=J,this.buttonElements={},window.SimpleKeyboardInstances||(window.SimpleKeyboardInstances={}),this.currentInstanceName=this.utilities.camelCase(this.keyboardDOMClass),window.SimpleKeyboardInstances[this.currentInstanceName]=this,this.allKeyboardInstances=window.SimpleKeyboardInstances,this.keyboardInstanceNames=Object.keys(window.SimpleKeyboardInstances),this.isFirstKeyboardInstance=this.keyboardInstanceNames[0]===this.currentInstanceName,this.physicalKeyboard=new N({dispatch:this.dispatch,getOptions:this.getOptions}),this.candidateBox=this.options.enableLayoutCandidates?new R({utilities:this.utilities,options:this.options}):null,!this.keyboardDOM)throw console.warn('".'.concat(J,'" was not found in the DOM.')),new Error("KEYBOARD_DOM_ERROR");this.render(),this.modules={},this.loadModules()}},H=[{key:"setCaretPosition",value:function(C){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:C;this.caretPosition=C,this.caretPositionEnd=j}},{key:"getInputCandidates",value:function(C){var j=this,B=this.options,M=B.layoutCandidates,ee=B.layoutCandidatesCaseSensitiveMatch;if(!M||z(M)!=="object")return{};var J=Object.keys(M).filter(function(pe){var ge=C.substring(0,j.getCaretPositionEnd()||0)||C,ue=new RegExp("".concat(j.utilities.escapeRegex(pe),"$"),ee?"g":"gi");return!!L(ge.matchAll(ue)).length});if(J.length>1){var Q=J.sort(function(pe,ge){return ge.length-pe.length})[0];return{candidateKey:Q,candidateValue:M[Q]}}if(J.length){var Y=J[0];return{candidateKey:Y,candidateValue:M[Y]}}return{}}},{key:"showCandidatesBox",value:function(C,j,B){var M=this;this.candidateBox&&this.candidateBox.show({candidateValue:j,targetElement:B,onSelect:function(ee,J){var Q=M.options,Y=Q.layoutCandidatesCaseSensitiveMatch,pe=Q.disableCandidateNormalization,ge=Q.enableLayoutCandidatesKeyPress,ue=ee;pe||(ue=ee.normalize("NFD")),typeof M.options.beforeInputUpdate=="function"&&M.options.beforeInputUpdate(M);var ie=M.getInput(M.options.inputName,!0),be=M.getCaretPositionEnd()||0,oe=ie.substring(0,be||0)||ie,Ce=new RegExp("".concat(M.utilities.escapeRegex(C),"$"),Y?"g":"gi"),_e=oe.replace(Ce,ue),We=ie.replace(oe,_e),rt=_e.length-oe.length,vt=(be||ie.length)+rt;vt<0&&(vt=0),M.setInput(We,M.options.inputName,!0),M.setCaretPosition(vt),ge&&typeof M.options.onKeyPress=="function"&&M.options.onKeyPress(ee,J),typeof M.options.onChange=="function"&&M.options.onChange(M.getInput(M.options.inputName,!0),J),typeof M.options.onChangeAll=="function"&&M.options.onChangeAll(M.getAllInputs(),J)}})}},{key:"handleButtonClicked",value:function(C,j){var B=this.options,M=B.inputName,ee=M===void 0?this.defaultName:M,J=B.debug;if(C!=="{//}"){this.input[ee]||(this.input[ee]=""),typeof this.options.beforeInputUpdate=="function"&&this.options.beforeInputUpdate(this);var Q=this.utilities.getUpdatedInput(C,this.input[ee],this.caretPosition,this.caretPositionEnd);if(this.utilities.isStandardButton(C)&&this.activeInputElement&&this.input[ee]&&this.input[ee]===Q&&this.caretPosition===0&&this.caretPositionEnd===Q.length)return this.setInput("",this.options.inputName,!0),this.setCaretPosition(0),this.activeInputElement.value="",this.activeInputElement.setSelectionRange(0,0),void this.handleButtonClicked(C,j);if(typeof this.options.onKeyPress=="function"&&this.options.onKeyPress(C,j),this.input[ee]!==Q&&(!this.options.inputPattern||this.options.inputPattern&&this.inputPatternIsValid(Q))){if(this.options.maxLength&&this.utilities.handleMaxLength(this.input,Q))return;var Y=this.utilities.getUpdatedInput(C,this.input[ee],this.caretPosition,this.caretPositionEnd,!0);if(this.setInput(Y,this.options.inputName,!0),J&&console.log("Input changed:",this.getAllInputs()),this.options.debug&&console.log("Caret at: ",this.getCaretPosition(),this.getCaretPositionEnd(),"(".concat(this.keyboardDOMClass,")"),j==null?void 0:j.type),this.options.syncInstanceInputs&&this.syncInstanceInputs(),typeof this.options.onChange=="function"&&this.options.onChange(this.getInput(this.options.inputName,!0),j),typeof this.options.onChangeAll=="function"&&this.options.onChangeAll(this.getAllInputs(),j),j!=null&&j.target&&this.options.enableLayoutCandidates){var pe,ge=this.getInputCandidates(Q),ue=ge.candidateKey,ie=ge.candidateValue;ue&&ie?this.showCandidatesBox(ue,ie,this.keyboardDOM):(pe=this.candidateBox)===null||pe===void 0||pe.destroy()}}this.caretPositionEnd&&this.caretPosition!==this.caretPositionEnd&&(this.setCaretPosition(this.caretPositionEnd,this.caretPositionEnd),this.activeInputElement&&this.activeInputElement.setSelectionRange(this.caretPositionEnd,this.caretPositionEnd),this.options.debug&&console.log("Caret position aligned",this.caretPosition)),J&&console.log("Key pressed:",C)}}},{key:"getMouseHold",value:function(){return this.isMouseHold}},{key:"setMouseHold",value:function(C){this.options.syncInstanceInputs?this.dispatch(function(j){j.isMouseHold=C}):this.isMouseHold=C}},{key:"handleButtonMouseDown",value:function(C,j){var B=this;j&&(this.options.preventMouseDownDefault&&j.preventDefault(),this.options.stopMouseDownPropagation&&j.stopPropagation(),j.target.classList.add(this.activeButtonClass)),this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),this.holdTimeout&&clearTimeout(this.holdTimeout),this.setMouseHold(!0),this.options.disableButtonHold||(this.holdTimeout=window.setTimeout(function(){(B.getMouseHold()&&(!C.includes("{")&&!C.includes("}")||C==="{delete}"||C==="{backspace}"||C==="{bksp}"||C==="{space}"||C==="{tab}")||C==="{arrowright}"||C==="{arrowleft}"||C==="{arrowup}"||C==="{arrowdown}")&&(B.options.debug&&console.log("Button held:",C),B.handleButtonHold(C)),clearTimeout(B.holdTimeout)},500))}},{key:"handleButtonMouseUp",value:function(C,j){var B=this;j&&(this.options.preventMouseUpDefault&&j.preventDefault&&j.preventDefault(),this.options.stopMouseUpPropagation&&j.stopPropagation&&j.stopPropagation(),!(j.target===this.keyboardDOM||j.target&&this.keyboardDOM.contains(j.target)||this.candidateBox&&this.candidateBox.candidateBoxElement&&(j.target===this.candidateBox.candidateBoxElement||j.target&&this.candidateBox.candidateBoxElement.contains(j.target)))&&this.candidateBox&&this.candidateBox.destroy()),this.recurseButtons(function(M){M.classList.remove(B.activeButtonClass)}),this.setMouseHold(!1),this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),C&&typeof this.options.onKeyReleased=="function"&&this.options.onKeyReleased(C,j)}},{key:"handleKeyboardContainerMouseDown",value:function(C){this.options.preventMouseDownDefault&&C.preventDefault()}},{key:"handleButtonHold",value:function(C){var j=this;this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),this.holdInteractionTimeout=window.setTimeout(function(){j.getMouseHold()?(j.handleButtonClicked(C),j.handleButtonHold(C)):clearTimeout(j.holdInteractionTimeout)},100)}},{key:"syncInstanceInputs",value:function(){var C=this;this.dispatch(function(j){j.replaceInput(C.input),j.setCaretPosition(C.caretPosition,C.caretPositionEnd)})}},{key:"clearInput",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.inputName||this.defaultName;this.input[C]="",this.setCaretPosition(0),this.options.syncInstanceInputs&&this.syncInstanceInputs()}},{key:"getInput",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.inputName||this.defaultName,j=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return this.options.syncInstanceInputs&&!j&&this.syncInstanceInputs(),this.options.rtl?"‫"+this.input[C].replace("‫","").replace("‬","")+"‬":this.input[C]}},{key:"getAllInputs",value:function(){var C=this,j={};return Object.keys(this.input).forEach(function(B){j[B]=C.getInput(B,!0)}),j}},{key:"setInput",value:function(C){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.inputName||this.defaultName,B=arguments.length>2?arguments[2]:void 0;this.input[j]=C,!B&&this.options.syncInstanceInputs&&this.syncInstanceInputs()}},{key:"replaceInput",value:function(C){this.input=C}},{key:"setOptions",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},j=this.changedOptions(C);this.options=Object.assign(this.options,C),j.length&&(this.options.debug&&console.log("changedOptions",j),this.onSetOptions(j),this.render())}},{key:"changedOptions",value:function(C){var j=this;return Object.keys(C).filter(function(B){return JSON.stringify(C[B])!==JSON.stringify(j.options[B])})}},{key:"onSetOptions",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];C.includes("layoutName")&&this.candidateBox&&this.candidateBox.destroy(),(C.includes("layoutCandidatesPageSize")||C.includes("layoutCandidates"))&&this.candidateBox&&(this.candidateBox.destroy(),this.candidateBox=new R({utilities:this.utilities,options:this.options}))}},{key:"resetRows",value:function(){this.keyboardRowsDOM&&this.keyboardRowsDOM.remove(),this.keyboardDOM.className=this.keyboardDOMClass,this.keyboardDOM.setAttribute("data-skInstance",this.currentInstanceName),this.buttonElements={}}},{key:"dispatch",value:function(C){if(!window.SimpleKeyboardInstances)throw console.warn("SimpleKeyboardInstances is not defined. Dispatch cannot be called."),new Error("INSTANCES_VAR_ERROR");return Object.keys(window.SimpleKeyboardInstances).forEach(function(j){C(window.SimpleKeyboardInstances[j],j)})}},{key:"addButtonTheme",value:function(C,j){var B=this;j&&C&&(C.split(" ").forEach(function(M){j.split(" ").forEach(function(ee){B.options.buttonTheme||(B.options.buttonTheme=[]);var J=!1;B.options.buttonTheme.map(function(Q){if(Q!=null&&Q.class.split(" ").includes(ee)){J=!0;var Y=Q.buttons.split(" ");Y.includes(M)||(J=!0,Y.push(M),Q.buttons=Y.join(" "))}return Q}),J||B.options.buttonTheme.push({class:ee,buttons:C})})}),this.render())}},{key:"removeButtonTheme",value:function(C,j){var B=this;if(!C&&!j)return this.options.buttonTheme=[],void this.render();C&&Array.isArray(this.options.buttonTheme)&&this.options.buttonTheme.length&&(C.split(" ").forEach(function(M){var ee;(ee=B.options)===null||ee===void 0||(ee=ee.buttonTheme)===null||ee===void 0||ee.map(function(J,Q){if(J&&j&&j.includes(J.class)||!j){var Y,pe,ge=(Y=J)===null||Y===void 0?void 0:Y.buttons.split(" ").filter(function(ue){return ue!==M});J&&ge!=null&&ge.length?J.buttons=ge.join(" "):((pe=B.options.buttonTheme)===null||pe===void 0||pe.splice(Q,1),J=null)}return J})}),this.render())}},{key:"getButtonElement",value:function(C){var j,B=this.buttonElements[C];return B&&(j=B.length>1?B:B[0]),j}},{key:"inputPatternIsValid",value:function(C){var j,B=this.options.inputPattern;if((j=B instanceof RegExp?B:B[this.options.inputName||this.defaultName])&&C){var M=j.test(C);return this.options.debug&&console.log('inputPattern ("'.concat(j,'"): ').concat(M?"passed":"did not pass!")),M}return!0}},{key:"setEventListeners",value:function(){if(this.isFirstKeyboardInstance||!this.allKeyboardInstances){this.options.debug&&console.log("Caret handling started (".concat(this.keyboardDOMClass,")"));var C=this.options.physicalKeyboardHighlightPreventDefault,j=C!==void 0&&C;document.addEventListener("keyup",this.handleKeyUp,j),document.addEventListener("keydown",this.handleKeyDown,j),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("touchend",this.handleTouchEnd),document.addEventListener("selectionchange",this.handleSelectionChange),document.addEventListener("select",this.handleSelect)}}},{key:"handleKeyUp",value:function(C){this.caretEventHandler(C),this.options.physicalKeyboardHighlight&&this.physicalKeyboard.handleHighlightKeyUp(C)}},{key:"handleKeyDown",value:function(C){this.options.physicalKeyboardHighlight&&this.physicalKeyboard.handleHighlightKeyDown(C)}},{key:"handleMouseUp",value:function(C){this.caretEventHandler(C)}},{key:"handleTouchEnd",value:function(C){this.caretEventHandler(C)}},{key:"handleSelect",value:function(C){this.caretEventHandler(C)}},{key:"handleSelectionChange",value:function(C){navigator.userAgent.includes("Firefox")||this.caretEventHandler(C)}},{key:"caretEventHandler",value:function(C){var j,B=this;C.target.tagName&&(j=C.target.tagName.toLowerCase()),this.dispatch(function(M){var ee=C.target===M.keyboardDOM||C.target&&M.keyboardDOM.contains(C.target);if(B.options.syncInstanceInputs&&Array.isArray(C.path)&&(ee=C.path.some(function(Y){var pe;return Y==null||(pe=Y.hasAttribute)===null||pe===void 0?void 0:pe.call(Y,"data-skInstance")})),(j==="textarea"||j==="input"&&["text","search","url","tel","password"].includes(C.target.type))&&!M.options.disableCaretPositioning){var J=C.target.selectionStart,Q=C.target.selectionEnd;M.options.rtl&&(J=M.utilities.getRtlOffset(J,M.getInput()),Q=M.utilities.getRtlOffset(Q,M.getInput())),M.setCaretPosition(J,Q),B.activeInputElement=C.target,M.options.debug&&console.log("Caret at: ",M.getCaretPosition(),M.getCaretPositionEnd(),C&&C.target.tagName.toLowerCase(),"(".concat(M.keyboardDOMClass,")"),C==null?void 0:C.type)}else!M.options.disableCaretPositioning&&ee||(C==null?void 0:C.type)==="selectionchange"||(M.setCaretPosition(null),B.activeInputElement=null,M.options.debug&&console.log('Caret position reset due to "'.concat(C==null?void 0:C.type,'" event'),C))})}},{key:"recurseButtons",value:function(C){var j=this;C&&Object.keys(this.buttonElements).forEach(function(B){return j.buttonElements[B].forEach(C)})}},{key:"destroy",value:function(){this.options.debug&&console.log("Destroying simple-keyboard instance: ".concat(this.currentInstanceName));var C=this.options.physicalKeyboardHighlightPreventDefault,j=C!==void 0&&C;document.removeEventListener("keyup",this.handleKeyUp,j),document.removeEventListener("keydown",this.handleKeyDown,j),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("touchend",this.handleTouchEnd),document.removeEventListener("select",this.handleSelect),document.removeEventListener("selectionchange",this.handleSelectionChange),document.onpointerup=null,document.ontouchend=null,document.ontouchcancel=null,document.onmouseup=null,this.recurseButtons(function(B){B&&(B.onpointerdown=null,B.onpointerup=null,B.onpointercancel=null,B.ontouchstart=null,B.ontouchend=null,B.ontouchcancel=null,B.onclick=null,B.onmousedown=null,B.onmouseup=null,B.remove(),B=null)}),this.keyboardDOM.onpointerdown=null,this.keyboardDOM.ontouchstart=null,this.keyboardDOM.onmousedown=null,this.resetRows(),this.candidateBox&&(this.candidateBox.destroy(),this.candidateBox=null),this.activeInputElement=null,this.keyboardDOM.removeAttribute("data-skInstance"),this.keyboardDOM.innerHTML="",window.SimpleKeyboardInstances[this.currentInstanceName]=null,delete window.SimpleKeyboardInstances[this.currentInstanceName],this.initialized=!1}},{key:"getButtonThemeClasses",value:function(C){var j=this.options.buttonTheme,B=[];return Array.isArray(j)&&j.forEach(function(M){if(M&&M.class&&typeof M.class=="string"&&M.buttons&&typeof M.buttons=="string"){var ee=M.class.split(" ");M.buttons.split(" ").includes(C)&&(B=[].concat(L(B),L(ee)))}else console.warn('Incorrect "buttonTheme". Please check the documentation.',M)}),B}},{key:"setDOMButtonAttributes",value:function(C,j){var B=this.options.buttonAttributes;Array.isArray(B)&&B.forEach(function(M){M.attribute&&typeof M.attribute=="string"&&M.value&&typeof M.value=="string"&&M.buttons&&typeof M.buttons=="string"?M.buttons.split(" ").includes(C)&&j(M.attribute,M.value):console.warn('Incorrect "buttonAttributes". Please check the documentation.',M)})}},{key:"onTouchDeviceDetected",value:function(){this.processAutoTouchEvents(),this.disableContextualWindow()}},{key:"disableContextualWindow",value:function(){window.oncontextmenu=function(C){if(C.target.classList.contains("hg-button"))return C.preventDefault(),C.stopPropagation(),!1}}},{key:"processAutoTouchEvents",value:function(){this.options.autoUseTouchEvents&&(this.options.useTouchEvents=!0,this.options.debug&&console.log("autoUseTouchEvents: Touch device detected, useTouchEvents enabled."))}},{key:"onInit",value:function(){this.options.debug&&console.log("".concat(this.keyboardDOMClass," Initialized")),this.setEventListeners(),typeof this.options.onInit=="function"&&this.options.onInit(this)}},{key:"beforeFirstRender",value:function(){this.utilities.isTouchDevice()&&this.onTouchDeviceDetected(),typeof this.options.beforeFirstRender=="function"&&this.options.beforeFirstRender(this),this.isFirstKeyboardInstance&&this.utilities.pointerEventsSupported()&&!this.options.useTouchEvents&&!this.options.useMouseEvents&&this.options.debug&&console.log("Using PointerEvents as it is supported by this browser"),this.options.useTouchEvents&&this.options.debug&&console.log("useTouchEvents has been enabled. Only touch events will be used.")}},{key:"beforeRender",value:function(){typeof this.options.beforeRender=="function"&&this.options.beforeRender(this)}},{key:"onRender",value:function(){typeof this.options.onRender=="function"&&this.options.onRender(this)}},{key:"onModulesLoaded",value:function(){typeof this.options.onModulesLoaded=="function"&&this.options.onModulesLoaded(this)}},{key:"loadModules",value:function(){var C=this;Array.isArray(this.options.modules)&&(this.options.modules.forEach(function(j){var B=new j(C);B.init&&B.init(C)}),this.keyboardPluginClasses="modules-loaded",this.render(),this.onModulesLoaded())}},{key:"getModuleProp",value:function(C,j){return!!this.modules[C]&&this.modules[C][j]}},{key:"getModulesList",value:function(){return Object.keys(this.modules)}},{key:"parseRowDOMContainers",value:function(C,j,B,M){var ee=this,J=Array.from(C.children),Q=0;return J.length&&B.forEach(function(Y,pe){var ge=M[pe];if(!(ge&&ge>Y))return!1;var ue=Y-Q,ie=ge-Q,be=document.createElement("div");be.className+="hg-button-container";var oe="".concat(ee.options.layoutName,"-r").concat(j,"c").concat(pe);be.setAttribute("data-skUID",oe);var Ce=J.splice(ue,ie-ue+1);Q=ie-ue,Ce.forEach(function(_e){return be.appendChild(_e)}),J.splice(ue,0,be),C.innerHTML="",J.forEach(function(_e){return C.appendChild(_e)}),ee.options.debug&&console.log("rowDOMContainer",Ce,ue,ie,Q+1)}),C}},{key:"render",value:function(){var C=this;this.resetRows(),this.initialized||this.beforeFirstRender(),this.beforeRender();var j="hg-layout-".concat(this.options.layoutName),B=this.options.layout||{default:["` 1 2 3 4 5 6 7 8 9 0 - = {bksp}","{tab} q w e r t y u i o p [ ] \\","{lock} a s d f g h j k l ; ' {enter}","{shift} z x c v b n m , . / {shift}",".com @ {space}"],shift:["~ ! @ # $ % ^ & * ( ) _ + {bksp}","{tab} Q W E R T Y U I O P { } |",'{lock} A S D F G H J K L : " {enter}',"{shift} Z X C V B N M < > ? {shift}",".com @ {space}"]},M=this.options.useTouchEvents||!1,ee=M?"hg-touch-events":"",J=this.options.useMouseEvents||!1,Q=this.options.disableRowButtonContainers;this.keyboardDOM.className=this.getKeyboardClassString(this.options.theme,j,this.keyboardPluginClasses,ee),this.keyboardDOM.setAttribute("data-skInstance",this.currentInstanceName),this.keyboardRowsDOM=document.createElement("div"),this.keyboardRowsDOM.className="hg-rows",B[this.options.layoutName||this.defaultName].forEach(function(Y,pe){var ge=Y.split(" ");C.options.excludeFromLayout&&C.options.excludeFromLayout[C.options.layoutName||C.defaultName]&&(ge=ge.filter(function(oe){return C.options.excludeFromLayout&&!C.options.excludeFromLayout[C.options.layoutName||C.defaultName].includes(oe)}));var ue=document.createElement("div");ue.className+="hg-row";var ie=[],be=[];ge.forEach(function(oe,Ce){var _e,We=!Q&&typeof oe=="string"&&oe.length>1&&oe.indexOf("[")===0,rt=!Q&&typeof oe=="string"&&oe.length>1&&oe.indexOf("]")===oe.length-1;We&&(ie.push(Ce),oe=oe.replace(/\[/g,"")),rt&&(be.push(Ce),oe=oe.replace(/\]/g,""));var vt=C.utilities.getButtonClass(oe),ht=C.utilities.getButtonDisplayName(oe,C.options.display,C.options.mergeDisplay),Kn=C.options.useButtonTag?"button":"div",ct=document.createElement(Kn);ct.className+="hg-button ".concat(vt),(_e=ct.classList).add.apply(_e,L(C.getButtonThemeClasses(oe))),C.setDOMButtonAttributes(oe,function(Re,ln){ct.setAttribute(Re,ln)}),C.activeButtonClass="hg-activeButton",!C.utilities.pointerEventsSupported()||M||J?M?(ct.ontouchstart=function(Re){C.handleButtonClicked(oe,Re),C.handleButtonMouseDown(oe,Re)},ct.ontouchend=function(Re){C.handleButtonMouseUp(oe,Re)},ct.ontouchcancel=function(Re){C.handleButtonMouseUp(oe,Re)}):(ct.onclick=function(Re){C.setMouseHold(!1),typeof C.options.onKeyReleased!="function"&&C.handleButtonClicked(oe,Re)},ct.onmousedown=function(Re){typeof C.options.onKeyReleased!="function"||C.isMouseHold||C.handleButtonClicked(oe,Re),C.handleButtonMouseDown(oe,Re)},ct.onmouseup=function(Re){C.handleButtonMouseUp(oe,Re)}):(ct.onpointerdown=function(Re){C.handleButtonClicked(oe,Re),C.handleButtonMouseDown(oe,Re)},ct.onpointerup=function(Re){C.handleButtonMouseUp(oe,Re)},ct.onpointercancel=function(Re){C.handleButtonMouseUp(oe,Re)}),ct.setAttribute("data-skBtn",oe);var nn="".concat(C.options.layoutName,"-r").concat(pe,"b").concat(Ce);ct.setAttribute("data-skBtnUID",nn);var pt=document.createElement("span");pt.innerHTML=ht,ct.appendChild(pt),C.buttonElements[oe]||(C.buttonElements[oe]=[]),C.buttonElements[oe].push(ct),ue.appendChild(ct)}),ue=C.parseRowDOMContainers(ue,pe,ie,be),C.keyboardRowsDOM.appendChild(ue)}),this.keyboardDOM.appendChild(this.keyboardRowsDOM),this.onRender(),this.initialized||(this.initialized=!0,!this.utilities.pointerEventsSupported()||M||J?M?(document.ontouchend=function(Y){return C.handleButtonMouseUp(void 0,Y)},document.ontouchcancel=function(Y){return C.handleButtonMouseUp(void 0,Y)},this.keyboardDOM.ontouchstart=function(Y){return C.handleKeyboardContainerMouseDown(Y)}):M||(document.onmouseup=function(Y){return C.handleButtonMouseUp(void 0,Y)},this.keyboardDOM.onmousedown=function(Y){return C.handleKeyboardContainerMouseDown(Y)}):(document.onpointerup=function(Y){return C.handleButtonMouseUp(void 0,Y)},this.keyboardDOM.onpointerdown=function(Y){return C.handleKeyboardContainerMouseDown(Y)}),this.onInit())}}],H&&te($.prototype,H),X&&te($,X),Object.defineProperty($,"prototype",{writable:!1}),$;var $,H,X}(),ye=ce,le=ce}(),p}()},442:function(c){c.exports=n}},i={};function s(c){var u=i[c];if(u!==void 0)return u.exports;var d=i[c]={exports:{}};return r[c].call(d.exports,d,d.exports,s),d.exports}s.n=function(c){var u=c&&c.__esModule?function(){return c.default}:function(){return c};return s.d(u,{a:u}),u},s.d=function(c,u){for(var d in u)s.o(u,d)&&!s.o(c,d)&&Object.defineProperty(c,d,{enumerable:!0,get:u[d]})},s.o=function(c,u){return Object.prototype.hasOwnProperty.call(c,u)},s.r=function(c){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(c,"__esModule",{value:!0})};var o={};return function(){s.r(o),s.d(o,{KeyboardReact:function(){return h},default:function(){return y}}),s(981);var c=s(442),u=s(548),d=s.n(u);function f(g){return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},f(g)}function p(g,b){var w=Object.keys(g);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(g);b&&(E=E.filter(function(S){return Object.getOwnPropertyDescriptor(g,S).enumerable})),w.push.apply(w,E)}return w}function l(g){for(var b=1;b<arguments.length;b++){var w=arguments[b]!=null?arguments[b]:{};b%2?p(Object(w),!0).forEach(function(E){v(g,E,w[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(w)):p(Object(w)).forEach(function(E){Object.defineProperty(g,E,Object.getOwnPropertyDescriptor(w,E))})}return g}function v(g,b,w){var E;return E=function(S,A){if(f(S)!="object"||!S)return S;var T=S[Symbol.toPrimitive];if(T!==void 0){var O=T.call(S,A||"default");if(f(O)!="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.")}return(A==="string"?String:Number)(S)}(b,"string"),(b=f(E)=="symbol"?E:E+"")in g?Object.defineProperty(g,b,{value:w,enumerable:!0,configurable:!0,writable:!0}):g[b]=w,g}var a=function(g){return l(l({},g),{},{keyboardRef:null})},h=function(g){var b=g.baseClass||"react-simple-keyboard",w=c.useRef(null),E=c.useRef(null),S=c.useRef(null),A=c.useRef(g);return c.useEffect(function(){return function(){S.current&&S.current.destroy(),w.current=!1}},[]),c.useEffect(function(){var T=function(q){return l(l({},q),{},{theme:"simple-keyboard ".concat(q.theme||"hg-theme-default")})}(g);if(!w.current){w.current=!0,T.debug&&console.log("ReactSimpleKeyboard: Init");var O=E.current,N=".".concat(b);S.current=new(d())(O||N,T),T.keyboardRef&&T.keyboardRef(S.current)}var D=function(q,F){var V=a(F),R=a(q);return Object.keys(V).filter(function(L){return V[L]!==R[L]})}(A.current,T);if(D.length){var U=S.current;A.current=T,U==null||U.setOptions(T),T.debug&&console.log("ReactSimpleKeyboard - setOptions called due to updated props:",D)}},[w,b,A,g]),c.createElement("div",{className:b,ref:E})},y=h}(),o}()})})(vm);var C_=vm.exports;const A_=Pu(C_);function bm({onChange:e,keyboardRef:t,layout:n,theme:r}){const[i,s]=k.useState("default"),o=c=>{(c==="{shift}"||c==="{lock}")&&s(i==="default"?"shift":"default")};return m.jsx(A_,{keyboardRef:c=>t.current=c,layoutName:i,layout:n,theme:r,onChange:e,onKeyPress:o,preventMouseDownDefault:!0})}const wm=k.createContext(null),Em=({children:e,apiKey:t,shopUuid:n,sessionUuid:r,cameraFacingMode:i,onContactLink:s,onClaimReward:o,onRedeemVoucher:c,onUseGiftcard:u,host:d})=>(localStorage.setItem("portal_session_uuid",r),m.jsx(wm.Provider,{value:{apiKey:t,shopUuid:n,sessionUuid:r,cameraFacingMode:i,onContactLink:s,onClaimReward:o,onRedeemVoucher:c,onUseGiftcard:u,host:d},children:e})),An=()=>{const e=k.useContext(wm);if(e===null)throw"Only use 'useSession' within a SessionProvider";return e};function yt(){const{sessionUuid:e}=An(),{data:t,error:n,isLoading:r,isValidating:i,mutate:s}=Cr("/api/v1/portal-sessions/"+e);return{session:t==null?void 0:t.data.data,data:t,error:n,isLoading:r,isValidating:i,mutate:s}}function T_({value:e,valueSetter:t}){const{session:n}=yt(),r=!(!n||!+(n.input_data.enable_on_screen_keyboard??!1)),[i,s]=k.useState(!1),o=k.useRef(null),c=k.useRef(null);k.useEffect(()=>{f(e?e.toString():"")},[]);const u=p=>{t(p?parseInt(p):0),f(p)},d=p=>{const{key:l}=p;if(e===0&&!/^[1-9]$/.test(l)||e!==0&&!/^[0-9]$/.test(l)&&l!=="Backspace")return;let v;if(l!=="Backspace")v=parseInt(e===0?l:`${e}${l}`);else{const a=e.toString().slice(0,-1);v=a.length?parseInt(a,10):0}t(v),f(v?v.toString():"")},f=p=>{c&&c.current&&(p?c.current.style.width=`${Math.max(p.length,3)*3}rem`:c.current.style.width="calc(3rem + 14px)")};return m.jsxs(m.Fragment,{children:[m.jsx("input",{ref:c,className:"h-full w-[65px] rounded border-gray-200 border-transparent text-5xl [appearance:textfield] focus:border-transparent focus:ring-0 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",type:"number",pattern:"[0-9]*",inputMode:"numeric",placeholder:"0",autoFocus:!0,value:e?(e/100).toFixed(2):"",onKeyDown:d,onChange:()=>{},onFocus:()=>s(!0),onBlur:()=>s(!1)}),r&&m.jsx("div",{className:`mobile:hidden bottom-2 left-2 right-2 z-50 mx-auto w-[98vw] max-w-[1200px] ${!i&&"hidden"} absolute`,children:m.jsx(bm,{keyboardRef:o,layout:{default:["1 2 3","4 5 6","7 8 9","00 0 {bksp}"]},theme:"hg-theme-default hg-layout-numeric numeric-theme",onChange:u})})]})}function Sm({title:e,balance:t,transaction:n}){const{t:r}=et(),[i,s]=k.useState(0),{session:{currency:o,events:c}}=yt(),u=()=>{let d=0;return c.filter(p=>Object.values(Hr).includes(p.type)).forEach(p=>{d+=p.data.amount_in_cents}),d};return m.jsxs(Pt,{children:[e&&m.jsx(kt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:e})})}),m.jsx(It,{children:m.jsxs("div",{className:"flex h-full flex-col gap-4",children:[m.jsx("div",{className:"rounded-lg bg-core-primary-50 p-4",children:m.jsxs("div",{className:"flex justify-between",children:[m.jsx("p",{className:"font-light text-gray-500",children:r("balance")}),m.jsx(Jr,{value:t??0,start:t??0,currency:o,asCurrency:!0})]})}),m.jsx("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-6",children:m.jsx("div",{className:"flex items-center justify-center gap-1 p-4 text-5xl font-bold",children:u()?m.jsx(Jr,{value:0,start:i,currency:o,asCurrency:!0}):m.jsxs("div",{className:"flex items-center justify-center gap-1 ",children:[m.jsx("p",{children:"€"}),m.jsx(T_,{value:i,valueSetter:s})]})})})]})}),m.jsx(Kt,{children:m.jsx(lt,{label:r("confirmAndPay",{amount:Ji(i,o)}),className:"w-full",onClick:n&&(()=>n(i)),disabled:!i||!!u()})})]})}function Ka(){return{subscribe:(r,i)=>{document.addEventListener(r,i)},unsubscribe:(r,i)=>{document.removeEventListener(r,i)},publish:(r,i)=>{const s=new CustomEvent(r,{detail:i});document.dispatchEvent(s)}}}function xm(e,t){k.useEffect(()=>{const n=i=>{e.current&&!e.current.contains(i.target)&&t(!1)},r=i=>{i.key==="Escape"&&t(!1)};return document.addEventListener("mousedown",n),document.addEventListener("keydown",r),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("keydown",r)}},[])}const I_=typeof window<"u"?k.useLayoutEffect:()=>{},k_=()=>window.visualViewport?[window.visualViewport.width,window.visualViewport.height]:[window.innerWidth,window.innerHeight],O_=()=>{const[e,t]=k.useState(),n=k.useCallback(()=>{const r=k_();t(i=>i&&i[0]===r[0]&&i[1]===r[1]?i:r)},[]);return I_(n,[n]),k.useEffect(()=>{var i;const r=()=>{n(),setTimeout(n,1e3)};return window.addEventListener("resize",r),window.addEventListener("orientationchange",r),(i=window.visualViewport)==null||i.addEventListener("resize",r),()=>{var s;window.removeEventListener("resize",r),window.removeEventListener("orientationchange",r),(s=window.visualViewport)==null||s.removeEventListener("resize",r)}},[n]),e};function _m(){const{subscribe:e,unsubscribe:t,publish:n}=Ka();return{initialize:(c,u)=>{e("openKeyboard",c),e("closeKeyboard",u)},terminate:(c,u)=>{t("openKeyboard",c),t("closeKeyboard",u)},open:c=>{n("openKeyboard",{inputId:c.target.id,inputValue:c.target.value})},close:()=>{n("closeKeyboard")}}}const fr="keyboard-custom-overlap-id";function Cm(){const[e,t]=k.useState(!1),n=k.useRef(null),r=k.useRef(null),i=k.useRef(null),[s,o]=k.useState(),{session:c}=yt(),{initialize:u,terminate:d}=_m(),f=g=>{var b,w;r.current=document.getElementById(g.detail.inputId),(b=n.current)==null||b.setInput(g.detail.inputValue),(w=r.current)==null||w.addEventListener("input",E=>{var A;const S=E.target;(A=n.current)==null||A.setInput(S==null?void 0:S.value)}),t(!0)},p=()=>t(!1);k.useEffect(()=>(u(f,p),()=>{d(f,p)}),[e]);const l=g=>{var b,w;if(r&&r.current){v(r.current,g);const E=(b=n.current)==null?void 0:b.getCaretPosition();E&&((w=r.current)==null||w.setSelectionRange(E,E))}},v=(g,b)=>{var S;const w=(S=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:S.set;w==null||w.call(g,b);const E=new Event("input",{bubbles:!0});g.dispatchEvent(E)};if(!c||!+(c.input_data.enable_on_screen_keyboard??!1))return m.jsx(m.Fragment,{});const a=()=>{var g;if(!s){const b=(g=i.current)==null?void 0:g.getBoundingClientRect();return b&&b.x&&!s&&o(b),b}return s},h=()=>{var E;const g=(E=r.current)==null?void 0:E.getBoundingClientRect(),b=a();let w=!1;return b&&g&&(w=!(b.right<g.left||b.left>g.right||b.bottom<g.top||b.top>g.bottom)),w},y=()=>{const g=document.querySelectorAll("#"+fr);let b=!1;for(let w=0;w<g.length;w++){const E=g[w].getBoundingClientRect(),S=a();S&&E&&(b=!(S.right<E.left||S.left>E.right||S.bottom<E.top||S.top>E.bottom))}return b||h()};return m.jsx("div",{ref:i,className:`mobile:hidden bottom-2 left-2 right-2 z-50 mx-auto w-[98vw] max-w-[1200px] ${!e&&s&&"hidden"} ${!e&&!s&&"pointer-events-none opacity-0"} ${y()?"b-2 block":"absolute"}`,children:m.jsx(bm,{keyboardRef:n,onChange:l})})}const Ci=({id:e,name:t,label:n,description:r,required:i,type:s="text",value:o,placeholder:c,disabled:u,error:d=!1,helperText:f="",onChange:p,beforeIcon:l,afterIcon:v,autoFocus:a,onFocus:h,onBlur:y})=>{const[g,b]=k.useState(f),w=k.useRef(null),[E,S]=k.useState(!1),{open:A,close:T}=_m();k.useEffect(()=>()=>{T()},[]);const O=()=>{w.current&&b(w.current.validationMessage),S(!1),T(),y==null||y()},N=async F=>{S(!0),(async()=>A(F))().then(()=>{var R;return(R=w.current)==null?void 0:R.scrollIntoView({behavior:"smooth",block:"center"})}),h==null||h()},D=F=>{p==null||p(F)},U=k.useId(),q=e??U;return m.jsxs("div",{className:"flex flex-col gap-2 antialiased",children:[m.jsx(vn,{description:r,disabled:u,htmlFor:q,required:i,children:n}),m.jsx("div",{className:fn("flex-start box flex h-10 flex-col justify-center self-stretch rounded border border-core-gray-200 shadow-xs",u?"pointer-events-none bg-core-gray-50 shadow-none outline-core-gray-200":" bg-core-white-900 hover:border hover:border-core-gray-300 hover:shadow-none ",E&&!d&&"border-core-primary-500 ring-1 ring-core-primary-500",d&&"border-core-red-500",d&&E&&"border-core-red-500 ring-1 ring-core-red-500"),children:m.jsxs("div",{className:"flex flex-row gap-2 self-stretch p-2",children:[l&&m.jsx(en,{icon:l}),m.jsx("input",{type:s,id:q,name:t,className:"flex flex-grow border-none bg-transparent p-0 text-sm text-core-gray-800 placeholder:text-core-gray-500 focus:ring-0 disabled:text-core-gray-300 placeholder:disabled:text-core-gray-300",value:o,onChange:D,onBlur:O,ref:w,placeholder:c,onFocus:N,disabled:u,autoFocus:a}),v&&m.jsx(en,{icon:v})]})}),m.jsx("div",{className:`grid overflow-hidden transition-all duration-300 ease-out ${f||g?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"}`,children:m.jsx("div",{className:"overflow-hidden",children:m.jsx(vn.Helper,{error:d,helperText:f||g})})})]})};Ci.displayName="Input";const Am=({id:e,name:t,label:n,required:r,description:i,placeholder:s,value:o,disabled:c,error:u=!1,helperText:d,onChange:f,type:p="date"})=>{const[l,v]=k.useState(!1),a=k.useId(),h=e??a;return m.jsxs("div",{className:"flex flex-col gap-2 antialiased",children:[m.jsx(vn,{description:i,disabled:c,htmlFor:h,required:r,children:n}),m.jsx("div",{className:fn("flex-start box relative flex h-10 flex-col justify-center self-stretch rounded border border-core-gray-200 shadow-xs ring-core-primary-500 ",c?"pointer-events-none bg-core-gray-50 shadow-none outline-core-gray-200":" bg-core-white-900 hover:border hover:border-core-gray-300 hover:shadow-none ",l&&!u&&"border-core-primary-500 ring-1 ring-core-primary-500 selection:bg-core-primary-500",u&&"border-core-red-500",u&&l&&"border-core-red-500 ring-1 ring-core-red-500"),children:m.jsxs("div",{className:"flex w-full flex-row gap-2 self-stretch p-2",children:[m.jsx("input",{type:p,id:h,name:t,value:o,max:"2200-01-01",className:"flex flex-grow border-none bg-transparent p-0 text-sm text-core-gray-800 placeholder:text-core-gray-500 focus:ring-0 disabled:text-core-gray-300 placeholder:disabled:text-core-gray-300",placeholder:s,onChange:f,onFocus:()=>v(!0),onBlur:()=>v(!1),disabled:c}),m.jsx(en,{icon:"calendar"})]})}),m.jsx("div",{className:`grid overflow-hidden transition-all duration-300 ease-out ${d?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-100"}`,children:m.jsx("div",{className:"overflow-hidden",children:m.jsx(vn.Helper,{error:u,helperText:d})})})]})};Am.displayName="Input";function on({children:e}){return m.jsx("div",{className:"h-screen w-screen md:p-6",children:m.jsx("div",{className:"flex h-full max-h-full items-center justify-center md:container [&>*]:grow",children:e})})}function Ai({title:e,isOpen:t,onClose:n,primaryAction:r,secondaryAction:i,children:s}){const[o,c]=k.useState(t),u=k.useRef(null);k.useEffect(()=>{c(t)},[t]),k.useEffect(()=>{const p=u.current;p&&(o?p.show():p.close())},[o]);const d=()=>{n&&n(),c(!1)},f=p=>{p.key==="Escape"&&d()};return m.jsx("div",{className:`fixed inset-0 z-40 min-h-screen items-center bg-gray-500 bg-opacity-25 ${o?"flex":"hidden"}`,children:m.jsx("dialog",{ref:u,onKeyDown:f,className:"scrollbar-hide absolute overflow-auto rounded-lg drop-shadow-md",children:m.jsxs("div",{className:"rounded-lg bg-white md:min-w-[420px]",children:[m.jsx(kt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:e})})}),m.jsx(It,{children:s}),m.jsx(Kt,{children:m.jsxs("div",{className:"flex flex-col gap-2",children:[r&&m.jsx(lt,{label:r.label??"",onClick:r.action,disabled:r.disabled}),i&&m.jsx(lt,{label:i.label??"",onClick:i.action,disabled:i.disabled,variant:"secondary"})]})})]})})})}function R_({option:{label:e},checked:t,onChange:n}){return m.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 text-sm hover:bg-core-gray-50",children:[m.jsx(Wa,{defaultChecked:t,onChange:n}),m.jsx("p",{children:e})]})}function N_(e){const{t}=et(),n=k.useRef(null),[r,i]=k.useState(!1);xm(n,i);const[s,o]=k.useState(""),[c,u]=k.useState(e.value.split(";")),{name:d,onChange:f}=e,p=(l,v)=>{let a=[];l?a=[...c,v]:a=c.filter(h=>h!==v),u(a),f&&f(d??"",a.join(";"))};return m.jsxs("div",{ref:n,className:"flex flex-col gap-2 antialiased",children:[m.jsx(vn,{disabled:e.disabled,htmlFor:e.id,required:e.required,children:e.label}),m.jsxs("div",{className:"relative",children:[m.jsxs("div",{className:`flex h-10 items-center justify-between rounded border p-2 ${e.disabled?"pointer-events-none bg-core-gray-50 shadow-none outline-core-gray-200":"bg-core-white-900 hover:border hover:border-core-gray-300 hover:shadow-none"}`,onClick:()=>!e.disabled&&i(!r),children:[m.jsx("div",{className:`flex gap-1 overflow-hidden text-sm ${e.disabled?"text-core-gray-300":"text-core-gray-800"}`,children:c.map(l=>{var a;const v=(a=e.options.find(h=>h.value===l))==null?void 0:a.label;return m.jsxs("div",{className:"pointer-events-none flex items-center overflow-hidden rounded bg-core-gray-100 px-1.5 py-0.5",children:[m.jsx("p",{className:"truncate",children:v}),m.jsx("span",{className:"pointer-events-auto cursor-pointer",onClick:()=>p(!1,l),children:m.jsx(en,{icon:"close"})})]},l)})}),m.jsx("span",{className:"ml-2 text-core-gray-500",children:r?"▴":"▾"})]}),m.jsxs("div",{className:`absolute left-0 right-0 top-11 z-50 rounded border bg-core-white-900 shadow-xl ${!r&&"hidden"} py-2`,children:[e.options.length>6&&m.jsx("div",{className:"px-4",children:m.jsx(Ci,{placeholder:`${t("search")}...`,onChange:l=>o(l.target.value)})}),e.options.map(l=>{if(!(s&&!l.label.toLowerCase().includes(s.toLowerCase())))return m.jsx(R_,{option:l,checked:c.includes(l.value),onChange:v=>p(v,l.value)},`${l.value}_${c.includes(l.value)?"checked":"unchecked"}`)})]})]})]})}function M_({value:e,max:t,label:n}){return m.jsxs("div",{children:[m.jsx("div",{className:"font-sm mb-1 text-right text-core-gray-500",children:n}),m.jsx("div",{className:"h-1 w-full rounded-full bg-core-gray-200",children:m.jsx("div",{className:"h-1 rounded-full bg-core-primary-500",style:{width:`${Math.min(e/t*100,100)}%`}})})]})}function za({state:e}){const t=An(),{t:n}=et(),r=Tt(),[i,s]=k.useState(""),[o,c]=k.useState(!1),{session:u,mutate:d}=yt(),[f,p]=k.useState(!1),l=async a=>{if(t.onContactLink){const{data:{data:h}}=await er.get(a);h&&t.onContactLink(h)}},v=k.useCallback(()=>{u&&(c(!0),so.setContact(u.uuid,{contact_identifier_value:i}).then(a=>{l(a.data.data.contact.uuid).then(),d().then(()=>{Ue.success(n("contactSavedToSession")),e&&e.redirectRoute&&r(e.redirectRoute,{state:{...e,contactIdentifier:i}})})}).catch(()=>{r("link-identifier",{state:{...e,contactIdentifier:i}})}).finally(()=>c(!1)))},[e,i,d,u,n]);return k.useEffect(()=>{i&&!o&&!f&&v()},[i]),m.jsxs(Pt,{id:fr,children:[m.jsx(kt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:n("scanOrEnterX",{x:"identifier"})})})}),m.jsx(It,{children:m.jsx("form",{onSubmit:a=>{a.preventDefault(),v()},children:m.jsx(fo,{dataSetter:s,setDefer:p,label:n("contactIdentifier")})})}),m.jsx(Kt,{children:m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsx(lt,{label:n("continue"),onClick:v}),u.input_data.enable_email_identification&&m.jsx(lt,{label:n("useEmail"),variant:"secondary",onClick:()=>r("../email",{state:e})})]})})]})}var Tm={},Tn={};Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.compactObject=Rm,Tn.deprecated=V_;var D_=Tn.detectBrowser=$_;Tn.disableLog=F_,Tn.disableWarnings=U_,Tn.extractVersion=Qa,Tn.filterStats=G_,Tn.log=q_,Tn.walkStats=Ja,Tn.wrapPeerConnectionEvent=B_;function P_(e,t,n){return t=j_(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j_(e){var t=L_(e,"string");return Zr(t)=="symbol"?t:t+""}function L_(e,t){if(Zr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Zr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Zr(e){"@babel/helpers - typeof";return Zr=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},Zr(e)}var Im=!0,km=!0;function Qa(e,t,n){var r=e.match(t);return r&&r.length>=n&&parseInt(r[n],10)}function B_(e,t,n){if(e.RTCPeerConnection){var r=e.RTCPeerConnection.prototype,i=r.addEventListener;r.addEventListener=function(o,c){if(o!==t)return i.apply(this,arguments);var u=function(f){var p=n(f);p&&(c.handleEvent?c.handleEvent(p):c(p))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(c,u),i.apply(this,[o,u])};var s=r.removeEventListener;r.removeEventListener=function(o,c){if(o!==t||!this._eventMap||!this._eventMap[t])return s.apply(this,arguments);if(!this._eventMap[t].has(c))return s.apply(this,arguments);var u=this._eventMap[t].get(c);return this._eventMap[t].delete(c),this._eventMap[t].size===0&&delete this._eventMap[t],Object.keys(this._eventMap).length===0&&delete this._eventMap,s.apply(this,[o,u])},Object.defineProperty(r,"on"+t,{get:function(){return this["_on"+t]},set:function(c){this["_on"+t]&&(this.removeEventListener(t,this["_on"+t]),delete this["_on"+t]),c&&this.addEventListener(t,this["_on"+t]=c)},enumerable:!0,configurable:!0})}}function F_(e){return typeof e!="boolean"?new Error("Argument type: "+Zr(e)+". Please use a boolean."):(Im=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function U_(e){return typeof e!="boolean"?new Error("Argument type: "+Zr(e)+". Please use a boolean."):(km=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function q_(){if((typeof window>"u"?"undefined":Zr(window))==="object"){if(Im)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function V_(e,t){km&&console.warn(e+" is deprecated, please use "+t+" instead.")}function $_(e){var t={browser:null,version:null};if(typeof e>"u"||!e.navigator||!e.navigator.userAgent)return t.browser="Not a browser.",t;var n=e.navigator;if(n.userAgentData&&n.userAgentData.brands){var r=n.userAgentData.brands.find(function(i){return i.brand==="Chromium"});if(r)return{browser:"chrome",version:parseInt(r.version,10)}}if(n.mozGetUserMedia)t.browser="firefox",t.version=Qa(n.userAgent,/Firefox\/(\d+)\./,1);else if(n.webkitGetUserMedia||e.isSecureContext===!1&&e.webkitRTCPeerConnection)t.browser="chrome",t.version=Qa(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(e.RTCPeerConnection&&n.userAgent.match(/AppleWebKit\/(\d+)\./))t.browser="safari",t.version=Qa(n.userAgent,/AppleWebKit\/(\d+)\./,1),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype;else return t.browser="Not a supported browser.",t;return t}function Om(e){return Object.prototype.toString.call(e)==="[object Object]"}function Rm(e){return Om(e)?Object.keys(e).reduce(function(t,n){var r=Om(e[n]),i=r?Rm(e[n]):e[n],s=r&&!Object.keys(i).length;return i===void 0||s?t:Object.assign(t,P_({},n,i))},{}):e}function Ja(e,t,n){!t||n.has(t.id)||(n.set(t.id,t),Object.keys(t).forEach(function(r){r.endsWith("Id")?Ja(e,e.get(t[r]),n):r.endsWith("Ids")&&t[r].forEach(function(i){Ja(e,e.get(i),n)})}))}function G_(e,t,n){var r=n?"outbound-rtp":"inbound-rtp",i=new Map;if(t===null)return i;var s=[];return e.forEach(function(o){o.type==="track"&&o.trackIdentifier===t.id&&s.push(o)}),s.forEach(function(o){e.forEach(function(c){c.type===r&&c.trackId===o.id&&Ja(e,c,i)})}),i}Object.defineProperty(Tm,"__esModule",{value:!0});var H_=Tm.shimGetUserMedia=K_,Y_=W_(Tn);function Nm(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Nm=function(i){return i?n:t})(e)}function W_(e,t){if(e&&e.__esModule)return e;if(e===null||Xr(e)!="object"&&typeof e!="function")return{default:e};var n=Nm(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(s!=="default"&&{}.hasOwnProperty.call(e,s)){var o=i?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(r,s,o):r[s]=e[s]}return r.default=e,n&&n.set(e,r),r}function Xr(e){"@babel/helpers - typeof";return Xr=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},Xr(e)}var Mm=Y_.log;function K_(e,t){var n=e&&e.navigator;if(n.mediaDevices){var r=function(d){if(Xr(d)!=="object"||d.mandatory||d.optional)return d;var f={};return Object.keys(d).forEach(function(p){if(!(p==="require"||p==="advanced"||p==="mediaSource")){var l=Xr(d[p])==="object"?d[p]:{ideal:d[p]};l.exact!==void 0&&typeof l.exact=="number"&&(l.min=l.max=l.exact);var v=function(y,g){return y?y+g.charAt(0).toUpperCase()+g.slice(1):g==="deviceId"?"sourceId":g};if(l.ideal!==void 0){f.optional=f.optional||[];var a={};typeof l.ideal=="number"?(a[v("min",p)]=l.ideal,f.optional.push(a),a={},a[v("max",p)]=l.ideal,f.optional.push(a)):(a[v("",p)]=l.ideal,f.optional.push(a))}l.exact!==void 0&&typeof l.exact!="number"?(f.mandatory=f.mandatory||{},f.mandatory[v("",p)]=l.exact):["min","max"].forEach(function(h){l[h]!==void 0&&(f.mandatory=f.mandatory||{},f.mandatory[v(h,p)]=l[h])})}}),d.advanced&&(f.optional=(f.optional||[]).concat(d.advanced)),f},i=function(d,f){if(t.version>=61)return f(d);if(d=JSON.parse(JSON.stringify(d)),d&&Xr(d.audio)==="object"){var p=function(y,g,b){g in y&&!(b in y)&&(y[b]=y[g],delete y[g])};d=JSON.parse(JSON.stringify(d)),p(d.audio,"autoGainControl","googAutoGainControl"),p(d.audio,"noiseSuppression","googNoiseSuppression"),d.audio=r(d.audio)}if(d&&Xr(d.video)==="object"){var l=d.video.facingMode;l=l&&(Xr(l)==="object"?l:{ideal:l});var v=t.version<66;if(l&&(l.exact==="user"||l.exact==="environment"||l.ideal==="user"||l.ideal==="environment")&&!(n.mediaDevices.getSupportedConstraints&&n.mediaDevices.getSupportedConstraints().facingMode&&!v)){delete d.video.facingMode;var a;if(l.exact==="environment"||l.ideal==="environment"?a=["back","rear"]:(l.exact==="user"||l.ideal==="user")&&(a=["front"]),a)return n.mediaDevices.enumerateDevices().then(function(h){h=h.filter(function(g){return g.kind==="videoinput"});var y=h.find(function(g){return a.some(function(b){return g.label.toLowerCase().includes(b)})});return!y&&h.length&&a.includes("back")&&(y=h[h.length-1]),y&&(d.video.deviceId=l.exact?{exact:y.deviceId}:{ideal:y.deviceId}),d.video=r(d.video),Mm("chrome: "+JSON.stringify(d)),f(d)})}d.video=r(d.video)}return Mm("chrome: "+JSON.stringify(d)),f(d)},s=function(d){return t.version>=64?d:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[d.name]||d.name,message:d.message,constraint:d.constraint||d.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}},o=function(d,f,p){i(d,function(l){n.webkitGetUserMedia(l,f,function(v){p&&p(s(v))})})};if(n.getUserMedia=o.bind(n),n.mediaDevices.getUserMedia){var c=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(u){return i(u,function(d){return c(d).then(function(f){if(d.audio&&!f.getAudioTracks().length||d.video&&!f.getVideoTracks().length)throw f.getTracks().forEach(function(p){p.stop()}),new DOMException("","NotFoundError");return f},function(f){return Promise.reject(s(f))})})}}}}var Dm={};Object.defineProperty(Dm,"__esModule",{value:!0});var z_=Dm.shimGetUserMedia=Z_,Q_=J_(Tn);function Pm(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Pm=function(i){return i?n:t})(e)}function J_(e,t){if(e&&e.__esModule)return e;if(e===null||es(e)!="object"&&typeof e!="function")return{default:e};var n=Pm(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(s!=="default"&&{}.hasOwnProperty.call(e,s)){var o=i?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(r,s,o):r[s]=e[s]}return r.default=e,n&&n.set(e,r),r}function es(e){"@babel/helpers - typeof";return es=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},es(e)}function Z_(e,t){var n=e&&e.navigator,r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(u,d,f){Q_.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),n.mediaDevices.getUserMedia(u).then(d,f)},!(t.version>55&&"autoGainControl"in n.mediaDevices.getSupportedConstraints())){var i=function(d,f,p){f in d&&!(p in d)&&(d[p]=d[f],delete d[f])},s=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(u){return es(u)==="object"&&es(u.audio)==="object"&&(u=JSON.parse(JSON.stringify(u)),i(u.audio,"autoGainControl","mozAutoGainControl"),i(u.audio,"noiseSuppression","mozNoiseSuppression")),s(u)},r&&r.prototype.getSettings){var o=r.prototype.getSettings;r.prototype.getSettings=function(){var u=o.apply(this,arguments);return i(u,"mozAutoGainControl","autoGainControl"),i(u,"mozNoiseSuppression","noiseSuppression"),u}}if(r&&r.prototype.applyConstraints){var c=r.prototype.applyConstraints;r.prototype.applyConstraints=function(u){return this.kind==="audio"&&es(u)==="object"&&(u=JSON.parse(JSON.stringify(u)),i(u,"autoGainControl","mozAutoGainControl"),i(u,"noiseSuppression","mozNoiseSuppression")),c.apply(this,[u])}}}}var hr={};Object.defineProperty(hr,"__esModule",{value:!0}),hr.shimAudioContext=cC,hr.shimCallbacksAPI=rC,hr.shimConstraints=Bm,hr.shimCreateOfferLegacy=aC;var X_=hr.shimGetUserMedia=iC;hr.shimLocalStreamsAPI=tC,hr.shimRTCIceServerUrls=sC,hr.shimRemoteStreamsAPI=nC,hr.shimTrackEventTransceiver=oC;var jm=eC(Tn);function Lm(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Lm=function(i){return i?n:t})(e)}function eC(e,t){if(e&&e.__esModule)return e;if(e===null||ei(e)!="object"&&typeof e!="function")return{default:e};var n=Lm(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(s!=="default"&&{}.hasOwnProperty.call(e,s)){var o=i?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(r,s,o):r[s]=e[s]}return r.default=e,n&&n.set(e,r),r}function ei(e){"@babel/helpers - typeof";return ei=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},ei(e)}function tC(e){if(!(ei(e)!=="object"||!e.RTCPeerConnection)){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){var t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(r){var i=this;this._localStreams||(this._localStreams=[]),this._localStreams.includes(r)||this._localStreams.push(r),r.getAudioTracks().forEach(function(s){return t.call(i,s,r)}),r.getVideoTracks().forEach(function(s){return t.call(i,s,r)})},e.RTCPeerConnection.prototype.addTrack=function(r){for(var i=this,s=arguments.length,o=new Array(s>1?s-1:0),c=1;c<s;c++)o[c-1]=arguments[c];return o&&o.forEach(function(u){i._localStreams?i._localStreams.includes(u)||i._localStreams.push(u):i._localStreams=[u]}),t.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(r){var i=this;this._localStreams||(this._localStreams=[]);var s=this._localStreams.indexOf(r);if(s!==-1){this._localStreams.splice(s,1);var o=r.getTracks();this.getSenders().forEach(function(c){o.includes(c.track)&&i.removeTrack(c)})}})}}function nC(e){if(!(ei(e)!=="object"||!e.RTCPeerConnection)&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get:function(){return this._onaddstream},set:function(r){var i=this;this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=r),this.addEventListener("track",this._onaddstreampoly=function(s){s.streams.forEach(function(o){if(i._remoteStreams||(i._remoteStreams=[]),!i._remoteStreams.includes(o)){i._remoteStreams.push(o);var c=new Event("addstream");c.stream=o,i.dispatchEvent(c)}})})}});var t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){var r=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(i){i.streams.forEach(function(s){if(r._remoteStreams||(r._remoteStreams=[]),!(r._remoteStreams.indexOf(s)>=0)){r._remoteStreams.push(s);var o=new Event("addstream");o.stream=s,r.dispatchEvent(o)}})}),t.apply(r,arguments)}}}function rC(e){if(!(ei(e)!=="object"||!e.RTCPeerConnection)){var t=e.RTCPeerConnection.prototype,n=t.createOffer,r=t.createAnswer,i=t.setLocalDescription,s=t.setRemoteDescription,o=t.addIceCandidate;t.createOffer=function(d,f){var p=arguments.length>=2?arguments[2]:arguments[0],l=n.apply(this,[p]);return f?(l.then(d,f),Promise.resolve()):l},t.createAnswer=function(d,f){var p=arguments.length>=2?arguments[2]:arguments[0],l=r.apply(this,[p]);return f?(l.then(d,f),Promise.resolve()):l};var c=function(d,f,p){var l=i.apply(this,[d]);return p?(l.then(f,p),Promise.resolve()):l};t.setLocalDescription=c,c=function(d,f,p){var l=s.apply(this,[d]);return p?(l.then(f,p),Promise.resolve()):l},t.setRemoteDescription=c,c=function(d,f,p){var l=o.apply(this,[d]);return p?(l.then(f,p),Promise.resolve()):l},t.addIceCandidate=c}}function iC(e){var t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){var n=t.mediaDevices,r=n.getUserMedia.bind(n);t.mediaDevices.getUserMedia=function(i){return r(Bm(i))}}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=(function(s,o,c){t.mediaDevices.getUserMedia(s).then(o,c)}).bind(t))}function Bm(e){return e&&e.video!==void 0?Object.assign({},e,{video:jm.compactObject(e.video)}):e}function sC(e){if(e.RTCPeerConnection){var t=e.RTCPeerConnection;e.RTCPeerConnection=function(r,i){if(r&&r.iceServers){for(var s=[],o=0;o<r.iceServers.length;o++){var c=r.iceServers[o];c.urls===void 0&&c.url?(jm.deprecated("RTCIceServer.url","RTCIceServer.urls"),c=JSON.parse(JSON.stringify(c)),c.urls=c.url,delete c.url,s.push(c)):s.push(r.iceServers[o])}r.iceServers=s}return new t(r,i)},e.RTCPeerConnection.prototype=t.prototype,"generateCertificate"in t&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:function(){return t.generateCertificate}})}}function oC(e){ei(e)==="object"&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})}function aC(e){var t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(r){if(r){typeof r.offerToReceiveAudio<"u"&&(r.offerToReceiveAudio=!!r.offerToReceiveAudio);var i=this.getTransceivers().find(function(o){return o.receiver.track.kind==="audio"});r.offerToReceiveAudio===!1&&i?i.direction==="sendrecv"?i.setDirection?i.setDirection("sendonly"):i.direction="sendonly":i.direction==="recvonly"&&(i.setDirection?i.setDirection("inactive"):i.direction="inactive"):r.offerToReceiveAudio===!0&&!i&&this.addTransceiver("audio",{direction:"recvonly"}),typeof r.offerToReceiveVideo<"u"&&(r.offerToReceiveVideo=!!r.offerToReceiveVideo);var s=this.getTransceivers().find(function(o){return o.receiver.track.kind==="video"});r.offerToReceiveVideo===!1&&s?s.direction==="sendrecv"?s.setDirection?s.setDirection("sendonly"):s.direction="sendonly":s.direction==="recvonly"&&(s.setDirection?s.setDirection("inactive"):s.direction="inactive"):r.offerToReceiveVideo===!0&&!s&&this.addTransceiver("video",{direction:"recvonly"})}return t.apply(this,arguments)}}function cC(e){ei(e)!=="object"||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var Fm=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Um=(e,t,n)=>(Fm(e,t,"read from private field"),n?n.call(e):t.get(e)),uC=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},lC=(e,t,n,r)=>(Fm(e,t,"write to private field"),t.set(e,n),n);const qm=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","DXFilmEdge","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","rMQRCode","UPC-A","UPC-E"];function dC(e){return e.join("|")}function fC(e){const t=Vm(e);let n=0,r=qm.length-1;for(;n<=r;){const i=Math.floor((n+r)/2),s=qm[i],o=Vm(s);if(o===t)return s;o<t?n=i+1:r=i-1}return"None"}function Vm(e){return e.toLowerCase().replace(/_-\[\]/g,"")}function hC(e,t){return e.Binarizer[t]}function pC(e,t){return e.CharacterSet[t]}const mC=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function gC(e){return mC[e.value]}function yC(e,t){return e.EanAddOnSymbol[t]}function vC(e,t){return e.TextMode[t]}const ts={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!1,validateCode39CheckSum:!1,validateITFCheckSum:!1,returnCodabarStartEnd:!1,returnErrors:!1,eanAddOnSymbol:"Read",textMode:"Plain",characterSet:"Unknown"};function $m(e,t){return{...t,formats:dC(t.formats),binarizer:hC(e,t.binarizer),eanAddOnSymbol:yC(e,t.eanAddOnSymbol),textMode:vC(e,t.textMode),characterSet:pC(e,t.characterSet)}}function Gm(e){return{...e,format:fC(e.format),eccLevel:e.eccLevel,contentType:gC(e.contentType)}}const bC={locateFile:(e,t)=>{const n=e.match(/_(.+?)\.wasm$/);return n?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.2.11/dist/${n[1]}/${e}`:t+e}};let Hm=new WeakMap;function Ll(e,t){var n;const r=Hm.get(e);if(r!=null&&r.modulePromise&&t===void 0)return r.modulePromise;const i=(n=r==null?void 0:r.moduleOverrides)!=null?n:bC,s=e({...i});return Hm.set(e,{moduleOverrides:i,modulePromise:s}),s}async function wC(e,t,n=ts){const r={...ts,...n},i=await Ll(e),{size:s}=t,o=new Uint8Array(await t.arrayBuffer()),c=i._malloc(s);i.HEAPU8.set(o,c);const u=i.readBarcodesFromImage(c,s,$m(i,r));i._free(c);const d=[];for(let f=0;f<u.size();++f)d.push(Gm(u.get(f)));return d}async function EC(e,t,n=ts){const r={...ts,...n},i=await Ll(e),{data:s,width:o,height:c,data:{byteLength:u}}=t,d=i._malloc(u);i.HEAPU8.set(s,d);const f=i.readBarcodesFromPixmap(d,o,c,$m(i,r));i._free(d);const p=[];for(let l=0;l<f.size();++l)p.push(Gm(f.get(l)));return p}({...ts,formats:[...ts.formats]});var Bl=(()=>{var e=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(t={}){var n,r=t,i,s;r.ready=new Promise((_,x)=>{i=_,s=x});var o=Object.assign({},r),c="./this.program",u=typeof window=="object",d=typeof Bun<"u",f=typeof((n=globalThis.WebAssembly)==null?void 0:n.instantiate)=="function",p=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var l="";function v(_){return r.locateFile?r.locateFile(_,l):l+_}var a;(u||p||d)&&(p?l=self.location.href:typeof document<"u"&&document.currentScript&&(l=document.currentScript.src),e&&(l=e),l.startsWith("blob:")?l="":l=l.substr(0,l.replace(/[?#].*/,"").lastIndexOf("/")+1),p&&(a=_=>{var x=new XMLHttpRequest;return x.open("GET",_,!1),x.responseType="arraybuffer",x.send(null),new Uint8Array(x.response)}));var h=r.print||console.log.bind(console),y=r.printErr||console.error.bind(console);Object.assign(r,o),o=null,r.arguments&&r.arguments,r.thisProgram&&(c=r.thisProgram),r.quit&&r.quit;var g;r.wasmBinary&&(g=r.wasmBinary);var b,w=!1,E,S,A,T,O,N,D,U;function q(){var _=b.buffer;r.HEAP8=E=new Int8Array(_),r.HEAP16=A=new Int16Array(_),r.HEAPU8=S=new Uint8Array(_),r.HEAPU16=T=new Uint16Array(_),r.HEAP32=O=new Int32Array(_),r.HEAPU32=N=new Uint32Array(_),r.HEAPF32=D=new Float32Array(_),r.HEAPF64=U=new Float64Array(_)}var F=[],V=[],R=[];function L(){if(r.preRun)for(typeof r.preRun=="function"&&(r.preRun=[r.preRun]);r.preRun.length;)Z(r.preRun.shift());Q(F)}function W(){Q(V)}function z(){if(r.postRun)for(typeof r.postRun=="function"&&(r.postRun=[r.postRun]);r.postRun.length;)re(r.postRun.shift());Q(R)}function Z(_){F.unshift(_)}function te(_){V.unshift(_)}function re(_){R.unshift(_)}var he=0,ce=null;function ye(_){var x;he++,(x=r.monitorRunDependencies)===null||x===void 0||x.call(r,he)}function le(_){var x;if(he--,(x=r.monitorRunDependencies)===null||x===void 0||x.call(r,he),he==0&&ce){var I=ce;ce=null,I()}}function $(_){var x;(x=r.onAbort)===null||x===void 0||x.call(r,_),_="Aborted("+_+")",y(_),w=!0,_+=". Build with -sASSERTIONS for more info.";var I=new WebAssembly.RuntimeError(_);throw s(I),I}var H="data:application/octet-stream;base64,",X=_=>_.startsWith(H),C;C="zxing_reader.wasm",X(C)||(C=v(C));function j(_){if(_==C&&g)return new Uint8Array(g);if(a)return a(_);throw"both async and sync fetching of the wasm failed"}function B(_){return!g&&(u||p||d||f)&&typeof fetch=="function"?fetch(_,{credentials:"same-origin"}).then(x=>{if(!x.ok)throw`failed to load wasm binary file at '${_}'`;return x.arrayBuffer()}).catch(()=>j(_)):Promise.resolve().then(()=>j(_))}function M(_,x,I){return B(_).then(P=>WebAssembly.instantiate(P,x)).then(I,P=>{y(`failed to asynchronously prepare wasm: ${P}`),$(P)})}function ee(_,x,I,P){return!_&&typeof WebAssembly.instantiateStreaming=="function"&&!X(x)&&typeof fetch=="function"?fetch(x,{credentials:"same-origin"}).then(K=>{var ne=WebAssembly.instantiateStreaming(K,I);return ne.then(P,function(se){return y(`wasm streaming compile failed: ${se}`),y("falling back to ArrayBuffer instantiation"),M(x,I,P)})}):M(x,I,P)}function J(){var _={a:HM};function x(P,K){return Ft=P.exports,b=Ft.ma,q(),Tb=Ft.qa,te(Ft.na),le(),Ft}ye();function I(P){x(P.instance)}if(r.instantiateWasm)try{return r.instantiateWasm(_,x)}catch(P){y(`Module.instantiateWasm callback failed with error: ${P}`),s(P)}return ee(g,C,_,I).catch(s),{}}var Q=_=>{for(;_.length>0;)_.shift()(r)};r.noExitRuntime;var Y=[],pe=0,ge=_=>{var x=new be(_);return x.get_caught()||(x.set_caught(!0),pe--),x.set_rethrown(!1),Y.push(x),Vb(x.excPtr),x.get_exception_ptr()},ue=0,ie=()=>{Nt(0,0);var _=Y.pop();qb(_.excPtr),ue=0};class be{constructor(x){this.excPtr=x,this.ptr=x-24}set_type(x){N[this.ptr+4>>2]=x}get_type(){return N[this.ptr+4>>2]}set_destructor(x){N[this.ptr+8>>2]=x}get_destructor(){return N[this.ptr+8>>2]}set_caught(x){x=x?1:0,E[this.ptr+12]=x}get_caught(){return E[this.ptr+12]!=0}set_rethrown(x){x=x?1:0,E[this.ptr+13]=x}get_rethrown(){return E[this.ptr+13]!=0}init(x,I){this.set_adjusted_ptr(0),this.set_type(x),this.set_destructor(I)}set_adjusted_ptr(x){N[this.ptr+16>>2]=x}get_adjusted_ptr(){return N[this.ptr+16>>2]}get_exception_ptr(){var x=Gb(this.get_type());if(x)return N[this.excPtr>>2];var I=this.get_adjusted_ptr();return I!==0?I:this.excPtr}}var oe=_=>{throw ue||(ue=_),ue},Ce=_=>{var x=ue;if(!x)return fa(0),0;var I=new be(x);I.set_adjusted_ptr(x);var P=I.get_type();if(!P)return fa(0),x;for(var K in _){var ne=_[K];if(ne===0||ne===P)break;var se=I.ptr+16;if($b(ne,P,se))return fa(ne),x}return fa(P),x},_e=()=>Ce([]),We=_=>Ce([_]),rt=(_,x)=>Ce([_,x]),vt=()=>{var _=Y.pop();_||$("no exception to throw");var x=_.excPtr;throw _.get_rethrown()||(Y.push(_),_.set_rethrown(!0),_.set_caught(!1),pe++),ue=x,ue},ht=(_,x,I)=>{var P=new be(_);throw P.init(x,I),ue=_,pe++,ue},Kn=()=>pe,ct={},nn=_=>{for(;_.length;){var x=_.pop(),I=_.pop();I(x)}};function pt(_){return this.fromWireType(N[_>>2])}var Re={},ln={},Lt={},hn,rn=_=>{throw new hn(_)},pn=(_,x,I)=>{_.forEach(function(ae){Lt[ae]=x});function P(ae){var me=I(ae);me.length!==_.length&&rn("Mismatched type converter count");for(var Ee=0;Ee<_.length;++Ee)Pe(_[Ee],me[Ee])}var K=new Array(x.length),ne=[],se=0;x.forEach((ae,me)=>{ln.hasOwnProperty(ae)?K[me]=ln[ae]:(ne.push(ae),Re.hasOwnProperty(ae)||(Re[ae]=[]),Re[ae].push(()=>{K[me]=ln[ae],++se,se===ne.length&&P(K)}))}),ne.length===0&&P(K)},Rn=_=>{var x=ct[_];delete ct[_];var I=x.rawConstructor,P=x.rawDestructor,K=x.fields,ne=K.map(se=>se.getterReturnType).concat(K.map(se=>se.setterArgumentType));pn([_],ne,se=>{var ae={};return K.forEach((me,Ee)=>{var Ie=me.fieldName,ze=se[Ee],Be=me.getter,st=me.getterContext,Vt=se[Ee+K.length],gn=me.setter,Mt=me.setterContext;ae[Ie]={read:sn=>ze.fromWireType(Be(st,sn)),write:(sn,we)=>{var ke=[];gn(Mt,sn,Vt.toWireType(ke,we)),nn(ke)}}}),[{name:x.name,fromWireType:me=>{var Ee={};for(var Ie in ae)Ee[Ie]=ae[Ie].read(me);return P(me),Ee},toWireType:(me,Ee)=>{for(var Ie in ae)if(!(Ie in Ee))throw new TypeError(`Missing field: "${Ie}"`);var ze=I();for(Ie in ae)ae[Ie].write(ze,Ee[Ie]);return me!==null&&me.push(P,ze),ze},argPackAdvance:Ge,readValueFromPointer:pt,destructorFunction:P}]})},Fn=(_,x,I,P,K)=>{},xn=()=>{for(var _=new Array(256),x=0;x<256;++x)_[x]=String.fromCharCode(x);mn=_},mn,At=_=>{for(var x="",I=_;S[I];)x+=mn[S[I++]];return x},zn,Ae=_=>{throw new zn(_)};function Ke(_,x){let I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var P=x.name;if(_||Ae(`type "${P}" must have a positive integer typeid pointer`),ln.hasOwnProperty(_)){if(I.ignoreDuplicateRegistrations)return;Ae(`Cannot register type '${P}' twice`)}if(ln[_]=x,delete Lt[_],Re.hasOwnProperty(_)){var K=Re[_];delete Re[_],K.forEach(ne=>ne())}}function Pe(_,x){let I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!("argPackAdvance"in x))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Ke(_,x,I)}var Ge=8,Ot=(_,x,I,P)=>{x=At(x),Pe(_,{name:x,fromWireType:function(K){return!!K},toWireType:function(K,ne){return ne?I:P},argPackAdvance:Ge,readValueFromPointer:function(K){return this.fromWireType(S[K])},destructorFunction:null})},js=_=>({count:_.count,deleteScheduled:_.deleteScheduled,preservePointerOnDelete:_.preservePointerOnDelete,ptr:_.ptr,ptrType:_.ptrType,smartPtr:_.smartPtr,smartPtrType:_.smartPtrType}),bi=_=>{function x(I){return I.$$.ptrType.registeredClass.name}Ae(x(_)+" instance already deleted")},Ls=!1,ua=_=>{},Kf=_=>{_.smartPtr?_.smartPtrType.rawDestructor(_.smartPtr):_.ptrType.registeredClass.rawDestructor(_.ptr)},xu=_=>{_.count.value-=1;var x=_.count.value===0;x&&Kf(_)},_u=(_,x,I)=>{if(x===I)return _;if(I.baseClass===void 0)return null;var P=_u(_,x,I.baseClass);return P===null?null:I.downcast(P)},Cu={},G=()=>Object.keys(He).length,ve=()=>{var _=[];for(var x in He)He.hasOwnProperty(x)&&_.push(He[x]);return _},Te=[],Me=()=>{for(;Te.length;){var _=Te.pop();_.$$.deleteScheduled=!1,_.delete()}},Ze,gt=_=>{Ze=_,Te.length&&Ze&&Ze(Me)},Xe=()=>{r.getInheritedInstanceCount=G,r.getLiveInheritedInstances=ve,r.flushPendingDeletes=Me,r.setDelayFunction=gt},He={},dn=(_,x)=>{for(x===void 0&&Ae("ptr should not be undefined");_.baseClass;)x=_.upcast(x),_=_.baseClass;return x},Rt=(_,x)=>(x=dn(_,x),He[x]),xt=(_,x)=>{(!x.ptrType||!x.ptr)&&rn("makeClassHandle requires ptr and ptrType");var I=!!x.smartPtrType,P=!!x.smartPtr;return I!==P&&rn("Both smartPtrType and smartPtr must be specified"),x.count={value:1},Qn(Object.create(_,{$$:{value:x,writable:!0}}))};function Nn(_){var x=this.getPointee(_);if(!x)return this.destructor(_),null;var I=Rt(this.registeredClass,x);if(I!==void 0){if(I.$$.count.value===0)return I.$$.ptr=x,I.$$.smartPtr=_,I.clone();var P=I.clone();return this.destructor(_),P}function K(){return this.isSmartPointer?xt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:x,smartPtrType:this,smartPtr:_}):xt(this.registeredClass.instancePrototype,{ptrType:this,ptr:_})}var ne=this.registeredClass.getActualType(x),se=Cu[ne];if(!se)return K.call(this);var ae;this.isConst?ae=se.constPointerType:ae=se.pointerType;var me=_u(x,this.registeredClass,ae.registeredClass);return me===null?K.call(this):this.isSmartPointer?xt(ae.registeredClass.instancePrototype,{ptrType:ae,ptr:me,smartPtrType:this,smartPtr:_}):xt(ae.registeredClass.instancePrototype,{ptrType:ae,ptr:me})}var Qn=_=>typeof FinalizationRegistry>"u"?(Qn=x=>x,_):(Ls=new FinalizationRegistry(x=>{xu(x.$$)}),Qn=x=>{var I=x.$$,P=!!I.smartPtr;if(P){var K={$$:I};Ls.register(x,K,x)}return x},ua=x=>Ls.unregister(x),Qn(_)),Br=()=>{Object.assign(Zt.prototype,{isAliasOf(_){if(!(this instanceof Zt)||!(_ instanceof Zt))return!1;var x=this.$$.ptrType.registeredClass,I=this.$$.ptr;_.$$=_.$$;for(var P=_.$$.ptrType.registeredClass,K=_.$$.ptr;x.baseClass;)I=x.upcast(I),x=x.baseClass;for(;P.baseClass;)K=P.upcast(K),P=P.baseClass;return x===P&&I===K},clone(){if(this.$$.ptr||bi(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var _=Qn(Object.create(Object.getPrototypeOf(this),{$$:{value:js(this.$$)}}));return _.$$.count.value+=1,_.$$.deleteScheduled=!1,_},delete(){this.$$.ptr||bi(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ae("Object already scheduled for deletion"),ua(this),xu(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||bi(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ae("Object already scheduled for deletion"),Te.push(this),Te.length===1&&Ze&&Ze(Me),this.$$.deleteScheduled=!0,this}})};function Zt(){}var Fr=(_,x)=>Object.defineProperty(x,"name",{value:_}),Au=(_,x,I)=>{if(_[x].overloadTable===void 0){var P=_[x];_[x]=function(){for(var K=arguments.length,ne=new Array(K),se=0;se<K;se++)ne[se]=arguments[se];return _[x].overloadTable.hasOwnProperty(ne.length)||Ae(`Function '${I}' called with an invalid number of arguments (${ne.length}) - expects one of (${_[x].overloadTable})!`),_[x].overloadTable[ne.length].apply(this,ne)},_[x].overloadTable=[],_[x].overloadTable[P.argCount]=P}},la=(_,x,I)=>{r.hasOwnProperty(_)?((I===void 0||r[_].overloadTable!==void 0&&r[_].overloadTable[I]!==void 0)&&Ae(`Cannot register public name '${_}' twice`),Au(r,_,_),r.hasOwnProperty(I)&&Ae(`Cannot register multiple overloads of a function with the same number of arguments (${I})!`),r[_].overloadTable[I]=x):(r[_]=x,I!==void 0&&(r[_].numArguments=I))},C3=48,A3=57,T3=_=>{if(_===void 0)return"_unknown";_=_.replace(/[^a-zA-Z0-9_]/g,"$");var x=_.charCodeAt(0);return x>=C3&&x<=A3?`_${_}`:_};function I3(_,x,I,P,K,ne,se,ae){this.name=_,this.constructor=x,this.instancePrototype=I,this.rawDestructor=P,this.baseClass=K,this.getActualType=ne,this.upcast=se,this.downcast=ae,this.pureVirtualFunctions=[]}var zf=(_,x,I)=>{for(;x!==I;)x.upcast||Ae(`Expected null or instance of ${I.name}, got an instance of ${x.name}`),_=x.upcast(_),x=x.baseClass;return _};function k3(_,x){if(x===null)return this.isReference&&Ae(`null is not a valid ${this.name}`),0;x.$$||Ae(`Cannot pass "${th(x)}" as a ${this.name}`),x.$$.ptr||Ae(`Cannot pass deleted object as a pointer of type ${this.name}`);var I=x.$$.ptrType.registeredClass,P=zf(x.$$.ptr,I,this.registeredClass);return P}function O3(_,x){var I;if(x===null)return this.isReference&&Ae(`null is not a valid ${this.name}`),this.isSmartPointer?(I=this.rawConstructor(),_!==null&&_.push(this.rawDestructor,I),I):0;(!x||!x.$$)&&Ae(`Cannot pass "${th(x)}" as a ${this.name}`),x.$$.ptr||Ae(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&x.$$.ptrType.isConst&&Ae(`Cannot convert argument of type ${x.$$.smartPtrType?x.$$.smartPtrType.name:x.$$.ptrType.name} to parameter type ${this.name}`);var P=x.$$.ptrType.registeredClass;if(I=zf(x.$$.ptr,P,this.registeredClass),this.isSmartPointer)switch(x.$$.smartPtr===void 0&&Ae("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:x.$$.smartPtrType===this?I=x.$$.smartPtr:Ae(`Cannot convert argument of type ${x.$$.smartPtrType?x.$$.smartPtrType.name:x.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:I=x.$$.smartPtr;break;case 2:if(x.$$.smartPtrType===this)I=x.$$.smartPtr;else{var K=x.clone();I=this.rawShare(I,qr.toHandle(()=>K.delete())),_!==null&&_.push(this.rawDestructor,I)}break;default:Ae("Unsupporting sharing policy")}return I}function R3(_,x){if(x===null)return this.isReference&&Ae(`null is not a valid ${this.name}`),0;x.$$||Ae(`Cannot pass "${th(x)}" as a ${this.name}`),x.$$.ptr||Ae(`Cannot pass deleted object as a pointer of type ${this.name}`),x.$$.ptrType.isConst&&Ae(`Cannot convert argument of type ${x.$$.ptrType.name} to parameter type ${this.name}`);var I=x.$$.ptrType.registeredClass,P=zf(x.$$.ptr,I,this.registeredClass);return P}var N3=()=>{Object.assign(Tu.prototype,{getPointee(_){return this.rawGetPointee&&(_=this.rawGetPointee(_)),_},destructor(_){var x;(x=this.rawDestructor)===null||x===void 0||x.call(this,_)},argPackAdvance:Ge,readValueFromPointer:pt,fromWireType:Nn})};function Tu(_,x,I,P,K,ne,se,ae,me,Ee,Ie){this.name=_,this.registeredClass=x,this.isReference=I,this.isConst=P,this.isSmartPointer=K,this.pointeeType=ne,this.sharingPolicy=se,this.rawGetPointee=ae,this.rawConstructor=me,this.rawShare=Ee,this.rawDestructor=Ie,!K&&x.baseClass===void 0?P?(this.toWireType=k3,this.destructorFunction=null):(this.toWireType=R3,this.destructorFunction=null):this.toWireType=O3}var Ab=(_,x,I)=>{r.hasOwnProperty(_)||rn("Replacing nonexistent public symbol"),r[_].overloadTable!==void 0&&I!==void 0?r[_].overloadTable[I]=x:(r[_]=x,r[_].argCount=I)},M3=(_,x,I)=>{var P=r["dynCall_"+_];return P(x,...I)},Iu=[],Tb,Bt=_=>{var x=Iu[_];return x||(_>=Iu.length&&(Iu.length=_+1),Iu[_]=x=Tb.get(_)),x},D3=function(_,x){let I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(_.includes("j"))return M3(_,x,I);var P=Bt(x)(...I);return P},P3=(_,x)=>function(){for(var I=arguments.length,P=new Array(I),K=0;K<I;K++)P[K]=arguments[K];return D3(_,x,P)},cr=(_,x)=>{_=At(_);function I(){return _.includes("j")?P3(_,x):Bt(x)}var P=I();return typeof P!="function"&&Ae(`unknown function pointer with signature ${_}: ${x}`),P},j3=(_,x)=>{var I=Fr(x,function(P){this.name=x,this.message=P;var K=new Error(P).stack;K!==void 0&&(this.stack=this.toString()+`
102
- `+K.replace(/^Error(:[^\n]*)?\n/,""))});return I.prototype=Object.create(_.prototype),I.prototype.constructor=I,I.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},I},Ib,kb=_=>{var x=Ub(_),I=At(x);return Vr(x),I},ku=(_,x)=>{var I=[],P={};function K(ne){if(!P[ne]&&!ln[ne]){if(Lt[ne]){Lt[ne].forEach(K);return}I.push(ne),P[ne]=!0}}throw x.forEach(K),new Ib(`${_}: `+I.map(kb).join([", "]))},L3=(_,x,I,P,K,ne,se,ae,me,Ee,Ie,ze,Be)=>{Ie=At(Ie),ne=cr(K,ne),ae&&(ae=cr(se,ae)),Ee&&(Ee=cr(me,Ee)),Be=cr(ze,Be);var st=T3(Ie);la(st,function(){ku(`Cannot construct ${Ie} due to unbound types`,[P])}),pn([_,x,I],P?[P]:[],Vt=>{Vt=Vt[0];var gn,Mt;P?(gn=Vt.registeredClass,Mt=gn.instancePrototype):Mt=Zt.prototype;var sn=Fr(Ie,function(){if(Object.getPrototypeOf(this)!==we)throw new zn("Use 'new' to construct "+Ie);if(ke.constructor_body===void 0)throw new zn(Ie+" has no accessible constructor");for(var Kb=arguments.length,Mu=new Array(Kb),Du=0;Du<Kb;Du++)Mu[Du]=arguments[Du];var zb=ke.constructor_body[Mu.length];if(zb===void 0)throw new zn(`Tried to invoke ctor of ${Ie} with invalid number of parameters (${Mu.length}) - expected (${Object.keys(ke.constructor_body).toString()}) parameters instead!`);return zb.apply(this,Mu)}),we=Object.create(Mt,{constructor:{value:sn}});sn.prototype=we;var ke=new I3(Ie,sn,we,Be,gn,ne,ae,Ee);if(ke.baseClass){var $t,Xt;(Xt=($t=ke.baseClass).__derivedClasses)!==null&&Xt!==void 0||($t.__derivedClasses=[]),ke.baseClass.__derivedClasses.push(ke)}var Bs=new Tu(Ie,ke,!0,!1,!1),Nu=new Tu(Ie+"*",ke,!1,!1,!1),Wb=new Tu(Ie+" const*",ke,!1,!0,!1);return Cu[_]={pointerType:Nu,constPointerType:Wb},Ab(st,sn),[Bs,Nu,Wb]})},Qf=(_,x)=>{for(var I=[],P=0;P<_;P++)I.push(N[x+P*4>>2]);return I};function B3(_){for(var x=1;x<_.length;++x)if(_[x]!==null&&_[x].destructorFunction===void 0)return!0;return!1}function Jf(_,x,I,P,K,ne){var se=x.length;se<2&&Ae("argTypes array size mismatch! Must at least get return value and 'this' types!");var ae=x[1]!==null&&I!==null,me=B3(x),Ee=x[0].name!=="void",Ie=se-2,ze=new Array(Ie),Be=[],st=[],Vt=function(){arguments.length!==Ie&&Ae(`function ${_} called with ${arguments.length} arguments, expected ${Ie}`),st.length=0;var gn;Be.length=ae?2:1,Be[0]=K,ae&&(gn=x[1].toWireType(st,this),Be[1]=gn);for(var Mt=0;Mt<Ie;++Mt)ze[Mt]=x[Mt+2].toWireType(st,Mt<0||arguments.length<=Mt?void 0:arguments[Mt]),Be.push(ze[Mt]);var sn=P(...Be);function we(ke){if(me)nn(st);else for(var $t=ae?1:2;$t<x.length;$t++){var Xt=$t===1?gn:ze[$t-2];x[$t].destructorFunction!==null&&x[$t].destructorFunction(Xt)}if(Ee)return x[0].fromWireType(ke)}return we(sn)};return Fr(_,Vt)}var F3=(_,x,I,P,K,ne)=>{var se=Qf(x,I);K=cr(P,K),pn([],[_],ae=>{ae=ae[0];var me=`constructor ${ae.name}`;if(ae.registeredClass.constructor_body===void 0&&(ae.registeredClass.constructor_body=[]),ae.registeredClass.constructor_body[x-1]!==void 0)throw new zn(`Cannot register multiple constructors with identical number of parameters (${x-1}) for class '${ae.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return ae.registeredClass.constructor_body[x-1]=()=>{ku(`Cannot construct ${ae.name} due to unbound types`,se)},pn([],se,Ee=>(Ee.splice(1,0,null),ae.registeredClass.constructor_body[x-1]=Jf(me,Ee,null,K,ne),[])),[]})},Ob=_=>{_=_.trim();const x=_.indexOf("(");return x!==-1?_.substr(0,x):_},U3=(_,x,I,P,K,ne,se,ae,me)=>{var Ee=Qf(I,P);x=At(x),x=Ob(x),ne=cr(K,ne),pn([],[_],Ie=>{Ie=Ie[0];var ze=`${Ie.name}.${x}`;x.startsWith("@@")&&(x=Symbol[x.substring(2)]),ae&&Ie.registeredClass.pureVirtualFunctions.push(x);function Be(){ku(`Cannot call ${ze} due to unbound types`,Ee)}var st=Ie.registeredClass.instancePrototype,Vt=st[x];return Vt===void 0||Vt.overloadTable===void 0&&Vt.className!==Ie.name&&Vt.argCount===I-2?(Be.argCount=I-2,Be.className=Ie.name,st[x]=Be):(Au(st,x,ze),st[x].overloadTable[I-2]=Be),pn([],Ee,gn=>{var Mt=Jf(ze,gn,Ie,ne,se);return st[x].overloadTable===void 0?(Mt.argCount=I-2,st[x]=Mt):st[x].overloadTable[I-2]=Mt,[]}),[]})},Zf=[],Ur=[],Xf=_=>{_>9&&--Ur[_+1]===0&&(Ur[_]=void 0,Zf.push(_))},q3=()=>Ur.length/2-5-Zf.length,V3=()=>{Ur.push(0,1,void 0,1,null,1,!0,1,!1,1),r.count_emval_handles=q3},qr={toValue:_=>(_||Ae("Cannot use deleted val. handle = "+_),Ur[_]),toHandle:_=>{switch(_){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const x=Zf.pop()||Ur.length;return Ur[x]=_,Ur[x+1]=1,x}}}},$3={name:"emscripten::val",fromWireType:_=>{var x=qr.toValue(_);return Xf(_),x},toWireType:(_,x)=>qr.toHandle(x),argPackAdvance:Ge,readValueFromPointer:pt,destructorFunction:null},Rb=_=>Pe(_,$3),G3=(_,x,I)=>{switch(x){case 1:return I?function(P){return this.fromWireType(E[P])}:function(P){return this.fromWireType(S[P])};case 2:return I?function(P){return this.fromWireType(A[P>>1])}:function(P){return this.fromWireType(T[P>>1])};case 4:return I?function(P){return this.fromWireType(O[P>>2])}:function(P){return this.fromWireType(N[P>>2])};default:throw new TypeError(`invalid integer width (${x}): ${_}`)}},H3=(_,x,I,P)=>{x=At(x);function K(){}K.values={},Pe(_,{name:x,constructor:K,fromWireType:function(ne){return this.constructor.values[ne]},toWireType:(ne,se)=>se.value,argPackAdvance:Ge,readValueFromPointer:G3(x,I,P),destructorFunction:null}),la(x,K)},eh=(_,x)=>{var I=ln[_];return I===void 0&&Ae(`${x} has unknown type ${kb(_)}`),I},Y3=(_,x,I)=>{var P=eh(_,"enum");x=At(x);var K=P.constructor,ne=Object.create(P.constructor.prototype,{value:{value:I},constructor:{value:Fr(`${P.name}_${x}`,function(){})}});K.values[I]=ne,K[x]=ne},th=_=>{if(_===null)return"null";var x=typeof _;return x==="object"||x==="array"||x==="function"?_.toString():""+_},W3=(_,x)=>{switch(x){case 4:return function(I){return this.fromWireType(D[I>>2])};case 8:return function(I){return this.fromWireType(U[I>>3])};default:throw new TypeError(`invalid float width (${x}): ${_}`)}},K3=(_,x,I)=>{x=At(x),Pe(_,{name:x,fromWireType:P=>P,toWireType:(P,K)=>K,argPackAdvance:Ge,readValueFromPointer:W3(x,I),destructorFunction:null})},z3=(_,x,I,P,K,ne,se)=>{var ae=Qf(x,I);_=At(_),_=Ob(_),K=cr(P,K),la(_,function(){ku(`Cannot call ${_} due to unbound types`,ae)},x-1),pn([],ae,me=>{var Ee=[me[0],null].concat(me.slice(1));return Ab(_,Jf(_,Ee,null,K,ne),x-1),[]})},Q3=(_,x,I)=>{switch(x){case 1:return I?P=>E[P]:P=>S[P];case 2:return I?P=>A[P>>1]:P=>T[P>>1];case 4:return I?P=>O[P>>2]:P=>N[P>>2];default:throw new TypeError(`invalid integer width (${x}): ${_}`)}},J3=(_,x,I,P,K)=>{x=At(x);var ne=Ie=>Ie;if(P===0){var se=32-8*I;ne=Ie=>Ie<<se>>>se}var ae=x.includes("unsigned"),me=(Ie,ze)=>{},Ee;ae?Ee=function(Ie,ze){return me(ze,this.name),ze>>>0}:Ee=function(Ie,ze){return me(ze,this.name),ze},Pe(_,{name:x,fromWireType:ne,toWireType:Ee,argPackAdvance:Ge,readValueFromPointer:Q3(x,I,P!==0),destructorFunction:null})},Z3=(_,x,I)=>{var P=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],K=P[x];function ne(se){var ae=N[se>>2],me=N[se+4>>2];return new K(E.buffer,me,ae)}I=At(I),Pe(_,{name:I,fromWireType:ne,argPackAdvance:Ge,readValueFromPointer:ne},{ignoreDuplicateRegistrations:!0})},X3=(_,x)=>{Rb(_)},Nb=(_,x,I,P)=>{if(!(P>0))return 0;for(var K=I,ne=I+P-1,se=0;se<_.length;++se){var ae=_.charCodeAt(se);if(ae>=55296&&ae<=57343){var me=_.charCodeAt(++se);ae=65536+((ae&1023)<<10)|me&1023}if(ae<=127){if(I>=ne)break;x[I++]=ae}else if(ae<=2047){if(I+1>=ne)break;x[I++]=192|ae>>6,x[I++]=128|ae&63}else if(ae<=65535){if(I+2>=ne)break;x[I++]=224|ae>>12,x[I++]=128|ae>>6&63,x[I++]=128|ae&63}else{if(I+3>=ne)break;x[I++]=240|ae>>18,x[I++]=128|ae>>12&63,x[I++]=128|ae>>6&63,x[I++]=128|ae&63}}return x[I]=0,I-K},eM=(_,x,I)=>Nb(_,S,x,I),Mb=_=>{for(var x=0,I=0;I<_.length;++I){var P=_.charCodeAt(I);P<=127?x++:P<=2047?x+=2:P>=55296&&P<=57343?(x+=4,++I):x+=3}return x},Db=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Pb=(_,x,I)=>{for(var P=x+I,K=x;_[K]&&!(K>=P);)++K;if(K-x>16&&_.buffer&&Db)return Db.decode(_.subarray(x,K));for(var ne="";x<K;){var se=_[x++];if(!(se&128)){ne+=String.fromCharCode(se);continue}var ae=_[x++]&63;if((se&224)==192){ne+=String.fromCharCode((se&31)<<6|ae);continue}var me=_[x++]&63;if((se&240)==224?se=(se&15)<<12|ae<<6|me:se=(se&7)<<18|ae<<12|me<<6|_[x++]&63,se<65536)ne+=String.fromCharCode(se);else{var Ee=se-65536;ne+=String.fromCharCode(55296|Ee>>10,56320|Ee&1023)}}return ne},nh=(_,x)=>_?Pb(S,_,x):"",tM=(_,x)=>{x=At(x);var I=x==="std::string";Pe(_,{name:x,fromWireType(P){var K=N[P>>2],ne=P+4,se;if(I)for(var ae=ne,me=0;me<=K;++me){var Ee=ne+me;if(me==K||S[Ee]==0){var Ie=Ee-ae,ze=nh(ae,Ie);se===void 0?se=ze:(se+="\0",se+=ze),ae=Ee+1}}else{for(var Be=new Array(K),me=0;me<K;++me)Be[me]=String.fromCharCode(S[ne+me]);se=Be.join("")}return Vr(P),se},toWireType(P,K){K instanceof ArrayBuffer&&(K=new Uint8Array(K));var ne,se=typeof K=="string";se||K instanceof Uint8Array||K instanceof Uint8ClampedArray||K instanceof Int8Array||Ae("Cannot pass non-string to std::string"),I&&se?ne=Mb(K):ne=K.length;var ae=sh(4+ne+1),me=ae+4;if(N[ae>>2]=ne,I&&se)eM(K,me,ne+1);else if(se)for(var Ee=0;Ee<ne;++Ee){var Ie=K.charCodeAt(Ee);Ie>255&&(Vr(me),Ae("String has UTF-16 code units that do not fit in 8 bits")),S[me+Ee]=Ie}else for(var Ee=0;Ee<ne;++Ee)S[me+Ee]=K[Ee];return P!==null&&P.push(Vr,ae),ae},argPackAdvance:Ge,readValueFromPointer:pt,destructorFunction(P){Vr(P)}})},jb=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,nM=(_,x)=>{for(var I=_,P=I>>1,K=P+x/2;!(P>=K)&&T[P];)++P;if(I=P<<1,I-_>32&&jb)return jb.decode(S.subarray(_,I));for(var ne="",se=0;!(se>=x/2);++se){var ae=A[_+se*2>>1];if(ae==0)break;ne+=String.fromCharCode(ae)}return ne},rM=(_,x,I)=>{var P;if((P=I)!==null&&P!==void 0||(I=2147483647),I<2)return 0;I-=2;for(var K=x,ne=I<_.length*2?I/2:_.length,se=0;se<ne;++se){var ae=_.charCodeAt(se);A[x>>1]=ae,x+=2}return A[x>>1]=0,x-K},iM=_=>_.length*2,sM=(_,x)=>{for(var I=0,P="";!(I>=x/4);){var K=O[_+I*4>>2];if(K==0)break;if(++I,K>=65536){var ne=K-65536;P+=String.fromCharCode(55296|ne>>10,56320|ne&1023)}else P+=String.fromCharCode(K)}return P},oM=(_,x,I)=>{var P;if((P=I)!==null&&P!==void 0||(I=2147483647),I<4)return 0;for(var K=x,ne=K+I-4,se=0;se<_.length;++se){var ae=_.charCodeAt(se);if(ae>=55296&&ae<=57343){var me=_.charCodeAt(++se);ae=65536+((ae&1023)<<10)|me&1023}if(O[x>>2]=ae,x+=4,x+4>ne)break}return O[x>>2]=0,x-K},aM=_=>{for(var x=0,I=0;I<_.length;++I){var P=_.charCodeAt(I);P>=55296&&P<=57343&&++I,x+=4}return x},cM=(_,x,I)=>{I=At(I);var P,K,ne,se;x===2?(P=nM,K=rM,se=iM,ne=ae=>T[ae>>1]):x===4&&(P=sM,K=oM,se=aM,ne=ae=>N[ae>>2]),Pe(_,{name:I,fromWireType:ae=>{for(var me=N[ae>>2],Ee,Ie=ae+4,ze=0;ze<=me;++ze){var Be=ae+4+ze*x;if(ze==me||ne(Be)==0){var st=Be-Ie,Vt=P(Ie,st);Ee===void 0?Ee=Vt:(Ee+="\0",Ee+=Vt),Ie=Be+x}}return Vr(ae),Ee},toWireType:(ae,me)=>{typeof me!="string"&&Ae(`Cannot pass non-string to C++ string type ${I}`);var Ee=se(me),Ie=sh(4+Ee+x);return N[Ie>>2]=Ee/x,K(me,Ie+4,Ee+x),ae!==null&&ae.push(Vr,Ie),Ie},argPackAdvance:Ge,readValueFromPointer:pt,destructorFunction(ae){Vr(ae)}})},uM=(_,x,I,P,K,ne)=>{ct[_]={name:At(x),rawConstructor:cr(I,P),rawDestructor:cr(K,ne),fields:[]}},lM=(_,x,I,P,K,ne,se,ae,me,Ee)=>{ct[_].fields.push({fieldName:At(x),getterReturnType:I,getter:cr(P,K),getterContext:ne,setterArgumentType:se,setter:cr(ae,me),setterContext:Ee})},dM=(_,x)=>{x=At(x),Pe(_,{isVoid:!0,name:x,argPackAdvance:0,fromWireType:()=>{},toWireType:(I,P)=>{}})},rh=[],fM=(_,x,I,P)=>(_=rh[_],x=qr.toValue(x),_(null,x,I,P)),hM={},pM=_=>{var x=hM[_];return x===void 0?At(_):x},Lb=()=>{if(typeof globalThis=="object")return globalThis;function _(x){x.$$$embind_global$$$=x;var I=typeof $$$embind_global$$$=="object"&&x.$$$embind_global$$$==x;return I||delete x.$$$embind_global$$$,I}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&_(global)?$$$embind_global$$$=global:typeof self=="object"&&_(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},mM=_=>_===0?qr.toHandle(Lb()):(_=pM(_),qr.toHandle(Lb()[_])),gM=_=>{var x=rh.length;return rh.push(_),x},yM=(_,x)=>{for(var I=new Array(_),P=0;P<_;++P)I[P]=eh(N[x+P*4>>2],"parameter "+P);return I},vM=Reflect.construct,bM=(_,x,I)=>{var P=[],K=_.toWireType(P,I);return P.length&&(N[x>>2]=qr.toHandle(P)),K},wM=(_,x,I)=>{var P=yM(_,x),K=P.shift();_--;var ne=new Array(_),se=(me,Ee,Ie,ze)=>{for(var Be=0,st=0;st<_;++st)ne[st]=P[st].readValueFromPointer(ze+Be),Be+=P[st].argPackAdvance;var Vt=I===1?vM(Ee,ne):Ee.apply(me,ne);return bM(K,Ie,Vt)},ae=`methodCaller<(${P.map(me=>me.name).join(", ")}) => ${K.name}>`;return gM(Fr(ae,se))},EM=_=>{_>9&&(Ur[_+1]+=1)},SM=_=>{var x=qr.toValue(_);nn(x),Xf(_)},xM=(_,x)=>{_=eh(_,"_emval_take_value");var I=_.readValueFromPointer(x);return qr.toHandle(I)},_M=()=>{$("")},CM=(_,x,I)=>S.copyWithin(_,x,x+I),AM=()=>2147483648,TM=_=>{var x=b.buffer,I=(_-x.byteLength+65535)/65536;try{return b.grow(I),q(),1}catch{}},IM=_=>{var x=S.length;_>>>=0;var I=AM();if(_>I)return!1;for(var P=(me,Ee)=>me+(Ee-me%Ee)%Ee,K=1;K<=4;K*=2){var ne=x*(1+.2/K);ne=Math.min(ne,_+100663296);var se=Math.min(I,P(Math.max(_,ne),65536)),ae=TM(se);if(ae)return!0}return!1},ih={},kM=()=>c||"./this.program",da=()=>{if(!da.strings){var _=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",x={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:_,_:kM()};for(var I in ih)ih[I]===void 0?delete x[I]:x[I]=ih[I];var P=[];for(var I in x)P.push(`${I}=${x[I]}`);da.strings=P}return da.strings},OM=(_,x)=>{for(var I=0;I<_.length;++I)E[x++]=_.charCodeAt(I);E[x]=0},RM=(_,x)=>{var I=0;return da().forEach((P,K)=>{var ne=x+I;N[_+K*4>>2]=ne,OM(P,ne),I+=P.length+1}),0},NM=(_,x)=>{var I=da();N[_>>2]=I.length;var P=0;return I.forEach(K=>P+=K.length+1),N[x>>2]=P,0},MM=_=>52;function DM(_,x,I,P,K){return 70}var PM=[null,[],[]],jM=(_,x)=>{var I=PM[_];x===0||x===10?((_===1?h:y)(Pb(I,0)),I.length=0):I.push(x)},LM=(_,x,I,P)=>{for(var K=0,ne=0;ne<I;ne++){var se=N[x>>2],ae=N[x+4>>2];x+=8;for(var me=0;me<ae;me++)jM(_,S[se+me]);K+=ae}return N[P>>2]=K,0},BM=_=>_,Ou=_=>_%4===0&&(_%100!==0||_%400===0),FM=(_,x)=>{for(var I=0,P=0;P<=x;I+=_[P++]);return I},Bb=[31,29,31,30,31,30,31,31,30,31,30,31],Fb=[31,28,31,30,31,30,31,31,30,31,30,31],UM=(_,x)=>{for(var I=new Date(_.getTime());x>0;){var P=Ou(I.getFullYear()),K=I.getMonth(),ne=(P?Bb:Fb)[K];if(x>ne-I.getDate())x-=ne-I.getDate()+1,I.setDate(1),K<11?I.setMonth(K+1):(I.setMonth(0),I.setFullYear(I.getFullYear()+1));else return I.setDate(I.getDate()+x),I}return I};function qM(_,x,I){var P=Mb(_)+1,K=new Array(P);return Nb(_,K,0,K.length),K}var VM=(_,x)=>{E.set(_,x)},$M=(_,x,I,P)=>{var K=N[P+40>>2],ne={tm_sec:O[P>>2],tm_min:O[P+4>>2],tm_hour:O[P+8>>2],tm_mday:O[P+12>>2],tm_mon:O[P+16>>2],tm_year:O[P+20>>2],tm_wday:O[P+24>>2],tm_yday:O[P+28>>2],tm_isdst:O[P+32>>2],tm_gmtoff:O[P+36>>2],tm_zone:K?nh(K):""},se=nh(I),ae={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var me in ae)se=se.replace(new RegExp(me,"g"),ae[me]);var Ee=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Ie=["January","February","March","April","May","June","July","August","September","October","November","December"];function ze(we,ke,$t){for(var Xt=typeof we=="number"?we.toString():we||"";Xt.length<ke;)Xt=$t[0]+Xt;return Xt}function Be(we,ke){return ze(we,ke,"0")}function st(we,ke){function $t(Bs){return Bs<0?-1:Bs>0?1:0}var Xt;return(Xt=$t(we.getFullYear()-ke.getFullYear()))===0&&(Xt=$t(we.getMonth()-ke.getMonth()))===0&&(Xt=$t(we.getDate()-ke.getDate())),Xt}function Vt(we){switch(we.getDay()){case 0:return new Date(we.getFullYear()-1,11,29);case 1:return we;case 2:return new Date(we.getFullYear(),0,3);case 3:return new Date(we.getFullYear(),0,2);case 4:return new Date(we.getFullYear(),0,1);case 5:return new Date(we.getFullYear()-1,11,31);case 6:return new Date(we.getFullYear()-1,11,30)}}function gn(we){var ke=UM(new Date(we.tm_year+1900,0,1),we.tm_yday),$t=new Date(ke.getFullYear(),0,4),Xt=new Date(ke.getFullYear()+1,0,4),Bs=Vt($t),Nu=Vt(Xt);return st(Bs,ke)<=0?st(Nu,ke)<=0?ke.getFullYear()+1:ke.getFullYear():ke.getFullYear()-1}var Mt={"%a":we=>Ee[we.tm_wday].substring(0,3),"%A":we=>Ee[we.tm_wday],"%b":we=>Ie[we.tm_mon].substring(0,3),"%B":we=>Ie[we.tm_mon],"%C":we=>{var ke=we.tm_year+1900;return Be(ke/100|0,2)},"%d":we=>Be(we.tm_mday,2),"%e":we=>ze(we.tm_mday,2," "),"%g":we=>gn(we).toString().substring(2),"%G":gn,"%H":we=>Be(we.tm_hour,2),"%I":we=>{var ke=we.tm_hour;return ke==0?ke=12:ke>12&&(ke-=12),Be(ke,2)},"%j":we=>Be(we.tm_mday+FM(Ou(we.tm_year+1900)?Bb:Fb,we.tm_mon-1),3),"%m":we=>Be(we.tm_mon+1,2),"%M":we=>Be(we.tm_min,2),"%n":()=>`
103
- `,"%p":we=>we.tm_hour>=0&&we.tm_hour<12?"AM":"PM","%S":we=>Be(we.tm_sec,2),"%t":()=>" ","%u":we=>we.tm_wday||7,"%U":we=>{var ke=we.tm_yday+7-we.tm_wday;return Be(Math.floor(ke/7),2)},"%V":we=>{var ke=Math.floor((we.tm_yday+7-(we.tm_wday+6)%7)/7);if((we.tm_wday+371-we.tm_yday-2)%7<=2&&ke++,ke){if(ke==53){var $t=(we.tm_wday+371-we.tm_yday)%7;$t!=4&&($t!=3||!Ou(we.tm_year))&&(ke=1)}}else{ke=52;var Xt=(we.tm_wday+7-we.tm_yday-1)%7;(Xt==4||Xt==5&&Ou(we.tm_year%400-1))&&ke++}return Be(ke,2)},"%w":we=>we.tm_wday,"%W":we=>{var ke=we.tm_yday+7-(we.tm_wday+6)%7;return Be(Math.floor(ke/7),2)},"%y":we=>(we.tm_year+1900).toString().substring(2),"%Y":we=>we.tm_year+1900,"%z":we=>{var ke=we.tm_gmtoff,$t=ke>=0;return ke=Math.abs(ke)/60,ke=ke/60*100+ke%60,($t?"+":"-")+("0000"+ke).slice(-4)},"%Z":we=>we.tm_zone,"%%":()=>"%"};se=se.replace(/%%/g,"\0\0");for(var me in Mt)se.includes(me)&&(se=se.replace(new RegExp(me,"g"),Mt[me](ne)));se=se.replace(/\0\0/g,"%");var sn=qM(se);return sn.length>x?0:(VM(sn,_),sn.length-1)},GM=(_,x,I,P,K)=>$M(_,x,I,P);hn=r.InternalError=class extends Error{constructor(_){super(_),this.name="InternalError"}},xn(),zn=r.BindingError=class extends Error{constructor(_){super(_),this.name="BindingError"}},Br(),Xe(),N3(),Ib=r.UnboundTypeError=j3(Error,"UnboundTypeError"),V3();var HM={s:ge,u:ie,b:_e,g:We,q:rt,K:vt,f:ht,Y:Kn,e:oe,ha:Rn,U:Fn,ba:Ot,fa:L3,ea:F3,w:U3,aa:Rb,x:H3,h:Y3,O:K3,P:z3,t:J3,o:Z3,ga:X3,N:tM,C:cM,A:uM,ia:lM,ca:dM,E:fM,ka:Xf,la:mM,M:wM,Q:EM,R:SM,da:xM,B:_M,$:CM,Z:IM,W:RM,X:NM,_:MM,T:DM,L:LM,F:a9,D:QM,G:o9,m:c9,a:YM,d:ZM,p:zM,k:s9,I:r9,v:t9,H:i9,z:l9,S:f9,l:XM,j:JM,c:KM,n:WM,J:n9,r:u9,i:e9,y:d9,ja:BM,V:GM},Ft=J(),Vr=r._free=_=>(Vr=r._free=Ft.oa)(_),sh=r._malloc=_=>(sh=r._malloc=Ft.pa)(_),Ub=_=>(Ub=Ft.ra)(_),Nt=(_,x)=>(Nt=Ft.sa)(_,x),fa=_=>(fa=Ft.ta)(_),Ut=()=>(Ut=Ft.ua)(),qt=_=>(qt=Ft.va)(_),qb=_=>(qb=Ft.wa)(_),Vb=_=>(Vb=Ft.xa)(_),$b=(_,x,I)=>($b=Ft.ya)(_,x,I),Gb=_=>(Gb=Ft.za)(_);r.dynCall_viijii=(_,x,I,P,K,ne,se)=>(r.dynCall_viijii=Ft.Aa)(_,x,I,P,K,ne,se),r.dynCall_jiji=(_,x,I,P,K)=>(r.dynCall_jiji=Ft.Ba)(_,x,I,P,K);var Hb=r.dynCall_jiiii=(_,x,I,P,K)=>(Hb=r.dynCall_jiiii=Ft.Ca)(_,x,I,P,K);r.dynCall_iiiiij=(_,x,I,P,K,ne,se)=>(r.dynCall_iiiiij=Ft.Da)(_,x,I,P,K,ne,se),r.dynCall_iiiiijj=(_,x,I,P,K,ne,se,ae,me)=>(r.dynCall_iiiiijj=Ft.Ea)(_,x,I,P,K,ne,se,ae,me),r.dynCall_iiiiiijj=(_,x,I,P,K,ne,se,ae,me,Ee)=>(r.dynCall_iiiiiijj=Ft.Fa)(_,x,I,P,K,ne,se,ae,me,Ee);function YM(_,x){var I=Ut();try{return Bt(_)(x)}catch(P){if(qt(I),P!==P+0)throw P;Nt(1,0)}}function WM(_,x,I,P){var K=Ut();try{Bt(_)(x,I,P)}catch(ne){if(qt(K),ne!==ne+0)throw ne;Nt(1,0)}}function KM(_,x,I){var P=Ut();try{Bt(_)(x,I)}catch(K){if(qt(P),K!==K+0)throw K;Nt(1,0)}}function zM(_,x,I,P){var K=Ut();try{return Bt(_)(x,I,P)}catch(ne){if(qt(K),ne!==ne+0)throw ne;Nt(1,0)}}function QM(_,x,I,P,K){var ne=Ut();try{return Bt(_)(x,I,P,K)}catch(se){if(qt(ne),se!==se+0)throw se;Nt(1,0)}}function JM(_,x){var I=Ut();try{Bt(_)(x)}catch(P){if(qt(I),P!==P+0)throw P;Nt(1,0)}}function ZM(_,x,I){var P=Ut();try{return Bt(_)(x,I)}catch(K){if(qt(P),K!==K+0)throw K;Nt(1,0)}}function XM(_){var x=Ut();try{Bt(_)()}catch(I){if(qt(x),I!==I+0)throw I;Nt(1,0)}}function e9(_,x,I,P,K,ne,se,ae,me,Ee,Ie){var ze=Ut();try{Bt(_)(x,I,P,K,ne,se,ae,me,Ee,Ie)}catch(Be){if(qt(ze),Be!==Be+0)throw Be;Nt(1,0)}}function t9(_,x,I,P,K,ne,se){var ae=Ut();try{return Bt(_)(x,I,P,K,ne,se)}catch(me){if(qt(ae),me!==me+0)throw me;Nt(1,0)}}function n9(_,x,I,P,K){var ne=Ut();try{Bt(_)(x,I,P,K)}catch(se){if(qt(ne),se!==se+0)throw se;Nt(1,0)}}function r9(_,x,I,P,K,ne){var se=Ut();try{return Bt(_)(x,I,P,K,ne)}catch(ae){if(qt(se),ae!==ae+0)throw ae;Nt(1,0)}}function i9(_,x,I,P,K,ne,se,ae){var me=Ut();try{return Bt(_)(x,I,P,K,ne,se,ae)}catch(Ee){if(qt(me),Ee!==Ee+0)throw Ee;Nt(1,0)}}function s9(_,x,I,P,K){var ne=Ut();try{return Bt(_)(x,I,P,K)}catch(se){if(qt(ne),se!==se+0)throw se;Nt(1,0)}}function o9(_,x,I,P){var K=Ut();try{return Bt(_)(x,I,P)}catch(ne){if(qt(K),ne!==ne+0)throw ne;Nt(1,0)}}function a9(_,x,I,P){var K=Ut();try{return Bt(_)(x,I,P)}catch(ne){if(qt(K),ne!==ne+0)throw ne;Nt(1,0)}}function c9(_){var x=Ut();try{return Bt(_)()}catch(I){if(qt(x),I!==I+0)throw I;Nt(1,0)}}function u9(_,x,I,P,K,ne,se,ae){var me=Ut();try{Bt(_)(x,I,P,K,ne,se,ae)}catch(Ee){if(qt(me),Ee!==Ee+0)throw Ee;Nt(1,0)}}function l9(_,x,I,P,K,ne,se,ae,me,Ee,Ie,ze){var Be=Ut();try{return Bt(_)(x,I,P,K,ne,se,ae,me,Ee,Ie,ze)}catch(st){if(qt(Be),st!==st+0)throw st;Nt(1,0)}}function d9(_,x,I,P,K,ne,se,ae,me,Ee,Ie,ze,Be,st,Vt,gn){var Mt=Ut();try{Bt(_)(x,I,P,K,ne,se,ae,me,Ee,Ie,ze,Be,st,Vt,gn)}catch(sn){if(qt(Mt),sn!==sn+0)throw sn;Nt(1,0)}}function f9(_,x,I,P,K){var ne=Ut();try{return Hb(_,x,I,P,K)}catch(se){if(qt(ne),se!==se+0)throw se;Nt(1,0)}}var Ru;ce=function _(){Ru||Yb(),Ru||(ce=_)};function Yb(){if(he>0||(L(),he>0))return;function _(){Ru||(Ru=!0,r.calledRun=!0,!w&&(W(),i(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),z()))}r.setStatus?(r.setStatus("Running..."),setTimeout(function(){setTimeout(function(){r.setStatus("")},1),_()},1)):_()}if(r.preInit)for(typeof r.preInit=="function"&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return Yb(),t.ready}})();function SC(e){return Ll(Bl,e)}async function xC(e,t){return wC(Bl,e,t)}async function _C(e,t){return EC(Bl,e,t)}const Ym=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["data_matrix","DataMatrix"],["dx_film_edge","DXFilmEdge"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["maxi_code","MaxiCode"],["micro_qr_code","MicroQRCode"],["pdf417","PDF417"],["qr_code","QRCode"],["rm_qr_code","rMQRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"],["linear_codes","Linear-Codes"],["matrix_codes","Matrix-Codes"]],CC=[...Ym,["unknown"]].map(e=>e[0]),Za=new Map(Ym);function AC(e){for(const[t,n]of Za)if(e===n)return t;return"unknown"}function TC(e){if(Wm(e))return{width:e.naturalWidth,height:e.naturalHeight};if(Km(e))return{width:e.width.baseVal.value,height:e.height.baseVal.value};if(zm(e))return{width:e.videoWidth,height:e.videoHeight};if(Jm(e))return{width:e.width,height:e.height};if(Xm(e))return{width:e.displayWidth,height:e.displayHeight};if(Qm(e))return{width:e.width,height:e.height};if(Zm(e))return{width:e.width,height:e.height};throw new TypeError("The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.")}function Wm(e){try{return e instanceof HTMLImageElement}catch{return!1}}function Km(e){try{return e instanceof SVGImageElement}catch{return!1}}function zm(e){try{return e instanceof HTMLVideoElement}catch{return!1}}function Qm(e){try{return e instanceof HTMLCanvasElement}catch{return!1}}function Jm(e){try{return e instanceof ImageBitmap}catch{return!1}}function Zm(e){try{return e instanceof OffscreenCanvas}catch{return!1}}function Xm(e){try{return e instanceof VideoFrame}catch{return!1}}function eg(e){try{return e instanceof Blob}catch{return!1}}function IC(e){try{return e instanceof ImageData}catch{return!1}}function kC(e,t){try{const n=new OffscreenCanvas(e,t);if(n.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return n;throw void 0}catch{const n=document.createElement("canvas");return n.width=e,n.height=t,n}}async function tg(e){if(Wm(e)&&!await MC(e))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(Km(e)&&!await DC(e))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(Xm(e)&&PC(e))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(zm(e)&&(e.readyState===0||e.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(Jm(e)&&LC(e))throw new DOMException("The image source is detached.","InvalidStateError");const{width:t,height:n}=TC(e);if(t===0||n===0)return null;const r=kC(t,n).getContext("2d");r.drawImage(e,0,0);try{return r.getImageData(0,0,t,n)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function OC(e){let t;try{if(globalThis.createImageBitmap)t=await createImageBitmap(e);else if(globalThis.Image){t=new Image;let n="";try{n=URL.createObjectURL(e),t.src=n,await t.decode()}finally{URL.revokeObjectURL(n)}}else return e}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await tg(t)}function RC(e){const{width:t,height:n}=e;if(t===0||n===0)return null;const r=e.getContext("2d");try{return r.getImageData(0,0,t,n)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function NC(e){if(eg(e))return await OC(e);if(IC(e)){if(jC(e))throw new DOMException("The image data has been detached.","InvalidStateError");return e}return Qm(e)||Zm(e)?RC(e):await tg(e)}async function MC(e){try{return await e.decode(),!0}catch{return!1}}async function DC(e){var t;try{return await((t=e.decode)==null?void 0:t.call(e)),!0}catch{return!1}}function PC(e){return e.format===null}function jC(e){return e.data.buffer.byteLength===0}function LC(e){return e.width===0&&e.height===0}function ng(e,t){return e instanceof DOMException?new DOMException(`${t}: ${e.message}`,e.name):e instanceof Error?new e.constructor(`${t}: ${e.message}`):new Error(`${t}: ${e}`)}var uo;class Fl extends EventTarget{constructor(t={}){var n;super(),uC(this,uo,void 0);try{const r=(n=t==null?void 0:t.formats)==null?void 0:n.filter(i=>i!=="unknown");if((r==null?void 0:r.length)===0)throw new TypeError("Hint option provided, but is empty.");for(const i of r??[])if(!Za.has(i))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${i}' is not a valid enum value of type BarcodeFormat.`);lC(this,uo,r??[]),SC().then(i=>{this.dispatchEvent(new CustomEvent("load",{detail:i}))}).catch(i=>{this.dispatchEvent(new CustomEvent("error",{detail:i}))})}catch(r){throw ng(r,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return CC.filter(t=>t!=="unknown")}async detect(t){try{const n=await NC(t);if(n===null)return[];let r;try{eg(n)?r=await xC(n,{tryHarder:!0,formats:Um(this,uo).map(i=>Za.get(i))}):r=await _C(n,{tryHarder:!0,formats:Um(this,uo).map(i=>Za.get(i))})}catch(i){throw console.error(i),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return r.map(i=>{const{topLeft:{x:s,y:o},topRight:{x:c,y:u},bottomLeft:{x:d,y:f},bottomRight:{x:p,y:l}}=i.position,v=Math.min(s,c,d,p),a=Math.min(o,u,f,l),h=Math.max(s,c,d,p),y=Math.max(o,u,f,l);return{boundingBox:new DOMRectReadOnly(v,a,h-v,y-a),rawValue:i.text,format:AC(i.format),cornerPoints:[{x:s,y:o},{x:c,y:u},{x:p,y:l},{x:d,y:f}]}})}catch(n){throw ng(n,"Failed to execute 'detect' on 'BarcodeDetector'")}}}uo=new WeakMap,globalThis.BarcodeDetector!=null||(globalThis.BarcodeDetector=Fl);function BC(e){const{onClick:t,disabled:n,className:r}=e,i={cursor:n?"default":"pointer",stroke:n?"grey":"yellow",strokeLineJoin:"round",strokeLineCap:"round",strokeWidth:1.5,...e.style};return k.createElement("svg",{onClick:n?void 0:t,className:r,style:i,width:"28px",height:"28px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M3 3L6.00007 6.00007M21 21L19.8455 19.8221M9.74194 4.06811C9.83646 4.04279 9.93334 4.02428 10.0319 4.01299C10.1453 4 10.2683 4 10.5141 4H13.5327C13.7786 4 13.9015 4 14.015 4.01299C14.6068 4.08078 15.1375 4.40882 15.4628 4.90782C15.5252 5.00345 15.5802 5.11345 15.6901 5.33333C15.7451 5.44329 15.7726 5.49827 15.8037 5.54609C15.9664 5.79559 16.2318 5.95961 16.5277 5.9935C16.5844 6 16.6459 6 16.7688 6H17.8234C18.9435 6 19.5036 6 19.9314 6.21799C20.3077 6.40973 20.6137 6.71569 20.8055 7.09202C21.0234 7.51984 21.0234 8.0799 21.0234 9.2V15.3496M19.8455 19.8221C19.4278 20 18.8702 20 17.8234 20H6.22344C5.10333 20 4.54328 20 4.11546 19.782C3.73913 19.5903 3.43317 19.2843 3.24142 18.908C3.02344 18.4802 3.02344 17.9201 3.02344 16.8V9.2C3.02344 8.0799 3.02344 7.51984 3.24142 7.09202C3.43317 6.71569 3.73913 6.40973 4.11546 6.21799C4.51385 6.015 5.0269 6.00103 6.00007 6.00007M19.8455 19.8221L14.5619 14.5619M14.5619 14.5619C14.0349 15.4243 13.0847 16 12 16C10.3431 16 9 14.6569 9 13C9 11.9153 9.57566 10.9651 10.4381 10.4381M14.5619 14.5619L10.4381 10.4381M10.4381 10.4381L6.00007 6.00007"}))}function FC(e){const{onClick:t,disabled:n,className:r}=e,i={cursor:n?"default":"pointer",stroke:n?"grey":"yellow",strokeLineJoin:"round",strokeLineCap:"round",strokeWidth:1.5,...e.style};return k.createElement("svg",{onClick:n?void 0:t,className:r,style:i,width:"28px",height:"28px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M12 16C13.6569 16 15 14.6569 15 13C15 11.3431 13.6569 10 12 10C10.3431 10 9 11.3431 9 13C9 14.6569 10.3431 16 12 16Z"}),k.createElement("path",{d:"M3 16.8V9.2C3 8.0799 3 7.51984 3.21799 7.09202C3.40973 6.71569 3.71569 6.40973 4.09202 6.21799C4.51984 6 5.0799 6 6.2 6H7.25464C7.37758 6 7.43905 6 7.49576 5.9935C7.79166 5.95961 8.05705 5.79559 8.21969 5.54609C8.25086 5.49827 8.27836 5.44328 8.33333 5.33333C8.44329 5.11342 8.49827 5.00346 8.56062 4.90782C8.8859 4.40882 9.41668 4.08078 10.0085 4.01299C10.1219 4 10.2448 4 10.4907 4H13.5093C13.7552 4 13.8781 4 13.9915 4.01299C14.5833 4.08078 15.1141 4.40882 15.4394 4.90782C15.5017 5.00345 15.5567 5.11345 15.6667 5.33333C15.7216 5.44329 15.7491 5.49827 15.7803 5.54609C15.943 5.79559 16.2083 5.95961 16.5042 5.9935C16.561 6 16.6224 6 16.7454 6H17.8C18.9201 6 19.4802 6 19.908 6.21799C20.2843 6.40973 20.5903 6.71569 20.782 7.09202C21 7.51984 21 8.0799 21 9.2V16.8C21 17.9201 21 18.4802 20.782 18.908C20.5903 19.2843 20.2843 19.5903 19.908 19.782C19.4802 20 18.9201 20 17.8 20H6.2C5.0799 20 4.51984 20 4.09202 19.782C3.71569 19.5903 3.40973 19.2843 3.21799 18.908C3 18.4802 3 17.9201 3 16.8Z"}))}function UC(e){const{scanning:t,startScanning:n,stopScanning:r}=e,[i,s]=k.useState(!1);function o(){s(!0),t?r():n(),setTimeout(()=>s(!1),1e3)}return k.createElement("div",{style:{bottom:85,right:3,position:"absolute",zIndex:2,cursor:i?"default":"pointer"}},t?k.createElement(BC,{disabled:i,onClick:o}):k.createElement(FC,{disabled:i,onClick:o}))}function qC(e){const{onClick:t,className:n,style:r}=e;return k.createElement("svg",{onClick:t,width:"30px",height:"30px",viewBox:"0 0 24 24",className:n,style:r,xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{strokeWidth:.2,stroke:"yellow",fill:"yellow",d:"M13.225 9l5.025-7h-7.972l-3.3 11h5.359l-2.452 8.648.75.364L20.374 9zm.438 3H8.322l2.7-9H16.3l-5.025 7h7.101l-6.7 8.953z"}))}function VC(e){const{onClick:t,className:n,style:r}=e;return k.createElement("svg",{onClick:t,width:"30px",height:"30px",viewBox:"0 0 24 24",className:n,style:r,xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{strokeWidth:.2,stroke:"yellow",fill:"yellow",d:"M14.516 15.158l.714.714-4.595 6.14-.75-.364L12.337 13H6.978L8.22 8.861l.803.803L8.322 12h3.036l1.793 1.792-1.475 5.16zm5.984 4.05L4.793 3.5l.707-.707 3.492 3.492L10.278 2h7.972l-5.025 7h7.149l-3.71 4.957 4.543 4.543zM12.707 10l3.243 3.243L18.376 10zM9.795 7.088l2.079 2.079L16.3 3h-5.278z"}))}function $C(e){const{status:t,scanning:n,torchToggle:r}=e;function i(s){r(s)}return n&&r?k.createElement("div",{style:{bottom:35,right:3,position:"absolute",zIndex:2,cursor:"pointer"}},t?k.createElement(VC,{onClick:()=>i(!1)}):k.createElement(qC,{onClick:()=>i(!0)})):null}function GC(e){const{onClick:t,className:n,disabled:r=!1}=e,i={cursor:r?"default":"pointer",stroke:r?"grey":"yellow",fill:r?"grey":"yellow",...e.style};return k.createElement("svg",{onClick:r?void 0:t,width:"30px",height:"30px",viewBox:"0 0 24 24",className:n,style:i,xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{strokeWidth:.3,d:"M16.279,17.039c-1.396,1.209 -3.216,1.941 -5.206,1.941c-4.393,0 -7.96,-3.567 -7.96,-7.96c-0,-4.393 3.567,-7.96 7.96,-7.96c4.393,0 7.96,3.567 7.96,7.96c-0,2.044 -0.772,3.909 -2.04,5.319l0.165,0.165c1.194,1.194 2.388,2.388 3.583,3.582c0.455,0.456 -0.252,1.163 -0.707,0.708l-3.755,-3.755Zm1.754,-6.019c-0,-3.841 -3.119,-6.96 -6.96,-6.96c-3.842,0 -6.96,3.119 -6.96,6.96c-0,3.841 3.118,6.96 6.96,6.96c3.841,0 6.96,-3.119 6.96,-6.96Zm-7.46,0.5l-1.5,0c-0.645,0 -0.643,-1 -0,-1l1.5,0l-0,-1.5c-0,-0.645 1,-0.643 1,0l-0,1.5l1.5,0c0.645,0 0.643,1 -0,1l-1.5,0l-0,1.5c-0,0.645 -1,0.643 -1,0l-0,-1.5Z"}))}function HC(e){const{onClick:t,className:n,disabled:r=!1}=e,i={cursor:r?"default":"pointer",stroke:r?"grey":"yellow",fill:r?"grey":"yellow",...e.style};return k.createElement("svg",{onClick:r?void 0:t,width:"30px",height:"30px",viewBox:"0 0 24 24",className:n,style:i,xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{strokeWidth:.3,d:"M16.279,17.039c-1.396,1.209 -3.216,1.941 -5.206,1.941c-4.393,0 -7.96,-3.567 -7.96,-7.96c-0,-4.393 3.567,-7.96 7.96,-7.96c4.393,0 7.96,3.567 7.96,7.96c-0,2.044 -0.772,3.909 -2.04,5.319l0.165,0.165c1.194,1.194 2.388,2.388 3.583,3.582c0.455,0.456 -0.252,1.163 -0.707,0.708l-3.755,-3.755Zm1.754,-6.019c-0,-3.841 -3.119,-6.96 -6.96,-6.96c-3.842,0 -6.96,3.119 -6.96,6.96c-0,3.841 3.118,6.96 6.96,6.96c3.841,0 6.96,-3.119 6.96,-6.96Zm-4.96,-0.5c0.645,0 0.643,1 -0,1l-4,0c-0.645,0 -0.643,-1 -0,-1l4,0Z"}))}function YC(e){const{scanning:t,capabilities:n,onZoom:r,value:i}=e;if(!t||!r)return null;const s=(n.max-n.min)/3;return k.createElement(k.Fragment,null,k.createElement("div",{style:{bottom:130,right:3,position:"absolute",zIndex:2,cursor:"pointer"}},k.createElement(HC,{disabled:i<=n.min,onClick:function(){r(Math.max(i-s,n.min))}})),k.createElement("div",{style:{bottom:180,right:3,position:"absolute",zIndex:2,cursor:"pointer"}},k.createElement(GC,{disabled:i>=n.max,onClick:function(){r(Math.min(i+s,n.max))}})))}function WC(e){const{scanning:t,loading:n,capabilities:r,border:i=35,onOff:s,torch:o,zoom:c,startScanning:u,stopScanning:d}=e,f="rgba(255, 0, 0, 0.5)";return k.createElement("div",{style:{position:"relative"}},k.createElement("svg",{viewBox:"0 0 100 100",style:{top:0,left:0,zIndex:1,boxSizing:"border-box",border:`${i>=35?i:35}px solid rgba(0, 0, 0, 0.2)`}},n&&k.createElement("text",{x:"50",y:"50",textAnchor:"middle",fill:"black",fontSize:"8",fontFamily:"Arial",fontWeight:"bold"},"Loading ...",k.createElement("animate",{attributeName:"opacity",values:"0;1;0",dur:"2s",repeatCount:"indefinite"})),k.createElement("path",{fill:"none",d:"M23,0 L0,0 L0,23",stroke:f,strokeWidth:3}),k.createElement("path",{fill:"none",d:"M0,77 L0,100 L23,100",stroke:f,strokeWidth:3}),k.createElement("path",{fill:"none",d:"M77,100 L100,100 L100,77",stroke:f,strokeWidth:3}),k.createElement("path",{fill:"none",d:"M100,23 L100,0 77,0",stroke:f,strokeWidth:3})),s&&k.createElement(UC,{scanning:t,startScanning:u,stopScanning:d}),o&&r.torch&&k.createElement($C,{scanning:t,status:o.status,torchToggle:o.toggle}),c&&r.zoom&&k.createElement(YC,{scanning:t,capabilities:r.zoom,value:c.value,onZoom:c.onChange}))}const KC={facingMode:"environment",width:{min:640,ideal:720,max:1920},height:{min:640,ideal:720,max:1080}},zC={audio:!0,tracker:void 0,onOff:!1,finder:!0,torch:!0,zoom:!1},QC={width:"100%",height:"100%",position:"relative"},JC={top:0,left:0,width:"100%",height:"100%",display:"block",overflow:"hidden"};var ZC=function(e){let t,n=!1;return(...r)=>(n||(t=e(r),n=!0),t)}(()=>{const e=D_(window);switch(e.browser){case"chrome":H_(window,e);break;case"firefox":z_(window,e);break;case"safari":X_(window,e);break;default:throw new Error("Unsupported browser")}});const XC="data:audio/mp3;base64,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";var lo=e=>e instanceof Date,rg=e=>e==null;const ig=e=>typeof e=="object";var sg=e=>!rg(e)&&!Array.isArray(e)&&ig(e)&&!lo(e),og=e=>rg(e)||!ig(e);function ag(e,t){if(og(e)||og(t))return e===t;if(lo(e)&&lo(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const s=e[i];if(!r.includes(i))return!1;if(i!=="ref"){const o=t[i];if(lo(s)&&lo(o)||sg(s)&&sg(o)||Array.isArray(s)&&Array.isArray(o)?!ag(s,o):s!==o)return!1}}return!0}function Xa(e){if(e===null)throw new Error("Canvas should always be defined when component is mounted.");const t=e.getContext("2d");if(t===null)throw new Error("Canvas 2D context should be non-null");t.clearRect(0,0,e.width,e.height)}function e2(e){var t;const{onScan:n,constraints:r,formats:i=["qr_code"],paused:s=!1,components:o,children:c,styles:u,classNames:d,allowMultiple:f,scanDelay:p}=e,l=k.useRef(null),v=k.useRef(null),a=k.useRef(null),h=k.useMemo(()=>({...KC,...r}),[r]),y=k.useMemo(()=>({...zC,...o}),[o]),[g,b]=k.useState(!1),[w,E]=k.useState(!0),[S,A]=k.useState(h),T=function(){const F=k.useRef(Promise.resolve({type:"stop",data:{}})),V=k.useRef(null),R=k.useRef(null),[L,W]=k.useState({}),[z,Z]=k.useState({}),te=k.useCallback(async(le,$)=>{var H;if(!window.isSecureContext)throw new Error("camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP.");if(((H=navigator==null?void 0:navigator.mediaDevices)===null||H===void 0?void 0:H.getUserMedia)===void 0)throw new Error("this browser has no Stream API support");ZC();const X=await navigator.mediaDevices.getUserMedia({audio:!1,video:$});le.srcObject!==void 0?le.srcObject=X:le.mozSrcObject!==void 0?le.mozSrcObject=X:window.URL.createObjectURL?le.src=window.URL.createObjectURL(X):window.webkitURL?le.src=window.webkitURL.createObjectURL(X):le.src=X.id,await Promise.race([le.play(),new Promise(j=>setTimeout(j,3e3)).then(()=>{throw new Error("Loading camera stream timed out after 3 seconds.")})]),await new Promise(j=>setTimeout(j,500));const[C]=X.getVideoTracks();return Z(C.getSettings()),W(C.getCapabilities()),V.current=X,R.current=C,{type:"start",data:{videoEl:le,stream:X,constraints:$}}},[]),re=k.useCallback(async(le,$)=>{le.src="",le.srcObject=null,le.load();for(const H of $.getTracks())$.removeTrack(H),H.stop();return V.current=null,R.current=null,Z({}),{type:"stop",data:{}}},[]),he=k.useCallback(async(le,{constraints:$,restart:H=!1})=>{if(F.current=F.current.then(X=>{if(X.type==="start"){const{data:{videoEl:C,stream:j,constraints:B}}=X;return H||le!==C||$!==B?re(C,j).then(()=>te(le,$)):X}return te(le,$)}),(await F.current).type==="stop")throw new Error("Something went wrong with the camera task queue (start task).")},[te,re]),ce=k.useCallback(async()=>{if(F.current=F.current.then(le=>{if(le.type==="stop")return le;const{data:{videoEl:$,stream:H}}=le;return re($,H)}),(await F.current).type==="start")throw new Error("Something went wrong with the camera task queue (stop task).")},[re]),ye=k.useCallback(async le=>{const $=R.current;if(!$)throw new Error("No active video track found.");{le.advanced&&le.advanced[0].zoom&&$.getCapabilities().torch&&await $.applyConstraints({advanced:[{torch:!1}]}),await $.applyConstraints(le);const H=$.getCapabilities(),X=$.getSettings();W(H),Z(X)}},[]);return k.useEffect(()=>()=>{(async()=>await ce())()},[ce]),{capabilities:L,settings:z,startCamera:he,stopCamera:ce,updateConstraints:ye}}(),{startScanning:O,stopScanning:N}=function(F){const{videoElementRef:V,onScan:R,onFound:L,retryDelay:W=100,scanDelay:z=0,formats:Z=[],audio:te=!0,allowMultiple:re=!1}=F,he=k.useRef(new Fl({formats:Z})),ce=k.useRef(null),ye=k.useRef(null);k.useEffect(()=>{he.current=new Fl({formats:Z})},[Z]),k.useEffect(()=>{typeof window<"u"&&te&&(ce.current=new Audio(XC))},[te]);const le=k.useCallback($=>async H=>{if(V.current!==null&&V.current.readyState>1){const{lastScan:X,contentBefore:C,lastScanHadContent:j}=$;if(H-X<W)ye.current=window.requestAnimationFrame(le($));else{const B=await he.current.detect(V.current),M=B.some(Y=>!C.includes(Y.rawValue)),ee=B.length>0;let J=$.lastOnScan;(M||re&&ee&&H-J>=z)&&(te&&ce.current&&ce.current.paused&&ce.current.play().catch(Y=>console.error("Error playing the sound",Y)),J=H,R(B)),ee&&L(B),!ee&&j&&L(B);const Q={lastScan:H,lastOnScan:J,lastScanHadContent:ee,contentBefore:M?B.map(Y=>Y.rawValue):C};ye.current=window.requestAnimationFrame(le(Q))}}},[V.current,R,L,W]);return{startScanning:k.useCallback(()=>{const $=performance.now(),H={lastScan:$,lastOnScan:$,contentBefore:[],lastScanHadContent:!1};ye.current=window.requestAnimationFrame(le(H))},[le]),stopScanning:k.useCallback(()=>{ye.current!==null&&(window.cancelAnimationFrame(ye.current),ye.current=null)},[])}}({videoElementRef:l,onScan:n,onFound:F=>function(V,R,L,W){const z=L;if(z==null)throw new Error("onFound handler should only be called when component is mounted. Thus tracking canvas is always defined.");const Z=R;if(Z==null)throw new Error("onFound handler should only be called when component is mounted. Thus video element is always defined.");if(V.length===0||W===void 0)Xa(z);else{const te=Z.offsetWidth,re=Z.offsetHeight,he=Z.videoWidth,ce=Z.videoHeight,ye=Math.max(te/he,re/ce),le=he*ye,$=ce*ye,H=le/he,X=$/ce,C=(te-le)/2,j=(re-$)/2,B=({x:Q,y:Y})=>({x:Math.floor(Q*H),y:Math.floor(Y*X)}),M=({x:Q,y:Y})=>({x:Math.floor(Q+C),y:Math.floor(Y+j)}),ee=V.map(Q=>{const{boundingBox:Y,cornerPoints:pe}=Q,{x:ge,y:ue}=M(B({x:Y.x,y:Y.y})),{x:ie,y:be}=B({x:Y.width,y:Y.height});return{...Q,cornerPoints:pe.map(oe=>M(B(oe))),boundingBox:DOMRectReadOnly.fromRect({x:ge,y:ue,width:ie,height:be})}});z.width=Z.offsetWidth,z.height=Z.offsetHeight;const J=z.getContext("2d");if(J===null)throw new Error("onFound handler should only be called when component is mounted. Thus tracking canvas 2D context is always defined.");W(ee,J)}}(F,l.current,a.current,y.tracker),formats:i,audio:y.audio,allowMultiple:f,retryDelay:y.tracker===void 0?500:10,scanDelay:p});k.useEffect(()=>(b(!0),()=>{b(!1)}),[]),k.useEffect(()=>{g&&(N(),O())},[o==null?void 0:o.tracker]),k.useEffect(()=>{if(!ag(h,S)){const F=h;r!=null&&r.deviceId&&delete F.facingMode,A(F)}},[r]);const D=k.useMemo(()=>({constraints:S,shouldStream:g&&!s}),[S,g,s]),U=async()=>{const F=l.current;if(F==null)throw new Error("Video should be defined when component is mounted.");const V=v.current;if(V==null)throw new Error("Canvas should be defined when component is mounted.");const R=V.getContext("2d");if(R==null)throw new Error("Canvas should be defined when component is mounted.");if(D.shouldStream){await T.stopCamera(),E(!1);try{await T.startCamera(F,D),F?E(!0):await T.stopCamera()}catch(L){console.error("error",L)}}else V.width=F.videoWidth,V.height=F.videoHeight,R.drawImage(F,0,0,F.videoWidth,F.videoHeight),await T.stopCamera(),E(!1)};k.useEffect(()=>{(async()=>await U())()},[D]);const q=k.useMemo(()=>D.shouldStream&&w,[D.shouldStream,w]);return k.useEffect(()=>{if(q){if(v.current===void 0)throw new Error("shouldScan effect should only be triggered when component is mounted. Thus pause frame canvas is defined");if(Xa(v.current),a.current===void 0)throw new Error("shouldScan effect should only be triggered when component is mounted. Thus tracking canvas is defined");if(Xa(a.current),l.current==null)throw new Error("shouldScan effect should only be triggered when component is mounted. Thus video element is defined");O()}},[q]),k.createElement("div",{style:{...QC,...u==null?void 0:u.container},className:d==null?void 0:d.container},k.createElement("video",{ref:l,style:{...JC,...u==null?void 0:u.video,visibility:s?"hidden":"visible"},className:d==null?void 0:d.video,autoPlay:!0,muted:!0,playsInline:!0}),k.createElement("canvas",{ref:v,style:{display:s?"block":"none",position:"absolute",top:0,left:0,width:"100%"}}),k.createElement("canvas",{ref:a,style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"}}),k.createElement("div",{style:{top:0,left:0,position:"absolute",width:"100%",height:"100%"}},y.finder&&k.createElement(WC,{scanning:w,capabilities:T.capabilities,loading:!1,onOff:y.onOff,zoom:y.zoom&&T.settings.zoom?{value:T.settings.zoom,onChange:async F=>{const V={...S,advanced:[{zoom:F}]};await T.updateConstraints(V)}}:void 0,torch:y.torch?{status:(t=T.settings.torch)!==null&&t!==void 0&&t,toggle:async F=>{const V={...S,advanced:[{torch:F}]};await T.updateConstraints(V)}}:void 0,startScanning:async()=>await U(),stopScanning:async()=>{await T.stopCamera(),Xa(a.current),E(!1)},border:u==null?void 0:u.finderBorder}),c))}function t2(){const[e,t]=k.useState([]);return k.useEffect(()=>{(async()=>t(await async function(){return(await navigator.mediaDevices.enumerateDevices()).filter(({kind:n})=>n==="videoinput")}()))()},[]),e}function fo({dataSetter:e,setDefer:t,label:n=""}){const r=k.useRef(null),i=t2(),[s,o]=O_()??[0,0],{subscribe:c,unsubscribe:u}=Ka(),d=f=>{e(f[0].rawValue)};return k.useEffect(()=>{o&&o<=332&&r.current&&r.current.scrollIntoView({behavior:"smooth",block:"end"});const f=p=>{e(p.detail.code)};return c("onCodeScan",f),()=>{u("onCodeScan",f)}},[o]),m.jsxs("div",{ref:r,children:[!!i.length&&m.jsxs("div",{className:"mb-4 flex flex-col gap-4",children:[m.jsx(r2,{onScan:d}),m.jsx("hr",{})]}),m.jsx(Ci,{label:n,autoFocus:!0,placeholder:"CDE2341S",onChange:f=>{t&&t(!0),e(f.target.value)}})]})}const n2="data:image/svg+xml,%3csvg%20height='24'%20viewBox='0%200%2024%2024'%20width='24'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='m21.25%207.5c.3796958%200%20.693491.28215388.7431534.64822944l.0068466.10177056v8.5c0%201.7330315-1.3564548%203.1492459-3.0655761%203.2448552l-.1844239.0051448h-12.689l.71933009.7196699c.26626656.2662666.29047261.6829303.07261815.9765418l-.07261815.0841184c-.26626657.2662665-.68293025.2904726-.97654174.0726181l-.08411844-.0726181-2-2-.06339799-.0720275c-.00244939-.0031685-.00487398-.0063571-.00727348-.0095656l.07067147.0815931c-.03705327-.0370533-.06941902-.077019-.09709724-.1191603-.01316484-.0201549-.025545-.0411423-.03690171-.0627516-.00483354-.0091218-.00919014-.0178526-.01336588-.0266478-.01274712-.0267885-.02425172-.0552483-.03400215-.0845099-.00225837-.0069437-.00418282-.0130149-.00602813-.019105-.02092163-.0684786-.0322748-.1419912-.0322748-.2181555%200-.0383922.00288471-.0761107.00844919-.1129505.00180466-.0115676.0038603-.0232773.00619514-.0349422.00494363-.0250031.01111685-.0492994.01844184-.073091.00362656-.0116598.00765847-.0237092.01200456-.0356703.00848426-.0232976.01778613-.0453662.02808241-.0668678.00549219-.0116011.01179514-.0239381.01846187-.0361292.01323523-.0240158.02734042-.0467392.04258121-.0686124.00392129-.0057417.00832657-.0118713.01283554-.0179483.0251194-.0332177.04801831-.0595185.07261815-.0841184l2-2c.29289322-.2928932.76776696-.2928932%201.06066018%200%20.26626656.2662666.29047261.6829303.07261815.9765418l-.07261815.0841184-.72033009.7196699h12.69c.9181734%200%201.6711923-.7071103%201.7441988-1.6064728l.0058012-.1435272v-8.5c0-.41421356.3357864-.75.75-.75zm-3.0537883-5.35294824.0841184.07261815%202%202c.0254481.02544812.049076.05271652.0706715.08159313l-.0706715-.08159313c.0370533.03705328.069419.07701901.0970972.1191603.0131649.02015493.025545.04114226.0369017.06275154.0048336.00912187.0091902.01785262.0133659.02664784.0127471.02678853.0242517.0552483.0340022.08450994.0022583.00694369.0041828.01301489.0060281.01910493.0209216.06847868.0322748.14199127.0322748.21815554%200%20.03839224-.0028847.07611073-.0084492.11295053-.0014988.0095454-.0031606.01924362-.0050138.02891241-.0051364.02710922-.0117072.05340972-.0196232.07912072-.0036265.0116598-.0076584.02370928-.0120045.03567032-.0084843.02329763-.0177862.04536621-.0280824.06686781-.0054922.01160108-.0117952.02393815-.0184619.03612923-.0132352.02401575-.0273404.04673917-.0425812.06861233-.0039213.00574174-.0083266.01187138-.0128356.0179483-.023778.03144192-.0451015.05615345-.0679264.07938506l-.0046917.00473338-2%202c-.2928932.29289321-.767767.29289321-1.0606602%200-.2662665-.26626657-.2904726-.68293025-.0726181-.97654174l.0726181-.08411844.7183301-.71966991h-12.688c-.9181734%200-1.67119234.70711027-1.7441988%201.60647279l-.0058012.14352721v8.5c0%20.4142136-.33578644.75-.75.75-.37969577%200-.69349096-.2821539-.74315338-.6482294l-.00684662-.1017706v-8.5c0-1.73303146%201.35645477-3.14924593%203.06557609-3.24485521l.18442391-.00514479h12.689l-.7193301-.71966991c-.2662665-.26626657-.2904726-.68293025-.0726181-.97654174l.0726181-.08411844c.2662666-.26626656.6829303-.29047261.9765418-.07261815zm-6.1962117%205.85294824c2.209139%200%204%201.790861%204%204s-1.790861%204-4%204-4-1.790861-4-4%201.790861-4%204-4zm0%201.5c-1.3807119%200-2.5%201.1192881-2.5%202.5s1.1192881%202.5%202.5%202.5%202.5-1.1192881%202.5-2.5-1.1192881-2.5-2.5-2.5z'%20fill='%23212121'/%3e%3c/svg%3e";function r2({onScan:e}){const t=An(),[n,r]=k.useState(t.cameraFacingMode??Hi.USER);return m.jsxs("div",{className:"relative w-full",children:[m.jsx(e2,{components:{finder:!1},onScan:e,constraints:{facingMode:n},allowMultiple:!0,classNames:{video:"rounded",container:"max-h-[calc(100vh-381px)] min-h-[267px] overflow-hidden rounded"}}),m.jsx("div",{className:"absolute right-2 top-2 flex h-10 w-10 cursor-pointer items-center justify-center rounded bg-white shadow-overlay",onClick:()=>n===Hi.USER?r(Hi.ENVIRONMENT):r(Hi.USER),children:m.jsx("img",{src:n2,alt:"camera-switch"})})]})}function i2({value:e,placeholder:t,open:n,setOpen:r,disabled:i}){return m.jsxs("div",{className:`flex items-center justify-between rounded border p-2 ${i?"pointer-events-none bg-core-gray-50 shadow-none outline-core-gray-200":"bg-core-white-900 hover:border hover:border-core-gray-300 hover:shadow-none"}`,onClick:()=>!i&&r(!n),children:[m.jsx("span",{className:`text-sm ${i?"text-core-gray-300":"text-core-gray-800"}`,children:e||t}),m.jsx("span",{className:"ml-2 text-core-gray-500",children:n?"▴":"▾"})]})}function s2({label:e,children:t}){return m.jsxs("div",{className:"[&:not(:last-child)]:mb-2",children:[m.jsx("p",{className:"mb-2 px-4 text-xs text-core-gray-500",children:e}),t]})}function Ul(e){return m.jsx("div",{className:"px-4 py-2 text-sm hover:bg-core-gray-50",children:e.label})}function o2(e){const t=k.useRef(null),[n,r]=k.useState(!1),[i,s]=k.useState(e.value??"");xm(t,r);const o=(u,d)=>{s(u),r(!1),e.onChange&&e.onChange(d)},c=k.Children.map(e.children,u=>{if(k.isValidElement(u)){if(u.type===Ul)return m.jsx("div",{onClick:()=>o(u.props.label,u.props.value),children:u});if(u.type===s2){const d=k.Children.map(u.props.children,f=>{if(k.isValidElement(f)&&f.type===Ul)return m.jsx("div",{onClick:()=>o(f.props.label,f.props.value),children:f})});return k.cloneElement(u,{},...d)}}});return m.jsxs("div",{ref:t,className:"flex flex-col gap-2 antialiased",children:[m.jsx(vn,{description:e.description,disabled:e.disabled,htmlFor:e.id,required:e.required,children:e.label}),m.jsx("div",{children:m.jsxs("div",{className:"relative",children:[m.jsx(i2,{value:i,placeholder:e.placeholder,open:n,setOpen:r,disabled:e.disabled}),e.children&&m.jsx("div",{className:`absolute left-0 right-0 top-11 z-50 rounded border bg-core-white-900 shadow-xl ${!n&&"hidden"} py-2`,children:c})]})}),m.jsx(vn.Helper,{helperText:e.helperText})]})}var a2=Object.defineProperty,c2=(e,t)=>{for(var n in t)a2(e,n,{get:t[n],enumerable:!0})},tr={};c2(tr,{assign:()=>d2,colors:()=>ri,createStringInterpolator:()=>zl,skipAnimation:()=>pg,to:()=>hg,willAdvance:()=>Ql});var ql=po(),qe=e=>ho(e,ql),Vl=po();qe.write=e=>ho(e,Vl);var ec=po();qe.onStart=e=>ho(e,ec);var $l=po();qe.onFrame=e=>ho(e,$l);var Gl=po();qe.onFinish=e=>ho(e,Gl);var ns=[];qe.setTimeout=(e,t)=>{const n=qe.now()+t,r=()=>{const s=ns.findIndex(o=>o.cancel==r);~s&&ns.splice(s,1),ni-=~s?1:0},i={time:n,handler:e,cancel:r};return ns.splice(cg(n),0,i),ni+=1,ug(),i};var cg=e=>~(~ns.findIndex(t=>t.time>e)||~ns.length);qe.cancel=e=>{ec.delete(e),$l.delete(e),Gl.delete(e),ql.delete(e),Vl.delete(e)},qe.sync=e=>{Yl=!0,qe.batchedUpdates(e),Yl=!1},qe.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...i){t=i,qe.onStart(n)}return r.handler=e,r.cancel=()=>{ec.delete(n),t=null},r};var Hl=typeof window<"u"?window.requestAnimationFrame:()=>{};qe.use=e=>Hl=e,qe.now=typeof performance<"u"?()=>performance.now():Date.now,qe.batchedUpdates=e=>e(),qe.catch=console.error,qe.frameLoop="always",qe.advance=()=>{qe.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):dg()};var ti=-1,ni=0,Yl=!1;function ho(e,t){Yl?(t.delete(e),e(0)):(t.add(e),ug())}function ug(){ti<0&&(ti=0,qe.frameLoop!=="demand"&&Hl(lg))}function u2(){ti=-1}function lg(){~ti&&(Hl(lg),qe.batchedUpdates(dg))}function dg(){const e=ti;ti=qe.now();const t=cg(ti);if(t&&(fg(ns.splice(0,t),n=>n.handler()),ni-=t),!ni){u2();return}ec.flush(),ql.flush(e?Math.min(64,ti-e):16.667),$l.flush(),Vl.flush(),Gl.flush()}function po(){let e=new Set,t=e;return{add(n){ni+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return ni-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,ni-=t.size,fg(t,r=>r(n)&&e.add(r)),ni+=e.size,t=e)}}}function fg(e,t){e.forEach(n=>{try{t(n)}catch(r){qe.catch(r)}})}function Wl(){}var l2=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),xe={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function Ar(e,t){if(xe.arr(e)){if(!xe.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var tt=(e,t)=>e.forEach(t);function pr(e,t,n){if(xe.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(const r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var Dn=e=>xe.und(e)?[]:xe.arr(e)?e:[e];function mo(e,t){if(e.size){const n=Array.from(e);e.clear(),tt(n,t)}}var go=(e,...t)=>mo(e,n=>n(...t)),Kl=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),zl,hg,ri=null,pg=!1,Ql=Wl,d2=e=>{e.to&&(hg=e.to),e.now&&(qe.now=e.now),e.colors!==void 0&&(ri=e.colors),e.skipAnimation!=null&&(pg=e.skipAnimation),e.createStringInterpolator&&(zl=e.createStringInterpolator),e.requestAnimationFrame&&qe.use(e.requestAnimationFrame),e.batchedUpdates&&(qe.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Ql=e.willAdvance),e.frameLoop&&(qe.frameLoop=e.frameLoop)},yo=new Set,$n=[],Jl=[],tc=0,nc={get idle(){return!yo.size&&!$n.length},start(e){tc>e.priority?(yo.add(e),qe.onStart(f2)):(mg(e),qe(Zl))},advance:Zl,sort(e){if(tc)qe.onFrame(()=>nc.sort(e));else{const t=$n.indexOf(e);~t&&($n.splice(t,1),gg(e))}},clear(){$n=[],yo.clear()}};function f2(){yo.forEach(mg),yo.clear(),qe(Zl)}function mg(e){$n.includes(e)||gg(e)}function gg(e){$n.splice(h2($n,t=>t.priority>e.priority),0,e)}function Zl(e){const t=Jl;for(let n=0;n<$n.length;n++){const r=$n[n];tc=r.priority,r.idle||(Ql(r),r.advance(e),r.idle||t.push(r))}return tc=0,Jl=$n,Jl.length=0,$n=t,$n.length>0}function h2(e,t){const n=e.findIndex(t);return n<0?e.length:n}var p2=(e,t,n)=>Math.min(Math.max(n,e),t),m2={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},nr="[-+]?\\d*\\.?\\d+",rc=nr+"%";function ic(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var g2=new RegExp("rgb"+ic(nr,nr,nr)),y2=new RegExp("rgba"+ic(nr,nr,nr,nr)),v2=new RegExp("hsl"+ic(nr,rc,rc)),b2=new RegExp("hsla"+ic(nr,rc,rc,nr)),w2=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,E2=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,S2=/^#([0-9a-fA-F]{6})$/,x2=/^#([0-9a-fA-F]{8})$/;function _2(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=S2.exec(e))?parseInt(t[1]+"ff",16)>>>0:ri&&ri[e]!==void 0?ri[e]:(t=g2.exec(e))?(rs(t[1])<<24|rs(t[2])<<16|rs(t[3])<<8|255)>>>0:(t=y2.exec(e))?(rs(t[1])<<24|rs(t[2])<<16|rs(t[3])<<8|bg(t[4]))>>>0:(t=w2.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=x2.exec(e))?parseInt(t[1],16)>>>0:(t=E2.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=v2.exec(e))?(yg(vg(t[1]),sc(t[2]),sc(t[3]))|255)>>>0:(t=b2.exec(e))?(yg(vg(t[1]),sc(t[2]),sc(t[3]))|bg(t[4]))>>>0:null}function Xl(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function yg(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,s=Xl(i,r,e+1/3),o=Xl(i,r,e),c=Xl(i,r,e-1/3);return Math.round(s*255)<<24|Math.round(o*255)<<16|Math.round(c*255)<<8}function rs(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function vg(e){return(parseFloat(e)%360+360)%360/360}function bg(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function sc(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function wg(e){let t=_2(e);if(t===null)return e;t=t||0;const n=(t&4278190080)>>>24,r=(t&16711680)>>>16,i=(t&65280)>>>8,s=(t&255)/255;return`rgba(${n}, ${r}, ${i}, ${s})`}var vo=(e,t,n)=>{if(xe.fun(e))return e;if(xe.arr(e))return vo({range:e,output:t,extrapolate:n});if(xe.str(e.output[0]))return zl(e);const r=e,i=r.output,s=r.range||[0,1],o=r.extrapolateLeft||r.extrapolate||"extend",c=r.extrapolateRight||r.extrapolate||"extend",u=r.easing||(d=>d);return d=>{const f=A2(d,s);return C2(d,s[f],s[f+1],i[f],i[f+1],u,o,c,r.map)}};function C2(e,t,n,r,i,s,o,c,u){let d=u?u(e):e;if(d<t){if(o==="identity")return d;o==="clamp"&&(d=t)}if(d>n){if(c==="identity")return d;c==="clamp"&&(d=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?d=-d:n===1/0?d=d-t:d=(d-t)/(n-t),d=s(d),r===-1/0?d=-d:i===1/0?d=d+r:d=d*(i-r)+r,d)}function A2(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var T2=(e,t="end")=>n=>{n=t==="end"?Math.min(n,.999):Math.max(n,.001);const r=n*e,i=t==="end"?Math.floor(r):Math.ceil(r);return p2(0,1,i/e)},oc=1.70158,ac=oc*1.525,Eg=oc+1,Sg=2*Math.PI/3,xg=2*Math.PI/4.5,cc=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,I2={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>Eg*e*e*e-oc*e*e,easeOutBack:e=>1+Eg*Math.pow(e-1,3)+oc*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((ac+1)*2*e-ac)/2:(Math.pow(2*e-2,2)*((ac+1)*(e*2-2)+ac)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*Sg),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*Sg)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*xg))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*xg)/2+1,easeInBounce:e=>1-cc(1-e),easeOutBounce:cc,easeInOutBounce:e=>e<.5?(1-cc(1-2*e))/2:(1+cc(2*e-1))/2,steps:T2},bo=Symbol.for("FluidValue.get"),is=Symbol.for("FluidValue.observers"),Gn=e=>!!(e&&e[bo]),In=e=>e&&e[bo]?e[bo]():e,_g=e=>e[is]||null;function k2(e,t){e.eventObserved?e.eventObserved(t):e(t)}function wo(e,t){const n=e[is];n&&n.forEach(r=>{k2(r,t)})}var Cg=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");O2(this,e)}},O2=(e,t)=>Ag(e,bo,t);function ss(e,t){if(e[bo]){let n=e[is];n||Ag(e,is,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Eo(e,t){const n=e[is];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[is]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var Ag=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),uc=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,R2=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Tg=new RegExp(`(${uc.source})(%|[a-z]+)`,"i"),N2=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,lc=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Ig=e=>{const[t,n]=M2(e);if(!t||Kl())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const i=window.getComputedStyle(document.documentElement).getPropertyValue(n);return i||e}else{if(n&&lc.test(n))return Ig(n);if(n)return n}return e},M2=e=>{const t=lc.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},ed,D2=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,kg=e=>{ed||(ed=ri?new RegExp(`(${Object.keys(ri).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(s=>In(s).replace(lc,Ig).replace(R2,wg).replace(ed,wg)),n=t.map(s=>s.match(uc).map(Number)),i=n[0].map((s,o)=>n.map(c=>{if(!(o in c))throw Error('The arity of each "output" value must be equal');return c[o]})).map(s=>vo({...e,output:s}));return s=>{var u;const o=!Tg.test(t[0])&&((u=t.find(d=>Tg.test(d)))==null?void 0:u.replace(uc,""));let c=0;return t[0].replace(uc,()=>`${i[c++](s)}${o||""}`).replace(N2,D2)}},td="react-spring: ",Og=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${td}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},P2=Og(console.warn);function j2(){P2(`${td}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var L2=Og(console.warn);function B2(){L2(`${td}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function dc(e){return xe.str(e)&&(e[0]=="#"||/\d/.test(e)||!Kl()&&lc.test(e)||e in(ri||{}))}var nd=Kl()?k.useEffect:k.useLayoutEffect,F2=()=>{const e=k.useRef(!1);return nd(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Rg(){const e=k.useState()[1],t=F2();return()=>{t.current&&e(Math.random())}}function U2(e,t){const[n]=k.useState(()=>({inputs:t,result:e()})),r=k.useRef(),i=r.current;let s=i;return s?t&&s.inputs&&q2(t,s.inputs)||(s={inputs:t,result:e()}):s=n,k.useEffect(()=>{r.current=s,i==n&&(n.inputs=n.result=void 0)},[s]),s.result}function q2(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var Ng=e=>k.useEffect(e,V2),V2=[];function Mg(e){const t=k.useRef();return k.useEffect(()=>{t.current=e}),t.current}var So=Symbol.for("Animated:node"),$2=e=>!!e&&e[So]===e,mr=e=>e&&e[So],rd=(e,t)=>l2(e,So,t),fc=e=>e&&e[So]&&e[So].getPayload(),Dg=class{constructor(){rd(this,this)}getPayload(){return this.payload||[]}},xo=class extends Dg{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,xe.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new xo(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return xe.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,xe.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},_o=class extends xo{constructor(e){super(0),this._string=null,this._toString=vo({output:[e,e]})}static create(e){return new _o(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(xe.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=vo({output:[this.getValue(),e]})),this._value=0,super.reset()}},hc={dependencies:null},pc=class extends Dg{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return pr(this.source,(n,r)=>{$2(n)?t[r]=n.getValue(e):Gn(n)?t[r]=In(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&tt(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return pr(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){hc.dependencies&&Gn(e)&&hc.dependencies.add(e);const t=fc(e);t&&tt(t,n=>this.add(n))}},Pg=class extends pc{constructor(e){super(e)}static create(e){return new Pg(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((n,r)=>n.setValue(e[r])).some(Boolean):(super.setValue(e.map(G2)),!0)}};function G2(e){return(dc(e)?_o:xo).create(e)}function id(e){const t=mr(e);return t?t.constructor:xe.arr(e)?Pg:dc(e)?_o:xo}var jg=(e,t)=>{const n=!xe.fun(e)||e.prototype&&e.prototype.isReactComponent;return k.forwardRef((r,i)=>{const s=k.useRef(null),o=n&&k.useCallback(a=>{s.current=W2(i,a)},[i]),[c,u]=Y2(r,t),d=Rg(),f=()=>{const a=s.current;if(n&&!a)return;(a?t.applyAnimatedValues(a,c.getValue(!0)):!1)===!1&&d()},p=new H2(f,u),l=k.useRef();nd(()=>(l.current=p,tt(u,a=>ss(a,p)),()=>{l.current&&(tt(l.current.deps,a=>Eo(a,l.current)),qe.cancel(l.current.update))})),k.useEffect(f,[]),Ng(()=>()=>{const a=l.current;tt(a.deps,h=>Eo(h,a))});const v=t.getComponentProps(c.getValue());return de.createElement(e,{...v,ref:o})})},H2=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&qe.write(this.update)}};function Y2(e,t){const n=new Set;return hc.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new pc(e),hc.dependencies=null,[e,n]}function W2(e,t){return e&&(xe.fun(e)?e(t):e.current=t),t}var Lg=Symbol.for("AnimatedComponent"),K2=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=i=>new pc(i),getComponentProps:r=i=>i}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},s=o=>{const c=Bg(o)||"Anonymous";return xe.str(o)?o=s[o]||(s[o]=jg(o,i)):o=o[Lg]||(o[Lg]=jg(o,i)),o.displayName=`Animated(${c})`,o};return pr(e,(o,c)=>{xe.arr(e)&&(c=Bg(o)),s[c]=s(o)}),{animated:s}},Bg=e=>xe.str(e)?e:e&&xe.str(e.displayName)?e.displayName:xe.fun(e)&&e.name||null;function Ti(e,...t){return xe.fun(e)?e(...t):e}var Co=(e,t)=>e===!0||!!(t&&e&&(xe.fun(e)?e(t):Dn(e).includes(t))),Fg=(e,t)=>xe.obj(e)?t&&e[t]:e,Ug=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,z2=e=>e,sd=(e,t=z2)=>{let n=Q2;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));const r={};for(const i of n){const s=t(e[i],i);xe.und(s)||(r[i]=s)}return r},Q2=["config","onProps","onStart","onChange","onPause","onResume","onRest"],J2={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function Z2(e){const t={};let n=0;if(pr(e,(r,i)=>{J2[i]||(t[i]=r,n++)}),n)return t}function qg(e){const t=Z2(e);if(t){const n={to:t};return pr(e,(r,i)=>i in t||(n[i]=r)),n}return{...e}}function Ao(e){return e=In(e),xe.arr(e)?e.map(Ao):dc(e)?tr.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function X2(e){for(const t in e)return!0;return!1}function od(e){return xe.fun(e)||xe.arr(e)&&xe.obj(e[0])}function eA(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function tA(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var nA={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},ad={...nA.default,mass:1,damping:1,easing:I2.linear,clamp:!1},rA=class{constructor(){this.velocity=0,Object.assign(this,ad)}};function iA(e,t,n){n&&(n={...n},Vg(n,t),t={...n,...t}),Vg(e,t),Object.assign(e,t);for(const o in ad)e[o]==null&&(e[o]=ad[o]);let{frequency:r,damping:i}=e;const{mass:s}=e;return xe.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/r,2)*s,e.friction=4*Math.PI*i*s/r),e}function Vg(e,t){if(!xe.und(t.decay))e.duration=void 0;else{const n=!xe.und(t.tension)||!xe.und(t.friction);(n||!xe.und(t.frequency)||!xe.und(t.damping)||!xe.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var $g=[],sA=class{constructor(){this.changed=!1,this.values=$g,this.toValues=null,this.fromValues=$g,this.config=new rA,this.immediate=!1}};function Gg(e,{key:t,props:n,defaultProps:r,state:i,actions:s}){return new Promise((o,c)=>{let u,d,f=Co(n.cancel??(r==null?void 0:r.cancel),t);if(f)v();else{xe.und(n.pause)||(i.paused=Co(n.pause,t));let a=r==null?void 0:r.pause;a!==!0&&(a=i.paused||Co(a,t)),u=Ti(n.delay||0,t),a?(i.resumeQueue.add(l),s.pause()):(s.resume(),l())}function p(){i.resumeQueue.add(l),i.timeouts.delete(d),d.cancel(),u=d.time-qe.now()}function l(){u>0&&!tr.skipAnimation?(i.delayed=!0,d=qe.setTimeout(v,u),i.pauseQueue.add(p),i.timeouts.add(d)):v()}function v(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(p),i.timeouts.delete(d),e<=(i.cancelId||0)&&(f=!0);try{s.start({...n,callId:e,cancel:f},o)}catch(a){c(a)}}})}var cd=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?os(e.get()):t.every(n=>n.noop)?Hg(e.get()):rr(e.get(),t.every(n=>n.finished)),Hg=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),rr=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),os=e=>({value:e,cancelled:!0,finished:!1});function Yg(e,t,n,r){const{callId:i,parentId:s,onRest:o}=t,{asyncTo:c,promise:u}=n;return!s&&e===c&&!t.reset?u:n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;const d=sd(t,(y,g)=>g==="onRest"?void 0:y);let f,p;const l=new Promise((y,g)=>(f=y,p=g)),v=y=>{const g=i<=(n.cancelId||0)&&os(r)||i!==n.asyncId&&rr(r,!1);if(g)throw y.result=g,p(y),y},a=(y,g)=>{const b=new Wg,w=new Kg;return(async()=>{if(tr.skipAnimation)throw To(n),w.result=rr(r,!1),p(w),w;v(b);const E=xe.obj(y)?{...y}:{...g,to:y};E.parentId=i,pr(d,(A,T)=>{xe.und(E[T])&&(E[T]=A)});const S=await r.start(E);return v(b),n.paused&&await new Promise(A=>{n.resumeQueue.add(A)}),S})()};let h;if(tr.skipAnimation)return To(n),rr(r,!1);try{let y;xe.arr(e)?y=(async g=>{for(const b of g)await a(b)})(e):y=Promise.resolve(e(a,r.stop.bind(r))),await Promise.all([y.then(f),l]),h=rr(r.get(),!0,!1)}catch(y){if(y instanceof Wg)h=y.result;else if(y instanceof Kg)h=y.result;else throw y}finally{i==n.asyncId&&(n.asyncId=s,n.asyncTo=s?c:void 0,n.promise=s?u:void 0)}return xe.fun(o)&&qe.batchedUpdates(()=>{o(h,r,r.item)}),h})()}function To(e,t){mo(e.timeouts,n=>n.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var Wg=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},Kg=class extends Error{constructor(){super("SkipAnimationSignal")}},ud=e=>e instanceof ld,oA=1,ld=class extends Cg{constructor(){super(...arguments),this.id=oA++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=mr(this);return e&&e.getValue()}to(...e){return tr.to(this,e)}interpolate(...e){return j2(),tr.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){wo(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||nc.sort(this),wo(this,{type:"priority",parent:this,priority:e})}},Ii=Symbol.for("SpringPhase"),zg=1,dd=2,fd=4,hd=e=>(e[Ii]&zg)>0,ii=e=>(e[Ii]&dd)>0,Io=e=>(e[Ii]&fd)>0,Qg=(e,t)=>t?e[Ii]|=dd|zg:e[Ii]&=~dd,Jg=(e,t)=>t?e[Ii]|=fd:e[Ii]&=~fd,aA=class extends ld{constructor(e,t){if(super(),this.animation=new sA,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!xe.und(e)||!xe.und(t)){const n=xe.obj(e)?{...e}:{...t,from:e};xe.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(ii(this)||this._state.asyncTo)||Io(this)}get goal(){return In(this.animation.to)}get velocity(){const e=mr(this);return e instanceof xo?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return hd(this)}get isAnimating(){return ii(this)}get isPaused(){return Io(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:i}=r;const{config:s}=r,o=fc(r.to);!o&&Gn(r.to)&&(i=Dn(In(r.to))),r.values.forEach((d,f)=>{if(d.done)return;const p=d.constructor==_o?1:o?o[f].lastPosition:i[f];let l=r.immediate,v=p;if(!l){if(v=d.lastPosition,s.tension<=0){d.done=!0;return}let a=d.elapsedTime+=e;const h=r.fromValues[f],y=d.v0!=null?d.v0:d.v0=xe.arr(s.velocity)?s.velocity[f]:s.velocity;let g;const b=s.precision||(h==p?.005:Math.min(1,Math.abs(p-h)*.001));if(xe.und(s.duration))if(s.decay){const w=s.decay===!0?.998:s.decay,E=Math.exp(-(1-w)*a);v=h+y/(1-w)*(1-E),l=Math.abs(d.lastPosition-v)<=b,g=y*E}else{g=d.lastVelocity==null?y:d.lastVelocity;const w=s.restVelocity||b/10,E=s.clamp?0:s.bounce,S=!xe.und(E),A=h==p?d.v0>0:h<p;let T,O=!1;const N=1,D=Math.ceil(e/N);for(let U=0;U<D&&(T=Math.abs(g)>w,!(!T&&(l=Math.abs(p-v)<=b,l)));++U){S&&(O=v==p||v>p==A,O&&(g=-g*E,v=p));const q=-s.tension*1e-6*(v-p),F=-s.friction*.001*g,V=(q+F)/s.mass;g=g+V*N,v=v+g*N}}else{let w=1;s.duration>0&&(this._memoizedDuration!==s.duration&&(this._memoizedDuration=s.duration,d.durationProgress>0&&(d.elapsedTime=s.duration*d.durationProgress,a=d.elapsedTime+=e)),w=(s.progress||0)+a/this._memoizedDuration,w=w>1?1:w<0?0:w,d.durationProgress=w),v=h+s.easing(w)*(p-h),g=(v-d.lastPosition)/e,l=w==1}d.lastVelocity=g,Number.isNaN(v)&&(console.warn("Got NaN while animating:",this),l=!0)}o&&!o[f].done&&(l=!1),l?d.done=!0:t=!1,d.setValue(v,s.round)&&(n=!0)});const c=mr(this),u=c.getValue();if(t){const d=In(r.to);(u!==d||n)&&!s.decay?(c.setValue(d),this._onChange(d)):n&&s.decay&&this._onChange(u),this._stop()}else n&&this._onChange(u)}set(e){return qe.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(ii(this)){const{to:e,config:t}=this.animation;qe.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return xe.und(e)?(n=this.queue||[],this.queue=[]):n=[xe.obj(e)?e:{...t,to:e}],Promise.all(n.map(r=>this._update(r))).then(r=>cd(this,r))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),To(this._state,e&&this._lastCallId),qe.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=xe.obj(n)?n[t]:n,(n==null||od(n))&&(n=void 0),r=xe.obj(r)?r[t]:r,r==null&&(r=void 0);const i={to:n,from:r};return hd(this)||(e.reverse&&([n,r]=[r,n]),r=In(r),xe.und(r)?mr(this)||this._set(n):this._set(r)),i}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,sd(e,(o,c)=>/^on/.test(c)?Fg(o,n):o)),e0(this,e,"onProps"),Ro(this,"onProps",e,this);const i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const s=this._state;return Gg(++this._lastCallId,{key:n,props:e,defaultProps:r,state:s,actions:{pause:()=>{Io(this)||(Jg(this,!0),go(s.pauseQueue),Ro(this,"onPause",rr(this,ko(this,this.animation.to)),this))},resume:()=>{Io(this)&&(Jg(this,!1),ii(this)&&this._resume(),go(s.resumeQueue),Ro(this,"onResume",rr(this,ko(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(o=>{if(e.loop&&o.finished&&!(t&&o.noop)){const c=Zg(e);if(c)return this._update(c,!0)}return o})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(os(this));const r=!xe.und(e.to),i=!xe.und(e.from);if(r||i)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(os(this));const{key:s,defaultProps:o,animation:c}=this,{to:u,from:d}=c;let{to:f=u,from:p=d}=e;i&&!r&&(!t.default||xe.und(f))&&(f=p),t.reverse&&([f,p]=[p,f]);const l=!Ar(p,d);l&&(c.from=p),p=In(p);const v=!Ar(f,u);v&&this._focus(f);const a=od(t.to),{config:h}=c,{decay:y,velocity:g}=h;(r||i)&&(h.velocity=0),t.config&&!a&&iA(h,Ti(t.config,s),t.config!==o.config?Ti(o.config,s):void 0);let b=mr(this);if(!b||xe.und(f))return n(rr(this,!0));const w=xe.und(t.reset)?i&&!t.default:!xe.und(p)&&Co(t.reset,s),E=w?p:this.get(),S=Ao(f),A=xe.num(S)||xe.arr(S)||dc(S),T=!a&&(!A||Co(o.immediate||t.immediate,s));if(v){const U=id(f);if(U!==b.constructor)if(T)b=this._set(S);else throw Error(`Cannot animate between ${b.constructor.name} and ${U.name}, as the "to" prop suggests`)}const O=b.constructor;let N=Gn(f),D=!1;if(!N){const U=w||!hd(this)&&l;(v||U)&&(D=Ar(Ao(E),S),N=!D),(!Ar(c.immediate,T)&&!T||!Ar(h.decay,y)||!Ar(h.velocity,g))&&(N=!0)}if(D&&ii(this)&&(c.changed&&!w?N=!0:N||this._stop(u)),!a&&((N||Gn(u))&&(c.values=b.getPayload(),c.toValues=Gn(f)?null:O==_o?[1]:Dn(S)),c.immediate!=T&&(c.immediate=T,!T&&!w&&this._set(u)),N)){const{onRest:U}=c;tt(uA,F=>e0(this,t,F));const q=rr(this,ko(this,u));go(this._pendingCalls,q),this._pendingCalls.add(n),c.changed&&qe.batchedUpdates(()=>{var F;c.changed=!w,U==null||U(q,this),w?Ti(o.onRest,q):(F=c.onStart)==null||F.call(c,q,this)})}w&&this._set(E),a?n(Yg(t.to,t,this._state,this)):N?this._start():ii(this)&&!v?this._pendingCalls.add(n):n(Hg(E))}_focus(e){const t=this.animation;e!==t.to&&(_g(this)&&this._detach(),t.to=e,_g(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Gn(t)&&(ss(t,this),ud(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Gn(e)&&Eo(e,this)}_set(e,t=!0){const n=In(e);if(!xe.und(n)){const r=mr(this);if(!r||!Ar(n,r.getValue())){const i=id(n);!r||r.constructor!=i?rd(this,i.create(n)):r.setValue(n),r&&qe.batchedUpdates(()=>{this._onChange(n,t)})}}return mr(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,Ro(this,"onStart",rr(this,ko(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Ti(this.animation.onChange,e,this)),Ti(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;mr(this).reset(In(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),ii(this)||(Qg(this,!0),Io(this)||this._resume())}_resume(){tr.skipAnimation?this.finish():nc.start(this)}_stop(e,t){if(ii(this)){Qg(this,!1);const n=this.animation;tt(n.values,i=>{i.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),wo(this,{type:"idle",parent:this});const r=t?os(this.get()):rr(this.get(),ko(this,e??n.to));go(this._pendingCalls,r),n.changed&&(n.changed=!1,Ro(this,"onRest",r,this))}}};function ko(e,t){const n=Ao(t),r=Ao(e.get());return Ar(r,n)}function Zg(e,t=e.loop,n=e.to){const r=Ti(t);if(r){const i=r!==!0&&qg(r),s=(i||e).reverse,o=!i||i.reset;return Oo({...e,loop:t,default:!1,pause:void 0,to:!s||od(n)?n:void 0,from:o?e.from:void 0,reset:o,...i})}}function Oo(e){const{to:t,from:n}=e=qg(e),r=new Set;return xe.obj(t)&&Xg(t,r),xe.obj(n)&&Xg(n,r),e.keys=r.size?Array.from(r):null,e}function cA(e){const t=Oo(e);return xe.und(t.default)&&(t.default=sd(t)),t}function Xg(e,t){pr(e,(n,r)=>n!=null&&t.add(r))}var uA=["onStart","onRest","onChange","onPause","onResume"];function e0(e,t,n){e.animation[n]=t[n]!==Ug(t,n)?Fg(t[n],e.key):void 0}function Ro(e,t,...n){var r,i,s,o;(i=(r=e.animation)[t])==null||i.call(r,...n),(o=(s=e.defaultProps)[t])==null||o.call(s,...n)}var lA=["onStart","onChange","onRest"],dA=1,fA=class{constructor(e,t){this.id=dA++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(const t in e){const n=e[t];xe.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Oo(e)),this}start(e){let{queue:t}=this;return e?t=Dn(e).map(Oo):this.queue=[],this._flush?this._flush(this,t):(o0(this,t),pd(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;tt(Dn(t),r=>n[r].stop(!!e))}else To(this._state,this._lastAsyncId),this.each(n=>n.stop(!!e));return this}pause(e){if(xe.und(e))this.start({pause:!0});else{const t=this.springs;tt(Dn(e),n=>t[n].pause())}return this}resume(e){if(xe.und(e))this.start({pause:!1});else{const t=this.springs;tt(Dn(e),n=>t[n].resume())}return this}each(e){pr(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,i=this._changed.size>0;(r&&!this._started||i&&!this._started)&&(this._started=!0,mo(e,([c,u])=>{u.value=this.get(),c(u,this,this._item)}));const s=!r&&this._started,o=i||s&&n.size?this.get():null;i&&t.size&&mo(t,([c,u])=>{u.value=o,c(u,this,this._item)}),s&&(this._started=!1,mo(n,([c,u])=>{u.value=o,c(u,this,this._item)}))}eventObserved(e){if(e.type=="change")this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type=="idle")this._active.delete(e.parent);else return;qe.onFrame(this._onFrame)}};function pd(e,t){return Promise.all(t.map(n=>t0(e,n))).then(n=>cd(e,n))}async function t0(e,t,n){const{keys:r,to:i,from:s,loop:o,onRest:c,onResolve:u}=t,d=xe.obj(t.default)&&t.default;o&&(t.loop=!1),i===!1&&(t.to=null),s===!1&&(t.from=null);const f=xe.arr(i)||xe.fun(i)?i:void 0;f?(t.to=void 0,t.onRest=void 0,d&&(d.onRest=void 0)):tt(lA,h=>{const y=t[h];if(xe.fun(y)){const g=e._events[h];t[h]=({finished:b,cancelled:w})=>{const E=g.get(y);E?(b||(E.finished=!1),w&&(E.cancelled=!0)):g.set(y,{value:null,finished:b||!1,cancelled:w||!1})},d&&(d[h]=t[h])}});const p=e._state;t.pause===!p.paused?(p.paused=t.pause,go(t.pause?p.pauseQueue:p.resumeQueue)):p.paused&&(t.pause=!0);const l=(r||Object.keys(e.springs)).map(h=>e.springs[h].start(t)),v=t.cancel===!0||Ug(t,"cancel")===!0;(f||v&&p.asyncId)&&l.push(Gg(++e._lastAsyncId,{props:t,state:p,actions:{pause:Wl,resume:Wl,start(h,y){v?(To(p,e._lastAsyncId),y(os(e))):(h.onRest=c,y(Yg(f,h,p,e)))}}})),p.paused&&await new Promise(h=>{p.resumeQueue.add(h)});const a=cd(e,await Promise.all(l));if(o&&a.finished&&!(n&&a.noop)){const h=Zg(t,o,i);if(h)return o0(e,[h]),t0(e,h,!0)}return u&&qe.batchedUpdates(()=>u(a,e,e.item)),a}function n0(e,t){const n={...e.springs};return t&&tt(Dn(t),r=>{xe.und(r.keys)&&(r=Oo(r)),xe.obj(r.to)||(r={...r,to:void 0}),s0(n,r,i=>i0(i))}),r0(e,n),n}function r0(e,t){pr(t,(n,r)=>{e.springs[r]||(e.springs[r]=n,ss(n,e))})}function i0(e,t){const n=new aA;return n.key=e,t&&ss(n,t),n}function s0(e,t,n){t.keys&&tt(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function o0(e,t){tt(t,n=>{s0(e.springs,n,r=>i0(r,e))})}var mc=({children:e,...t})=>{const n=k.useContext(gc),r=t.pause||!!n.pause,i=t.immediate||!!n.immediate;t=U2(()=>({pause:r,immediate:i}),[r,i]);const{Provider:s}=gc;return de.createElement(s,{value:t},e)},gc=hA(mc,{});mc.Provider=gc.Provider,mc.Consumer=gc.Consumer;function hA(e,t){return Object.assign(e,de.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var pA=()=>{const e=[],t=function(r){B2();const i=[];return tt(e,(s,o)=>{if(xe.und(r))i.push(s.start());else{const c=n(r,s,o);c&&i.push(s.start(c))}}),i};t.current=e,t.add=function(r){e.includes(r)||e.push(r)},t.delete=function(r){const i=e.indexOf(r);~i&&e.splice(i,1)},t.pause=function(){return tt(e,r=>r.pause(...arguments)),this},t.resume=function(){return tt(e,r=>r.resume(...arguments)),this},t.set=function(r){tt(e,(i,s)=>{const o=xe.fun(r)?r(s,i):r;o&&i.set(o)})},t.start=function(r){const i=[];return tt(e,(s,o)=>{if(xe.und(r))i.push(s.start());else{const c=this._getProps(r,s,o);c&&i.push(s.start(c))}}),i},t.stop=function(){return tt(e,r=>r.stop(...arguments)),this},t.update=function(r){return tt(e,(i,s)=>i.update(this._getProps(r,i,s))),this};const n=function(r,i,s){return xe.fun(r)?r(s,i):r};return t._getProps=n,t};function mA(e,t,n){const r=xe.fun(t)&&t;r&&!n&&(n=[]);const i=k.useMemo(()=>r||arguments.length==3?pA():void 0,[]),s=k.useRef(0),o=Rg(),c=k.useMemo(()=>({ctrls:[],queue:[],flush(g,b){const w=n0(g,b);return s.current>0&&!c.queue.length&&!Object.keys(w).some(S=>!g.springs[S])?pd(g,b):new Promise(S=>{r0(g,w),c.queue.push(()=>{S(pd(g,b))}),o()})}}),[]),u=k.useRef([...c.ctrls]),d=[],f=Mg(e)||0;k.useMemo(()=>{tt(u.current.slice(e,f),g=>{eA(g,i),g.stop(!0)}),u.current.length=e,p(f,e)},[e]),k.useMemo(()=>{p(0,Math.min(f,e))},n);function p(g,b){for(let w=g;w<b;w++){const E=u.current[w]||(u.current[w]=new fA(null,c.flush)),S=r?r(w,E):t[w];S&&(d[w]=cA(S))}}const l=u.current.map((g,b)=>n0(g,d[b])),v=k.useContext(mc),a=Mg(v),h=v!==a&&X2(v);nd(()=>{s.current++,c.ctrls=u.current;const{queue:g}=c;g.length&&(c.queue=[],tt(g,b=>b())),tt(u.current,(b,w)=>{i==null||i.add(b),h&&b.start({default:v});const E=d[w];E&&(tA(b,E.ref),b.ref?b.queue.push(E):b.start(E))})}),Ng(()=>()=>{tt(c.ctrls,g=>g.stop(!0))});const y=l.map(g=>({...g}));return i?[y,i]:y}function gA(e,t){const n=xe.fun(e),[[r],i]=mA(1,n?e:[e],n?[]:t);return n||arguments.length==2?[r,i]:r}var yA=class extends ld{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=vo(...t);const n=this._get(),r=id(n);rd(this,r.create(n))}advance(e){const t=this._get(),n=this.get();Ar(t,n)||(mr(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&a0(this._active)&&md(this)}_get(){const e=xe.arr(this.source)?this.source.map(In):Dn(In(this.source));return this.calc(...e)}_start(){this.idle&&!a0(this._active)&&(this.idle=!1,tt(fc(this),e=>{e.done=!1}),tr.skipAnimation?(qe.batchedUpdates(()=>this.advance()),md(this)):nc.start(this))}_attach(){let e=1;tt(Dn(this.source),t=>{Gn(t)&&ss(t,this),ud(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){tt(Dn(this.source),e=>{Gn(e)&&Eo(e,this)}),this._active.clear(),md(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=Dn(this.source).reduce((t,n)=>Math.max(t,(ud(n)?n.priority:0)+1),0))}};function vA(e){return e.idle!==!1}function a0(e){return!e.size||Array.from(e).every(vA)}function md(e){e.idle||(e.idle=!0,tt(fc(e),t=>{t.done=!0}),wo(e,{type:"idle",parent:e}))}tr.assign({createStringInterpolator:kg,to:(e,t)=>new yA(e,t)});var c0=/^--/;function bA(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!c0.test(e)&&!(No.hasOwnProperty(e)&&No[e])?t+"px":(""+t).trim()}var u0={};function wA(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{style:r,children:i,scrollTop:s,scrollLeft:o,viewBox:c,...u}=t,d=Object.values(u),f=Object.keys(u).map(p=>n||e.hasAttribute(p)?p:u0[p]||(u0[p]=p.replace(/([A-Z])/g,l=>"-"+l.toLowerCase())));i!==void 0&&(e.textContent=i);for(const p in r)if(r.hasOwnProperty(p)){const l=bA(p,r[p]);c0.test(p)?e.style.setProperty(p,l):e.style[p]=l}f.forEach((p,l)=>{e.setAttribute(p,d[l])}),s!==void 0&&(e.scrollTop=s),o!==void 0&&(e.scrollLeft=o),c!==void 0&&e.setAttribute("viewBox",c)}var No={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},EA=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),SA=["Webkit","Ms","Moz","O"];No=Object.keys(No).reduce((e,t)=>(SA.forEach(n=>e[EA(n,t)]=e[t]),e),No);var xA=/^(matrix|translate|scale|rotate|skew)/,_A=/^(translate)/,CA=/^(rotate|skew)/,gd=(e,t)=>xe.num(e)&&e!==0?e+t:e,yc=(e,t)=>xe.arr(e)?e.every(n=>yc(n,t)):xe.num(e)?e===t:parseFloat(e)===t,AA=class extends pc{constructor({x:e,y:t,z:n,...r}){const i=[],s=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),s.push(o=>[`translate3d(${o.map(c=>gd(c,"px")).join(",")})`,yc(o,0)])),pr(r,(o,c)=>{if(c==="transform")i.push([o||""]),s.push(u=>[u,u===""]);else if(xA.test(c)){if(delete r[c],xe.und(o))return;const u=_A.test(c)?"px":CA.test(c)?"deg":"";i.push(Dn(o)),s.push(c==="rotate3d"?([d,f,p,l])=>[`rotate3d(${d},${f},${p},${gd(l,u)})`,yc(l,0)]:d=>[`${c}(${d.map(f=>gd(f,u)).join(",")})`,yc(d,c.startsWith("scale")?1:0)])}}),i.length&&(r.transform=new TA(i,s)),super(r)}},TA=class extends Cg{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return tt(this.inputs,(n,r)=>{const i=In(n[0]),[s,o]=this.transforms[r](xe.arr(i)?i:n.map(In));e+=" "+s,t=t&&o}),t?"none":e}observerAdded(e){e==1&&tt(this.inputs,t=>tt(t,n=>Gn(n)&&ss(n,this)))}observerRemoved(e){e==0&&tt(this.inputs,t=>tt(t,n=>Gn(n)&&Eo(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),wo(this,e)}},IA=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];tr.assign({batchedUpdates:wi.unstable_batchedUpdates,createStringInterpolator:kg,colors:m2});var kA=K2(IA,{applyAnimatedValues:wA,createAnimatedStyle:e=>new AA(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),OA=kA.animated;function vc(e){const{rows:t}=e,n=gA({from:{opacity:0},to:{opacity:1}});return m.jsxs(OA.div,{style:n,className:"flex w-full animate-pulse flex-col items-start space-y-3",children:[[...Array(t)].map((r,i)=>m.jsx("div",{className:"h-10 w-full rounded-lg bg-gray-100 p-5"},`skeleton_rows_${i}`)),m.jsx("span",{className:"sr-only",children:"Loading..."})]})}function l0({children:e,offset:t,max:n=4,initialCollapsed:r=!0}){const i=k.useRef(null),[s,o]=k.useState(0),[c,u]=k.useState(r),d=c&&k.Children.count(e)>n?n:k.Children.count(e);k.useEffect(()=>{i.current&&(s?c?i.current.style.marginBottom=`-${s-(s/d+(d-1)*(t??s/d/7.5))}px`:i.current.style.marginBottom="unset":o(i.current.offsetHeight))},[c,s]);const f=l=>(100-(d-1-l))/100,p=l=>l*(s/d-(t??s/d/7.5));return m.jsx("div",{ref:i,className:"hover:cursor-pointer",onClick:()=>d>1&&u(!c),children:k.Children.map(k.Children.toArray(e).slice(-1*d),(l,v)=>m.jsx("div",{className:`${!c&&"[&:not(:last-child)]:mb-1"} h-full w-full transition-all duration-300 ease-in-out`,style:{transform:c&&d>1?`scaleX(${f(v)}) translateY(-${p(v)}px)`:void 0},children:l}))})}const RA=Zi("flex flex-shrink bg-white rounded-full transform transition-transform ease-out",{variants:{size:{md:"w-3 h-3",lg:"w-7 h-7"}}}),NA=Zi("",{variants:{size:{md:"pr-4",lg:"pr-6"}}}),MA=({id:e,disabled:t,onChange:n,defaultChecked:r=!1,size:i="md"})=>{const s=t,[o,c]=k.useState(r),[u,d]=k.useState(!1),f=()=>{s||(c(!o),n&&n())},p=()=>{t||d(!0)},l=()=>{d(!1)},v=fn("relative py-0.5 pl-0.5 rounded-full",{"ring-2 ring-core-white-900 outline-core-primary-500 outline outline-2 outline-offset-2":u,"bg-core-primary-500 hover:bg-core-primary-600":o&&!t,"bg-core-gray-200 hover:bg-core-gray-300":!o&&!t,"bg-core-gray-100":t},NA({size:i})),a=i==="lg"?"translate-x-[1.375rem] ease-out":"translate-x-3.5 ease-out";return m.jsxs("div",{className:`inline-flex items-center py-1 ${s?"pointer-events-none":"cursor-pointer "}`,onClick:f,onFocus:p,children:[m.jsx("input",{className:"sr-only ",id:e,type:"checkbox",checked:o,disabled:s,onBlur:l,onChange:f,onFocus:p}),m.jsx("div",{className:v,children:m.jsx("div",{className:fn(RA({size:i}),`${o?a:""} ${s?"shadow-none":"shadow-xs"}`)})})]})},bc=({id:e,children:t,size:n="md",description:r,toggleLeft:i=!0,disabled:s,helperText:o,defaultChecked:c=!1,label:u,required:d=!1,tooltip:f,onChange:p})=>{const l=k.useId(),v=e??l;return m.jsxs("div",{className:`flex ${i?"flex-row":"flex-row-reverse"} items-start gap-3`,children:[m.jsx(MA,{disabled:s,defaultChecked:c,id:v,size:n,onChange:p}),t||(u||r||f||o)&&m.jsxs("div",{className:"inline-flex w-full flex-col self-center",children:[m.jsx(vn,{className:fn("font-normal"),description:r,required:d,tooltip:f,htmlFor:v,disabled:s,children:u}),m.jsx(vn.Helper,{disabled:s,helperText:o})]})]})};bc.displayName="Switch";const d0=k.createContext(null);function DA(e=!1){const t=k.useContext(d0);if(!t&&!e)throw new Error("Switch.Item must be used within a SwitchGroup or SwitchGroup.Root");return t}const f0=k.forwardRef(({toggleLeft:e=!1,size:t="md",children:n,description:r,disabled:i,helperText:s,id:o,label:c,required:u,tooltip:d},f)=>{const p=k.useId(),l=o??p,v=c??r??d??s?m.jsxs("div",{className:"inline-flex flex-col",children:[m.jsx(vn,{className:"cursor-default",description:r,required:u,tooltip:d,htmlFor:l,disabled:i,children:c}),m.jsx(vn.Helper,{disabled:i,helperText:s})]}):null;return m.jsx(d0.Provider,{value:{disabled:i,toggleLeft:e,size:t},children:m.jsxs("div",{ref:f,"aria-describedby":s?`${l}__describer`:void 0,"aria-labelledby":c?`${l}__label`:void 0,className:"flex flex-col gap-4",role:"group",children:[c??s??r??d?m.jsx("div",{className:"flex flex-col",children:v}):null,n?m.jsx("div",{className:fn("flex flex-col gap-2"),children:n}):null]})})});f0.displayName="SwitchGroup",Object.assign(f0,{Item:({disabled:e,label:t,defaultChecked:n})=>{const r=DA(),{disabled:i,size:s,toggleLeft:o}=r??{};return m.jsx(bc,{toggleLeft:o,disabled:e??i,label:t,defaultChecked:n,size:s})}});const PA=({children:e})=>m.jsx("div",{className:"fixed bottom-0 z-10 flex h-[70px] w-full border-b-0 border-t border-gray-100 bg-white lg:bottom-auto lg:top-0 lg:h-[50px] lg:border-b lg:border-t-0",children:e}),jA=({id:e,label:t,icon:n,pathname:r,activeTab:i,setActiveTab:s})=>m.jsx(_h,{className:"flex flex-grow items-center",to:r??"",children:m.jsxs("button",{className:`flex h-full flex-grow flex-col items-center justify-center gap-1 border-b-0 border-t-2 px-3 py-3 text-xs focus:outline-none lg:flex-row lg:border-b-2 lg:border-t-0 lg:text-sm ${i===e?"border-core-primary-500 text-core-primary-500":"border-transparent text-core-gray-500 hover:text-core-gray-800"}`,onClick:()=>s(e),children:[m.jsx(en,{icon:n,className:"mr-2",variant:i===e?"discovery":"secondary"}),t]})});function gr(e,t){const{data:n,error:r,isLoading:i,isValidating:s,mutate:o}=Cr(mt("contacts"),{contact_uuid:e,email:t});return{contact:n==null?void 0:n.data.data,data:n,error:r,isLoading:i,isValidating:s,mutate:o}}function LA({contact:e}){const{t}=et(),{session:{loyalty_program:n}}=yt(),r=(s,o)=>em(s,o)?`${em(s,o)} ${t("yearsAgo")}`:Xp(s,o)?`${Xp(s,o)} ${t("weeksAgo")}`:Zp(s,o)?`${Zp(s,o)} ${t("daysAgo")}`:t("today"),i=()=>{const s=new Date,o=new Date(e.current_display_values.birthdate);return o.setFullYear(s.getFullYear()),s.getTime()>o.getTime()&&o.setFullYear(o.getFullYear()+1),Math.floor((o.getTime()-s.getTime())/(1e3*60*60*24))};return m.jsxs("div",{className:"h-full justify-between",children:[m.jsx("p",{className:"mb-4 text-lg font-semibold leading-7",children:"Stats"}),m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(en,{icon:"calendar"}),m.jsxs("div",{children:[m.jsx("p",{className:"text-xs font-semibold",children:r(new Date,new Date(e.current_display_values.loyalty_last_transaction_date))}),m.jsx("p",{className:"text-xs text-core-gray-500",children:t("lastVisit")})]})]}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(en,{icon:"shopping-bag"}),m.jsxs("div",{children:[m.jsx("p",{className:"text-xs font-semibold",children:`${e.current_display_values.loyalty_number_of_transactions} ${t("visits")}`}),m.jsx("p",{className:"text-xs text-core-gray-500",children:t("totalVisits")})]})]}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(en,{icon:"dollar"}),m.jsxs("div",{children:[m.jsx("p",{className:"text-xs font-semibold",children:`${e.current_display_values.loyalty_total_credits_received} ${n.custom_credit_name?n.custom_credit_name:t("points")}`}),m.jsx("p",{className:"text-xs text-core-gray-500",children:t("totalCredits")})]})]}),e.current_display_values.birthdate&&m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(en,{icon:"star"}),m.jsxs("div",{children:[m.jsx("p",{className:"text-xs font-semibold",children:new Date(e.current_display_values.birthdate).toLocaleDateString(Wt.language,{day:"numeric",month:"long"})}),m.jsx("p",{className:"text-xs text-core-gray-500",children:t("birthdayInDays",{number:i()})})]})]})]})]})}function h0({loyaltyTransaction:e}){const{t}=et();return m.jsxs("div",{className:"mb-2 flex justify-between",children:[m.jsx("p",{className:"text-xs text-core-gray-500",children:e.type===Yp.CREDIT_RECEPTION?t("transaction"):`${t("isRedeemed")} '${e.loyalty_transaction_data.title}'`}),m.jsx("p",{className:"text-xs font-semibold",children:e.credits>0?"+"+e.credits:e.credits})]})}function p0({subscription:e,onChange:t,editable:n=!1}){const{t:r}=et();return m.jsxs("div",{className:"mb-2 flex justify-between",children:[m.jsx("p",{className:"text-xs font-semibold",children:e.subscription_type.name}),n?m.jsx(bc,{defaultChecked:e.is_subscribed,disabled:e.subscription_type.strategy===Qr.FUNCTIONAL,onChange:t&&(()=>t(e.subscription_type.name))}):m.jsx(jl,{label:r(e.status.toLowerCase()),size:"sm",color:e.is_subscribed?"primary":"gray"})]})}function BA({contact:e}){const t=Tt(),{t:n}=et();return m.jsxs("div",{className:"inline-grid w-full items-center gap-4 py-4 lg:grid-cols-2",children:[m.jsxs("div",{className:"flex items-center gap-4",children:[m.jsx(Pl,{src:e.current_display_values.avatar,size:"2xl"}),m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsxs("div",{className:"flex gap-2",children:[m.jsx("p",{className:"text-lg",children:e.current_display_values.firstname||e.current_display_values.lastname?`${e.current_display_values.firstname} ${e.current_display_values.lastname}`:e.current_display_values.email}),e.current_display_values.tier&&m.jsx(jl,{label:e.current_display_values.tier,size:"sm",stroke:!0})]}),m.jsxs("p",{className:"text-sm text-core-gray-500 ",children:[n("joined")," ",new Date(e.current_display_values.created_at).toLocaleDateString(Wt.language,{month:"long",year:"numeric"})]})]})]}),m.jsxs("div",{className:"inline-grid gap-2 lg:grid-cols-2",children:[m.jsx(lt,{label:n("goToX",{x:"identifiers"}),variant:"secondary",size:"md",onClick:()=>t("contact-identifiers")}),m.jsx(lt,{before:m.jsx(en,{icon:"edit"}),label:n("editProfile"),variant:"secondary",size:"md",onClick:()=>t("contact-attributes")})]})]})}function wc(){const{data:e,error:t,isLoading:n,isValidating:r,mutate:i}=Cr(mt("loyalty-transactions"));return{loyaltyTransactions:e==null?void 0:e.data,data:e,error:t,isLoading:n,isValidating:r,mutate:i}}function m0(){const{data:e,error:t,isLoading:n,isValidating:r,mutate:i}=Cr(mt("subscriptions")+"/contact");return{subscriptions:e==null?void 0:e.data.data,data:e,error:t,isLoading:n,isValidating:r,mutate:i}}function FA(){const{contact:e,isLoading:t}=gr(),{session:{loyalty_program:n,currency:r}}=yt(),{t:i}=et(),s=Tt(),{loyaltyTransactions:o}=wc(),{subscriptions:c}=m0();return t||!e?m.jsx(m.Fragment,{}):m.jsxs(Pt,{children:[m.jsx(kt,{children:m.jsx(BA,{contact:e})}),m.jsx(It,{children:m.jsxs("div",{className:"grid grid-cols-1 gap-x-2 gap-y-2 lg:grid-cols-4",children:[m.jsxs("div",{className:"flex gap-2 lg:flex-col",children:[m.jsx(Mo,{children:m.jsxs("div",{className:"flex h-full flex-col items-center justify-center",children:[m.jsx("p",{className:"text-2xl leading-8",children:e.current_display_values.loyalty_balance}),m.jsx("p",{className:"text-sm text-core-gray-500",children:n.custom_credit_name?n.custom_credit_name:i("points")})]})}),m.jsx(Mo,{children:m.jsxs("div",{className:"flex h-full flex-col items-center justify-center",children:[m.jsx("p",{className:"text-2xl leading-8",children:Ji(e.prepaid_balance.balance_in_cents,r)}),m.jsx("p",{className:"text-sm text-core-gray-500",children:i("prepaidCredit")})]})})]}),m.jsx(Mo,{children:m.jsx(LA,{contact:e})}),m.jsx(Mo,{children:m.jsxs("div",{className:"flex h-full flex-col justify-between gap-4",children:[m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsx("p",{className:"text-lg font-semibold leading-7",children:i("activities")}),o&&o.length?m.jsx("div",{children:o.slice(0,5).map(u=>m.jsx(h0,{loyaltyTransaction:u},u.uuid))}):m.jsx("p",{className:"text-sm text-core-gray-500",children:i("noActivity")})]}),m.jsx(lt,{label:`${i("all")} ${i("activities").toLowerCase()}`,variant:"secondary",onClick:()=>s("activity")})]})}),m.jsx(Mo,{children:m.jsxs("div",{className:"flex h-full flex-col justify-between",children:[m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsx("p",{className:"text-lg font-semibold leading-7",children:i("subscriptions")}),m.jsx("div",{children:c==null?void 0:c.filter(u=>u.subscription_type.strategy!==Qr.FUNCTIONAL).map(u=>m.jsx(p0,{subscription:u},u.subscription_type.uuid))})]}),m.jsx(lt,{label:i("change").charAt(0).toUpperCase()+i("change").slice(1),before:m.jsx(en,{icon:"edit"}),variant:"secondary",onClick:()=>s("subscriptions")})]})})]})})]})}function Mo({children:e}){return m.jsx("div",{className:"flex-grow rounded-lg border p-4",children:e})}function Do({label:e,path:t}){const n=Tt();return m.jsx("div",{className:"flex h-16 items-center text-base text-core-gray-900",children:m.jsx(lt,{label:e,variant:"link-gray",before:m.jsx(en,{icon:"caret-left",size:"md"}),onClick:()=>n(t)})})}function UA(){const{t:e}=et(),{loyaltyTransactions:t}=wc(),{contact:n}=gr();return m.jsx("div",{className:"h-full md:container",children:m.jsxs(Pt,{children:[m.jsx(kt,{children:m.jsx(Do,{label:e("back"),path:"../"})}),m.jsx(It,{children:m.jsxs("div",{className:"md:max-h-[528px]",children:[m.jsx("p",{className:"text-sm font-medium",children:e("allActivities")}),m.jsx("p",{className:"mb-4 text-sm text-core-gray-500",children:e("checkOutAllActivitiesOfName",{name:n.current_display_values.firstname})}),m.jsx("div",{className:"overflow-auto",children:t==null?void 0:t.map(r=>m.jsx(h0,{loyaltyTransaction:r},r.uuid))})]})})]})})}function qA(){const{t:e}=et(),{subscriptions:t,mutate:n}=m0(),[r,i]=k.useState({}),[s,o]=k.useState(!1);k.useEffect(()=>{if(t&&!Object.keys(r).length){const f=t.reduce((p,l)=>({...p,[l.subscription_type.name]:l.is_subscribed}),{});i(f)}},[]);const c=f=>{Object.hasOwn(r,f)?i({...r,[f]:!r[f]}):i({...r,[f]:!0})},u=async()=>{o(!0),await Ol.update({values:r}),await n(),Ue.success(e("subscriptionsUpdated")),o(!1)},d=()=>t&&t.some(f=>r[f.subscription_type.name]!==f.is_subscribed);return m.jsx("div",{className:"h-full md:container",children:m.jsxs(Pt,{children:[m.jsx(kt,{children:m.jsx(Do,{label:e("back"),path:"../"})}),m.jsx(It,{children:m.jsx("div",{className:"md:max-h-[528px]",children:m.jsxs("div",{children:[m.jsx("p",{className:"text-sm font-medium",children:e("subscriptions")}),m.jsx("p",{className:"mb-4 text-sm text-core-gray-500",children:e("manageEmailPreferences")}),t==null?void 0:t.filter(f=>f.subscription_type.strategy!==Qr.FUNCTIONAL).map(f=>m.jsx(p0,{subscription:f,onChange:c,editable:!0},f.subscription_type.uuid))]})})}),m.jsx(Kt,{children:m.jsx(lt,{label:e("saveChanges"),className:"w-full",onClick:u,disabled:!d()||s})})]})})}function VA({identifier:e,onClear:t}){const{t:n}=et();return m.jsxs("div",{className:"flex items-center justify-between rounded-lg border text-xs",children:[m.jsxs("div",{className:"flex-col pl-4",children:[m.jsx("p",{className:"font-semibold",children:e.value}),m.jsx("p",{className:"text-core-gray-500",children:n("contactIdentifier")})]}),m.jsx("div",{className:"h-full border-l p-4 hover:cursor-pointer hover:bg-core-gray-50",onClick:()=>t&&t(e.value),children:m.jsx(en,{className:"h-full",icon:"close"})})]})}function g0(){const{data:e,error:t,isLoading:n,isValidating:r,mutate:i}=Cr(mt("contact-identifiers"));return{identifiers:e==null?void 0:e.data.data,data:e,error:t,isLoading:n,isValidating:r,mutate:i}}function $A(){const{t:e}=et(),t=Tt(),{identifiers:n,isLoading:r,mutate:i}=g0(),[s,o]=k.useState(""),[c,u]=k.useState(!1),d=p=>{o(p),u(!0)},f=async()=>{await Hx.clear({value:s}),await i(),u(!1)};return m.jsxs("div",{className:"h-full md:container",children:[m.jsxs(Pt,{children:[m.jsx(kt,{children:m.jsx(Do,{label:e("back"),path:"../"})}),m.jsx(It,{children:m.jsx("div",{className:"md:max-h-[528px]",children:m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsxs("div",{children:[m.jsx("p",{className:"text-sm font-medium",children:e("contactIdentifiers")}),m.jsx("p",{className:"mb-4 text-sm text-core-gray-500",children:e("contactIdentifierDescription")})]}),r?m.jsx(vc,{rows:10}):n==null?void 0:n.map(p=>m.jsx(VA,{identifier:p,onClear:d},p.value))]})})}),m.jsx(Kt,{children:m.jsx(lt,{label:e("addIdentifier"),className:"w-full",variant:"secondary",onClick:()=>t("create")})})]}),m.jsx(Ai,{title:e("confirmClearContactIdentifier"),isOpen:c,primaryAction:{label:e("confirm"),action:f},secondaryAction:{label:e("cancel"),action:()=>u(!1)},onClose:()=>u(!1),children:m.jsx("p",{children:e("clearContactIdentifier",{value:s})})})]})}function GA(){const{t:e}=et(),{contact:t}=gr(),{mutate:n}=g0(),r=Tt(),[i,s]=k.useState(""),[o,c]=k.useState(!1),[u,d]=k.useState(!1),f=async()=>{if(!(!i||!t||!t.email)){c(!0);try{await er.linkIdentifier(i,t.email),await n(),r("/portal/profile/contact-identifiers")}finally{s(""),c(!1)}}};return k.useEffect(()=>{i&&!o&&!u&&f().then()},[i,o,u,f]),m.jsx("div",{className:"h-full md:container",children:m.jsxs(Pt,{id:fr,children:[m.jsx(kt,{children:m.jsx(Do,{label:e("back"),path:"../"})}),m.jsx(It,{children:m.jsx("form",{onSubmit:p=>{p.preventDefault(),f().then()},children:m.jsx(fo,{dataSetter:s,setDefer:d,label:e("contactIdentifier")})})}),m.jsx(Kt,{children:m.jsx(lt,{label:e("addIdentifier"),className:"w-full",onClick:f,disabled:o})})]})})}function HA(){const{t:e}=et(),{contact:t,isLoading:n,mutate:r}=gr(),[i,s]=k.useState(),[o,c]=k.useState();k.useEffect(()=>{i||(async()=>{const{data:p}=await $p.get();s(p.data.elements)})()},[i]);const u=p=>{c({...o,[p.target.name]:p.target.value})},d=(p,l)=>{c({...o,[p]:l})},f=async()=>{o&&(await $p.update(o),await r(),Ue.success(e("contactAttributesUpdated")),c(void 0))};return m.jsx("div",{className:"h-full md:container",children:m.jsxs(Pt,{children:[m.jsx(kt,{children:m.jsx(Do,{label:e("back"),path:"../"})}),m.jsx(It,{children:m.jsxs("div",{className:"md:max-h-[528px]",children:[!n&&m.jsxs("div",{className:"mb-4 flex flex-row items-center gap-4 border-b border-b-core-gray-200 px-1 pb-4",children:[m.jsx(Pl,{src:t.current_display_values.avatar,size:"2xl"}),m.jsxs("div",{children:[m.jsx("div",{className:"flex flex-row items-center gap-2 ",children:m.jsxs("h1",{className:"text-lg text-core-gray-900",children:[t.current_display_values.firstname," ",t.current_display_values.lastname]})}),m.jsx("p",{className:"text-sm text-core-gray-500",children:t.current_display_values.email})]})]}),!i||n?m.jsx(vc,{rows:10}):i.map(p=>{if(!(p.type==="media_upload"||p.type==="email"))return p.type==="select"?m.jsx(o2,{name:p.name,label:p.label,value:o&&o[p.name]?o[p.name]:t.current_display_values[p.name],onChange:l=>d(p.name,l),disabled:p.disabled,children:p.options.map(l=>m.jsx(Ul,{label:l.label,value:l.value},l.value))},p.id):p.type==="multi_select"?m.jsx(N_,{name:p.name,value:o&&o[p.name]?o[p.name]:p.defaultValue,label:p.label,onChange:d,disabled:p.disabled,options:p.options},p.id):p.type==="birth_date"||p.type==="date_time"?m.jsx(Am,{id:p.id,name:p.name,label:p.label,type:p.type==="date_time"?"date_time":"date",value:o&&o[p.name]?o[p.name]:t.current_display_values[p.name],disabled:p.disabled,onChange:u},p.id):m.jsx(Ci,{disabled:p.disabled,label:p.label,name:p.name,value:o&&o[p.name]!=="undefined"?o[p.name]:t.current_display_values[p.name],onChange:u},p.id)})]})}),m.jsx(Kt,{children:m.jsx(lt,{label:e("saveChanges"),className:"w-full",onClick:f,disabled:!o})})]})})}function YA(){return m.jsxs(ur,{children:[m.jsx(Oe,{path:"/profile",element:m.jsx(sr,{element:m.jsx(FA,{})})}),m.jsx(Oe,{path:"/profile/activity",element:m.jsx(sr,{element:m.jsx(UA,{})})}),m.jsx(Oe,{path:"/profile/subscriptions",element:m.jsx(sr,{element:m.jsx(qA,{})})}),m.jsx(Oe,{path:"/profile/contact-identifiers",element:m.jsx(sr,{element:m.jsx($A,{})})}),m.jsx(Oe,{path:"/profile/contact-identifiers/create",element:m.jsx(sr,{element:m.jsx(GA,{})})}),m.jsx(Oe,{path:"/profile/contact-attributes",element:m.jsx(sr,{element:m.jsx(HA,{})})})]})}function yd({voucher:e,selected:t,setSelected:n}){const{t:r}=et();return m.jsxs("div",{className:`flex cursor-pointer items-center justify-between gap-4 rounded-lg ${e.status===Qi.REDEEMED?"border border-core-primary-100 bg-core-primary-50":"border bg-white"} p-2 text-xs`,onClick:()=>(t==null?void 0:t.code)===e.code?n(void 0):n(e),children:[m.jsxs("div",{className:"mr-4 flex items-center gap-4 overflow-hidden",children:[m.jsx("img",{src:e.promotion.image?e.promotion.image.value:"https://static.piggy.nl/images/fallback_image.png",alt:"voucher_image",className:"h-[32px] w-[32px] rounded object-cover object-center"}),m.jsxs("div",{className:"overflow-hidden overflow-ellipsis ",children:[m.jsx("p",{className:"font-semibold",children:e.name}),e.status===Qi.REDEEMED?m.jsx("p",{className:"text-core-gray-500",children:r("redeemed")}):m.jsx("p",{className:"text-core-primary-500",children:e.expiration_date?`Valid until ${new Date(e.expiration_date).toLocaleDateString()}`:r("nonExpiring")})]})]}),m.jsx("p",{className:`text-core-${e.status===Qi.REDEEMED?"gray":"primary"}-500`,children:e.code})]})}function WA(){const{data:e,error:t,isLoading:n,isValidating:r,mutate:i}=Cr(mt("vouchers"));return{vouchers:e==null?void 0:e.data.data,data:e,error:t,isLoading:n,isValidating:r,mutate:i}}function KA(){const{t:e}=et(),{vouchers:t,isLoading:n,mutate:r}=WA(),{onRedeemVoucher:i}=An(),{mutate:s}=wc(),{session:{events:o},mutate:c}=yt(),[u,d]=k.useState(),[f,p]=k.useState(!1);k.useEffect(()=>{u&&p(!0)},[u]);const l=async()=>{if(u){const a=await Nl.redeemByCode(u.code);r(),s();const h=await c(),y=h==null?void 0:h.data.data.events;ao(y),Ue.success(e("voucherSuccessfullyRedeemed")),i&&i(a.data.data),p(!1),d(void 0)}},v=()=>o.filter(a=>a.type===Hr.VOUCHER_REDEEMED);return m.jsxs("div",{className:"h-full md:container",children:[m.jsxs(Pt,{children:[m.jsx(kt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:e("vouchers")})})}),m.jsx(It,{children:n?m.jsx(vc,{rows:1}):m.jsx("div",{className:"flex flex-col gap-1 md:max-h-[528px]",children:t&&t.length?t.map(a=>m.jsx(yd,{voucher:a,selected:u,setSelected:d},a.code)):m.jsx("p",{className:"text-center text-sm text-core-gray-500",children:e("vouchersEmptyState")})})}),!!v().length&&m.jsx(Kt,{children:m.jsx("div",{children:m.jsx(l0,{children:v().map(a=>m.jsx("div",{className:"flex items-center gap-2 rounded-lg border border-core-primary-100 bg-core-primary-50 p-2",children:m.jsx("div",{className:"flex h-full flex-col justify-between text-xs",children:m.jsxs("div",{className:"overflow-hidden",children:[m.jsx("p",{className:"font-semibold",children:a.data.name}),m.jsxs("p",{className:"overflow-ellipsis text-core-gray-500",children:[a.data.code," - ",e("applied")]})]})})},a.data.uuid))},v().length)})})]}),m.jsx(Ai,{title:e("confirmVoucherRedemption"),isOpen:f,primaryAction:{label:e("confirm"),action:l},secondaryAction:{label:e("cancel"),action:()=>p(!1)},onClose:()=>p(!1),children:m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsx("p",{children:e("redeemTitle",{title:u==null?void 0:u.name})}),u&&m.jsx(yd,{voucher:u,setSelected:d})]})})]})}function vd({reward:e,selected:t,setSelected:n,disabled:r,readOnly:i}){const{t:s}=et(),{session:o}=yt(),{contact:c,isLoading:u}=gr(),d=u?0:c.credit_balance.balance;return m.jsxs("div",{className:`max-h-[48px] rounded-lg border ${r?"pointer-events-none opacity-40":!i&&"cursor-pointer"}`,children:[m.jsxs("div",{className:`flex items-center justify-between rounded-lg text-xs ${r?"px-2 pt-2":"p-2"}`,onClick:i?void 0:()=>(t==null?void 0:t.uuid)===e.uuid?n(void 0):n(e),children:[m.jsxs("div",{className:"mr-4 flex items-center gap-4 overflow-hidden",children:[m.jsx("img",{src:e.media&&e.media.value?e.media.value:"https://static.piggy.nl/images/fallback_image.png",alt:"voucher_image",className:"h-[32px] w-[32px] rounded object-cover object-center"}),m.jsx("p",{className:"truncate",children:e.title??e.description})]}),m.jsxs("p",{className:"whitespace-nowrap text-core-primary-500",children:[e.required_credits," ",o!=null&&o.loyalty_program.custom_credit_name?o==null?void 0:o.loyalty_program.custom_credit_name:s("points").toLowerCase()]})]}),e.required_credits-d>0&&m.jsx(M_,{value:d,max:e.required_credits})]})}function zA(){const{data:e,error:t,isLoading:n,isValidating:r,mutate:i}=Cr(mt("rewards"));return{rewards:e==null?void 0:e.data.data,data:e,error:t,isLoading:n,isValidating:r,mutate:i}}function QA(){const{t:e}=et(),{rewards:t,isLoading:n,mutate:r}=zA(),{mutate:i}=gr(),{mutate:s}=wc(),{onClaimReward:o}=An(),{session:{events:c,loyalty_program:u},mutate:d}=yt(),{contact:f,isLoading:p}=gr(),[l,v]=k.useState(),[a,h]=k.useState(!1);k.useEffect(()=>{l&&h(!0)},[l]);const y=async()=>{if(l){const b=await zx.claim(l.uuid),w=await d(),E=w==null?void 0:w.data.data.events;ao(E);const S=E.filter(T=>T.type===Hr.REWARD_RECEPTION&&T.data.reward.uuid===l.uuid),{data:{uuid:A}}=S.reduce((T,O)=>new Date(T.created_at)>new Date(O.created_at)?T:O);r(),i(),s(),Ue.success(e("rewardClaimed",{name:b.data.data.title})),o&&o(b.data.data,A),h(!1),v(void 0)}},g=()=>c.filter(b=>b.type===Hr.REWARD_RECEPTION).map(b=>t==null?void 0:t.find(w=>w.uuid===b.data.reward.uuid)).filter(b=>b);return m.jsxs("div",{className:"h-full md:container",children:[m.jsxs(Pt,{children:[m.jsx(kt,{children:m.jsxs("div",{className:"flex h-16 items-center justify-between",children:[m.jsx("h1",{children:e("rewards")}),m.jsxs("div",{className:"flex flex-col items-center",children:[m.jsx("p",{children:p?0:f.credit_balance.balance}),m.jsx("p",{className:"text-sm text-core-gray-500",children:u.custom_credit_name?u.custom_credit_name:e("points")})]})]})}),m.jsx(It,{children:n||p?m.jsx(vc,{rows:1}):m.jsxs("div",{className:"flex flex-col gap-1 md:max-h-[528px]",children:[!!t.filter(b=>b.required_credits<=f.credit_balance.balance).length&&m.jsx("p",{className:"text-sm font-light text-core-gray-500",children:e("redeemableRewards")}),t.filter(b=>b.required_credits<=f.credit_balance.balance).map(b=>m.jsx(vd,{reward:b,selected:l,setSelected:v},b.uuid)),!!t.filter(b=>b.required_credits>f.credit_balance.balance).length&&m.jsx("p",{className:"mt-2 text-sm font-light text-core-gray-500",children:e("saveABitMore")}),t.filter(b=>b.required_credits>f.credit_balance.balance).map(b=>m.jsx(vd,{reward:b,selected:l,setSelected:v,disabled:!0},b.uuid))]})}),!!g().length&&!n&&m.jsx(Kt,{children:m.jsx("div",{children:m.jsx(l0,{children:g().map((b,w)=>m.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-core-primary-100 bg-core-primary-50 p-2 text-xs",children:[m.jsxs("div",{className:"mr-4 flex items-center gap-4 overflow-hidden",children:[m.jsx("img",{src:b.media&&b.media.value?b.media.value:"https://static.piggy.nl/images/fallback_image.png",alt:"voucher_image",className:"h-8 w-8 rounded object-cover object-center"}),m.jsx("p",{className:"truncate",children:b.title??b.description})]}),m.jsxs("p",{className:"text-core-primary-500",children:[b.required_credits," ",u.custom_credit_name?u.custom_credit_name:e("points")]})]},`${w}-${b.uuid}`))},g().length)})})]}),m.jsx(Ai,{title:e("confirmRewardRedemption"),isOpen:a,primaryAction:{label:e("confirm"),action:y},secondaryAction:{label:e("cancel"),action:()=>h(!1)},onClose:()=>h(!1),children:m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsx("p",{children:e("redeemRewardForPoints",{title:l==null?void 0:l.title,credits:l==null?void 0:l.required_credits,customCreditName:u.custom_credit_name?u.custom_credit_name:e("points")})}),l&&m.jsx(vd,{reward:l,selected:l,setSelected:v,readOnly:!0})]})})]})}function JA({children:e}){return m.jsx("div",{className:"h-screen w-screen pb-[70px] md:px-4 md:pb-[86px] md:pt-4 lg:pb-4 lg:pt-[66px]",children:m.jsx("div",{className:"h-full max-h-full",children:e})})}function ZA(){const e=Tt(),{t}=et(),{pathname:n}=Yt(),[r,i]=k.useState(1),s=[{id:0,label:t("profile"),icon:"user",pathname:"profile"},{id:1,label:t("rewards"),icon:"edit",pathname:"rewards"},{id:2,label:t("vouchers"),icon:"mail",pathname:"vouchers"}];return k.useEffect(()=>{(n==="/portal"||n==="/portal/")&&e(s[r].pathname);const o=n.split("/")[n.split("/").length-1];if(o!==s[r].pathname){const c=s.find(u=>u.pathname===o);c&&i(c.id)}},[e]),m.jsxs("div",{className:"relative h-full w-full select-none overflow-auto",children:[m.jsx(PA,{children:s.map(o=>m.jsx(jA,{id:o.id,label:o.label,icon:o.icon,activeTab:r,setActiveTab:i,pathname:o.pathname},o.id))}),m.jsxs(JA,{children:[m.jsx(YA,{}),m.jsxs(ur,{children:[m.jsx(Oe,{path:"/rewards",element:m.jsx(sr,{element:m.jsx(QA,{})})}),m.jsx(Oe,{path:"/vouchers",element:m.jsx(sr,{element:m.jsx(KA,{})})})]})]})]})}function XA(){const{state:e}=Yt(),t=Tt(),{session:n}=yt();return k.useEffect(()=>{n&&!n.contact&&(n.input_data.primary_identification_method===oo.EMAIL&&n.input_data.enable_email_identification&&!e?t("email",{state:{redirectRoute:`${Dt.PORTAL}`}}):t("identifier"))},[]),n&&m.jsx(ZA,{})}function eT(){return m.jsx(on,{children:m.jsx(za,{state:{redirectRoute:`${Dt.PORTAL}`}})})}function as(){const{state:e}=Yt(),{t}=et(),n=Tt(),{onContactLink:r}=An(),{session:i,mutate:s}=yt(),{publish:o}=Ka(),[c,u]=k.useState(""),[d,f]=k.useState(!1),[p,l]=k.useState(!1),v=async h=>{if(h.preventDefault(),!(!c||d)&&i){f(!0);try{await co(i.uuid,c,void 0,r),await s(),Ue.success(t("contactSavedToSession")),e&&e.redirectRoute&&n(e.redirectRoute,{state:e})}catch(y){y.response.data.code===Ea.CONTACT_NOT_FOUND&&l(!0)}f(!1)}},a=async()=>{f(!0),await er.create(c),await co(i.uuid,c,void 0,r),await s(),Ue.success(t("contactForEmailCreated",{email:c})),e&&e.redirectRoute&&n(e.redirectRoute,{state:e}),f(!1)};return k.useEffect(()=>{o("openKeyboard",{inputId:"via-email-address-input",inputValue:""})},[]),m.jsxs(m.Fragment,{children:[m.jsx(on,{children:m.jsxs(Pt,{id:fr,children:[m.jsx(kt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:t("fillInXBelow",{x:t("emailAddress").toLowerCase()})})})}),m.jsx(It,{children:m.jsx("form",{onSubmit:v,children:m.jsx(Ci,{id:"via-email-address-input",label:t("emailAddress"),autoFocus:!0,onChange:h=>u(h.target.value),beforeIcon:"mail"})})}),m.jsx(Kt,{children:m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsx(lt,{label:t("continue"),className:"w-full",onClick:v,disabled:!c||d}),m.jsx(lt,{label:t("useIdentifier"),variant:"secondary",onClick:()=>n("../",{state:e})})]})})]})}),m.jsx(Ai,{title:`${t("new")} ${t("emailAddress").toLowerCase()}`,isOpen:p,onClose:()=>l(!1),primaryAction:{label:t("confirm"),action:a},secondaryAction:{label:t("cancel"),action:()=>l(!1)},children:m.jsx("p",{children:t("continueWithEmail",{email:c})})})]})}function tT(){const[e,t]=k.useState(""),{session:n,mutate:r}=yt(),i=Tt(),{t:s}=et(),o=async()=>{n&&(await er.create(e),await r(),Ue.success(s("contactSavedToSession")),i("../"))};return m.jsx(on,{children:m.jsxs(Pt,{id:fr,children:[m.jsx(kt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:s("fillInXBelow",{x:s("emailAddress").toLowerCase()})})})}),m.jsx(It,{children:m.jsx(Ci,{label:s("emailAddress"),autoFocus:!0,onChange:c=>t(c.target.value),beforeIcon:"mail"})}),m.jsx(Kt,{children:m.jsx(lt,{label:s("continue"),className:"w-full",onClick:o,disabled:!e})})]})})}function ir(){const{state:e}=Yt(),{t}=et(),{session:n,mutate:r}=yt(),i=Tt(),s=An(),[o,c]=k.useState(!1),[u,d]=k.useState([]),[f,p]=k.useState({}),[l,v]=k.useState(!1);k.useEffect(()=>{u.length||Ol.get().then(y=>{const g=y.data.data.filter(w=>w.strategy!==Qr.FUNCTIONAL);d(g);const b=g.reduce((w,E)=>({...w,[E.name]:E.strategy===Qr.OPT_OUT}),{});p(b)})},[]);const a=y=>{Object.hasOwn(f,y)?p({...f,[y]:!f[y]}):p({...f,[y]:!0})},h=async()=>{c(!0),await er.create(e.email),await Ol.update({values:f}),e.contactIdentifier&&await er.linkIdentifier(e.contactIdentifier,e.email),await co(n.uuid,e.email,e.contactIdentifier,s.onContactLink),await r(),Ue.success(t("contactForEmailCreated",{email:e.email})),Ue.success(t("contactIdentifierLinkedToEmail",{value:e.contactIdentifier,email:e.email})),e&&e.redirectRoute&&i(e.redirectRoute,{state:e}),c(!1)};return!e||!e.email&&!e.contactIdentifier?m.jsx(Hs,{to:"../../"}):m.jsx(on,{children:m.jsxs(Pt,{children:[m.jsx(kt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:t("termsAndConditions")})})}),m.jsx(It,{children:m.jsxs("div",{className:"flex flex-col gap-4 text-sm",children:[m.jsxs("div",{children:[m.jsx("p",{children:t("marketingSubscriptions")}),m.jsx("p",{className:"text-core-gray-500",children:t("chooseCommunicationPreferences")})]}),u.map(y=>m.jsxs("div",{className:"flex gap-2",children:[m.jsx(bc,{defaultChecked:y.strategy===Qr.OPT_OUT,onChange:()=>a(y.name)}),m.jsx("p",{children:y.name})]},y.id)),m.jsxs("div",{className:"flex gap-2",children:[m.jsx(Wa,{required:!0,onChange:y=>v(y)}),m.jsx("div",{className:"[&_a]:text-core-primary-500",dangerouslySetInnerHTML:{__html:t("iAgreeWithTheTerms",{terms:"https://www.piggy.nl/algemene-voorwaarden",privacy:"https://www.piggy.nl/privacy-policy"})}})]})]})}),m.jsx(Kt,{children:m.jsx(lt,{label:t("create"),className:"w-full",onClick:h,disabled:!l||o})})]})})}function Po(){const{t:e}=et(),{state:t}=Yt(),{session:n,mutate:r}=yt(),i=Tt(),{publish:s}=Ka(),o=An(),[c,u]=k.useState(!1),[d,f]=k.useState(""),[p,l]=k.useState(!1);if(!t||!t.contactIdentifier)return m.jsx(Hs,{to:"../"});const v=async h=>{h.preventDefault(),u(!0);try{await er.linkIdentifier(t.contactIdentifier,d),await co(n.uuid,d,t.contactIdentifier,o.onContactLink),await r(),Ue.success(e("contactIdentifierLinkedToEmail",{value:t.contactIdentifier,email:d})),t&&t.redirectRoute&&i(t.redirectRoute,{state:t})}catch(y){y.response.data.code===Ea.CONTACT_NOT_FOUND&&l(!0)}u(!1)},a=async()=>{u(!0),await er.create(d),await er.linkIdentifier(t.contactIdentifier,d),await co(n.uuid,d,t.contactIdentifier,o.onContactLink),await r(),Ue.success(e("contactForEmailCreated",{email:d})),Ue.success(e("contactIdentifierLinkedToEmail",{value:t.contactIdentifier,email:d})),t&&t.redirectRoute&&i(t.redirectRoute,{state:t}),u(!1)};return k.useEffect(()=>{s("openKeyboard",{inputId:"new-contact-identifier-input",inputValue:""})},[]),m.jsxs(on,{children:[m.jsxs(Pt,{id:fr,children:[m.jsx(kt,{children:m.jsx("div",{className:"flex h-16 items-center",children:e("linkContact")})}),m.jsx(It,{children:m.jsxs("div",{className:"flex flex-col gap-3",children:[m.jsx(E_,{body:e("noEmailAddressLinkedToIdentifier")}),m.jsx("form",{onSubmit:v,children:m.jsx(Ci,{id:"new-contact-identifier-input",label:e("emailAddress"),autoFocus:!0,onChange:h=>f(h.target.value),beforeIcon:"mail"})})]})}),m.jsx(Kt,{children:m.jsx(lt,{label:e("continue"),className:"w-full",onClick:v,disabled:!d||c})})]}),m.jsx(Ai,{title:`${e("new")} ${e("emailAddress").toLowerCase()}`,isOpen:p,onClose:()=>l(!1),primaryAction:{label:e("confirm"),action:a},secondaryAction:{label:e("cancel"),action:()=>l(!1)},children:m.jsx("p",{children:e("continueWithEmail",{email:d})})})]})}function nT(){const e=Tt(),{t}=et(),{session:n,mutate:r}=yt(),{onContactLink:i}=An(),[s,o]=k.useState(""),[c,u]=k.useState(!1),[d,f]=k.useState(!1),[p,l]=k.useState(!1),[v,a]=k.useState(),h=async g=>{if(i){const{data:{data:b}}=await er.get(g);b&&i(b)}},y=k.useCallback(async()=>{if(n){f(!0);const{data:g}=await so.checkCode(s);if(a(g),g.voucher){g.voucher.contact||n.contact?e(`${Dt.VOUCHER}/redeem`,{state:{voucher:g.voucher}}):l(!0);return}if(g.giftcard)return e(`${Dt.GIFTCARD}`,{state:{giftcard:g.giftcard}});if(g.identifier){const{data:b}=await so.setContact(n.uuid,{contact_identifier_value:s});return await h(b.data.contact.uuid),await r(),e(Dt.PORTAL)}Ue.error(t("unknownCode",{code:s}))}},[s,e,n]);return k.useEffect(()=>{s&&!d&&!c&&y().then()},[s]),m.jsxs(on,{children:[m.jsxs(Pt,{id:fr,children:[m.jsx(kt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:t("scanOrEnterX",{x:"code"})})})}),m.jsx(It,{children:m.jsx("form",{onSubmit:g=>{g.preventDefault(),s&&y()},children:m.jsx(fo,{dataSetter:o,setDefer:u,label:t("code")})})}),m.jsx(Kt,{children:m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsx(lt,{label:t("continue"),onClick:y,disabled:!s}),n.input_data.enable_email_identification&&m.jsx(lt,{label:t("useEmail"),variant:"secondary",onClick:()=>e("../email",{state:{redirectRoute:`${Dt.PORTAL}`}})})]})})]}),m.jsx(Ai,{title:t("noContactLinkedToVoucherTitle"),isOpen:p,onClose:()=>l(!1),primaryAction:{label:t("linkToContact"),action:()=>e(`${Dt.VOUCHER}/link`,{state:{voucher:v==null?void 0:v.voucher}})},secondaryAction:{label:t("cancel"),action:()=>l(!1)},children:m.jsx("p",{children:t("linkVoucherWithCodeToContact",{code:s})})})]})}function rT(){return m.jsxs(ur,{children:[m.jsx(Oe,{path:"/*",element:m.jsx(nT,{})}),m.jsx(Oe,{path:"/email",element:m.jsx(as,{})}),m.jsx(Oe,{path:"/email/new-contact",element:m.jsx(ir,{})})]})}function iT(){const e=Tt(),{state:t}=Yt(),{t:n}=et(),{session:r}=yt(),[i,s]=k.useState(""),[o,c]=k.useState(!1),[u,d]=k.useState(!1),[f,p]=k.useState(r.type),l=k.useCallback(async()=>{c(!0);try{const{data:{data:a}}=await kl.get(i);e(`${f===ut.REDEEM_GIFTCARD?"redeem":"top-up"}/${a.hash}`)}catch{c(!1),s("")}},[i,e,r]);k.useEffect(()=>{i&&!o&&!u&&l().then()},[i]);const v=a=>{t&&t.giftcard?e(`${a===ut.REDEEM_GIFTCARD?"redeem":"top-up"}/${t.giftcard.hash}`):p(a)};return(r==null?void 0:r.type)===ut.REDEEM_GIFTCARD&&!(r!=null&&r.input_data.amount_in_cents)?m.jsx(m.Fragment,{children:n("xIsRequired",{x:"Amount in cents"})}):m.jsx(on,{children:f===ut.GIFTCARD||f===ut.GENERIC?m.jsxs(Pt,{id:fr,children:[m.jsx(kt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:n("Choose type")})})}),m.jsx(It,{children:m.jsxs("div",{className:"flex gap-2",children:[m.jsx(lt,{className:"grow",label:"Redeem",onClick:()=>v(ut.REDEEM_GIFTCARD)}),m.jsx(lt,{className:"grow",label:"Top up",onClick:()=>v(ut.TOP_UP_GIFTCARD)})]})})]}):m.jsxs(Pt,{id:fr,children:[m.jsx(kt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:n("scanGiftcard")})})}),m.jsx(It,{children:m.jsx(fo,{dataSetter:s,setDefer:d,label:n("hash")})}),m.jsx(Kt,{children:m.jsx(lt,{label:n("submit"),className:"w-full",onClick:l,disabled:!i||o})})]})})}function y0(e){const{data:t,error:n,isLoading:r,isValidating:i,mutate:s}=Cr(mt("giftcards")+`/${e}`);return{giftcard:t==null?void 0:t.data.data,data:t,error:n,isLoading:r,isValidating:i,mutate:s}}function sT(){const{t:e}=et(),{hash:t}=gh(),{giftcard:n,isLoading:r,mutate:i}=y0(t),{session:s,mutate:o}=yt(),{onUseGiftcard:c}=An(),u=Tt(),d=(s==null?void 0:s.input_data.amount_in_cents)??0,[f]=k.useState(s.results.remaining_amount?+s.results.remaining_amount:+d),p=(s==null?void 0:s.input_data.allow_multiple_giftcards)??!0;if(r)return m.jsx("div",{className:"flex h-screen w-screen items-center justify-center text-core-primary-500",children:m.jsx(Xi,{className:"h-[48px] w-[48px]"})});if(!n)return m.jsx("div",{className:"flex h-screen w-screen items-center justify-center text-red-500",children:e("giftcardNotFound")});const l=async()=>{const g=await kl.transaction(n.uuid,-a());await i();const b=await o(),w=b==null?void 0:b.data.data.events;ao(w),Ue.success(`${e("transactionSuccessful")}!`),c&&c(g.data.data)},v=()=>s.results.remaining_amount??d,a=()=>Math.min(v(),n.amount_in_cents),h=()=>{let g=0;return s.events.filter(w=>w.type===Hr.GIFTCARD_TRANSACTION).forEach(w=>{w.data.giftcard.uuid===n.uuid&&(g+=w.data.amount_in_cents)}),g},y=()=>{if(a())return{label:e("confirmAndPay",{amount:Ji(a(),s==null?void 0:s.currency)}),onClick:l};if(p&&v())return{label:e("useAnotherGiftcard"),onClick:()=>u("../"),variant:"secondary"}};return m.jsx(on,{children:m.jsxs(Pt,{children:[m.jsx(kt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:`${e("giftcard")} ${n.hash}`})})}),m.jsx(It,{children:m.jsxs("div",{className:"flex h-full flex-col gap-4",children:[m.jsx("div",{className:"rounded-lg bg-core-primary-50 p-4",children:m.jsxs("div",{className:"flex justify-between",children:[m.jsx("p",{className:"font-light text-gray-500",children:e("balance")}),m.jsx(Jr,{value:n.amount_in_cents,start:n.amount_in_cents-h(),currency:s.currency,asCurrency:!0})]})}),m.jsx("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-6",children:m.jsxs("div",{className:"flex flex-col items-center gap-2 p-4",children:[m.jsx("p",{className:"font-light text-gray-500",children:e("amountToPay")}),m.jsx("div",{className:"text-5xl font-bold",children:m.jsx(Jr,{value:f+h(),start:f,currency:s.currency,asCurrency:!0})})]})})]})}),y()&&m.jsx(Kt,{children:m.jsx(lt,{label:"",className:"w-full",...y()})})]})})}function oT(){const{t:e}=et(),{hash:t}=gh(),{giftcard:n,isLoading:r,mutate:i}=y0(t),{mutate:s}=yt(),{onUseGiftcard:o}=An();if(r)return m.jsx("div",{className:"flex h-screen w-screen items-center justify-center text-core-primary-500",children:m.jsx(Xi,{className:"h-[48px] w-[48px]"})});if(!n)return m.jsx("div",{className:"flex h-screen w-screen items-center justify-center text-red-500",children:e("giftcardNotFound")});const c=async u=>{const d=await kl.transaction(n.uuid,u);await i();const f=await s(),p=f==null?void 0:f.data.data.events;ao(p),Ue.success(`${e("transactionSuccessful")}! ${e("totalUpgradedAmount")}: ${Ji(d.data.data.amount_in_cents)}`),o&&o(d.data.data)};return m.jsx(on,{children:m.jsx(Sm,{title:`${e("giftcard")} ${n.hash}`,balance:n.amount_in_cents,transaction:c})})}function aT(){return m.jsxs(ur,{children:[m.jsx(Oe,{path:"/",element:m.jsx(iT,{})}),m.jsx(Oe,{path:"/redeem/:hash",element:m.jsx(sT,{})}),m.jsx(Oe,{path:"/top-up/:hash",element:m.jsx(oT,{})})]})}function cT(){return m.jsxs(ur,{children:[m.jsx(Oe,{path:"/*",element:m.jsx(XA,{})}),m.jsx(Oe,{path:"/email",element:m.jsx(as,{})}),m.jsx(Oe,{path:"/email/new-contact",element:m.jsx(ir,{})}),m.jsx(Oe,{path:"/register",element:m.jsx(tT,{})}),m.jsx(Oe,{path:"/identifier",element:m.jsx(eT,{})}),m.jsx(Oe,{path:"/identifier/link-identifier",element:m.jsx(Po,{})}),m.jsx(Oe,{path:"/identifier/link-identifier/new-contact",element:m.jsx(ir,{})})]})}function uT(){const{state:e}=Yt(),t=Tt(),{session:n}=yt();return k.useEffect(()=>{n.input_data.primary_identification_method===oo.EMAIL&&n.input_data.enable_email_identification&&!e&&t("email",{state:{redirectRoute:`${Dt.POINTS_TRANSACTION}/transaction`}})},[]),m.jsx(on,{children:m.jsx(za,{state:{redirectRoute:`${Dt.POINTS_TRANSACTION}/transaction`}})})}function lT(){const{t:e}=et(),{session:{input_data:t}}=yt(),{contact:n,isLoading:r,mutate:i}=gr(),[s,o]=k.useState(),[c,u]=k.useState(!1),[d,f]=k.useState(""),p=async()=>{if(u(!0),t.amount_in_cents)try{const{data:{data:l}}=await Wx.create({unit_value:t.amount_in_cents/100});i(),o(l)}catch(l){f(l.response.data.message)}else f(e("xIsRequired",{x:"Amount in cents"})+".");u(!1)};return k.useEffect(()=>{!c&&!s&&!d&&(async()=>await p())()},[]),r?m.jsx(m.Fragment,{}):n?m.jsx(on,{children:m.jsxs(Pt,{children:[m.jsx(kt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:n.current_display_values.firstname||n.current_display_values.lastname?`${n.current_display_values.firstname} ${n.current_display_values.lastname}`:n.current_display_values.email})})}),m.jsx(It,{children:m.jsxs("div",{className:"flex h-full flex-col justify-between gap-4",children:[m.jsx("div",{className:"flex h-full flex-col items-center gap-2 p-6",children:d?m.jsx("p",{className:"text-core-red-500",children:d}):m.jsx("div",{className:"flex h-full items-center justify-center gap-1 text-4xl font-bold",children:s?m.jsxs(m.Fragment,{children:["+",m.jsx(Jr,{value:s.credits,start:0})]}):m.jsx("div",{className:"text-core-primary-500",children:m.jsx(Xi,{className:"h-[32px] w-[32px]"})})})}),m.jsx("div",{className:"rounded-lg bg-core-primary-50 p-4",children:m.jsxs("div",{className:"flex justify-between",children:[m.jsx("p",{className:"font-light text-gray-500",children:`${e("new")} ${e("balance").toLowerCase()}`}),m.jsx(Jr,{value:n.credit_balance.balance??0,start:n.credit_balance.balance-(s?s.credits:0)})]})})]})})]})}):m.jsx(Hs,{to:"../"})}function dT(){return m.jsxs(ur,{children:[m.jsx(Oe,{path:"/*",element:m.jsx(uT,{})}),m.jsx(Oe,{path:"/email",element:m.jsx(as,{})}),m.jsx(Oe,{path:"/email/new-contact",element:m.jsx(ir,{})}),m.jsx(Oe,{path:"/link-identifier",element:m.jsx(Po,{})}),m.jsx(Oe,{path:"/link-identifier/new-contact",element:m.jsx(ir,{})}),m.jsx(Oe,{path:"/transaction",element:m.jsx(sr,{element:m.jsx(lT,{})})})]})}function v0(){const{state:e}=Yt(),t=Tt(),{session:n}=yt(),r={redirectRoute:n.type===ut.TOP_UP_PREPAID?`${Dt.TOP_UP_PREPAID}/top-up`:`${Dt.PAY_PREPAID}/pay`};return k.useEffect(()=>{n.input_data.primary_identification_method===oo.EMAIL&&n.input_data.enable_email_identification&&!e&&t("email",{state:r})},[]),m.jsx(on,{children:m.jsx(za,{state:r})})}function b0(){const{data:e,error:t,isLoading:n,isValidating:r,mutate:i}=Cr(mt("prepaid"));return{balance:e==null?void 0:e.data.data,data:e,error:t,isLoading:n,isValidating:r,mutate:i}}function fT(){const{state:e}=Yt(),{t}=et(),{balance:n,mutate:r}=b0(),{mutate:i}=yt(),{contact:s}=gr(),o=async c=>{c&&(await Kp.transaction({amount_in_cents:c,contact_identifier_value:e.contactIdentifier??void 0}),await r(),await i(),Ue.success(t("prepaidTransactionCreated")))};return!n||!s?m.jsx(m.Fragment,{}):m.jsx(on,{children:m.jsx(Sm,{title:`${s.current_display_values.firstname} ${s.current_display_values.lastname}`,balance:(n==null?void 0:n.balance_in_cents)??0,transaction:o})})}function hT(){const{state:e}=Yt(),{t}=et(),{balance:n,mutate:r}=b0(),{contact:i}=gr(),{session:{input_data:s,currency:o,events:c},mutate:u}=yt(),d=s.amount_in_cents?+s.amount_in_cents:0;if(!n||!i)return m.jsx(m.Fragment,{});const f=async()=>{d&&(await Kp.transaction({amount_in_cents:-l(),contact_identifier_value:e.contactIdentifier??void 0}),await r(),await u(),Ue.success(t("prepaidTransactionCreated")))},p=()=>{let v=0;return c.filter(h=>h.type===Hr.PREPAID_TRANSACTION).forEach(h=>{v+=h.data.amount_in_cents}),v},l=()=>Math.min(d+p(),n==null?void 0:n.balance_in_cents);return m.jsx(on,{children:m.jsxs(Pt,{children:[m.jsx(kt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:`${i.current_display_values.firstname} ${i.current_display_values.lastname}`})})}),m.jsx(It,{children:m.jsxs("div",{className:"flex h-full flex-col gap-4",children:[m.jsx("div",{className:"rounded-lg bg-core-primary-50 p-4",children:m.jsxs("div",{className:"flex justify-between",children:[m.jsx("p",{className:"font-light text-gray-500",children:t("prepaidBalance")}),m.jsx(Jr,{value:n.balance_in_cents,start:n.balance_in_cents+p(),currency:o,asCurrency:!0})]})}),m.jsx("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-6",children:m.jsxs("div",{className:"flex flex-col items-center gap-2 p-4",children:[m.jsx("p",{className:"text-sm font-light text-gray-500",children:t("amountToPay")}),m.jsx("div",{className:"text-5xl font-bold",children:m.jsx(Jr,{value:l(),start:d,currency:o,asCurrency:!0})})]})})]})}),m.jsx(Kt,{children:m.jsx(lt,{label:t("confirmAndPay",{amount:Ji(l(),o)}),className:"w-full",onClick:f,disabled:!d||!l()})})]})})}function pT(){return m.jsxs(ur,{children:[m.jsx(Oe,{path:"/",element:m.jsx(v0,{})}),m.jsx(Oe,{path:"/email",element:m.jsx(as,{})}),m.jsx(Oe,{path:"/email/new-contact",element:m.jsx(ir,{})}),m.jsx(Oe,{path:"/link-identifier",element:m.jsx(Po,{})}),m.jsx(Oe,{path:"/link-identifier/new-contact",element:m.jsx(ir,{})}),m.jsx(Oe,{path:"/pay",element:m.jsx(sr,{element:m.jsx(hT,{})})})]})}function mT(){return m.jsxs(ur,{children:[m.jsx(Oe,{path:"/",element:m.jsx(v0,{})}),m.jsx(Oe,{path:"/email",element:m.jsx(as,{})}),m.jsx(Oe,{path:"/email/new-contact",element:m.jsx(ir,{})}),m.jsx(Oe,{path:"/link-identifier",element:m.jsx(Po,{})}),m.jsx(Oe,{path:"/link-identifier/new-contact",element:m.jsx(ir,{})}),m.jsx(Oe,{path:"/top-up",element:m.jsx(sr,{element:m.jsx(fT,{})})})]})}function gT(){const{t:e}=et(),[t,n]=k.useState(""),[r,i]=k.useState(!1),[s,o]=k.useState(!1),[c,u]=k.useState(!1),[d,f]=k.useState(),{session:p}=yt(),l=Tt(),v=k.useCallback(async()=>{if(p){i(!0);try{const{data:{data:a}}=await Nl.get(t);f(a),a.contact||p.contact?l("redeem",{state:{voucher:a}}):u(!0)}catch{i(!1),n("")}}},[t,l,p]);return k.useEffect(()=>{t&&!r&&!s&&v().then()},[t]),m.jsxs(m.Fragment,{children:[m.jsx(on,{children:m.jsxs(Pt,{id:fr,children:[m.jsx(kt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:e("scanOrEnterX",{x:e("voucherCode").toLowerCase()})})})}),m.jsx(It,{children:m.jsx(fo,{dataSetter:n,setDefer:o,label:e("code")})}),m.jsx(Kt,{children:m.jsx(lt,{label:e("submit"),className:"w-full",onClick:v})})]})}),m.jsx(Ai,{title:e("noContactLinkedToVoucherTitle"),isOpen:c,onClose:()=>u(!1),primaryAction:{label:e("linkToContact"),action:()=>l("link",{state:{voucher:d}})},secondaryAction:{label:e("cancel"),action:()=>u(!1)},children:m.jsx("p",{children:e("linkVoucherWithCodeToContact",{code:t})})})]})}function yT(){const{state:e}=Yt(),t=Tt(),{t:n}=et(),{session:r,mutate:i}=yt(),{onRedeemVoucher:s}=An(),[o,c]=k.useState(e.voucher);if(!o)return m.jsx(m.Fragment,{});const u=k.useCallback(async()=>{if(!o.contact&&!r.contact)return t("../link",{state:e});const{data:{data:d}}=await Nl.redeemByCode(o.code);c(d),s&&s(d);const f=await i(),p=f==null?void 0:f.data.data.events;ao(p)},[r,o]);return m.jsx(on,{children:m.jsxs(Pt,{children:[m.jsx(kt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:"Voucher"})})}),m.jsx(It,{children:m.jsx("div",{children:m.jsx(yd,{voucher:o,setSelected:()=>{}})})}),m.jsx(Kt,{children:m.jsx(lt,{label:n("redeemVoucher"),className:"w-full",onClick:u,disabled:o.status!==Qi.ACTIVE})})]})})}function vT(){const{state:{voucher:e}}=Yt();return m.jsx(on,{children:m.jsx(za,{state:{voucher:e,redirectRoute:`${Dt.VOUCHER}/redeem`}})})}function bT(){return m.jsxs(ur,{children:[m.jsx(Oe,{path:"/",element:m.jsx(gT,{})}),m.jsx(Oe,{path:"/email",element:m.jsx(as,{})}),m.jsx(Oe,{path:"/email/new-contact",element:m.jsx(ir,{})}),m.jsx(Oe,{path:"/link",element:m.jsx(vT,{})}),m.jsx(Oe,{path:"/link/link-identifier",element:m.jsx(Po,{})}),m.jsx(Oe,{path:"/link/link-identifier/new-contact",element:m.jsx(ir,{})}),m.jsx(Oe,{path:"/redeem",element:m.jsx(yT,{})})]})}const wT="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.37482%209.55838C0.802045%2011.696%200.887351%2013.9567%201.61959%2016.045C2.35183%2018.1334%203.69695%2019.9524%205.47921%2021.2642C7.26146%2022.5761%209.39798%2023.3199%2011.6096%2023.3985C13.8212%2023.477%2016.0051%2022.8866%2017.876%2021.7045C19.7468%2020.5223%2021.2175%2018.8034%2022.0961%2016.7722C22.9746%2014.7411%2023.2201%2012.4921%2022.8004%2010.3193C22.3807%208.1464%2021.3154%206.15066%2019.7436%204.59277C18.1718%203.03489%2016.1667%201.98732%2013.9902%201.58693M7.14096%202.53681C5.21049%203.48732%203.60119%204.98315%202.51232%206.8391M10.7049%201.48193C10.452%201.51191%2010.2003%201.55066%209.95012%201.59811M18.1995%2015.656C18.757%2014.5927%2019.0317%2013.4039%2018.9971%2012.2038C18.9625%2011.0037%2018.6198%209.83263%2018.002%208.8032C17.3842%207.77377%2016.512%206.92055%2015.4692%206.32553C14.4264%205.73051%2013.2481%205.4137%2012.0476%205.40554C10.847%205.39739%209.66449%205.69816%208.61372%206.27895C7.56295%206.85974%206.67923%207.70104%206.04747%208.72198C5.41572%209.74292%205.05717%2010.9092%205.00628%2012.1087C4.9554%2013.3082%205.21389%2014.5007%205.75691%2015.5714M9.15764%2013.3648C9.00624%2012.9162%208.96314%2012.4382%209.03189%2011.9698C9.10064%2011.5014%209.27926%2011.0559%209.55317%2010.6697C9.82708%2010.2836%2010.1885%209.96774%2010.6079%209.74803C11.0272%209.52832%2011.4926%209.41098%2011.966%209.4056C12.4394%209.40023%2012.9074%209.50697%2013.3316%209.71709C13.7559%209.92722%2014.1244%2010.2348%2014.407%2010.6146C14.6896%2010.9944%2014.8783%2011.4358%2014.9576%2011.9025C15.037%2012.3692%2015.0048%2012.8481%2014.8636%2013.3M14.0993%2010.2622C14.0043%2010.1691%2013.9032%2010.0825%2013.7967%2010.0028M8.2478%2018.3147C9.32147%2018.9965%2010.5606%2019.3728%2011.832%2019.4033C13.1035%2019.4339%2014.3592%2019.1174%2015.4644%2018.488'%20stroke='%233430FF'%20stroke-width='2'%20stroke-linecap='round'/%3e%3c/svg%3e";function ET(){const e=Tt(),{t}=et(),n=An();return k.useEffect(()=>{n.sessionUuid&&e(`/${n.sessionUuid}`)},[n.sessionUuid,e]),m.jsxs("div",{className:"relative flex w-full flex-col items-center justify-center gap-12 text-center",children:[m.jsxs("div",{className:"flex items-center justify-center gap-3",children:[m.jsx("img",{alt:"logo",src:wT,className:"z-10 h-16 w-16 hover:animate-spin"}),m.jsxs("p",{className:"z-10 text-7xl font-semibold tracking-wide text-gray-600",children:["Welcome to ",m.jsx("span",{className:"italic",children:"PortalSessions"})]})]}),n.sessionUuid?m.jsx(lt,{style:{padding:"1.5rem 2rem"},label:t("continue"),onClick:()=>e(`/${n.sessionUuid}`)}):m.jsx("p",{className:"text-error-600",children:`${t("somethingWentWrong")} ${t("portalSessionNotFound")}.`})]})}function ST(){const e=Tt(),{t}=et(),{sessionUuid:n}=An(),{session:r,isLoading:i,mutate:s}=yt();return k.useEffect(()=>{if(!i&&r)switch(r.type){case ut.GENERIC:case ut.PORTAL:case ut.POINTS_TRANSACTION:case ut.PAY_PREPAID:case ut.TOP_UP_PREPAID:case ut.VOUCHER:e(`/${r.type.replaceAll("_","-").toLowerCase()}`);break;case ut.GIFTCARD:case ut.REDEEM_GIFTCARD:case ut.TOP_UP_GIFTCARD:e(Dt.GIFTCARD);break;default:e("/")}},[i,s,e,r]),i?m.jsx("div",{className:"flex h-screen w-screen items-center justify-center text-core-primary-500",children:m.jsx(Xi,{className:"h-[48px] w-[48px]"})}):m.jsx("div",{className:"text-error-600 flex w-full items-center justify-center",children:`${t("portalSessionNotFound")} (${n})`})}function w0(){return m.jsxs(ur,{children:[m.jsx(Oe,{path:"/",element:m.jsx(ET,{})}),m.jsx(Oe,{path:":portalSessionUuid",element:m.jsx(ST,{})}),m.jsx(Oe,{path:`${Dt.GENERIC}/*`,element:m.jsx(ki,{type:ut.GENERIC,element:m.jsx(rT,{})})}),m.jsx(Oe,{path:`${Dt.GIFTCARD}/*`,element:m.jsx(ki,{type:[ut.GIFTCARD,ut.REDEEM_GIFTCARD,ut.TOP_UP_GIFTCARD],element:m.jsx(aT,{})})}),m.jsx(Oe,{path:`${Dt.PORTAL}/*`,element:m.jsx(ki,{type:ut.PORTAL,element:m.jsx(cT,{})})}),m.jsx(Oe,{path:`${Dt.PAY_PREPAID}/*`,element:m.jsx(ki,{type:ut.PAY_PREPAID,element:m.jsx(pT,{})})}),m.jsx(Oe,{path:`${Dt.POINTS_TRANSACTION}/*`,element:m.jsx(ki,{type:ut.POINTS_TRANSACTION,element:m.jsx(dT,{})})}),m.jsx(Oe,{path:`${Dt.TOP_UP_PREPAID}/*`,element:m.jsx(ki,{type:ut.TOP_UP_PREPAID,element:m.jsx(mT,{})})}),m.jsx(Oe,{path:`${Dt.VOUCHER}/*`,element:m.jsx(ki,{type:ut.VOUCHER,element:m.jsx(bT,{})})})]})}function sr({element:e}){const{session:t}=yt();return t.contact?e:m.jsx(Hs,{to:"/"})}function ki({type:e,element:t}){const{session:n}=yt();return n?(Array.isArray(e)?[...e,ut.GENERIC].includes(n.type):n.type===e||n.type===ut.GENERIC)?t:m.jsx(Hs,{to:"/"}):void 0}const E0=Object.prototype.toString;function Ec(e){switch(E0.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Ir(e,Error)}}function cs(e,t){return E0.call(e)===`[object ${t}]`}function S0(e){return cs(e,"ErrorEvent")}function x0(e){return cs(e,"DOMError")}function xT(e){return cs(e,"DOMException")}function Tr(e){return cs(e,"String")}function bd(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function wd(e){return e===null||bd(e)||typeof e!="object"&&typeof e!="function"}function us(e){return cs(e,"Object")}function Sc(e){return typeof Event<"u"&&Ir(e,Event)}function _T(e){return typeof Element<"u"&&Ir(e,Element)}function CT(e){return cs(e,"RegExp")}function xc(e){return!!(e&&e.then&&typeof e.then=="function")}function AT(e){return us(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Ir(e,t){try{return e instanceof t}catch{return!1}}function _0(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function ls(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function C0(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const i=e[r];try{_0(i)?n.push("[VueViewModel]"):n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function TT(e,t,n=!1){return Tr(e)?CT(t)?t.test(e):Tr(t)?n?e===t:e.includes(t):!1:!1}function si(e,t=[],n=!1){return t.some(r=>TT(e,r,n))}function IT(e,t,n=250,r,i,s,o){if(!s.exception||!s.exception.values||!o||!Ir(o.originalException,Error))return;const c=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;c&&(s.exception.values=kT(Ed(e,t,i,o.originalException,r,s.exception.values,c,0),n))}function Ed(e,t,n,r,i,s,o,c){if(s.length>=n+1)return s;let u=[...s];if(Ir(r[i],Error)){A0(o,c);const d=e(t,r[i]),f=u.length;T0(d,i,f,c),u=Ed(e,t,n,r[i],i,[d,...u],d,f)}return Array.isArray(r.errors)&&r.errors.forEach((d,f)=>{if(Ir(d,Error)){A0(o,c);const p=e(t,d),l=u.length;T0(p,`errors[${f}]`,l,c),u=Ed(e,t,n,d,i,[p,...u],p,l)}}),u}function A0(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function T0(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function kT(e,t){return e.map(n=>(n.value&&(n.value=ls(n.value,t)),n))}function I0(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const Oi="8.34.0",nt=globalThis;function _c(e,t,n){const r=n||nt,i=r.__SENTRY__=r.__SENTRY__||{},s=i[Oi]=i[Oi]||{};return s[e]||(s[e]=t())}const ds=nt,OT=80;function kr(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,i=[];let s=0,o=0;const c=" > ",u=c.length;let d;const f=Array.isArray(t)?t:t.keyAttrs,p=!Array.isArray(t)&&t.maxStringLength||OT;for(;n&&s++<r&&(d=RT(n,f),!(d==="html"||s>1&&o+i.length*u+d.length>=p));)i.push(d),o+=d.length,n=n.parentNode;return i.reverse().join(c)}catch{return"<unknown>"}}function RT(e,t){const n=e,r=[];if(!n||!n.tagName)return"";if(ds.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&&t.length?t.filter(o=>n.getAttribute(o)).map(o=>[o,n.getAttribute(o)]):null;if(i&&i.length)i.forEach(o=>{r.push(`[${o[0]}="${o[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const o=n.className;if(o&&Tr(o)){const c=o.split(/\s+/);for(const u of c)r.push(`.${u}`)}}const s=["aria-label","type","name","title","alt"];for(const o of s){const c=n.getAttribute(o);c&&r.push(`[${o}="${c}"]`)}return r.join("")}function k0(){try{return ds.document.location.href}catch{return""}}function NT(e){return ds.document&&ds.document.querySelector?ds.document.querySelector(e):null}function O0(e){if(!ds.HTMLElement)return null;let t=e;const n=5;for(let r=0;r<n;r++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}const fs=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,MT="Sentry Logger ",Sd=["debug","info","warn","error","log","assert","trace"],Cc={};function hs(e){if(!("console"in nt))return e();const t=nt.console,n={},r=Object.keys(Cc);r.forEach(i=>{const s=Cc[i];n[i]=t[i],t[i]=s});try{return e()}finally{r.forEach(i=>{t[i]=n[i]})}}function DT(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return fs?Sd.forEach(n=>{t[n]=(...r)=>{e&&hs(()=>{nt.console[n](`${MT}[${n}]:`,...r)})}}):Sd.forEach(n=>{t[n]=()=>{}}),t}const Se=_c("logger",DT),PT=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function jT(e){return e==="http"||e==="https"}function ps(e,t=!1){const{host:n,path:r,pass:i,port:s,projectId:o,protocol:c,publicKey:u}=e;return`${c}://${u}${t&&i?`:${i}`:""}@${n}${s?`:${s}`:""}/${r&&`${r}/`}${o}`}function LT(e){const t=PT.exec(e);if(!t){hs(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,i="",s="",o="",c=""]=t.slice(1);let u="",d=c;const f=d.split("/");if(f.length>1&&(u=f.slice(0,-1).join("/"),d=f.pop()),d){const p=d.match(/^\d+/);p&&(d=p[0])}return R0({host:s,pass:i,path:u,projectId:d,port:o,protocol:n,publicKey:r})}function R0(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function BT(e){if(!fs)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(o=>e[o]?!1:(Se.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?jT(r)?t&&isNaN(parseInt(t,10))?(Se.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(Se.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(Se.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function N0(e){const t=typeof e=="string"?LT(e):R0(e);if(!(!t||!BT(t)))return t}class yr extends Error{constructor(t,n="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}function kn(e,t,n){if(!(t in e))return;const r=e[t],i=n(r);typeof i=="function"&&M0(i,r),e[t]=i}function Hn(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{fs&&Se.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function M0(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,Hn(e,"__sentry_original__",t)}catch{}}function xd(e){return e.__sentry_original__}function FT(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function D0(e){if(Ec(e))return{message:e.message,name:e.name,stack:e.stack,...j0(e)};if(Sc(e)){const t={type:e.type,target:P0(e.target),currentTarget:P0(e.currentTarget),...j0(e)};return typeof CustomEvent<"u"&&Ir(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function P0(e){try{return _T(e)?kr(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function j0(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function UT(e,t=40){const n=Object.keys(D0(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return ls(r,t);for(let i=n.length;i>0;i--){const s=n.slice(0,i).join(", ");if(!(s.length>t))return i===n.length?s:ls(s,t)}return""}function zt(e){return _d(e,new Map)}function _d(e,t){if(qT(e)){const n=t.get(e);if(n!==void 0)return n;const r={};t.set(e,r);for(const i of Object.getOwnPropertyNames(e))typeof e[i]<"u"&&(r[i]=_d(e[i],t));return r}if(Array.isArray(e)){const n=t.get(e);if(n!==void 0)return n;const r=[];return t.set(e,r),e.forEach(i=>{r.push(_d(i,t))}),r}return e}function qT(e){if(!us(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const L0=50,Ri="?",B0=/\(error: (.*)\)/,F0=/captureMessage|captureException/;function U0(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,i=0)=>{const s=[],o=n.split(`
104
- `);for(let c=r;c<o.length;c++){const u=o[c];if(u.length>1024)continue;const d=B0.test(u)?u.replace(B0,"$1"):u;if(!d.match(/\S*Error: /)){for(const f of t){const p=f(d);if(p){s.push(p);break}}if(s.length>=L0+i)break}}return $T(s.slice(i))}}function VT(e){return Array.isArray(e)?U0(...e):e}function $T(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(Ac(t).function||"")&&t.pop(),t.reverse(),F0.test(Ac(t).function||"")&&(t.pop(),F0.test(Ac(t).function||"")&&t.pop()),t.slice(0,L0).map(n=>({...n,filename:n.filename||Ac(t).filename,function:n.function||Ri}))}function Ac(e){return e[e.length-1]||{}}const Cd="<anonymous>";function Or(e){try{return!e||typeof e!="function"?Cd:e.name||Cd}catch{return Cd}}function q0(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}}}const Tc={},V0={};function oi(e,t){Tc[e]=Tc[e]||[],Tc[e].push(t)}function ai(e,t){V0[e]||(t(),V0[e]=!0)}function Yn(e,t){const n=e&&Tc[e];if(n)for(const r of n)try{r(t)}catch(i){fs&&Se.error(`Error while triggering instrumentation handler.
94
+ */(function(e,t){(function(n,r){e.exports=r(k)})(Fi,function(n){return function(){var r={981:function(){typeof Element>"u"||"remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)}),typeof self<"u"&&"document"in self&&((!("classList"in document.createElement("_"))||document.createElementNS&&!("classList"in document.createElementNS("http://www.w3.org/2000/svg","g")))&&function(c){if("Element"in c){var u="classList",d="prototype",f=c.Element[d],h=Object,l=String[d].trim||function(){return this.replace(/^\s+|\s+$/g,"")},b=Array[d].indexOf||function(E){for(var S=0,A=this.length;S<A;S++)if(S in this&&this[S]===E)return S;return-1},a=function(E,S){this.name=E,this.code=DOMException[E],this.message=S},p=function(E,S){if(S==="")throw new a("SYNTAX_ERR","The token must not be empty.");if(/\s/.test(S))throw new a("INVALID_CHARACTER_ERR","The token must not contain space characters.");return b.call(E,S)},y=function(E){for(var S=l.call(E.getAttribute("class")||""),A=S?S.split(/\s+/):[],T=0,O=A.length;T<O;T++)this.push(A[T]);this._updateClassName=function(){E.setAttribute("class",this.toString())}},g=y[d]=[],v=function(){return new y(this)};if(a[d]=Error[d],g.item=function(E){return this[E]||null},g.contains=function(E){return~p(this,E+"")},g.add=function(){var E,S=arguments,A=0,T=S.length,O=!1;do~p(this,E=S[A]+"")||(this.push(E),O=!0);while(++A<T);O&&this._updateClassName()},g.remove=function(){var E,S,A=arguments,T=0,O=A.length,N=!1;do for(S=p(this,E=A[T]+"");~S;)this.splice(S,1),N=!0,S=p(this,E);while(++T<O);N&&this._updateClassName()},g.toggle=function(E,S){var A=this.contains(E),T=A?S!==!0&&"remove":S!==!1&&"add";return T&&this[T](E),S===!0||S===!1?S:!A},g.replace=function(E,S){var A=p(E+"");~A&&(this.splice(A,1,S),this._updateClassName())},g.toString=function(){return this.join(" ")},h.defineProperty){var w={get:v,enumerable:!0,configurable:!0};try{h.defineProperty(f,u,w)}catch(E){E.number!==void 0&&E.number!==-2146823252||(w.enumerable=!1,h.defineProperty(f,u,w))}}else h[d].__defineGetter__&&f.__defineGetter__(u,v)}}(self),function(){var c=document.createElement("_");if(c.classList.add("c1","c2"),!c.classList.contains("c2")){var u=function(f){var h=DOMTokenList.prototype[f];DOMTokenList.prototype[f]=function(l){var b,a=arguments.length;for(b=0;b<a;b++)l=arguments[b],h.call(this,l)}};u("add"),u("remove")}if(c.classList.toggle("c3",!1),c.classList.contains("c3")){var d=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(f,h){return 1 in arguments&&!this.contains(f)==!h?h:d.call(this,f)}}"replace"in document.createElement("_").classList||(DOMTokenList.prototype.replace=function(f,h){var l=this.toString().split(" "),b=l.indexOf(f+"");~b&&(l=l.slice(b),this.remove.apply(this,l),this.add(h),this.add.apply(this,l.slice(1)))}),c=null}())},548:function(c){c.exports=function(){var u={9306:function(l,b,a){var p=a(4901),y=a(6823),g=TypeError;l.exports=function(v){if(p(v))return v;throw new g(y(v)+" is not a function")}},5548:function(l,b,a){var p=a(3517),y=a(6823),g=TypeError;l.exports=function(v){if(p(v))return v;throw new g(y(v)+" is not a constructor")}},3506:function(l,b,a){var p=a(3925),y=String,g=TypeError;l.exports=function(v){if(p(v))return v;throw new g("Can't set "+y(v)+" as a prototype")}},6469:function(l,b,a){var p=a(8227),y=a(2360),g=a(4913).f,v=p("unscopables"),w=Array.prototype;w[v]===void 0&&g(w,v,{configurable:!0,value:y(null)}),l.exports=function(E){w[v][E]=!0}},7829:function(l,b,a){var p=a(8183).charAt;l.exports=function(y,g,v){return g+(v?p(y,g).length:1)}},8551:function(l,b,a){var p=a(34),y=String,g=TypeError;l.exports=function(v){if(p(v))return v;throw new g(y(v)+" is not an object")}},235:function(l,b,a){var p=a(9213).forEach,y=a(4598)("forEach");l.exports=y?[].forEach:function(g){return p(this,g,arguments.length>1?arguments[1]:void 0)}},7916:function(l,b,a){var p=a(6080),y=a(9565),g=a(8981),v=a(6319),w=a(4209),E=a(3517),S=a(6198),A=a(4659),T=a(81),O=a(851),N=Array;l.exports=function(D){var U=g(D),V=E(this),F=arguments.length,q=F>1?arguments[1]:void 0,R=q!==void 0;R&&(q=p(q,F>2?arguments[2]:void 0));var L,W,z,Z,te,re,he=O(U),ue=0;if(!he||this===N&&w(he))for(L=S(U),W=V?new this(L):N(L);L>ue;ue++)re=R?q(U[ue],ue):U[ue],A(W,ue,re);else for(W=V?new this:[],te=(Z=T(U,he)).next;!(z=y(te,Z)).done;ue++)re=R?v(Z,q,[z.value,ue],!0):z.value,A(W,ue,re);return W.length=ue,W}},9617:function(l,b,a){var p=a(5397),y=a(5610),g=a(6198),v=function(w){return function(E,S,A){var T=p(E),O=g(T);if(O===0)return!w&&-1;var N,D=y(A,O);if(w&&S!=S){for(;O>D;)if((N=T[D++])!=N)return!0}else for(;O>D;D++)if((w||D in T)&&T[D]===S)return w||D||0;return!w&&-1}};l.exports={includes:v(!0),indexOf:v(!1)}},9213:function(l,b,a){var p=a(6080),y=a(9504),g=a(7055),v=a(8981),w=a(6198),E=a(1469),S=y([].push),A=function(T){var O=T===1,N=T===2,D=T===3,U=T===4,V=T===6,F=T===7,q=T===5||V;return function(R,L,W,z){for(var Z,te,re=v(R),he=g(re),ue=w(he),ye=p(L,W),de=0,$=z||E,H=O?$(R,ue):N||F?$(R,0):void 0;ue>de;de++)if((q||de in he)&&(te=ye(Z=he[de],de,re),T))if(O)H[de]=te;else if(te)switch(T){case 3:return!0;case 5:return Z;case 6:return de;case 2:S(H,Z)}else switch(T){case 4:return!1;case 7:S(H,Z)}return V?-1:D||U?U:H}};l.exports={forEach:A(0),map:A(1),filter:A(2),some:A(3),every:A(4),find:A(5),findIndex:A(6),filterReject:A(7)}},597:function(l,b,a){var p=a(9039),y=a(8227),g=a(7388),v=y("species");l.exports=function(w){return g>=51||!p(function(){var E=[];return(E.constructor={})[v]=function(){return{foo:1}},E[w](Boolean).foo!==1})}},4598:function(l,b,a){var p=a(9039);l.exports=function(y,g){var v=[][y];return!!v&&p(function(){v.call(null,g||function(){return 1},1)})}},926:function(l,b,a){var p=a(9306),y=a(8981),g=a(7055),v=a(6198),w=TypeError,E="Reduce of empty array with no initial value",S=function(A){return function(T,O,N,D){var U=y(T),V=g(U),F=v(U);if(p(O),F===0&&N<2)throw new w(E);var q=A?F-1:0,R=A?-1:1;if(N<2)for(;;){if(q in V){D=V[q],q+=R;break}if(q+=R,A?q<0:F<=q)throw new w(E)}for(;A?q>=0:F>q;q+=R)q in V&&(D=O(D,V[q],q,U));return D}};l.exports={left:S(!1),right:S(!0)}},4527:function(l,b,a){var p=a(3724),y=a(4376),g=TypeError,v=Object.getOwnPropertyDescriptor,w=p&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(E){return E instanceof TypeError}}();l.exports=w?function(E,S){if(y(E)&&!v(E,"length").writable)throw new g("Cannot set read only .length");return E.length=S}:function(E,S){return E.length=S}},7680:function(l,b,a){var p=a(9504);l.exports=p([].slice)},4488:function(l,b,a){var p=a(7680),y=Math.floor,g=function(v,w){var E=v.length;if(E<8)for(var S,A,T=1;T<E;){for(A=T,S=v[T];A&&w(v[A-1],S)>0;)v[A]=v[--A];A!==T++&&(v[A]=S)}else for(var O=y(E/2),N=g(p(v,0,O),w),D=g(p(v,O),w),U=N.length,V=D.length,F=0,q=0;F<U||q<V;)v[F+q]=F<U&&q<V?w(N[F],D[q])<=0?N[F++]:D[q++]:F<U?N[F++]:D[q++];return v};l.exports=g},7433:function(l,b,a){var p=a(4376),y=a(3517),g=a(34),v=a(8227)("species"),w=Array;l.exports=function(E){var S;return p(E)&&(S=E.constructor,(y(S)&&(S===w||p(S.prototype))||g(S)&&(S=S[v])===null)&&(S=void 0)),S===void 0?w:S}},1469:function(l,b,a){var p=a(7433);l.exports=function(y,g){return new(p(y))(g===0?0:g)}},6319:function(l,b,a){var p=a(8551),y=a(9539);l.exports=function(g,v,w,E){try{return E?v(p(w)[0],w[1]):v(w)}catch(S){y(g,"throw",S)}}},4428:function(l,b,a){var p=a(8227)("iterator"),y=!1;try{var g=0,v={next:function(){return{done:!!g++}},return:function(){y=!0}};v[p]=function(){return this},Array.from(v,function(){throw 2})}catch{}l.exports=function(w,E){try{if(!E&&!y)return!1}catch{return!1}var S=!1;try{var A={};A[p]=function(){return{next:function(){return{done:S=!0}}}},w(A)}catch{}return S}},4576:function(l,b,a){var p=a(9504),y=p({}.toString),g=p("".slice);l.exports=function(v){return g(y(v),8,-1)}},6955:function(l,b,a){var p=a(2140),y=a(4901),g=a(4576),v=a(8227)("toStringTag"),w=Object,E=g(function(){return arguments}())==="Arguments";l.exports=p?g:function(S){var A,T,O;return S===void 0?"Undefined":S===null?"Null":typeof(T=function(N,D){try{return N[D]}catch{}}(A=w(S),v))=="string"?T:E?g(A):(O=g(A))==="Object"&&y(A.callee)?"Arguments":O}},7740:function(l,b,a){var p=a(9297),y=a(5031),g=a(7347),v=a(4913);l.exports=function(w,E,S){for(var A=y(E),T=v.f,O=g.f,N=0;N<A.length;N++){var D=A[N];p(w,D)||S&&p(S,D)||T(w,D,O(E,D))}}},1436:function(l,b,a){var p=a(8227)("match");l.exports=function(y){var g=/./;try{"/./"[y](g)}catch{try{return g[p]=!1,"/./"[y](g)}catch{}}return!1}},2211:function(l,b,a){var p=a(9039);l.exports=!p(function(){function y(){}return y.prototype.constructor=null,Object.getPrototypeOf(new y)!==y.prototype})},2529:function(l){l.exports=function(b,a){return{value:b,done:a}}},6699:function(l,b,a){var p=a(3724),y=a(4913),g=a(6980);l.exports=p?function(v,w,E){return y.f(v,w,g(1,E))}:function(v,w,E){return v[w]=E,v}},6980:function(l){l.exports=function(b,a){return{enumerable:!(1&b),configurable:!(2&b),writable:!(4&b),value:a}}},4659:function(l,b,a){var p=a(3724),y=a(4913),g=a(6980);l.exports=function(v,w,E){p?y.f(v,w,g(0,E)):v[w]=E}},3640:function(l,b,a){var p=a(8551),y=a(4270),g=TypeError;l.exports=function(v){if(p(this),v==="string"||v==="default")v="string";else if(v!=="number")throw new g("Incorrect hint");return y(this,v)}},2106:function(l,b,a){var p=a(283),y=a(4913);l.exports=function(g,v,w){return w.get&&p(w.get,v,{getter:!0}),w.set&&p(w.set,v,{setter:!0}),y.f(g,v,w)}},6840:function(l,b,a){var p=a(4901),y=a(4913),g=a(283),v=a(9433);l.exports=function(w,E,S,A){A||(A={});var T=A.enumerable,O=A.name!==void 0?A.name:E;if(p(S)&&g(S,O,A),A.global)T?w[E]=S:v(E,S);else{try{A.unsafe?w[E]&&(T=!0):delete w[E]}catch{}T?w[E]=S:y.f(w,E,{value:S,enumerable:!1,configurable:!A.nonConfigurable,writable:!A.nonWritable})}return w}},9433:function(l,b,a){var p=a(4475),y=Object.defineProperty;l.exports=function(g,v){try{y(p,g,{value:v,configurable:!0,writable:!0})}catch{p[g]=v}return v}},4606:function(l,b,a){var p=a(6823),y=TypeError;l.exports=function(g,v){if(!delete g[v])throw new y("Cannot delete property "+p(v)+" of "+p(g))}},3724:function(l,b,a){var p=a(9039);l.exports=!p(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})},4055:function(l,b,a){var p=a(4475),y=a(34),g=p.document,v=y(g)&&y(g.createElement);l.exports=function(w){return v?g.createElement(w):{}}},6837:function(l){var b=TypeError;l.exports=function(a){if(a>9007199254740991)throw b("Maximum allowed index exceeded");return a}},7400:function(l){l.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},9296:function(l,b,a){var p=a(4055)("span").classList,y=p&&p.constructor&&p.constructor.prototype;l.exports=y===Object.prototype?void 0:y},8834:function(l,b,a){var p=a(9392).match(/firefox\/(\d+)/i);l.exports=!!p&&+p[1]},3202:function(l,b,a){var p=a(9392);l.exports=/MSIE|Trident/.test(p)},9088:function(l,b,a){var p=a(4475),y=a(4576);l.exports=y(p.process)==="process"},9392:function(l){l.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},7388:function(l,b,a){var p,y,g=a(4475),v=a(9392),w=g.process,E=g.Deno,S=w&&w.versions||E&&E.version,A=S&&S.v8;A&&(y=(p=A.split("."))[0]>0&&p[0]<4?1:+(p[0]+p[1])),!y&&v&&(!(p=v.match(/Edge\/(\d+)/))||p[1]>=74)&&(p=v.match(/Chrome\/(\d+)/))&&(y=+p[1]),l.exports=y},9160:function(l,b,a){var p=a(9392).match(/AppleWebKit\/(\d+)\./);l.exports=!!p&&+p[1]},8727:function(l){l.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6518:function(l,b,a){var p=a(4475),y=a(7347).f,g=a(6699),v=a(6840),w=a(9433),E=a(7740),S=a(2796);l.exports=function(A,T){var O,N,D,U,V,F=A.target,q=A.global,R=A.stat;if(O=q?p:R?p[F]||w(F,{}):p[F]&&p[F].prototype)for(N in T){if(U=T[N],D=A.dontCallGetSet?(V=y(O,N))&&V.value:O[N],!S(q?N:F+(R?".":"#")+N,A.forced)&&D!==void 0){if(typeof U==typeof D)continue;E(U,D)}(A.sham||D&&D.sham)&&g(U,"sham",!0),v(O,N,U,A)}}},9039:function(l){l.exports=function(b){try{return!!b()}catch{return!0}}},9228:function(l,b,a){a(7495);var p=a(9565),y=a(6840),g=a(7323),v=a(9039),w=a(8227),E=a(6699),S=w("species"),A=RegExp.prototype;l.exports=function(T,O,N,D){var U=w(T),V=!v(function(){var L={};return L[U]=function(){return 7},""[T](L)!==7}),F=V&&!v(function(){var L=!1,W=/a/;return T==="split"&&((W={}).constructor={},W.constructor[S]=function(){return W},W.flags="",W[U]=/./[U]),W.exec=function(){return L=!0,null},W[U](""),!L});if(!V||!F||N){var q=/./[U],R=O(U,""[T],function(L,W,z,Z,te){var re=W.exec;return re===g||re===A.exec?V&&!te?{done:!0,value:p(q,W,z,Z)}:{done:!0,value:p(L,z,W,Z)}:{done:!1}});y(String.prototype,T,R[0]),y(A,U,R[1])}D&&E(A[U],"sham",!0)}},8745:function(l,b,a){var p=a(616),y=Function.prototype,g=y.apply,v=y.call;l.exports=typeof Reflect=="object"&&Reflect.apply||(p?v.bind(g):function(){return v.apply(g,arguments)})},6080:function(l,b,a){var p=a(7476),y=a(9306),g=a(616),v=p(p.bind);l.exports=function(w,E){return y(w),E===void 0?w:g?v(w,E):function(){return w.apply(E,arguments)}}},616:function(l,b,a){var p=a(9039);l.exports=!p(function(){var y=(function(){}).bind();return typeof y!="function"||y.hasOwnProperty("prototype")})},9565:function(l,b,a){var p=a(616),y=Function.prototype.call;l.exports=p?y.bind(y):function(){return y.apply(y,arguments)}},350:function(l,b,a){var p=a(3724),y=a(9297),g=Function.prototype,v=p&&Object.getOwnPropertyDescriptor,w=y(g,"name"),E=w&&(function(){}).name==="something",S=w&&(!p||p&&v(g,"name").configurable);l.exports={EXISTS:w,PROPER:E,CONFIGURABLE:S}},6706:function(l,b,a){var p=a(9504),y=a(9306);l.exports=function(g,v,w){try{return p(y(Object.getOwnPropertyDescriptor(g,v)[w]))}catch{}}},7476:function(l,b,a){var p=a(4576),y=a(9504);l.exports=function(g){if(p(g)==="Function")return y(g)}},9504:function(l,b,a){var p=a(616),y=Function.prototype,g=y.call,v=p&&y.bind.bind(g,g);l.exports=p?v:function(w){return function(){return g.apply(w,arguments)}}},7751:function(l,b,a){var p=a(4475),y=a(4901);l.exports=function(g,v){return arguments.length<2?(w=p[g],y(w)?w:void 0):p[g]&&p[g][v];var w}},851:function(l,b,a){var p=a(6955),y=a(5966),g=a(4117),v=a(6269),w=a(8227)("iterator");l.exports=function(E){if(!g(E))return y(E,w)||y(E,"@@iterator")||v[p(E)]}},81:function(l,b,a){var p=a(9565),y=a(9306),g=a(8551),v=a(6823),w=a(851),E=TypeError;l.exports=function(S,A){var T=arguments.length<2?w(S):A;if(y(T))return g(p(T,S));throw new E(v(S)+" is not iterable")}},6933:function(l,b,a){var p=a(9504),y=a(4376),g=a(4901),v=a(4576),w=a(655),E=p([].push);l.exports=function(S){if(g(S))return S;if(y(S)){for(var A=S.length,T=[],O=0;O<A;O++){var N=S[O];typeof N=="string"?E(T,N):typeof N!="number"&&v(N)!=="Number"&&v(N)!=="String"||E(T,w(N))}var D=T.length,U=!0;return function(V,F){if(U)return U=!1,F;if(y(this))return F;for(var q=0;q<D;q++)if(T[q]===V)return F}}}},5966:function(l,b,a){var p=a(9306),y=a(4117);l.exports=function(g,v){var w=g[v];return y(w)?void 0:p(w)}},2478:function(l,b,a){var p=a(9504),y=a(8981),g=Math.floor,v=p("".charAt),w=p("".replace),E=p("".slice),S=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,A=/\$([$&'`]|\d{1,2})/g;l.exports=function(T,O,N,D,U,V){var F=N+T.length,q=D.length,R=A;return U!==void 0&&(U=y(U),R=S),w(V,R,function(L,W){var z;switch(v(W,0)){case"$":return"$";case"&":return T;case"`":return E(O,0,N);case"'":return E(O,F);case"<":z=U[E(W,1,-1)];break;default:var Z=+W;if(Z===0)return L;if(Z>q){var te=g(Z/10);return te===0?L:te<=q?D[te-1]===void 0?v(W,1):D[te-1]+v(W,1):L}z=D[Z-1]}return z===void 0?"":z})}},4475:function(l,b,a){var p=function(y){return y&&y.Math===Math&&y};l.exports=p(typeof globalThis=="object"&&globalThis)||p(typeof window=="object"&&window)||p(typeof self=="object"&&self)||p(typeof a.g=="object"&&a.g)||p(typeof this=="object"&&this)||function(){return this}()||Function("return this")()},9297:function(l,b,a){var p=a(9504),y=a(8981),g=p({}.hasOwnProperty);l.exports=Object.hasOwn||function(v,w){return g(y(v),w)}},421:function(l){l.exports={}},397:function(l,b,a){var p=a(7751);l.exports=p("document","documentElement")},5917:function(l,b,a){var p=a(3724),y=a(9039),g=a(4055);l.exports=!p&&!y(function(){return Object.defineProperty(g("div"),"a",{get:function(){return 7}}).a!==7})},7055:function(l,b,a){var p=a(9504),y=a(9039),g=a(4576),v=Object,w=p("".split);l.exports=y(function(){return!v("z").propertyIsEnumerable(0)})?function(E){return g(E)==="String"?w(E,""):v(E)}:v},3167:function(l,b,a){var p=a(4901),y=a(34),g=a(2967);l.exports=function(v,w,E){var S,A;return g&&p(S=w.constructor)&&S!==E&&y(A=S.prototype)&&A!==E.prototype&&g(v,A),v}},3706:function(l,b,a){var p=a(9504),y=a(4901),g=a(7629),v=p(Function.toString);y(g.inspectSource)||(g.inspectSource=function(w){return v(w)}),l.exports=g.inspectSource},1181:function(l,b,a){var p,y,g,v=a(8622),w=a(4475),E=a(34),S=a(6699),A=a(9297),T=a(7629),O=a(6119),N=a(421),D="Object already initialized",U=w.TypeError,V=w.WeakMap;if(v||T.state){var F=T.state||(T.state=new V);F.get=F.get,F.has=F.has,F.set=F.set,p=function(R,L){if(F.has(R))throw new U(D);return L.facade=R,F.set(R,L),L},y=function(R){return F.get(R)||{}},g=function(R){return F.has(R)}}else{var q=O("state");N[q]=!0,p=function(R,L){if(A(R,q))throw new U(D);return L.facade=R,S(R,q,L),L},y=function(R){return A(R,q)?R[q]:{}},g=function(R){return A(R,q)}}l.exports={set:p,get:y,has:g,enforce:function(R){return g(R)?y(R):p(R,{})},getterFor:function(R){return function(L){var W;if(!E(L)||(W=y(L)).type!==R)throw new U("Incompatible receiver, "+R+" required");return W}}}},4209:function(l,b,a){var p=a(8227),y=a(6269),g=p("iterator"),v=Array.prototype;l.exports=function(w){return w!==void 0&&(y.Array===w||v[g]===w)}},4376:function(l,b,a){var p=a(4576);l.exports=Array.isArray||function(y){return p(y)==="Array"}},4901:function(l){var b=typeof document=="object"&&document.all;l.exports=b===void 0&&b!==void 0?function(a){return typeof a=="function"||a===b}:function(a){return typeof a=="function"}},3517:function(l,b,a){var p=a(9504),y=a(9039),g=a(4901),v=a(6955),w=a(7751),E=a(3706),S=function(){},A=w("Reflect","construct"),T=/^\s*(?:class|function)\b/,O=p(T.exec),N=!T.test(S),D=function(V){if(!g(V))return!1;try{return A(S,[],V),!0}catch{return!1}},U=function(V){if(!g(V))return!1;switch(v(V)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return N||!!O(T,E(V))}catch{return!0}};U.sham=!0,l.exports=!A||y(function(){var V;return D(D.call)||!D(Object)||!D(function(){V=!0})||V})?U:D},2796:function(l,b,a){var p=a(9039),y=a(4901),g=/#|\.prototype\./,v=function(T,O){var N=E[w(T)];return N===A||N!==S&&(y(O)?p(O):!!O)},w=v.normalize=function(T){return String(T).replace(g,".").toLowerCase()},E=v.data={},S=v.NATIVE="N",A=v.POLYFILL="P";l.exports=v},2087:function(l,b,a){var p=a(34),y=Math.floor;l.exports=Number.isInteger||function(g){return!p(g)&&isFinite(g)&&y(g)===g}},4117:function(l){l.exports=function(b){return b==null}},34:function(l,b,a){var p=a(4901);l.exports=function(y){return typeof y=="object"?y!==null:p(y)}},3925:function(l,b,a){var p=a(34);l.exports=function(y){return p(y)||y===null}},6395:function(l){l.exports=!1},788:function(l,b,a){var p=a(34),y=a(4576),g=a(8227)("match");l.exports=function(v){var w;return p(v)&&((w=v[g])!==void 0?!!w:y(v)==="RegExp")}},757:function(l,b,a){var p=a(7751),y=a(4901),g=a(1625),v=a(7040),w=Object;l.exports=v?function(E){return typeof E=="symbol"}:function(E){var S=p("Symbol");return y(S)&&g(S.prototype,w(E))}},9539:function(l,b,a){var p=a(9565),y=a(8551),g=a(5966);l.exports=function(v,w,E){var S,A;y(v);try{if(!(S=g(v,"return"))){if(w==="throw")throw E;return E}S=p(S,v)}catch(T){A=!0,S=T}if(w==="throw")throw E;if(A)throw S;return y(S),E}},3994:function(l,b,a){var p=a(7657).IteratorPrototype,y=a(2360),g=a(6980),v=a(687),w=a(6269),E=function(){return this};l.exports=function(S,A,T,O){var N=A+" Iterator";return S.prototype=y(p,{next:g(+!O,T)}),v(S,N,!1,!0),w[N]=E,S}},1088:function(l,b,a){var p=a(6518),y=a(9565),g=a(6395),v=a(350),w=a(4901),E=a(3994),S=a(2787),A=a(2967),T=a(687),O=a(6699),N=a(6840),D=a(8227),U=a(6269),V=a(7657),F=v.PROPER,q=v.CONFIGURABLE,R=V.IteratorPrototype,L=V.BUGGY_SAFARI_ITERATORS,W=D("iterator"),z="keys",Z="values",te="entries",re=function(){return this};l.exports=function(he,ue,ye,de,$,H,X){E(ye,ue,de);var C,j,B,M=function(le){if(le===$&&pe)return pe;if(!L&&le&&le in Q)return Q[le];switch(le){case z:case Z:case te:return function(){return new ye(this,le)}}return function(){return new ye(this)}},ee=ue+" Iterator",J=!1,Q=he.prototype,Y=Q[W]||Q["@@iterator"]||$&&Q[$],pe=!L&&Y||M($),ge=ue==="Array"&&Q.entries||Y;if(ge&&(C=S(ge.call(new he)))!==Object.prototype&&C.next&&(g||S(C)===R||(A?A(C,R):w(C[W])||N(C,W,re)),T(C,ee,!0,!0),g&&(U[ee]=re)),F&&$===Z&&Y&&Y.name!==Z&&(!g&&q?O(Q,"name",Z):(J=!0,pe=function(){return y(Y,this)})),$)if(j={values:M(Z),keys:H?pe:M(z),entries:M(te)},X)for(B in j)(L||J||!(B in Q))&&N(Q,B,j[B]);else p({target:ue,proto:!0,forced:L||J},j);return g&&!X||Q[W]===pe||N(Q,W,pe,{name:$}),U[ue]=pe,j}},7657:function(l,b,a){var p,y,g,v=a(9039),w=a(4901),E=a(34),S=a(2360),A=a(2787),T=a(6840),O=a(8227),N=a(6395),D=O("iterator"),U=!1;[].keys&&("next"in(g=[].keys())?(y=A(A(g)))!==Object.prototype&&(p=y):U=!0),!E(p)||v(function(){var V={};return p[D].call(V)!==V})?p={}:N&&(p=S(p)),w(p[D])||T(p,D,function(){return this}),l.exports={IteratorPrototype:p,BUGGY_SAFARI_ITERATORS:U}},6269:function(l){l.exports={}},6198:function(l,b,a){var p=a(8014);l.exports=function(y){return p(y.length)}},283:function(l,b,a){var p=a(9504),y=a(9039),g=a(4901),v=a(9297),w=a(3724),E=a(350).CONFIGURABLE,S=a(3706),A=a(1181),T=A.enforce,O=A.get,N=String,D=Object.defineProperty,U=p("".slice),V=p("".replace),F=p([].join),q=w&&!y(function(){return D(function(){},"length",{value:8}).length!==8}),R=String(String).split("String"),L=l.exports=function(W,z,Z){U(N(z),0,7)==="Symbol("&&(z="["+V(N(z),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),Z&&Z.getter&&(z="get "+z),Z&&Z.setter&&(z="set "+z),(!v(W,"name")||E&&W.name!==z)&&(w?D(W,"name",{value:z,configurable:!0}):W.name=z),q&&Z&&v(Z,"arity")&&W.length!==Z.arity&&D(W,"length",{value:Z.arity});try{Z&&v(Z,"constructor")&&Z.constructor?w&&D(W,"prototype",{writable:!1}):W.prototype&&(W.prototype=void 0)}catch{}var te=T(W);return v(te,"source")||(te.source=F(R,typeof z=="string"?z:"")),W};Function.prototype.toString=L(function(){return g(this)&&O(this).source||S(this)},"toString")},741:function(l){var b=Math.ceil,a=Math.floor;l.exports=Math.trunc||function(p){var y=+p;return(y>0?a:b)(y)}},5749:function(l,b,a){var p=a(788),y=TypeError;l.exports=function(g){if(p(g))throw new y("The method doesn't accept regular expressions");return g}},4213:function(l,b,a){var p=a(3724),y=a(9504),g=a(9565),v=a(9039),w=a(1072),E=a(3717),S=a(8773),A=a(8981),T=a(7055),O=Object.assign,N=Object.defineProperty,D=y([].concat);l.exports=!O||v(function(){if(p&&O({b:1},O(N({},"a",{enumerable:!0,get:function(){N(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var U={},V={},F=Symbol("assign detection"),q="abcdefghijklmnopqrst";return U[F]=7,q.split("").forEach(function(R){V[R]=R}),O({},U)[F]!==7||w(O({},V)).join("")!==q})?function(U,V){for(var F=A(U),q=arguments.length,R=1,L=E.f,W=S.f;q>R;)for(var z,Z=T(arguments[R++]),te=L?D(w(Z),L(Z)):w(Z),re=te.length,he=0;re>he;)z=te[he++],p&&!g(W,Z,z)||(F[z]=Z[z]);return F}:O},2360:function(l,b,a){var p,y=a(8551),g=a(6801),v=a(8727),w=a(421),E=a(397),S=a(4055),A=a(6119),T="prototype",O="script",N=A("IE_PROTO"),D=function(){},U=function(q){return"<"+O+">"+q+"</"+O+">"},V=function(q){q.write(U("")),q.close();var R=q.parentWindow.Object;return q=null,R},F=function(){try{p=new ActiveXObject("htmlfile")}catch{}var q,R,L;F=typeof document<"u"?document.domain&&p?V(p):(R=S("iframe"),L="java"+O+":",R.style.display="none",E.appendChild(R),R.src=String(L),(q=R.contentWindow.document).open(),q.write(U("document.F=Object")),q.close(),q.F):V(p);for(var W=v.length;W--;)delete F[T][v[W]];return F()};w[N]=!0,l.exports=Object.create||function(q,R){var L;return q!==null?(D[T]=y(q),L=new D,D[T]=null,L[N]=q):L=F(),R===void 0?L:g.f(L,R)}},6801:function(l,b,a){var p=a(3724),y=a(8686),g=a(4913),v=a(8551),w=a(5397),E=a(1072);b.f=p&&!y?Object.defineProperties:function(S,A){v(S);for(var T,O=w(A),N=E(A),D=N.length,U=0;D>U;)g.f(S,T=N[U++],O[T]);return S}},4913:function(l,b,a){var p=a(3724),y=a(5917),g=a(8686),v=a(8551),w=a(6969),E=TypeError,S=Object.defineProperty,A=Object.getOwnPropertyDescriptor,T="enumerable",O="configurable",N="writable";b.f=p?g?function(D,U,V){if(v(D),U=w(U),v(V),typeof D=="function"&&U==="prototype"&&"value"in V&&N in V&&!V[N]){var F=A(D,U);F&&F[N]&&(D[U]=V.value,V={configurable:O in V?V[O]:F[O],enumerable:T in V?V[T]:F[T],writable:!1})}return S(D,U,V)}:S:function(D,U,V){if(v(D),U=w(U),v(V),y)try{return S(D,U,V)}catch{}if("get"in V||"set"in V)throw new E("Accessors not supported");return"value"in V&&(D[U]=V.value),D}},7347:function(l,b,a){var p=a(3724),y=a(9565),g=a(8773),v=a(6980),w=a(5397),E=a(6969),S=a(9297),A=a(5917),T=Object.getOwnPropertyDescriptor;b.f=p?T:function(O,N){if(O=w(O),N=E(N),A)try{return T(O,N)}catch{}if(S(O,N))return v(!y(g.f,O,N),O[N])}},298:function(l,b,a){var p=a(4576),y=a(5397),g=a(8480).f,v=a(7680),w=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];l.exports.f=function(E){return w&&p(E)==="Window"?function(S){try{return g(S)}catch{return v(w)}}(E):g(y(E))}},8480:function(l,b,a){var p=a(1828),y=a(8727).concat("length","prototype");b.f=Object.getOwnPropertyNames||function(g){return p(g,y)}},3717:function(l,b){b.f=Object.getOwnPropertySymbols},2787:function(l,b,a){var p=a(9297),y=a(4901),g=a(8981),v=a(6119),w=a(2211),E=v("IE_PROTO"),S=Object,A=S.prototype;l.exports=w?S.getPrototypeOf:function(T){var O=g(T);if(p(O,E))return O[E];var N=O.constructor;return y(N)&&O instanceof N?N.prototype:O instanceof S?A:null}},1625:function(l,b,a){var p=a(9504);l.exports=p({}.isPrototypeOf)},1828:function(l,b,a){var p=a(9504),y=a(9297),g=a(5397),v=a(9617).indexOf,w=a(421),E=p([].push);l.exports=function(S,A){var T,O=g(S),N=0,D=[];for(T in O)!y(w,T)&&y(O,T)&&E(D,T);for(;A.length>N;)y(O,T=A[N++])&&(~v(D,T)||E(D,T));return D}},1072:function(l,b,a){var p=a(1828),y=a(8727);l.exports=Object.keys||function(g){return p(g,y)}},8773:function(l,b){var a={}.propertyIsEnumerable,p=Object.getOwnPropertyDescriptor,y=p&&!a.call({1:2},1);b.f=y?function(g){var v=p(this,g);return!!v&&v.enumerable}:a},2551:function(l,b,a){var p=a(6395),y=a(4475),g=a(9039),v=a(9160);l.exports=p||!g(function(){if(!(v&&v<535)){var w=Math.random();__defineSetter__.call(null,w,function(){}),delete y[w]}})},2967:function(l,b,a){var p=a(6706),y=a(34),g=a(7750),v=a(3506);l.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var w,E=!1,S={};try{(w=p(Object.prototype,"__proto__","set"))(S,[]),E=S instanceof Array}catch{}return function(A,T){return g(A),v(T),y(A)&&(E?w(A,T):A.__proto__=T),A}}():void 0)},3179:function(l,b,a){var p=a(2140),y=a(6955);l.exports=p?{}.toString:function(){return"[object "+y(this)+"]"}},4270:function(l,b,a){var p=a(9565),y=a(4901),g=a(34),v=TypeError;l.exports=function(w,E){var S,A;if(E==="string"&&y(S=w.toString)&&!g(A=p(S,w))||y(S=w.valueOf)&&!g(A=p(S,w))||E!=="string"&&y(S=w.toString)&&!g(A=p(S,w)))return A;throw new v("Can't convert object to primitive value")}},5031:function(l,b,a){var p=a(7751),y=a(9504),g=a(8480),v=a(3717),w=a(8551),E=y([].concat);l.exports=p("Reflect","ownKeys")||function(S){var A=g.f(w(S)),T=v.f;return T?E(A,T(S)):A}},9167:function(l,b,a){var p=a(4475);l.exports=p},1056:function(l,b,a){var p=a(4913).f;l.exports=function(y,g,v){v in y||p(y,v,{configurable:!0,get:function(){return g[v]},set:function(w){g[v]=w}})}},6682:function(l,b,a){var p=a(9565),y=a(8551),g=a(4901),v=a(4576),w=a(7323),E=TypeError;l.exports=function(S,A){var T=S.exec;if(g(T)){var O=p(T,S,A);return O!==null&&y(O),O}if(v(S)==="RegExp")return p(w,S,A);throw new E("RegExp#exec called on incompatible receiver")}},7323:function(l,b,a){var p,y,g=a(9565),v=a(9504),w=a(655),E=a(7979),S=a(8429),A=a(5745),T=a(2360),O=a(1181).get,N=a(3635),D=a(8814),U=A("native-string-replace",String.prototype.replace),V=RegExp.prototype.exec,F=V,q=v("".charAt),R=v("".indexOf),L=v("".replace),W=v("".slice),z=(y=/b*/g,g(V,p=/a/,"a"),g(V,y,"a"),p.lastIndex!==0||y.lastIndex!==0),Z=S.BROKEN_CARET,te=/()??/.exec("")[1]!==void 0;(z||te||Z||N||D)&&(F=function(re){var he,ue,ye,de,$,H,X,C=this,j=O(C),B=w(re),M=j.raw;if(M)return M.lastIndex=C.lastIndex,he=g(F,M,B),C.lastIndex=M.lastIndex,he;var ee=j.groups,J=Z&&C.sticky,Q=g(E,C),Y=C.source,pe=0,ge=B;if(J&&(Q=L(Q,"y",""),R(Q,"g")===-1&&(Q+="g"),ge=W(B,C.lastIndex),C.lastIndex>0&&(!C.multiline||C.multiline&&q(B,C.lastIndex-1)!==`
95
+ `)&&(Y="(?: "+Y+")",ge=" "+ge,pe++),ue=new RegExp("^(?:"+Y+")",Q)),te&&(ue=new RegExp("^"+Y+"$(?!\\s)",Q)),z&&(ye=C.lastIndex),de=g(V,J?ue:C,ge),J?de?(de.input=W(de.input,pe),de[0]=W(de[0],pe),de.index=C.lastIndex,C.lastIndex+=de[0].length):C.lastIndex=0:z&&de&&(C.lastIndex=C.global?de.index+de[0].length:ye),te&&de&&de.length>1&&g(U,de[0],ue,function(){for($=1;$<arguments.length-2;$++)arguments[$]===void 0&&(de[$]=void 0)}),de&&ee)for(de.groups=H=T(null),$=0;$<ee.length;$++)H[(X=ee[$])[0]]=de[X[1]];return de}),l.exports=F},7979:function(l,b,a){var p=a(8551);l.exports=function(){var y=p(this),g="";return y.hasIndices&&(g+="d"),y.global&&(g+="g"),y.ignoreCase&&(g+="i"),y.multiline&&(g+="m"),y.dotAll&&(g+="s"),y.unicode&&(g+="u"),y.unicodeSets&&(g+="v"),y.sticky&&(g+="y"),g}},1034:function(l,b,a){var p=a(9565),y=a(9297),g=a(1625),v=a(7979),w=RegExp.prototype;l.exports=function(E){var S=E.flags;return S!==void 0||"flags"in w||y(E,"flags")||!g(w,E)?S:p(v,E)}},8429:function(l,b,a){var p=a(9039),y=a(4475).RegExp,g=p(function(){var E=y("a","y");return E.lastIndex=2,E.exec("abcd")!==null}),v=g||p(function(){return!y("a","y").sticky}),w=g||p(function(){var E=y("^r","gy");return E.lastIndex=2,E.exec("str")!==null});l.exports={BROKEN_CARET:w,MISSED_STICKY:v,UNSUPPORTED_Y:g}},3635:function(l,b,a){var p=a(9039),y=a(4475).RegExp;l.exports=p(function(){var g=y(".","s");return!(g.dotAll&&g.test(`
96
+ `)&&g.flags==="s")})},8814:function(l,b,a){var p=a(9039),y=a(4475).RegExp;l.exports=p(function(){var g=y("(?<a>b)","g");return g.exec("b").groups.a!=="b"||"b".replace(g,"$<a>c")!=="bc"})},7750:function(l,b,a){var p=a(4117),y=TypeError;l.exports=function(g){if(p(g))throw new y("Can't call method on "+g);return g}},7633:function(l,b,a){var p=a(7751),y=a(2106),g=a(8227),v=a(3724),w=g("species");l.exports=function(E){var S=p(E);v&&S&&!S[w]&&y(S,w,{configurable:!0,get:function(){return this}})}},687:function(l,b,a){var p=a(4913).f,y=a(9297),g=a(8227)("toStringTag");l.exports=function(v,w,E){v&&!E&&(v=v.prototype),v&&!y(v,g)&&p(v,g,{configurable:!0,value:w})}},6119:function(l,b,a){var p=a(5745),y=a(3392),g=p("keys");l.exports=function(v){return g[v]||(g[v]=y(v))}},7629:function(l,b,a){var p=a(6395),y=a(4475),g=a(9433),v="__core-js_shared__",w=l.exports=y[v]||g(v,{});(w.versions||(w.versions=[])).push({version:"3.37.1",mode:p?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE",source:"https://github.com/zloirock/core-js"})},5745:function(l,b,a){var p=a(7629);l.exports=function(y,g){return p[y]||(p[y]=g||{})}},2293:function(l,b,a){var p=a(8551),y=a(5548),g=a(4117),v=a(8227)("species");l.exports=function(w,E){var S,A=p(w).constructor;return A===void 0||g(S=p(A)[v])?E:y(S)}},8183:function(l,b,a){var p=a(9504),y=a(1291),g=a(655),v=a(7750),w=p("".charAt),E=p("".charCodeAt),S=p("".slice),A=function(T){return function(O,N){var D,U,V=g(v(O)),F=y(N),q=V.length;return F<0||F>=q?T?"":void 0:(D=E(V,F))<55296||D>56319||F+1===q||(U=E(V,F+1))<56320||U>57343?T?w(V,F):D:T?S(V,F,F+2):U-56320+(D-55296<<10)+65536}};l.exports={codeAt:A(!1),charAt:A(!0)}},706:function(l,b,a){var p=a(350).PROPER,y=a(9039),g=a(7452);l.exports=function(v){return y(function(){return!!g[v]()||"​…᠎"[v]()!=="​…᠎"||p&&g[v].name!==v})}},3802:function(l,b,a){var p=a(9504),y=a(7750),g=a(655),v=a(7452),w=p("".replace),E=RegExp("^["+v+"]+"),S=RegExp("(^|[^"+v+"])["+v+"]+$"),A=function(T){return function(O){var N=g(y(O));return 1&T&&(N=w(N,E,"")),2&T&&(N=w(N,S,"$1")),N}};l.exports={start:A(1),end:A(2),trim:A(3)}},4495:function(l,b,a){var p=a(7388),y=a(9039),g=a(4475).String;l.exports=!!Object.getOwnPropertySymbols&&!y(function(){var v=Symbol("symbol detection");return!g(v)||!(Object(v)instanceof Symbol)||!Symbol.sham&&p&&p<41})},8242:function(l,b,a){var p=a(9565),y=a(7751),g=a(8227),v=a(6840);l.exports=function(){var w=y("Symbol"),E=w&&w.prototype,S=E&&E.valueOf,A=g("toPrimitive");E&&!E[A]&&v(E,A,function(T){return p(S,this)},{arity:1})}},1296:function(l,b,a){var p=a(4495);l.exports=p&&!!Symbol.for&&!!Symbol.keyFor},1240:function(l,b,a){var p=a(9504);l.exports=p(1 .valueOf)},5610:function(l,b,a){var p=a(1291),y=Math.max,g=Math.min;l.exports=function(v,w){var E=p(v);return E<0?y(E+w,0):g(E,w)}},5397:function(l,b,a){var p=a(7055),y=a(7750);l.exports=function(g){return p(y(g))}},1291:function(l,b,a){var p=a(741);l.exports=function(y){var g=+y;return g!=g||g===0?0:p(g)}},8014:function(l,b,a){var p=a(1291),y=Math.min;l.exports=function(g){var v=p(g);return v>0?y(v,9007199254740991):0}},8981:function(l,b,a){var p=a(7750),y=Object;l.exports=function(g){return y(p(g))}},2777:function(l,b,a){var p=a(9565),y=a(34),g=a(757),v=a(5966),w=a(4270),E=a(8227),S=TypeError,A=E("toPrimitive");l.exports=function(T,O){if(!y(T)||g(T))return T;var N,D=v(T,A);if(D){if(O===void 0&&(O="default"),N=p(D,T,O),!y(N)||g(N))return N;throw new S("Can't convert object to primitive value")}return O===void 0&&(O="number"),w(T,O)}},6969:function(l,b,a){var p=a(2777),y=a(757);l.exports=function(g){var v=p(g,"string");return y(v)?v:v+""}},2140:function(l,b,a){var p={};p[a(8227)("toStringTag")]="z",l.exports=String(p)==="[object z]"},655:function(l,b,a){var p=a(6955),y=String;l.exports=function(g){if(p(g)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return y(g)}},6823:function(l){var b=String;l.exports=function(a){try{return b(a)}catch{return"Object"}}},3392:function(l,b,a){var p=a(9504),y=0,g=Math.random(),v=p(1 .toString);l.exports=function(w){return"Symbol("+(w===void 0?"":w)+")_"+v(++y+g,36)}},7040:function(l,b,a){var p=a(4495);l.exports=p&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},8686:function(l,b,a){var p=a(3724),y=a(9039);l.exports=p&&y(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})},8622:function(l,b,a){var p=a(4475),y=a(4901),g=p.WeakMap;l.exports=y(g)&&/native code/.test(String(g))},511:function(l,b,a){var p=a(9167),y=a(9297),g=a(1951),v=a(4913).f;l.exports=function(w){var E=p.Symbol||(p.Symbol={});y(E,w)||v(E,w,{value:g.f(w)})}},1951:function(l,b,a){var p=a(8227);b.f=p},8227:function(l,b,a){var p=a(4475),y=a(5745),g=a(9297),v=a(3392),w=a(4495),E=a(7040),S=p.Symbol,A=y("wks"),T=E?S.for||S:S&&S.withoutSetter||v;l.exports=function(O){return g(A,O)||(A[O]=w&&g(S,O)?S[O]:T("Symbol."+O)),A[O]}},7452:function(l){l.exports=`
97
+ \v\f\r                 \u2028\u2029\uFEFF`},8706:function(l,b,a){var p=a(6518),y=a(9039),g=a(4376),v=a(34),w=a(8981),E=a(6198),S=a(6837),A=a(4659),T=a(1469),O=a(597),N=a(8227),D=a(7388),U=N("isConcatSpreadable"),V=D>=51||!y(function(){var q=[];return q[U]=!1,q.concat()[0]!==q}),F=function(q){if(!v(q))return!1;var R=q[U];return R!==void 0?!!R:g(q)};p({target:"Array",proto:!0,arity:1,forced:!V||!O("concat")},{concat:function(q){var R,L,W,z,Z,te=w(this),re=T(te,0),he=0;for(R=-1,W=arguments.length;R<W;R++)if(F(Z=R===-1?te:arguments[R]))for(z=E(Z),S(he+z),L=0;L<z;L++,he++)L in Z&&A(re,he,Z[L]);else S(he+1),A(re,he++,Z);return re.length=he,re}})},2008:function(l,b,a){var p=a(6518),y=a(9213).filter;p({target:"Array",proto:!0,forced:!a(597)("filter")},{filter:function(g){return y(this,g,arguments.length>1?arguments[1]:void 0)}})},3418:function(l,b,a){var p=a(6518),y=a(7916);p({target:"Array",stat:!0,forced:!a(4428)(function(g){Array.from(g)})},{from:y})},4423:function(l,b,a){var p=a(6518),y=a(9617).includes,g=a(9039),v=a(6469);p({target:"Array",proto:!0,forced:g(function(){return!Array(1).includes()})},{includes:function(w){return y(this,w,arguments.length>1?arguments[1]:void 0)}}),v("includes")},5276:function(l,b,a){var p=a(6518),y=a(7476),g=a(9617).indexOf,v=a(4598),w=y([].indexOf),E=!!w&&1/w([1],1,-0)<0;p({target:"Array",proto:!0,forced:E||!v("indexOf")},{indexOf:function(S){var A=arguments.length>1?arguments[1]:void 0;return E?w(this,S,A)||0:g(this,S,A)}})},3792:function(l,b,a){var p=a(5397),y=a(6469),g=a(6269),v=a(1181),w=a(4913).f,E=a(1088),S=a(2529),A=a(6395),T=a(3724),O="Array Iterator",N=v.set,D=v.getterFor(O);l.exports=E(Array,"Array",function(V,F){N(this,{type:O,target:p(V),index:0,kind:F})},function(){var V=D(this),F=V.target,q=V.index++;if(!F||q>=F.length)return V.target=void 0,S(void 0,!0);switch(V.kind){case"keys":return S(q,!1);case"values":return S(F[q],!1)}return S([q,F[q]],!1)},"values");var U=g.Arguments=g.Array;if(y("keys"),y("values"),y("entries"),!A&&T&&U.name!=="values")try{w(U,"name",{value:"values"})}catch{}},8598:function(l,b,a){var p=a(6518),y=a(9504),g=a(7055),v=a(5397),w=a(4598),E=y([].join);p({target:"Array",proto:!0,forced:g!==Object||!w("join",",")},{join:function(S){return E(v(this),S===void 0?",":S)}})},2062:function(l,b,a){var p=a(6518),y=a(9213).map;p({target:"Array",proto:!0,forced:!a(597)("map")},{map:function(g){return y(this,g,arguments.length>1?arguments[1]:void 0)}})},2712:function(l,b,a){var p=a(6518),y=a(926).left,g=a(4598),v=a(7388);p({target:"Array",proto:!0,forced:!a(9088)&&v>79&&v<83||!g("reduce")},{reduce:function(w){var E=arguments.length;return y(this,w,E,E>1?arguments[1]:void 0)}})},4782:function(l,b,a){var p=a(6518),y=a(4376),g=a(3517),v=a(34),w=a(5610),E=a(6198),S=a(5397),A=a(4659),T=a(8227),O=a(597),N=a(7680),D=O("slice"),U=T("species"),V=Array,F=Math.max;p({target:"Array",proto:!0,forced:!D},{slice:function(q,R){var L,W,z,Z=S(this),te=E(Z),re=w(q,te),he=w(R===void 0?te:R,te);if(y(Z)&&(L=Z.constructor,(g(L)&&(L===V||y(L.prototype))||v(L)&&(L=L[U])===null)&&(L=void 0),L===V||L===void 0))return N(Z,re,he);for(W=new(L===void 0?V:L)(F(he-re,0)),z=0;re<he;re++,z++)re in Z&&A(W,z,Z[re]);return W.length=z,W}})},6910:function(l,b,a){var p=a(6518),y=a(9504),g=a(9306),v=a(8981),w=a(6198),E=a(4606),S=a(655),A=a(9039),T=a(4488),O=a(4598),N=a(8834),D=a(3202),U=a(7388),V=a(9160),F=[],q=y(F.sort),R=y(F.push),L=A(function(){F.sort(void 0)}),W=A(function(){F.sort(null)}),z=O("sort"),Z=!A(function(){if(U)return U<70;if(!(N&&N>3)){if(D)return!0;if(V)return V<603;var te,re,he,ue,ye="";for(te=65;te<76;te++){switch(re=String.fromCharCode(te),te){case 66:case 69:case 70:case 72:he=3;break;case 68:case 71:he=4;break;default:he=2}for(ue=0;ue<47;ue++)F.push({k:re+ue,v:he})}for(F.sort(function(de,$){return $.v-de.v}),ue=0;ue<F.length;ue++)re=F[ue].k.charAt(0),ye.charAt(ye.length-1)!==re&&(ye+=re);return ye!=="DGBEFHACIJK"}});p({target:"Array",proto:!0,forced:L||!W||!z||!Z},{sort:function(te){te!==void 0&&g(te);var re=v(this);if(Z)return te===void 0?q(re):q(re,te);var he,ue,ye=[],de=w(re);for(ue=0;ue<de;ue++)ue in re&&R(ye,re[ue]);for(T(ye,function($){return function(H,X){return X===void 0?-1:H===void 0?1:$!==void 0?+$(H,X)||0:S(H)>S(X)?1:-1}}(te)),he=w(ye),ue=0;ue<he;)re[ue]=ye[ue++];for(;ue<de;)E(re,ue++);return re}})},4554:function(l,b,a){var p=a(6518),y=a(8981),g=a(5610),v=a(1291),w=a(6198),E=a(4527),S=a(6837),A=a(1469),T=a(4659),O=a(4606),N=a(597)("splice"),D=Math.max,U=Math.min;p({target:"Array",proto:!0,forced:!N},{splice:function(V,F){var q,R,L,W,z,Z,te=y(this),re=w(te),he=g(V,re),ue=arguments.length;for(ue===0?q=R=0:ue===1?(q=0,R=re-he):(q=ue-2,R=U(D(v(F),0),re-he)),S(re+q-R),L=A(te,R),W=0;W<R;W++)(z=he+W)in te&&T(L,W,te[z]);if(L.length=R,q<R){for(W=he;W<re-R;W++)Z=W+q,(z=W+R)in te?te[Z]=te[z]:O(te,Z);for(W=re;W>re-R+q;W--)O(te,W-1)}else if(q>R)for(W=re-R;W>he;W--)Z=W+q-1,(z=W+R-1)in te?te[Z]=te[z]:O(te,Z);for(W=0;W<q;W++)te[W+he]=arguments[W+2];return E(te,re-R+q),L}})},739:function(l,b,a){var p=a(6518),y=a(9039),g=a(8981),v=a(2777);p({target:"Date",proto:!0,arity:1,forced:y(function(){return new Date(NaN).toJSON()!==null||Date.prototype.toJSON.call({toISOString:function(){return 1}})!==1})},{toJSON:function(w){var E=g(this),S=v(E,"number");return typeof S!="number"||isFinite(S)?E.toISOString():null}})},9572:function(l,b,a){var p=a(9297),y=a(6840),g=a(3640),v=a(8227)("toPrimitive"),w=Date.prototype;p(w,v)||y(w,v,g)},2010:function(l,b,a){var p=a(3724),y=a(350).EXISTS,g=a(9504),v=a(2106),w=Function.prototype,E=g(w.toString),S=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,A=g(S.exec);p&&!y&&v(w,"name",{configurable:!0,get:function(){try{return A(S,E(this))[1]}catch{return""}}})},3110:function(l,b,a){var p=a(6518),y=a(7751),g=a(8745),v=a(9565),w=a(9504),E=a(9039),S=a(4901),A=a(757),T=a(7680),O=a(6933),N=a(4495),D=String,U=y("JSON","stringify"),V=w(/./.exec),F=w("".charAt),q=w("".charCodeAt),R=w("".replace),L=w(1 .toString),W=/[\uD800-\uDFFF]/g,z=/^[\uD800-\uDBFF]$/,Z=/^[\uDC00-\uDFFF]$/,te=!N||E(function(){var ye=y("Symbol")("stringify detection");return U([ye])!=="[null]"||U({a:ye})!=="{}"||U(Object(ye))!=="{}"}),re=E(function(){return U("\uDF06\uD834")!=='"\\udf06\\ud834"'||U("\uDEAD")!=='"\\udead"'}),he=function(ye,de){var $=T(arguments),H=O(de);if(S(H)||ye!==void 0&&!A(ye))return $[1]=function(X,C){if(S(H)&&(C=v(H,this,D(X),C)),!A(C))return C},g(U,null,$)},ue=function(ye,de,$){var H=F($,de-1),X=F($,de+1);return V(z,ye)&&!V(Z,X)||V(Z,ye)&&!V(z,H)?"\\u"+L(q(ye,0),16):ye};U&&p({target:"JSON",stat:!0,arity:3,forced:te||re},{stringify:function(ye,de,$){var H=T(arguments),X=g(te?he:U,null,H);return re&&typeof X=="string"?R(X,W,ue):X}})},2892:function(l,b,a){var p=a(6518),y=a(6395),g=a(3724),v=a(4475),w=a(9167),E=a(9504),S=a(2796),A=a(9297),T=a(3167),O=a(1625),N=a(757),D=a(2777),U=a(9039),V=a(8480).f,F=a(7347).f,q=a(4913).f,R=a(1240),L=a(3802).trim,W="Number",z=v[W],Z=w[W],te=z.prototype,re=v.TypeError,he=E("".slice),ue=E("".charCodeAt),ye=function(X){var C,j,B,M,ee,J,Q,Y,pe=D(X,"number");if(N(pe))throw new re("Cannot convert a Symbol value to a number");if(typeof pe=="string"&&pe.length>2){if(pe=L(pe),(C=ue(pe,0))===43||C===45){if((j=ue(pe,2))===88||j===120)return NaN}else if(C===48){switch(ue(pe,1)){case 66:case 98:B=2,M=49;break;case 79:case 111:B=8,M=55;break;default:return+pe}for(J=(ee=he(pe,2)).length,Q=0;Q<J;Q++)if((Y=ue(ee,Q))<48||Y>M)return NaN;return parseInt(ee,B)}}return+pe},de=S(W,!z(" 0o1")||!z("0b1")||z("+0x1")),$=function(X){var C,j=arguments.length<1?0:z(function(B){var M=D(B,"number");return typeof M=="bigint"?M:ye(M)}(X));return O(te,C=this)&&U(function(){R(C)})?T(Object(j),this,$):j};$.prototype=te,de&&!y&&(te.constructor=$),p({global:!0,constructor:!0,wrap:!0,forced:de},{Number:$});var H=function(X,C){for(var j,B=g?V(C):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),M=0;B.length>M;M++)A(C,j=B[M])&&!A(X,j)&&q(X,j,F(C,j))};y&&Z&&H(w[W],Z),(de||y)&&H(w[W],z)},2637:function(l,b,a){a(6518)({target:"Number",stat:!0},{isInteger:a(2087)})},9085:function(l,b,a){var p=a(6518),y=a(4213);p({target:"Object",stat:!0,arity:2,forced:Object.assign!==y},{assign:y})},7427:function(l,b,a){var p=a(6518),y=a(3724),g=a(2551),v=a(9306),w=a(8981),E=a(4913);y&&p({target:"Object",proto:!0,forced:g},{__defineGetter__:function(S,A){E.f(w(this),S,{get:v(A),enumerable:!0,configurable:!0})}})},3851:function(l,b,a){var p=a(6518),y=a(9039),g=a(5397),v=a(7347).f,w=a(3724);p({target:"Object",stat:!0,forced:!w||y(function(){v(1)}),sham:!w},{getOwnPropertyDescriptor:function(E,S){return v(g(E),S)}})},1278:function(l,b,a){var p=a(6518),y=a(3724),g=a(5031),v=a(5397),w=a(7347),E=a(4659);p({target:"Object",stat:!0,sham:!y},{getOwnPropertyDescriptors:function(S){for(var A,T,O=v(S),N=w.f,D=g(O),U={},V=0;D.length>V;)(T=N(O,A=D[V++]))!==void 0&&E(U,A,T);return U}})},1480:function(l,b,a){var p=a(6518),y=a(9039),g=a(298).f;p({target:"Object",stat:!0,forced:y(function(){return!Object.getOwnPropertyNames(1)})},{getOwnPropertyNames:g})},9773:function(l,b,a){var p=a(6518),y=a(4495),g=a(9039),v=a(3717),w=a(8981);p({target:"Object",stat:!0,forced:!y||g(function(){v.f(1)})},{getOwnPropertySymbols:function(E){var S=v.f;return S?S(w(E)):[]}})},9432:function(l,b,a){var p=a(6518),y=a(8981),g=a(1072);p({target:"Object",stat:!0,forced:a(9039)(function(){g(1)})},{keys:function(v){return g(y(v))}})},6099:function(l,b,a){var p=a(2140),y=a(6840),g=a(3179);p||y(Object.prototype,"toString",g,{unsafe:!0})},4864:function(l,b,a){var p=a(3724),y=a(4475),g=a(9504),v=a(2796),w=a(3167),E=a(6699),S=a(2360),A=a(8480).f,T=a(1625),O=a(788),N=a(655),D=a(1034),U=a(8429),V=a(1056),F=a(6840),q=a(9039),R=a(9297),L=a(1181).enforce,W=a(7633),z=a(8227),Z=a(3635),te=a(8814),re=z("match"),he=y.RegExp,ue=he.prototype,ye=y.SyntaxError,de=g(ue.exec),$=g("".charAt),H=g("".replace),X=g("".indexOf),C=g("".slice),j=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,B=/a/g,M=/a/g,ee=new he(B)!==B,J=U.MISSED_STICKY,Q=U.UNSUPPORTED_Y;if(v("RegExp",p&&(!ee||J||Z||te||q(function(){return M[re]=!1,he(B)!==B||he(M)===M||String(he(B,"i"))!=="/a/i"})))){for(var Y=function(le,ie){var be,ae,Ce,_e,Ye,rt,yt=T(ue,this),pt=O(le),zn=ie===void 0,ut=[],rn=le;if(!yt&&pt&&zn&&le.constructor===Y)return le;if((pt||T(ue,le))&&(le=le.source,zn&&(ie=D(rn))),le=le===void 0?"":N(le),ie=ie===void 0?"":N(ie),rn=le,Z&&"dotAll"in B&&(ae=!!ie&&X(ie,"s")>-1)&&(ie=H(ie,/s/g,"")),be=ie,J&&"sticky"in B&&(Ce=!!ie&&X(ie,"y")>-1)&&Q&&(ie=H(ie,/y/g,"")),te&&(_e=function(mt){for(var Re,dn=mt.length,Bt=0,pn="",sn=[],mn=S(null),Rn=!1,Fn=!1,_n=0,gn="";Bt<=dn;Bt++){if((Re=$(mt,Bt))==="\\")Re+=$(mt,++Bt);else if(Re==="]")Rn=!1;else if(!Rn)switch(!0){case Re==="[":Rn=!0;break;case Re==="(":de(j,C(mt,Bt+1))&&(Bt+=2,Fn=!0),pn+=Re,_n++;continue;case(Re===">"&&Fn):if(gn===""||R(mn,gn))throw new ye("Invalid capture group name");mn[gn]=!0,sn[sn.length]=[gn,_n],Fn=!1,gn="";continue}Fn?gn+=Re:pn+=Re}return[pn,sn]}(le),le=_e[0],ut=_e[1]),Ye=w(he(le,ie),yt?this:ue,Y),(ae||Ce||ut.length)&&(rt=L(Ye),ae&&(rt.dotAll=!0,rt.raw=Y(function(mt){for(var Re,dn=mt.length,Bt=0,pn="",sn=!1;Bt<=dn;Bt++)(Re=$(mt,Bt))!=="\\"?sn||Re!=="."?(Re==="["?sn=!0:Re==="]"&&(sn=!1),pn+=Re):pn+="[\\s\\S]":pn+=Re+$(mt,++Bt);return pn}(le),be)),Ce&&(rt.sticky=!0),ut.length&&(rt.groups=ut)),le!==rn)try{E(Ye,"source",rn===""?"(?:)":rn)}catch{}return Ye},pe=A(he),ge=0;pe.length>ge;)V(Y,he,pe[ge++]);ue.constructor=Y,Y.prototype=ue,F(y,"RegExp",Y,{constructor:!0})}W("RegExp")},7495:function(l,b,a){var p=a(6518),y=a(7323);p({target:"RegExp",proto:!0,forced:/./.exec!==y},{exec:y})},8781:function(l,b,a){var p=a(350).PROPER,y=a(6840),g=a(8551),v=a(655),w=a(9039),E=a(1034),S="toString",A=RegExp.prototype,T=A[S],O=w(function(){return T.call({source:"a",flags:"b"})!=="/a/b"}),N=p&&T.name!==S;(O||N)&&y(A,S,function(){var D=g(this);return"/"+v(D.source)+"/"+v(E(D))},{unsafe:!0})},1699:function(l,b,a){var p=a(6518),y=a(9504),g=a(5749),v=a(7750),w=a(655),E=a(1436),S=y("".indexOf);p({target:"String",proto:!0,forced:!E("includes")},{includes:function(A){return!!~S(w(v(this)),w(g(A)),arguments.length>1?arguments[1]:void 0)}})},7764:function(l,b,a){var p=a(8183).charAt,y=a(655),g=a(1181),v=a(1088),w=a(2529),E="String Iterator",S=g.set,A=g.getterFor(E);v(String,"String",function(T){S(this,{type:E,string:y(T),index:0})},function(){var T,O=A(this),N=O.string,D=O.index;return D>=N.length?w(void 0,!0):(T=p(N,D),O.index+=T.length,w(T,!1))})},8543:function(l,b,a){var p=a(6518),y=a(9565),g=a(7476),v=a(3994),w=a(2529),E=a(7750),S=a(8014),A=a(655),T=a(8551),O=a(4117),N=a(4576),D=a(788),U=a(1034),V=a(5966),F=a(6840),q=a(9039),R=a(8227),L=a(2293),W=a(7829),z=a(6682),Z=a(1181),te=a(6395),re=R("matchAll"),he="RegExp String",ue=he+" Iterator",ye=Z.set,de=Z.getterFor(ue),$=RegExp.prototype,H=TypeError,X=g("".indexOf),C=g("".matchAll),j=!!C&&!q(function(){C("a",/./)}),B=v(function(ee,J,Q,Y){ye(this,{type:ue,regexp:ee,string:J,global:Q,unicode:Y,done:!1})},he,function(){var ee=de(this);if(ee.done)return w(void 0,!0);var J=ee.regexp,Q=ee.string,Y=z(J,Q);return Y===null?(ee.done=!0,w(void 0,!0)):ee.global?(A(Y[0])===""&&(J.lastIndex=W(Q,S(J.lastIndex),ee.unicode)),w(Y,!1)):(ee.done=!0,w(Y,!1))}),M=function(ee){var J,Q,Y,pe=T(this),ge=A(ee),le=L(pe,RegExp),ie=A(U(pe));return J=new le(le===RegExp?pe.source:pe,ie),Q=!!~X(ie,"g"),Y=!!~X(ie,"u"),J.lastIndex=S(pe.lastIndex),new B(J,ge,Q,Y)};p({target:"String",proto:!0,forced:j},{matchAll:function(ee){var J,Q,Y,pe,ge=E(this);if(O(ee)){if(j)return C(ge,ee)}else{if(D(ee)&&(J=A(E(U(ee))),!~X(J,"g")))throw new H("`.matchAll` does not allow non-global regexes");if(j)return C(ge,ee);if((Y=V(ee,re))===void 0&&te&&N(ee)==="RegExp"&&(Y=M),Y)return y(Y,ee,ge)}return Q=A(ge),pe=new RegExp(ee,"g"),te?y(M,pe,Q):pe[re](Q)}}),te||re in $||F($,re,M)},1761:function(l,b,a){var p=a(9565),y=a(9228),g=a(8551),v=a(4117),w=a(8014),E=a(655),S=a(7750),A=a(5966),T=a(7829),O=a(6682);y("match",function(N,D,U){return[function(V){var F=S(this),q=v(V)?void 0:A(V,N);return q?p(q,V,F):new RegExp(V)[N](E(F))},function(V){var F=g(this),q=E(V),R=U(D,F,q);if(R.done)return R.value;if(!F.global)return O(F,q);var L=F.unicode;F.lastIndex=0;for(var W,z=[],Z=0;(W=O(F,q))!==null;){var te=E(W[0]);z[Z]=te,te===""&&(F.lastIndex=T(q,w(F.lastIndex),L)),Z++}return Z===0?null:z}]})},5440:function(l,b,a){var p=a(8745),y=a(9565),g=a(9504),v=a(9228),w=a(9039),E=a(8551),S=a(4901),A=a(4117),T=a(1291),O=a(8014),N=a(655),D=a(7750),U=a(7829),V=a(5966),F=a(2478),q=a(6682),R=a(8227)("replace"),L=Math.max,W=Math.min,z=g([].concat),Z=g([].push),te=g("".indexOf),re=g("".slice),he="a".replace(/./,"$0")==="$0",ue=!!/./[R]&&/./[R]("a","$0")==="";v("replace",function(ye,de,$){var H=ue?"$":"$0";return[function(X,C){var j=D(this),B=A(X)?void 0:V(X,R);return B?y(B,X,j,C):y(de,N(j),X,C)},function(X,C){var j=E(this),B=N(X);if(typeof C=="string"&&te(C,H)===-1&&te(C,"$<")===-1){var M=$(de,j,B,C);if(M.done)return M.value}var ee=S(C);ee||(C=N(C));var J,Q=j.global;Q&&(J=j.unicode,j.lastIndex=0);for(var Y,pe=[];(Y=q(j,B))!==null&&(Z(pe,Y),Q);)N(Y[0])===""&&(j.lastIndex=U(B,O(j.lastIndex),J));for(var ge,le="",ie=0,be=0;be<pe.length;be++){for(var ae,Ce=N((Y=pe[be])[0]),_e=L(W(T(Y.index),B.length),0),Ye=[],rt=1;rt<Y.length;rt++)Z(Ye,(ge=Y[rt])===void 0?ge:String(ge));var yt=Y.groups;if(ee){var pt=z([Ce],Ye,_e,B);yt!==void 0&&Z(pt,yt),ae=N(p(C,void 0,pt))}else ae=F(Ce,B,_e,Ye,yt,C);_e>=ie&&(le+=re(B,ie,_e)+ae,ie=_e+Ce.length)}return le+re(B,ie)}]},!!w(function(){var ye=/./;return ye.exec=function(){var de=[];return de.groups={a:"7"},de},"".replace(ye,"$<a>")!=="7"})||!he||ue)},744:function(l,b,a){var p=a(9565),y=a(9504),g=a(9228),v=a(8551),w=a(4117),E=a(7750),S=a(2293),A=a(7829),T=a(8014),O=a(655),N=a(5966),D=a(6682),U=a(8429),V=a(9039),F=U.UNSUPPORTED_Y,q=Math.min,R=y([].push),L=y("".slice),W=!V(function(){var Z=/(?:)/,te=Z.exec;Z.exec=function(){return te.apply(this,arguments)};var re="ab".split(Z);return re.length!==2||re[0]!=="a"||re[1]!=="b"}),z="abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length;g("split",function(Z,te,re){var he="0".split(void 0,0).length?function(ue,ye){return ue===void 0&&ye===0?[]:p(te,this,ue,ye)}:te;return[function(ue,ye){var de=E(this),$=w(ue)?void 0:N(ue,Z);return $?p($,ue,de,ye):p(he,O(de),ue,ye)},function(ue,ye){var de=v(this),$=O(ue);if(!z){var H=re(he,de,$,ye,he!==te);if(H.done)return H.value}var X=S(de,RegExp),C=de.unicode,j=(de.ignoreCase?"i":"")+(de.multiline?"m":"")+(de.unicode?"u":"")+(F?"g":"y"),B=new X(F?"^(?:"+de.source+")":de,j),M=ye===void 0?4294967295:ye>>>0;if(M===0)return[];if($.length===0)return D(B,$)===null?[$]:[];for(var ee=0,J=0,Q=[];J<$.length;){B.lastIndex=F?0:J;var Y,pe=D(B,F?L($,J):$);if(pe===null||(Y=q(T(B.lastIndex+(F?J:0)),$.length))===ee)J=A($,J,C);else{if(R(Q,L($,ee,J)),Q.length===M)return Q;for(var ge=1;ge<=pe.length-1;ge++)if(R(Q,pe[ge]),Q.length===M)return Q;J=ee=Y}}return R(Q,L($,ee)),Q}]},z||!W,F)},2762:function(l,b,a){var p=a(6518),y=a(3802).trim;p({target:"String",proto:!0,forced:a(706)("trim")},{trim:function(){return y(this)}})},6761:function(l,b,a){var p=a(6518),y=a(4475),g=a(9565),v=a(9504),w=a(6395),E=a(3724),S=a(4495),A=a(9039),T=a(9297),O=a(1625),N=a(8551),D=a(5397),U=a(6969),V=a(655),F=a(6980),q=a(2360),R=a(1072),L=a(8480),W=a(298),z=a(3717),Z=a(7347),te=a(4913),re=a(6801),he=a(8773),ue=a(6840),ye=a(2106),de=a(5745),$=a(6119),H=a(421),X=a(3392),C=a(8227),j=a(1951),B=a(511),M=a(8242),ee=a(687),J=a(1181),Q=a(9213).forEach,Y=$("hidden"),pe="Symbol",ge="prototype",le=J.set,ie=J.getterFor(pe),be=Object[ge],ae=y.Symbol,Ce=ae&&ae[ge],_e=y.RangeError,Ye=y.TypeError,rt=y.QObject,yt=Z.f,pt=te.f,zn=W.f,ut=he.f,rn=v([].push),mt=de("symbols"),Re=de("op-symbols"),dn=de("wks"),Bt=!rt||!rt[ge]||!rt[ge].findChild,pn=function(Ae,We,Pe){var $e=yt(be,We);$e&&delete be[We],pt(Ae,We,Pe),$e&&Ae!==be&&pt(be,We,$e)},sn=E&&A(function(){return q(pt({},"a",{get:function(){return pt(this,"a",{value:7}).a}})).a!==7})?pn:pt,mn=function(Ae,We){var Pe=mt[Ae]=q(Ce);return le(Pe,{type:pe,tag:Ae,description:We}),E||(Pe.description=We),Pe},Rn=function(Ae,We,Pe){Ae===be&&Rn(Re,We,Pe),N(Ae);var $e=U(We);return N(Pe),T(mt,$e)?(Pe.enumerable?(T(Ae,Y)&&Ae[Y][$e]&&(Ae[Y][$e]=!1),Pe=q(Pe,{enumerable:F(0,!1)})):(T(Ae,Y)||pt(Ae,Y,F(1,q(null))),Ae[Y][$e]=!0),sn(Ae,$e,Pe)):pt(Ae,$e,Pe)},Fn=function(Ae,We){N(Ae);var Pe=D(We),$e=R(Pe).concat(Qn(Pe));return Q($e,function(kt){E&&!g(_n,Pe,kt)||Rn(Ae,kt,Pe[kt])}),Ae},_n=function(Ae){var We=U(Ae),Pe=g(ut,this,We);return!(this===be&&T(mt,We)&&!T(Re,We))&&(!(Pe||!T(this,We)||!T(mt,We)||T(this,Y)&&this[Y][We])||Pe)},gn=function(Ae,We){var Pe=D(Ae),$e=U(We);if(Pe!==be||!T(mt,$e)||T(Re,$e)){var kt=yt(Pe,$e);return!kt||!T(mt,$e)||T(Pe,Y)&&Pe[Y][$e]||(kt.enumerable=!0),kt}},At=function(Ae){var We=zn(D(Ae)),Pe=[];return Q(We,function($e){T(mt,$e)||T(H,$e)||rn(Pe,$e)}),Pe},Qn=function(Ae){var We=Ae===be,Pe=zn(We?Re:D(Ae)),$e=[];return Q(Pe,function(kt){!T(mt,kt)||We&&!T(be,kt)||rn($e,mt[kt])}),$e};S||(ae=function(){if(O(Ce,this))throw new Ye("Symbol is not a constructor");var Ae=arguments.length&&arguments[0]!==void 0?V(arguments[0]):void 0,We=X(Ae),Pe=function($e){var kt=this===void 0?y:this;kt===be&&g(Pe,Re,$e),T(kt,Y)&&T(kt[Y],We)&&(kt[Y][We]=!1);var Ps=F(1,$e);try{sn(kt,We,Ps)}catch(vi){if(!(vi instanceof _e))throw vi;pn(kt,We,Ps)}};return E&&Bt&&sn(be,We,{configurable:!0,set:Pe}),mn(We,Ae)},ue(Ce=ae[ge],"toString",function(){return ie(this).tag}),ue(ae,"withoutSetter",function(Ae){return mn(X(Ae),Ae)}),he.f=_n,te.f=Rn,re.f=Fn,Z.f=gn,L.f=W.f=At,z.f=Qn,j.f=function(Ae){return mn(C(Ae),Ae)},E&&(ye(Ce,"description",{configurable:!0,get:function(){return ie(this).description}}),w||ue(be,"propertyIsEnumerable",_n,{unsafe:!0}))),p({global:!0,constructor:!0,wrap:!0,forced:!S,sham:!S},{Symbol:ae}),Q(R(dn),function(Ae){B(Ae)}),p({target:pe,stat:!0,forced:!S},{useSetter:function(){Bt=!0},useSimple:function(){Bt=!1}}),p({target:"Object",stat:!0,forced:!S,sham:!E},{create:function(Ae,We){return We===void 0?q(Ae):Fn(q(Ae),We)},defineProperty:Rn,defineProperties:Fn,getOwnPropertyDescriptor:gn}),p({target:"Object",stat:!0,forced:!S},{getOwnPropertyNames:At}),M(),ee(ae,pe),H[Y]=!0},9463:function(l,b,a){var p=a(6518),y=a(3724),g=a(4475),v=a(9504),w=a(9297),E=a(4901),S=a(1625),A=a(655),T=a(2106),O=a(7740),N=g.Symbol,D=N&&N.prototype;if(y&&E(N)&&(!("description"in D)||N().description!==void 0)){var U={},V=function(){var Z=arguments.length<1||arguments[0]===void 0?void 0:A(arguments[0]),te=S(D,this)?new N(Z):Z===void 0?N():N(Z);return Z===""&&(U[te]=!0),te};O(V,N),V.prototype=D,D.constructor=V;var F=String(N("description detection"))==="Symbol(description detection)",q=v(D.valueOf),R=v(D.toString),L=/^Symbol\((.*)\)[^)]+$/,W=v("".replace),z=v("".slice);T(D,"description",{configurable:!0,get:function(){var Z=q(this);if(w(U,Z))return"";var te=R(Z),re=F?z(te,7,-1):W(te,L,"$1");return re===""?void 0:re}}),p({global:!0,constructor:!0,forced:!0},{Symbol:V})}},1510:function(l,b,a){var p=a(6518),y=a(7751),g=a(9297),v=a(655),w=a(5745),E=a(1296),S=w("string-to-symbol-registry"),A=w("symbol-to-string-registry");p({target:"Symbol",stat:!0,forced:!E},{for:function(T){var O=v(T);if(g(S,O))return S[O];var N=y("Symbol")(O);return S[O]=N,A[N]=O,N}})},2259:function(l,b,a){a(511)("iterator")},2675:function(l,b,a){a(6761),a(1510),a(7812),a(3110),a(9773)},7812:function(l,b,a){var p=a(6518),y=a(9297),g=a(757),v=a(6823),w=a(5745),E=a(1296),S=w("symbol-to-string-registry");p({target:"Symbol",stat:!0,forced:!E},{keyFor:function(A){if(!g(A))throw new TypeError(v(A)+" is not a symbol");if(y(S,A))return S[A]}})},5700:function(l,b,a){var p=a(511),y=a(8242);p("toPrimitive"),y()},8344:function(l,b,a){a(8543)},3500:function(l,b,a){var p=a(4475),y=a(7400),g=a(9296),v=a(235),w=a(6699),E=function(A){if(A&&A.forEach!==v)try{w(A,"forEach",v)}catch{A.forEach=v}};for(var S in y)y[S]&&E(p[S]&&p[S].prototype);E(g)},2953:function(l,b,a){var p=a(4475),y=a(7400),g=a(9296),v=a(3792),w=a(6699),E=a(687),S=a(8227)("iterator"),A=v.values,T=function(N,D){if(N){if(N[S]!==A)try{w(N,S,A)}catch{N[S]=A}if(E(N,D,!0),y[D]){for(var U in v)if(N[U]!==v[U])try{w(N,U,v[U])}catch{N[U]=v[U]}}}};for(var O in y)T(p[O]&&p[O].prototype,O);T(g,"DOMTokenList")}},d={};function f(l){var b=d[l];if(b!==void 0)return b.exports;var a=d[l]={exports:{}};return u[l].call(a.exports,a,a.exports,f),a.exports}f.d=function(l,b){for(var a in b)f.o(b,a)&&!f.o(l,a)&&Object.defineProperty(l,a,{enumerable:!0,get:b[a]})},f.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),f.o=function(l,b){return Object.prototype.hasOwnProperty.call(l,b)},f.r=function(l){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})};var h={};return function(){function l($){return function(H){if(Array.isArray(H))return a(H)}($)||function(H){if(typeof Symbol<"u"&&H[Symbol.iterator]!=null||H["@@iterator"]!=null)return Array.from(H)}($)||b($)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
98
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function b($,H){if($){if(typeof $=="string")return a($,H);var X=Object.prototype.toString.call($).slice(8,-1);return X==="Object"&&$.constructor&&(X=$.constructor.name),X==="Map"||X==="Set"?Array.from($):X==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(X)?a($,H):void 0}}function a($,H){(H==null||H>$.length)&&(H=$.length);for(var X=0,C=new Array(H);X<H;X++)C[X]=$[X];return C}function p($){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},p($)}function y($,H){for(var X=0;X<H.length;X++){var C=H[X];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty($,v(C.key),C)}}function g($,H,X){return(H=v(H))in $?Object.defineProperty($,H,{value:X,enumerable:!0,configurable:!0,writable:!0}):$[H]=X,$}function v($){var H=function(X,C){if(p(X)!="object"||!X)return X;var j=X[Symbol.toPrimitive];if(j!==void 0){var B=j.call(X,C||"default");if(p(B)!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(X)}($,"string");return p(H)=="symbol"?H:H+""}f.r(h),f.d(h,{SimpleKeyboard:function(){return ye},default:function(){return de}}),f(5276),f(8598),f(4782),f(4554),f(2010),f(7427),f(6099),f(7495),f(8781),f(5440),f(744),f(2762),typeof Element>"u"||"remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)}),typeof self<"u"&&"document"in self&&((!("classList"in document.createElement("_"))||document.createElementNS&&!("classList"in document.createElementNS("http://www.w3.org/2000/svg","g")))&&function($){if("Element"in $){var H="classList",X="prototype",C=$.Element[X],j=Object,B=String[X].trim||function(){return this.replace(/^\s+|\s+$/g,"")},M=Array[X].indexOf||function(le){for(var ie=0,be=this.length;ie<be;ie++)if(ie in this&&this[ie]===le)return ie;return-1},ee=function(le,ie){this.name=le,this.code=DOMException[le],this.message=ie},J=function(le,ie){if(ie==="")throw new ee("SYNTAX_ERR","The token must not be empty.");if(/\s/.test(ie))throw new ee("INVALID_CHARACTER_ERR","The token must not contain space characters.");return M.call(le,ie)},Q=function(le){for(var ie=B.call(le.getAttribute("class")||""),be=ie?ie.split(/\s+/):[],ae=0,Ce=be.length;ae<Ce;ae++)this.push(be[ae]);this._updateClassName=function(){le.setAttribute("class",this.toString())}},Y=Q[X]=[],pe=function(){return new Q(this)};if(ee[X]=Error[X],Y.item=function(le){return this[le]||null},Y.contains=function(le){return~J(this,le+"")},Y.add=function(){var le,ie=arguments,be=0,ae=ie.length,Ce=!1;do~J(this,le=ie[be]+"")||(this.push(le),Ce=!0);while(++be<ae);Ce&&this._updateClassName()},Y.remove=function(){var le,ie,be=arguments,ae=0,Ce=be.length,_e=!1;do for(ie=J(this,le=be[ae]+"");~ie;)this.splice(ie,1),_e=!0,ie=J(this,le);while(++ae<Ce);_e&&this._updateClassName()},Y.toggle=function(le,ie){var be=this.contains(le),ae=be?ie!==!0&&"remove":ie!==!1&&"add";return ae&&this[ae](le),ie===!0||ie===!1?ie:!be},Y.replace=function(le,ie){var be=J(le+"");~be&&(this.splice(be,1,ie),this._updateClassName())},Y.toString=function(){return this.join(" ")},j.defineProperty){var ge={get:pe,enumerable:!0,configurable:!0};try{j.defineProperty(C,H,ge)}catch(le){le.number!==void 0&&le.number!==-2146823252||(ge.enumerable=!1,j.defineProperty(C,H,ge))}}else j[X].__defineGetter__&&C.__defineGetter__(H,pe)}}(self),function(){var $=document.createElement("_");if($.classList.add("c1","c2"),!$.classList.contains("c2")){var H=function(C){var j=DOMTokenList.prototype[C];DOMTokenList.prototype[C]=function(B){var M,ee=arguments.length;for(M=0;M<ee;M++)B=arguments[M],j.call(this,B)}};H("add"),H("remove")}if($.classList.toggle("c3",!1),$.classList.contains("c3")){var X=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(C,j){return 1 in arguments&&!this.contains(C)==!j?j:X.call(this,C)}}"replace"in document.createElement("_").classList||(DOMTokenList.prototype.replace=function(C,j){var B=this.toString().split(" "),M=B.indexOf(C+"");~M&&(B=B.slice(M),this.remove.apply(this,B),this.add(j),this.add.apply(this,B.slice(1)))}),$=null}()),f(2675),f(9463),f(2259),f(5700),f(8706),f(2008),f(3418),f(4423),f(3792),f(2062),f(6910),f(739),f(9572),f(2892),f(9085),f(3851),f(1278),f(9432),f(4864),f(1699),f(7764),f(8344),f(3500),f(2953),f(2712),f(2637),f(1480),f(1761);var w=function(){return $=function C(j){var B=j.getOptions,M=j.getCaretPosition,ee=j.getCaretPositionEnd,J=j.dispatch;(function(Q,Y){if(!(Q instanceof Y))throw new TypeError("Cannot call a class as a function")})(this,C),g(this,"getOptions",void 0),g(this,"getCaretPosition",void 0),g(this,"getCaretPositionEnd",void 0),g(this,"dispatch",void 0),g(this,"maxLengthReached",void 0),g(this,"isStandardButton",function(Q){return Q&&!(Q[0]==="{"&&Q[Q.length-1]==="}")}),this.getOptions=B,this.getCaretPosition=M,this.getCaretPositionEnd=ee,this.dispatch=J,C.bindMethods(C,this)},H=[{key:"getButtonType",value:function(C){return C.includes("{")&&C.includes("}")&&C!=="{//}"?"functionBtn":"standardBtn"}},{key:"getButtonClass",value:function(C){var j=this.getButtonType(C),B=C.replace("{","").replace("}",""),M="";return j!=="standardBtn"&&(M=" hg-button-".concat(B)),"hg-".concat(j).concat(M)}},{key:"getDefaultDiplay",value:function(){return{"{bksp}":"backspace","{backspace}":"backspace","{enter}":"< enter","{shift}":"shift","{shiftleft}":"shift","{shiftright}":"shift","{alt}":"alt","{s}":"shift","{tab}":"tab","{lock}":"caps","{capslock}":"caps","{accept}":"Submit","{space}":" ","{//}":" ","{esc}":"esc","{escape}":"esc","{f1}":"f1","{f2}":"f2","{f3}":"f3","{f4}":"f4","{f5}":"f5","{f6}":"f6","{f7}":"f7","{f8}":"f8","{f9}":"f9","{f10}":"f10","{f11}":"f11","{f12}":"f12","{numpaddivide}":"/","{numlock}":"lock","{arrowup}":"↑","{arrowleft}":"←","{arrowdown}":"↓","{arrowright}":"→","{prtscr}":"print","{scrolllock}":"scroll","{pause}":"pause","{insert}":"ins","{home}":"home","{pageup}":"up","{delete}":"del","{forwarddelete}":"del","{end}":"end","{pagedown}":"down","{numpadmultiply}":"*","{numpadsubtract}":"-","{numpadadd}":"+","{numpadenter}":"enter","{period}":".","{numpaddecimal}":".","{numpad0}":"0","{numpad1}":"1","{numpad2}":"2","{numpad3}":"3","{numpad4}":"4","{numpad5}":"5","{numpad6}":"6","{numpad7}":"7","{numpad8}":"8","{numpad9}":"9"}}},{key:"getButtonDisplayName",value:function(C,j){return(j=arguments.length>2&&arguments[2]!==void 0&&arguments[2]?Object.assign({},this.getDefaultDiplay(),j):j||this.getDefaultDiplay())[C]||C}},{key:"getUpdatedInput",value:function(C,j,B){var M=arguments.length>3&&arguments[3]!==void 0?arguments[3]:B,ee=arguments.length>4&&arguments[4]!==void 0&&arguments[4],J=this.getOptions(),Q=[B,M,ee],Y=j;return(C==="{bksp}"||C==="{backspace}")&&Y.length>0?Y=this.removeAt.apply(this,[Y].concat(Q)):(C==="{delete}"||C==="{forwarddelete}")&&Y.length>0?Y=this.removeForwardsAt.apply(this,[Y].concat(Q)):C==="{space}"?Y=this.addStringAt.apply(this,[Y," "].concat(Q)):C!=="{tab}"||typeof J.tabCharOnTab=="boolean"&&J.tabCharOnTab===!1?C!=="{enter}"&&C!=="{numpadenter}"||!J.newLineOnEnter?C.includes("numpad")&&Number.isInteger(Number(C[C.length-2]))?Y=this.addStringAt.apply(this,[Y,C[C.length-2]].concat(Q)):C==="{numpaddivide}"?Y=this.addStringAt.apply(this,[Y,"/"].concat(Q)):C==="{numpadmultiply}"?Y=this.addStringAt.apply(this,[Y,"*"].concat(Q)):C==="{numpadsubtract}"?Y=this.addStringAt.apply(this,[Y,"-"].concat(Q)):C==="{numpadadd}"?Y=this.addStringAt.apply(this,[Y,"+"].concat(Q)):C==="{numpaddecimal}"?Y=this.addStringAt.apply(this,[Y,"."].concat(Q)):C==="{"||C==="}"?Y=this.addStringAt.apply(this,[Y,C].concat(Q)):C.includes("{")||C.includes("}")||(Y=this.addStringAt.apply(this,[Y,C].concat(Q))):Y=this.addStringAt.apply(this,[Y,`
99
+ `].concat(Q)):Y=this.addStringAt.apply(this,[Y," "].concat(Q)),J.debug&&console.log("Input will be: "+Y),Y}},{key:"updateCaretPos",value:function(C){var j=arguments.length>1&&arguments[1]!==void 0&&arguments[1],B=this.updateCaretPosAction(C,j);this.dispatch(function(M){M.setCaretPosition(B)})}},{key:"updateCaretPosAction",value:function(C){var j=arguments.length>1&&arguments[1]!==void 0&&arguments[1],B=this.getOptions(),M=this.getCaretPosition();return M!=null&&(j?M>0&&(M-=C):M+=C),B.debug&&console.log("Caret at:",M),M}},{key:"addStringAt",value:function(C,j){var B,M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:C.length,ee=arguments.length>3&&arguments[3]!==void 0?arguments[3]:C.length,J=arguments.length>4&&arguments[4]!==void 0&&arguments[4];return M||M===0?(B=[C.slice(0,M),j,C.slice(ee)].join(""),this.isMaxLengthReached()||J&&this.updateCaretPos(j.length)):B=C+j,B}},{key:"removeAt",value:function(C){var j,B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:C.length,M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:C.length,ee=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(B===0&&M===0)return C;if(B===M){var J=/([\uD800-\uDBFF][\uDC00-\uDFFF])/g;B&&B>=0?C.substring(B-2,B).match(J)?(j=C.substr(0,B-2)+C.substr(B),ee&&this.updateCaretPos(2,!0)):(j=C.substr(0,B-1)+C.substr(B),ee&&this.updateCaretPos(1,!0)):C.slice(-2).match(J)?(j=C.slice(0,-2),ee&&this.updateCaretPos(2,!0)):(j=C.slice(0,-1),ee&&this.updateCaretPos(1,!0))}else j=C.slice(0,B)+C.slice(M),ee&&this.dispatch(function(Q){Q.setCaretPosition(B)});return j}},{key:"removeForwardsAt",value:function(C){var j,B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:C.length,M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:C.length,ee=arguments.length>3&&arguments[3]!==void 0&&arguments[3];return C!=null&&C.length&&B!==null?(B===M?j=C.substring(B,B+2).match(/([\uD800-\uDBFF][\uDC00-\uDFFF])/g)?C.substr(0,B)+C.substr(B+2):C.substr(0,B)+C.substr(B+1):(j=C.slice(0,B)+C.slice(M),ee&&this.dispatch(function(J){J.setCaretPosition(B)})),j):C}},{key:"handleMaxLength",value:function(C,j){var B=this.getOptions(),M=B.maxLength,ee=C[B.inputName||"default"],J=j.length-1>=M;if(j.length<=ee.length)return!1;if(Number.isInteger(M))return B.debug&&console.log("maxLength (num) reached:",J),J?(this.maxLengthReached=!0,!0):(this.maxLengthReached=!1,!1);if(p(M)==="object"){var Q=j.length-1>=M[B.inputName||"default"];return B.debug&&console.log("maxLength (obj) reached:",Q),Q?(this.maxLengthReached=!0,!0):(this.maxLengthReached=!1,!1)}}},{key:"isMaxLengthReached",value:function(){return!!this.maxLengthReached}},{key:"isTouchDevice",value:function(){return"ontouchstart"in window||navigator.maxTouchPoints}},{key:"pointerEventsSupported",value:function(){return!!window.PointerEvent}},{key:"camelCase",value:function(C){return C?C.toLowerCase().trim().split(/[.\-_\s]/g).reduce(function(j,B){return B.length?j+B[0].toUpperCase()+B.slice(1):j}):""}},{key:"chunkArray",value:function(C,j){return l(Array(Math.ceil(C.length/j))).map(function(B,M){return C.slice(j*M,j+j*M)})}},{key:"escapeRegex",value:function(C){return C.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}},{key:"getRtlOffset",value:function(C,j){var B=C,M=j.indexOf("‫");return M<C&&M!=-1&&B--,j.indexOf("‬")<C&&M!=-1&&B--,B<0?0:B}}],X=[{key:"bindMethods",value:function(C,j){var B,M=function(J,Q){var Y=typeof Symbol<"u"&&J[Symbol.iterator]||J["@@iterator"];if(!Y){if(Array.isArray(J)||(Y=b(J))||Q){Y&&(J=Y);var pe=0,ge=function(){};return{s:ge,n:function(){return pe>=J.length?{done:!0}:{done:!1,value:J[pe++]}},e:function(ae){throw ae},f:ge}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
100
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var le,ie=!0,be=!1;return{s:function(){Y=Y.call(J)},n:function(){var ae=Y.next();return ie=ae.done,ae},e:function(ae){be=!0,le=ae},f:function(){try{ie||Y.return==null||Y.return()}finally{if(be)throw le}}}}(Object.getOwnPropertyNames(C.prototype));try{for(M.s();!(B=M.n()).done;){var ee=B.value;ee==="constructor"||ee==="bindMethods"||(j[ee]=j[ee].bind(j))}}catch(J){M.e(J)}finally{M.f()}}}],H&&y($.prototype,H),X&&y($,X),Object.defineProperty($,"prototype",{writable:!1}),$;var $,H,X}();g(w,"noop",function(){});var E=w;function S($){return S=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},S($)}function A($,H){for(var X=0;X<H.length;X++){var C=H[X];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty($,O(C.key),C)}}function T($,H,X){return(H=O(H))in $?Object.defineProperty($,H,{value:X,enumerable:!0,configurable:!0,writable:!0}):$[H]=X,$}function O($){var H=function(X,C){if(S(X)!="object"||!X)return X;var j=X[Symbol.toPrimitive];if(j!==void 0){var B=j.call(X,C);if(S(B)!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(X)}($,"string");return S(H)=="symbol"?H:H+""}var N=function(){return $=function C(j){var B=this,M=j.dispatch,ee=j.getOptions;(function(J,Q){if(!(J instanceof Q))throw new TypeError("Cannot call a class as a function")})(this,C),T(this,"getOptions",void 0),T(this,"dispatch",void 0),T(this,"isModifierKey",function(J){return J.altKey||J.ctrlKey||J.shiftKey||["Tab","CapsLock","Esc","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(J.code||J.key||B.keyCodeToKey(J==null?void 0:J.keyCode))}),this.dispatch=M,this.getOptions=ee,E.bindMethods(C,this)},(H=[{key:"handleHighlightKeyDown",value:function(C){var j=this.getOptions();j.physicalKeyboardHighlightPreventDefault&&this.isModifierKey(C)&&(C.preventDefault(),C.stopImmediatePropagation());var B=this.getSimpleKeyboardLayoutKey(C);this.dispatch(function(M){var ee,J,Q=M.getButtonElement(B),Y=M.getButtonElement("{".concat(B,"}"));if(Q)ee=Q,J=B;else{if(!Y)return;ee=Y,J="{".concat(B,"}")}var pe,ge,le,ie,be=function(Ce){Ce.style.background=j.physicalKeyboardHighlightBgColor||"#dadce4",Ce.style.color=j.physicalKeyboardHighlightTextColor||"black"};if(ee)if(Array.isArray(ee)){if(ee.forEach(function(Ce){return be(Ce)}),j.physicalKeyboardHighlightPress)if(j.physicalKeyboardHighlightPressUsePointerEvents)(pe=ee[0])===null||pe===void 0||(ge=pe.onpointerdown)===null||ge===void 0||ge.call(pe,C);else if(j.physicalKeyboardHighlightPressUseClick){var ae;(ae=ee[0])===null||ae===void 0||ae.click()}else M.handleButtonClicked(J,C)}else be(ee),j.physicalKeyboardHighlightPress&&(j.physicalKeyboardHighlightPressUsePointerEvents?(le=ee)===null||le===void 0||(ie=le.onpointerdown)===null||ie===void 0||ie.call(le,C):j.physicalKeyboardHighlightPressUseClick?ee.click():M.handleButtonClicked(J,C))})}},{key:"handleHighlightKeyUp",value:function(C){var j=this.getOptions();j.physicalKeyboardHighlightPreventDefault&&this.isModifierKey(C)&&(C.preventDefault(),C.stopImmediatePropagation());var B=this.getSimpleKeyboardLayoutKey(C);this.dispatch(function(M){var ee,J,Q,Y=M.getButtonElement(B)||M.getButtonElement("{".concat(B,"}")),pe=function(ge){ge.removeAttribute&&ge.removeAttribute("style")};Y&&(Array.isArray(Y)?(Y.forEach(function(ge){return pe(ge)}),j.physicalKeyboardHighlightPressUsePointerEvents&&((ee=Y[0])===null||ee===void 0||(J=ee.onpointerup)===null||J===void 0||J.call(ee,C))):(pe(Y),j.physicalKeyboardHighlightPressUsePointerEvents&&(Y==null||(Q=Y.onpointerup)===null||Q===void 0||Q.call(Y,C))))})}},{key:"getSimpleKeyboardLayoutKey",value:function(C){var j,B="",M=C.code||C.key||this.keyCodeToKey(C==null?void 0:C.keyCode);return(B=M!=null&&M.includes("Numpad")||M!=null&&M.includes("Shift")||M!=null&&M.includes("Space")||M!=null&&M.includes("Backspace")||M!=null&&M.includes("Control")||M!=null&&M.includes("Alt")||M!=null&&M.includes("Meta")?C.code||"":C.key||this.keyCodeToKey(C==null?void 0:C.keyCode)||"").length>1?(j=B)===null||j===void 0?void 0:j.toLowerCase():B}},{key:"keyCodeToKey",value:function(C){return{8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",91:"Meta",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9",106:"NumpadMultiply",107:"NumpadAdd",109:"NumpadSubtract",110:"NumpadDecimal",111:"NumpadDivide",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"}[C]||""}}])&&A($.prototype,H),X&&A($,X),Object.defineProperty($,"prototype",{writable:!1}),$;var $,H,X}();function D($){return D=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},D($)}function U($,H){for(var X=0;X<H.length;X++){var C=H[X];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty($,F(C.key),C)}}function V($,H,X){return(H=F(H))in $?Object.defineProperty($,H,{value:X,enumerable:!0,configurable:!0,writable:!0}):$[H]=X,$}function F($){var H=function(X,C){if(D(X)!="object"||!X)return X;var j=X[Symbol.toPrimitive];if(j!==void 0){var B=j.call(X,C);if(D(B)!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(X)}($,"string");return D(H)=="symbol"?H:H+""}var q=function(){return $=function C(j){var B=j.utilities,M=j.options;(function(ee,J){if(!(ee instanceof J))throw new TypeError("Cannot call a class as a function")})(this,C),V(this,"utilities",void 0),V(this,"options",void 0),V(this,"candidateBoxElement",void 0),V(this,"pageIndex",0),V(this,"pageSize",void 0),this.utilities=B,this.options=M,E.bindMethods(C,this),this.pageSize=this.utilities.getOptions().layoutCandidatesPageSize||5},H=[{key:"destroy",value:function(){this.candidateBoxElement&&(this.candidateBoxElement.remove(),this.pageIndex=0)}},{key:"show",value:function(C){var j=this,B=C.candidateValue,M=C.targetElement,ee=C.onSelect;if(B&&B.length){var J=this.utilities.chunkArray(B.split(" "),this.pageSize);this.renderPage({candidateListPages:J,targetElement:M,pageIndex:this.pageIndex,nbPages:J.length,onItemSelected:function(Q,Y){ee(Q,Y),j.destroy()}})}}},{key:"renderPage",value:function(C){var j,B=this,M=C.candidateListPages,ee=C.targetElement,J=C.pageIndex,Q=C.nbPages,Y=C.onItemSelected;(j=this.candidateBoxElement)===null||j===void 0||j.remove(),this.candidateBoxElement=document.createElement("div"),this.candidateBoxElement.className="hg-candidate-box";var pe=document.createElement("ul");pe.className="hg-candidate-box-list",M[J].forEach(function(_e){var Ye,rt=document.createElement("li"),yt=function(){var pt=new(B.options.useTouchEvents?TouchEvent:MouseEvent)("click");return Object.defineProperty(pt,"target",{value:rt}),pt};rt.className="hg-candidate-box-list-item",rt.innerHTML=((Ye=B.options.display)===null||Ye===void 0?void 0:Ye[_e])||_e,B.options.useTouchEvents?rt.ontouchstart=function(pt){return Y(_e,pt||yt())}:rt.onclick=function(){var pt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:yt();return Y(_e,pt)},pe.appendChild(rt)});var ge=J>0,le=document.createElement("div");le.classList.add("hg-candidate-box-prev"),ge&&le.classList.add("hg-candidate-box-btn-active");var ie=function(){ge&&B.renderPage({candidateListPages:M,targetElement:ee,pageIndex:J-1,nbPages:Q,onItemSelected:Y})};this.options.useTouchEvents?le.ontouchstart=ie:le.onclick=ie,this.candidateBoxElement.appendChild(le),this.candidateBoxElement.appendChild(pe);var be=J<Q-1,ae=document.createElement("div");ae.classList.add("hg-candidate-box-next"),be&&ae.classList.add("hg-candidate-box-btn-active");var Ce=function(){be&&B.renderPage({candidateListPages:M,targetElement:ee,pageIndex:J+1,nbPages:Q,onItemSelected:Y})};this.options.useTouchEvents?ae.ontouchstart=Ce:ae.onclick=Ce,this.candidateBoxElement.appendChild(ae),ee.prepend(this.candidateBoxElement)}}],H&&U($.prototype,H),X&&U($,X),Object.defineProperty($,"prototype",{writable:!1}),$;var $,H,X}(),R=q;function L($){return function(H){if(Array.isArray(H))return W(H)}($)||function(H){if(typeof Symbol<"u"&&H[Symbol.iterator]!=null||H["@@iterator"]!=null)return Array.from(H)}($)||function(H,X){if(H){if(typeof H=="string")return W(H,X);var C=Object.prototype.toString.call(H).slice(8,-1);return C==="Object"&&H.constructor&&(C=H.constructor.name),C==="Map"||C==="Set"?Array.from(H):C==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C)?W(H,X):void 0}}($)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
101
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function W($,H){(H==null||H>$.length)&&(H=$.length);for(var X=0,C=new Array(H);X<H;X++)C[X]=$[X];return C}function z($){return z=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},z($)}function Z($,H){var X=Object.keys($);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols($);H&&(C=C.filter(function(j){return Object.getOwnPropertyDescriptor($,j).enumerable})),X.push.apply(X,C)}return X}function te($,H){for(var X=0;X<H.length;X++){var C=H[X];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty($,he(C.key),C)}}function re($,H,X){return(H=he(H))in $?Object.defineProperty($,H,{value:X,enumerable:!0,configurable:!0,writable:!0}):$[H]=X,$}function he($){var H=function(X,C){if(z(X)!="object"||!X)return X;var j=X[Symbol.toPrimitive];if(j!==void 0){var B=j.call(X,C);if(z(B)!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(X)}($,"string");return z(H)=="symbol"?H:H+""}var ue=function(){return $=function C(j,B){var M=this;if(function(ie,be){if(!(ie instanceof be))throw new TypeError("Cannot call a class as a function")}(this,C),re(this,"input",void 0),re(this,"options",void 0),re(this,"utilities",void 0),re(this,"caretPosition",void 0),re(this,"caretPositionEnd",void 0),re(this,"keyboardDOM",void 0),re(this,"keyboardPluginClasses",void 0),re(this,"keyboardDOMClass",void 0),re(this,"buttonElements",void 0),re(this,"currentInstanceName",void 0),re(this,"allKeyboardInstances",void 0),re(this,"keyboardInstanceNames",void 0),re(this,"isFirstKeyboardInstance",void 0),re(this,"physicalKeyboard",void 0),re(this,"modules",void 0),re(this,"activeButtonClass",void 0),re(this,"holdInteractionTimeout",void 0),re(this,"holdTimeout",void 0),re(this,"isMouseHold",void 0),re(this,"initialized",void 0),re(this,"candidateBox",void 0),re(this,"keyboardRowsDOM",void 0),re(this,"defaultName","default"),re(this,"activeInputElement",null),re(this,"handleParams",function(ie,be){var ae,Ce,_e;if(typeof ie=="string")ae=ie.split(".").join(""),Ce=document.querySelector(".".concat(ae)),_e=be;else if(ie instanceof HTMLDivElement){if(!ie.className)throw console.warn("Any DOM element passed as parameter must have a class."),new Error("KEYBOARD_DOM_CLASS_ERROR");ae=ie.className.split(" ")[0],Ce=ie,_e=be}else ae="simple-keyboard",Ce=document.querySelector(".".concat(ae)),_e=ie;return{keyboardDOMClass:ae,keyboardDOM:Ce,options:_e}}),re(this,"getOptions",function(){return M.options}),re(this,"getCaretPosition",function(){return M.caretPosition}),re(this,"getCaretPositionEnd",function(){return M.caretPositionEnd}),re(this,"registerModule",function(ie,be){M.modules[ie]||(M.modules[ie]={}),be(M.modules[ie])}),re(this,"getKeyboardClassString",function(){for(var ie=arguments.length,be=new Array(ie),ae=0;ae<ie;ae++)be[ae]=arguments[ae];return[M.keyboardDOMClass].concat(be).filter(function(Ce){return!!Ce}).join(" ")}),typeof window<"u"){var ee=this.handleParams(j,B),J=ee.keyboardDOMClass,Q=ee.keyboardDOM,Y=ee.options,pe=Y===void 0?{}:Y;this.utilities=new E({getOptions:this.getOptions,getCaretPosition:this.getCaretPosition,getCaretPositionEnd:this.getCaretPositionEnd,dispatch:this.dispatch}),this.caretPosition=null,this.caretPositionEnd=null,this.keyboardDOM=Q,this.options=function(ie){for(var be=1;be<arguments.length;be++){var ae=arguments[be]!=null?arguments[be]:{};be%2?Z(Object(ae),!0).forEach(function(Ce){re(ie,Ce,ae[Ce])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ie,Object.getOwnPropertyDescriptors(ae)):Z(Object(ae)).forEach(function(Ce){Object.defineProperty(ie,Ce,Object.getOwnPropertyDescriptor(ae,Ce))})}return ie}({layoutName:"default",theme:"hg-theme-default",inputName:"default",preventMouseDownDefault:!1,enableLayoutCandidates:!0,excludeFromLayout:{}},pe),this.keyboardPluginClasses="",E.bindMethods(C,this);var ge=this.options.inputName,le=ge===void 0?this.defaultName:ge;if(this.input={},this.input[le]="",this.keyboardDOMClass=J,this.buttonElements={},window.SimpleKeyboardInstances||(window.SimpleKeyboardInstances={}),this.currentInstanceName=this.utilities.camelCase(this.keyboardDOMClass),window.SimpleKeyboardInstances[this.currentInstanceName]=this,this.allKeyboardInstances=window.SimpleKeyboardInstances,this.keyboardInstanceNames=Object.keys(window.SimpleKeyboardInstances),this.isFirstKeyboardInstance=this.keyboardInstanceNames[0]===this.currentInstanceName,this.physicalKeyboard=new N({dispatch:this.dispatch,getOptions:this.getOptions}),this.candidateBox=this.options.enableLayoutCandidates?new R({utilities:this.utilities,options:this.options}):null,!this.keyboardDOM)throw console.warn('".'.concat(J,'" was not found in the DOM.')),new Error("KEYBOARD_DOM_ERROR");this.render(),this.modules={},this.loadModules()}},H=[{key:"setCaretPosition",value:function(C){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:C;this.caretPosition=C,this.caretPositionEnd=j}},{key:"getInputCandidates",value:function(C){var j=this,B=this.options,M=B.layoutCandidates,ee=B.layoutCandidatesCaseSensitiveMatch;if(!M||z(M)!=="object")return{};var J=Object.keys(M).filter(function(pe){var ge=C.substring(0,j.getCaretPositionEnd()||0)||C,le=new RegExp("".concat(j.utilities.escapeRegex(pe),"$"),ee?"g":"gi");return!!L(ge.matchAll(le)).length});if(J.length>1){var Q=J.sort(function(pe,ge){return ge.length-pe.length})[0];return{candidateKey:Q,candidateValue:M[Q]}}if(J.length){var Y=J[0];return{candidateKey:Y,candidateValue:M[Y]}}return{}}},{key:"showCandidatesBox",value:function(C,j,B){var M=this;this.candidateBox&&this.candidateBox.show({candidateValue:j,targetElement:B,onSelect:function(ee,J){var Q=M.options,Y=Q.layoutCandidatesCaseSensitiveMatch,pe=Q.disableCandidateNormalization,ge=Q.enableLayoutCandidatesKeyPress,le=ee;pe||(le=ee.normalize("NFD")),typeof M.options.beforeInputUpdate=="function"&&M.options.beforeInputUpdate(M);var ie=M.getInput(M.options.inputName,!0),be=M.getCaretPositionEnd()||0,ae=ie.substring(0,be||0)||ie,Ce=new RegExp("".concat(M.utilities.escapeRegex(C),"$"),Y?"g":"gi"),_e=ae.replace(Ce,le),Ye=ie.replace(ae,_e),rt=_e.length-ae.length,yt=(be||ie.length)+rt;yt<0&&(yt=0),M.setInput(Ye,M.options.inputName,!0),M.setCaretPosition(yt),ge&&typeof M.options.onKeyPress=="function"&&M.options.onKeyPress(ee,J),typeof M.options.onChange=="function"&&M.options.onChange(M.getInput(M.options.inputName,!0),J),typeof M.options.onChangeAll=="function"&&M.options.onChangeAll(M.getAllInputs(),J)}})}},{key:"handleButtonClicked",value:function(C,j){var B=this.options,M=B.inputName,ee=M===void 0?this.defaultName:M,J=B.debug;if(C!=="{//}"){this.input[ee]||(this.input[ee]=""),typeof this.options.beforeInputUpdate=="function"&&this.options.beforeInputUpdate(this);var Q=this.utilities.getUpdatedInput(C,this.input[ee],this.caretPosition,this.caretPositionEnd);if(this.utilities.isStandardButton(C)&&this.activeInputElement&&this.input[ee]&&this.input[ee]===Q&&this.caretPosition===0&&this.caretPositionEnd===Q.length)return this.setInput("",this.options.inputName,!0),this.setCaretPosition(0),this.activeInputElement.value="",this.activeInputElement.setSelectionRange(0,0),void this.handleButtonClicked(C,j);if(typeof this.options.onKeyPress=="function"&&this.options.onKeyPress(C,j),this.input[ee]!==Q&&(!this.options.inputPattern||this.options.inputPattern&&this.inputPatternIsValid(Q))){if(this.options.maxLength&&this.utilities.handleMaxLength(this.input,Q))return;var Y=this.utilities.getUpdatedInput(C,this.input[ee],this.caretPosition,this.caretPositionEnd,!0);if(this.setInput(Y,this.options.inputName,!0),J&&console.log("Input changed:",this.getAllInputs()),this.options.debug&&console.log("Caret at: ",this.getCaretPosition(),this.getCaretPositionEnd(),"(".concat(this.keyboardDOMClass,")"),j==null?void 0:j.type),this.options.syncInstanceInputs&&this.syncInstanceInputs(),typeof this.options.onChange=="function"&&this.options.onChange(this.getInput(this.options.inputName,!0),j),typeof this.options.onChangeAll=="function"&&this.options.onChangeAll(this.getAllInputs(),j),j!=null&&j.target&&this.options.enableLayoutCandidates){var pe,ge=this.getInputCandidates(Q),le=ge.candidateKey,ie=ge.candidateValue;le&&ie?this.showCandidatesBox(le,ie,this.keyboardDOM):(pe=this.candidateBox)===null||pe===void 0||pe.destroy()}}this.caretPositionEnd&&this.caretPosition!==this.caretPositionEnd&&(this.setCaretPosition(this.caretPositionEnd,this.caretPositionEnd),this.activeInputElement&&this.activeInputElement.setSelectionRange(this.caretPositionEnd,this.caretPositionEnd),this.options.debug&&console.log("Caret position aligned",this.caretPosition)),J&&console.log("Key pressed:",C)}}},{key:"getMouseHold",value:function(){return this.isMouseHold}},{key:"setMouseHold",value:function(C){this.options.syncInstanceInputs?this.dispatch(function(j){j.isMouseHold=C}):this.isMouseHold=C}},{key:"handleButtonMouseDown",value:function(C,j){var B=this;j&&(this.options.preventMouseDownDefault&&j.preventDefault(),this.options.stopMouseDownPropagation&&j.stopPropagation(),j.target.classList.add(this.activeButtonClass)),this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),this.holdTimeout&&clearTimeout(this.holdTimeout),this.setMouseHold(!0),this.options.disableButtonHold||(this.holdTimeout=window.setTimeout(function(){(B.getMouseHold()&&(!C.includes("{")&&!C.includes("}")||C==="{delete}"||C==="{backspace}"||C==="{bksp}"||C==="{space}"||C==="{tab}")||C==="{arrowright}"||C==="{arrowleft}"||C==="{arrowup}"||C==="{arrowdown}")&&(B.options.debug&&console.log("Button held:",C),B.handleButtonHold(C)),clearTimeout(B.holdTimeout)},500))}},{key:"handleButtonMouseUp",value:function(C,j){var B=this;j&&(this.options.preventMouseUpDefault&&j.preventDefault&&j.preventDefault(),this.options.stopMouseUpPropagation&&j.stopPropagation&&j.stopPropagation(),!(j.target===this.keyboardDOM||j.target&&this.keyboardDOM.contains(j.target)||this.candidateBox&&this.candidateBox.candidateBoxElement&&(j.target===this.candidateBox.candidateBoxElement||j.target&&this.candidateBox.candidateBoxElement.contains(j.target)))&&this.candidateBox&&this.candidateBox.destroy()),this.recurseButtons(function(M){M.classList.remove(B.activeButtonClass)}),this.setMouseHold(!1),this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),C&&typeof this.options.onKeyReleased=="function"&&this.options.onKeyReleased(C,j)}},{key:"handleKeyboardContainerMouseDown",value:function(C){this.options.preventMouseDownDefault&&C.preventDefault()}},{key:"handleButtonHold",value:function(C){var j=this;this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),this.holdInteractionTimeout=window.setTimeout(function(){j.getMouseHold()?(j.handleButtonClicked(C),j.handleButtonHold(C)):clearTimeout(j.holdInteractionTimeout)},100)}},{key:"syncInstanceInputs",value:function(){var C=this;this.dispatch(function(j){j.replaceInput(C.input),j.setCaretPosition(C.caretPosition,C.caretPositionEnd)})}},{key:"clearInput",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.inputName||this.defaultName;this.input[C]="",this.setCaretPosition(0),this.options.syncInstanceInputs&&this.syncInstanceInputs()}},{key:"getInput",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.inputName||this.defaultName,j=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return this.options.syncInstanceInputs&&!j&&this.syncInstanceInputs(),this.options.rtl?"‫"+this.input[C].replace("‫","").replace("‬","")+"‬":this.input[C]}},{key:"getAllInputs",value:function(){var C=this,j={};return Object.keys(this.input).forEach(function(B){j[B]=C.getInput(B,!0)}),j}},{key:"setInput",value:function(C){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.inputName||this.defaultName,B=arguments.length>2?arguments[2]:void 0;this.input[j]=C,!B&&this.options.syncInstanceInputs&&this.syncInstanceInputs()}},{key:"replaceInput",value:function(C){this.input=C}},{key:"setOptions",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},j=this.changedOptions(C);this.options=Object.assign(this.options,C),j.length&&(this.options.debug&&console.log("changedOptions",j),this.onSetOptions(j),this.render())}},{key:"changedOptions",value:function(C){var j=this;return Object.keys(C).filter(function(B){return JSON.stringify(C[B])!==JSON.stringify(j.options[B])})}},{key:"onSetOptions",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];C.includes("layoutName")&&this.candidateBox&&this.candidateBox.destroy(),(C.includes("layoutCandidatesPageSize")||C.includes("layoutCandidates"))&&this.candidateBox&&(this.candidateBox.destroy(),this.candidateBox=new R({utilities:this.utilities,options:this.options}))}},{key:"resetRows",value:function(){this.keyboardRowsDOM&&this.keyboardRowsDOM.remove(),this.keyboardDOM.className=this.keyboardDOMClass,this.keyboardDOM.setAttribute("data-skInstance",this.currentInstanceName),this.buttonElements={}}},{key:"dispatch",value:function(C){if(!window.SimpleKeyboardInstances)throw console.warn("SimpleKeyboardInstances is not defined. Dispatch cannot be called."),new Error("INSTANCES_VAR_ERROR");return Object.keys(window.SimpleKeyboardInstances).forEach(function(j){C(window.SimpleKeyboardInstances[j],j)})}},{key:"addButtonTheme",value:function(C,j){var B=this;j&&C&&(C.split(" ").forEach(function(M){j.split(" ").forEach(function(ee){B.options.buttonTheme||(B.options.buttonTheme=[]);var J=!1;B.options.buttonTheme.map(function(Q){if(Q!=null&&Q.class.split(" ").includes(ee)){J=!0;var Y=Q.buttons.split(" ");Y.includes(M)||(J=!0,Y.push(M),Q.buttons=Y.join(" "))}return Q}),J||B.options.buttonTheme.push({class:ee,buttons:C})})}),this.render())}},{key:"removeButtonTheme",value:function(C,j){var B=this;if(!C&&!j)return this.options.buttonTheme=[],void this.render();C&&Array.isArray(this.options.buttonTheme)&&this.options.buttonTheme.length&&(C.split(" ").forEach(function(M){var ee;(ee=B.options)===null||ee===void 0||(ee=ee.buttonTheme)===null||ee===void 0||ee.map(function(J,Q){if(J&&j&&j.includes(J.class)||!j){var Y,pe,ge=(Y=J)===null||Y===void 0?void 0:Y.buttons.split(" ").filter(function(le){return le!==M});J&&ge!=null&&ge.length?J.buttons=ge.join(" "):((pe=B.options.buttonTheme)===null||pe===void 0||pe.splice(Q,1),J=null)}return J})}),this.render())}},{key:"getButtonElement",value:function(C){var j,B=this.buttonElements[C];return B&&(j=B.length>1?B:B[0]),j}},{key:"inputPatternIsValid",value:function(C){var j,B=this.options.inputPattern;if((j=B instanceof RegExp?B:B[this.options.inputName||this.defaultName])&&C){var M=j.test(C);return this.options.debug&&console.log('inputPattern ("'.concat(j,'"): ').concat(M?"passed":"did not pass!")),M}return!0}},{key:"setEventListeners",value:function(){if(this.isFirstKeyboardInstance||!this.allKeyboardInstances){this.options.debug&&console.log("Caret handling started (".concat(this.keyboardDOMClass,")"));var C=this.options.physicalKeyboardHighlightPreventDefault,j=C!==void 0&&C;document.addEventListener("keyup",this.handleKeyUp,j),document.addEventListener("keydown",this.handleKeyDown,j),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("touchend",this.handleTouchEnd),document.addEventListener("selectionchange",this.handleSelectionChange),document.addEventListener("select",this.handleSelect)}}},{key:"handleKeyUp",value:function(C){this.caretEventHandler(C),this.options.physicalKeyboardHighlight&&this.physicalKeyboard.handleHighlightKeyUp(C)}},{key:"handleKeyDown",value:function(C){this.options.physicalKeyboardHighlight&&this.physicalKeyboard.handleHighlightKeyDown(C)}},{key:"handleMouseUp",value:function(C){this.caretEventHandler(C)}},{key:"handleTouchEnd",value:function(C){this.caretEventHandler(C)}},{key:"handleSelect",value:function(C){this.caretEventHandler(C)}},{key:"handleSelectionChange",value:function(C){navigator.userAgent.includes("Firefox")||this.caretEventHandler(C)}},{key:"caretEventHandler",value:function(C){var j,B=this;C.target.tagName&&(j=C.target.tagName.toLowerCase()),this.dispatch(function(M){var ee=C.target===M.keyboardDOM||C.target&&M.keyboardDOM.contains(C.target);if(B.options.syncInstanceInputs&&Array.isArray(C.path)&&(ee=C.path.some(function(Y){var pe;return Y==null||(pe=Y.hasAttribute)===null||pe===void 0?void 0:pe.call(Y,"data-skInstance")})),(j==="textarea"||j==="input"&&["text","search","url","tel","password"].includes(C.target.type))&&!M.options.disableCaretPositioning){var J=C.target.selectionStart,Q=C.target.selectionEnd;M.options.rtl&&(J=M.utilities.getRtlOffset(J,M.getInput()),Q=M.utilities.getRtlOffset(Q,M.getInput())),M.setCaretPosition(J,Q),B.activeInputElement=C.target,M.options.debug&&console.log("Caret at: ",M.getCaretPosition(),M.getCaretPositionEnd(),C&&C.target.tagName.toLowerCase(),"(".concat(M.keyboardDOMClass,")"),C==null?void 0:C.type)}else!M.options.disableCaretPositioning&&ee||(C==null?void 0:C.type)==="selectionchange"||(M.setCaretPosition(null),B.activeInputElement=null,M.options.debug&&console.log('Caret position reset due to "'.concat(C==null?void 0:C.type,'" event'),C))})}},{key:"recurseButtons",value:function(C){var j=this;C&&Object.keys(this.buttonElements).forEach(function(B){return j.buttonElements[B].forEach(C)})}},{key:"destroy",value:function(){this.options.debug&&console.log("Destroying simple-keyboard instance: ".concat(this.currentInstanceName));var C=this.options.physicalKeyboardHighlightPreventDefault,j=C!==void 0&&C;document.removeEventListener("keyup",this.handleKeyUp,j),document.removeEventListener("keydown",this.handleKeyDown,j),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("touchend",this.handleTouchEnd),document.removeEventListener("select",this.handleSelect),document.removeEventListener("selectionchange",this.handleSelectionChange),document.onpointerup=null,document.ontouchend=null,document.ontouchcancel=null,document.onmouseup=null,this.recurseButtons(function(B){B&&(B.onpointerdown=null,B.onpointerup=null,B.onpointercancel=null,B.ontouchstart=null,B.ontouchend=null,B.ontouchcancel=null,B.onclick=null,B.onmousedown=null,B.onmouseup=null,B.remove(),B=null)}),this.keyboardDOM.onpointerdown=null,this.keyboardDOM.ontouchstart=null,this.keyboardDOM.onmousedown=null,this.resetRows(),this.candidateBox&&(this.candidateBox.destroy(),this.candidateBox=null),this.activeInputElement=null,this.keyboardDOM.removeAttribute("data-skInstance"),this.keyboardDOM.innerHTML="",window.SimpleKeyboardInstances[this.currentInstanceName]=null,delete window.SimpleKeyboardInstances[this.currentInstanceName],this.initialized=!1}},{key:"getButtonThemeClasses",value:function(C){var j=this.options.buttonTheme,B=[];return Array.isArray(j)&&j.forEach(function(M){if(M&&M.class&&typeof M.class=="string"&&M.buttons&&typeof M.buttons=="string"){var ee=M.class.split(" ");M.buttons.split(" ").includes(C)&&(B=[].concat(L(B),L(ee)))}else console.warn('Incorrect "buttonTheme". Please check the documentation.',M)}),B}},{key:"setDOMButtonAttributes",value:function(C,j){var B=this.options.buttonAttributes;Array.isArray(B)&&B.forEach(function(M){M.attribute&&typeof M.attribute=="string"&&M.value&&typeof M.value=="string"&&M.buttons&&typeof M.buttons=="string"?M.buttons.split(" ").includes(C)&&j(M.attribute,M.value):console.warn('Incorrect "buttonAttributes". Please check the documentation.',M)})}},{key:"onTouchDeviceDetected",value:function(){this.processAutoTouchEvents(),this.disableContextualWindow()}},{key:"disableContextualWindow",value:function(){window.oncontextmenu=function(C){if(C.target.classList.contains("hg-button"))return C.preventDefault(),C.stopPropagation(),!1}}},{key:"processAutoTouchEvents",value:function(){this.options.autoUseTouchEvents&&(this.options.useTouchEvents=!0,this.options.debug&&console.log("autoUseTouchEvents: Touch device detected, useTouchEvents enabled."))}},{key:"onInit",value:function(){this.options.debug&&console.log("".concat(this.keyboardDOMClass," Initialized")),this.setEventListeners(),typeof this.options.onInit=="function"&&this.options.onInit(this)}},{key:"beforeFirstRender",value:function(){this.utilities.isTouchDevice()&&this.onTouchDeviceDetected(),typeof this.options.beforeFirstRender=="function"&&this.options.beforeFirstRender(this),this.isFirstKeyboardInstance&&this.utilities.pointerEventsSupported()&&!this.options.useTouchEvents&&!this.options.useMouseEvents&&this.options.debug&&console.log("Using PointerEvents as it is supported by this browser"),this.options.useTouchEvents&&this.options.debug&&console.log("useTouchEvents has been enabled. Only touch events will be used.")}},{key:"beforeRender",value:function(){typeof this.options.beforeRender=="function"&&this.options.beforeRender(this)}},{key:"onRender",value:function(){typeof this.options.onRender=="function"&&this.options.onRender(this)}},{key:"onModulesLoaded",value:function(){typeof this.options.onModulesLoaded=="function"&&this.options.onModulesLoaded(this)}},{key:"loadModules",value:function(){var C=this;Array.isArray(this.options.modules)&&(this.options.modules.forEach(function(j){var B=new j(C);B.init&&B.init(C)}),this.keyboardPluginClasses="modules-loaded",this.render(),this.onModulesLoaded())}},{key:"getModuleProp",value:function(C,j){return!!this.modules[C]&&this.modules[C][j]}},{key:"getModulesList",value:function(){return Object.keys(this.modules)}},{key:"parseRowDOMContainers",value:function(C,j,B,M){var ee=this,J=Array.from(C.children),Q=0;return J.length&&B.forEach(function(Y,pe){var ge=M[pe];if(!(ge&&ge>Y))return!1;var le=Y-Q,ie=ge-Q,be=document.createElement("div");be.className+="hg-button-container";var ae="".concat(ee.options.layoutName,"-r").concat(j,"c").concat(pe);be.setAttribute("data-skUID",ae);var Ce=J.splice(le,ie-le+1);Q=ie-le,Ce.forEach(function(_e){return be.appendChild(_e)}),J.splice(le,0,be),C.innerHTML="",J.forEach(function(_e){return C.appendChild(_e)}),ee.options.debug&&console.log("rowDOMContainer",Ce,le,ie,Q+1)}),C}},{key:"render",value:function(){var C=this;this.resetRows(),this.initialized||this.beforeFirstRender(),this.beforeRender();var j="hg-layout-".concat(this.options.layoutName),B=this.options.layout||{default:["` 1 2 3 4 5 6 7 8 9 0 - = {bksp}","{tab} q w e r t y u i o p [ ] \\","{lock} a s d f g h j k l ; ' {enter}","{shift} z x c v b n m , . / {shift}",".com @ {space}"],shift:["~ ! @ # $ % ^ & * ( ) _ + {bksp}","{tab} Q W E R T Y U I O P { } |",'{lock} A S D F G H J K L : " {enter}',"{shift} Z X C V B N M < > ? {shift}",".com @ {space}"]},M=this.options.useTouchEvents||!1,ee=M?"hg-touch-events":"",J=this.options.useMouseEvents||!1,Q=this.options.disableRowButtonContainers;this.keyboardDOM.className=this.getKeyboardClassString(this.options.theme,j,this.keyboardPluginClasses,ee),this.keyboardDOM.setAttribute("data-skInstance",this.currentInstanceName),this.keyboardRowsDOM=document.createElement("div"),this.keyboardRowsDOM.className="hg-rows",B[this.options.layoutName||this.defaultName].forEach(function(Y,pe){var ge=Y.split(" ");C.options.excludeFromLayout&&C.options.excludeFromLayout[C.options.layoutName||C.defaultName]&&(ge=ge.filter(function(ae){return C.options.excludeFromLayout&&!C.options.excludeFromLayout[C.options.layoutName||C.defaultName].includes(ae)}));var le=document.createElement("div");le.className+="hg-row";var ie=[],be=[];ge.forEach(function(ae,Ce){var _e,Ye=!Q&&typeof ae=="string"&&ae.length>1&&ae.indexOf("[")===0,rt=!Q&&typeof ae=="string"&&ae.length>1&&ae.indexOf("]")===ae.length-1;Ye&&(ie.push(Ce),ae=ae.replace(/\[/g,"")),rt&&(be.push(Ce),ae=ae.replace(/\]/g,""));var yt=C.utilities.getButtonClass(ae),pt=C.utilities.getButtonDisplayName(ae,C.options.display,C.options.mergeDisplay),zn=C.options.useButtonTag?"button":"div",ut=document.createElement(zn);ut.className+="hg-button ".concat(yt),(_e=ut.classList).add.apply(_e,L(C.getButtonThemeClasses(ae))),C.setDOMButtonAttributes(ae,function(Re,dn){ut.setAttribute(Re,dn)}),C.activeButtonClass="hg-activeButton",!C.utilities.pointerEventsSupported()||M||J?M?(ut.ontouchstart=function(Re){C.handleButtonClicked(ae,Re),C.handleButtonMouseDown(ae,Re)},ut.ontouchend=function(Re){C.handleButtonMouseUp(ae,Re)},ut.ontouchcancel=function(Re){C.handleButtonMouseUp(ae,Re)}):(ut.onclick=function(Re){C.setMouseHold(!1),typeof C.options.onKeyReleased!="function"&&C.handleButtonClicked(ae,Re)},ut.onmousedown=function(Re){typeof C.options.onKeyReleased!="function"||C.isMouseHold||C.handleButtonClicked(ae,Re),C.handleButtonMouseDown(ae,Re)},ut.onmouseup=function(Re){C.handleButtonMouseUp(ae,Re)}):(ut.onpointerdown=function(Re){C.handleButtonClicked(ae,Re),C.handleButtonMouseDown(ae,Re)},ut.onpointerup=function(Re){C.handleButtonMouseUp(ae,Re)},ut.onpointercancel=function(Re){C.handleButtonMouseUp(ae,Re)}),ut.setAttribute("data-skBtn",ae);var rn="".concat(C.options.layoutName,"-r").concat(pe,"b").concat(Ce);ut.setAttribute("data-skBtnUID",rn);var mt=document.createElement("span");mt.innerHTML=pt,ut.appendChild(mt),C.buttonElements[ae]||(C.buttonElements[ae]=[]),C.buttonElements[ae].push(ut),le.appendChild(ut)}),le=C.parseRowDOMContainers(le,pe,ie,be),C.keyboardRowsDOM.appendChild(le)}),this.keyboardDOM.appendChild(this.keyboardRowsDOM),this.onRender(),this.initialized||(this.initialized=!0,!this.utilities.pointerEventsSupported()||M||J?M?(document.ontouchend=function(Y){return C.handleButtonMouseUp(void 0,Y)},document.ontouchcancel=function(Y){return C.handleButtonMouseUp(void 0,Y)},this.keyboardDOM.ontouchstart=function(Y){return C.handleKeyboardContainerMouseDown(Y)}):M||(document.onmouseup=function(Y){return C.handleButtonMouseUp(void 0,Y)},this.keyboardDOM.onmousedown=function(Y){return C.handleKeyboardContainerMouseDown(Y)}):(document.onpointerup=function(Y){return C.handleButtonMouseUp(void 0,Y)},this.keyboardDOM.onpointerdown=function(Y){return C.handleKeyboardContainerMouseDown(Y)}),this.onInit())}}],H&&te($.prototype,H),X&&te($,X),Object.defineProperty($,"prototype",{writable:!1}),$;var $,H,X}(),ye=ue,de=ue}(),h}()},442:function(c){c.exports=n}},i={};function s(c){var u=i[c];if(u!==void 0)return u.exports;var d=i[c]={exports:{}};return r[c].call(d.exports,d,d.exports,s),d.exports}s.n=function(c){var u=c&&c.__esModule?function(){return c.default}:function(){return c};return s.d(u,{a:u}),u},s.d=function(c,u){for(var d in u)s.o(u,d)&&!s.o(c,d)&&Object.defineProperty(c,d,{enumerable:!0,get:u[d]})},s.o=function(c,u){return Object.prototype.hasOwnProperty.call(c,u)},s.r=function(c){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(c,"__esModule",{value:!0})};var o={};return function(){s.r(o),s.d(o,{KeyboardReact:function(){return p},default:function(){return y}}),s(981);var c=s(442),u=s(548),d=s.n(u);function f(g){return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},f(g)}function h(g,v){var w=Object.keys(g);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(g);v&&(E=E.filter(function(S){return Object.getOwnPropertyDescriptor(g,S).enumerable})),w.push.apply(w,E)}return w}function l(g){for(var v=1;v<arguments.length;v++){var w=arguments[v]!=null?arguments[v]:{};v%2?h(Object(w),!0).forEach(function(E){b(g,E,w[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(w)):h(Object(w)).forEach(function(E){Object.defineProperty(g,E,Object.getOwnPropertyDescriptor(w,E))})}return g}function b(g,v,w){var E;return E=function(S,A){if(f(S)!="object"||!S)return S;var T=S[Symbol.toPrimitive];if(T!==void 0){var O=T.call(S,A||"default");if(f(O)!="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.")}return(A==="string"?String:Number)(S)}(v,"string"),(v=f(E)=="symbol"?E:E+"")in g?Object.defineProperty(g,v,{value:w,enumerable:!0,configurable:!0,writable:!0}):g[v]=w,g}var a=function(g){return l(l({},g),{},{keyboardRef:null})},p=function(g){var v=g.baseClass||"react-simple-keyboard",w=c.useRef(null),E=c.useRef(null),S=c.useRef(null),A=c.useRef(g);return c.useEffect(function(){return function(){S.current&&S.current.destroy(),w.current=!1}},[]),c.useEffect(function(){var T=function(V){return l(l({},V),{},{theme:"simple-keyboard ".concat(V.theme||"hg-theme-default")})}(g);if(!w.current){w.current=!0,T.debug&&console.log("ReactSimpleKeyboard: Init");var O=E.current,N=".".concat(v);S.current=new(d())(O||N,T),T.keyboardRef&&T.keyboardRef(S.current)}var D=function(V,F){var q=a(F),R=a(V);return Object.keys(q).filter(function(L){return q[L]!==R[L]})}(A.current,T);if(D.length){var U=S.current;A.current=T,U==null||U.setOptions(T),T.debug&&console.log("ReactSimpleKeyboard - setOptions called due to updated props:",D)}},[w,v,A,g]),c.createElement("div",{className:v,ref:E})},y=p}(),o}()})})(fm);var y2=fm.exports;const v2=ju(y2);function hm({onChange:e,keyboardRef:t,layout:n,theme:r}){const[i,s]=k.useState("default"),o=c=>{(c==="{shift}"||c==="{lock}")&&s(i==="default"?"shift":"default")};return m.jsx(v2,{keyboardRef:c=>t.current=c,layoutName:i,layout:n,theme:r,onChange:e,onKeyPress:o,preventMouseDownDefault:!0})}const pm=k.createContext(null),mm=({children:e,apiKey:t,shopUuid:n,sessionUuid:r,cameraFacingMode:i,onContactLink:s,onClaimReward:o,onRedeemVoucher:c,onUseGiftcard:u,host:d})=>(localStorage.setItem("portal_session_uuid",r),m.jsx(pm.Provider,{value:{apiKey:t,shopUuid:n,sessionUuid:r,cameraFacingMode:i,onContactLink:s,onClaimReward:o,onRedeemVoucher:c,onUseGiftcard:u,host:d},children:e})),It=()=>{const e=k.useContext(pm);if(e===null)throw"Only use 'useSession' within a SessionProvider";return e};function vt(){const{sessionUuid:e}=It(),{data:t,pending:n,error:r,isLoading:i,mutate:s}=$n({url:e});return{session:t==null?void 0:t.data.data,data:t,pending:n,error:r,isLoading:i,mutate:s}}function b2({value:e,valueSetter:t}){const{session:n}=vt(),r=!(!n||!+(n.input_data.enable_on_screen_keyboard??!1)),[i,s]=k.useState(!1),o=k.useRef(null),c=k.useRef(null);k.useEffect(()=>{f(e?e.toString():"")},[]);const u=h=>{t(h?parseInt(h):0),f(h)},d=h=>{const{key:l}=h;if(e===0&&!/^[1-9]$/.test(l)||e!==0&&!/^[0-9]$/.test(l)&&l!=="Backspace")return;let b;if(l!=="Backspace")b=parseInt(e===0?l:`${e}${l}`);else{const a=e.toString().slice(0,-1);b=a.length?parseInt(a,10):0}t(b),f(b?b.toString():"")},f=h=>{c&&c.current&&(h?c.current.style.width=`${Math.max(h.length,3)*3}rem`:c.current.style.width="calc(3rem + 14px)")};return m.jsxs(m.Fragment,{children:[m.jsx("input",{ref:c,className:"h-full w-[65px] rounded border-gray-200 border-transparent text-5xl [appearance:textfield] focus:border-transparent focus:ring-0 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",type:"number",pattern:"[0-9]*",inputMode:"numeric",placeholder:"0",autoFocus:!0,value:e?(e/100).toFixed(2):"",onKeyDown:d,onChange:()=>{},onFocus:()=>s(!0),onBlur:()=>s(!1)}),r&&m.jsx("div",{className:`mobile:hidden bottom-2 left-2 right-2 z-50 mx-auto w-[98vw] max-w-[1200px] ${!i&&"hidden"} absolute`,children:m.jsx(hm,{keyboardRef:o,layout:{default:["1 2 3","4 5 6","7 8 9","00 0 {bksp}"]},theme:"hg-theme-default hg-layout-numeric numeric-theme",onChange:u})})]})}function gm({title:e,balance:t,transaction:n}){const{t:r}=et(),[i,s]=k.useState(0),{session:{currency:o,events:c}}=vt(),u=()=>{let d=0;return c.filter(h=>Object.values(Kr).includes(h.type)).forEach(h=>{d+=h.data.amount_in_cents}),d};return m.jsxs(Pt,{children:[e&&m.jsx(jt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:e})})}),m.jsx(Tt,{children:m.jsxs("div",{className:"flex h-full flex-col gap-4",children:[m.jsx("div",{className:"rounded-lg bg-core-primary-50 p-4",children:m.jsxs("div",{className:"flex justify-between",children:[m.jsx("p",{className:"font-light text-gray-500",children:r("balance")}),m.jsx(zr,{value:t??0,start:t??0,currency:o,asCurrency:!0})]})}),m.jsx("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-6",children:m.jsx("div",{className:"flex items-center justify-center gap-1 p-4 text-5xl font-bold",children:u()?m.jsx(zr,{value:0,start:i,currency:o,asCurrency:!0}):m.jsxs("div",{className:"flex items-center justify-center gap-1 ",children:[m.jsx("p",{children:"€"}),m.jsx(b2,{value:i,valueSetter:s})]})})})]})}),m.jsx(tn,{children:m.jsx(ct,{label:r("confirmAndPay",{amount:Qi(i,o)}),className:"w-full",onClick:n&&(()=>n(i)),disabled:!i||!!u()})})]})}function $a(){return{subscribe:(r,i)=>{document.addEventListener(r,i)},unsubscribe:(r,i)=>{document.removeEventListener(r,i)},publish:(r,i)=>{const s=new CustomEvent(r,{detail:i});document.dispatchEvent(s)}}}function ym(e,t){k.useEffect(()=>{const n=i=>{e.current&&!e.current.contains(i.target)&&t(!1)},r=i=>{i.key==="Escape"&&t(!1)};return document.addEventListener("mousedown",n),document.addEventListener("keydown",r),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("keydown",r)}},[])}const w2=typeof window<"u"?k.useLayoutEffect:()=>{},E2=()=>window.visualViewport?[window.visualViewport.width,window.visualViewport.height]:[window.innerWidth,window.innerHeight],S2=()=>{const[e,t]=k.useState(),n=k.useCallback(()=>{const r=E2();t(i=>i&&i[0]===r[0]&&i[1]===r[1]?i:r)},[]);return w2(n,[n]),k.useEffect(()=>{var i;const r=()=>{n(),setTimeout(n,1e3)};return window.addEventListener("resize",r),window.addEventListener("orientationchange",r),(i=window.visualViewport)==null||i.addEventListener("resize",r),()=>{var s;window.removeEventListener("resize",r),window.removeEventListener("orientationchange",r),(s=window.visualViewport)==null||s.removeEventListener("resize",r)}},[n]),e};function vm(){const{subscribe:e,unsubscribe:t,publish:n}=$a();return{initialize:(c,u)=>{e("openKeyboard",c),e("closeKeyboard",u)},terminate:(c,u)=>{t("openKeyboard",c),t("closeKeyboard",u)},open:c=>{n("openKeyboard",{inputId:c.target.id,inputValue:c.target.value})},close:()=>{n("closeKeyboard")}}}const xr="keyboard-custom-overlap-id";function x2(){const[e,t]=k.useState(!1),n=k.useRef(null),r=k.useRef(null),i=k.useRef(null),[s,o]=k.useState(),{session:c}=vt(),{initialize:u,terminate:d}=vm(),f=g=>{var v,w;r.current=document.getElementById(g.detail.inputId),(v=n.current)==null||v.setInput(g.detail.inputValue),(w=r.current)==null||w.addEventListener("input",E=>{var A;const S=E.target;(A=n.current)==null||A.setInput(S==null?void 0:S.value)}),t(!0)},h=()=>t(!1);k.useEffect(()=>(u(f,h),()=>{d(f,h)}),[e]);const l=g=>{var v,w;if(r&&r.current){b(r.current,g);const E=(v=n.current)==null?void 0:v.getCaretPosition();E&&((w=r.current)==null||w.setSelectionRange(E,E))}},b=(g,v)=>{var S;const w=(S=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:S.set;w==null||w.call(g,v);const E=new Event("input",{bubbles:!0});g.dispatchEvent(E)};if(!c||!+(c.input_data.enable_on_screen_keyboard??!1))return m.jsx(m.Fragment,{});const a=()=>{var g;if(!s){const v=(g=i.current)==null?void 0:g.getBoundingClientRect();return v&&v.x&&!s&&o(v),v}return s},p=()=>{var E;const g=(E=r.current)==null?void 0:E.getBoundingClientRect(),v=a();let w=!1;return v&&g&&(w=!(v.right<g.left||v.left>g.right||v.bottom<g.top||v.top>g.bottom)),w},y=()=>{const g=document.querySelectorAll("#"+xr);let v=!1;for(let w=0;w<g.length;w++){const E=g[w].getBoundingClientRect(),S=a();S&&E&&(v=!(S.right<E.left||S.left>E.right||S.bottom<E.top||S.top>E.bottom))}return v||p()};return m.jsx("div",{ref:i,className:`mobile:hidden bottom-2 left-2 right-2 z-50 mx-auto w-[98vw] max-w-[1200px] ${!e&&s&&"hidden"} ${!e&&!s&&"pointer-events-none opacity-0"} ${y()?"b-2 block":"absolute"}`,children:m.jsx(hm,{keyboardRef:n,onChange:l})})}const Zi=({id:e,name:t,label:n,description:r,required:i,type:s="text",value:o,placeholder:c,disabled:u,error:d=!1,helperText:f="",onChange:h,beforeIcon:l,afterIcon:b,autoFocus:a,onFocus:p,onBlur:y})=>{const[g,v]=k.useState(f),w=k.useRef(null),[E,S]=k.useState(!1),{open:A,close:T}=vm();k.useEffect(()=>()=>{T()},[]);const O=()=>{w.current&&v(w.current.validationMessage),S(!1),T(),y==null||y()},N=async F=>{S(!0),(async()=>A(F))().then(()=>{var R;return(R=w.current)==null?void 0:R.scrollIntoView({behavior:"smooth",block:"center"})}),p==null||p()},D=F=>{h==null||h(F)},U=k.useId(),V=e??U;return m.jsxs("div",{className:"flex flex-col gap-2 antialiased",children:[m.jsx(vn,{description:r,disabled:u,htmlFor:V,required:i,children:n}),m.jsx("div",{className:hn("flex-start box flex h-10 flex-col justify-center self-stretch rounded border border-core-gray-200 shadow-xs",u?"pointer-events-none bg-core-gray-50 shadow-none outline-core-gray-200":" bg-core-white-900 hover:border hover:border-core-gray-300 hover:shadow-none ",E&&!d&&"border-core-primary-500 ring-1 ring-core-primary-500",d&&"border-core-red-500",d&&E&&"border-core-red-500 ring-1 ring-core-red-500"),children:m.jsxs("div",{className:"flex flex-row gap-2 self-stretch p-2",children:[l&&m.jsx(en,{icon:l}),m.jsx("input",{type:s,id:V,name:t,className:"flex flex-grow border-none bg-transparent p-0 text-sm text-core-gray-800 placeholder:text-core-gray-500 focus:ring-0 disabled:text-core-gray-300 placeholder:disabled:text-core-gray-300",value:o,onChange:D,onBlur:O,ref:w,placeholder:c,onFocus:N,disabled:u,autoFocus:a}),b&&m.jsx(en,{icon:b})]})}),m.jsx("div",{className:`grid overflow-hidden transition-all duration-300 ease-out ${f||g?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"}`,children:m.jsx("div",{className:"overflow-hidden",children:m.jsx(vn.Helper,{error:d,helperText:f||g})})})]})};Zi.displayName="Input";const bm=({id:e,name:t,label:n,required:r,description:i,placeholder:s,value:o,disabled:c,error:u=!1,helperText:d,onChange:f,type:h="date"})=>{const[l,b]=k.useState(!1),a=k.useId(),p=e??a;return m.jsxs("div",{className:"flex flex-col gap-2 antialiased",children:[m.jsx(vn,{description:i,disabled:c,htmlFor:p,required:r,children:n}),m.jsx("div",{className:hn("flex-start box relative flex h-10 flex-col justify-center self-stretch rounded border border-core-gray-200 shadow-xs ring-core-primary-500 ",c?"pointer-events-none bg-core-gray-50 shadow-none outline-core-gray-200":" bg-core-white-900 hover:border hover:border-core-gray-300 hover:shadow-none ",l&&!u&&"border-core-primary-500 ring-1 ring-core-primary-500 selection:bg-core-primary-500",u&&"border-core-red-500",u&&l&&"border-core-red-500 ring-1 ring-core-red-500"),children:m.jsxs("div",{className:"flex w-full flex-row gap-2 self-stretch p-2",children:[m.jsx("input",{type:h,id:p,name:t,value:o,max:"2200-01-01",className:"flex flex-grow border-none bg-transparent p-0 text-sm text-core-gray-800 placeholder:text-core-gray-500 focus:ring-0 disabled:text-core-gray-300 placeholder:disabled:text-core-gray-300",placeholder:s,onChange:f,onFocus:()=>b(!0),onBlur:()=>b(!1),disabled:c}),m.jsx(en,{icon:"calendar"})]})}),m.jsx("div",{className:`grid overflow-hidden transition-all duration-300 ease-out ${d?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-100"}`,children:m.jsx("div",{className:"overflow-hidden",children:m.jsx(vn.Helper,{error:u,helperText:d})})})]})};bm.displayName="Input";function an({children:e}){return m.jsx("div",{className:"h-screen w-screen md:p-6",children:m.jsx("div",{className:"flex h-full max-h-full items-center justify-center md:container [&>*]:grow",children:e})})}function xi({title:e,isOpen:t,onClose:n,primaryAction:r,secondaryAction:i,children:s}){const[o,c]=k.useState(t),u=k.useRef(null);k.useEffect(()=>{c(t)},[t]),k.useEffect(()=>{const h=u.current;h&&(o?h.show():h.close())},[o]);const d=()=>{n&&n(),c(!1)},f=h=>{h.key==="Escape"&&d()};return m.jsx("div",{className:`fixed inset-0 z-40 min-h-screen items-center bg-gray-500 bg-opacity-25 ${o?"flex":"hidden"}`,children:m.jsx("dialog",{ref:u,onKeyDown:f,className:"scrollbar-hide absolute overflow-auto rounded-lg drop-shadow-md",children:m.jsxs("div",{className:"rounded-lg bg-white md:min-w-[420px]",children:[m.jsx(jt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:e})})}),m.jsx(Tt,{children:s}),m.jsx(tn,{children:m.jsxs("div",{className:"flex flex-col gap-2",children:[r&&m.jsx(ct,{label:r.label??"",onClick:r.action,disabled:r.disabled}),i&&m.jsx(ct,{label:i.label??"",onClick:i.action,disabled:i.disabled,variant:"secondary"})]})})]})})})}function _2({option:{label:e},checked:t,onChange:n}){return m.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 text-sm hover:bg-core-gray-50",children:[m.jsx(qa,{defaultChecked:t,onChange:n}),m.jsx("p",{children:e})]})}function C2(e){const{t}=et(),n=k.useRef(null),[r,i]=k.useState(!1);ym(n,i);const[s,o]=k.useState(""),[c,u]=k.useState(e.value.split(";")),{name:d,onChange:f}=e,h=(l,b)=>{let a=[];l?a=[...c,b]:a=c.filter(p=>p!==b),u(a),f&&f(d??"",a.join(";"))};return m.jsxs("div",{ref:n,className:"flex flex-col gap-2 antialiased",children:[m.jsx(vn,{disabled:e.disabled,htmlFor:e.id,required:e.required,children:e.label}),m.jsxs("div",{className:"relative",children:[m.jsxs("div",{className:`flex h-10 items-center justify-between rounded border p-2 ${e.disabled?"pointer-events-none bg-core-gray-50 shadow-none outline-core-gray-200":"bg-core-white-900 hover:border hover:border-core-gray-300 hover:shadow-none"}`,onClick:()=>!e.disabled&&i(!r),children:[m.jsx("div",{className:`flex gap-1 overflow-hidden text-sm ${e.disabled?"text-core-gray-300":"text-core-gray-800"}`,children:c.map(l=>{var a;const b=(a=e.options.find(p=>p.value===l))==null?void 0:a.label;return m.jsxs("div",{className:"pointer-events-none flex items-center overflow-hidden rounded bg-core-gray-100 px-1.5 py-0.5",children:[m.jsx("p",{className:"truncate",children:b}),m.jsx("span",{className:"pointer-events-auto cursor-pointer",onClick:()=>h(!1,l),children:m.jsx(en,{icon:"close"})})]},l)})}),m.jsx("span",{className:"ml-2 text-core-gray-500",children:r?"▴":"▾"})]}),m.jsxs("div",{className:`absolute left-0 right-0 top-11 z-50 rounded border bg-core-white-900 shadow-xl ${!r&&"hidden"} py-2`,children:[e.options.length>6&&m.jsx("div",{className:"px-4",children:m.jsx(Zi,{placeholder:`${t("search")}...`,onChange:l=>o(l.target.value)})}),e.options.map(l=>{if(!(s&&!l.label.toLowerCase().includes(s.toLowerCase())))return m.jsx(_2,{option:l,checked:c.includes(l.value),onChange:b=>h(b,l.value)},`${l.value}_${c.includes(l.value)?"checked":"unchecked"}`)})]})]})]})}function A2({value:e,max:t,label:n}){return m.jsxs("div",{children:[m.jsx("div",{className:"font-sm mb-1 text-right text-core-gray-500",children:n}),m.jsx("div",{className:"h-1 w-full rounded-full bg-core-gray-200",children:m.jsx("div",{className:"h-1 rounded-full bg-core-primary-500",style:{width:`${Math.min(e/t*100,100)}%`}})})]})}function wm(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=wm(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Qr(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=wm(e))&&(r&&(r+=" "),r+=t);return r}const so=e=>typeof e=="number"&&!isNaN(e),_i=e=>typeof e=="string",Mn=e=>typeof e=="function",Ga=e=>_i(e)||Mn(e)?e:null,jl=e=>k.isValidElement(e)||_i(e)||Mn(e)||so(e);function T2(e,t,n){n===void 0&&(n=300);const{scrollHeight:r,style:i}=e;requestAnimationFrame(()=>{i.minHeight="initial",i.height=r+"px",i.transition=`all ${n}ms`,requestAnimationFrame(()=>{i.height="0",i.padding="0",i.margin="0",setTimeout(t,n)})})}function Ha(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:i=!0,collapseDuration:s=300}=e;return function(o){let{children:c,position:u,preventExitTransition:d,done:f,nodeRef:h,isIn:l,playToast:b}=o;const a=r?`${t}--${u}`:t,p=r?`${n}--${u}`:n,y=k.useRef(0);return k.useLayoutEffect(()=>{const g=h.current,v=a.split(" "),w=E=>{E.target===h.current&&(b(),g.removeEventListener("animationend",w),g.removeEventListener("animationcancel",w),y.current===0&&E.type!=="animationcancel"&&g.classList.remove(...v))};g.classList.add(...v),g.addEventListener("animationend",w),g.addEventListener("animationcancel",w)},[]),k.useEffect(()=>{const g=h.current,v=()=>{g.removeEventListener("animationend",v),i?T2(g,f,s):f()};l||(d?v():(y.current=1,g.className+=` ${p}`,g.addEventListener("animationend",v)))},[l]),k.createElement(k.Fragment,null,c)}}function Em(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const bn=new Map;let oo=[];const Ll=new Set,I2=e=>Ll.forEach(t=>t(e)),Sm=()=>bn.size>0;function xm(e,t){var n;if(t)return!((n=bn.get(t))==null||!n.isToastActive(e));let r=!1;return bn.forEach(i=>{i.isToastActive(e)&&(r=!0)}),r}function _m(e,t){jl(e)&&(Sm()||oo.push({content:e,options:t}),bn.forEach(n=>{n.buildToast(e,t)}))}function Cm(e,t){bn.forEach(n=>{t!=null&&t!=null&&t.containerId?(t==null?void 0:t.containerId)===n.id&&n.toggle(e,t==null?void 0:t.id):n.toggle(e,t==null?void 0:t.id)})}function k2(e){const{subscribe:t,getSnapshot:n,setProps:r}=k.useRef(function(s){const o=s.containerId||1;return{subscribe(c){const u=function(f,h,l){let b=1,a=0,p=[],y=[],g=[],v=h;const w=new Map,E=new Set,S=()=>{g=Array.from(w.values()),E.forEach(O=>O())},A=O=>{y=O==null?[]:y.filter(N=>N!==O),S()},T=O=>{const{toastId:N,onOpen:D,updateId:U,children:V}=O.props,F=U==null;O.staleId&&w.delete(O.staleId),w.set(N,O),y=[...y,O.props.toastId].filter(q=>q!==O.staleId),S(),l(Em(O,F?"added":"updated")),F&&Mn(D)&&D(k.isValidElement(V)&&V.props)};return{id:f,props:v,observe:O=>(E.add(O),()=>E.delete(O)),toggle:(O,N)=>{w.forEach(D=>{N!=null&&N!==D.props.toastId||Mn(D.toggle)&&D.toggle(O)})},removeToast:A,toasts:w,clearQueue:()=>{a-=p.length,p=[]},buildToast:(O,N)=>{if((he=>{let{containerId:ue,toastId:ye,updateId:de}=he;const $=ue?ue!==f:f!==1,H=w.has(ye)&&de==null;return $||H})(N))return;const{toastId:D,updateId:U,data:V,staleId:F,delay:q}=N,R=()=>{A(D)},L=U==null;L&&a++;const W={...v,style:v.toastStyle,key:b++,...Object.fromEntries(Object.entries(N).filter(he=>{let[ue,ye]=he;return ye!=null})),toastId:D,updateId:U,data:V,closeToast:R,isIn:!1,className:Ga(N.className||v.toastClassName),bodyClassName:Ga(N.bodyClassName||v.bodyClassName),progressClassName:Ga(N.progressClassName||v.progressClassName),autoClose:!N.isLoading&&(z=N.autoClose,Z=v.autoClose,z===!1||so(z)&&z>0?z:Z),deleteToast(){const he=w.get(D),{onClose:ue,children:ye}=he.props;Mn(ue)&&ue(k.isValidElement(ye)&&ye.props),l(Em(he,"removed")),w.delete(D),a--,a<0&&(a=0),p.length>0?T(p.shift()):S()}};var z,Z;W.closeButton=v.closeButton,N.closeButton===!1||jl(N.closeButton)?W.closeButton=N.closeButton:N.closeButton===!0&&(W.closeButton=!jl(v.closeButton)||v.closeButton);let te=O;k.isValidElement(O)&&!_i(O.type)?te=k.cloneElement(O,{closeToast:R,toastProps:W,data:V}):Mn(O)&&(te=O({closeToast:R,toastProps:W,data:V}));const re={content:te,props:W,staleId:F};v.limit&&v.limit>0&&a>v.limit&&L?p.push(re):so(q)?setTimeout(()=>{T(re)},q):T(re)},setProps(O){v=O},setToggle:(O,N)=>{w.get(O).toggle=N},isToastActive:O=>y.some(N=>N===O),getSnapshot:()=>v.newestOnTop?g.reverse():g}}(o,s,I2);bn.set(o,u);const d=u.observe(c);return oo.forEach(f=>_m(f.content,f.options)),oo=[],()=>{d(),bn.delete(o)}},setProps(c){var u;(u=bn.get(o))==null||u.setProps(c)},getSnapshot(){var c;return(c=bn.get(o))==null?void 0:c.getSnapshot()}}}(e)).current;r(e);const i=k.useSyncExternalStore(t,n,n);return{getToastToRender:function(s){if(!i)return[];const o=new Map;return i.forEach(c=>{const{position:u}=c.props;o.has(u)||o.set(u,[]),o.get(u).push(c)}),Array.from(o,c=>s(c[0],c[1]))},isToastActive:xm,count:i==null?void 0:i.length}}function O2(e){const[t,n]=k.useState(!1),[r,i]=k.useState(!1),s=k.useRef(null),o=k.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:c,pauseOnHover:u,closeToast:d,onClick:f,closeOnClick:h}=e;var l,b;function a(){n(!0)}function p(){n(!1)}function y(w){const E=s.current;o.canDrag&&E&&(o.didMove=!0,t&&p(),o.delta=e.draggableDirection==="x"?w.clientX-o.start:w.clientY-o.start,o.start!==w.clientX&&(o.canCloseOnClick=!1),E.style.transform=`translate3d(${e.draggableDirection==="x"?`${o.delta}px, var(--y)`:`0, calc(${o.delta}px + var(--y))`},0)`,E.style.opacity=""+(1-Math.abs(o.delta/o.removalDistance)))}function g(){document.removeEventListener("pointermove",y),document.removeEventListener("pointerup",g);const w=s.current;if(o.canDrag&&o.didMove&&w){if(o.canDrag=!1,Math.abs(o.delta)>o.removalDistance)return i(!0),e.closeToast(),void e.collapseAll();w.style.transition="transform 0.2s, opacity 0.2s",w.style.removeProperty("transform"),w.style.removeProperty("opacity")}}(b=bn.get((l={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||b.setToggle(l.id,l.fn),k.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||p(),window.addEventListener("focus",a),window.addEventListener("blur",p),()=>{window.removeEventListener("focus",a),window.removeEventListener("blur",p)}},[e.pauseOnFocusLoss]);const v={onPointerDown:function(w){if(e.draggable===!0||e.draggable===w.pointerType){o.didMove=!1,document.addEventListener("pointermove",y),document.addEventListener("pointerup",g);const E=s.current;o.canCloseOnClick=!0,o.canDrag=!0,E.style.transition="none",e.draggableDirection==="x"?(o.start=w.clientX,o.removalDistance=E.offsetWidth*(e.draggablePercent/100)):(o.start=w.clientY,o.removalDistance=E.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(w){const{top:E,bottom:S,left:A,right:T}=s.current.getBoundingClientRect();w.nativeEvent.type!=="touchend"&&e.pauseOnHover&&w.clientX>=A&&w.clientX<=T&&w.clientY>=E&&w.clientY<=S?p():a()}};return c&&u&&(v.onMouseEnter=p,e.stacked||(v.onMouseLeave=a)),h&&(v.onClick=w=>{f&&f(w),o.canCloseOnClick&&d()}),{playToast:a,pauseToast:p,isRunning:t,preventExitTransition:r,toastRef:s,eventHandlers:v}}function R2(e){let{delay:t,isRunning:n,closeToast:r,type:i="default",hide:s,className:o,style:c,controlledProgress:u,progress:d,rtl:f,isIn:h,theme:l}=e;const b=s||u&&d===0,a={...c,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};u&&(a.transform=`scaleX(${d})`);const p=Qr("Toastify__progress-bar",u?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${l}`,`Toastify__progress-bar--${i}`,{"Toastify__progress-bar--rtl":f}),y=Mn(o)?o({rtl:f,type:i,defaultClassName:p}):Qr(p,o),g={[u&&d>=1?"onTransitionEnd":"onAnimationEnd"]:u&&d<1?null:()=>{h&&r()}};return k.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":b},k.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${l} Toastify__progress-bar--${i}`}),k.createElement("div",{role:"progressbar","aria-hidden":b?"true":"false","aria-label":"notification timer",className:y,style:a,...g}))}let N2=1;const Am=()=>""+N2++;function M2(e){return e&&(_i(e.toastId)||so(e.toastId))?e.toastId:Am()}function ao(e,t){return _m(e,t),t.toastId}function Ya(e,t){return{...t,type:t&&t.type||e,toastId:M2(t)}}function Wa(e){return(t,n)=>ao(t,Ya(e,n))}function ze(e,t){return ao(e,Ya("default",t))}ze.loading=(e,t)=>ao(e,Ya("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),ze.promise=function(e,t,n){let r,{pending:i,error:s,success:o}=t;i&&(r=_i(i)?ze.loading(i,n):ze.loading(i.render,{...n,...i}));const c={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},u=(f,h,l)=>{if(h==null)return void ze.dismiss(r);const b={type:f,...c,...n,data:l},a=_i(h)?{render:h}:h;return r?ze.update(r,{...b,...a}):ze(a.render,{...b,...a}),l},d=Mn(e)?e():e;return d.then(f=>u("success",o,f)).catch(f=>u("error",s,f)),d},ze.success=Wa("success"),ze.info=Wa("info"),ze.error=Wa("error"),ze.warning=Wa("warning"),ze.warn=ze.warning,ze.dark=(e,t)=>ao(e,Ya("default",{theme:"dark",...t})),ze.dismiss=function(e){(function(t){var n;if(Sm()){if(t==null||_i(n=t)||so(n))bn.forEach(r=>{r.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){const r=bn.get(t.containerId);r?r.removeToast(t.id):bn.forEach(i=>{i.removeToast(t.id)})}}else oo=oo.filter(r=>t!=null&&r.options.toastId!==t)})(e)},ze.clearWaitingQueue=function(e){e===void 0&&(e={}),bn.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},ze.isActive=xm,ze.update=function(e,t){t===void 0&&(t={});const n=((r,i)=>{var s;let{containerId:o}=i;return(s=bn.get(o||1))==null?void 0:s.toasts.get(r)})(e,t);if(n){const{props:r,content:i}=n,s={delay:100,...r,...t,toastId:t.toastId||e,updateId:Am()};s.toastId!==e&&(s.staleId=e);const o=s.render||i;delete s.render,ao(o,s)}},ze.done=e=>{ze.update(e,{progress:1})},ze.onChange=function(e){return Ll.add(e),()=>{Ll.delete(e)}},ze.play=e=>Cm(!0,e),ze.pause=e=>Cm(!1,e);const D2=typeof window<"u"?k.useLayoutEffect:k.useEffect,Ka=e=>{let{theme:t,type:n,isLoading:r,...i}=e;return k.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...i})},Bl={info:function(e){return k.createElement(Ka,{...e},k.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return k.createElement(Ka,{...e},k.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return k.createElement(Ka,{...e},k.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return k.createElement(Ka,{...e},k.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return k.createElement("div",{className:"Toastify__spinner"})}},P2=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:i,playToast:s}=O2(e),{closeButton:o,children:c,autoClose:u,onClick:d,type:f,hideProgressBar:h,closeToast:l,transition:b,position:a,className:p,style:y,bodyClassName:g,bodyStyle:v,progressClassName:w,progressStyle:E,updateId:S,role:A,progress:T,rtl:O,toastId:N,deleteToast:D,isIn:U,isLoading:V,closeOnClick:F,theme:q}=e,R=Qr("Toastify__toast",`Toastify__toast-theme--${q}`,`Toastify__toast--${f}`,{"Toastify__toast--rtl":O},{"Toastify__toast--close-on-click":F}),L=Mn(p)?p({rtl:O,position:a,type:f,defaultClassName:R}):Qr(R,p),W=function(re){let{theme:he,type:ue,isLoading:ye,icon:de}=re,$=null;const H={theme:he,type:ue};return de===!1||(Mn(de)?$=de({...H,isLoading:ye}):k.isValidElement(de)?$=k.cloneElement(de,H):ye?$=Bl.spinner():(X=>X in Bl)(ue)&&($=Bl[ue](H))),$}(e),z=!!T||!u,Z={closeToast:l,type:f,theme:q};let te=null;return o===!1||(te=Mn(o)?o(Z):k.isValidElement(o)?k.cloneElement(o,Z):function(re){let{closeToast:he,theme:ue,ariaLabel:ye="close"}=re;return k.createElement("button",{className:`Toastify__close-button Toastify__close-button--${ue}`,type:"button",onClick:de=>{de.stopPropagation(),he(de)},"aria-label":ye},k.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},k.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(Z)),k.createElement(b,{isIn:U,done:D,position:a,preventExitTransition:n,nodeRef:r,playToast:s},k.createElement("div",{id:N,onClick:d,"data-in":U,className:L,...i,style:y,ref:r},k.createElement("div",{...U&&{role:A},className:Mn(g)?g({type:f}):Qr("Toastify__toast-body",g),style:v},W!=null&&k.createElement("div",{className:Qr("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!V})},W),k.createElement("div",null,c)),te,k.createElement(R2,{...S&&!z?{key:`pb-${S}`}:{},rtl:O,theme:q,delay:u,isRunning:t,isIn:U,closeToast:l,hide:h,type:f,style:E,className:w,controlledProgress:z,progress:T||0})))},za=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},j2=Ha(za("bounce",!0));Ha(za("slide",!0)),Ha(za("zoom")),Ha(za("flip"));const L2={position:"top-right",transition:j2,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function Tm(e){let t={...L2,...e};const n=e.stacked,[r,i]=k.useState(!0),s=k.useRef(null),{getToastToRender:o,isToastActive:c,count:u}=k2(t),{className:d,style:f,rtl:h,containerId:l}=t;function b(p){const y=Qr("Toastify__toast-container",`Toastify__toast-container--${p}`,{"Toastify__toast-container--rtl":h});return Mn(d)?d({position:p,rtl:h,defaultClassName:y}):Qr(y,Ga(d))}function a(){n&&(i(!0),ze.play())}return D2(()=>{if(n){var p;const y=s.current.querySelectorAll('[data-in="true"]'),g=12,v=(p=t.position)==null?void 0:p.includes("top");let w=0,E=0;Array.from(y).reverse().forEach((S,A)=>{const T=S;T.classList.add("Toastify__toast--stacked"),A>0&&(T.dataset.collapsed=`${r}`),T.dataset.pos||(T.dataset.pos=v?"top":"bot");const O=w*(r?.2:1)+(r?0:g*A);T.style.setProperty("--y",`${v?O:-1*O}px`),T.style.setProperty("--g",`${g}`),T.style.setProperty("--s",""+(1-(r?E:0))),w+=T.offsetHeight,E+=.025})}},[r,u,n]),k.createElement("div",{ref:s,className:"Toastify",id:l,onMouseEnter:()=>{n&&(i(!1),ze.pause())},onMouseLeave:a},o((p,y)=>{const g=y.length?{...f}:{...f,pointerEvents:"none"};return k.createElement("div",{className:b(p),style:g,key:`container-${p}`},y.map(v=>{let{content:w,props:E}=v;return k.createElement(P2,{...E,stacked:n,collapseAll:a,isIn:c(E.toastId,E.containerId),style:E.style,key:`toast-${E.key}`},w)}))}))}const B2="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_15_20)'%3e%3crect%20width='32'%20height='32'%20rx='4'%20fill='%23E7FBF4'/%3e%3cpath%20d='M10.6668%2017.3333L14.6668%2020L21.3335%2012'%20stroke='%23039855'%20stroke-width='1.6875'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_15_20'%3e%3cpath%20d='M0%2016C0%207.16344%207.16344%200%2016%200V0C24.8366%200%2032%207.16344%2032%2016V16C32%2024.8366%2024.8366%2032%2016%2032V32C7.16344%2032%200%2024.8366%200%2016V16Z'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",F2="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_17_95)'%3e%3crect%20width='32'%20height='32'%20rx='4'%20fill='%23FEF3F2'/%3e%3cpath%20d='M12.0003%2012L20.0003%2020M12.0003%2020L20.0003%2012'%20stroke='%23E02731'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_17_95'%3e%3cpath%20d='M0%2016C0%207.16344%207.16344%200%2016%200V0C24.8366%200%2032%207.16344%2032%2016V16C32%2024.8366%2024.8366%2032%2016%2032V32C7.16344%2032%200%2024.8366%200%2016V16Z'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",U2="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_17_99)'%3e%3crect%20width='32'%20height='32'%20rx='4'%20fill='%23FFFAEB'/%3e%3cpath%20d='M16.0002%2017.3333V13.3333M16.0002%2020V20.0067M23.0353%2019.3333L17.942%2010.456C17.0833%208.95867%2014.9167%208.95867%2014.058%2010.456L8.96533%2019.3333C8.11266%2020.8187%209.18933%2022.6667%2010.9073%2022.6667H21.0933C22.8107%2022.6667%2023.8873%2020.8187%2023.0353%2019.3333Z'%20stroke='%23CFAA25'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_17_99'%3e%3cpath%20d='M0%2016C0%207.16344%207.16344%200%2016%200C24.8366%200%2032%207.16344%2032%2016C32%2024.8366%2024.8366%2032%2016%2032C7.16344%2032%200%2024.8366%200%2016Z'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";function co(){const{t:e}=et(),n={closeButton:!1,icon:c=>c.type==="success"?m.jsx("img",{src:B2,alt:"success"}):c.type==="error"?m.jsx("img",{src:F2,alt:"error"}):m.jsx("img",{src:U2,alt:"warning"})},r=(c,u)=>{if(c==="success")return i(u);o(u)},i=(c=e("success"),u={})=>{ze.success(c,{...n,...u})},s=(c=e("warning"))=>{ze.warning(c,n)},o=(c=e("somethingWentWrong"))=>{var f,h;const u=(f=c.response)==null?void 0:f.data.errors,d=m.jsxs("div",{children:[m.jsx("p",{children:(h=c.response)==null?void 0:h.data.message}),u&&Object.keys(u).map(l=>u[l].map(b=>m.jsx("li",{children:b},b)))]});ze.error(d,n)};return{toast:r,successToast:i,warningToast:s,errorToast:o}}function Qa({state:e}){const t=It(),n=Hi(),{errorToast:r}=co(),{t:i}=et(),s=Mt(),[o,c]=k.useState(""),[u,d]=k.useState(!1),{session:f,mutate:h}=vt(),[l,b]=k.useState(!1),a=y=>{t.onContactLink&&n.get(`${f.uuid}/contacts`,{contact_uuid:y}).then(g=>{var v;(v=t.onContactLink)==null||v.call(t,g.data.data)}).catch(r)},p=()=>{n.put(f.uuid,{contact_identifier_value:o}).then(y=>{a(y.data.data.contact.uuid),h().then(()=>{e&&e.redirectRoute&&s(e.redirectRoute,{state:{...e,contactIdentifier:o}})})}).catch(()=>s("link-identifier",{state:{...e,contactIdentifier:o}})).finally(()=>d(!1))};return k.useEffect(()=>{o&&!u&&!l&&p()},[o]),m.jsxs(Pt,{id:xr,children:[m.jsx(jt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:i("scanOrEnterX",{x:"identifier"})})})}),m.jsx(Tt,{children:m.jsx("form",{onSubmit:y=>{y.preventDefault(),p()},children:m.jsx(fo,{dataSetter:c,setDefer:b,label:i("contactIdentifier")})})}),m.jsx(tn,{children:m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsx(ct,{label:i("continue"),onClick:p}),f.input_data.enable_email_identification&&m.jsx(ct,{label:i("useEmail"),variant:"secondary",onClick:()=>s("../email",{state:e})})]})})]})}var Im={},Tn={};Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.compactObject=Nm,Tn.deprecated=z2;var V2=Tn.detectBrowser=Q2;Tn.disableLog=Y2,Tn.disableWarnings=W2,Tn.extractVersion=Ja,Tn.filterStats=J2,Tn.log=K2,Tn.walkStats=Za,Tn.wrapPeerConnectionEvent=H2;function q2(e,t,n){return t=$2(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $2(e){var t=G2(e,"string");return Jr(t)=="symbol"?t:t+""}function G2(e,t){if(Jr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Jr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Jr(e){"@babel/helpers - typeof";return Jr=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},Jr(e)}var km=!0,Om=!0;function Ja(e,t,n){var r=e.match(t);return r&&r.length>=n&&parseInt(r[n],10)}function H2(e,t,n){if(e.RTCPeerConnection){var r=e.RTCPeerConnection.prototype,i=r.addEventListener;r.addEventListener=function(o,c){if(o!==t)return i.apply(this,arguments);var u=function(f){var h=n(f);h&&(c.handleEvent?c.handleEvent(h):c(h))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(c,u),i.apply(this,[o,u])};var s=r.removeEventListener;r.removeEventListener=function(o,c){if(o!==t||!this._eventMap||!this._eventMap[t])return s.apply(this,arguments);if(!this._eventMap[t].has(c))return s.apply(this,arguments);var u=this._eventMap[t].get(c);return this._eventMap[t].delete(c),this._eventMap[t].size===0&&delete this._eventMap[t],Object.keys(this._eventMap).length===0&&delete this._eventMap,s.apply(this,[o,u])},Object.defineProperty(r,"on"+t,{get:function(){return this["_on"+t]},set:function(c){this["_on"+t]&&(this.removeEventListener(t,this["_on"+t]),delete this["_on"+t]),c&&this.addEventListener(t,this["_on"+t]=c)},enumerable:!0,configurable:!0})}}function Y2(e){return typeof e!="boolean"?new Error("Argument type: "+Jr(e)+". Please use a boolean."):(km=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function W2(e){return typeof e!="boolean"?new Error("Argument type: "+Jr(e)+". Please use a boolean."):(Om=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function K2(){if((typeof window>"u"?"undefined":Jr(window))==="object"){if(km)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function z2(e,t){Om&&console.warn(e+" is deprecated, please use "+t+" instead.")}function Q2(e){var t={browser:null,version:null};if(typeof e>"u"||!e.navigator||!e.navigator.userAgent)return t.browser="Not a browser.",t;var n=e.navigator;if(n.userAgentData&&n.userAgentData.brands){var r=n.userAgentData.brands.find(function(i){return i.brand==="Chromium"});if(r)return{browser:"chrome",version:parseInt(r.version,10)}}if(n.mozGetUserMedia)t.browser="firefox",t.version=Ja(n.userAgent,/Firefox\/(\d+)\./,1);else if(n.webkitGetUserMedia||e.isSecureContext===!1&&e.webkitRTCPeerConnection)t.browser="chrome",t.version=Ja(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(e.RTCPeerConnection&&n.userAgent.match(/AppleWebKit\/(\d+)\./))t.browser="safari",t.version=Ja(n.userAgent,/AppleWebKit\/(\d+)\./,1),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype;else return t.browser="Not a supported browser.",t;return t}function Rm(e){return Object.prototype.toString.call(e)==="[object Object]"}function Nm(e){return Rm(e)?Object.keys(e).reduce(function(t,n){var r=Rm(e[n]),i=r?Nm(e[n]):e[n],s=r&&!Object.keys(i).length;return i===void 0||s?t:Object.assign(t,q2({},n,i))},{}):e}function Za(e,t,n){!t||n.has(t.id)||(n.set(t.id,t),Object.keys(t).forEach(function(r){r.endsWith("Id")?Za(e,e.get(t[r]),n):r.endsWith("Ids")&&t[r].forEach(function(i){Za(e,e.get(i),n)})}))}function J2(e,t,n){var r=n?"outbound-rtp":"inbound-rtp",i=new Map;if(t===null)return i;var s=[];return e.forEach(function(o){o.type==="track"&&o.trackIdentifier===t.id&&s.push(o)}),s.forEach(function(o){e.forEach(function(c){c.type===r&&c.trackId===o.id&&Za(e,c,i)})}),i}Object.defineProperty(Im,"__esModule",{value:!0});var Z2=Im.shimGetUserMedia=t_,X2=e_(Tn);function Mm(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Mm=function(i){return i?n:t})(e)}function e_(e,t){if(e&&e.__esModule)return e;if(e===null||Zr(e)!="object"&&typeof e!="function")return{default:e};var n=Mm(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(s!=="default"&&{}.hasOwnProperty.call(e,s)){var o=i?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(r,s,o):r[s]=e[s]}return r.default=e,n&&n.set(e,r),r}function Zr(e){"@babel/helpers - typeof";return Zr=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},Zr(e)}var Dm=X2.log;function t_(e,t){var n=e&&e.navigator;if(n.mediaDevices){var r=function(d){if(Zr(d)!=="object"||d.mandatory||d.optional)return d;var f={};return Object.keys(d).forEach(function(h){if(!(h==="require"||h==="advanced"||h==="mediaSource")){var l=Zr(d[h])==="object"?d[h]:{ideal:d[h]};l.exact!==void 0&&typeof l.exact=="number"&&(l.min=l.max=l.exact);var b=function(y,g){return y?y+g.charAt(0).toUpperCase()+g.slice(1):g==="deviceId"?"sourceId":g};if(l.ideal!==void 0){f.optional=f.optional||[];var a={};typeof l.ideal=="number"?(a[b("min",h)]=l.ideal,f.optional.push(a),a={},a[b("max",h)]=l.ideal,f.optional.push(a)):(a[b("",h)]=l.ideal,f.optional.push(a))}l.exact!==void 0&&typeof l.exact!="number"?(f.mandatory=f.mandatory||{},f.mandatory[b("",h)]=l.exact):["min","max"].forEach(function(p){l[p]!==void 0&&(f.mandatory=f.mandatory||{},f.mandatory[b(p,h)]=l[p])})}}),d.advanced&&(f.optional=(f.optional||[]).concat(d.advanced)),f},i=function(d,f){if(t.version>=61)return f(d);if(d=JSON.parse(JSON.stringify(d)),d&&Zr(d.audio)==="object"){var h=function(y,g,v){g in y&&!(v in y)&&(y[v]=y[g],delete y[g])};d=JSON.parse(JSON.stringify(d)),h(d.audio,"autoGainControl","googAutoGainControl"),h(d.audio,"noiseSuppression","googNoiseSuppression"),d.audio=r(d.audio)}if(d&&Zr(d.video)==="object"){var l=d.video.facingMode;l=l&&(Zr(l)==="object"?l:{ideal:l});var b=t.version<66;if(l&&(l.exact==="user"||l.exact==="environment"||l.ideal==="user"||l.ideal==="environment")&&!(n.mediaDevices.getSupportedConstraints&&n.mediaDevices.getSupportedConstraints().facingMode&&!b)){delete d.video.facingMode;var a;if(l.exact==="environment"||l.ideal==="environment"?a=["back","rear"]:(l.exact==="user"||l.ideal==="user")&&(a=["front"]),a)return n.mediaDevices.enumerateDevices().then(function(p){p=p.filter(function(g){return g.kind==="videoinput"});var y=p.find(function(g){return a.some(function(v){return g.label.toLowerCase().includes(v)})});return!y&&p.length&&a.includes("back")&&(y=p[p.length-1]),y&&(d.video.deviceId=l.exact?{exact:y.deviceId}:{ideal:y.deviceId}),d.video=r(d.video),Dm("chrome: "+JSON.stringify(d)),f(d)})}d.video=r(d.video)}return Dm("chrome: "+JSON.stringify(d)),f(d)},s=function(d){return t.version>=64?d:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[d.name]||d.name,message:d.message,constraint:d.constraint||d.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}},o=function(d,f,h){i(d,function(l){n.webkitGetUserMedia(l,f,function(b){h&&h(s(b))})})};if(n.getUserMedia=o.bind(n),n.mediaDevices.getUserMedia){var c=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(u){return i(u,function(d){return c(d).then(function(f){if(d.audio&&!f.getAudioTracks().length||d.video&&!f.getVideoTracks().length)throw f.getTracks().forEach(function(h){h.stop()}),new DOMException("","NotFoundError");return f},function(f){return Promise.reject(s(f))})})}}}}var Pm={};Object.defineProperty(Pm,"__esModule",{value:!0});var n_=Pm.shimGetUserMedia=s_,r_=i_(Tn);function jm(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(jm=function(i){return i?n:t})(e)}function i_(e,t){if(e&&e.__esModule)return e;if(e===null||Xi(e)!="object"&&typeof e!="function")return{default:e};var n=jm(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(s!=="default"&&{}.hasOwnProperty.call(e,s)){var o=i?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(r,s,o):r[s]=e[s]}return r.default=e,n&&n.set(e,r),r}function Xi(e){"@babel/helpers - typeof";return Xi=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},Xi(e)}function s_(e,t){var n=e&&e.navigator,r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(u,d,f){r_.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),n.mediaDevices.getUserMedia(u).then(d,f)},!(t.version>55&&"autoGainControl"in n.mediaDevices.getSupportedConstraints())){var i=function(d,f,h){f in d&&!(h in d)&&(d[h]=d[f],delete d[f])},s=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(u){return Xi(u)==="object"&&Xi(u.audio)==="object"&&(u=JSON.parse(JSON.stringify(u)),i(u.audio,"autoGainControl","mozAutoGainControl"),i(u.audio,"noiseSuppression","mozNoiseSuppression")),s(u)},r&&r.prototype.getSettings){var o=r.prototype.getSettings;r.prototype.getSettings=function(){var u=o.apply(this,arguments);return i(u,"mozAutoGainControl","autoGainControl"),i(u,"mozNoiseSuppression","noiseSuppression"),u}}if(r&&r.prototype.applyConstraints){var c=r.prototype.applyConstraints;r.prototype.applyConstraints=function(u){return this.kind==="audio"&&Xi(u)==="object"&&(u=JSON.parse(JSON.stringify(u)),i(u,"autoGainControl","mozAutoGainControl"),i(u,"noiseSuppression","mozNoiseSuppression")),c.apply(this,[u])}}}}var fr={};Object.defineProperty(fr,"__esModule",{value:!0}),fr.shimAudioContext=m_,fr.shimCallbacksAPI=l_,fr.shimConstraints=Fm,fr.shimCreateOfferLegacy=p_;var o_=fr.shimGetUserMedia=d_;fr.shimLocalStreamsAPI=c_,fr.shimRTCIceServerUrls=f_,fr.shimRemoteStreamsAPI=u_,fr.shimTrackEventTransceiver=h_;var Lm=a_(Tn);function Bm(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Bm=function(i){return i?n:t})(e)}function a_(e,t){if(e&&e.__esModule)return e;if(e===null||Xr(e)!="object"&&typeof e!="function")return{default:e};var n=Bm(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(s!=="default"&&{}.hasOwnProperty.call(e,s)){var o=i?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(r,s,o):r[s]=e[s]}return r.default=e,n&&n.set(e,r),r}function Xr(e){"@babel/helpers - typeof";return Xr=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},Xr(e)}function c_(e){if(!(Xr(e)!=="object"||!e.RTCPeerConnection)){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){var t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(r){var i=this;this._localStreams||(this._localStreams=[]),this._localStreams.includes(r)||this._localStreams.push(r),r.getAudioTracks().forEach(function(s){return t.call(i,s,r)}),r.getVideoTracks().forEach(function(s){return t.call(i,s,r)})},e.RTCPeerConnection.prototype.addTrack=function(r){for(var i=this,s=arguments.length,o=new Array(s>1?s-1:0),c=1;c<s;c++)o[c-1]=arguments[c];return o&&o.forEach(function(u){i._localStreams?i._localStreams.includes(u)||i._localStreams.push(u):i._localStreams=[u]}),t.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(r){var i=this;this._localStreams||(this._localStreams=[]);var s=this._localStreams.indexOf(r);if(s!==-1){this._localStreams.splice(s,1);var o=r.getTracks();this.getSenders().forEach(function(c){o.includes(c.track)&&i.removeTrack(c)})}})}}function u_(e){if(!(Xr(e)!=="object"||!e.RTCPeerConnection)&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get:function(){return this._onaddstream},set:function(r){var i=this;this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=r),this.addEventListener("track",this._onaddstreampoly=function(s){s.streams.forEach(function(o){if(i._remoteStreams||(i._remoteStreams=[]),!i._remoteStreams.includes(o)){i._remoteStreams.push(o);var c=new Event("addstream");c.stream=o,i.dispatchEvent(c)}})})}});var t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){var r=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(i){i.streams.forEach(function(s){if(r._remoteStreams||(r._remoteStreams=[]),!(r._remoteStreams.indexOf(s)>=0)){r._remoteStreams.push(s);var o=new Event("addstream");o.stream=s,r.dispatchEvent(o)}})}),t.apply(r,arguments)}}}function l_(e){if(!(Xr(e)!=="object"||!e.RTCPeerConnection)){var t=e.RTCPeerConnection.prototype,n=t.createOffer,r=t.createAnswer,i=t.setLocalDescription,s=t.setRemoteDescription,o=t.addIceCandidate;t.createOffer=function(d,f){var h=arguments.length>=2?arguments[2]:arguments[0],l=n.apply(this,[h]);return f?(l.then(d,f),Promise.resolve()):l},t.createAnswer=function(d,f){var h=arguments.length>=2?arguments[2]:arguments[0],l=r.apply(this,[h]);return f?(l.then(d,f),Promise.resolve()):l};var c=function(d,f,h){var l=i.apply(this,[d]);return h?(l.then(f,h),Promise.resolve()):l};t.setLocalDescription=c,c=function(d,f,h){var l=s.apply(this,[d]);return h?(l.then(f,h),Promise.resolve()):l},t.setRemoteDescription=c,c=function(d,f,h){var l=o.apply(this,[d]);return h?(l.then(f,h),Promise.resolve()):l},t.addIceCandidate=c}}function d_(e){var t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){var n=t.mediaDevices,r=n.getUserMedia.bind(n);t.mediaDevices.getUserMedia=function(i){return r(Fm(i))}}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=(function(s,o,c){t.mediaDevices.getUserMedia(s).then(o,c)}).bind(t))}function Fm(e){return e&&e.video!==void 0?Object.assign({},e,{video:Lm.compactObject(e.video)}):e}function f_(e){if(e.RTCPeerConnection){var t=e.RTCPeerConnection;e.RTCPeerConnection=function(r,i){if(r&&r.iceServers){for(var s=[],o=0;o<r.iceServers.length;o++){var c=r.iceServers[o];c.urls===void 0&&c.url?(Lm.deprecated("RTCIceServer.url","RTCIceServer.urls"),c=JSON.parse(JSON.stringify(c)),c.urls=c.url,delete c.url,s.push(c)):s.push(r.iceServers[o])}r.iceServers=s}return new t(r,i)},e.RTCPeerConnection.prototype=t.prototype,"generateCertificate"in t&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:function(){return t.generateCertificate}})}}function h_(e){Xr(e)==="object"&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})}function p_(e){var t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(r){if(r){typeof r.offerToReceiveAudio<"u"&&(r.offerToReceiveAudio=!!r.offerToReceiveAudio);var i=this.getTransceivers().find(function(o){return o.receiver.track.kind==="audio"});r.offerToReceiveAudio===!1&&i?i.direction==="sendrecv"?i.setDirection?i.setDirection("sendonly"):i.direction="sendonly":i.direction==="recvonly"&&(i.setDirection?i.setDirection("inactive"):i.direction="inactive"):r.offerToReceiveAudio===!0&&!i&&this.addTransceiver("audio",{direction:"recvonly"}),typeof r.offerToReceiveVideo<"u"&&(r.offerToReceiveVideo=!!r.offerToReceiveVideo);var s=this.getTransceivers().find(function(o){return o.receiver.track.kind==="video"});r.offerToReceiveVideo===!1&&s?s.direction==="sendrecv"?s.setDirection?s.setDirection("sendonly"):s.direction="sendonly":s.direction==="recvonly"&&(s.setDirection?s.setDirection("inactive"):s.direction="inactive"):r.offerToReceiveVideo===!0&&!s&&this.addTransceiver("video",{direction:"recvonly"})}return t.apply(this,arguments)}}function m_(e){Xr(e)!=="object"||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var Um=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Vm=(e,t,n)=>(Um(e,t,"read from private field"),n?n.call(e):t.get(e)),g_=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},y_=(e,t,n,r)=>(Um(e,t,"write to private field"),t.set(e,n),n);const qm=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","DXFilmEdge","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","rMQRCode","UPC-A","UPC-E"];function v_(e){return e.join("|")}function b_(e){const t=$m(e);let n=0,r=qm.length-1;for(;n<=r;){const i=Math.floor((n+r)/2),s=qm[i],o=$m(s);if(o===t)return s;o<t?n=i+1:r=i-1}return"None"}function $m(e){return e.toLowerCase().replace(/_-\[\]/g,"")}function w_(e,t){return e.Binarizer[t]}function E_(e,t){return e.CharacterSet[t]}const S_=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function x_(e){return S_[e.value]}function __(e,t){return e.EanAddOnSymbol[t]}function C_(e,t){return e.TextMode[t]}const es={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!1,validateCode39CheckSum:!1,validateITFCheckSum:!1,returnCodabarStartEnd:!1,returnErrors:!1,eanAddOnSymbol:"Read",textMode:"Plain",characterSet:"Unknown"};function Gm(e,t){return{...t,formats:v_(t.formats),binarizer:w_(e,t.binarizer),eanAddOnSymbol:__(e,t.eanAddOnSymbol),textMode:C_(e,t.textMode),characterSet:E_(e,t.characterSet)}}function Hm(e){return{...e,format:b_(e.format),eccLevel:e.eccLevel,contentType:x_(e.contentType)}}const A_={locateFile:(e,t)=>{const n=e.match(/_(.+?)\.wasm$/);return n?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.2.11/dist/${n[1]}/${e}`:t+e}};let Ym=new WeakMap;function Fl(e,t){var n;const r=Ym.get(e);if(r!=null&&r.modulePromise&&t===void 0)return r.modulePromise;const i=(n=r==null?void 0:r.moduleOverrides)!=null?n:A_,s=e({...i});return Ym.set(e,{moduleOverrides:i,modulePromise:s}),s}async function T_(e,t,n=es){const r={...es,...n},i=await Fl(e),{size:s}=t,o=new Uint8Array(await t.arrayBuffer()),c=i._malloc(s);i.HEAPU8.set(o,c);const u=i.readBarcodesFromImage(c,s,Gm(i,r));i._free(c);const d=[];for(let f=0;f<u.size();++f)d.push(Hm(u.get(f)));return d}async function I_(e,t,n=es){const r={...es,...n},i=await Fl(e),{data:s,width:o,height:c,data:{byteLength:u}}=t,d=i._malloc(u);i.HEAPU8.set(s,d);const f=i.readBarcodesFromPixmap(d,o,c,Gm(i,r));i._free(d);const h=[];for(let l=0;l<f.size();++l)h.push(Hm(f.get(l)));return h}({...es,formats:[...es.formats]});var Ul=(()=>{var e=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(t={}){var n,r=t,i,s;r.ready=new Promise((_,x)=>{i=_,s=x});var o=Object.assign({},r),c="./this.program",u=typeof window=="object",d=typeof Bun<"u",f=typeof((n=globalThis.WebAssembly)==null?void 0:n.instantiate)=="function",h=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var l="";function b(_){return r.locateFile?r.locateFile(_,l):l+_}var a;(u||h||d)&&(h?l=self.location.href:typeof document<"u"&&document.currentScript&&(l=document.currentScript.src),e&&(l=e),l.startsWith("blob:")?l="":l=l.substr(0,l.replace(/[?#].*/,"").lastIndexOf("/")+1),h&&(a=_=>{var x=new XMLHttpRequest;return x.open("GET",_,!1),x.responseType="arraybuffer",x.send(null),new Uint8Array(x.response)}));var p=r.print||console.log.bind(console),y=r.printErr||console.error.bind(console);Object.assign(r,o),o=null,r.arguments&&r.arguments,r.thisProgram&&(c=r.thisProgram),r.quit&&r.quit;var g;r.wasmBinary&&(g=r.wasmBinary);var v,w=!1,E,S,A,T,O,N,D,U;function V(){var _=v.buffer;r.HEAP8=E=new Int8Array(_),r.HEAP16=A=new Int16Array(_),r.HEAPU8=S=new Uint8Array(_),r.HEAPU16=T=new Uint16Array(_),r.HEAP32=O=new Int32Array(_),r.HEAPU32=N=new Uint32Array(_),r.HEAPF32=D=new Float32Array(_),r.HEAPF64=U=new Float64Array(_)}var F=[],q=[],R=[];function L(){if(r.preRun)for(typeof r.preRun=="function"&&(r.preRun=[r.preRun]);r.preRun.length;)Z(r.preRun.shift());Q(F)}function W(){Q(q)}function z(){if(r.postRun)for(typeof r.postRun=="function"&&(r.postRun=[r.postRun]);r.postRun.length;)re(r.postRun.shift());Q(R)}function Z(_){F.unshift(_)}function te(_){q.unshift(_)}function re(_){R.unshift(_)}var he=0,ue=null;function ye(_){var x;he++,(x=r.monitorRunDependencies)===null||x===void 0||x.call(r,he)}function de(_){var x;if(he--,(x=r.monitorRunDependencies)===null||x===void 0||x.call(r,he),he==0&&ue){var I=ue;ue=null,I()}}function $(_){var x;(x=r.onAbort)===null||x===void 0||x.call(r,_),_="Aborted("+_+")",y(_),w=!0,_+=". Build with -sASSERTIONS for more info.";var I=new WebAssembly.RuntimeError(_);throw s(I),I}var H="data:application/octet-stream;base64,",X=_=>_.startsWith(H),C;C="zxing_reader.wasm",X(C)||(C=b(C));function j(_){if(_==C&&g)return new Uint8Array(g);if(a)return a(_);throw"both async and sync fetching of the wasm failed"}function B(_){return!g&&(u||h||d||f)&&typeof fetch=="function"?fetch(_,{credentials:"same-origin"}).then(x=>{if(!x.ok)throw`failed to load wasm binary file at '${_}'`;return x.arrayBuffer()}).catch(()=>j(_)):Promise.resolve().then(()=>j(_))}function M(_,x,I){return B(_).then(P=>WebAssembly.instantiate(P,x)).then(I,P=>{y(`failed to asynchronously prepare wasm: ${P}`),$(P)})}function ee(_,x,I,P){return!_&&typeof WebAssembly.instantiateStreaming=="function"&&!X(x)&&typeof fetch=="function"?fetch(x,{credentials:"same-origin"}).then(K=>{var ne=WebAssembly.instantiateStreaming(K,I);return ne.then(P,function(oe){return y(`wasm streaming compile failed: ${oe}`),y("falling back to ArrayBuffer instantiation"),M(x,I,P)})}):M(x,I,P)}function J(){var _={a:t9};function x(P,K){return Ut=P.exports,v=Ut.ma,V(),Rb=Ut.qa,te(Ut.na),de(),Ut}ye();function I(P){x(P.instance)}if(r.instantiateWasm)try{return r.instantiateWasm(_,x)}catch(P){y(`Module.instantiateWasm callback failed with error: ${P}`),s(P)}return ee(g,C,_,I).catch(s),{}}var Q=_=>{for(;_.length>0;)_.shift()(r)};r.noExitRuntime;var Y=[],pe=0,ge=_=>{var x=new be(_);return x.get_caught()||(x.set_caught(!0),pe--),x.set_rethrown(!1),Y.push(x),Yb(x.excPtr),x.get_exception_ptr()},le=0,ie=()=>{Rt(0,0);var _=Y.pop();Hb(_.excPtr),le=0};class be{constructor(x){this.excPtr=x,this.ptr=x-24}set_type(x){N[this.ptr+4>>2]=x}get_type(){return N[this.ptr+4>>2]}set_destructor(x){N[this.ptr+8>>2]=x}get_destructor(){return N[this.ptr+8>>2]}set_caught(x){x=x?1:0,E[this.ptr+12]=x}get_caught(){return E[this.ptr+12]!=0}set_rethrown(x){x=x?1:0,E[this.ptr+13]=x}get_rethrown(){return E[this.ptr+13]!=0}init(x,I){this.set_adjusted_ptr(0),this.set_type(x),this.set_destructor(I)}set_adjusted_ptr(x){N[this.ptr+16>>2]=x}get_adjusted_ptr(){return N[this.ptr+16>>2]}get_exception_ptr(){var x=Kb(this.get_type());if(x)return N[this.excPtr>>2];var I=this.get_adjusted_ptr();return I!==0?I:this.excPtr}}var ae=_=>{throw le||(le=_),le},Ce=_=>{var x=le;if(!x)return fa(0),0;var I=new be(x);I.set_adjusted_ptr(x);var P=I.get_type();if(!P)return fa(0),x;for(var K in _){var ne=_[K];if(ne===0||ne===P)break;var oe=I.ptr+16;if(Wb(ne,P,oe))return fa(ne),x}return fa(P),x},_e=()=>Ce([]),Ye=_=>Ce([_]),rt=(_,x)=>Ce([_,x]),yt=()=>{var _=Y.pop();_||$("no exception to throw");var x=_.excPtr;throw _.get_rethrown()||(Y.push(_),_.set_rethrown(!0),_.set_caught(!1),pe++),le=x,le},pt=(_,x,I)=>{var P=new be(_);throw P.init(x,I),le=_,pe++,le},zn=()=>pe,ut={},rn=_=>{for(;_.length;){var x=_.pop(),I=_.pop();I(x)}};function mt(_){return this.fromWireType(N[_>>2])}var Re={},dn={},Bt={},pn,sn=_=>{throw new pn(_)},mn=(_,x,I)=>{_.forEach(function(ce){Bt[ce]=x});function P(ce){var me=I(ce);me.length!==_.length&&sn("Mismatched type converter count");for(var Ee=0;Ee<_.length;++Ee)Pe(_[Ee],me[Ee])}var K=new Array(x.length),ne=[],oe=0;x.forEach((ce,me)=>{dn.hasOwnProperty(ce)?K[me]=dn[ce]:(ne.push(ce),Re.hasOwnProperty(ce)||(Re[ce]=[]),Re[ce].push(()=>{K[me]=dn[ce],++oe,oe===ne.length&&P(K)}))}),ne.length===0&&P(K)},Rn=_=>{var x=ut[_];delete ut[_];var I=x.rawConstructor,P=x.rawDestructor,K=x.fields,ne=K.map(oe=>oe.getterReturnType).concat(K.map(oe=>oe.setterArgumentType));mn([_],ne,oe=>{var ce={};return K.forEach((me,Ee)=>{var Ie=me.fieldName,Ke=oe[Ee],Be=me.getter,st=me.getterContext,$t=oe[Ee+K.length],yn=me.setter,Nt=me.setterContext;ce[Ie]={read:on=>Ke.fromWireType(Be(st,on)),write:(on,we)=>{var ke=[];yn(Nt,on,$t.toWireType(ke,we)),rn(ke)}}}),[{name:x.name,fromWireType:me=>{var Ee={};for(var Ie in ce)Ee[Ie]=ce[Ie].read(me);return P(me),Ee},toWireType:(me,Ee)=>{for(var Ie in ce)if(!(Ie in Ee))throw new TypeError(`Missing field: "${Ie}"`);var Ke=I();for(Ie in ce)ce[Ie].write(Ke,Ee[Ie]);return me!==null&&me.push(P,Ke),Ke},argPackAdvance:$e,readValueFromPointer:mt,destructorFunction:P}]})},Fn=(_,x,I,P,K)=>{},_n=()=>{for(var _=new Array(256),x=0;x<256;++x)_[x]=String.fromCharCode(x);gn=_},gn,At=_=>{for(var x="",I=_;S[I];)x+=gn[S[I++]];return x},Qn,Ae=_=>{throw new Qn(_)};function We(_,x){let I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var P=x.name;if(_||Ae(`type "${P}" must have a positive integer typeid pointer`),dn.hasOwnProperty(_)){if(I.ignoreDuplicateRegistrations)return;Ae(`Cannot register type '${P}' twice`)}if(dn[_]=x,delete Bt[_],Re.hasOwnProperty(_)){var K=Re[_];delete Re[_],K.forEach(ne=>ne())}}function Pe(_,x){let I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!("argPackAdvance"in x))throw new TypeError("registerType registeredInstance requires argPackAdvance");return We(_,x,I)}var $e=8,kt=(_,x,I,P)=>{x=At(x),Pe(_,{name:x,fromWireType:function(K){return!!K},toWireType:function(K,ne){return ne?I:P},argPackAdvance:$e,readValueFromPointer:function(K){return this.fromWireType(S[K])},destructorFunction:null})},Ps=_=>({count:_.count,deleteScheduled:_.deleteScheduled,preservePointerOnDelete:_.preservePointerOnDelete,ptr:_.ptr,ptrType:_.ptrType,smartPtr:_.smartPtr,smartPtrType:_.smartPtrType}),vi=_=>{function x(I){return I.$$.ptrType.registeredClass.name}Ae(x(_)+" instance already deleted")},js=!1,ua=_=>{},Qf=_=>{_.smartPtr?_.smartPtrType.rawDestructor(_.smartPtr):_.ptrType.registeredClass.rawDestructor(_.ptr)},_u=_=>{_.count.value-=1;var x=_.count.value===0;x&&Qf(_)},Cu=(_,x,I)=>{if(x===I)return _;if(I.baseClass===void 0)return null;var P=Cu(_,x,I.baseClass);return P===null?null:I.downcast(P)},Au={},G=()=>Object.keys(Ge).length,ve=()=>{var _=[];for(var x in Ge)Ge.hasOwnProperty(x)&&_.push(Ge[x]);return _},Te=[],Me=()=>{for(;Te.length;){var _=Te.pop();_.$$.deleteScheduled=!1,_.delete()}},Ze,gt=_=>{Ze=_,Te.length&&Ze&&Ze(Me)},Xe=()=>{r.getInheritedInstanceCount=G,r.getLiveInheritedInstances=ve,r.flushPendingDeletes=Me,r.setDelayFunction=gt},Ge={},fn=(_,x)=>{for(x===void 0&&Ae("ptr should not be undefined");_.baseClass;)x=_.upcast(x),_=_.baseClass;return x},Ot=(_,x)=>(x=fn(_,x),Ge[x]),xt=(_,x)=>{(!x.ptrType||!x.ptr)&&sn("makeClassHandle requires ptr and ptrType");var I=!!x.smartPtrType,P=!!x.smartPtr;return I!==P&&sn("Both smartPtrType and smartPtr must be specified"),x.count={value:1},Jn(Object.create(_,{$$:{value:x,writable:!0}}))};function Nn(_){var x=this.getPointee(_);if(!x)return this.destructor(_),null;var I=Ot(this.registeredClass,x);if(I!==void 0){if(I.$$.count.value===0)return I.$$.ptr=x,I.$$.smartPtr=_,I.clone();var P=I.clone();return this.destructor(_),P}function K(){return this.isSmartPointer?xt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:x,smartPtrType:this,smartPtr:_}):xt(this.registeredClass.instancePrototype,{ptrType:this,ptr:_})}var ne=this.registeredClass.getActualType(x),oe=Au[ne];if(!oe)return K.call(this);var ce;this.isConst?ce=oe.constPointerType:ce=oe.pointerType;var me=Cu(x,this.registeredClass,ce.registeredClass);return me===null?K.call(this):this.isSmartPointer?xt(ce.registeredClass.instancePrototype,{ptrType:ce,ptr:me,smartPtrType:this,smartPtr:_}):xt(ce.registeredClass.instancePrototype,{ptrType:ce,ptr:me})}var Jn=_=>typeof FinalizationRegistry>"u"?(Jn=x=>x,_):(js=new FinalizationRegistry(x=>{_u(x.$$)}),Jn=x=>{var I=x.$$,P=!!I.smartPtr;if(P){var K={$$:I};js.register(x,K,x)}return x},ua=x=>js.unregister(x),Jn(_)),Lr=()=>{Object.assign(Zt.prototype,{isAliasOf(_){if(!(this instanceof Zt)||!(_ instanceof Zt))return!1;var x=this.$$.ptrType.registeredClass,I=this.$$.ptr;_.$$=_.$$;for(var P=_.$$.ptrType.registeredClass,K=_.$$.ptr;x.baseClass;)I=x.upcast(I),x=x.baseClass;for(;P.baseClass;)K=P.upcast(K),P=P.baseClass;return x===P&&I===K},clone(){if(this.$$.ptr||vi(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var _=Jn(Object.create(Object.getPrototypeOf(this),{$$:{value:Ps(this.$$)}}));return _.$$.count.value+=1,_.$$.deleteScheduled=!1,_},delete(){this.$$.ptr||vi(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ae("Object already scheduled for deletion"),ua(this),_u(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||vi(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ae("Object already scheduled for deletion"),Te.push(this),Te.length===1&&Ze&&Ze(Me),this.$$.deleteScheduled=!0,this}})};function Zt(){}var Br=(_,x)=>Object.defineProperty(x,"name",{value:_}),Tu=(_,x,I)=>{if(_[x].overloadTable===void 0){var P=_[x];_[x]=function(){for(var K=arguments.length,ne=new Array(K),oe=0;oe<K;oe++)ne[oe]=arguments[oe];return _[x].overloadTable.hasOwnProperty(ne.length)||Ae(`Function '${I}' called with an invalid number of arguments (${ne.length}) - expects one of (${_[x].overloadTable})!`),_[x].overloadTable[ne.length].apply(this,ne)},_[x].overloadTable=[],_[x].overloadTable[P.argCount]=P}},la=(_,x,I)=>{r.hasOwnProperty(_)?((I===void 0||r[_].overloadTable!==void 0&&r[_].overloadTable[I]!==void 0)&&Ae(`Cannot register public name '${_}' twice`),Tu(r,_,_),r.hasOwnProperty(I)&&Ae(`Cannot register multiple overloads of a function with the same number of arguments (${I})!`),r[_].overloadTable[I]=x):(r[_]=x,I!==void 0&&(r[_].numArguments=I))},P8=48,j8=57,L8=_=>{if(_===void 0)return"_unknown";_=_.replace(/[^a-zA-Z0-9_]/g,"$");var x=_.charCodeAt(0);return x>=P8&&x<=j8?`_${_}`:_};function B8(_,x,I,P,K,ne,oe,ce){this.name=_,this.constructor=x,this.instancePrototype=I,this.rawDestructor=P,this.baseClass=K,this.getActualType=ne,this.upcast=oe,this.downcast=ce,this.pureVirtualFunctions=[]}var Jf=(_,x,I)=>{for(;x!==I;)x.upcast||Ae(`Expected null or instance of ${I.name}, got an instance of ${x.name}`),_=x.upcast(_),x=x.baseClass;return _};function F8(_,x){if(x===null)return this.isReference&&Ae(`null is not a valid ${this.name}`),0;x.$$||Ae(`Cannot pass "${rh(x)}" as a ${this.name}`),x.$$.ptr||Ae(`Cannot pass deleted object as a pointer of type ${this.name}`);var I=x.$$.ptrType.registeredClass,P=Jf(x.$$.ptr,I,this.registeredClass);return P}function U8(_,x){var I;if(x===null)return this.isReference&&Ae(`null is not a valid ${this.name}`),this.isSmartPointer?(I=this.rawConstructor(),_!==null&&_.push(this.rawDestructor,I),I):0;(!x||!x.$$)&&Ae(`Cannot pass "${rh(x)}" as a ${this.name}`),x.$$.ptr||Ae(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&x.$$.ptrType.isConst&&Ae(`Cannot convert argument of type ${x.$$.smartPtrType?x.$$.smartPtrType.name:x.$$.ptrType.name} to parameter type ${this.name}`);var P=x.$$.ptrType.registeredClass;if(I=Jf(x.$$.ptr,P,this.registeredClass),this.isSmartPointer)switch(x.$$.smartPtr===void 0&&Ae("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:x.$$.smartPtrType===this?I=x.$$.smartPtr:Ae(`Cannot convert argument of type ${x.$$.smartPtrType?x.$$.smartPtrType.name:x.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:I=x.$$.smartPtr;break;case 2:if(x.$$.smartPtrType===this)I=x.$$.smartPtr;else{var K=x.clone();I=this.rawShare(I,Ur.toHandle(()=>K.delete())),_!==null&&_.push(this.rawDestructor,I)}break;default:Ae("Unsupporting sharing policy")}return I}function V8(_,x){if(x===null)return this.isReference&&Ae(`null is not a valid ${this.name}`),0;x.$$||Ae(`Cannot pass "${rh(x)}" as a ${this.name}`),x.$$.ptr||Ae(`Cannot pass deleted object as a pointer of type ${this.name}`),x.$$.ptrType.isConst&&Ae(`Cannot convert argument of type ${x.$$.ptrType.name} to parameter type ${this.name}`);var I=x.$$.ptrType.registeredClass,P=Jf(x.$$.ptr,I,this.registeredClass);return P}var q8=()=>{Object.assign(Iu.prototype,{getPointee(_){return this.rawGetPointee&&(_=this.rawGetPointee(_)),_},destructor(_){var x;(x=this.rawDestructor)===null||x===void 0||x.call(this,_)},argPackAdvance:$e,readValueFromPointer:mt,fromWireType:Nn})};function Iu(_,x,I,P,K,ne,oe,ce,me,Ee,Ie){this.name=_,this.registeredClass=x,this.isReference=I,this.isConst=P,this.isSmartPointer=K,this.pointeeType=ne,this.sharingPolicy=oe,this.rawGetPointee=ce,this.rawConstructor=me,this.rawShare=Ee,this.rawDestructor=Ie,!K&&x.baseClass===void 0?P?(this.toWireType=F8,this.destructorFunction=null):(this.toWireType=V8,this.destructorFunction=null):this.toWireType=U8}var Ob=(_,x,I)=>{r.hasOwnProperty(_)||sn("Replacing nonexistent public symbol"),r[_].overloadTable!==void 0&&I!==void 0?r[_].overloadTable[I]=x:(r[_]=x,r[_].argCount=I)},$8=(_,x,I)=>{var P=r["dynCall_"+_];return P(x,...I)},ku=[],Rb,Ft=_=>{var x=ku[_];return x||(_>=ku.length&&(ku.length=_+1),ku[_]=x=Rb.get(_)),x},G8=function(_,x){let I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(_.includes("j"))return $8(_,x,I);var P=Ft(x)(...I);return P},H8=(_,x)=>function(){for(var I=arguments.length,P=new Array(I),K=0;K<I;K++)P[K]=arguments[K];return G8(_,x,P)},cr=(_,x)=>{_=At(_);function I(){return _.includes("j")?H8(_,x):Ft(x)}var P=I();return typeof P!="function"&&Ae(`unknown function pointer with signature ${_}: ${x}`),P},Y8=(_,x)=>{var I=Br(x,function(P){this.name=x,this.message=P;var K=new Error(P).stack;K!==void 0&&(this.stack=this.toString()+`
102
+ `+K.replace(/^Error(:[^\n]*)?\n/,""))});return I.prototype=Object.create(_.prototype),I.prototype.constructor=I,I.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},I},Nb,Mb=_=>{var x=Gb(_),I=At(x);return Vr(x),I},Ou=(_,x)=>{var I=[],P={};function K(ne){if(!P[ne]&&!dn[ne]){if(Bt[ne]){Bt[ne].forEach(K);return}I.push(ne),P[ne]=!0}}throw x.forEach(K),new Nb(`${_}: `+I.map(Mb).join([", "]))},W8=(_,x,I,P,K,ne,oe,ce,me,Ee,Ie,Ke,Be)=>{Ie=At(Ie),ne=cr(K,ne),ce&&(ce=cr(oe,ce)),Ee&&(Ee=cr(me,Ee)),Be=cr(Ke,Be);var st=L8(Ie);la(st,function(){Ou(`Cannot construct ${Ie} due to unbound types`,[P])}),mn([_,x,I],P?[P]:[],$t=>{$t=$t[0];var yn,Nt;P?(yn=$t.registeredClass,Nt=yn.instancePrototype):Nt=Zt.prototype;var on=Br(Ie,function(){if(Object.getPrototypeOf(this)!==we)throw new Qn("Use 'new' to construct "+Ie);if(ke.constructor_body===void 0)throw new Qn(Ie+" has no accessible constructor");for(var Zb=arguments.length,Du=new Array(Zb),Pu=0;Pu<Zb;Pu++)Du[Pu]=arguments[Pu];var Xb=ke.constructor_body[Du.length];if(Xb===void 0)throw new Qn(`Tried to invoke ctor of ${Ie} with invalid number of parameters (${Du.length}) - expected (${Object.keys(ke.constructor_body).toString()}) parameters instead!`);return Xb.apply(this,Du)}),we=Object.create(Nt,{constructor:{value:on}});on.prototype=we;var ke=new B8(Ie,on,we,Be,yn,ne,ce,Ee);if(ke.baseClass){var Gt,Xt;(Xt=(Gt=ke.baseClass).__derivedClasses)!==null&&Xt!==void 0||(Gt.__derivedClasses=[]),ke.baseClass.__derivedClasses.push(ke)}var Ls=new Iu(Ie,ke,!0,!1,!1),Mu=new Iu(Ie+"*",ke,!1,!1,!1),Jb=new Iu(Ie+" const*",ke,!1,!0,!1);return Au[_]={pointerType:Mu,constPointerType:Jb},Ob(st,on),[Ls,Mu,Jb]})},Zf=(_,x)=>{for(var I=[],P=0;P<_;P++)I.push(N[x+P*4>>2]);return I};function K8(_){for(var x=1;x<_.length;++x)if(_[x]!==null&&_[x].destructorFunction===void 0)return!0;return!1}function Xf(_,x,I,P,K,ne){var oe=x.length;oe<2&&Ae("argTypes array size mismatch! Must at least get return value and 'this' types!");var ce=x[1]!==null&&I!==null,me=K8(x),Ee=x[0].name!=="void",Ie=oe-2,Ke=new Array(Ie),Be=[],st=[],$t=function(){arguments.length!==Ie&&Ae(`function ${_} called with ${arguments.length} arguments, expected ${Ie}`),st.length=0;var yn;Be.length=ce?2:1,Be[0]=K,ce&&(yn=x[1].toWireType(st,this),Be[1]=yn);for(var Nt=0;Nt<Ie;++Nt)Ke[Nt]=x[Nt+2].toWireType(st,Nt<0||arguments.length<=Nt?void 0:arguments[Nt]),Be.push(Ke[Nt]);var on=P(...Be);function we(ke){if(me)rn(st);else for(var Gt=ce?1:2;Gt<x.length;Gt++){var Xt=Gt===1?yn:Ke[Gt-2];x[Gt].destructorFunction!==null&&x[Gt].destructorFunction(Xt)}if(Ee)return x[0].fromWireType(ke)}return we(on)};return Br(_,$t)}var z8=(_,x,I,P,K,ne)=>{var oe=Zf(x,I);K=cr(P,K),mn([],[_],ce=>{ce=ce[0];var me=`constructor ${ce.name}`;if(ce.registeredClass.constructor_body===void 0&&(ce.registeredClass.constructor_body=[]),ce.registeredClass.constructor_body[x-1]!==void 0)throw new Qn(`Cannot register multiple constructors with identical number of parameters (${x-1}) for class '${ce.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return ce.registeredClass.constructor_body[x-1]=()=>{Ou(`Cannot construct ${ce.name} due to unbound types`,oe)},mn([],oe,Ee=>(Ee.splice(1,0,null),ce.registeredClass.constructor_body[x-1]=Xf(me,Ee,null,K,ne),[])),[]})},Db=_=>{_=_.trim();const x=_.indexOf("(");return x!==-1?_.substr(0,x):_},Q8=(_,x,I,P,K,ne,oe,ce,me)=>{var Ee=Zf(I,P);x=At(x),x=Db(x),ne=cr(K,ne),mn([],[_],Ie=>{Ie=Ie[0];var Ke=`${Ie.name}.${x}`;x.startsWith("@@")&&(x=Symbol[x.substring(2)]),ce&&Ie.registeredClass.pureVirtualFunctions.push(x);function Be(){Ou(`Cannot call ${Ke} due to unbound types`,Ee)}var st=Ie.registeredClass.instancePrototype,$t=st[x];return $t===void 0||$t.overloadTable===void 0&&$t.className!==Ie.name&&$t.argCount===I-2?(Be.argCount=I-2,Be.className=Ie.name,st[x]=Be):(Tu(st,x,Ke),st[x].overloadTable[I-2]=Be),mn([],Ee,yn=>{var Nt=Xf(Ke,yn,Ie,ne,oe);return st[x].overloadTable===void 0?(Nt.argCount=I-2,st[x]=Nt):st[x].overloadTable[I-2]=Nt,[]}),[]})},eh=[],Fr=[],th=_=>{_>9&&--Fr[_+1]===0&&(Fr[_]=void 0,eh.push(_))},J8=()=>Fr.length/2-5-eh.length,Z8=()=>{Fr.push(0,1,void 0,1,null,1,!0,1,!1,1),r.count_emval_handles=J8},Ur={toValue:_=>(_||Ae("Cannot use deleted val. handle = "+_),Fr[_]),toHandle:_=>{switch(_){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const x=eh.pop()||Fr.length;return Fr[x]=_,Fr[x+1]=1,x}}}},X8={name:"emscripten::val",fromWireType:_=>{var x=Ur.toValue(_);return th(_),x},toWireType:(_,x)=>Ur.toHandle(x),argPackAdvance:$e,readValueFromPointer:mt,destructorFunction:null},Pb=_=>Pe(_,X8),eM=(_,x,I)=>{switch(x){case 1:return I?function(P){return this.fromWireType(E[P])}:function(P){return this.fromWireType(S[P])};case 2:return I?function(P){return this.fromWireType(A[P>>1])}:function(P){return this.fromWireType(T[P>>1])};case 4:return I?function(P){return this.fromWireType(O[P>>2])}:function(P){return this.fromWireType(N[P>>2])};default:throw new TypeError(`invalid integer width (${x}): ${_}`)}},tM=(_,x,I,P)=>{x=At(x);function K(){}K.values={},Pe(_,{name:x,constructor:K,fromWireType:function(ne){return this.constructor.values[ne]},toWireType:(ne,oe)=>oe.value,argPackAdvance:$e,readValueFromPointer:eM(x,I,P),destructorFunction:null}),la(x,K)},nh=(_,x)=>{var I=dn[_];return I===void 0&&Ae(`${x} has unknown type ${Mb(_)}`),I},nM=(_,x,I)=>{var P=nh(_,"enum");x=At(x);var K=P.constructor,ne=Object.create(P.constructor.prototype,{value:{value:I},constructor:{value:Br(`${P.name}_${x}`,function(){})}});K.values[I]=ne,K[x]=ne},rh=_=>{if(_===null)return"null";var x=typeof _;return x==="object"||x==="array"||x==="function"?_.toString():""+_},rM=(_,x)=>{switch(x){case 4:return function(I){return this.fromWireType(D[I>>2])};case 8:return function(I){return this.fromWireType(U[I>>3])};default:throw new TypeError(`invalid float width (${x}): ${_}`)}},iM=(_,x,I)=>{x=At(x),Pe(_,{name:x,fromWireType:P=>P,toWireType:(P,K)=>K,argPackAdvance:$e,readValueFromPointer:rM(x,I),destructorFunction:null})},sM=(_,x,I,P,K,ne,oe)=>{var ce=Zf(x,I);_=At(_),_=Db(_),K=cr(P,K),la(_,function(){Ou(`Cannot call ${_} due to unbound types`,ce)},x-1),mn([],ce,me=>{var Ee=[me[0],null].concat(me.slice(1));return Ob(_,Xf(_,Ee,null,K,ne),x-1),[]})},oM=(_,x,I)=>{switch(x){case 1:return I?P=>E[P]:P=>S[P];case 2:return I?P=>A[P>>1]:P=>T[P>>1];case 4:return I?P=>O[P>>2]:P=>N[P>>2];default:throw new TypeError(`invalid integer width (${x}): ${_}`)}},aM=(_,x,I,P,K)=>{x=At(x);var ne=Ie=>Ie;if(P===0){var oe=32-8*I;ne=Ie=>Ie<<oe>>>oe}var ce=x.includes("unsigned"),me=(Ie,Ke)=>{},Ee;ce?Ee=function(Ie,Ke){return me(Ke,this.name),Ke>>>0}:Ee=function(Ie,Ke){return me(Ke,this.name),Ke},Pe(_,{name:x,fromWireType:ne,toWireType:Ee,argPackAdvance:$e,readValueFromPointer:oM(x,I,P!==0),destructorFunction:null})},cM=(_,x,I)=>{var P=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],K=P[x];function ne(oe){var ce=N[oe>>2],me=N[oe+4>>2];return new K(E.buffer,me,ce)}I=At(I),Pe(_,{name:I,fromWireType:ne,argPackAdvance:$e,readValueFromPointer:ne},{ignoreDuplicateRegistrations:!0})},uM=(_,x)=>{Pb(_)},jb=(_,x,I,P)=>{if(!(P>0))return 0;for(var K=I,ne=I+P-1,oe=0;oe<_.length;++oe){var ce=_.charCodeAt(oe);if(ce>=55296&&ce<=57343){var me=_.charCodeAt(++oe);ce=65536+((ce&1023)<<10)|me&1023}if(ce<=127){if(I>=ne)break;x[I++]=ce}else if(ce<=2047){if(I+1>=ne)break;x[I++]=192|ce>>6,x[I++]=128|ce&63}else if(ce<=65535){if(I+2>=ne)break;x[I++]=224|ce>>12,x[I++]=128|ce>>6&63,x[I++]=128|ce&63}else{if(I+3>=ne)break;x[I++]=240|ce>>18,x[I++]=128|ce>>12&63,x[I++]=128|ce>>6&63,x[I++]=128|ce&63}}return x[I]=0,I-K},lM=(_,x,I)=>jb(_,S,x,I),Lb=_=>{for(var x=0,I=0;I<_.length;++I){var P=_.charCodeAt(I);P<=127?x++:P<=2047?x+=2:P>=55296&&P<=57343?(x+=4,++I):x+=3}return x},Bb=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Fb=(_,x,I)=>{for(var P=x+I,K=x;_[K]&&!(K>=P);)++K;if(K-x>16&&_.buffer&&Bb)return Bb.decode(_.subarray(x,K));for(var ne="";x<K;){var oe=_[x++];if(!(oe&128)){ne+=String.fromCharCode(oe);continue}var ce=_[x++]&63;if((oe&224)==192){ne+=String.fromCharCode((oe&31)<<6|ce);continue}var me=_[x++]&63;if((oe&240)==224?oe=(oe&15)<<12|ce<<6|me:oe=(oe&7)<<18|ce<<12|me<<6|_[x++]&63,oe<65536)ne+=String.fromCharCode(oe);else{var Ee=oe-65536;ne+=String.fromCharCode(55296|Ee>>10,56320|Ee&1023)}}return ne},ih=(_,x)=>_?Fb(S,_,x):"",dM=(_,x)=>{x=At(x);var I=x==="std::string";Pe(_,{name:x,fromWireType(P){var K=N[P>>2],ne=P+4,oe;if(I)for(var ce=ne,me=0;me<=K;++me){var Ee=ne+me;if(me==K||S[Ee]==0){var Ie=Ee-ce,Ke=ih(ce,Ie);oe===void 0?oe=Ke:(oe+="\0",oe+=Ke),ce=Ee+1}}else{for(var Be=new Array(K),me=0;me<K;++me)Be[me]=String.fromCharCode(S[ne+me]);oe=Be.join("")}return Vr(P),oe},toWireType(P,K){K instanceof ArrayBuffer&&(K=new Uint8Array(K));var ne,oe=typeof K=="string";oe||K instanceof Uint8Array||K instanceof Uint8ClampedArray||K instanceof Int8Array||Ae("Cannot pass non-string to std::string"),I&&oe?ne=Lb(K):ne=K.length;var ce=ah(4+ne+1),me=ce+4;if(N[ce>>2]=ne,I&&oe)lM(K,me,ne+1);else if(oe)for(var Ee=0;Ee<ne;++Ee){var Ie=K.charCodeAt(Ee);Ie>255&&(Vr(me),Ae("String has UTF-16 code units that do not fit in 8 bits")),S[me+Ee]=Ie}else for(var Ee=0;Ee<ne;++Ee)S[me+Ee]=K[Ee];return P!==null&&P.push(Vr,ce),ce},argPackAdvance:$e,readValueFromPointer:mt,destructorFunction(P){Vr(P)}})},Ub=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,fM=(_,x)=>{for(var I=_,P=I>>1,K=P+x/2;!(P>=K)&&T[P];)++P;if(I=P<<1,I-_>32&&Ub)return Ub.decode(S.subarray(_,I));for(var ne="",oe=0;!(oe>=x/2);++oe){var ce=A[_+oe*2>>1];if(ce==0)break;ne+=String.fromCharCode(ce)}return ne},hM=(_,x,I)=>{var P;if((P=I)!==null&&P!==void 0||(I=2147483647),I<2)return 0;I-=2;for(var K=x,ne=I<_.length*2?I/2:_.length,oe=0;oe<ne;++oe){var ce=_.charCodeAt(oe);A[x>>1]=ce,x+=2}return A[x>>1]=0,x-K},pM=_=>_.length*2,mM=(_,x)=>{for(var I=0,P="";!(I>=x/4);){var K=O[_+I*4>>2];if(K==0)break;if(++I,K>=65536){var ne=K-65536;P+=String.fromCharCode(55296|ne>>10,56320|ne&1023)}else P+=String.fromCharCode(K)}return P},gM=(_,x,I)=>{var P;if((P=I)!==null&&P!==void 0||(I=2147483647),I<4)return 0;for(var K=x,ne=K+I-4,oe=0;oe<_.length;++oe){var ce=_.charCodeAt(oe);if(ce>=55296&&ce<=57343){var me=_.charCodeAt(++oe);ce=65536+((ce&1023)<<10)|me&1023}if(O[x>>2]=ce,x+=4,x+4>ne)break}return O[x>>2]=0,x-K},yM=_=>{for(var x=0,I=0;I<_.length;++I){var P=_.charCodeAt(I);P>=55296&&P<=57343&&++I,x+=4}return x},vM=(_,x,I)=>{I=At(I);var P,K,ne,oe;x===2?(P=fM,K=hM,oe=pM,ne=ce=>T[ce>>1]):x===4&&(P=mM,K=gM,oe=yM,ne=ce=>N[ce>>2]),Pe(_,{name:I,fromWireType:ce=>{for(var me=N[ce>>2],Ee,Ie=ce+4,Ke=0;Ke<=me;++Ke){var Be=ce+4+Ke*x;if(Ke==me||ne(Be)==0){var st=Be-Ie,$t=P(Ie,st);Ee===void 0?Ee=$t:(Ee+="\0",Ee+=$t),Ie=Be+x}}return Vr(ce),Ee},toWireType:(ce,me)=>{typeof me!="string"&&Ae(`Cannot pass non-string to C++ string type ${I}`);var Ee=oe(me),Ie=ah(4+Ee+x);return N[Ie>>2]=Ee/x,K(me,Ie+4,Ee+x),ce!==null&&ce.push(Vr,Ie),Ie},argPackAdvance:$e,readValueFromPointer:mt,destructorFunction(ce){Vr(ce)}})},bM=(_,x,I,P,K,ne)=>{ut[_]={name:At(x),rawConstructor:cr(I,P),rawDestructor:cr(K,ne),fields:[]}},wM=(_,x,I,P,K,ne,oe,ce,me,Ee)=>{ut[_].fields.push({fieldName:At(x),getterReturnType:I,getter:cr(P,K),getterContext:ne,setterArgumentType:oe,setter:cr(ce,me),setterContext:Ee})},EM=(_,x)=>{x=At(x),Pe(_,{isVoid:!0,name:x,argPackAdvance:0,fromWireType:()=>{},toWireType:(I,P)=>{}})},sh=[],SM=(_,x,I,P)=>(_=sh[_],x=Ur.toValue(x),_(null,x,I,P)),xM={},_M=_=>{var x=xM[_];return x===void 0?At(_):x},Vb=()=>{if(typeof globalThis=="object")return globalThis;function _(x){x.$$$embind_global$$$=x;var I=typeof $$$embind_global$$$=="object"&&x.$$$embind_global$$$==x;return I||delete x.$$$embind_global$$$,I}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&_(global)?$$$embind_global$$$=global:typeof self=="object"&&_(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},CM=_=>_===0?Ur.toHandle(Vb()):(_=_M(_),Ur.toHandle(Vb()[_])),AM=_=>{var x=sh.length;return sh.push(_),x},TM=(_,x)=>{for(var I=new Array(_),P=0;P<_;++P)I[P]=nh(N[x+P*4>>2],"parameter "+P);return I},IM=Reflect.construct,kM=(_,x,I)=>{var P=[],K=_.toWireType(P,I);return P.length&&(N[x>>2]=Ur.toHandle(P)),K},OM=(_,x,I)=>{var P=TM(_,x),K=P.shift();_--;var ne=new Array(_),oe=(me,Ee,Ie,Ke)=>{for(var Be=0,st=0;st<_;++st)ne[st]=P[st].readValueFromPointer(Ke+Be),Be+=P[st].argPackAdvance;var $t=I===1?IM(Ee,ne):Ee.apply(me,ne);return kM(K,Ie,$t)},ce=`methodCaller<(${P.map(me=>me.name).join(", ")}) => ${K.name}>`;return AM(Br(ce,oe))},RM=_=>{_>9&&(Fr[_+1]+=1)},NM=_=>{var x=Ur.toValue(_);rn(x),th(_)},MM=(_,x)=>{_=nh(_,"_emval_take_value");var I=_.readValueFromPointer(x);return Ur.toHandle(I)},DM=()=>{$("")},PM=(_,x,I)=>S.copyWithin(_,x,x+I),jM=()=>2147483648,LM=_=>{var x=v.buffer,I=(_-x.byteLength+65535)/65536;try{return v.grow(I),V(),1}catch{}},BM=_=>{var x=S.length;_>>>=0;var I=jM();if(_>I)return!1;for(var P=(me,Ee)=>me+(Ee-me%Ee)%Ee,K=1;K<=4;K*=2){var ne=x*(1+.2/K);ne=Math.min(ne,_+100663296);var oe=Math.min(I,P(Math.max(_,ne),65536)),ce=LM(oe);if(ce)return!0}return!1},oh={},FM=()=>c||"./this.program",da=()=>{if(!da.strings){var _=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",x={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:_,_:FM()};for(var I in oh)oh[I]===void 0?delete x[I]:x[I]=oh[I];var P=[];for(var I in x)P.push(`${I}=${x[I]}`);da.strings=P}return da.strings},UM=(_,x)=>{for(var I=0;I<_.length;++I)E[x++]=_.charCodeAt(I);E[x]=0},VM=(_,x)=>{var I=0;return da().forEach((P,K)=>{var ne=x+I;N[_+K*4>>2]=ne,UM(P,ne),I+=P.length+1}),0},qM=(_,x)=>{var I=da();N[_>>2]=I.length;var P=0;return I.forEach(K=>P+=K.length+1),N[x>>2]=P,0},$M=_=>52;function GM(_,x,I,P,K){return 70}var HM=[null,[],[]],YM=(_,x)=>{var I=HM[_];x===0||x===10?((_===1?p:y)(Fb(I,0)),I.length=0):I.push(x)},WM=(_,x,I,P)=>{for(var K=0,ne=0;ne<I;ne++){var oe=N[x>>2],ce=N[x+4>>2];x+=8;for(var me=0;me<ce;me++)YM(_,S[oe+me]);K+=ce}return N[P>>2]=K,0},KM=_=>_,Ru=_=>_%4===0&&(_%100!==0||_%400===0),zM=(_,x)=>{for(var I=0,P=0;P<=x;I+=_[P++]);return I},qb=[31,29,31,30,31,30,31,31,30,31,30,31],$b=[31,28,31,30,31,30,31,31,30,31,30,31],QM=(_,x)=>{for(var I=new Date(_.getTime());x>0;){var P=Ru(I.getFullYear()),K=I.getMonth(),ne=(P?qb:$b)[K];if(x>ne-I.getDate())x-=ne-I.getDate()+1,I.setDate(1),K<11?I.setMonth(K+1):(I.setMonth(0),I.setFullYear(I.getFullYear()+1));else return I.setDate(I.getDate()+x),I}return I};function JM(_,x,I){var P=Lb(_)+1,K=new Array(P);return jb(_,K,0,K.length),K}var ZM=(_,x)=>{E.set(_,x)},XM=(_,x,I,P)=>{var K=N[P+40>>2],ne={tm_sec:O[P>>2],tm_min:O[P+4>>2],tm_hour:O[P+8>>2],tm_mday:O[P+12>>2],tm_mon:O[P+16>>2],tm_year:O[P+20>>2],tm_wday:O[P+24>>2],tm_yday:O[P+28>>2],tm_isdst:O[P+32>>2],tm_gmtoff:O[P+36>>2],tm_zone:K?ih(K):""},oe=ih(I),ce={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var me in ce)oe=oe.replace(new RegExp(me,"g"),ce[me]);var Ee=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Ie=["January","February","March","April","May","June","July","August","September","October","November","December"];function Ke(we,ke,Gt){for(var Xt=typeof we=="number"?we.toString():we||"";Xt.length<ke;)Xt=Gt[0]+Xt;return Xt}function Be(we,ke){return Ke(we,ke,"0")}function st(we,ke){function Gt(Ls){return Ls<0?-1:Ls>0?1:0}var Xt;return(Xt=Gt(we.getFullYear()-ke.getFullYear()))===0&&(Xt=Gt(we.getMonth()-ke.getMonth()))===0&&(Xt=Gt(we.getDate()-ke.getDate())),Xt}function $t(we){switch(we.getDay()){case 0:return new Date(we.getFullYear()-1,11,29);case 1:return we;case 2:return new Date(we.getFullYear(),0,3);case 3:return new Date(we.getFullYear(),0,2);case 4:return new Date(we.getFullYear(),0,1);case 5:return new Date(we.getFullYear()-1,11,31);case 6:return new Date(we.getFullYear()-1,11,30)}}function yn(we){var ke=QM(new Date(we.tm_year+1900,0,1),we.tm_yday),Gt=new Date(ke.getFullYear(),0,4),Xt=new Date(ke.getFullYear()+1,0,4),Ls=$t(Gt),Mu=$t(Xt);return st(Ls,ke)<=0?st(Mu,ke)<=0?ke.getFullYear()+1:ke.getFullYear():ke.getFullYear()-1}var Nt={"%a":we=>Ee[we.tm_wday].substring(0,3),"%A":we=>Ee[we.tm_wday],"%b":we=>Ie[we.tm_mon].substring(0,3),"%B":we=>Ie[we.tm_mon],"%C":we=>{var ke=we.tm_year+1900;return Be(ke/100|0,2)},"%d":we=>Be(we.tm_mday,2),"%e":we=>Ke(we.tm_mday,2," "),"%g":we=>yn(we).toString().substring(2),"%G":yn,"%H":we=>Be(we.tm_hour,2),"%I":we=>{var ke=we.tm_hour;return ke==0?ke=12:ke>12&&(ke-=12),Be(ke,2)},"%j":we=>Be(we.tm_mday+zM(Ru(we.tm_year+1900)?qb:$b,we.tm_mon-1),3),"%m":we=>Be(we.tm_mon+1,2),"%M":we=>Be(we.tm_min,2),"%n":()=>`
103
+ `,"%p":we=>we.tm_hour>=0&&we.tm_hour<12?"AM":"PM","%S":we=>Be(we.tm_sec,2),"%t":()=>" ","%u":we=>we.tm_wday||7,"%U":we=>{var ke=we.tm_yday+7-we.tm_wday;return Be(Math.floor(ke/7),2)},"%V":we=>{var ke=Math.floor((we.tm_yday+7-(we.tm_wday+6)%7)/7);if((we.tm_wday+371-we.tm_yday-2)%7<=2&&ke++,ke){if(ke==53){var Gt=(we.tm_wday+371-we.tm_yday)%7;Gt!=4&&(Gt!=3||!Ru(we.tm_year))&&(ke=1)}}else{ke=52;var Xt=(we.tm_wday+7-we.tm_yday-1)%7;(Xt==4||Xt==5&&Ru(we.tm_year%400-1))&&ke++}return Be(ke,2)},"%w":we=>we.tm_wday,"%W":we=>{var ke=we.tm_yday+7-(we.tm_wday+6)%7;return Be(Math.floor(ke/7),2)},"%y":we=>(we.tm_year+1900).toString().substring(2),"%Y":we=>we.tm_year+1900,"%z":we=>{var ke=we.tm_gmtoff,Gt=ke>=0;return ke=Math.abs(ke)/60,ke=ke/60*100+ke%60,(Gt?"+":"-")+("0000"+ke).slice(-4)},"%Z":we=>we.tm_zone,"%%":()=>"%"};oe=oe.replace(/%%/g,"\0\0");for(var me in Nt)oe.includes(me)&&(oe=oe.replace(new RegExp(me,"g"),Nt[me](ne)));oe=oe.replace(/\0\0/g,"%");var on=JM(oe);return on.length>x?0:(ZM(on,_),on.length-1)},e9=(_,x,I,P,K)=>XM(_,x,I,P);pn=r.InternalError=class extends Error{constructor(_){super(_),this.name="InternalError"}},_n(),Qn=r.BindingError=class extends Error{constructor(_){super(_),this.name="BindingError"}},Lr(),Xe(),q8(),Nb=r.UnboundTypeError=Y8(Error,"UnboundTypeError"),Z8();var t9={s:ge,u:ie,b:_e,g:Ye,q:rt,K:yt,f:pt,Y:zn,e:ae,ha:Rn,U:Fn,ba:kt,fa:W8,ea:z8,w:Q8,aa:Pb,x:tM,h:nM,O:iM,P:sM,t:aM,o:cM,ga:uM,N:dM,C:vM,A:bM,ia:wM,ca:EM,E:SM,ka:th,la:CM,M:OM,Q:RM,R:NM,da:MM,B:DM,$:PM,Z:BM,W:VM,X:qM,_:$M,T:GM,L:WM,F:y9,D:o9,G:g9,m:v9,a:n9,d:c9,p:s9,k:m9,I:h9,v:d9,H:p9,z:w9,S:S9,l:u9,j:a9,c:i9,n:r9,J:f9,r:b9,i:l9,y:E9,ja:KM,V:e9},Ut=J(),Vr=r._free=_=>(Vr=r._free=Ut.oa)(_),ah=r._malloc=_=>(ah=r._malloc=Ut.pa)(_),Gb=_=>(Gb=Ut.ra)(_),Rt=(_,x)=>(Rt=Ut.sa)(_,x),fa=_=>(fa=Ut.ta)(_),Vt=()=>(Vt=Ut.ua)(),qt=_=>(qt=Ut.va)(_),Hb=_=>(Hb=Ut.wa)(_),Yb=_=>(Yb=Ut.xa)(_),Wb=(_,x,I)=>(Wb=Ut.ya)(_,x,I),Kb=_=>(Kb=Ut.za)(_);r.dynCall_viijii=(_,x,I,P,K,ne,oe)=>(r.dynCall_viijii=Ut.Aa)(_,x,I,P,K,ne,oe),r.dynCall_jiji=(_,x,I,P,K)=>(r.dynCall_jiji=Ut.Ba)(_,x,I,P,K);var zb=r.dynCall_jiiii=(_,x,I,P,K)=>(zb=r.dynCall_jiiii=Ut.Ca)(_,x,I,P,K);r.dynCall_iiiiij=(_,x,I,P,K,ne,oe)=>(r.dynCall_iiiiij=Ut.Da)(_,x,I,P,K,ne,oe),r.dynCall_iiiiijj=(_,x,I,P,K,ne,oe,ce,me)=>(r.dynCall_iiiiijj=Ut.Ea)(_,x,I,P,K,ne,oe,ce,me),r.dynCall_iiiiiijj=(_,x,I,P,K,ne,oe,ce,me,Ee)=>(r.dynCall_iiiiiijj=Ut.Fa)(_,x,I,P,K,ne,oe,ce,me,Ee);function n9(_,x){var I=Vt();try{return Ft(_)(x)}catch(P){if(qt(I),P!==P+0)throw P;Rt(1,0)}}function r9(_,x,I,P){var K=Vt();try{Ft(_)(x,I,P)}catch(ne){if(qt(K),ne!==ne+0)throw ne;Rt(1,0)}}function i9(_,x,I){var P=Vt();try{Ft(_)(x,I)}catch(K){if(qt(P),K!==K+0)throw K;Rt(1,0)}}function s9(_,x,I,P){var K=Vt();try{return Ft(_)(x,I,P)}catch(ne){if(qt(K),ne!==ne+0)throw ne;Rt(1,0)}}function o9(_,x,I,P,K){var ne=Vt();try{return Ft(_)(x,I,P,K)}catch(oe){if(qt(ne),oe!==oe+0)throw oe;Rt(1,0)}}function a9(_,x){var I=Vt();try{Ft(_)(x)}catch(P){if(qt(I),P!==P+0)throw P;Rt(1,0)}}function c9(_,x,I){var P=Vt();try{return Ft(_)(x,I)}catch(K){if(qt(P),K!==K+0)throw K;Rt(1,0)}}function u9(_){var x=Vt();try{Ft(_)()}catch(I){if(qt(x),I!==I+0)throw I;Rt(1,0)}}function l9(_,x,I,P,K,ne,oe,ce,me,Ee,Ie){var Ke=Vt();try{Ft(_)(x,I,P,K,ne,oe,ce,me,Ee,Ie)}catch(Be){if(qt(Ke),Be!==Be+0)throw Be;Rt(1,0)}}function d9(_,x,I,P,K,ne,oe){var ce=Vt();try{return Ft(_)(x,I,P,K,ne,oe)}catch(me){if(qt(ce),me!==me+0)throw me;Rt(1,0)}}function f9(_,x,I,P,K){var ne=Vt();try{Ft(_)(x,I,P,K)}catch(oe){if(qt(ne),oe!==oe+0)throw oe;Rt(1,0)}}function h9(_,x,I,P,K,ne){var oe=Vt();try{return Ft(_)(x,I,P,K,ne)}catch(ce){if(qt(oe),ce!==ce+0)throw ce;Rt(1,0)}}function p9(_,x,I,P,K,ne,oe,ce){var me=Vt();try{return Ft(_)(x,I,P,K,ne,oe,ce)}catch(Ee){if(qt(me),Ee!==Ee+0)throw Ee;Rt(1,0)}}function m9(_,x,I,P,K){var ne=Vt();try{return Ft(_)(x,I,P,K)}catch(oe){if(qt(ne),oe!==oe+0)throw oe;Rt(1,0)}}function g9(_,x,I,P){var K=Vt();try{return Ft(_)(x,I,P)}catch(ne){if(qt(K),ne!==ne+0)throw ne;Rt(1,0)}}function y9(_,x,I,P){var K=Vt();try{return Ft(_)(x,I,P)}catch(ne){if(qt(K),ne!==ne+0)throw ne;Rt(1,0)}}function v9(_){var x=Vt();try{return Ft(_)()}catch(I){if(qt(x),I!==I+0)throw I;Rt(1,0)}}function b9(_,x,I,P,K,ne,oe,ce){var me=Vt();try{Ft(_)(x,I,P,K,ne,oe,ce)}catch(Ee){if(qt(me),Ee!==Ee+0)throw Ee;Rt(1,0)}}function w9(_,x,I,P,K,ne,oe,ce,me,Ee,Ie,Ke){var Be=Vt();try{return Ft(_)(x,I,P,K,ne,oe,ce,me,Ee,Ie,Ke)}catch(st){if(qt(Be),st!==st+0)throw st;Rt(1,0)}}function E9(_,x,I,P,K,ne,oe,ce,me,Ee,Ie,Ke,Be,st,$t,yn){var Nt=Vt();try{Ft(_)(x,I,P,K,ne,oe,ce,me,Ee,Ie,Ke,Be,st,$t,yn)}catch(on){if(qt(Nt),on!==on+0)throw on;Rt(1,0)}}function S9(_,x,I,P,K){var ne=Vt();try{return zb(_,x,I,P,K)}catch(oe){if(qt(ne),oe!==oe+0)throw oe;Rt(1,0)}}var Nu;ue=function _(){Nu||Qb(),Nu||(ue=_)};function Qb(){if(he>0||(L(),he>0))return;function _(){Nu||(Nu=!0,r.calledRun=!0,!w&&(W(),i(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),z()))}r.setStatus?(r.setStatus("Running..."),setTimeout(function(){setTimeout(function(){r.setStatus("")},1),_()},1)):_()}if(r.preInit)for(typeof r.preInit=="function"&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return Qb(),t.ready}})();function k_(e){return Fl(Ul,e)}async function O_(e,t){return T_(Ul,e,t)}async function R_(e,t){return I_(Ul,e,t)}const Wm=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["data_matrix","DataMatrix"],["dx_film_edge","DXFilmEdge"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["maxi_code","MaxiCode"],["micro_qr_code","MicroQRCode"],["pdf417","PDF417"],["qr_code","QRCode"],["rm_qr_code","rMQRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"],["linear_codes","Linear-Codes"],["matrix_codes","Matrix-Codes"]],N_=[...Wm,["unknown"]].map(e=>e[0]),Xa=new Map(Wm);function M_(e){for(const[t,n]of Xa)if(e===n)return t;return"unknown"}function D_(e){if(Km(e))return{width:e.naturalWidth,height:e.naturalHeight};if(zm(e))return{width:e.width.baseVal.value,height:e.height.baseVal.value};if(Qm(e))return{width:e.videoWidth,height:e.videoHeight};if(Zm(e))return{width:e.width,height:e.height};if(eg(e))return{width:e.displayWidth,height:e.displayHeight};if(Jm(e))return{width:e.width,height:e.height};if(Xm(e))return{width:e.width,height:e.height};throw new TypeError("The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.")}function Km(e){try{return e instanceof HTMLImageElement}catch{return!1}}function zm(e){try{return e instanceof SVGImageElement}catch{return!1}}function Qm(e){try{return e instanceof HTMLVideoElement}catch{return!1}}function Jm(e){try{return e instanceof HTMLCanvasElement}catch{return!1}}function Zm(e){try{return e instanceof ImageBitmap}catch{return!1}}function Xm(e){try{return e instanceof OffscreenCanvas}catch{return!1}}function eg(e){try{return e instanceof VideoFrame}catch{return!1}}function tg(e){try{return e instanceof Blob}catch{return!1}}function P_(e){try{return e instanceof ImageData}catch{return!1}}function j_(e,t){try{const n=new OffscreenCanvas(e,t);if(n.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return n;throw void 0}catch{const n=document.createElement("canvas");return n.width=e,n.height=t,n}}async function ng(e){if(Km(e)&&!await U_(e))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(zm(e)&&!await V_(e))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(eg(e)&&q_(e))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(Qm(e)&&(e.readyState===0||e.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(Zm(e)&&G_(e))throw new DOMException("The image source is detached.","InvalidStateError");const{width:t,height:n}=D_(e);if(t===0||n===0)return null;const r=j_(t,n).getContext("2d");r.drawImage(e,0,0);try{return r.getImageData(0,0,t,n)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function L_(e){let t;try{if(globalThis.createImageBitmap)t=await createImageBitmap(e);else if(globalThis.Image){t=new Image;let n="";try{n=URL.createObjectURL(e),t.src=n,await t.decode()}finally{URL.revokeObjectURL(n)}}else return e}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await ng(t)}function B_(e){const{width:t,height:n}=e;if(t===0||n===0)return null;const r=e.getContext("2d");try{return r.getImageData(0,0,t,n)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function F_(e){if(tg(e))return await L_(e);if(P_(e)){if($_(e))throw new DOMException("The image data has been detached.","InvalidStateError");return e}return Jm(e)||Xm(e)?B_(e):await ng(e)}async function U_(e){try{return await e.decode(),!0}catch{return!1}}async function V_(e){var t;try{return await((t=e.decode)==null?void 0:t.call(e)),!0}catch{return!1}}function q_(e){return e.format===null}function $_(e){return e.data.buffer.byteLength===0}function G_(e){return e.width===0&&e.height===0}function rg(e,t){return e instanceof DOMException?new DOMException(`${t}: ${e.message}`,e.name):e instanceof Error?new e.constructor(`${t}: ${e.message}`):new Error(`${t}: ${e}`)}var uo;class Vl extends EventTarget{constructor(t={}){var n;super(),g_(this,uo,void 0);try{const r=(n=t==null?void 0:t.formats)==null?void 0:n.filter(i=>i!=="unknown");if((r==null?void 0:r.length)===0)throw new TypeError("Hint option provided, but is empty.");for(const i of r??[])if(!Xa.has(i))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${i}' is not a valid enum value of type BarcodeFormat.`);y_(this,uo,r??[]),k_().then(i=>{this.dispatchEvent(new CustomEvent("load",{detail:i}))}).catch(i=>{this.dispatchEvent(new CustomEvent("error",{detail:i}))})}catch(r){throw rg(r,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return N_.filter(t=>t!=="unknown")}async detect(t){try{const n=await F_(t);if(n===null)return[];let r;try{tg(n)?r=await O_(n,{tryHarder:!0,formats:Vm(this,uo).map(i=>Xa.get(i))}):r=await R_(n,{tryHarder:!0,formats:Vm(this,uo).map(i=>Xa.get(i))})}catch(i){throw console.error(i),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return r.map(i=>{const{topLeft:{x:s,y:o},topRight:{x:c,y:u},bottomLeft:{x:d,y:f},bottomRight:{x:h,y:l}}=i.position,b=Math.min(s,c,d,h),a=Math.min(o,u,f,l),p=Math.max(s,c,d,h),y=Math.max(o,u,f,l);return{boundingBox:new DOMRectReadOnly(b,a,p-b,y-a),rawValue:i.text,format:M_(i.format),cornerPoints:[{x:s,y:o},{x:c,y:u},{x:h,y:l},{x:d,y:f}]}})}catch(n){throw rg(n,"Failed to execute 'detect' on 'BarcodeDetector'")}}}uo=new WeakMap,globalThis.BarcodeDetector!=null||(globalThis.BarcodeDetector=Vl);function H_(e){const{onClick:t,disabled:n,className:r}=e,i={cursor:n?"default":"pointer",stroke:n?"grey":"yellow",strokeLineJoin:"round",strokeLineCap:"round",strokeWidth:1.5,...e.style};return k.createElement("svg",{onClick:n?void 0:t,className:r,style:i,width:"28px",height:"28px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M3 3L6.00007 6.00007M21 21L19.8455 19.8221M9.74194 4.06811C9.83646 4.04279 9.93334 4.02428 10.0319 4.01299C10.1453 4 10.2683 4 10.5141 4H13.5327C13.7786 4 13.9015 4 14.015 4.01299C14.6068 4.08078 15.1375 4.40882 15.4628 4.90782C15.5252 5.00345 15.5802 5.11345 15.6901 5.33333C15.7451 5.44329 15.7726 5.49827 15.8037 5.54609C15.9664 5.79559 16.2318 5.95961 16.5277 5.9935C16.5844 6 16.6459 6 16.7688 6H17.8234C18.9435 6 19.5036 6 19.9314 6.21799C20.3077 6.40973 20.6137 6.71569 20.8055 7.09202C21.0234 7.51984 21.0234 8.0799 21.0234 9.2V15.3496M19.8455 19.8221C19.4278 20 18.8702 20 17.8234 20H6.22344C5.10333 20 4.54328 20 4.11546 19.782C3.73913 19.5903 3.43317 19.2843 3.24142 18.908C3.02344 18.4802 3.02344 17.9201 3.02344 16.8V9.2C3.02344 8.0799 3.02344 7.51984 3.24142 7.09202C3.43317 6.71569 3.73913 6.40973 4.11546 6.21799C4.51385 6.015 5.0269 6.00103 6.00007 6.00007M19.8455 19.8221L14.5619 14.5619M14.5619 14.5619C14.0349 15.4243 13.0847 16 12 16C10.3431 16 9 14.6569 9 13C9 11.9153 9.57566 10.9651 10.4381 10.4381M14.5619 14.5619L10.4381 10.4381M10.4381 10.4381L6.00007 6.00007"}))}function Y_(e){const{onClick:t,disabled:n,className:r}=e,i={cursor:n?"default":"pointer",stroke:n?"grey":"yellow",strokeLineJoin:"round",strokeLineCap:"round",strokeWidth:1.5,...e.style};return k.createElement("svg",{onClick:n?void 0:t,className:r,style:i,width:"28px",height:"28px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M12 16C13.6569 16 15 14.6569 15 13C15 11.3431 13.6569 10 12 10C10.3431 10 9 11.3431 9 13C9 14.6569 10.3431 16 12 16Z"}),k.createElement("path",{d:"M3 16.8V9.2C3 8.0799 3 7.51984 3.21799 7.09202C3.40973 6.71569 3.71569 6.40973 4.09202 6.21799C4.51984 6 5.0799 6 6.2 6H7.25464C7.37758 6 7.43905 6 7.49576 5.9935C7.79166 5.95961 8.05705 5.79559 8.21969 5.54609C8.25086 5.49827 8.27836 5.44328 8.33333 5.33333C8.44329 5.11342 8.49827 5.00346 8.56062 4.90782C8.8859 4.40882 9.41668 4.08078 10.0085 4.01299C10.1219 4 10.2448 4 10.4907 4H13.5093C13.7552 4 13.8781 4 13.9915 4.01299C14.5833 4.08078 15.1141 4.40882 15.4394 4.90782C15.5017 5.00345 15.5567 5.11345 15.6667 5.33333C15.7216 5.44329 15.7491 5.49827 15.7803 5.54609C15.943 5.79559 16.2083 5.95961 16.5042 5.9935C16.561 6 16.6224 6 16.7454 6H17.8C18.9201 6 19.4802 6 19.908 6.21799C20.2843 6.40973 20.5903 6.71569 20.782 7.09202C21 7.51984 21 8.0799 21 9.2V16.8C21 17.9201 21 18.4802 20.782 18.908C20.5903 19.2843 20.2843 19.5903 19.908 19.782C19.4802 20 18.9201 20 17.8 20H6.2C5.0799 20 4.51984 20 4.09202 19.782C3.71569 19.5903 3.40973 19.2843 3.21799 18.908C3 18.4802 3 17.9201 3 16.8Z"}))}function W_(e){const{scanning:t,startScanning:n,stopScanning:r}=e,[i,s]=k.useState(!1);function o(){s(!0),t?r():n(),setTimeout(()=>s(!1),1e3)}return k.createElement("div",{style:{bottom:85,right:3,position:"absolute",zIndex:2,cursor:i?"default":"pointer"}},t?k.createElement(H_,{disabled:i,onClick:o}):k.createElement(Y_,{disabled:i,onClick:o}))}function K_(e){const{onClick:t,className:n,style:r}=e;return k.createElement("svg",{onClick:t,width:"30px",height:"30px",viewBox:"0 0 24 24",className:n,style:r,xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{strokeWidth:.2,stroke:"yellow",fill:"yellow",d:"M13.225 9l5.025-7h-7.972l-3.3 11h5.359l-2.452 8.648.75.364L20.374 9zm.438 3H8.322l2.7-9H16.3l-5.025 7h7.101l-6.7 8.953z"}))}function z_(e){const{onClick:t,className:n,style:r}=e;return k.createElement("svg",{onClick:t,width:"30px",height:"30px",viewBox:"0 0 24 24",className:n,style:r,xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{strokeWidth:.2,stroke:"yellow",fill:"yellow",d:"M14.516 15.158l.714.714-4.595 6.14-.75-.364L12.337 13H6.978L8.22 8.861l.803.803L8.322 12h3.036l1.793 1.792-1.475 5.16zm5.984 4.05L4.793 3.5l.707-.707 3.492 3.492L10.278 2h7.972l-5.025 7h7.149l-3.71 4.957 4.543 4.543zM12.707 10l3.243 3.243L18.376 10zM9.795 7.088l2.079 2.079L16.3 3h-5.278z"}))}function Q_(e){const{status:t,scanning:n,torchToggle:r}=e;function i(s){r(s)}return n&&r?k.createElement("div",{style:{bottom:35,right:3,position:"absolute",zIndex:2,cursor:"pointer"}},t?k.createElement(z_,{onClick:()=>i(!1)}):k.createElement(K_,{onClick:()=>i(!0)})):null}function J_(e){const{onClick:t,className:n,disabled:r=!1}=e,i={cursor:r?"default":"pointer",stroke:r?"grey":"yellow",fill:r?"grey":"yellow",...e.style};return k.createElement("svg",{onClick:r?void 0:t,width:"30px",height:"30px",viewBox:"0 0 24 24",className:n,style:i,xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{strokeWidth:.3,d:"M16.279,17.039c-1.396,1.209 -3.216,1.941 -5.206,1.941c-4.393,0 -7.96,-3.567 -7.96,-7.96c-0,-4.393 3.567,-7.96 7.96,-7.96c4.393,0 7.96,3.567 7.96,7.96c-0,2.044 -0.772,3.909 -2.04,5.319l0.165,0.165c1.194,1.194 2.388,2.388 3.583,3.582c0.455,0.456 -0.252,1.163 -0.707,0.708l-3.755,-3.755Zm1.754,-6.019c-0,-3.841 -3.119,-6.96 -6.96,-6.96c-3.842,0 -6.96,3.119 -6.96,6.96c-0,3.841 3.118,6.96 6.96,6.96c3.841,0 6.96,-3.119 6.96,-6.96Zm-7.46,0.5l-1.5,0c-0.645,0 -0.643,-1 -0,-1l1.5,0l-0,-1.5c-0,-0.645 1,-0.643 1,0l-0,1.5l1.5,0c0.645,0 0.643,1 -0,1l-1.5,0l-0,1.5c-0,0.645 -1,0.643 -1,0l-0,-1.5Z"}))}function Z_(e){const{onClick:t,className:n,disabled:r=!1}=e,i={cursor:r?"default":"pointer",stroke:r?"grey":"yellow",fill:r?"grey":"yellow",...e.style};return k.createElement("svg",{onClick:r?void 0:t,width:"30px",height:"30px",viewBox:"0 0 24 24",className:n,style:i,xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{strokeWidth:.3,d:"M16.279,17.039c-1.396,1.209 -3.216,1.941 -5.206,1.941c-4.393,0 -7.96,-3.567 -7.96,-7.96c-0,-4.393 3.567,-7.96 7.96,-7.96c4.393,0 7.96,3.567 7.96,7.96c-0,2.044 -0.772,3.909 -2.04,5.319l0.165,0.165c1.194,1.194 2.388,2.388 3.583,3.582c0.455,0.456 -0.252,1.163 -0.707,0.708l-3.755,-3.755Zm1.754,-6.019c-0,-3.841 -3.119,-6.96 -6.96,-6.96c-3.842,0 -6.96,3.119 -6.96,6.96c-0,3.841 3.118,6.96 6.96,6.96c3.841,0 6.96,-3.119 6.96,-6.96Zm-4.96,-0.5c0.645,0 0.643,1 -0,1l-4,0c-0.645,0 -0.643,-1 -0,-1l4,0Z"}))}function X_(e){const{scanning:t,capabilities:n,onZoom:r,value:i}=e;if(!t||!r)return null;const s=(n.max-n.min)/3;return k.createElement(k.Fragment,null,k.createElement("div",{style:{bottom:130,right:3,position:"absolute",zIndex:2,cursor:"pointer"}},k.createElement(Z_,{disabled:i<=n.min,onClick:function(){r(Math.max(i-s,n.min))}})),k.createElement("div",{style:{bottom:180,right:3,position:"absolute",zIndex:2,cursor:"pointer"}},k.createElement(J_,{disabled:i>=n.max,onClick:function(){r(Math.min(i+s,n.max))}})))}function eC(e){const{scanning:t,loading:n,capabilities:r,border:i=35,onOff:s,torch:o,zoom:c,startScanning:u,stopScanning:d}=e,f="rgba(255, 0, 0, 0.5)";return k.createElement("div",{style:{position:"relative"}},k.createElement("svg",{viewBox:"0 0 100 100",style:{top:0,left:0,zIndex:1,boxSizing:"border-box",border:`${i>=35?i:35}px solid rgba(0, 0, 0, 0.2)`}},n&&k.createElement("text",{x:"50",y:"50",textAnchor:"middle",fill:"black",fontSize:"8",fontFamily:"Arial",fontWeight:"bold"},"Loading ...",k.createElement("animate",{attributeName:"opacity",values:"0;1;0",dur:"2s",repeatCount:"indefinite"})),k.createElement("path",{fill:"none",d:"M23,0 L0,0 L0,23",stroke:f,strokeWidth:3}),k.createElement("path",{fill:"none",d:"M0,77 L0,100 L23,100",stroke:f,strokeWidth:3}),k.createElement("path",{fill:"none",d:"M77,100 L100,100 L100,77",stroke:f,strokeWidth:3}),k.createElement("path",{fill:"none",d:"M100,23 L100,0 77,0",stroke:f,strokeWidth:3})),s&&k.createElement(W_,{scanning:t,startScanning:u,stopScanning:d}),o&&r.torch&&k.createElement(Q_,{scanning:t,status:o.status,torchToggle:o.toggle}),c&&r.zoom&&k.createElement(X_,{scanning:t,capabilities:r.zoom,value:c.value,onZoom:c.onChange}))}const tC={facingMode:"environment",width:{min:640,ideal:720,max:1920},height:{min:640,ideal:720,max:1080}},nC={audio:!0,tracker:void 0,onOff:!1,finder:!0,torch:!0,zoom:!1},rC={width:"100%",height:"100%",position:"relative"},iC={top:0,left:0,width:"100%",height:"100%",display:"block",overflow:"hidden"};var sC=function(e){let t,n=!1;return(...r)=>(n||(t=e(r),n=!0),t)}(()=>{const e=V2(window);switch(e.browser){case"chrome":Z2(window,e);break;case"firefox":n_(window,e);break;case"safari":o_(window,e);break;default:throw new Error("Unsupported browser")}});const oC="data:audio/mp3;base64,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";var lo=e=>e instanceof Date,ig=e=>e==null;const sg=e=>typeof e=="object";var og=e=>!ig(e)&&!Array.isArray(e)&&sg(e)&&!lo(e),ag=e=>ig(e)||!sg(e);function cg(e,t){if(ag(e)||ag(t))return e===t;if(lo(e)&&lo(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const s=e[i];if(!r.includes(i))return!1;if(i!=="ref"){const o=t[i];if(lo(s)&&lo(o)||og(s)&&og(o)||Array.isArray(s)&&Array.isArray(o)?!cg(s,o):s!==o)return!1}}return!0}function ec(e){if(e===null)throw new Error("Canvas should always be defined when component is mounted.");const t=e.getContext("2d");if(t===null)throw new Error("Canvas 2D context should be non-null");t.clearRect(0,0,e.width,e.height)}function aC(e){var t;const{onScan:n,constraints:r,formats:i=["qr_code"],paused:s=!1,components:o,children:c,styles:u,classNames:d,allowMultiple:f,scanDelay:h}=e,l=k.useRef(null),b=k.useRef(null),a=k.useRef(null),p=k.useMemo(()=>({...tC,...r}),[r]),y=k.useMemo(()=>({...nC,...o}),[o]),[g,v]=k.useState(!1),[w,E]=k.useState(!0),[S,A]=k.useState(p),T=function(){const F=k.useRef(Promise.resolve({type:"stop",data:{}})),q=k.useRef(null),R=k.useRef(null),[L,W]=k.useState({}),[z,Z]=k.useState({}),te=k.useCallback(async(de,$)=>{var H;if(!window.isSecureContext)throw new Error("camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP.");if(((H=navigator==null?void 0:navigator.mediaDevices)===null||H===void 0?void 0:H.getUserMedia)===void 0)throw new Error("this browser has no Stream API support");sC();const X=await navigator.mediaDevices.getUserMedia({audio:!1,video:$});de.srcObject!==void 0?de.srcObject=X:de.mozSrcObject!==void 0?de.mozSrcObject=X:window.URL.createObjectURL?de.src=window.URL.createObjectURL(X):window.webkitURL?de.src=window.webkitURL.createObjectURL(X):de.src=X.id,await Promise.race([de.play(),new Promise(j=>setTimeout(j,3e3)).then(()=>{throw new Error("Loading camera stream timed out after 3 seconds.")})]),await new Promise(j=>setTimeout(j,500));const[C]=X.getVideoTracks();return Z(C.getSettings()),W(C.getCapabilities()),q.current=X,R.current=C,{type:"start",data:{videoEl:de,stream:X,constraints:$}}},[]),re=k.useCallback(async(de,$)=>{de.src="",de.srcObject=null,de.load();for(const H of $.getTracks())$.removeTrack(H),H.stop();return q.current=null,R.current=null,Z({}),{type:"stop",data:{}}},[]),he=k.useCallback(async(de,{constraints:$,restart:H=!1})=>{if(F.current=F.current.then(X=>{if(X.type==="start"){const{data:{videoEl:C,stream:j,constraints:B}}=X;return H||de!==C||$!==B?re(C,j).then(()=>te(de,$)):X}return te(de,$)}),(await F.current).type==="stop")throw new Error("Something went wrong with the camera task queue (start task).")},[te,re]),ue=k.useCallback(async()=>{if(F.current=F.current.then(de=>{if(de.type==="stop")return de;const{data:{videoEl:$,stream:H}}=de;return re($,H)}),(await F.current).type==="start")throw new Error("Something went wrong with the camera task queue (stop task).")},[re]),ye=k.useCallback(async de=>{const $=R.current;if(!$)throw new Error("No active video track found.");{de.advanced&&de.advanced[0].zoom&&$.getCapabilities().torch&&await $.applyConstraints({advanced:[{torch:!1}]}),await $.applyConstraints(de);const H=$.getCapabilities(),X=$.getSettings();W(H),Z(X)}},[]);return k.useEffect(()=>()=>{(async()=>await ue())()},[ue]),{capabilities:L,settings:z,startCamera:he,stopCamera:ue,updateConstraints:ye}}(),{startScanning:O,stopScanning:N}=function(F){const{videoElementRef:q,onScan:R,onFound:L,retryDelay:W=100,scanDelay:z=0,formats:Z=[],audio:te=!0,allowMultiple:re=!1}=F,he=k.useRef(new Vl({formats:Z})),ue=k.useRef(null),ye=k.useRef(null);k.useEffect(()=>{he.current=new Vl({formats:Z})},[Z]),k.useEffect(()=>{typeof window<"u"&&te&&(ue.current=new Audio(oC))},[te]);const de=k.useCallback($=>async H=>{if(q.current!==null&&q.current.readyState>1){const{lastScan:X,contentBefore:C,lastScanHadContent:j}=$;if(H-X<W)ye.current=window.requestAnimationFrame(de($));else{const B=await he.current.detect(q.current),M=B.some(Y=>!C.includes(Y.rawValue)),ee=B.length>0;let J=$.lastOnScan;(M||re&&ee&&H-J>=z)&&(te&&ue.current&&ue.current.paused&&ue.current.play().catch(Y=>console.error("Error playing the sound",Y)),J=H,R(B)),ee&&L(B),!ee&&j&&L(B);const Q={lastScan:H,lastOnScan:J,lastScanHadContent:ee,contentBefore:M?B.map(Y=>Y.rawValue):C};ye.current=window.requestAnimationFrame(de(Q))}}},[q.current,R,L,W]);return{startScanning:k.useCallback(()=>{const $=performance.now(),H={lastScan:$,lastOnScan:$,contentBefore:[],lastScanHadContent:!1};ye.current=window.requestAnimationFrame(de(H))},[de]),stopScanning:k.useCallback(()=>{ye.current!==null&&(window.cancelAnimationFrame(ye.current),ye.current=null)},[])}}({videoElementRef:l,onScan:n,onFound:F=>function(q,R,L,W){const z=L;if(z==null)throw new Error("onFound handler should only be called when component is mounted. Thus tracking canvas is always defined.");const Z=R;if(Z==null)throw new Error("onFound handler should only be called when component is mounted. Thus video element is always defined.");if(q.length===0||W===void 0)ec(z);else{const te=Z.offsetWidth,re=Z.offsetHeight,he=Z.videoWidth,ue=Z.videoHeight,ye=Math.max(te/he,re/ue),de=he*ye,$=ue*ye,H=de/he,X=$/ue,C=(te-de)/2,j=(re-$)/2,B=({x:Q,y:Y})=>({x:Math.floor(Q*H),y:Math.floor(Y*X)}),M=({x:Q,y:Y})=>({x:Math.floor(Q+C),y:Math.floor(Y+j)}),ee=q.map(Q=>{const{boundingBox:Y,cornerPoints:pe}=Q,{x:ge,y:le}=M(B({x:Y.x,y:Y.y})),{x:ie,y:be}=B({x:Y.width,y:Y.height});return{...Q,cornerPoints:pe.map(ae=>M(B(ae))),boundingBox:DOMRectReadOnly.fromRect({x:ge,y:le,width:ie,height:be})}});z.width=Z.offsetWidth,z.height=Z.offsetHeight;const J=z.getContext("2d");if(J===null)throw new Error("onFound handler should only be called when component is mounted. Thus tracking canvas 2D context is always defined.");W(ee,J)}}(F,l.current,a.current,y.tracker),formats:i,audio:y.audio,allowMultiple:f,retryDelay:y.tracker===void 0?500:10,scanDelay:h});k.useEffect(()=>(v(!0),()=>{v(!1)}),[]),k.useEffect(()=>{g&&(N(),O())},[o==null?void 0:o.tracker]),k.useEffect(()=>{if(!cg(p,S)){const F=p;r!=null&&r.deviceId&&delete F.facingMode,A(F)}},[r]);const D=k.useMemo(()=>({constraints:S,shouldStream:g&&!s}),[S,g,s]),U=async()=>{const F=l.current;if(F==null)throw new Error("Video should be defined when component is mounted.");const q=b.current;if(q==null)throw new Error("Canvas should be defined when component is mounted.");const R=q.getContext("2d");if(R==null)throw new Error("Canvas should be defined when component is mounted.");if(D.shouldStream){await T.stopCamera(),E(!1);try{await T.startCamera(F,D),F?E(!0):await T.stopCamera()}catch(L){console.error("error",L)}}else q.width=F.videoWidth,q.height=F.videoHeight,R.drawImage(F,0,0,F.videoWidth,F.videoHeight),await T.stopCamera(),E(!1)};k.useEffect(()=>{(async()=>await U())()},[D]);const V=k.useMemo(()=>D.shouldStream&&w,[D.shouldStream,w]);return k.useEffect(()=>{if(V){if(b.current===void 0)throw new Error("shouldScan effect should only be triggered when component is mounted. Thus pause frame canvas is defined");if(ec(b.current),a.current===void 0)throw new Error("shouldScan effect should only be triggered when component is mounted. Thus tracking canvas is defined");if(ec(a.current),l.current==null)throw new Error("shouldScan effect should only be triggered when component is mounted. Thus video element is defined");O()}},[V]),k.createElement("div",{style:{...rC,...u==null?void 0:u.container},className:d==null?void 0:d.container},k.createElement("video",{ref:l,style:{...iC,...u==null?void 0:u.video,visibility:s?"hidden":"visible"},className:d==null?void 0:d.video,autoPlay:!0,muted:!0,playsInline:!0}),k.createElement("canvas",{ref:b,style:{display:s?"block":"none",position:"absolute",top:0,left:0,width:"100%"}}),k.createElement("canvas",{ref:a,style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"}}),k.createElement("div",{style:{top:0,left:0,position:"absolute",width:"100%",height:"100%"}},y.finder&&k.createElement(eC,{scanning:w,capabilities:T.capabilities,loading:!1,onOff:y.onOff,zoom:y.zoom&&T.settings.zoom?{value:T.settings.zoom,onChange:async F=>{const q={...S,advanced:[{zoom:F}]};await T.updateConstraints(q)}}:void 0,torch:y.torch?{status:(t=T.settings.torch)!==null&&t!==void 0&&t,toggle:async F=>{const q={...S,advanced:[{torch:F}]};await T.updateConstraints(q)}}:void 0,startScanning:async()=>await U(),stopScanning:async()=>{await T.stopCamera(),ec(a.current),E(!1)},border:u==null?void 0:u.finderBorder}),c))}function cC(){const[e,t]=k.useState([]);return k.useEffect(()=>{(async()=>t(await async function(){return(await navigator.mediaDevices.enumerateDevices()).filter(({kind:n})=>n==="videoinput")}()))()},[]),e}function fo({dataSetter:e,setDefer:t,label:n=""}){const r=k.useRef(null),i=cC(),[s,o]=S2()??[0,0],{subscribe:c,unsubscribe:u}=$a(),d=f=>{e(f[0].rawValue)};return k.useEffect(()=>{o&&o<=332&&r.current&&r.current.scrollIntoView({behavior:"smooth",block:"end"});const f=h=>{e(h.detail.code)};return c("onCodeScan",f),()=>{u("onCodeScan",f)}},[o]),m.jsxs("div",{ref:r,children:[!!i.length&&m.jsxs("div",{className:"mb-4 flex flex-col gap-4",children:[m.jsx(lC,{onScan:d}),m.jsx("hr",{})]}),m.jsx(Zi,{label:n,autoFocus:!0,placeholder:"CDE2341S",onChange:f=>{t&&t(!0),e(f.target.value)}})]})}const uC="data:image/svg+xml,%3csvg%20height='24'%20viewBox='0%200%2024%2024'%20width='24'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='m21.25%207.5c.3796958%200%20.693491.28215388.7431534.64822944l.0068466.10177056v8.5c0%201.7330315-1.3564548%203.1492459-3.0655761%203.2448552l-.1844239.0051448h-12.689l.71933009.7196699c.26626656.2662666.29047261.6829303.07261815.9765418l-.07261815.0841184c-.26626657.2662665-.68293025.2904726-.97654174.0726181l-.08411844-.0726181-2-2-.06339799-.0720275c-.00244939-.0031685-.00487398-.0063571-.00727348-.0095656l.07067147.0815931c-.03705327-.0370533-.06941902-.077019-.09709724-.1191603-.01316484-.0201549-.025545-.0411423-.03690171-.0627516-.00483354-.0091218-.00919014-.0178526-.01336588-.0266478-.01274712-.0267885-.02425172-.0552483-.03400215-.0845099-.00225837-.0069437-.00418282-.0130149-.00602813-.019105-.02092163-.0684786-.0322748-.1419912-.0322748-.2181555%200-.0383922.00288471-.0761107.00844919-.1129505.00180466-.0115676.0038603-.0232773.00619514-.0349422.00494363-.0250031.01111685-.0492994.01844184-.073091.00362656-.0116598.00765847-.0237092.01200456-.0356703.00848426-.0232976.01778613-.0453662.02808241-.0668678.00549219-.0116011.01179514-.0239381.01846187-.0361292.01323523-.0240158.02734042-.0467392.04258121-.0686124.00392129-.0057417.00832657-.0118713.01283554-.0179483.0251194-.0332177.04801831-.0595185.07261815-.0841184l2-2c.29289322-.2928932.76776696-.2928932%201.06066018%200%20.26626656.2662666.29047261.6829303.07261815.9765418l-.07261815.0841184-.72033009.7196699h12.69c.9181734%200%201.6711923-.7071103%201.7441988-1.6064728l.0058012-.1435272v-8.5c0-.41421356.3357864-.75.75-.75zm-3.0537883-5.35294824.0841184.07261815%202%202c.0254481.02544812.049076.05271652.0706715.08159313l-.0706715-.08159313c.0370533.03705328.069419.07701901.0970972.1191603.0131649.02015493.025545.04114226.0369017.06275154.0048336.00912187.0091902.01785262.0133659.02664784.0127471.02678853.0242517.0552483.0340022.08450994.0022583.00694369.0041828.01301489.0060281.01910493.0209216.06847868.0322748.14199127.0322748.21815554%200%20.03839224-.0028847.07611073-.0084492.11295053-.0014988.0095454-.0031606.01924362-.0050138.02891241-.0051364.02710922-.0117072.05340972-.0196232.07912072-.0036265.0116598-.0076584.02370928-.0120045.03567032-.0084843.02329763-.0177862.04536621-.0280824.06686781-.0054922.01160108-.0117952.02393815-.0184619.03612923-.0132352.02401575-.0273404.04673917-.0425812.06861233-.0039213.00574174-.0083266.01187138-.0128356.0179483-.023778.03144192-.0451015.05615345-.0679264.07938506l-.0046917.00473338-2%202c-.2928932.29289321-.767767.29289321-1.0606602%200-.2662665-.26626657-.2904726-.68293025-.0726181-.97654174l.0726181-.08411844.7183301-.71966991h-12.688c-.9181734%200-1.67119234.70711027-1.7441988%201.60647279l-.0058012.14352721v8.5c0%20.4142136-.33578644.75-.75.75-.37969577%200-.69349096-.2821539-.74315338-.6482294l-.00684662-.1017706v-8.5c0-1.73303146%201.35645477-3.14924593%203.06557609-3.24485521l.18442391-.00514479h12.689l-.7193301-.71966991c-.2662665-.26626657-.2904726-.68293025-.0726181-.97654174l.0726181-.08411844c.2662666-.26626656.6829303-.29047261.9765418-.07261815zm-6.1962117%205.85294824c2.209139%200%204%201.790861%204%204s-1.790861%204-4%204-4-1.790861-4-4%201.790861-4%204-4zm0%201.5c-1.3807119%200-2.5%201.1192881-2.5%202.5s1.1192881%202.5%202.5%202.5%202.5-1.1192881%202.5-2.5-1.1192881-2.5-2.5-2.5z'%20fill='%23212121'/%3e%3c/svg%3e";function lC({onScan:e}){const t=It(),[n,r]=k.useState(t.cameraFacingMode??Wi.USER);return m.jsxs("div",{className:"relative w-full",children:[m.jsx(aC,{components:{finder:!1},onScan:e,constraints:{facingMode:n},allowMultiple:!0,classNames:{video:"rounded",container:"max-h-[calc(100vh-381px)] min-h-[267px] overflow-hidden rounded"}}),m.jsx("div",{className:"absolute right-2 top-2 flex h-10 w-10 cursor-pointer items-center justify-center rounded bg-white shadow-overlay",onClick:()=>n===Wi.USER?r(Wi.ENVIRONMENT):r(Wi.USER),children:m.jsx("img",{src:uC,alt:"camera-switch"})})]})}function dC({value:e,placeholder:t,open:n,setOpen:r,disabled:i}){return m.jsxs("div",{className:`flex items-center justify-between rounded border p-2 ${i?"pointer-events-none bg-core-gray-50 shadow-none outline-core-gray-200":"bg-core-white-900 hover:border hover:border-core-gray-300 hover:shadow-none"}`,onClick:()=>!i&&r(!n),children:[m.jsx("span",{className:`text-sm ${i?"text-core-gray-300":"text-core-gray-800"}`,children:e||t}),m.jsx("span",{className:"ml-2 text-core-gray-500",children:n?"▴":"▾"})]})}function fC({label:e,children:t}){return m.jsxs("div",{className:"[&:not(:last-child)]:mb-2",children:[m.jsx("p",{className:"mb-2 px-4 text-xs text-core-gray-500",children:e}),t]})}function ql(e){return m.jsx("div",{className:"px-4 py-2 text-sm hover:bg-core-gray-50",children:e.label})}function hC(e){const t=k.useRef(null),[n,r]=k.useState(!1),[i,s]=k.useState(e.value??"");ym(t,r);const o=(u,d)=>{s(u),r(!1),e.onChange&&e.onChange(d)},c=k.Children.map(e.children,u=>{if(k.isValidElement(u)){if(u.type===ql)return m.jsx("div",{onClick:()=>o(u.props.label,u.props.value),children:u});if(u.type===fC){const d=k.Children.map(u.props.children,f=>{if(k.isValidElement(f)&&f.type===ql)return m.jsx("div",{onClick:()=>o(f.props.label,f.props.value),children:f})});return k.cloneElement(u,{},...d)}}});return m.jsxs("div",{ref:t,className:"flex flex-col gap-2 antialiased",children:[m.jsx(vn,{description:e.description,disabled:e.disabled,htmlFor:e.id,required:e.required,children:e.label}),m.jsx("div",{children:m.jsxs("div",{className:"relative",children:[m.jsx(dC,{value:i,placeholder:e.placeholder,open:n,setOpen:r,disabled:e.disabled}),e.children&&m.jsx("div",{className:`absolute left-0 right-0 top-11 z-50 rounded border bg-core-white-900 shadow-xl ${!n&&"hidden"} py-2`,children:c})]})}),m.jsx(vn.Helper,{helperText:e.helperText})]})}var pC=Object.defineProperty,mC=(e,t)=>{for(var n in t)pC(e,n,{get:t[n],enumerable:!0})},tr={};mC(tr,{assign:()=>vC,colors:()=>ni,createStringInterpolator:()=>Jl,skipAnimation:()=>mg,to:()=>pg,willAdvance:()=>Zl});var $l=po(),Ue=e=>ho(e,$l),Gl=po();Ue.write=e=>ho(e,Gl);var tc=po();Ue.onStart=e=>ho(e,tc);var Hl=po();Ue.onFrame=e=>ho(e,Hl);var Yl=po();Ue.onFinish=e=>ho(e,Yl);var ts=[];Ue.setTimeout=(e,t)=>{const n=Ue.now()+t,r=()=>{const s=ts.findIndex(o=>o.cancel==r);~s&&ts.splice(s,1),ti-=~s?1:0},i={time:n,handler:e,cancel:r};return ts.splice(ug(n),0,i),ti+=1,lg(),i};var ug=e=>~(~ts.findIndex(t=>t.time>e)||~ts.length);Ue.cancel=e=>{tc.delete(e),Hl.delete(e),Yl.delete(e),$l.delete(e),Gl.delete(e)},Ue.sync=e=>{Kl=!0,Ue.batchedUpdates(e),Kl=!1},Ue.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...i){t=i,Ue.onStart(n)}return r.handler=e,r.cancel=()=>{tc.delete(n),t=null},r};var Wl=typeof window<"u"?window.requestAnimationFrame:()=>{};Ue.use=e=>Wl=e,Ue.now=typeof performance<"u"?()=>performance.now():Date.now,Ue.batchedUpdates=e=>e(),Ue.catch=console.error,Ue.frameLoop="always",Ue.advance=()=>{Ue.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):fg()};var ei=-1,ti=0,Kl=!1;function ho(e,t){Kl?(t.delete(e),e(0)):(t.add(e),lg())}function lg(){ei<0&&(ei=0,Ue.frameLoop!=="demand"&&Wl(dg))}function gC(){ei=-1}function dg(){~ei&&(Wl(dg),Ue.batchedUpdates(fg))}function fg(){const e=ei;ei=Ue.now();const t=ug(ei);if(t&&(hg(ts.splice(0,t),n=>n.handler()),ti-=t),!ti){gC();return}tc.flush(),$l.flush(e?Math.min(64,ei-e):16.667),Hl.flush(),Gl.flush(),Yl.flush()}function po(){let e=new Set,t=e;return{add(n){ti+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return ti-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,ti-=t.size,hg(t,r=>r(n)&&e.add(r)),ti+=e.size,t=e)}}}function hg(e,t){e.forEach(n=>{try{t(n)}catch(r){Ue.catch(r)}})}function zl(){}var yC=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),xe={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function _r(e,t){if(xe.arr(e)){if(!xe.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var tt=(e,t)=>e.forEach(t);function hr(e,t,n){if(xe.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(const r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var Dn=e=>xe.und(e)?[]:xe.arr(e)?e:[e];function mo(e,t){if(e.size){const n=Array.from(e);e.clear(),tt(n,t)}}var go=(e,...t)=>mo(e,n=>n(...t)),Ql=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Jl,pg,ni=null,mg=!1,Zl=zl,vC=e=>{e.to&&(pg=e.to),e.now&&(Ue.now=e.now),e.colors!==void 0&&(ni=e.colors),e.skipAnimation!=null&&(mg=e.skipAnimation),e.createStringInterpolator&&(Jl=e.createStringInterpolator),e.requestAnimationFrame&&Ue.use(e.requestAnimationFrame),e.batchedUpdates&&(Ue.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Zl=e.willAdvance),e.frameLoop&&(Ue.frameLoop=e.frameLoop)},yo=new Set,Gn=[],Xl=[],nc=0,rc={get idle(){return!yo.size&&!Gn.length},start(e){nc>e.priority?(yo.add(e),Ue.onStart(bC)):(gg(e),Ue(ed))},advance:ed,sort(e){if(nc)Ue.onFrame(()=>rc.sort(e));else{const t=Gn.indexOf(e);~t&&(Gn.splice(t,1),yg(e))}},clear(){Gn=[],yo.clear()}};function bC(){yo.forEach(gg),yo.clear(),Ue(ed)}function gg(e){Gn.includes(e)||yg(e)}function yg(e){Gn.splice(wC(Gn,t=>t.priority>e.priority),0,e)}function ed(e){const t=Xl;for(let n=0;n<Gn.length;n++){const r=Gn[n];nc=r.priority,r.idle||(Zl(r),r.advance(e),r.idle||t.push(r))}return nc=0,Xl=Gn,Xl.length=0,Gn=t,Gn.length>0}function wC(e,t){const n=e.findIndex(t);return n<0?e.length:n}var EC=(e,t,n)=>Math.min(Math.max(n,e),t),SC={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},nr="[-+]?\\d*\\.?\\d+",ic=nr+"%";function sc(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var xC=new RegExp("rgb"+sc(nr,nr,nr)),_C=new RegExp("rgba"+sc(nr,nr,nr,nr)),CC=new RegExp("hsl"+sc(nr,ic,ic)),AC=new RegExp("hsla"+sc(nr,ic,ic,nr)),TC=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,IC=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,kC=/^#([0-9a-fA-F]{6})$/,OC=/^#([0-9a-fA-F]{8})$/;function RC(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=kC.exec(e))?parseInt(t[1]+"ff",16)>>>0:ni&&ni[e]!==void 0?ni[e]:(t=xC.exec(e))?(ns(t[1])<<24|ns(t[2])<<16|ns(t[3])<<8|255)>>>0:(t=_C.exec(e))?(ns(t[1])<<24|ns(t[2])<<16|ns(t[3])<<8|wg(t[4]))>>>0:(t=TC.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=OC.exec(e))?parseInt(t[1],16)>>>0:(t=IC.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=CC.exec(e))?(vg(bg(t[1]),oc(t[2]),oc(t[3]))|255)>>>0:(t=AC.exec(e))?(vg(bg(t[1]),oc(t[2]),oc(t[3]))|wg(t[4]))>>>0:null}function td(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function vg(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,s=td(i,r,e+1/3),o=td(i,r,e),c=td(i,r,e-1/3);return Math.round(s*255)<<24|Math.round(o*255)<<16|Math.round(c*255)<<8}function ns(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function bg(e){return(parseFloat(e)%360+360)%360/360}function wg(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function oc(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Eg(e){let t=RC(e);if(t===null)return e;t=t||0;const n=(t&4278190080)>>>24,r=(t&16711680)>>>16,i=(t&65280)>>>8,s=(t&255)/255;return`rgba(${n}, ${r}, ${i}, ${s})`}var vo=(e,t,n)=>{if(xe.fun(e))return e;if(xe.arr(e))return vo({range:e,output:t,extrapolate:n});if(xe.str(e.output[0]))return Jl(e);const r=e,i=r.output,s=r.range||[0,1],o=r.extrapolateLeft||r.extrapolate||"extend",c=r.extrapolateRight||r.extrapolate||"extend",u=r.easing||(d=>d);return d=>{const f=MC(d,s);return NC(d,s[f],s[f+1],i[f],i[f+1],u,o,c,r.map)}};function NC(e,t,n,r,i,s,o,c,u){let d=u?u(e):e;if(d<t){if(o==="identity")return d;o==="clamp"&&(d=t)}if(d>n){if(c==="identity")return d;c==="clamp"&&(d=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?d=-d:n===1/0?d=d-t:d=(d-t)/(n-t),d=s(d),r===-1/0?d=-d:i===1/0?d=d+r:d=d*(i-r)+r,d)}function MC(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var DC=(e,t="end")=>n=>{n=t==="end"?Math.min(n,.999):Math.max(n,.001);const r=n*e,i=t==="end"?Math.floor(r):Math.ceil(r);return EC(0,1,i/e)},ac=1.70158,cc=ac*1.525,Sg=ac+1,xg=2*Math.PI/3,_g=2*Math.PI/4.5,uc=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,PC={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>Sg*e*e*e-ac*e*e,easeOutBack:e=>1+Sg*Math.pow(e-1,3)+ac*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((cc+1)*2*e-cc)/2:(Math.pow(2*e-2,2)*((cc+1)*(e*2-2)+cc)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*xg),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*xg)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*_g))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*_g)/2+1,easeInBounce:e=>1-uc(1-e),easeOutBounce:uc,easeInOutBounce:e=>e<.5?(1-uc(1-2*e))/2:(1+uc(2*e-1))/2,steps:DC},bo=Symbol.for("FluidValue.get"),rs=Symbol.for("FluidValue.observers"),Hn=e=>!!(e&&e[bo]),In=e=>e&&e[bo]?e[bo]():e,Cg=e=>e[rs]||null;function jC(e,t){e.eventObserved?e.eventObserved(t):e(t)}function wo(e,t){const n=e[rs];n&&n.forEach(r=>{jC(r,t)})}var Ag=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");LC(this,e)}},LC=(e,t)=>Tg(e,bo,t);function is(e,t){if(e[bo]){let n=e[rs];n||Tg(e,rs,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Eo(e,t){const n=e[rs];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[rs]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var Tg=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),lc=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,BC=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Ig=new RegExp(`(${lc.source})(%|[a-z]+)`,"i"),FC=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,dc=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,kg=e=>{const[t,n]=UC(e);if(!t||Ql())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const i=window.getComputedStyle(document.documentElement).getPropertyValue(n);return i||e}else{if(n&&dc.test(n))return kg(n);if(n)return n}return e},UC=e=>{const t=dc.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},nd,VC=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,Og=e=>{nd||(nd=ni?new RegExp(`(${Object.keys(ni).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(s=>In(s).replace(dc,kg).replace(BC,Eg).replace(nd,Eg)),n=t.map(s=>s.match(lc).map(Number)),i=n[0].map((s,o)=>n.map(c=>{if(!(o in c))throw Error('The arity of each "output" value must be equal');return c[o]})).map(s=>vo({...e,output:s}));return s=>{var u;const o=!Ig.test(t[0])&&((u=t.find(d=>Ig.test(d)))==null?void 0:u.replace(lc,""));let c=0;return t[0].replace(lc,()=>`${i[c++](s)}${o||""}`).replace(FC,VC)}},rd="react-spring: ",Rg=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${rd}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},qC=Rg(console.warn);function $C(){qC(`${rd}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var GC=Rg(console.warn);function HC(){GC(`${rd}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function fc(e){return xe.str(e)&&(e[0]=="#"||/\d/.test(e)||!Ql()&&dc.test(e)||e in(ni||{}))}var id=Ql()?k.useEffect:k.useLayoutEffect,YC=()=>{const e=k.useRef(!1);return id(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Ng(){const e=k.useState()[1],t=YC();return()=>{t.current&&e(Math.random())}}function WC(e,t){const[n]=k.useState(()=>({inputs:t,result:e()})),r=k.useRef(),i=r.current;let s=i;return s?t&&s.inputs&&KC(t,s.inputs)||(s={inputs:t,result:e()}):s=n,k.useEffect(()=>{r.current=s,i==n&&(n.inputs=n.result=void 0)},[s]),s.result}function KC(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var Mg=e=>k.useEffect(e,zC),zC=[];function Dg(e){const t=k.useRef();return k.useEffect(()=>{t.current=e}),t.current}var So=Symbol.for("Animated:node"),QC=e=>!!e&&e[So]===e,pr=e=>e&&e[So],sd=(e,t)=>yC(e,So,t),hc=e=>e&&e[So]&&e[So].getPayload(),Pg=class{constructor(){sd(this,this)}getPayload(){return this.payload||[]}},xo=class extends Pg{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,xe.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new xo(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return xe.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,xe.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},_o=class extends xo{constructor(e){super(0),this._string=null,this._toString=vo({output:[e,e]})}static create(e){return new _o(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(xe.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=vo({output:[this.getValue(),e]})),this._value=0,super.reset()}},pc={dependencies:null},mc=class extends Pg{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return hr(this.source,(n,r)=>{QC(n)?t[r]=n.getValue(e):Hn(n)?t[r]=In(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&tt(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return hr(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){pc.dependencies&&Hn(e)&&pc.dependencies.add(e);const t=hc(e);t&&tt(t,n=>this.add(n))}},jg=class extends mc{constructor(e){super(e)}static create(e){return new jg(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((n,r)=>n.setValue(e[r])).some(Boolean):(super.setValue(e.map(JC)),!0)}};function JC(e){return(fc(e)?_o:xo).create(e)}function od(e){const t=pr(e);return t?t.constructor:xe.arr(e)?jg:fc(e)?_o:xo}var Lg=(e,t)=>{const n=!xe.fun(e)||e.prototype&&e.prototype.isReactComponent;return k.forwardRef((r,i)=>{const s=k.useRef(null),o=n&&k.useCallback(a=>{s.current=eA(i,a)},[i]),[c,u]=XC(r,t),d=Ng(),f=()=>{const a=s.current;if(n&&!a)return;(a?t.applyAnimatedValues(a,c.getValue(!0)):!1)===!1&&d()},h=new ZC(f,u),l=k.useRef();id(()=>(l.current=h,tt(u,a=>is(a,h)),()=>{l.current&&(tt(l.current.deps,a=>Eo(a,l.current)),Ue.cancel(l.current.update))})),k.useEffect(f,[]),Mg(()=>()=>{const a=l.current;tt(a.deps,p=>Eo(p,a))});const b=t.getComponentProps(c.getValue());return se.createElement(e,{...b,ref:o})})},ZC=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&Ue.write(this.update)}};function XC(e,t){const n=new Set;return pc.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new mc(e),pc.dependencies=null,[e,n]}function eA(e,t){return e&&(xe.fun(e)?e(t):e.current=t),t}var Bg=Symbol.for("AnimatedComponent"),tA=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=i=>new mc(i),getComponentProps:r=i=>i}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},s=o=>{const c=Fg(o)||"Anonymous";return xe.str(o)?o=s[o]||(s[o]=Lg(o,i)):o=o[Bg]||(o[Bg]=Lg(o,i)),o.displayName=`Animated(${c})`,o};return hr(e,(o,c)=>{xe.arr(e)&&(c=Fg(o)),s[c]=s(o)}),{animated:s}},Fg=e=>xe.str(e)?e:e&&xe.str(e.displayName)?e.displayName:xe.fun(e)&&e.name||null;function Ci(e,...t){return xe.fun(e)?e(...t):e}var Co=(e,t)=>e===!0||!!(t&&e&&(xe.fun(e)?e(t):Dn(e).includes(t))),Ug=(e,t)=>xe.obj(e)?t&&e[t]:e,Vg=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,nA=e=>e,ad=(e,t=nA)=>{let n=rA;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));const r={};for(const i of n){const s=t(e[i],i);xe.und(s)||(r[i]=s)}return r},rA=["config","onProps","onStart","onChange","onPause","onResume","onRest"],iA={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function sA(e){const t={};let n=0;if(hr(e,(r,i)=>{iA[i]||(t[i]=r,n++)}),n)return t}function qg(e){const t=sA(e);if(t){const n={to:t};return hr(e,(r,i)=>i in t||(n[i]=r)),n}return{...e}}function Ao(e){return e=In(e),xe.arr(e)?e.map(Ao):fc(e)?tr.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function oA(e){for(const t in e)return!0;return!1}function cd(e){return xe.fun(e)||xe.arr(e)&&xe.obj(e[0])}function aA(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function cA(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var uA={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},ud={...uA.default,mass:1,damping:1,easing:PC.linear,clamp:!1},lA=class{constructor(){this.velocity=0,Object.assign(this,ud)}};function dA(e,t,n){n&&(n={...n},$g(n,t),t={...n,...t}),$g(e,t),Object.assign(e,t);for(const o in ud)e[o]==null&&(e[o]=ud[o]);let{frequency:r,damping:i}=e;const{mass:s}=e;return xe.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/r,2)*s,e.friction=4*Math.PI*i*s/r),e}function $g(e,t){if(!xe.und(t.decay))e.duration=void 0;else{const n=!xe.und(t.tension)||!xe.und(t.friction);(n||!xe.und(t.frequency)||!xe.und(t.damping)||!xe.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var Gg=[],fA=class{constructor(){this.changed=!1,this.values=Gg,this.toValues=null,this.fromValues=Gg,this.config=new lA,this.immediate=!1}};function Hg(e,{key:t,props:n,defaultProps:r,state:i,actions:s}){return new Promise((o,c)=>{let u,d,f=Co(n.cancel??(r==null?void 0:r.cancel),t);if(f)b();else{xe.und(n.pause)||(i.paused=Co(n.pause,t));let a=r==null?void 0:r.pause;a!==!0&&(a=i.paused||Co(a,t)),u=Ci(n.delay||0,t),a?(i.resumeQueue.add(l),s.pause()):(s.resume(),l())}function h(){i.resumeQueue.add(l),i.timeouts.delete(d),d.cancel(),u=d.time-Ue.now()}function l(){u>0&&!tr.skipAnimation?(i.delayed=!0,d=Ue.setTimeout(b,u),i.pauseQueue.add(h),i.timeouts.add(d)):b()}function b(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(h),i.timeouts.delete(d),e<=(i.cancelId||0)&&(f=!0);try{s.start({...n,callId:e,cancel:f},o)}catch(a){c(a)}}})}var ld=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?ss(e.get()):t.every(n=>n.noop)?Yg(e.get()):rr(e.get(),t.every(n=>n.finished)),Yg=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),rr=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),ss=e=>({value:e,cancelled:!0,finished:!1});function Wg(e,t,n,r){const{callId:i,parentId:s,onRest:o}=t,{asyncTo:c,promise:u}=n;return!s&&e===c&&!t.reset?u:n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;const d=ad(t,(y,g)=>g==="onRest"?void 0:y);let f,h;const l=new Promise((y,g)=>(f=y,h=g)),b=y=>{const g=i<=(n.cancelId||0)&&ss(r)||i!==n.asyncId&&rr(r,!1);if(g)throw y.result=g,h(y),y},a=(y,g)=>{const v=new Kg,w=new zg;return(async()=>{if(tr.skipAnimation)throw To(n),w.result=rr(r,!1),h(w),w;b(v);const E=xe.obj(y)?{...y}:{...g,to:y};E.parentId=i,hr(d,(A,T)=>{xe.und(E[T])&&(E[T]=A)});const S=await r.start(E);return b(v),n.paused&&await new Promise(A=>{n.resumeQueue.add(A)}),S})()};let p;if(tr.skipAnimation)return To(n),rr(r,!1);try{let y;xe.arr(e)?y=(async g=>{for(const v of g)await a(v)})(e):y=Promise.resolve(e(a,r.stop.bind(r))),await Promise.all([y.then(f),l]),p=rr(r.get(),!0,!1)}catch(y){if(y instanceof Kg)p=y.result;else if(y instanceof zg)p=y.result;else throw y}finally{i==n.asyncId&&(n.asyncId=s,n.asyncTo=s?c:void 0,n.promise=s?u:void 0)}return xe.fun(o)&&Ue.batchedUpdates(()=>{o(p,r,r.item)}),p})()}function To(e,t){mo(e.timeouts,n=>n.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var Kg=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},zg=class extends Error{constructor(){super("SkipAnimationSignal")}},dd=e=>e instanceof fd,hA=1,fd=class extends Ag{constructor(){super(...arguments),this.id=hA++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=pr(this);return e&&e.getValue()}to(...e){return tr.to(this,e)}interpolate(...e){return $C(),tr.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){wo(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||rc.sort(this),wo(this,{type:"priority",parent:this,priority:e})}},Ai=Symbol.for("SpringPhase"),Qg=1,hd=2,pd=4,md=e=>(e[Ai]&Qg)>0,ri=e=>(e[Ai]&hd)>0,Io=e=>(e[Ai]&pd)>0,Jg=(e,t)=>t?e[Ai]|=hd|Qg:e[Ai]&=~hd,Zg=(e,t)=>t?e[Ai]|=pd:e[Ai]&=~pd,pA=class extends fd{constructor(e,t){if(super(),this.animation=new fA,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!xe.und(e)||!xe.und(t)){const n=xe.obj(e)?{...e}:{...t,from:e};xe.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(ri(this)||this._state.asyncTo)||Io(this)}get goal(){return In(this.animation.to)}get velocity(){const e=pr(this);return e instanceof xo?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return md(this)}get isAnimating(){return ri(this)}get isPaused(){return Io(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:i}=r;const{config:s}=r,o=hc(r.to);!o&&Hn(r.to)&&(i=Dn(In(r.to))),r.values.forEach((d,f)=>{if(d.done)return;const h=d.constructor==_o?1:o?o[f].lastPosition:i[f];let l=r.immediate,b=h;if(!l){if(b=d.lastPosition,s.tension<=0){d.done=!0;return}let a=d.elapsedTime+=e;const p=r.fromValues[f],y=d.v0!=null?d.v0:d.v0=xe.arr(s.velocity)?s.velocity[f]:s.velocity;let g;const v=s.precision||(p==h?.005:Math.min(1,Math.abs(h-p)*.001));if(xe.und(s.duration))if(s.decay){const w=s.decay===!0?.998:s.decay,E=Math.exp(-(1-w)*a);b=p+y/(1-w)*(1-E),l=Math.abs(d.lastPosition-b)<=v,g=y*E}else{g=d.lastVelocity==null?y:d.lastVelocity;const w=s.restVelocity||v/10,E=s.clamp?0:s.bounce,S=!xe.und(E),A=p==h?d.v0>0:p<h;let T,O=!1;const N=1,D=Math.ceil(e/N);for(let U=0;U<D&&(T=Math.abs(g)>w,!(!T&&(l=Math.abs(h-b)<=v,l)));++U){S&&(O=b==h||b>h==A,O&&(g=-g*E,b=h));const V=-s.tension*1e-6*(b-h),F=-s.friction*.001*g,q=(V+F)/s.mass;g=g+q*N,b=b+g*N}}else{let w=1;s.duration>0&&(this._memoizedDuration!==s.duration&&(this._memoizedDuration=s.duration,d.durationProgress>0&&(d.elapsedTime=s.duration*d.durationProgress,a=d.elapsedTime+=e)),w=(s.progress||0)+a/this._memoizedDuration,w=w>1?1:w<0?0:w,d.durationProgress=w),b=p+s.easing(w)*(h-p),g=(b-d.lastPosition)/e,l=w==1}d.lastVelocity=g,Number.isNaN(b)&&(console.warn("Got NaN while animating:",this),l=!0)}o&&!o[f].done&&(l=!1),l?d.done=!0:t=!1,d.setValue(b,s.round)&&(n=!0)});const c=pr(this),u=c.getValue();if(t){const d=In(r.to);(u!==d||n)&&!s.decay?(c.setValue(d),this._onChange(d)):n&&s.decay&&this._onChange(u),this._stop()}else n&&this._onChange(u)}set(e){return Ue.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(ri(this)){const{to:e,config:t}=this.animation;Ue.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return xe.und(e)?(n=this.queue||[],this.queue=[]):n=[xe.obj(e)?e:{...t,to:e}],Promise.all(n.map(r=>this._update(r))).then(r=>ld(this,r))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),To(this._state,e&&this._lastCallId),Ue.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=xe.obj(n)?n[t]:n,(n==null||cd(n))&&(n=void 0),r=xe.obj(r)?r[t]:r,r==null&&(r=void 0);const i={to:n,from:r};return md(this)||(e.reverse&&([n,r]=[r,n]),r=In(r),xe.und(r)?pr(this)||this._set(n):this._set(r)),i}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,ad(e,(o,c)=>/^on/.test(c)?Ug(o,n):o)),t0(this,e,"onProps"),Ro(this,"onProps",e,this);const i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const s=this._state;return Hg(++this._lastCallId,{key:n,props:e,defaultProps:r,state:s,actions:{pause:()=>{Io(this)||(Zg(this,!0),go(s.pauseQueue),Ro(this,"onPause",rr(this,ko(this,this.animation.to)),this))},resume:()=>{Io(this)&&(Zg(this,!1),ri(this)&&this._resume(),go(s.resumeQueue),Ro(this,"onResume",rr(this,ko(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(o=>{if(e.loop&&o.finished&&!(t&&o.noop)){const c=Xg(e);if(c)return this._update(c,!0)}return o})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(ss(this));const r=!xe.und(e.to),i=!xe.und(e.from);if(r||i)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(ss(this));const{key:s,defaultProps:o,animation:c}=this,{to:u,from:d}=c;let{to:f=u,from:h=d}=e;i&&!r&&(!t.default||xe.und(f))&&(f=h),t.reverse&&([f,h]=[h,f]);const l=!_r(h,d);l&&(c.from=h),h=In(h);const b=!_r(f,u);b&&this._focus(f);const a=cd(t.to),{config:p}=c,{decay:y,velocity:g}=p;(r||i)&&(p.velocity=0),t.config&&!a&&dA(p,Ci(t.config,s),t.config!==o.config?Ci(o.config,s):void 0);let v=pr(this);if(!v||xe.und(f))return n(rr(this,!0));const w=xe.und(t.reset)?i&&!t.default:!xe.und(h)&&Co(t.reset,s),E=w?h:this.get(),S=Ao(f),A=xe.num(S)||xe.arr(S)||fc(S),T=!a&&(!A||Co(o.immediate||t.immediate,s));if(b){const U=od(f);if(U!==v.constructor)if(T)v=this._set(S);else throw Error(`Cannot animate between ${v.constructor.name} and ${U.name}, as the "to" prop suggests`)}const O=v.constructor;let N=Hn(f),D=!1;if(!N){const U=w||!md(this)&&l;(b||U)&&(D=_r(Ao(E),S),N=!D),(!_r(c.immediate,T)&&!T||!_r(p.decay,y)||!_r(p.velocity,g))&&(N=!0)}if(D&&ri(this)&&(c.changed&&!w?N=!0:N||this._stop(u)),!a&&((N||Hn(u))&&(c.values=v.getPayload(),c.toValues=Hn(f)?null:O==_o?[1]:Dn(S)),c.immediate!=T&&(c.immediate=T,!T&&!w&&this._set(u)),N)){const{onRest:U}=c;tt(gA,F=>t0(this,t,F));const V=rr(this,ko(this,u));go(this._pendingCalls,V),this._pendingCalls.add(n),c.changed&&Ue.batchedUpdates(()=>{var F;c.changed=!w,U==null||U(V,this),w?Ci(o.onRest,V):(F=c.onStart)==null||F.call(c,V,this)})}w&&this._set(E),a?n(Wg(t.to,t,this._state,this)):N?this._start():ri(this)&&!b?this._pendingCalls.add(n):n(Yg(E))}_focus(e){const t=this.animation;e!==t.to&&(Cg(this)&&this._detach(),t.to=e,Cg(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Hn(t)&&(is(t,this),dd(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Hn(e)&&Eo(e,this)}_set(e,t=!0){const n=In(e);if(!xe.und(n)){const r=pr(this);if(!r||!_r(n,r.getValue())){const i=od(n);!r||r.constructor!=i?sd(this,i.create(n)):r.setValue(n),r&&Ue.batchedUpdates(()=>{this._onChange(n,t)})}}return pr(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,Ro(this,"onStart",rr(this,ko(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Ci(this.animation.onChange,e,this)),Ci(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;pr(this).reset(In(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),ri(this)||(Jg(this,!0),Io(this)||this._resume())}_resume(){tr.skipAnimation?this.finish():rc.start(this)}_stop(e,t){if(ri(this)){Jg(this,!1);const n=this.animation;tt(n.values,i=>{i.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),wo(this,{type:"idle",parent:this});const r=t?ss(this.get()):rr(this.get(),ko(this,e??n.to));go(this._pendingCalls,r),n.changed&&(n.changed=!1,Ro(this,"onRest",r,this))}}};function ko(e,t){const n=Ao(t),r=Ao(e.get());return _r(r,n)}function Xg(e,t=e.loop,n=e.to){const r=Ci(t);if(r){const i=r!==!0&&qg(r),s=(i||e).reverse,o=!i||i.reset;return Oo({...e,loop:t,default:!1,pause:void 0,to:!s||cd(n)?n:void 0,from:o?e.from:void 0,reset:o,...i})}}function Oo(e){const{to:t,from:n}=e=qg(e),r=new Set;return xe.obj(t)&&e0(t,r),xe.obj(n)&&e0(n,r),e.keys=r.size?Array.from(r):null,e}function mA(e){const t=Oo(e);return xe.und(t.default)&&(t.default=ad(t)),t}function e0(e,t){hr(e,(n,r)=>n!=null&&t.add(r))}var gA=["onStart","onRest","onChange","onPause","onResume"];function t0(e,t,n){e.animation[n]=t[n]!==Vg(t,n)?Ug(t[n],e.key):void 0}function Ro(e,t,...n){var r,i,s,o;(i=(r=e.animation)[t])==null||i.call(r,...n),(o=(s=e.defaultProps)[t])==null||o.call(s,...n)}var yA=["onStart","onChange","onRest"],vA=1,bA=class{constructor(e,t){this.id=vA++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(const t in e){const n=e[t];xe.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Oo(e)),this}start(e){let{queue:t}=this;return e?t=Dn(e).map(Oo):this.queue=[],this._flush?this._flush(this,t):(a0(this,t),gd(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;tt(Dn(t),r=>n[r].stop(!!e))}else To(this._state,this._lastAsyncId),this.each(n=>n.stop(!!e));return this}pause(e){if(xe.und(e))this.start({pause:!0});else{const t=this.springs;tt(Dn(e),n=>t[n].pause())}return this}resume(e){if(xe.und(e))this.start({pause:!1});else{const t=this.springs;tt(Dn(e),n=>t[n].resume())}return this}each(e){hr(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,i=this._changed.size>0;(r&&!this._started||i&&!this._started)&&(this._started=!0,mo(e,([c,u])=>{u.value=this.get(),c(u,this,this._item)}));const s=!r&&this._started,o=i||s&&n.size?this.get():null;i&&t.size&&mo(t,([c,u])=>{u.value=o,c(u,this,this._item)}),s&&(this._started=!1,mo(n,([c,u])=>{u.value=o,c(u,this,this._item)}))}eventObserved(e){if(e.type=="change")this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type=="idle")this._active.delete(e.parent);else return;Ue.onFrame(this._onFrame)}};function gd(e,t){return Promise.all(t.map(n=>n0(e,n))).then(n=>ld(e,n))}async function n0(e,t,n){const{keys:r,to:i,from:s,loop:o,onRest:c,onResolve:u}=t,d=xe.obj(t.default)&&t.default;o&&(t.loop=!1),i===!1&&(t.to=null),s===!1&&(t.from=null);const f=xe.arr(i)||xe.fun(i)?i:void 0;f?(t.to=void 0,t.onRest=void 0,d&&(d.onRest=void 0)):tt(yA,p=>{const y=t[p];if(xe.fun(y)){const g=e._events[p];t[p]=({finished:v,cancelled:w})=>{const E=g.get(y);E?(v||(E.finished=!1),w&&(E.cancelled=!0)):g.set(y,{value:null,finished:v||!1,cancelled:w||!1})},d&&(d[p]=t[p])}});const h=e._state;t.pause===!h.paused?(h.paused=t.pause,go(t.pause?h.pauseQueue:h.resumeQueue)):h.paused&&(t.pause=!0);const l=(r||Object.keys(e.springs)).map(p=>e.springs[p].start(t)),b=t.cancel===!0||Vg(t,"cancel")===!0;(f||b&&h.asyncId)&&l.push(Hg(++e._lastAsyncId,{props:t,state:h,actions:{pause:zl,resume:zl,start(p,y){b?(To(h,e._lastAsyncId),y(ss(e))):(p.onRest=c,y(Wg(f,p,h,e)))}}})),h.paused&&await new Promise(p=>{h.resumeQueue.add(p)});const a=ld(e,await Promise.all(l));if(o&&a.finished&&!(n&&a.noop)){const p=Xg(t,o,i);if(p)return a0(e,[p]),n0(e,p,!0)}return u&&Ue.batchedUpdates(()=>u(a,e,e.item)),a}function r0(e,t){const n={...e.springs};return t&&tt(Dn(t),r=>{xe.und(r.keys)&&(r=Oo(r)),xe.obj(r.to)||(r={...r,to:void 0}),o0(n,r,i=>s0(i))}),i0(e,n),n}function i0(e,t){hr(t,(n,r)=>{e.springs[r]||(e.springs[r]=n,is(n,e))})}function s0(e,t){const n=new pA;return n.key=e,t&&is(n,t),n}function o0(e,t,n){t.keys&&tt(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function a0(e,t){tt(t,n=>{o0(e.springs,n,r=>s0(r,e))})}var gc=({children:e,...t})=>{const n=k.useContext(yc),r=t.pause||!!n.pause,i=t.immediate||!!n.immediate;t=WC(()=>({pause:r,immediate:i}),[r,i]);const{Provider:s}=yc;return se.createElement(s,{value:t},e)},yc=wA(gc,{});gc.Provider=yc.Provider,gc.Consumer=yc.Consumer;function wA(e,t){return Object.assign(e,se.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var EA=()=>{const e=[],t=function(r){HC();const i=[];return tt(e,(s,o)=>{if(xe.und(r))i.push(s.start());else{const c=n(r,s,o);c&&i.push(s.start(c))}}),i};t.current=e,t.add=function(r){e.includes(r)||e.push(r)},t.delete=function(r){const i=e.indexOf(r);~i&&e.splice(i,1)},t.pause=function(){return tt(e,r=>r.pause(...arguments)),this},t.resume=function(){return tt(e,r=>r.resume(...arguments)),this},t.set=function(r){tt(e,(i,s)=>{const o=xe.fun(r)?r(s,i):r;o&&i.set(o)})},t.start=function(r){const i=[];return tt(e,(s,o)=>{if(xe.und(r))i.push(s.start());else{const c=this._getProps(r,s,o);c&&i.push(s.start(c))}}),i},t.stop=function(){return tt(e,r=>r.stop(...arguments)),this},t.update=function(r){return tt(e,(i,s)=>i.update(this._getProps(r,i,s))),this};const n=function(r,i,s){return xe.fun(r)?r(s,i):r};return t._getProps=n,t};function SA(e,t,n){const r=xe.fun(t)&&t;r&&!n&&(n=[]);const i=k.useMemo(()=>r||arguments.length==3?EA():void 0,[]),s=k.useRef(0),o=Ng(),c=k.useMemo(()=>({ctrls:[],queue:[],flush(g,v){const w=r0(g,v);return s.current>0&&!c.queue.length&&!Object.keys(w).some(S=>!g.springs[S])?gd(g,v):new Promise(S=>{i0(g,w),c.queue.push(()=>{S(gd(g,v))}),o()})}}),[]),u=k.useRef([...c.ctrls]),d=[],f=Dg(e)||0;k.useMemo(()=>{tt(u.current.slice(e,f),g=>{aA(g,i),g.stop(!0)}),u.current.length=e,h(f,e)},[e]),k.useMemo(()=>{h(0,Math.min(f,e))},n);function h(g,v){for(let w=g;w<v;w++){const E=u.current[w]||(u.current[w]=new bA(null,c.flush)),S=r?r(w,E):t[w];S&&(d[w]=mA(S))}}const l=u.current.map((g,v)=>r0(g,d[v])),b=k.useContext(gc),a=Dg(b),p=b!==a&&oA(b);id(()=>{s.current++,c.ctrls=u.current;const{queue:g}=c;g.length&&(c.queue=[],tt(g,v=>v())),tt(u.current,(v,w)=>{i==null||i.add(v),p&&v.start({default:b});const E=d[w];E&&(cA(v,E.ref),v.ref?v.queue.push(E):v.start(E))})}),Mg(()=>()=>{tt(c.ctrls,g=>g.stop(!0))});const y=l.map(g=>({...g}));return i?[y,i]:y}function xA(e,t){const n=xe.fun(e),[[r],i]=SA(1,n?e:[e],n?[]:t);return n||arguments.length==2?[r,i]:r}var _A=class extends fd{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=vo(...t);const n=this._get(),r=od(n);sd(this,r.create(n))}advance(e){const t=this._get(),n=this.get();_r(t,n)||(pr(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&c0(this._active)&&yd(this)}_get(){const e=xe.arr(this.source)?this.source.map(In):Dn(In(this.source));return this.calc(...e)}_start(){this.idle&&!c0(this._active)&&(this.idle=!1,tt(hc(this),e=>{e.done=!1}),tr.skipAnimation?(Ue.batchedUpdates(()=>this.advance()),yd(this)):rc.start(this))}_attach(){let e=1;tt(Dn(this.source),t=>{Hn(t)&&is(t,this),dd(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){tt(Dn(this.source),e=>{Hn(e)&&Eo(e,this)}),this._active.clear(),yd(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=Dn(this.source).reduce((t,n)=>Math.max(t,(dd(n)?n.priority:0)+1),0))}};function CA(e){return e.idle!==!1}function c0(e){return!e.size||Array.from(e).every(CA)}function yd(e){e.idle||(e.idle=!0,tt(hc(e),t=>{t.done=!0}),wo(e,{type:"idle",parent:e}))}tr.assign({createStringInterpolator:Og,to:(e,t)=>new _A(e,t)});var u0=/^--/;function AA(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!u0.test(e)&&!(No.hasOwnProperty(e)&&No[e])?t+"px":(""+t).trim()}var l0={};function TA(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{style:r,children:i,scrollTop:s,scrollLeft:o,viewBox:c,...u}=t,d=Object.values(u),f=Object.keys(u).map(h=>n||e.hasAttribute(h)?h:l0[h]||(l0[h]=h.replace(/([A-Z])/g,l=>"-"+l.toLowerCase())));i!==void 0&&(e.textContent=i);for(const h in r)if(r.hasOwnProperty(h)){const l=AA(h,r[h]);u0.test(h)?e.style.setProperty(h,l):e.style[h]=l}f.forEach((h,l)=>{e.setAttribute(h,d[l])}),s!==void 0&&(e.scrollTop=s),o!==void 0&&(e.scrollLeft=o),c!==void 0&&e.setAttribute("viewBox",c)}var No={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},IA=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),kA=["Webkit","Ms","Moz","O"];No=Object.keys(No).reduce((e,t)=>(kA.forEach(n=>e[IA(n,t)]=e[t]),e),No);var OA=/^(matrix|translate|scale|rotate|skew)/,RA=/^(translate)/,NA=/^(rotate|skew)/,vd=(e,t)=>xe.num(e)&&e!==0?e+t:e,vc=(e,t)=>xe.arr(e)?e.every(n=>vc(n,t)):xe.num(e)?e===t:parseFloat(e)===t,MA=class extends mc{constructor({x:e,y:t,z:n,...r}){const i=[],s=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),s.push(o=>[`translate3d(${o.map(c=>vd(c,"px")).join(",")})`,vc(o,0)])),hr(r,(o,c)=>{if(c==="transform")i.push([o||""]),s.push(u=>[u,u===""]);else if(OA.test(c)){if(delete r[c],xe.und(o))return;const u=RA.test(c)?"px":NA.test(c)?"deg":"";i.push(Dn(o)),s.push(c==="rotate3d"?([d,f,h,l])=>[`rotate3d(${d},${f},${h},${vd(l,u)})`,vc(l,0)]:d=>[`${c}(${d.map(f=>vd(f,u)).join(",")})`,vc(d,c.startsWith("scale")?1:0)])}}),i.length&&(r.transform=new DA(i,s)),super(r)}},DA=class extends Ag{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return tt(this.inputs,(n,r)=>{const i=In(n[0]),[s,o]=this.transforms[r](xe.arr(i)?i:n.map(In));e+=" "+s,t=t&&o}),t?"none":e}observerAdded(e){e==1&&tt(this.inputs,t=>tt(t,n=>Hn(n)&&is(n,this)))}observerRemoved(e){e==0&&tt(this.inputs,t=>tt(t,n=>Hn(n)&&Eo(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),wo(this,e)}},PA=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];tr.assign({batchedUpdates:bi.unstable_batchedUpdates,createStringInterpolator:Og,colors:SC});var jA=tA(PA,{applyAnimatedValues:TA,createAnimatedStyle:e=>new MA(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),LA=jA.animated;function bc(e){const{rows:t}=e,n=xA({from:{opacity:0},to:{opacity:1}});return m.jsxs(LA.div,{style:n,className:"flex w-full animate-pulse flex-col items-start space-y-3",children:[[...Array(t)].map((r,i)=>m.jsx("div",{className:"h-10 w-full rounded-lg bg-gray-100 p-5"},`skeleton_rows_${i}`)),m.jsx("span",{className:"sr-only",children:"Loading..."})]})}function d0({children:e,offset:t,max:n=4,initialCollapsed:r=!0}){const i=k.useRef(null),[s,o]=k.useState(0),[c,u]=k.useState(r),d=c&&k.Children.count(e)>n?n:k.Children.count(e);k.useEffect(()=>{i.current&&(s?c?i.current.style.marginBottom=`-${s-(s/d+(d-1)*(t??s/d/7.5))}px`:i.current.style.marginBottom="unset":o(i.current.offsetHeight))},[c,s]);const f=l=>(100-(d-1-l))/100,h=l=>l*(s/d-(t??s/d/7.5));return m.jsx("div",{ref:i,className:"hover:cursor-pointer",onClick:()=>d>1&&u(!c),children:k.Children.map(k.Children.toArray(e).slice(-1*d),(l,b)=>m.jsx("div",{className:`${!c&&"[&:not(:last-child)]:mb-1"} h-full w-full transition-all duration-300 ease-in-out`,style:{transform:c&&d>1?`scaleX(${f(b)}) translateY(-${h(b)}px)`:void 0},children:l}))})}const BA=Ji("flex flex-shrink bg-white rounded-full transform transition-transform ease-out",{variants:{size:{md:"w-3 h-3",lg:"w-7 h-7"}}}),FA=Ji("",{variants:{size:{md:"pr-4",lg:"pr-6"}}}),UA=({id:e,disabled:t,onChange:n,defaultChecked:r=!1,size:i="md"})=>{const s=t,[o,c]=k.useState(r),[u,d]=k.useState(!1),f=()=>{s||(c(!o),n&&n())},h=()=>{t||d(!0)},l=()=>{d(!1)},b=hn("relative py-0.5 pl-0.5 rounded-full",{"ring-2 ring-core-white-900 outline-core-primary-500 outline outline-2 outline-offset-2":u,"bg-core-primary-500 hover:bg-core-primary-600":o&&!t,"bg-core-gray-200 hover:bg-core-gray-300":!o&&!t,"bg-core-gray-100":t},FA({size:i})),a=i==="lg"?"translate-x-[1.375rem] ease-out":"translate-x-3.5 ease-out";return m.jsxs("div",{className:`inline-flex items-center py-1 ${s?"pointer-events-none":"cursor-pointer "}`,onClick:f,onFocus:h,children:[m.jsx("input",{className:"sr-only ",id:e,type:"checkbox",checked:o,disabled:s,onBlur:l,onChange:f,onFocus:h}),m.jsx("div",{className:b,children:m.jsx("div",{className:hn(BA({size:i}),`${o?a:""} ${s?"shadow-none":"shadow-xs"}`)})})]})},wc=({id:e,children:t,size:n="md",description:r,toggleLeft:i=!0,disabled:s,helperText:o,defaultChecked:c=!1,label:u,required:d=!1,tooltip:f,onChange:h})=>{const l=k.useId(),b=e??l;return m.jsxs("div",{className:`flex ${i?"flex-row":"flex-row-reverse"} items-start gap-3`,children:[m.jsx(UA,{disabled:s,defaultChecked:c,id:b,size:n,onChange:h}),t||(u||r||f||o)&&m.jsxs("div",{className:"inline-flex w-full flex-col self-center",children:[m.jsx(vn,{className:hn("font-normal"),description:r,required:d,tooltip:f,htmlFor:b,disabled:s,children:u}),m.jsx(vn.Helper,{disabled:s,helperText:o})]})]})};wc.displayName="Switch";const f0=k.createContext(null);function VA(e=!1){const t=k.useContext(f0);if(!t&&!e)throw new Error("Switch.Item must be used within a SwitchGroup or SwitchGroup.Root");return t}const h0=k.forwardRef(({toggleLeft:e=!1,size:t="md",children:n,description:r,disabled:i,helperText:s,id:o,label:c,required:u,tooltip:d},f)=>{const h=k.useId(),l=o??h,b=c??r??d??s?m.jsxs("div",{className:"inline-flex flex-col",children:[m.jsx(vn,{className:"cursor-default",description:r,required:u,tooltip:d,htmlFor:l,disabled:i,children:c}),m.jsx(vn.Helper,{disabled:i,helperText:s})]}):null;return m.jsx(f0.Provider,{value:{disabled:i,toggleLeft:e,size:t},children:m.jsxs("div",{ref:f,"aria-describedby":s?`${l}__describer`:void 0,"aria-labelledby":c?`${l}__label`:void 0,className:"flex flex-col gap-4",role:"group",children:[c??s??r??d?m.jsx("div",{className:"flex flex-col",children:b}):null,n?m.jsx("div",{className:hn("flex flex-col gap-2"),children:n}):null]})})});h0.displayName="SwitchGroup",Object.assign(h0,{Item:({disabled:e,label:t,defaultChecked:n})=>{const r=VA(),{disabled:i,size:s,toggleLeft:o}=r??{};return m.jsx(wc,{toggleLeft:o,disabled:e??i,label:t,defaultChecked:n,size:s})}});const qA=({children:e})=>m.jsx("div",{className:"fixed bottom-0 z-10 flex h-[70px] w-full border-b-0 border-t border-gray-100 bg-white lg:bottom-auto lg:top-0 lg:h-[50px] lg:border-b lg:border-t-0",children:e}),$A=({id:e,label:t,icon:n,pathname:r,activeTab:i,setActiveTab:s})=>m.jsx(Ah,{className:"flex flex-grow items-center",to:r??"",children:m.jsxs("button",{className:`flex h-full flex-grow flex-col items-center justify-center gap-1 border-b-0 border-t-2 px-3 py-3 text-xs focus:outline-none lg:flex-row lg:border-b-2 lg:border-t-0 lg:text-sm ${i===e?"border-core-primary-500 text-core-primary-500":"border-transparent text-core-gray-500 hover:text-core-gray-800"}`,onClick:()=>s(e),children:[m.jsx(en,{icon:n,className:"mr-2",variant:i===e?"discovery":"secondary"}),t]})});function Cr(){const{sessionUuid:e}=It(),{data:t,error:n,isLoading:r,isValidating:i,mutate:s}=$n({url:`${e}/contacts`});return{contact:t==null?void 0:t.data.data,data:t,error:n,isLoading:r,isValidating:i,mutate:s}}function GA({contact:e}){const{t}=et(),{session:{loyalty_program:n}}=vt(),r=(s,o)=>Kp(s,o)?`${Kp(s,o)} ${t("yearsAgo")}`:Wp(s,o)?`${Wp(s,o)} ${t("weeksAgo")}`:Rl(s,o)?`${Rl(s,o)} ${t("daysAgo")}`:t("today"),i=()=>{const s=new Date,o=new Date(e.current_display_values.birthdate);return o.setFullYear(s.getFullYear()),s.getTime()>o.getTime()&&o.setFullYear(o.getFullYear()+1),Math.floor((o.getTime()-s.getTime())/(1e3*60*60*24))};return m.jsxs("div",{className:"h-full justify-between",children:[m.jsx("p",{className:"mb-4 text-lg font-semibold leading-7",children:"Stats"}),m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(en,{icon:"calendar"}),m.jsxs("div",{children:[m.jsx("p",{className:"text-xs font-semibold",children:r(new Date,new Date(e.current_display_values.loyalty_last_transaction_date))}),m.jsx("p",{className:"text-xs text-core-gray-500",children:t("lastVisit")})]})]}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(en,{icon:"shopping-bag"}),m.jsxs("div",{children:[m.jsx("p",{className:"text-xs font-semibold",children:`${e.current_display_values.loyalty_number_of_transactions} ${t("visits")}`}),m.jsx("p",{className:"text-xs text-core-gray-500",children:t("totalVisits")})]})]}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(en,{icon:"dollar"}),m.jsxs("div",{children:[m.jsx("p",{className:"text-xs font-semibold",children:`${e.current_display_values.loyalty_total_credits_received} ${n.custom_credit_name?n.custom_credit_name:t("points")}`}),m.jsx("p",{className:"text-xs text-core-gray-500",children:t("totalCredits")})]})]}),e.current_display_values.birthdate&&m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(en,{icon:"star"}),m.jsxs("div",{children:[m.jsx("p",{className:"text-xs font-semibold",children:new Date(e.current_display_values.birthdate).toLocaleDateString(Kt.language,{day:"numeric",month:"long"})}),m.jsx("p",{className:"text-xs text-core-gray-500",children:t("birthdayInDays",{number:i()})})]})]})]})]})}function p0({loyaltyTransaction:e}){const{t}=et();return m.jsxs("div",{className:"mb-2 flex justify-between",children:[m.jsx("p",{className:"text-xs text-core-gray-500",children:e.type===kp.CREDIT_RECEPTION?t("transaction"):`${t("isRedeemed")} '${e.loyalty_transaction_data.title}'`}),m.jsx("p",{className:"text-xs font-semibold",children:e.credits>0?"+"+e.credits:e.credits})]})}function m0({subscription:e,onChange:t,editable:n=!1}){const{t:r}=et();return m.jsxs("div",{className:"mb-2 flex justify-between",children:[m.jsx("p",{className:"text-xs font-semibold",children:e.subscription_type.name}),n?m.jsx(wc,{defaultChecked:e.is_subscribed,disabled:e.subscription_type.strategy===Wr.FUNCTIONAL,onChange:t&&(()=>t(e.subscription_type.name))}):m.jsx(Pl,{label:r(e.status.toLowerCase()),size:"sm",color:e.is_subscribed?"primary":"gray"})]})}function HA({contact:e}){const t=Mt(),{t:n}=et();return m.jsxs("div",{className:"inline-grid w-full items-center gap-4 py-4 lg:grid-cols-2",children:[m.jsxs("div",{className:"flex items-center gap-4",children:[m.jsx(Dl,{src:e.current_display_values.avatar,size:"2xl"}),m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsxs("div",{className:"flex gap-2",children:[m.jsx("p",{className:"text-lg",children:e.current_display_values.firstname||e.current_display_values.lastname?`${e.current_display_values.firstname} ${e.current_display_values.lastname}`:e.current_display_values.email}),e.current_display_values.tier&&m.jsx(Pl,{label:e.current_display_values.tier,size:"sm",stroke:!0})]}),m.jsxs("p",{className:"text-sm text-core-gray-500 ",children:[n("joined")," ",new Date(e.current_display_values.created_at).toLocaleDateString(Kt.language,{month:"long",year:"numeric"})]})]})]}),m.jsxs("div",{className:"inline-grid gap-2 lg:grid-cols-2",children:[m.jsx(ct,{label:n("goToX",{x:"identifiers"}),variant:"secondary",size:"md",onClick:()=>t("contact-identifiers")}),m.jsx(ct,{before:m.jsx(en,{icon:"edit"}),label:n("editProfile"),variant:"secondary",size:"md",onClick:()=>t("contact-attributes")})]})]})}function Ec(){const{sessionUuid:e}=It(),{data:t,error:n,isLoading:r,isValidating:i,mutate:s}=$n({url:`${e}/loyalty-transactions`});return{loyaltyTransactions:t==null?void 0:t.data,data:t,error:n,isLoading:r,isValidating:i,mutate:s}}function g0(){const{sessionUuid:e}=It(),{data:t,error:n,isLoading:r,isValidating:i,mutate:s}=$n({url:`${e}/subscriptions/contact`});return{subscriptions:t==null?void 0:t.data.data,data:t,error:n,isLoading:r,isValidating:i,mutate:s}}function YA(){const{contact:e,isLoading:t}=Cr(),{session:{loyalty_program:n,currency:r}}=vt(),{t:i}=et(),s=Mt(),{loyaltyTransactions:o}=Ec(),{subscriptions:c}=g0();return t||!e?m.jsx(m.Fragment,{}):m.jsxs(Pt,{children:[m.jsx(jt,{children:m.jsx(HA,{contact:e})}),m.jsx(Tt,{children:m.jsxs("div",{className:"grid grid-cols-1 gap-x-2 gap-y-2 lg:grid-cols-4",children:[m.jsxs("div",{className:"flex gap-2 lg:flex-col",children:[m.jsx(Mo,{children:m.jsxs("div",{className:"flex h-full flex-col items-center justify-center",children:[m.jsx("p",{className:"text-2xl leading-8",children:e.current_display_values.loyalty_balance}),m.jsx("p",{className:"text-sm text-core-gray-500",children:n.custom_credit_name?n.custom_credit_name:i("points")})]})}),m.jsx(Mo,{children:m.jsxs("div",{className:"flex h-full flex-col items-center justify-center",children:[m.jsx("p",{className:"text-2xl leading-8",children:Qi(e.prepaid_balance.balance_in_cents,r)}),m.jsx("p",{className:"text-sm text-core-gray-500",children:i("prepaidCredit")})]})})]}),m.jsx(Mo,{children:m.jsx(GA,{contact:e})}),m.jsx(Mo,{children:m.jsxs("div",{className:"flex h-full flex-col justify-between gap-4",children:[m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsx("p",{className:"text-lg font-semibold leading-7",children:i("activities")}),o&&o.length?m.jsx("div",{children:o.slice(0,5).map(u=>m.jsx(p0,{loyaltyTransaction:u},u.uuid))}):m.jsx("p",{className:"text-sm text-core-gray-500",children:i("noActivity")})]}),m.jsx(ct,{label:`${i("all")} ${i("activities").toLowerCase()}`,variant:"secondary",onClick:()=>s("activity")})]})}),m.jsx(Mo,{children:m.jsxs("div",{className:"flex h-full flex-col justify-between",children:[m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsx("p",{className:"text-lg font-semibold leading-7",children:i("subscriptions")}),m.jsx("div",{children:c==null?void 0:c.filter(u=>u.subscription_type.strategy!==Wr.FUNCTIONAL).map(u=>m.jsx(m0,{subscription:u},u.subscription_type.uuid))})]}),m.jsx(ct,{label:i("change").charAt(0).toUpperCase()+i("change").slice(1),before:m.jsx(en,{icon:"edit"}),variant:"secondary",onClick:()=>s("subscriptions")})]})})]})})]})}function Mo({children:e}){return m.jsx("div",{className:"flex-grow rounded-lg border p-4",children:e})}function Do({label:e,path:t}){const n=Mt();return m.jsx("div",{className:"flex h-16 items-center text-base text-core-gray-900",children:m.jsx(ct,{label:e,variant:"link-gray",before:m.jsx(en,{icon:"caret-left",size:"md"}),onClick:()=>n(t)})})}function WA(){const{t:e}=et(),{loyaltyTransactions:t}=Ec(),{contact:n}=Cr();return m.jsx("div",{className:"h-full md:container",children:m.jsxs(Pt,{children:[m.jsx(jt,{children:m.jsx(Do,{label:e("back"),path:"../"})}),m.jsx(Tt,{children:m.jsxs("div",{className:"md:max-h-[528px]",children:[m.jsx("p",{className:"text-sm font-medium",children:e("allActivities")}),m.jsx("p",{className:"mb-4 text-sm text-core-gray-500",children:e("checkOutAllActivitiesOfName",{name:n.current_display_values.firstname})}),m.jsx("div",{className:"overflow-auto",children:t==null?void 0:t.map(r=>m.jsx(p0,{loyaltyTransaction:r},r.uuid))})]})})]})})}function KA(){const{t:e}=et(),{subscriptions:t,mutate:n}=g0(),[r,i]=k.useState({}),[s,o]=k.useState(!1);k.useEffect(()=>{if(t&&!Object.keys(r).length){const f=t.reduce((h,l)=>({...h,[l.subscription_type.name]:l.is_subscribed}),{});i(f)}},[]);const c=f=>{Object.hasOwn(r,f)?i({...r,[f]:!r[f]}):i({...r,[f]:!0})},u=async()=>{o(!0),await Tl.update({values:r}),await n(),ze.success(e("subscriptionsUpdated")),o(!1)},d=()=>t&&t.some(f=>r[f.subscription_type.name]!==f.is_subscribed);return m.jsx("div",{className:"h-full md:container",children:m.jsxs(Pt,{children:[m.jsx(jt,{children:m.jsx(Do,{label:e("back"),path:"../"})}),m.jsx(Tt,{children:m.jsx("div",{className:"md:max-h-[528px]",children:m.jsxs("div",{children:[m.jsx("p",{className:"text-sm font-medium",children:e("subscriptions")}),m.jsx("p",{className:"mb-4 text-sm text-core-gray-500",children:e("manageEmailPreferences")}),t==null?void 0:t.filter(f=>f.subscription_type.strategy!==Wr.FUNCTIONAL).map(f=>m.jsx(m0,{subscription:f,onChange:c,editable:!0},f.subscription_type.uuid))]})})}),m.jsx(tn,{children:m.jsx(ct,{label:e("saveChanges"),className:"w-full",onClick:u,disabled:!d()||s})})]})})}function zA({identifier:e,onClear:t}){const{t:n}=et();return m.jsxs("div",{className:"flex items-center justify-between rounded-lg border text-xs",children:[m.jsxs("div",{className:"flex-col pl-4",children:[m.jsx("p",{className:"font-semibold",children:e.value}),m.jsx("p",{className:"text-core-gray-500",children:n("contactIdentifier")})]}),m.jsx("div",{className:"h-full border-l p-4 hover:cursor-pointer hover:bg-core-gray-50",onClick:()=>t&&t(e.value),children:m.jsx(en,{className:"h-full",icon:"close"})})]})}function y0(){const{sessionUuid:e}=It(),{data:t,error:n,isLoading:r,isValidating:i,mutate:s}=$n({url:`${e}/contact-identifiers`});return{identifiers:t==null?void 0:t.data.data,data:t,error:n,isLoading:r,isValidating:i,mutate:s}}function QA(){const{t:e}=et(),t=Mt(),{identifiers:n,isLoading:r,mutate:i}=y0(),[s,o]=k.useState(""),[c,u]=k.useState(!1),d=h=>{o(h),u(!0)},f=async()=>{await px.clear({value:s}),await i(),u(!1)};return m.jsxs("div",{className:"h-full md:container",children:[m.jsxs(Pt,{children:[m.jsx(jt,{children:m.jsx(Do,{label:e("back"),path:"../"})}),m.jsx(Tt,{children:m.jsx("div",{className:"md:max-h-[528px]",children:m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsxs("div",{children:[m.jsx("p",{className:"text-sm font-medium",children:e("contactIdentifiers")}),m.jsx("p",{className:"mb-4 text-sm text-core-gray-500",children:e("contactIdentifierDescription")})]}),r?m.jsx(bc,{rows:10}):n==null?void 0:n.map(h=>m.jsx(zA,{identifier:h,onClear:d},h.value))]})})}),m.jsx(tn,{children:m.jsx(ct,{label:e("addIdentifier"),className:"w-full",variant:"secondary",onClick:()=>t("create")})})]}),m.jsx(xi,{title:e("confirmClearContactIdentifier"),isOpen:c,primaryAction:{label:e("confirm"),action:f},secondaryAction:{label:e("cancel"),action:()=>u(!1)},onClose:()=>u(!1),children:m.jsx("p",{children:e("clearContactIdentifier",{value:s})})})]})}function JA(){const{t:e}=et(),{contact:t}=Cr(),{mutate:n}=y0(),{errorToast:r}=co(),i=Mt(),[s,o]=k.useState(""),[c,u]=k.useState(!1),[d,f]=k.useState(!1),h=()=>{!s||!t||!t.email||(u(!0),Zs.linkIdentifier(s,t.email).then(()=>{n(),i("/portal/profile/contact-identifiers")}).catch(r).finally(()=>{o(""),u(!1)}))};return k.useEffect(()=>{s&&!c&&!d&&h()},[s,c,d,h]),m.jsx("div",{className:"h-full md:container",children:m.jsxs(Pt,{id:xr,children:[m.jsx(jt,{children:m.jsx(Do,{label:e("back"),path:"../"})}),m.jsx(Tt,{children:m.jsx("form",{onSubmit:l=>{l.preventDefault(),h()},children:m.jsx(fo,{dataSetter:o,setDefer:f,label:e("contactIdentifier")})})}),m.jsx(tn,{children:m.jsx(ct,{label:e("addIdentifier"),className:"w-full",onClick:h,disabled:c})})]})})}function ZA(){const{t:e}=et(),{contact:t,isLoading:n,mutate:r}=Cr(),[i,s]=k.useState(),[o,c]=k.useState();k.useEffect(()=>{i||(async()=>{const{data:h}=await Ap.get();s(h.data.elements)})()},[i]);const u=h=>{c({...o,[h.target.name]:h.target.value})},d=(h,l)=>{c({...o,[h]:l})},f=async()=>{o&&(await Ap.update(o),await r(),ze.success(e("contactAttributesUpdated")),c(void 0))};return m.jsx("div",{className:"h-full md:container",children:m.jsxs(Pt,{children:[m.jsx(jt,{children:m.jsx(Do,{label:e("back"),path:"../"})}),m.jsx(Tt,{children:m.jsxs("div",{className:"md:max-h-[528px]",children:[!n&&m.jsxs("div",{className:"mb-4 flex flex-row items-center gap-4 border-b border-b-core-gray-200 px-1 pb-4",children:[m.jsx(Dl,{src:t.current_display_values.avatar,size:"2xl"}),m.jsxs("div",{children:[m.jsx("div",{className:"flex flex-row items-center gap-2 ",children:m.jsxs("h1",{className:"text-lg text-core-gray-900",children:[t.current_display_values.firstname," ",t.current_display_values.lastname]})}),m.jsx("p",{className:"text-sm text-core-gray-500",children:t.current_display_values.email})]})]}),!i||n?m.jsx(bc,{rows:10}):i.map(h=>{if(!(h.type==="media_upload"||h.type==="email"))return h.type==="select"?m.jsx(hC,{name:h.name,label:h.label,value:o&&o[h.name]?o[h.name]:t.current_display_values[h.name],onChange:l=>d(h.name,l),disabled:h.disabled,children:h.options.map(l=>m.jsx(ql,{label:l.label,value:l.value},l.value))},h.id):h.type==="multi_select"?m.jsx(C2,{name:h.name,value:o&&o[h.name]?o[h.name]:h.defaultValue,label:h.label,onChange:d,disabled:h.disabled,options:h.options},h.id):h.type==="birth_date"||h.type==="date_time"?m.jsx(bm,{id:h.id,name:h.name,label:h.label,type:h.type==="date_time"?"date_time":"date",value:o&&o[h.name]?o[h.name]:t.current_display_values[h.name],disabled:h.disabled,onChange:u},h.id):m.jsx(Zi,{disabled:h.disabled,label:h.label,name:h.name,value:o&&o[h.name]!=="undefined"?o[h.name]:t.current_display_values[h.name],onChange:u},h.id)})]})}),m.jsx(tn,{children:m.jsx(ct,{label:e("saveChanges"),className:"w-full",onClick:f,disabled:!o})})]})})}function XA(){return m.jsxs(ur,{children:[m.jsx(Oe,{path:"/profile",element:m.jsx(sr,{element:m.jsx(YA,{})})}),m.jsx(Oe,{path:"/profile/activity",element:m.jsx(sr,{element:m.jsx(WA,{})})}),m.jsx(Oe,{path:"/profile/subscriptions",element:m.jsx(sr,{element:m.jsx(KA,{})})}),m.jsx(Oe,{path:"/profile/contact-identifiers",element:m.jsx(sr,{element:m.jsx(QA,{})})}),m.jsx(Oe,{path:"/profile/contact-identifiers/create",element:m.jsx(sr,{element:m.jsx(JA,{})})}),m.jsx(Oe,{path:"/profile/contact-attributes",element:m.jsx(sr,{element:m.jsx(ZA,{})})})]})}function bd({voucher:e,selected:t,setSelected:n}){const{t:r}=et();return m.jsxs("div",{className:`flex cursor-pointer items-center justify-between gap-4 rounded-lg ${e.status===Yi.REDEEMED?"border border-core-primary-100 bg-core-primary-50":"border bg-white"} p-2 text-xs`,onClick:()=>(t==null?void 0:t.code)===e.code?n(void 0):n(e),children:[m.jsxs("div",{className:"mr-4 flex items-center gap-4 overflow-hidden",children:[m.jsx("img",{src:e.promotion.image?e.promotion.image.value:"https://static.piggy.nl/images/fallback_image.png",alt:"voucher_image",className:"h-[32px] w-[32px] rounded object-cover object-center"}),m.jsxs("div",{className:"overflow-hidden overflow-ellipsis ",children:[m.jsx("p",{className:"font-semibold",children:e.name}),e.status===Yi.REDEEMED?m.jsx("p",{className:"text-core-gray-500",children:r("redeemed")}):m.jsx("p",{className:"text-core-primary-500",children:e.expiration_date?`Valid until ${new Date(e.expiration_date).toLocaleDateString()}`:r("nonExpiring")})]})]}),m.jsx("p",{className:`text-core-${e.status===Yi.REDEEMED?"gray":"primary"}-500`,children:e.code})]})}function eT(){const{sessionUuid:e}=It(),{data:t,error:n,isLoading:r,isValidating:i,mutate:s}=$n({url:`${e}/vouchers`});return{vouchers:t==null?void 0:t.data.data,data:t,error:n,isLoading:r,isValidating:i,mutate:s}}function tT(){const e=Hi(),{errorToast:t}=co(),{t:n}=et(),{vouchers:r,isLoading:i,mutate:s}=eT(),{onRedeemVoucher:o}=It(),{mutate:c}=Ec(),{session:u,mutate:d}=vt(),[f,h]=k.useState(),[l,b]=k.useState(!1);k.useEffect(()=>{f&&b(!0)},[f]);const a=v=>{e.post(`${u.uuid}/vouchers/redeem`,{code:v}).then(w=>{ze.success(n("voucherSuccessfullyRedeemed")),o&&o(w.data.data),p()}).catch(t).finally(y)},p=()=>{s(),c(),d().then(v=>{ro(v==null?void 0:v.data.data.events)})},y=()=>{b(!1),h(void 0)},g=()=>u.events.filter(v=>v.type===Kr.VOUCHER_REDEEMED);return m.jsxs("div",{className:"h-full md:container",children:[m.jsxs(Pt,{children:[m.jsx(jt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:n("vouchers")})})}),m.jsx(Tt,{children:i?m.jsx(bc,{rows:1}):m.jsx("div",{className:"flex flex-col gap-1 md:max-h-[528px]",children:r&&r.length?r.map(v=>m.jsx(bd,{voucher:v,selected:f,setSelected:h},v.code)):m.jsx("p",{className:"text-center text-sm text-core-gray-500",children:n("vouchersEmptyState")})})}),!!g().length&&m.jsx(tn,{children:m.jsx("div",{children:m.jsx(d0,{children:g().map(v=>m.jsx("div",{className:"flex items-center gap-2 rounded-lg border border-core-primary-100 bg-core-primary-50 p-2",children:m.jsx("div",{className:"flex h-full flex-col justify-between text-xs",children:m.jsxs("div",{className:"overflow-hidden",children:[m.jsx("p",{className:"font-semibold",children:v.data.name}),m.jsxs("p",{className:"overflow-ellipsis text-core-gray-500",children:[v.data.code," - ",n("applied")]})]})})},v.data.uuid))},g().length)})})]}),m.jsx(xi,{title:n("confirmVoucherRedemption"),isOpen:l,primaryAction:{label:n("confirm"),action:f&&(()=>a(f.code))},secondaryAction:{label:n("cancel"),action:y},onClose:y,children:m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsx("p",{children:n("redeemTitle",{title:f==null?void 0:f.name})}),f&&m.jsx(bd,{voucher:f,setSelected:h})]})})]})}function wd({reward:e,selected:t,setSelected:n,disabled:r,readOnly:i}){const{t:s}=et(),{session:o}=vt(),{contact:c,isLoading:u}=Cr(),d=u?0:c.credit_balance.balance;return m.jsxs("div",{className:`max-h-[48px] rounded-lg border ${r?"pointer-events-none opacity-40":!i&&"cursor-pointer"}`,children:[m.jsxs("div",{className:`flex items-center justify-between rounded-lg text-xs ${r?"px-2 pt-2":"p-2"}`,onClick:i?void 0:()=>(t==null?void 0:t.uuid)===e.uuid?n(void 0):n(e),children:[m.jsxs("div",{className:"mr-4 flex items-center gap-4 overflow-hidden",children:[m.jsx("img",{src:e.media&&e.media.value?e.media.value:"https://static.piggy.nl/images/fallback_image.png",alt:"voucher_image",className:"h-[32px] w-[32px] rounded object-cover object-center"}),m.jsx("p",{className:"truncate",children:e.title??e.description})]}),m.jsxs("p",{className:"whitespace-nowrap text-core-primary-500",children:[e.required_credits," ",o!=null&&o.loyalty_program.custom_credit_name?o==null?void 0:o.loyalty_program.custom_credit_name:s("points").toLowerCase()]})]}),e.required_credits-d>0&&m.jsx(A2,{value:d,max:e.required_credits})]})}function nT(){const{sessionUuid:e}=It(),{data:t,error:n,isLoading:r,isValidating:i,mutate:s}=$n({url:`${e}/rewards`});return{rewards:t==null?void 0:t.data.data,data:t,error:n,isLoading:r,isValidating:i,mutate:s}}function rT(){const{t:e}=et(),{rewards:t,isLoading:n,mutate:r}=nT(),{contact:i,isLoading:s,mutate:o}=Cr(),{mutate:c}=Ec(),{session:{events:u,loyalty_program:d},mutate:f}=vt(),{onClaimReward:h}=It(),[l,b]=k.useState(),[a,p]=k.useState(!1);k.useEffect(()=>{l&&p(!0)},[l]);const y=async()=>{if(l){const v=await vx.claim(l.uuid),w=await f(),E=w==null?void 0:w.data.data.events;ro(E);const S=E.filter(T=>T.type===Kr.REWARD_RECEPTION&&T.data.reward.uuid===l.uuid),{data:{uuid:A}}=S.reduce((T,O)=>new Date(T.created_at)>new Date(O.created_at)?T:O);r(),o(),c(),ze.success(e("rewardClaimed",{name:v.data.data.title})),h&&h(v.data.data,A),p(!1),b(void 0)}},g=()=>u.filter(v=>v.type===Kr.REWARD_RECEPTION).map(v=>t==null?void 0:t.find(w=>w.uuid===v.data.reward.uuid)).filter(v=>v);return m.jsxs("div",{className:"h-full md:container",children:[m.jsxs(Pt,{children:[m.jsx(jt,{children:m.jsxs("div",{className:"flex h-16 items-center justify-between",children:[m.jsx("h1",{children:e("rewards")}),m.jsxs("div",{className:"flex flex-col items-center",children:[m.jsx("p",{children:s?0:i.credit_balance.balance}),m.jsx("p",{className:"text-sm text-core-gray-500",children:d.custom_credit_name?d.custom_credit_name:e("points")})]})]})}),m.jsx(Tt,{children:n||s?m.jsx(bc,{rows:1}):m.jsxs("div",{className:"flex flex-col gap-1 md:max-h-[528px]",children:[!!t.filter(v=>v.required_credits<=i.credit_balance.balance).length&&m.jsx("p",{className:"text-sm font-light text-core-gray-500",children:e("redeemableRewards")}),t.filter(v=>v.required_credits<=i.credit_balance.balance).map(v=>m.jsx(wd,{reward:v,selected:l,setSelected:b},v.uuid)),!!t.filter(v=>v.required_credits>i.credit_balance.balance).length&&m.jsx("p",{className:"mt-2 text-sm font-light text-core-gray-500",children:e("saveABitMore")}),t.filter(v=>v.required_credits>i.credit_balance.balance).map(v=>m.jsx(wd,{reward:v,selected:l,setSelected:b,disabled:!0},v.uuid))]})}),!!g().length&&!n&&m.jsx(tn,{children:m.jsx("div",{children:m.jsx(d0,{children:g().map((v,w)=>m.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-core-primary-100 bg-core-primary-50 p-2 text-xs",children:[m.jsxs("div",{className:"mr-4 flex items-center gap-4 overflow-hidden",children:[m.jsx("img",{src:v.media&&v.media.value?v.media.value:"https://static.piggy.nl/images/fallback_image.png",alt:"voucher_image",className:"h-8 w-8 rounded object-cover object-center"}),m.jsx("p",{className:"truncate",children:v.title??v.description})]}),m.jsxs("p",{className:"text-core-primary-500",children:[v.required_credits," ",d.custom_credit_name?d.custom_credit_name:e("points")]})]},`${w}-${v.uuid}`))},g().length)})})]}),m.jsx(xi,{title:e("confirmRewardRedemption"),isOpen:a,primaryAction:{label:e("confirm"),action:y},secondaryAction:{label:e("cancel"),action:()=>p(!1)},onClose:()=>p(!1),children:m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsx("p",{children:e("redeemRewardForPoints",{title:l==null?void 0:l.title,credits:l==null?void 0:l.required_credits,customCreditName:d.custom_credit_name?d.custom_credit_name:e("points")})}),l&&m.jsx(wd,{reward:l,selected:l,setSelected:b,readOnly:!0})]})})]})}function iT({children:e}){return m.jsx("div",{className:"h-screen w-screen pb-[70px] md:px-4 md:pb-[86px] md:pt-4 lg:pb-4 lg:pt-[66px]",children:m.jsx("div",{className:"h-full max-h-full",children:e})})}function sT(){const e=Mt(),{t}=et(),{pathname:n}=Yt(),[r,i]=k.useState(1),s=[{id:0,label:t("profile"),icon:"user",pathname:"profile"},{id:1,label:t("rewards"),icon:"edit",pathname:"rewards"},{id:2,label:t("vouchers"),icon:"mail",pathname:"vouchers"}];return k.useEffect(()=>{(n==="/portal"||n==="/portal/")&&e(s[r].pathname);const o=n.split("/")[n.split("/").length-1];if(o!==s[r].pathname){const c=s.find(u=>u.pathname===o);c&&i(c.id)}},[e]),m.jsxs("div",{className:"relative h-full w-full select-none overflow-auto",children:[m.jsx(qA,{children:s.map(o=>m.jsx($A,{id:o.id,label:o.label,icon:o.icon,activeTab:r,setActiveTab:i,pathname:o.pathname},o.id))}),m.jsxs(iT,{children:[m.jsx(XA,{}),m.jsxs(ur,{children:[m.jsx(Oe,{path:"/rewards",element:m.jsx(sr,{element:m.jsx(rT,{})})}),m.jsx(Oe,{path:"/vouchers",element:m.jsx(sr,{element:m.jsx(tT,{})})})]})]})]})}function oT(){const{state:e}=Yt(),t=Mt(),{session:n}=vt();return k.useEffect(()=>{n&&!n.contact&&(n.input_data.primary_identification_method===Xs.EMAIL&&n.input_data.enable_email_identification&&!e?t("email",{state:{redirectRoute:`${dt.PORTAL}`}}):t("identifier"))},[]),n&&m.jsx(sT,{})}function aT(){return m.jsx(an,{children:m.jsx(Qa,{state:{redirectRoute:`${dt.PORTAL}`}})})}function v0({onSubmit:e,children:t}){const n=r=>{r.preventDefault(),e&&e(r)};return m.jsx("form",{onSubmit:n,children:t})}function os(){const{state:e}=Yt(),{t}=et(),n=Mt(),r=Hi(),{onContactLink:i}=It(),{session:s,mutate:o}=vt(),{publish:c}=$a(),[u,d]=k.useState(""),[f,h]=k.useState(!1),[l,b]=k.useState(!1),a=()=>{h(!0),Va(s.uuid,u,void 0,i).then(()=>o().then(()=>e&&e.redirectRoute&&n(e.redirectRoute,{state:e}))).catch(y=>{y.response.data.code===Da.CONTACT_NOT_FOUND&&b(!0)}).finally(()=>h(!1))},p=()=>{h(!0),r.post(`${s.uuid}/contacts`,{email:u}).then(()=>{Va(s.uuid,u,void 0,i).then(()=>{o().then(()=>{ze.success(t("contactForEmailCreated",{email:u})),e&&e.redirectRoute&&n(e.redirectRoute,{state:e})})})}).finally(()=>h(!1))};return k.useEffect(()=>{c("openKeyboard",{inputId:"via-email-address-input",inputValue:""})},[]),m.jsxs(m.Fragment,{children:[m.jsx(an,{children:m.jsxs(Pt,{id:xr,children:[m.jsx(jt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:t("fillInXBelow",{x:t("emailAddress").toLowerCase()})})})}),m.jsx(Tt,{children:m.jsx(v0,{onSubmit:()=>{u&&!f&&a()},children:m.jsx(Zi,{id:"via-email-address-input",label:t("emailAddress"),autoFocus:!0,onChange:y=>d(y.target.value),beforeIcon:"mail"})})}),m.jsx(tn,{children:m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsx(ct,{label:t("continue"),className:"w-full",onClick:a,disabled:!u||f}),m.jsx(ct,{label:t("useIdentifier"),variant:"secondary",onClick:()=>n("../",{state:e})})]})})]})}),m.jsx(xi,{title:`${t("new")} ${t("emailAddress").toLowerCase()}`,isOpen:l,onClose:()=>b(!1),primaryAction:{label:t("confirm"),action:p},secondaryAction:{label:t("cancel"),action:()=>b(!1)},children:m.jsx("p",{children:t("continueWithEmail",{email:u})})})]})}function ir(){const{state:e}=Yt(),{t}=et(),{session:n,mutate:r}=vt(),i=Mt(),s=It(),[o,c]=k.useState(!1),[u,d]=k.useState([]),[f,h]=k.useState({}),[l,b]=k.useState(!1);k.useEffect(()=>{u.length||Tl.get().then(y=>{const g=y.data.data.filter(w=>w.strategy!==Wr.FUNCTIONAL);d(g);const v=g.reduce((w,E)=>({...w,[E.name]:E.strategy===Wr.OPT_OUT}),{});h(v)})},[]);const a=y=>{Object.hasOwn(f,y)?h({...f,[y]:!f[y]}):h({...f,[y]:!0})},p=async()=>{c(!0),await Zs.create(e.email),await Tl.update({values:f}),e.contactIdentifier&&await Zs.linkIdentifier(e.contactIdentifier,e.email),await Va(n.uuid,e.email,e.contactIdentifier,s.onContactLink),await r(),ze.success(t("contactForEmailCreated",{email:e.email})),ze.success(t("contactIdentifierLinkedToEmail",{value:e.contactIdentifier,email:e.email})),e&&e.redirectRoute&&i(e.redirectRoute,{state:e}),c(!1)};return!e||!e.email&&!e.contactIdentifier?m.jsx(Gs,{to:"../../"}):m.jsx(an,{children:m.jsxs(Pt,{children:[m.jsx(jt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:t("termsAndConditions")})})}),m.jsx(Tt,{children:m.jsxs("div",{className:"flex flex-col gap-4 text-sm",children:[m.jsxs("div",{children:[m.jsx("p",{children:t("marketingSubscriptions")}),m.jsx("p",{className:"text-core-gray-500",children:t("chooseCommunicationPreferences")})]}),u.map(y=>m.jsxs("div",{className:"flex gap-2",children:[m.jsx(wc,{defaultChecked:y.strategy===Wr.OPT_OUT,onChange:()=>a(y.name)}),m.jsx("p",{children:y.name})]},y.id)),m.jsxs("div",{className:"flex gap-2",children:[m.jsx(qa,{required:!0,onChange:y=>b(y)}),m.jsx("div",{className:"[&_a]:text-core-primary-500",dangerouslySetInnerHTML:{__html:t("iAgreeWithTheTerms",{terms:"https://www.piggy.nl/algemene-voorwaarden",privacy:"https://www.piggy.nl/privacy-policy"})}})]})]})}),m.jsx(tn,{children:m.jsx(ct,{label:t("create"),className:"w-full",onClick:p,disabled:!l||o})})]})})}function Po(){const e=Hi(),{errorToast:t}=co(),{t:n}=et(),{state:r}=Yt(),{session:i,mutate:s}=vt(),o=Mt(),{publish:c}=$a(),u=It(),[d,f]=k.useState(!1),[h,l]=k.useState(""),[b,a]=k.useState(!1);if(!r||!r.contactIdentifier)return m.jsx(Gs,{to:"../"});const p=()=>{f(!0),e.post(`${u.sessionUuid}/contacts`,{email:h}).then(y).catch(t)},y=()=>{f(!0),e.post(`${u.sessionUuid}/contacts/link-identifier`,{contact_identifier_value:r.contactIdentifier,email:h}).then(()=>{Va(i.uuid,h,r.contactIdentifier,u.onContactLink).then(()=>{s().then(()=>{r&&r.redirectRoute&&o(r.redirectRoute,{state:r})})})}).catch(g=>{g.response.data.code===Da.CONTACT_NOT_FOUND?a(!0):t(g)}).finally(()=>f(!1))};return k.useEffect(()=>{c("openKeyboard",{inputId:"new-contact-identifier-input",inputValue:""})},[]),m.jsxs(an,{children:[m.jsxs(Pt,{id:xr,children:[m.jsx(jt,{children:m.jsx("div",{className:"flex h-16 items-center",children:n("linkContact")})}),m.jsx(Tt,{children:m.jsxs("div",{className:"flex flex-col gap-3",children:[m.jsx(h2,{body:n("noEmailAddressLinkedToIdentifier")}),m.jsx(v0,{onSubmit:y,children:m.jsx(Zi,{id:"new-contact-identifier-input",label:n("emailAddress"),autoFocus:!0,onChange:g=>l(g.target.value),beforeIcon:"mail"})})]})}),m.jsx(tn,{children:m.jsx(ct,{label:n("continue"),className:"w-full",onClick:y,disabled:!h||d})})]}),m.jsx(xi,{title:`${n("new")} ${n("emailAddress").toLowerCase()}`,isOpen:b,onClose:()=>a(!1),primaryAction:{label:n("confirm"),action:p},secondaryAction:{label:n("cancel"),action:()=>a(!1)},children:m.jsx("p",{children:n("continueWithEmail",{email:h})})})]})}function cT(){const e=Mt(),{t}=et(),{session:n,mutate:r}=vt(),{onContactLink:i}=It(),[s,o]=k.useState(""),[c,u]=k.useState(!1),[d,f]=k.useState(!1),[h,l]=k.useState(!1),[b,a]=k.useState(),p=async g=>{if(i){const{data:{data:v}}=await Zs.get(g);v&&i(v)}},y=k.useCallback(async()=>{if(n){f(!0);const{data:g}=await Al.checkCode(s);if(a(g),g.voucher){g.voucher.contact||n.contact?e(`${dt.VOUCHER}/redeem`,{state:{voucher:g.voucher}}):l(!0);return}if(g.giftcard)return e(`${dt.GIFTCARD}`,{state:{giftcard:g.giftcard}});if(g.identifier){const{data:v}=await Al.setContact(n.uuid,{contact_identifier_value:s});return await p(v.data.contact.uuid),await r(),e(dt.PORTAL)}ze.error(t("unknownCode",{code:s}))}},[s,e,n]);return k.useEffect(()=>{s&&!d&&!c&&y().then()},[s]),m.jsxs(an,{children:[m.jsxs(Pt,{id:xr,children:[m.jsx(jt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:t("scanOrEnterX",{x:"code"})})})}),m.jsx(Tt,{children:m.jsx("form",{onSubmit:g=>{g.preventDefault(),s&&y()},children:m.jsx(fo,{dataSetter:o,setDefer:u,label:t("code")})})}),m.jsx(tn,{children:m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsx(ct,{label:t("continue"),onClick:y,disabled:!s}),n.input_data.enable_email_identification&&m.jsx(ct,{label:t("useEmail"),variant:"secondary",onClick:()=>e("../email",{state:{redirectRoute:`${dt.PORTAL}`}})})]})})]}),m.jsx(xi,{title:t("noContactLinkedToVoucherTitle"),isOpen:h,onClose:()=>l(!1),primaryAction:{label:t("linkToContact"),action:()=>e(`${dt.VOUCHER}/link`,{state:{voucher:b==null?void 0:b.voucher}})},secondaryAction:{label:t("cancel"),action:()=>l(!1)},children:m.jsx("p",{children:t("linkVoucherWithCodeToContact",{code:s})})})]})}function uT(){return m.jsxs(ur,{children:[m.jsx(Oe,{path:"/*",element:m.jsx(cT,{})}),m.jsx(Oe,{path:"/email",element:m.jsx(os,{})}),m.jsx(Oe,{path:"/email/new-contact",element:m.jsx(ir,{})})]})}function lT(){const e=Mt(),{state:t}=Yt(),{t:n}=et(),{session:r}=vt(),[i,s]=k.useState(""),[o,c]=k.useState(!1),[u,d]=k.useState(!1),[f,h]=k.useState(r.type),l=k.useCallback(async()=>{c(!0);try{const{data:{data:a}}=await Cl.get(i);e(`${f===lt.REDEEM_GIFTCARD?"redeem":"top-up"}/${a.hash}`)}catch{c(!1),s("")}},[i,e,r]);k.useEffect(()=>{i&&!o&&!u&&l().then()},[i]);const b=a=>{t&&t.giftcard?e(`${a===lt.REDEEM_GIFTCARD?"redeem":"top-up"}/${t.giftcard.hash}`):h(a)};return(r==null?void 0:r.type)===lt.REDEEM_GIFTCARD&&!(r!=null&&r.input_data.amount_in_cents)?m.jsx(m.Fragment,{children:n("xIsRequired",{x:"Amount in cents"})}):m.jsx(an,{children:f===lt.GIFTCARD||f===lt.GENERIC?m.jsxs(Pt,{id:xr,children:[m.jsx(jt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:n("Choose type")})})}),m.jsx(Tt,{children:m.jsxs("div",{className:"flex gap-2",children:[m.jsx(ct,{className:"grow",label:"Redeem",onClick:()=>b(lt.REDEEM_GIFTCARD)}),m.jsx(ct,{className:"grow",label:"Top up",onClick:()=>b(lt.TOP_UP_GIFTCARD)})]})})]}):m.jsxs(Pt,{id:xr,children:[m.jsx(jt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:n("scanGiftcard")})})}),m.jsx(Tt,{children:m.jsx(fo,{dataSetter:s,setDefer:d,label:n("hash")})}),m.jsx(tn,{children:m.jsx(ct,{label:n("submit"),className:"w-full",onClick:l,disabled:!i||o})})]})})}function b0(e){const{sessionUuid:t}=It(),{data:n,error:r,isLoading:i,isValidating:s,mutate:o}=$n({url:`${t}/giftcards/${e}`});return{giftcard:n==null?void 0:n.data.data,data:n,error:r,isLoading:i,isValidating:s,mutate:o}}function dT(){const{t:e}=et(),{hash:t}=vh(),{giftcard:n,isLoading:r,mutate:i}=b0(t),{session:s,mutate:o}=vt(),{onUseGiftcard:c}=It(),u=Mt(),d=(s==null?void 0:s.input_data.amount_in_cents)??0,[f]=k.useState(s.results.remaining_amount?+s.results.remaining_amount:+d),h=(s==null?void 0:s.input_data.allow_multiple_giftcards)??!0;if(r)return m.jsx("div",{className:"flex h-screen w-screen items-center justify-center text-core-primary-500",children:m.jsx(io,{className:"h-[48px] w-[48px]"})});if(!n)return m.jsx("div",{className:"flex h-screen w-screen items-center justify-center text-red-500",children:e("giftcardNotFound")});const l=async()=>{const g=await Cl.transaction(n.uuid,-a());await i();const v=await o(),w=v==null?void 0:v.data.data.events;ro(w),ze.success(`${e("transactionSuccessful")}!`),c&&c(g.data.data)},b=()=>s.results.remaining_amount??d,a=()=>Math.min(b(),n.amount_in_cents),p=()=>{let g=0;return s.events.filter(w=>w.type===Kr.GIFTCARD_TRANSACTION).forEach(w=>{w.data.giftcard.uuid===n.uuid&&(g+=w.data.amount_in_cents)}),g},y=()=>{if(a())return{label:e("confirmAndPay",{amount:Qi(a(),s==null?void 0:s.currency)}),onClick:l};if(h&&b())return{label:e("useAnotherGiftcard"),onClick:()=>u("../"),variant:"secondary"}};return m.jsx(an,{children:m.jsxs(Pt,{children:[m.jsx(jt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:`${e("giftcard")} ${n.hash}`})})}),m.jsx(Tt,{children:m.jsxs("div",{className:"flex h-full flex-col gap-4",children:[m.jsx("div",{className:"rounded-lg bg-core-primary-50 p-4",children:m.jsxs("div",{className:"flex justify-between",children:[m.jsx("p",{className:"font-light text-gray-500",children:e("balance")}),m.jsx(zr,{value:n.amount_in_cents,start:n.amount_in_cents-p(),currency:s.currency,asCurrency:!0})]})}),m.jsx("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-6",children:m.jsxs("div",{className:"flex flex-col items-center gap-2 p-4",children:[m.jsx("p",{className:"font-light text-gray-500",children:e("amountToPay")}),m.jsx("div",{className:"text-5xl font-bold",children:m.jsx(zr,{value:f+p(),start:f,currency:s.currency,asCurrency:!0})})]})})]})}),y()&&m.jsx(tn,{children:m.jsx(ct,{label:"",className:"w-full",...y()})})]})})}function fT(){const{t:e}=et(),{hash:t}=vh(),{giftcard:n,isLoading:r,mutate:i}=b0(t),{mutate:s}=vt(),{onUseGiftcard:o}=It();if(r)return m.jsx("div",{className:"flex h-screen w-screen items-center justify-center text-core-primary-500",children:m.jsx(io,{className:"h-[48px] w-[48px]"})});if(!n)return m.jsx("div",{className:"flex h-screen w-screen items-center justify-center text-red-500",children:e("giftcardNotFound")});const c=async u=>{const d=await Cl.transaction(n.uuid,u);await i();const f=await s(),h=f==null?void 0:f.data.data.events;ro(h),ze.success(`${e("transactionSuccessful")}! ${e("totalUpgradedAmount")}: ${Qi(d.data.data.amount_in_cents)}`),o&&o(d.data.data)};return m.jsx(an,{children:m.jsx(gm,{title:`${e("giftcard")} ${n.hash}`,balance:n.amount_in_cents,transaction:c})})}function hT(){return m.jsxs(ur,{children:[m.jsx(Oe,{path:"/",element:m.jsx(lT,{})}),m.jsx(Oe,{path:"/redeem/:hash",element:m.jsx(dT,{})}),m.jsx(Oe,{path:"/top-up/:hash",element:m.jsx(fT,{})})]})}function pT(){return m.jsxs(ur,{children:[m.jsx(Oe,{path:"/*",element:m.jsx(oT,{})}),m.jsx(Oe,{path:"/email",element:m.jsx(os,{})}),m.jsx(Oe,{path:"/email/new-contact",element:m.jsx(ir,{})}),m.jsx(Oe,{path:"/identifier",element:m.jsx(aT,{})}),m.jsx(Oe,{path:"/identifier/link-identifier",element:m.jsx(Po,{})}),m.jsx(Oe,{path:"/identifier/link-identifier/new-contact",element:m.jsx(ir,{})})]})}function mT(){const{state:e}=Yt(),t=Mt(),{session:n}=vt();return k.useEffect(()=>{n.input_data.primary_identification_method===Xs.EMAIL&&n.input_data.enable_email_identification&&!e&&t("email",{state:{redirectRoute:`${dt.POINTS_TRANSACTION}/transaction`}})},[]),m.jsx(an,{children:m.jsx(Qa,{state:{redirectRoute:`${dt.POINTS_TRANSACTION}/transaction`}})})}function gT(){const{t:e}=et(),{session:{input_data:t}}=vt(),{contact:n,isLoading:r,mutate:i}=Cr(),[s,o]=k.useState(),[c,u]=k.useState(!1),[d,f]=k.useState(""),h=async()=>{if(u(!0),t.amount_in_cents)try{const{data:{data:l}}=await gx.create({unit_value:t.amount_in_cents/100});i(),o(l)}catch(l){f(l.response.data.message)}else f(e("xIsRequired",{x:"Amount in cents"})+".");u(!1)};return k.useEffect(()=>{!c&&!s&&!d&&(async()=>await h())()},[]),r?m.jsx(m.Fragment,{}):n?m.jsx(an,{children:m.jsxs(Pt,{children:[m.jsx(jt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:n.current_display_values.firstname||n.current_display_values.lastname?`${n.current_display_values.firstname} ${n.current_display_values.lastname}`:n.current_display_values.email})})}),m.jsx(Tt,{children:m.jsxs("div",{className:"flex h-full flex-col justify-between gap-4",children:[m.jsx("div",{className:"flex h-full flex-col items-center gap-2 p-6",children:d?m.jsx("p",{className:"text-core-red-500",children:d}):m.jsx("div",{className:"flex h-full items-center justify-center gap-1 text-4xl font-bold",children:s?m.jsxs(m.Fragment,{children:["+",m.jsx(zr,{value:s.credits,start:0})]}):m.jsx("div",{className:"text-core-primary-500",children:m.jsx(io,{className:"h-[32px] w-[32px]"})})})}),m.jsx("div",{className:"rounded-lg bg-core-primary-50 p-4",children:m.jsxs("div",{className:"flex justify-between",children:[m.jsx("p",{className:"font-light text-gray-500",children:`${e("new")} ${e("balance").toLowerCase()}`}),m.jsx(zr,{value:n.credit_balance.balance??0,start:n.credit_balance.balance-(s?s.credits:0)})]})})]})})]})}):m.jsx(Gs,{to:"../"})}function yT(){return m.jsxs(ur,{children:[m.jsx(Oe,{path:"/*",element:m.jsx(mT,{})}),m.jsx(Oe,{path:"/email",element:m.jsx(os,{})}),m.jsx(Oe,{path:"/email/new-contact",element:m.jsx(ir,{})}),m.jsx(Oe,{path:"/link-identifier",element:m.jsx(Po,{})}),m.jsx(Oe,{path:"/link-identifier/new-contact",element:m.jsx(ir,{})}),m.jsx(Oe,{path:"/transaction",element:m.jsx(sr,{element:m.jsx(gT,{})})})]})}function w0(){const{state:e}=Yt(),t=Mt(),{session:n}=vt(),r={redirectRoute:n.type===lt.TOP_UP_PREPAID?`${dt.TOP_UP_PREPAID}/top-up`:`${dt.PAY_PREPAID}/pay`};return k.useEffect(()=>{n.input_data.primary_identification_method===Xs.EMAIL&&n.input_data.enable_email_identification&&!e&&t("email",{state:r})},[]),m.jsx(an,{children:m.jsx(Qa,{state:r})})}function E0(){const{sessionUuid:e}=It(),{data:t,error:n,isLoading:r,isValidating:i,mutate:s}=$n({url:`${e}/prepaid`});return{balance:t==null?void 0:t.data.data,data:t,error:n,isLoading:r,isValidating:i,mutate:s}}function vT(){const{state:e}=Yt(),{t}=et(),{balance:n,mutate:r}=E0(),{mutate:i}=vt(),{contact:s}=Cr(),o=async c=>{c&&(await Rp.transaction({amount_in_cents:c,contact_identifier_value:e.contactIdentifier??void 0}),await r(),await i(),ze.success(t("prepaidTransactionCreated")))};return!n||!s?m.jsx(m.Fragment,{}):m.jsx(an,{children:m.jsx(gm,{title:`${s.current_display_values.firstname} ${s.current_display_values.lastname}`,balance:(n==null?void 0:n.balance_in_cents)??0,transaction:o})})}function bT(){const{state:e}=Yt(),{t}=et(),{balance:n,mutate:r}=E0(),{contact:i}=Cr(),{session:{input_data:s,currency:o,events:c},mutate:u}=vt(),d=s.amount_in_cents?+s.amount_in_cents:0;if(!n||!i)return m.jsx(m.Fragment,{});const f=async()=>{d&&(await Rp.transaction({amount_in_cents:-l(),contact_identifier_value:e.contactIdentifier??void 0}),await r(),await u(),ze.success(t("prepaidTransactionCreated")))},h=()=>{let b=0;return c.filter(p=>p.type===Kr.PREPAID_TRANSACTION).forEach(p=>{b+=p.data.amount_in_cents}),b},l=()=>Math.min(d+h(),n==null?void 0:n.balance_in_cents);return m.jsx(an,{children:m.jsxs(Pt,{children:[m.jsx(jt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:`${i.current_display_values.firstname} ${i.current_display_values.lastname}`})})}),m.jsx(Tt,{children:m.jsxs("div",{className:"flex h-full flex-col gap-4",children:[m.jsx("div",{className:"rounded-lg bg-core-primary-50 p-4",children:m.jsxs("div",{className:"flex justify-between",children:[m.jsx("p",{className:"font-light text-gray-500",children:t("prepaidBalance")}),m.jsx(zr,{value:n.balance_in_cents,start:n.balance_in_cents+h(),currency:o,asCurrency:!0})]})}),m.jsx("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-6",children:m.jsxs("div",{className:"flex flex-col items-center gap-2 p-4",children:[m.jsx("p",{className:"text-sm font-light text-gray-500",children:t("amountToPay")}),m.jsx("div",{className:"text-5xl font-bold",children:m.jsx(zr,{value:l(),start:d,currency:o,asCurrency:!0})})]})})]})}),m.jsx(tn,{children:m.jsx(ct,{label:t("confirmAndPay",{amount:Qi(l(),o)}),className:"w-full",onClick:f,disabled:!d||!l()})})]})})}function wT(){return m.jsxs(ur,{children:[m.jsx(Oe,{path:"/",element:m.jsx(w0,{})}),m.jsx(Oe,{path:"/email",element:m.jsx(os,{})}),m.jsx(Oe,{path:"/email/new-contact",element:m.jsx(ir,{})}),m.jsx(Oe,{path:"/link-identifier",element:m.jsx(Po,{})}),m.jsx(Oe,{path:"/link-identifier/new-contact",element:m.jsx(ir,{})}),m.jsx(Oe,{path:"/pay",element:m.jsx(sr,{element:m.jsx(bT,{})})})]})}function ET(){return m.jsxs(ur,{children:[m.jsx(Oe,{path:"/",element:m.jsx(w0,{})}),m.jsx(Oe,{path:"/email",element:m.jsx(os,{})}),m.jsx(Oe,{path:"/email/new-contact",element:m.jsx(ir,{})}),m.jsx(Oe,{path:"/link-identifier",element:m.jsx(Po,{})}),m.jsx(Oe,{path:"/link-identifier/new-contact",element:m.jsx(ir,{})}),m.jsx(Oe,{path:"/top-up",element:m.jsx(sr,{element:m.jsx(vT,{})})})]})}function ST(){const{t:e}=et(),[t,n]=k.useState(""),[r,i]=k.useState(!1),[s,o]=k.useState(!1),[c,u]=k.useState(!1),[d,f]=k.useState(),{session:h}=vt(),l=Mt(),b=k.useCallback(async()=>{if(h){i(!0);try{const{data:{data:a}}=await Pp.get(t);f(a),a.contact||h.contact?l("redeem",{state:{voucher:a}}):u(!0)}catch{i(!1),n("")}}},[t,l,h]);return k.useEffect(()=>{t&&!r&&!s&&b().then()},[t]),m.jsxs(m.Fragment,{children:[m.jsx(an,{children:m.jsxs(Pt,{id:xr,children:[m.jsx(jt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:e("scanOrEnterX",{x:e("voucherCode").toLowerCase()})})})}),m.jsx(Tt,{children:m.jsx(fo,{dataSetter:n,setDefer:o,label:e("code")})}),m.jsx(tn,{children:m.jsx(ct,{label:e("submit"),className:"w-full",onClick:b})})]})}),m.jsx(xi,{title:e("noContactLinkedToVoucherTitle"),isOpen:c,onClose:()=>u(!1),primaryAction:{label:e("linkToContact"),action:()=>l("link",{state:{voucher:d}})},secondaryAction:{label:e("cancel"),action:()=>u(!1)},children:m.jsx("p",{children:e("linkVoucherWithCodeToContact",{code:t})})})]})}function xT(){const{state:e}=Yt(),t=Mt(),{t:n}=et(),{session:r,mutate:i}=vt(),{onRedeemVoucher:s}=It(),[o,c]=k.useState(e.voucher);if(!o)return m.jsx(m.Fragment,{});const u=k.useCallback(async()=>{if(!o.contact&&!r.contact)return t("../link",{state:e});const{data:{data:d}}=await Pp.redeemByCode(o.code);c(d),s&&s(d);const f=await i(),h=f==null?void 0:f.data.data.events;ro(h)},[r,o]);return m.jsx(an,{children:m.jsxs(Pt,{children:[m.jsx(jt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:"Voucher"})})}),m.jsx(Tt,{children:m.jsx("div",{children:m.jsx(bd,{voucher:o,setSelected:()=>{}})})}),m.jsx(tn,{children:m.jsx(ct,{label:n("redeemVoucher"),className:"w-full",onClick:u,disabled:o.status!==Yi.ACTIVE})})]})})}function _T(){const{state:{voucher:e}}=Yt();return m.jsx(an,{children:m.jsx(Qa,{state:{voucher:e,redirectRoute:`${dt.VOUCHER}/redeem`}})})}function CT(){return m.jsxs(ur,{children:[m.jsx(Oe,{path:"/",element:m.jsx(ST,{})}),m.jsx(Oe,{path:"/email",element:m.jsx(os,{})}),m.jsx(Oe,{path:"/email/new-contact",element:m.jsx(ir,{})}),m.jsx(Oe,{path:"/link",element:m.jsx(_T,{})}),m.jsx(Oe,{path:"/link/link-identifier",element:m.jsx(Po,{})}),m.jsx(Oe,{path:"/link/link-identifier/new-contact",element:m.jsx(ir,{})}),m.jsx(Oe,{path:"/redeem",element:m.jsx(xT,{})})]})}const AT="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.37482%209.55838C0.802045%2011.696%200.887351%2013.9567%201.61959%2016.045C2.35183%2018.1334%203.69695%2019.9524%205.47921%2021.2642C7.26146%2022.5761%209.39798%2023.3199%2011.6096%2023.3985C13.8212%2023.477%2016.0051%2022.8866%2017.876%2021.7045C19.7468%2020.5223%2021.2175%2018.8034%2022.0961%2016.7722C22.9746%2014.7411%2023.2201%2012.4921%2022.8004%2010.3193C22.3807%208.1464%2021.3154%206.15066%2019.7436%204.59277C18.1718%203.03489%2016.1667%201.98732%2013.9902%201.58693M7.14096%202.53681C5.21049%203.48732%203.60119%204.98315%202.51232%206.8391M10.7049%201.48193C10.452%201.51191%2010.2003%201.55066%209.95012%201.59811M18.1995%2015.656C18.757%2014.5927%2019.0317%2013.4039%2018.9971%2012.2038C18.9625%2011.0037%2018.6198%209.83263%2018.002%208.8032C17.3842%207.77377%2016.512%206.92055%2015.4692%206.32553C14.4264%205.73051%2013.2481%205.4137%2012.0476%205.40554C10.847%205.39739%209.66449%205.69816%208.61372%206.27895C7.56295%206.85974%206.67923%207.70104%206.04747%208.72198C5.41572%209.74292%205.05717%2010.9092%205.00628%2012.1087C4.9554%2013.3082%205.21389%2014.5007%205.75691%2015.5714M9.15764%2013.3648C9.00624%2012.9162%208.96314%2012.4382%209.03189%2011.9698C9.10064%2011.5014%209.27926%2011.0559%209.55317%2010.6697C9.82708%2010.2836%2010.1885%209.96774%2010.6079%209.74803C11.0272%209.52832%2011.4926%209.41098%2011.966%209.4056C12.4394%209.40023%2012.9074%209.50697%2013.3316%209.71709C13.7559%209.92722%2014.1244%2010.2348%2014.407%2010.6146C14.6896%2010.9944%2014.8783%2011.4358%2014.9576%2011.9025C15.037%2012.3692%2015.0048%2012.8481%2014.8636%2013.3M14.0993%2010.2622C14.0043%2010.1691%2013.9032%2010.0825%2013.7967%2010.0028M8.2478%2018.3147C9.32147%2018.9965%2010.5606%2019.3728%2011.832%2019.4033C13.1035%2019.4339%2014.3592%2019.1174%2015.4644%2018.488'%20stroke='%233430FF'%20stroke-width='2'%20stroke-linecap='round'/%3e%3c/svg%3e";function TT(){const e=Mt(),{t}=et(),n=It();return k.useEffect(()=>{n.sessionUuid&&e(`/${n.sessionUuid}`)},[n.sessionUuid,e]),m.jsxs("div",{className:"relative flex w-full flex-col items-center justify-center gap-12 text-center",children:[m.jsxs("div",{className:"flex items-center justify-center gap-3",children:[m.jsx("img",{alt:"logo",src:AT,className:"z-10 h-16 w-16 hover:animate-spin"}),m.jsxs("p",{className:"z-10 text-7xl font-semibold tracking-wide text-gray-600",children:["Welcome to ",m.jsx("span",{className:"italic",children:"PortalSessions"})]})]}),n.sessionUuid?m.jsx(ct,{style:{padding:"1.5rem 2rem"},label:t("continue"),onClick:()=>e(`/${n.sessionUuid}`)}):m.jsx("p",{className:"text-error-600",children:`${t("somethingWentWrong")} ${t("portalSessionNotFound")}.`})]})}function S0({message:e=""}){return m.jsxs("div",{className:"flex h-screen w-full items-center justify-center gap-4 text-core-gray-500",children:[m.jsx(io,{className:"h-[48px] w-[48px]"}),e&&m.jsx("p",{className:"text-xl",children:e})]})}const IT={[lt.GENERIC]:dt.GENERIC,[lt.PORTAL]:dt.PORTAL,[lt.POINTS_TRANSACTION]:dt.POINTS_TRANSACTION,[lt.PAY_PREPAID]:dt.PAY_PREPAID,[lt.TOP_UP_PREPAID]:dt.TOP_UP_PREPAID,[lt.VOUCHER]:dt.VOUCHER,[lt.GIFTCARD]:dt.GIFTCARD,[lt.REDEEM_GIFTCARD]:dt.GIFTCARD,[lt.TOP_UP_GIFTCARD]:dt.GIFTCARD};function kT(){const e=Mt(),{t}=et(),{sessionUuid:n}=It(),{session:r,isLoading:i,mutate:s}=vt();return k.useEffect(()=>{!i&&r&&e(IT[r.type])},[i,s,e,r]),i?m.jsx(S0,{}):m.jsx("div",{className:"text-error-600 flex w-full items-center justify-center",children:`${t("portalSessionNotFound")} (${n})`})}function x0(){return m.jsxs(ur,{children:[m.jsx(Oe,{path:"/",element:m.jsx(TT,{})}),m.jsx(Oe,{path:":portalSessionUuid",element:m.jsx(kT,{})}),m.jsx(Oe,{path:`${dt.GENERIC}/*`,element:m.jsx(Ti,{type:lt.GENERIC,element:m.jsx(uT,{})})}),m.jsx(Oe,{path:`${dt.GIFTCARD}/*`,element:m.jsx(Ti,{type:[lt.GIFTCARD,lt.REDEEM_GIFTCARD,lt.TOP_UP_GIFTCARD],element:m.jsx(hT,{})})}),m.jsx(Oe,{path:`${dt.PORTAL}/*`,element:m.jsx(Ti,{type:lt.PORTAL,element:m.jsx(pT,{})})}),m.jsx(Oe,{path:`${dt.PAY_PREPAID}/*`,element:m.jsx(Ti,{type:lt.PAY_PREPAID,element:m.jsx(wT,{})})}),m.jsx(Oe,{path:`${dt.POINTS_TRANSACTION}/*`,element:m.jsx(Ti,{type:lt.POINTS_TRANSACTION,element:m.jsx(yT,{})})}),m.jsx(Oe,{path:`${dt.TOP_UP_PREPAID}/*`,element:m.jsx(Ti,{type:lt.TOP_UP_PREPAID,element:m.jsx(ET,{})})}),m.jsx(Oe,{path:`${dt.VOUCHER}/*`,element:m.jsx(Ti,{type:lt.VOUCHER,element:m.jsx(CT,{})})})]})}function sr({element:e}){const{session:t}=vt();return t.contact?e:m.jsx(Gs,{to:"/"})}function Ti({type:e,element:t}){const{session:n}=vt();return n?(Array.isArray(e)?[...e,lt.GENERIC].includes(n.type):n.type===e||n.type===lt.GENERIC)?t:m.jsx(Gs,{to:"/"}):void 0}const _0=Object.prototype.toString;function Sc(e){switch(_0.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Tr(e,Error)}}function as(e,t){return _0.call(e)===`[object ${t}]`}function C0(e){return as(e,"ErrorEvent")}function A0(e){return as(e,"DOMError")}function OT(e){return as(e,"DOMException")}function Ar(e){return as(e,"String")}function Ed(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Sd(e){return e===null||Ed(e)||typeof e!="object"&&typeof e!="function"}function cs(e){return as(e,"Object")}function xc(e){return typeof Event<"u"&&Tr(e,Event)}function RT(e){return typeof Element<"u"&&Tr(e,Element)}function NT(e){return as(e,"RegExp")}function _c(e){return!!(e&&e.then&&typeof e.then=="function")}function MT(e){return cs(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Tr(e,t){try{return e instanceof t}catch{return!1}}function T0(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function us(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function I0(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const i=e[r];try{T0(i)?n.push("[VueViewModel]"):n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function DT(e,t,n=!1){return Ar(e)?NT(t)?t.test(e):Ar(t)?n?e===t:e.includes(t):!1:!1}function ii(e,t=[],n=!1){return t.some(r=>DT(e,r,n))}function PT(e,t,n=250,r,i,s,o){if(!s.exception||!s.exception.values||!o||!Tr(o.originalException,Error))return;const c=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;c&&(s.exception.values=jT(xd(e,t,i,o.originalException,r,s.exception.values,c,0),n))}function xd(e,t,n,r,i,s,o,c){if(s.length>=n+1)return s;let u=[...s];if(Tr(r[i],Error)){k0(o,c);const d=e(t,r[i]),f=u.length;O0(d,i,f,c),u=xd(e,t,n,r[i],i,[d,...u],d,f)}return Array.isArray(r.errors)&&r.errors.forEach((d,f)=>{if(Tr(d,Error)){k0(o,c);const h=e(t,d),l=u.length;O0(h,`errors[${f}]`,l,c),u=xd(e,t,n,d,i,[h,...u],h,l)}}),u}function k0(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function O0(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function jT(e,t){return e.map(n=>(n.value&&(n.value=us(n.value,t)),n))}function R0(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const Ii="8.34.0",nt=globalThis;function Cc(e,t,n){const r=n||nt,i=r.__SENTRY__=r.__SENTRY__||{},s=i[Ii]=i[Ii]||{};return s[e]||(s[e]=t())}const ls=nt,LT=80;function Ir(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,i=[];let s=0,o=0;const c=" > ",u=c.length;let d;const f=Array.isArray(t)?t:t.keyAttrs,h=!Array.isArray(t)&&t.maxStringLength||LT;for(;n&&s++<r&&(d=BT(n,f),!(d==="html"||s>1&&o+i.length*u+d.length>=h));)i.push(d),o+=d.length,n=n.parentNode;return i.reverse().join(c)}catch{return"<unknown>"}}function BT(e,t){const n=e,r=[];if(!n||!n.tagName)return"";if(ls.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&&t.length?t.filter(o=>n.getAttribute(o)).map(o=>[o,n.getAttribute(o)]):null;if(i&&i.length)i.forEach(o=>{r.push(`[${o[0]}="${o[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const o=n.className;if(o&&Ar(o)){const c=o.split(/\s+/);for(const u of c)r.push(`.${u}`)}}const s=["aria-label","type","name","title","alt"];for(const o of s){const c=n.getAttribute(o);c&&r.push(`[${o}="${c}"]`)}return r.join("")}function N0(){try{return ls.document.location.href}catch{return""}}function FT(e){return ls.document&&ls.document.querySelector?ls.document.querySelector(e):null}function M0(e){if(!ls.HTMLElement)return null;let t=e;const n=5;for(let r=0;r<n;r++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}const ds=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,UT="Sentry Logger ",_d=["debug","info","warn","error","log","assert","trace"],Ac={};function fs(e){if(!("console"in nt))return e();const t=nt.console,n={},r=Object.keys(Ac);r.forEach(i=>{const s=Ac[i];n[i]=t[i],t[i]=s});try{return e()}finally{r.forEach(i=>{t[i]=n[i]})}}function VT(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return ds?_d.forEach(n=>{t[n]=(...r)=>{e&&fs(()=>{nt.console[n](`${UT}[${n}]:`,...r)})}}):_d.forEach(n=>{t[n]=()=>{}}),t}const Se=Cc("logger",VT),qT=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function $T(e){return e==="http"||e==="https"}function hs(e,t=!1){const{host:n,path:r,pass:i,port:s,projectId:o,protocol:c,publicKey:u}=e;return`${c}://${u}${t&&i?`:${i}`:""}@${n}${s?`:${s}`:""}/${r&&`${r}/`}${o}`}function GT(e){const t=qT.exec(e);if(!t){fs(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,i="",s="",o="",c=""]=t.slice(1);let u="",d=c;const f=d.split("/");if(f.length>1&&(u=f.slice(0,-1).join("/"),d=f.pop()),d){const h=d.match(/^\d+/);h&&(d=h[0])}return D0({host:s,pass:i,path:u,projectId:d,port:o,protocol:n,publicKey:r})}function D0(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function HT(e){if(!ds)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(o=>e[o]?!1:(Se.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?$T(r)?t&&isNaN(parseInt(t,10))?(Se.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(Se.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(Se.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function P0(e){const t=typeof e=="string"?GT(e):D0(e);if(!(!t||!HT(t)))return t}class mr extends Error{constructor(t,n="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}function kn(e,t,n){if(!(t in e))return;const r=e[t],i=n(r);typeof i=="function"&&j0(i,r),e[t]=i}function Yn(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{ds&&Se.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function j0(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,Yn(e,"__sentry_original__",t)}catch{}}function Cd(e){return e.__sentry_original__}function YT(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function L0(e){if(Sc(e))return{message:e.message,name:e.name,stack:e.stack,...F0(e)};if(xc(e)){const t={type:e.type,target:B0(e.target),currentTarget:B0(e.currentTarget),...F0(e)};return typeof CustomEvent<"u"&&Tr(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function B0(e){try{return RT(e)?Ir(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function F0(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function WT(e,t=40){const n=Object.keys(L0(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return us(r,t);for(let i=n.length;i>0;i--){const s=n.slice(0,i).join(", ");if(!(s.length>t))return i===n.length?s:us(s,t)}return""}function zt(e){return Ad(e,new Map)}function Ad(e,t){if(KT(e)){const n=t.get(e);if(n!==void 0)return n;const r={};t.set(e,r);for(const i of Object.getOwnPropertyNames(e))typeof e[i]<"u"&&(r[i]=Ad(e[i],t));return r}if(Array.isArray(e)){const n=t.get(e);if(n!==void 0)return n;const r=[];return t.set(e,r),e.forEach(i=>{r.push(Ad(i,t))}),r}return e}function KT(e){if(!cs(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const U0=50,ki="?",V0=/\(error: (.*)\)/,q0=/captureMessage|captureException/;function $0(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,i=0)=>{const s=[],o=n.split(`
104
+ `);for(let c=r;c<o.length;c++){const u=o[c];if(u.length>1024)continue;const d=V0.test(u)?u.replace(V0,"$1"):u;if(!d.match(/\S*Error: /)){for(const f of t){const h=f(d);if(h){s.push(h);break}}if(s.length>=U0+i)break}}return QT(s.slice(i))}}function zT(e){return Array.isArray(e)?$0(...e):e}function QT(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(Tc(t).function||"")&&t.pop(),t.reverse(),q0.test(Tc(t).function||"")&&(t.pop(),q0.test(Tc(t).function||"")&&t.pop()),t.slice(0,U0).map(n=>({...n,filename:n.filename||Tc(t).filename,function:n.function||ki}))}function Tc(e){return e[e.length-1]||{}}const Td="<anonymous>";function kr(e){try{return!e||typeof e!="function"?Td:e.name||Td}catch{return Td}}function G0(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}}}const Ic={},H0={};function si(e,t){Ic[e]=Ic[e]||[],Ic[e].push(t)}function oi(e,t){H0[e]||(t(),H0[e]=!0)}function Wn(e,t){const n=e&&Ic[e];if(n)for(const r of n)try{r(t)}catch(i){ds&&Se.error(`Error while triggering instrumentation handler.
105
105
  Type: ${e}
106
- Name: ${Or(r)}
107
- Error:`,i)}}function GT(e){const t="console";oi(t,e),ai(t,HT)}function HT(){"console"in nt&&Sd.forEach(function(e){e in nt.console&&kn(nt.console,e,function(t){return Cc[e]=t,function(...n){Yn("console",{args:n,level:e});const i=Cc[e];i&&i.apply(nt.console,n)}})})}const Ad=nt;function $0(){if(!("fetch"in Ad))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Td(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function YT(){if(typeof EdgeRuntime=="string")return!0;if(!$0())return!1;if(Td(Ad.fetch))return!0;let e=!1;const t=Ad.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=Td(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){fs&&Se.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}const G0=1e3;function jo(){return Date.now()/G0}function WT(){const{performance:e}=nt;if(!e||!e.now)return jo;const t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/G0}const bn=WT(),wn=(()=>{const{performance:e}=nt;if(!e||!e.now)return;const t=3600*1e3,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,s=i<t,o=e.timing&&e.timing.navigationStart,u=typeof o=="number"?Math.abs(o+n-r):t,d=u<t;return s||d?i<=u?e.timeOrigin:o:r})();function H0(e,t){const n="fetch";oi(n,e),ai(n,()=>Y0(void 0,t))}function KT(e){const t="fetch-body-resolved";oi(t,e),ai(t,()=>Y0(QT))}function Y0(e,t=!1){t&&!YT()||kn(nt,"fetch",function(n){return function(...r){const{method:i,url:s}=JT(r),o={args:r,fetchData:{method:i,url:s},startTimestamp:bn()*1e3};e||Yn("fetch",{...o});const c=new Error().stack;return n.apply(nt,r).then(async u=>(e?e(u):Yn("fetch",{...o,endTimestamp:bn()*1e3,response:u}),u),u=>{throw Yn("fetch",{...o,endTimestamp:bn()*1e3,error:u}),Ec(u)&&u.stack===void 0&&(u.stack=c,Hn(u,"framesToPop",1)),u})}})}async function zT(e,t){if(e&&e.body){const n=e.body,r=n.getReader(),i=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let s=!0;for(;s;){let o;try{o=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:c}=await r.read();clearTimeout(o),c&&(t(),s=!1)}catch{s=!1}finally{clearTimeout(o)}}clearTimeout(i),r.releaseLock(),n.cancel().then(null,()=>{})}}function QT(e){let t;try{t=e.clone()}catch{return}zT(t,()=>{Yn("fetch-body-resolved",{endTimestamp:bn()*1e3,response:e})})}function Id(e,t){return!!e&&typeof e=="object"&&!!e[t]}function W0(e){return typeof e=="string"?e:e?Id(e,"url")?e.url:e.toString?e.toString():"":""}function JT(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:W0(n),method:Id(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:W0(t),method:Id(t,"method")?String(t.method).toUpperCase():"GET"}}let Ic=null;function K0(e){const t="error";oi(t,e),ai(t,ZT)}function ZT(){Ic=nt.onerror,nt.onerror=function(e,t,n,r,i){return Yn("error",{column:r,error:i,line:n,msg:e,url:t}),Ic&&!Ic.__SENTRY_LOADER__?Ic.apply(this,arguments):!1},nt.onerror.__SENTRY_INSTRUMENTED__=!0}let kc=null;function z0(e){const t="unhandledrejection";oi(t,e),ai(t,XT)}function XT(){kc=nt.onunhandledrejection,nt.onunhandledrejection=function(e){return Yn("unhandledrejection",e),kc&&!kc.__SENTRY_LOADER__?kc.apply(this,arguments):!0},nt.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function eI(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function tI(){return"npm"}function nI(){return!eI()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function Q0(){return typeof window<"u"&&(!nI()||rI())}function rI(){return nt.process!==void 0&&nt.process.type==="renderer"}function iI(){const e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(i){if(e)return t.has(i)?!0:(t.add(i),!1);for(let s=0;s<t.length;s++)if(t[s]===i)return!0;return t.push(i),!1}function r(i){if(e)t.delete(i);else for(let s=0;s<t.length;s++)if(t[s]===i){t.splice(s,1);break}}return[n,r]}function Ct(){const e=nt,t=e.crypto||e.msCrypto;let n=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const r=new Uint8Array(1);return t.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function J0(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function ci(e){const{message:t,event_id:n}=e;if(t)return t;const r=J0(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function kd(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],s=i[0]=i[0]||{};s.value||(s.value=t||""),s.type||(s.type="Error")}function Lo(e,t){const n=J0(e);if(!n)return;const r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism={...r,...i,...t},t&&"data"in t){const s={...i&&i.data,...t.data};n.mechanism.data=s}}function Z0(e){if(e&&e.__sentry_captured__)return!0;try{Hn(e,"__sentry_captured__",!0)}catch{}return!1}function X0(e){return Array.isArray(e)?e:[e]}function vr(e,t=100,n=1/0){try{return Od("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function ey(e,t=3,n=100*1024){const r=vr(e,t);return cI(r)>n?ey(e,t-1,n):r}function Od(e,t,n=1/0,r=1/0,i=iI()){const[s,o]=i;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const c=sI(e,t);if(!c.startsWith("[object "))return c;if(t.__sentry_skip_normalization__)return t;const u=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(u===0)return c.replace("object ","");if(s(t))return"[Circular ~]";const d=t;if(d&&typeof d.toJSON=="function")try{const v=d.toJSON();return Od("",v,u-1,r,i)}catch{}const f=Array.isArray(t)?[]:{};let p=0;const l=D0(t);for(const v in l){if(!Object.prototype.hasOwnProperty.call(l,v))continue;if(p>=r){f[v]="[MaxProperties ~]";break}const a=l[v];f[v]=Od(v,a,u-1,r,i),p++}return o(t),f}function sI(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(_0(t))return"[VueViewModel]";if(AT(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${Or(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=oI(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function oI(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function aI(e){return~-encodeURI(e).split(/%..|./).length}function cI(e){return aI(JSON.stringify(e))}var Rr;(function(e){e[e.PENDING=0]="PENDING";const n=1;e[e.RESOLVED=n]="RESOLVED";const r=2;e[e.REJECTED=r]="REJECTED"})(Rr||(Rr={}));function Nr(e){return new Wn(t=>{t(e)})}function Oc(e){return new Wn((t,n)=>{n(e)})}class Wn{constructor(t){Wn.prototype.__init.call(this),Wn.prototype.__init2.call(this),Wn.prototype.__init3.call(this),Wn.prototype.__init4.call(this),this._state=Rr.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new Wn((r,i)=>{this._handlers.push([!1,s=>{if(!t)r(s);else try{r(t(s))}catch(o){i(o)}},s=>{if(!n)i(s);else try{r(n(s))}catch(o){i(o)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new Wn((n,r)=>{let i,s;return this.then(o=>{s=!1,i=o,t&&t()},o=>{s=!0,i=o,t&&t()}).then(()=>{if(s){r(i);return}n(i)})})}__init(){this._resolve=t=>{this._setResult(Rr.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(Rr.REJECTED,t)}}__init3(){this._setResult=(t,n)=>{if(this._state===Rr.PENDING){if(xc(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Rr.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Rr.RESOLVED&&n[1](this._value),this._state===Rr.REJECTED&&n[2](this._value),n[0]=!0)})}}}function uI(e){const t=[];function n(){return e===void 0||t.length<e}function r(o){return t.splice(t.indexOf(o),1)[0]||Promise.resolve(void 0)}function i(o){if(!n())return Oc(new yr("Not adding Promise because buffer limit was reached."));const c=o();return t.indexOf(c)===-1&&t.push(c),c.then(()=>r(c)).then(null,()=>r(c).then(null,()=>{})),c}function s(o){return new Wn((c,u)=>{let d=t.length;if(!d)return c(!0);const f=setTimeout(()=>{o&&o>0&&c(!1)},o);t.forEach(p=>{Nr(p).then(()=>{--d||(clearTimeout(f),c(!0))},u)})})}return{$:t,add:i,drain:s}}function Ni(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}}const lI=["fatal","error","warning","log","info","debug"];function ty(e){return e==="warn"?"warning":lI.includes(e)?e:"log"}const Rd="baggage",ny="sentry-",dI=/^sentry-/,fI=8192;function ry(e){const t=hI(e);if(!t)return;const n=Object.entries(t).reduce((r,[i,s])=>{if(i.match(dI)){const o=i.slice(ny.length);r[o]=s}return r},{});if(Object.keys(n).length>0)return n}function iy(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,i])=>(i&&(n[`${ny}${r}`]=i),n),{});return pI(t)}function hI(e){if(!(!e||!Tr(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=sy(n);return Object.entries(r).forEach(([i,s])=>{t[i]=s}),t},{}):sy(e)}function sy(e){return e.split(",").map(t=>t.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function pI(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],i)=>{const s=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,o=i===0?s:`${t},${s}`;return o.length>fI?(fs&&Se.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):o},"")}const mI=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function gI(e){if(!e)return;const t=e.match(mI);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 yI(e,t){const n=gI(e),r=ry(t),{traceId:i,parentSpanId:s,parentSampled:o}=n||{};return n?{traceId:i||Ct(),parentSpanId:s||Ct().substring(16),spanId:Ct().substring(16),sampled:o,dsc:r||{}}:{traceId:i||Ct(),spanId:Ct().substring(16)}}function Nd(e=Ct(),t=Ct().substring(16),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function Mi(e,t=[]){return[e,t]}function vI(e,t){const[n,r]=e;return[n,[...r,t]]}function oy(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 Md(e){return nt.__SENTRY__&&nt.__SENTRY__.encodePolyfill?nt.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function bI(e){const[t,n]=e;let r=JSON.stringify(t);function i(s){typeof r=="string"?r=typeof s=="string"?r+s:[Md(r),s]:r.push(typeof s=="string"?Md(s):s)}for(const s of n){const[o,c]=s;if(i(`
106
+ Name: ${kr(r)}
107
+ Error:`,i)}}function JT(e){const t="console";si(t,e),oi(t,ZT)}function ZT(){"console"in nt&&_d.forEach(function(e){e in nt.console&&kn(nt.console,e,function(t){return Ac[e]=t,function(...n){Wn("console",{args:n,level:e});const i=Ac[e];i&&i.apply(nt.console,n)}})})}const Id=nt;function Y0(){if(!("fetch"in Id))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function kd(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function XT(){if(typeof EdgeRuntime=="string")return!0;if(!Y0())return!1;if(kd(Id.fetch))return!0;let e=!1;const t=Id.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=kd(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){ds&&Se.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}const W0=1e3;function jo(){return Date.now()/W0}function e4(){const{performance:e}=nt;if(!e||!e.now)return jo;const t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/W0}const wn=e4(),En=(()=>{const{performance:e}=nt;if(!e||!e.now)return;const t=3600*1e3,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,s=i<t,o=e.timing&&e.timing.navigationStart,u=typeof o=="number"?Math.abs(o+n-r):t,d=u<t;return s||d?i<=u?e.timeOrigin:o:r})();function K0(e,t){const n="fetch";si(n,e),oi(n,()=>z0(void 0,t))}function t4(e){const t="fetch-body-resolved";si(t,e),oi(t,()=>z0(r4))}function z0(e,t=!1){t&&!XT()||kn(nt,"fetch",function(n){return function(...r){const{method:i,url:s}=i4(r),o={args:r,fetchData:{method:i,url:s},startTimestamp:wn()*1e3};e||Wn("fetch",{...o});const c=new Error().stack;return n.apply(nt,r).then(async u=>(e?e(u):Wn("fetch",{...o,endTimestamp:wn()*1e3,response:u}),u),u=>{throw Wn("fetch",{...o,endTimestamp:wn()*1e3,error:u}),Sc(u)&&u.stack===void 0&&(u.stack=c,Yn(u,"framesToPop",1)),u})}})}async function n4(e,t){if(e&&e.body){const n=e.body,r=n.getReader(),i=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let s=!0;for(;s;){let o;try{o=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:c}=await r.read();clearTimeout(o),c&&(t(),s=!1)}catch{s=!1}finally{clearTimeout(o)}}clearTimeout(i),r.releaseLock(),n.cancel().then(null,()=>{})}}function r4(e){let t;try{t=e.clone()}catch{return}n4(t,()=>{Wn("fetch-body-resolved",{endTimestamp:wn()*1e3,response:e})})}function Od(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Q0(e){return typeof e=="string"?e:e?Od(e,"url")?e.url:e.toString?e.toString():"":""}function i4(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:Q0(n),method:Od(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:Q0(t),method:Od(t,"method")?String(t.method).toUpperCase():"GET"}}let kc=null;function J0(e){const t="error";si(t,e),oi(t,s4)}function s4(){kc=nt.onerror,nt.onerror=function(e,t,n,r,i){return Wn("error",{column:r,error:i,line:n,msg:e,url:t}),kc&&!kc.__SENTRY_LOADER__?kc.apply(this,arguments):!1},nt.onerror.__SENTRY_INSTRUMENTED__=!0}let Oc=null;function Z0(e){const t="unhandledrejection";si(t,e),oi(t,o4)}function o4(){Oc=nt.onunhandledrejection,nt.onunhandledrejection=function(e){return Wn("unhandledrejection",e),Oc&&!Oc.__SENTRY_LOADER__?Oc.apply(this,arguments):!0},nt.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function a4(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function c4(){return"npm"}function u4(){return!a4()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function X0(){return typeof window<"u"&&(!u4()||l4())}function l4(){return nt.process!==void 0&&nt.process.type==="renderer"}function d4(){const e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(i){if(e)return t.has(i)?!0:(t.add(i),!1);for(let s=0;s<t.length;s++)if(t[s]===i)return!0;return t.push(i),!1}function r(i){if(e)t.delete(i);else for(let s=0;s<t.length;s++)if(t[s]===i){t.splice(s,1);break}}return[n,r]}function Ct(){const e=nt,t=e.crypto||e.msCrypto;let n=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const r=new Uint8Array(1);return t.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function ey(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function ai(e){const{message:t,event_id:n}=e;if(t)return t;const r=ey(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Rd(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],s=i[0]=i[0]||{};s.value||(s.value=t||""),s.type||(s.type="Error")}function Lo(e,t){const n=ey(e);if(!n)return;const r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism={...r,...i,...t},t&&"data"in t){const s={...i&&i.data,...t.data};n.mechanism.data=s}}function ty(e){if(e&&e.__sentry_captured__)return!0;try{Yn(e,"__sentry_captured__",!0)}catch{}return!1}function ny(e){return Array.isArray(e)?e:[e]}function gr(e,t=100,n=1/0){try{return Nd("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function ry(e,t=3,n=100*1024){const r=gr(e,t);return m4(r)>n?ry(e,t-1,n):r}function Nd(e,t,n=1/0,r=1/0,i=d4()){const[s,o]=i;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const c=f4(e,t);if(!c.startsWith("[object "))return c;if(t.__sentry_skip_normalization__)return t;const u=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(u===0)return c.replace("object ","");if(s(t))return"[Circular ~]";const d=t;if(d&&typeof d.toJSON=="function")try{const b=d.toJSON();return Nd("",b,u-1,r,i)}catch{}const f=Array.isArray(t)?[]:{};let h=0;const l=L0(t);for(const b in l){if(!Object.prototype.hasOwnProperty.call(l,b))continue;if(h>=r){f[b]="[MaxProperties ~]";break}const a=l[b];f[b]=Nd(b,a,u-1,r,i),h++}return o(t),f}function f4(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(T0(t))return"[VueViewModel]";if(MT(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${kr(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=h4(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function h4(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function p4(e){return~-encodeURI(e).split(/%..|./).length}function m4(e){return p4(JSON.stringify(e))}var Or;(function(e){e[e.PENDING=0]="PENDING";const n=1;e[e.RESOLVED=n]="RESOLVED";const r=2;e[e.REJECTED=r]="REJECTED"})(Or||(Or={}));function Rr(e){return new Kn(t=>{t(e)})}function Rc(e){return new Kn((t,n)=>{n(e)})}class Kn{constructor(t){Kn.prototype.__init.call(this),Kn.prototype.__init2.call(this),Kn.prototype.__init3.call(this),Kn.prototype.__init4.call(this),this._state=Or.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new Kn((r,i)=>{this._handlers.push([!1,s=>{if(!t)r(s);else try{r(t(s))}catch(o){i(o)}},s=>{if(!n)i(s);else try{r(n(s))}catch(o){i(o)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new Kn((n,r)=>{let i,s;return this.then(o=>{s=!1,i=o,t&&t()},o=>{s=!0,i=o,t&&t()}).then(()=>{if(s){r(i);return}n(i)})})}__init(){this._resolve=t=>{this._setResult(Or.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(Or.REJECTED,t)}}__init3(){this._setResult=(t,n)=>{if(this._state===Or.PENDING){if(_c(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Or.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Or.RESOLVED&&n[1](this._value),this._state===Or.REJECTED&&n[2](this._value),n[0]=!0)})}}}function g4(e){const t=[];function n(){return e===void 0||t.length<e}function r(o){return t.splice(t.indexOf(o),1)[0]||Promise.resolve(void 0)}function i(o){if(!n())return Rc(new mr("Not adding Promise because buffer limit was reached."));const c=o();return t.indexOf(c)===-1&&t.push(c),c.then(()=>r(c)).then(null,()=>r(c).then(null,()=>{})),c}function s(o){return new Kn((c,u)=>{let d=t.length;if(!d)return c(!0);const f=setTimeout(()=>{o&&o>0&&c(!1)},o);t.forEach(h=>{Rr(h).then(()=>{--d||(clearTimeout(f),c(!0))},u)})})}return{$:t,add:i,drain:s}}function Oi(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}}const y4=["fatal","error","warning","log","info","debug"];function iy(e){return e==="warn"?"warning":y4.includes(e)?e:"log"}const Md="baggage",sy="sentry-",v4=/^sentry-/,b4=8192;function oy(e){const t=w4(e);if(!t)return;const n=Object.entries(t).reduce((r,[i,s])=>{if(i.match(v4)){const o=i.slice(sy.length);r[o]=s}return r},{});if(Object.keys(n).length>0)return n}function ay(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,i])=>(i&&(n[`${sy}${r}`]=i),n),{});return E4(t)}function w4(e){if(!(!e||!Ar(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=cy(n);return Object.entries(r).forEach(([i,s])=>{t[i]=s}),t},{}):cy(e)}function cy(e){return e.split(",").map(t=>t.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function E4(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],i)=>{const s=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,o=i===0?s:`${t},${s}`;return o.length>b4?(ds&&Se.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):o},"")}const S4=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function x4(e){if(!e)return;const t=e.match(S4);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 _4(e,t){const n=x4(e),r=oy(t),{traceId:i,parentSpanId:s,parentSampled:o}=n||{};return n?{traceId:i||Ct(),parentSpanId:s||Ct().substring(16),spanId:Ct().substring(16),sampled:o,dsc:r||{}}:{traceId:i||Ct(),spanId:Ct().substring(16)}}function Dd(e=Ct(),t=Ct().substring(16),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function Ri(e,t=[]){return[e,t]}function C4(e,t){const[n,r]=e;return[n,[...r,t]]}function uy(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 Pd(e){return nt.__SENTRY__&&nt.__SENTRY__.encodePolyfill?nt.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function A4(e){const[t,n]=e;let r=JSON.stringify(t);function i(s){typeof r=="string"?r=typeof s=="string"?r+s:[Pd(r),s]:r.push(typeof s=="string"?Pd(s):s)}for(const s of n){const[o,c]=s;if(i(`
108
108
  ${JSON.stringify(o)}
109
- `),typeof c=="string"||c instanceof Uint8Array)i(c);else{let u;try{u=JSON.stringify(c)}catch{u=JSON.stringify(vr(c))}i(u)}}return typeof r=="string"?r:wI(r)}function wI(e){const t=e.reduce((i,s)=>i+s.length,0),n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}function EI(e){return[{type:"span"},e]}function SI(e){const t=typeof e.data=="string"?Md(e.data):e.data;return[zt({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const xI={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function ay(e){return xI[e]}function Dd(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function cy(e,t,n,r){const i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:ps(r)},...i&&{trace:zt({...i})}}}function _I(e,t,n){const r=[{type:"client_report"},{timestamp:jo(),discarded_events:e}];return Mi(t?{dsn:t}:{},[r])}const CI=60*1e3;function AI(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?CI:r-t}function TI(e,t){return e[t]||e.all||0}function uy(e,t,n=Date.now()){return TI(e,t)>n}function ly(e,{statusCode:t,headers:n},r=Date.now()){const i={...e},s=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(s)for(const c of s.trim().split(",")){const[u,d,,,f]=c.split(":",5),p=parseInt(u,10),l=(isNaN(p)?60:p)*1e3;if(!d)i.all=r+l;else for(const v of d.split(";"))v==="metric_bucket"?(!f||f.split(";").includes("custom"))&&(i[v]=r+l):i[v]=r+l}else o?i.all=r+AI(o,r):t===429&&(i.all=r+60*1e3);return i}function II(e,t){return e??t()}function Pn(e){let t,n=e[0],r=1;for(;r<e.length;){const i=e[r],s=e[r+1];if(r+=2,(i==="optionalAccess"||i==="optionalCall")&&n==null)return;i==="access"||i==="optionalAccess"?(t=n,n=s(n)):(i==="call"||i==="optionalCall")&&(n=s((...o)=>n.call(t,...o)),t=void 0)}return n}function Rc(){return{traceId:Ct(),spanId:Ct().substring(16)}}const Nc=nt;function kI(){const e=Nc.chrome,t=e&&e.app&&e.app.runtime,n="history"in Nc&&!!Nc.history.pushState&&!!Nc.history.replaceState;return!t&&n}const $e=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function ms(){return Pd(nt),nt}function Pd(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Oi,t[Oi]=t[Oi]||{}}function OI(e){const t=bn(),n={sid:Ct(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>NI(n)};return e&&gs(n,e),n}function gs(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||bn(),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:Ct()),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 RI(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),gs(e,n)}function NI(e){return zt({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}})}const jd="_sentrySpan";function Bo(e,t){t?Hn(e,jd,t):delete e[jd]}function Mc(e){return e[jd]}const MI=100;class Ld{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=Rc()}clone(){const t=new Ld;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},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._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,Bo(t,Mc(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&&gs(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},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,i]=n instanceof ui?[n.getScopeData(),n.getRequestSession()]:us(n)?[t,t.requestSession]:[],{tags:s,extra:o,user:c,contexts:u,level:d,fingerprint:f=[],propagationContext:p}=r||{};return this._tags={...this._tags,...s},this._extra={...this._extra,...o},this._contexts={...this._contexts,...u},c&&Object.keys(c).length&&(this._user=c),d&&(this._level=d),f.length&&(this._fingerprint=f),p&&(this._propagationContext=p),i&&(this._requestSession=i),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,Bo(this,void 0),this._attachments=[],this._propagationContext=Rc(),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:MI;if(r<=0)return this;const i={timestamp:jo(),...t},s=this._breadcrumbs;return s.push(i),this._breadcrumbs=s.length>r?s.slice(-r):s,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,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:Mc(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n&&n.event_id?n.event_id:Ct();if(!this._client)return Se.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&&r.event_id?r.event_id:Ct();if(!this._client)return Se.warn("No client configured on scope - will not capture message!"),i;const s=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:s,...r,event_id:i},this),i}captureEvent(t,n){const r=n&&n.event_id?n.event_id:Ct();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(Se.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)}}const ui=Ld;function DI(){return _c("defaultCurrentScope",()=>new ui)}function PI(){return _c("defaultIsolationScope",()=>new ui)}class jI{constructor(t,n){let r;t?r=t:r=new ui;let i;n?i=n:i=new ui,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 xc(r)?r.then(i=>(this._popScope(),i),i=>{throw this._popScope(),i}):(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 ys(){const e=ms(),t=Pd(e);return t.stack=t.stack||new jI(DI(),PI())}function LI(e){return ys().withScope(e)}function BI(e,t){const n=ys();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function dy(e){return ys().withScope(()=>e(ys().getIsolationScope()))}function FI(){return{withIsolationScope:dy,withScope:LI,withSetScope:BI,withSetIsolationScope:(e,t)=>dy(t),getCurrentScope:()=>ys().getScope(),getIsolationScope:()=>ys().getIsolationScope()}}function Fo(e){const t=Pd(e);return t.acs?t.acs:FI()}function bt(){const e=ms();return Fo(e).getCurrentScope()}function jn(){const e=ms();return Fo(e).getIsolationScope()}function UI(){return _c("globalScope",()=>new ui)}function Dc(...e){const t=ms(),n=Fo(t);if(e.length===2){const[r,i]=e;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(e[0])}function Je(){return bt().getClient()}const qI="_sentryMetrics";function Bd(e){const t=e[qI];if(!t)return;const n={};for(const[,[r,i]]of t)(n[r]||(n[r]=[])).push(zt(i));return n}const br="sentry.source",fy="sentry.sample_rate",li="sentry.op",Qt="sentry.origin",Fd="sentry.idle_span_finish_reason",Pc="sentry.measurement_unit",jc="sentry.measurement_value",VI="sentry.profile_id",Ud="sentry.exclusive_time",$I=0,hy=1,tn=2;function GI(e){if(e<400&&e>=100)return{code:hy};if(e>=400&&e<500)switch(e){case 401:return{code:tn,message:"unauthenticated"};case 403:return{code:tn,message:"permission_denied"};case 404:return{code:tn,message:"not_found"};case 409:return{code:tn,message:"already_exists"};case 413:return{code:tn,message:"failed_precondition"};case 429:return{code:tn,message:"resource_exhausted"};case 499:return{code:tn,message:"cancelled"};default:return{code:tn,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:tn,message:"unimplemented"};case 503:return{code:tn,message:"unavailable"};case 504:return{code:tn,message:"deadline_exceeded"};default:return{code:tn,message:"internal_error"}}return{code:tn,message:"unknown_error"}}function py(e,t){e.setAttribute("http.response.status_code",t);const n=GI(t);n.message!=="unknown_error"&&e.setStatus(n)}const my=0,gy=1;function HI(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:s,status:o,origin:c}=ot(e);return zt({parent_span_id:s,span_id:t,trace_id:n,data:r,op:i,status:o,origin:c})}function YI(e){const{spanId:t,traceId:n}=e.spanContext(),{parent_span_id:r}=ot(e);return zt({parent_span_id:r,span_id:t,trace_id:n})}function yy(e){const{traceId:t,spanId:n}=e.spanContext(),r=Pi(e);return Nd(t,n,r)}function Di(e){return typeof e=="number"?vy(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?vy(e.getTime()):bn()}function vy(e){return e>9999999999?e/1e3:e}function ot(e){if(KI(e))return e.getSpanJSON();try{const{spanId:t,traceId:n}=e.spanContext();if(WI(e)){const{attributes:r,startTime:i,name:s,endTime:o,parentSpanId:c,status:u}=e;return zt({span_id:t,trace_id:n,data:r,description:s,parent_span_id:c,start_timestamp:Di(i),timestamp:Di(o)||void 0,status:by(u),op:r[li],origin:r[Qt],_metrics_summary:Bd(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function WI(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function KI(e){return typeof e.getSpanJSON=="function"}function Pi(e){const{traceFlags:t}=e.spanContext();return t===gy}function by(e){if(!(!e||e.code===$I))return e.code===hy?"ok":e.message||"unknown_error"}const ji="_sentryChildSpans",qd="_sentryRootSpan";function wy(e,t){const n=e[qd]||e;Hn(t,qd,n),e[ji]?e[ji].add(t):Hn(e,ji,new Set([t]))}function zI(e,t){e[ji]&&e[ji].delete(t)}function Lc(e){const t=new Set;function n(r){if(!t.has(r)&&Pi(r)){t.add(r);const i=r[ji]?Array.from(r[ji]):[];for(const s of i)n(s)}}return n(e),Array.from(t)}function an(e){return e[qd]||e}function cn(){const e=ms(),t=Fo(e);return t.getActiveSpan?t.getActiveSpan():Mc(bt())}let Ey=!1;function QI(){Ey||(Ey=!0,K0(Vd),z0(Vd))}function Vd(){const e=cn(),t=e&&an(e);if(t){const n="internal_error";$e&&Se.log(`[Tracing] Root span: ${n} -> Global error occured`),t.setStatus({code:tn,message:n})}}Vd.tag="sentry_tracingErrorCallback";const Sy="_sentryScope",xy="_sentryIsolationScope";function JI(e,t,n){e&&(Hn(e,xy,n),Hn(e,Sy,t))}function _y(e){return{scope:e[Sy],isolationScope:e[xy]}}function Mr(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=Je(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}class vs{constructor(t={}){this._traceId=t.traceId||Ct(),this._spanId=t.spanId||Ct().substring(16)}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:my}}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){}}const $d="production",Cy="_frozenDsc";function Ay(e,t){Hn(e,Cy,t)}function Bc(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i=zt({environment:n.environment||$d,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",i),i}function di(e){const t=Je();if(!t)return{};const n=Bc(ot(e).trace_id||"",t),r=an(e),i=r[Cy];if(i)return i;const s=r.spanContext().traceState,o=s&&s.get("sentry.dsc"),c=o&&ry(o);if(c)return c;const u=ot(r),d=u.data||{},f=d[fy];f!=null&&(n.sample_rate=`${f}`);const p=d[br],l=u.description;return p!=="url"&&l&&(n.transaction=l),Mr()&&(n.sampled=String(Pi(r))),t.emit("createDsc",n,r),n}function ZI(e){if(!$e)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=ot(e),{spanId:i}=e.spanContext(),s=Pi(e),o=an(e),c=o===e,u=`[Tracing] Starting ${s?"sampled":"unsampled"} ${c?"root ":""}span`,d=[`op: ${n}`,`name: ${t}`,`ID: ${i}`];if(r&&d.push(`parent ID: ${r}`),!c){const{op:f,description:p}=ot(o);d.push(`root ID: ${o.spanContext().spanId}`),f&&d.push(`root op: ${f}`),p&&d.push(`root description: ${p}`)}Se.log(`${u}
109
+ `),typeof c=="string"||c instanceof Uint8Array)i(c);else{let u;try{u=JSON.stringify(c)}catch{u=JSON.stringify(gr(c))}i(u)}}return typeof r=="string"?r:T4(r)}function T4(e){const t=e.reduce((i,s)=>i+s.length,0),n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}function I4(e){return[{type:"span"},e]}function k4(e){const t=typeof e.data=="string"?Pd(e.data):e.data;return[zt({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const O4={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function ly(e){return O4[e]}function jd(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function dy(e,t,n,r){const i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:hs(r)},...i&&{trace:zt({...i})}}}function R4(e,t,n){const r=[{type:"client_report"},{timestamp:jo(),discarded_events:e}];return Ri(t?{dsn:t}:{},[r])}const N4=60*1e3;function M4(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?N4:r-t}function D4(e,t){return e[t]||e.all||0}function fy(e,t,n=Date.now()){return D4(e,t)>n}function hy(e,{statusCode:t,headers:n},r=Date.now()){const i={...e},s=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(s)for(const c of s.trim().split(",")){const[u,d,,,f]=c.split(":",5),h=parseInt(u,10),l=(isNaN(h)?60:h)*1e3;if(!d)i.all=r+l;else for(const b of d.split(";"))b==="metric_bucket"?(!f||f.split(";").includes("custom"))&&(i[b]=r+l):i[b]=r+l}else o?i.all=r+M4(o,r):t===429&&(i.all=r+60*1e3);return i}function P4(e,t){return e??t()}function Pn(e){let t,n=e[0],r=1;for(;r<e.length;){const i=e[r],s=e[r+1];if(r+=2,(i==="optionalAccess"||i==="optionalCall")&&n==null)return;i==="access"||i==="optionalAccess"?(t=n,n=s(n)):(i==="call"||i==="optionalCall")&&(n=s((...o)=>n.call(t,...o)),t=void 0)}return n}function Nc(){return{traceId:Ct(),spanId:Ct().substring(16)}}const Mc=nt;function j4(){const e=Mc.chrome,t=e&&e.app&&e.app.runtime,n="history"in Mc&&!!Mc.history.pushState&&!!Mc.history.replaceState;return!t&&n}const qe=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function ps(){return Ld(nt),nt}function Ld(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Ii,t[Ii]=t[Ii]||{}}function L4(e){const t=wn(),n={sid:Ct(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>F4(n)};return e&&ms(n,e),n}function ms(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||wn(),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:Ct()),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 B4(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),ms(e,n)}function F4(e){return zt({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}})}const Bd="_sentrySpan";function Bo(e,t){t?Yn(e,Bd,t):delete e[Bd]}function Dc(e){return e[Bd]}const U4=100;class Fd{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=Nc()}clone(){const t=new Fd;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},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._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,Bo(t,Dc(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&&ms(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},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,i]=n instanceof ci?[n.getScopeData(),n.getRequestSession()]:cs(n)?[t,t.requestSession]:[],{tags:s,extra:o,user:c,contexts:u,level:d,fingerprint:f=[],propagationContext:h}=r||{};return this._tags={...this._tags,...s},this._extra={...this._extra,...o},this._contexts={...this._contexts,...u},c&&Object.keys(c).length&&(this._user=c),d&&(this._level=d),f.length&&(this._fingerprint=f),h&&(this._propagationContext=h),i&&(this._requestSession=i),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,Bo(this,void 0),this._attachments=[],this._propagationContext=Nc(),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:U4;if(r<=0)return this;const i={timestamp:jo(),...t},s=this._breadcrumbs;return s.push(i),this._breadcrumbs=s.length>r?s.slice(-r):s,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,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:Dc(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n&&n.event_id?n.event_id:Ct();if(!this._client)return Se.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&&r.event_id?r.event_id:Ct();if(!this._client)return Se.warn("No client configured on scope - will not capture message!"),i;const s=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:s,...r,event_id:i},this),i}captureEvent(t,n){const r=n&&n.event_id?n.event_id:Ct();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(Se.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)}}const ci=Fd;function V4(){return Cc("defaultCurrentScope",()=>new ci)}function q4(){return Cc("defaultIsolationScope",()=>new ci)}class $4{constructor(t,n){let r;t?r=t:r=new ci;let i;n?i=n:i=new ci,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 _c(r)?r.then(i=>(this._popScope(),i),i=>{throw this._popScope(),i}):(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 gs(){const e=ps(),t=Ld(e);return t.stack=t.stack||new $4(V4(),q4())}function G4(e){return gs().withScope(e)}function H4(e,t){const n=gs();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function py(e){return gs().withScope(()=>e(gs().getIsolationScope()))}function Y4(){return{withIsolationScope:py,withScope:G4,withSetScope:H4,withSetIsolationScope:(e,t)=>py(t),getCurrentScope:()=>gs().getScope(),getIsolationScope:()=>gs().getIsolationScope()}}function Fo(e){const t=Ld(e);return t.acs?t.acs:Y4()}function bt(){const e=ps();return Fo(e).getCurrentScope()}function jn(){const e=ps();return Fo(e).getIsolationScope()}function W4(){return Cc("globalScope",()=>new ci)}function Pc(...e){const t=ps(),n=Fo(t);if(e.length===2){const[r,i]=e;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(e[0])}function Je(){return bt().getClient()}const K4="_sentryMetrics";function Ud(e){const t=e[K4];if(!t)return;const n={};for(const[,[r,i]]of t)(n[r]||(n[r]=[])).push(zt(i));return n}const yr="sentry.source",my="sentry.sample_rate",ui="sentry.op",Qt="sentry.origin",Vd="sentry.idle_span_finish_reason",jc="sentry.measurement_unit",Lc="sentry.measurement_value",z4="sentry.profile_id",qd="sentry.exclusive_time",Q4=0,gy=1,nn=2;function J4(e){if(e<400&&e>=100)return{code:gy};if(e>=400&&e<500)switch(e){case 401:return{code:nn,message:"unauthenticated"};case 403:return{code:nn,message:"permission_denied"};case 404:return{code:nn,message:"not_found"};case 409:return{code:nn,message:"already_exists"};case 413:return{code:nn,message:"failed_precondition"};case 429:return{code:nn,message:"resource_exhausted"};case 499:return{code:nn,message:"cancelled"};default:return{code:nn,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:nn,message:"unimplemented"};case 503:return{code:nn,message:"unavailable"};case 504:return{code:nn,message:"deadline_exceeded"};default:return{code:nn,message:"internal_error"}}return{code:nn,message:"unknown_error"}}function yy(e,t){e.setAttribute("http.response.status_code",t);const n=J4(t);n.message!=="unknown_error"&&e.setStatus(n)}const vy=0,by=1;function Z4(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:s,status:o,origin:c}=ot(e);return zt({parent_span_id:s,span_id:t,trace_id:n,data:r,op:i,status:o,origin:c})}function X4(e){const{spanId:t,traceId:n}=e.spanContext(),{parent_span_id:r}=ot(e);return zt({parent_span_id:r,span_id:t,trace_id:n})}function wy(e){const{traceId:t,spanId:n}=e.spanContext(),r=Mi(e);return Dd(t,n,r)}function Ni(e){return typeof e=="number"?Ey(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Ey(e.getTime()):wn()}function Ey(e){return e>9999999999?e/1e3:e}function ot(e){if(tI(e))return e.getSpanJSON();try{const{spanId:t,traceId:n}=e.spanContext();if(eI(e)){const{attributes:r,startTime:i,name:s,endTime:o,parentSpanId:c,status:u}=e;return zt({span_id:t,trace_id:n,data:r,description:s,parent_span_id:c,start_timestamp:Ni(i),timestamp:Ni(o)||void 0,status:Sy(u),op:r[ui],origin:r[Qt],_metrics_summary:Ud(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function eI(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function tI(e){return typeof e.getSpanJSON=="function"}function Mi(e){const{traceFlags:t}=e.spanContext();return t===by}function Sy(e){if(!(!e||e.code===Q4))return e.code===gy?"ok":e.message||"unknown_error"}const Di="_sentryChildSpans",$d="_sentryRootSpan";function xy(e,t){const n=e[$d]||e;Yn(t,$d,n),e[Di]?e[Di].add(t):Yn(e,Di,new Set([t]))}function nI(e,t){e[Di]&&e[Di].delete(t)}function Bc(e){const t=new Set;function n(r){if(!t.has(r)&&Mi(r)){t.add(r);const i=r[Di]?Array.from(r[Di]):[];for(const s of i)n(s)}}return n(e),Array.from(t)}function cn(e){return e[$d]||e}function un(){const e=ps(),t=Fo(e);return t.getActiveSpan?t.getActiveSpan():Dc(bt())}let _y=!1;function rI(){_y||(_y=!0,J0(Gd),Z0(Gd))}function Gd(){const e=un(),t=e&&cn(e);if(t){const n="internal_error";qe&&Se.log(`[Tracing] Root span: ${n} -> Global error occured`),t.setStatus({code:nn,message:n})}}Gd.tag="sentry_tracingErrorCallback";const Cy="_sentryScope",Ay="_sentryIsolationScope";function iI(e,t,n){e&&(Yn(e,Ay,n),Yn(e,Cy,t))}function Ty(e){return{scope:e[Cy],isolationScope:e[Ay]}}function Nr(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=Je(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}class ys{constructor(t={}){this._traceId=t.traceId||Ct(),this._spanId=t.spanId||Ct().substring(16)}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:vy}}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){}}const Hd="production",Iy="_frozenDsc";function ky(e,t){Yn(e,Iy,t)}function Fc(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i=zt({environment:n.environment||Hd,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",i),i}function li(e){const t=Je();if(!t)return{};const n=Fc(ot(e).trace_id||"",t),r=cn(e),i=r[Iy];if(i)return i;const s=r.spanContext().traceState,o=s&&s.get("sentry.dsc"),c=o&&oy(o);if(c)return c;const u=ot(r),d=u.data||{},f=d[my];f!=null&&(n.sample_rate=`${f}`);const h=d[yr],l=u.description;return h!=="url"&&l&&(n.transaction=l),Nr()&&(n.sampled=String(Mi(r))),t.emit("createDsc",n,r),n}function sI(e){if(!qe)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=ot(e),{spanId:i}=e.spanContext(),s=Mi(e),o=cn(e),c=o===e,u=`[Tracing] Starting ${s?"sampled":"unsampled"} ${c?"root ":""}span`,d=[`op: ${n}`,`name: ${t}`,`ID: ${i}`];if(r&&d.push(`parent ID: ${r}`),!c){const{op:f,description:h}=ot(o);d.push(`root ID: ${o.spanContext().spanId}`),f&&d.push(`root op: ${f}`),h&&d.push(`root description: ${h}`)}Se.log(`${u}
110
110
  ${d.join(`
111
- `)}`)}function XI(e){if(!$e)return;const{description:t="< unknown name >",op:n="< unknown op >"}=ot(e),{spanId:r}=e.spanContext(),s=an(e)===e,o=`[Tracing] Finishing "${n}" ${s?"root ":""}span "${t}" with ID ${r}`;Se.log(o)}function Fc(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){$e&&Se.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`);return}return t}function e4(e,t){if(!Mr(e))return[!1];let n;typeof e.tracesSampler=="function"?n=e.tracesSampler(t):t.parentSampled!==void 0?n=t.parentSampled:typeof e.tracesSampleRate<"u"?n=e.tracesSampleRate:n=1;const r=Fc(n);return r===void 0?($e&&Se.warn("[Tracing] Discarding transaction because of invalid sample rate."),[!1]):r?Math.random()<r?[!0,r]:($e&&Se.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(n)})`),[!1,r]):($e&&Se.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,r])}function t4(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function n4(e,t,n,r){const i=Dd(n),s={sent_at:new Date().toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:ps(t)}},o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Mi(s,[o])}function r4(e,t,n,r){const i=Dd(n),s=e.type&&e.type!=="replay_event"?e.type:"event";t4(e,n&&n.sdk);const o=cy(e,i,r,t);return delete e.sdkProcessingMetadata,Mi(o,[[{type:s},e]])}function i4(e,t){function n(f){return!!f.trace_id&&!!f.public_key}const r=di(e[0]),i=t&&t.getDsn(),s=t&&t.getOptions().tunnel,o={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!s&&i&&{dsn:ps(i)}},c=t&&t.getOptions().beforeSendSpan,u=c?f=>c(ot(f)):f=>ot(f),d=[];for(const f of e){const p=u(f);p&&d.push(EI(p))}return Mi(o,d)}function s4(e,t,n,r=cn()){const i=r&&an(r);i&&i.addEvent(e,{[jc]:t,[Pc]:n})}function Ty(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},i=r[Pc],s=r[jc];typeof i=="string"&&typeof s=="number"&&(t[n.name]={value:s,unit:i})}),t}const Iy=1e3;class Gd{constructor(t={}){this._traceId=t.traceId||Ct(),this._spanId=t.spanId||Ct().substring(16),this._startTime=t.startTimestamp||bn(),this._attributes={},this.setAttributes({[Qt]:"manual",[li]: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}addLinks(t){return this}recordException(t,n){}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?gy:my}}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=Di(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this}end(t){this._endTime||(this._endTime=Di(t),XI(this),this._onSpanEnded())}getSpanJSON(){return zt({data:this._attributes,description:this._name,op:this._attributes[li],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:by(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[Qt],_metrics_summary:Bd(this),profile_id:this._attributes[VI],exclusive_time:this._attributes[Ud],measurements:Ty(this._events),is_segment:this._isStandaloneSpan&&an(this)===this||void 0,segment_id:this._isStandaloneSpan?an(this).spanContext().spanId:void 0})}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){$e&&Se.log("[Tracing] Adding an event to span:",t);const i=ky(n)?n:r||bn(),s=ky(n)?{}:n||{},o={name:t,time:Di(i),attributes:s};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=Je();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===an(this)))return;if(this._isStandaloneSpan){this._sampled?a4(i4([this],t)):($e&&Se.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}const r=this._convertSpanToTransaction();r&&(_y(this).scope||bt()).captureEvent(r)}_convertSpanToTransaction(){if(!Oy(ot(this)))return;this._name||($e&&Se.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=_y(this),i=(t||bt()).getClient()||Je();if(this._sampled!==!0){$e&&Se.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),i&&i.recordDroppedEvent("sample_rate","transaction");return}const o=Lc(this).filter(p=>p!==this&&!o4(p)).map(p=>ot(p)).filter(Oy),c=this._attributes[br],u={contexts:{trace:HI(this)},spans:o.length>Iy?o.sort((p,l)=>p.start_timestamp-l.start_timestamp).slice(0,Iy):o,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,...zt({dynamicSamplingContext:di(this)})},_metrics_summary:Bd(this),...c&&{transaction_info:{source:c}}},d=Ty(this._events);return d&&Object.keys(d).length&&($e&&Se.log("[Measurements] Adding measurements to transaction event",JSON.stringify(d,void 0,2)),u.measurements=d),u}}function ky(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function Oy(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function o4(e){return e instanceof Gd&&e.isStandaloneSpan()}function a4(e){const t=Je();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}const r=t.getTransport();r&&r.send(e).then(null,i=>{$e&&Se.error("Error while sending span:",i)})}const Ry="__SENTRY_SUPPRESS_TRACING__";function fi(e){const t=My();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=u4(e),{forceTransaction:r,parentSpan:i}=e;return(e.scope?o=>Dc(e.scope,o):i!==void 0?o=>Ny(i,o):o=>o())(()=>{const o=bt(),c=d4(o);return e.onlyIfParent&&!c?new vs:c4({parentSpan:c,spanArguments:n,forceTransaction:r,scope:o})})}function Ny(e,t){const n=My();return n.withActiveSpan?n.withActiveSpan(e,t):Dc(r=>(Bo(r,e||void 0),t(r)))}function c4({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!Mr())return new vs;const i=jn();let s;if(e&&!n)s=l4(e,r,t),wy(e,s);else if(e){const o=di(e),{traceId:c,spanId:u}=e.spanContext(),d=Pi(e);s=Dy({traceId:c,parentSpanId:u,...t},r,d),Ay(s,o)}else{const{traceId:o,dsc:c,parentSpanId:u,sampled:d}={...i.getPropagationContext(),...r.getPropagationContext()};s=Dy({traceId:o,parentSpanId:u,...t},r,d),c&&Ay(s,c)}return ZI(s),JI(s,r,i),s}function u4(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=Di(e.startTime),delete r.startTime,r}return n}function My(){const e=ms();return Fo(e)}function Dy(e,t,n){const r=Je(),i=r&&r.getOptions()||{},{name:s="",attributes:o}=e,[c,u]=t.getScopeData().sdkProcessingMetadata[Ry]?[!1]:e4(i,{name:s,parentSampled:n,attributes:o,transactionContext:{name:s,parentSampled:n}}),d=new Gd({...e,attributes:{[br]:"custom",...e.attributes},sampled:c});return u!==void 0&&d.setAttribute(fy,u),r&&r.emit("spanStart",d),d}function l4(e,t,n){const{spanId:r,traceId:i}=e.spanContext(),s=t.getScopeData().sdkProcessingMetadata[Ry]?!1:Pi(e),o=s?new Gd({...n,parentSpanId:r,traceId:i,sampled:s}):new vs({traceId:i});wy(e,o);const c=Je();return c&&(c.emit("spanStart",o),n.endTimestamp&&c.emit("spanEnd",o)),o}function d4(e){const t=Mc(e);if(!t)return;const n=Je();return(n?n.getOptions():{}).parentSpanIsAlwaysRootSpan?an(t):t}const Uc={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},f4="heartbeatFailed",h4="idleTimeout",p4="finalTimeout",m4="externalFinish";function Py(e,t={}){const n=new Map;let r=!1,i,s=m4,o=!t.disableAutoFinish;const c=[],{idleTimeout:u=Uc.idleTimeout,finalTimeout:d=Uc.finalTimeout,childSpanTimeout:f=Uc.childSpanTimeout,beforeSpanEnd:p}=t,l=Je();if(!l||!Mr())return new vs;const v=bt(),a=cn(),h=g4(e);h.end=new Proxy(h.end,{apply(A,T,O){p&&p(h);const[N,...D]=O,U=N||bn(),q=Di(U),F=Lc(h).filter(z=>z!==h);if(!F.length)return S(q),Reflect.apply(A,T,[q,...D]);const V=F.map(z=>ot(z).timestamp).filter(z=>!!z),R=V.length?Math.max(...V):void 0,L=ot(h).start_timestamp,W=Math.min(L?L+d/1e3:1/0,Math.max(L||-1/0,Math.min(q,R||1/0)));return S(W),Reflect.apply(A,T,[W,...D])}});function y(){i&&(clearTimeout(i),i=void 0)}function g(A){y(),i=setTimeout(()=>{!r&&n.size===0&&o&&(s=h4,h.end(A))},u)}function b(A){i=setTimeout(()=>{!r&&o&&(s=f4,h.end(A))},f)}function w(A){y(),n.set(A,!0);const T=bn();b(T+f/1e3)}function E(A){if(n.has(A)&&n.delete(A),n.size===0){const T=bn();g(T+u/1e3)}}function S(A){r=!0,n.clear(),c.forEach(q=>q()),Bo(v,a);const T=ot(h),{start_timestamp:O}=T;if(!O)return;(T.data||{})[Fd]||h.setAttribute(Fd,s),Se.log(`[Tracing] Idle span "${T.op}" finished`);const D=Lc(h).filter(q=>q!==h);let U=0;D.forEach(q=>{q.isRecording()&&(q.setStatus({code:tn,message:"cancelled"}),q.end(A),$e&&Se.log("[Tracing] Cancelling span since span ended early",JSON.stringify(q,void 0,2)));const F=ot(q),{timestamp:V=0,start_timestamp:R=0}=F,L=R<=A,W=(d+u)/1e3,z=V-R<=W;if($e){const Z=JSON.stringify(q,void 0,2);L?z||Se.log("[Tracing] Discarding span since it finished after idle span final timeout",Z):Se.log("[Tracing] Discarding span since it happened after idle span was finished",Z)}(!z||!L)&&(zI(h,q),U++)}),U>0&&h.setAttribute("sentry.idle_span_discarded_spans",U)}return c.push(l.on("spanStart",A=>{if(r||A===h||ot(A).timestamp)return;Lc(h).includes(A)&&w(A.spanContext().spanId)})),c.push(l.on("spanEnd",A=>{r||E(A.spanContext().spanId)})),c.push(l.on("idleSpanEnableAutoFinish",A=>{A===h&&(o=!0,g(),n.size&&b())})),t.disableAutoFinish||g(),setTimeout(()=>{r||(h.setStatus({code:tn,message:"deadline_exceeded"}),s=p4,h.end())},d),h}function g4(e){const t=fi(e);return Bo(bt(),t),$e&&Se.log("[Tracing] Started span is an idle span"),t}function Hd(e,t,n,r=0){return new Wn((i,s)=>{const o=e[r];if(t===null||typeof o!="function")i(t);else{const c=o({...t},n);$e&&o.id&&c===null&&Se.log(`Event processor "${o.id}" dropped event`),xc(c)?c.then(u=>Hd(e,u,n,r+1).then(i)).then(null,s):Hd(e,c,n,r+1).then(i).then(null,s)}})}function y4(e,t){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:s}=t;v4(e,t),r&&E4(e,r),S4(e,n),b4(e,i),w4(e,s)}function jy(e,t){const{extra:n,tags:r,user:i,contexts:s,level:o,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:d,eventProcessors:f,attachments:p,propagationContext:l,transactionName:v,span:a}=t;Uo(e,"extra",n),Uo(e,"tags",r),Uo(e,"user",i),Uo(e,"contexts",s),Uo(e,"sdkProcessingMetadata",c),o&&(e.level=o),v&&(e.transactionName=v),a&&(e.span=a),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),d.length&&(e.fingerprint=[...e.fingerprint,...d]),f.length&&(e.eventProcessors=[...e.eventProcessors,...f]),p.length&&(e.attachments=[...e.attachments,...p]),e.propagationContext={...e.propagationContext,...l}}function Uo(e,t,n){if(n&&Object.keys(n).length){e[t]={...e[t]};for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[t][r]=n[r])}}function v4(e,t){const{extra:n,tags:r,user:i,contexts:s,level:o,transactionName:c}=t,u=zt(n);u&&Object.keys(u).length&&(e.extra={...u,...e.extra});const d=zt(r);d&&Object.keys(d).length&&(e.tags={...d,...e.tags});const f=zt(i);f&&Object.keys(f).length&&(e.user={...f,...e.user});const p=zt(s);p&&Object.keys(p).length&&(e.contexts={...p,...e.contexts}),o&&(e.level=o),c&&e.type!=="transaction"&&(e.transaction=c)}function b4(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function w4(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function E4(e,t){e.contexts={trace:YI(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:di(t),...e.sdkProcessingMetadata};const n=an(t),r=ot(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function S4(e,t){e.fingerprint=e.fingerprint?X0(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function Ly(e,t,n,r,i,s){const{normalizeDepth:o=3,normalizeMaxBreadth:c=1e3}=e,u={...t,event_id:t.event_id||n.event_id||Ct(),timestamp:t.timestamp||jo()},d=n.integrations||e.integrations.map(y=>y.name);x4(u,e),A4(u,d),i&&i.emit("applyFrameMetadata",t),t.type===void 0&&_4(u,e.stackParser);const f=I4(r,n.captureContext);n.mechanism&&Lo(u,n.mechanism);const p=i?i.getEventProcessors():[],l=UI().getScopeData();if(s){const y=s.getScopeData();jy(l,y)}if(f){const y=f.getScopeData();jy(l,y)}const v=[...n.attachments||[],...l.attachments];v.length&&(n.attachments=v),y4(u,l);const a=[...p,...l.eventProcessors];return Hd(a,u,n).then(y=>(y&&C4(y),typeof o=="number"&&o>0?T4(y,o,c):y))}function x4(e,t){const{environment:n,release:r,dist:i,maxValueLength:s=250}=t;"environment"in e||(e.environment="environment"in t?n:$d),e.release===void 0&&r!==void 0&&(e.release=r),e.dist===void 0&&i!==void 0&&(e.dist=i),e.message&&(e.message=ls(e.message,s));const o=e.exception&&e.exception.values&&e.exception.values[0];o&&o.value&&(o.value=ls(o.value,s));const c=e.request;c&&c.url&&(c.url=ls(c.url,s))}const By=new WeakMap;function _4(e,t){const n=nt._sentryDebugIds;if(!n)return;let r;const i=By.get(t);i?r=i:(r=new Map,By.set(t,r));const s=Object.entries(n).reduce((o,[c,u])=>{let d;const f=r.get(c);f?d=f:(d=t(c),r.set(c,d));for(let p=d.length-1;p>=0;p--){const l=d[p];if(l.filename){o[l.filename]=u;break}}return o},{});try{e.exception.values.forEach(o=>{o.stacktrace.frames.forEach(c=>{c.filename&&(c.debug_id=s[c.filename])})})}catch{}}function C4(e){const t={};try{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)})})}catch{}if(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 A4(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function T4(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:vr(i.data,t,n)}}))},...e.user&&{user:vr(e.user,t,n)},...e.contexts&&{contexts:vr(e.contexts,t,n)},...e.extra&&{extra:vr(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=vr(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(i=>({...i,...i.data&&{data:vr(i.data,t,n)}}))),r}function I4(e,t){if(!t)return e;const n=e?e.clone():new ui;return n.update(t),n}function k4(e){if(e)return O4(e)?{captureContext:e}:N4(e)?{captureContext:e}:e}function O4(e){return e instanceof ui||typeof e=="function"}const R4=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function N4(e){return Object.keys(e).some(t=>R4.includes(t))}function Yd(e,t){return bt().captureException(e,k4(t))}function Fy(e,t){return bt().captureEvent(e,t)}function Uy(e,t){jn().setContext(e,t)}function M4(){return jn().lastEventId()}function D4(e){jn().addEventProcessor(e)}function qy(e){const t=Je(),n=jn(),r=bt(),{release:i,environment:s=$d}=t&&t.getOptions()||{},{userAgent:o}=nt.navigator||{},c=OI({release:i,environment:s,user:r.getUser()||n.getUser(),...o&&{userAgent:o},...e}),u=n.getSession();return u&&u.status==="ok"&&gs(u,{status:"exited"}),Vy(),n.setSession(c),r.setSession(c),c}function Vy(){const e=jn(),t=bt(),n=t.getSession()||e.getSession();n&&RI(n),$y(),e.setSession(),t.setSession()}function $y(){const e=jn(),t=bt(),n=Je(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function Gy(e=!1){if(e){Vy();return}$y()}const P4="7";function Hy(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function j4(e){return`${Hy(e)}${e.projectId}/envelope/`}function L4(e,t){return FT({sentry_key:e.publicKey,sentry_version:P4,...t&&{sentry_client:`${t.name}/${t.version}`}})}function B4(e,t,n){return t||`${j4(e)}?${L4(e,n)}`}function F4(e,t){const n=N0(e);if(!n)return"";const r=`${Hy(n)}embed/error-page/`;let i=`dsn=${ps(n)}`;for(const s in t)if(s!=="dsn"&&s!=="onClose")if(s==="user"){const o=t.user;if(!o)continue;o.name&&(i+=`&name=${encodeURIComponent(o.name)}`),o.email&&(i+=`&email=${encodeURIComponent(o.email)}`)}else i+=`&${encodeURIComponent(s)}=${encodeURIComponent(t[s])}`;return`${r}?${i}`}const Yy=[];function U4(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 q4(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let r;Array.isArray(n)?r=[...t,...n]:typeof n=="function"?r=X0(n(t)):r=t;const i=U4(r),s=i.findIndex(o=>o.name==="Debug");if(s>-1){const[o]=i.splice(s,1);i.push(o)}return i}function V4(e,t){const n={};return t.forEach(r=>{r&&Ky(e,r,n)}),n}function Wy(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function Ky(e,t,n){if(n[t.name]){$e&&Se.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,Yy.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),Yy.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,s)=>r(i,s,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),i=Object.assign((s,o)=>r(s,o,e),{id:t.name});e.addEventProcessor(i)}$e&&Se.log(`Integration installed: ${t.name}`)}function I9(e){return e}const zy="Not capturing exception because it's already been captured.";class $4{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=N0(t.dsn):$e&&Se.warn("No DSN provided, client will not send events."),this._dsn){const n=B4(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:n})}}captureException(t,n,r){const i=Ct();if(Z0(t))return $e&&Se.log(zy),i;const s={event_id:i,...n};return this._process(this.eventFromException(t,s).then(o=>this._captureEvent(o,s,r))),s.event_id}captureMessage(t,n,r,i){const s={event_id:Ct(),...r},o=bd(t)?t:String(t),c=wd(t)?this.eventFromMessage(o,n,s):this.eventFromException(t,s);return this._process(c.then(u=>this._captureEvent(u,s,i))),s.event_id}captureEvent(t,n,r){const i=Ct();if(n&&n.originalException&&Z0(n.originalException))return $e&&Se.log(zy),i;const s={event_id:i,...n},c=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,s,c||r)),s.event_id}captureSession(t){typeof t.release!="string"?$e&&Se.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),gs(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(i=>r&&i))):Nr(!0)}close(t){return this.flush(t).then(n=>(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];Ky(this,t,this._integrations),n||Wy(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=r4(t,this._dsn,this._options._metadata,this._options.tunnel);for(const s of n.attachments||[])r=vI(r,SI(s));const i=this.sendEnvelope(r);i&&i.then(s=>this.emit("afterSendEvent",t,s),null)}sendSession(t){const n=n4(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(n)}recordDroppedEvent(t,n,r){if(this._options.sendClientReports){const i=typeof r=="number"?r:1,s=`${t}:${n}`;$e&&Se.log(`Recording outcome: "${s}"${i>1?` (${i} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+i}}on(t,n){const r=this._hooks[t]=this._hooks[t]||[];return r.push(n),()=>{const i=r.indexOf(n);i>-1&&r.splice(i,1)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(i=>i(...n))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,n=>($e&&Se.error("Error while sending event:",n),n)):($e&&Se.error("Transport disabled"),Nr({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=V4(this,t),Wy(this,t)}_updateSessionFromEvent(t,n){let r=!1,i=!1;const s=n.exception&&n.exception.values;if(s){i=!0;for(const u of s){const d=u.mechanism;if(d&&d.handled===!1){r=!0;break}}}const o=t.status==="ok";(o&&t.errors===0||o&&r)&&(gs(t,{...r&&{status:"crashed"},errors:t.errors||Number(i||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Wn(n=>{let r=0;const i=1,s=setInterval(()=>{this._numProcessing==0?(clearInterval(s),n(!0)):(r+=i,t&&r>=t&&(clearInterval(s),n(!1)))},i)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,i=jn()){const s=this.getOptions(),o=Object.keys(this._integrations);return!n.integrations&&o.length>0&&(n.integrations=o),this.emit("preprocessEvent",t,n),t.type||i.setLastEventId(t.event_id||n.event_id),Ly(s,t,n,r,this,i).then(c=>{if(c===null)return c;const u={...i.getPropagationContext(),...r?r.getPropagationContext():void 0};if(!(c.contexts&&c.contexts.trace)&&u){const{traceId:f,spanId:p,parentSpanId:l,dsc:v}=u;c.contexts={trace:zt({trace_id:f,span_id:p,parent_span_id:l}),...c.contexts};const a=v||Bc(f,this);c.sdkProcessingMetadata={dynamicSamplingContext:a,...c.sdkProcessingMetadata}}return c})}_captureEvent(t,n={},r){return this._processEvent(t,n,r).then(i=>i.event_id,i=>{if($e){const s=i;s.logLevel==="log"?Se.log(s.message):Se.warn(s)}})}_processEvent(t,n,r){const i=this.getOptions(),{sampleRate:s}=i,o=Jy(t),c=Qy(t),u=t.type||"error",d=`before send for type \`${u}\``,f=typeof s>"u"?void 0:Fc(s);if(c&&typeof f=="number"&&Math.random()>f)return this.recordDroppedEvent("sample_rate","error",t),Oc(new yr(`Discarding event because it's not included in the random sample (sampling rate = ${s})`,"log"));const p=u==="replay_event"?"replay":u,v=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,n,r,v).then(a=>{if(a===null)throw this.recordDroppedEvent("event_processor",p,t),new yr("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return a;const y=H4(this,i,a,n);return G4(y,d)}).then(a=>{if(a===null){if(this.recordDroppedEvent("before_send",p,t),o){const b=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",b)}throw new yr(`${d} returned \`null\`, will not send event.`,"log")}const h=r&&r.getSession();if(!o&&h&&this._updateSessionFromEvent(h,a),o){const g=a.sdkProcessingMetadata&&a.sdkProcessingMetadata.spanCountBeforeProcessing||0,b=a.spans?a.spans.length:0,w=g-b;w>0&&this.recordDroppedEvent("before_send","span",w)}const y=a.transaction_info;if(o&&y&&a.transaction!==t.transaction){const g="custom";a.transaction_info={...y,source:g}}return this.sendEvent(a,n),a}).then(null,a=>{throw a instanceof yr?a:(this.captureException(a,{data:{__sentry__:!0},originalException:a}),new yr(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
112
- Reason: ${a}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[i,s]=n.split(":");return{reason:i,category:s,quantity:r}})}_flushOutcomes(){$e&&Se.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){$e&&Se.log("No outcomes to send");return}if(!this._dsn){$e&&Se.log("No dsn provided, will not send outcomes");return}$e&&Se.log("Sending outcomes:",t);const n=_I(t,this._options.tunnel&&ps(this._dsn));this.sendEnvelope(n)}}function G4(e,t){const n=`${t} must return \`null\` or a valid event.`;if(xc(e))return e.then(r=>{if(!us(r)&&r!==null)throw new yr(n);return r},r=>{throw new yr(`${t} rejected with ${r}`)});if(!us(e)&&e!==null)throw new yr(n);return e}function H4(e,t,n,r){const{beforeSend:i,beforeSendTransaction:s,beforeSendSpan:o}=t;if(Qy(n)&&i)return i(n,r);if(Jy(n)){if(n.spans&&o){const c=[];for(const u of n.spans){const d=o(u);d?c.push(d):e.recordDroppedEvent("before_send","span")}n.spans=c}if(s){if(n.spans){const c=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:c}}return s(n,r)}}return n}function Qy(e){return e.type===void 0}function Jy(e){return e.type==="transaction"}function Y4(e,t){t.debug===!0&&($e?Se.enable():hs(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),bt().update(t.initialScope);const r=new e(t);return W4(r),r.init(),r}function W4(e){bt().setClient(e)}const K4=64;function z4(e,t,n=uI(e.bufferSize||K4)){let r={};const i=o=>n.drain(o);function s(o){const c=[];if(oy(o,(p,l)=>{const v=ay(l);if(uy(r,v)){const a=Zy(p,l);e.recordDroppedEvent("ratelimit_backoff",v,a)}else c.push(p)}),c.length===0)return Nr({});const u=Mi(o[0],c),d=p=>{oy(u,(l,v)=>{const a=Zy(l,v);e.recordDroppedEvent(p,ay(v),a)})},f=()=>t({body:bI(u)}).then(p=>(p.statusCode!==void 0&&(p.statusCode<200||p.statusCode>=300)&&$e&&Se.warn(`Sentry responded with status code ${p.statusCode} to sent event.`),r=ly(r,p),p),p=>{throw d("network_error"),p});return n.add(f).then(p=>p,p=>{if(p instanceof yr)return $e&&Se.error("Skipped sending event because buffer is full."),d("queue_overflow"),Nr({});throw p})}return{send:s,flush:i}}function Zy(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function Q4(e,t){const n=t&&t.getDsn(),r=t&&t.getOptions().tunnel;return Z4(e,n)||J4(e,r)}function J4(e,t){return t?Xy(e)===Xy(t):!1}function Z4(e,t){return t?e.includes(t.host):!1}function Xy(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function ev(e,t,n=[t],r="npm"){const i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:n.map(s=>({name:`${r}:@sentry/${s}`,version:Oi})),version:Oi}),e._metadata=i}const X4=100;function hi(e,t){const n=Je(),r=jn();if(!n)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:s=X4}=n.getOptions();if(s<=0)return;const c={timestamp:jo(),...e},u=i?hs(()=>i(c,t)):c;u!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",u,t),r.addBreadcrumb(u,s))}let tv;const e5="FunctionToString",nv=new WeakMap,t5=()=>({name:e5,setupOnce(){tv=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=xd(this),n=nv.has(Je())&&t!==void 0?t:this;return tv.apply(n,e)}}catch{}},setup(e){nv.set(e,!0)}}),n5=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler"],r5="InboundFilters",i5=(e={})=>({name:r5,processEvent(t,n,r){const i=r.getOptions(),s=s5(e,i);return o5(t,s)?null:t}});function s5(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:n5],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function o5(e,t){return t.ignoreInternal&&f5(e)?($e&&Se.warn(`Event dropped due to being internal Sentry Error.
113
- Event: ${ci(e)}`),!0):a5(e,t.ignoreErrors)?($e&&Se.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
114
- Event: ${ci(e)}`),!0):p5(e)?($e&&Se.warn(`Event dropped due to not having an error message, error type or stacktrace.
115
- Event: ${ci(e)}`),!0):c5(e,t.ignoreTransactions)?($e&&Se.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
116
- Event: ${ci(e)}`),!0):u5(e,t.denyUrls)?($e&&Se.warn(`Event dropped due to being matched by \`denyUrls\` option.
117
- Event: ${ci(e)}.
118
- Url: ${qc(e)}`),!0):l5(e,t.allowUrls)?!1:($e&&Se.warn(`Event dropped due to not being matched by \`allowUrls\` option.
119
- Event: ${ci(e)}.
120
- Url: ${qc(e)}`),!0)}function a5(e,t){return e.type||!t||!t.length?!1:d5(e).some(n=>si(n,t))}function c5(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const n=e.transaction;return n?si(n,t):!1}function u5(e,t){if(!t||!t.length)return!1;const n=qc(e);return n?si(n,t):!1}function l5(e,t){if(!t||!t.length)return!0;const n=qc(e);return n?si(n,t):!0}function d5(e){const t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),t}function f5(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function h5(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 qc(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?h5(t):null}catch{return $e&&Se.error(`Cannot extract url for event ${ci(e)}`),null}}function p5(e){return e.type||!e.exception||!e.exception.values||e.exception.values.length===0?!1:!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value)}const m5="Dedupe",g5=()=>{let e;return{name:m5,processEvent(t){if(t.type)return t;try{if(y5(t,e))return $e&&Se.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}};function y5(e,t){return t?!!(v5(e,t)||b5(e,t)):!1}function v5(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!iv(e,t)||!rv(e,t))}function b5(e,t){const n=sv(t),r=sv(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!iv(e,t)||!rv(e,t))}function rv(e,t){let n=q0(e),r=q0(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 s=r[i],o=n[i];if(s.filename!==o.filename||s.lineno!==o.lineno||s.colno!==o.colno||s.function!==o.function)return!1}return!0}function iv(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 sv(e){return e.exception&&e.exception.values&&e.exception.values[0]}function w5(e,t,n,r,i="auto.http.browser"){if(!e.fetchData)return;const s=Mr()&&t(e.fetchData.url);if(e.endTimestamp&&s){const a=e.fetchData.__span;if(!a)return;const h=r[a];h&&(x5(h,e),delete r[a]);return}const o=bt(),c=Je(),{method:u,url:d}=e.fetchData,f=S5(d),p=f?Ni(f).host:void 0,l=!!cn(),v=s&&l?fi({name:`${u} ${d}`,attributes:{url:d,type:"fetch","http.method":u,"http.url":f,"server.address":p,[Qt]:i,[li]:"http.client"}}):new vs;if(e.fetchData.__span=v.spanContext().spanId,r[v.spanContext().spanId]=v,n(e.fetchData.url)&&c){const a=e.args[0];e.args[1]=e.args[1]||{};const h=e.args[1];h.headers=E5(a,c,o,h,Mr()&&l?v:void 0)}return v}function E5(e,t,n,r,i){const s=jn(),{traceId:o,spanId:c,sampled:u,dsc:d}={...s.getPropagationContext(),...n.getPropagationContext()},f=i?yy(i):Nd(o,c,u),p=iy(d||(i?di(i):Bc(o,t))),l=r.headers||(typeof Request<"u"&&Ir(e,Request)?e.headers:void 0);if(l)if(typeof Headers<"u"&&Ir(l,Headers)){const v=new Headers(l);return v.append("sentry-trace",f),p&&v.append(Rd,p),v}else if(Array.isArray(l)){const v=[...l,["sentry-trace",f]];return p&&v.push([Rd,p]),v}else{const v="baggage"in l?l.baggage:void 0,a=[];return Array.isArray(v)?a.push(...v):v&&a.push(v),p&&a.push(p),{...l,"sentry-trace":f,baggage:a.length>0?a.join(","):void 0}}else return{"sentry-trace":f,baggage:p}}function S5(e){try{return new URL(e).href}catch{return}}function x5(e,t){if(t.response){py(e,t.response.status);const n=t.response&&t.response.headers&&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:tn,message:"internal_error"});e.end()}const Ne=nt;let Wd=0;function ov(){return Wd>0}function _5(){Wd++,setTimeout(()=>{Wd--})}function bs(e,t={},n){if(typeof e!="function")return e;try{const i=e.__sentry_wrapped__;if(i)return typeof i=="function"?i:e;if(xd(e))return e}catch{return e}const r=function(){const i=Array.prototype.slice.call(arguments);try{const s=i.map(o=>bs(o,t));return e.apply(this,s)}catch(s){throw _5(),Dc(o=>{o.addEventProcessor(c=>(t.mechanism&&(kd(c,void 0),Lo(c,t.mechanism)),c.extra={...c.extra,arguments:i},c)),Yd(s)}),s}};try{for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}catch{}M0(r,e),Hn(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}const On=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Kd(e,t){const n=Qd(e,t),r={type:k5(t),value:O5(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function C5(e,t,n,r){const i=Je(),s=i&&i.getOptions().normalizeDepth,o=P5(t),c={__serialized__:ey(t,s)};if(o)return{exception:{values:[Kd(e,o)]},extra:c};const u={exception:{values:[{type:Sc(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:M5(t,{isUnhandledRejection:r})}]},extra:c};if(n){const d=Qd(e,n);d.length&&(u.exception.values[0].stacktrace={frames:d})}return u}function zd(e,t){return{exception:{values:[Kd(e,t)]}}}function Qd(e,t){const n=t.stacktrace||t.stack||"",r=T5(t),i=I5(t);try{return e(n,r,i)}catch{}return[]}const A5=/Minified React error #\d+;/i;function T5(e){return e&&A5.test(e.message)?1:0}function I5(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function av(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function k5(e){const t=e&&e.name;return!t&&av(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function O5(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:av(e)&&Array.isArray(e.message)&&e.message.length==2?e.message[1]:t:"No error message"}function R5(e,t,n,r){const i=n&&n.syntheticException||void 0,s=Jd(e,t,i,r);return Lo(s),s.level="error",n&&n.event_id&&(s.event_id=n.event_id),Nr(s)}function N5(e,t,n="info",r,i){const s=r&&r.syntheticException||void 0,o=Zd(e,t,s,i);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),Nr(o)}function Jd(e,t,n,r,i){let s;if(S0(t)&&t.error)return zd(e,t.error);if(x0(t)||xT(t)){const o=t;if("stack"in t)s=zd(e,t);else{const c=o.name||(x0(o)?"DOMError":"DOMException"),u=o.message?`${c}: ${o.message}`:c;s=Zd(e,u,n,r),kd(s,u)}return"code"in o&&(s.tags={...s.tags,"DOMException.code":`${o.code}`}),s}return Ec(t)?zd(e,t):us(t)||Sc(t)?(s=C5(e,t,n,i),Lo(s,{synthetic:!0}),s):(s=Zd(e,t,n,r),kd(s,`${t}`),Lo(s,{synthetic:!0}),s)}function Zd(e,t,n,r){const i={};if(r&&n){const s=Qd(e,n);s.length&&(i.exception={values:[{value:t,stacktrace:{frames:s}}]})}if(bd(t)){const{__sentry_template_string__:s,__sentry_template_values__:o}=t;return i.logentry={message:s,params:o},i}return i.message=t,i}function M5(e,{isUnhandledRejection:t}){const n=UT(e),r=t?"promise rejection":"exception";return S0(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Sc(e)?`Event \`${D5(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function D5(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function P5(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}function j5(e,{metadata:t,tunnel:n,dsn:r}){const i={event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:ps(r)}},s=L5(e);return Mi(i,[s])}function L5(e){return[{type:"user_report"},e]}class B5 extends $4{constructor(t){const n={parentSpanIsAlwaysRootSpan:!0,...t},r=Ne.SENTRY_SDK_SOURCE||tI();ev(n,"browser",["browser"],r),super(n),n.sendClientReports&&Ne.document&&Ne.document.addEventListener("visibilitychange",()=>{Ne.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,n){return R5(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return N5(this._options.stackParser,t,n,r,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){On&&Se.warn("SDK not enabled, will not capture user feedback.");return}const n=j5(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(n)}_prepareEvent(t,n,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r)}}const Ln=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,F5=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",ws=(e,t,n,r)=>{let i,s;return o=>{t.value>=0&&(o||r)&&(s=t.value-(i||0),(s||i===void 0)&&(i=t.value,t.delta=s,t.rating=F5(t.value,n),e(t)))}},je=nt,U5=()=>`v3-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,qo=()=>je.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],Vo=()=>{const e=qo();return e&&e.activationStart||0},Es=(e,t)=>{const n=qo();let r="navigate";return n&&(je.document&&je.document.prerendering||Vo()>0?r="prerender":je.document&&je.document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:U5(),navigationType:r}},Li=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(i=>{Promise.resolve().then(()=>{t(i.getEntries())})});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},$o=e=>{const t=n=>{(n.type==="pagehide"||je.document&&je.document.visibilityState==="hidden")&&e(n)};je.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},Xd=e=>{let t=!1;return n=>{t||(e(n),t=!0)}};let Go=-1;const q5=()=>{Go=je.document.visibilityState==="hidden"&&!je.document.prerendering?0:1/0},Vc=e=>{je.document.visibilityState==="hidden"&&Go>-1&&(Go=e.type==="visibilitychange"?e.timeStamp:0,removeEventListener("visibilitychange",Vc,!0),removeEventListener("prerenderingchange",Vc,!0))},V5=()=>{addEventListener("visibilitychange",Vc,!0),addEventListener("prerenderingchange",Vc,!0)},$c=()=>(je.document&&Go<0&&(q5(),V5()),{get firstHiddenTime(){return Go}}),Ho=e=>{je.document&&je.document.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},$5=[1800,3e3],G5=(e,t={})=>{Ho(()=>{const n=$c(),r=Es("FCP");let i;const o=Li("paint",c=>{c.forEach(u=>{u.name==="first-contentful-paint"&&(o.disconnect(),u.startTime<n.firstHiddenTime&&(r.value=Math.max(u.startTime-Vo(),0),r.entries.push(u),i(!0)))})});o&&(i=ws(e,r,$5,t.reportAllChanges))})},H5=[.1,.25],Y5=(e,t={})=>{G5(Xd(()=>{const n=Es("CLS",0);let r,i=0,s=[];const o=u=>{u.forEach(d=>{if(!d.hadRecentInput){const f=s[0],p=s[s.length-1];i&&f&&p&&d.startTime-p.startTime<1e3&&d.startTime-f.startTime<5e3?(i+=d.value,s.push(d)):(i=d.value,s=[d])}}),i>n.value&&(n.value=i,n.entries=s,r())},c=Li("layout-shift",o);c&&(r=ws(e,n,H5,t.reportAllChanges),$o(()=>{o(c.takeRecords()),r(!0)}),setTimeout(r,0))}))},W5=[100,300],K5=(e,t={})=>{Ho(()=>{const n=$c(),r=Es("FID");let i;const s=u=>{u.startTime<n.firstHiddenTime&&(r.value=u.processingStart-u.startTime,r.entries.push(u),i(!0))},o=u=>{u.forEach(s)},c=Li("first-input",o);i=ws(e,r,W5,t.reportAllChanges),c&&$o(Xd(()=>{o(c.takeRecords()),c.disconnect()}))})};let cv=0,ef=1/0,Gc=0;const z5=e=>{e.forEach(t=>{t.interactionId&&(ef=Math.min(ef,t.interactionId),Gc=Math.max(Gc,t.interactionId),cv=Gc?(Gc-ef)/7+1:0)})};let tf;const Q5=()=>tf?cv:performance.interactionCount||0,J5=()=>{"interactionCount"in performance||tf||(tf=Li("event",z5,{type:"event",buffered:!0,durationThreshold:0}))},Z5=[200,500],X5=0,uv=()=>Q5()-X5,lv=10,Dr=[],nf={},dv=e=>{const t=Dr[Dr.length-1],n=nf[e.interactionId];if(n||Dr.length<lv||t&&e.duration>t.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{const r={id:e.interactionId,latency:e.duration,entries:[e]};nf[r.id]=r,Dr.push(r)}Dr.sort((r,i)=>i.latency-r.latency),Dr.splice(lv).forEach(r=>{delete nf[r.id]})}},ek=()=>{const e=Math.min(Dr.length-1,Math.floor(uv()/50));return Dr[e]},tk=(e,t={})=>{Ho(()=>{J5();const n=Es("INP");let r;const i=o=>{o.forEach(u=>{u.interactionId&&dv(u),u.entryType==="first-input"&&!Dr.some(f=>f.entries.some(p=>u.duration===p.duration&&u.startTime===p.startTime))&&dv(u)});const c=ek();c&&c.latency!==n.value&&(n.value=c.latency,n.entries=c.entries,r())},s=Li("event",i,{durationThreshold:t.durationThreshold!=null?t.durationThreshold:40});r=ws(e,n,Z5,t.reportAllChanges),s&&("PerformanceEventTiming"in je&&"interactionId"in PerformanceEventTiming.prototype&&s.observe({type:"first-input",buffered:!0}),$o(()=>{i(s.takeRecords()),n.value<0&&uv()>0&&(n.value=0,n.entries=[]),r(!0)}))})},nk=[2500,4e3],fv={},rk=(e,t={})=>{Ho(()=>{const n=$c(),r=Es("LCP");let i;const s=c=>{const u=c[c.length-1];u&&u.startTime<n.firstHiddenTime&&(r.value=Math.max(u.startTime-Vo(),0),r.entries=[u],i())},o=Li("largest-contentful-paint",s);if(o){i=ws(e,r,nk,t.reportAllChanges);const c=Xd(()=>{fv[r.id]||(s(o.takeRecords()),o.disconnect(),fv[r.id]=!0,i(!0))});["keydown","click"].forEach(u=>{je.document&&addEventListener(u,()=>setTimeout(c,0),!0)}),$o(c)}})},ik=[800,1800],rf=e=>{je.document&&je.document.prerendering?Ho(()=>rf(e)):je.document&&je.document.readyState!=="complete"?addEventListener("load",()=>rf(e),!0):setTimeout(e,0)},sk=(e,t={})=>{const n=Es("TTFB"),r=ws(e,n,ik,t.reportAllChanges);rf(()=>{const i=qo();if(i){const s=i.responseStart;if(s<=0||s>performance.now())return;n.value=Math.max(s-Vo(),0),n.entries=[i],r(!0)}})},Yo={},Hc={};let hv,pv,mv,gv,yv;function sf(e,t=!1){return Wo("cls",e,ak,hv,t)}function vv(e,t=!1){return Wo("lcp",e,uk,mv,t)}function bv(e){return Wo("fid",e,ck,pv)}function ok(e){return Wo("ttfb",e,lk,gv)}function wv(e){return Wo("inp",e,dk,yv)}function Ss(e,t){return Ev(e,t),Hc[e]||(fk(e),Hc[e]=!0),Sv(e,t)}function xs(e,t){const n=Yo[e];if(!(!n||!n.length))for(const r of n)try{r(t)}catch(i){Ln&&Se.error(`Error while triggering instrumentation handler.
111
+ `)}`)}function oI(e){if(!qe)return;const{description:t="< unknown name >",op:n="< unknown op >"}=ot(e),{spanId:r}=e.spanContext(),s=cn(e)===e,o=`[Tracing] Finishing "${n}" ${s?"root ":""}span "${t}" with ID ${r}`;Se.log(o)}function Uc(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){qe&&Se.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`);return}return t}function aI(e,t){if(!Nr(e))return[!1];let n;typeof e.tracesSampler=="function"?n=e.tracesSampler(t):t.parentSampled!==void 0?n=t.parentSampled:typeof e.tracesSampleRate<"u"?n=e.tracesSampleRate:n=1;const r=Uc(n);return r===void 0?(qe&&Se.warn("[Tracing] Discarding transaction because of invalid sample rate."),[!1]):r?Math.random()<r?[!0,r]:(qe&&Se.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(n)})`),[!1,r]):(qe&&Se.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,r])}function cI(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function uI(e,t,n,r){const i=jd(n),s={sent_at:new Date().toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:hs(t)}},o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Ri(s,[o])}function lI(e,t,n,r){const i=jd(n),s=e.type&&e.type!=="replay_event"?e.type:"event";cI(e,n&&n.sdk);const o=dy(e,i,r,t);return delete e.sdkProcessingMetadata,Ri(o,[[{type:s},e]])}function dI(e,t){function n(f){return!!f.trace_id&&!!f.public_key}const r=li(e[0]),i=t&&t.getDsn(),s=t&&t.getOptions().tunnel,o={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!s&&i&&{dsn:hs(i)}},c=t&&t.getOptions().beforeSendSpan,u=c?f=>c(ot(f)):f=>ot(f),d=[];for(const f of e){const h=u(f);h&&d.push(I4(h))}return Ri(o,d)}function fI(e,t,n,r=un()){const i=r&&cn(r);i&&i.addEvent(e,{[Lc]:t,[jc]:n})}function Oy(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},i=r[jc],s=r[Lc];typeof i=="string"&&typeof s=="number"&&(t[n.name]={value:s,unit:i})}),t}const Ry=1e3;class Yd{constructor(t={}){this._traceId=t.traceId||Ct(),this._spanId=t.spanId||Ct().substring(16),this._startTime=t.startTimestamp||wn(),this._attributes={},this.setAttributes({[Qt]:"manual",[ui]: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}addLinks(t){return this}recordException(t,n){}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?by:vy}}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=Ni(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this}end(t){this._endTime||(this._endTime=Ni(t),oI(this),this._onSpanEnded())}getSpanJSON(){return zt({data:this._attributes,description:this._name,op:this._attributes[ui],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Sy(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[Qt],_metrics_summary:Ud(this),profile_id:this._attributes[z4],exclusive_time:this._attributes[qd],measurements:Oy(this._events),is_segment:this._isStandaloneSpan&&cn(this)===this||void 0,segment_id:this._isStandaloneSpan?cn(this).spanContext().spanId:void 0})}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){qe&&Se.log("[Tracing] Adding an event to span:",t);const i=Ny(n)?n:r||wn(),s=Ny(n)?{}:n||{},o={name:t,time:Ni(i),attributes:s};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=Je();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===cn(this)))return;if(this._isStandaloneSpan){this._sampled?pI(dI([this],t)):(qe&&Se.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}const r=this._convertSpanToTransaction();r&&(Ty(this).scope||bt()).captureEvent(r)}_convertSpanToTransaction(){if(!My(ot(this)))return;this._name||(qe&&Se.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=Ty(this),i=(t||bt()).getClient()||Je();if(this._sampled!==!0){qe&&Se.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),i&&i.recordDroppedEvent("sample_rate","transaction");return}const o=Bc(this).filter(h=>h!==this&&!hI(h)).map(h=>ot(h)).filter(My),c=this._attributes[yr],u={contexts:{trace:Z4(this)},spans:o.length>Ry?o.sort((h,l)=>h.start_timestamp-l.start_timestamp).slice(0,Ry):o,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,...zt({dynamicSamplingContext:li(this)})},_metrics_summary:Ud(this),...c&&{transaction_info:{source:c}}},d=Oy(this._events);return d&&Object.keys(d).length&&(qe&&Se.log("[Measurements] Adding measurements to transaction event",JSON.stringify(d,void 0,2)),u.measurements=d),u}}function Ny(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function My(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function hI(e){return e instanceof Yd&&e.isStandaloneSpan()}function pI(e){const t=Je();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}const r=t.getTransport();r&&r.send(e).then(null,i=>{qe&&Se.error("Error while sending span:",i)})}const Dy="__SENTRY_SUPPRESS_TRACING__";function di(e){const t=jy();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=gI(e),{forceTransaction:r,parentSpan:i}=e;return(e.scope?o=>Pc(e.scope,o):i!==void 0?o=>Py(i,o):o=>o())(()=>{const o=bt(),c=vI(o);return e.onlyIfParent&&!c?new ys:mI({parentSpan:c,spanArguments:n,forceTransaction:r,scope:o})})}function Py(e,t){const n=jy();return n.withActiveSpan?n.withActiveSpan(e,t):Pc(r=>(Bo(r,e||void 0),t(r)))}function mI({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!Nr())return new ys;const i=jn();let s;if(e&&!n)s=yI(e,r,t),xy(e,s);else if(e){const o=li(e),{traceId:c,spanId:u}=e.spanContext(),d=Mi(e);s=Ly({traceId:c,parentSpanId:u,...t},r,d),ky(s,o)}else{const{traceId:o,dsc:c,parentSpanId:u,sampled:d}={...i.getPropagationContext(),...r.getPropagationContext()};s=Ly({traceId:o,parentSpanId:u,...t},r,d),c&&ky(s,c)}return sI(s),iI(s,r,i),s}function gI(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=Ni(e.startTime),delete r.startTime,r}return n}function jy(){const e=ps();return Fo(e)}function Ly(e,t,n){const r=Je(),i=r&&r.getOptions()||{},{name:s="",attributes:o}=e,[c,u]=t.getScopeData().sdkProcessingMetadata[Dy]?[!1]:aI(i,{name:s,parentSampled:n,attributes:o,transactionContext:{name:s,parentSampled:n}}),d=new Yd({...e,attributes:{[yr]:"custom",...e.attributes},sampled:c});return u!==void 0&&d.setAttribute(my,u),r&&r.emit("spanStart",d),d}function yI(e,t,n){const{spanId:r,traceId:i}=e.spanContext(),s=t.getScopeData().sdkProcessingMetadata[Dy]?!1:Mi(e),o=s?new Yd({...n,parentSpanId:r,traceId:i,sampled:s}):new ys({traceId:i});xy(e,o);const c=Je();return c&&(c.emit("spanStart",o),n.endTimestamp&&c.emit("spanEnd",o)),o}function vI(e){const t=Dc(e);if(!t)return;const n=Je();return(n?n.getOptions():{}).parentSpanIsAlwaysRootSpan?cn(t):t}const Vc={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},bI="heartbeatFailed",wI="idleTimeout",EI="finalTimeout",SI="externalFinish";function By(e,t={}){const n=new Map;let r=!1,i,s=SI,o=!t.disableAutoFinish;const c=[],{idleTimeout:u=Vc.idleTimeout,finalTimeout:d=Vc.finalTimeout,childSpanTimeout:f=Vc.childSpanTimeout,beforeSpanEnd:h}=t,l=Je();if(!l||!Nr())return new ys;const b=bt(),a=un(),p=xI(e);p.end=new Proxy(p.end,{apply(A,T,O){h&&h(p);const[N,...D]=O,U=N||wn(),V=Ni(U),F=Bc(p).filter(z=>z!==p);if(!F.length)return S(V),Reflect.apply(A,T,[V,...D]);const q=F.map(z=>ot(z).timestamp).filter(z=>!!z),R=q.length?Math.max(...q):void 0,L=ot(p).start_timestamp,W=Math.min(L?L+d/1e3:1/0,Math.max(L||-1/0,Math.min(V,R||1/0)));return S(W),Reflect.apply(A,T,[W,...D])}});function y(){i&&(clearTimeout(i),i=void 0)}function g(A){y(),i=setTimeout(()=>{!r&&n.size===0&&o&&(s=wI,p.end(A))},u)}function v(A){i=setTimeout(()=>{!r&&o&&(s=bI,p.end(A))},f)}function w(A){y(),n.set(A,!0);const T=wn();v(T+f/1e3)}function E(A){if(n.has(A)&&n.delete(A),n.size===0){const T=wn();g(T+u/1e3)}}function S(A){r=!0,n.clear(),c.forEach(V=>V()),Bo(b,a);const T=ot(p),{start_timestamp:O}=T;if(!O)return;(T.data||{})[Vd]||p.setAttribute(Vd,s),Se.log(`[Tracing] Idle span "${T.op}" finished`);const D=Bc(p).filter(V=>V!==p);let U=0;D.forEach(V=>{V.isRecording()&&(V.setStatus({code:nn,message:"cancelled"}),V.end(A),qe&&Se.log("[Tracing] Cancelling span since span ended early",JSON.stringify(V,void 0,2)));const F=ot(V),{timestamp:q=0,start_timestamp:R=0}=F,L=R<=A,W=(d+u)/1e3,z=q-R<=W;if(qe){const Z=JSON.stringify(V,void 0,2);L?z||Se.log("[Tracing] Discarding span since it finished after idle span final timeout",Z):Se.log("[Tracing] Discarding span since it happened after idle span was finished",Z)}(!z||!L)&&(nI(p,V),U++)}),U>0&&p.setAttribute("sentry.idle_span_discarded_spans",U)}return c.push(l.on("spanStart",A=>{if(r||A===p||ot(A).timestamp)return;Bc(p).includes(A)&&w(A.spanContext().spanId)})),c.push(l.on("spanEnd",A=>{r||E(A.spanContext().spanId)})),c.push(l.on("idleSpanEnableAutoFinish",A=>{A===p&&(o=!0,g(),n.size&&v())})),t.disableAutoFinish||g(),setTimeout(()=>{r||(p.setStatus({code:nn,message:"deadline_exceeded"}),s=EI,p.end())},d),p}function xI(e){const t=di(e);return Bo(bt(),t),qe&&Se.log("[Tracing] Started span is an idle span"),t}function Wd(e,t,n,r=0){return new Kn((i,s)=>{const o=e[r];if(t===null||typeof o!="function")i(t);else{const c=o({...t},n);qe&&o.id&&c===null&&Se.log(`Event processor "${o.id}" dropped event`),_c(c)?c.then(u=>Wd(e,u,n,r+1).then(i)).then(null,s):Wd(e,c,n,r+1).then(i).then(null,s)}})}function _I(e,t){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:s}=t;CI(e,t),r&&II(e,r),kI(e,n),AI(e,i),TI(e,s)}function Fy(e,t){const{extra:n,tags:r,user:i,contexts:s,level:o,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:d,eventProcessors:f,attachments:h,propagationContext:l,transactionName:b,span:a}=t;Uo(e,"extra",n),Uo(e,"tags",r),Uo(e,"user",i),Uo(e,"contexts",s),Uo(e,"sdkProcessingMetadata",c),o&&(e.level=o),b&&(e.transactionName=b),a&&(e.span=a),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),d.length&&(e.fingerprint=[...e.fingerprint,...d]),f.length&&(e.eventProcessors=[...e.eventProcessors,...f]),h.length&&(e.attachments=[...e.attachments,...h]),e.propagationContext={...e.propagationContext,...l}}function Uo(e,t,n){if(n&&Object.keys(n).length){e[t]={...e[t]};for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[t][r]=n[r])}}function CI(e,t){const{extra:n,tags:r,user:i,contexts:s,level:o,transactionName:c}=t,u=zt(n);u&&Object.keys(u).length&&(e.extra={...u,...e.extra});const d=zt(r);d&&Object.keys(d).length&&(e.tags={...d,...e.tags});const f=zt(i);f&&Object.keys(f).length&&(e.user={...f,...e.user});const h=zt(s);h&&Object.keys(h).length&&(e.contexts={...h,...e.contexts}),o&&(e.level=o),c&&e.type!=="transaction"&&(e.transaction=c)}function AI(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function TI(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function II(e,t){e.contexts={trace:X4(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:li(t),...e.sdkProcessingMetadata};const n=cn(t),r=ot(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function kI(e,t){e.fingerprint=e.fingerprint?ny(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function Uy(e,t,n,r,i,s){const{normalizeDepth:o=3,normalizeMaxBreadth:c=1e3}=e,u={...t,event_id:t.event_id||n.event_id||Ct(),timestamp:t.timestamp||jo()},d=n.integrations||e.integrations.map(y=>y.name);OI(u,e),MI(u,d),i&&i.emit("applyFrameMetadata",t),t.type===void 0&&RI(u,e.stackParser);const f=PI(r,n.captureContext);n.mechanism&&Lo(u,n.mechanism);const h=i?i.getEventProcessors():[],l=W4().getScopeData();if(s){const y=s.getScopeData();Fy(l,y)}if(f){const y=f.getScopeData();Fy(l,y)}const b=[...n.attachments||[],...l.attachments];b.length&&(n.attachments=b),_I(u,l);const a=[...h,...l.eventProcessors];return Wd(a,u,n).then(y=>(y&&NI(y),typeof o=="number"&&o>0?DI(y,o,c):y))}function OI(e,t){const{environment:n,release:r,dist:i,maxValueLength:s=250}=t;"environment"in e||(e.environment="environment"in t?n:Hd),e.release===void 0&&r!==void 0&&(e.release=r),e.dist===void 0&&i!==void 0&&(e.dist=i),e.message&&(e.message=us(e.message,s));const o=e.exception&&e.exception.values&&e.exception.values[0];o&&o.value&&(o.value=us(o.value,s));const c=e.request;c&&c.url&&(c.url=us(c.url,s))}const Vy=new WeakMap;function RI(e,t){const n=nt._sentryDebugIds;if(!n)return;let r;const i=Vy.get(t);i?r=i:(r=new Map,Vy.set(t,r));const s=Object.entries(n).reduce((o,[c,u])=>{let d;const f=r.get(c);f?d=f:(d=t(c),r.set(c,d));for(let h=d.length-1;h>=0;h--){const l=d[h];if(l.filename){o[l.filename]=u;break}}return o},{});try{e.exception.values.forEach(o=>{o.stacktrace.frames.forEach(c=>{c.filename&&(c.debug_id=s[c.filename])})})}catch{}}function NI(e){const t={};try{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)})})}catch{}if(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 MI(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function DI(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:gr(i.data,t,n)}}))},...e.user&&{user:gr(e.user,t,n)},...e.contexts&&{contexts:gr(e.contexts,t,n)},...e.extra&&{extra:gr(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=gr(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(i=>({...i,...i.data&&{data:gr(i.data,t,n)}}))),r}function PI(e,t){if(!t)return e;const n=e?e.clone():new ci;return n.update(t),n}function jI(e){if(e)return LI(e)?{captureContext:e}:FI(e)?{captureContext:e}:e}function LI(e){return e instanceof ci||typeof e=="function"}const BI=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function FI(e){return Object.keys(e).some(t=>BI.includes(t))}function Kd(e,t){return bt().captureException(e,jI(t))}function qy(e,t){return bt().captureEvent(e,t)}function $y(e,t){jn().setContext(e,t)}function UI(){return jn().lastEventId()}function VI(e){jn().addEventProcessor(e)}function Gy(e){const t=Je(),n=jn(),r=bt(),{release:i,environment:s=Hd}=t&&t.getOptions()||{},{userAgent:o}=nt.navigator||{},c=L4({release:i,environment:s,user:r.getUser()||n.getUser(),...o&&{userAgent:o},...e}),u=n.getSession();return u&&u.status==="ok"&&ms(u,{status:"exited"}),Hy(),n.setSession(c),r.setSession(c),c}function Hy(){const e=jn(),t=bt(),n=t.getSession()||e.getSession();n&&B4(n),Yy(),e.setSession(),t.setSession()}function Yy(){const e=jn(),t=bt(),n=Je(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function Wy(e=!1){if(e){Hy();return}Yy()}const qI="7";function Ky(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function $I(e){return`${Ky(e)}${e.projectId}/envelope/`}function GI(e,t){return YT({sentry_key:e.publicKey,sentry_version:qI,...t&&{sentry_client:`${t.name}/${t.version}`}})}function HI(e,t,n){return t||`${$I(e)}?${GI(e,n)}`}function YI(e,t){const n=P0(e);if(!n)return"";const r=`${Ky(n)}embed/error-page/`;let i=`dsn=${hs(n)}`;for(const s in t)if(s!=="dsn"&&s!=="onClose")if(s==="user"){const o=t.user;if(!o)continue;o.name&&(i+=`&name=${encodeURIComponent(o.name)}`),o.email&&(i+=`&email=${encodeURIComponent(o.email)}`)}else i+=`&${encodeURIComponent(s)}=${encodeURIComponent(t[s])}`;return`${r}?${i}`}const zy=[];function WI(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 KI(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let r;Array.isArray(n)?r=[...t,...n]:typeof n=="function"?r=ny(n(t)):r=t;const i=WI(r),s=i.findIndex(o=>o.name==="Debug");if(s>-1){const[o]=i.splice(s,1);i.push(o)}return i}function zI(e,t){const n={};return t.forEach(r=>{r&&Jy(e,r,n)}),n}function Qy(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function Jy(e,t,n){if(n[t.name]){qe&&Se.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,zy.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),zy.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,s)=>r(i,s,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),i=Object.assign((s,o)=>r(s,o,e),{id:t.name});e.addEventProcessor(i)}qe&&Se.log(`Integration installed: ${t.name}`)}function B9(e){return e}const Zy="Not capturing exception because it's already been captured.";class QI{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=P0(t.dsn):qe&&Se.warn("No DSN provided, client will not send events."),this._dsn){const n=HI(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:n})}}captureException(t,n,r){const i=Ct();if(ty(t))return qe&&Se.log(Zy),i;const s={event_id:i,...n};return this._process(this.eventFromException(t,s).then(o=>this._captureEvent(o,s,r))),s.event_id}captureMessage(t,n,r,i){const s={event_id:Ct(),...r},o=Ed(t)?t:String(t),c=Sd(t)?this.eventFromMessage(o,n,s):this.eventFromException(t,s);return this._process(c.then(u=>this._captureEvent(u,s,i))),s.event_id}captureEvent(t,n,r){const i=Ct();if(n&&n.originalException&&ty(n.originalException))return qe&&Se.log(Zy),i;const s={event_id:i,...n},c=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,s,c||r)),s.event_id}captureSession(t){typeof t.release!="string"?qe&&Se.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),ms(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(i=>r&&i))):Rr(!0)}close(t){return this.flush(t).then(n=>(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];Jy(this,t,this._integrations),n||Qy(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=lI(t,this._dsn,this._options._metadata,this._options.tunnel);for(const s of n.attachments||[])r=C4(r,k4(s));const i=this.sendEnvelope(r);i&&i.then(s=>this.emit("afterSendEvent",t,s),null)}sendSession(t){const n=uI(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(n)}recordDroppedEvent(t,n,r){if(this._options.sendClientReports){const i=typeof r=="number"?r:1,s=`${t}:${n}`;qe&&Se.log(`Recording outcome: "${s}"${i>1?` (${i} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+i}}on(t,n){const r=this._hooks[t]=this._hooks[t]||[];return r.push(n),()=>{const i=r.indexOf(n);i>-1&&r.splice(i,1)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(i=>i(...n))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,n=>(qe&&Se.error("Error while sending event:",n),n)):(qe&&Se.error("Transport disabled"),Rr({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=zI(this,t),Qy(this,t)}_updateSessionFromEvent(t,n){let r=!1,i=!1;const s=n.exception&&n.exception.values;if(s){i=!0;for(const u of s){const d=u.mechanism;if(d&&d.handled===!1){r=!0;break}}}const o=t.status==="ok";(o&&t.errors===0||o&&r)&&(ms(t,{...r&&{status:"crashed"},errors:t.errors||Number(i||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Kn(n=>{let r=0;const i=1,s=setInterval(()=>{this._numProcessing==0?(clearInterval(s),n(!0)):(r+=i,t&&r>=t&&(clearInterval(s),n(!1)))},i)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,i=jn()){const s=this.getOptions(),o=Object.keys(this._integrations);return!n.integrations&&o.length>0&&(n.integrations=o),this.emit("preprocessEvent",t,n),t.type||i.setLastEventId(t.event_id||n.event_id),Uy(s,t,n,r,this,i).then(c=>{if(c===null)return c;const u={...i.getPropagationContext(),...r?r.getPropagationContext():void 0};if(!(c.contexts&&c.contexts.trace)&&u){const{traceId:f,spanId:h,parentSpanId:l,dsc:b}=u;c.contexts={trace:zt({trace_id:f,span_id:h,parent_span_id:l}),...c.contexts};const a=b||Fc(f,this);c.sdkProcessingMetadata={dynamicSamplingContext:a,...c.sdkProcessingMetadata}}return c})}_captureEvent(t,n={},r){return this._processEvent(t,n,r).then(i=>i.event_id,i=>{if(qe){const s=i;s.logLevel==="log"?Se.log(s.message):Se.warn(s)}})}_processEvent(t,n,r){const i=this.getOptions(),{sampleRate:s}=i,o=ev(t),c=Xy(t),u=t.type||"error",d=`before send for type \`${u}\``,f=typeof s>"u"?void 0:Uc(s);if(c&&typeof f=="number"&&Math.random()>f)return this.recordDroppedEvent("sample_rate","error",t),Rc(new mr(`Discarding event because it's not included in the random sample (sampling rate = ${s})`,"log"));const h=u==="replay_event"?"replay":u,b=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,n,r,b).then(a=>{if(a===null)throw this.recordDroppedEvent("event_processor",h,t),new mr("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return a;const y=ZI(this,i,a,n);return JI(y,d)}).then(a=>{if(a===null){if(this.recordDroppedEvent("before_send",h,t),o){const v=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",v)}throw new mr(`${d} returned \`null\`, will not send event.`,"log")}const p=r&&r.getSession();if(!o&&p&&this._updateSessionFromEvent(p,a),o){const g=a.sdkProcessingMetadata&&a.sdkProcessingMetadata.spanCountBeforeProcessing||0,v=a.spans?a.spans.length:0,w=g-v;w>0&&this.recordDroppedEvent("before_send","span",w)}const y=a.transaction_info;if(o&&y&&a.transaction!==t.transaction){const g="custom";a.transaction_info={...y,source:g}}return this.sendEvent(a,n),a}).then(null,a=>{throw a instanceof mr?a:(this.captureException(a,{data:{__sentry__:!0},originalException:a}),new mr(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
112
+ Reason: ${a}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[i,s]=n.split(":");return{reason:i,category:s,quantity:r}})}_flushOutcomes(){qe&&Se.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){qe&&Se.log("No outcomes to send");return}if(!this._dsn){qe&&Se.log("No dsn provided, will not send outcomes");return}qe&&Se.log("Sending outcomes:",t);const n=R4(t,this._options.tunnel&&hs(this._dsn));this.sendEnvelope(n)}}function JI(e,t){const n=`${t} must return \`null\` or a valid event.`;if(_c(e))return e.then(r=>{if(!cs(r)&&r!==null)throw new mr(n);return r},r=>{throw new mr(`${t} rejected with ${r}`)});if(!cs(e)&&e!==null)throw new mr(n);return e}function ZI(e,t,n,r){const{beforeSend:i,beforeSendTransaction:s,beforeSendSpan:o}=t;if(Xy(n)&&i)return i(n,r);if(ev(n)){if(n.spans&&o){const c=[];for(const u of n.spans){const d=o(u);d?c.push(d):e.recordDroppedEvent("before_send","span")}n.spans=c}if(s){if(n.spans){const c=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:c}}return s(n,r)}}return n}function Xy(e){return e.type===void 0}function ev(e){return e.type==="transaction"}function XI(e,t){t.debug===!0&&(qe?Se.enable():fs(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),bt().update(t.initialScope);const r=new e(t);return e5(r),r.init(),r}function e5(e){bt().setClient(e)}const t5=64;function n5(e,t,n=g4(e.bufferSize||t5)){let r={};const i=o=>n.drain(o);function s(o){const c=[];if(uy(o,(h,l)=>{const b=ly(l);if(fy(r,b)){const a=tv(h,l);e.recordDroppedEvent("ratelimit_backoff",b,a)}else c.push(h)}),c.length===0)return Rr({});const u=Ri(o[0],c),d=h=>{uy(u,(l,b)=>{const a=tv(l,b);e.recordDroppedEvent(h,ly(b),a)})},f=()=>t({body:A4(u)}).then(h=>(h.statusCode!==void 0&&(h.statusCode<200||h.statusCode>=300)&&qe&&Se.warn(`Sentry responded with status code ${h.statusCode} to sent event.`),r=hy(r,h),h),h=>{throw d("network_error"),h});return n.add(f).then(h=>h,h=>{if(h instanceof mr)return qe&&Se.error("Skipped sending event because buffer is full."),d("queue_overflow"),Rr({});throw h})}return{send:s,flush:i}}function tv(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function r5(e,t){const n=t&&t.getDsn(),r=t&&t.getOptions().tunnel;return s5(e,n)||i5(e,r)}function i5(e,t){return t?nv(e)===nv(t):!1}function s5(e,t){return t?e.includes(t.host):!1}function nv(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function rv(e,t,n=[t],r="npm"){const i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:n.map(s=>({name:`${r}:@sentry/${s}`,version:Ii})),version:Ii}),e._metadata=i}const o5=100;function fi(e,t){const n=Je(),r=jn();if(!n)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:s=o5}=n.getOptions();if(s<=0)return;const c={timestamp:jo(),...e},u=i?fs(()=>i(c,t)):c;u!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",u,t),r.addBreadcrumb(u,s))}let iv;const a5="FunctionToString",sv=new WeakMap,c5=()=>({name:a5,setupOnce(){iv=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Cd(this),n=sv.has(Je())&&t!==void 0?t:this;return iv.apply(n,e)}}catch{}},setup(e){sv.set(e,!0)}}),u5=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler"],l5="InboundFilters",d5=(e={})=>({name:l5,processEvent(t,n,r){const i=r.getOptions(),s=f5(e,i);return h5(t,s)?null:t}});function f5(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:u5],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function h5(e,t){return t.ignoreInternal&&b5(e)?(qe&&Se.warn(`Event dropped due to being internal Sentry Error.
113
+ Event: ${ai(e)}`),!0):p5(e,t.ignoreErrors)?(qe&&Se.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
114
+ Event: ${ai(e)}`),!0):E5(e)?(qe&&Se.warn(`Event dropped due to not having an error message, error type or stacktrace.
115
+ Event: ${ai(e)}`),!0):m5(e,t.ignoreTransactions)?(qe&&Se.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
116
+ Event: ${ai(e)}`),!0):g5(e,t.denyUrls)?(qe&&Se.warn(`Event dropped due to being matched by \`denyUrls\` option.
117
+ Event: ${ai(e)}.
118
+ Url: ${qc(e)}`),!0):y5(e,t.allowUrls)?!1:(qe&&Se.warn(`Event dropped due to not being matched by \`allowUrls\` option.
119
+ Event: ${ai(e)}.
120
+ Url: ${qc(e)}`),!0)}function p5(e,t){return e.type||!t||!t.length?!1:v5(e).some(n=>ii(n,t))}function m5(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const n=e.transaction;return n?ii(n,t):!1}function g5(e,t){if(!t||!t.length)return!1;const n=qc(e);return n?ii(n,t):!1}function y5(e,t){if(!t||!t.length)return!0;const n=qc(e);return n?ii(n,t):!0}function v5(e){const t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),t}function b5(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function w5(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 qc(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?w5(t):null}catch{return qe&&Se.error(`Cannot extract url for event ${ai(e)}`),null}}function E5(e){return e.type||!e.exception||!e.exception.values||e.exception.values.length===0?!1:!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value)}const S5="Dedupe",x5=()=>{let e;return{name:S5,processEvent(t){if(t.type)return t;try{if(_5(t,e))return qe&&Se.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}};function _5(e,t){return t?!!(C5(e,t)||A5(e,t)):!1}function C5(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!av(e,t)||!ov(e,t))}function A5(e,t){const n=cv(t),r=cv(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!av(e,t)||!ov(e,t))}function ov(e,t){let n=G0(e),r=G0(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 s=r[i],o=n[i];if(s.filename!==o.filename||s.lineno!==o.lineno||s.colno!==o.colno||s.function!==o.function)return!1}return!0}function av(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 cv(e){return e.exception&&e.exception.values&&e.exception.values[0]}function T5(e,t,n,r,i="auto.http.browser"){if(!e.fetchData)return;const s=Nr()&&t(e.fetchData.url);if(e.endTimestamp&&s){const a=e.fetchData.__span;if(!a)return;const p=r[a];p&&(O5(p,e),delete r[a]);return}const o=bt(),c=Je(),{method:u,url:d}=e.fetchData,f=k5(d),h=f?Oi(f).host:void 0,l=!!un(),b=s&&l?di({name:`${u} ${d}`,attributes:{url:d,type:"fetch","http.method":u,"http.url":f,"server.address":h,[Qt]:i,[ui]:"http.client"}}):new ys;if(e.fetchData.__span=b.spanContext().spanId,r[b.spanContext().spanId]=b,n(e.fetchData.url)&&c){const a=e.args[0];e.args[1]=e.args[1]||{};const p=e.args[1];p.headers=I5(a,c,o,p,Nr()&&l?b:void 0)}return b}function I5(e,t,n,r,i){const s=jn(),{traceId:o,spanId:c,sampled:u,dsc:d}={...s.getPropagationContext(),...n.getPropagationContext()},f=i?wy(i):Dd(o,c,u),h=ay(d||(i?li(i):Fc(o,t))),l=r.headers||(typeof Request<"u"&&Tr(e,Request)?e.headers:void 0);if(l)if(typeof Headers<"u"&&Tr(l,Headers)){const b=new Headers(l);return b.append("sentry-trace",f),h&&b.append(Md,h),b}else if(Array.isArray(l)){const b=[...l,["sentry-trace",f]];return h&&b.push([Md,h]),b}else{const b="baggage"in l?l.baggage:void 0,a=[];return Array.isArray(b)?a.push(...b):b&&a.push(b),h&&a.push(h),{...l,"sentry-trace":f,baggage:a.length>0?a.join(","):void 0}}else return{"sentry-trace":f,baggage:h}}function k5(e){try{return new URL(e).href}catch{return}}function O5(e,t){if(t.response){yy(e,t.response.status);const n=t.response&&t.response.headers&&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:nn,message:"internal_error"});e.end()}const Ne=nt;let zd=0;function uv(){return zd>0}function R5(){zd++,setTimeout(()=>{zd--})}function vs(e,t={},n){if(typeof e!="function")return e;try{const i=e.__sentry_wrapped__;if(i)return typeof i=="function"?i:e;if(Cd(e))return e}catch{return e}const r=function(){const i=Array.prototype.slice.call(arguments);try{const s=i.map(o=>vs(o,t));return e.apply(this,s)}catch(s){throw R5(),Pc(o=>{o.addEventProcessor(c=>(t.mechanism&&(Rd(c,void 0),Lo(c,t.mechanism)),c.extra={...c.extra,arguments:i},c)),Kd(s)}),s}};try{for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}catch{}j0(r,e),Yn(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}const On=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Qd(e,t){const n=Zd(e,t),r={type:j5(t),value:L5(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function N5(e,t,n,r){const i=Je(),s=i&&i.getOptions().normalizeDepth,o=q5(t),c={__serialized__:ry(t,s)};if(o)return{exception:{values:[Qd(e,o)]},extra:c};const u={exception:{values:[{type:xc(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:U5(t,{isUnhandledRejection:r})}]},extra:c};if(n){const d=Zd(e,n);d.length&&(u.exception.values[0].stacktrace={frames:d})}return u}function Jd(e,t){return{exception:{values:[Qd(e,t)]}}}function Zd(e,t){const n=t.stacktrace||t.stack||"",r=D5(t),i=P5(t);try{return e(n,r,i)}catch{}return[]}const M5=/Minified React error #\d+;/i;function D5(e){return e&&M5.test(e.message)?1:0}function P5(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function lv(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function j5(e){const t=e&&e.name;return!t&&lv(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function L5(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:lv(e)&&Array.isArray(e.message)&&e.message.length==2?e.message[1]:t:"No error message"}function B5(e,t,n,r){const i=n&&n.syntheticException||void 0,s=Xd(e,t,i,r);return Lo(s),s.level="error",n&&n.event_id&&(s.event_id=n.event_id),Rr(s)}function F5(e,t,n="info",r,i){const s=r&&r.syntheticException||void 0,o=ef(e,t,s,i);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),Rr(o)}function Xd(e,t,n,r,i){let s;if(C0(t)&&t.error)return Jd(e,t.error);if(A0(t)||OT(t)){const o=t;if("stack"in t)s=Jd(e,t);else{const c=o.name||(A0(o)?"DOMError":"DOMException"),u=o.message?`${c}: ${o.message}`:c;s=ef(e,u,n,r),Rd(s,u)}return"code"in o&&(s.tags={...s.tags,"DOMException.code":`${o.code}`}),s}return Sc(t)?Jd(e,t):cs(t)||xc(t)?(s=N5(e,t,n,i),Lo(s,{synthetic:!0}),s):(s=ef(e,t,n,r),Rd(s,`${t}`),Lo(s,{synthetic:!0}),s)}function ef(e,t,n,r){const i={};if(r&&n){const s=Zd(e,n);s.length&&(i.exception={values:[{value:t,stacktrace:{frames:s}}]})}if(Ed(t)){const{__sentry_template_string__:s,__sentry_template_values__:o}=t;return i.logentry={message:s,params:o},i}return i.message=t,i}function U5(e,{isUnhandledRejection:t}){const n=WT(e),r=t?"promise rejection":"exception";return C0(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:xc(e)?`Event \`${V5(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function V5(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function q5(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}function $5(e,{metadata:t,tunnel:n,dsn:r}){const i={event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:hs(r)}},s=G5(e);return Ri(i,[s])}function G5(e){return[{type:"user_report"},e]}class H5 extends QI{constructor(t){const n={parentSpanIsAlwaysRootSpan:!0,...t},r=Ne.SENTRY_SDK_SOURCE||c4();rv(n,"browser",["browser"],r),super(n),n.sendClientReports&&Ne.document&&Ne.document.addEventListener("visibilitychange",()=>{Ne.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,n){return B5(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return F5(this._options.stackParser,t,n,r,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){On&&Se.warn("SDK not enabled, will not capture user feedback.");return}const n=$5(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(n)}_prepareEvent(t,n,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r)}}const Ln=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Y5=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",bs=(e,t,n,r)=>{let i,s;return o=>{t.value>=0&&(o||r)&&(s=t.value-(i||0),(s||i===void 0)&&(i=t.value,t.delta=s,t.rating=Y5(t.value,n),e(t)))}},je=nt,W5=()=>`v3-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,Vo=()=>je.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],qo=()=>{const e=Vo();return e&&e.activationStart||0},ws=(e,t)=>{const n=Vo();let r="navigate";return n&&(je.document&&je.document.prerendering||qo()>0?r="prerender":je.document&&je.document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:W5(),navigationType:r}},Pi=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(i=>{Promise.resolve().then(()=>{t(i.getEntries())})});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},$o=e=>{const t=n=>{(n.type==="pagehide"||je.document&&je.document.visibilityState==="hidden")&&e(n)};je.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},tf=e=>{let t=!1;return n=>{t||(e(n),t=!0)}};let Go=-1;const K5=()=>{Go=je.document.visibilityState==="hidden"&&!je.document.prerendering?0:1/0},$c=e=>{je.document.visibilityState==="hidden"&&Go>-1&&(Go=e.type==="visibilitychange"?e.timeStamp:0,removeEventListener("visibilitychange",$c,!0),removeEventListener("prerenderingchange",$c,!0))},z5=()=>{addEventListener("visibilitychange",$c,!0),addEventListener("prerenderingchange",$c,!0)},Gc=()=>(je.document&&Go<0&&(K5(),z5()),{get firstHiddenTime(){return Go}}),Ho=e=>{je.document&&je.document.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},Q5=[1800,3e3],J5=(e,t={})=>{Ho(()=>{const n=Gc(),r=ws("FCP");let i;const o=Pi("paint",c=>{c.forEach(u=>{u.name==="first-contentful-paint"&&(o.disconnect(),u.startTime<n.firstHiddenTime&&(r.value=Math.max(u.startTime-qo(),0),r.entries.push(u),i(!0)))})});o&&(i=bs(e,r,Q5,t.reportAllChanges))})},Z5=[.1,.25],X5=(e,t={})=>{J5(tf(()=>{const n=ws("CLS",0);let r,i=0,s=[];const o=u=>{u.forEach(d=>{if(!d.hadRecentInput){const f=s[0],h=s[s.length-1];i&&f&&h&&d.startTime-h.startTime<1e3&&d.startTime-f.startTime<5e3?(i+=d.value,s.push(d)):(i=d.value,s=[d])}}),i>n.value&&(n.value=i,n.entries=s,r())},c=Pi("layout-shift",o);c&&(r=bs(e,n,Z5,t.reportAllChanges),$o(()=>{o(c.takeRecords()),r(!0)}),setTimeout(r,0))}))},e3=[100,300],t3=(e,t={})=>{Ho(()=>{const n=Gc(),r=ws("FID");let i;const s=u=>{u.startTime<n.firstHiddenTime&&(r.value=u.processingStart-u.startTime,r.entries.push(u),i(!0))},o=u=>{u.forEach(s)},c=Pi("first-input",o);i=bs(e,r,e3,t.reportAllChanges),c&&$o(tf(()=>{o(c.takeRecords()),c.disconnect()}))})};let dv=0,nf=1/0,Hc=0;const n3=e=>{e.forEach(t=>{t.interactionId&&(nf=Math.min(nf,t.interactionId),Hc=Math.max(Hc,t.interactionId),dv=Hc?(Hc-nf)/7+1:0)})};let rf;const r3=()=>rf?dv:performance.interactionCount||0,i3=()=>{"interactionCount"in performance||rf||(rf=Pi("event",n3,{type:"event",buffered:!0,durationThreshold:0}))},s3=[200,500],o3=0,fv=()=>r3()-o3,hv=10,Mr=[],sf={},pv=e=>{const t=Mr[Mr.length-1],n=sf[e.interactionId];if(n||Mr.length<hv||t&&e.duration>t.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{const r={id:e.interactionId,latency:e.duration,entries:[e]};sf[r.id]=r,Mr.push(r)}Mr.sort((r,i)=>i.latency-r.latency),Mr.splice(hv).forEach(r=>{delete sf[r.id]})}},a3=()=>{const e=Math.min(Mr.length-1,Math.floor(fv()/50));return Mr[e]},c3=(e,t={})=>{Ho(()=>{i3();const n=ws("INP");let r;const i=o=>{o.forEach(u=>{u.interactionId&&pv(u),u.entryType==="first-input"&&!Mr.some(f=>f.entries.some(h=>u.duration===h.duration&&u.startTime===h.startTime))&&pv(u)});const c=a3();c&&c.latency!==n.value&&(n.value=c.latency,n.entries=c.entries,r())},s=Pi("event",i,{durationThreshold:t.durationThreshold!=null?t.durationThreshold:40});r=bs(e,n,s3,t.reportAllChanges),s&&("PerformanceEventTiming"in je&&"interactionId"in PerformanceEventTiming.prototype&&s.observe({type:"first-input",buffered:!0}),$o(()=>{i(s.takeRecords()),n.value<0&&fv()>0&&(n.value=0,n.entries=[]),r(!0)}))})},u3=[2500,4e3],mv={},l3=(e,t={})=>{Ho(()=>{const n=Gc(),r=ws("LCP");let i;const s=c=>{const u=c[c.length-1];u&&u.startTime<n.firstHiddenTime&&(r.value=Math.max(u.startTime-qo(),0),r.entries=[u],i())},o=Pi("largest-contentful-paint",s);if(o){i=bs(e,r,u3,t.reportAllChanges);const c=tf(()=>{mv[r.id]||(s(o.takeRecords()),o.disconnect(),mv[r.id]=!0,i(!0))});["keydown","click"].forEach(u=>{je.document&&addEventListener(u,()=>setTimeout(c,0),!0)}),$o(c)}})},d3=[800,1800],of=e=>{je.document&&je.document.prerendering?Ho(()=>of(e)):je.document&&je.document.readyState!=="complete"?addEventListener("load",()=>of(e),!0):setTimeout(e,0)},f3=(e,t={})=>{const n=ws("TTFB"),r=bs(e,n,d3,t.reportAllChanges);of(()=>{const i=Vo();if(i){const s=i.responseStart;if(s<=0||s>performance.now())return;n.value=Math.max(s-qo(),0),n.entries=[i],r(!0)}})},Yo={},Yc={};let gv,yv,vv,bv,wv;function af(e,t=!1){return Wo("cls",e,p3,gv,t)}function Ev(e,t=!1){return Wo("lcp",e,g3,vv,t)}function Sv(e){return Wo("fid",e,m3,yv)}function h3(e){return Wo("ttfb",e,y3,bv)}function xv(e){return Wo("inp",e,v3,wv)}function Es(e,t){return _v(e,t),Yc[e]||(b3(e),Yc[e]=!0),Cv(e,t)}function Ss(e,t){const n=Yo[e];if(!(!n||!n.length))for(const r of n)try{r(t)}catch(i){Ln&&Se.error(`Error while triggering instrumentation handler.
121
121
  Type: ${e}
122
- Name: ${Or(r)}
123
- Error:`,i)}}function ak(){return Y5(e=>{xs("cls",{metric:e}),hv=e},{reportAllChanges:!0})}function ck(){return K5(e=>{xs("fid",{metric:e}),pv=e})}function uk(){return rk(e=>{xs("lcp",{metric:e}),mv=e},{reportAllChanges:!0})}function lk(){return sk(e=>{xs("ttfb",{metric:e}),gv=e})}function dk(){return tk(e=>{xs("inp",{metric:e}),yv=e})}function Wo(e,t,n,r,i=!1){Ev(e,t);let s;return Hc[e]||(s=n(),Hc[e]=!0),r&&t({metric:r}),Sv(e,t,i?s:void 0)}function fk(e){const t={};e==="event"&&(t.durationThreshold=0),Li(e,n=>{xs(e,{entries:n})},t)}function Ev(e,t){Yo[e]=Yo[e]||[],Yo[e].push(t)}function Sv(e,t,n){return()=>{n&&n();const r=Yo[e];if(!r)return;const i=r.indexOf(t);i!==-1&&r.splice(i,1)}}function hk(e){return"duration"in e}function of(e){return typeof e=="number"&&isFinite(e)}function _s(e,t,n,{...r}){const i=ot(e).start_timestamp;return i&&i>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),Ny(e,()=>{const s=fi({startTime:t,...r});return s&&s.end(n),s})}function xv(e){const t=Je();if(!t)return;const{name:n,transaction:r,attributes:i,startTime:s}=e,{release:o,environment:c}=t.getOptions(),u=t.getIntegrationByName("Replay"),d=u&&u.getReplayId(),f=bt(),p=f.getUser(),l=p!==void 0?p.email||p.id||p.ip_address:void 0;let v;try{v=f.getScopeData().contexts.profile.profile_id}catch{}const a={release:o,environment:c,user:l||void 0,profile_id:v||void 0,replay_id:d||void 0,transaction:r,"user_agent.original":je.navigator&&je.navigator.userAgent,...i};return fi({name:n,attributes:a,startTime:s,experimental:{standalone:!0}})}function af(){return je&&je.addEventListener&&je.performance}function Ht(e){return e/1e3}function pk(){let e=0,t,n;if(!gk())return;let r=!1;function i(){r||(r=!0,n&&mk(e,t,n),s())}const s=sf(({metric:o})=>{const c=o.entries[o.entries.length-1];c&&(e=o.value,t=c)},!0);$o(()=>{i()}),setTimeout(()=>{const o=Je(),c=Pn([o,"optionalAccess",p=>p.on,"call",p=>p("startNavigationSpan",()=>{i(),c&&c()})]),u=cn(),d=u&&an(u),f=d&&ot(d);f&&f.op==="pageload"&&(n=d.spanContext().spanId)},0)}function mk(e,t,n){Ln&&Se.log(`Sending CLS span (${e})`);const r=Ht((wn||0)+(Pn([t,"optionalAccess",u=>u.startTime])||0)),i=bt().getScopeData().transactionName,s=t?kr(Pn([t,"access",u=>u.sources,"access",u=>u[0],"optionalAccess",u=>u.node])):"Layout shift",o=zt({[Qt]:"auto.http.browser.cls",[li]:"ui.webvital.cls",[Ud]:Pn([t,"optionalAccess",u=>u.duration])||0,"sentry.pageload.span_id":n}),c=xv({name:s,transaction:i,attributes:o,startTime:r});Pn([c,"optionalAccess",u=>u.addEvent,"call",u=>u("cls",{[Pc]:"",[jc]:e})]),Pn([c,"optionalAccess",u=>u.end,"call",u=>u(r)])}function gk(){try{return Pn([PerformanceObserver,"access",e=>e.supportedEntryTypes,"optionalAccess",e=>e.includes,"call",e=>e("layout-shift")])}catch{return!1}}const yk=2147483647;let _v=0,un={},wr,Ko;function vk({recordClsStandaloneSpans:e}){const t=af();if(t&&wn){t.mark&&je.performance.mark("sentry-tracing-init");const n=_k(),r=xk(),i=Ck(),s=e?pk():Sk();return()=>{n(),r(),i(),s&&s()}}return()=>{}}function bk(){Ss("longtask",({entries:e})=>{if(cn())for(const t of e){const n=Ht(wn+t.startTime),r=Ht(t.duration),i=fi({name:"Main UI thread blocked",op:"ui.long-task",startTime:n,attributes:{[Qt]:"auto.ui.browser.metrics"}});i&&i.end(n+r)}})}function wk(){new PerformanceObserver(t=>{if(cn())for(const n of t.getEntries()){if(!n.scripts[0])continue;const r=Ht(wn+n.startTime),i=Ht(n.duration),s={[Qt]:"auto.ui.browser.metrics"},o=n.scripts[0],{invoker:c,invokerType:u,sourceURL:d,sourceFunctionName:f,sourceCharPosition:p}=o;s["browser.script.invoker"]=c,s["browser.script.invoker_type"]=u,d&&(s["code.filepath"]=d),f&&(s["code.function"]=f),p!==-1&&(s["browser.script.source_char_position"]=p);const l=fi({name:"Main UI thread blocked",op:"ui.long-animation-frame",startTime:r,attributes:s});l&&l.end(r+i)}}).observe({type:"long-animation-frame",buffered:!0})}function Ek(){Ss("event",({entries:e})=>{if(cn()){for(const t of e)if(t.name==="click"){const n=Ht(wn+t.startTime),r=Ht(t.duration),i={name:kr(t.target),op:`ui.interaction.${t.name}`,startTime:n,attributes:{[Qt]:"auto.ui.browser.metrics"}},s=O0(t.target);s&&(i.attributes["ui.component_name"]=s);const o=fi(i);o&&o.end(n+r)}}})}function Sk(){return sf(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Ln&&Se.log(`[Measurements] Adding CLS ${e.value}`),un.cls={value:e.value,unit:""},Ko=t)},!0)}function xk(){return vv(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Ln&&Se.log("[Measurements] Adding LCP"),un.lcp={value:e.value,unit:"millisecond"},wr=t)},!0)}function _k(){return bv(({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const n=Ht(wn),r=Ht(t.startTime);Ln&&Se.log("[Measurements] Adding FID"),un.fid={value:e.value,unit:"millisecond"},un["mark.fid"]={value:n+r,unit:"second"}})}function Ck(){return ok(({metric:e})=>{e.entries[e.entries.length-1]&&(Ln&&Se.log("[Measurements] Adding TTFB"),un.ttfb={value:e.value,unit:"millisecond"})})}function Ak(e,t){const n=af();if(!n||!je.performance.getEntries||!wn)return;Ln&&Se.log("[Tracing] Adding & adjusting spans using Performance API");const r=Ht(wn),i=n.getEntries(),{op:s,start_timestamp:o}=ot(e);if(i.slice(_v).forEach(c=>{const u=Ht(c.startTime),d=Ht(Math.max(0,c.duration));if(!(s==="navigation"&&o&&r+u<o))switch(c.entryType){case"navigation":{Ik(e,c,r);break}case"mark":case"paint":case"measure":{Tk(e,c,u,d,r);const f=$c(),p=c.startTime<f.firstHiddenTime;c.name==="first-paint"&&p&&(Ln&&Se.log("[Measurements] Adding FP"),un.fp={value:c.startTime,unit:"millisecond"}),c.name==="first-contentful-paint"&&p&&(Ln&&Se.log("[Measurements] Adding FCP"),un.fcp={value:c.startTime,unit:"millisecond"});break}case"resource":{Ok(e,c,c.name,u,d,r);break}}}),_v=Math.max(i.length-1,0),Rk(e),s==="pageload"){Mk(un);const c=un["mark.fid"];c&&un.fid&&(_s(e,c.value,c.value+Ht(un.fid.value),{name:"first input delay",op:"ui.action",attributes:{[Qt]:"auto.ui.browser.metrics"}}),delete un["mark.fid"]),(!("fcp"in un)||!t.recordClsOnPageloadSpan)&&delete un.cls,Object.entries(un).forEach(([u,d])=>{s4(u,d.value,d.unit)}),e.setAttribute("performance.timeOrigin",r),e.setAttribute("performance.activationStart",Vo()),Nk(e)}wr=void 0,Ko=void 0,un={}}function Tk(e,t,n,r,i){const s=qo(),o=Ht(s?s.requestStart:0),c=i+Math.max(n,o),u=i+n,d=u+r,f={[Qt]:"auto.resource.browser.metrics"};return c!==u&&(f["sentry.browser.measure_happened_before_request"]=!0,f["sentry.browser.measure_start_time"]=c),_s(e,c,d,{name:t.name,op:t.entryType,attributes:f}),c}function Ik(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Yc(e,t,r,n)}),Yc(e,t,"secureConnection",n,"TLS/SSL","connectEnd"),Yc(e,t,"fetch",n,"cache","domainLookupStart"),Yc(e,t,"domainLookup",n,"DNS"),kk(e,t,n)}function Yc(e,t,n,r,i,s){const o=s?t[s]:t[`${n}End`],c=t[`${n}Start`];!c||!o||_s(e,r+Ht(c),r+Ht(o),{op:`browser.${i||n}`,name:t.name,attributes:{[Qt]:"auto.ui.browser.metrics"}})}function kk(e,t,n){const r=n+Ht(t.requestStart),i=n+Ht(t.responseEnd),s=n+Ht(t.responseStart);t.responseEnd&&(_s(e,r,i,{op:"browser.request",name:t.name,attributes:{[Qt]:"auto.ui.browser.metrics"}}),_s(e,s,i,{op:"browser.response",name:t.name,attributes:{[Qt]:"auto.ui.browser.metrics"}}))}function Ok(e,t,n,r,i,s){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const o=Ni(n),c={[Qt]:"auto.resource.browser.metrics"};cf(c,t,"transferSize","http.response_transfer_size"),cf(c,t,"encodedBodySize","http.response_content_length"),cf(c,t,"decodedBodySize","http.decoded_response_content_length"),"renderBlockingStatus"in t&&(c["resource.render_blocking_status"]=t.renderBlockingStatus),o.protocol&&(c["url.scheme"]=o.protocol.split(":").pop()),o.host&&(c["server.address"]=o.host),c["url.same_origin"]=n.includes(je.location.origin);const u=s+r,d=u+i;_s(e,u,d,{name:n.replace(je.location.origin,""),op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",attributes:c})}function Rk(e){const t=je.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),of(n.rtt)&&(un["connection.rtt"]={value:n.rtt,unit:"millisecond"})),of(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),of(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function Nk(e){wr&&(Ln&&Se.log("[Measurements] Adding LCP Data"),wr.element&&e.setAttribute("lcp.element",kr(wr.element)),wr.id&&e.setAttribute("lcp.id",wr.id),wr.url&&e.setAttribute("lcp.url",wr.url.trim().slice(0,200)),e.setAttribute("lcp.size",wr.size)),Ko&&Ko.sources&&(Ln&&Se.log("[Measurements] Adding CLS Data"),Ko.sources.forEach((t,n)=>e.setAttribute(`cls.source.${n+1}`,kr(t.node))))}function cf(e,t,n,r){const i=t[n];i!=null&&i<yk&&(e[r]=i)}function Mk(e){const t=qo();if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(Ln&&Se.log("[Measurements] Adding TTFB Request Time"),e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}const Dk=1e3;let Cv,uf,lf;function Av(e){const t="dom";oi(t,e),ai(t,Pk)}function Pk(){if(!je.document)return;const e=Yn.bind(null,"dom"),t=Tv(e,!0);je.document.addEventListener("click",t,!1),je.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const r=je[n]&&je[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(kn(r,"addEventListener",function(i){return function(s,o,c){if(s==="click"||s=="keypress")try{const u=this,d=u.__sentry_instrumentation_handlers__=u.__sentry_instrumentation_handlers__||{},f=d[s]=d[s]||{refCount:0};if(!f.handler){const p=Tv(e);f.handler=p,i.call(this,s,p,c)}f.refCount++}catch{}return i.call(this,s,o,c)}}),kn(r,"removeEventListener",function(i){return function(s,o,c){if(s==="click"||s=="keypress")try{const u=this,d=u.__sentry_instrumentation_handlers__||{},f=d[s];f&&(f.refCount--,f.refCount<=0&&(i.call(this,s,f.handler,c),f.handler=void 0,delete d[s]),Object.keys(d).length===0&&delete u.__sentry_instrumentation_handlers__)}catch{}return i.call(this,s,o,c)}}))})}function jk(e){if(e.type!==uf)return!1;try{if(!e.target||e.target._sentryId!==lf)return!1}catch{}return!0}function Lk(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function Tv(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=Bk(n);if(Lk(n.type,r))return;Hn(n,"_sentryCaptured",!0),r&&!r._sentryId&&Hn(r,"_sentryId",Ct());const i=n.type==="keypress"?"input":n.type;jk(n)||(e({event:n,name:i,global:t}),uf=n.type,lf=r?r._sentryId:void 0),clearTimeout(Cv),Cv=je.setTimeout(()=>{lf=void 0,uf=void 0},Dk)}}function Bk(e){try{return e.target}catch{return null}}let Wc;function Kc(e){const t="history";oi(t,e),ai(t,Fk)}function Fk(){if(!kI())return;const e=je.onpopstate;je.onpopstate=function(...n){const r=je.location.href,i=Wc;if(Wc=r,Yn("history",{from:i,to:r}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(...r){const i=r.length>2?r[2]:void 0;if(i){const s=Wc,o=String(i);Wc=o,Yn("history",{from:s,to:o})}return n.apply(this,r)}}kn(je.history,"pushState",t),kn(je.history,"replaceState",t)}const zc={};function Iv(e){const t=zc[e];if(t)return t;let n=je[e];if(Td(n))return zc[e]=n.bind(je);const r=je.document;if(r&&typeof r.createElement=="function")try{const i=r.createElement("iframe");i.hidden=!0,r.head.appendChild(i);const s=i.contentWindow;s&&s[e]&&(n=s[e]),r.head.removeChild(i)}catch(i){Ln&&Se.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,i)}return n&&(zc[e]=n.bind(je))}function kv(e){zc[e]=void 0}function Cs(...e){return Iv("setTimeout")(...e)}const Bi="__sentry_xhr_v3__";function Ov(e){const t="xhr";oi(t,e),ai(t,Uk)}function Uk(){if(!je.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const i=bn()*1e3,s=Tr(r[0])?r[0].toUpperCase():void 0,o=qk(r[1]);if(!s||!o)return t.apply(n,r);n[Bi]={method:s,url:o,request_headers:{}},s==="POST"&&o.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const c=()=>{const u=n[Bi];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const d={endTimestamp:bn()*1e3,startTimestamp:i,xhr:n};Yn("xhr",d)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,d,f){return c(),u.apply(d,f)}}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,d,f){const[p,l]=f,v=d[Bi];return v&&Tr(p)&&Tr(l)&&(v.request_headers[p.toLowerCase()]=l),u.apply(d,f)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const i=n[Bi];if(!i)return t.apply(n,r);r[0]!==void 0&&(i.body=r[0]);const s={startTimestamp:bn()*1e3,xhr:n};return Yn("xhr",s),t.apply(n,r)}})}function qk(e){if(Tr(e))return e;try{return e.toString()}catch{}}const df=[],Qc=new Map;function Vk(){if(af()&&wn){const t=$k();return()=>{t()}}return()=>{}}const Rv={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 $k(){return wv(({metric:e})=>{if(e.value==null)return;const t=e.entries.find(a=>a.duration===e.value&&Rv[a.name]);if(!t)return;const{interactionId:n}=t,r=Rv[t.name],i=Ht(wn+t.startTime),s=Ht(e.value),o=cn(),c=o?an(o):void 0,d=(n!=null?Qc.get(n):void 0)||c,f=d?ot(d).description:bt().getScopeData().transactionName,p=kr(t.target),l=zt({[Qt]:"auto.http.browser.inp",[li]:`ui.interaction.${r}`,[Ud]:t.duration}),v=xv({name:p,transaction:f,attributes:l,startTime:i});Pn([v,"optionalAccess",a=>a.addEvent,"call",a=>a("inp",{[Pc]:"millisecond",[jc]:e.value})]),Pn([v,"optionalAccess",a=>a.end,"call",a=>a(i+s)])})}function Gk(e){const t=({entries:n})=>{const r=cn(),i=r&&an(r);n.forEach(s=>{if(!hk(s)||!i)return;const o=s.interactionId;if(o!=null&&!Qc.has(o)){if(df.length>10){const c=df.shift();Qc.delete(c)}df.push(o),Qc.set(o,i)}})};Ss("event",t),Ss("first-input",t)}function Hk(e,t=Iv("fetch")){let n=0,r=0;function i(s){const o=s.body.length;n+=o,r++;const c={body:s.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return kv("fetch"),Oc("No fetch implementation available");try{return t(e.url,c).then(u=>(n-=o,r--,{statusCode:u.status,headers:{"x-sentry-rate-limits":u.headers.get("X-Sentry-Rate-Limits"),"retry-after":u.headers.get("Retry-After")}}))}catch(u){return kv("fetch"),n-=o,r--,Oc(u)}}return z4(e,i)}const Yk=30,Wk=50;function ff(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 Kk=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,zk=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Qk=/\((\S*)(?::(\d+))(?::(\d+))\)/,Jk=[Yk,e=>{const t=Kk.exec(e);if(t){const[,r,i,s]=t;return ff(r,Ri,+i,+s)}const n=zk.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){const o=Qk.exec(n[2]);o&&(n[2]=o[1],n[3]=o[2],n[4]=o[3])}const[i,s]=Nv(n[1]||Ri,n[2]);return ff(s,i,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],Zk=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Xk=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,eO=U0(...[Jk,[Wk,e=>{const t=Zk.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const s=Xk.exec(t[3]);s&&(t[1]=t[1]||"eval",t[3]=s[1],t[4]=s[2],t[5]="")}let r=t[3],i=t[1]||Ri;return[i,r]=Nv(i,r),ff(r,i,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]),Nv=(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]},Jc=1024,tO="Breadcrumbs",nO=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:tO,setup(n){t.console&&GT(sO(n)),t.dom&&Av(iO(n,t.dom)),t.xhr&&Ov(oO(n)),t.fetch&&H0(aO(n)),t.history&&Kc(cO(n)),t.sentry&&n.on("beforeSendEvent",rO(n))}}};function rO(e){return function(n){Je()===e&&hi({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:ci(n)},{event:n})}}function iO(e,t){return function(r){if(Je()!==e)return;let i,s,o=typeof t=="object"?t.serializeAttribute:void 0,c=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;c&&c>Jc&&(On&&Se.warn(`\`dom.maxStringLength\` cannot exceed ${Jc}, but a value of ${c} was configured. Sentry will use ${Jc} instead.`),c=Jc),typeof o=="string"&&(o=[o]);try{const d=r.event,f=uO(d)?d.target:d;i=kr(f,{keyAttrs:o,maxStringLength:c}),s=O0(f)}catch{i="<unknown>"}if(i.length===0)return;const u={category:`ui.${r.name}`,message:i};s&&(u.data={"ui.component_name":s}),hi(u,{event:r.event,name:r.name,global:r.global})}}function sO(e){return function(n){if(Je()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:ty(n.level),message:C0(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${C0(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;hi(r,{input:n.args,level:n.level})}}function oO(e){return function(n){if(Je()!==e)return;const{startTimestamp:r,endTimestamp:i}=n,s=n.xhr[Bi];if(!r||!i||!s)return;const{method:o,url:c,status_code:u,body:d}=s,f={method:o,url:c,status_code:u},p={xhr:n.xhr,input:d,startTimestamp:r,endTimestamp:i},l=I0(u);hi({category:"xhr",data:f,type:"http",level:l},p)}}function aO(e){return function(n){if(Je()!==e)return;const{startTimestamp:r,endTimestamp:i}=n;if(i&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const s=n.fetchData,o={data:n.error,input:n.args,startTimestamp:r,endTimestamp:i};hi({category:"fetch",data:s,level:"error",type:"http"},o)}else{const s=n.response,o={...n.fetchData,status_code:s&&s.status},c={input:n.args,response:s,startTimestamp:r,endTimestamp:i},u=I0(o.status_code);hi({category:"fetch",data:o,type:"http",level:u},c)}}}function cO(e){return function(n){if(Je()!==e)return;let r=n.from,i=n.to;const s=Ni(Ne.location.href);let o=r?Ni(r):void 0;const c=Ni(i);(!o||!o.path)&&(o=s),s.protocol===c.protocol&&s.host===c.host&&(i=c.relative),s.protocol===o.protocol&&s.host===o.host&&(r=o.relative),hi({category:"navigation",data:{from:r,to:i}})}}function uO(e){return!!e&&!!e.target}const lO=["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"],dO="BrowserApiErrors",fO=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:dO,setupOnce(){t.setTimeout&&kn(Ne,"setTimeout",Mv),t.setInterval&&kn(Ne,"setInterval",Mv),t.requestAnimationFrame&&kn(Ne,"requestAnimationFrame",hO),t.XMLHttpRequest&&"XMLHttpRequest"in Ne&&kn(XMLHttpRequest.prototype,"send",pO);const n=t.eventTarget;n&&(Array.isArray(n)?n:lO).forEach(mO)}}};function Mv(e){return function(...t){const n=t[0];return t[0]=bs(n,{mechanism:{data:{function:Or(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function hO(e){return function(t){return e.apply(this,[bs(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Or(e)},handled:!1,type:"instrument"}})])}}function pO(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in n&&typeof n[i]=="function"&&kn(n,i,function(s){const o={mechanism:{data:{function:i,handler:Or(s)},handled:!1,type:"instrument"}},c=xd(s);return c&&(o.mechanism.data.handler=Or(c)),bs(s,o)})}),e.apply(this,t)}}function mO(e){const t=Ne,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(kn(n,"addEventListener",function(r){return function(i,s,o){try{typeof s.handleEvent=="function"&&(s.handleEvent=bs(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Or(s),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[i,bs(s,{mechanism:{data:{function:"addEventListener",handler:Or(s),target:e},handled:!1,type:"instrument"}}),o])}}),kn(n,"removeEventListener",function(r){return function(i,s,o){const c=s;try{const u=c&&c.__sentry_wrapped__;u&&r.call(this,i,u,o)}catch{}return r.call(this,i,c,o)}}))}const gO="GlobalHandlers",yO=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:gO,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(vO(n),Dv("onerror")),t.onunhandledrejection&&(bO(n),Dv("onunhandledrejection"))}}};function vO(e){K0(t=>{const{stackParser:n,attachStacktrace:r}=Pv();if(Je()!==e||ov())return;const{msg:i,url:s,line:o,column:c,error:u}=t,d=SO(Jd(n,u||i,void 0,r,!1),s,o,c);d.level="error",Fy(d,{originalException:u,mechanism:{handled:!1,type:"onerror"}})})}function bO(e){z0(t=>{const{stackParser:n,attachStacktrace:r}=Pv();if(Je()!==e||ov())return;const i=wO(t),s=wd(i)?EO(i):Jd(n,i,void 0,r,!0);s.level="error",Fy(s,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function wO(e){if(wd(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 EO(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function SO(e,t,n,r){const i=e.exception=e.exception||{},s=i.values=i.values||[],o=s[0]=s[0]||{},c=o.stacktrace=o.stacktrace||{},u=c.frames=c.frames||[],d=isNaN(parseInt(r,10))?void 0:r,f=isNaN(parseInt(n,10))?void 0:n,p=Tr(t)&&t.length>0?t:k0();return u.length===0&&u.push({colno:d,filename:p,function:Ri,in_app:!0,lineno:f}),e}function Dv(e){On&&Se.log(`Global Handler attached: ${e}`)}function Pv(){const e=Je();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const xO=()=>({name:"HttpContext",preprocessEvent(e){if(!Ne.navigator&&!Ne.location&&!Ne.document)return;const t=e.request&&e.request.url||Ne.location&&Ne.location.href,{referrer:n}=Ne.document||{},{userAgent:r}=Ne.navigator||{},i={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},s={...e.request,...t&&{url:t},headers:i};e.request=s}}),_O="cause",CO=5,AO="LinkedErrors",TO=(e={})=>{const t=e.limit||CO,n=e.key||_O;return{name:AO,preprocessEvent(r,i,s){const o=s.getOptions();IT(Kd,o.stackParser,o.maxValueLength,n,t,r,i)}}};function IO(e){return[i5(),t5(),fO(),nO(),yO(),TO(),g5(),xO()]}function kO(e={}){const t={defaultIntegrations:IO(),release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:Ne.SENTRY_RELEASE&&Ne.SENTRY_RELEASE.id?Ne.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return e.defaultIntegrations==null&&delete e.defaultIntegrations,{...t,...e}}function OO(){const e=typeof Ne.window<"u"&&Ne;if(!e)return!1;const t=e.chrome?"chrome":"browser",n=e[t],r=n&&n.runtime&&n.runtime.id,i=Ne.location&&Ne.location.href||"",s=["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"],o=!!r&&Ne===Ne.top&&s.some(u=>i.startsWith(`${u}//`)),c=typeof e.nw<"u";return!!r&&!o&&!c}function RO(e={}){const t=kO(e);if(OO()){hs(()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")});return}On&&($0()||Se.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill."));const n={...t,stackParser:VT(t.stackParser||eO),integrations:q4(t),transport:t.transport||Hk},r=Y4(B5,n);return t.autoSessionTracking&&NO(),r}function jv(e={}){if(!Ne.document){On&&Se.error("Global document not defined in showReportDialog call");return}const t=bt(),n=t.getClient(),r=n&&n.getDsn();if(!r){On&&Se.error("DSN not configured for showReportDialog call");return}if(t&&(e.user={...t.getUser(),...e.user}),!e.eventId){const c=M4();c&&(e.eventId=c)}const i=Ne.document.createElement("script");i.async=!0,i.crossOrigin="anonymous",i.src=F4(r,e),e.onLoad&&(i.onload=e.onLoad);const{onClose:s}=e;if(s){const c=u=>{if(u.data==="__sentry_reportdialog_closed__")try{s()}finally{Ne.removeEventListener("message",c)}};Ne.addEventListener("message",c)}const o=Ne.document.head||Ne.document.body;o?o.appendChild(i):On&&Se.error("Not injecting report dialog. No injection point found in HTML")}function NO(){if(typeof Ne.document>"u"){On&&Se.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}qy({ignoreDuration:!0}),Gy(),Kc(({from:e,to:t})=>{e!==void 0&&e!==t&&(qy({ignoreDuration:!0}),Gy())})}const Et=nt,hf="sentryReplaySession",MO="replay_event",pf="Unable to send Replay",DO=3e5,PO=9e5,jO=5e3,LO=5500,BO=6e4,FO=5e3,UO=3,Lv=15e4,Zc=5e3,qO=3e3,VO=300,mf=2e7,$O=4999,GO=15e3,Bv=36e5;function gf(e,t){return e??t()}function zo(e){let t,n=e[0],r=1;for(;r<e.length;){const i=e[r],s=e[r+1];if(r+=2,(i==="optionalAccess"||i==="optionalCall")&&n==null)return;i==="access"||i==="optionalAccess"?(t=n,n=s(n)):(i==="call"||i==="optionalCall")&&(n=s((...o)=>n.call(t,...o)),t=void 0)}return n}var Jt;(function(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"})(Jt||(Jt={}));function HO(e){return e.nodeType===e.ELEMENT_NODE}function Qo(e){const t=zo([e,"optionalAccess",n=>n.host]);return zo([t,"optionalAccess",n=>n.shadowRoot])===e}function Jo(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function YO(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 WO(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 Xc(e){try{const t=e.rules||e.cssRules;return t?YO(Array.from(t,Fv).join("")):null}catch{return null}}function Fv(e){let t;if(zO(e))try{t=Xc(e.styleSheet)||WO(e)}catch{}else if(QO(e)&&e.selectorText.includes(":"))return KO(e.cssText);return t||e.cssText}function KO(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function zO(e){return"styleSheet"in e}function QO(e){return"selectorText"in e}class Uv{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){if(!t)return-1;const n=zo([this,"access",r=>r.getMeta,"call",r=>r(t),"optionalAccess",r=>r.id]);return gf(n,()=>-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 JO(){return new Uv}function eu({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 Zo({isMasked:e,element:t,value:n,maskInputFn:r}){let i=n||"";return e?(r&&(i=r(i,t)),"*".repeat(i.length)):i}function As(e){return e.toLowerCase()}function yf(e){return e.toUpperCase()}const qv="__rrweb_original__";function ZO(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 s=t.getImageData,o=qv in s?s[qv]:s;if(new Uint32Array(o.call(t,r,i,Math.min(n,e.width-r),Math.min(n,e.height-i)).data.buffer).some(u=>u!==0))return!1}return!0}function vf(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?As(t):null}function tu(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function Vv(e,t){let n;try{n=new URL(e,gf(t,()=>window.location.href))}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i,i=n.pathname.match(r);return gf(zo([i,"optionalAccess",s=>s[1]]),()=>null)}const $v={};function Gv(e){const t=$v[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 s=i.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(i)}catch{}return $v[e]=r.bind(window)}function bf(...e){return Gv("setTimeout")(...e)}function Hv(...e){return Gv("clearTimeout")(...e)}let XO=1;const eR=new RegExp("[^a-z0-9-_:]"),Xo=-2;function wf(){return XO++}function tR(e){if(e instanceof HTMLFormElement)return"form";const t=As(e.tagName);return eR.test(t)?"div":t}function nR(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let Ts,Yv;const rR=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,iR=/^(?:[a-z+]+:)?\/\//i,sR=/^www\..*/i,oR=/^(data:)([^,]*),(.*)/i;function nu(e,t){return(e||"").replace(rR,(n,r,i,s,o,c)=>{const u=i||o||c,d=r||s||"";if(!u)return n;if(iR.test(u)||sR.test(u))return`url(${d}${u}${d})`;if(oR.test(u))return`url(${d}${u}${d})`;if(u[0]==="/")return`url(${d}${nR(t)+u}${d})`;const f=t.split("/"),p=u.split("/");f.pop();for(const l of p)l!=="."&&(l===".."?f.pop():f.push(l));return`url(${d}${f.join("/")}${d})`})}const aR=/^[^ \t\n\r\u000c]+/,cR=/^[, \t\n\r\u000c]+/;function uR(e,t){if(t.trim()==="")return t;let n=0;function r(s){let o;const c=s.exec(t.substring(n));return c?(o=c[0],n+=o.length,o):""}const i=[];for(;r(cR),!(n>=t.length);){let s=r(aR);if(s.slice(-1)===",")s=Is(e,s.substring(0,s.length-1)),i.push(s);else{let o="";s=Is(e,s);let c=!1;for(;;){const u=t.charAt(n);if(u===""){i.push((s+o).trim());break}else if(c)u===")"&&(c=!1);else if(u===","){n+=1,i.push((s+o).trim());break}else u==="("&&(c=!0);o+=u,n+=1}}}return i.join(", ")}const Wv=new WeakMap;function Is(e,t){return!t||t.trim()===""?t:ru(e,t)}function lR(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function ru(e,t){let n=Wv.get(e);if(n||(n=e.createElement("a"),Wv.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function Kv(e,t,n,r,i,s){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(t==="table"||t==="td"||t==="th")?Is(e,r):n==="srcset"?uR(e,r):n==="style"?nu(r,ru(e)):t==="object"&&n==="data"?Is(e,r):typeof s=="function"?s(n,r,i):r)}function zv(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function dR(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 s=e.classList[i];if(t.test(s))return!0}if(n)return e.matches(n)}catch{}return!1}function fR(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Fi(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Fi(e.parentNode,t,n,r+1)}function ks(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(fR(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function Os(e,t,n,r,i,s){try{const o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(o===null)return!1;if(o.tagName==="INPUT"){const d=o.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(d))return!0}let c=-1,u=-1;if(s){if(u=Fi(o,ks(r,i)),u<0)return!0;c=Fi(o,ks(t,n),u>=0?u:1/0)}else{if(c=Fi(o,ks(t,n)),c<0)return!1;u=Fi(o,ks(r,i),c>=0?c:1/0)}return c>=0?u>=0?c<=u:!0:u>=0?!1:!!s}catch{}return!!s}function hR(e,t,n){const r=e.contentWindow;if(!r)return;let i=!1,s;try{s=r.document.readyState}catch{return}if(s!=="complete"){const c=bf(()=>{i||(t(),i=!0)},n);e.addEventListener("load",()=>{Hv(c),i=!0,t()});return}const o="about:blank";if(r.location.href!==o||e.src===o||e.src==="")return bf(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function pR(e,t,n){let r=!1,i;try{i=e.sheet}catch{return}if(i)return;const s=bf(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{Hv(s),r=!0,t()})}function mR(e,t){const{doc:n,mirror:r,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:c,maskAttributeFn:u,maskTextClass:d,unmaskTextClass:f,maskTextSelector:p,unmaskTextSelector:l,inlineStylesheet:v,maskInputOptions:a={},maskTextFn:h,maskInputFn:y,dataURLOptions:g={},inlineImages:b,recordCanvas:w,keepIframeSrcFn:E,newlyAddedElement:S=!1}=t,A=gR(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Jt.Document,childNodes:[],compatMode:e.compatMode}:{type:Jt.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Jt.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:A};case e.ELEMENT_NODE:return vR(e,{doc:n,blockClass:i,blockSelector:s,unblockSelector:o,inlineStylesheet:v,maskAttributeFn:u,maskInputOptions:a,maskInputFn:y,dataURLOptions:g,inlineImages:b,recordCanvas:w,keepIframeSrcFn:E,newlyAddedElement:S,rootId:A,maskAllText:c,maskTextClass:d,unmaskTextClass:f,maskTextSelector:p,unmaskTextSelector:l});case e.TEXT_NODE:return yR(e,{doc:n,maskAllText:c,maskTextClass:d,unmaskTextClass:f,maskTextSelector:p,unmaskTextSelector:l,maskTextFn:h,maskInputOptions:a,maskInputFn:y,rootId:A});case e.CDATA_SECTION_NODE:return{type:Jt.CDATA,textContent:"",rootId:A};case e.COMMENT_NODE:return{type:Jt.Comment,textContent:e.textContent||"",rootId:A};default:return!1}}function gR(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function yR(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:i,maskTextSelector:s,unmaskTextSelector:o,maskTextFn:c,maskInputOptions:u,maskInputFn:d,rootId:f}=t,p=e.parentNode&&e.parentNode.tagName;let l=e.textContent;const v=p==="STYLE"?!0:void 0,a=p==="SCRIPT"?!0:void 0,h=p==="TEXTAREA"?!0:void 0;if(v&&l){try{e.nextSibling||e.previousSibling||zo([e,"access",g=>g.parentNode,"access",g=>g.sheet,"optionalAccess",g=>g.cssRules])&&(l=Xc(e.parentNode.sheet))}catch(g){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${g}`,e)}l=nu(l,ru(t.doc))}a&&(l="SCRIPT_PLACEHOLDER");const y=Os(e,r,s,i,o,n);if(!v&&!a&&!h&&l&&y&&(l=c?c(l,e.parentElement):l.replace(/[\S]/g,"*")),h&&l&&(u.textarea||y)&&(l=d?d(l,e.parentNode):l.replace(/[\S]/g,"*")),p==="OPTION"&&l){const g=eu({type:null,tagName:p,maskInputOptions:u});l=Zo({isMasked:Os(e,r,s,i,o,g),element:e,value:l,maskInputFn:d})}return{type:Jt.Text,textContent:l||"",isStyle:v,rootId:f}}function vR(e,t){const{doc:n,blockClass:r,blockSelector:i,unblockSelector:s,inlineStylesheet:o,maskInputOptions:c={},maskAttributeFn:u,maskInputFn:d,dataURLOptions:f={},inlineImages:p,recordCanvas:l,keepIframeSrcFn:v,newlyAddedElement:a=!1,rootId:h,maskAllText:y,maskTextClass:g,unmaskTextClass:b,maskTextSelector:w,unmaskTextSelector:E}=t,S=dR(e,r,i,s),A=tR(e);let T={};const O=e.attributes.length;for(let D=0;D<O;D++){const U=e.attributes[D];U.name&&!zv(A,U.name,U.value)&&(T[U.name]=Kv(n,A,As(U.name),U.value,e,u))}if(A==="link"&&o){const D=Array.from(n.styleSheets).find(q=>q.href===e.href);let U=null;D&&(U=Xc(D)),U&&(delete T.rel,delete T.href,T._cssText=nu(U,D.href))}if(A==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const D=Xc(e.sheet);D&&(T._cssText=nu(D,ru(n)))}if(A==="input"||A==="textarea"||A==="select"||A==="option"){const D=e,U=vf(D),q=tu(D,yf(A),U),F=D.checked;if(U!=="submit"&&U!=="button"&&q){const V=Os(D,g,w,b,E,eu({type:U,tagName:yf(A),maskInputOptions:c}));T.value=Zo({isMasked:V,element:D,value:q,maskInputFn:d})}F&&(T.checked=F)}if(A==="option"&&(e.selected&&!c.select?T.selected=!0:delete T.selected),A==="canvas"&&l){if(e.__context==="2d")ZO(e)||(T.rr_dataURL=e.toDataURL(f.type,f.quality));else if(!("__context"in e)){const D=e.toDataURL(f.type,f.quality),U=n.createElement("canvas");U.width=e.width,U.height=e.height;const q=U.toDataURL(f.type,f.quality);D!==q&&(T.rr_dataURL=D)}}if(A==="img"&&p){Ts||(Ts=n.createElement("canvas"),Yv=Ts.getContext("2d"));const D=e,U=D.currentSrc||D.getAttribute("src")||"<unknown-src>",q=D.crossOrigin,F=()=>{D.removeEventListener("load",F);try{Ts.width=D.naturalWidth,Ts.height=D.naturalHeight,Yv.drawImage(D,0,0),T.rr_dataURL=Ts.toDataURL(f.type,f.quality)}catch(V){if(D.crossOrigin!=="anonymous"){D.crossOrigin="anonymous",D.complete&&D.naturalWidth!==0?F():D.addEventListener("load",F);return}else console.warn(`Cannot inline img src=${U}! Error: ${V}`)}D.crossOrigin==="anonymous"&&(q?T.crossOrigin=q:D.removeAttribute("crossorigin"))};D.complete&&D.naturalWidth!==0?F():D.addEventListener("load",F)}if((A==="audio"||A==="video")&&(T.rr_mediaState=e.paused?"paused":"played",T.rr_mediaCurrentTime=e.currentTime),a||(e.scrollLeft&&(T.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(T.rr_scrollTop=e.scrollTop)),S){const{width:D,height:U}=e.getBoundingClientRect();T={class:T.class,rr_width:`${D}px`,rr_height:`${U}px`}}A==="iframe"&&!v(T.src)&&(!S&&!e.contentDocument&&(T.rr_src=T.src),delete T.src);let N;try{customElements.get(A)&&(N=!0)}catch{}return{type:Jt.Element,tagName:A,attributes:T,childNodes:[],isSVG:lR(e)||void 0,needBlock:S,rootId:h,isCustom:N}}function St(e){return e==null?"":e.toLowerCase()}function bR(e,t){if(t.comment&&e.type===Jt.Comment)return!0;if(e.type===Jt.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&Vv(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(St(e.attributes.name).match(/^msapplication-tile(image|color)$/)||St(e.attributes.name)==="application-name"||St(e.attributes.rel)==="icon"||St(e.attributes.rel)==="apple-touch-icon"||St(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&St(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(St(e.attributes.property).match(/^(og|twitter|fb):/)||St(e.attributes.name).match(/^(og|twitter):/)||St(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(St(e.attributes.name)==="robots"||St(e.attributes.name)==="googlebot"||St(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(St(e.attributes.name)==="author"||St(e.attributes.name)==="generator"||St(e.attributes.name)==="framework"||St(e.attributes.name)==="publisher"||St(e.attributes.name)==="progid"||St(e.attributes.property).match(/^article:/)||St(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(St(e.attributes.name)==="google-site-verification"||St(e.attributes.name)==="yandex-verification"||St(e.attributes.name)==="csrf-token"||St(e.attributes.name)==="p:domain_verify"||St(e.attributes.name)==="verify-v1"||St(e.attributes.name)==="verification"||St(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Rs(e,t){const{doc:n,mirror:r,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,skipChild:l=!1,inlineStylesheet:v=!0,maskInputOptions:a={},maskAttributeFn:h,maskTextFn:y,maskInputFn:g,slimDOMOptions:b,dataURLOptions:w={},inlineImages:E=!1,recordCanvas:S=!1,onSerialize:A,onIframeLoad:T,iframeLoadTimeout:O=5e3,onStylesheetLoad:N,stylesheetLoadTimeout:D=5e3,keepIframeSrcFn:U=()=>!1,newlyAddedElement:q=!1}=t;let{preserveWhiteSpace:F=!0}=t;const V=mR(e,{doc:n,mirror:r,blockClass:i,blockSelector:s,maskAllText:c,unblockSelector:o,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:v,maskInputOptions:a,maskAttributeFn:h,maskTextFn:y,maskInputFn:g,dataURLOptions:w,inlineImages:E,recordCanvas:S,keepIframeSrcFn:U,newlyAddedElement:q});if(!V)return console.warn(e,"not serialized"),null;let R;r.hasNode(e)?R=r.getId(e):bR(V,b)||!F&&V.type===Jt.Text&&!V.isStyle&&!V.textContent.replace(/^\s+|\s+$/gm,"").length?R=Xo:R=wf();const L=Object.assign(V,{id:R});if(r.add(e,L),R===Xo)return null;A&&A(e);let W=!l;if(L.type===Jt.Element){W=W&&!L.needBlock,delete L.needBlock;const z=e.shadowRoot;z&&Jo(z)&&(L.isShadowHost=!0)}if((L.type===Jt.Document||L.type===Jt.Element)&&W){b.headWhitespace&&L.type===Jt.Element&&L.tagName==="head"&&(F=!1);const z={doc:n,mirror:r,blockClass:i,blockSelector:s,maskAllText:c,unblockSelector:o,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,skipChild:l,inlineStylesheet:v,maskInputOptions:a,maskAttributeFn:h,maskTextFn:y,maskInputFn:g,slimDOMOptions:b,dataURLOptions:w,inlineImages:E,recordCanvas:S,preserveWhiteSpace:F,onSerialize:A,onIframeLoad:T,iframeLoadTimeout:O,onStylesheetLoad:N,stylesheetLoadTimeout:D,keepIframeSrcFn:U};for(const Z of Array.from(e.childNodes)){const te=Rs(Z,z);te&&L.childNodes.push(te)}if(HO(e)&&e.shadowRoot)for(const Z of Array.from(e.shadowRoot.childNodes)){const te=Rs(Z,z);te&&(Jo(e.shadowRoot)&&(te.isShadow=!0),L.childNodes.push(te))}}return e.parentNode&&Qo(e.parentNode)&&Jo(e.parentNode)&&(L.isShadow=!0),L.type===Jt.Element&&L.tagName==="iframe"&&hR(e,()=>{const z=e.contentDocument;if(z&&T){const Z=Rs(z,{doc:z,mirror:r,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,skipChild:!1,inlineStylesheet:v,maskInputOptions:a,maskAttributeFn:h,maskTextFn:y,maskInputFn:g,slimDOMOptions:b,dataURLOptions:w,inlineImages:E,recordCanvas:S,preserveWhiteSpace:F,onSerialize:A,onIframeLoad:T,iframeLoadTimeout:O,onStylesheetLoad:N,stylesheetLoadTimeout:D,keepIframeSrcFn:U});Z&&T(e,Z)}},O),L.type===Jt.Element&&L.tagName==="link"&&typeof L.attributes.rel=="string"&&(L.attributes.rel==="stylesheet"||L.attributes.rel==="preload"&&typeof L.attributes.href=="string"&&Vv(L.attributes.href)==="css")&&pR(e,()=>{if(N){const z=Rs(e,{doc:n,mirror:r,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,skipChild:!1,inlineStylesheet:v,maskInputOptions:a,maskAttributeFn:h,maskTextFn:y,maskInputFn:g,slimDOMOptions:b,dataURLOptions:w,inlineImages:E,recordCanvas:S,preserveWhiteSpace:F,onSerialize:A,onIframeLoad:T,iframeLoadTimeout:O,onStylesheetLoad:N,stylesheetLoadTimeout:D,keepIframeSrcFn:U});z&&N(e,z)}},D),L}function wR(e,t){const{mirror:n=new Uv,blockClass:r="rr-block",blockSelector:i=null,unblockSelector:s=null,maskAllText:o=!1,maskTextClass:c="rr-mask",unmaskTextClass:u=null,maskTextSelector:d=null,unmaskTextSelector:f=null,inlineStylesheet:p=!0,inlineImages:l=!1,recordCanvas:v=!1,maskAllInputs:a=!1,maskAttributeFn:h,maskTextFn:y,maskInputFn:g,slimDOM:b=!1,dataURLOptions:w,preserveWhiteSpace:E,onSerialize:S,onIframeLoad:A,iframeLoadTimeout:T,onStylesheetLoad:O,stylesheetLoadTimeout:N,keepIframeSrcFn:D=()=>!1}=t||{};return Rs(e,{doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,maskAllText:o,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,skipChild:!1,inlineStylesheet:p,maskInputOptions:a===!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}:a===!1?{}:a,maskAttributeFn:h,maskTextFn:y,maskInputFn:g,slimDOMOptions:b===!0||b==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:b==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:b===!1?{}:b,dataURLOptions:w,inlineImages:l,recordCanvas:v,preserveWhiteSpace:E,onSerialize:S,onIframeLoad:A,iframeLoadTimeout:T,onStylesheetLoad:O,stylesheetLoadTimeout:N,keepIframeSrcFn:D,newlyAddedElement:!1})}function pi(e){let t,n=e[0],r=1;for(;r<e.length;){const i=e[r],s=e[r+1];if(r+=2,(i==="optionalAccess"||i==="optionalCall")&&n==null)return;i==="access"||i==="optionalAccess"?(t=n,n=s(n)):(i==="call"||i==="optionalCall")&&(n=s((...o)=>n.call(t,...o)),t=void 0)}return n}function En(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Ns=`Please stop import mirror directly. Instead of that,\r
122
+ Name: ${kr(r)}
123
+ Error:`,i)}}function p3(){return X5(e=>{Ss("cls",{metric:e}),gv=e},{reportAllChanges:!0})}function m3(){return t3(e=>{Ss("fid",{metric:e}),yv=e})}function g3(){return l3(e=>{Ss("lcp",{metric:e}),vv=e},{reportAllChanges:!0})}function y3(){return f3(e=>{Ss("ttfb",{metric:e}),bv=e})}function v3(){return c3(e=>{Ss("inp",{metric:e}),wv=e})}function Wo(e,t,n,r,i=!1){_v(e,t);let s;return Yc[e]||(s=n(),Yc[e]=!0),r&&t({metric:r}),Cv(e,t,i?s:void 0)}function b3(e){const t={};e==="event"&&(t.durationThreshold=0),Pi(e,n=>{Ss(e,{entries:n})},t)}function _v(e,t){Yo[e]=Yo[e]||[],Yo[e].push(t)}function Cv(e,t,n){return()=>{n&&n();const r=Yo[e];if(!r)return;const i=r.indexOf(t);i!==-1&&r.splice(i,1)}}function w3(e){return"duration"in e}function cf(e){return typeof e=="number"&&isFinite(e)}function xs(e,t,n,{...r}){const i=ot(e).start_timestamp;return i&&i>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),Py(e,()=>{const s=di({startTime:t,...r});return s&&s.end(n),s})}function Av(e){const t=Je();if(!t)return;const{name:n,transaction:r,attributes:i,startTime:s}=e,{release:o,environment:c}=t.getOptions(),u=t.getIntegrationByName("Replay"),d=u&&u.getReplayId(),f=bt(),h=f.getUser(),l=h!==void 0?h.email||h.id||h.ip_address:void 0;let b;try{b=f.getScopeData().contexts.profile.profile_id}catch{}const a={release:o,environment:c,user:l||void 0,profile_id:b||void 0,replay_id:d||void 0,transaction:r,"user_agent.original":je.navigator&&je.navigator.userAgent,...i};return di({name:n,attributes:a,startTime:s,experimental:{standalone:!0}})}function uf(){return je&&je.addEventListener&&je.performance}function Ht(e){return e/1e3}function E3(){let e=0,t,n;if(!x3())return;let r=!1;function i(){r||(r=!0,n&&S3(e,t,n),s())}const s=af(({metric:o})=>{const c=o.entries[o.entries.length-1];c&&(e=o.value,t=c)},!0);$o(()=>{i()}),setTimeout(()=>{const o=Je(),c=Pn([o,"optionalAccess",h=>h.on,"call",h=>h("startNavigationSpan",()=>{i(),c&&c()})]),u=un(),d=u&&cn(u),f=d&&ot(d);f&&f.op==="pageload"&&(n=d.spanContext().spanId)},0)}function S3(e,t,n){Ln&&Se.log(`Sending CLS span (${e})`);const r=Ht((En||0)+(Pn([t,"optionalAccess",u=>u.startTime])||0)),i=bt().getScopeData().transactionName,s=t?Ir(Pn([t,"access",u=>u.sources,"access",u=>u[0],"optionalAccess",u=>u.node])):"Layout shift",o=zt({[Qt]:"auto.http.browser.cls",[ui]:"ui.webvital.cls",[qd]:Pn([t,"optionalAccess",u=>u.duration])||0,"sentry.pageload.span_id":n}),c=Av({name:s,transaction:i,attributes:o,startTime:r});Pn([c,"optionalAccess",u=>u.addEvent,"call",u=>u("cls",{[jc]:"",[Lc]:e})]),Pn([c,"optionalAccess",u=>u.end,"call",u=>u(r)])}function x3(){try{return Pn([PerformanceObserver,"access",e=>e.supportedEntryTypes,"optionalAccess",e=>e.includes,"call",e=>e("layout-shift")])}catch{return!1}}const _3=2147483647;let Tv=0,ln={},vr,Ko;function C3({recordClsStandaloneSpans:e}){const t=uf();if(t&&En){t.mark&&je.performance.mark("sentry-tracing-init");const n=R3(),r=O3(),i=N3(),s=e?E3():k3();return()=>{n(),r(),i(),s&&s()}}return()=>{}}function A3(){Es("longtask",({entries:e})=>{if(un())for(const t of e){const n=Ht(En+t.startTime),r=Ht(t.duration),i=di({name:"Main UI thread blocked",op:"ui.long-task",startTime:n,attributes:{[Qt]:"auto.ui.browser.metrics"}});i&&i.end(n+r)}})}function T3(){new PerformanceObserver(t=>{if(un())for(const n of t.getEntries()){if(!n.scripts[0])continue;const r=Ht(En+n.startTime),i=Ht(n.duration),s={[Qt]:"auto.ui.browser.metrics"},o=n.scripts[0],{invoker:c,invokerType:u,sourceURL:d,sourceFunctionName:f,sourceCharPosition:h}=o;s["browser.script.invoker"]=c,s["browser.script.invoker_type"]=u,d&&(s["code.filepath"]=d),f&&(s["code.function"]=f),h!==-1&&(s["browser.script.source_char_position"]=h);const l=di({name:"Main UI thread blocked",op:"ui.long-animation-frame",startTime:r,attributes:s});l&&l.end(r+i)}}).observe({type:"long-animation-frame",buffered:!0})}function I3(){Es("event",({entries:e})=>{if(un()){for(const t of e)if(t.name==="click"){const n=Ht(En+t.startTime),r=Ht(t.duration),i={name:Ir(t.target),op:`ui.interaction.${t.name}`,startTime:n,attributes:{[Qt]:"auto.ui.browser.metrics"}},s=M0(t.target);s&&(i.attributes["ui.component_name"]=s);const o=di(i);o&&o.end(n+r)}}})}function k3(){return af(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Ln&&Se.log(`[Measurements] Adding CLS ${e.value}`),ln.cls={value:e.value,unit:""},Ko=t)},!0)}function O3(){return Ev(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Ln&&Se.log("[Measurements] Adding LCP"),ln.lcp={value:e.value,unit:"millisecond"},vr=t)},!0)}function R3(){return Sv(({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const n=Ht(En),r=Ht(t.startTime);Ln&&Se.log("[Measurements] Adding FID"),ln.fid={value:e.value,unit:"millisecond"},ln["mark.fid"]={value:n+r,unit:"second"}})}function N3(){return h3(({metric:e})=>{e.entries[e.entries.length-1]&&(Ln&&Se.log("[Measurements] Adding TTFB"),ln.ttfb={value:e.value,unit:"millisecond"})})}function M3(e,t){const n=uf();if(!n||!je.performance.getEntries||!En)return;Ln&&Se.log("[Tracing] Adding & adjusting spans using Performance API");const r=Ht(En),i=n.getEntries(),{op:s,start_timestamp:o}=ot(e);if(i.slice(Tv).forEach(c=>{const u=Ht(c.startTime),d=Ht(Math.max(0,c.duration));if(!(s==="navigation"&&o&&r+u<o))switch(c.entryType){case"navigation":{P3(e,c,r);break}case"mark":case"paint":case"measure":{D3(e,c,u,d,r);const f=Gc(),h=c.startTime<f.firstHiddenTime;c.name==="first-paint"&&h&&(Ln&&Se.log("[Measurements] Adding FP"),ln.fp={value:c.startTime,unit:"millisecond"}),c.name==="first-contentful-paint"&&h&&(Ln&&Se.log("[Measurements] Adding FCP"),ln.fcp={value:c.startTime,unit:"millisecond"});break}case"resource":{L3(e,c,c.name,u,d,r);break}}}),Tv=Math.max(i.length-1,0),B3(e),s==="pageload"){U3(ln);const c=ln["mark.fid"];c&&ln.fid&&(xs(e,c.value,c.value+Ht(ln.fid.value),{name:"first input delay",op:"ui.action",attributes:{[Qt]:"auto.ui.browser.metrics"}}),delete ln["mark.fid"]),(!("fcp"in ln)||!t.recordClsOnPageloadSpan)&&delete ln.cls,Object.entries(ln).forEach(([u,d])=>{fI(u,d.value,d.unit)}),e.setAttribute("performance.timeOrigin",r),e.setAttribute("performance.activationStart",qo()),F3(e)}vr=void 0,Ko=void 0,ln={}}function D3(e,t,n,r,i){const s=Vo(),o=Ht(s?s.requestStart:0),c=i+Math.max(n,o),u=i+n,d=u+r,f={[Qt]:"auto.resource.browser.metrics"};return c!==u&&(f["sentry.browser.measure_happened_before_request"]=!0,f["sentry.browser.measure_start_time"]=c),xs(e,c,d,{name:t.name,op:t.entryType,attributes:f}),c}function P3(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Wc(e,t,r,n)}),Wc(e,t,"secureConnection",n,"TLS/SSL","connectEnd"),Wc(e,t,"fetch",n,"cache","domainLookupStart"),Wc(e,t,"domainLookup",n,"DNS"),j3(e,t,n)}function Wc(e,t,n,r,i,s){const o=s?t[s]:t[`${n}End`],c=t[`${n}Start`];!c||!o||xs(e,r+Ht(c),r+Ht(o),{op:`browser.${i||n}`,name:t.name,attributes:{[Qt]:"auto.ui.browser.metrics"}})}function j3(e,t,n){const r=n+Ht(t.requestStart),i=n+Ht(t.responseEnd),s=n+Ht(t.responseStart);t.responseEnd&&(xs(e,r,i,{op:"browser.request",name:t.name,attributes:{[Qt]:"auto.ui.browser.metrics"}}),xs(e,s,i,{op:"browser.response",name:t.name,attributes:{[Qt]:"auto.ui.browser.metrics"}}))}function L3(e,t,n,r,i,s){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const o=Oi(n),c={[Qt]:"auto.resource.browser.metrics"};lf(c,t,"transferSize","http.response_transfer_size"),lf(c,t,"encodedBodySize","http.response_content_length"),lf(c,t,"decodedBodySize","http.decoded_response_content_length"),"renderBlockingStatus"in t&&(c["resource.render_blocking_status"]=t.renderBlockingStatus),o.protocol&&(c["url.scheme"]=o.protocol.split(":").pop()),o.host&&(c["server.address"]=o.host),c["url.same_origin"]=n.includes(je.location.origin);const u=s+r,d=u+i;xs(e,u,d,{name:n.replace(je.location.origin,""),op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",attributes:c})}function B3(e){const t=je.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),cf(n.rtt)&&(ln["connection.rtt"]={value:n.rtt,unit:"millisecond"})),cf(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),cf(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function F3(e){vr&&(Ln&&Se.log("[Measurements] Adding LCP Data"),vr.element&&e.setAttribute("lcp.element",Ir(vr.element)),vr.id&&e.setAttribute("lcp.id",vr.id),vr.url&&e.setAttribute("lcp.url",vr.url.trim().slice(0,200)),e.setAttribute("lcp.size",vr.size)),Ko&&Ko.sources&&(Ln&&Se.log("[Measurements] Adding CLS Data"),Ko.sources.forEach((t,n)=>e.setAttribute(`cls.source.${n+1}`,Ir(t.node))))}function lf(e,t,n,r){const i=t[n];i!=null&&i<_3&&(e[r]=i)}function U3(e){const t=Vo();if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(Ln&&Se.log("[Measurements] Adding TTFB Request Time"),e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}const V3=1e3;let Iv,df,ff;function kv(e){const t="dom";si(t,e),oi(t,q3)}function q3(){if(!je.document)return;const e=Wn.bind(null,"dom"),t=Ov(e,!0);je.document.addEventListener("click",t,!1),je.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const r=je[n]&&je[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(kn(r,"addEventListener",function(i){return function(s,o,c){if(s==="click"||s=="keypress")try{const u=this,d=u.__sentry_instrumentation_handlers__=u.__sentry_instrumentation_handlers__||{},f=d[s]=d[s]||{refCount:0};if(!f.handler){const h=Ov(e);f.handler=h,i.call(this,s,h,c)}f.refCount++}catch{}return i.call(this,s,o,c)}}),kn(r,"removeEventListener",function(i){return function(s,o,c){if(s==="click"||s=="keypress")try{const u=this,d=u.__sentry_instrumentation_handlers__||{},f=d[s];f&&(f.refCount--,f.refCount<=0&&(i.call(this,s,f.handler,c),f.handler=void 0,delete d[s]),Object.keys(d).length===0&&delete u.__sentry_instrumentation_handlers__)}catch{}return i.call(this,s,o,c)}}))})}function $3(e){if(e.type!==df)return!1;try{if(!e.target||e.target._sentryId!==ff)return!1}catch{}return!0}function G3(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function Ov(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=H3(n);if(G3(n.type,r))return;Yn(n,"_sentryCaptured",!0),r&&!r._sentryId&&Yn(r,"_sentryId",Ct());const i=n.type==="keypress"?"input":n.type;$3(n)||(e({event:n,name:i,global:t}),df=n.type,ff=r?r._sentryId:void 0),clearTimeout(Iv),Iv=je.setTimeout(()=>{ff=void 0,df=void 0},V3)}}function H3(e){try{return e.target}catch{return null}}let Kc;function zc(e){const t="history";si(t,e),oi(t,Y3)}function Y3(){if(!j4())return;const e=je.onpopstate;je.onpopstate=function(...n){const r=je.location.href,i=Kc;if(Kc=r,Wn("history",{from:i,to:r}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(...r){const i=r.length>2?r[2]:void 0;if(i){const s=Kc,o=String(i);Kc=o,Wn("history",{from:s,to:o})}return n.apply(this,r)}}kn(je.history,"pushState",t),kn(je.history,"replaceState",t)}const Qc={};function Rv(e){const t=Qc[e];if(t)return t;let n=je[e];if(kd(n))return Qc[e]=n.bind(je);const r=je.document;if(r&&typeof r.createElement=="function")try{const i=r.createElement("iframe");i.hidden=!0,r.head.appendChild(i);const s=i.contentWindow;s&&s[e]&&(n=s[e]),r.head.removeChild(i)}catch(i){Ln&&Se.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,i)}return n&&(Qc[e]=n.bind(je))}function Nv(e){Qc[e]=void 0}function _s(...e){return Rv("setTimeout")(...e)}const ji="__sentry_xhr_v3__";function Mv(e){const t="xhr";si(t,e),oi(t,W3)}function W3(){if(!je.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const i=wn()*1e3,s=Ar(r[0])?r[0].toUpperCase():void 0,o=K3(r[1]);if(!s||!o)return t.apply(n,r);n[ji]={method:s,url:o,request_headers:{}},s==="POST"&&o.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const c=()=>{const u=n[ji];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const d={endTimestamp:wn()*1e3,startTimestamp:i,xhr:n};Wn("xhr",d)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,d,f){return c(),u.apply(d,f)}}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,d,f){const[h,l]=f,b=d[ji];return b&&Ar(h)&&Ar(l)&&(b.request_headers[h.toLowerCase()]=l),u.apply(d,f)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const i=n[ji];if(!i)return t.apply(n,r);r[0]!==void 0&&(i.body=r[0]);const s={startTimestamp:wn()*1e3,xhr:n};return Wn("xhr",s),t.apply(n,r)}})}function K3(e){if(Ar(e))return e;try{return e.toString()}catch{}}const hf=[],Jc=new Map;function z3(){if(uf()&&En){const t=Q3();return()=>{t()}}return()=>{}}const Dv={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 Q3(){return xv(({metric:e})=>{if(e.value==null)return;const t=e.entries.find(a=>a.duration===e.value&&Dv[a.name]);if(!t)return;const{interactionId:n}=t,r=Dv[t.name],i=Ht(En+t.startTime),s=Ht(e.value),o=un(),c=o?cn(o):void 0,d=(n!=null?Jc.get(n):void 0)||c,f=d?ot(d).description:bt().getScopeData().transactionName,h=Ir(t.target),l=zt({[Qt]:"auto.http.browser.inp",[ui]:`ui.interaction.${r}`,[qd]:t.duration}),b=Av({name:h,transaction:f,attributes:l,startTime:i});Pn([b,"optionalAccess",a=>a.addEvent,"call",a=>a("inp",{[jc]:"millisecond",[Lc]:e.value})]),Pn([b,"optionalAccess",a=>a.end,"call",a=>a(i+s)])})}function J3(e){const t=({entries:n})=>{const r=un(),i=r&&cn(r);n.forEach(s=>{if(!w3(s)||!i)return;const o=s.interactionId;if(o!=null&&!Jc.has(o)){if(hf.length>10){const c=hf.shift();Jc.delete(c)}hf.push(o),Jc.set(o,i)}})};Es("event",t),Es("first-input",t)}function Z3(e,t=Rv("fetch")){let n=0,r=0;function i(s){const o=s.body.length;n+=o,r++;const c={body:s.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return Nv("fetch"),Rc("No fetch implementation available");try{return t(e.url,c).then(u=>(n-=o,r--,{statusCode:u.status,headers:{"x-sentry-rate-limits":u.headers.get("X-Sentry-Rate-Limits"),"retry-after":u.headers.get("Retry-After")}}))}catch(u){return Nv("fetch"),n-=o,r--,Rc(u)}}return n5(e,i)}const X3=30,ek=50;function pf(e,t,n,r){const i={filename:e,function:t==="<anonymous>"?ki:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}const tk=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,nk=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,rk=/\((\S*)(?::(\d+))(?::(\d+))\)/,ik=[X3,e=>{const t=tk.exec(e);if(t){const[,r,i,s]=t;return pf(r,ki,+i,+s)}const n=nk.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){const o=rk.exec(n[2]);o&&(n[2]=o[1],n[3]=o[2],n[4]=o[3])}const[i,s]=Pv(n[1]||ki,n[2]);return pf(s,i,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],sk=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ok=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ak=$0(...[ik,[ek,e=>{const t=sk.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const s=ok.exec(t[3]);s&&(t[1]=t[1]||"eval",t[3]=s[1],t[4]=s[2],t[5]="")}let r=t[3],i=t[1]||ki;return[i,r]=Pv(i,r),pf(r,i,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]),Pv=(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]:ki,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Zc=1024,ck="Breadcrumbs",uk=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:ck,setup(n){t.console&&JT(fk(n)),t.dom&&kv(dk(n,t.dom)),t.xhr&&Mv(hk(n)),t.fetch&&K0(pk(n)),t.history&&zc(mk(n)),t.sentry&&n.on("beforeSendEvent",lk(n))}}};function lk(e){return function(n){Je()===e&&fi({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:ai(n)},{event:n})}}function dk(e,t){return function(r){if(Je()!==e)return;let i,s,o=typeof t=="object"?t.serializeAttribute:void 0,c=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;c&&c>Zc&&(On&&Se.warn(`\`dom.maxStringLength\` cannot exceed ${Zc}, but a value of ${c} was configured. Sentry will use ${Zc} instead.`),c=Zc),typeof o=="string"&&(o=[o]);try{const d=r.event,f=gk(d)?d.target:d;i=Ir(f,{keyAttrs:o,maxStringLength:c}),s=M0(f)}catch{i="<unknown>"}if(i.length===0)return;const u={category:`ui.${r.name}`,message:i};s&&(u.data={"ui.component_name":s}),fi(u,{event:r.event,name:r.name,global:r.global})}}function fk(e){return function(n){if(Je()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:iy(n.level),message:I0(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${I0(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;fi(r,{input:n.args,level:n.level})}}function hk(e){return function(n){if(Je()!==e)return;const{startTimestamp:r,endTimestamp:i}=n,s=n.xhr[ji];if(!r||!i||!s)return;const{method:o,url:c,status_code:u,body:d}=s,f={method:o,url:c,status_code:u},h={xhr:n.xhr,input:d,startTimestamp:r,endTimestamp:i},l=R0(u);fi({category:"xhr",data:f,type:"http",level:l},h)}}function pk(e){return function(n){if(Je()!==e)return;const{startTimestamp:r,endTimestamp:i}=n;if(i&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const s=n.fetchData,o={data:n.error,input:n.args,startTimestamp:r,endTimestamp:i};fi({category:"fetch",data:s,level:"error",type:"http"},o)}else{const s=n.response,o={...n.fetchData,status_code:s&&s.status},c={input:n.args,response:s,startTimestamp:r,endTimestamp:i},u=R0(o.status_code);fi({category:"fetch",data:o,type:"http",level:u},c)}}}function mk(e){return function(n){if(Je()!==e)return;let r=n.from,i=n.to;const s=Oi(Ne.location.href);let o=r?Oi(r):void 0;const c=Oi(i);(!o||!o.path)&&(o=s),s.protocol===c.protocol&&s.host===c.host&&(i=c.relative),s.protocol===o.protocol&&s.host===o.host&&(r=o.relative),fi({category:"navigation",data:{from:r,to:i}})}}function gk(e){return!!e&&!!e.target}const yk=["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"],vk="BrowserApiErrors",bk=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:vk,setupOnce(){t.setTimeout&&kn(Ne,"setTimeout",jv),t.setInterval&&kn(Ne,"setInterval",jv),t.requestAnimationFrame&&kn(Ne,"requestAnimationFrame",wk),t.XMLHttpRequest&&"XMLHttpRequest"in Ne&&kn(XMLHttpRequest.prototype,"send",Ek);const n=t.eventTarget;n&&(Array.isArray(n)?n:yk).forEach(Sk)}}};function jv(e){return function(...t){const n=t[0];return t[0]=vs(n,{mechanism:{data:{function:kr(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function wk(e){return function(t){return e.apply(this,[vs(t,{mechanism:{data:{function:"requestAnimationFrame",handler:kr(e)},handled:!1,type:"instrument"}})])}}function Ek(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in n&&typeof n[i]=="function"&&kn(n,i,function(s){const o={mechanism:{data:{function:i,handler:kr(s)},handled:!1,type:"instrument"}},c=Cd(s);return c&&(o.mechanism.data.handler=kr(c)),vs(s,o)})}),e.apply(this,t)}}function Sk(e){const t=Ne,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(kn(n,"addEventListener",function(r){return function(i,s,o){try{typeof s.handleEvent=="function"&&(s.handleEvent=vs(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:kr(s),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[i,vs(s,{mechanism:{data:{function:"addEventListener",handler:kr(s),target:e},handled:!1,type:"instrument"}}),o])}}),kn(n,"removeEventListener",function(r){return function(i,s,o){const c=s;try{const u=c&&c.__sentry_wrapped__;u&&r.call(this,i,u,o)}catch{}return r.call(this,i,c,o)}}))}const xk="GlobalHandlers",_k=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:xk,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(Ck(n),Lv("onerror")),t.onunhandledrejection&&(Ak(n),Lv("onunhandledrejection"))}}};function Ck(e){J0(t=>{const{stackParser:n,attachStacktrace:r}=Bv();if(Je()!==e||uv())return;const{msg:i,url:s,line:o,column:c,error:u}=t,d=kk(Xd(n,u||i,void 0,r,!1),s,o,c);d.level="error",qy(d,{originalException:u,mechanism:{handled:!1,type:"onerror"}})})}function Ak(e){Z0(t=>{const{stackParser:n,attachStacktrace:r}=Bv();if(Je()!==e||uv())return;const i=Tk(t),s=Sd(i)?Ik(i):Xd(n,i,void 0,r,!0);s.level="error",qy(s,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function Tk(e){if(Sd(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 Ik(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function kk(e,t,n,r){const i=e.exception=e.exception||{},s=i.values=i.values||[],o=s[0]=s[0]||{},c=o.stacktrace=o.stacktrace||{},u=c.frames=c.frames||[],d=isNaN(parseInt(r,10))?void 0:r,f=isNaN(parseInt(n,10))?void 0:n,h=Ar(t)&&t.length>0?t:N0();return u.length===0&&u.push({colno:d,filename:h,function:ki,in_app:!0,lineno:f}),e}function Lv(e){On&&Se.log(`Global Handler attached: ${e}`)}function Bv(){const e=Je();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Ok=()=>({name:"HttpContext",preprocessEvent(e){if(!Ne.navigator&&!Ne.location&&!Ne.document)return;const t=e.request&&e.request.url||Ne.location&&Ne.location.href,{referrer:n}=Ne.document||{},{userAgent:r}=Ne.navigator||{},i={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},s={...e.request,...t&&{url:t},headers:i};e.request=s}}),Rk="cause",Nk=5,Mk="LinkedErrors",Dk=(e={})=>{const t=e.limit||Nk,n=e.key||Rk;return{name:Mk,preprocessEvent(r,i,s){const o=s.getOptions();PT(Qd,o.stackParser,o.maxValueLength,n,t,r,i)}}};function Pk(e){return[d5(),c5(),bk(),uk(),_k(),Dk(),x5(),Ok()]}function jk(e={}){const t={defaultIntegrations:Pk(),release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:Ne.SENTRY_RELEASE&&Ne.SENTRY_RELEASE.id?Ne.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return e.defaultIntegrations==null&&delete e.defaultIntegrations,{...t,...e}}function Lk(){const e=typeof Ne.window<"u"&&Ne;if(!e)return!1;const t=e.chrome?"chrome":"browser",n=e[t],r=n&&n.runtime&&n.runtime.id,i=Ne.location&&Ne.location.href||"",s=["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"],o=!!r&&Ne===Ne.top&&s.some(u=>i.startsWith(`${u}//`)),c=typeof e.nw<"u";return!!r&&!o&&!c}function Bk(e={}){const t=jk(e);if(Lk()){fs(()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")});return}On&&(Y0()||Se.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill."));const n={...t,stackParser:zT(t.stackParser||ak),integrations:KI(t),transport:t.transport||Z3},r=XI(H5,n);return t.autoSessionTracking&&Fk(),r}function Fv(e={}){if(!Ne.document){On&&Se.error("Global document not defined in showReportDialog call");return}const t=bt(),n=t.getClient(),r=n&&n.getDsn();if(!r){On&&Se.error("DSN not configured for showReportDialog call");return}if(t&&(e.user={...t.getUser(),...e.user}),!e.eventId){const c=UI();c&&(e.eventId=c)}const i=Ne.document.createElement("script");i.async=!0,i.crossOrigin="anonymous",i.src=YI(r,e),e.onLoad&&(i.onload=e.onLoad);const{onClose:s}=e;if(s){const c=u=>{if(u.data==="__sentry_reportdialog_closed__")try{s()}finally{Ne.removeEventListener("message",c)}};Ne.addEventListener("message",c)}const o=Ne.document.head||Ne.document.body;o?o.appendChild(i):On&&Se.error("Not injecting report dialog. No injection point found in HTML")}function Fk(){if(typeof Ne.document>"u"){On&&Se.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}Gy({ignoreDuration:!0}),Wy(),zc(({from:e,to:t})=>{e!==void 0&&e!==t&&(Gy({ignoreDuration:!0}),Wy())})}const wt=nt,mf="sentryReplaySession",Uk="replay_event",gf="Unable to send Replay",Vk=3e5,qk=9e5,$k=5e3,Gk=5500,Hk=6e4,Yk=5e3,Wk=3,Uv=15e4,Xc=5e3,Kk=3e3,zk=300,yf=2e7,Qk=4999,Jk=15e3,Vv=36e5;function vf(e,t){return e??t()}function zo(e){let t,n=e[0],r=1;for(;r<e.length;){const i=e[r],s=e[r+1];if(r+=2,(i==="optionalAccess"||i==="optionalCall")&&n==null)return;i==="access"||i==="optionalAccess"?(t=n,n=s(n)):(i==="call"||i==="optionalCall")&&(n=s((...o)=>n.call(t,...o)),t=void 0)}return n}var Jt;(function(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"})(Jt||(Jt={}));function Zk(e){return e.nodeType===e.ELEMENT_NODE}function Qo(e){const t=zo([e,"optionalAccess",n=>n.host]);return zo([t,"optionalAccess",n=>n.shadowRoot])===e}function Jo(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Xk(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 e6(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 eu(e){try{const t=e.rules||e.cssRules;return t?Xk(Array.from(t,qv).join("")):null}catch{return null}}function qv(e){let t;if(n6(e))try{t=eu(e.styleSheet)||e6(e)}catch{}else if(r6(e)&&e.selectorText.includes(":"))return t6(e.cssText);return t||e.cssText}function t6(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function n6(e){return"styleSheet"in e}function r6(e){return"selectorText"in e}class $v{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){if(!t)return-1;const n=zo([this,"access",r=>r.getMeta,"call",r=>r(t),"optionalAccess",r=>r.id]);return vf(n,()=>-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 i6(){return new $v}function tu({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 Zo({isMasked:e,element:t,value:n,maskInputFn:r}){let i=n||"";return e?(r&&(i=r(i,t)),"*".repeat(i.length)):i}function Cs(e){return e.toLowerCase()}function bf(e){return e.toUpperCase()}const Gv="__rrweb_original__";function s6(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 s=t.getImageData,o=Gv in s?s[Gv]:s;if(new Uint32Array(o.call(t,r,i,Math.min(n,e.width-r),Math.min(n,e.height-i)).data.buffer).some(u=>u!==0))return!1}return!0}function wf(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Cs(t):null}function nu(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function Hv(e,t){let n;try{n=new URL(e,vf(t,()=>window.location.href))}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i,i=n.pathname.match(r);return vf(zo([i,"optionalAccess",s=>s[1]]),()=>null)}const Yv={};function Wv(e){const t=Yv[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 s=i.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(i)}catch{}return Yv[e]=r.bind(window)}function Ef(...e){return Wv("setTimeout")(...e)}function Kv(...e){return Wv("clearTimeout")(...e)}let o6=1;const a6=new RegExp("[^a-z0-9-_:]"),Xo=-2;function Sf(){return o6++}function c6(e){if(e instanceof HTMLFormElement)return"form";const t=Cs(e.tagName);return a6.test(t)?"div":t}function u6(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let As,zv;const l6=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,d6=/^(?:[a-z+]+:)?\/\//i,f6=/^www\..*/i,h6=/^(data:)([^,]*),(.*)/i;function ru(e,t){return(e||"").replace(l6,(n,r,i,s,o,c)=>{const u=i||o||c,d=r||s||"";if(!u)return n;if(d6.test(u)||f6.test(u))return`url(${d}${u}${d})`;if(h6.test(u))return`url(${d}${u}${d})`;if(u[0]==="/")return`url(${d}${u6(t)+u}${d})`;const f=t.split("/"),h=u.split("/");f.pop();for(const l of h)l!=="."&&(l===".."?f.pop():f.push(l));return`url(${d}${f.join("/")}${d})`})}const p6=/^[^ \t\n\r\u000c]+/,m6=/^[, \t\n\r\u000c]+/;function g6(e,t){if(t.trim()==="")return t;let n=0;function r(s){let o;const c=s.exec(t.substring(n));return c?(o=c[0],n+=o.length,o):""}const i=[];for(;r(m6),!(n>=t.length);){let s=r(p6);if(s.slice(-1)===",")s=Ts(e,s.substring(0,s.length-1)),i.push(s);else{let o="";s=Ts(e,s);let c=!1;for(;;){const u=t.charAt(n);if(u===""){i.push((s+o).trim());break}else if(c)u===")"&&(c=!1);else if(u===","){n+=1,i.push((s+o).trim());break}else u==="("&&(c=!0);o+=u,n+=1}}}return i.join(", ")}const Qv=new WeakMap;function Ts(e,t){return!t||t.trim()===""?t:iu(e,t)}function y6(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function iu(e,t){let n=Qv.get(e);if(n||(n=e.createElement("a"),Qv.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function Jv(e,t,n,r,i,s){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(t==="table"||t==="td"||t==="th")?Ts(e,r):n==="srcset"?g6(e,r):n==="style"?ru(r,iu(e)):t==="object"&&n==="data"?Ts(e,r):typeof s=="function"?s(n,r,i):r)}function Zv(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function v6(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 s=e.classList[i];if(t.test(s))return!0}if(n)return e.matches(n)}catch{}return!1}function b6(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Li(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Li(e.parentNode,t,n,r+1)}function Is(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(b6(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function ks(e,t,n,r,i,s){try{const o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(o===null)return!1;if(o.tagName==="INPUT"){const d=o.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(d))return!0}let c=-1,u=-1;if(s){if(u=Li(o,Is(r,i)),u<0)return!0;c=Li(o,Is(t,n),u>=0?u:1/0)}else{if(c=Li(o,Is(t,n)),c<0)return!1;u=Li(o,Is(r,i),c>=0?c:1/0)}return c>=0?u>=0?c<=u:!0:u>=0?!1:!!s}catch{}return!!s}function w6(e,t,n){const r=e.contentWindow;if(!r)return;let i=!1,s;try{s=r.document.readyState}catch{return}if(s!=="complete"){const c=Ef(()=>{i||(t(),i=!0)},n);e.addEventListener("load",()=>{Kv(c),i=!0,t()});return}const o="about:blank";if(r.location.href!==o||e.src===o||e.src==="")return Ef(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function E6(e,t,n){let r=!1,i;try{i=e.sheet}catch{return}if(i)return;const s=Ef(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{Kv(s),r=!0,t()})}function S6(e,t){const{doc:n,mirror:r,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:c,maskAttributeFn:u,maskTextClass:d,unmaskTextClass:f,maskTextSelector:h,unmaskTextSelector:l,inlineStylesheet:b,maskInputOptions:a={},maskTextFn:p,maskInputFn:y,dataURLOptions:g={},inlineImages:v,recordCanvas:w,keepIframeSrcFn:E,newlyAddedElement:S=!1}=t,A=x6(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Jt.Document,childNodes:[],compatMode:e.compatMode}:{type:Jt.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Jt.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:A};case e.ELEMENT_NODE:return C6(e,{doc:n,blockClass:i,blockSelector:s,unblockSelector:o,inlineStylesheet:b,maskAttributeFn:u,maskInputOptions:a,maskInputFn:y,dataURLOptions:g,inlineImages:v,recordCanvas:w,keepIframeSrcFn:E,newlyAddedElement:S,rootId:A,maskAllText:c,maskTextClass:d,unmaskTextClass:f,maskTextSelector:h,unmaskTextSelector:l});case e.TEXT_NODE:return _6(e,{doc:n,maskAllText:c,maskTextClass:d,unmaskTextClass:f,maskTextSelector:h,unmaskTextSelector:l,maskTextFn:p,maskInputOptions:a,maskInputFn:y,rootId:A});case e.CDATA_SECTION_NODE:return{type:Jt.CDATA,textContent:"",rootId:A};case e.COMMENT_NODE:return{type:Jt.Comment,textContent:e.textContent||"",rootId:A};default:return!1}}function x6(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function _6(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:i,maskTextSelector:s,unmaskTextSelector:o,maskTextFn:c,maskInputOptions:u,maskInputFn:d,rootId:f}=t,h=e.parentNode&&e.parentNode.tagName;let l=e.textContent;const b=h==="STYLE"?!0:void 0,a=h==="SCRIPT"?!0:void 0,p=h==="TEXTAREA"?!0:void 0;if(b&&l){try{e.nextSibling||e.previousSibling||zo([e,"access",g=>g.parentNode,"access",g=>g.sheet,"optionalAccess",g=>g.cssRules])&&(l=eu(e.parentNode.sheet))}catch(g){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${g}`,e)}l=ru(l,iu(t.doc))}a&&(l="SCRIPT_PLACEHOLDER");const y=ks(e,r,s,i,o,n);if(!b&&!a&&!p&&l&&y&&(l=c?c(l,e.parentElement):l.replace(/[\S]/g,"*")),p&&l&&(u.textarea||y)&&(l=d?d(l,e.parentNode):l.replace(/[\S]/g,"*")),h==="OPTION"&&l){const g=tu({type:null,tagName:h,maskInputOptions:u});l=Zo({isMasked:ks(e,r,s,i,o,g),element:e,value:l,maskInputFn:d})}return{type:Jt.Text,textContent:l||"",isStyle:b,rootId:f}}function C6(e,t){const{doc:n,blockClass:r,blockSelector:i,unblockSelector:s,inlineStylesheet:o,maskInputOptions:c={},maskAttributeFn:u,maskInputFn:d,dataURLOptions:f={},inlineImages:h,recordCanvas:l,keepIframeSrcFn:b,newlyAddedElement:a=!1,rootId:p,maskAllText:y,maskTextClass:g,unmaskTextClass:v,maskTextSelector:w,unmaskTextSelector:E}=t,S=v6(e,r,i,s),A=c6(e);let T={};const O=e.attributes.length;for(let D=0;D<O;D++){const U=e.attributes[D];U.name&&!Zv(A,U.name,U.value)&&(T[U.name]=Jv(n,A,Cs(U.name),U.value,e,u))}if(A==="link"&&o){const D=Array.from(n.styleSheets).find(V=>V.href===e.href);let U=null;D&&(U=eu(D)),U&&(delete T.rel,delete T.href,T._cssText=ru(U,D.href))}if(A==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const D=eu(e.sheet);D&&(T._cssText=ru(D,iu(n)))}if(A==="input"||A==="textarea"||A==="select"||A==="option"){const D=e,U=wf(D),V=nu(D,bf(A),U),F=D.checked;if(U!=="submit"&&U!=="button"&&V){const q=ks(D,g,w,v,E,tu({type:U,tagName:bf(A),maskInputOptions:c}));T.value=Zo({isMasked:q,element:D,value:V,maskInputFn:d})}F&&(T.checked=F)}if(A==="option"&&(e.selected&&!c.select?T.selected=!0:delete T.selected),A==="canvas"&&l){if(e.__context==="2d")s6(e)||(T.rr_dataURL=e.toDataURL(f.type,f.quality));else if(!("__context"in e)){const D=e.toDataURL(f.type,f.quality),U=n.createElement("canvas");U.width=e.width,U.height=e.height;const V=U.toDataURL(f.type,f.quality);D!==V&&(T.rr_dataURL=D)}}if(A==="img"&&h){As||(As=n.createElement("canvas"),zv=As.getContext("2d"));const D=e,U=D.currentSrc||D.getAttribute("src")||"<unknown-src>",V=D.crossOrigin,F=()=>{D.removeEventListener("load",F);try{As.width=D.naturalWidth,As.height=D.naturalHeight,zv.drawImage(D,0,0),T.rr_dataURL=As.toDataURL(f.type,f.quality)}catch(q){if(D.crossOrigin!=="anonymous"){D.crossOrigin="anonymous",D.complete&&D.naturalWidth!==0?F():D.addEventListener("load",F);return}else console.warn(`Cannot inline img src=${U}! Error: ${q}`)}D.crossOrigin==="anonymous"&&(V?T.crossOrigin=V:D.removeAttribute("crossorigin"))};D.complete&&D.naturalWidth!==0?F():D.addEventListener("load",F)}if((A==="audio"||A==="video")&&(T.rr_mediaState=e.paused?"paused":"played",T.rr_mediaCurrentTime=e.currentTime),a||(e.scrollLeft&&(T.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(T.rr_scrollTop=e.scrollTop)),S){const{width:D,height:U}=e.getBoundingClientRect();T={class:T.class,rr_width:`${D}px`,rr_height:`${U}px`}}A==="iframe"&&!b(T.src)&&(!S&&!e.contentDocument&&(T.rr_src=T.src),delete T.src);let N;try{customElements.get(A)&&(N=!0)}catch{}return{type:Jt.Element,tagName:A,attributes:T,childNodes:[],isSVG:y6(e)||void 0,needBlock:S,rootId:p,isCustom:N}}function Et(e){return e==null?"":e.toLowerCase()}function A6(e,t){if(t.comment&&e.type===Jt.Comment)return!0;if(e.type===Jt.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&Hv(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(Et(e.attributes.name).match(/^msapplication-tile(image|color)$/)||Et(e.attributes.name)==="application-name"||Et(e.attributes.rel)==="icon"||Et(e.attributes.rel)==="apple-touch-icon"||Et(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&Et(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Et(e.attributes.property).match(/^(og|twitter|fb):/)||Et(e.attributes.name).match(/^(og|twitter):/)||Et(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(Et(e.attributes.name)==="robots"||Et(e.attributes.name)==="googlebot"||Et(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(Et(e.attributes.name)==="author"||Et(e.attributes.name)==="generator"||Et(e.attributes.name)==="framework"||Et(e.attributes.name)==="publisher"||Et(e.attributes.name)==="progid"||Et(e.attributes.property).match(/^article:/)||Et(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(Et(e.attributes.name)==="google-site-verification"||Et(e.attributes.name)==="yandex-verification"||Et(e.attributes.name)==="csrf-token"||Et(e.attributes.name)==="p:domain_verify"||Et(e.attributes.name)==="verify-v1"||Et(e.attributes.name)==="verification"||Et(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Os(e,t){const{doc:n,mirror:r,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:h,skipChild:l=!1,inlineStylesheet:b=!0,maskInputOptions:a={},maskAttributeFn:p,maskTextFn:y,maskInputFn:g,slimDOMOptions:v,dataURLOptions:w={},inlineImages:E=!1,recordCanvas:S=!1,onSerialize:A,onIframeLoad:T,iframeLoadTimeout:O=5e3,onStylesheetLoad:N,stylesheetLoadTimeout:D=5e3,keepIframeSrcFn:U=()=>!1,newlyAddedElement:V=!1}=t;let{preserveWhiteSpace:F=!0}=t;const q=S6(e,{doc:n,mirror:r,blockClass:i,blockSelector:s,maskAllText:c,unblockSelector:o,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:h,inlineStylesheet:b,maskInputOptions:a,maskAttributeFn:p,maskTextFn:y,maskInputFn:g,dataURLOptions:w,inlineImages:E,recordCanvas:S,keepIframeSrcFn:U,newlyAddedElement:V});if(!q)return console.warn(e,"not serialized"),null;let R;r.hasNode(e)?R=r.getId(e):A6(q,v)||!F&&q.type===Jt.Text&&!q.isStyle&&!q.textContent.replace(/^\s+|\s+$/gm,"").length?R=Xo:R=Sf();const L=Object.assign(q,{id:R});if(r.add(e,L),R===Xo)return null;A&&A(e);let W=!l;if(L.type===Jt.Element){W=W&&!L.needBlock,delete L.needBlock;const z=e.shadowRoot;z&&Jo(z)&&(L.isShadowHost=!0)}if((L.type===Jt.Document||L.type===Jt.Element)&&W){v.headWhitespace&&L.type===Jt.Element&&L.tagName==="head"&&(F=!1);const z={doc:n,mirror:r,blockClass:i,blockSelector:s,maskAllText:c,unblockSelector:o,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:h,skipChild:l,inlineStylesheet:b,maskInputOptions:a,maskAttributeFn:p,maskTextFn:y,maskInputFn:g,slimDOMOptions:v,dataURLOptions:w,inlineImages:E,recordCanvas:S,preserveWhiteSpace:F,onSerialize:A,onIframeLoad:T,iframeLoadTimeout:O,onStylesheetLoad:N,stylesheetLoadTimeout:D,keepIframeSrcFn:U};for(const Z of Array.from(e.childNodes)){const te=Os(Z,z);te&&L.childNodes.push(te)}if(Zk(e)&&e.shadowRoot)for(const Z of Array.from(e.shadowRoot.childNodes)){const te=Os(Z,z);te&&(Jo(e.shadowRoot)&&(te.isShadow=!0),L.childNodes.push(te))}}return e.parentNode&&Qo(e.parentNode)&&Jo(e.parentNode)&&(L.isShadow=!0),L.type===Jt.Element&&L.tagName==="iframe"&&w6(e,()=>{const z=e.contentDocument;if(z&&T){const Z=Os(z,{doc:z,mirror:r,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:h,skipChild:!1,inlineStylesheet:b,maskInputOptions:a,maskAttributeFn:p,maskTextFn:y,maskInputFn:g,slimDOMOptions:v,dataURLOptions:w,inlineImages:E,recordCanvas:S,preserveWhiteSpace:F,onSerialize:A,onIframeLoad:T,iframeLoadTimeout:O,onStylesheetLoad:N,stylesheetLoadTimeout:D,keepIframeSrcFn:U});Z&&T(e,Z)}},O),L.type===Jt.Element&&L.tagName==="link"&&typeof L.attributes.rel=="string"&&(L.attributes.rel==="stylesheet"||L.attributes.rel==="preload"&&typeof L.attributes.href=="string"&&Hv(L.attributes.href)==="css")&&E6(e,()=>{if(N){const z=Os(e,{doc:n,mirror:r,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:h,skipChild:!1,inlineStylesheet:b,maskInputOptions:a,maskAttributeFn:p,maskTextFn:y,maskInputFn:g,slimDOMOptions:v,dataURLOptions:w,inlineImages:E,recordCanvas:S,preserveWhiteSpace:F,onSerialize:A,onIframeLoad:T,iframeLoadTimeout:O,onStylesheetLoad:N,stylesheetLoadTimeout:D,keepIframeSrcFn:U});z&&N(e,z)}},D),L}function T6(e,t){const{mirror:n=new $v,blockClass:r="rr-block",blockSelector:i=null,unblockSelector:s=null,maskAllText:o=!1,maskTextClass:c="rr-mask",unmaskTextClass:u=null,maskTextSelector:d=null,unmaskTextSelector:f=null,inlineStylesheet:h=!0,inlineImages:l=!1,recordCanvas:b=!1,maskAllInputs:a=!1,maskAttributeFn:p,maskTextFn:y,maskInputFn:g,slimDOM:v=!1,dataURLOptions:w,preserveWhiteSpace:E,onSerialize:S,onIframeLoad:A,iframeLoadTimeout:T,onStylesheetLoad:O,stylesheetLoadTimeout:N,keepIframeSrcFn:D=()=>!1}=t||{};return Os(e,{doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,maskAllText:o,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,skipChild:!1,inlineStylesheet:h,maskInputOptions:a===!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}:a===!1?{}:a,maskAttributeFn:p,maskTextFn:y,maskInputFn:g,slimDOMOptions:v===!0||v==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:v==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:v===!1?{}:v,dataURLOptions:w,inlineImages:l,recordCanvas:b,preserveWhiteSpace:E,onSerialize:S,onIframeLoad:A,iframeLoadTimeout:T,onStylesheetLoad:O,stylesheetLoadTimeout:N,keepIframeSrcFn:D,newlyAddedElement:!1})}function hi(e){let t,n=e[0],r=1;for(;r<e.length;){const i=e[r],s=e[r+1];if(r+=2,(i==="optionalAccess"||i==="optionalCall")&&n==null)return;i==="access"||i==="optionalAccess"?(t=n,n=s(n)):(i==="call"||i==="optionalCall")&&(n=s((...o)=>n.call(t,...o)),t=void 0)}return n}function Sn(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Rs=`Please stop import mirror directly. Instead of that,\r
124
124
  now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
125
- or you can use record.mirror to access the mirror instance during recording.`;let Qv={map:{},getId(){return console.error(Ns),-1},getNode(){return console.error(Ns),null},removeNodeFromMap(){console.error(Ns)},has(){return console.error(Ns),!1},reset(){console.error(Ns)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Qv=new Proxy(Qv,{get(e,t,n){return t==="map"&&console.error(Ns),Reflect.get(e,t,n)}}));function ea(e,t,n={}){let r=null,i=0;return function(...s){const o=Date.now();!i&&n.leading===!1&&(i=o);const c=t-(o-i),u=this;c<=0||c>t?(r&&(TR(r),r=null),i=o,e.apply(u,s)):!r&&n.trailing!==!1&&(r=su(()=>{i=n.leading===!1?0:Date.now(),r=null,e.apply(u,s)},c))}}function Jv(e,t,n,r,i=window){const s=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(o){su(()=>{n.set.call(this,o)},0),s&&s.set&&s.set.call(this,o)}}),()=>Jv(e,t,s||{},!0)}function Ef(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 iu=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(iu=()=>new Date().getTime());function Zv(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:pi([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollLeft])||pi([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollLeft])||pi([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:pi([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollTop])||pi([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollTop])||pi([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollTop])||0}}function Xv(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function e1(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function t1(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function Bn(e,t,n,r,i){if(!e)return!1;const s=t1(e);if(!s)return!1;const o=ks(t,n);if(!i){const d=r&&s.matches(r);return o(s)&&!d}const c=Fi(s,o);let u=-1;return c<0?!1:(r&&(u=Fi(s,ks(null,r))),c>-1&&u<0?!0:c<u)}function ER(e,t){return t.getId(e)!==-1}function Sf(e,t){return t.getId(e)===Xo}function n1(e,t){if(Qo(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?n1(e.parentNode,t):!0:!0}function xf(e){return!!e.changedTouches}function SR(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 r1(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function i1(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function _f(e){return!!pi([e,"optionalAccess",t=>t.shadowRoot])}class xR{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return II(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 s1(e){let t=null;return pi([e,"access",n=>n.getRootNode,"optionalCall",n=>n(),"optionalAccess",n=>n.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function _R(e){let t=e,n;for(;n=s1(t);)t=n;return t}function CR(e){const t=e.ownerDocument;if(!t)return!1;const n=_R(e);return t.contains(n)}function o1(e){const t=e.ownerDocument;return t?t.contains(e)||CR(e):!1}const a1={};function Cf(e){const t=a1[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 s=i.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(i)}catch{}return a1[e]=r.bind(window)}function AR(...e){return Cf("requestAnimationFrame")(...e)}function su(...e){return Cf("setTimeout")(...e)}function TR(...e){return Cf("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||{}),Fe=(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))(Fe||{}),Sn=(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))(Sn||{}),Pr=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Pr||{});function IR(e){let t,n=e[0],r=1;for(;r<e.length;){const i=e[r],s=e[r+1];if(r+=2,(i==="optionalAccess"||i==="optionalCall")&&n==null)return;i==="access"||i==="optionalAccess"?(t=n,n=s(n)):(i==="call"||i==="optionalCall")&&(n=s((...o)=>n.call(t,...o)),t=void 0)}return n}function c1(e){return"__ln"in e}class kR{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=IR([n,"optionalAccess",i=>i.next])||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&c1(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&&c1(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 u1=(e,t)=>`${e}@${t}`;class OR{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 kR,i=u=>{let d=u,f=Xo;for(;f===Xo;)d=d&&d.nextSibling,f=d&&this.mirror.getId(d);return f},s=u=>{if(!u.parentNode||!o1(u))return;const d=Qo(u.parentNode)?this.mirror.getId(s1(u)):this.mirror.getId(u.parentNode),f=i(u);if(d===-1||f===-1)return r.addNode(u);const p=Rs(u,{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:l=>{r1(l,this.mirror)&&!Bn(l,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(l),i1(l,this.mirror)&&this.stylesheetManager.trackLinkElement(l),_f(u)&&this.shadowDomManager.addShadowRoot(u.shadowRoot,this.doc)},onIframeLoad:(l,v)=>{Bn(l,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(l,v),l.contentWindow&&this.canvasManager.addWindow(l.contentWindow),this.shadowDomManager.observeAttachShadow(l))},onStylesheetLoad:(l,v)=>{this.stylesheetManager.attachLinkElement(l,v)}});p&&(t.push({parentId:d,nextId:f,node:p}),n.add(p.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const u of this.movedSet)l1(this.removes,u,this.mirror)&&!this.movedSet.has(u.parentNode)||s(u);for(const u of this.addedSet)!d1(this.droppedSet,u)&&!l1(this.removes,u,this.mirror)||d1(this.movedSet,u)?s(u):this.droppedSet.add(u);let o=null;for(;r.length;){let u=null;if(o){const d=this.mirror.getId(o.value.parentNode),f=i(o.value);d!==-1&&f!==-1&&(u=o)}if(!u){let d=r.tail;for(;d;){const f=d;if(d=d.previous,f){const p=this.mirror.getId(f.value.parentNode);if(i(f.value)===-1)continue;if(p!==-1){u=f;break}else{const v=f.value;if(v.parentNode&&v.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const a=v.parentNode.host;if(this.mirror.getId(a)!==-1){u=f;break}}}}}}if(!u){for(;r.head;)r.removeNode(r.head.value);break}o=u.previous,r.removeNode(u.value),s(u.value)}const c={texts:this.texts.map(u=>({id:this.mirror.getId(u.node),value:u.value})).filter(u=>!n.has(u.id)).filter(u=>this.mirror.has(u.id)),attributes:this.attributes.map(u=>{const{attributes:d}=u;if(typeof d.style=="string"){const f=JSON.stringify(u.styleDiff),p=JSON.stringify(u._unchangedStyles);f.length<d.style.length&&(f+p).split("var(").length===d.style.split("var(").length&&(d.style=u.styleDiff)}return{id:this.mirror.getId(u.node),attributes:d}}).filter(u=>!n.has(u.id)).filter(u=>this.mirror.has(u.id)),removes:this.removes,adds:t};!c.texts.length&&!c.attributes.length&&!c.removes.length&&!c.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(c))},this.processMutation=t=>{if(!Sf(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!Bn(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:Os(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,t1(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 o=vf(n),c=n.tagName;i=tu(n,c,o);const u=eu({maskInputOptions:this.maskInputOptions,tagName:c,type:o}),d=Os(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,u);i=Zo({isMasked:d,element:n,value:i,maskInputFn:this.maskInputFn})}if(Bn(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||i===t.oldValue)return;let s=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!n.contentDocument)r="rr_src";else return;if(s||(s={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(t.target,s)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!zv(n.tagName,r)&&(s.attributes[r]=Kv(this.doc,As(n.tagName),As(r),i,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");t.oldValue&&o.setAttribute("style",t.oldValue);for(const c of Array.from(n.style)){const u=n.style.getPropertyValue(c),d=n.style.getPropertyPriority(c);u!==o.style.getPropertyValue(c)||d!==o.style.getPropertyPriority(c)?d===""?s.styleDiff[c]=u:s.styleDiff[c]=[u,d]:s._unchangedStyles[c]=[u,d]}for(const c of Array.from(o.style))n.style.getPropertyValue(c)===""&&(s.styleDiff[c]=!1)}break}case"childList":{if(Bn(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=Qo(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Bn(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Sf(n,this.mirror)||!ER(n,this.mirror)||(this.addedSet.has(n)?(Af(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||n1(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[u1(r,i)]?Af(this.movedSet,n):this.removes.push({parentId:i,id:r,isShadow:Qo(t.target)&&Jo(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(Sf(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[u1(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Bn(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes.forEach(r=>this.genAdds(r)),_f(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"].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 Af(e,t){e.delete(t),t.childNodes.forEach(n=>Af(e,n))}function l1(e,t,n){return e.length===0?!1:RR(e,t,n)}function RR(e,t,n){let r=t.parentNode;for(;r;){const i=n.getId(r);if(e.some(s=>s.id===i))return!0;r=r.parentNode}return!1}function d1(e,t){return e.size===0?!1:f1(e,t)}function f1(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:f1(e,n):!1}let ta;function NR(e){ta=e}function MR(){ta=void 0}const it=e=>ta?(...n)=>{try{return e(...n)}catch(r){if(ta&&ta(r)===!0)return()=>{};throw r}}:e;function or(e){let t,n=e[0],r=1;for(;r<e.length;){const i=e[r],s=e[r+1];if(r+=2,(i==="optionalAccess"||i==="optionalCall")&&n==null)return;i==="access"||i==="optionalAccess"?(t=n,n=s(n)):(i==="call"||i==="optionalCall")&&(n=s((...o)=>n.call(t,...o)),t=void 0)}return n}const Ms=[];function na(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 h1(e,t){const n=new OR;Ms.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const i=or([window,"optionalAccess",o=>o.Zone,"optionalAccess",o=>o.__symbol__,"optionalCall",o=>o("MutationObserver")]);i&&window[i]&&(r=window[i]);const s=new r(it(o=>{e.onMutation&&e.onMutation(o)===!1||n.processMutations.bind(n)(o)}));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function DR({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const i=typeof t.mousemove=="number"?t.mousemove:50,s=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let o=[],c;const u=ea(it(p=>{const l=Date.now()-c;e(o.map(v=>(v.timeOffset-=l,v)),p),o=[],c=null}),s),d=it(ea(it(p=>{const l=na(p),{clientX:v,clientY:a}=xf(p)?p.changedTouches[0]:p;c||(c=iu()),o.push({x:v,y:a,id:r.getId(l),timeOffset:iu()-c}),u(typeof DragEvent<"u"&&p instanceof DragEvent?Fe.Drag:p instanceof MouseEvent?Fe.MouseMove:Fe.TouchMove)}),i,{trailing:!1})),f=[En("mousemove",d,n),En("touchmove",d,n),En("drag",d,n)];return it(()=>{f.forEach(p=>p())})}function PR({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const c=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,u=[];let d=null;const f=p=>l=>{const v=na(l);if(Bn(v,r,i,s,!0))return;let a=null,h=p;if("pointerType"in l){switch(l.pointerType){case"mouse":a=Pr.Mouse;break;case"touch":a=Pr.Touch;break;case"pen":a=Pr.Pen;break}a===Pr.Touch?Sn[p]===Sn.MouseDown?h="TouchStart":Sn[p]===Sn.MouseUp&&(h="TouchEnd"):Pr.Pen}else xf(l)&&(a=Pr.Touch);a!==null?(d=a,(h.startsWith("Touch")&&a===Pr.Touch||h.startsWith("Mouse")&&a===Pr.Mouse)&&(a=null)):Sn[p]===Sn.Click&&(a=d,d=null);const y=xf(l)?l.changedTouches[0]:l;if(!y)return;const g=n.getId(v),{clientX:b,clientY:w}=y;it(e)({type:Sn[h],id:g,x:b,y:w,...a!==null&&{pointerType:a}})};return Object.keys(Sn).filter(p=>Number.isNaN(Number(p))&&!p.endsWith("_Departed")&&c[p]!==!1).forEach(p=>{let l=As(p);const v=f(p);if(window.PointerEvent)switch(Sn[p]){case Sn.MouseDown:case Sn.MouseUp:l=l.replace("mouse","pointer");break;case Sn.TouchStart:case Sn.TouchEnd:return}u.push(En(l,v,t))}),it(()=>{u.forEach(p=>p())})}function p1({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,sampling:o}){const c=it(ea(it(u=>{const d=na(u);if(!d||Bn(d,r,i,s,!0))return;const f=n.getId(d);if(d===t&&t.defaultView){const p=Zv(t.defaultView);e({id:f,x:p.left,y:p.top})}else e({id:f,x:d.scrollLeft,y:d.scrollTop})}),o.scroll||100));return En("scroll",c,t)}function jR({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const i=it(ea(it(()=>{const s=Xv(),o=e1();(n!==s||r!==o)&&(e({width:Number(o),height:Number(s)}),n=s,r=o)}),200));return En("resize",i,t)}const LR=["INPUT","TEXTAREA","SELECT"],m1=new WeakMap;function BR({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,ignoreClass:o,ignoreSelector:c,maskInputOptions:u,maskInputFn:d,sampling:f,userTriggeredOnInput:p,maskTextClass:l,unmaskTextClass:v,maskTextSelector:a,unmaskTextSelector:h}){function y(T){let O=na(T);const N=T.isTrusted,D=O&&yf(O.tagName);if(D==="OPTION"&&(O=O.parentElement),!O||!D||LR.indexOf(D)<0||Bn(O,r,i,s,!0))return;const U=O;if(U.classList.contains(o)||c&&U.matches(c))return;const q=vf(O);let F=tu(U,D,q),V=!1;const R=eu({maskInputOptions:u,tagName:D,type:q}),L=Os(O,l,a,v,h,R);(q==="radio"||q==="checkbox")&&(V=O.checked),F=Zo({isMasked:L,element:O,value:F,maskInputFn:d}),g(O,p?{text:F,isChecked:V,userTriggered:N}:{text:F,isChecked:V});const W=O.name;q==="radio"&&W&&V&&t.querySelectorAll(`input[type="radio"][name="${W}"]`).forEach(z=>{if(z!==O){const Z=Zo({isMasked:L,element:z,value:tu(z,D,q),maskInputFn:d});g(z,p?{text:Z,isChecked:!V,userTriggered:!1}:{text:Z,isChecked:!V})}})}function g(T,O){const N=m1.get(T);if(!N||N.text!==O.text||N.isChecked!==O.isChecked){m1.set(T,O);const D=n.getId(T);it(e)({...O,id:D})}}const w=(f.input==="last"?["change"]:["input","change"]).map(T=>En(T,it(y),t)),E=t.defaultView;if(!E)return()=>{w.forEach(T=>T())};const S=E.Object.getOwnPropertyDescriptor(E.HTMLInputElement.prototype,"value"),A=[[E.HTMLInputElement.prototype,"value"],[E.HTMLInputElement.prototype,"checked"],[E.HTMLSelectElement.prototype,"value"],[E.HTMLTextAreaElement.prototype,"value"],[E.HTMLSelectElement.prototype,"selectedIndex"],[E.HTMLOptionElement.prototype,"selected"]];return S&&S.set&&w.push(...A.map(T=>Jv(T[0],T[1],{set(){it(y)({target:this,isTrusted:!1})}},!1,E))),it(()=>{w.forEach(T=>T())})}function ou(e){const t=[];function n(r,i){if(au("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||au("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||au("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||au("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const o=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(o)}else if(r.parentStyleSheet){const o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(o)}return i}return n(e,t)}function mi(e,t,n){let r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function FR({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:it((f,p,l)=>{const[v,a]=l,{id:h,styleId:y}=mi(p,t,n.styleMirror);return(h&&h!==-1||y&&y!==-1)&&e({id:h,styleId:y,adds:[{rule:v,index:a}]}),f.apply(p,l)})});const s=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:it((f,p,l)=>{const[v]=l,{id:a,styleId:h}=mi(p,t,n.styleMirror);return(a&&a!==-1||h&&h!==-1)&&e({id:a,styleId:h,removes:[{index:v}]}),f.apply(p,l)})});let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:it((f,p,l)=>{const[v]=l,{id:a,styleId:h}=mi(p,t,n.styleMirror);return(a&&a!==-1||h&&h!==-1)&&e({id:a,styleId:h,replace:v}),f.apply(p,l)})}));let c;r.CSSStyleSheet.prototype.replaceSync&&(c=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(c,{apply:it((f,p,l)=>{const[v]=l,{id:a,styleId:h}=mi(p,t,n.styleMirror);return(a&&a!==-1||h&&h!==-1)&&e({id:a,styleId:h,replaceSync:v}),f.apply(p,l)})}));const u={};cu("CSSGroupingRule")?u.CSSGroupingRule=r.CSSGroupingRule:(cu("CSSMediaRule")&&(u.CSSMediaRule=r.CSSMediaRule),cu("CSSConditionRule")&&(u.CSSConditionRule=r.CSSConditionRule),cu("CSSSupportsRule")&&(u.CSSSupportsRule=r.CSSSupportsRule));const d={};return Object.entries(u).forEach(([f,p])=>{d[f]={insertRule:p.prototype.insertRule,deleteRule:p.prototype.deleteRule},p.prototype.insertRule=new Proxy(d[f].insertRule,{apply:it((l,v,a)=>{const[h,y]=a,{id:g,styleId:b}=mi(v.parentStyleSheet,t,n.styleMirror);return(g&&g!==-1||b&&b!==-1)&&e({id:g,styleId:b,adds:[{rule:h,index:[...ou(v),y||0]}]}),l.apply(v,a)})}),p.prototype.deleteRule=new Proxy(d[f].deleteRule,{apply:it((l,v,a)=>{const[h]=a,{id:y,styleId:g}=mi(v.parentStyleSheet,t,n.styleMirror);return(y&&y!==-1||g&&g!==-1)&&e({id:y,styleId:g,removes:[{index:[...ou(v),h]}]}),l.apply(v,a)})})}),it(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=s,o&&(r.CSSStyleSheet.prototype.replace=o),c&&(r.CSSStyleSheet.prototype.replaceSync=c),Object.entries(u).forEach(([f,p])=>{p.prototype.insertRule=d[f].insertRule,p.prototype.deleteRule=d[f].deleteRule})})}function g1({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"?or([n,"access",o=>o.defaultView,"optionalAccess",o=>o.Document]):or([n,"access",o=>o.ownerDocument,"optionalAccess",o=>o.defaultView,"optionalAccess",o=>o.ShadowRoot]),s=or([i,"optionalAccess",o=>o.prototype])?Object.getOwnPropertyDescriptor(or([i,"optionalAccess",o=>o.prototype]),"adoptedStyleSheets"):void 0;return r===null||r===-1||!i||!s?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){return or([s,"access",o=>o.get,"optionalAccess",o=>o.call,"call",o=>o(this)])},set(o){const c=or([s,"access",u=>u.set,"optionalAccess",u=>u.call,"call",u=>u(this,o)]);if(r!==null&&r!==-1)try{t.adoptStyleSheets(o,r)}catch{}return c}}),it(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})}))}function UR({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){const s=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:it((c,u,d)=>{const[f,p,l]=d;if(n.has(f))return s.apply(u,[f,p,l]);const{id:v,styleId:a}=mi(or([u,"access",h=>h.parentRule,"optionalAccess",h=>h.parentStyleSheet]),t,r.styleMirror);return(v&&v!==-1||a&&a!==-1)&&e({id:v,styleId:a,set:{property:f,value:p,priority:l},index:ou(u.parentRule)}),c.apply(u,d)})});const o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:it((c,u,d)=>{const[f]=d;if(n.has(f))return o.apply(u,[f]);const{id:p,styleId:l}=mi(or([u,"access",v=>v.parentRule,"optionalAccess",v=>v.parentStyleSheet]),t,r.styleMirror);return(p&&p!==-1||l&&l!==-1)&&e({id:p,styleId:l,remove:{property:f},index:ou(u.parentRule)}),c.apply(u,d)})}),it(()=>{i.CSSStyleDeclaration.prototype.setProperty=s,i.CSSStyleDeclaration.prototype.removeProperty=o})}function qR({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:i,sampling:s,doc:o}){const c=it(d=>ea(it(f=>{const p=na(f);if(!p||Bn(p,t,n,r,!0))return;const{currentTime:l,volume:v,muted:a,playbackRate:h}=p;e({type:d,id:i.getId(p),currentTime:l,volume:v,muted:a,playbackRate:h})}),s.media||500)),u=[En("play",c(0),o),En("pause",c(1),o),En("seeked",c(2),o),En("volumechange",c(3),o),En("ratechange",c(4),o)];return it(()=>{u.forEach(d=>d())})}function VR({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],i=new WeakMap,s=n.FontFace;n.FontFace=function(u,d,f){const p=new s(u,d,f);return i.set(p,{family:u,buffer:typeof d!="string",descriptors:f,fontSource:typeof d=="string"?d:JSON.stringify(Array.from(new Uint8Array(d)))}),p};const o=Ef(t.fonts,"add",function(c){return function(u){return su(it(()=>{const d=i.get(u);d&&(e(d),i.delete(u))}),0),c.apply(this,[u])}});return r.push(()=>{n.FontFace=s}),r.push(o),it(()=>{r.forEach(c=>c())})}function $R(e){const{doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,selectionCb:o}=e;let c=!0;const u=it(()=>{const d=t.getSelection();if(!d||c&&or([d,"optionalAccess",l=>l.isCollapsed]))return;c=d.isCollapsed||!1;const f=[],p=d.rangeCount||0;for(let l=0;l<p;l++){const v=d.getRangeAt(l),{startContainer:a,startOffset:h,endContainer:y,endOffset:g}=v;Bn(a,r,i,s,!0)||Bn(y,r,i,s,!0)||f.push({start:n.getId(a),startOffset:h,end:n.getId(y),endOffset:g})}o({ranges:f})});return u(),En("selectionchange",u)}function GR({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:Ef(n.customElements,"define",function(i){return function(s,o,c){try{t({define:{name:s}})}catch{}return i.apply(this,[s,o,c])}})}function HR(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=h1(e,e.doc));const i=DR(e),s=PR(e),o=p1(e),c=jR(e,{win:n}),u=BR(e),d=qR(e);let f=()=>{},p=()=>{},l=()=>{},v=()=>{};e.recordDOM&&(f=FR(e,{win:n}),p=g1(e,e.doc),l=UR(e,{win:n}),e.collectFonts&&(v=VR(e)));const a=$R(e),h=GR(e),y=[];for(const g of e.plugins)y.push(g.observer(g.callback,n,g.options));return it(()=>{Ms.forEach(g=>g.reset()),or([r,"optionalAccess",g=>g.disconnect,"call",g=>g()]),i(),s(),o(),c(),u(),d(),f(),p(),l(),v(),a(),h(),y.forEach(g=>g())})}function au(e){return typeof window[e]<"u"}function cu(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Tf{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,i){const s=r||this.getIdToRemoteIdMap(t),o=i||this.getRemoteIdToIdMap(t);let c=s.get(n);return c||(c=this.generateIdFn(),s.set(n,c),o.set(c,n)),c}getIds(t,n){const r=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return n.map(s=>this.getId(t,s,r,i))}getRemoteId(t,n,r){const i=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const s=i.get(n);return s||-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}}function y1(e){let t,n=e[0],r=1;for(;r<e.length;){const i=e[r],s=e[r+1];if(r+=2,(i==="optionalAccess"||i==="optionalCall")&&n==null)return;i==="access"||i==="optionalAccess"?(t=n,n=s(n)):(i==="call"||i==="optionalCall")&&(n=s((...o)=>n.call(t,...o)),t=void 0)}return n}class YR{constructor(){this.crossOriginIframeMirror=new Tf(wf),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class WR{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Tf(wf),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Tf(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}),y1([this,"access",r=>r.loadListener,"optionalCall",r=>r(t)]),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}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 s=this.transformCrossOriginEvent(i,n.data.event);s&&this.wrappedEmit(s,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:Fe.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 Fe.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 Fe.Drag:case Fe.TouchMove:case Fe.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case Fe.ViewportResize:return!1;case Fe.MediaInteraction:case Fe.MouseInteraction:case Fe.Scroll:case Fe.CanvasMutation:case Fe.Input:return this.replaceIds(n.data,t,["id"]),n;case Fe.StyleSheetRule:case Fe.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case Fe.Font:return n;case Fe.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case Fe.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),y1([n,"access",r=>r.data,"access",r=>r.styles,"optionalAccess",r=>r.forEach,"call",r=>r(i=>{this.replaceStyleIds(i,t,["styleId"])})]),n}}return!1}replace(t,n,r,i){for(const s of i)!Array.isArray(n[s])&&typeof n[s]!="number"||(Array.isArray(n[s])?n[s]=t.getIds(r,n[s]):n[s]=t.getId(r,n[s]));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!==Jt.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class KR{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class zR{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(!Jo(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=h1({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(p1({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),su(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(g1({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(Ef(t.prototype,"attachShadow",function(i){return function(s){const o=i.call(this,s);return this.shadowRoot&&o1(this)&&r.addShadowRoot(this.shadowRoot,n),o}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}class v1{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class QR{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new xR,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 s of t){let o;this.styleMirror.has(s)?o=this.styleMirror.getId(s):(o=this.styleMirror.add(s),i.push({styleId:o,rules:Array.from(s.rules||CSSRule,(c,u)=>({rule:Fv(c),index:u}))})),r.styleIds.push(o)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class JR{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,AR(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let jt,uu;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=Pn([e,"access",t=>t.contentWindow,"optionalAccess",t=>t.Array,"access",t=>t.from])||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const ar=JO();function jr(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:s=null,unblockSelector:o=null,ignoreClass:c="rr-ignore",ignoreSelector:u=null,maskAllText:d=!1,maskTextClass:f="rr-mask",unmaskTextClass:p=null,maskTextSelector:l=null,unmaskTextSelector:v=null,inlineStylesheet:a=!0,maskAllInputs:h,maskInputOptions:y,slimDOMOptions:g,maskAttributeFn:b,maskInputFn:w,maskTextFn:E,maxCanvasSize:S=null,packFn:A,sampling:T={},dataURLOptions:O={},mousemoveWait:N,recordDOM:D=!0,recordCanvas:U=!1,recordCrossOriginIframes:q=!1,recordAfter:F=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:V=!1,collectFonts:R=!1,inlineImages:L=!1,plugins:W,keepIframeSrcFn:z=()=>!1,ignoreCSSAttributes:Z=new Set([]),errorHandler:te,onMutation:re,getCanvasManager:he}=e;NR(te);const ce=q?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()=>{};N!==void 0&&T.mousemove===void 0&&(T.mousemove=N),ar.reset();const le=h===!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}:y!==void 0?y:{},$=g===!0||g==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:g==="all",headMetaDescKeywords:g==="all"}:g||{};SR();let H,X=0;const C=ie=>{for(const be of W||[])be.eventProcessor&&(ie=be.eventProcessor(ie));return A&&!ye&&(ie=A(ie)),ie};jt=(ie,be)=>{const oe=ie;if(oe.timestamp=iu(),Pn([Ms,"access",Ce=>Ce[0],"optionalAccess",Ce=>Ce.isFrozen,"call",Ce=>Ce()])&&oe.type!==Qe.FullSnapshot&&!(oe.type===Qe.IncrementalSnapshot&&oe.data.source===Fe.Mutation)&&Ms.forEach(Ce=>Ce.unfreeze()),ce)Pn([t,"optionalCall",Ce=>Ce(C(oe),be)]);else if(ye){const Ce={type:"rrweb",event:C(oe),origin:window.location.origin,isCheckout:be};window.parent.postMessage(Ce,"*")}if(oe.type===Qe.FullSnapshot)H=oe,X=0;else if(oe.type===Qe.IncrementalSnapshot){if(oe.data.source===Fe.Mutation&&oe.data.isAttachIframe)return;X++;const Ce=r&&X>=r,_e=n&&H&&oe.timestamp-H.timestamp>n;(Ce||_e)&&ue(!0)}};const j=ie=>{jt({type:Qe.IncrementalSnapshot,data:{source:Fe.Mutation,...ie}})},B=ie=>jt({type:Qe.IncrementalSnapshot,data:{source:Fe.Scroll,...ie}}),M=ie=>jt({type:Qe.IncrementalSnapshot,data:{source:Fe.CanvasMutation,...ie}}),ee=ie=>jt({type:Qe.IncrementalSnapshot,data:{source:Fe.AdoptedStyleSheet,...ie}}),J=new QR({mutationCb:j,adoptedStyleSheetCb:ee}),Q=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new YR:new WR({mirror:ar,mutationCb:j,stylesheetManager:J,recordCrossOriginIframes:q,wrappedEmit:jt});for(const ie of W||[])ie.getMirror&&ie.getMirror({nodeMirror:ar,crossOriginIframeMirror:Q.crossOriginIframeMirror,crossOriginIframeStyleMirror:Q.crossOriginIframeStyleMirror});const Y=new JR,pe=XR(he,{mirror:ar,win:window,mutationCb:ie=>jt({type:Qe.IncrementalSnapshot,data:{source:Fe.CanvasMutation,...ie}}),recordCanvas:U,blockClass:i,blockSelector:s,unblockSelector:o,maxCanvasSize:S,sampling:T.canvas,dataURLOptions:O,errorHandler:te}),ge=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new KR:new zR({mutationCb:j,scrollCb:B,bypassOptions:{onMutation:re,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:d,maskTextClass:f,unmaskTextClass:p,maskTextSelector:l,unmaskTextSelector:v,inlineStylesheet:a,maskInputOptions:le,dataURLOptions:O,maskAttributeFn:b,maskTextFn:E,maskInputFn:w,recordCanvas:U,inlineImages:L,sampling:T,slimDOMOptions:$,iframeManager:Q,stylesheetManager:J,canvasManager:pe,keepIframeSrcFn:z,processedNodeManager:Y},mirror:ar}),ue=(ie=!1)=>{if(!D)return;jt({type:Qe.Meta,data:{href:window.location.href,width:e1(),height:Xv()}},ie),J.reset(),ge.init(),Ms.forEach(oe=>oe.lock());const be=wR(document,{mirror:ar,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:d,maskTextClass:f,unmaskTextClass:p,maskTextSelector:l,unmaskTextSelector:v,inlineStylesheet:a,maskAllInputs:le,maskAttributeFn:b,maskInputFn:w,maskTextFn:E,slimDOM:$,dataURLOptions:O,recordCanvas:U,inlineImages:L,onSerialize:oe=>{r1(oe,ar)&&Q.addIframe(oe),i1(oe,ar)&&J.trackLinkElement(oe),_f(oe)&&ge.addShadowRoot(oe.shadowRoot,document)},onIframeLoad:(oe,Ce)=>{Q.attachIframe(oe,Ce),oe.contentWindow&&pe.addWindow(oe.contentWindow),ge.observeAttachShadow(oe)},onStylesheetLoad:(oe,Ce)=>{J.attachLinkElement(oe,Ce)},keepIframeSrcFn:z});if(!be)return console.warn("Failed to snapshot the document");jt({type:Qe.FullSnapshot,data:{node:be,initialOffset:Zv(window)}}),Ms.forEach(oe=>oe.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&J.adoptStyleSheets(document.adoptedStyleSheets,ar.getId(document))};uu=ue;try{const ie=[],be=Ce=>it(HR)({onMutation:re,mutationCb:j,mousemoveCb:(_e,We)=>jt({type:Qe.IncrementalSnapshot,data:{source:We,positions:_e}}),mouseInteractionCb:_e=>jt({type:Qe.IncrementalSnapshot,data:{source:Fe.MouseInteraction,..._e}}),scrollCb:B,viewportResizeCb:_e=>jt({type:Qe.IncrementalSnapshot,data:{source:Fe.ViewportResize,..._e}}),inputCb:_e=>jt({type:Qe.IncrementalSnapshot,data:{source:Fe.Input,..._e}}),mediaInteractionCb:_e=>jt({type:Qe.IncrementalSnapshot,data:{source:Fe.MediaInteraction,..._e}}),styleSheetRuleCb:_e=>jt({type:Qe.IncrementalSnapshot,data:{source:Fe.StyleSheetRule,..._e}}),styleDeclarationCb:_e=>jt({type:Qe.IncrementalSnapshot,data:{source:Fe.StyleDeclaration,..._e}}),canvasMutationCb:M,fontCb:_e=>jt({type:Qe.IncrementalSnapshot,data:{source:Fe.Font,..._e}}),selectionCb:_e=>{jt({type:Qe.IncrementalSnapshot,data:{source:Fe.Selection,..._e}})},customElementCb:_e=>{jt({type:Qe.IncrementalSnapshot,data:{source:Fe.CustomElement,..._e}})},blockClass:i,ignoreClass:c,ignoreSelector:u,maskAllText:d,maskTextClass:f,unmaskTextClass:p,maskTextSelector:l,unmaskTextSelector:v,maskInputOptions:le,inlineStylesheet:a,sampling:T,recordDOM:D,recordCanvas:U,inlineImages:L,userTriggeredOnInput:V,collectFonts:R,doc:Ce,maskAttributeFn:b,maskInputFn:w,maskTextFn:E,keepIframeSrcFn:z,blockSelector:s,unblockSelector:o,slimDOMOptions:$,dataURLOptions:O,mirror:ar,iframeManager:Q,stylesheetManager:J,shadowDomManager:ge,processedNodeManager:Y,canvasManager:pe,ignoreCSSAttributes:Z,plugins:Pn([W,"optionalAccess",_e=>_e.filter,"call",_e=>_e(We=>We.observer),"optionalAccess",_e=>_e.map,"call",_e=>_e(We=>({observer:We.observer,options:We.options,callback:rt=>jt({type:Qe.Plugin,data:{plugin:We.name,payload:rt}})}))])||[]},{});Q.addLoadListener(Ce=>{try{ie.push(be(Ce.contentDocument))}catch(_e){console.warn(_e)}});const oe=()=>{ue(),ie.push(be(document))};return document.readyState==="interactive"||document.readyState==="complete"?oe():(ie.push(En("DOMContentLoaded",()=>{jt({type:Qe.DomContentLoaded,data:{}}),F==="DOMContentLoaded"&&oe()})),ie.push(En("load",()=>{jt({type:Qe.Load,data:{}}),F==="load"&&oe()},window))),()=>{ie.forEach(Ce=>Ce()),Y.destroy(),uu=void 0,MR()}}catch(ie){console.warn(ie)}}function ZR(e){if(!uu)throw new Error("please take full snapshot after start recording");uu(e)}jr.mirror=ar,jr.takeFullSnapshot=ZR;function XR(e,t){try{return e?e(t):new v1}catch{return console.warn("Unable to initialize CanvasManager"),new v1}}const De=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,b1=["info","warn","error","log"],lu="[Replay] ";function If(e,t="info"){hi({category:"console",data:{logger:"replay"},level:t,message:`${lu}${e}`},{level:t})}function eN(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=r.captureExceptions,t=r.traceInternals}};return De?(b1.forEach(r=>{n[r]=(...i)=>{Se[r](lu,...i),t&&If(i.join(""),ty(r))}}),n.exception=(r,...i)=>{i.length&&n.error&&n.error(...i),Se.error(lu,r),e?Yd(r):t&&If(r,"error")},n.infoTick=(...r)=>{Se.info(lu,...r),t&&setTimeout(()=>If(r[0]),0)}):b1.forEach(r=>{n[r]=()=>{}}),n}const Le=eN(),tN=3,nN=5;function kf(e){return e>9999999999?e:e*1e3}function Of(e){return e>9999999999?e/1e3:e}function ra(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:vr(t,10,1e3)}}),t.category==="console")))}const rN="button,a";function w1(e){return e.closest(rN)||e}function E1(e){const t=S1(e);return!t||!(t instanceof Element)?t:w1(t)}function S1(e){return iN(e)?e.target:e}function iN(e){return typeof e=="object"&&!!e&&"target"in e}let gi;function sN(e){return gi||(gi=[],oN()),gi.push(e),()=>{const t=gi?gi.indexOf(e):-1;t>-1&&gi.splice(t,1)}}function oN(){kn(Et,"open",function(e){return function(...t){if(gi)try{gi.forEach(n=>n())}catch{}return e.apply(Et,t)}})}const aN=new Set([Fe.Mutation,Fe.StyleSheetRule,Fe.StyleDeclaration,Fe.AdoptedStyleSheet,Fe.CanvasMutation,Fe.Selection,Fe.MediaInteraction]);function cN(e,t,n){e.handleClick(t,n)}class uN{constructor(t,n,r=ra){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const t=sN(()=>{this._lastMutation=x1()});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(dN(n,this._ignoreSelector)||!fN(t))return;const r={timestamp:Of(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=Of(t)}registerScroll(t=Date.now()){this._lastScroll=Of(t)}registerClick(t){const n=w1(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=x1();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._scollTimeout,i=t.mutationAfter&&t.mutationAfter<=this._threshold,s=!r&&!i,{clickCount:o,clickBreadcrumb:c}=t;if(s){const u=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,d=u<this._timeout*1e3?"mutation":"timeout",f={type:"default",message:c.message,timestamp:c.timestamp,category:"ui.slowClickDetected",data:{...c.data,url:Et.location.href,route:n.getCurrentRoute(),timeAfterClickMs:u,endReason:d,clickCount:o||1}};this._addBreadcrumbEvent(n,f);return}if(o>1){const u={type:"default",message:c.message,timestamp:c.timestamp,category:"ui.multiClick",data:{...c.data,url:Et.location.href,route:n.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(n,u)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=Cs(()=>this._checkClicks(),1e3)}}const lN=["A","BUTTON","INPUT"];function dN(e,t){return!!(!lN.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 fN(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function x1(){return Date.now()/1e3}function hN(e,t){try{if(!pN(t))return;const{source:n}=t.data;if(aN.has(n)&&e.registerMutation(t.timestamp),n===Fe.Scroll&&e.registerScroll(t.timestamp),mN(t)){const{type:r,id:i}=t.data,s=jr.mirror.getNode(i);s instanceof HTMLElement&&r===Sn.Click&&e.registerClick(s)}}catch{}}function pN(e){return e.type===tN}function mN(e){return e.data.source===Fe.MouseInteraction}function Er(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var du;(function(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"})(du||(du={}));const gN=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function yN(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(gN.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const vN=e=>t=>{if(!e.isEnabled())return;const n=bN(t);if(!n)return;const r=t.name==="click",i=r?t.event:void 0;r&&e.clickDetector&&i&&i.target&&!i.altKey&&!i.metaKey&&!i.ctrlKey&&!i.shiftKey&&cN(e.clickDetector,n,E1(t.event)),ra(e,n)};function _1(e,t){const n=jr.mirror.getId(e),r=n&&jr.mirror.getNode(n),i=r&&jr.mirror.getMeta(r),s=i&&EN(i)?i:null;return{message:t,data:s?{nodeId:n,node:{id:n,tagName:s.tagName,textContent:Array.from(s.childNodes).map(o=>o.type===du.Text&&o.textContent).filter(Boolean).map(o=>o.trim()).join(""),attributes:yN(s.attributes)}}:{}}}function bN(e){const{target:t,message:n}=wN(e);return Er({category:`ui.${e.name}`,..._1(t,n)})}function wN(e){const t=e.name==="click";let n,r=null;try{r=t?E1(e.event):S1(e.event),n=kr(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function EN(e){return e.type===du.Element}function SN(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=xN(t);n&&ra(e,n)}function xN(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:s,target:o}=e;if(!o||_N(o)||!s)return null;const c=t||r||i,u=s.length===1;if(!c&&u)return null;const d=kr(o,{maxStringLength:200})||"<unknown>",f=_1(o,d);return Er({category:"ui.keyDown",message:d,data:{...f.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:s}})}function _N(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const CN={resource:ON,paint:IN,navigation:kN};function fu(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function AN(e){return e.map(TN).filter(Boolean)}function TN(e){const t=CN[e.entryType];return t?t(e):null}function Ds(e){return((wn||Et.performance.timeOrigin)+e)/1e3}function IN(e){const{duration:t,entryType:n,name:r,startTime:i}=e,s=Ds(i);return{type:n,name:r,start:s,end:s+t,data:void 0}}function kN(e){const{entryType:t,name:n,decodedBodySize:r,duration:i,domComplete:s,encodedBodySize:o,domContentLoadedEventStart:c,domContentLoadedEventEnd:u,domInteractive:d,loadEventStart:f,loadEventEnd:p,redirectCount:l,startTime:v,transferSize:a,type:h}=e;return i===0?null:{type:`${t}.${h}`,start:Ds(v),end:Ds(s),name:n,data:{size:a,decodedBodySize:r,encodedBodySize:o,duration:i,domInteractive:d,domContentLoadedEventStart:c,domContentLoadedEventEnd:u,loadEventStart:f,loadEventEnd:p,domComplete:s,redirectCount:l}}}function ON(e){const{entryType:t,initiatorType:n,name:r,responseEnd:i,startTime:s,decodedBodySize:o,encodedBodySize:c,responseStatus:u,transferSize:d}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:Ds(s),end:Ds(i),name:r,data:{size:d,statusCode:u,decodedBodySize:o,encodedBodySize:c}}}function RN(e){const t=e.entries[e.entries.length-1],n=t&&t.element?[t.element]:void 0;return hu(e,"largest-contentful-paint",n)}function NN(e){return e.sources!==void 0}function MN(e){const t=[],n=[];for(const r of e.entries)if(NN(r)){const i=[];for(const s of r.sources)if(s.node){n.push(s.node);const o=jr.mirror.getId(s.node);o&&i.push(o)}t.push({value:r.value,nodeIds:i.length?i:void 0})}return hu(e,"cumulative-layout-shift",n,t)}function DN(e){const t=e.entries[e.entries.length-1],n=t&&t.target?[t.target]:void 0;return hu(e,"first-input-delay",n)}function PN(e){const t=e.entries[e.entries.length-1],n=t&&t.target?[t.target]:void 0;return hu(e,"interaction-to-next-paint",n)}function hu(e,t,n,r){const i=e.value,s=e.rating,o=Ds(i);return{type:"web-vital",name:t,start:o,end:o,data:{value:i,size:i,rating:s,nodeIds:n?n.map(c=>jr.mirror.getId(c)):void 0,attributions:r}}}function jN(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(Ss(i,n))}),r.push(vv(fu(RN,e)),sf(fu(MN,e)),bv(fu(DN,e)),wv(fu(PN,e))),()=>{r.forEach(i=>i())}}const LN='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]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(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,a=0,s=new n(r);a<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==r||r<0)&&(r=0),(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},A=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},_=function(r,e){for(var i=[],a=0;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=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:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(d=o[a].s);var g=new n(d+1),w=x(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},x=function(t,n,r){return-1==t.s?Math.max(x(t.l,n,r+1),x(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,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}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 a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},C=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=_(f,15),M=b.t,E=b.l,x=_(h,15),C=x.t,U=x.l,F=D(M),I=F.c,S=F.n,L=D(C),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=_(q,7),H=G.t,J=G.l,K=19;K>4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,C)+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(C,U,0),R=C;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[a[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=p,P=g,Q=y,R=w;for(B=0;B<u;++B){var rt=o[B];if(rt>255){A(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;A(r,m,Q[et]),m+=R[et],et>3&&(A(r,m,rt>>5&8191),m+=i[et])}else A(r,m,N[rt]),m+=P[rt]}return A(r,m,N[256]),m+P[256]},U=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;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}}},L=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=e+=r[s];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}}},O=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=U[s-1],M=y>>13,E=8191&y,z=(1<<o)-1,A=c.p||new n(32768),_=c.h||new n(z+1),x=Math.ceil(o/3),D=2*x,T=function(t){return(a[t]^a[t+1]<<x^a[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=_[H];if(A[J]=K,_[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!w)){p=C(a,g,0,F,I,S,O,q,G,j-G,p),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(a[j+Q]==a[j+Q-W]){for(var $=0;$<Z&&a[j+$]==a[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-A[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=A[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=a[j],++I[a[j]];p=C(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=_,c.p=A,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},j=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},q=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&&j(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)}},B=function(t){return 10+(t.filename?t.filename.length+1:0)},G=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(O(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 a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),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(a),32768),this.s.z=n.length-a+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}();var H=function(){function t(t,n){this.c=L(),this.v=1,G.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),G.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=O(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=L();i.p(n.dictionary),j(t,2,i.d())}}(r,this.o),this.v=0),n&&j(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),J="undefined"!=typeof TextEncoder&&new TextEncoder,K="undefined"!=typeof TextDecoder&&new TextDecoder;try{K.decode(F,{stream:!0})}catch(t){}var N=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(P(t),this.d=n||!1)},t}();function P(n,r){if(r){for(var e=new t(n.length),i=0;i<n.length;++i)e[i]=n.charCodeAt(i);return e}if(J)return J.encode(n);var a=n.length,s=new t(n.length+(n.length>>1)),o=0,f=function(t){s[o++]=t};for(i=0;i<a;++i){if(o+5>s.length){var h=new t(o+8+(a-i<<1));h.set(s),s=h}var l=n.charCodeAt(i);l<128||r?f(l):l<2048?(f(192|l>>6),f(128|63&l)):l>55295&&l<57344?(f(240|(l=65536+(1047552&l)|1023&n.charCodeAt(++i))>>18),f(128|l>>12&63),f(128|l>>6&63),f(128|63&l)):(f(224|l>>12),f(128|l>>6&63),f(128|63&l))}return b(s,0,o)}function Q(t){return function(t,n){n||(n={});var r=S(),e=t.length;r.p(t);var i=O(t,n,B(n),8),a=i.length;return q(i,n),j(i,a-8,r.d()),j(i,a-4,e),i}(P(t))}const R=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 H,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new N(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},V={clear:()=>{R.clear()},addEvent:t=>R.addEvent(t),finish:()=>R.finish(),compress:t=>Q(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in V&&"function"==typeof V[n])try{const t=V[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 BN(){const e=new Blob([LN]);return URL.createObjectURL(e)}class Rf extends Error{constructor(){super(`Event buffer exceeded maximum size of ${mf}.`)}}class C1{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!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>mf)throw new Rf;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(){const t=this.events.map(n=>n.timestamp).sort()[0];return t?kf(t):null}}class FN{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():n()},{once:!0}),this._worker.addEventListener("error",r=>{n(r)},{once:!0})}),this._ensureReadyPromise)}destroy(){De&&Le.info("Destroying compression worker"),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((i,s)=>{const o=({data:c})=>{const u=c;if(u.method===t&&u.id===r){if(this._worker.removeEventListener("message",o),!u.success){De&&Le.error("Error in compression worker: ",u.response),s(new Error("Error in compression worker"));return}i(u.response)}};this._worker.addEventListener("message",o),this._worker.postMessage({id:r,method:t,arg:n})})}_getAndIncrementId(){return this._id++}}class UN{constructor(t){this._worker=new FN(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const n=kf(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>mf?Promise.reject(new Rf):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{De&&Le.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 qN{constructor(t){this._fallback=new C1,this._compression=new UN(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}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}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){De&&Le.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n}=this._fallback,r=[];for(const i of t)r.push(this._compression.addEvent(i));this._compression.hasCheckout=n,this._used=this._compression;try{await Promise.all(r),this._fallback.clear()}catch(i){De&&Le.exception(i,"Failed to add events when switching buffers.")}}}function VN({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=$N(t);if(n)return n}return De&&Le.info("Using simple buffer"),new C1}function $N(e){try{const t=e||GN();if(!t)return;De&&Le.info(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new qN(n)}catch(t){De&&Le.exception(t,"Failed to create compression worker")}}function GN(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?BN():""}function Nf(){try{return"sessionStorage"in Et&&!!Et.sessionStorage}catch{return!1}}function HN(e){YN(),e.session=void 0}function YN(){if(Nf())try{Et.sessionStorage.removeItem(hf)}catch{}}function A1(e){return e===void 0?!1:Math.random()<e}function T1(e){const t=Date.now(),n=e.id||Ct(),r=e.started||t,i=e.lastActivity||t,s=e.segmentId||0,o=e.sampled,c=e.previousSessionId;return{id:n,started:r,lastActivity:i,segmentId:s,sampled:o,previousSessionId:c}}function Mf(e){if(Nf())try{Et.sessionStorage.setItem(hf,JSON.stringify(e))}catch{}}function WN(e,t){return A1(e)?"session":t?"buffer":!1}function I1({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const i=WN(e,t),s=T1({sampled:i,previousSessionId:r});return n&&Mf(s),s}function KN(){if(!Nf())return null;try{const e=Et.sessionStorage.getItem(hf);if(!e)return null;const t=JSON.parse(e);return De&&Le.infoTick("Loading existing session"),T1(t)}catch{return null}}function Df(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function k1(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return Df(e.started,t,r)||Df(e.lastActivity,n,r)}function O1(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!k1(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function Pf({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const i=r.stickySession&&KN();return i?O1(i,{sessionIdleExpire:e,maxReplayDuration:t})?(De&&Le.infoTick("Session in sessionStorage is expired, creating new one..."),I1(r,{previousSessionId:i.id})):i:(De&&Le.infoTick("Creating new session"),I1(r,{previousSessionId:n}))}function zN(e){return e.type===Qe.Custom}function jf(e,t,n){return N1(e,t)?(R1(e,t,n),!0):!1}function QN(e,t,n){return N1(e,t)?R1(e,t,n):Promise.resolve(null)}async function R1(e,t,n){if(!e.eventBuffer)return null;try{n&&e.recordingMode==="buffer"&&e.eventBuffer.clear(),n&&(e.eventBuffer.hasCheckout=!0);const r=e.getOptions(),i=JN(t,r.beforeAddRecordingEvent);return i?await e.eventBuffer.addEvent(i):void 0}catch(r){const i=r&&r instanceof Rf?"addEventSizeExceeded":"addEvent";e.handleException(r),await e.stop({reason:i});const s=Je();s&&s.recordDroppedEvent("internal_sdk_error","replay")}}function N1(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=kf(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(De&&Le.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function JN(e,t){try{if(typeof t=="function"&&zN(e))return t(e)}catch(n){return De&&Le.exception(n,"An error occured in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function Lf(e){return!e.type}function Bf(e){return e.type==="transaction"}function ZN(e){return e.type==="replay_event"}function M1(e){return e.type==="feedback"}function XN(e){return(t,n)=>{if(!e.isEnabled()||!Lf(t)&&!Bf(t))return;const r=n&&n.statusCode;if(!(!r||r<200||r>=300)){if(Bf(t)){e6(e,t);return}t6(e,t)}}}function e6(e,t){const n=e.getContext();t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function t6(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||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||Cs(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(i){e.handleException(i)}})}function n6(e){return t=>{!e.isEnabled()||!Lf(t)||r6(e,t)}}function r6(e,t){const n=t.exception&&t.exception.values&&t.exception.values[0]&&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=Er({category:"replay.hydrate-error",data:{url:k0()}});ra(e,r)}}function i6(e){const t=Je();t&&t.on("beforeAddBreadcrumb",n=>s6(e,n))}function s6(e,t){if(!e.isEnabled()||!D1(t))return;const n=o6(t);n&&ra(e,n)}function o6(e){return!D1(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?a6(e):Er(e)}function a6(e){const t=e.data&&e.data.arguments;if(!Array.isArray(t)||t.length===0)return Er(e);let n=!1;const r=t.map(i=>{if(!i)return i;if(typeof i=="string")return i.length>Zc?(n=!0,`${i.slice(0,Zc)}…`):i;if(typeof i=="object")try{const s=vr(i,7);return JSON.stringify(s).length>Zc?(n=!0,`${JSON.stringify(s,null,2).slice(0,Zc)}…`):s}catch{}return i});return Er({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function D1(e){return!!e.category}function c6(e,t){return e.type||!e.exception||!e.exception.values||!e.exception.values.length?!1:!!(t.originalException&&t.originalException.__rrweb__)}function u6(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 l6(e,t){return e.recordingMode!=="buffer"||t.message===pf||!t.exception||t.type?!1:A1(e.getOptions().errorSampleRate)}function d6(e){return Object.assign((t,n)=>!e.isEnabled()||e.isPaused()?t:ZN(t)?(delete t.breadcrumbs,t):!Lf(t)&&!Bf(t)&&!M1(t)||!e.checkAndHandleExpiredSession()?t:M1(t)?(e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),u6(e,t),t):c6(t,n)&&!e.getOptions()._experiments.captureExceptions?(De&&Le.log("Ignoring error from rrweb internals",t),null):((l6(e,t)||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),t),{id:"Replay"})}function pu(e,t){return t.map(({type:n,start:r,end:i,name:s,data:o})=>{const c=e.throttledAddEvent({type:Qe.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:s,startTimestamp:r,endTimestamp:i,data:o}}});return typeof c=="string"?Promise.resolve(null):c})}function f6(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 h6(e){return t=>{if(!e.isEnabled())return;const n=f6(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(pu(e,[n]),!1)))}}function p6(e,t){return De&&e.getOptions()._experiments.traceInternals?!1:Q4(t,Je())}function P1(e,t){e.isEnabled()&&t!==null&&(p6(e,t.name)||e.addUpdate(()=>(pu(e,[t]),!0)))}function mu(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=F1(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function j1(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function L1(e){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[F1(e)];if(!e)return[void 0]}catch(t){return De&&Le.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return De&&Le.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function gu(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 B1(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:i,method:s,statusCode:o,request:c,response:u}=t;return{type:e,start:n/1e3,end:r/1e3,name:i,data:zt({method:s,statusCode:o,request:c,response:u})}}function ia(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function yi(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:s}=m6(n);return r.body=i,s&&s.length>0&&(r._meta={warnings:s}),r}function Ff(e,t){return Object.entries(e).reduce((n,[r,i])=>{const s=r.toLowerCase();return t.includes(s)&&e[r]&&(n[s]=i),n},{})}function F1(e){return new URLSearchParams(e).toString()}function m6(e){if(!e||typeof e!="string")return{body:e};const t=e.length>Lv,n=g6(e);if(t){const r=e.slice(0,Lv);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 g6(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function yu(e,t){const n=y6(e);return si(n,t)}function y6(e,t=Et.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(Et.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 v6(e,t,n){try{const r=await w6(e,t,n),i=B1("resource.fetch",r);P1(n.replay,i)}catch(r){De&&Le.exception(r,"Failed to capture fetch breadcrumb")}}function b6(e,t){const{input:n,response:r}=t,i=n?U1(n):void 0,s=mu(i),o=r?j1(r.headers.get("content-length")):void 0;s!==void 0&&(e.data.request_body_size=s),o!==void 0&&(e.data.response_body_size=o)}async function w6(e,t,n){const r=Date.now(),{startTimestamp:i=r,endTimestamp:s=r}=t,{url:o,method:c,status_code:u=0,request_body_size:d,response_body_size:f}=e.data,p=yu(o,n.networkDetailAllowUrls)&&!yu(o,n.networkDetailDenyUrls),l=p?E6(n,t.input,d):ia(d),v=await S6(p,n,t.response,f);return{startTimestamp:i,endTimestamp:s,url:o,method:c,statusCode:u,request:l,response:v}}function E6({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const i=n?C6(n,t):{};if(!e)return yi(i,r,void 0);const s=U1(n),[o,c]=L1(s),u=yi(i,r,o);return c?gu(u,c):u}async function S6(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,i){if(!e&&i!==void 0)return ia(i);const s=r?q1(r.headers,n):{};if(!r||!t&&i!==void 0)return yi(s,i,void 0);const[o,c]=await _6(r),u=x6(o,{networkCaptureBodies:t,responseBodySize:i,captureDetails:e,headers:s});return c?gu(u,c):u}function x6(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:i}){try{const s=e&&e.length&&n===void 0?mu(e):n;return r?t?yi(i,s,e):yi(i,s,void 0):ia(s)}catch(s){return De&&Le.exception(s,"Failed to serialize response body"),yi(i,n,void 0)}}async function _6(e){const t=A6(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await T6(t)]}catch(n){return De&&Le.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"]}}function U1(e=[]){if(!(e.length!==2||typeof e[1]!="object"))return e[1].body}function q1(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function C6(e,t){return e.length===1&&typeof e[0]!="string"?V1(e[0],t):e.length===2?V1(e[1],t):{}}function V1(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?q1(n,t):Array.isArray(n)?{}:Ff(n,t):{}}function A6(e){try{return e.clone()}catch(t){De&&Le.exception(t,"Failed to clone response body")}}function T6(e){return new Promise((t,n)=>{const r=Cs(()=>n(new Error("Timeout while trying to read response body")),500);I6(e).then(i=>t(i),i=>n(i)).finally(()=>clearTimeout(r))})}async function I6(e){return await e.text()}async function k6(e,t,n){try{const r=R6(e,t,n),i=B1("resource.xhr",r);P1(n.replay,i)}catch(r){De&&Le.exception(r,"Failed to capture xhr breadcrumb")}}function O6(e,t){const{xhr:n,input:r}=t;if(!n)return;const i=mu(r),s=n.getResponseHeader("content-length")?j1(n.getResponseHeader("content-length")):P6(n.response,n.responseType);i!==void 0&&(e.data.request_body_size=i),s!==void 0&&(e.data.response_body_size=s)}function R6(e,t,n){const r=Date.now(),{startTimestamp:i=r,endTimestamp:s=r,input:o,xhr:c}=t,{url:u,method:d,status_code:f=0,request_body_size:p,response_body_size:l}=e.data;if(!u)return null;if(!c||!yu(u,n.networkDetailAllowUrls)||yu(u,n.networkDetailDenyUrls)){const A=ia(p),T=ia(l);return{startTimestamp:i,endTimestamp:s,url:u,method:d,statusCode:f,request:A,response:T}}const v=c[Bi],a=v?Ff(v.request_headers,n.networkRequestHeaders):{},h=Ff(N6(c),n.networkResponseHeaders),[y,g]=n.networkCaptureBodies?L1(o):[void 0],[b,w]=n.networkCaptureBodies?M6(c):[void 0],E=yi(a,p,y),S=yi(h,l,b);return{startTimestamp:i,endTimestamp:s,url:u,method:d,statusCode:f,request:g?gu(E,g):E,response:w?gu(S,w):S}}function N6(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
126
- `).reduce((n,r)=>{const[i,s]=r.split(": ");return s&&(n[i.toLowerCase()]=s),n},{}):{}}function M6(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return D6(e.response,e.responseType)}catch(n){t.push(n)}return De&&Le.warn("Failed to get xhr response body",...t),[void 0]}function D6(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 De&&Le.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return De&&Le.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function P6(e,t){try{const n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return mu(n)}catch{return}}function j6(e){const t=Je();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:s,networkResponseHeaders:o}=e.getOptions(),c={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:s,networkResponseHeaders:o};t&&t.on("beforeAddBreadcrumb",(u,d)=>L6(c,u,d))}catch{}}function L6(e,t,n){if(t.data)try{B6(t)&&U6(n)&&(O6(t,n),k6(t,n,e)),F6(t)&&q6(n)&&(b6(t,n),v6(t,n,e))}catch(r){De&&Le.exception(r,"Error when enriching network breadcrumb")}}function B6(e){return e.category==="xhr"}function F6(e){return e.category==="fetch"}function U6(e){return e&&e.xhr}function q6(e){return e&&e.response}function V6(e){const t=Je();Av(vN(e)),Kc(h6(e)),i6(e),j6(e);const n=d6(e);D4(n),t&&(t.on("beforeSendEvent",n6(e)),t.on("afterSendEvent",XN(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",(r,i)=>{const s=e.getSessionId();i&&i.includeReplay&&e.isEnabled()&&s&&r.contexts&&r.contexts.feedback&&(r.contexts.feedback.replay_id=s)}))}async function $6(e){try{return Promise.all(pu(e,[G6(Et.performance.memory)]))}catch{return[]}}function G6(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 H6(e,t,n){let r,i,s;const o=n&&n.maxWait?Math.max(n.maxWait,t):0;function c(){return u(),r=e(),r}function u(){i!==void 0&&clearTimeout(i),s!==void 0&&clearTimeout(s),i=s=void 0}function d(){return i!==void 0||s!==void 0?c():r}function f(){return i&&clearTimeout(i),i=Cs(c,t),o&&s===void 0&&(s=Cs(c,o)),r}return f.cancel=u,f.flush=d,f}function Y6(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){De&&Le.warn("Received replay event after session expired.");return}const i=r||!t;t=!0,e.clickDetector&&hN(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&i&&e.setInitialState(),!jf(e,n,i))return!0;if(!i)return!1;const s=e.session;if(K6(e,i),s&&s.previousSessionId)return!0;if(e.recordingMode==="buffer"&&s&&e.eventBuffer){const o=e.eventBuffer.getEarliestTimestamp();o&&(De&&Le.info(`Updating session start time to earliest event in buffer to ${new Date(o)}`),s.started=o,e.getOptions().stickySession&&Mf(s))}return e.recordingMode==="session"&&e.flush(),!0})}}function W6(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 K6(e,t){!t||!e.session||e.session.segmentId!==0||jf(e,W6(e),!1)}function z6(){const e=bt().getPropagationContext().dsc;e&&delete e.replay_id;const t=cn();if(t){const n=di(t);delete n.replay_id}}function Q6(e,t,n,r){return Mi(cy(e,Dd(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function J6({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
127
- `;if(typeof e=="string")n=`${r}${e}`;else{const s=new TextEncoder().encode(r);n=new Uint8Array(s.length+e.length),n.set(s),n.set(e,s.length)}return n}async function Z6({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,s={event_id:n,integrations:i};e.emit("preprocessEvent",r,s);const o=await Ly(e.getOptions(),r,s,t,e,jn());if(!o)return null;o.platform=o.platform||"javascript";const c=e.getSdkMetadata(),{name:u,version:d}=c&&c.sdk||{};return o.sdk={...o.sdk,name:u||"sentry.javascript.unknown",version:d||"0.0.0"},o}async function X6({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:i,session:s}){const o=J6({recordingData:e,headers:{segment_id:n}}),{urls:c,errorIds:u,traceIds:d,initialTimestamp:f}=r,p=Je(),l=bt(),v=p&&p.getTransport(),a=p&&p.getDsn();if(!p||!v||!a||!s.sampled)return Nr({});const h={type:MO,replay_start_timestamp:f/1e3,timestamp:i/1e3,error_ids:u,trace_ids:d,urls:c,replay_id:t,segment_id:n,replay_type:s.sampled},y=await Z6({scope:l,client:p,replayId:t,event:h});if(!y)return p.recordDroppedEvent("event_processor","replay",h),De&&Le.info("An event processor returned `null`, will not send event."),Nr({});delete y.sdkProcessingMetadata;const g=Q6(y,o,a,p.getOptions().tunnel);let b;try{b=await v.send(g)}catch(E){const S=new Error(pf);try{S.cause=E}catch{}throw S}if(typeof b.statusCode=="number"&&(b.statusCode<200||b.statusCode>=300))throw new $1(b.statusCode);const w=ly({},b);if(uy(w,"replay"))throw new Uf(w);return b}class $1 extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class Uf extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function G1(e,t={count:0,interval:FO}){const{recordingData:n,onError:r}=e;if(n.length)try{return await X6(e),!0}catch(i){if(i instanceof $1||i instanceof Uf)throw i;if(Uy("Replays",{_retryCount:t.count}),r&&r(i),t.count>=UO){const s=new Error(`${pf} - max retries exceeded`);try{s.cause=i}catch{}throw s}return t.interval*=++t.count,new Promise((s,o)=>{Cs(async()=>{try{await G1(e,t),s(!0)}catch(c){o(c)}},t.interval)})}}const H1="__THROTTLED",e8="__SKIPPED";function t8(e,t,n){const r=new Map,i=c=>{const u=c-n;r.forEach((d,f)=>{f<u&&r.delete(f)})},s=()=>[...r.values()].reduce((c,u)=>c+u,0);let o=!1;return(...c)=>{const u=Math.floor(Date.now()/1e3);if(i(u),s()>=t){const f=o;return o=!0,f?e8:H1}o=!1;const d=r.get(u)||0;return r.set(u,d+1),e(...c)}}class vi{constructor({options:t,recordingOptions:n}){vi.prototype.__init.call(this),vi.prototype.__init2.call(this),vi.prototype.__init3.call(this),vi.prototype.__init4.call(this),vi.prototype.__init5.call(this),vi.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:DO,sessionIdleExpire:PO},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=H6(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=t8((o,c)=>QN(this,o,c),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:i}=this.getOptions(),s=r?{threshold:Math.min(qO,r),timeout:r,scrollTimeout:VO,ignoreSelector:i?i.join(","):""}:void 0;if(s&&(this.clickDetector=new uN(this,s)),De){const o=t._experiments;Le.setConfig({captureExceptions:!!o.captureExceptions,traceInternals:!!o.traceInternals})}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){De&&Le.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){De&&Le.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",De&&Le.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){De&&Le.info("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){De&&Le.info("Buffering is in progress, call `flush()` to save the replay");return}De&&Le.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=Pf({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this._initializeRecording()}startBuffering(){if(this._isEnabled){De&&Le.info("Buffering is in progress, call `flush()` to save the replay");return}De&&Le.infoTick("Starting replay in buffer mode");const t=Pf({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=jr({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:BO}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:Y6(this),onMutation:this._onMutationHandler,...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){this._isEnabled=!1;try{De&&Le.info(`Stopping Replay${n?` triggered by ${n}`:""}`),z6(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,HN(this)}catch(r){this.handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),De&&Le.info("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),De&&Le.info("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();De&&Le.info("Converting buffer to session"),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const n=t();this.recordingMode!=="buffer"&&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(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(this._lastActivity&&Df(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${Et.location.pathname}${Et.location.hash}${Et.location.search}`,n=`${Et.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===H1){const i=Er({category:"replay.throttled"});this.addUpdate(()=>!jf(this,{type:nN,timestamp:i.timestamp||0,data:{tag:"breadcrumb",payload:i,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||cn(),n=t&&an(t),i=(n&&ot(n).data||{})[br];if(!(!n||!i||!["route","custom"].includes(i)))return ot(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=VN({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=Pf({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 O1(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{Et.document.addEventListener("visibilitychange",this._handleVisibilityChange),Et.addEventListener("blur",this._handleWindowBlur),Et.addEventListener("focus",this._handleWindowFocus),Et.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(V6(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=jN(this)}_removeListeners(){try{Et.document.removeEventListener("visibilitychange",this._handleVisibilityChange),Et.removeEventListener("blur",this._handleWindowBlur),Et.removeEventListener("focus",this._handleWindowFocus),Et.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}__init(){this._handleVisibilityChange=()=>{Et.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const t=Er({category:"ui.blur"});this._doChangeToBackgroundTasks(t)}}__init3(){this._handleWindowFocus=()=>{const t=Er({category:"ui.focus"});this._doChangeToForegroundTasks(t)}}__init4(){this._handleKeyboardEvent=t=>{SN(this,t)}}_doChangeToBackgroundTasks(t){!this.session||k1(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()){De&&Le.info("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(){const t=AN(this.performanceEntries).concat(this.replayPerformanceEntries);return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(pu(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){De&&Le.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!(!this.eventBuffer||!this.eventBuffer.hasEvents)&&(await $6(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const r=this._popEventContext(),i=this.session.segmentId++;this._maybeSaveSession();const s=await this.eventBuffer.finish();await G1({replayId:t,recordingData:s,segmentId:i,eventContext:r,session:this.session,timestamp:n,onError:o=>this.handleException(o)})}catch(n){this.handleException(n),this.stop({reason:"sendReplay"});const r=Je();if(r){const i=n instanceof Uf?"ratelimit_backoff":"send_error";r.recordDroppedEvent(i,"replay")}}}__init5(){this._flush=async({force:t=!1}={})=>{if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){De&&Le.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 s=i<this._options.minReplayDuration,o=i>this._options.maxReplayDuration+5e3;if(s||o){De&&Le.info(`Session duration (${Math.floor(i/1e3)}s) is too ${s?"short":"long"}, not sending replay.`),s&&this._debouncedFlush();return}const c=this.eventBuffer;c&&this.session.segmentId===0&&!c.hasCheckout&&De&&Le.info("Flushing initial segment without checkout.");const u=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(d){this.handleException(d)}finally{this._flushLock=void 0,u&&this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&Mf(this.session)}__init6(){this._onMutationHandler=t=>{const n=t.length,r=this._options.mutationLimit,i=this._options.mutationBreadcrumbLimit,s=r&&n>r;if(n>i||s){const o=Er({category:"replay.mutations",data:{count:n,limit:s}});this._createCustomBreadcrumb(o)}return s?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}}function sa(e,t){return[...e,...t].join(",")}function n8({mask:e,unmask:t,block:n,unblock:r,ignore:i}){const s=['base[href="/"]'],o=sa(e,[".sentry-mask","[data-sentry-mask]"]),c=sa(t,[]);return{maskTextSelector:o,unmaskTextSelector:c,blockSelector:sa(n,[".sentry-block","[data-sentry-block]",...s]),unblockSelector:sa(r,[]),ignoreSelector:sa(i,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function r8({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:i,value:s}){return!r||i.unmaskTextSelector&&e.matches(i.unmaskTextSelector)?s:n.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?s.replace(/[\S]/g,"*"):s}const Y1='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',i8=["content-length","content-type","accept"];let W1=!1;const s8=e=>new vu(e);class vu{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:t=jO,flushMaxDelay:n=LO,minReplayDuration:r=$O,maxReplayDuration:i=Bv,stickySession:s=!0,useCompression:o=!0,workerUrl:c,_experiments:u={},maskAllText:d=!0,maskAllInputs:f=!0,blockAllMedia:p=!0,mutationBreadcrumbLimit:l=750,mutationLimit:v=1e4,slowClickTimeout:a=7e3,slowClickIgnoreSelectors:h=[],networkDetailAllowUrls:y=[],networkDetailDenyUrls:g=[],networkCaptureBodies:b=!0,networkRequestHeaders:w=[],networkResponseHeaders:E=[],mask:S=[],maskAttributes:A=["title","placeholder"],unmask:T=[],block:O=[],unblock:N=[],ignore:D=[],maskFn:U,beforeAddRecordingEvent:q,beforeErrorSampling:F}={}){this.name=vu.id;const V=n8({mask:S,unmask:T,block:O,unblock:N,ignore:D});if(this._recordingOptions={maskAllInputs:f,maskAllText:d,maskInputOptions:{password:!0},maskTextFn:U,maskInputFn:U,maskAttributeFn:(R,L,W)=>r8({maskAttributes:A,maskAllText:d,privacyOptions:V,key:R,value:L,el:W}),...V,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:R=>{try{R.__rrweb__=!0}catch{}}},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,GO),maxReplayDuration:Math.min(i,Bv),stickySession:s,useCompression:o,workerUrl:c,blockAllMedia:p,maskAllInputs:f,maskAllText:d,mutationBreadcrumbLimit:l,mutationLimit:v,slowClickTimeout:a,slowClickIgnoreSelectors:h,networkDetailAllowUrls:y,networkDetailDenyUrls:g,networkCaptureBodies:b,networkRequestHeaders:K1(w),networkResponseHeaders:K1(E),beforeAddRecordingEvent:q,beforeErrorSampling:F,_experiments:u},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Y1}`:Y1),this._isInitialized&&Q0())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return W1}set _isInitialized(t){W1=t}afterAllSetup(t){!Q0()||this._replay||(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"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){if(!(!this._replay||!this._replay.isEnabled()))return this._replay.getSessionId()}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=o8(this._initialOptions,t);this._replay=new vi({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}vu.__initStatic();function o8(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...zt(e)},i=Fc(n.replaysSessionSampleRate),s=Fc(n.replaysOnErrorSampleRate);return i==null&&s==null&&hs(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),i!=null&&(r.sessionSampleRate=i),s!=null&&(r.errorSampleRate=s),r}function K1(e){return[...i8,...e.map(t=>t.toLowerCase())]}const z1=new WeakMap,qf=new Map,Vf={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0};function a8(e,t){const{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:i,enableHTTPTimings:s,tracePropagationTargets:o}={traceFetch:Vf.traceFetch,traceXHR:Vf.traceXHR,...t},c=typeof i=="function"?i:f=>!0,u=f=>d8(f,o),d={};n&&(e.addEventProcessor(f=>(f.type==="transaction"&&f.spans&&f.spans.forEach(p=>{if(p.op==="http.client"){const l=qf.get(p.span_id);l&&(p.timestamp=l/1e3,qf.delete(p.span_id))}}),f)),KT(f=>{if(f.response){const p=z1.get(f.response);p&&f.endTimestamp&&qf.set(p,f.endTimestamp)}}),H0(f=>{const p=w5(f,c,u,d);if(f.response&&f.fetchData.__span&&z1.set(f.response,f.fetchData.__span),p){const l=J1(f.fetchData.url),v=l?Ni(l).host:void 0;p.setAttributes({"http.url":l,"server.address":v})}s&&p&&Q1(p)})),r&&Ov(f=>{const p=f8(f,c,u,d);s&&p&&Q1(p)})}function c8(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function Q1(e){const{url:t}=ot(e).data||{};if(!t||typeof t!="string")return;const n=Ss("resource",({entries:r})=>{r.forEach(i=>{c8(i)&&i.name.endsWith(t)&&(l8(i).forEach(o=>e.setAttribute(...o)),setTimeout(n))})})}function u8(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 Sr(e=0){return((wn||performance.timeOrigin)+e)/1e3}function l8(e){const{name:t,version:n}=u8(e.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",t]),wn?[...r,["http.request.redirect_start",Sr(e.redirectStart)],["http.request.fetch_start",Sr(e.fetchStart)],["http.request.domain_lookup_start",Sr(e.domainLookupStart)],["http.request.domain_lookup_end",Sr(e.domainLookupEnd)],["http.request.connect_start",Sr(e.connectStart)],["http.request.secure_connection_start",Sr(e.secureConnectionStart)],["http.request.connection_end",Sr(e.connectEnd)],["http.request.request_start",Sr(e.requestStart)],["http.request.response_start",Sr(e.responseStart)],["http.request.response_end",Sr(e.responseEnd)]]:r}function d8(e,t){const n=Ne.location&&Ne.location.href;if(n){let r,i;try{r=new URL(e,n),i=new URL(n).origin}catch{return!1}const s=r.origin===i;return t?si(r.toString(),t)||s&&si(r.pathname,t):s}else{const r=!!e.match(/^\/(?!\/)/);return t?si(e,t):r}}function f8(e,t,n,r){const i=e.xhr,s=i&&i[Bi];if(!i||i.__sentry_own_request__||!s)return;const o=Mr()&&t(s.url);if(e.endTimestamp&&o){const l=i.__sentry_xhr_span_id__;if(!l)return;const v=r[l];v&&s.status_code!==void 0&&(py(v,s.status_code),v.end(),delete r[l]);return}const c=J1(s.url),u=c?Ni(c).host:void 0,d=!!cn(),f=o&&d?fi({name:`${s.method} ${s.url}`,attributes:{type:"xhr","http.method":s.method,"http.url":c,url:s.url,"server.address":u,[Qt]:"auto.http.browser",[li]:"http.client"}}):new vs;i.__sentry_xhr_span_id__=f.spanContext().spanId,r[i.__sentry_xhr_span_id__]=f;const p=Je();return i.setRequestHeader&&n(s.url)&&p&&h8(i,p,Mr()&&d?f:void 0),f}function h8(e,t,n){const r=bt(),i=jn(),{traceId:s,spanId:o,sampled:c,dsc:u}={...i.getPropagationContext(),...r.getPropagationContext()},d=n&&Mr()?yy(n):Nd(s,o,c),f=iy(u||(n?di(n):Bc(s,t)));p8(e,d,f)}function p8(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader(Rd,n)}catch{}}function J1(e){try{return new URL(e,Ne.location.origin).href}catch{return}}function m8(){Ne&&Ne.document?Ne.document.addEventListener("visibilitychange",()=>{const e=cn();if(!e)return;const t=an(e);if(Ne.document.hidden&&t){const n="cancelled",{op:r,status:i}=ot(t);On&&Se.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),i||t.setStatus({code:tn,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):On&&Se.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const g8="BrowserTracing",y8={...Uc,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,_experiments:{},...Vf},v8=(e={})=>{QI();const{enableInp:t,enableLongTask:n,enableLongAnimationFrame:r,_experiments:{enableInteractions:i,enableStandaloneClsSpans:s},beforeStartSpan:o,idleTimeout:c,finalTimeout:u,childSpanTimeout:d,markBackgroundSpan:f,traceFetch:p,traceXHR:l,shouldCreateSpanForRequest:v,enableHTTPTimings:a,instrumentPageLoad:h,instrumentNavigation:y}={...y8,...e},g=vk({recordClsStandaloneSpans:s||!1});t&&Vk(),r&&nt.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?wk():n&&bk(),i&&Ek();const b={name:void 0,source:void 0};function w(E,S){const A=S.op==="pageload",T=o?o(S):S,O=T.attributes||{};S.name!==T.name&&(O[br]="custom",T.attributes=O),b.name=T.name,b.source=O[br];const N=Py(T,{idleTimeout:c,finalTimeout:u,childSpanTimeout:d,disableAutoFinish:A,beforeSpanEnd:U=>{g(),Ak(U,{recordClsOnPageloadSpan:!s})}});function D(){["interactive","complete"].includes(Ne.document.readyState)&&E.emit("idleSpanEnableAutoFinish",N)}return A&&Ne.document&&(Ne.document.addEventListener("readystatechange",()=>{D()}),D()),N}return{name:g8,afterAllSetup(E){let S,A=Ne.location&&Ne.location.href;E.on("startNavigationSpan",T=>{Je()===E&&(S&&!ot(S).timestamp&&(On&&Se.log(`[Tracing] Finishing current root span with op: ${ot(S).op}`),S.end()),S=w(E,{op:"navigation",...T}))}),E.on("startPageLoadSpan",(T,O={})=>{if(Je()!==E)return;S&&!ot(S).timestamp&&(On&&Se.log(`[Tracing] Finishing current root span with op: ${ot(S).op}`),S.end());const N=O.sentryTrace||X1("sentry-trace"),D=O.baggage||X1("baggage"),U=yI(N,D);bt().setPropagationContext(U),S=w(E,{op:"pageload",...T})}),E.on("spanEnd",T=>{const O=ot(T).op;if(T!==an(T)||O!=="navigation"&&O!=="pageload")return;const N=bt(),D=N.getPropagationContext();N.setPropagationContext({...D,sampled:D.sampled!==void 0?D.sampled:Pi(T),dsc:D.dsc||di(T)})}),Ne.location&&(h&&Z1(E,{name:Ne.location.pathname,startTime:wn?wn/1e3:void 0,attributes:{[br]:"url",[Qt]:"auto.pageload.browser"}}),y&&Kc(({to:T,from:O})=>{if(O===void 0&&A&&A.indexOf(T)!==-1){A=void 0;return}O!==T&&(A=void 0,b8(E,{name:Ne.location.pathname,attributes:{[br]:"url",[Qt]:"auto.navigation.browser"}}))})),f&&m8(),i&&w8(c,u,d,b),t&&Gk(),a8(E,{traceFetch:p,traceXHR:l,tracePropagationTargets:E.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:v,enableHTTPTimings:a})}}};function Z1(e,t,n){e.emit("startPageLoadSpan",t,n),bt().setTransactionName(t.name);const r=cn();return(r&&ot(r).op)==="pageload"?r:void 0}function b8(e,t){jn().setPropagationContext(Rc()),bt().setPropagationContext(Rc()),e.emit("startNavigationSpan",t),bt().setTransactionName(t.name);const n=cn();return(n&&ot(n).op)==="navigation"?n:void 0}function X1(e){const t=NT(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}function w8(e,t,n,r){let i;const s=()=>{const o="ui.action.click",c=cn(),u=c&&an(c);if(u){const d=ot(u).op;if(["navigation","pageload"].includes(d)){On&&Se.warn(`[Tracing] Did not create ${o} span because a pageload or navigation span is in progress.`);return}}if(i&&(i.setAttribute(Fd,"interactionInterrupted"),i.end(),i=void 0),!r.name){On&&Se.warn(`[Tracing] Did not create ${o} transaction because _latestRouteName is missing.`);return}i=Py({name:r.name,op:o,attributes:{[br]:r.source||"url"}},{idleTimeout:e,finalTimeout:t,childSpanTimeout:n})};Ne.document&&addEventListener("click",s,{once:!1,capture:!0})}function E8(e){const t={...e};return ev(t,"react"),Uy("react",{version:k.version}),RO(t)}function S8(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}function x8(e,t){const n=new WeakSet;function r(i,s){if(!n.has(i)){if(i.cause)return n.add(i),r(i.cause,s);i.cause=s}}r(e,t)}function _8(e,{componentStack:t},n){if(S8(k.version)&&Ec(e)&&t){const r=new Error(e.message);r.name=`React ErrorBoundary ${e.name}`,r.stack=t,x8(e,r)}return Yd(e,{...n,captureContext:{contexts:{react:{componentStack:t}}}})}var $f={exports:{}},dt={};/** @license React v16.13.1
125
+ or you can use record.mirror to access the mirror instance during recording.`;let Xv={map:{},getId(){return console.error(Rs),-1},getNode(){return console.error(Rs),null},removeNodeFromMap(){console.error(Rs)},has(){return console.error(Rs),!1},reset(){console.error(Rs)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Xv=new Proxy(Xv,{get(e,t,n){return t==="map"&&console.error(Rs),Reflect.get(e,t,n)}}));function ea(e,t,n={}){let r=null,i=0;return function(...s){const o=Date.now();!i&&n.leading===!1&&(i=o);const c=t-(o-i),u=this;c<=0||c>t?(r&&(D6(r),r=null),i=o,e.apply(u,s)):!r&&n.trailing!==!1&&(r=ou(()=>{i=n.leading===!1?0:Date.now(),r=null,e.apply(u,s)},c))}}function e1(e,t,n,r,i=window){const s=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(o){ou(()=>{n.set.call(this,o)},0),s&&s.set&&s.set.call(this,o)}}),()=>e1(e,t,s||{},!0)}function xf(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 su=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(su=()=>new Date().getTime());function t1(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:hi([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollLeft])||hi([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollLeft])||hi([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:hi([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollTop])||hi([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollTop])||hi([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollTop])||0}}function n1(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function r1(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function i1(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function Bn(e,t,n,r,i){if(!e)return!1;const s=i1(e);if(!s)return!1;const o=Is(t,n);if(!i){const d=r&&s.matches(r);return o(s)&&!d}const c=Li(s,o);let u=-1;return c<0?!1:(r&&(u=Li(s,Is(null,r))),c>-1&&u<0?!0:c<u)}function I6(e,t){return t.getId(e)!==-1}function _f(e,t){return t.getId(e)===Xo}function s1(e,t){if(Qo(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?s1(e.parentNode,t):!0:!0}function Cf(e){return!!e.changedTouches}function k6(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 o1(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function a1(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Af(e){return!!hi([e,"optionalAccess",t=>t.shadowRoot])}class O6{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return P4(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 c1(e){let t=null;return hi([e,"access",n=>n.getRootNode,"optionalCall",n=>n(),"optionalAccess",n=>n.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function R6(e){let t=e,n;for(;n=c1(t);)t=n;return t}function N6(e){const t=e.ownerDocument;if(!t)return!1;const n=R6(e);return t.contains(n)}function u1(e){const t=e.ownerDocument;return t?t.contains(e)||N6(e):!1}const l1={};function Tf(e){const t=l1[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 s=i.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(i)}catch{}return l1[e]=r.bind(window)}function M6(...e){return Tf("requestAnimationFrame")(...e)}function ou(...e){return Tf("setTimeout")(...e)}function D6(...e){return Tf("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||{}),Fe=(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))(Fe||{}),xn=(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))(xn||{}),Dr=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Dr||{});function P6(e){let t,n=e[0],r=1;for(;r<e.length;){const i=e[r],s=e[r+1];if(r+=2,(i==="optionalAccess"||i==="optionalCall")&&n==null)return;i==="access"||i==="optionalAccess"?(t=n,n=s(n)):(i==="call"||i==="optionalCall")&&(n=s((...o)=>n.call(t,...o)),t=void 0)}return n}function d1(e){return"__ln"in e}class j6{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=P6([n,"optionalAccess",i=>i.next])||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&d1(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&&d1(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 f1=(e,t)=>`${e}@${t}`;class L6{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 j6,i=u=>{let d=u,f=Xo;for(;f===Xo;)d=d&&d.nextSibling,f=d&&this.mirror.getId(d);return f},s=u=>{if(!u.parentNode||!u1(u))return;const d=Qo(u.parentNode)?this.mirror.getId(c1(u)):this.mirror.getId(u.parentNode),f=i(u);if(d===-1||f===-1)return r.addNode(u);const h=Os(u,{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:l=>{o1(l,this.mirror)&&!Bn(l,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(l),a1(l,this.mirror)&&this.stylesheetManager.trackLinkElement(l),Af(u)&&this.shadowDomManager.addShadowRoot(u.shadowRoot,this.doc)},onIframeLoad:(l,b)=>{Bn(l,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(l,b),l.contentWindow&&this.canvasManager.addWindow(l.contentWindow),this.shadowDomManager.observeAttachShadow(l))},onStylesheetLoad:(l,b)=>{this.stylesheetManager.attachLinkElement(l,b)}});h&&(t.push({parentId:d,nextId:f,node:h}),n.add(h.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const u of this.movedSet)h1(this.removes,u,this.mirror)&&!this.movedSet.has(u.parentNode)||s(u);for(const u of this.addedSet)!p1(this.droppedSet,u)&&!h1(this.removes,u,this.mirror)||p1(this.movedSet,u)?s(u):this.droppedSet.add(u);let o=null;for(;r.length;){let u=null;if(o){const d=this.mirror.getId(o.value.parentNode),f=i(o.value);d!==-1&&f!==-1&&(u=o)}if(!u){let d=r.tail;for(;d;){const f=d;if(d=d.previous,f){const h=this.mirror.getId(f.value.parentNode);if(i(f.value)===-1)continue;if(h!==-1){u=f;break}else{const b=f.value;if(b.parentNode&&b.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const a=b.parentNode.host;if(this.mirror.getId(a)!==-1){u=f;break}}}}}}if(!u){for(;r.head;)r.removeNode(r.head.value);break}o=u.previous,r.removeNode(u.value),s(u.value)}const c={texts:this.texts.map(u=>({id:this.mirror.getId(u.node),value:u.value})).filter(u=>!n.has(u.id)).filter(u=>this.mirror.has(u.id)),attributes:this.attributes.map(u=>{const{attributes:d}=u;if(typeof d.style=="string"){const f=JSON.stringify(u.styleDiff),h=JSON.stringify(u._unchangedStyles);f.length<d.style.length&&(f+h).split("var(").length===d.style.split("var(").length&&(d.style=u.styleDiff)}return{id:this.mirror.getId(u.node),attributes:d}}).filter(u=>!n.has(u.id)).filter(u=>this.mirror.has(u.id)),removes:this.removes,adds:t};!c.texts.length&&!c.attributes.length&&!c.removes.length&&!c.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(c))},this.processMutation=t=>{if(!_f(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!Bn(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:ks(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,i1(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 o=wf(n),c=n.tagName;i=nu(n,c,o);const u=tu({maskInputOptions:this.maskInputOptions,tagName:c,type:o}),d=ks(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,u);i=Zo({isMasked:d,element:n,value:i,maskInputFn:this.maskInputFn})}if(Bn(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||i===t.oldValue)return;let s=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!n.contentDocument)r="rr_src";else return;if(s||(s={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(t.target,s)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!Zv(n.tagName,r)&&(s.attributes[r]=Jv(this.doc,Cs(n.tagName),Cs(r),i,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");t.oldValue&&o.setAttribute("style",t.oldValue);for(const c of Array.from(n.style)){const u=n.style.getPropertyValue(c),d=n.style.getPropertyPriority(c);u!==o.style.getPropertyValue(c)||d!==o.style.getPropertyPriority(c)?d===""?s.styleDiff[c]=u:s.styleDiff[c]=[u,d]:s._unchangedStyles[c]=[u,d]}for(const c of Array.from(o.style))n.style.getPropertyValue(c)===""&&(s.styleDiff[c]=!1)}break}case"childList":{if(Bn(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=Qo(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Bn(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||_f(n,this.mirror)||!I6(n,this.mirror)||(this.addedSet.has(n)?(If(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||s1(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[f1(r,i)]?If(this.movedSet,n):this.removes.push({parentId:i,id:r,isShadow:Qo(t.target)&&Jo(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(_f(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[f1(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Bn(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes.forEach(r=>this.genAdds(r)),Af(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"].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 If(e,t){e.delete(t),t.childNodes.forEach(n=>If(e,n))}function h1(e,t,n){return e.length===0?!1:B6(e,t,n)}function B6(e,t,n){let r=t.parentNode;for(;r;){const i=n.getId(r);if(e.some(s=>s.id===i))return!0;r=r.parentNode}return!1}function p1(e,t){return e.size===0?!1:m1(e,t)}function m1(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:m1(e,n):!1}let ta;function F6(e){ta=e}function U6(){ta=void 0}const it=e=>ta?(...n)=>{try{return e(...n)}catch(r){if(ta&&ta(r)===!0)return()=>{};throw r}}:e;function or(e){let t,n=e[0],r=1;for(;r<e.length;){const i=e[r],s=e[r+1];if(r+=2,(i==="optionalAccess"||i==="optionalCall")&&n==null)return;i==="access"||i==="optionalAccess"?(t=n,n=s(n)):(i==="call"||i==="optionalCall")&&(n=s((...o)=>n.call(t,...o)),t=void 0)}return n}const Ns=[];function na(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 g1(e,t){const n=new L6;Ns.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const i=or([window,"optionalAccess",o=>o.Zone,"optionalAccess",o=>o.__symbol__,"optionalCall",o=>o("MutationObserver")]);i&&window[i]&&(r=window[i]);const s=new r(it(o=>{e.onMutation&&e.onMutation(o)===!1||n.processMutations.bind(n)(o)}));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function V6({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const i=typeof t.mousemove=="number"?t.mousemove:50,s=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let o=[],c;const u=ea(it(h=>{const l=Date.now()-c;e(o.map(b=>(b.timeOffset-=l,b)),h),o=[],c=null}),s),d=it(ea(it(h=>{const l=na(h),{clientX:b,clientY:a}=Cf(h)?h.changedTouches[0]:h;c||(c=su()),o.push({x:b,y:a,id:r.getId(l),timeOffset:su()-c}),u(typeof DragEvent<"u"&&h instanceof DragEvent?Fe.Drag:h instanceof MouseEvent?Fe.MouseMove:Fe.TouchMove)}),i,{trailing:!1})),f=[Sn("mousemove",d,n),Sn("touchmove",d,n),Sn("drag",d,n)];return it(()=>{f.forEach(h=>h())})}function q6({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const c=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,u=[];let d=null;const f=h=>l=>{const b=na(l);if(Bn(b,r,i,s,!0))return;let a=null,p=h;if("pointerType"in l){switch(l.pointerType){case"mouse":a=Dr.Mouse;break;case"touch":a=Dr.Touch;break;case"pen":a=Dr.Pen;break}a===Dr.Touch?xn[h]===xn.MouseDown?p="TouchStart":xn[h]===xn.MouseUp&&(p="TouchEnd"):Dr.Pen}else Cf(l)&&(a=Dr.Touch);a!==null?(d=a,(p.startsWith("Touch")&&a===Dr.Touch||p.startsWith("Mouse")&&a===Dr.Mouse)&&(a=null)):xn[h]===xn.Click&&(a=d,d=null);const y=Cf(l)?l.changedTouches[0]:l;if(!y)return;const g=n.getId(b),{clientX:v,clientY:w}=y;it(e)({type:xn[p],id:g,x:v,y:w,...a!==null&&{pointerType:a}})};return Object.keys(xn).filter(h=>Number.isNaN(Number(h))&&!h.endsWith("_Departed")&&c[h]!==!1).forEach(h=>{let l=Cs(h);const b=f(h);if(window.PointerEvent)switch(xn[h]){case xn.MouseDown:case xn.MouseUp:l=l.replace("mouse","pointer");break;case xn.TouchStart:case xn.TouchEnd:return}u.push(Sn(l,b,t))}),it(()=>{u.forEach(h=>h())})}function y1({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,sampling:o}){const c=it(ea(it(u=>{const d=na(u);if(!d||Bn(d,r,i,s,!0))return;const f=n.getId(d);if(d===t&&t.defaultView){const h=t1(t.defaultView);e({id:f,x:h.left,y:h.top})}else e({id:f,x:d.scrollLeft,y:d.scrollTop})}),o.scroll||100));return Sn("scroll",c,t)}function $6({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const i=it(ea(it(()=>{const s=n1(),o=r1();(n!==s||r!==o)&&(e({width:Number(o),height:Number(s)}),n=s,r=o)}),200));return Sn("resize",i,t)}const G6=["INPUT","TEXTAREA","SELECT"],v1=new WeakMap;function H6({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,ignoreClass:o,ignoreSelector:c,maskInputOptions:u,maskInputFn:d,sampling:f,userTriggeredOnInput:h,maskTextClass:l,unmaskTextClass:b,maskTextSelector:a,unmaskTextSelector:p}){function y(T){let O=na(T);const N=T.isTrusted,D=O&&bf(O.tagName);if(D==="OPTION"&&(O=O.parentElement),!O||!D||G6.indexOf(D)<0||Bn(O,r,i,s,!0))return;const U=O;if(U.classList.contains(o)||c&&U.matches(c))return;const V=wf(O);let F=nu(U,D,V),q=!1;const R=tu({maskInputOptions:u,tagName:D,type:V}),L=ks(O,l,a,b,p,R);(V==="radio"||V==="checkbox")&&(q=O.checked),F=Zo({isMasked:L,element:O,value:F,maskInputFn:d}),g(O,h?{text:F,isChecked:q,userTriggered:N}:{text:F,isChecked:q});const W=O.name;V==="radio"&&W&&q&&t.querySelectorAll(`input[type="radio"][name="${W}"]`).forEach(z=>{if(z!==O){const Z=Zo({isMasked:L,element:z,value:nu(z,D,V),maskInputFn:d});g(z,h?{text:Z,isChecked:!q,userTriggered:!1}:{text:Z,isChecked:!q})}})}function g(T,O){const N=v1.get(T);if(!N||N.text!==O.text||N.isChecked!==O.isChecked){v1.set(T,O);const D=n.getId(T);it(e)({...O,id:D})}}const w=(f.input==="last"?["change"]:["input","change"]).map(T=>Sn(T,it(y),t)),E=t.defaultView;if(!E)return()=>{w.forEach(T=>T())};const S=E.Object.getOwnPropertyDescriptor(E.HTMLInputElement.prototype,"value"),A=[[E.HTMLInputElement.prototype,"value"],[E.HTMLInputElement.prototype,"checked"],[E.HTMLSelectElement.prototype,"value"],[E.HTMLTextAreaElement.prototype,"value"],[E.HTMLSelectElement.prototype,"selectedIndex"],[E.HTMLOptionElement.prototype,"selected"]];return S&&S.set&&w.push(...A.map(T=>e1(T[0],T[1],{set(){it(y)({target:this,isTrusted:!1})}},!1,E))),it(()=>{w.forEach(T=>T())})}function au(e){const t=[];function n(r,i){if(cu("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||cu("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||cu("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||cu("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const o=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(o)}else if(r.parentStyleSheet){const o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(o)}return i}return n(e,t)}function pi(e,t,n){let r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function Y6({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:it((f,h,l)=>{const[b,a]=l,{id:p,styleId:y}=pi(h,t,n.styleMirror);return(p&&p!==-1||y&&y!==-1)&&e({id:p,styleId:y,adds:[{rule:b,index:a}]}),f.apply(h,l)})});const s=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:it((f,h,l)=>{const[b]=l,{id:a,styleId:p}=pi(h,t,n.styleMirror);return(a&&a!==-1||p&&p!==-1)&&e({id:a,styleId:p,removes:[{index:b}]}),f.apply(h,l)})});let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:it((f,h,l)=>{const[b]=l,{id:a,styleId:p}=pi(h,t,n.styleMirror);return(a&&a!==-1||p&&p!==-1)&&e({id:a,styleId:p,replace:b}),f.apply(h,l)})}));let c;r.CSSStyleSheet.prototype.replaceSync&&(c=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(c,{apply:it((f,h,l)=>{const[b]=l,{id:a,styleId:p}=pi(h,t,n.styleMirror);return(a&&a!==-1||p&&p!==-1)&&e({id:a,styleId:p,replaceSync:b}),f.apply(h,l)})}));const u={};uu("CSSGroupingRule")?u.CSSGroupingRule=r.CSSGroupingRule:(uu("CSSMediaRule")&&(u.CSSMediaRule=r.CSSMediaRule),uu("CSSConditionRule")&&(u.CSSConditionRule=r.CSSConditionRule),uu("CSSSupportsRule")&&(u.CSSSupportsRule=r.CSSSupportsRule));const d={};return Object.entries(u).forEach(([f,h])=>{d[f]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(d[f].insertRule,{apply:it((l,b,a)=>{const[p,y]=a,{id:g,styleId:v}=pi(b.parentStyleSheet,t,n.styleMirror);return(g&&g!==-1||v&&v!==-1)&&e({id:g,styleId:v,adds:[{rule:p,index:[...au(b),y||0]}]}),l.apply(b,a)})}),h.prototype.deleteRule=new Proxy(d[f].deleteRule,{apply:it((l,b,a)=>{const[p]=a,{id:y,styleId:g}=pi(b.parentStyleSheet,t,n.styleMirror);return(y&&y!==-1||g&&g!==-1)&&e({id:y,styleId:g,removes:[{index:[...au(b),p]}]}),l.apply(b,a)})})}),it(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=s,o&&(r.CSSStyleSheet.prototype.replace=o),c&&(r.CSSStyleSheet.prototype.replaceSync=c),Object.entries(u).forEach(([f,h])=>{h.prototype.insertRule=d[f].insertRule,h.prototype.deleteRule=d[f].deleteRule})})}function b1({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"?or([n,"access",o=>o.defaultView,"optionalAccess",o=>o.Document]):or([n,"access",o=>o.ownerDocument,"optionalAccess",o=>o.defaultView,"optionalAccess",o=>o.ShadowRoot]),s=or([i,"optionalAccess",o=>o.prototype])?Object.getOwnPropertyDescriptor(or([i,"optionalAccess",o=>o.prototype]),"adoptedStyleSheets"):void 0;return r===null||r===-1||!i||!s?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){return or([s,"access",o=>o.get,"optionalAccess",o=>o.call,"call",o=>o(this)])},set(o){const c=or([s,"access",u=>u.set,"optionalAccess",u=>u.call,"call",u=>u(this,o)]);if(r!==null&&r!==-1)try{t.adoptStyleSheets(o,r)}catch{}return c}}),it(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})}))}function W6({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){const s=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:it((c,u,d)=>{const[f,h,l]=d;if(n.has(f))return s.apply(u,[f,h,l]);const{id:b,styleId:a}=pi(or([u,"access",p=>p.parentRule,"optionalAccess",p=>p.parentStyleSheet]),t,r.styleMirror);return(b&&b!==-1||a&&a!==-1)&&e({id:b,styleId:a,set:{property:f,value:h,priority:l},index:au(u.parentRule)}),c.apply(u,d)})});const o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:it((c,u,d)=>{const[f]=d;if(n.has(f))return o.apply(u,[f]);const{id:h,styleId:l}=pi(or([u,"access",b=>b.parentRule,"optionalAccess",b=>b.parentStyleSheet]),t,r.styleMirror);return(h&&h!==-1||l&&l!==-1)&&e({id:h,styleId:l,remove:{property:f},index:au(u.parentRule)}),c.apply(u,d)})}),it(()=>{i.CSSStyleDeclaration.prototype.setProperty=s,i.CSSStyleDeclaration.prototype.removeProperty=o})}function K6({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:i,sampling:s,doc:o}){const c=it(d=>ea(it(f=>{const h=na(f);if(!h||Bn(h,t,n,r,!0))return;const{currentTime:l,volume:b,muted:a,playbackRate:p}=h;e({type:d,id:i.getId(h),currentTime:l,volume:b,muted:a,playbackRate:p})}),s.media||500)),u=[Sn("play",c(0),o),Sn("pause",c(1),o),Sn("seeked",c(2),o),Sn("volumechange",c(3),o),Sn("ratechange",c(4),o)];return it(()=>{u.forEach(d=>d())})}function z6({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],i=new WeakMap,s=n.FontFace;n.FontFace=function(u,d,f){const h=new s(u,d,f);return i.set(h,{family:u,buffer:typeof d!="string",descriptors:f,fontSource:typeof d=="string"?d:JSON.stringify(Array.from(new Uint8Array(d)))}),h};const o=xf(t.fonts,"add",function(c){return function(u){return ou(it(()=>{const d=i.get(u);d&&(e(d),i.delete(u))}),0),c.apply(this,[u])}});return r.push(()=>{n.FontFace=s}),r.push(o),it(()=>{r.forEach(c=>c())})}function Q6(e){const{doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,selectionCb:o}=e;let c=!0;const u=it(()=>{const d=t.getSelection();if(!d||c&&or([d,"optionalAccess",l=>l.isCollapsed]))return;c=d.isCollapsed||!1;const f=[],h=d.rangeCount||0;for(let l=0;l<h;l++){const b=d.getRangeAt(l),{startContainer:a,startOffset:p,endContainer:y,endOffset:g}=b;Bn(a,r,i,s,!0)||Bn(y,r,i,s,!0)||f.push({start:n.getId(a),startOffset:p,end:n.getId(y),endOffset:g})}o({ranges:f})});return u(),Sn("selectionchange",u)}function J6({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:xf(n.customElements,"define",function(i){return function(s,o,c){try{t({define:{name:s}})}catch{}return i.apply(this,[s,o,c])}})}function Z6(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=g1(e,e.doc));const i=V6(e),s=q6(e),o=y1(e),c=$6(e,{win:n}),u=H6(e),d=K6(e);let f=()=>{},h=()=>{},l=()=>{},b=()=>{};e.recordDOM&&(f=Y6(e,{win:n}),h=b1(e,e.doc),l=W6(e,{win:n}),e.collectFonts&&(b=z6(e)));const a=Q6(e),p=J6(e),y=[];for(const g of e.plugins)y.push(g.observer(g.callback,n,g.options));return it(()=>{Ns.forEach(g=>g.reset()),or([r,"optionalAccess",g=>g.disconnect,"call",g=>g()]),i(),s(),o(),c(),u(),d(),f(),h(),l(),b(),a(),p(),y.forEach(g=>g())})}function cu(e){return typeof window[e]<"u"}function uu(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class kf{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,i){const s=r||this.getIdToRemoteIdMap(t),o=i||this.getRemoteIdToIdMap(t);let c=s.get(n);return c||(c=this.generateIdFn(),s.set(n,c),o.set(c,n)),c}getIds(t,n){const r=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return n.map(s=>this.getId(t,s,r,i))}getRemoteId(t,n,r){const i=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const s=i.get(n);return s||-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}}function w1(e){let t,n=e[0],r=1;for(;r<e.length;){const i=e[r],s=e[r+1];if(r+=2,(i==="optionalAccess"||i==="optionalCall")&&n==null)return;i==="access"||i==="optionalAccess"?(t=n,n=s(n)):(i==="call"||i==="optionalCall")&&(n=s((...o)=>n.call(t,...o)),t=void 0)}return n}class X6{constructor(){this.crossOriginIframeMirror=new kf(Sf),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class eO{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new kf(Sf),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new kf(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}),w1([this,"access",r=>r.loadListener,"optionalCall",r=>r(t)]),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}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 s=this.transformCrossOriginEvent(i,n.data.event);s&&this.wrappedEmit(s,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:Fe.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 Fe.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 Fe.Drag:case Fe.TouchMove:case Fe.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case Fe.ViewportResize:return!1;case Fe.MediaInteraction:case Fe.MouseInteraction:case Fe.Scroll:case Fe.CanvasMutation:case Fe.Input:return this.replaceIds(n.data,t,["id"]),n;case Fe.StyleSheetRule:case Fe.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case Fe.Font:return n;case Fe.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case Fe.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),w1([n,"access",r=>r.data,"access",r=>r.styles,"optionalAccess",r=>r.forEach,"call",r=>r(i=>{this.replaceStyleIds(i,t,["styleId"])})]),n}}return!1}replace(t,n,r,i){for(const s of i)!Array.isArray(n[s])&&typeof n[s]!="number"||(Array.isArray(n[s])?n[s]=t.getIds(r,n[s]):n[s]=t.getId(r,n[s]));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!==Jt.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class tO{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class nO{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(!Jo(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=g1({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(y1({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),ou(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(b1({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(xf(t.prototype,"attachShadow",function(i){return function(s){const o=i.call(this,s);return this.shadowRoot&&u1(this)&&r.addShadowRoot(this.shadowRoot,n),o}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}class E1{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class rO{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new O6,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 s of t){let o;this.styleMirror.has(s)?o=this.styleMirror.getId(s):(o=this.styleMirror.add(s),i.push({styleId:o,rules:Array.from(s.rules||CSSRule,(c,u)=>({rule:qv(c),index:u}))})),r.styleIds.push(o)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class iO{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,M6(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let Lt,lu;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=Pn([e,"access",t=>t.contentWindow,"optionalAccess",t=>t.Array,"access",t=>t.from])||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const ar=i6();function Pr(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:s=null,unblockSelector:o=null,ignoreClass:c="rr-ignore",ignoreSelector:u=null,maskAllText:d=!1,maskTextClass:f="rr-mask",unmaskTextClass:h=null,maskTextSelector:l=null,unmaskTextSelector:b=null,inlineStylesheet:a=!0,maskAllInputs:p,maskInputOptions:y,slimDOMOptions:g,maskAttributeFn:v,maskInputFn:w,maskTextFn:E,maxCanvasSize:S=null,packFn:A,sampling:T={},dataURLOptions:O={},mousemoveWait:N,recordDOM:D=!0,recordCanvas:U=!1,recordCrossOriginIframes:V=!1,recordAfter:F=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:q=!1,collectFonts:R=!1,inlineImages:L=!1,plugins:W,keepIframeSrcFn:z=()=>!1,ignoreCSSAttributes:Z=new Set([]),errorHandler:te,onMutation:re,getCanvasManager:he}=e;F6(te);const ue=V?window.parent===window:!0;let ye=!1;if(!ue)try{window.parent.document&&(ye=!1)}catch{ye=!0}if(ue&&!t)throw new Error("emit function is required");if(!ue&&!ye)return()=>{};N!==void 0&&T.mousemove===void 0&&(T.mousemove=N),ar.reset();const de=p===!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}:y!==void 0?y:{},$=g===!0||g==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:g==="all",headMetaDescKeywords:g==="all"}:g||{};k6();let H,X=0;const C=ie=>{for(const be of W||[])be.eventProcessor&&(ie=be.eventProcessor(ie));return A&&!ye&&(ie=A(ie)),ie};Lt=(ie,be)=>{const ae=ie;if(ae.timestamp=su(),Pn([Ns,"access",Ce=>Ce[0],"optionalAccess",Ce=>Ce.isFrozen,"call",Ce=>Ce()])&&ae.type!==Qe.FullSnapshot&&!(ae.type===Qe.IncrementalSnapshot&&ae.data.source===Fe.Mutation)&&Ns.forEach(Ce=>Ce.unfreeze()),ue)Pn([t,"optionalCall",Ce=>Ce(C(ae),be)]);else if(ye){const Ce={type:"rrweb",event:C(ae),origin:window.location.origin,isCheckout:be};window.parent.postMessage(Ce,"*")}if(ae.type===Qe.FullSnapshot)H=ae,X=0;else if(ae.type===Qe.IncrementalSnapshot){if(ae.data.source===Fe.Mutation&&ae.data.isAttachIframe)return;X++;const Ce=r&&X>=r,_e=n&&H&&ae.timestamp-H.timestamp>n;(Ce||_e)&&le(!0)}};const j=ie=>{Lt({type:Qe.IncrementalSnapshot,data:{source:Fe.Mutation,...ie}})},B=ie=>Lt({type:Qe.IncrementalSnapshot,data:{source:Fe.Scroll,...ie}}),M=ie=>Lt({type:Qe.IncrementalSnapshot,data:{source:Fe.CanvasMutation,...ie}}),ee=ie=>Lt({type:Qe.IncrementalSnapshot,data:{source:Fe.AdoptedStyleSheet,...ie}}),J=new rO({mutationCb:j,adoptedStyleSheetCb:ee}),Q=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new X6:new eO({mirror:ar,mutationCb:j,stylesheetManager:J,recordCrossOriginIframes:V,wrappedEmit:Lt});for(const ie of W||[])ie.getMirror&&ie.getMirror({nodeMirror:ar,crossOriginIframeMirror:Q.crossOriginIframeMirror,crossOriginIframeStyleMirror:Q.crossOriginIframeStyleMirror});const Y=new iO,pe=oO(he,{mirror:ar,win:window,mutationCb:ie=>Lt({type:Qe.IncrementalSnapshot,data:{source:Fe.CanvasMutation,...ie}}),recordCanvas:U,blockClass:i,blockSelector:s,unblockSelector:o,maxCanvasSize:S,sampling:T.canvas,dataURLOptions:O,errorHandler:te}),ge=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new tO:new nO({mutationCb:j,scrollCb:B,bypassOptions:{onMutation:re,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:d,maskTextClass:f,unmaskTextClass:h,maskTextSelector:l,unmaskTextSelector:b,inlineStylesheet:a,maskInputOptions:de,dataURLOptions:O,maskAttributeFn:v,maskTextFn:E,maskInputFn:w,recordCanvas:U,inlineImages:L,sampling:T,slimDOMOptions:$,iframeManager:Q,stylesheetManager:J,canvasManager:pe,keepIframeSrcFn:z,processedNodeManager:Y},mirror:ar}),le=(ie=!1)=>{if(!D)return;Lt({type:Qe.Meta,data:{href:window.location.href,width:r1(),height:n1()}},ie),J.reset(),ge.init(),Ns.forEach(ae=>ae.lock());const be=T6(document,{mirror:ar,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:d,maskTextClass:f,unmaskTextClass:h,maskTextSelector:l,unmaskTextSelector:b,inlineStylesheet:a,maskAllInputs:de,maskAttributeFn:v,maskInputFn:w,maskTextFn:E,slimDOM:$,dataURLOptions:O,recordCanvas:U,inlineImages:L,onSerialize:ae=>{o1(ae,ar)&&Q.addIframe(ae),a1(ae,ar)&&J.trackLinkElement(ae),Af(ae)&&ge.addShadowRoot(ae.shadowRoot,document)},onIframeLoad:(ae,Ce)=>{Q.attachIframe(ae,Ce),ae.contentWindow&&pe.addWindow(ae.contentWindow),ge.observeAttachShadow(ae)},onStylesheetLoad:(ae,Ce)=>{J.attachLinkElement(ae,Ce)},keepIframeSrcFn:z});if(!be)return console.warn("Failed to snapshot the document");Lt({type:Qe.FullSnapshot,data:{node:be,initialOffset:t1(window)}}),Ns.forEach(ae=>ae.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&J.adoptStyleSheets(document.adoptedStyleSheets,ar.getId(document))};lu=le;try{const ie=[],be=Ce=>it(Z6)({onMutation:re,mutationCb:j,mousemoveCb:(_e,Ye)=>Lt({type:Qe.IncrementalSnapshot,data:{source:Ye,positions:_e}}),mouseInteractionCb:_e=>Lt({type:Qe.IncrementalSnapshot,data:{source:Fe.MouseInteraction,..._e}}),scrollCb:B,viewportResizeCb:_e=>Lt({type:Qe.IncrementalSnapshot,data:{source:Fe.ViewportResize,..._e}}),inputCb:_e=>Lt({type:Qe.IncrementalSnapshot,data:{source:Fe.Input,..._e}}),mediaInteractionCb:_e=>Lt({type:Qe.IncrementalSnapshot,data:{source:Fe.MediaInteraction,..._e}}),styleSheetRuleCb:_e=>Lt({type:Qe.IncrementalSnapshot,data:{source:Fe.StyleSheetRule,..._e}}),styleDeclarationCb:_e=>Lt({type:Qe.IncrementalSnapshot,data:{source:Fe.StyleDeclaration,..._e}}),canvasMutationCb:M,fontCb:_e=>Lt({type:Qe.IncrementalSnapshot,data:{source:Fe.Font,..._e}}),selectionCb:_e=>{Lt({type:Qe.IncrementalSnapshot,data:{source:Fe.Selection,..._e}})},customElementCb:_e=>{Lt({type:Qe.IncrementalSnapshot,data:{source:Fe.CustomElement,..._e}})},blockClass:i,ignoreClass:c,ignoreSelector:u,maskAllText:d,maskTextClass:f,unmaskTextClass:h,maskTextSelector:l,unmaskTextSelector:b,maskInputOptions:de,inlineStylesheet:a,sampling:T,recordDOM:D,recordCanvas:U,inlineImages:L,userTriggeredOnInput:q,collectFonts:R,doc:Ce,maskAttributeFn:v,maskInputFn:w,maskTextFn:E,keepIframeSrcFn:z,blockSelector:s,unblockSelector:o,slimDOMOptions:$,dataURLOptions:O,mirror:ar,iframeManager:Q,stylesheetManager:J,shadowDomManager:ge,processedNodeManager:Y,canvasManager:pe,ignoreCSSAttributes:Z,plugins:Pn([W,"optionalAccess",_e=>_e.filter,"call",_e=>_e(Ye=>Ye.observer),"optionalAccess",_e=>_e.map,"call",_e=>_e(Ye=>({observer:Ye.observer,options:Ye.options,callback:rt=>Lt({type:Qe.Plugin,data:{plugin:Ye.name,payload:rt}})}))])||[]},{});Q.addLoadListener(Ce=>{try{ie.push(be(Ce.contentDocument))}catch(_e){console.warn(_e)}});const ae=()=>{le(),ie.push(be(document))};return document.readyState==="interactive"||document.readyState==="complete"?ae():(ie.push(Sn("DOMContentLoaded",()=>{Lt({type:Qe.DomContentLoaded,data:{}}),F==="DOMContentLoaded"&&ae()})),ie.push(Sn("load",()=>{Lt({type:Qe.Load,data:{}}),F==="load"&&ae()},window))),()=>{ie.forEach(Ce=>Ce()),Y.destroy(),lu=void 0,U6()}}catch(ie){console.warn(ie)}}function sO(e){if(!lu)throw new Error("please take full snapshot after start recording");lu(e)}Pr.mirror=ar,Pr.takeFullSnapshot=sO;function oO(e,t){try{return e?e(t):new E1}catch{return console.warn("Unable to initialize CanvasManager"),new E1}}const De=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,S1=["info","warn","error","log"],du="[Replay] ";function Of(e,t="info"){fi({category:"console",data:{logger:"replay"},level:t,message:`${du}${e}`},{level:t})}function aO(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=r.captureExceptions,t=r.traceInternals}};return De?(S1.forEach(r=>{n[r]=(...i)=>{Se[r](du,...i),t&&Of(i.join(""),iy(r))}}),n.exception=(r,...i)=>{i.length&&n.error&&n.error(...i),Se.error(du,r),e?Kd(r):t&&Of(r,"error")},n.infoTick=(...r)=>{Se.info(du,...r),t&&setTimeout(()=>Of(r[0]),0)}):S1.forEach(r=>{n[r]=()=>{}}),n}const Le=aO(),cO=3,uO=5;function Rf(e){return e>9999999999?e:e*1e3}function Nf(e){return e>9999999999?e/1e3:e}function ra(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:gr(t,10,1e3)}}),t.category==="console")))}const lO="button,a";function x1(e){return e.closest(lO)||e}function _1(e){const t=C1(e);return!t||!(t instanceof Element)?t:x1(t)}function C1(e){return dO(e)?e.target:e}function dO(e){return typeof e=="object"&&!!e&&"target"in e}let mi;function fO(e){return mi||(mi=[],hO()),mi.push(e),()=>{const t=mi?mi.indexOf(e):-1;t>-1&&mi.splice(t,1)}}function hO(){kn(wt,"open",function(e){return function(...t){if(mi)try{mi.forEach(n=>n())}catch{}return e.apply(wt,t)}})}const pO=new Set([Fe.Mutation,Fe.StyleSheetRule,Fe.StyleDeclaration,Fe.AdoptedStyleSheet,Fe.CanvasMutation,Fe.Selection,Fe.MediaInteraction]);function mO(e,t,n){e.handleClick(t,n)}class gO{constructor(t,n,r=ra){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const t=fO(()=>{this._lastMutation=A1()});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(vO(n,this._ignoreSelector)||!bO(t))return;const r={timestamp:Nf(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=Nf(t)}registerScroll(t=Date.now()){this._lastScroll=Nf(t)}registerClick(t){const n=x1(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=A1();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._scollTimeout,i=t.mutationAfter&&t.mutationAfter<=this._threshold,s=!r&&!i,{clickCount:o,clickBreadcrumb:c}=t;if(s){const u=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,d=u<this._timeout*1e3?"mutation":"timeout",f={type:"default",message:c.message,timestamp:c.timestamp,category:"ui.slowClickDetected",data:{...c.data,url:wt.location.href,route:n.getCurrentRoute(),timeAfterClickMs:u,endReason:d,clickCount:o||1}};this._addBreadcrumbEvent(n,f);return}if(o>1){const u={type:"default",message:c.message,timestamp:c.timestamp,category:"ui.multiClick",data:{...c.data,url:wt.location.href,route:n.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(n,u)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=_s(()=>this._checkClicks(),1e3)}}const yO=["A","BUTTON","INPUT"];function vO(e,t){return!!(!yO.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 bO(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function A1(){return Date.now()/1e3}function wO(e,t){try{if(!EO(t))return;const{source:n}=t.data;if(pO.has(n)&&e.registerMutation(t.timestamp),n===Fe.Scroll&&e.registerScroll(t.timestamp),SO(t)){const{type:r,id:i}=t.data,s=Pr.mirror.getNode(i);s instanceof HTMLElement&&r===xn.Click&&e.registerClick(s)}}catch{}}function EO(e){return e.type===cO}function SO(e){return e.data.source===Fe.MouseInteraction}function br(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var fu;(function(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"})(fu||(fu={}));const xO=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function _O(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(xO.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const CO=e=>t=>{if(!e.isEnabled())return;const n=AO(t);if(!n)return;const r=t.name==="click",i=r?t.event:void 0;r&&e.clickDetector&&i&&i.target&&!i.altKey&&!i.metaKey&&!i.ctrlKey&&!i.shiftKey&&mO(e.clickDetector,n,_1(t.event)),ra(e,n)};function T1(e,t){const n=Pr.mirror.getId(e),r=n&&Pr.mirror.getNode(n),i=r&&Pr.mirror.getMeta(r),s=i&&IO(i)?i:null;return{message:t,data:s?{nodeId:n,node:{id:n,tagName:s.tagName,textContent:Array.from(s.childNodes).map(o=>o.type===fu.Text&&o.textContent).filter(Boolean).map(o=>o.trim()).join(""),attributes:_O(s.attributes)}}:{}}}function AO(e){const{target:t,message:n}=TO(e);return br({category:`ui.${e.name}`,...T1(t,n)})}function TO(e){const t=e.name==="click";let n,r=null;try{r=t?_1(e.event):C1(e.event),n=Ir(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function IO(e){return e.type===fu.Element}function kO(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=OO(t);n&&ra(e,n)}function OO(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:s,target:o}=e;if(!o||RO(o)||!s)return null;const c=t||r||i,u=s.length===1;if(!c&&u)return null;const d=Ir(o,{maxStringLength:200})||"<unknown>",f=T1(o,d);return br({category:"ui.keyDown",message:d,data:{...f.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:s}})}function RO(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const NO={resource:LO,paint:PO,navigation:jO};function hu(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function MO(e){return e.map(DO).filter(Boolean)}function DO(e){const t=NO[e.entryType];return t?t(e):null}function Ms(e){return((En||wt.performance.timeOrigin)+e)/1e3}function PO(e){const{duration:t,entryType:n,name:r,startTime:i}=e,s=Ms(i);return{type:n,name:r,start:s,end:s+t,data:void 0}}function jO(e){const{entryType:t,name:n,decodedBodySize:r,duration:i,domComplete:s,encodedBodySize:o,domContentLoadedEventStart:c,domContentLoadedEventEnd:u,domInteractive:d,loadEventStart:f,loadEventEnd:h,redirectCount:l,startTime:b,transferSize:a,type:p}=e;return i===0?null:{type:`${t}.${p}`,start:Ms(b),end:Ms(s),name:n,data:{size:a,decodedBodySize:r,encodedBodySize:o,duration:i,domInteractive:d,domContentLoadedEventStart:c,domContentLoadedEventEnd:u,loadEventStart:f,loadEventEnd:h,domComplete:s,redirectCount:l}}}function LO(e){const{entryType:t,initiatorType:n,name:r,responseEnd:i,startTime:s,decodedBodySize:o,encodedBodySize:c,responseStatus:u,transferSize:d}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:Ms(s),end:Ms(i),name:r,data:{size:d,statusCode:u,decodedBodySize:o,encodedBodySize:c}}}function BO(e){const t=e.entries[e.entries.length-1],n=t&&t.element?[t.element]:void 0;return pu(e,"largest-contentful-paint",n)}function FO(e){return e.sources!==void 0}function UO(e){const t=[],n=[];for(const r of e.entries)if(FO(r)){const i=[];for(const s of r.sources)if(s.node){n.push(s.node);const o=Pr.mirror.getId(s.node);o&&i.push(o)}t.push({value:r.value,nodeIds:i.length?i:void 0})}return pu(e,"cumulative-layout-shift",n,t)}function VO(e){const t=e.entries[e.entries.length-1],n=t&&t.target?[t.target]:void 0;return pu(e,"first-input-delay",n)}function qO(e){const t=e.entries[e.entries.length-1],n=t&&t.target?[t.target]:void 0;return pu(e,"interaction-to-next-paint",n)}function pu(e,t,n,r){const i=e.value,s=e.rating,o=Ms(i);return{type:"web-vital",name:t,start:o,end:o,data:{value:i,size:i,rating:s,nodeIds:n?n.map(c=>Pr.mirror.getId(c)):void 0,attributions:r}}}function $O(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(Es(i,n))}),r.push(Ev(hu(BO,e)),af(hu(UO,e)),Sv(hu(VO,e)),xv(hu(qO,e))),()=>{r.forEach(i=>i())}}const GO='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]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(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,a=0,s=new n(r);a<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==r||r<0)&&(r=0),(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},A=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},_=function(r,e){for(var i=[],a=0;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=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:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(d=o[a].s);var g=new n(d+1),w=x(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},x=function(t,n,r){return-1==t.s?Math.max(x(t.l,n,r+1),x(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,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}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 a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},C=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=_(f,15),M=b.t,E=b.l,x=_(h,15),C=x.t,U=x.l,F=D(M),I=F.c,S=F.n,L=D(C),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=_(q,7),H=G.t,J=G.l,K=19;K>4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,C)+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(C,U,0),R=C;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[a[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=p,P=g,Q=y,R=w;for(B=0;B<u;++B){var rt=o[B];if(rt>255){A(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;A(r,m,Q[et]),m+=R[et],et>3&&(A(r,m,rt>>5&8191),m+=i[et])}else A(r,m,N[rt]),m+=P[rt]}return A(r,m,N[256]),m+P[256]},U=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;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}}},L=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=e+=r[s];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}}},O=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=U[s-1],M=y>>13,E=8191&y,z=(1<<o)-1,A=c.p||new n(32768),_=c.h||new n(z+1),x=Math.ceil(o/3),D=2*x,T=function(t){return(a[t]^a[t+1]<<x^a[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=_[H];if(A[J]=K,_[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!w)){p=C(a,g,0,F,I,S,O,q,G,j-G,p),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(a[j+Q]==a[j+Q-W]){for(var $=0;$<Z&&a[j+$]==a[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-A[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=A[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=a[j],++I[a[j]];p=C(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=_,c.p=A,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},j=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},q=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&&j(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)}},B=function(t){return 10+(t.filename?t.filename.length+1:0)},G=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(O(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 a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),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(a),32768),this.s.z=n.length-a+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}();var H=function(){function t(t,n){this.c=L(),this.v=1,G.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),G.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=O(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=L();i.p(n.dictionary),j(t,2,i.d())}}(r,this.o),this.v=0),n&&j(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),J="undefined"!=typeof TextEncoder&&new TextEncoder,K="undefined"!=typeof TextDecoder&&new TextDecoder;try{K.decode(F,{stream:!0})}catch(t){}var N=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(P(t),this.d=n||!1)},t}();function P(n,r){if(r){for(var e=new t(n.length),i=0;i<n.length;++i)e[i]=n.charCodeAt(i);return e}if(J)return J.encode(n);var a=n.length,s=new t(n.length+(n.length>>1)),o=0,f=function(t){s[o++]=t};for(i=0;i<a;++i){if(o+5>s.length){var h=new t(o+8+(a-i<<1));h.set(s),s=h}var l=n.charCodeAt(i);l<128||r?f(l):l<2048?(f(192|l>>6),f(128|63&l)):l>55295&&l<57344?(f(240|(l=65536+(1047552&l)|1023&n.charCodeAt(++i))>>18),f(128|l>>12&63),f(128|l>>6&63),f(128|63&l)):(f(224|l>>12),f(128|l>>6&63),f(128|63&l))}return b(s,0,o)}function Q(t){return function(t,n){n||(n={});var r=S(),e=t.length;r.p(t);var i=O(t,n,B(n),8),a=i.length;return q(i,n),j(i,a-8,r.d()),j(i,a-4,e),i}(P(t))}const R=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 H,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new N(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},V={clear:()=>{R.clear()},addEvent:t=>R.addEvent(t),finish:()=>R.finish(),compress:t=>Q(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in V&&"function"==typeof V[n])try{const t=V[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 HO(){const e=new Blob([GO]);return URL.createObjectURL(e)}class Mf extends Error{constructor(){super(`Event buffer exceeded maximum size of ${yf}.`)}}class I1{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!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>yf)throw new Mf;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(){const t=this.events.map(n=>n.timestamp).sort()[0];return t?Rf(t):null}}class YO{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():n()},{once:!0}),this._worker.addEventListener("error",r=>{n(r)},{once:!0})}),this._ensureReadyPromise)}destroy(){De&&Le.info("Destroying compression worker"),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((i,s)=>{const o=({data:c})=>{const u=c;if(u.method===t&&u.id===r){if(this._worker.removeEventListener("message",o),!u.success){De&&Le.error("Error in compression worker: ",u.response),s(new Error("Error in compression worker"));return}i(u.response)}};this._worker.addEventListener("message",o),this._worker.postMessage({id:r,method:t,arg:n})})}_getAndIncrementId(){return this._id++}}class WO{constructor(t){this._worker=new YO(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const n=Rf(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>yf?Promise.reject(new Mf):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{De&&Le.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 KO{constructor(t){this._fallback=new I1,this._compression=new WO(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}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}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){De&&Le.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n}=this._fallback,r=[];for(const i of t)r.push(this._compression.addEvent(i));this._compression.hasCheckout=n,this._used=this._compression;try{await Promise.all(r),this._fallback.clear()}catch(i){De&&Le.exception(i,"Failed to add events when switching buffers.")}}}function zO({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=QO(t);if(n)return n}return De&&Le.info("Using simple buffer"),new I1}function QO(e){try{const t=e||JO();if(!t)return;De&&Le.info(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new KO(n)}catch(t){De&&Le.exception(t,"Failed to create compression worker")}}function JO(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?HO():""}function Df(){try{return"sessionStorage"in wt&&!!wt.sessionStorage}catch{return!1}}function ZO(e){XO(),e.session=void 0}function XO(){if(Df())try{wt.sessionStorage.removeItem(mf)}catch{}}function k1(e){return e===void 0?!1:Math.random()<e}function O1(e){const t=Date.now(),n=e.id||Ct(),r=e.started||t,i=e.lastActivity||t,s=e.segmentId||0,o=e.sampled,c=e.previousSessionId;return{id:n,started:r,lastActivity:i,segmentId:s,sampled:o,previousSessionId:c}}function Pf(e){if(Df())try{wt.sessionStorage.setItem(mf,JSON.stringify(e))}catch{}}function eR(e,t){return k1(e)?"session":t?"buffer":!1}function R1({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const i=eR(e,t),s=O1({sampled:i,previousSessionId:r});return n&&Pf(s),s}function tR(){if(!Df())return null;try{const e=wt.sessionStorage.getItem(mf);if(!e)return null;const t=JSON.parse(e);return De&&Le.infoTick("Loading existing session"),O1(t)}catch{return null}}function jf(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function N1(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return jf(e.started,t,r)||jf(e.lastActivity,n,r)}function M1(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!N1(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function Lf({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const i=r.stickySession&&tR();return i?M1(i,{sessionIdleExpire:e,maxReplayDuration:t})?(De&&Le.infoTick("Session in sessionStorage is expired, creating new one..."),R1(r,{previousSessionId:i.id})):i:(De&&Le.infoTick("Creating new session"),R1(r,{previousSessionId:n}))}function nR(e){return e.type===Qe.Custom}function Bf(e,t,n){return P1(e,t)?(D1(e,t,n),!0):!1}function rR(e,t,n){return P1(e,t)?D1(e,t,n):Promise.resolve(null)}async function D1(e,t,n){if(!e.eventBuffer)return null;try{n&&e.recordingMode==="buffer"&&e.eventBuffer.clear(),n&&(e.eventBuffer.hasCheckout=!0);const r=e.getOptions(),i=iR(t,r.beforeAddRecordingEvent);return i?await e.eventBuffer.addEvent(i):void 0}catch(r){const i=r&&r instanceof Mf?"addEventSizeExceeded":"addEvent";e.handleException(r),await e.stop({reason:i});const s=Je();s&&s.recordDroppedEvent("internal_sdk_error","replay")}}function P1(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=Rf(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(De&&Le.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function iR(e,t){try{if(typeof t=="function"&&nR(e))return t(e)}catch(n){return De&&Le.exception(n,"An error occured in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function Ff(e){return!e.type}function Uf(e){return e.type==="transaction"}function sR(e){return e.type==="replay_event"}function j1(e){return e.type==="feedback"}function oR(e){return(t,n)=>{if(!e.isEnabled()||!Ff(t)&&!Uf(t))return;const r=n&&n.statusCode;if(!(!r||r<200||r>=300)){if(Uf(t)){aR(e,t);return}cR(e,t)}}}function aR(e,t){const n=e.getContext();t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function cR(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||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||_s(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(i){e.handleException(i)}})}function uR(e){return t=>{!e.isEnabled()||!Ff(t)||lR(e,t)}}function lR(e,t){const n=t.exception&&t.exception.values&&t.exception.values[0]&&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=br({category:"replay.hydrate-error",data:{url:N0()}});ra(e,r)}}function dR(e){const t=Je();t&&t.on("beforeAddBreadcrumb",n=>fR(e,n))}function fR(e,t){if(!e.isEnabled()||!L1(t))return;const n=hR(t);n&&ra(e,n)}function hR(e){return!L1(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?pR(e):br(e)}function pR(e){const t=e.data&&e.data.arguments;if(!Array.isArray(t)||t.length===0)return br(e);let n=!1;const r=t.map(i=>{if(!i)return i;if(typeof i=="string")return i.length>Xc?(n=!0,`${i.slice(0,Xc)}…`):i;if(typeof i=="object")try{const s=gr(i,7);return JSON.stringify(s).length>Xc?(n=!0,`${JSON.stringify(s,null,2).slice(0,Xc)}…`):s}catch{}return i});return br({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function L1(e){return!!e.category}function mR(e,t){return e.type||!e.exception||!e.exception.values||!e.exception.values.length?!1:!!(t.originalException&&t.originalException.__rrweb__)}function gR(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 yR(e,t){return e.recordingMode!=="buffer"||t.message===gf||!t.exception||t.type?!1:k1(e.getOptions().errorSampleRate)}function vR(e){return Object.assign((t,n)=>!e.isEnabled()||e.isPaused()?t:sR(t)?(delete t.breadcrumbs,t):!Ff(t)&&!Uf(t)&&!j1(t)||!e.checkAndHandleExpiredSession()?t:j1(t)?(e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),gR(e,t),t):mR(t,n)&&!e.getOptions()._experiments.captureExceptions?(De&&Le.log("Ignoring error from rrweb internals",t),null):((yR(e,t)||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),t),{id:"Replay"})}function mu(e,t){return t.map(({type:n,start:r,end:i,name:s,data:o})=>{const c=e.throttledAddEvent({type:Qe.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:s,startTimestamp:r,endTimestamp:i,data:o}}});return typeof c=="string"?Promise.resolve(null):c})}function bR(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 wR(e){return t=>{if(!e.isEnabled())return;const n=bR(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(mu(e,[n]),!1)))}}function ER(e,t){return De&&e.getOptions()._experiments.traceInternals?!1:r5(t,Je())}function B1(e,t){e.isEnabled()&&t!==null&&(ER(e,t.name)||e.addUpdate(()=>(mu(e,[t]),!0)))}function gu(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=q1(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function F1(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function U1(e){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[q1(e)];if(!e)return[void 0]}catch(t){return De&&Le.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return De&&Le.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function yu(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 V1(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:i,method:s,statusCode:o,request:c,response:u}=t;return{type:e,start:n/1e3,end:r/1e3,name:i,data:zt({method:s,statusCode:o,request:c,response:u})}}function ia(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function gi(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:s}=SR(n);return r.body=i,s&&s.length>0&&(r._meta={warnings:s}),r}function Vf(e,t){return Object.entries(e).reduce((n,[r,i])=>{const s=r.toLowerCase();return t.includes(s)&&e[r]&&(n[s]=i),n},{})}function q1(e){return new URLSearchParams(e).toString()}function SR(e){if(!e||typeof e!="string")return{body:e};const t=e.length>Uv,n=xR(e);if(t){const r=e.slice(0,Uv);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 xR(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function vu(e,t){const n=_R(e);return ii(n,t)}function _R(e,t=wt.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(wt.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 CR(e,t,n){try{const r=await TR(e,t,n),i=V1("resource.fetch",r);B1(n.replay,i)}catch(r){De&&Le.exception(r,"Failed to capture fetch breadcrumb")}}function AR(e,t){const{input:n,response:r}=t,i=n?$1(n):void 0,s=gu(i),o=r?F1(r.headers.get("content-length")):void 0;s!==void 0&&(e.data.request_body_size=s),o!==void 0&&(e.data.response_body_size=o)}async function TR(e,t,n){const r=Date.now(),{startTimestamp:i=r,endTimestamp:s=r}=t,{url:o,method:c,status_code:u=0,request_body_size:d,response_body_size:f}=e.data,h=vu(o,n.networkDetailAllowUrls)&&!vu(o,n.networkDetailDenyUrls),l=h?IR(n,t.input,d):ia(d),b=await kR(h,n,t.response,f);return{startTimestamp:i,endTimestamp:s,url:o,method:c,statusCode:u,request:l,response:b}}function IR({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const i=n?NR(n,t):{};if(!e)return gi(i,r,void 0);const s=$1(n),[o,c]=U1(s),u=gi(i,r,o);return c?yu(u,c):u}async function kR(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,i){if(!e&&i!==void 0)return ia(i);const s=r?G1(r.headers,n):{};if(!r||!t&&i!==void 0)return gi(s,i,void 0);const[o,c]=await RR(r),u=OR(o,{networkCaptureBodies:t,responseBodySize:i,captureDetails:e,headers:s});return c?yu(u,c):u}function OR(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:i}){try{const s=e&&e.length&&n===void 0?gu(e):n;return r?t?gi(i,s,e):gi(i,s,void 0):ia(s)}catch(s){return De&&Le.exception(s,"Failed to serialize response body"),gi(i,n,void 0)}}async function RR(e){const t=MR(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await DR(t)]}catch(n){return De&&Le.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"]}}function $1(e=[]){if(!(e.length!==2||typeof e[1]!="object"))return e[1].body}function G1(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function NR(e,t){return e.length===1&&typeof e[0]!="string"?H1(e[0],t):e.length===2?H1(e[1],t):{}}function H1(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?G1(n,t):Array.isArray(n)?{}:Vf(n,t):{}}function MR(e){try{return e.clone()}catch(t){De&&Le.exception(t,"Failed to clone response body")}}function DR(e){return new Promise((t,n)=>{const r=_s(()=>n(new Error("Timeout while trying to read response body")),500);PR(e).then(i=>t(i),i=>n(i)).finally(()=>clearTimeout(r))})}async function PR(e){return await e.text()}async function jR(e,t,n){try{const r=BR(e,t,n),i=V1("resource.xhr",r);B1(n.replay,i)}catch(r){De&&Le.exception(r,"Failed to capture xhr breadcrumb")}}function LR(e,t){const{xhr:n,input:r}=t;if(!n)return;const i=gu(r),s=n.getResponseHeader("content-length")?F1(n.getResponseHeader("content-length")):qR(n.response,n.responseType);i!==void 0&&(e.data.request_body_size=i),s!==void 0&&(e.data.response_body_size=s)}function BR(e,t,n){const r=Date.now(),{startTimestamp:i=r,endTimestamp:s=r,input:o,xhr:c}=t,{url:u,method:d,status_code:f=0,request_body_size:h,response_body_size:l}=e.data;if(!u)return null;if(!c||!vu(u,n.networkDetailAllowUrls)||vu(u,n.networkDetailDenyUrls)){const A=ia(h),T=ia(l);return{startTimestamp:i,endTimestamp:s,url:u,method:d,statusCode:f,request:A,response:T}}const b=c[ji],a=b?Vf(b.request_headers,n.networkRequestHeaders):{},p=Vf(FR(c),n.networkResponseHeaders),[y,g]=n.networkCaptureBodies?U1(o):[void 0],[v,w]=n.networkCaptureBodies?UR(c):[void 0],E=gi(a,h,y),S=gi(p,l,v);return{startTimestamp:i,endTimestamp:s,url:u,method:d,statusCode:f,request:g?yu(E,g):E,response:w?yu(S,w):S}}function FR(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
126
+ `).reduce((n,r)=>{const[i,s]=r.split(": ");return s&&(n[i.toLowerCase()]=s),n},{}):{}}function UR(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return VR(e.response,e.responseType)}catch(n){t.push(n)}return De&&Le.warn("Failed to get xhr response body",...t),[void 0]}function VR(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 De&&Le.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return De&&Le.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function qR(e,t){try{const n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return gu(n)}catch{return}}function $R(e){const t=Je();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:s,networkResponseHeaders:o}=e.getOptions(),c={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:s,networkResponseHeaders:o};t&&t.on("beforeAddBreadcrumb",(u,d)=>GR(c,u,d))}catch{}}function GR(e,t,n){if(t.data)try{HR(t)&&WR(n)&&(LR(t,n),jR(t,n,e)),YR(t)&&KR(n)&&(AR(t,n),CR(t,n,e))}catch(r){De&&Le.exception(r,"Error when enriching network breadcrumb")}}function HR(e){return e.category==="xhr"}function YR(e){return e.category==="fetch"}function WR(e){return e&&e.xhr}function KR(e){return e&&e.response}function zR(e){const t=Je();kv(CO(e)),zc(wR(e)),dR(e),$R(e);const n=vR(e);VI(n),t&&(t.on("beforeSendEvent",uR(e)),t.on("afterSendEvent",oR(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",(r,i)=>{const s=e.getSessionId();i&&i.includeReplay&&e.isEnabled()&&s&&r.contexts&&r.contexts.feedback&&(r.contexts.feedback.replay_id=s)}))}async function QR(e){try{return Promise.all(mu(e,[JR(wt.performance.memory)]))}catch{return[]}}function JR(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 ZR(e,t,n){let r,i,s;const o=n&&n.maxWait?Math.max(n.maxWait,t):0;function c(){return u(),r=e(),r}function u(){i!==void 0&&clearTimeout(i),s!==void 0&&clearTimeout(s),i=s=void 0}function d(){return i!==void 0||s!==void 0?c():r}function f(){return i&&clearTimeout(i),i=_s(c,t),o&&s===void 0&&(s=_s(c,o)),r}return f.cancel=u,f.flush=d,f}function XR(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){De&&Le.warn("Received replay event after session expired.");return}const i=r||!t;t=!0,e.clickDetector&&wO(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&i&&e.setInitialState(),!Bf(e,n,i))return!0;if(!i)return!1;const s=e.session;if(tN(e,i),s&&s.previousSessionId)return!0;if(e.recordingMode==="buffer"&&s&&e.eventBuffer){const o=e.eventBuffer.getEarliestTimestamp();o&&(De&&Le.info(`Updating session start time to earliest event in buffer to ${new Date(o)}`),s.started=o,e.getOptions().stickySession&&Pf(s))}return e.recordingMode==="session"&&e.flush(),!0})}}function eN(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 tN(e,t){!t||!e.session||e.session.segmentId!==0||Bf(e,eN(e),!1)}function nN(){const e=bt().getPropagationContext().dsc;e&&delete e.replay_id;const t=un();if(t){const n=li(t);delete n.replay_id}}function rN(e,t,n,r){return Ri(dy(e,jd(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function iN({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
127
+ `;if(typeof e=="string")n=`${r}${e}`;else{const s=new TextEncoder().encode(r);n=new Uint8Array(s.length+e.length),n.set(s),n.set(e,s.length)}return n}async function sN({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,s={event_id:n,integrations:i};e.emit("preprocessEvent",r,s);const o=await Uy(e.getOptions(),r,s,t,e,jn());if(!o)return null;o.platform=o.platform||"javascript";const c=e.getSdkMetadata(),{name:u,version:d}=c&&c.sdk||{};return o.sdk={...o.sdk,name:u||"sentry.javascript.unknown",version:d||"0.0.0"},o}async function oN({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:i,session:s}){const o=iN({recordingData:e,headers:{segment_id:n}}),{urls:c,errorIds:u,traceIds:d,initialTimestamp:f}=r,h=Je(),l=bt(),b=h&&h.getTransport(),a=h&&h.getDsn();if(!h||!b||!a||!s.sampled)return Rr({});const p={type:Uk,replay_start_timestamp:f/1e3,timestamp:i/1e3,error_ids:u,trace_ids:d,urls:c,replay_id:t,segment_id:n,replay_type:s.sampled},y=await sN({scope:l,client:h,replayId:t,event:p});if(!y)return h.recordDroppedEvent("event_processor","replay",p),De&&Le.info("An event processor returned `null`, will not send event."),Rr({});delete y.sdkProcessingMetadata;const g=rN(y,o,a,h.getOptions().tunnel);let v;try{v=await b.send(g)}catch(E){const S=new Error(gf);try{S.cause=E}catch{}throw S}if(typeof v.statusCode=="number"&&(v.statusCode<200||v.statusCode>=300))throw new Y1(v.statusCode);const w=hy({},v);if(fy(w,"replay"))throw new qf(w);return v}class Y1 extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class qf extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function W1(e,t={count:0,interval:Yk}){const{recordingData:n,onError:r}=e;if(n.length)try{return await oN(e),!0}catch(i){if(i instanceof Y1||i instanceof qf)throw i;if($y("Replays",{_retryCount:t.count}),r&&r(i),t.count>=Wk){const s=new Error(`${gf} - max retries exceeded`);try{s.cause=i}catch{}throw s}return t.interval*=++t.count,new Promise((s,o)=>{_s(async()=>{try{await W1(e,t),s(!0)}catch(c){o(c)}},t.interval)})}}const K1="__THROTTLED",aN="__SKIPPED";function cN(e,t,n){const r=new Map,i=c=>{const u=c-n;r.forEach((d,f)=>{f<u&&r.delete(f)})},s=()=>[...r.values()].reduce((c,u)=>c+u,0);let o=!1;return(...c)=>{const u=Math.floor(Date.now()/1e3);if(i(u),s()>=t){const f=o;return o=!0,f?aN:K1}o=!1;const d=r.get(u)||0;return r.set(u,d+1),e(...c)}}class yi{constructor({options:t,recordingOptions:n}){yi.prototype.__init.call(this),yi.prototype.__init2.call(this),yi.prototype.__init3.call(this),yi.prototype.__init4.call(this),yi.prototype.__init5.call(this),yi.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:Vk,sessionIdleExpire:qk},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=ZR(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=cN((o,c)=>rR(this,o,c),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:i}=this.getOptions(),s=r?{threshold:Math.min(Kk,r),timeout:r,scrollTimeout:zk,ignoreSelector:i?i.join(","):""}:void 0;if(s&&(this.clickDetector=new gO(this,s)),De){const o=t._experiments;Le.setConfig({captureExceptions:!!o.captureExceptions,traceInternals:!!o.traceInternals})}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){De&&Le.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){De&&Le.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",De&&Le.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){De&&Le.info("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){De&&Le.info("Buffering is in progress, call `flush()` to save the replay");return}De&&Le.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=Lf({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this._initializeRecording()}startBuffering(){if(this._isEnabled){De&&Le.info("Buffering is in progress, call `flush()` to save the replay");return}De&&Le.infoTick("Starting replay in buffer mode");const t=Lf({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=Pr({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:Hk}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:XR(this),onMutation:this._onMutationHandler,...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){this._isEnabled=!1;try{De&&Le.info(`Stopping Replay${n?` triggered by ${n}`:""}`),nN(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,ZO(this)}catch(r){this.handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),De&&Le.info("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),De&&Le.info("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();De&&Le.info("Converting buffer to session"),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const n=t();this.recordingMode!=="buffer"&&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(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(this._lastActivity&&jf(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${wt.location.pathname}${wt.location.hash}${wt.location.search}`,n=`${wt.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===K1){const i=br({category:"replay.throttled"});this.addUpdate(()=>!Bf(this,{type:uO,timestamp:i.timestamp||0,data:{tag:"breadcrumb",payload:i,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||un(),n=t&&cn(t),i=(n&&ot(n).data||{})[yr];if(!(!n||!i||!["route","custom"].includes(i)))return ot(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=zO({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=Lf({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 M1(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{wt.document.addEventListener("visibilitychange",this._handleVisibilityChange),wt.addEventListener("blur",this._handleWindowBlur),wt.addEventListener("focus",this._handleWindowFocus),wt.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(zR(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=$O(this)}_removeListeners(){try{wt.document.removeEventListener("visibilitychange",this._handleVisibilityChange),wt.removeEventListener("blur",this._handleWindowBlur),wt.removeEventListener("focus",this._handleWindowFocus),wt.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}__init(){this._handleVisibilityChange=()=>{wt.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const t=br({category:"ui.blur"});this._doChangeToBackgroundTasks(t)}}__init3(){this._handleWindowFocus=()=>{const t=br({category:"ui.focus"});this._doChangeToForegroundTasks(t)}}__init4(){this._handleKeyboardEvent=t=>{kO(this,t)}}_doChangeToBackgroundTasks(t){!this.session||N1(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()){De&&Le.info("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(){const t=MO(this.performanceEntries).concat(this.replayPerformanceEntries);return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(mu(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){De&&Le.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!(!this.eventBuffer||!this.eventBuffer.hasEvents)&&(await QR(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const r=this._popEventContext(),i=this.session.segmentId++;this._maybeSaveSession();const s=await this.eventBuffer.finish();await W1({replayId:t,recordingData:s,segmentId:i,eventContext:r,session:this.session,timestamp:n,onError:o=>this.handleException(o)})}catch(n){this.handleException(n),this.stop({reason:"sendReplay"});const r=Je();if(r){const i=n instanceof qf?"ratelimit_backoff":"send_error";r.recordDroppedEvent(i,"replay")}}}__init5(){this._flush=async({force:t=!1}={})=>{if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){De&&Le.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 s=i<this._options.minReplayDuration,o=i>this._options.maxReplayDuration+5e3;if(s||o){De&&Le.info(`Session duration (${Math.floor(i/1e3)}s) is too ${s?"short":"long"}, not sending replay.`),s&&this._debouncedFlush();return}const c=this.eventBuffer;c&&this.session.segmentId===0&&!c.hasCheckout&&De&&Le.info("Flushing initial segment without checkout.");const u=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(d){this.handleException(d)}finally{this._flushLock=void 0,u&&this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&Pf(this.session)}__init6(){this._onMutationHandler=t=>{const n=t.length,r=this._options.mutationLimit,i=this._options.mutationBreadcrumbLimit,s=r&&n>r;if(n>i||s){const o=br({category:"replay.mutations",data:{count:n,limit:s}});this._createCustomBreadcrumb(o)}return s?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}}function sa(e,t){return[...e,...t].join(",")}function uN({mask:e,unmask:t,block:n,unblock:r,ignore:i}){const s=['base[href="/"]'],o=sa(e,[".sentry-mask","[data-sentry-mask]"]),c=sa(t,[]);return{maskTextSelector:o,unmaskTextSelector:c,blockSelector:sa(n,[".sentry-block","[data-sentry-block]",...s]),unblockSelector:sa(r,[]),ignoreSelector:sa(i,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function lN({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:i,value:s}){return!r||i.unmaskTextSelector&&e.matches(i.unmaskTextSelector)?s:n.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?s.replace(/[\S]/g,"*"):s}const z1='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',dN=["content-length","content-type","accept"];let Q1=!1;const fN=e=>new bu(e);class bu{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:t=$k,flushMaxDelay:n=Gk,minReplayDuration:r=Qk,maxReplayDuration:i=Vv,stickySession:s=!0,useCompression:o=!0,workerUrl:c,_experiments:u={},maskAllText:d=!0,maskAllInputs:f=!0,blockAllMedia:h=!0,mutationBreadcrumbLimit:l=750,mutationLimit:b=1e4,slowClickTimeout:a=7e3,slowClickIgnoreSelectors:p=[],networkDetailAllowUrls:y=[],networkDetailDenyUrls:g=[],networkCaptureBodies:v=!0,networkRequestHeaders:w=[],networkResponseHeaders:E=[],mask:S=[],maskAttributes:A=["title","placeholder"],unmask:T=[],block:O=[],unblock:N=[],ignore:D=[],maskFn:U,beforeAddRecordingEvent:V,beforeErrorSampling:F}={}){this.name=bu.id;const q=uN({mask:S,unmask:T,block:O,unblock:N,ignore:D});if(this._recordingOptions={maskAllInputs:f,maskAllText:d,maskInputOptions:{password:!0},maskTextFn:U,maskInputFn:U,maskAttributeFn:(R,L,W)=>lN({maskAttributes:A,maskAllText:d,privacyOptions:q,key:R,value:L,el:W}),...q,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:R=>{try{R.__rrweb__=!0}catch{}}},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,Jk),maxReplayDuration:Math.min(i,Vv),stickySession:s,useCompression:o,workerUrl:c,blockAllMedia:h,maskAllInputs:f,maskAllText:d,mutationBreadcrumbLimit:l,mutationLimit:b,slowClickTimeout:a,slowClickIgnoreSelectors:p,networkDetailAllowUrls:y,networkDetailDenyUrls:g,networkCaptureBodies:v,networkRequestHeaders:J1(w),networkResponseHeaders:J1(E),beforeAddRecordingEvent:V,beforeErrorSampling:F,_experiments:u},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${z1}`:z1),this._isInitialized&&X0())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return Q1}set _isInitialized(t){Q1=t}afterAllSetup(t){!X0()||this._replay||(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"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){if(!(!this._replay||!this._replay.isEnabled()))return this._replay.getSessionId()}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=hN(this._initialOptions,t);this._replay=new yi({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}bu.__initStatic();function hN(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...zt(e)},i=Uc(n.replaysSessionSampleRate),s=Uc(n.replaysOnErrorSampleRate);return i==null&&s==null&&fs(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),i!=null&&(r.sessionSampleRate=i),s!=null&&(r.errorSampleRate=s),r}function J1(e){return[...dN,...e.map(t=>t.toLowerCase())]}const Z1=new WeakMap,$f=new Map,Gf={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0};function pN(e,t){const{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:i,enableHTTPTimings:s,tracePropagationTargets:o}={traceFetch:Gf.traceFetch,traceXHR:Gf.traceXHR,...t},c=typeof i=="function"?i:f=>!0,u=f=>vN(f,o),d={};n&&(e.addEventProcessor(f=>(f.type==="transaction"&&f.spans&&f.spans.forEach(h=>{if(h.op==="http.client"){const l=$f.get(h.span_id);l&&(h.timestamp=l/1e3,$f.delete(h.span_id))}}),f)),t4(f=>{if(f.response){const h=Z1.get(f.response);h&&f.endTimestamp&&$f.set(h,f.endTimestamp)}}),K0(f=>{const h=T5(f,c,u,d);if(f.response&&f.fetchData.__span&&Z1.set(f.response,f.fetchData.__span),h){const l=eb(f.fetchData.url),b=l?Oi(l).host:void 0;h.setAttributes({"http.url":l,"server.address":b})}s&&h&&X1(h)})),r&&Mv(f=>{const h=bN(f,c,u,d);s&&h&&X1(h)})}function mN(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function X1(e){const{url:t}=ot(e).data||{};if(!t||typeof t!="string")return;const n=Es("resource",({entries:r})=>{r.forEach(i=>{mN(i)&&i.name.endsWith(t)&&(yN(i).forEach(o=>e.setAttribute(...o)),setTimeout(n))})})}function gN(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 wr(e=0){return((En||performance.timeOrigin)+e)/1e3}function yN(e){const{name:t,version:n}=gN(e.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",t]),En?[...r,["http.request.redirect_start",wr(e.redirectStart)],["http.request.fetch_start",wr(e.fetchStart)],["http.request.domain_lookup_start",wr(e.domainLookupStart)],["http.request.domain_lookup_end",wr(e.domainLookupEnd)],["http.request.connect_start",wr(e.connectStart)],["http.request.secure_connection_start",wr(e.secureConnectionStart)],["http.request.connection_end",wr(e.connectEnd)],["http.request.request_start",wr(e.requestStart)],["http.request.response_start",wr(e.responseStart)],["http.request.response_end",wr(e.responseEnd)]]:r}function vN(e,t){const n=Ne.location&&Ne.location.href;if(n){let r,i;try{r=new URL(e,n),i=new URL(n).origin}catch{return!1}const s=r.origin===i;return t?ii(r.toString(),t)||s&&ii(r.pathname,t):s}else{const r=!!e.match(/^\/(?!\/)/);return t?ii(e,t):r}}function bN(e,t,n,r){const i=e.xhr,s=i&&i[ji];if(!i||i.__sentry_own_request__||!s)return;const o=Nr()&&t(s.url);if(e.endTimestamp&&o){const l=i.__sentry_xhr_span_id__;if(!l)return;const b=r[l];b&&s.status_code!==void 0&&(yy(b,s.status_code),b.end(),delete r[l]);return}const c=eb(s.url),u=c?Oi(c).host:void 0,d=!!un(),f=o&&d?di({name:`${s.method} ${s.url}`,attributes:{type:"xhr","http.method":s.method,"http.url":c,url:s.url,"server.address":u,[Qt]:"auto.http.browser",[ui]:"http.client"}}):new ys;i.__sentry_xhr_span_id__=f.spanContext().spanId,r[i.__sentry_xhr_span_id__]=f;const h=Je();return i.setRequestHeader&&n(s.url)&&h&&wN(i,h,Nr()&&d?f:void 0),f}function wN(e,t,n){const r=bt(),i=jn(),{traceId:s,spanId:o,sampled:c,dsc:u}={...i.getPropagationContext(),...r.getPropagationContext()},d=n&&Nr()?wy(n):Dd(s,o,c),f=ay(u||(n?li(n):Fc(s,t)));EN(e,d,f)}function EN(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader(Md,n)}catch{}}function eb(e){try{return new URL(e,Ne.location.origin).href}catch{return}}function SN(){Ne&&Ne.document?Ne.document.addEventListener("visibilitychange",()=>{const e=un();if(!e)return;const t=cn(e);if(Ne.document.hidden&&t){const n="cancelled",{op:r,status:i}=ot(t);On&&Se.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),i||t.setStatus({code:nn,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):On&&Se.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const xN="BrowserTracing",_N={...Vc,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,_experiments:{},...Gf},CN=(e={})=>{rI();const{enableInp:t,enableLongTask:n,enableLongAnimationFrame:r,_experiments:{enableInteractions:i,enableStandaloneClsSpans:s},beforeStartSpan:o,idleTimeout:c,finalTimeout:u,childSpanTimeout:d,markBackgroundSpan:f,traceFetch:h,traceXHR:l,shouldCreateSpanForRequest:b,enableHTTPTimings:a,instrumentPageLoad:p,instrumentNavigation:y}={..._N,...e},g=C3({recordClsStandaloneSpans:s||!1});t&&z3(),r&&nt.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?T3():n&&A3(),i&&I3();const v={name:void 0,source:void 0};function w(E,S){const A=S.op==="pageload",T=o?o(S):S,O=T.attributes||{};S.name!==T.name&&(O[yr]="custom",T.attributes=O),v.name=T.name,v.source=O[yr];const N=By(T,{idleTimeout:c,finalTimeout:u,childSpanTimeout:d,disableAutoFinish:A,beforeSpanEnd:U=>{g(),M3(U,{recordClsOnPageloadSpan:!s})}});function D(){["interactive","complete"].includes(Ne.document.readyState)&&E.emit("idleSpanEnableAutoFinish",N)}return A&&Ne.document&&(Ne.document.addEventListener("readystatechange",()=>{D()}),D()),N}return{name:xN,afterAllSetup(E){let S,A=Ne.location&&Ne.location.href;E.on("startNavigationSpan",T=>{Je()===E&&(S&&!ot(S).timestamp&&(On&&Se.log(`[Tracing] Finishing current root span with op: ${ot(S).op}`),S.end()),S=w(E,{op:"navigation",...T}))}),E.on("startPageLoadSpan",(T,O={})=>{if(Je()!==E)return;S&&!ot(S).timestamp&&(On&&Se.log(`[Tracing] Finishing current root span with op: ${ot(S).op}`),S.end());const N=O.sentryTrace||nb("sentry-trace"),D=O.baggage||nb("baggage"),U=_4(N,D);bt().setPropagationContext(U),S=w(E,{op:"pageload",...T})}),E.on("spanEnd",T=>{const O=ot(T).op;if(T!==cn(T)||O!=="navigation"&&O!=="pageload")return;const N=bt(),D=N.getPropagationContext();N.setPropagationContext({...D,sampled:D.sampled!==void 0?D.sampled:Mi(T),dsc:D.dsc||li(T)})}),Ne.location&&(p&&tb(E,{name:Ne.location.pathname,startTime:En?En/1e3:void 0,attributes:{[yr]:"url",[Qt]:"auto.pageload.browser"}}),y&&zc(({to:T,from:O})=>{if(O===void 0&&A&&A.indexOf(T)!==-1){A=void 0;return}O!==T&&(A=void 0,AN(E,{name:Ne.location.pathname,attributes:{[yr]:"url",[Qt]:"auto.navigation.browser"}}))})),f&&SN(),i&&TN(c,u,d,v),t&&J3(),pN(E,{traceFetch:h,traceXHR:l,tracePropagationTargets:E.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:b,enableHTTPTimings:a})}}};function tb(e,t,n){e.emit("startPageLoadSpan",t,n),bt().setTransactionName(t.name);const r=un();return(r&&ot(r).op)==="pageload"?r:void 0}function AN(e,t){jn().setPropagationContext(Nc()),bt().setPropagationContext(Nc()),e.emit("startNavigationSpan",t),bt().setTransactionName(t.name);const n=un();return(n&&ot(n).op)==="navigation"?n:void 0}function nb(e){const t=FT(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}function TN(e,t,n,r){let i;const s=()=>{const o="ui.action.click",c=un(),u=c&&cn(c);if(u){const d=ot(u).op;if(["navigation","pageload"].includes(d)){On&&Se.warn(`[Tracing] Did not create ${o} span because a pageload or navigation span is in progress.`);return}}if(i&&(i.setAttribute(Vd,"interactionInterrupted"),i.end(),i=void 0),!r.name){On&&Se.warn(`[Tracing] Did not create ${o} transaction because _latestRouteName is missing.`);return}i=By({name:r.name,op:o,attributes:{[yr]:r.source||"url"}},{idleTimeout:e,finalTimeout:t,childSpanTimeout:n})};Ne.document&&addEventListener("click",s,{once:!1,capture:!0})}function IN(e){const t={...e};return rv(t,"react"),$y("react",{version:k.version}),Bk(t)}function kN(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}function ON(e,t){const n=new WeakSet;function r(i,s){if(!n.has(i)){if(i.cause)return n.add(i),r(i.cause,s);i.cause=s}}r(e,t)}function RN(e,{componentStack:t},n){if(kN(k.version)&&Sc(e)&&t){const r=new Error(e.message);r.name=`React ErrorBoundary ${e.name}`,r.stack=t,ON(e,r)}return Kd(e,{...n,captureContext:{contexts:{react:{componentStack:t}}}})}var Hf={exports:{}},ft={};/** @license React v16.13.1
128
128
  * react-is.production.min.js
129
129
  *
130
130
  * Copyright (c) Facebook, Inc. and its affiliates.
131
131
  *
132
132
  * This source code is licensed under the MIT license found in the
133
133
  * LICENSE file in the root directory of this source tree.
134
- */var eb;function C8(){if(eb)return dt;eb=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,l=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,a=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function w(S){if(typeof S=="object"&&S!==null){var A=S.$$typeof;switch(A){case t:switch(S=S.type,S){case u:case d:case r:case s:case i:case p:return S;default:switch(S=S&&S.$$typeof,S){case c:case f:case a:case v:case o:return S;default:return A}}case n:return A}}}function E(S){return w(S)===d}return dt.AsyncMode=u,dt.ConcurrentMode=d,dt.ContextConsumer=c,dt.ContextProvider=o,dt.Element=t,dt.ForwardRef=f,dt.Fragment=r,dt.Lazy=a,dt.Memo=v,dt.Portal=n,dt.Profiler=s,dt.StrictMode=i,dt.Suspense=p,dt.isAsyncMode=function(S){return E(S)||w(S)===u},dt.isConcurrentMode=E,dt.isContextConsumer=function(S){return w(S)===c},dt.isContextProvider=function(S){return w(S)===o},dt.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},dt.isForwardRef=function(S){return w(S)===f},dt.isFragment=function(S){return w(S)===r},dt.isLazy=function(S){return w(S)===a},dt.isMemo=function(S){return w(S)===v},dt.isPortal=function(S){return w(S)===n},dt.isProfiler=function(S){return w(S)===s},dt.isStrictMode=function(S){return w(S)===i},dt.isSuspense=function(S){return w(S)===p},dt.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===d||S===s||S===i||S===p||S===l||typeof S=="object"&&S!==null&&(S.$$typeof===a||S.$$typeof===v||S.$$typeof===o||S.$$typeof===c||S.$$typeof===f||S.$$typeof===y||S.$$typeof===g||S.$$typeof===b||S.$$typeof===h)},dt.typeOf=w,dt}var ft={};/** @license React v16.13.1
134
+ */var rb;function NN(){if(rb)return ft;rb=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,l=e?Symbol.for("react.suspense_list"):60120,b=e?Symbol.for("react.memo"):60115,a=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function w(S){if(typeof S=="object"&&S!==null){var A=S.$$typeof;switch(A){case t:switch(S=S.type,S){case u:case d:case r:case s:case i:case h:return S;default:switch(S=S&&S.$$typeof,S){case c:case f:case a:case b:case o:return S;default:return A}}case n:return A}}}function E(S){return w(S)===d}return ft.AsyncMode=u,ft.ConcurrentMode=d,ft.ContextConsumer=c,ft.ContextProvider=o,ft.Element=t,ft.ForwardRef=f,ft.Fragment=r,ft.Lazy=a,ft.Memo=b,ft.Portal=n,ft.Profiler=s,ft.StrictMode=i,ft.Suspense=h,ft.isAsyncMode=function(S){return E(S)||w(S)===u},ft.isConcurrentMode=E,ft.isContextConsumer=function(S){return w(S)===c},ft.isContextProvider=function(S){return w(S)===o},ft.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},ft.isForwardRef=function(S){return w(S)===f},ft.isFragment=function(S){return w(S)===r},ft.isLazy=function(S){return w(S)===a},ft.isMemo=function(S){return w(S)===b},ft.isPortal=function(S){return w(S)===n},ft.isProfiler=function(S){return w(S)===s},ft.isStrictMode=function(S){return w(S)===i},ft.isSuspense=function(S){return w(S)===h},ft.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===d||S===s||S===i||S===h||S===l||typeof S=="object"&&S!==null&&(S.$$typeof===a||S.$$typeof===b||S.$$typeof===o||S.$$typeof===c||S.$$typeof===f||S.$$typeof===y||S.$$typeof===g||S.$$typeof===v||S.$$typeof===p)},ft.typeOf=w,ft}var ht={};/** @license React v16.13.1
135
135
  * react-is.development.js
136
136
  *
137
137
  * Copyright (c) Facebook, Inc. and its affiliates.
138
138
  *
139
139
  * This source code is licensed under the MIT license found in the
140
140
  * LICENSE file in the root directory of this source tree.
141
- */var tb;function A8(){return tb||(tb=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,l=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,a=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function w(M){return typeof M=="string"||typeof M=="function"||M===r||M===d||M===s||M===i||M===p||M===l||typeof M=="object"&&M!==null&&(M.$$typeof===a||M.$$typeof===v||M.$$typeof===o||M.$$typeof===c||M.$$typeof===f||M.$$typeof===y||M.$$typeof===g||M.$$typeof===b||M.$$typeof===h)}function E(M){if(typeof M=="object"&&M!==null){var ee=M.$$typeof;switch(ee){case t:var J=M.type;switch(J){case u:case d:case r:case s:case i:case p:return J;default:var Q=J&&J.$$typeof;switch(Q){case c:case f:case a:case v:case o:return Q;default:return ee}}case n:return ee}}}var S=u,A=d,T=c,O=o,N=t,D=f,U=r,q=a,F=v,V=n,R=s,L=i,W=p,z=!1;function Z(M){return z||(z=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),te(M)||E(M)===u}function te(M){return E(M)===d}function re(M){return E(M)===c}function he(M){return E(M)===o}function ce(M){return typeof M=="object"&&M!==null&&M.$$typeof===t}function ye(M){return E(M)===f}function le(M){return E(M)===r}function $(M){return E(M)===a}function H(M){return E(M)===v}function X(M){return E(M)===n}function C(M){return E(M)===s}function j(M){return E(M)===i}function B(M){return E(M)===p}ft.AsyncMode=S,ft.ConcurrentMode=A,ft.ContextConsumer=T,ft.ContextProvider=O,ft.Element=N,ft.ForwardRef=D,ft.Fragment=U,ft.Lazy=q,ft.Memo=F,ft.Portal=V,ft.Profiler=R,ft.StrictMode=L,ft.Suspense=W,ft.isAsyncMode=Z,ft.isConcurrentMode=te,ft.isContextConsumer=re,ft.isContextProvider=he,ft.isElement=ce,ft.isForwardRef=ye,ft.isFragment=le,ft.isLazy=$,ft.isMemo=H,ft.isPortal=X,ft.isProfiler=C,ft.isStrictMode=j,ft.isSuspense=B,ft.isValidElementType=w,ft.typeOf=E}()),ft}process.env.NODE_ENV==="production"?$f.exports=C8():$f.exports=A8();var T8=$f.exports,nb=T8,I8={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},k8={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},rb={};rb[nb.ForwardRef]=I8,rb[nb.Memo]=k8;const O8=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,ib={componentStack:null,error:null,eventId:null};class bu extends de.Component{constructor(t){super(t),bu.prototype.__init.call(this),this.state=ib,this._openFallbackReportDialog=!0;const n=Je();n&&t.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=n.on("afterSendEvent",r=>{!r.type&&this._lastEventId&&r.event_id===this._lastEventId&&jv({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,n){const{componentStack:r}=n,i=r??void 0,{beforeCapture:s,onError:o,showDialog:c,dialogOptions:u}=this.props;Dc(d=>{s&&s(d,t,i);const f=_8(t,n,{mechanism:{handled:!!this.props.fallback}});o&&o(t,i,f),c&&(this._lastEventId=f,this._openFallbackReportDialog&&jv({...u,eventId:f})),this.setState({error:t,componentStack:r,eventId:f})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:n,eventId:r}=this.state,{onUnmount:i}=this.props;i&&i(t,n,r),this._cleanupHook&&(this._cleanupHook(),this._cleanupHook=void 0)}__init(){this.resetErrorBoundary=()=>{const{onReset:t}=this.props,{error:n,componentStack:r,eventId:i}=this.state;t&&t(n,r,i),this.setState(ib)}}render(){const{fallback:t,children:n}=this.props,r=this.state;if(r.error){let i;return typeof t=="function"?i=de.createElement(t,{error:r.error,componentStack:r.componentStack,resetError:this.resetErrorBoundary,eventId:r.eventId}):i=t,de.isValidElement(i)?i:(t&&O8&&Se.warn("fallback did not produce a valid ReactElement"),null)}return typeof n=="function"?n():n}}const R8=new WeakSet;function N8(e){const t=v8({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{useEffect:n,useLocation:r,useNavigationType:i,createRoutesFromChildren:s,matchRoutes:o,stripBasename:c,instrumentPageLoad:u=!0,instrumentNavigation:d=!0}=e;return{...t,setup(){},afterAllSetup(f){t.afterAllSetup(f);const p=Ne&&Ne.location&&Ne.location.pathname;u&&p&&Z1(f,{name:p,attributes:{[br]:"url",[li]:"pageload",[Qt]:"auto.pageload.react.reactrouter_v6"}}),d&&R8.add(f)}}}E8({dsn:"https://5b16c396f6e8f6e4b0b87455bea7e96b@o80526.ingest.us.sentry.io/4507345428283392",integrations:[N8({useEffect:k.useEffect,useLocation:Yt,useNavigationType:Aw,createRoutesFromChildren:ma,matchRoutes:uh}),s8()],enabled:!0});function M8(e){const t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255,i=Math.max(t,n,r),s=Math.min(t,n,r),o=i-s,c=(i+s)/2;let u=0;o!==0&&(u=o/(1-Math.abs(2*c-1)));let d=0;return o!==0&&(i===t?d=((n-r)/o+(n<r?6:0))*60:i===n?d=((r-t)/o+2)*60:d=((t-n)/o+4)*60),{hue:d,saturation:u,lightness:c}}function wu(e,t,n){const r=(1-Math.abs(2*n-1))*t,i=r*(1-Math.abs(e/60%2-1)),s=n-r/2;let o=0,c=0,u=0;return e<60?(o=r,c=i,u=0):e<120?(o=i,c=r,u=0):e<180?(o=0,c=r,u=i):e<240?(o=0,c=i,u=r):e<300?(o=i,c=0,u=r):(o=r,c=0,u=i),o=Math.round((o+s)*255),c=Math.round((c+s)*255),u=Math.round((u+s)*255),`#${o.toString(16).padStart(2,"0")}${c.toString(16).padStart(2,"0")}${u.toString(16).padStart(2,"0")}`}function sb(e){const{hue:t,saturation:n,lightness:r}=M8(e),i=.04,s=[{key:"50",min:97,max:99},{key:"100",min:92,max:96},{key:"200",min:85,max:91},{key:"300",min:74,max:84},{key:"400",min:58,max:73},{key:"500",min:51,max:61},{key:"600",min:36,max:50},{key:"700",min:29,max:40},{key:"800",min:24,max:33},{key:"900",min:20,max:28},{key:"950",min:0,max:19}],o={},c={},u={},d={};s.forEach(f=>{const p=(f.min+f.max)/2/100;o[f.key]=wu(t,n,p),u[f.key]=wu(0,n,p),d[f.key]=wu(120,n,p),c[f.key]=wu(t,i,p)});for(const f of s)if(r*100>=f.min&&r*100<=f.max){o[f.key]=e;break}return{primaryPalette:o,redPalette:u,greenPalette:d,grayPalette:c}}const ob=e=>{const t={primary:e.primary_color,secondary:e.secondary_color,tertiary:e.tertiary_color,quaternary:e.quaternary_color},n=document.querySelector(":root");for(const r in t)if(t[r]){const{primaryPalette:i}=sb(t[r]);for(const s in i)n.style.setProperty(`--${r}-${s}`,i[s])}if(t.primary){const{grayPalette:r,redPalette:i,greenPalette:s}=sb(t.primary);for(const o in r)n.style.setProperty(`--gray-${o}`,r[o]);for(const o in i)n.style.setProperty(`--red-${o}`,i[o]);for(const o in s)n.style.setProperty(`--green-${o}`,s[o])}};function ab(){const{t:e}=et();return m.jsx("div",{children:m.jsx("div",{className:"container",children:m.jsx("div",{className:"group",children:m.jsx("div",{style:{height:"90vh",width:"100vh",margin:"auto",display:"flex"},children:m.jsxs("div",{className:"relative flex h-full flex-col justify-between",children:[m.jsx("div",{children:m.jsxs("div",{className:"flex flex-col",children:[m.jsx("h2",{children:"Oops!"}),m.jsx("p",{className:"flex",children:e("sorrySomethingWentWrong")})]})}),m.jsx("div",{className:"flex flex-col gap-5",children:m.jsx("div",{className:"flex flex-col gap-2.5 text-center",children:m.jsx("button",{className:"bg-primary-600 hover:bg-primary-700 rounded-lg px-5 py-2.5 text-white",type:"button",onClick:()=>window.location.replace("/"),children:e("back")})})})]})})})})})}function Gf(e){"@babel/helpers - typeof";return Gf=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},Gf(e)}function cb(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":Gf(XMLHttpRequest))==="object"}function D8(e){return!!e&&typeof e.then=="function"}function P8(e){return D8(e)?e:Promise.resolve(e)}function j8(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Hf={exports:{}},Eu={exports:{}},ub;function L8(){return ub||(ub=1,function(e,t){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof qi<"u"&&qi,r=function(){function s(){this.fetch=!1,this.DOMException=n.DOMException}return s.prototype=n,new s}();(function(s){(function(o){var c=typeof s<"u"&&s||typeof self<"u"&&self||typeof c<"u"&&c,u={searchParams:"URLSearchParams"in c,iterable:"Symbol"in c&&"iterator"in Symbol,blob:"FileReader"in c&&"Blob"in c&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in c,arrayBuffer:"ArrayBuffer"in c};function d(R){return R&&DataView.prototype.isPrototypeOf(R)}if(u.arrayBuffer)var f=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],p=ArrayBuffer.isView||function(R){return R&&f.indexOf(Object.prototype.toString.call(R))>-1};function l(R){if(typeof R!="string"&&(R=String(R)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(R)||R==="")throw new TypeError('Invalid character in header field name: "'+R+'"');return R.toLowerCase()}function v(R){return typeof R!="string"&&(R=String(R)),R}function a(R){var L={next:function(){var W=R.shift();return{done:W===void 0,value:W}}};return u.iterable&&(L[Symbol.iterator]=function(){return L}),L}function h(R){this.map={},R instanceof h?R.forEach(function(L,W){this.append(W,L)},this):Array.isArray(R)?R.forEach(function(L){this.append(L[0],L[1])},this):R&&Object.getOwnPropertyNames(R).forEach(function(L){this.append(L,R[L])},this)}h.prototype.append=function(R,L){R=l(R),L=v(L);var W=this.map[R];this.map[R]=W?W+", "+L:L},h.prototype.delete=function(R){delete this.map[l(R)]},h.prototype.get=function(R){return R=l(R),this.has(R)?this.map[R]:null},h.prototype.has=function(R){return this.map.hasOwnProperty(l(R))},h.prototype.set=function(R,L){this.map[l(R)]=v(L)},h.prototype.forEach=function(R,L){for(var W in this.map)this.map.hasOwnProperty(W)&&R.call(L,this.map[W],W,this)},h.prototype.keys=function(){var R=[];return this.forEach(function(L,W){R.push(W)}),a(R)},h.prototype.values=function(){var R=[];return this.forEach(function(L){R.push(L)}),a(R)},h.prototype.entries=function(){var R=[];return this.forEach(function(L,W){R.push([W,L])}),a(R)},u.iterable&&(h.prototype[Symbol.iterator]=h.prototype.entries);function y(R){if(R.bodyUsed)return Promise.reject(new TypeError("Already read"));R.bodyUsed=!0}function g(R){return new Promise(function(L,W){R.onload=function(){L(R.result)},R.onerror=function(){W(R.error)}})}function b(R){var L=new FileReader,W=g(L);return L.readAsArrayBuffer(R),W}function w(R){var L=new FileReader,W=g(L);return L.readAsText(R),W}function E(R){for(var L=new Uint8Array(R),W=new Array(L.length),z=0;z<L.length;z++)W[z]=String.fromCharCode(L[z]);return W.join("")}function S(R){if(R.slice)return R.slice(0);var L=new Uint8Array(R.byteLength);return L.set(new Uint8Array(R)),L.buffer}function A(){return this.bodyUsed=!1,this._initBody=function(R){this.bodyUsed=this.bodyUsed,this._bodyInit=R,R?typeof R=="string"?this._bodyText=R:u.blob&&Blob.prototype.isPrototypeOf(R)?this._bodyBlob=R:u.formData&&FormData.prototype.isPrototypeOf(R)?this._bodyFormData=R:u.searchParams&&URLSearchParams.prototype.isPrototypeOf(R)?this._bodyText=R.toString():u.arrayBuffer&&u.blob&&d(R)?(this._bodyArrayBuffer=S(R.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(R)||p(R))?this._bodyArrayBuffer=S(R):this._bodyText=R=Object.prototype.toString.call(R):this._bodyText="",this.headers.get("content-type")||(typeof R=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):u.searchParams&&URLSearchParams.prototype.isPrototypeOf(R)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},u.blob&&(this.blob=function(){var R=y(this);if(R)return R;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var R=y(this);return R||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(b)}),this.text=function(){var R=y(this);if(R)return R;if(this._bodyBlob)return w(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(E(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},u.formData&&(this.formData=function(){return this.text().then(D)}),this.json=function(){return this.text().then(JSON.parse)},this}var T=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function O(R){var L=R.toUpperCase();return T.indexOf(L)>-1?L:R}function N(R,L){if(!(this instanceof N))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');L=L||{};var W=L.body;if(R instanceof N){if(R.bodyUsed)throw new TypeError("Already read");this.url=R.url,this.credentials=R.credentials,L.headers||(this.headers=new h(R.headers)),this.method=R.method,this.mode=R.mode,this.signal=R.signal,!W&&R._bodyInit!=null&&(W=R._bodyInit,R.bodyUsed=!0)}else this.url=String(R);if(this.credentials=L.credentials||this.credentials||"same-origin",(L.headers||!this.headers)&&(this.headers=new h(L.headers)),this.method=O(L.method||this.method||"GET"),this.mode=L.mode||this.mode||null,this.signal=L.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&W)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(W),(this.method==="GET"||this.method==="HEAD")&&(L.cache==="no-store"||L.cache==="no-cache")){var z=/([?&])_=[^&]*/;if(z.test(this.url))this.url=this.url.replace(z,"$1_="+new Date().getTime());else{var Z=/\?/;this.url+=(Z.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}N.prototype.clone=function(){return new N(this,{body:this._bodyInit})};function D(R){var L=new FormData;return R.trim().split("&").forEach(function(W){if(W){var z=W.split("="),Z=z.shift().replace(/\+/g," "),te=z.join("=").replace(/\+/g," ");L.append(decodeURIComponent(Z),decodeURIComponent(te))}}),L}function U(R){var L=new h,W=R.replace(/\r?\n[\t ]+/g," ");return W.split("\r").map(function(z){return z.indexOf(`
142
- `)===0?z.substr(1,z.length):z}).forEach(function(z){var Z=z.split(":"),te=Z.shift().trim();if(te){var re=Z.join(":").trim();L.append(te,re)}}),L}A.call(N.prototype);function q(R,L){if(!(this instanceof q))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');L||(L={}),this.type="default",this.status=L.status===void 0?200:L.status,this.ok=this.status>=200&&this.status<300,this.statusText=L.statusText===void 0?"":""+L.statusText,this.headers=new h(L.headers),this.url=L.url||"",this._initBody(R)}A.call(q.prototype),q.prototype.clone=function(){return new q(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},q.error=function(){var R=new q(null,{status:0,statusText:""});return R.type="error",R};var F=[301,302,303,307,308];q.redirect=function(R,L){if(F.indexOf(L)===-1)throw new RangeError("Invalid status code");return new q(null,{status:L,headers:{location:R}})},o.DOMException=c.DOMException;try{new o.DOMException}catch{o.DOMException=function(L,W){this.message=L,this.name=W;var z=Error(L);this.stack=z.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function V(R,L){return new Promise(function(W,z){var Z=new N(R,L);if(Z.signal&&Z.signal.aborted)return z(new o.DOMException("Aborted","AbortError"));var te=new XMLHttpRequest;function re(){te.abort()}te.onload=function(){var ce={status:te.status,statusText:te.statusText,headers:U(te.getAllResponseHeaders()||"")};ce.url="responseURL"in te?te.responseURL:ce.headers.get("X-Request-URL");var ye="response"in te?te.response:te.responseText;setTimeout(function(){W(new q(ye,ce))},0)},te.onerror=function(){setTimeout(function(){z(new TypeError("Network request failed"))},0)},te.ontimeout=function(){setTimeout(function(){z(new TypeError("Network request failed"))},0)},te.onabort=function(){setTimeout(function(){z(new o.DOMException("Aborted","AbortError"))},0)};function he(ce){try{return ce===""&&c.location.href?c.location.href:ce}catch{return ce}}te.open(Z.method,he(Z.url),!0),Z.credentials==="include"?te.withCredentials=!0:Z.credentials==="omit"&&(te.withCredentials=!1),"responseType"in te&&(u.blob?te.responseType="blob":u.arrayBuffer&&Z.headers.get("Content-Type")&&Z.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(te.responseType="arraybuffer")),L&&typeof L.headers=="object"&&!(L.headers instanceof h)?Object.getOwnPropertyNames(L.headers).forEach(function(ce){te.setRequestHeader(ce,v(L.headers[ce]))}):Z.headers.forEach(function(ce,ye){te.setRequestHeader(ye,ce)}),Z.signal&&(Z.signal.addEventListener("abort",re),te.onreadystatechange=function(){te.readyState===4&&Z.signal.removeEventListener("abort",re)}),te.send(typeof Z._bodyInit>"u"?null:Z._bodyInit)})}return V.polyfill=!0,c.fetch||(c.fetch=V,c.Headers=h,c.Request=N,c.Response=q),o.Headers=h,o.Request=N,o.Response=q,o.fetch=V,o})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=n.fetch?n:r;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t}(Eu,Eu.exports)),Eu.exports}(function(e,t){var n;if(typeof fetch=="function"&&(typeof qi<"u"&&qi.fetch?n=qi.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof j8<"u"&&typeof window>"u"){var r=n||L8();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(Hf,Hf.exports);var lb=Hf.exports;const db=Pu(lb),fb=Zb({__proto__:null,default:db},[lb]);function hb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function pb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hb(Object(n),!0).forEach(function(r){B8(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function B8(e,t,n){return t=F8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F8(e){var t=U8(e,"string");return Ui(t)=="symbol"?t:t+""}function U8(e,t){if(Ui(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ui(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ui(e){"@babel/helpers - typeof";return Ui=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},Ui(e)}var Lr;typeof fetch=="function"&&(typeof global<"u"&&global.fetch?Lr=global.fetch:typeof window<"u"&&window.fetch?Lr=window.fetch:Lr=fetch);var oa;cb()&&(typeof global<"u"&&global.XMLHttpRequest?oa=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(oa=window.XMLHttpRequest));var Su;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?Su=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(Su=window.ActiveXObject)),!Lr&&fb&&!oa&&!Su&&(Lr=db||fb),typeof Lr!="function"&&(Lr=void 0);var Yf=function(t,n){if(n&&Ui(n)==="object"){var r="";for(var i in n)r+="&"+encodeURIComponent(i)+"="+encodeURIComponent(n[i]);if(!r)return t;t=t+(t.indexOf("?")!==-1?"&":"?")+r.slice(1)}return t},mb=function(t,n,r,i){var s=function(u){if(!u.ok)return r(u.statusText||"Error",{status:u.status});u.text().then(function(d){r(null,{status:u.status,data:d})}).catch(r)};if(i){var o=i(t,n);if(o instanceof Promise){o.then(s).catch(r);return}}typeof fetch=="function"?fetch(t,n).then(s).catch(r):Lr(t,n).then(s).catch(r)},gb=!1,q8=function(t,n,r,i){t.queryStringParams&&(n=Yf(n,t.queryStringParams));var s=pb({},typeof t.customHeaders=="function"?t.customHeaders():t.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(s["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(s["Content-Type"]="application/json");var o=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,c=pb({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:s},gb?{}:o),u=typeof t.alternateFetch=="function"&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{mb(n,c,i,u)}catch(d){if(!o||Object.keys(o).length===0||!d.message||d.message.indexOf("not implemented")<0)return i(d);try{Object.keys(o).forEach(function(f){delete c[f]}),mb(n,c,i,u),gb=!0}catch(f){i(f)}}},V8=function(t,n,r,i){r&&Ui(r)==="object"&&(r=Yf("",r).slice(1)),t.queryStringParams&&(n=Yf(n,t.queryStringParams));try{var s;oa?s=new oa:s=new Su("MSXML2.XMLHTTP.3.0"),s.open(r?"POST":"GET",n,1),t.crossDomain||s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.withCredentials=!!t.withCredentials,r&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.overrideMimeType&&s.overrideMimeType("application/json");var o=t.customHeaders;if(o=typeof o=="function"?o():o,o)for(var c in o)s.setRequestHeader(c,o[c]);s.onreadystatechange=function(){s.readyState>3&&i(s.status>=400?s.statusText:null,{status:s.status,data:s.responseText})},s.send(r)}catch(u){console&&console.log(u)}},$8=function(t,n,r,i){if(typeof r=="function"&&(i=r,r=void 0),i=i||function(){},Lr&&n.indexOf("file:")!==0)return q8(t,n,r,i);if(cb()||typeof ActiveXObject=="function")return V8(t,n,r,i);i(new Error("No fetch and no xhr implementation found!"))};function Ps(e){"@babel/helpers - typeof";return Ps=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},Ps(e)}function yb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Wf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yb(Object(n),!0).forEach(function(r){vb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function G8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function H8(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,bb(r.key),r)}}function Y8(e,t,n){return t&&H8(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function vb(e,t,n){return t=bb(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bb(e){var t=W8(e,"string");return Ps(t)=="symbol"?t:t+""}function W8(e,t){if(Ps(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ps(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var K8=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(n){return JSON.parse(n)},stringify:JSON.stringify,parsePayload:function(n,r,i){return vb({},r,i||"")},parseLoadPayload:function(n,r){},request:$8,reloadInterval:typeof window<"u"?!1:60*60*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},wb=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};G8(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return Y8(e,[{key:"init",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=n,this.options=Wf(Wf(Wf({},K8()),this.options||{}),i),this.allOptions=s,this.services&&this.options.reloadInterval){var o=setInterval(function(){return r.reload()},this.options.reloadInterval);Ps(o)==="object"&&typeof o.unref=="function"&&o.unref()}}},{key:"readMulti",value:function(n,r,i){this._readAny(n,n,r,r,i)}},{key:"read",value:function(n,r,i){this._readAny([n],n,[r],r,i)}},{key:"_readAny",value:function(n,r,i,s,o){var c=this,u=this.options.loadPath;typeof this.options.loadPath=="function"&&(u=this.options.loadPath(n,i)),u=P8(u),u.then(function(d){if(!d)return o(null,{});var f=c.services.interpolator.interpolate(d,{lng:n.join("+"),ns:i.join("+")});c.loadUrl(f,o,r,s)})}},{key:"loadUrl",value:function(n,r,i,s){var o=this,c=typeof i=="string"?[i]:i,u=typeof s=="string"?[s]:s,d=this.options.parseLoadPayload(c,u);this.options.request(this.options,n,d,function(f,p){if(p&&(p.status>=500&&p.status<600||!p.status))return r("failed loading "+n+"; status code: "+p.status,!0);if(p&&p.status>=400&&p.status<500)return r("failed loading "+n+"; status code: "+p.status,!1);if(!p&&f&&f.message&&f.message.indexOf("Failed to fetch")>-1)return r("failed loading "+n+": "+f.message,!0);if(f)return r(f,!1);var l,v;try{typeof p.data=="string"?l=o.options.parse(p.data,i,s):l=p.data}catch{v="failed parsing "+n+" to json"}if(v)return r(v,!1);r(null,l)})}},{key:"create",value:function(n,r,i,s,o){var c=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var u=this.options.parsePayload(r,i,s),d=0,f=[],p=[];n.forEach(function(l){var v=c.options.addPath;typeof c.options.addPath=="function"&&(v=c.options.addPath(l,r));var a=c.services.interpolator.interpolate(v,{lng:l,ns:r});c.options.request(c.options,a,u,function(h,y){d+=1,f.push(h),p.push(y),d===n.length&&typeof o=="function"&&o(f,p)})})}}},{key:"reload",value:function(){var n=this,r=this.services,i=r.backendConnector,s=r.languageUtils,o=r.logger,c=i.language;if(!(c&&c.toLowerCase()==="cimode")){var u=[],d=function(p){var l=s.toResolveHierarchy(p);l.forEach(function(v){u.indexOf(v)<0&&u.push(v)})};d(c),this.allOptions.preload&&this.allOptions.preload.forEach(function(f){return d(f)}),u.forEach(function(f){n.allOptions.ns.forEach(function(p){i.read(f,p,"read",null,null,function(l,v){l&&o.warn("loading namespace ".concat(p," for language ").concat(f," failed"),l),!l&&v&&o.log("loaded namespace ".concat(p," for language ").concat(f),v),i.loaded("".concat(f,"|").concat(p),l,v)})})})}}}])}();wb.type="backend";const{slice:z8,forEach:Q8}=[];function J8(e){return Q8.call(z8.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const Eb=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Z8=(e,t,n)=>{const r=n||{};r.path=r.path||"/";const i=encodeURIComponent(t);let s=`${e}=${i}`;if(r.maxAge>0){const o=r.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(o)}`}if(r.domain){if(!Eb.test(r.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${r.domain}`}if(r.path){if(!Eb.test(r.path))throw new TypeError("option path is invalid");s+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(s+="; HttpOnly"),r.secure&&(s+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s},Sb={create(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=Z8(e,encodeURIComponent(t),i)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let i=n[r];for(;i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(t)===0)return i.substring(t.length,i.length)}return null},remove(e){this.create(e,"",-1)}};var X8={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return Sb.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:i,cookieOptions:s}=t;n&&typeof document<"u"&&Sb.create(n,e,r,i,s)}},e3={name:"querystring",lookup(e){var r;let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:i}=window.location;!window.location.search&&((r=window.location.hash)==null?void 0:r.indexOf("?"))>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const o=i.substring(1).split("&");for(let c=0;c<o.length;c++){const u=o[c].indexOf("=");u>0&&o[c].substring(0,u)===t&&(n=o[c].substring(u+1))}}return n}};let aa=null;const xb=()=>{if(aa!==null)return aa;try{aa=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{aa=!1}return aa};var t3={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&xb())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&xb()&&window.localStorage.setItem(n,e)}};let ca=null;const _b=()=>{if(ca!==null)return ca;try{ca=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{ca=!1}return ca};var n3={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&_b())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&_b()&&window.sessionStorage.setItem(n,e)}},r3={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:i}=navigator;if(n)for(let s=0;s<n.length;s++)t.push(n[s]);r&&t.push(r),i&&t.push(i)}return t.length>0?t:void 0}},i3={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},s3={name:"path",lookup(e){var i;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(i=n[typeof t=="number"?t:0])==null?void 0:i.replace("/",""):void 0}},o3={name:"subdomain",lookup(e){var i,s;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((s=(i=window.location)==null?void 0:i.hostname)==null?void 0:s.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};function a3(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class Cb{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=J8(n,this.options||{},a3()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(X8),this.addDetector(e3),this.addDetector(t3),this.addDetector(n3),this.addDetector(r3),this.addDetector(i3),this.addDetector(s3),this.addDetector(o3)}addDetector(t){return this.detectors[t.name]=t,this}detect(t){t||(t=this.options.order);let n=[];return t.forEach(r=>{if(this.detectors[r]){let i=this.detectors[r].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(n=n.concat(i))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t,n){n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}Cb.type="languageDetector",Wt.use(wb).use(Cb).use(a_).init({fallbackLng:"en",lng:navigator.language&&navigator.language.substring(0,2),interpolation:{escapeValue:!1},backend:{loadPath:"https://translations.piggy.eu/portal-sessions/{{lng}}.json"}});function c3({children:e,config:t,payload:n}){const[r,i]=k.useState("");return k.useEffect(()=>{r||(wt.initialize(t.apiKey,t.host),localStorage.setItem("apiKey",JSON.stringify(t.apiKey)),(async()=>{const s=await so.create(n);i(s.data.data.uuid);const{data:{data:o}}=await qp.get();ob(o)})())},[t,n,r]),r?m.jsx(k.StrictMode,{children:m.jsx(bu,{fallback:ab,children:m.jsxs(k.Suspense,{children:[m.jsx(Em,{...t,sessionUuid:r,children:m.jsx("div",{children:m.jsxs("div",{className:"bg-primary-50 flex h-screen w-screen flex-col",children:[m.jsx("div",{className:"flex h-full overflow-auto",children:e}),r&&m.jsx(Cm,{})]})})}),m.jsx(Tp,{className:"lg:top-14"})]})})}):m.jsx("div",{className:"flex h-screen items-center justify-center text-core-gray-500",children:m.jsx(Xi,{className:"h-[48px] w-[48px]"})})}function u3(e){return m.jsx(c3,{config:e,payload:{type:e.type??ut.PORTAL,api_key:e.apiKey,shop_uuid:e.shopUuid,contact_uuid:e.contactUuid,...e.cameraFacingMode&&{camera_facing_mode:e.cameraFacingMode},...e.amountInCents&&{amount_in_cents:e.amountInCents},...e.allowMultipleGiftcards&&{allow_multiple_giftcards:e.allowMultipleGiftcards},...e.enableRegistration&&{enable_registration:e.enableRegistration},...e.enableEmailIdentification&&{enable_email_identification:e.enableEmailIdentification},...e.enableOnScreenKeyboard&&{enable_on_screen_keyboard:e.enableOnScreenKeyboard},...e.primaryIdentificationMethod&&{primary_identification_method:e.primaryIdentificationMethod}},children:m.jsx(Eh,{children:m.jsx(w0,{})})})}function l3({uuid:e,host:t}){const[n,r]=k.useState(!1);return k.useEffect(()=>{n||(wt.initialize(void 0,t),qp.get().then(i=>{const s=i.data.data;ob(s)}),r(!0))},[t,n]),n?m.jsx(k.StrictMode,{children:m.jsxs(bu,{fallback:ab,children:[m.jsx(Em,{sessionUuid:e,children:m.jsx("div",{className:"bg-primary-50 flex h-screen w-screen",children:m.jsxs("div",{className:"bg-primary-50 flex h-screen w-screen flex-col",children:[m.jsx("div",{className:"flex h-full overflow-auto",children:m.jsx(Eh,{children:m.jsx(w0,{})})}),e&&m.jsx(Cm,{})]})})}),m.jsx(Tp,{className:"lg:top-14"})]})}):m.jsx(m.Fragment,{children:"Initializing..."})}const d3=Object.freeze(Object.defineProperty({__proto__:null,default:e=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},de.createElement("path",{d:"M8 4.75V8.25M16 4.75V8.25M7.75 10.75H16.25M6.75 19.25H17.25C18.3546 19.25 19.25 18.3546 19.25 17.25V8.75C19.25 7.64543 18.3546 6.75 17.25 6.75H6.75C5.64543 6.75 4.75 7.64543 4.75 8.75V17.25C4.75 18.3546 5.64543 19.25 6.75 19.25Z",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),f3=Object.freeze(Object.defineProperty({__proto__:null,default:e=>de.createElement("svg",{height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...e},de.createElement("path",{d:"m21.25 7.5c.3796958 0 .693491.28215388.7431534.64822944l.0068466.10177056v8.5c0 1.7330315-1.3564548 3.1492459-3.0655761 3.2448552l-.1844239.0051448h-12.689l.71933009.7196699c.26626656.2662666.29047261.6829303.07261815.9765418l-.07261815.0841184c-.26626657.2662665-.68293025.2904726-.97654174.0726181l-.08411844-.0726181-2-2-.06339799-.0720275c-.00244939-.0031685-.00487398-.0063571-.00727348-.0095656l.07067147.0815931c-.03705327-.0370533-.06941902-.077019-.09709724-.1191603-.01316484-.0201549-.025545-.0411423-.03690171-.0627516-.00483354-.0091218-.00919014-.0178526-.01336588-.0266478-.01274712-.0267885-.02425172-.0552483-.03400215-.0845099-.00225837-.0069437-.00418282-.0130149-.00602813-.019105-.02092163-.0684786-.0322748-.1419912-.0322748-.2181555 0-.0383922.00288471-.0761107.00844919-.1129505.00180466-.0115676.0038603-.0232773.00619514-.0349422.00494363-.0250031.01111685-.0492994.01844184-.073091.00362656-.0116598.00765847-.0237092.01200456-.0356703.00848426-.0232976.01778613-.0453662.02808241-.0668678.00549219-.0116011.01179514-.0239381.01846187-.0361292.01323523-.0240158.02734042-.0467392.04258121-.0686124.00392129-.0057417.00832657-.0118713.01283554-.0179483.0251194-.0332177.04801831-.0595185.07261815-.0841184l2-2c.29289322-.2928932.76776696-.2928932 1.06066018 0 .26626656.2662666.29047261.6829303.07261815.9765418l-.07261815.0841184-.72033009.7196699h12.69c.9181734 0 1.6711923-.7071103 1.7441988-1.6064728l.0058012-.1435272v-8.5c0-.41421356.3357864-.75.75-.75zm-3.0537883-5.35294824.0841184.07261815 2 2c.0254481.02544812.049076.05271652.0706715.08159313l-.0706715-.08159313c.0370533.03705328.069419.07701901.0970972.1191603.0131649.02015493.025545.04114226.0369017.06275154.0048336.00912187.0091902.01785262.0133659.02664784.0127471.02678853.0242517.0552483.0340022.08450994.0022583.00694369.0041828.01301489.0060281.01910493.0209216.06847868.0322748.14199127.0322748.21815554 0 .03839224-.0028847.07611073-.0084492.11295053-.0014988.0095454-.0031606.01924362-.0050138.02891241-.0051364.02710922-.0117072.05340972-.0196232.07912072-.0036265.0116598-.0076584.02370928-.0120045.03567032-.0084843.02329763-.0177862.04536621-.0280824.06686781-.0054922.01160108-.0117952.02393815-.0184619.03612923-.0132352.02401575-.0273404.04673917-.0425812.06861233-.0039213.00574174-.0083266.01187138-.0128356.0179483-.023778.03144192-.0451015.05615345-.0679264.07938506l-.0046917.00473338-2 2c-.2928932.29289321-.767767.29289321-1.0606602 0-.2662665-.26626657-.2904726-.68293025-.0726181-.97654174l.0726181-.08411844.7183301-.71966991h-12.688c-.9181734 0-1.67119234.70711027-1.7441988 1.60647279l-.0058012.14352721v8.5c0 .4142136-.33578644.75-.75.75-.37969577 0-.69349096-.2821539-.74315338-.6482294l-.00684662-.1017706v-8.5c0-1.73303146 1.35645477-3.14924593 3.06557609-3.24485521l.18442391-.00514479h12.689l-.7193301-.71966991c-.2662665-.26626657-.2904726-.68293025-.0726181-.97654174l.0726181-.08411844c.2662666-.26626656.6829303-.29047261.9765418-.07261815zm-6.1962117 5.85294824c2.209139 0 4 1.790861 4 4s-1.790861 4-4 4-4-1.790861-4-4 1.790861-4 4-4zm0 1.5c-1.3807119 0-2.5 1.1192881-2.5 2.5s1.1192881 2.5 2.5 2.5 2.5-1.1192881 2.5-2.5-1.1192881-2.5-2.5-2.5z",fill:"#212121"}))},Symbol.toStringTag,{value:"Module"})),h3=Object.freeze(Object.defineProperty({__proto__:null,default:e=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},de.createElement("path",{d:"M13.25 8.75L9.75 12L13.25 15.25",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),p3=Object.freeze(Object.defineProperty({__proto__:null,default:e=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},de.createElement("path",{d:"M17.25 6.75L6.75 17.25M6.75 6.75L17.25 17.25",strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),m3=Object.freeze(Object.defineProperty({__proto__:null,default:e=>de.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},de.createElement("path",{d:"M4.7002 4.70016L11.2999 11.2998",stroke:"#000",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"}),de.createElement("path",{d:"M11.2998 4.70016L4.70014 11.2998",stroke:"#000",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),g3=Object.freeze(Object.defineProperty({__proto__:null,default:e=>de.createElement("svg",{width:24,height:24,fill:"none",viewBox:"0 0 24 24",...e},de.createElement("circle",{cx:12,cy:12,r:7.25,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5}),de.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M14.25 8.75H11.375C10.4775 8.75 9.75 9.47754 9.75 10.375V10.375C9.75 11.2725 10.4775 12 11.375 12H12.625C13.5225 12 14.25 12.7275 14.25 13.625V13.625C14.25 14.5225 13.5225 15.25 12.625 15.25H9.75"}),de.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 7.75V8.25"}),de.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 15.75V16.25"}))},Symbol.toStringTag,{value:"Module"})),y3=Object.freeze(Object.defineProperty({__proto__:null,default:e=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},de.createElement("path",{d:"M19.25 19.25H13.75M9 18.25L4.75 19.25L5.75 15L15.0429 5.70711C15.4334 5.31658 16.0666 5.31658 16.4571 5.70711L18.2929 7.54289C18.6834 7.93342 18.6834 8.56658 18.2929 8.95711L9 18.25Z",strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),v3=Object.freeze(Object.defineProperty({__proto__:null,default:e=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},de.createElement("path",{d:"M6.75024 19.2502H17.2502C18.3548 19.2502 19.2502 18.3548 19.2502 17.2502V9.75025L12.0002 4.75024L4.75024 9.75025V17.2502C4.75024 18.3548 5.64568 19.2502 6.75024 19.2502Z",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),de.createElement("path",{d:"M9.74963 15.7493C9.74963 14.6447 10.6451 13.7493 11.7496 13.7493H12.2496C13.3542 13.7493 14.2496 14.6447 14.2496 15.7493V19.2493H9.74963V15.7493Z",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),b3=Object.freeze(Object.defineProperty({__proto__:null,default:e=>de.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},de.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 13V15"}),de.createElement("circle",{cx:12,cy:9,r:.5}),de.createElement("circle",{cx:12,cy:12,r:7.25,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5}))},Symbol.toStringTag,{value:"Module"})),w3=Object.freeze(Object.defineProperty({__proto__:null,default:e=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},de.createElement("path",{d:"M5.5 6.5L12 12.25L18.5 6.5M6.75 18.25H17.25C18.3546 18.25 19.25 17.3546 19.25 16.25V7.75C19.25 6.64543 18.3546 5.75 17.25 5.75H6.75C5.64543 5.75 4.75 6.64543 4.75 7.75V16.25C4.75 17.3546 5.64543 18.25 6.75 18.25Z",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),E3=Object.freeze(Object.defineProperty({__proto__:null,default:e=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},de.createElement("path",{d:"M13.1191 5.61336C13.0508 5.11856 12.6279 4.75 12.1285 4.75H11.8715C11.3721 4.75 10.9492 5.11856 10.8809 5.61336L10.7938 6.24511C10.7382 6.64815 10.4403 6.96897 10.0622 7.11922C10.006 7.14156 9.95021 7.16484 9.89497 7.18905C9.52217 7.3524 9.08438 7.3384 8.75876 7.09419L8.45119 6.86351C8.05307 6.56492 7.49597 6.60451 7.14408 6.9564L6.95641 7.14408C6.60452 7.49597 6.56492 8.05306 6.86351 8.45118L7.09419 8.75876C7.33841 9.08437 7.3524 9.52216 7.18905 9.89497C7.16484 9.95021 7.14156 10.006 7.11922 10.0622C6.96897 10.4403 6.64815 10.7382 6.24511 10.7938L5.61336 10.8809C5.11856 10.9492 4.75 11.372 4.75 11.8715V12.1285C4.75 12.6279 5.11856 13.0508 5.61336 13.1191L6.24511 13.2062C6.64815 13.2618 6.96897 13.5597 7.11922 13.9378C7.14156 13.994 7.16484 14.0498 7.18905 14.105C7.3524 14.4778 7.3384 14.9156 7.09419 15.2412L6.86351 15.5488C6.56492 15.9469 6.60451 16.504 6.9564 16.8559L7.14408 17.0436C7.49597 17.3955 8.05306 17.4351 8.45118 17.1365L8.75876 16.9058C9.08437 16.6616 9.52216 16.6476 9.89496 16.811C9.95021 16.8352 10.006 16.8584 10.0622 16.8808C10.4403 17.031 10.7382 17.3519 10.7938 17.7549L10.8809 18.3866C10.9492 18.8814 11.3721 19.25 11.8715 19.25H12.1285C12.6279 19.25 13.0508 18.8814 13.1191 18.3866L13.2062 17.7549C13.2618 17.3519 13.5597 17.031 13.9378 16.8808C13.994 16.8584 14.0498 16.8352 14.105 16.8109C14.4778 16.6476 14.9156 16.6616 15.2412 16.9058L15.5488 17.1365C15.9469 17.4351 16.504 17.3955 16.8559 17.0436L17.0436 16.8559C17.3955 16.504 17.4351 15.9469 17.1365 15.5488L16.9058 15.2412C16.6616 14.9156 16.6476 14.4778 16.811 14.105C16.8352 14.0498 16.8584 13.994 16.8808 13.9378C17.031 13.5597 17.3519 13.2618 17.7549 13.2062L18.3866 13.1191C18.8814 13.0508 19.25 12.6279 19.25 12.1285V11.8715C19.25 11.3721 18.8814 10.9492 18.3866 10.8809L17.7549 10.7938C17.3519 10.7382 17.031 10.4403 16.8808 10.0622C16.8584 10.006 16.8352 9.95021 16.8109 9.89496C16.6476 9.52216 16.6616 9.08437 16.9058 8.75875L17.1365 8.4512C17.4351 8.05308 17.3955 7.49599 17.0436 7.1441L16.8559 6.95642C16.504 6.60453 15.9469 6.56494 15.5488 6.86353L15.2412 7.09419C14.9156 7.33841 14.4778 7.3524 14.105 7.18905C14.0498 7.16484 13.994 7.14156 13.9378 7.11922C13.5597 6.96897 13.2618 6.64815 13.2062 6.24511L13.1191 5.61336Z",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),de.createElement("path",{d:"M13.25 12C13.25 12.6904 12.6904 13.25 12 13.25C11.3096 13.25 10.75 12.6904 10.75 12C10.75 11.3096 11.3096 10.75 12 10.75C12.6904 10.75 13.25 11.3096 13.25 12Z",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),S3=Object.freeze(Object.defineProperty({__proto__:null,default:e=>de.createElement("svg",{width:24,height:24,fill:"none",viewBox:"0 0 24 24",...e},de.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M18.25 7.75H5.75V16.75L4.75 19.25H19.25L18.25 16.75V7.75Z"}),de.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M18.25 7.75L16.25 4.75H7.75L5.75 7.75"}),de.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M9.75 10.75V11.75C9.75 12.9926 10.7574 14 12 14V14C13.2426 14 14.25 12.9926 14.25 11.75V10.75"}))},Symbol.toStringTag,{value:"Module"})),x3=Object.freeze(Object.defineProperty({__proto__:null,default:e=>de.createElement("svg",{width:24,height:24,fill:"none",viewBox:"0 0 24 24",...e},de.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 4.75L13.75 10.25H19.25L14.75 13.75L16.25 19.25L12 15.75L7.75 19.25L9.25 13.75L4.75 10.25H10.25L12 4.75Z"}))},Symbol.toStringTag,{value:"Module"})),_3=Object.freeze(Object.defineProperty({__proto__:null,default:e=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",...e},de.createElement("path",{d:"M15.25 8C15.25 9.79493 13.7949 11.25 12 11.25C10.205 11.25 8.74997 9.79493 8.74997 8C8.74997 6.20507 10.205 4.75 12 4.75C13.7949 4.75 15.25 6.20507 15.25 8Z"}),de.createElement("path",{d:"M6.84748 19.25H17.1525C18.2944 19.25 19.174 18.2681 18.6407 17.2584C17.8563 15.7731 16.068 14 12 14C7.93198 14 6.14364 15.7731 5.35921 17.2584C4.82594 18.2681 5.70556 19.25 6.84748 19.25Z"}))},Symbol.toStringTag,{value:"Module"}));_t.DefaultSession=l3,_t.ErrorCodes=Ea,_t.EventType=Hr,_t.FacingMode=Hi,_t.PortalRoute=Dt,_t.PortalSession=u3,_t.PortalType=ut,_t.PrimaryIdentificationMethod=oo,_t.SubscriptionStatus=Jp,_t.SubscriptionStrategy=Qr,_t.VoucherStatus=Qi,Object.defineProperty(_t,Symbol.toStringTag,{value:"Module"})});
141
+ */var ib;function MN(){return ib||(ib=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,l=e?Symbol.for("react.suspense_list"):60120,b=e?Symbol.for("react.memo"):60115,a=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function w(M){return typeof M=="string"||typeof M=="function"||M===r||M===d||M===s||M===i||M===h||M===l||typeof M=="object"&&M!==null&&(M.$$typeof===a||M.$$typeof===b||M.$$typeof===o||M.$$typeof===c||M.$$typeof===f||M.$$typeof===y||M.$$typeof===g||M.$$typeof===v||M.$$typeof===p)}function E(M){if(typeof M=="object"&&M!==null){var ee=M.$$typeof;switch(ee){case t:var J=M.type;switch(J){case u:case d:case r:case s:case i:case h:return J;default:var Q=J&&J.$$typeof;switch(Q){case c:case f:case a:case b:case o:return Q;default:return ee}}case n:return ee}}}var S=u,A=d,T=c,O=o,N=t,D=f,U=r,V=a,F=b,q=n,R=s,L=i,W=h,z=!1;function Z(M){return z||(z=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),te(M)||E(M)===u}function te(M){return E(M)===d}function re(M){return E(M)===c}function he(M){return E(M)===o}function ue(M){return typeof M=="object"&&M!==null&&M.$$typeof===t}function ye(M){return E(M)===f}function de(M){return E(M)===r}function $(M){return E(M)===a}function H(M){return E(M)===b}function X(M){return E(M)===n}function C(M){return E(M)===s}function j(M){return E(M)===i}function B(M){return E(M)===h}ht.AsyncMode=S,ht.ConcurrentMode=A,ht.ContextConsumer=T,ht.ContextProvider=O,ht.Element=N,ht.ForwardRef=D,ht.Fragment=U,ht.Lazy=V,ht.Memo=F,ht.Portal=q,ht.Profiler=R,ht.StrictMode=L,ht.Suspense=W,ht.isAsyncMode=Z,ht.isConcurrentMode=te,ht.isContextConsumer=re,ht.isContextProvider=he,ht.isElement=ue,ht.isForwardRef=ye,ht.isFragment=de,ht.isLazy=$,ht.isMemo=H,ht.isPortal=X,ht.isProfiler=C,ht.isStrictMode=j,ht.isSuspense=B,ht.isValidElementType=w,ht.typeOf=E}()),ht}process.env.NODE_ENV==="production"?Hf.exports=NN():Hf.exports=MN();var DN=Hf.exports,sb=DN,PN={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},jN={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},ob={};ob[sb.ForwardRef]=PN,ob[sb.Memo]=jN;const LN=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,ab={componentStack:null,error:null,eventId:null};class wu extends se.Component{constructor(t){super(t),wu.prototype.__init.call(this),this.state=ab,this._openFallbackReportDialog=!0;const n=Je();n&&t.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=n.on("afterSendEvent",r=>{!r.type&&this._lastEventId&&r.event_id===this._lastEventId&&Fv({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,n){const{componentStack:r}=n,i=r??void 0,{beforeCapture:s,onError:o,showDialog:c,dialogOptions:u}=this.props;Pc(d=>{s&&s(d,t,i);const f=RN(t,n,{mechanism:{handled:!!this.props.fallback}});o&&o(t,i,f),c&&(this._lastEventId=f,this._openFallbackReportDialog&&Fv({...u,eventId:f})),this.setState({error:t,componentStack:r,eventId:f})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:n,eventId:r}=this.state,{onUnmount:i}=this.props;i&&i(t,n,r),this._cleanupHook&&(this._cleanupHook(),this._cleanupHook=void 0)}__init(){this.resetErrorBoundary=()=>{const{onReset:t}=this.props,{error:n,componentStack:r,eventId:i}=this.state;t&&t(n,r,i),this.setState(ab)}}render(){const{fallback:t,children:n}=this.props,r=this.state;if(r.error){let i;return typeof t=="function"?i=se.createElement(t,{error:r.error,componentStack:r.componentStack,resetError:this.resetErrorBoundary,eventId:r.eventId}):i=t,se.isValidElement(i)?i:(t&&LN&&Se.warn("fallback did not produce a valid ReactElement"),null)}return typeof n=="function"?n():n}}const BN=new WeakSet;function FN(e){const t=CN({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{useEffect:n,useLocation:r,useNavigationType:i,createRoutesFromChildren:s,matchRoutes:o,stripBasename:c,instrumentPageLoad:u=!0,instrumentNavigation:d=!0}=e;return{...t,setup(){},afterAllSetup(f){t.afterAllSetup(f);const h=Ne&&Ne.location&&Ne.location.pathname;u&&h&&tb(f,{name:h,attributes:{[yr]:"url",[ui]:"pageload",[Qt]:"auto.pageload.react.reactrouter_v6"}}),d&&BN.add(f)}}}IN({dsn:"https://5b16c396f6e8f6e4b0b87455bea7e96b@o80526.ingest.us.sentry.io/4507345428283392",integrations:[FN({useEffect:k.useEffect,useLocation:Yt,useNavigationType:Ow,createRoutesFromChildren:ma,matchRoutes:dh}),fN()],enabled:!0});function cb(){const{t:e}=et(),[t,n]=k.useState(!1);return m.jsx("div",{className:"default-bg-colors flex h-screen items-center justify-center",children:m.jsxs("div",{className:"overflow-hidden rounded-lg border border-gray-300 bg-white shadow-lg",children:[m.jsx("div",{className:"border-b border-gray-200 bg-gray-50 px-6 pb-3 pt-4 shadow",children:m.jsx("h2",{className:"text-3xl",children:"Oops!"})}),m.jsx("p",{className:"mt-4 px-6 text-gray-900",children:e("sorrySomethingWentWrong")}),m.jsx("div",{className:"mt-10 p-6",children:m.jsx(ct,{onClick:()=>{n(!0),window.location.replace("/")},loading:t,label:e("back")})})]})})}function Yf(e){"@babel/helpers - typeof";return Yf=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},Yf(e)}function ub(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":Yf(XMLHttpRequest))==="object"}function UN(e){return!!e&&typeof e.then=="function"}function VN(e){return UN(e)?e:Promise.resolve(e)}function qN(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Wf={exports:{}},Eu={exports:{}},lb;function $N(){return lb||(lb=1,function(e,t){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof Fi<"u"&&Fi,r=function(){function s(){this.fetch=!1,this.DOMException=n.DOMException}return s.prototype=n,new s}();(function(s){(function(o){var c=typeof s<"u"&&s||typeof self<"u"&&self||typeof c<"u"&&c,u={searchParams:"URLSearchParams"in c,iterable:"Symbol"in c&&"iterator"in Symbol,blob:"FileReader"in c&&"Blob"in c&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in c,arrayBuffer:"ArrayBuffer"in c};function d(R){return R&&DataView.prototype.isPrototypeOf(R)}if(u.arrayBuffer)var f=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],h=ArrayBuffer.isView||function(R){return R&&f.indexOf(Object.prototype.toString.call(R))>-1};function l(R){if(typeof R!="string"&&(R=String(R)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(R)||R==="")throw new TypeError('Invalid character in header field name: "'+R+'"');return R.toLowerCase()}function b(R){return typeof R!="string"&&(R=String(R)),R}function a(R){var L={next:function(){var W=R.shift();return{done:W===void 0,value:W}}};return u.iterable&&(L[Symbol.iterator]=function(){return L}),L}function p(R){this.map={},R instanceof p?R.forEach(function(L,W){this.append(W,L)},this):Array.isArray(R)?R.forEach(function(L){this.append(L[0],L[1])},this):R&&Object.getOwnPropertyNames(R).forEach(function(L){this.append(L,R[L])},this)}p.prototype.append=function(R,L){R=l(R),L=b(L);var W=this.map[R];this.map[R]=W?W+", "+L:L},p.prototype.delete=function(R){delete this.map[l(R)]},p.prototype.get=function(R){return R=l(R),this.has(R)?this.map[R]:null},p.prototype.has=function(R){return this.map.hasOwnProperty(l(R))},p.prototype.set=function(R,L){this.map[l(R)]=b(L)},p.prototype.forEach=function(R,L){for(var W in this.map)this.map.hasOwnProperty(W)&&R.call(L,this.map[W],W,this)},p.prototype.keys=function(){var R=[];return this.forEach(function(L,W){R.push(W)}),a(R)},p.prototype.values=function(){var R=[];return this.forEach(function(L){R.push(L)}),a(R)},p.prototype.entries=function(){var R=[];return this.forEach(function(L,W){R.push([W,L])}),a(R)},u.iterable&&(p.prototype[Symbol.iterator]=p.prototype.entries);function y(R){if(R.bodyUsed)return Promise.reject(new TypeError("Already read"));R.bodyUsed=!0}function g(R){return new Promise(function(L,W){R.onload=function(){L(R.result)},R.onerror=function(){W(R.error)}})}function v(R){var L=new FileReader,W=g(L);return L.readAsArrayBuffer(R),W}function w(R){var L=new FileReader,W=g(L);return L.readAsText(R),W}function E(R){for(var L=new Uint8Array(R),W=new Array(L.length),z=0;z<L.length;z++)W[z]=String.fromCharCode(L[z]);return W.join("")}function S(R){if(R.slice)return R.slice(0);var L=new Uint8Array(R.byteLength);return L.set(new Uint8Array(R)),L.buffer}function A(){return this.bodyUsed=!1,this._initBody=function(R){this.bodyUsed=this.bodyUsed,this._bodyInit=R,R?typeof R=="string"?this._bodyText=R:u.blob&&Blob.prototype.isPrototypeOf(R)?this._bodyBlob=R:u.formData&&FormData.prototype.isPrototypeOf(R)?this._bodyFormData=R:u.searchParams&&URLSearchParams.prototype.isPrototypeOf(R)?this._bodyText=R.toString():u.arrayBuffer&&u.blob&&d(R)?(this._bodyArrayBuffer=S(R.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(R)||h(R))?this._bodyArrayBuffer=S(R):this._bodyText=R=Object.prototype.toString.call(R):this._bodyText="",this.headers.get("content-type")||(typeof R=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):u.searchParams&&URLSearchParams.prototype.isPrototypeOf(R)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},u.blob&&(this.blob=function(){var R=y(this);if(R)return R;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var R=y(this);return R||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(v)}),this.text=function(){var R=y(this);if(R)return R;if(this._bodyBlob)return w(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(E(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},u.formData&&(this.formData=function(){return this.text().then(D)}),this.json=function(){return this.text().then(JSON.parse)},this}var T=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function O(R){var L=R.toUpperCase();return T.indexOf(L)>-1?L:R}function N(R,L){if(!(this instanceof N))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');L=L||{};var W=L.body;if(R instanceof N){if(R.bodyUsed)throw new TypeError("Already read");this.url=R.url,this.credentials=R.credentials,L.headers||(this.headers=new p(R.headers)),this.method=R.method,this.mode=R.mode,this.signal=R.signal,!W&&R._bodyInit!=null&&(W=R._bodyInit,R.bodyUsed=!0)}else this.url=String(R);if(this.credentials=L.credentials||this.credentials||"same-origin",(L.headers||!this.headers)&&(this.headers=new p(L.headers)),this.method=O(L.method||this.method||"GET"),this.mode=L.mode||this.mode||null,this.signal=L.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&W)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(W),(this.method==="GET"||this.method==="HEAD")&&(L.cache==="no-store"||L.cache==="no-cache")){var z=/([?&])_=[^&]*/;if(z.test(this.url))this.url=this.url.replace(z,"$1_="+new Date().getTime());else{var Z=/\?/;this.url+=(Z.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}N.prototype.clone=function(){return new N(this,{body:this._bodyInit})};function D(R){var L=new FormData;return R.trim().split("&").forEach(function(W){if(W){var z=W.split("="),Z=z.shift().replace(/\+/g," "),te=z.join("=").replace(/\+/g," ");L.append(decodeURIComponent(Z),decodeURIComponent(te))}}),L}function U(R){var L=new p,W=R.replace(/\r?\n[\t ]+/g," ");return W.split("\r").map(function(z){return z.indexOf(`
142
+ `)===0?z.substr(1,z.length):z}).forEach(function(z){var Z=z.split(":"),te=Z.shift().trim();if(te){var re=Z.join(":").trim();L.append(te,re)}}),L}A.call(N.prototype);function V(R,L){if(!(this instanceof V))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');L||(L={}),this.type="default",this.status=L.status===void 0?200:L.status,this.ok=this.status>=200&&this.status<300,this.statusText=L.statusText===void 0?"":""+L.statusText,this.headers=new p(L.headers),this.url=L.url||"",this._initBody(R)}A.call(V.prototype),V.prototype.clone=function(){return new V(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},V.error=function(){var R=new V(null,{status:0,statusText:""});return R.type="error",R};var F=[301,302,303,307,308];V.redirect=function(R,L){if(F.indexOf(L)===-1)throw new RangeError("Invalid status code");return new V(null,{status:L,headers:{location:R}})},o.DOMException=c.DOMException;try{new o.DOMException}catch{o.DOMException=function(L,W){this.message=L,this.name=W;var z=Error(L);this.stack=z.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function q(R,L){return new Promise(function(W,z){var Z=new N(R,L);if(Z.signal&&Z.signal.aborted)return z(new o.DOMException("Aborted","AbortError"));var te=new XMLHttpRequest;function re(){te.abort()}te.onload=function(){var ue={status:te.status,statusText:te.statusText,headers:U(te.getAllResponseHeaders()||"")};ue.url="responseURL"in te?te.responseURL:ue.headers.get("X-Request-URL");var ye="response"in te?te.response:te.responseText;setTimeout(function(){W(new V(ye,ue))},0)},te.onerror=function(){setTimeout(function(){z(new TypeError("Network request failed"))},0)},te.ontimeout=function(){setTimeout(function(){z(new TypeError("Network request failed"))},0)},te.onabort=function(){setTimeout(function(){z(new o.DOMException("Aborted","AbortError"))},0)};function he(ue){try{return ue===""&&c.location.href?c.location.href:ue}catch{return ue}}te.open(Z.method,he(Z.url),!0),Z.credentials==="include"?te.withCredentials=!0:Z.credentials==="omit"&&(te.withCredentials=!1),"responseType"in te&&(u.blob?te.responseType="blob":u.arrayBuffer&&Z.headers.get("Content-Type")&&Z.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(te.responseType="arraybuffer")),L&&typeof L.headers=="object"&&!(L.headers instanceof p)?Object.getOwnPropertyNames(L.headers).forEach(function(ue){te.setRequestHeader(ue,b(L.headers[ue]))}):Z.headers.forEach(function(ue,ye){te.setRequestHeader(ye,ue)}),Z.signal&&(Z.signal.addEventListener("abort",re),te.onreadystatechange=function(){te.readyState===4&&Z.signal.removeEventListener("abort",re)}),te.send(typeof Z._bodyInit>"u"?null:Z._bodyInit)})}return q.polyfill=!0,c.fetch||(c.fetch=q,c.Headers=p,c.Request=N,c.Response=V),o.Headers=p,o.Request=N,o.Response=V,o.fetch=q,o})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=n.fetch?n:r;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t}(Eu,Eu.exports)),Eu.exports}(function(e,t){var n;if(typeof fetch=="function"&&(typeof Fi<"u"&&Fi.fetch?n=Fi.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof qN<"u"&&typeof window>"u"){var r=n||$N();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(Wf,Wf.exports);var db=Wf.exports;const fb=ju(db),hb=nw({__proto__:null,default:fb},[db]);function pb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function mb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pb(Object(n),!0).forEach(function(r){GN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function GN(e,t,n){return t=HN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HN(e){var t=YN(e,"string");return Bi(t)=="symbol"?t:t+""}function YN(e,t){if(Bi(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Bi(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Bi(e){"@babel/helpers - typeof";return Bi=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},Bi(e)}var jr;typeof fetch=="function"&&(typeof global<"u"&&global.fetch?jr=global.fetch:typeof window<"u"&&window.fetch?jr=window.fetch:jr=fetch);var oa;ub()&&(typeof global<"u"&&global.XMLHttpRequest?oa=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(oa=window.XMLHttpRequest));var Su;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?Su=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(Su=window.ActiveXObject)),!jr&&hb&&!oa&&!Su&&(jr=fb||hb),typeof jr!="function"&&(jr=void 0);var Kf=function(t,n){if(n&&Bi(n)==="object"){var r="";for(var i in n)r+="&"+encodeURIComponent(i)+"="+encodeURIComponent(n[i]);if(!r)return t;t=t+(t.indexOf("?")!==-1?"&":"?")+r.slice(1)}return t},gb=function(t,n,r,i){var s=function(u){if(!u.ok)return r(u.statusText||"Error",{status:u.status});u.text().then(function(d){r(null,{status:u.status,data:d})}).catch(r)};if(i){var o=i(t,n);if(o instanceof Promise){o.then(s).catch(r);return}}typeof fetch=="function"?fetch(t,n).then(s).catch(r):jr(t,n).then(s).catch(r)},yb=!1,WN=function(t,n,r,i){t.queryStringParams&&(n=Kf(n,t.queryStringParams));var s=mb({},typeof t.customHeaders=="function"?t.customHeaders():t.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(s["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(s["Content-Type"]="application/json");var o=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,c=mb({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:s},yb?{}:o),u=typeof t.alternateFetch=="function"&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{gb(n,c,i,u)}catch(d){if(!o||Object.keys(o).length===0||!d.message||d.message.indexOf("not implemented")<0)return i(d);try{Object.keys(o).forEach(function(f){delete c[f]}),gb(n,c,i,u),yb=!0}catch(f){i(f)}}},KN=function(t,n,r,i){r&&Bi(r)==="object"&&(r=Kf("",r).slice(1)),t.queryStringParams&&(n=Kf(n,t.queryStringParams));try{var s;oa?s=new oa:s=new Su("MSXML2.XMLHTTP.3.0"),s.open(r?"POST":"GET",n,1),t.crossDomain||s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.withCredentials=!!t.withCredentials,r&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.overrideMimeType&&s.overrideMimeType("application/json");var o=t.customHeaders;if(o=typeof o=="function"?o():o,o)for(var c in o)s.setRequestHeader(c,o[c]);s.onreadystatechange=function(){s.readyState>3&&i(s.status>=400?s.statusText:null,{status:s.status,data:s.responseText})},s.send(r)}catch(u){console&&console.log(u)}},zN=function(t,n,r,i){if(typeof r=="function"&&(i=r,r=void 0),i=i||function(){},jr&&n.indexOf("file:")!==0)return WN(t,n,r,i);if(ub()||typeof ActiveXObject=="function")return KN(t,n,r,i);i(new Error("No fetch and no xhr implementation found!"))};function Ds(e){"@babel/helpers - typeof";return Ds=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},Ds(e)}function vb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function zf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vb(Object(n),!0).forEach(function(r){bb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function QN(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function JN(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,wb(r.key),r)}}function ZN(e,t,n){return t&&JN(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function bb(e,t,n){return t=wb(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wb(e){var t=XN(e,"string");return Ds(t)=="symbol"?t:t+""}function XN(e,t){if(Ds(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ds(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var e8=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(n){return JSON.parse(n)},stringify:JSON.stringify,parsePayload:function(n,r,i){return bb({},r,i||"")},parseLoadPayload:function(n,r){},request:zN,reloadInterval:typeof window<"u"?!1:60*60*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},Eb=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};QN(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return ZN(e,[{key:"init",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=n,this.options=zf(zf(zf({},e8()),this.options||{}),i),this.allOptions=s,this.services&&this.options.reloadInterval){var o=setInterval(function(){return r.reload()},this.options.reloadInterval);Ds(o)==="object"&&typeof o.unref=="function"&&o.unref()}}},{key:"readMulti",value:function(n,r,i){this._readAny(n,n,r,r,i)}},{key:"read",value:function(n,r,i){this._readAny([n],n,[r],r,i)}},{key:"_readAny",value:function(n,r,i,s,o){var c=this,u=this.options.loadPath;typeof this.options.loadPath=="function"&&(u=this.options.loadPath(n,i)),u=VN(u),u.then(function(d){if(!d)return o(null,{});var f=c.services.interpolator.interpolate(d,{lng:n.join("+"),ns:i.join("+")});c.loadUrl(f,o,r,s)})}},{key:"loadUrl",value:function(n,r,i,s){var o=this,c=typeof i=="string"?[i]:i,u=typeof s=="string"?[s]:s,d=this.options.parseLoadPayload(c,u);this.options.request(this.options,n,d,function(f,h){if(h&&(h.status>=500&&h.status<600||!h.status))return r("failed loading "+n+"; status code: "+h.status,!0);if(h&&h.status>=400&&h.status<500)return r("failed loading "+n+"; status code: "+h.status,!1);if(!h&&f&&f.message&&f.message.indexOf("Failed to fetch")>-1)return r("failed loading "+n+": "+f.message,!0);if(f)return r(f,!1);var l,b;try{typeof h.data=="string"?l=o.options.parse(h.data,i,s):l=h.data}catch{b="failed parsing "+n+" to json"}if(b)return r(b,!1);r(null,l)})}},{key:"create",value:function(n,r,i,s,o){var c=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var u=this.options.parsePayload(r,i,s),d=0,f=[],h=[];n.forEach(function(l){var b=c.options.addPath;typeof c.options.addPath=="function"&&(b=c.options.addPath(l,r));var a=c.services.interpolator.interpolate(b,{lng:l,ns:r});c.options.request(c.options,a,u,function(p,y){d+=1,f.push(p),h.push(y),d===n.length&&typeof o=="function"&&o(f,h)})})}}},{key:"reload",value:function(){var n=this,r=this.services,i=r.backendConnector,s=r.languageUtils,o=r.logger,c=i.language;if(!(c&&c.toLowerCase()==="cimode")){var u=[],d=function(h){var l=s.toResolveHierarchy(h);l.forEach(function(b){u.indexOf(b)<0&&u.push(b)})};d(c),this.allOptions.preload&&this.allOptions.preload.forEach(function(f){return d(f)}),u.forEach(function(f){n.allOptions.ns.forEach(function(h){i.read(f,h,"read",null,null,function(l,b){l&&o.warn("loading namespace ".concat(h," for language ").concat(f," failed"),l),!l&&b&&o.log("loaded namespace ".concat(h," for language ").concat(f),b),i.loaded("".concat(f,"|").concat(h),l,b)})})})}}}])}();Eb.type="backend";const{slice:t8,forEach:n8}=[];function r8(e){return n8.call(t8.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const Sb=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,i8=(e,t,n)=>{const r=n||{};r.path=r.path||"/";const i=encodeURIComponent(t);let s=`${e}=${i}`;if(r.maxAge>0){const o=r.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(o)}`}if(r.domain){if(!Sb.test(r.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${r.domain}`}if(r.path){if(!Sb.test(r.path))throw new TypeError("option path is invalid");s+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(s+="; HttpOnly"),r.secure&&(s+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s},xb={create(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=i8(e,encodeURIComponent(t),i)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let i=n[r];for(;i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(t)===0)return i.substring(t.length,i.length)}return null},remove(e){this.create(e,"",-1)}};var s8={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return xb.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:i,cookieOptions:s}=t;n&&typeof document<"u"&&xb.create(n,e,r,i,s)}},o8={name:"querystring",lookup(e){var r;let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:i}=window.location;!window.location.search&&((r=window.location.hash)==null?void 0:r.indexOf("?"))>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const o=i.substring(1).split("&");for(let c=0;c<o.length;c++){const u=o[c].indexOf("=");u>0&&o[c].substring(0,u)===t&&(n=o[c].substring(u+1))}}return n}};let aa=null;const _b=()=>{if(aa!==null)return aa;try{aa=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{aa=!1}return aa};var a8={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&_b())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&_b()&&window.localStorage.setItem(n,e)}};let ca=null;const Cb=()=>{if(ca!==null)return ca;try{ca=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{ca=!1}return ca};var c8={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&Cb())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&Cb()&&window.sessionStorage.setItem(n,e)}},u8={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:i}=navigator;if(n)for(let s=0;s<n.length;s++)t.push(n[s]);r&&t.push(r),i&&t.push(i)}return t.length>0?t:void 0}},l8={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},d8={name:"path",lookup(e){var i;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(i=n[typeof t=="number"?t:0])==null?void 0:i.replace("/",""):void 0}},f8={name:"subdomain",lookup(e){var i,s;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((s=(i=window.location)==null?void 0:i.hostname)==null?void 0:s.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};function h8(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class Ab{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=r8(n,this.options||{},h8()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(s8),this.addDetector(o8),this.addDetector(a8),this.addDetector(c8),this.addDetector(u8),this.addDetector(l8),this.addDetector(d8),this.addDetector(f8)}addDetector(t){return this.detectors[t.name]=t,this}detect(t){t||(t=this.options.order);let n=[];return t.forEach(r=>{if(this.detectors[r]){let i=this.detectors[r].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(n=n.concat(i))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t,n){n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}Ab.type="languageDetector",Kt.use(Eb).use(Ab).use(Xx).init({fallbackLng:"en",lng:navigator.language&&navigator.language.substring(0,2),interpolation:{escapeValue:!1},backend:{loadPath:"https://translations.piggy.eu/portal-sessions/{{lng}}.json"}});function p8(e){const t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255,i=Math.max(t,n,r),s=Math.min(t,n,r),o=i-s,c=(i+s)/2;let u=0;o!==0&&(u=o/(1-Math.abs(2*c-1)));let d=0;return o!==0&&(i===t?d=((n-r)/o+(n<r?6:0))*60:i===n?d=((r-t)/o+2)*60:d=((t-n)/o+4)*60),{hue:d,saturation:u,lightness:c}}function xu(e,t,n){const r=(1-Math.abs(2*n-1))*t,i=r*(1-Math.abs(e/60%2-1)),s=n-r/2;let o=0,c=0,u=0;return e<60?(o=r,c=i,u=0):e<120?(o=i,c=r,u=0):e<180?(o=0,c=r,u=i):e<240?(o=0,c=i,u=r):e<300?(o=i,c=0,u=r):(o=r,c=0,u=i),o=Math.round((o+s)*255),c=Math.round((c+s)*255),u=Math.round((u+s)*255),`#${o.toString(16).padStart(2,"0")}${c.toString(16).padStart(2,"0")}${u.toString(16).padStart(2,"0")}`}function Tb(e){const{hue:t,saturation:n,lightness:r}=p8(e),i=.04,s=[{key:"50",min:97,max:99},{key:"100",min:92,max:96},{key:"200",min:85,max:91},{key:"300",min:74,max:84},{key:"400",min:58,max:73},{key:"500",min:51,max:61},{key:"600",min:36,max:50},{key:"700",min:29,max:40},{key:"800",min:24,max:33},{key:"900",min:20,max:28},{key:"950",min:0,max:19}],o={},c={},u={},d={};s.forEach(f=>{const h=(f.min+f.max)/2/100;o[f.key]=xu(t,n,h),u[f.key]=xu(0,n,h),d[f.key]=xu(120,n,h),c[f.key]=xu(t,i,h)});for(const f of s)if(r*100>=f.min&&r*100<=f.max){o[f.key]=e;break}return{primaryPalette:o,redPalette:u,greenPalette:d,grayPalette:c}}const Ib=e=>{const t={primary:e.primary_color,secondary:e.secondary_color,tertiary:e.tertiary_color,quaternary:e.quaternary_color},n=document.querySelector(":root");for(const r in t)if(t[r]){const{primaryPalette:i}=Tb(t[r]);for(const s in i)n.style.setProperty(`--${r}-${s}`,i[s])}if(t.primary){const{grayPalette:r,redPalette:i,greenPalette:s}=Tb(t.primary);for(const o in r)n.style.setProperty(`--gray-${o}`,r[o]);for(const o in i)n.style.setProperty(`--red-${o}`,i[o]);for(const o in s)n.style.setProperty(`--green-${o}`,s[o])}};function kb({children:e}){const{sessionUuid:t}=It(),[n,r]=k.useState();return $n({url:`${t}/brand-kit`,onData:i=>r(i)}),k.useEffect(()=>{n&&Ib(n)},[n]),m.jsx(k.StrictMode,{children:m.jsx(wu,{fallback:cb,children:m.jsxs(k.Suspense,{children:[m.jsx("div",{children:m.jsxs("div",{className:"bg-primary-50 flex h-screen w-screen flex-col",children:[m.jsx("div",{className:"flex h-full overflow-auto",children:e}),m.jsx(x2,{})]})}),m.jsx(Tm,{className:"lg:top-14"})]})})})}function m8(e){const t=Hi(),{errorToast:n}=co(),[r,i]=k.useState(""),s=()=>{const c={type:e.type??lt.PORTAL,api_key:e.apiKey,shop_uuid:e.shopUuid,contact_uuid:e.contactUuid};return e.cameraFacingMode&&(c.camera_facing_mode=e.cameraFacingMode),e.amountInCents&&(c.amount_in_cents=e.amountInCents),e.allowMultipleGiftcards&&(c.allow_multiple_giftcards=e.allowMultipleGiftcards),e.enableRegistration&&(c.enable_registration=e.enableRegistration),e.enableEmailIdentification&&(c.enable_email_identification=e.enableEmailIdentification),e.enableOnScreenKeyboard&&(c.enable_on_screen_keyboard=e.enableOnScreenKeyboard),e.primaryIdentificationMethod&&(c.primary_identification_method=e.primaryIdentificationMethod),c},o=()=>{t.post("/",s(),{baseURL:`${e.host}/api/v1/portal-sessions`,headers:{Authorization:`Bearer ${e.apiKey}`}}).then(c=>{i(c.data.data.uuid)}).catch(c=>{n(c)})};return k.useEffect(()=>{localStorage.setItem("apiKey",JSON.stringify(e.apiKey)),sessionStorage.setItem("apiHost",JSON.stringify(e.host)),_t.initialize(e.apiKey,e.host),o()},[]),r?m.jsx(mm,{...e,sessionUuid:r,children:m.jsx(kb,{children:m.jsx(xh,{children:m.jsx(x0,{})})})}):m.jsx(S0,{})}function g8({uuid:e,host:t}){return k.useEffect(()=>{sessionStorage.setItem("apiHost",JSON.stringify(t)),_t.initialize(void 0,t)},[]),m.jsx(k.StrictMode,{children:m.jsxs(wu,{fallback:cb,children:[m.jsx(mm,{sessionUuid:e,children:m.jsx(kb,{children:m.jsx(xh,{children:m.jsx(x0,{})})})}),m.jsx(Tm,{className:"lg:top-14"})]})})}function y8(){const[e,t]=k.useState(),[n,r]=k.useState();return $n({url:"81dfcbb3-48ad-4a10-8942-d63ef4af3915/rewards",onData:t}),$n({url:"81dfcbb3-48ad-4a10-8942-d63ef4af3915/brand-kit",onData:r}),k.useEffect(()=>{n&&Ib(n)},[n]),m.jsx(an,{children:m.jsx(Pt,{children:m.jsx(Tt,{children:m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsx(ct,{label:"Rewards",onClick:()=>console.log(e)}),m.jsx(ct,{label:"Get days between",variant:"secondary",onClick:()=>console.log(Rl(new Date,new Date("2024-10-24 15:02:41")),"days between")})]})})})})}const v8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},se.createElement("path",{d:"M8 4.75V8.25M16 4.75V8.25M7.75 10.75H16.25M6.75 19.25H17.25C18.3546 19.25 19.25 18.3546 19.25 17.25V8.75C19.25 7.64543 18.3546 6.75 17.25 6.75H6.75C5.64543 6.75 4.75 7.64543 4.75 8.75V17.25C4.75 18.3546 5.64543 19.25 6.75 19.25Z",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),b8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...e},se.createElement("path",{d:"m21.25 7.5c.3796958 0 .693491.28215388.7431534.64822944l.0068466.10177056v8.5c0 1.7330315-1.3564548 3.1492459-3.0655761 3.2448552l-.1844239.0051448h-12.689l.71933009.7196699c.26626656.2662666.29047261.6829303.07261815.9765418l-.07261815.0841184c-.26626657.2662665-.68293025.2904726-.97654174.0726181l-.08411844-.0726181-2-2-.06339799-.0720275c-.00244939-.0031685-.00487398-.0063571-.00727348-.0095656l.07067147.0815931c-.03705327-.0370533-.06941902-.077019-.09709724-.1191603-.01316484-.0201549-.025545-.0411423-.03690171-.0627516-.00483354-.0091218-.00919014-.0178526-.01336588-.0266478-.01274712-.0267885-.02425172-.0552483-.03400215-.0845099-.00225837-.0069437-.00418282-.0130149-.00602813-.019105-.02092163-.0684786-.0322748-.1419912-.0322748-.2181555 0-.0383922.00288471-.0761107.00844919-.1129505.00180466-.0115676.0038603-.0232773.00619514-.0349422.00494363-.0250031.01111685-.0492994.01844184-.073091.00362656-.0116598.00765847-.0237092.01200456-.0356703.00848426-.0232976.01778613-.0453662.02808241-.0668678.00549219-.0116011.01179514-.0239381.01846187-.0361292.01323523-.0240158.02734042-.0467392.04258121-.0686124.00392129-.0057417.00832657-.0118713.01283554-.0179483.0251194-.0332177.04801831-.0595185.07261815-.0841184l2-2c.29289322-.2928932.76776696-.2928932 1.06066018 0 .26626656.2662666.29047261.6829303.07261815.9765418l-.07261815.0841184-.72033009.7196699h12.69c.9181734 0 1.6711923-.7071103 1.7441988-1.6064728l.0058012-.1435272v-8.5c0-.41421356.3357864-.75.75-.75zm-3.0537883-5.35294824.0841184.07261815 2 2c.0254481.02544812.049076.05271652.0706715.08159313l-.0706715-.08159313c.0370533.03705328.069419.07701901.0970972.1191603.0131649.02015493.025545.04114226.0369017.06275154.0048336.00912187.0091902.01785262.0133659.02664784.0127471.02678853.0242517.0552483.0340022.08450994.0022583.00694369.0041828.01301489.0060281.01910493.0209216.06847868.0322748.14199127.0322748.21815554 0 .03839224-.0028847.07611073-.0084492.11295053-.0014988.0095454-.0031606.01924362-.0050138.02891241-.0051364.02710922-.0117072.05340972-.0196232.07912072-.0036265.0116598-.0076584.02370928-.0120045.03567032-.0084843.02329763-.0177862.04536621-.0280824.06686781-.0054922.01160108-.0117952.02393815-.0184619.03612923-.0132352.02401575-.0273404.04673917-.0425812.06861233-.0039213.00574174-.0083266.01187138-.0128356.0179483-.023778.03144192-.0451015.05615345-.0679264.07938506l-.0046917.00473338-2 2c-.2928932.29289321-.767767.29289321-1.0606602 0-.2662665-.26626657-.2904726-.68293025-.0726181-.97654174l.0726181-.08411844.7183301-.71966991h-12.688c-.9181734 0-1.67119234.70711027-1.7441988 1.60647279l-.0058012.14352721v8.5c0 .4142136-.33578644.75-.75.75-.37969577 0-.69349096-.2821539-.74315338-.6482294l-.00684662-.1017706v-8.5c0-1.73303146 1.35645477-3.14924593 3.06557609-3.24485521l.18442391-.00514479h12.689l-.7193301-.71966991c-.2662665-.26626657-.2904726-.68293025-.0726181-.97654174l.0726181-.08411844c.2662666-.26626656.6829303-.29047261.9765418-.07261815zm-6.1962117 5.85294824c2.209139 0 4 1.790861 4 4s-1.790861 4-4 4-4-1.790861-4-4 1.790861-4 4-4zm0 1.5c-1.3807119 0-2.5 1.1192881-2.5 2.5s1.1192881 2.5 2.5 2.5 2.5-1.1192881 2.5-2.5-1.1192881-2.5-2.5-2.5z",fill:"#212121"}))},Symbol.toStringTag,{value:"Module"})),w8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},se.createElement("path",{d:"M13.25 8.75L9.75 12L13.25 15.25",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),E8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},se.createElement("path",{d:"M17.25 6.75L6.75 17.25M6.75 6.75L17.25 17.25",strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),S8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},se.createElement("path",{d:"M4.7002 4.70016L11.2999 11.2998",stroke:"#000",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"}),se.createElement("path",{d:"M11.2998 4.70016L4.70014 11.2998",stroke:"#000",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),x8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{width:24,height:24,fill:"none",viewBox:"0 0 24 24",...e},se.createElement("circle",{cx:12,cy:12,r:7.25,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5}),se.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M14.25 8.75H11.375C10.4775 8.75 9.75 9.47754 9.75 10.375V10.375C9.75 11.2725 10.4775 12 11.375 12H12.625C13.5225 12 14.25 12.7275 14.25 13.625V13.625C14.25 14.5225 13.5225 15.25 12.625 15.25H9.75"}),se.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 7.75V8.25"}),se.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 15.75V16.25"}))},Symbol.toStringTag,{value:"Module"})),_8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},se.createElement("path",{d:"M19.25 19.25H13.75M9 18.25L4.75 19.25L5.75 15L15.0429 5.70711C15.4334 5.31658 16.0666 5.31658 16.4571 5.70711L18.2929 7.54289C18.6834 7.93342 18.6834 8.56658 18.2929 8.95711L9 18.25Z",strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),C8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},se.createElement("path",{d:"M6.75024 19.2502H17.2502C18.3548 19.2502 19.2502 18.3548 19.2502 17.2502V9.75025L12.0002 4.75024L4.75024 9.75025V17.2502C4.75024 18.3548 5.64568 19.2502 6.75024 19.2502Z",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),se.createElement("path",{d:"M9.74963 15.7493C9.74963 14.6447 10.6451 13.7493 11.7496 13.7493H12.2496C13.3542 13.7493 14.2496 14.6447 14.2496 15.7493V19.2493H9.74963V15.7493Z",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),A8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},se.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 13V15"}),se.createElement("circle",{cx:12,cy:9,r:.5}),se.createElement("circle",{cx:12,cy:12,r:7.25,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5}))},Symbol.toStringTag,{value:"Module"})),T8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},se.createElement("path",{d:"M5.5 6.5L12 12.25L18.5 6.5M6.75 18.25H17.25C18.3546 18.25 19.25 17.3546 19.25 16.25V7.75C19.25 6.64543 18.3546 5.75 17.25 5.75H6.75C5.64543 5.75 4.75 6.64543 4.75 7.75V16.25C4.75 17.3546 5.64543 18.25 6.75 18.25Z",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),I8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},se.createElement("g",{clipPath:"url(#clip0_17_95)"},se.createElement("rect",{width:32,height:32,rx:4,fill:"#FEF3F2"}),se.createElement("path",{d:"M12.0003 12L20.0003 20M12.0003 20L20.0003 12",stroke:"#E02731",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),se.createElement("defs",null,se.createElement("clipPath",{id:"clip0_17_95"},se.createElement("path",{d:"M0 16C0 7.16344 7.16344 0 16 0V0C24.8366 0 32 7.16344 32 16V16C32 24.8366 24.8366 32 16 32V32C7.16344 32 0 24.8366 0 16V16Z",fill:"white"}))))},Symbol.toStringTag,{value:"Module"})),k8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},se.createElement("g",{clipPath:"url(#clip0_15_20)"},se.createElement("rect",{width:32,height:32,rx:4,fill:"#E7FBF4"}),se.createElement("path",{d:"M10.6668 17.3333L14.6668 20L21.3335 12",stroke:"#039855",strokeWidth:1.6875,strokeLinecap:"round",strokeLinejoin:"round"})),se.createElement("defs",null,se.createElement("clipPath",{id:"clip0_15_20"},se.createElement("path",{d:"M0 16C0 7.16344 7.16344 0 16 0V0C24.8366 0 32 7.16344 32 16V16C32 24.8366 24.8366 32 16 32V32C7.16344 32 0 24.8366 0 16V16Z",fill:"white"}))))},Symbol.toStringTag,{value:"Module"})),O8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},se.createElement("g",{clipPath:"url(#clip0_17_99)"},se.createElement("rect",{width:32,height:32,rx:4,fill:"#FFFAEB"}),se.createElement("path",{d:"M16.0002 17.3333V13.3333M16.0002 20V20.0067M23.0353 19.3333L17.942 10.456C17.0833 8.95867 14.9167 8.95867 14.058 10.456L8.96533 19.3333C8.11266 20.8187 9.18933 22.6667 10.9073 22.6667H21.0933C22.8107 22.6667 23.8873 20.8187 23.0353 19.3333Z",stroke:"#CFAA25",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),se.createElement("defs",null,se.createElement("clipPath",{id:"clip0_17_99"},se.createElement("path",{d:"M0 16C0 7.16344 7.16344 0 16 0C24.8366 0 32 7.16344 32 16C32 24.8366 24.8366 32 16 32C7.16344 32 0 24.8366 0 16Z",fill:"white"}))))},Symbol.toStringTag,{value:"Module"})),R8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},se.createElement("path",{d:"M13.1191 5.61336C13.0508 5.11856 12.6279 4.75 12.1285 4.75H11.8715C11.3721 4.75 10.9492 5.11856 10.8809 5.61336L10.7938 6.24511C10.7382 6.64815 10.4403 6.96897 10.0622 7.11922C10.006 7.14156 9.95021 7.16484 9.89497 7.18905C9.52217 7.3524 9.08438 7.3384 8.75876 7.09419L8.45119 6.86351C8.05307 6.56492 7.49597 6.60451 7.14408 6.9564L6.95641 7.14408C6.60452 7.49597 6.56492 8.05306 6.86351 8.45118L7.09419 8.75876C7.33841 9.08437 7.3524 9.52216 7.18905 9.89497C7.16484 9.95021 7.14156 10.006 7.11922 10.0622C6.96897 10.4403 6.64815 10.7382 6.24511 10.7938L5.61336 10.8809C5.11856 10.9492 4.75 11.372 4.75 11.8715V12.1285C4.75 12.6279 5.11856 13.0508 5.61336 13.1191L6.24511 13.2062C6.64815 13.2618 6.96897 13.5597 7.11922 13.9378C7.14156 13.994 7.16484 14.0498 7.18905 14.105C7.3524 14.4778 7.3384 14.9156 7.09419 15.2412L6.86351 15.5488C6.56492 15.9469 6.60451 16.504 6.9564 16.8559L7.14408 17.0436C7.49597 17.3955 8.05306 17.4351 8.45118 17.1365L8.75876 16.9058C9.08437 16.6616 9.52216 16.6476 9.89496 16.811C9.95021 16.8352 10.006 16.8584 10.0622 16.8808C10.4403 17.031 10.7382 17.3519 10.7938 17.7549L10.8809 18.3866C10.9492 18.8814 11.3721 19.25 11.8715 19.25H12.1285C12.6279 19.25 13.0508 18.8814 13.1191 18.3866L13.2062 17.7549C13.2618 17.3519 13.5597 17.031 13.9378 16.8808C13.994 16.8584 14.0498 16.8352 14.105 16.8109C14.4778 16.6476 14.9156 16.6616 15.2412 16.9058L15.5488 17.1365C15.9469 17.4351 16.504 17.3955 16.8559 17.0436L17.0436 16.8559C17.3955 16.504 17.4351 15.9469 17.1365 15.5488L16.9058 15.2412C16.6616 14.9156 16.6476 14.4778 16.811 14.105C16.8352 14.0498 16.8584 13.994 16.8808 13.9378C17.031 13.5597 17.3519 13.2618 17.7549 13.2062L18.3866 13.1191C18.8814 13.0508 19.25 12.6279 19.25 12.1285V11.8715C19.25 11.3721 18.8814 10.9492 18.3866 10.8809L17.7549 10.7938C17.3519 10.7382 17.031 10.4403 16.8808 10.0622C16.8584 10.006 16.8352 9.95021 16.8109 9.89496C16.6476 9.52216 16.6616 9.08437 16.9058 8.75875L17.1365 8.4512C17.4351 8.05308 17.3955 7.49599 17.0436 7.1441L16.8559 6.95642C16.504 6.60453 15.9469 6.56494 15.5488 6.86353L15.2412 7.09419C14.9156 7.33841 14.4778 7.3524 14.105 7.18905C14.0498 7.16484 13.994 7.14156 13.9378 7.11922C13.5597 6.96897 13.2618 6.64815 13.2062 6.24511L13.1191 5.61336Z",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),se.createElement("path",{d:"M13.25 12C13.25 12.6904 12.6904 13.25 12 13.25C11.3096 13.25 10.75 12.6904 10.75 12C10.75 11.3096 11.3096 10.75 12 10.75C12.6904 10.75 13.25 11.3096 13.25 12Z",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),N8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{width:24,height:24,fill:"none",viewBox:"0 0 24 24",...e},se.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M18.25 7.75H5.75V16.75L4.75 19.25H19.25L18.25 16.75V7.75Z"}),se.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M18.25 7.75L16.25 4.75H7.75L5.75 7.75"}),se.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M9.75 10.75V11.75C9.75 12.9926 10.7574 14 12 14V14C13.2426 14 14.25 12.9926 14.25 11.75V10.75"}))},Symbol.toStringTag,{value:"Module"})),M8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{width:24,height:24,fill:"none",viewBox:"0 0 24 24",...e},se.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 4.75L13.75 10.25H19.25L14.75 13.75L16.25 19.25L12 15.75L7.75 19.25L9.25 13.75L4.75 10.25H10.25L12 4.75Z"}))},Symbol.toStringTag,{value:"Module"})),D8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",...e},se.createElement("path",{d:"M15.25 8C15.25 9.79493 13.7949 11.25 12 11.25C10.205 11.25 8.74997 9.79493 8.74997 8C8.74997 6.20507 10.205 4.75 12 4.75C13.7949 4.75 15.25 6.20507 15.25 8Z"}),se.createElement("path",{d:"M6.84748 19.25H17.1525C18.2944 19.25 19.174 18.2681 18.6407 17.2584C17.8563 15.7731 16.068 14 12 14C7.93198 14 6.14364 15.7731 5.35921 17.2584C4.82594 18.2681 5.70556 19.25 6.84748 19.25Z"}))},Symbol.toStringTag,{value:"Module"}));St.DefaultSession=g8,St.ErrorCodes=Da,St.EventType=Kr,St.FacingMode=Wi,St.PortalRoute=dt,St.PortalSession=m8,St.PortalType=lt,St.PrimaryIdentificationMethod=Xs,St.SubscriptionStatus=Dp,St.SubscriptionStrategy=Wr,St.TestSession=y8,St.VoucherStatus=Yi,Object.defineProperty(St,Symbol.toStringTag,{value:"Module"})});