@leatcom/portal-sessions 0.0.26 → 0.0.28

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(rt,H){typeof exports=="object"&&typeof module<"u"?H(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],H):(rt=typeof globalThis<"u"?globalThis:rt||self,H(rt.PortalSessions={},rt.React,rt.ReactDOM))})(this,function(rt,H,sn){"use strict";var E0=Object.defineProperty;var S0=(rt,H,sn)=>H in rt?E0(rt,H,{enumerable:!0,configurable:!0,writable:!0,value:sn}):rt[H]=sn;var Gu=(rt,H,sn)=>(S0(rt,typeof H!="symbol"?H+"":H,sn),sn);function Ka(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 Xu(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const a=Object.getOwnPropertyDescriptor(r,o);a&&Object.defineProperty(e,o,a.get?a:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const le=Ka(H),Ju=Ka(sn);var _n=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Jo={exports:{}},Jn={};/**
1
+ (function(ot,H){typeof exports=="object"&&typeof module<"u"?H(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],H):(ot=typeof globalThis<"u"?globalThis:ot||self,H(ot.PortalSessions={},ot.React,ot.ReactDOM))})(this,function(ot,H,sn){"use strict";var E0=Object.defineProperty;var S0=(ot,H,sn)=>H in ot?E0(ot,H,{enumerable:!0,configurable:!0,writable:!0,value:sn}):ot[H]=sn;var Gu=(ot,H,sn)=>(S0(ot,typeof H!="symbol"?H+"":H,sn),sn);function Wa(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 Xu(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const a=Object.getOwnPropertyDescriptor(r,o);a&&Object.defineProperty(e,o,a.get?a:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const le=Wa(H),Ju=Wa(sn);var Rn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Jo={exports:{}},Jn={};/**
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 Wa;function Yu(){if(Wa)return Jn;Wa=1;var e=H,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(u,h,g){var f,x={},l=null,y=null;g!==void 0&&(l=""+g),h.key!==void 0&&(l=""+h.key),h.ref!==void 0&&(y=h.ref);for(f in h)r.call(h,f)&&!a.hasOwnProperty(f)&&(x[f]=h[f]);if(u&&u.defaultProps)for(f in h=u.defaultProps,h)x[f]===void 0&&(x[f]=h[f]);return{$$typeof:t,type:u,key:l,ref:y,props:x,_owner:o.current}}return Jn.Fragment=n,Jn.jsx=s,Jn.jsxs=s,Jn}var Yn={};/**
9
+ */var Ga;function Yu(){if(Ga)return Jn;Ga=1;var e=H,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(u,h,g){var f,x={},l=null,y=null;g!==void 0&&(l=""+g),h.key!==void 0&&(l=""+h.key),h.ref!==void 0&&(y=h.ref);for(f in h)r.call(h,f)&&!a.hasOwnProperty(f)&&(x[f]=h[f]);if(u&&u.defaultProps)for(f in h=u.defaultProps,h)x[f]===void 0&&(x[f]=h[f]);return{$$typeof:t,type:u,key:l,ref:y,props:x,_owner:o.current}}return Jn.Fragment=n,Jn.jsx=s,Jn.jsxs=s,Jn}var Yn={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,25 +14,25 @@
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 Ga;function Qu(){return Ga||(Ga=1,process.env.NODE_ENV!=="production"&&function(){var e=H,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),u=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),l=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),i=Symbol.iterator,c="@@iterator";function p(T){if(T===null||typeof T!="object")return null;var se=i&&T[i]||T[c];return typeof se=="function"?se:null}var d=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function m(T){{for(var se=arguments.length,ye=new Array(se>1?se-1:0),xe=1;xe<se;xe++)ye[xe-1]=arguments[xe];v("error",T,ye)}}function v(T,se,ye){{var xe=d.ReactDebugCurrentFrame,Ie=xe.getStackAddendum();Ie!==""&&(se+="%s",ye=ye.concat([Ie]));var Ue=ye.map(function(je){return String(je)});Ue.unshift("Warning: "+se),Function.prototype.apply.call(console[T],console,Ue)}}var b=!1,C=!1,S=!1,k=!1,B=!1,O;O=Symbol.for("react.module.reference");function j(T){return!!(typeof T=="string"||typeof T=="function"||T===r||T===a||B||T===o||T===g||T===f||k||T===y||b||C||S||typeof T=="object"&&T!==null&&(T.$$typeof===l||T.$$typeof===x||T.$$typeof===s||T.$$typeof===u||T.$$typeof===h||T.$$typeof===O||T.getModuleId!==void 0))}function I(T,se,ye){var xe=T.displayName;if(xe)return xe;var Ie=se.displayName||se.name||"";return Ie!==""?ye+"("+Ie+")":ye}function D(T){return T.displayName||"Context"}function M(T){if(T==null)return null;if(typeof T.tag=="number"&&m("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof T=="function")return T.displayName||T.name||null;if(typeof T=="string")return T;switch(T){case r:return"Fragment";case n:return"Portal";case a:return"Profiler";case o:return"StrictMode";case g:return"Suspense";case f:return"SuspenseList"}if(typeof T=="object")switch(T.$$typeof){case u:var se=T;return D(se)+".Consumer";case s:var ye=T;return D(ye._context)+".Provider";case h:return I(T,T.render,"ForwardRef");case x:var xe=T.displayName||null;return xe!==null?xe:M(T.type)||"Memo";case l:{var Ie=T,Ue=Ie._payload,je=Ie._init;try{return M(je(Ue))}catch{return null}}}return null}var $=Object.assign,P=0,L,q,K,Q,Z,ee,ue;function ne(){}ne.__reactDisabledLog=!0;function me(){{if(P===0){L=console.log,q=console.info,K=console.warn,Q=console.error,Z=console.group,ee=console.groupCollapsed,ue=console.groupEnd;var T={configurable:!0,enumerable:!0,value:ne,writable:!0};Object.defineProperties(console,{info:T,log:T,warn:T,error:T,group:T,groupCollapsed:T,groupEnd:T})}P++}}function de(){{if(P--,P===0){var T={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:$({},T,{value:L}),info:$({},T,{value:q}),warn:$({},T,{value:K}),error:$({},T,{value:Q}),group:$({},T,{value:Z}),groupCollapsed:$({},T,{value:ee}),groupEnd:$({},T,{value:ue})})}P<0&&m("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var V=d.ReactCurrentDispatcher,U;function J(T,se,ye){{if(U===void 0)try{throw Error()}catch(Ie){var xe=Ie.stack.trim().match(/\n( *(at )?)/);U=xe&&xe[1]||""}return`
17
+ */var Xa;function Qu(){return Xa||(Xa=1,process.env.NODE_ENV!=="production"&&function(){var e=H,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),u=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),l=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),i=Symbol.iterator,c="@@iterator";function p(T){if(T===null||typeof T!="object")return null;var se=i&&T[i]||T[c];return typeof se=="function"?se:null}var d=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function m(T){{for(var se=arguments.length,ye=new Array(se>1?se-1:0),xe=1;xe<se;xe++)ye[xe-1]=arguments[xe];v("error",T,ye)}}function v(T,se,ye){{var xe=d.ReactDebugCurrentFrame,Ie=xe.getStackAddendum();Ie!==""&&(se+="%s",ye=ye.concat([Ie]));var Ue=ye.map(function(je){return String(je)});Ue.unshift("Warning: "+se),Function.prototype.apply.call(console[T],console,Ue)}}var b=!1,C=!1,S=!1,k=!1,B=!1,O;O=Symbol.for("react.module.reference");function j(T){return!!(typeof T=="string"||typeof T=="function"||T===r||T===a||B||T===o||T===g||T===f||k||T===y||b||C||S||typeof T=="object"&&T!==null&&(T.$$typeof===l||T.$$typeof===x||T.$$typeof===s||T.$$typeof===u||T.$$typeof===h||T.$$typeof===O||T.getModuleId!==void 0))}function I(T,se,ye){var xe=T.displayName;if(xe)return xe;var Ie=se.displayName||se.name||"";return Ie!==""?ye+"("+Ie+")":ye}function D(T){return T.displayName||"Context"}function M(T){if(T==null)return null;if(typeof T.tag=="number"&&m("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof T=="function")return T.displayName||T.name||null;if(typeof T=="string")return T;switch(T){case r:return"Fragment";case n:return"Portal";case a:return"Profiler";case o:return"StrictMode";case g:return"Suspense";case f:return"SuspenseList"}if(typeof T=="object")switch(T.$$typeof){case u:var se=T;return D(se)+".Consumer";case s:var ye=T;return D(ye._context)+".Provider";case h:return I(T,T.render,"ForwardRef");case x:var xe=T.displayName||null;return xe!==null?xe:M(T.type)||"Memo";case l:{var Ie=T,Ue=Ie._payload,je=Ie._init;try{return M(je(Ue))}catch{return null}}}return null}var $=Object.assign,P=0,L,q,K,Q,Z,ee,ue;function ne(){}ne.__reactDisabledLog=!0;function me(){{if(P===0){L=console.log,q=console.info,K=console.warn,Q=console.error,Z=console.group,ee=console.groupCollapsed,ue=console.groupEnd;var T={configurable:!0,enumerable:!0,value:ne,writable:!0};Object.defineProperties(console,{info:T,log:T,warn:T,error:T,group:T,groupCollapsed:T,groupEnd:T})}P++}}function de(){{if(P--,P===0){var T={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:$({},T,{value:L}),info:$({},T,{value:q}),warn:$({},T,{value:K}),error:$({},T,{value:Q}),group:$({},T,{value:Z}),groupCollapsed:$({},T,{value:ee}),groupEnd:$({},T,{value:ue})})}P<0&&m("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var V=d.ReactCurrentDispatcher,U;function J(T,se,ye){{if(U===void 0)try{throw Error()}catch(Ie){var xe=Ie.stack.trim().match(/\n( *(at )?)/);U=xe&&xe[1]||""}return`
18
18
  `+U+T}}var w=!1,_;{var N=typeof WeakMap=="function"?WeakMap:Map;_=new N}function R(T,se){if(!T||w)return"";{var ye=_.get(T);if(ye!==void 0)return ye}var xe;w=!0;var Ie=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Ue;Ue=V.current,V.current=null,me();try{if(se){var je=function(){throw Error()};if(Object.defineProperty(je.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(je,[])}catch(He){xe=He}Reflect.construct(T,[],je)}else{try{je.call()}catch(He){xe=He}T.call(je.prototype)}}else{try{throw Error()}catch(He){xe=He}T()}}catch(He){if(He&&xe&&typeof He.stack=="string"){for(var Be=He.stack.split(`
19
19
  `),st=xe.stack.split(`
20
20
  `),Ge=Be.length-1,Xe=st.length-1;Ge>=1&&Xe>=0&&Be[Ge]!==st[Xe];)Xe--;for(;Ge>=1&&Xe>=0;Ge--,Xe--)if(Be[Ge]!==st[Xe]){if(Ge!==1||Xe!==1)do if(Ge--,Xe--,Xe<0||Be[Ge]!==st[Xe]){var Oe=`
21
- `+Be[Ge].replace(" at new "," at ");return T.displayName&&Oe.includes("<anonymous>")&&(Oe=Oe.replace("<anonymous>",T.displayName)),typeof T=="function"&&_.set(T,Oe),Oe}while(Ge>=1&&Xe>=0);break}}}finally{w=!1,V.current=Ue,de(),Error.prepareStackTrace=Ie}var nt=T?T.displayName||T.name:"",lt=nt?J(nt):"";return typeof T=="function"&&_.set(T,lt),lt}function W(T,se,ye){return R(T,!1)}function G(T){var se=T.prototype;return!!(se&&se.isReactComponent)}function X(T,se,ye){if(T==null)return"";if(typeof T=="function")return R(T,G(T));if(typeof T=="string")return J(T);switch(T){case g:return J("Suspense");case f:return J("SuspenseList")}if(typeof T=="object")switch(T.$$typeof){case h:return W(T.render);case x:return X(T.type,se,ye);case l:{var xe=T,Ie=xe._payload,Ue=xe._init;try{return X(Ue(Ie),se,ye)}catch{}}}return""}var F=Object.prototype.hasOwnProperty,ce={},fe=d.ReactDebugCurrentFrame;function re(T){if(T){var se=T._owner,ye=X(T.type,T._source,se?se.type:null);fe.setExtraStackFrame(ye)}else fe.setExtraStackFrame(null)}function oe(T,se,ye,xe,Ie){{var Ue=Function.call.bind(F);for(var je in T)if(Ue(T,je)){var Be=void 0;try{if(typeof T[je]!="function"){var st=Error((xe||"React class")+": "+ye+" type `"+je+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof T[je]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw st.name="Invariant Violation",st}Be=T[je](se,je,xe,ye,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ge){Be=Ge}Be&&!(Be instanceof Error)&&(re(Ie),m("%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).",xe||"React class",ye,je,typeof Be),re(null)),Be instanceof Error&&!(Be.message in ce)&&(ce[Be.message]=!0,re(Ie),m("Failed %s type: %s",ye,Be.message),re(null))}}}var ge=Array.isArray;function ae(T){return ge(T)}function be(T){{var se=typeof Symbol=="function"&&Symbol.toStringTag,ye=se&&T[Symbol.toStringTag]||T.constructor.name||"Object";return ye}}function Ce(T){try{return Fe(T),!1}catch{return!0}}function Fe(T){return""+T}function Ae(T){if(Ce(T))return m("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",be(T)),Fe(T)}var Ve=d.ReactCurrentOwner,ze={key:!0,ref:!0,__self:!0,__source:!0},bt,Ke,et;et={};function We(T){if(F.call(T,"ref")){var se=Object.getOwnPropertyDescriptor(T,"ref").get;if(se&&se.isReactWarning)return!1}return T.ref!==void 0}function Ee(T){if(F.call(T,"key")){var se=Object.getOwnPropertyDescriptor(T,"key").get;if(se&&se.isReactWarning)return!1}return T.key!==void 0}function Lt(T,se){if(typeof T.ref=="string"&&Ve.current&&se&&Ve.current.stateNode!==se){var ye=M(Ve.current.type);et[ye]||(m('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',M(Ve.current.type),T.ref),et[ye]=!0)}}function ut(T,se){{var ye=function(){bt||(bt=!0,m("%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)",se))};ye.isReactWarning=!0,Object.defineProperty(T,"key",{get:ye,configurable:!0})}}function mt(T,se){{var ye=function(){Ke||(Ke=!0,m("%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)",se))};ye.isReactWarning=!0,Object.defineProperty(T,"ref",{get:ye,configurable:!0})}}var ht=function(T,se,ye,xe,Ie,Ue,je){var Be={$$typeof:t,type:T,key:se,ref:ye,props:je,_owner:Ue};return Be._store={},Object.defineProperty(Be._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Be,"_self",{configurable:!1,enumerable:!1,writable:!1,value:xe}),Object.defineProperty(Be,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ie}),Object.freeze&&(Object.freeze(Be.props),Object.freeze(Be)),Be};function Wt(T,se,ye,xe,Ie){{var Ue,je={},Be=null,st=null;ye!==void 0&&(Ae(ye),Be=""+ye),Ee(se)&&(Ae(se.key),Be=""+se.key),We(se)&&(st=se.ref,Lt(se,Ie));for(Ue in se)F.call(se,Ue)&&!ze.hasOwnProperty(Ue)&&(je[Ue]=se[Ue]);if(T&&T.defaultProps){var Ge=T.defaultProps;for(Ue in Ge)je[Ue]===void 0&&(je[Ue]=Ge[Ue])}if(Be||st){var Xe=typeof T=="function"?T.displayName||T.name||"Unknown":T;Be&&ut(je,Xe),st&&mt(je,Xe)}return ht(T,Be,st,Ie,xe,Ve.current,je)}}var gt=d.ReactCurrentOwner,Bt=d.ReactDebugCurrentFrame;function yt(T){if(T){var se=T._owner,ye=X(T.type,T._source,se?se.type:null);Bt.setExtraStackFrame(ye)}else Bt.setExtraStackFrame(null)}var wt;wt=!1;function on(T){return typeof T=="object"&&T!==null&&T.$$typeof===t}function On(){{if(gt.current){var T=M(gt.current.type);if(T)return`
21
+ `+Be[Ge].replace(" at new "," at ");return T.displayName&&Oe.includes("<anonymous>")&&(Oe=Oe.replace("<anonymous>",T.displayName)),typeof T=="function"&&_.set(T,Oe),Oe}while(Ge>=1&&Xe>=0);break}}}finally{w=!1,V.current=Ue,de(),Error.prepareStackTrace=Ie}var rt=T?T.displayName||T.name:"",lt=rt?J(rt):"";return typeof T=="function"&&_.set(T,lt),lt}function W(T,se,ye){return R(T,!1)}function G(T){var se=T.prototype;return!!(se&&se.isReactComponent)}function X(T,se,ye){if(T==null)return"";if(typeof T=="function")return R(T,G(T));if(typeof T=="string")return J(T);switch(T){case g:return J("Suspense");case f:return J("SuspenseList")}if(typeof T=="object")switch(T.$$typeof){case h:return W(T.render);case x:return X(T.type,se,ye);case l:{var xe=T,Ie=xe._payload,Ue=xe._init;try{return X(Ue(Ie),se,ye)}catch{}}}return""}var F=Object.prototype.hasOwnProperty,ce={},fe=d.ReactDebugCurrentFrame;function re(T){if(T){var se=T._owner,ye=X(T.type,T._source,se?se.type:null);fe.setExtraStackFrame(ye)}else fe.setExtraStackFrame(null)}function oe(T,se,ye,xe,Ie){{var Ue=Function.call.bind(F);for(var je in T)if(Ue(T,je)){var Be=void 0;try{if(typeof T[je]!="function"){var st=Error((xe||"React class")+": "+ye+" type `"+je+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof T[je]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw st.name="Invariant Violation",st}Be=T[je](se,je,xe,ye,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ge){Be=Ge}Be&&!(Be instanceof Error)&&(re(Ie),m("%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).",xe||"React class",ye,je,typeof Be),re(null)),Be instanceof Error&&!(Be.message in ce)&&(ce[Be.message]=!0,re(Ie),m("Failed %s type: %s",ye,Be.message),re(null))}}}var ge=Array.isArray;function ae(T){return ge(T)}function be(T){{var se=typeof Symbol=="function"&&Symbol.toStringTag,ye=se&&T[Symbol.toStringTag]||T.constructor.name||"Object";return ye}}function Ce(T){try{return Fe(T),!1}catch{return!0}}function Fe(T){return""+T}function Ae(T){if(Ce(T))return m("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",be(T)),Fe(T)}var Ve=d.ReactCurrentOwner,ze={key:!0,ref:!0,__self:!0,__source:!0},bt,Ke,et;et={};function We(T){if(F.call(T,"ref")){var se=Object.getOwnPropertyDescriptor(T,"ref").get;if(se&&se.isReactWarning)return!1}return T.ref!==void 0}function Ee(T){if(F.call(T,"key")){var se=Object.getOwnPropertyDescriptor(T,"key").get;if(se&&se.isReactWarning)return!1}return T.key!==void 0}function Lt(T,se){if(typeof T.ref=="string"&&Ve.current&&se&&Ve.current.stateNode!==se){var ye=M(Ve.current.type);et[ye]||(m('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',M(Ve.current.type),T.ref),et[ye]=!0)}}function ut(T,se){{var ye=function(){bt||(bt=!0,m("%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)",se))};ye.isReactWarning=!0,Object.defineProperty(T,"key",{get:ye,configurable:!0})}}function mt(T,se){{var ye=function(){Ke||(Ke=!0,m("%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)",se))};ye.isReactWarning=!0,Object.defineProperty(T,"ref",{get:ye,configurable:!0})}}var ht=function(T,se,ye,xe,Ie,Ue,je){var Be={$$typeof:t,type:T,key:se,ref:ye,props:je,_owner:Ue};return Be._store={},Object.defineProperty(Be._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Be,"_self",{configurable:!1,enumerable:!1,writable:!1,value:xe}),Object.defineProperty(Be,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ie}),Object.freeze&&(Object.freeze(Be.props),Object.freeze(Be)),Be};function Wt(T,se,ye,xe,Ie){{var Ue,je={},Be=null,st=null;ye!==void 0&&(Ae(ye),Be=""+ye),Ee(se)&&(Ae(se.key),Be=""+se.key),We(se)&&(st=se.ref,Lt(se,Ie));for(Ue in se)F.call(se,Ue)&&!ze.hasOwnProperty(Ue)&&(je[Ue]=se[Ue]);if(T&&T.defaultProps){var Ge=T.defaultProps;for(Ue in Ge)je[Ue]===void 0&&(je[Ue]=Ge[Ue])}if(Be||st){var Xe=typeof T=="function"?T.displayName||T.name||"Unknown":T;Be&&ut(je,Xe),st&&mt(je,Xe)}return ht(T,Be,st,Ie,xe,Ve.current,je)}}var gt=d.ReactCurrentOwner,Bt=d.ReactDebugCurrentFrame;function yt(T){if(T){var se=T._owner,ye=X(T.type,T._source,se?se.type:null);Bt.setExtraStackFrame(ye)}else Bt.setExtraStackFrame(null)}var wt;wt=!1;function on(T){return typeof T=="object"&&T!==null&&T.$$typeof===t}function _n(){{if(gt.current){var T=M(gt.current.type);if(T)return`
22
22
 
23
- Check the render method of \``+T+"`."}return""}}function A(T){return""}var z={};function Y(T){{var se=On();if(!se){var ye=typeof T=="string"?T:T.displayName||T.name;ye&&(se=`
23
+ Check the render method of \``+T+"`."}return""}}function A(T){return""}var z={};function Y(T){{var se=_n();if(!se){var ye=typeof T=="string"?T:T.displayName||T.name;ye&&(se=`
24
24
 
25
- Check the top-level render call using <`+ye+">.")}return se}}function ie(T,se){{if(!T._store||T._store.validated||T.key!=null)return;T._store.validated=!0;var ye=Y(se);if(z[ye])return;z[ye]=!0;var xe="";T&&T._owner&&T._owner!==gt.current&&(xe=" It was passed a child from "+M(T._owner.type)+"."),yt(T),m('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ye,xe),yt(null)}}function he(T,se){{if(typeof T!="object")return;if(ae(T))for(var ye=0;ye<T.length;ye++){var xe=T[ye];on(xe)&&ie(xe,se)}else if(on(T))T._store&&(T._store.validated=!0);else if(T){var Ie=p(T);if(typeof Ie=="function"&&Ie!==T.entries)for(var Ue=Ie.call(T),je;!(je=Ue.next()).done;)on(je.value)&&ie(je.value,se)}}}function Pe(T){{var se=T.type;if(se==null||typeof se=="string")return;var ye;if(typeof se=="function")ye=se.propTypes;else if(typeof se=="object"&&(se.$$typeof===h||se.$$typeof===x))ye=se.propTypes;else return;if(ye){var xe=M(se);oe(ye,T.props,"prop",xe,T)}else if(se.PropTypes!==void 0&&!wt){wt=!0;var Ie=M(se);m("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ie||"Unknown")}typeof se.getDefaultProps=="function"&&!se.getDefaultProps.isReactClassApproved&&m("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function we(T){{for(var se=Object.keys(T.props),ye=0;ye<se.length;ye++){var xe=se[ye];if(xe!=="children"&&xe!=="key"){yt(T),m("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",xe),yt(null);break}}T.ref!==null&&(yt(T),m("Invalid attribute `ref` supplied to `React.Fragment`."),yt(null))}}var ve={};function Re(T,se,ye,xe,Ie,Ue){{var je=j(T);if(!je){var Be="";(T===void 0||typeof T=="object"&&T!==null&&Object.keys(T).length===0)&&(Be+=" 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 st=A();st?Be+=st:Be+=On();var Ge;T===null?Ge="null":ae(T)?Ge="array":T!==void 0&&T.$$typeof===t?(Ge="<"+(M(T.type)||"Unknown")+" />",Be=" Did you accidentally export a JSX literal instead of a component?"):Ge=typeof T,m("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ge,Be)}var Xe=Wt(T,se,ye,Ie,Ue);if(Xe==null)return Xe;if(je){var Oe=se.children;if(Oe!==void 0)if(xe)if(ae(Oe)){for(var nt=0;nt<Oe.length;nt++)he(Oe[nt],T);Object.freeze&&Object.freeze(Oe)}else m("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 he(Oe,T)}if(F.call(se,"key")){var lt=M(T),He=Object.keys(se).filter(function(qa){return qa!=="key"}),an=He.length>0?"{key: someKey, "+He.join(": ..., ")+": ...}":"{key: someKey}";if(!ve[lt+an]){var Go=He.length>0?"{"+He.join(": ..., ")+": ...}":"{}";m(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+ye+">.")}return se}}function ie(T,se){{if(!T._store||T._store.validated||T.key!=null)return;T._store.validated=!0;var ye=Y(se);if(z[ye])return;z[ye]=!0;var xe="";T&&T._owner&&T._owner!==gt.current&&(xe=" It was passed a child from "+M(T._owner.type)+"."),yt(T),m('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ye,xe),yt(null)}}function he(T,se){{if(typeof T!="object")return;if(ae(T))for(var ye=0;ye<T.length;ye++){var xe=T[ye];on(xe)&&ie(xe,se)}else if(on(T))T._store&&(T._store.validated=!0);else if(T){var Ie=p(T);if(typeof Ie=="function"&&Ie!==T.entries)for(var Ue=Ie.call(T),je;!(je=Ue.next()).done;)on(je.value)&&ie(je.value,se)}}}function Pe(T){{var se=T.type;if(se==null||typeof se=="string")return;var ye;if(typeof se=="function")ye=se.propTypes;else if(typeof se=="object"&&(se.$$typeof===h||se.$$typeof===x))ye=se.propTypes;else return;if(ye){var xe=M(se);oe(ye,T.props,"prop",xe,T)}else if(se.PropTypes!==void 0&&!wt){wt=!0;var Ie=M(se);m("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ie||"Unknown")}typeof se.getDefaultProps=="function"&&!se.getDefaultProps.isReactClassApproved&&m("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function we(T){{for(var se=Object.keys(T.props),ye=0;ye<se.length;ye++){var xe=se[ye];if(xe!=="children"&&xe!=="key"){yt(T),m("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",xe),yt(null);break}}T.ref!==null&&(yt(T),m("Invalid attribute `ref` supplied to `React.Fragment`."),yt(null))}}var ve={};function Re(T,se,ye,xe,Ie,Ue){{var je=j(T);if(!je){var Be="";(T===void 0||typeof T=="object"&&T!==null&&Object.keys(T).length===0)&&(Be+=" 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 st=A();st?Be+=st:Be+=_n();var Ge;T===null?Ge="null":ae(T)?Ge="array":T!==void 0&&T.$$typeof===t?(Ge="<"+(M(T.type)||"Unknown")+" />",Be=" Did you accidentally export a JSX literal instead of a component?"):Ge=typeof T,m("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ge,Be)}var Xe=Wt(T,se,ye,Ie,Ue);if(Xe==null)return Xe;if(je){var Oe=se.children;if(Oe!==void 0)if(xe)if(ae(Oe)){for(var rt=0;rt<Oe.length;rt++)he(Oe[rt],T);Object.freeze&&Object.freeze(Oe)}else m("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 he(Oe,T)}if(F.call(se,"key")){var lt=M(T),He=Object.keys(se).filter(function(Ka){return Ka!=="key"}),an=He.length>0?"{key: someKey, "+He.join(": ..., ")+": ...}":"{key: someKey}";if(!ve[lt+an]){var Go=He.length>0?"{"+He.join(": ..., ")+": ...}":"{}";m(`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} />`,an,lt,Go,lt),ve[lt+an]=!0}}return T===r?we(Xe):Pe(Xe),Xe}}function _e(T,se,ye){return Re(T,se,ye,!0)}function dt(T,se,ye){return Re(T,se,ye,!1)}var ft=dt,Se=_e;Yn.Fragment=r,Yn.jsx=ft,Yn.jsxs=Se}()),Yn}process.env.NODE_ENV==="production"?Jo.exports=Yu():Jo.exports=Qu();var E=Jo.exports,Rn=(e=>(e.REDEEM_GIFTCARD="REDEEM_GIFTCARD",e.TOP_UP_GIFTCARD="TOP_UP_GIFTCARD",e.PORTAL="PORTAL",e.PREPAID="PREPAID",e.SAVE="SAVE",e.VOUCHER="VOUCHER",e))(Rn||{}),Zt=(e=>(e.REDEEM_GIFTCARD="/redeem_giftcard",e.TOP_UP_GIFTCARD="/top_up_giftcard",e.PORTAL="/portal",e.PREPAID="/prepaid",e.SAVE="/save",e.VOUCHER="/voucher",e))(Zt||{});const Zu={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 qr{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||Zu,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,o){return o&&!this.debug?null:(typeof t[0]=="string"&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new qr(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new qr(this.logger,t)}}var Gt=new qr;class Kr{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+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),o=1;o<n;o++)r[o-1]=arguments[o];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(s=>{let[u,h]=s;for(let g=0;g<h;g++)u(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(s=>{let[u,h]=s;for(let g=0;g<h;g++)u.apply(u,[t,...r])})}}function Qn(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function Xa(e){return e==null?"":""+e}function ed(e,t,n){e.forEach(r=>{t[r]&&(n[r]=t[r])})}const td=/###/g;function Zn(e,t,n){function r(u){return u&&u.indexOf("###")>-1?u.replace(td,"."):u}function o(){return!e||typeof e=="string"}const a=typeof t!="string"?t:t.split(".");let s=0;for(;s<a.length-1;){if(o())return{};const u=r(a[s]);!e[u]&&n&&(e[u]=new n),Object.prototype.hasOwnProperty.call(e,u)?e=e[u]:e={},++s}return o()?{}:{obj:e,k:r(a[s])}}function Ja(e,t,n){const{obj:r,k:o}=Zn(e,t,Object);if(r!==void 0||t.length===1){r[o]=n;return}let a=t[t.length-1],s=t.slice(0,t.length-1),u=Zn(e,s,Object);for(;u.obj===void 0&&s.length;)a=`${s[s.length-1]}.${a}`,s=s.slice(0,s.length-1),u=Zn(e,s,Object),u&&u.obj&&typeof u.obj[`${u.k}.${a}`]<"u"&&(u.obj=void 0);u.obj[`${u.k}.${a}`]=n}function nd(e,t,n,r){const{obj:o,k:a}=Zn(e,t,Object);o[a]=o[a]||[],o[a].push(n)}function Wr(e,t){const{obj:n,k:r}=Zn(e,t);if(n)return n[r]}function rd(e,t,n){const r=Wr(e,n);return r!==void 0?r:Wr(t,n)}function Ya(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]):Ya(e[r],t[r],n):e[r]=t[r]);return e}function Tn(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var od={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function id(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>od[t]):e}class ad{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 sd=[" ",",","?","!",";"],ld=new ad(20);function cd(e,t,n){t=t||"",n=n||"";const r=sd.filter(s=>t.indexOf(s)<0&&n.indexOf(s)<0);if(r.length===0)return!0;const o=ld.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let a=!o.test(e);if(!a){const s=e.indexOf(n);s>0&&!o.test(e.substring(0,s))&&(a=!0)}return a}function Yo(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 o=e;for(let a=0;a<r.length;){if(!o||typeof o!="object")return;let s,u="";for(let h=a;h<r.length;++h)if(h!==a&&(u+=n),u+=r[h],s=o[u],s!==void 0){if(["string","number","boolean"].indexOf(typeof s)>-1&&h<r.length-1)continue;a+=h-a+1;break}o=s}return o}function Gr(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}class Qa extends Kr{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 o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,s=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let u;t.indexOf(".")>-1?u=t.split("."):(u=[t,n],r&&(Array.isArray(r)?u.push(...r):typeof r=="string"&&a?u.push(...r.split(a)):u.push(r)));const h=Wr(this.data,u);return!h&&!n&&!r&&t.indexOf(".")>-1&&(t=u[0],n=u[1],r=u.slice(2).join(".")),h||!s||typeof r!="string"?h:Yo(this.data&&this.data[t]&&this.data[t][n],r,a)}addResource(t,n,r,o){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let u=[t,n];r&&(u=u.concat(s?r.split(s):r)),t.indexOf(".")>-1&&(u=t.split("."),o=n,n=u[1]),this.addNamespaces(n),Ja(this.data,u,o),a.silent||this.emit("added",t,n,r,o)}addResources(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in r)(typeof r[a]=="string"||Array.isArray(r[a]))&&this.addResource(t,n,a,r[a],{silent:!0});o.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,o,a){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},u=[t,n];t.indexOf(".")>-1&&(u=t.split("."),o=r,r=n,n=u[1]),this.addNamespaces(n);let h=Wr(this.data,u)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?Ya(h,r,a):h={...h,...r},Ja(this.data,u,h),s.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(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var Za={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(a=>{this.processors[a]&&(t=this.processors[a].process(t,n,r,o))}),t}};const es={};class Xr extends Kr{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),ed(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Gt.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 o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let a=n.ns||this.options.defaultNS||[];const s=r&&t.indexOf(r)>-1,u=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!cd(t,r,o);if(s&&!u){const h=t.match(this.interpolator.nestingRegexp);if(h&&h.length>0)return{key:t,namespaces:a};const g=t.split(r);(r!==o||r===o&&this.options.ns.indexOf(g[0])>-1)&&(a=g.shift()),t=g.join(o)}return typeof a=="string"&&(a=[a]),{key:t,namespaces:a}}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 o=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:s,namespaces:u}=this.extractFromKey(t[t.length-1],n),h=u[u.length-1],g=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(g&&g.toLowerCase()==="cimode"){if(f){const b=n.nsSeparator||this.options.nsSeparator;return o?{res:`${h}${b}${s}`,usedKey:s,exactUsedKey:s,usedLng:g,usedNS:h,usedParams:this.getUsedParamsDetails(n)}:`${h}${b}${s}`}return o?{res:s,usedKey:s,exactUsedKey:s,usedLng:g,usedNS:h,usedParams:this.getUsedParamsDetails(n)}:s}const x=this.resolve(t,n);let l=x&&x.res;const y=x&&x.usedKey||s,i=x&&x.exactUsedKey||s,c=Object.prototype.toString.apply(l),p=["[object Number]","[object Function]","[object RegExp]"],d=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,m=!this.i18nFormat||this.i18nFormat.handleAsObject;if(m&&l&&(typeof l!="string"&&typeof l!="boolean"&&typeof l!="number")&&p.indexOf(c)<0&&!(typeof d=="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 b=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,l,{...n,ns:u}):`key '${s} (${this.language})' returned an object instead of string.`;return o?(x.res=b,x.usedParams=this.getUsedParamsDetails(n),x):b}if(a){const b=Array.isArray(l),C=b?[]:{},S=b?i:y;for(const k in l)if(Object.prototype.hasOwnProperty.call(l,k)){const B=`${S}${a}${k}`;C[k]=this.translate(B,{...n,joinArrays:!1,ns:u}),C[k]===B&&(C[k]=l[k])}l=C}}else if(m&&typeof d=="string"&&Array.isArray(l))l=l.join(d),l&&(l=this.extendTranslation(l,t,n,r));else{let b=!1,C=!1;const S=n.count!==void 0&&typeof n.count!="string",k=Xr.hasDefaultValue(n),B=S?this.pluralResolver.getSuffix(g,n.count,n):"",O=n.ordinal&&S?this.pluralResolver.getSuffix(g,n.count,{ordinal:!1}):"",j=S&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),I=j&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${B}`]||n[`defaultValue${O}`]||n.defaultValue;!this.isValidLookup(l)&&k&&(b=!0,l=I),this.isValidLookup(l)||(C=!0,l=s);const M=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:l,$=k&&I!==l&&this.options.updateMissing;if(C||b||$){if(this.logger.log($?"updateKey":"missingKey",g,h,s,$?I:l),a){const K=this.resolve(s,{...n,keySeparator:!1});K&&K.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 P=[];const L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&L&&L[0])for(let K=0;K<L.length;K++)P.push(L[K]);else this.options.saveMissingTo==="all"?P=this.languageUtils.toResolveHierarchy(n.lng||this.language):P.push(n.lng||this.language);const q=(K,Q,Z)=>{const ee=k&&Z!==l?Z:M;this.options.missingKeyHandler?this.options.missingKeyHandler(K,h,Q,ee,$,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(K,h,Q,ee,$,n),this.emit("missingKey",K,h,Q,l)};this.options.saveMissing&&(this.options.saveMissingPlurals&&S?P.forEach(K=>{const Q=this.pluralResolver.getSuffixes(K,n);j&&n[`defaultValue${this.options.pluralSeparator}zero`]&&Q.indexOf(`${this.options.pluralSeparator}zero`)<0&&Q.push(`${this.options.pluralSeparator}zero`),Q.forEach(Z=>{q([K],s+Z,n[`defaultValue${Z}`]||I)})}):q(P,s,I))}l=this.extendTranslation(l,t,n,x,r),C&&l===s&&this.options.appendNamespaceToMissingKey&&(l=`${h}:${s}`),(C||b)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?l=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${h}:${s}`:s,b?l:void 0):l=this.options.parseMissingKeyHandler(l))}return o?(x.res=l,x.usedParams=this.getUsedParamsDetails(n),x):l}extendTranslation(t,n,r,o,a){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const g=typeof t=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(g){const l=t.match(this.interpolator.nestingRegexp);f=l&&l.length}let x=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(x={...this.options.interpolation.defaultVariables,...x}),t=this.interpolator.interpolate(t,x,r.lng||this.language,r),g){const l=t.match(this.interpolator.nestingRegexp),y=l&&l.length;f<y&&(r.nest=!1)}!r.lng&&this.options.compatibilityAPI!=="v1"&&o&&o.res&&(r.lng=o.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var l=arguments.length,y=new Array(l),i=0;i<l;i++)y[i]=arguments[i];return a&&a[0]===y[0]&&!r.context?(s.logger.warn(`It seems you are nesting recursively key: ${y[0]} in key: ${n[0]}`),null):s.translate(...y,n)},r)),r.interpolation&&this.interpolator.reset()}const u=r.postProcess||this.options.postProcess,h=typeof u=="string"?[u]:u;return t!=null&&h&&h.length&&r.applyPostProcessor!==!1&&(t=Za.handle(h,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,o,a,s,u;return typeof t=="string"&&(t=[t]),t.forEach(h=>{if(this.isValidLookup(r))return;const g=this.extractFromKey(h,n),f=g.key;o=f;let x=g.namespaces;this.options.fallbackNS&&(x=x.concat(this.options.fallbackNS));const l=n.count!==void 0&&typeof n.count!="string",y=l&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),i=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",c=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);x.forEach(p=>{this.isValidLookup(r)||(u=p,!es[`${c[0]}-${p}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(u)&&(es[`${c[0]}-${p}`]=!0,this.logger.warn(`key "${o}" for languages "${c.join(", ")}" won't get resolved as namespace "${u}" 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!!!")),c.forEach(d=>{if(this.isValidLookup(r))return;s=d;const m=[f];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(m,f,d,p,n);else{let b;l&&(b=this.pluralResolver.getSuffix(d,n.count,n));const C=`${this.options.pluralSeparator}zero`,S=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(l&&(m.push(f+b),n.ordinal&&b.indexOf(S)===0&&m.push(f+b.replace(S,this.options.pluralSeparator)),y&&m.push(f+C)),i){const k=`${f}${this.options.contextSeparator}${n.context}`;m.push(k),l&&(m.push(k+b),n.ordinal&&b.indexOf(S)===0&&m.push(k+b.replace(S,this.options.pluralSeparator)),y&&m.push(k+C))}}let v;for(;v=m.pop();)this.isValidLookup(r)||(a=v,r=this.getResource(d,p,v,n))}))})}),{res:r,usedKey:o,exactUsedKey:a,usedLng:s,usedNS:u}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}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 o=r?t.replace:t;if(r&&typeof t.count<"u"&&(o.count=t.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const a of n)delete o[a]}return o}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 Qo(e){return e.charAt(0).toUpperCase()+e.slice(1)}class ts{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Gt.create("languageUtils")}getScriptPartFromCode(t){if(t=Gr(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=Gr(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(o=>o.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Qo(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]=Qo(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=Qo(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 o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(a=>{if(a===o)return a;if(!(a.indexOf("-")<0&&o.indexOf("-")<0)&&(a.indexOf("-")>0&&o.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===o||a.indexOf(o)===0&&o.length>1))return a})}),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),o=[],a=s=>{s&&(this.isSupportedCode(s)?o.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(t))):typeof t=="string"&&a(this.formatLanguageCode(t)),r.forEach(s=>{o.indexOf(s)<0&&a(this.formatLanguageCode(s))}),o}}let ud=[{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}],dd={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 fd=["v1","v2","v3"],hd=["v4"],ns={zero:0,one:1,two:2,few:3,many:4,other:5};function pd(){const e={};return ud.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:dd[t.fc]}})}),e}class md{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=Gt.create("pluralResolver"),(!this.options.compatibilityJSON||hd.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=pd()}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(Gr(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(o=>`${n}${o}`)}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((o,a)=>ns[o]-ns[a]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):r.numbers.map(o=>this.getSuffix(t,o,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(t,r);return o?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:this.getSuffixRetroCompatible(o,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 o=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));const a=()=>this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString();return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?`_plural_${o.toString()}`:a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?a():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!fd.includes(this.options.compatibilityJSON)}}function rs(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=rd(e,t,n);return!a&&o&&typeof n=="string"&&(a=Yo(e,n,r),a===void 0&&(a=Yo(t,n,r))),a}class gd{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Gt.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:o,prefix:a,prefixEscaped:s,suffix:u,suffixEscaped:h,formatSeparator:g,unescapeSuffix:f,unescapePrefix:x,nestingPrefix:l,nestingPrefixEscaped:y,nestingSuffix:i,nestingSuffixEscaped:c,nestingOptionsSeparator:p,maxReplaces:d,alwaysFormat:m}=t.interpolation;this.escape=n!==void 0?n:id,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=a?Tn(a):s||"{{",this.suffix=u?Tn(u):h||"}}",this.formatSeparator=g||",",this.unescapePrefix=f?"":x||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=l?Tn(l):y||Tn("$t("),this.nestingSuffix=i?Tn(i):c||Tn(")"),this.nestingOptionsSeparator=p||",",this.maxReplaces=d||1e3,this.alwaysFormat=m!==void 0?m:!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,o){let a,s,u;const h=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function g(i){return i.replace(/\$/g,"$$$$")}const f=i=>{if(i.indexOf(this.formatSeparator)<0){const m=rs(n,h,i,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(m,void 0,r,{...o,...n,interpolationkey:i}):m}const c=i.split(this.formatSeparator),p=c.shift().trim(),d=c.join(this.formatSeparator).trim();return this.format(rs(n,h,p,this.options.keySeparator,this.options.ignoreJSONStructure),d,r,{...o,...n,interpolationkey:p})};this.resetRegExp();const x=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,l=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:i=>g(i)},{regex:this.regexp,safeValue:i=>this.escapeValue?g(this.escape(i)):g(i)}].forEach(i=>{for(u=0;a=i.regex.exec(t);){const c=a[1].trim();if(s=f(c),s===void 0)if(typeof x=="function"){const d=x(t,a,o);s=typeof d=="string"?d:""}else if(o&&Object.prototype.hasOwnProperty.call(o,c))s="";else if(l){s=a[0];continue}else this.logger.warn(`missed to pass in variable ${c} for interpolating ${t}`),s="";else typeof s!="string"&&!this.useRawValueToEscape&&(s=Xa(s));const p=i.safeValue(s);if(t=t.replace(a[0],p),l?(i.regex.lastIndex+=s.length,i.regex.lastIndex-=a[0].length):i.regex.lastIndex=0,u++,u>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,a,s;function u(h,g){const f=this.nestingOptionsSeparator;if(h.indexOf(f)<0)return h;const x=h.split(new RegExp(`${f}[ ]*{`));let l=`{${x[1]}`;h=x[0],l=this.interpolate(l,s);const y=l.match(/'/g),i=l.match(/"/g);(y&&y.length%2===0&&!i||i.length%2!==0)&&(l=l.replace(/'/g,'"'));try{s=JSON.parse(l),g&&(s={...g,...s})}catch(c){return this.logger.warn(`failed parsing options string in nesting for key ${h}`,c),`${h}${f}${l}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,h}for(;o=this.nestingRegexp.exec(t);){let h=[];s={...r},s=s.replace&&typeof s.replace!="string"?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let g=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const f=o[1].split(this.formatSeparator).map(x=>x.trim());o[1]=f.shift(),h=f,g=!0}if(a=n(u.call(this,o[1].trim(),s),s),a&&o[0]===t&&typeof a!="string")return a;typeof a!="string"&&(a=Xa(a)),a||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),a=""),g&&(a=h.reduce((f,x)=>this.format(f,x,r.lng,{...r,interpolationkey:o[1].trim()}),a.trim())),t=t.replace(o[0],a),this.regexp.lastIndex=0}return t}}function yd(e){let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);t==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):t==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(s=>{if(s){const[u,...h]=s.split(":"),g=h.join(":").trim().replace(/^'+|'+$/g,""),f=u.trim();n[f]||(n[f]=g),g==="false"&&(n[f]=!1),g==="true"&&(n[f]=!0),isNaN(g)||(n[f]=parseInt(g,10))}})}return{formatName:t,formatOptions:n}}function Nn(e){const t={};return function(r,o,a){const s=o+JSON.stringify(a);let u=t[s];return u||(u=e(Gr(o),a),t[s]=u),u(r)}}class vd{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Gt.create("formatter"),this.options=t,this.formats={number:Nn((n,r)=>{const o=new Intl.NumberFormat(n,{...r});return a=>o.format(a)}),currency:Nn((n,r)=>{const o=new Intl.NumberFormat(n,{...r,style:"currency"});return a=>o.format(a)}),datetime:Nn((n,r)=>{const o=new Intl.DateTimeFormat(n,{...r});return a=>o.format(a)}),relativetime:Nn((n,r)=>{const o=new Intl.RelativeTimeFormat(n,{...r});return a=>o.format(a,r.range||"day")}),list:Nn((n,r)=>{const o=new Intl.ListFormat(n,{...r});return a=>o.format(a)})},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()]=Nn(n)}format(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((u,h)=>{const{formatName:g,formatOptions:f}=yd(h);if(this.formats[g]){let x=u;try{const l=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},y=l.locale||l.lng||o.locale||o.lng||r;x=this.formats[g](u,y,{...f,...o,...l})}catch(l){this.logger.warn(l)}return x}else this.logger.warn(`there was no format function for ${g}`);return u},t)}}function bd(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}class wd extends Kr{constructor(t,n,r){let o=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=o,this.logger=Gt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,o.backend,o)}queueLoad(t,n,r,o){const a={},s={},u={},h={};return t.forEach(g=>{let f=!0;n.forEach(x=>{const l=`${g}|${x}`;!r.reload&&this.store.hasResourceBundle(g,x)?this.state[l]=2:this.state[l]<0||(this.state[l]===1?s[l]===void 0&&(s[l]=!0):(this.state[l]=1,f=!1,s[l]===void 0&&(s[l]=!0),a[l]===void 0&&(a[l]=!0),h[x]===void 0&&(h[x]=!0)))}),f||(u[g]=!0)}),(Object.keys(a).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(a),pending:Object.keys(s),toLoadLanguages:Object.keys(u),toLoadNamespaces:Object.keys(h)}}loaded(t,n,r){const o=t.split("|"),a=o[0],s=o[1];n&&this.emit("failedLoading",a,s,n),r&&this.store.addResourceBundle(a,s,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2;const u={};this.queue.forEach(h=>{nd(h.loaded,[a],s),bd(h,t),n&&h.errors.push(n),h.pendingCount===0&&!h.done&&(Object.keys(h.loaded).forEach(g=>{u[g]||(u[g]={});const f=h.loaded[g];f.length&&f.forEach(x=>{u[g][x]===void 0&&(u[g][x]=!0)})}),h.done=!0,h.errors.length?h.callback(h.errors):h.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(h=>!h.done)}read(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:a,callback:s});return}this.readingCalls++;const u=(g,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const x=this.waitingReads.shift();this.read(x.lng,x.ns,x.fcName,x.tried,x.wait,x.callback)}if(g&&f&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,o+1,a*2,s)},a);return}s(g,f)},h=this.backend[r].bind(this.backend);if(h.length===2){try{const g=h(t,n);g&&typeof g.then=="function"?g.then(f=>u(null,f)).catch(u):u(null,g)}catch(g){u(g)}return}return h(t,n,u)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=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."),o&&o();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);const a=this.queueLoad(t,n,r,o);if(!a.toLoad.length)return a.pending.length||o(),null;a.toLoad.forEach(s=>{this.loadOne(s)})}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("|"),o=r[0],a=r[1];this.read(o,a,"read",void 0,void 0,(s,u)=>{s&&this.logger.warn(`${n}loading namespace ${a} for language ${o} failed`,s),!s&&u&&this.logger.log(`${n}loaded namespace ${a} for language ${o}`,u),this.loaded(t,s,u)})}saveMissing(t,n,r,o,a){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},u=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 h={...s,isUpdate:a},g=this.backend.create.bind(this.backend);if(g.length<6)try{let f;g.length===5?f=g(t,n,r,o,h):f=g(t,n,r,o),f&&typeof f.then=="function"?f.then(x=>u(null,x)).catch(u):u(null,f)}catch(f){u(f)}else g(t,n,r,o,u,h)}!t||!t[0]||this.store.addResource(t[0],n,r,o)}}}function os(){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(o=>{n[o]=r[o]})}return n},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function is(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 Jr(){}function xd(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}class er extends Kr{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=is(t),this.services={},this.logger=Gt,this.modules={external:[]},xd(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 o=os();this.options={...o,...this.options,...is(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...o.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function a(f){return f?typeof f=="function"?new f:f:null}if(!this.options.isClone){this.modules.logger?Gt.init(a(this.modules.logger),this.options):Gt.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:typeof Intl<"u"&&(f=vd);const x=new ts(this.options);this.store=new Qa(this.options.resources,this.options);const l=this.services;l.logger=Gt,l.resourceStore=this.store,l.languageUtils=x,l.pluralResolver=new md(x,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),f&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(l.formatter=a(f),l.formatter.init(l,this.options),this.options.interpolation.format=l.formatter.format.bind(l.formatter)),l.interpolator=new gd(this.options),l.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},l.backendConnector=new wd(a(this.modules.backend),l.resourceStore,l,this.options),l.backendConnector.on("*",function(y){for(var i=arguments.length,c=new Array(i>1?i-1:0),p=1;p<i;p++)c[p-1]=arguments[p];t.emit(y,...c)}),this.modules.languageDetector&&(l.languageDetector=a(this.modules.languageDetector),l.languageDetector.init&&l.languageDetector.init(l,this.options.detection,this.options)),this.modules.i18nFormat&&(l.i18nFormat=a(this.modules.i18nFormat),l.i18nFormat.init&&l.i18nFormat.init(this)),this.translator=new Xr(this.services,this.options),this.translator.on("*",function(y){for(var i=arguments.length,c=new Array(i>1?i-1:0),p=1;p<i;p++)c[p-1]=arguments[p];t.emit(y,...c)}),this.modules.external.forEach(y=>{y.init&&y.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Jr),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 h=Qn(),g=()=>{const f=(x,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),h.resolve(l),r(x,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?g():setTimeout(g,0),h}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Jr;const o=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(o&&o.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const a=[],s=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(g=>{g!=="cimode"&&a.indexOf(g)<0&&a.push(g)})};o?s(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(h=>s(h)),this.options.preload&&this.options.preload.forEach(u=>s(u)),this.services.backendConnector.load(a,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(u)})}else r(null)}reloadResources(t,n,r){const o=Qn();return t||(t=this.languages),n||(n=this.options.ns),r||(r=Jr),this.services.backendConnector.reload(t,n,a=>{o.resolve(),r(a)}),o}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"&&Za.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 o=Qn();this.emit("languageChanging",t);const a=h=>{this.language=h,this.languages=this.services.languageUtils.toResolveHierarchy(h),this.resolvedLanguage=void 0,this.setResolvedLanguage(h)},s=(h,g)=>{g?(a(g),this.translator.changeLanguage(g),this.isLanguageChangingTo=void 0,this.emit("languageChanged",g),this.logger.log("languageChanged",g)):this.isLanguageChangingTo=void 0,o.resolve(function(){return r.t(...arguments)}),n&&n(h,function(){return r.t(...arguments)})},u=h=>{!t&&!h&&this.services.languageDetector&&(h=[]);const g=typeof h=="string"?h:this.services.languageUtils.getBestMatchFromCodes(h);g&&(this.language||a(g),this.translator.language||this.translator.changeLanguage(g),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(g)),this.loadResources(g,f=>{s(f,g)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(u):this.services.languageDetector.detect(u):u(t),o}getFixedT(t,n,r){var o=this;const a=function(s,u){let h;if(typeof u!="object"){for(var g=arguments.length,f=new Array(g>2?g-2:0),x=2;x<g;x++)f[x-2]=arguments[x];h=o.options.overloadTranslationOptionHandler([s,u].concat(f))}else h={...u};h.lng=h.lng||a.lng,h.lngs=h.lngs||a.lngs,h.ns=h.ns||a.ns,h.keyPrefix=h.keyPrefix||r||a.keyPrefix;const l=o.options.keySeparator||".";let y;return h.keyPrefix&&Array.isArray(s)?y=s.map(i=>`${h.keyPrefix}${l}${i}`):y=h.keyPrefix?`${h.keyPrefix}${l}${s}`:s,o.t(y,h)};return typeof t=="string"?a.lng=t:a.lngs=t,a.ns=n,a.keyPrefix=r,a}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],o=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(u,h)=>{const g=this.services.backendConnector.state[`${u}|${h}`];return g===-1||g===2};if(n.precheck){const u=n.precheck(this,s);if(u!==void 0)return u}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!o||s(a,t)))}loadNamespaces(t,n){const r=Qn();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Qn();typeof t=="string"&&(t=[t]);const o=this.options.preload||[],a=t.filter(s=>o.indexOf(s)<0&&this.services.languageUtils.isSupportedCode(s));return a.length?(this.options.preload=o.concat(a),this.loadResources(s=>{r.resolve(),n&&n(s)}),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 ts(os());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 er(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Jr;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},a=new er(o);return(t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),["store","services","language"].forEach(u=>{a[u]=this[u]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new Qa(this.store.data,o),a.services.resourceStore=a.store),a.translator=new Xr(a.services,o),a.translator.on("*",function(u){for(var h=arguments.length,g=new Array(h>1?h-1:0),f=1;f<h;f++)g[f-1]=arguments[f];a.emit(u,...g)}),a.init(o,n),a.translator.options=o,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const pt=er.createInstance();pt.createInstance=er.createInstance,pt.createInstance,pt.dir,pt.init,pt.loadResources,pt.reloadResources,pt.use,pt.changeLanguage,pt.getFixedT,pt.t,pt.exists,pt.setDefaultNamespace,pt.hasLoadedNamespace,pt.loadNamespaces,pt.loadLanguages;const tr=(e,t="EUR")=>new Intl.NumberFormat(pt.language,{style:"currency",currency:t??"EUR"}).format(e/100);function as(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=as(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ln(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=as(e))&&(r&&(r+=" "),r+=t);return r}const nr=e=>typeof e=="number"&&!isNaN(e),bn=e=>typeof e=="string",St=e=>typeof e=="function",Yr=e=>bn(e)||St(e)?e:null,Zo=e=>H.isValidElement(e)||bn(e)||St(e)||nr(e);function kd(e,t,n){n===void 0&&(n=300);const{scrollHeight:r,style:o}=e;requestAnimationFrame(()=>{o.minHeight="initial",o.height=r+"px",o.transition=`all ${n}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,n)})})}function Qr(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:o=!0,collapseDuration:a=300}=e;return function(s){let{children:u,position:h,preventExitTransition:g,done:f,nodeRef:x,isIn:l,playToast:y}=s;const i=r?`${t}--${h}`:t,c=r?`${n}--${h}`:n,p=H.useRef(0);return H.useLayoutEffect(()=>{const d=x.current,m=i.split(" "),v=b=>{b.target===x.current&&(y(),d.removeEventListener("animationend",v),d.removeEventListener("animationcancel",v),p.current===0&&b.type!=="animationcancel"&&d.classList.remove(...m))};d.classList.add(...m),d.addEventListener("animationend",v),d.addEventListener("animationcancel",v)},[]),H.useEffect(()=>{const d=x.current,m=()=>{d.removeEventListener("animationend",m),o?kd(d,f,a):f()};l||(g?m():(p.current=1,d.className+=` ${c}`,d.addEventListener("animationend",m)))},[l]),H.createElement(H.Fragment,null,u)}}function ss(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 vt=new Map;let rr=[];const ei=new Set,Cd=e=>ei.forEach(t=>t(e)),ls=()=>vt.size>0;function cs(e,t){var n;if(t)return!((n=vt.get(t))==null||!n.isToastActive(e));let r=!1;return vt.forEach(o=>{o.isToastActive(e)&&(r=!0)}),r}function us(e,t){Zo(e)&&(ls()||rr.push({content:e,options:t}),vt.forEach(n=>{n.buildToast(e,t)}))}function ds(e,t){vt.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 Ed(e){const{subscribe:t,getSnapshot:n,setProps:r}=H.useRef(function(a){const s=a.containerId||1;return{subscribe(u){const h=function(f,x,l){let y=1,i=0,c=[],p=[],d=[],m=x;const v=new Map,b=new Set,C=()=>{d=Array.from(v.values()),b.forEach(B=>B())},S=B=>{p=B==null?[]:p.filter(O=>O!==B),C()},k=B=>{const{toastId:O,onOpen:j,updateId:I,children:D}=B.props,M=I==null;B.staleId&&v.delete(B.staleId),v.set(O,B),p=[...p,B.props.toastId].filter($=>$!==B.staleId),C(),l(ss(B,M?"added":"updated")),M&&St(j)&&j(H.isValidElement(D)&&D.props)};return{id:f,props:m,observe:B=>(b.add(B),()=>b.delete(B)),toggle:(B,O)=>{v.forEach(j=>{O!=null&&O!==j.props.toastId||St(j.toggle)&&j.toggle(B)})},removeToast:S,toasts:v,clearQueue:()=>{i-=c.length,c=[]},buildToast:(B,O)=>{if((ue=>{let{containerId:ne,toastId:me,updateId:de}=ue;const V=ne?ne!==f:f!==1,U=v.has(me)&&de==null;return V||U})(O))return;const{toastId:j,updateId:I,data:D,staleId:M,delay:$}=O,P=()=>{S(j)},L=I==null;L&&i++;const q={...m,style:m.toastStyle,key:y++,...Object.fromEntries(Object.entries(O).filter(ue=>{let[ne,me]=ue;return me!=null})),toastId:j,updateId:I,data:D,closeToast:P,isIn:!1,className:Yr(O.className||m.toastClassName),bodyClassName:Yr(O.bodyClassName||m.bodyClassName),progressClassName:Yr(O.progressClassName||m.progressClassName),autoClose:!O.isLoading&&(K=O.autoClose,Q=m.autoClose,K===!1||nr(K)&&K>0?K:Q),deleteToast(){const ue=v.get(j),{onClose:ne,children:me}=ue.props;St(ne)&&ne(H.isValidElement(me)&&me.props),l(ss(ue,"removed")),v.delete(j),i--,i<0&&(i=0),c.length>0?k(c.shift()):C()}};var K,Q;q.closeButton=m.closeButton,O.closeButton===!1||Zo(O.closeButton)?q.closeButton=O.closeButton:O.closeButton===!0&&(q.closeButton=!Zo(m.closeButton)||m.closeButton);let Z=B;H.isValidElement(B)&&!bn(B.type)?Z=H.cloneElement(B,{closeToast:P,toastProps:q,data:D}):St(B)&&(Z=B({closeToast:P,toastProps:q,data:D}));const ee={content:Z,props:q,staleId:M};m.limit&&m.limit>0&&i>m.limit&&L?c.push(ee):nr($)?setTimeout(()=>{k(ee)},$):k(ee)},setProps(B){m=B},setToggle:(B,O)=>{v.get(B).toggle=O},isToastActive:B=>p.some(O=>O===B),getSnapshot:()=>m.newestOnTop?d.reverse():d}}(s,a,Cd);vt.set(s,h);const g=h.observe(u);return rr.forEach(f=>us(f.content,f.options)),rr=[],()=>{g(),vt.delete(s)}},setProps(u){var h;(h=vt.get(s))==null||h.setProps(u)},getSnapshot(){var u;return(u=vt.get(s))==null?void 0:u.getSnapshot()}}}(e)).current;r(e);const o=H.useSyncExternalStore(t,n,n);return{getToastToRender:function(a){if(!o)return[];const s=new Map;return o.forEach(u=>{const{position:h}=u.props;s.has(h)||s.set(h,[]),s.get(h).push(u)}),Array.from(s,u=>a(u[0],u[1]))},isToastActive:cs,count:o==null?void 0:o.length}}function Sd(e){const[t,n]=H.useState(!1),[r,o]=H.useState(!1),a=H.useRef(null),s=H.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:u,pauseOnHover:h,closeToast:g,onClick:f,closeOnClick:x}=e;var l,y;function i(){n(!0)}function c(){n(!1)}function p(v){const b=a.current;s.canDrag&&b&&(s.didMove=!0,t&&c(),s.delta=e.draggableDirection==="x"?v.clientX-s.start:v.clientY-s.start,s.start!==v.clientX&&(s.canCloseOnClick=!1),b.style.transform=`translate3d(${e.draggableDirection==="x"?`${s.delta}px, var(--y)`:`0, calc(${s.delta}px + var(--y))`},0)`,b.style.opacity=""+(1-Math.abs(s.delta/s.removalDistance)))}function d(){document.removeEventListener("pointermove",p),document.removeEventListener("pointerup",d);const v=a.current;if(s.canDrag&&s.didMove&&v){if(s.canDrag=!1,Math.abs(s.delta)>s.removalDistance)return o(!0),e.closeToast(),void e.collapseAll();v.style.transition="transform 0.2s, opacity 0.2s",v.style.removeProperty("transform"),v.style.removeProperty("opacity")}}(y=vt.get((l={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||y.setToggle(l.id,l.fn),H.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||c(),window.addEventListener("focus",i),window.addEventListener("blur",c),()=>{window.removeEventListener("focus",i),window.removeEventListener("blur",c)}},[e.pauseOnFocusLoss]);const m={onPointerDown:function(v){if(e.draggable===!0||e.draggable===v.pointerType){s.didMove=!1,document.addEventListener("pointermove",p),document.addEventListener("pointerup",d);const b=a.current;s.canCloseOnClick=!0,s.canDrag=!0,b.style.transition="none",e.draggableDirection==="x"?(s.start=v.clientX,s.removalDistance=b.offsetWidth*(e.draggablePercent/100)):(s.start=v.clientY,s.removalDistance=b.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(v){const{top:b,bottom:C,left:S,right:k}=a.current.getBoundingClientRect();v.nativeEvent.type!=="touchend"&&e.pauseOnHover&&v.clientX>=S&&v.clientX<=k&&v.clientY>=b&&v.clientY<=C?c():i()}};return u&&h&&(m.onMouseEnter=c,e.stacked||(m.onMouseLeave=i)),x&&(m.onClick=v=>{f&&f(v),s.canCloseOnClick&&g()}),{playToast:i,pauseToast:c,isRunning:t,preventExitTransition:r,toastRef:a,eventHandlers:m}}function Pd(e){let{delay:t,isRunning:n,closeToast:r,type:o="default",hide:a,className:s,style:u,controlledProgress:h,progress:g,rtl:f,isIn:x,theme:l}=e;const y=a||h&&g===0,i={...u,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};h&&(i.transform=`scaleX(${g})`);const c=ln("Toastify__progress-bar",h?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${l}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":f}),p=St(s)?s({rtl:f,type:o,defaultClassName:c}):ln(c,s),d={[h&&g>=1?"onTransitionEnd":"onAnimationEnd"]:h&&g<1?null:()=>{x&&r()}};return H.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":y},H.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${l} Toastify__progress-bar--${o}`}),H.createElement("div",{role:"progressbar","aria-hidden":y?"true":"false","aria-label":"notification timer",className:p,style:i,...d}))}let Bd=1;const fs=()=>""+Bd++;function Od(e){return e&&(bn(e.toastId)||nr(e.toastId))?e.toastId:fs()}function or(e,t){return us(e,t),t.toastId}function Zr(e,t){return{...t,type:t&&t.type||e,toastId:Od(t)}}function eo(e){return(t,n)=>or(t,Zr(e,n))}function De(e,t){return or(e,Zr("default",t))}De.loading=(e,t)=>or(e,Zr("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),De.promise=function(e,t,n){let r,{pending:o,error:a,success:s}=t;o&&(r=bn(o)?De.loading(o,n):De.loading(o.render,{...n,...o}));const u={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},h=(f,x,l)=>{if(x==null)return void De.dismiss(r);const y={type:f,...u,...n,data:l},i=bn(x)?{render:x}:x;return r?De.update(r,{...y,...i}):De(i.render,{...y,...i}),l},g=St(e)?e():e;return g.then(f=>h("success",s,f)).catch(f=>h("error",a,f)),g},De.success=eo("success"),De.info=eo("info"),De.error=eo("error"),De.warning=eo("warning"),De.warn=De.warning,De.dark=(e,t)=>or(e,Zr("default",{theme:"dark",...t})),De.dismiss=function(e){(function(t){var n;if(ls()){if(t==null||bn(n=t)||nr(n))vt.forEach(r=>{r.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){const r=vt.get(t.containerId);r?r.removeToast(t.id):vt.forEach(o=>{o.removeToast(t.id)})}}else rr=rr.filter(r=>t!=null&&r.options.toastId!==t)})(e)},De.clearWaitingQueue=function(e){e===void 0&&(e={}),vt.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},De.isActive=cs,De.update=function(e,t){t===void 0&&(t={});const n=((r,o)=>{var a;let{containerId:s}=o;return(a=vt.get(s||1))==null?void 0:a.toasts.get(r)})(e,t);if(n){const{props:r,content:o}=n,a={delay:100,...r,...t,toastId:t.toastId||e,updateId:fs()};a.toastId!==e&&(a.staleId=e);const s=a.render||o;delete a.render,or(s,a)}},De.done=e=>{De.update(e,{progress:1})},De.onChange=function(e){return ei.add(e),()=>{ei.delete(e)}},De.play=e=>ds(!0,e),De.pause=e=>ds(!1,e);const _d=typeof window<"u"?H.useLayoutEffect:H.useEffect,to=e=>{let{theme:t,type:n,isLoading:r,...o}=e;return H.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...o})},ti={info:function(e){return H.createElement(to,{...e},H.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 H.createElement(to,{...e},H.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 H.createElement(to,{...e},H.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 H.createElement(to,{...e},H.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 H.createElement("div",{className:"Toastify__spinner"})}},Rd=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o,playToast:a}=Sd(e),{closeButton:s,children:u,autoClose:h,onClick:g,type:f,hideProgressBar:x,closeToast:l,transition:y,position:i,className:c,style:p,bodyClassName:d,bodyStyle:m,progressClassName:v,progressStyle:b,updateId:C,role:S,progress:k,rtl:B,toastId:O,deleteToast:j,isIn:I,isLoading:D,closeOnClick:M,theme:$}=e,P=ln("Toastify__toast",`Toastify__toast-theme--${$}`,`Toastify__toast--${f}`,{"Toastify__toast--rtl":B},{"Toastify__toast--close-on-click":M}),L=St(c)?c({rtl:B,position:i,type:f,defaultClassName:P}):ln(P,c),q=function(ee){let{theme:ue,type:ne,isLoading:me,icon:de}=ee,V=null;const U={theme:ue,type:ne};return de===!1||(St(de)?V=de({...U,isLoading:me}):H.isValidElement(de)?V=H.cloneElement(de,U):me?V=ti.spinner():(J=>J in ti)(ne)&&(V=ti[ne](U))),V}(e),K=!!k||!h,Q={closeToast:l,type:f,theme:$};let Z=null;return s===!1||(Z=St(s)?s(Q):H.isValidElement(s)?H.cloneElement(s,Q):function(ee){let{closeToast:ue,theme:ne,ariaLabel:me="close"}=ee;return H.createElement("button",{className:`Toastify__close-button Toastify__close-button--${ne}`,type:"button",onClick:de=>{de.stopPropagation(),ue(de)},"aria-label":me},H.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},H.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"})))}(Q)),H.createElement(y,{isIn:I,done:j,position:i,preventExitTransition:n,nodeRef:r,playToast:a},H.createElement("div",{id:O,onClick:g,"data-in":I,className:L,...o,style:p,ref:r},H.createElement("div",{...I&&{role:S},className:St(d)?d({type:f}):ln("Toastify__toast-body",d),style:m},q!=null&&H.createElement("div",{className:ln("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!D})},q),H.createElement("div",null,u)),Z,H.createElement(Pd,{...C&&!K?{key:`pb-${C}`}:{},rtl:B,theme:$,delay:h,isRunning:t,isIn:I,closeToast:l,hide:x,type:f,style:b,className:v,controlledProgress:K,progress:k||0})))},no=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},Td=Qr(no("bounce",!0));Qr(no("slide",!0)),Qr(no("zoom")),Qr(no("flip"));const Nd={position:"top-right",transition:Td,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function hs(e){let t={...Nd,...e};const n=e.stacked,[r,o]=H.useState(!0),a=H.useRef(null),{getToastToRender:s,isToastActive:u,count:h}=Ed(t),{className:g,style:f,rtl:x,containerId:l}=t;function y(c){const p=ln("Toastify__toast-container",`Toastify__toast-container--${c}`,{"Toastify__toast-container--rtl":x});return St(g)?g({position:c,rtl:x,defaultClassName:p}):ln(p,Yr(g))}function i(){n&&(o(!0),De.play())}return _d(()=>{if(n){var c;const p=a.current.querySelectorAll('[data-in="true"]'),d=12,m=(c=t.position)==null?void 0:c.includes("top");let v=0,b=0;Array.from(p).reverse().forEach((C,S)=>{const k=C;k.classList.add("Toastify__toast--stacked"),S>0&&(k.dataset.collapsed=`${r}`),k.dataset.pos||(k.dataset.pos=m?"top":"bot");const B=v*(r?.2:1)+(r?0:d*S);k.style.setProperty("--y",`${m?B:-1*B}px`),k.style.setProperty("--g",`${d}`),k.style.setProperty("--s",""+(1-(r?b:0))),v+=k.offsetHeight,b+=.025})}},[r,h,n]),H.createElement("div",{ref:a,className:"Toastify",id:l,onMouseEnter:()=>{n&&(o(!1),De.pause())},onMouseLeave:i},s((c,p)=>{const d=p.length?{...f}:{...f,pointerEvents:"none"};return H.createElement("div",{className:y(c),style:d,key:`container-${c}`},p.map(m=>{let{content:v,props:b}=m;return H.createElement(Rd,{...b,stacked:n,collapseAll:i,isIn:u(b.toastId,b.containerId),style:b.style,key:`toast-${b.key}`},v)}))}))}function ps(e,t){return function(){return e.apply(t,arguments)}}const{toString:jd}=Object.prototype,{getPrototypeOf:ni}=Object,ro=(e=>t=>{const n=jd.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),It=e=>(e=e.toLowerCase(),t=>ro(t)===e),oo=e=>t=>typeof t===e,{isArray:jn}=Array,ir=oo("undefined");function Ad(e){return e!==null&&!ir(e)&&e.constructor!==null&&!ir(e.constructor)&&Ot(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ms=It("ArrayBuffer");function Ld(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ms(e.buffer),t}const Id=oo("string"),Ot=oo("function"),gs=oo("number"),io=e=>e!==null&&typeof e=="object",Dd=e=>e===!0||e===!1,ao=e=>{if(ro(e)!=="object")return!1;const t=ni(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Md=It("Date"),Fd=It("File"),Ud=It("Blob"),$d=It("FileList"),Vd=e=>io(e)&&Ot(e.pipe),Hd=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Ot(e.append)&&((t=ro(e))==="formdata"||t==="object"&&Ot(e.toString)&&e.toString()==="[object FormData]"))},zd=It("URLSearchParams"),[qd,Kd,Wd,Gd]=["ReadableStream","Request","Response","Headers"].map(It),Xd=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ar(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),jn(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),s=a.length;let u;for(r=0;r<s;r++)u=a[r],t.call(null,e[u],u,e)}}function ys(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const vs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,bs=e=>!ir(e)&&e!==vs;function ri(){const{caseless:e}=bs(this)&&this||{},t={},n=(r,o)=>{const a=e&&ys(t,o)||o;ao(t[a])&&ao(r)?t[a]=ri(t[a],r):ao(r)?t[a]=ri({},r):jn(r)?t[a]=r.slice():t[a]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&ar(arguments[r],n);return t}const Jd=(e,t,n,{allOwnKeys:r}={})=>(ar(t,(o,a)=>{n&&Ot(o)?e[a]=ps(o,n):e[a]=o},{allOwnKeys:r}),e),Yd=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Qd=(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)},Zd=(e,t,n,r)=>{let o,a,s;const u={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)s=o[a],(!r||r(s,e,t))&&!u[s]&&(t[s]=e[s],u[s]=!0);e=n!==!1&&ni(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},ef=(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},tf=e=>{if(!e)return null;if(jn(e))return e;let t=e.length;if(!gs(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},nf=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ni(Uint8Array)),rf=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},of=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},af=It("HTMLFormElement"),sf=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),ws=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),lf=It("RegExp"),xs=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ar(n,(o,a)=>{let s;(s=t(o,a,e))!==!1&&(r[a]=s||o)}),Object.defineProperties(e,r)},cf=e=>{xs(e,(t,n)=>{if(Ot(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Ot(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+"'")})}})},uf=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return jn(e)?r(e):r(String(e).split(t)),n},df=()=>{},ff=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,oi="abcdefghijklmnopqrstuvwxyz",ks="0123456789",Cs={DIGIT:ks,ALPHA:oi,ALPHA_DIGIT:oi+oi.toUpperCase()+ks},hf=(e=16,t=Cs.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function pf(e){return!!(e&&Ot(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const mf=e=>{const t=new Array(10),n=(r,o)=>{if(io(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const a=jn(r)?[]:{};return ar(r,(s,u)=>{const h=n(s,o+1);!ir(h)&&(a[u]=h)}),t[o]=void 0,a}}return r};return n(e,0)},gf=It("AsyncFunction"),te={isArray:jn,isArrayBuffer:ms,isBuffer:Ad,isFormData:Hd,isArrayBufferView:Ld,isString:Id,isNumber:gs,isBoolean:Dd,isObject:io,isPlainObject:ao,isReadableStream:qd,isRequest:Kd,isResponse:Wd,isHeaders:Gd,isUndefined:ir,isDate:Md,isFile:Fd,isBlob:Ud,isRegExp:lf,isFunction:Ot,isStream:Vd,isURLSearchParams:zd,isTypedArray:nf,isFileList:$d,forEach:ar,merge:ri,extend:Jd,trim:Xd,stripBOM:Yd,inherits:Qd,toFlatObject:Zd,kindOf:ro,kindOfTest:It,endsWith:ef,toArray:tf,forEachEntry:rf,matchAll:of,isHTMLForm:af,hasOwnProperty:ws,hasOwnProp:ws,reduceDescriptors:xs,freezeMethods:cf,toObjectSet:uf,toCamelCase:sf,noop:df,toFiniteNumber:ff,findKey:ys,global:vs,isContextDefined:bs,ALPHABET:Cs,generateString:hf,isSpecCompliantForm:pf,toJSONObject:mf,isAsyncFn:gf,isThenable:e=>e&&(io(e)||Ot(e))&&Ot(e.then)&&Ot(e.catch)};function Ne(e,t,n,r,o){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),o&&(this.response=o)}te.inherits(Ne,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:te.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Es=Ne.prototype,Ss={};["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=>{Ss[e]={value:e}}),Object.defineProperties(Ne,Ss),Object.defineProperty(Es,"isAxiosError",{value:!0}),Ne.from=(e,t,n,r,o,a)=>{const s=Object.create(Es);return te.toFlatObject(e,s,function(h){return h!==Error.prototype},u=>u!=="isAxiosError"),Ne.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,a&&Object.assign(s,a),s};const yf=null;function ii(e){return te.isPlainObject(e)||te.isArray(e)}function Ps(e){return te.endsWith(e,"[]")?e.slice(0,-2):e}function Bs(e,t,n){return e?e.concat(t).map(function(o,a){return o=Ps(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function vf(e){return te.isArray(e)&&!e.some(ii)}const bf=te.toFlatObject(te,{},null,function(t){return/^is[A-Z]/.test(t)});function so(e,t,n){if(!te.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=te.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(c,p){return!te.isUndefined(p[c])});const r=n.metaTokens,o=n.visitor||f,a=n.dots,s=n.indexes,h=(n.Blob||typeof Blob<"u"&&Blob)&&te.isSpecCompliantForm(t);if(!te.isFunction(o))throw new TypeError("visitor must be a function");function g(i){if(i===null)return"";if(te.isDate(i))return i.toISOString();if(!h&&te.isBlob(i))throw new Ne("Blob is not supported. Use a Buffer instead.");return te.isArrayBuffer(i)||te.isTypedArray(i)?h&&typeof Blob=="function"?new Blob([i]):Buffer.from(i):i}function f(i,c,p){let d=i;if(i&&!p&&typeof i=="object"){if(te.endsWith(c,"{}"))c=r?c:c.slice(0,-2),i=JSON.stringify(i);else if(te.isArray(i)&&vf(i)||(te.isFileList(i)||te.endsWith(c,"[]"))&&(d=te.toArray(i)))return c=Ps(c),d.forEach(function(v,b){!(te.isUndefined(v)||v===null)&&t.append(s===!0?Bs([c],b,a):s===null?c:c+"[]",g(v))}),!1}return ii(i)?!0:(t.append(Bs(p,c,a),g(i)),!1)}const x=[],l=Object.assign(bf,{defaultVisitor:f,convertValue:g,isVisitable:ii});function y(i,c){if(!te.isUndefined(i)){if(x.indexOf(i)!==-1)throw Error("Circular reference detected in "+c.join("."));x.push(i),te.forEach(i,function(d,m){(!(te.isUndefined(d)||d===null)&&o.call(t,d,te.isString(m)?m.trim():m,c,l))===!0&&y(d,c?c.concat(m):[m])}),x.pop()}}if(!te.isObject(e))throw new TypeError("data must be an object");return y(e),t}function Os(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function ai(e,t){this._pairs=[],e&&so(e,this,t)}const _s=ai.prototype;_s.append=function(t,n){this._pairs.push([t,n])},_s.toString=function(t){const n=t?function(r){return t.call(this,r,Os)}:Os;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function wf(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Rs(e,t,n){if(!t)return e;const r=n&&n.encode||wf,o=n&&n.serialize;let a;if(o?a=o(t,n):a=te.isURLSearchParams(t)?t.toString():new ai(t,n).toString(r),a){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Ts{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){te.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Ns={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},xf={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:ai,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},si=typeof window<"u"&&typeof document<"u",kf=(e=>si&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),Cf=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ef=si&&window.location.href||"http://localhost",Dt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:si,hasStandardBrowserEnv:kf,hasStandardBrowserWebWorkerEnv:Cf,origin:Ef},Symbol.toStringTag,{value:"Module"})),...xf};function Sf(e,t){return so(e,new Dt.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,a){return Dt.isNode&&te.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function Pf(e){return te.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Bf(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function js(e){function t(n,r,o,a){let s=n[a++];if(s==="__proto__")return!0;const u=Number.isFinite(+s),h=a>=n.length;return s=!s&&te.isArray(o)?o.length:s,h?(te.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!u):((!o[s]||!te.isObject(o[s]))&&(o[s]=[]),t(n,r,o[s],a)&&te.isArray(o[s])&&(o[s]=Bf(o[s])),!u)}if(te.isFormData(e)&&te.isFunction(e.entries)){const n={};return te.forEachEntry(e,(r,o)=>{t(Pf(r),o,n,0)}),n}return null}function Of(e,t,n){if(te.isString(e))try{return(t||JSON.parse)(e),te.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const sr={transitional:Ns,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=te.isObject(t);if(a&&te.isHTMLForm(t)&&(t=new FormData(t)),te.isFormData(t))return o?JSON.stringify(js(t)):t;if(te.isArrayBuffer(t)||te.isBuffer(t)||te.isStream(t)||te.isFile(t)||te.isBlob(t)||te.isReadableStream(t))return t;if(te.isArrayBufferView(t))return t.buffer;if(te.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let u;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Sf(t,this.formSerializer).toString();if((u=te.isFileList(t))||r.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return so(u?{"files[]":t}:t,h&&new h,this.formSerializer)}}return a||o?(n.setContentType("application/json",!1),Of(t)):t}],transformResponse:[function(t){const n=this.transitional||sr.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(te.isResponse(t)||te.isReadableStream(t))return t;if(t&&te.isString(t)&&(r&&!this.responseType||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(u){if(s)throw u.name==="SyntaxError"?Ne.from(u,Ne.ERR_BAD_RESPONSE,this,null,this.response):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Dt.classes.FormData,Blob:Dt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};te.forEach(["delete","get","head","post","put","patch"],e=>{sr.headers[e]={}});const _f=te.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"]),Rf=e=>{const t={};let n,r,o;return e&&e.split(`
31
- `).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||t[n]&&_f[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},As=Symbol("internals");function lr(e){return e&&String(e).trim().toLowerCase()}function lo(e){return e===!1||e==null?e:te.isArray(e)?e.map(lo):String(e)}function Tf(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 Nf=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function li(e,t,n,r,o){if(te.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!te.isString(t)){if(te.isString(r))return t.indexOf(r)!==-1;if(te.isRegExp(r))return r.test(t)}}function jf(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Af(e,t){const n=te.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,a,s){return this[r].call(this,t,o,a,s)},configurable:!0})})}class xt{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(u,h,g){const f=lr(h);if(!f)throw new Error("header name must be a non-empty string");const x=te.findKey(o,f);(!x||o[x]===void 0||g===!0||g===void 0&&o[x]!==!1)&&(o[x||h]=lo(u))}const s=(u,h)=>te.forEach(u,(g,f)=>a(g,f,h));if(te.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(te.isString(t)&&(t=t.trim())&&!Nf(t))s(Rf(t),n);else if(te.isHeaders(t))for(const[u,h]of t.entries())a(h,u,r);else t!=null&&a(n,t,r);return this}get(t,n){if(t=lr(t),t){const r=te.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Tf(o);if(te.isFunction(n))return n.call(this,o,r);if(te.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=lr(t),t){const r=te.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||li(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(s){if(s=lr(s),s){const u=te.findKey(r,s);u&&(!n||li(r,r[u],u,n))&&(delete r[u],o=!0)}}return te.isArray(t)?t.forEach(a):a(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const a=n[r];(!t||li(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return te.forEach(this,(o,a)=>{const s=te.findKey(r,a);if(s){n[s]=lo(o),delete n[a];return}const u=t?jf(a):String(a).trim();u!==a&&delete n[a],n[u]=lo(o),r[u]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return te.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&te.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(`
32
- `)}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(o=>r.set(o)),r}static accessor(t){const r=(this[As]=this[As]={accessors:{}}).accessors,o=this.prototype;function a(s){const u=lr(s);r[u]||(Af(o,s),r[u]=!0)}return te.isArray(t)?t.forEach(a):a(t),this}}xt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),te.reduceDescriptors(xt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),te.freezeMethods(xt);function ci(e,t){const n=this||sr,r=t||n,o=xt.from(r.headers);let a=r.data;return te.forEach(e,function(u){a=u.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function Ls(e){return!!(e&&e.__CANCEL__)}function An(e,t,n){Ne.call(this,e??"canceled",Ne.ERR_CANCELED,t,n),this.name="CanceledError"}te.inherits(An,Ne,{__CANCEL__:!0});function Is(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ne("Request failed with status code "+n.status,[Ne.ERR_BAD_REQUEST,Ne.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Lf(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function If(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,s;return t=t!==void 0?t:1e3,function(h){const g=Date.now(),f=r[a];s||(s=g),n[o]=h,r[o]=g;let x=a,l=0;for(;x!==o;)l+=n[x++],x=x%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),g-s<t)return;const y=f&&g-f;return y?Math.round(l*1e3/y):void 0}}function Df(e,t){let n=0;const r=1e3/t;let o=null;return function(){const s=this===!0,u=Date.now();if(s||u-n>r)return o&&(clearTimeout(o),o=null),n=u,e.apply(null,arguments);o||(o=setTimeout(()=>(o=null,n=Date.now(),e.apply(null,arguments)),r-(u-n)))}}const co=(e,t,n=3)=>{let r=0;const o=If(50,250);return Df(a=>{const s=a.loaded,u=a.lengthComputable?a.total:void 0,h=s-r,g=o(h),f=s<=u;r=s;const x={loaded:s,total:u,progress:u?s/u:void 0,bytes:h,rate:g||void 0,estimated:g&&u&&f?(u-s)/g:void 0,event:a,lengthComputable:u!=null};x[t?"download":"upload"]=!0,e(x)},n)},Mf=Dt.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function o(a){let s=a;return t&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{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=o(window.location.href),function(s){const u=te.isString(s)?o(s):s;return u.protocol===r.protocol&&u.host===r.host}}():function(){return function(){return!0}}(),Ff=Dt.hasStandardBrowserEnv?{write(e,t,n,r,o,a){const s=[e+"="+encodeURIComponent(t)];te.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),te.isString(r)&&s.push("path="+r),te.isString(o)&&s.push("domain="+o),a===!0&&s.push("secure"),document.cookie=s.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 Uf(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function $f(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ds(e,t){return e&&!Uf(t)?$f(e,t):t}const Ms=e=>e instanceof xt?{...e}:e;function wn(e,t){t=t||{};const n={};function r(g,f,x){return te.isPlainObject(g)&&te.isPlainObject(f)?te.merge.call({caseless:x},g,f):te.isPlainObject(f)?te.merge({},f):te.isArray(f)?f.slice():f}function o(g,f,x){if(te.isUndefined(f)){if(!te.isUndefined(g))return r(void 0,g,x)}else return r(g,f,x)}function a(g,f){if(!te.isUndefined(f))return r(void 0,f)}function s(g,f){if(te.isUndefined(f)){if(!te.isUndefined(g))return r(void 0,g)}else return r(void 0,f)}function u(g,f,x){if(x in t)return r(g,f);if(x in e)return r(void 0,g)}const h={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u,headers:(g,f)=>o(Ms(g),Ms(f),!0)};return te.forEach(Object.keys(Object.assign({},e,t)),function(f){const x=h[f]||o,l=x(e[f],t[f],f);te.isUndefined(l)&&x!==u||(n[f]=l)}),n}const Fs=e=>{const t=wn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:s,auth:u}=t;t.headers=s=xt.from(s),t.url=Rs(Ds(t.baseURL,t.url),e.params,e.paramsSerializer),u&&s.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):"")));let h;if(te.isFormData(n)){if(Dt.hasStandardBrowserEnv||Dt.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((h=s.getContentType())!==!1){const[g,...f]=h?h.split(";").map(x=>x.trim()).filter(Boolean):[];s.setContentType([g||"multipart/form-data",...f].join("; "))}}if(Dt.hasStandardBrowserEnv&&(r&&te.isFunction(r)&&(r=r(t)),r||r!==!1&&Mf(t.url))){const g=o&&a&&Ff.read(a);g&&s.set(o,g)}return t},Vf=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=Fs(e);let a=o.data;const s=xt.from(o.headers).normalize();let{responseType:u}=o,h;function g(){o.cancelToken&&o.cancelToken.unsubscribe(h),o.signal&&o.signal.removeEventListener("abort",h)}let f=new XMLHttpRequest;f.open(o.method.toUpperCase(),o.url,!0),f.timeout=o.timeout;function x(){if(!f)return;const y=xt.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),c={data:!u||u==="text"||u==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:y,config:e,request:f};Is(function(d){n(d),g()},function(d){r(d),g()},c),f=null}"onloadend"in f?f.onloadend=x:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(x)},f.onabort=function(){f&&(r(new Ne("Request aborted",Ne.ECONNABORTED,o,f)),f=null)},f.onerror=function(){r(new Ne("Network Error",Ne.ERR_NETWORK,o,f)),f=null},f.ontimeout=function(){let i=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const c=o.transitional||Ns;o.timeoutErrorMessage&&(i=o.timeoutErrorMessage),r(new Ne(i,c.clarifyTimeoutError?Ne.ETIMEDOUT:Ne.ECONNABORTED,o,f)),f=null},a===void 0&&s.setContentType(null),"setRequestHeader"in f&&te.forEach(s.toJSON(),function(i,c){f.setRequestHeader(c,i)}),te.isUndefined(o.withCredentials)||(f.withCredentials=!!o.withCredentials),u&&u!=="json"&&(f.responseType=o.responseType),typeof o.onDownloadProgress=="function"&&f.addEventListener("progress",co(o.onDownloadProgress,!0)),typeof o.onUploadProgress=="function"&&f.upload&&f.upload.addEventListener("progress",co(o.onUploadProgress)),(o.cancelToken||o.signal)&&(h=y=>{f&&(r(!y||y.type?new An(null,e,f):y),f.abort(),f=null)},o.cancelToken&&o.cancelToken.subscribe(h),o.signal&&(o.signal.aborted?h():o.signal.addEventListener("abort",h)));const l=Lf(o.url);if(l&&Dt.protocols.indexOf(l)===-1){r(new Ne("Unsupported protocol "+l+":",Ne.ERR_BAD_REQUEST,e));return}f.send(a||null)})},Hf=(e,t)=>{let n=new AbortController,r;const o=function(h){if(!r){r=!0,s();const g=h instanceof Error?h:this.reason;n.abort(g instanceof Ne?g:new An(g instanceof Error?g.message:g))}};let a=t&&setTimeout(()=>{o(new Ne(`timeout ${t} of ms exceeded`,Ne.ETIMEDOUT))},t);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(h=>{h&&(h.removeEventListener?h.removeEventListener("abort",o):h.unsubscribe(o))}),e=null)};e.forEach(h=>h&&h.addEventListener&&h.addEventListener("abort",o));const{signal:u}=n;return u.unsubscribe=s,[u,()=>{a&&clearTimeout(a),a=null}]},zf=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},qf=async function*(e,t,n){for await(const r of e)yield*zf(ArrayBuffer.isView(r)?r:await n(String(r)),t)},Us=(e,t,n,r,o)=>{const a=qf(e,t,o);let s=0;return new ReadableStream({type:"bytes",async pull(u){const{done:h,value:g}=await a.next();if(h){u.close(),r();return}let f=g.byteLength;n&&n(s+=f),u.enqueue(new Uint8Array(g))},cancel(u){return r(u),a.return()}},{highWaterMark:2})},$s=(e,t)=>{const n=e!=null;return r=>setTimeout(()=>t({lengthComputable:n,total:e,loaded:r}))},uo=typeof fetch<"u",Vs=uo&&typeof ReadableStream<"u",ui=uo&&(typeof TextEncoder<"u"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Kf=Vs&&(()=>{let e=!1;const t=new Request(Dt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),Hs=64*1024,di=Vs&&!!(()=>{try{return te.isReadableStream(new Response("").body)}catch{}})(),fo={stream:di&&(e=>e.body)};uo&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!fo[t]&&(fo[t]=te.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Ne(`Response type '${t}' is not supported`,Ne.ERR_NOT_SUPPORT,r)})})})(new Response);const Wf=async e=>{if(e==null)return 0;if(te.isBlob(e))return e.size;if(te.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(te.isArrayBufferView(e))return e.byteLength;if(te.isURLSearchParams(e)&&(e=e+""),te.isString(e))return(await ui(e)).byteLength},Gf=async(e,t)=>{const n=te.toFiniteNumber(e.getContentLength());return n??Wf(t)},fi={http:yf,xhr:Vf,fetch:uo&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:a,timeout:s,onDownloadProgress:u,onUploadProgress:h,responseType:g,headers:f,withCredentials:x="same-origin",fetchOptions:l}=Fs(e);g=g?(g+"").toLowerCase():"text";let[y,i]=o||a||s?Hf([o,a],s):[],c,p;const d=()=>{!c&&setTimeout(()=>{y&&y.unsubscribe()}),c=!0};let m;try{if(h&&Kf&&n!=="get"&&n!=="head"&&(m=await Gf(f,r))!==0){let S=new Request(t,{method:"POST",body:r,duplex:"half"}),k;te.isFormData(r)&&(k=S.headers.get("content-type"))&&f.setContentType(k),S.body&&(r=Us(S.body,Hs,$s(m,co(h)),null,ui))}te.isString(x)||(x=x?"cors":"omit"),p=new Request(t,{...l,signal:y,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",withCredentials:x});let v=await fetch(p);const b=di&&(g==="stream"||g==="response");if(di&&(u||b)){const S={};["status","statusText","headers"].forEach(B=>{S[B]=v[B]});const k=te.toFiniteNumber(v.headers.get("content-length"));v=new Response(Us(v.body,Hs,u&&$s(k,co(u,!0)),b&&d,ui),S)}g=g||"text";let C=await fo[te.findKey(fo,g)||"text"](v,e);return!b&&d(),i&&i(),await new Promise((S,k)=>{Is(S,k,{data:C,headers:xt.from(v.headers),status:v.status,statusText:v.statusText,config:e,request:p})})}catch(v){throw d(),v&&v.name==="TypeError"&&/fetch/i.test(v.message)?Object.assign(new Ne("Network Error",Ne.ERR_NETWORK,e,p),{cause:v.cause||v}):Ne.from(v,v&&v.code,e,p)}})};te.forEach(fi,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const zs=e=>`- ${e}`,Xf=e=>te.isFunction(e)||e===null||e===!1,qs={getAdapter:e=>{e=te.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let a=0;a<t;a++){n=e[a];let s;if(r=n,!Xf(n)&&(r=fi[(s=String(n)).toLowerCase()],r===void 0))throw new Ne(`Unknown adapter '${s}'`);if(r)break;o[s||"#"+a]=r}if(!r){const a=Object.entries(o).map(([u,h])=>`adapter ${u} `+(h===!1?"is not supported by the environment":"is not available in the build"));let s=t?a.length>1?`since :
33
- `+a.map(zs).join(`
34
- `):" "+zs(a[0]):"as no adapter specified";throw new Ne("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:fi};function hi(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new An(null,e)}function Ks(e){return hi(e),e.headers=xt.from(e.headers),e.data=ci.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),qs.getAdapter(e.adapter||sr.adapter)(e).then(function(r){return hi(e),r.data=ci.call(e,e.transformResponse,r),r.headers=xt.from(r.headers),r},function(r){return Ls(r)||(hi(e),r&&r.response&&(r.response.data=ci.call(e,e.transformResponse,r.response),r.response.headers=xt.from(r.response.headers))),Promise.reject(r)})}const Ws="1.7.1",pi={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{pi[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Gs={};pi.transitional=function(t,n,r){function o(a,s){return"[Axios v"+Ws+"] Transitional option '"+a+"'"+s+(r?". "+r:"")}return(a,s,u)=>{if(t===!1)throw new Ne(o(s," has been removed"+(n?" in "+n:"")),Ne.ERR_DEPRECATED);return n&&!Gs[s]&&(Gs[s]=!0,console.warn(o(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,s,u):!0}};function Jf(e,t,n){if(typeof e!="object")throw new Ne("options must be an object",Ne.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],s=t[a];if(s){const u=e[a],h=u===void 0||s(u,a,e);if(h!==!0)throw new Ne("option "+a+" must be "+h,Ne.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ne("Unknown option "+a,Ne.ERR_BAD_OPTION)}}const mi={assertOptions:Jf,validators:pi},cn=mi.validators;class xn{constructor(t){this.defaults=t,this.interceptors={request:new Ts,response:new Ts}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const a=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
35
- `+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=wn(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&mi.assertOptions(r,{silentJSONParsing:cn.transitional(cn.boolean),forcedJSONParsing:cn.transitional(cn.boolean),clarifyTimeoutError:cn.transitional(cn.boolean)},!1),o!=null&&(te.isFunction(o)?n.paramsSerializer={serialize:o}:mi.assertOptions(o,{encode:cn.function,serialize:cn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=a&&te.merge(a.common,a[n.method]);a&&te.forEach(["delete","get","head","post","put","patch","common"],i=>{delete a[i]}),n.headers=xt.concat(s,a);const u=[];let h=!0;this.interceptors.request.forEach(function(c){typeof c.runWhen=="function"&&c.runWhen(n)===!1||(h=h&&c.synchronous,u.unshift(c.fulfilled,c.rejected))});const g=[];this.interceptors.response.forEach(function(c){g.push(c.fulfilled,c.rejected)});let f,x=0,l;if(!h){const i=[Ks.bind(this),void 0];for(i.unshift.apply(i,u),i.push.apply(i,g),l=i.length,f=Promise.resolve(n);x<l;)f=f.then(i[x++],i[x++]);return f}l=u.length;let y=n;for(x=0;x<l;){const i=u[x++],c=u[x++];try{y=i(y)}catch(p){c.call(this,p);break}}try{f=Ks.call(this,y)}catch(i){return Promise.reject(i)}for(x=0,l=g.length;x<l;)f=f.then(g[x++],g[x++]);return f}getUri(t){t=wn(this.defaults,t);const n=Ds(t.baseURL,t.url);return Rs(n,t.params,t.paramsSerializer)}}te.forEach(["delete","get","head","options"],function(t){xn.prototype[t]=function(n,r){return this.request(wn(r||{},{method:t,url:n,data:(r||{}).data}))}}),te.forEach(["post","put","patch"],function(t){function n(r){return function(a,s,u){return this.request(wn(u||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:s}))}}xn.prototype[t]=n(),xn.prototype[t+"Form"]=n(!0)});class gi{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const s=new Promise(u=>{r.subscribe(u),a=u}).then(o);return s.cancel=function(){r.unsubscribe(a)},s},t(function(a,s,u){r.reason||(r.reason=new An(a,s,u),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 gi(function(o){t=o}),cancel:t}}}function Yf(e){return function(n){return e.apply(null,n)}}function Qf(e){return te.isObject(e)&&e.isAxiosError===!0}const yi={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(yi).forEach(([e,t])=>{yi[t]=e});function Xs(e){const t=new xn(e),n=ps(xn.prototype.request,t);return te.extend(n,xn.prototype,t,{allOwnKeys:!0}),te.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Xs(wn(e,o))},n}const ot=Xs(sr);ot.Axios=xn,ot.CanceledError=An,ot.CancelToken=gi,ot.isCancel=Ls,ot.VERSION=Ws,ot.toFormData=so,ot.AxiosError=Ne,ot.Cancel=ot.CanceledError,ot.all=function(t){return Promise.all(t)},ot.spread=Yf,ot.isAxiosError=Qf,ot.mergeConfig=wn,ot.AxiosHeaders=xt,ot.formToJSON=e=>js(te.isHTMLForm(e)?new FormData(e):e),ot.getAdapter=qs.getAdapter,ot.HttpStatusCode=yi,ot.default=ot;const Zf=e=>{var n,r,o,a;const t=(n=e.response)==null?void 0:n.status;if(t&&t!==401){const s=(r=e.response)==null?void 0:r.data;console.table(s);const u=(o=e.response)==null?void 0:o.data.errors,h=E.jsxs("div",{children:[E.jsx("p",{children:(a=e.response)==null?void 0:a.data.message}),u&&Object.keys(u).map(g=>u[g].map(f=>E.jsx("li",{children:f},f)))]});De.error(h)}return Promise.reject(e)};class eh{constructor(){Gu(this,"instance",ot.create())}initialize(t,n){this.instance=ot.create({baseURL:n||"https://api.piggy.eu",headers:{Authorization:`Bearer ${t}`}}),this.instance.interceptors.response.use(void 0,Zf)}}const it=new eh;var vi={exports:{}},bi={};/**
30
+ <%s key={someKey} {...props} />`,an,lt,Go,lt),ve[lt+an]=!0}}return T===r?we(Xe):Pe(Xe),Xe}}function _e(T,se,ye){return Re(T,se,ye,!0)}function dt(T,se,ye){return Re(T,se,ye,!1)}var ft=dt,Se=_e;Yn.Fragment=r,Yn.jsx=ft,Yn.jsxs=Se}()),Yn}process.env.NODE_ENV==="production"?Jo.exports=Yu():Jo.exports=Qu();var E=Jo.exports,Tn=(e=>(e.REDEEM_GIFTCARD="REDEEM_GIFTCARD",e.TOP_UP_GIFTCARD="TOP_UP_GIFTCARD",e.PORTAL="PORTAL",e.PREPAID="PREPAID",e.SAVE="SAVE",e.VOUCHER="VOUCHER",e))(Tn||{}),Zt=(e=>(e.REDEEM_GIFTCARD="/redeem_giftcard",e.TOP_UP_GIFTCARD="/top_up_giftcard",e.PORTAL="/portal",e.PREPAID="/prepaid",e.SAVE="/save",e.VOUCHER="/voucher",e))(Zt||{});const Zu={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 Kr{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||Zu,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,o){return o&&!this.debug?null:(typeof t[0]=="string"&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new Kr(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Kr(this.logger,t)}}var Gt=new Kr;class Wr{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+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),o=1;o<n;o++)r[o-1]=arguments[o];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(s=>{let[u,h]=s;for(let g=0;g<h;g++)u(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(s=>{let[u,h]=s;for(let g=0;g<h;g++)u.apply(u,[t,...r])})}}function Qn(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function Ja(e){return e==null?"":""+e}function ed(e,t,n){e.forEach(r=>{t[r]&&(n[r]=t[r])})}const td=/###/g;function Zn(e,t,n){function r(u){return u&&u.indexOf("###")>-1?u.replace(td,"."):u}function o(){return!e||typeof e=="string"}const a=typeof t!="string"?t:t.split(".");let s=0;for(;s<a.length-1;){if(o())return{};const u=r(a[s]);!e[u]&&n&&(e[u]=new n),Object.prototype.hasOwnProperty.call(e,u)?e=e[u]:e={},++s}return o()?{}:{obj:e,k:r(a[s])}}function Ya(e,t,n){const{obj:r,k:o}=Zn(e,t,Object);if(r!==void 0||t.length===1){r[o]=n;return}let a=t[t.length-1],s=t.slice(0,t.length-1),u=Zn(e,s,Object);for(;u.obj===void 0&&s.length;)a=`${s[s.length-1]}.${a}`,s=s.slice(0,s.length-1),u=Zn(e,s,Object),u&&u.obj&&typeof u.obj[`${u.k}.${a}`]<"u"&&(u.obj=void 0);u.obj[`${u.k}.${a}`]=n}function nd(e,t,n,r){const{obj:o,k:a}=Zn(e,t,Object);o[a]=o[a]||[],o[a].push(n)}function Gr(e,t){const{obj:n,k:r}=Zn(e,t);if(n)return n[r]}function rd(e,t,n){const r=Gr(e,n);return r!==void 0?r:Gr(t,n)}function Qa(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]):Qa(e[r],t[r],n):e[r]=t[r]);return e}function Nn(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var od={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function id(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>od[t]):e}class ad{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 sd=[" ",",","?","!",";"],ld=new ad(20);function cd(e,t,n){t=t||"",n=n||"";const r=sd.filter(s=>t.indexOf(s)<0&&n.indexOf(s)<0);if(r.length===0)return!0;const o=ld.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let a=!o.test(e);if(!a){const s=e.indexOf(n);s>0&&!o.test(e.substring(0,s))&&(a=!0)}return a}function Yo(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 o=e;for(let a=0;a<r.length;){if(!o||typeof o!="object")return;let s,u="";for(let h=a;h<r.length;++h)if(h!==a&&(u+=n),u+=r[h],s=o[u],s!==void 0){if(["string","number","boolean"].indexOf(typeof s)>-1&&h<r.length-1)continue;a+=h-a+1;break}o=s}return o}function Xr(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}class Za extends Wr{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 o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,s=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let u;t.indexOf(".")>-1?u=t.split("."):(u=[t,n],r&&(Array.isArray(r)?u.push(...r):typeof r=="string"&&a?u.push(...r.split(a)):u.push(r)));const h=Gr(this.data,u);return!h&&!n&&!r&&t.indexOf(".")>-1&&(t=u[0],n=u[1],r=u.slice(2).join(".")),h||!s||typeof r!="string"?h:Yo(this.data&&this.data[t]&&this.data[t][n],r,a)}addResource(t,n,r,o){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let u=[t,n];r&&(u=u.concat(s?r.split(s):r)),t.indexOf(".")>-1&&(u=t.split("."),o=n,n=u[1]),this.addNamespaces(n),Ya(this.data,u,o),a.silent||this.emit("added",t,n,r,o)}addResources(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in r)(typeof r[a]=="string"||Array.isArray(r[a]))&&this.addResource(t,n,a,r[a],{silent:!0});o.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,o,a){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},u=[t,n];t.indexOf(".")>-1&&(u=t.split("."),o=r,r=n,n=u[1]),this.addNamespaces(n);let h=Gr(this.data,u)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?Qa(h,r,a):h={...h,...r},Ya(this.data,u,h),s.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(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var es={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(a=>{this.processors[a]&&(t=this.processors[a].process(t,n,r,o))}),t}};const ts={};class Jr extends Wr{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),ed(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Gt.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 o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let a=n.ns||this.options.defaultNS||[];const s=r&&t.indexOf(r)>-1,u=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!cd(t,r,o);if(s&&!u){const h=t.match(this.interpolator.nestingRegexp);if(h&&h.length>0)return{key:t,namespaces:a};const g=t.split(r);(r!==o||r===o&&this.options.ns.indexOf(g[0])>-1)&&(a=g.shift()),t=g.join(o)}return typeof a=="string"&&(a=[a]),{key:t,namespaces:a}}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 o=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:s,namespaces:u}=this.extractFromKey(t[t.length-1],n),h=u[u.length-1],g=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(g&&g.toLowerCase()==="cimode"){if(f){const b=n.nsSeparator||this.options.nsSeparator;return o?{res:`${h}${b}${s}`,usedKey:s,exactUsedKey:s,usedLng:g,usedNS:h,usedParams:this.getUsedParamsDetails(n)}:`${h}${b}${s}`}return o?{res:s,usedKey:s,exactUsedKey:s,usedLng:g,usedNS:h,usedParams:this.getUsedParamsDetails(n)}:s}const x=this.resolve(t,n);let l=x&&x.res;const y=x&&x.usedKey||s,i=x&&x.exactUsedKey||s,c=Object.prototype.toString.apply(l),p=["[object Number]","[object Function]","[object RegExp]"],d=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,m=!this.i18nFormat||this.i18nFormat.handleAsObject;if(m&&l&&(typeof l!="string"&&typeof l!="boolean"&&typeof l!="number")&&p.indexOf(c)<0&&!(typeof d=="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 b=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,l,{...n,ns:u}):`key '${s} (${this.language})' returned an object instead of string.`;return o?(x.res=b,x.usedParams=this.getUsedParamsDetails(n),x):b}if(a){const b=Array.isArray(l),C=b?[]:{},S=b?i:y;for(const k in l)if(Object.prototype.hasOwnProperty.call(l,k)){const B=`${S}${a}${k}`;C[k]=this.translate(B,{...n,joinArrays:!1,ns:u}),C[k]===B&&(C[k]=l[k])}l=C}}else if(m&&typeof d=="string"&&Array.isArray(l))l=l.join(d),l&&(l=this.extendTranslation(l,t,n,r));else{let b=!1,C=!1;const S=n.count!==void 0&&typeof n.count!="string",k=Jr.hasDefaultValue(n),B=S?this.pluralResolver.getSuffix(g,n.count,n):"",O=n.ordinal&&S?this.pluralResolver.getSuffix(g,n.count,{ordinal:!1}):"",j=S&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),I=j&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${B}`]||n[`defaultValue${O}`]||n.defaultValue;!this.isValidLookup(l)&&k&&(b=!0,l=I),this.isValidLookup(l)||(C=!0,l=s);const M=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:l,$=k&&I!==l&&this.options.updateMissing;if(C||b||$){if(this.logger.log($?"updateKey":"missingKey",g,h,s,$?I:l),a){const K=this.resolve(s,{...n,keySeparator:!1});K&&K.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 P=[];const L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&L&&L[0])for(let K=0;K<L.length;K++)P.push(L[K]);else this.options.saveMissingTo==="all"?P=this.languageUtils.toResolveHierarchy(n.lng||this.language):P.push(n.lng||this.language);const q=(K,Q,Z)=>{const ee=k&&Z!==l?Z:M;this.options.missingKeyHandler?this.options.missingKeyHandler(K,h,Q,ee,$,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(K,h,Q,ee,$,n),this.emit("missingKey",K,h,Q,l)};this.options.saveMissing&&(this.options.saveMissingPlurals&&S?P.forEach(K=>{const Q=this.pluralResolver.getSuffixes(K,n);j&&n[`defaultValue${this.options.pluralSeparator}zero`]&&Q.indexOf(`${this.options.pluralSeparator}zero`)<0&&Q.push(`${this.options.pluralSeparator}zero`),Q.forEach(Z=>{q([K],s+Z,n[`defaultValue${Z}`]||I)})}):q(P,s,I))}l=this.extendTranslation(l,t,n,x,r),C&&l===s&&this.options.appendNamespaceToMissingKey&&(l=`${h}:${s}`),(C||b)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?l=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${h}:${s}`:s,b?l:void 0):l=this.options.parseMissingKeyHandler(l))}return o?(x.res=l,x.usedParams=this.getUsedParamsDetails(n),x):l}extendTranslation(t,n,r,o,a){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const g=typeof t=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(g){const l=t.match(this.interpolator.nestingRegexp);f=l&&l.length}let x=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(x={...this.options.interpolation.defaultVariables,...x}),t=this.interpolator.interpolate(t,x,r.lng||this.language,r),g){const l=t.match(this.interpolator.nestingRegexp),y=l&&l.length;f<y&&(r.nest=!1)}!r.lng&&this.options.compatibilityAPI!=="v1"&&o&&o.res&&(r.lng=o.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var l=arguments.length,y=new Array(l),i=0;i<l;i++)y[i]=arguments[i];return a&&a[0]===y[0]&&!r.context?(s.logger.warn(`It seems you are nesting recursively key: ${y[0]} in key: ${n[0]}`),null):s.translate(...y,n)},r)),r.interpolation&&this.interpolator.reset()}const u=r.postProcess||this.options.postProcess,h=typeof u=="string"?[u]:u;return t!=null&&h&&h.length&&r.applyPostProcessor!==!1&&(t=es.handle(h,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,o,a,s,u;return typeof t=="string"&&(t=[t]),t.forEach(h=>{if(this.isValidLookup(r))return;const g=this.extractFromKey(h,n),f=g.key;o=f;let x=g.namespaces;this.options.fallbackNS&&(x=x.concat(this.options.fallbackNS));const l=n.count!==void 0&&typeof n.count!="string",y=l&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),i=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",c=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);x.forEach(p=>{this.isValidLookup(r)||(u=p,!ts[`${c[0]}-${p}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(u)&&(ts[`${c[0]}-${p}`]=!0,this.logger.warn(`key "${o}" for languages "${c.join(", ")}" won't get resolved as namespace "${u}" 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!!!")),c.forEach(d=>{if(this.isValidLookup(r))return;s=d;const m=[f];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(m,f,d,p,n);else{let b;l&&(b=this.pluralResolver.getSuffix(d,n.count,n));const C=`${this.options.pluralSeparator}zero`,S=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(l&&(m.push(f+b),n.ordinal&&b.indexOf(S)===0&&m.push(f+b.replace(S,this.options.pluralSeparator)),y&&m.push(f+C)),i){const k=`${f}${this.options.contextSeparator}${n.context}`;m.push(k),l&&(m.push(k+b),n.ordinal&&b.indexOf(S)===0&&m.push(k+b.replace(S,this.options.pluralSeparator)),y&&m.push(k+C))}}let v;for(;v=m.pop();)this.isValidLookup(r)||(a=v,r=this.getResource(d,p,v,n))}))})}),{res:r,usedKey:o,exactUsedKey:a,usedLng:s,usedNS:u}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}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 o=r?t.replace:t;if(r&&typeof t.count<"u"&&(o.count=t.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const a of n)delete o[a]}return o}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 Qo(e){return e.charAt(0).toUpperCase()+e.slice(1)}class ns{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Gt.create("languageUtils")}getScriptPartFromCode(t){if(t=Xr(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=Xr(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(o=>o.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Qo(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]=Qo(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=Qo(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 o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(a=>{if(a===o)return a;if(!(a.indexOf("-")<0&&o.indexOf("-")<0)&&(a.indexOf("-")>0&&o.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===o||a.indexOf(o)===0&&o.length>1))return a})}),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),o=[],a=s=>{s&&(this.isSupportedCode(s)?o.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(t))):typeof t=="string"&&a(this.formatLanguageCode(t)),r.forEach(s=>{o.indexOf(s)<0&&a(this.formatLanguageCode(s))}),o}}let ud=[{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}],dd={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 fd=["v1","v2","v3"],hd=["v4"],rs={zero:0,one:1,two:2,few:3,many:4,other:5};function pd(){const e={};return ud.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:dd[t.fc]}})}),e}class md{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=Gt.create("pluralResolver"),(!this.options.compatibilityJSON||hd.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=pd()}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(Xr(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(o=>`${n}${o}`)}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((o,a)=>rs[o]-rs[a]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):r.numbers.map(o=>this.getSuffix(t,o,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(t,r);return o?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:this.getSuffixRetroCompatible(o,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 o=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));const a=()=>this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString();return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?`_plural_${o.toString()}`:a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?a():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!fd.includes(this.options.compatibilityJSON)}}function os(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=rd(e,t,n);return!a&&o&&typeof n=="string"&&(a=Yo(e,n,r),a===void 0&&(a=Yo(t,n,r))),a}class gd{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Gt.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:o,prefix:a,prefixEscaped:s,suffix:u,suffixEscaped:h,formatSeparator:g,unescapeSuffix:f,unescapePrefix:x,nestingPrefix:l,nestingPrefixEscaped:y,nestingSuffix:i,nestingSuffixEscaped:c,nestingOptionsSeparator:p,maxReplaces:d,alwaysFormat:m}=t.interpolation;this.escape=n!==void 0?n:id,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=a?Nn(a):s||"{{",this.suffix=u?Nn(u):h||"}}",this.formatSeparator=g||",",this.unescapePrefix=f?"":x||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=l?Nn(l):y||Nn("$t("),this.nestingSuffix=i?Nn(i):c||Nn(")"),this.nestingOptionsSeparator=p||",",this.maxReplaces=d||1e3,this.alwaysFormat=m!==void 0?m:!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,o){let a,s,u;const h=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function g(i){return i.replace(/\$/g,"$$$$")}const f=i=>{if(i.indexOf(this.formatSeparator)<0){const m=os(n,h,i,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(m,void 0,r,{...o,...n,interpolationkey:i}):m}const c=i.split(this.formatSeparator),p=c.shift().trim(),d=c.join(this.formatSeparator).trim();return this.format(os(n,h,p,this.options.keySeparator,this.options.ignoreJSONStructure),d,r,{...o,...n,interpolationkey:p})};this.resetRegExp();const x=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,l=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:i=>g(i)},{regex:this.regexp,safeValue:i=>this.escapeValue?g(this.escape(i)):g(i)}].forEach(i=>{for(u=0;a=i.regex.exec(t);){const c=a[1].trim();if(s=f(c),s===void 0)if(typeof x=="function"){const d=x(t,a,o);s=typeof d=="string"?d:""}else if(o&&Object.prototype.hasOwnProperty.call(o,c))s="";else if(l){s=a[0];continue}else this.logger.warn(`missed to pass in variable ${c} for interpolating ${t}`),s="";else typeof s!="string"&&!this.useRawValueToEscape&&(s=Ja(s));const p=i.safeValue(s);if(t=t.replace(a[0],p),l?(i.regex.lastIndex+=s.length,i.regex.lastIndex-=a[0].length):i.regex.lastIndex=0,u++,u>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,a,s;function u(h,g){const f=this.nestingOptionsSeparator;if(h.indexOf(f)<0)return h;const x=h.split(new RegExp(`${f}[ ]*{`));let l=`{${x[1]}`;h=x[0],l=this.interpolate(l,s);const y=l.match(/'/g),i=l.match(/"/g);(y&&y.length%2===0&&!i||i.length%2!==0)&&(l=l.replace(/'/g,'"'));try{s=JSON.parse(l),g&&(s={...g,...s})}catch(c){return this.logger.warn(`failed parsing options string in nesting for key ${h}`,c),`${h}${f}${l}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,h}for(;o=this.nestingRegexp.exec(t);){let h=[];s={...r},s=s.replace&&typeof s.replace!="string"?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let g=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const f=o[1].split(this.formatSeparator).map(x=>x.trim());o[1]=f.shift(),h=f,g=!0}if(a=n(u.call(this,o[1].trim(),s),s),a&&o[0]===t&&typeof a!="string")return a;typeof a!="string"&&(a=Ja(a)),a||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),a=""),g&&(a=h.reduce((f,x)=>this.format(f,x,r.lng,{...r,interpolationkey:o[1].trim()}),a.trim())),t=t.replace(o[0],a),this.regexp.lastIndex=0}return t}}function yd(e){let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);t==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):t==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(s=>{if(s){const[u,...h]=s.split(":"),g=h.join(":").trim().replace(/^'+|'+$/g,""),f=u.trim();n[f]||(n[f]=g),g==="false"&&(n[f]=!1),g==="true"&&(n[f]=!0),isNaN(g)||(n[f]=parseInt(g,10))}})}return{formatName:t,formatOptions:n}}function jn(e){const t={};return function(r,o,a){const s=o+JSON.stringify(a);let u=t[s];return u||(u=e(Xr(o),a),t[s]=u),u(r)}}class vd{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Gt.create("formatter"),this.options=t,this.formats={number:jn((n,r)=>{const o=new Intl.NumberFormat(n,{...r});return a=>o.format(a)}),currency:jn((n,r)=>{const o=new Intl.NumberFormat(n,{...r,style:"currency"});return a=>o.format(a)}),datetime:jn((n,r)=>{const o=new Intl.DateTimeFormat(n,{...r});return a=>o.format(a)}),relativetime:jn((n,r)=>{const o=new Intl.RelativeTimeFormat(n,{...r});return a=>o.format(a,r.range||"day")}),list:jn((n,r)=>{const o=new Intl.ListFormat(n,{...r});return a=>o.format(a)})},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()]=jn(n)}format(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((u,h)=>{const{formatName:g,formatOptions:f}=yd(h);if(this.formats[g]){let x=u;try{const l=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},y=l.locale||l.lng||o.locale||o.lng||r;x=this.formats[g](u,y,{...f,...o,...l})}catch(l){this.logger.warn(l)}return x}else this.logger.warn(`there was no format function for ${g}`);return u},t)}}function bd(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}class wd extends Wr{constructor(t,n,r){let o=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=o,this.logger=Gt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,o.backend,o)}queueLoad(t,n,r,o){const a={},s={},u={},h={};return t.forEach(g=>{let f=!0;n.forEach(x=>{const l=`${g}|${x}`;!r.reload&&this.store.hasResourceBundle(g,x)?this.state[l]=2:this.state[l]<0||(this.state[l]===1?s[l]===void 0&&(s[l]=!0):(this.state[l]=1,f=!1,s[l]===void 0&&(s[l]=!0),a[l]===void 0&&(a[l]=!0),h[x]===void 0&&(h[x]=!0)))}),f||(u[g]=!0)}),(Object.keys(a).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(a),pending:Object.keys(s),toLoadLanguages:Object.keys(u),toLoadNamespaces:Object.keys(h)}}loaded(t,n,r){const o=t.split("|"),a=o[0],s=o[1];n&&this.emit("failedLoading",a,s,n),r&&this.store.addResourceBundle(a,s,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2;const u={};this.queue.forEach(h=>{nd(h.loaded,[a],s),bd(h,t),n&&h.errors.push(n),h.pendingCount===0&&!h.done&&(Object.keys(h.loaded).forEach(g=>{u[g]||(u[g]={});const f=h.loaded[g];f.length&&f.forEach(x=>{u[g][x]===void 0&&(u[g][x]=!0)})}),h.done=!0,h.errors.length?h.callback(h.errors):h.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(h=>!h.done)}read(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:a,callback:s});return}this.readingCalls++;const u=(g,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const x=this.waitingReads.shift();this.read(x.lng,x.ns,x.fcName,x.tried,x.wait,x.callback)}if(g&&f&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,o+1,a*2,s)},a);return}s(g,f)},h=this.backend[r].bind(this.backend);if(h.length===2){try{const g=h(t,n);g&&typeof g.then=="function"?g.then(f=>u(null,f)).catch(u):u(null,g)}catch(g){u(g)}return}return h(t,n,u)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=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."),o&&o();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);const a=this.queueLoad(t,n,r,o);if(!a.toLoad.length)return a.pending.length||o(),null;a.toLoad.forEach(s=>{this.loadOne(s)})}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("|"),o=r[0],a=r[1];this.read(o,a,"read",void 0,void 0,(s,u)=>{s&&this.logger.warn(`${n}loading namespace ${a} for language ${o} failed`,s),!s&&u&&this.logger.log(`${n}loaded namespace ${a} for language ${o}`,u),this.loaded(t,s,u)})}saveMissing(t,n,r,o,a){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},u=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 h={...s,isUpdate:a},g=this.backend.create.bind(this.backend);if(g.length<6)try{let f;g.length===5?f=g(t,n,r,o,h):f=g(t,n,r,o),f&&typeof f.then=="function"?f.then(x=>u(null,x)).catch(u):u(null,f)}catch(f){u(f)}else g(t,n,r,o,u,h)}!t||!t[0]||this.store.addResource(t[0],n,r,o)}}}function is(){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(o=>{n[o]=r[o]})}return n},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function as(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 Yr(){}function xd(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}class er extends Wr{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=as(t),this.services={},this.logger=Gt,this.modules={external:[]},xd(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 o=is();this.options={...o,...this.options,...as(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...o.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function a(f){return f?typeof f=="function"?new f:f:null}if(!this.options.isClone){this.modules.logger?Gt.init(a(this.modules.logger),this.options):Gt.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:typeof Intl<"u"&&(f=vd);const x=new ns(this.options);this.store=new Za(this.options.resources,this.options);const l=this.services;l.logger=Gt,l.resourceStore=this.store,l.languageUtils=x,l.pluralResolver=new md(x,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),f&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(l.formatter=a(f),l.formatter.init(l,this.options),this.options.interpolation.format=l.formatter.format.bind(l.formatter)),l.interpolator=new gd(this.options),l.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},l.backendConnector=new wd(a(this.modules.backend),l.resourceStore,l,this.options),l.backendConnector.on("*",function(y){for(var i=arguments.length,c=new Array(i>1?i-1:0),p=1;p<i;p++)c[p-1]=arguments[p];t.emit(y,...c)}),this.modules.languageDetector&&(l.languageDetector=a(this.modules.languageDetector),l.languageDetector.init&&l.languageDetector.init(l,this.options.detection,this.options)),this.modules.i18nFormat&&(l.i18nFormat=a(this.modules.i18nFormat),l.i18nFormat.init&&l.i18nFormat.init(this)),this.translator=new Jr(this.services,this.options),this.translator.on("*",function(y){for(var i=arguments.length,c=new Array(i>1?i-1:0),p=1;p<i;p++)c[p-1]=arguments[p];t.emit(y,...c)}),this.modules.external.forEach(y=>{y.init&&y.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Yr),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 h=Qn(),g=()=>{const f=(x,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),h.resolve(l),r(x,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?g():setTimeout(g,0),h}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Yr;const o=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(o&&o.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const a=[],s=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(g=>{g!=="cimode"&&a.indexOf(g)<0&&a.push(g)})};o?s(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(h=>s(h)),this.options.preload&&this.options.preload.forEach(u=>s(u)),this.services.backendConnector.load(a,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(u)})}else r(null)}reloadResources(t,n,r){const o=Qn();return t||(t=this.languages),n||(n=this.options.ns),r||(r=Yr),this.services.backendConnector.reload(t,n,a=>{o.resolve(),r(a)}),o}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"&&es.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 o=Qn();this.emit("languageChanging",t);const a=h=>{this.language=h,this.languages=this.services.languageUtils.toResolveHierarchy(h),this.resolvedLanguage=void 0,this.setResolvedLanguage(h)},s=(h,g)=>{g?(a(g),this.translator.changeLanguage(g),this.isLanguageChangingTo=void 0,this.emit("languageChanged",g),this.logger.log("languageChanged",g)):this.isLanguageChangingTo=void 0,o.resolve(function(){return r.t(...arguments)}),n&&n(h,function(){return r.t(...arguments)})},u=h=>{!t&&!h&&this.services.languageDetector&&(h=[]);const g=typeof h=="string"?h:this.services.languageUtils.getBestMatchFromCodes(h);g&&(this.language||a(g),this.translator.language||this.translator.changeLanguage(g),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(g)),this.loadResources(g,f=>{s(f,g)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(u):this.services.languageDetector.detect(u):u(t),o}getFixedT(t,n,r){var o=this;const a=function(s,u){let h;if(typeof u!="object"){for(var g=arguments.length,f=new Array(g>2?g-2:0),x=2;x<g;x++)f[x-2]=arguments[x];h=o.options.overloadTranslationOptionHandler([s,u].concat(f))}else h={...u};h.lng=h.lng||a.lng,h.lngs=h.lngs||a.lngs,h.ns=h.ns||a.ns,h.keyPrefix=h.keyPrefix||r||a.keyPrefix;const l=o.options.keySeparator||".";let y;return h.keyPrefix&&Array.isArray(s)?y=s.map(i=>`${h.keyPrefix}${l}${i}`):y=h.keyPrefix?`${h.keyPrefix}${l}${s}`:s,o.t(y,h)};return typeof t=="string"?a.lng=t:a.lngs=t,a.ns=n,a.keyPrefix=r,a}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],o=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(u,h)=>{const g=this.services.backendConnector.state[`${u}|${h}`];return g===-1||g===2};if(n.precheck){const u=n.precheck(this,s);if(u!==void 0)return u}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!o||s(a,t)))}loadNamespaces(t,n){const r=Qn();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Qn();typeof t=="string"&&(t=[t]);const o=this.options.preload||[],a=t.filter(s=>o.indexOf(s)<0&&this.services.languageUtils.isSupportedCode(s));return a.length?(this.options.preload=o.concat(a),this.loadResources(s=>{r.resolve(),n&&n(s)}),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 ns(is());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 er(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Yr;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},a=new er(o);return(t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),["store","services","language"].forEach(u=>{a[u]=this[u]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new Za(this.store.data,o),a.services.resourceStore=a.store),a.translator=new Jr(a.services,o),a.translator.on("*",function(u){for(var h=arguments.length,g=new Array(h>1?h-1:0),f=1;f<h;f++)g[f-1]=arguments[f];a.emit(u,...g)}),a.init(o,n),a.translator.options=o,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const pt=er.createInstance();pt.createInstance=er.createInstance,pt.createInstance,pt.dir,pt.init,pt.loadResources,pt.reloadResources,pt.use,pt.changeLanguage,pt.getFixedT,pt.t,pt.exists,pt.setDefaultNamespace,pt.hasLoadedNamespace,pt.loadNamespaces,pt.loadLanguages;const tr=(e,t="EUR")=>new Intl.NumberFormat(pt.language,{style:"currency",currency:t??"EUR"}).format(e/100);function ss(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=ss(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ln(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=ss(e))&&(r&&(r+=" "),r+=t);return r}const nr=e=>typeof e=="number"&&!isNaN(e),bn=e=>typeof e=="string",St=e=>typeof e=="function",Qr=e=>bn(e)||St(e)?e:null,Zo=e=>H.isValidElement(e)||bn(e)||St(e)||nr(e);function kd(e,t,n){n===void 0&&(n=300);const{scrollHeight:r,style:o}=e;requestAnimationFrame(()=>{o.minHeight="initial",o.height=r+"px",o.transition=`all ${n}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,n)})})}function Zr(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:o=!0,collapseDuration:a=300}=e;return function(s){let{children:u,position:h,preventExitTransition:g,done:f,nodeRef:x,isIn:l,playToast:y}=s;const i=r?`${t}--${h}`:t,c=r?`${n}--${h}`:n,p=H.useRef(0);return H.useLayoutEffect(()=>{const d=x.current,m=i.split(" "),v=b=>{b.target===x.current&&(y(),d.removeEventListener("animationend",v),d.removeEventListener("animationcancel",v),p.current===0&&b.type!=="animationcancel"&&d.classList.remove(...m))};d.classList.add(...m),d.addEventListener("animationend",v),d.addEventListener("animationcancel",v)},[]),H.useEffect(()=>{const d=x.current,m=()=>{d.removeEventListener("animationend",m),o?kd(d,f,a):f()};l||(g?m():(p.current=1,d.className+=` ${c}`,d.addEventListener("animationend",m)))},[l]),H.createElement(H.Fragment,null,u)}}function ls(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 vt=new Map;let rr=[];const ei=new Set,Cd=e=>ei.forEach(t=>t(e)),cs=()=>vt.size>0;function us(e,t){var n;if(t)return!((n=vt.get(t))==null||!n.isToastActive(e));let r=!1;return vt.forEach(o=>{o.isToastActive(e)&&(r=!0)}),r}function ds(e,t){Zo(e)&&(cs()||rr.push({content:e,options:t}),vt.forEach(n=>{n.buildToast(e,t)}))}function fs(e,t){vt.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 Ed(e){const{subscribe:t,getSnapshot:n,setProps:r}=H.useRef(function(a){const s=a.containerId||1;return{subscribe(u){const h=function(f,x,l){let y=1,i=0,c=[],p=[],d=[],m=x;const v=new Map,b=new Set,C=()=>{d=Array.from(v.values()),b.forEach(B=>B())},S=B=>{p=B==null?[]:p.filter(O=>O!==B),C()},k=B=>{const{toastId:O,onOpen:j,updateId:I,children:D}=B.props,M=I==null;B.staleId&&v.delete(B.staleId),v.set(O,B),p=[...p,B.props.toastId].filter($=>$!==B.staleId),C(),l(ls(B,M?"added":"updated")),M&&St(j)&&j(H.isValidElement(D)&&D.props)};return{id:f,props:m,observe:B=>(b.add(B),()=>b.delete(B)),toggle:(B,O)=>{v.forEach(j=>{O!=null&&O!==j.props.toastId||St(j.toggle)&&j.toggle(B)})},removeToast:S,toasts:v,clearQueue:()=>{i-=c.length,c=[]},buildToast:(B,O)=>{if((ue=>{let{containerId:ne,toastId:me,updateId:de}=ue;const V=ne?ne!==f:f!==1,U=v.has(me)&&de==null;return V||U})(O))return;const{toastId:j,updateId:I,data:D,staleId:M,delay:$}=O,P=()=>{S(j)},L=I==null;L&&i++;const q={...m,style:m.toastStyle,key:y++,...Object.fromEntries(Object.entries(O).filter(ue=>{let[ne,me]=ue;return me!=null})),toastId:j,updateId:I,data:D,closeToast:P,isIn:!1,className:Qr(O.className||m.toastClassName),bodyClassName:Qr(O.bodyClassName||m.bodyClassName),progressClassName:Qr(O.progressClassName||m.progressClassName),autoClose:!O.isLoading&&(K=O.autoClose,Q=m.autoClose,K===!1||nr(K)&&K>0?K:Q),deleteToast(){const ue=v.get(j),{onClose:ne,children:me}=ue.props;St(ne)&&ne(H.isValidElement(me)&&me.props),l(ls(ue,"removed")),v.delete(j),i--,i<0&&(i=0),c.length>0?k(c.shift()):C()}};var K,Q;q.closeButton=m.closeButton,O.closeButton===!1||Zo(O.closeButton)?q.closeButton=O.closeButton:O.closeButton===!0&&(q.closeButton=!Zo(m.closeButton)||m.closeButton);let Z=B;H.isValidElement(B)&&!bn(B.type)?Z=H.cloneElement(B,{closeToast:P,toastProps:q,data:D}):St(B)&&(Z=B({closeToast:P,toastProps:q,data:D}));const ee={content:Z,props:q,staleId:M};m.limit&&m.limit>0&&i>m.limit&&L?c.push(ee):nr($)?setTimeout(()=>{k(ee)},$):k(ee)},setProps(B){m=B},setToggle:(B,O)=>{v.get(B).toggle=O},isToastActive:B=>p.some(O=>O===B),getSnapshot:()=>m.newestOnTop?d.reverse():d}}(s,a,Cd);vt.set(s,h);const g=h.observe(u);return rr.forEach(f=>ds(f.content,f.options)),rr=[],()=>{g(),vt.delete(s)}},setProps(u){var h;(h=vt.get(s))==null||h.setProps(u)},getSnapshot(){var u;return(u=vt.get(s))==null?void 0:u.getSnapshot()}}}(e)).current;r(e);const o=H.useSyncExternalStore(t,n,n);return{getToastToRender:function(a){if(!o)return[];const s=new Map;return o.forEach(u=>{const{position:h}=u.props;s.has(h)||s.set(h,[]),s.get(h).push(u)}),Array.from(s,u=>a(u[0],u[1]))},isToastActive:us,count:o==null?void 0:o.length}}function Sd(e){const[t,n]=H.useState(!1),[r,o]=H.useState(!1),a=H.useRef(null),s=H.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:u,pauseOnHover:h,closeToast:g,onClick:f,closeOnClick:x}=e;var l,y;function i(){n(!0)}function c(){n(!1)}function p(v){const b=a.current;s.canDrag&&b&&(s.didMove=!0,t&&c(),s.delta=e.draggableDirection==="x"?v.clientX-s.start:v.clientY-s.start,s.start!==v.clientX&&(s.canCloseOnClick=!1),b.style.transform=`translate3d(${e.draggableDirection==="x"?`${s.delta}px, var(--y)`:`0, calc(${s.delta}px + var(--y))`},0)`,b.style.opacity=""+(1-Math.abs(s.delta/s.removalDistance)))}function d(){document.removeEventListener("pointermove",p),document.removeEventListener("pointerup",d);const v=a.current;if(s.canDrag&&s.didMove&&v){if(s.canDrag=!1,Math.abs(s.delta)>s.removalDistance)return o(!0),e.closeToast(),void e.collapseAll();v.style.transition="transform 0.2s, opacity 0.2s",v.style.removeProperty("transform"),v.style.removeProperty("opacity")}}(y=vt.get((l={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||y.setToggle(l.id,l.fn),H.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||c(),window.addEventListener("focus",i),window.addEventListener("blur",c),()=>{window.removeEventListener("focus",i),window.removeEventListener("blur",c)}},[e.pauseOnFocusLoss]);const m={onPointerDown:function(v){if(e.draggable===!0||e.draggable===v.pointerType){s.didMove=!1,document.addEventListener("pointermove",p),document.addEventListener("pointerup",d);const b=a.current;s.canCloseOnClick=!0,s.canDrag=!0,b.style.transition="none",e.draggableDirection==="x"?(s.start=v.clientX,s.removalDistance=b.offsetWidth*(e.draggablePercent/100)):(s.start=v.clientY,s.removalDistance=b.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(v){const{top:b,bottom:C,left:S,right:k}=a.current.getBoundingClientRect();v.nativeEvent.type!=="touchend"&&e.pauseOnHover&&v.clientX>=S&&v.clientX<=k&&v.clientY>=b&&v.clientY<=C?c():i()}};return u&&h&&(m.onMouseEnter=c,e.stacked||(m.onMouseLeave=i)),x&&(m.onClick=v=>{f&&f(v),s.canCloseOnClick&&g()}),{playToast:i,pauseToast:c,isRunning:t,preventExitTransition:r,toastRef:a,eventHandlers:m}}function Pd(e){let{delay:t,isRunning:n,closeToast:r,type:o="default",hide:a,className:s,style:u,controlledProgress:h,progress:g,rtl:f,isIn:x,theme:l}=e;const y=a||h&&g===0,i={...u,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};h&&(i.transform=`scaleX(${g})`);const c=ln("Toastify__progress-bar",h?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${l}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":f}),p=St(s)?s({rtl:f,type:o,defaultClassName:c}):ln(c,s),d={[h&&g>=1?"onTransitionEnd":"onAnimationEnd"]:h&&g<1?null:()=>{x&&r()}};return H.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":y},H.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${l} Toastify__progress-bar--${o}`}),H.createElement("div",{role:"progressbar","aria-hidden":y?"true":"false","aria-label":"notification timer",className:p,style:i,...d}))}let Bd=1;const hs=()=>""+Bd++;function Od(e){return e&&(bn(e.toastId)||nr(e.toastId))?e.toastId:hs()}function or(e,t){return ds(e,t),t.toastId}function eo(e,t){return{...t,type:t&&t.type||e,toastId:Od(t)}}function to(e){return(t,n)=>or(t,eo(e,n))}function De(e,t){return or(e,eo("default",t))}De.loading=(e,t)=>or(e,eo("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),De.promise=function(e,t,n){let r,{pending:o,error:a,success:s}=t;o&&(r=bn(o)?De.loading(o,n):De.loading(o.render,{...n,...o}));const u={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},h=(f,x,l)=>{if(x==null)return void De.dismiss(r);const y={type:f,...u,...n,data:l},i=bn(x)?{render:x}:x;return r?De.update(r,{...y,...i}):De(i.render,{...y,...i}),l},g=St(e)?e():e;return g.then(f=>h("success",s,f)).catch(f=>h("error",a,f)),g},De.success=to("success"),De.info=to("info"),De.error=to("error"),De.warning=to("warning"),De.warn=De.warning,De.dark=(e,t)=>or(e,eo("default",{theme:"dark",...t})),De.dismiss=function(e){(function(t){var n;if(cs()){if(t==null||bn(n=t)||nr(n))vt.forEach(r=>{r.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){const r=vt.get(t.containerId);r?r.removeToast(t.id):vt.forEach(o=>{o.removeToast(t.id)})}}else rr=rr.filter(r=>t!=null&&r.options.toastId!==t)})(e)},De.clearWaitingQueue=function(e){e===void 0&&(e={}),vt.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},De.isActive=us,De.update=function(e,t){t===void 0&&(t={});const n=((r,o)=>{var a;let{containerId:s}=o;return(a=vt.get(s||1))==null?void 0:a.toasts.get(r)})(e,t);if(n){const{props:r,content:o}=n,a={delay:100,...r,...t,toastId:t.toastId||e,updateId:hs()};a.toastId!==e&&(a.staleId=e);const s=a.render||o;delete a.render,or(s,a)}},De.done=e=>{De.update(e,{progress:1})},De.onChange=function(e){return ei.add(e),()=>{ei.delete(e)}},De.play=e=>fs(!0,e),De.pause=e=>fs(!1,e);const _d=typeof window<"u"?H.useLayoutEffect:H.useEffect,no=e=>{let{theme:t,type:n,isLoading:r,...o}=e;return H.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...o})},ti={info:function(e){return H.createElement(no,{...e},H.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 H.createElement(no,{...e},H.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 H.createElement(no,{...e},H.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 H.createElement(no,{...e},H.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 H.createElement("div",{className:"Toastify__spinner"})}},Rd=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o,playToast:a}=Sd(e),{closeButton:s,children:u,autoClose:h,onClick:g,type:f,hideProgressBar:x,closeToast:l,transition:y,position:i,className:c,style:p,bodyClassName:d,bodyStyle:m,progressClassName:v,progressStyle:b,updateId:C,role:S,progress:k,rtl:B,toastId:O,deleteToast:j,isIn:I,isLoading:D,closeOnClick:M,theme:$}=e,P=ln("Toastify__toast",`Toastify__toast-theme--${$}`,`Toastify__toast--${f}`,{"Toastify__toast--rtl":B},{"Toastify__toast--close-on-click":M}),L=St(c)?c({rtl:B,position:i,type:f,defaultClassName:P}):ln(P,c),q=function(ee){let{theme:ue,type:ne,isLoading:me,icon:de}=ee,V=null;const U={theme:ue,type:ne};return de===!1||(St(de)?V=de({...U,isLoading:me}):H.isValidElement(de)?V=H.cloneElement(de,U):me?V=ti.spinner():(J=>J in ti)(ne)&&(V=ti[ne](U))),V}(e),K=!!k||!h,Q={closeToast:l,type:f,theme:$};let Z=null;return s===!1||(Z=St(s)?s(Q):H.isValidElement(s)?H.cloneElement(s,Q):function(ee){let{closeToast:ue,theme:ne,ariaLabel:me="close"}=ee;return H.createElement("button",{className:`Toastify__close-button Toastify__close-button--${ne}`,type:"button",onClick:de=>{de.stopPropagation(),ue(de)},"aria-label":me},H.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},H.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"})))}(Q)),H.createElement(y,{isIn:I,done:j,position:i,preventExitTransition:n,nodeRef:r,playToast:a},H.createElement("div",{id:O,onClick:g,"data-in":I,className:L,...o,style:p,ref:r},H.createElement("div",{...I&&{role:S},className:St(d)?d({type:f}):ln("Toastify__toast-body",d),style:m},q!=null&&H.createElement("div",{className:ln("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!D})},q),H.createElement("div",null,u)),Z,H.createElement(Pd,{...C&&!K?{key:`pb-${C}`}:{},rtl:B,theme:$,delay:h,isRunning:t,isIn:I,closeToast:l,hide:x,type:f,style:b,className:v,controlledProgress:K,progress:k||0})))},ro=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},Td=Zr(ro("bounce",!0));Zr(ro("slide",!0)),Zr(ro("zoom")),Zr(ro("flip"));const Nd={position:"top-right",transition:Td,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function ps(e){let t={...Nd,...e};const n=e.stacked,[r,o]=H.useState(!0),a=H.useRef(null),{getToastToRender:s,isToastActive:u,count:h}=Ed(t),{className:g,style:f,rtl:x,containerId:l}=t;function y(c){const p=ln("Toastify__toast-container",`Toastify__toast-container--${c}`,{"Toastify__toast-container--rtl":x});return St(g)?g({position:c,rtl:x,defaultClassName:p}):ln(p,Qr(g))}function i(){n&&(o(!0),De.play())}return _d(()=>{if(n){var c;const p=a.current.querySelectorAll('[data-in="true"]'),d=12,m=(c=t.position)==null?void 0:c.includes("top");let v=0,b=0;Array.from(p).reverse().forEach((C,S)=>{const k=C;k.classList.add("Toastify__toast--stacked"),S>0&&(k.dataset.collapsed=`${r}`),k.dataset.pos||(k.dataset.pos=m?"top":"bot");const B=v*(r?.2:1)+(r?0:d*S);k.style.setProperty("--y",`${m?B:-1*B}px`),k.style.setProperty("--g",`${d}`),k.style.setProperty("--s",""+(1-(r?b:0))),v+=k.offsetHeight,b+=.025})}},[r,h,n]),H.createElement("div",{ref:a,className:"Toastify",id:l,onMouseEnter:()=>{n&&(o(!1),De.pause())},onMouseLeave:i},s((c,p)=>{const d=p.length?{...f}:{...f,pointerEvents:"none"};return H.createElement("div",{className:y(c),style:d,key:`container-${c}`},p.map(m=>{let{content:v,props:b}=m;return H.createElement(Rd,{...b,stacked:n,collapseAll:i,isIn:u(b.toastId,b.containerId),style:b.style,key:`toast-${b.key}`},v)}))}))}function ms(e,t){return function(){return e.apply(t,arguments)}}const{toString:jd}=Object.prototype,{getPrototypeOf:ni}=Object,oo=(e=>t=>{const n=jd.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),It=e=>(e=e.toLowerCase(),t=>oo(t)===e),io=e=>t=>typeof t===e,{isArray:An}=Array,ir=io("undefined");function Ad(e){return e!==null&&!ir(e)&&e.constructor!==null&&!ir(e.constructor)&&Ot(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const gs=It("ArrayBuffer");function Ld(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&gs(e.buffer),t}const Id=io("string"),Ot=io("function"),ys=io("number"),ao=e=>e!==null&&typeof e=="object",Dd=e=>e===!0||e===!1,so=e=>{if(oo(e)!=="object")return!1;const t=ni(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Md=It("Date"),Fd=It("File"),Ud=It("Blob"),$d=It("FileList"),Vd=e=>ao(e)&&Ot(e.pipe),Hd=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Ot(e.append)&&((t=oo(e))==="formdata"||t==="object"&&Ot(e.toString)&&e.toString()==="[object FormData]"))},zd=It("URLSearchParams"),[qd,Kd,Wd,Gd]=["ReadableStream","Request","Response","Headers"].map(It),Xd=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ar(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),An(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),s=a.length;let u;for(r=0;r<s;r++)u=a[r],t.call(null,e[u],u,e)}}function vs(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const bs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ws=e=>!ir(e)&&e!==bs;function ri(){const{caseless:e}=ws(this)&&this||{},t={},n=(r,o)=>{const a=e&&vs(t,o)||o;so(t[a])&&so(r)?t[a]=ri(t[a],r):so(r)?t[a]=ri({},r):An(r)?t[a]=r.slice():t[a]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&ar(arguments[r],n);return t}const Jd=(e,t,n,{allOwnKeys:r}={})=>(ar(t,(o,a)=>{n&&Ot(o)?e[a]=ms(o,n):e[a]=o},{allOwnKeys:r}),e),Yd=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Qd=(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)},Zd=(e,t,n,r)=>{let o,a,s;const u={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)s=o[a],(!r||r(s,e,t))&&!u[s]&&(t[s]=e[s],u[s]=!0);e=n!==!1&&ni(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},ef=(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},tf=e=>{if(!e)return null;if(An(e))return e;let t=e.length;if(!ys(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},nf=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ni(Uint8Array)),rf=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},of=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},af=It("HTMLFormElement"),sf=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),xs=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),lf=It("RegExp"),ks=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ar(n,(o,a)=>{let s;(s=t(o,a,e))!==!1&&(r[a]=s||o)}),Object.defineProperties(e,r)},cf=e=>{ks(e,(t,n)=>{if(Ot(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Ot(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+"'")})}})},uf=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return An(e)?r(e):r(String(e).split(t)),n},df=()=>{},ff=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,oi="abcdefghijklmnopqrstuvwxyz",Cs="0123456789",Es={DIGIT:Cs,ALPHA:oi,ALPHA_DIGIT:oi+oi.toUpperCase()+Cs},hf=(e=16,t=Es.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function pf(e){return!!(e&&Ot(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const mf=e=>{const t=new Array(10),n=(r,o)=>{if(ao(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const a=An(r)?[]:{};return ar(r,(s,u)=>{const h=n(s,o+1);!ir(h)&&(a[u]=h)}),t[o]=void 0,a}}return r};return n(e,0)},gf=It("AsyncFunction"),te={isArray:An,isArrayBuffer:gs,isBuffer:Ad,isFormData:Hd,isArrayBufferView:Ld,isString:Id,isNumber:ys,isBoolean:Dd,isObject:ao,isPlainObject:so,isReadableStream:qd,isRequest:Kd,isResponse:Wd,isHeaders:Gd,isUndefined:ir,isDate:Md,isFile:Fd,isBlob:Ud,isRegExp:lf,isFunction:Ot,isStream:Vd,isURLSearchParams:zd,isTypedArray:nf,isFileList:$d,forEach:ar,merge:ri,extend:Jd,trim:Xd,stripBOM:Yd,inherits:Qd,toFlatObject:Zd,kindOf:oo,kindOfTest:It,endsWith:ef,toArray:tf,forEachEntry:rf,matchAll:of,isHTMLForm:af,hasOwnProperty:xs,hasOwnProp:xs,reduceDescriptors:ks,freezeMethods:cf,toObjectSet:uf,toCamelCase:sf,noop:df,toFiniteNumber:ff,findKey:vs,global:bs,isContextDefined:ws,ALPHABET:Es,generateString:hf,isSpecCompliantForm:pf,toJSONObject:mf,isAsyncFn:gf,isThenable:e=>e&&(ao(e)||Ot(e))&&Ot(e.then)&&Ot(e.catch)};function Ne(e,t,n,r,o){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),o&&(this.response=o)}te.inherits(Ne,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:te.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Ss=Ne.prototype,Ps={};["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=>{Ps[e]={value:e}}),Object.defineProperties(Ne,Ps),Object.defineProperty(Ss,"isAxiosError",{value:!0}),Ne.from=(e,t,n,r,o,a)=>{const s=Object.create(Ss);return te.toFlatObject(e,s,function(h){return h!==Error.prototype},u=>u!=="isAxiosError"),Ne.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,a&&Object.assign(s,a),s};const yf=null;function ii(e){return te.isPlainObject(e)||te.isArray(e)}function Bs(e){return te.endsWith(e,"[]")?e.slice(0,-2):e}function Os(e,t,n){return e?e.concat(t).map(function(o,a){return o=Bs(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function vf(e){return te.isArray(e)&&!e.some(ii)}const bf=te.toFlatObject(te,{},null,function(t){return/^is[A-Z]/.test(t)});function lo(e,t,n){if(!te.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=te.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(c,p){return!te.isUndefined(p[c])});const r=n.metaTokens,o=n.visitor||f,a=n.dots,s=n.indexes,h=(n.Blob||typeof Blob<"u"&&Blob)&&te.isSpecCompliantForm(t);if(!te.isFunction(o))throw new TypeError("visitor must be a function");function g(i){if(i===null)return"";if(te.isDate(i))return i.toISOString();if(!h&&te.isBlob(i))throw new Ne("Blob is not supported. Use a Buffer instead.");return te.isArrayBuffer(i)||te.isTypedArray(i)?h&&typeof Blob=="function"?new Blob([i]):Buffer.from(i):i}function f(i,c,p){let d=i;if(i&&!p&&typeof i=="object"){if(te.endsWith(c,"{}"))c=r?c:c.slice(0,-2),i=JSON.stringify(i);else if(te.isArray(i)&&vf(i)||(te.isFileList(i)||te.endsWith(c,"[]"))&&(d=te.toArray(i)))return c=Bs(c),d.forEach(function(v,b){!(te.isUndefined(v)||v===null)&&t.append(s===!0?Os([c],b,a):s===null?c:c+"[]",g(v))}),!1}return ii(i)?!0:(t.append(Os(p,c,a),g(i)),!1)}const x=[],l=Object.assign(bf,{defaultVisitor:f,convertValue:g,isVisitable:ii});function y(i,c){if(!te.isUndefined(i)){if(x.indexOf(i)!==-1)throw Error("Circular reference detected in "+c.join("."));x.push(i),te.forEach(i,function(d,m){(!(te.isUndefined(d)||d===null)&&o.call(t,d,te.isString(m)?m.trim():m,c,l))===!0&&y(d,c?c.concat(m):[m])}),x.pop()}}if(!te.isObject(e))throw new TypeError("data must be an object");return y(e),t}function _s(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function ai(e,t){this._pairs=[],e&&lo(e,this,t)}const Rs=ai.prototype;Rs.append=function(t,n){this._pairs.push([t,n])},Rs.toString=function(t){const n=t?function(r){return t.call(this,r,_s)}:_s;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function wf(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ts(e,t,n){if(!t)return e;const r=n&&n.encode||wf,o=n&&n.serialize;let a;if(o?a=o(t,n):a=te.isURLSearchParams(t)?t.toString():new ai(t,n).toString(r),a){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Ns{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){te.forEach(this.handlers,function(r){r!==null&&t(r)})}}const js={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},xf={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:ai,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},si=typeof window<"u"&&typeof document<"u",kf=(e=>si&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),Cf=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ef=si&&window.location.href||"http://localhost",Dt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:si,hasStandardBrowserEnv:kf,hasStandardBrowserWebWorkerEnv:Cf,origin:Ef},Symbol.toStringTag,{value:"Module"})),...xf};function Sf(e,t){return lo(e,new Dt.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,a){return Dt.isNode&&te.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function Pf(e){return te.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Bf(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function As(e){function t(n,r,o,a){let s=n[a++];if(s==="__proto__")return!0;const u=Number.isFinite(+s),h=a>=n.length;return s=!s&&te.isArray(o)?o.length:s,h?(te.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!u):((!o[s]||!te.isObject(o[s]))&&(o[s]=[]),t(n,r,o[s],a)&&te.isArray(o[s])&&(o[s]=Bf(o[s])),!u)}if(te.isFormData(e)&&te.isFunction(e.entries)){const n={};return te.forEachEntry(e,(r,o)=>{t(Pf(r),o,n,0)}),n}return null}function Of(e,t,n){if(te.isString(e))try{return(t||JSON.parse)(e),te.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const sr={transitional:js,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=te.isObject(t);if(a&&te.isHTMLForm(t)&&(t=new FormData(t)),te.isFormData(t))return o?JSON.stringify(As(t)):t;if(te.isArrayBuffer(t)||te.isBuffer(t)||te.isStream(t)||te.isFile(t)||te.isBlob(t)||te.isReadableStream(t))return t;if(te.isArrayBufferView(t))return t.buffer;if(te.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let u;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Sf(t,this.formSerializer).toString();if((u=te.isFileList(t))||r.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return lo(u?{"files[]":t}:t,h&&new h,this.formSerializer)}}return a||o?(n.setContentType("application/json",!1),Of(t)):t}],transformResponse:[function(t){const n=this.transitional||sr.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(te.isResponse(t)||te.isReadableStream(t))return t;if(t&&te.isString(t)&&(r&&!this.responseType||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(u){if(s)throw u.name==="SyntaxError"?Ne.from(u,Ne.ERR_BAD_RESPONSE,this,null,this.response):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Dt.classes.FormData,Blob:Dt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};te.forEach(["delete","get","head","post","put","patch"],e=>{sr.headers[e]={}});const _f=te.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"]),Rf=e=>{const t={};let n,r,o;return e&&e.split(`
31
+ `).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||t[n]&&_f[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Ls=Symbol("internals");function lr(e){return e&&String(e).trim().toLowerCase()}function co(e){return e===!1||e==null?e:te.isArray(e)?e.map(co):String(e)}function Tf(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 Nf=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function li(e,t,n,r,o){if(te.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!te.isString(t)){if(te.isString(r))return t.indexOf(r)!==-1;if(te.isRegExp(r))return r.test(t)}}function jf(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Af(e,t){const n=te.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,a,s){return this[r].call(this,t,o,a,s)},configurable:!0})})}class xt{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(u,h,g){const f=lr(h);if(!f)throw new Error("header name must be a non-empty string");const x=te.findKey(o,f);(!x||o[x]===void 0||g===!0||g===void 0&&o[x]!==!1)&&(o[x||h]=co(u))}const s=(u,h)=>te.forEach(u,(g,f)=>a(g,f,h));if(te.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(te.isString(t)&&(t=t.trim())&&!Nf(t))s(Rf(t),n);else if(te.isHeaders(t))for(const[u,h]of t.entries())a(h,u,r);else t!=null&&a(n,t,r);return this}get(t,n){if(t=lr(t),t){const r=te.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Tf(o);if(te.isFunction(n))return n.call(this,o,r);if(te.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=lr(t),t){const r=te.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||li(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(s){if(s=lr(s),s){const u=te.findKey(r,s);u&&(!n||li(r,r[u],u,n))&&(delete r[u],o=!0)}}return te.isArray(t)?t.forEach(a):a(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const a=n[r];(!t||li(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return te.forEach(this,(o,a)=>{const s=te.findKey(r,a);if(s){n[s]=co(o),delete n[a];return}const u=t?jf(a):String(a).trim();u!==a&&delete n[a],n[u]=co(o),r[u]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return te.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&te.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(`
32
+ `)}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(o=>r.set(o)),r}static accessor(t){const r=(this[Ls]=this[Ls]={accessors:{}}).accessors,o=this.prototype;function a(s){const u=lr(s);r[u]||(Af(o,s),r[u]=!0)}return te.isArray(t)?t.forEach(a):a(t),this}}xt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),te.reduceDescriptors(xt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),te.freezeMethods(xt);function ci(e,t){const n=this||sr,r=t||n,o=xt.from(r.headers);let a=r.data;return te.forEach(e,function(u){a=u.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function Is(e){return!!(e&&e.__CANCEL__)}function Ln(e,t,n){Ne.call(this,e??"canceled",Ne.ERR_CANCELED,t,n),this.name="CanceledError"}te.inherits(Ln,Ne,{__CANCEL__:!0});function Ds(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ne("Request failed with status code "+n.status,[Ne.ERR_BAD_REQUEST,Ne.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Lf(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function If(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,s;return t=t!==void 0?t:1e3,function(h){const g=Date.now(),f=r[a];s||(s=g),n[o]=h,r[o]=g;let x=a,l=0;for(;x!==o;)l+=n[x++],x=x%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),g-s<t)return;const y=f&&g-f;return y?Math.round(l*1e3/y):void 0}}function Df(e,t){let n=0;const r=1e3/t;let o=null;return function(){const s=this===!0,u=Date.now();if(s||u-n>r)return o&&(clearTimeout(o),o=null),n=u,e.apply(null,arguments);o||(o=setTimeout(()=>(o=null,n=Date.now(),e.apply(null,arguments)),r-(u-n)))}}const uo=(e,t,n=3)=>{let r=0;const o=If(50,250);return Df(a=>{const s=a.loaded,u=a.lengthComputable?a.total:void 0,h=s-r,g=o(h),f=s<=u;r=s;const x={loaded:s,total:u,progress:u?s/u:void 0,bytes:h,rate:g||void 0,estimated:g&&u&&f?(u-s)/g:void 0,event:a,lengthComputable:u!=null};x[t?"download":"upload"]=!0,e(x)},n)},Mf=Dt.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function o(a){let s=a;return t&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{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=o(window.location.href),function(s){const u=te.isString(s)?o(s):s;return u.protocol===r.protocol&&u.host===r.host}}():function(){return function(){return!0}}(),Ff=Dt.hasStandardBrowserEnv?{write(e,t,n,r,o,a){const s=[e+"="+encodeURIComponent(t)];te.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),te.isString(r)&&s.push("path="+r),te.isString(o)&&s.push("domain="+o),a===!0&&s.push("secure"),document.cookie=s.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 Uf(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function $f(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ms(e,t){return e&&!Uf(t)?$f(e,t):t}const Fs=e=>e instanceof xt?{...e}:e;function wn(e,t){t=t||{};const n={};function r(g,f,x){return te.isPlainObject(g)&&te.isPlainObject(f)?te.merge.call({caseless:x},g,f):te.isPlainObject(f)?te.merge({},f):te.isArray(f)?f.slice():f}function o(g,f,x){if(te.isUndefined(f)){if(!te.isUndefined(g))return r(void 0,g,x)}else return r(g,f,x)}function a(g,f){if(!te.isUndefined(f))return r(void 0,f)}function s(g,f){if(te.isUndefined(f)){if(!te.isUndefined(g))return r(void 0,g)}else return r(void 0,f)}function u(g,f,x){if(x in t)return r(g,f);if(x in e)return r(void 0,g)}const h={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u,headers:(g,f)=>o(Fs(g),Fs(f),!0)};return te.forEach(Object.keys(Object.assign({},e,t)),function(f){const x=h[f]||o,l=x(e[f],t[f],f);te.isUndefined(l)&&x!==u||(n[f]=l)}),n}const Us=e=>{const t=wn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:s,auth:u}=t;t.headers=s=xt.from(s),t.url=Ts(Ms(t.baseURL,t.url),e.params,e.paramsSerializer),u&&s.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):"")));let h;if(te.isFormData(n)){if(Dt.hasStandardBrowserEnv||Dt.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((h=s.getContentType())!==!1){const[g,...f]=h?h.split(";").map(x=>x.trim()).filter(Boolean):[];s.setContentType([g||"multipart/form-data",...f].join("; "))}}if(Dt.hasStandardBrowserEnv&&(r&&te.isFunction(r)&&(r=r(t)),r||r!==!1&&Mf(t.url))){const g=o&&a&&Ff.read(a);g&&s.set(o,g)}return t},Vf=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=Us(e);let a=o.data;const s=xt.from(o.headers).normalize();let{responseType:u}=o,h;function g(){o.cancelToken&&o.cancelToken.unsubscribe(h),o.signal&&o.signal.removeEventListener("abort",h)}let f=new XMLHttpRequest;f.open(o.method.toUpperCase(),o.url,!0),f.timeout=o.timeout;function x(){if(!f)return;const y=xt.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),c={data:!u||u==="text"||u==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:y,config:e,request:f};Ds(function(d){n(d),g()},function(d){r(d),g()},c),f=null}"onloadend"in f?f.onloadend=x:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(x)},f.onabort=function(){f&&(r(new Ne("Request aborted",Ne.ECONNABORTED,o,f)),f=null)},f.onerror=function(){r(new Ne("Network Error",Ne.ERR_NETWORK,o,f)),f=null},f.ontimeout=function(){let i=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const c=o.transitional||js;o.timeoutErrorMessage&&(i=o.timeoutErrorMessage),r(new Ne(i,c.clarifyTimeoutError?Ne.ETIMEDOUT:Ne.ECONNABORTED,o,f)),f=null},a===void 0&&s.setContentType(null),"setRequestHeader"in f&&te.forEach(s.toJSON(),function(i,c){f.setRequestHeader(c,i)}),te.isUndefined(o.withCredentials)||(f.withCredentials=!!o.withCredentials),u&&u!=="json"&&(f.responseType=o.responseType),typeof o.onDownloadProgress=="function"&&f.addEventListener("progress",uo(o.onDownloadProgress,!0)),typeof o.onUploadProgress=="function"&&f.upload&&f.upload.addEventListener("progress",uo(o.onUploadProgress)),(o.cancelToken||o.signal)&&(h=y=>{f&&(r(!y||y.type?new Ln(null,e,f):y),f.abort(),f=null)},o.cancelToken&&o.cancelToken.subscribe(h),o.signal&&(o.signal.aborted?h():o.signal.addEventListener("abort",h)));const l=Lf(o.url);if(l&&Dt.protocols.indexOf(l)===-1){r(new Ne("Unsupported protocol "+l+":",Ne.ERR_BAD_REQUEST,e));return}f.send(a||null)})},Hf=(e,t)=>{let n=new AbortController,r;const o=function(h){if(!r){r=!0,s();const g=h instanceof Error?h:this.reason;n.abort(g instanceof Ne?g:new Ln(g instanceof Error?g.message:g))}};let a=t&&setTimeout(()=>{o(new Ne(`timeout ${t} of ms exceeded`,Ne.ETIMEDOUT))},t);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(h=>{h&&(h.removeEventListener?h.removeEventListener("abort",o):h.unsubscribe(o))}),e=null)};e.forEach(h=>h&&h.addEventListener&&h.addEventListener("abort",o));const{signal:u}=n;return u.unsubscribe=s,[u,()=>{a&&clearTimeout(a),a=null}]},zf=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},qf=async function*(e,t,n){for await(const r of e)yield*zf(ArrayBuffer.isView(r)?r:await n(String(r)),t)},$s=(e,t,n,r,o)=>{const a=qf(e,t,o);let s=0;return new ReadableStream({type:"bytes",async pull(u){const{done:h,value:g}=await a.next();if(h){u.close(),r();return}let f=g.byteLength;n&&n(s+=f),u.enqueue(new Uint8Array(g))},cancel(u){return r(u),a.return()}},{highWaterMark:2})},Vs=(e,t)=>{const n=e!=null;return r=>setTimeout(()=>t({lengthComputable:n,total:e,loaded:r}))},fo=typeof fetch<"u",Hs=fo&&typeof ReadableStream<"u",ui=fo&&(typeof TextEncoder<"u"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Kf=Hs&&(()=>{let e=!1;const t=new Request(Dt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),zs=64*1024,di=Hs&&!!(()=>{try{return te.isReadableStream(new Response("").body)}catch{}})(),ho={stream:di&&(e=>e.body)};fo&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ho[t]&&(ho[t]=te.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Ne(`Response type '${t}' is not supported`,Ne.ERR_NOT_SUPPORT,r)})})})(new Response);const Wf=async e=>{if(e==null)return 0;if(te.isBlob(e))return e.size;if(te.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(te.isArrayBufferView(e))return e.byteLength;if(te.isURLSearchParams(e)&&(e=e+""),te.isString(e))return(await ui(e)).byteLength},Gf=async(e,t)=>{const n=te.toFiniteNumber(e.getContentLength());return n??Wf(t)},fi={http:yf,xhr:Vf,fetch:fo&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:a,timeout:s,onDownloadProgress:u,onUploadProgress:h,responseType:g,headers:f,withCredentials:x="same-origin",fetchOptions:l}=Us(e);g=g?(g+"").toLowerCase():"text";let[y,i]=o||a||s?Hf([o,a],s):[],c,p;const d=()=>{!c&&setTimeout(()=>{y&&y.unsubscribe()}),c=!0};let m;try{if(h&&Kf&&n!=="get"&&n!=="head"&&(m=await Gf(f,r))!==0){let S=new Request(t,{method:"POST",body:r,duplex:"half"}),k;te.isFormData(r)&&(k=S.headers.get("content-type"))&&f.setContentType(k),S.body&&(r=$s(S.body,zs,Vs(m,uo(h)),null,ui))}te.isString(x)||(x=x?"cors":"omit"),p=new Request(t,{...l,signal:y,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",withCredentials:x});let v=await fetch(p);const b=di&&(g==="stream"||g==="response");if(di&&(u||b)){const S={};["status","statusText","headers"].forEach(B=>{S[B]=v[B]});const k=te.toFiniteNumber(v.headers.get("content-length"));v=new Response($s(v.body,zs,u&&Vs(k,uo(u,!0)),b&&d,ui),S)}g=g||"text";let C=await ho[te.findKey(ho,g)||"text"](v,e);return!b&&d(),i&&i(),await new Promise((S,k)=>{Ds(S,k,{data:C,headers:xt.from(v.headers),status:v.status,statusText:v.statusText,config:e,request:p})})}catch(v){throw d(),v&&v.name==="TypeError"&&/fetch/i.test(v.message)?Object.assign(new Ne("Network Error",Ne.ERR_NETWORK,e,p),{cause:v.cause||v}):Ne.from(v,v&&v.code,e,p)}})};te.forEach(fi,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const qs=e=>`- ${e}`,Xf=e=>te.isFunction(e)||e===null||e===!1,Ks={getAdapter:e=>{e=te.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let a=0;a<t;a++){n=e[a];let s;if(r=n,!Xf(n)&&(r=fi[(s=String(n)).toLowerCase()],r===void 0))throw new Ne(`Unknown adapter '${s}'`);if(r)break;o[s||"#"+a]=r}if(!r){const a=Object.entries(o).map(([u,h])=>`adapter ${u} `+(h===!1?"is not supported by the environment":"is not available in the build"));let s=t?a.length>1?`since :
33
+ `+a.map(qs).join(`
34
+ `):" "+qs(a[0]):"as no adapter specified";throw new Ne("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:fi};function hi(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ln(null,e)}function Ws(e){return hi(e),e.headers=xt.from(e.headers),e.data=ci.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ks.getAdapter(e.adapter||sr.adapter)(e).then(function(r){return hi(e),r.data=ci.call(e,e.transformResponse,r),r.headers=xt.from(r.headers),r},function(r){return Is(r)||(hi(e),r&&r.response&&(r.response.data=ci.call(e,e.transformResponse,r.response),r.response.headers=xt.from(r.response.headers))),Promise.reject(r)})}const Gs="1.7.1",pi={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{pi[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Xs={};pi.transitional=function(t,n,r){function o(a,s){return"[Axios v"+Gs+"] Transitional option '"+a+"'"+s+(r?". "+r:"")}return(a,s,u)=>{if(t===!1)throw new Ne(o(s," has been removed"+(n?" in "+n:"")),Ne.ERR_DEPRECATED);return n&&!Xs[s]&&(Xs[s]=!0,console.warn(o(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,s,u):!0}};function Jf(e,t,n){if(typeof e!="object")throw new Ne("options must be an object",Ne.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],s=t[a];if(s){const u=e[a],h=u===void 0||s(u,a,e);if(h!==!0)throw new Ne("option "+a+" must be "+h,Ne.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ne("Unknown option "+a,Ne.ERR_BAD_OPTION)}}const mi={assertOptions:Jf,validators:pi},cn=mi.validators;class xn{constructor(t){this.defaults=t,this.interceptors={request:new Ns,response:new Ns}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const a=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
35
+ `+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=wn(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&mi.assertOptions(r,{silentJSONParsing:cn.transitional(cn.boolean),forcedJSONParsing:cn.transitional(cn.boolean),clarifyTimeoutError:cn.transitional(cn.boolean)},!1),o!=null&&(te.isFunction(o)?n.paramsSerializer={serialize:o}:mi.assertOptions(o,{encode:cn.function,serialize:cn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=a&&te.merge(a.common,a[n.method]);a&&te.forEach(["delete","get","head","post","put","patch","common"],i=>{delete a[i]}),n.headers=xt.concat(s,a);const u=[];let h=!0;this.interceptors.request.forEach(function(c){typeof c.runWhen=="function"&&c.runWhen(n)===!1||(h=h&&c.synchronous,u.unshift(c.fulfilled,c.rejected))});const g=[];this.interceptors.response.forEach(function(c){g.push(c.fulfilled,c.rejected)});let f,x=0,l;if(!h){const i=[Ws.bind(this),void 0];for(i.unshift.apply(i,u),i.push.apply(i,g),l=i.length,f=Promise.resolve(n);x<l;)f=f.then(i[x++],i[x++]);return f}l=u.length;let y=n;for(x=0;x<l;){const i=u[x++],c=u[x++];try{y=i(y)}catch(p){c.call(this,p);break}}try{f=Ws.call(this,y)}catch(i){return Promise.reject(i)}for(x=0,l=g.length;x<l;)f=f.then(g[x++],g[x++]);return f}getUri(t){t=wn(this.defaults,t);const n=Ms(t.baseURL,t.url);return Ts(n,t.params,t.paramsSerializer)}}te.forEach(["delete","get","head","options"],function(t){xn.prototype[t]=function(n,r){return this.request(wn(r||{},{method:t,url:n,data:(r||{}).data}))}}),te.forEach(["post","put","patch"],function(t){function n(r){return function(a,s,u){return this.request(wn(u||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:s}))}}xn.prototype[t]=n(),xn.prototype[t+"Form"]=n(!0)});class gi{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const s=new Promise(u=>{r.subscribe(u),a=u}).then(o);return s.cancel=function(){r.unsubscribe(a)},s},t(function(a,s,u){r.reason||(r.reason=new Ln(a,s,u),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 gi(function(o){t=o}),cancel:t}}}function Yf(e){return function(n){return e.apply(null,n)}}function Qf(e){return te.isObject(e)&&e.isAxiosError===!0}const yi={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(yi).forEach(([e,t])=>{yi[t]=e});function Js(e){const t=new xn(e),n=ms(xn.prototype.request,t);return te.extend(n,xn.prototype,t,{allOwnKeys:!0}),te.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Js(wn(e,o))},n}const it=Js(sr);it.Axios=xn,it.CanceledError=Ln,it.CancelToken=gi,it.isCancel=Is,it.VERSION=Gs,it.toFormData=lo,it.AxiosError=Ne,it.Cancel=it.CanceledError,it.all=function(t){return Promise.all(t)},it.spread=Yf,it.isAxiosError=Qf,it.mergeConfig=wn,it.AxiosHeaders=xt,it.formToJSON=e=>As(te.isHTMLForm(e)?new FormData(e):e),it.getAdapter=Ks.getAdapter,it.HttpStatusCode=yi,it.default=it;const Zf=e=>{var n,r,o,a;const t=(n=e.response)==null?void 0:n.status;if(t&&t!==401){const s=(r=e.response)==null?void 0:r.data;console.table(s);const u=(o=e.response)==null?void 0:o.data.errors,h=E.jsxs("div",{children:[E.jsx("p",{children:(a=e.response)==null?void 0:a.data.message}),u&&Object.keys(u).map(g=>u[g].map(f=>E.jsx("li",{children:f},f)))]});De.error(h)}return Promise.reject(e)};class eh{constructor(){Gu(this,"instance",it.create())}initialize(t,n){this.instance=it.create({baseURL:n||"https://api.piggy.eu",headers:{Authorization:`Bearer ${t}`}}),this.instance.interceptors.response.use(void 0,Zf)}}const tt=new eh;var vi={exports:{}},bi={};/**
36
36
  * @license React
37
37
  * use-sync-external-store-shim.production.min.js
38
38
  *
@@ -40,7 +40,7 @@ React keys must be passed directly to JSX without using spread:
40
40
  *
41
41
  * This source code is licensed under the MIT license found in the
42
42
  * LICENSE file in the root directory of this source tree.
43
- */var Js;function th(){if(Js)return bi;Js=1;var e=H;function t(x,l){return x===l&&(x!==0||1/x===1/l)||x!==x&&l!==l}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function u(x,l){var y=l(),i=r({inst:{value:y,getSnapshot:l}}),c=i[0].inst,p=i[1];return a(function(){c.value=y,c.getSnapshot=l,h(c)&&p({inst:c})},[x,y,l]),o(function(){return h(c)&&p({inst:c}),x(function(){h(c)&&p({inst:c})})},[x]),s(y),y}function h(x){var l=x.getSnapshot;x=x.value;try{var y=l();return!n(x,y)}catch{return!0}}function g(x,l){return l()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:u;return bi.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,bi}var wi={};/**
43
+ */var Ys;function th(){if(Ys)return bi;Ys=1;var e=H;function t(x,l){return x===l&&(x!==0||1/x===1/l)||x!==x&&l!==l}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function u(x,l){var y=l(),i=r({inst:{value:y,getSnapshot:l}}),c=i[0].inst,p=i[1];return a(function(){c.value=y,c.getSnapshot=l,h(c)&&p({inst:c})},[x,y,l]),o(function(){return h(c)&&p({inst:c}),x(function(){h(c)&&p({inst:c})})},[x]),s(y),y}function h(x){var l=x.getSnapshot;x=x.value;try{var y=l();return!n(x,y)}catch{return!0}}function g(x,l){return l()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:u;return bi.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,bi}var wi={};/**
44
44
  * @license React
45
45
  * use-sync-external-store-shim.development.js
46
46
  *
@@ -48,11 +48,11 @@ React keys must be passed directly to JSX without using spread:
48
48
  *
49
49
  * This source code is licensed under the MIT license found in the
50
50
  * LICENSE file in the root directory of this source tree.
51
- */var Ys;function nh(){return Ys||(Ys=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=H,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(v){{for(var b=arguments.length,C=new Array(b>1?b-1:0),S=1;S<b;S++)C[S-1]=arguments[S];r("error",v,C)}}function r(v,b,C){{var S=t.ReactDebugCurrentFrame,k=S.getStackAddendum();k!==""&&(b+="%s",C=C.concat([k]));var B=C.map(function(O){return String(O)});B.unshift("Warning: "+b),Function.prototype.apply.call(console[v],console,B)}}function o(v,b){return v===b&&(v!==0||1/v===1/b)||v!==v&&b!==b}var a=typeof Object.is=="function"?Object.is:o,s=e.useState,u=e.useEffect,h=e.useLayoutEffect,g=e.useDebugValue,f=!1,x=!1;function l(v,b,C){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 S=b();if(!x){var k=b();a(S,k)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),x=!0)}var B=s({inst:{value:S,getSnapshot:b}}),O=B[0].inst,j=B[1];return h(function(){O.value=S,O.getSnapshot=b,y(O)&&j({inst:O})},[v,S,b]),u(function(){y(O)&&j({inst:O});var I=function(){y(O)&&j({inst:O})};return v(I)},[v]),g(S),S}function y(v){var b=v.getSnapshot,C=v.value;try{var S=b();return!a(C,S)}catch{return!0}}function i(v,b,C){return b()}var c=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",p=!c,d=p?i:l,m=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d;wi.useSyncExternalStore=m,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),wi}process.env.NODE_ENV==="production"?vi.exports=th():vi.exports=nh();var rh=vi.exports;const un=()=>{},kt=un(),xi=Object,$e=e=>e===kt,Xt=e=>typeof e=="function",dn=(e,t)=>({...e,...t}),oh=e=>Xt(e.then),ho=new WeakMap;let ih=0;const cr=e=>{const t=typeof e,n=e&&e.constructor,r=n==Date;let o,a;if(xi(e)===e&&!r&&n!=RegExp){if(o=ho.get(e),o)return o;if(o=++ih+"~",ho.set(e,o),n==Array){for(o="@",a=0;a<e.length;a++)o+=cr(e[a])+",";ho.set(e,o)}if(n==xi){o="#";const s=xi.keys(e).sort();for(;!$e(a=s.pop());)$e(e[a])||(o+=a+":"+cr(e[a])+",");ho.set(e,o)}}else o=r?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return o},en=new WeakMap,ki={},po={},Ci="undefined",mo=typeof window!=Ci,Ei=typeof document!=Ci,ah=()=>mo&&typeof window.requestAnimationFrame!=Ci,Qs=(e,t)=>{const n=en.get(e);return[()=>!$e(t)&&e.get(t)||ki,r=>{if(!$e(t)){const o=e.get(t);t in po||(po[t]=o),n[5](t,dn(o,r),o||ki)}},n[6],()=>!$e(t)&&t in po?po[t]:!$e(t)&&e.get(t)||ki]};let Si=!0;const sh=()=>Si,[Pi,Bi]=mo&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[un,un],lh=()=>{const e=Ei&&document.visibilityState;return $e(e)||e!=="hidden"},ch=e=>(Ei&&document.addEventListener("visibilitychange",e),Pi("focus",e),()=>{Ei&&document.removeEventListener("visibilitychange",e),Bi("focus",e)}),uh=e=>{const t=()=>{Si=!0,e()},n=()=>{Si=!1};return Pi("online",t),Pi("offline",n),()=>{Bi("online",t),Bi("offline",n)}},dh={isOnline:sh,isVisible:lh},fh={initFocus:ch,initReconnect:uh},Zs=!H.useId,ur=!mo||"Deno"in window,hh=e=>ah()?window.requestAnimationFrame(e):setTimeout(e,1),Oi=ur?H.useEffect:H.useLayoutEffect,_i=typeof navigator<"u"&&navigator.connection,el=!ur&&_i&&(["slow-2g","2g"].includes(_i.effectiveType)||_i.saveData),Ri=e=>{if(Xt(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?cr(e):"",[e,t]};let ph=0;const Ti=()=>++ph,tl=0,nl=1,rl=2;var dr={__proto__:null,ERROR_REVALIDATE_EVENT:3,FOCUS_EVENT:tl,MUTATE_EVENT:rl,RECONNECT_EVENT:nl};async function ol(...e){const[t,n,r,o]=e,a=dn({populateCache:!0,throwOnError:!0},typeof o=="boolean"?{revalidate:o}:o||{});let s=a.populateCache;const u=a.rollbackOnError;let h=a.optimisticData;const g=l=>typeof u=="function"?u(l):u!==!1,f=a.throwOnError;if(Xt(n)){const l=n,y=[],i=t.keys();for(const c of i)!/^\$(inf|sub)\$/.test(c)&&l(t.get(c)._k)&&y.push(c);return Promise.all(y.map(x))}return x(n);async function x(l){const[y]=Ri(l);if(!y)return;const[i,c]=Qs(t,y),[p,d,m,v]=en.get(t),b=()=>{const M=p[y];return(Xt(a.revalidate)?a.revalidate(i().data,l):a.revalidate!==!1)&&(delete m[y],delete v[y],M&&M[0])?M[0](rl).then(()=>i().data):i().data};if(e.length<3)return b();let C=r,S;const k=Ti();d[y]=[k,0];const B=!$e(h),O=i(),j=O.data,I=O._c,D=$e(I)?j:I;if(B&&(h=Xt(h)?h(D,j):h,c({data:h,_c:D})),Xt(C))try{C=C(D)}catch(M){S=M}if(C&&oh(C))if(C=await C.catch(M=>{S=M}),k!==d[y][0]){if(S)throw S;return C}else S&&B&&g(S)&&(s=!0,c({data:D,_c:kt}));if(s&&!S)if(Xt(s)){const M=s(C,D);c({data:M,error:kt,_c:kt})}else c({data:C,error:kt,_c:kt});if(d[y][1]=Ti(),Promise.resolve(b()).then(()=>{c({_c:kt})}),S){if(f)throw S;return}return C}}const il=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},mh=(e,t)=>{if(!en.has(e)){const n=dn(fh,t),r={},o=ol.bind(kt,e);let a=un;const s={},u=(f,x)=>{const l=s[f]||[];return s[f]=l,l.push(x),()=>l.splice(l.indexOf(x),1)},h=(f,x,l)=>{e.set(f,x);const y=s[f];if(y)for(const i of y)i(x,l)},g=()=>{if(!en.has(e)&&(en.set(e,[r,{},{},{},o,h,u]),!ur)){const f=n.initFocus(setTimeout.bind(kt,il.bind(kt,r,tl))),x=n.initReconnect(setTimeout.bind(kt,il.bind(kt,r,nl)));a=()=>{f&&f(),x&&x(),en.delete(e)}}};return g(),[e,o,g,a]}return[e,en.get(e)[4]]},gh=(e,t,n,r,o)=>{const a=n.errorRetryCount,s=o.retryCount,u=~~((Math.random()+.5)*(1<<(s<8?s:8)))*n.errorRetryInterval;!$e(a)&&s>a||setTimeout(r,u,o)},yh=(e,t)=>cr(e)==cr(t),[al,vh]=mh(new Map),bh=dn({onLoadingSlow:un,onSuccess:un,onError:un,onErrorRetry:gh,onDiscarded:un,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:el?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:el?5e3:3e3,compare:yh,isPaused:()=>!1,cache:al,mutate:vh,fallback:{}},dh),wh=(e,t)=>{const n=dn(e,t);if(t){const{use:r,fallback:o}=e,{use:a,fallback:s}=t;r&&a&&(n.use=r.concat(a)),o&&s&&(n.fallback=dn(o,s))}return n},xh=H.createContext({}),kh="$inf$",sl=mo&&window.__SWR_DEVTOOLS_USE__,Ch=sl?window.__SWR_DEVTOOLS_USE__:[],Eh=()=>{sl&&(window.__SWR_DEVTOOLS_REACT__=H)},Sh=e=>Xt(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],Ph=()=>dn(bh,H.useContext(xh)),Bh=e=>(t,n,r)=>e(t,n&&((...a)=>{const[s]=Ri(t),[,,,u]=en.get(al);if(s.startsWith(kh))return n(...a);const h=u[s];return $e(h)?n(...a):(delete u[s],h)}),r),Oh=Ch.concat(Bh),_h=e=>function(...n){const r=Ph(),[o,a,s]=Sh(n),u=wh(r,s);let h=e;const{use:g}=u,f=(g||[]).concat(Oh);for(let x=f.length;x--;)h=f[x](h);return h(o,a||u.fetcher||null,u)},Rh=(e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const o=r.indexOf(n);o>=0&&(r[o]=r[r.length-1],r.pop())}};Eh();const ll=H.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)}),Ni={dedupe:!0},Th=_h((e,t,n)=>{const{cache:r,compare:o,suspense:a,fallbackData:s,revalidateOnMount:u,revalidateIfStale:h,refreshInterval:g,refreshWhenHidden:f,refreshWhenOffline:x,keepPreviousData:l}=n,[y,i,c,p]=en.get(r),[d,m]=Ri(e),v=H.useRef(!1),b=H.useRef(!1),C=H.useRef(d),S=H.useRef(t),k=H.useRef(n),B=()=>k.current,O=()=>B().isVisible()&&B().isOnline(),[j,I,D,M]=Qs(r,d),$=H.useRef({}).current,P=$e(s)?n.fallback[d]:s,L=(R,W)=>{for(const G in $){const X=G;if(X==="data"){if(!o(R[X],W[X])&&(!$e(R[X])||!o(de,W[X])))return!1}else if(W[X]!==R[X])return!1}return!0},q=H.useMemo(()=>{const R=!d||!t?!1:$e(u)?B().isPaused()||a?!1:$e(h)?!0:h:u,W=re=>{const oe=dn(re);return delete oe._k,R?{isValidating:!0,isLoading:!0,...oe}:oe},G=j(),X=M(),F=W(G),ce=G===X?F:W(X);let fe=F;return[()=>{const re=W(j());return L(re,fe)?(fe.data=re.data,fe.isLoading=re.isLoading,fe.isValidating=re.isValidating,fe.error=re.error,fe):(fe=re,re)},()=>ce]},[r,d]),K=rh.useSyncExternalStore(H.useCallback(R=>D(d,(W,G)=>{L(G,W)||R()}),[r,d]),q[0],q[1]),Q=!v.current,Z=y[d]&&y[d].length>0,ee=K.data,ue=$e(ee)?P:ee,ne=K.error,me=H.useRef(ue),de=l?$e(ee)?me.current:ee:ue,V=Z&&!$e(ne)?!1:Q&&!$e(u)?u:B().isPaused()?!1:a?$e(ue)?!1:h:$e(ue)||h,U=!!(d&&t&&Q&&V),J=$e(K.isValidating)?U:K.isValidating,w=$e(K.isLoading)?U:K.isLoading,_=H.useCallback(async R=>{const W=S.current;if(!d||!W||b.current||B().isPaused())return!1;let G,X,F=!0;const ce=R||{},fe=!c[d]||!ce.dedupe,re=()=>Zs?!b.current&&d===C.current&&v.current:d===C.current,oe={isValidating:!1,isLoading:!1},ge=()=>{I(oe)},ae=()=>{const Ce=c[d];Ce&&Ce[1]===X&&delete c[d]},be={isValidating:!0};$e(j().data)&&(be.isLoading=!0);try{if(fe&&(I(be),n.loadingTimeout&&$e(j().data)&&setTimeout(()=>{F&&re()&&B().onLoadingSlow(d,n)},n.loadingTimeout),c[d]=[W(m),Ti()]),[G,X]=c[d],G=await G,fe&&setTimeout(ae,n.dedupingInterval),!c[d]||c[d][1]!==X)return fe&&re()&&B().onDiscarded(d),!1;oe.error=kt;const Ce=i[d];if(!$e(Ce)&&(X<=Ce[0]||X<=Ce[1]||Ce[1]===0))return ge(),fe&&re()&&B().onDiscarded(d),!1;const Fe=j().data;oe.data=o(Fe,G)?Fe:G,fe&&re()&&B().onSuccess(G,d,n)}catch(Ce){ae();const Fe=B(),{shouldRetryOnError:Ae}=Fe;Fe.isPaused()||(oe.error=Ce,fe&&re()&&(Fe.onError(Ce,d,Fe),(Ae===!0||Xt(Ae)&&Ae(Ce))&&(!B().revalidateOnFocus||!B().revalidateOnReconnect||O())&&Fe.onErrorRetry(Ce,d,Fe,Ve=>{const ze=y[d];ze&&ze[0]&&ze[0](dr.ERROR_REVALIDATE_EVENT,Ve)},{retryCount:(ce.retryCount||0)+1,dedupe:!0})))}return F=!1,ge(),!0},[d,r]),N=H.useCallback((...R)=>ol(r,C.current,...R),[]);if(Oi(()=>{S.current=t,k.current=n,$e(ee)||(me.current=ee)}),Oi(()=>{if(!d)return;const R=_.bind(kt,Ni);let W=0;const X=Rh(d,y,(F,ce={})=>{if(F==dr.FOCUS_EVENT){const fe=Date.now();B().revalidateOnFocus&&fe>W&&O()&&(W=fe+B().focusThrottleInterval,R())}else if(F==dr.RECONNECT_EVENT)B().revalidateOnReconnect&&O()&&R();else{if(F==dr.MUTATE_EVENT)return _();if(F==dr.ERROR_REVALIDATE_EVENT)return _(ce)}});return b.current=!1,C.current=d,v.current=!0,I({_k:m}),V&&($e(ue)||ur?R():hh(R)),()=>{b.current=!0,X()}},[d]),Oi(()=>{let R;function W(){const X=Xt(g)?g(j().data):g;X&&R!==-1&&(R=setTimeout(G,X))}function G(){!j().error&&(f||B().isVisible())&&(x||B().isOnline())?_(Ni).then(W):W()}return W(),()=>{R&&(clearTimeout(R),R=-1)}},[g,f,x,d]),H.useDebugValue(de),a&&$e(ue)&&d){if(!Zs&&ur)throw new Error("Fallback data is required when using suspense in SSR.");S.current=t,k.current=n,b.current=!1;const R=p[d];if(!$e(R)){const W=N(R);ll(W)}if($e(ne)){const W=_(Ni);$e(de)||(W.status="fulfilled",W.value=!0),ll(W)}else throw ne}return{mutate:N,get data(){return $.data=!0,de},get error(){return $.error=!0,ne},get isValidating(){return $.isValidating=!0,J},get isLoading(){return $.isLoading=!0,w}}}),fn=(e,t)=>{const n=h=>it.instance.get(h,{params:t}),{data:r,error:o,isLoading:a,isValidating:s,mutate:u}=Th(e,n,{shouldRetryOnError:!1,revalidateIfStale:!1});return{data:r,error:o,isLoading:a,isValidating:s,mutate:u}},Ze=(e="")=>`/api/v1/portal-sessions/${localStorage.getItem("portal_session_uuid")}/${e}`,cl="contact-attributes",ul={get:()=>it.instance.get(Ze(cl)),update:e=>it.instance.put(Ze(cl),e)},go="contacts",dl={exists:e=>it.instance.get(`${Ze(go)}/exists`,{params:{email:e}}),create:e=>it.instance.post(`${Ze(go)}`,{email:e}),linkIdentifier:(e,t)=>it.instance.post(`${Ze(go)}/link-identifier`,{contact_identifier_value:e,email:t})},yo=(e,t)=>{const{data:n,error:r,isLoading:o,isValidating:a,mutate:s}=fn(Ze(go),{contact_uuid:e,email:t});return{contact:n==null?void 0:n.data.data,data:n,error:r,isLoading:o,isValidating:a,mutate:s}},Nh="credit-receptions",jh={create:e=>it.instance.post(`${Ze(Nh)}/create`,e)},ji="giftcards",Ai={get:e=>it.instance.get(`${Ze(ji)}/${e}`),transaction:(e,t)=>it.instance.post(`${Ze(ji)}/transaction`,{uuid:e,amount_in_cents:t})},fl=e=>{const{data:t,error:n,isLoading:r,isValidating:o,mutate:a}=fn(Ze(ji)+`/${e}`);return{giftcard:t==null?void 0:t.data.data,data:t,error:n,isLoading:r,isValidating:o,mutate:a}},hl=H.createContext(null),pl=({children:e,apiKey:t,shopUuid:n,sessionUuid:r,onClaimReward:o,onRedeemVoucher:a,onUseGiftcard:s,host:u})=>(localStorage.setItem("portal_session_uuid",r),E.jsx(hl.Provider,{value:{apiKey:t,shopUuid:n,sessionUuid:r,onClaimReward:o,onRedeemVoucher:a,onUseGiftcard:s,host:u},children:e})),Ln=()=>{const e=H.useContext(hl);if(e===null)throw"Only use 'useSession' within a SessionProvider";return e},Li="/api/v1/portal-sessions/",vo={create:e=>it.instance.post(Li,e),setContact:(e,t)=>it.instance.put(Li+e,t)},Ct=()=>{const{sessionUuid:e}=Ln(),{data:t,error:n,isLoading:r,isValidating:o,mutate:a}=fn(Li+e);return{session:t==null?void 0:t.data.data,data:t,error:n,isLoading:r,isValidating:o,mutate:a}};var Mt=(e=>(e.HAND_SCANNER="hand_scanner",e.CAMERA="camera",e))(Mt||{});const ml="prepaid",Ah={transaction:e=>it.instance.post(`${Ze(ml)}/transaction`,e)},Lh=()=>{const{data:e,error:t,isLoading:n,isValidating:r,mutate:o}=fn(Ze(ml));return{balance:e==null?void 0:e.data.data,data:e,error:t,isLoading:n,isValidating:r,mutate:o}},Ii="rewards",Ih={get:e=>it.instance.get(`${Ze(Ii)}/${e}`),claim:e=>it.instance.post(`${Ze(Ii)}/claim/${e}`)},Dh=()=>{const{data:e,error:t,isLoading:n,isValidating:r,mutate:o}=fn(Ze(Ii));return{rewards:e==null?void 0:e.data.data,data:e,error:t,isLoading:n,isValidating:r,mutate:o}},gl="subscriptions",Mh={update:e=>it.instance.put(Ze(gl),e)},Fh=()=>{const{data:e,error:t,isLoading:n,isValidating:r,mutate:o}=fn(Ze(gl));return{subscriptions:e==null?void 0:e.data.data,data:e,error:t,isLoading:n,isValidating:r,mutate:o}};var fr=(e=>(e.SUBSCRIBED="SUBSCRIBED",e.UNSUBSCRIBED="UNSUBSCRIBED",e.PENDING_CONFIRMATION="PENDING_CONFIRMATION",e))(fr||{}),In=(e=>(e.OPT_OUT="OPT_OUT",e.OPT_IN="OPT_IN",e.DOUBLE_OPT_IN="DOUBLE_OPT_IN",e.FUNCTIONAL="FUNCTIONAL",e))(In||{});const bo="vouchers",Di={get:e=>it.instance.get(`${Ze(bo)}/${e}`),redeemById:e=>it.instance.post(`${Ze(bo)}/redeem/${e}`),redeemByCode:e=>it.instance.post(`${Ze(bo)}/redeem`,{code:e})},Uh=()=>{const{data:e,error:t,isLoading:n,isValidating:r,mutate:o}=fn(Ze(bo));return{rewards:e==null?void 0:e.data.data,data:e,error:t,isLoading:n,isValidating:r,mutate:o}};var yl=(e=>(e.INACTIVE="INACTIVE",e.ACTIVE="ACTIVE",e.EXPIRED="EXPIRED",e.LOCKED="LOCKED",e.REDEEMED="REDEEMED",e.DEACTIVATED="DEACTIVATED",e))(yl||{}),vl={exports:{}};/*!
51
+ */var Qs;function nh(){return Qs||(Qs=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=H,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(v){{for(var b=arguments.length,C=new Array(b>1?b-1:0),S=1;S<b;S++)C[S-1]=arguments[S];r("error",v,C)}}function r(v,b,C){{var S=t.ReactDebugCurrentFrame,k=S.getStackAddendum();k!==""&&(b+="%s",C=C.concat([k]));var B=C.map(function(O){return String(O)});B.unshift("Warning: "+b),Function.prototype.apply.call(console[v],console,B)}}function o(v,b){return v===b&&(v!==0||1/v===1/b)||v!==v&&b!==b}var a=typeof Object.is=="function"?Object.is:o,s=e.useState,u=e.useEffect,h=e.useLayoutEffect,g=e.useDebugValue,f=!1,x=!1;function l(v,b,C){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 S=b();if(!x){var k=b();a(S,k)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),x=!0)}var B=s({inst:{value:S,getSnapshot:b}}),O=B[0].inst,j=B[1];return h(function(){O.value=S,O.getSnapshot=b,y(O)&&j({inst:O})},[v,S,b]),u(function(){y(O)&&j({inst:O});var I=function(){y(O)&&j({inst:O})};return v(I)},[v]),g(S),S}function y(v){var b=v.getSnapshot,C=v.value;try{var S=b();return!a(C,S)}catch{return!0}}function i(v,b,C){return b()}var c=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",p=!c,d=p?i:l,m=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d;wi.useSyncExternalStore=m,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),wi}process.env.NODE_ENV==="production"?vi.exports=th():vi.exports=nh();var rh=vi.exports;const un=()=>{},kt=un(),xi=Object,$e=e=>e===kt,Xt=e=>typeof e=="function",dn=(e,t)=>({...e,...t}),oh=e=>Xt(e.then),po=new WeakMap;let ih=0;const cr=e=>{const t=typeof e,n=e&&e.constructor,r=n==Date;let o,a;if(xi(e)===e&&!r&&n!=RegExp){if(o=po.get(e),o)return o;if(o=++ih+"~",po.set(e,o),n==Array){for(o="@",a=0;a<e.length;a++)o+=cr(e[a])+",";po.set(e,o)}if(n==xi){o="#";const s=xi.keys(e).sort();for(;!$e(a=s.pop());)$e(e[a])||(o+=a+":"+cr(e[a])+",");po.set(e,o)}}else o=r?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return o},en=new WeakMap,ki={},mo={},Ci="undefined",go=typeof window!=Ci,Ei=typeof document!=Ci,ah=()=>go&&typeof window.requestAnimationFrame!=Ci,Zs=(e,t)=>{const n=en.get(e);return[()=>!$e(t)&&e.get(t)||ki,r=>{if(!$e(t)){const o=e.get(t);t in mo||(mo[t]=o),n[5](t,dn(o,r),o||ki)}},n[6],()=>!$e(t)&&t in mo?mo[t]:!$e(t)&&e.get(t)||ki]};let Si=!0;const sh=()=>Si,[Pi,Bi]=go&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[un,un],lh=()=>{const e=Ei&&document.visibilityState;return $e(e)||e!=="hidden"},ch=e=>(Ei&&document.addEventListener("visibilitychange",e),Pi("focus",e),()=>{Ei&&document.removeEventListener("visibilitychange",e),Bi("focus",e)}),uh=e=>{const t=()=>{Si=!0,e()},n=()=>{Si=!1};return Pi("online",t),Pi("offline",n),()=>{Bi("online",t),Bi("offline",n)}},dh={isOnline:sh,isVisible:lh},fh={initFocus:ch,initReconnect:uh},el=!H.useId,ur=!go||"Deno"in window,hh=e=>ah()?window.requestAnimationFrame(e):setTimeout(e,1),Oi=ur?H.useEffect:H.useLayoutEffect,_i=typeof navigator<"u"&&navigator.connection,tl=!ur&&_i&&(["slow-2g","2g"].includes(_i.effectiveType)||_i.saveData),Ri=e=>{if(Xt(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?cr(e):"",[e,t]};let ph=0;const Ti=()=>++ph,nl=0,rl=1,ol=2;var dr={__proto__:null,ERROR_REVALIDATE_EVENT:3,FOCUS_EVENT:nl,MUTATE_EVENT:ol,RECONNECT_EVENT:rl};async function il(...e){const[t,n,r,o]=e,a=dn({populateCache:!0,throwOnError:!0},typeof o=="boolean"?{revalidate:o}:o||{});let s=a.populateCache;const u=a.rollbackOnError;let h=a.optimisticData;const g=l=>typeof u=="function"?u(l):u!==!1,f=a.throwOnError;if(Xt(n)){const l=n,y=[],i=t.keys();for(const c of i)!/^\$(inf|sub)\$/.test(c)&&l(t.get(c)._k)&&y.push(c);return Promise.all(y.map(x))}return x(n);async function x(l){const[y]=Ri(l);if(!y)return;const[i,c]=Zs(t,y),[p,d,m,v]=en.get(t),b=()=>{const M=p[y];return(Xt(a.revalidate)?a.revalidate(i().data,l):a.revalidate!==!1)&&(delete m[y],delete v[y],M&&M[0])?M[0](ol).then(()=>i().data):i().data};if(e.length<3)return b();let C=r,S;const k=Ti();d[y]=[k,0];const B=!$e(h),O=i(),j=O.data,I=O._c,D=$e(I)?j:I;if(B&&(h=Xt(h)?h(D,j):h,c({data:h,_c:D})),Xt(C))try{C=C(D)}catch(M){S=M}if(C&&oh(C))if(C=await C.catch(M=>{S=M}),k!==d[y][0]){if(S)throw S;return C}else S&&B&&g(S)&&(s=!0,c({data:D,_c:kt}));if(s&&!S)if(Xt(s)){const M=s(C,D);c({data:M,error:kt,_c:kt})}else c({data:C,error:kt,_c:kt});if(d[y][1]=Ti(),Promise.resolve(b()).then(()=>{c({_c:kt})}),S){if(f)throw S;return}return C}}const al=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},mh=(e,t)=>{if(!en.has(e)){const n=dn(fh,t),r={},o=il.bind(kt,e);let a=un;const s={},u=(f,x)=>{const l=s[f]||[];return s[f]=l,l.push(x),()=>l.splice(l.indexOf(x),1)},h=(f,x,l)=>{e.set(f,x);const y=s[f];if(y)for(const i of y)i(x,l)},g=()=>{if(!en.has(e)&&(en.set(e,[r,{},{},{},o,h,u]),!ur)){const f=n.initFocus(setTimeout.bind(kt,al.bind(kt,r,nl))),x=n.initReconnect(setTimeout.bind(kt,al.bind(kt,r,rl)));a=()=>{f&&f(),x&&x(),en.delete(e)}}};return g(),[e,o,g,a]}return[e,en.get(e)[4]]},gh=(e,t,n,r,o)=>{const a=n.errorRetryCount,s=o.retryCount,u=~~((Math.random()+.5)*(1<<(s<8?s:8)))*n.errorRetryInterval;!$e(a)&&s>a||setTimeout(r,u,o)},yh=(e,t)=>cr(e)==cr(t),[sl,vh]=mh(new Map),bh=dn({onLoadingSlow:un,onSuccess:un,onError:un,onErrorRetry:gh,onDiscarded:un,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:tl?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:tl?5e3:3e3,compare:yh,isPaused:()=>!1,cache:sl,mutate:vh,fallback:{}},dh),wh=(e,t)=>{const n=dn(e,t);if(t){const{use:r,fallback:o}=e,{use:a,fallback:s}=t;r&&a&&(n.use=r.concat(a)),o&&s&&(n.fallback=dn(o,s))}return n},xh=H.createContext({}),kh="$inf$",ll=go&&window.__SWR_DEVTOOLS_USE__,Ch=ll?window.__SWR_DEVTOOLS_USE__:[],Eh=()=>{ll&&(window.__SWR_DEVTOOLS_REACT__=H)},Sh=e=>Xt(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],Ph=()=>dn(bh,H.useContext(xh)),Bh=e=>(t,n,r)=>e(t,n&&((...a)=>{const[s]=Ri(t),[,,,u]=en.get(sl);if(s.startsWith(kh))return n(...a);const h=u[s];return $e(h)?n(...a):(delete u[s],h)}),r),Oh=Ch.concat(Bh),_h=e=>function(...n){const r=Ph(),[o,a,s]=Sh(n),u=wh(r,s);let h=e;const{use:g}=u,f=(g||[]).concat(Oh);for(let x=f.length;x--;)h=f[x](h);return h(o,a||u.fetcher||null,u)},Rh=(e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const o=r.indexOf(n);o>=0&&(r[o]=r[r.length-1],r.pop())}};Eh();const cl=H.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)}),Ni={dedupe:!0},Th=_h((e,t,n)=>{const{cache:r,compare:o,suspense:a,fallbackData:s,revalidateOnMount:u,revalidateIfStale:h,refreshInterval:g,refreshWhenHidden:f,refreshWhenOffline:x,keepPreviousData:l}=n,[y,i,c,p]=en.get(r),[d,m]=Ri(e),v=H.useRef(!1),b=H.useRef(!1),C=H.useRef(d),S=H.useRef(t),k=H.useRef(n),B=()=>k.current,O=()=>B().isVisible()&&B().isOnline(),[j,I,D,M]=Zs(r,d),$=H.useRef({}).current,P=$e(s)?n.fallback[d]:s,L=(R,W)=>{for(const G in $){const X=G;if(X==="data"){if(!o(R[X],W[X])&&(!$e(R[X])||!o(de,W[X])))return!1}else if(W[X]!==R[X])return!1}return!0},q=H.useMemo(()=>{const R=!d||!t?!1:$e(u)?B().isPaused()||a?!1:$e(h)?!0:h:u,W=re=>{const oe=dn(re);return delete oe._k,R?{isValidating:!0,isLoading:!0,...oe}:oe},G=j(),X=M(),F=W(G),ce=G===X?F:W(X);let fe=F;return[()=>{const re=W(j());return L(re,fe)?(fe.data=re.data,fe.isLoading=re.isLoading,fe.isValidating=re.isValidating,fe.error=re.error,fe):(fe=re,re)},()=>ce]},[r,d]),K=rh.useSyncExternalStore(H.useCallback(R=>D(d,(W,G)=>{L(G,W)||R()}),[r,d]),q[0],q[1]),Q=!v.current,Z=y[d]&&y[d].length>0,ee=K.data,ue=$e(ee)?P:ee,ne=K.error,me=H.useRef(ue),de=l?$e(ee)?me.current:ee:ue,V=Z&&!$e(ne)?!1:Q&&!$e(u)?u:B().isPaused()?!1:a?$e(ue)?!1:h:$e(ue)||h,U=!!(d&&t&&Q&&V),J=$e(K.isValidating)?U:K.isValidating,w=$e(K.isLoading)?U:K.isLoading,_=H.useCallback(async R=>{const W=S.current;if(!d||!W||b.current||B().isPaused())return!1;let G,X,F=!0;const ce=R||{},fe=!c[d]||!ce.dedupe,re=()=>el?!b.current&&d===C.current&&v.current:d===C.current,oe={isValidating:!1,isLoading:!1},ge=()=>{I(oe)},ae=()=>{const Ce=c[d];Ce&&Ce[1]===X&&delete c[d]},be={isValidating:!0};$e(j().data)&&(be.isLoading=!0);try{if(fe&&(I(be),n.loadingTimeout&&$e(j().data)&&setTimeout(()=>{F&&re()&&B().onLoadingSlow(d,n)},n.loadingTimeout),c[d]=[W(m),Ti()]),[G,X]=c[d],G=await G,fe&&setTimeout(ae,n.dedupingInterval),!c[d]||c[d][1]!==X)return fe&&re()&&B().onDiscarded(d),!1;oe.error=kt;const Ce=i[d];if(!$e(Ce)&&(X<=Ce[0]||X<=Ce[1]||Ce[1]===0))return ge(),fe&&re()&&B().onDiscarded(d),!1;const Fe=j().data;oe.data=o(Fe,G)?Fe:G,fe&&re()&&B().onSuccess(G,d,n)}catch(Ce){ae();const Fe=B(),{shouldRetryOnError:Ae}=Fe;Fe.isPaused()||(oe.error=Ce,fe&&re()&&(Fe.onError(Ce,d,Fe),(Ae===!0||Xt(Ae)&&Ae(Ce))&&(!B().revalidateOnFocus||!B().revalidateOnReconnect||O())&&Fe.onErrorRetry(Ce,d,Fe,Ve=>{const ze=y[d];ze&&ze[0]&&ze[0](dr.ERROR_REVALIDATE_EVENT,Ve)},{retryCount:(ce.retryCount||0)+1,dedupe:!0})))}return F=!1,ge(),!0},[d,r]),N=H.useCallback((...R)=>il(r,C.current,...R),[]);if(Oi(()=>{S.current=t,k.current=n,$e(ee)||(me.current=ee)}),Oi(()=>{if(!d)return;const R=_.bind(kt,Ni);let W=0;const X=Rh(d,y,(F,ce={})=>{if(F==dr.FOCUS_EVENT){const fe=Date.now();B().revalidateOnFocus&&fe>W&&O()&&(W=fe+B().focusThrottleInterval,R())}else if(F==dr.RECONNECT_EVENT)B().revalidateOnReconnect&&O()&&R();else{if(F==dr.MUTATE_EVENT)return _();if(F==dr.ERROR_REVALIDATE_EVENT)return _(ce)}});return b.current=!1,C.current=d,v.current=!0,I({_k:m}),V&&($e(ue)||ur?R():hh(R)),()=>{b.current=!0,X()}},[d]),Oi(()=>{let R;function W(){const X=Xt(g)?g(j().data):g;X&&R!==-1&&(R=setTimeout(G,X))}function G(){!j().error&&(f||B().isVisible())&&(x||B().isOnline())?_(Ni).then(W):W()}return W(),()=>{R&&(clearTimeout(R),R=-1)}},[g,f,x,d]),H.useDebugValue(de),a&&$e(ue)&&d){if(!el&&ur)throw new Error("Fallback data is required when using suspense in SSR.");S.current=t,k.current=n,b.current=!1;const R=p[d];if(!$e(R)){const W=N(R);cl(W)}if($e(ne)){const W=_(Ni);$e(de)||(W.status="fulfilled",W.value=!0),cl(W)}else throw ne}return{mutate:N,get data(){return $.data=!0,de},get error(){return $.error=!0,ne},get isValidating(){return $.isValidating=!0,J},get isLoading(){return $.isLoading=!0,w}}}),fn=(e,t)=>{const n=h=>tt.instance.get(h,{params:t}),{data:r,error:o,isLoading:a,isValidating:s,mutate:u}=Th(e,n,{shouldRetryOnError:!1,revalidateIfStale:!1});return{data:r,error:o,isLoading:a,isValidating:s,mutate:u}},Je=(e="")=>`/api/v1/portal-sessions/${localStorage.getItem("portal_session_uuid")}/${e}`,ul="contact-attributes",dl={get:()=>tt.instance.get(Je(ul)),update:e=>tt.instance.put(Je(ul),e)},fr="contacts",ji={get:(e,t)=>tt.instance.get(Je(fr),{params:{contact_uuid:e,email:t}}),exists:e=>tt.instance.get(`${Je(fr)}/exists`,{params:{email:e}}),create:e=>tt.instance.post(`${Je(fr)}`,{email:e}),linkIdentifier:(e,t)=>tt.instance.post(`${Je(fr)}/link-identifier`,{contact_identifier_value:e,email:t})},yo=(e,t)=>{const{data:n,error:r,isLoading:o,isValidating:a,mutate:s}=fn(Je(fr),{contact_uuid:e,email:t});return{contact:n==null?void 0:n.data.data,data:n,error:r,isLoading:o,isValidating:a,mutate:s}},Nh="credit-receptions",jh={create:e=>tt.instance.post(`${Je(Nh)}/create`,e)},Ai="giftcards",Li={get:e=>tt.instance.get(`${Je(Ai)}/${e}`),transaction:(e,t)=>tt.instance.post(`${Je(Ai)}/transaction`,{uuid:e,amount_in_cents:t})},fl=e=>{const{data:t,error:n,isLoading:r,isValidating:o,mutate:a}=fn(Je(Ai)+`/${e}`);return{giftcard:t==null?void 0:t.data.data,data:t,error:n,isLoading:r,isValidating:o,mutate:a}},hl=H.createContext(null),pl=({children:e,apiKey:t,shopUuid:n,sessionUuid:r,onContactLink:o,onClaimReward:a,onRedeemVoucher:s,onUseGiftcard:u,host:h})=>(localStorage.setItem("portal_session_uuid",r),E.jsx(hl.Provider,{value:{apiKey:t,shopUuid:n,sessionUuid:r,onContactLink:o,onClaimReward:a,onRedeemVoucher:s,onUseGiftcard:u,host:h},children:e})),kn=()=>{const e=H.useContext(hl);if(e===null)throw"Only use 'useSession' within a SessionProvider";return e},Ii="/api/v1/portal-sessions/",vo={create:e=>tt.instance.post(Ii,e),setContact:(e,t)=>tt.instance.put(Ii+e,t)},Ct=()=>{const{sessionUuid:e}=kn(),{data:t,error:n,isLoading:r,isValidating:o,mutate:a}=fn(Ii+e);return{session:t==null?void 0:t.data.data,data:t,error:n,isLoading:r,isValidating:o,mutate:a}};var Mt=(e=>(e.HAND_SCANNER="hand_scanner",e.CAMERA="camera",e))(Mt||{});const ml="prepaid",Ah={transaction:e=>tt.instance.post(`${Je(ml)}/transaction`,e)},Lh=()=>{const{data:e,error:t,isLoading:n,isValidating:r,mutate:o}=fn(Je(ml));return{balance:e==null?void 0:e.data.data,data:e,error:t,isLoading:n,isValidating:r,mutate:o}},Di="rewards",Ih={get:e=>tt.instance.get(`${Je(Di)}/${e}`),claim:e=>tt.instance.post(`${Je(Di)}/claim/${e}`)},Dh=()=>{const{data:e,error:t,isLoading:n,isValidating:r,mutate:o}=fn(Je(Di));return{rewards:e==null?void 0:e.data.data,data:e,error:t,isLoading:n,isValidating:r,mutate:o}},gl="subscriptions",Mh={update:e=>tt.instance.put(Je(gl),e)},Fh=()=>{const{data:e,error:t,isLoading:n,isValidating:r,mutate:o}=fn(Je(gl));return{subscriptions:e==null?void 0:e.data.data,data:e,error:t,isLoading:n,isValidating:r,mutate:o}};var hr=(e=>(e.SUBSCRIBED="SUBSCRIBED",e.UNSUBSCRIBED="UNSUBSCRIBED",e.PENDING_CONFIRMATION="PENDING_CONFIRMATION",e))(hr||{}),In=(e=>(e.OPT_OUT="OPT_OUT",e.OPT_IN="OPT_IN",e.DOUBLE_OPT_IN="DOUBLE_OPT_IN",e.FUNCTIONAL="FUNCTIONAL",e))(In||{});const bo="vouchers",Mi={get:e=>tt.instance.get(`${Je(bo)}/${e}`),redeemById:e=>tt.instance.post(`${Je(bo)}/redeem/${e}`),redeemByCode:e=>tt.instance.post(`${Je(bo)}/redeem`,{code:e})},Uh=()=>{const{data:e,error:t,isLoading:n,isValidating:r,mutate:o}=fn(Je(bo));return{rewards:e==null?void 0:e.data.data,data:e,error:t,isLoading:n,isValidating:r,mutate:o}};var yl=(e=>(e.INACTIVE="INACTIVE",e.ACTIVE="ACTIVE",e.EXPIRED="EXPIRED",e.LOCKED="LOCKED",e.REDEEMED="REDEEMED",e.DEACTIVATED="DEACTIVATED",e))(yl||{}),vl={exports:{}};/*!
52
52
  Copyright (c) 2018 Jed Watson.
53
53
  Licensed under the MIT License (MIT), see
54
54
  http://jedwatson.github.io/classnames
55
- */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var a="",s=0;s<arguments.length;s++){var u=arguments[s];u&&(a=o(a,r(u)))}return a}function r(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return n.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var s="";for(var u in a)t.call(a,u)&&a[u]&&(s=o(s,u));return s}function o(a,s){return s?a?a+" "+s:a+s:a}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(vl);var $h=vl.exports;const hr=Xo($h);function Vh(e){return E.jsxs("svg",{...e,"aria-hidden":"true",role:"status",className:hr("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:[E.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"}),E.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"})]})}function Je({label:e,...t}){const[n,r]=H.useState(!1),o=a=>{t.onClick&&!n&&(r(!0),Promise.resolve(t.onClick(a)).finally(()=>r(!1)))};return E.jsxs("button",{...t,disabled:t.disabled||n,onClick:o,className:"relative flex h-[40px] items-center justify-center rounded-lg border bg-primary-600 px-3 font-normal text-white hover:border-[#101028] hover:bg-primary-700 active:bg-primary-800 disabled:cursor-not-allowed disabled:border-gray-900/[.1] disabled:bg-gray-50 disabled:text-[#353454]",children:[E.jsx("p",{className:`text-sm ${n&&"opacity-0"}`,children:e}),n&&E.jsx(Vh,{className:"absolute"})]})}function qe({className:e,hidden:t,children:n,onClick:r,align:o,size:a="md",weight:s="light",render_as:u="p",dangerously_set_inner_html:h=!1}){const g=hr({"text-xs":a=="xs"},{"text-sm":a=="sm"},{"text-base":a=="md"},{"text-lg":a=="lg"},{"text-xl":a=="xl"},{"text-2xl":a=="2xl"},{"text-3xl":a=="3xl"},{"text-4xl":a=="4xl"},{"text-5xl":a=="5xl"}),f=hr({"font-thin":s=="thin"},{"font-extralight":s=="extralight"},{"font-light":s=="light"},{"font-normal":s=="normal"},{"font-medium":s=="medium"},{"font-semibold":s=="semibold"},{"font-bold":s=="bold"},{"font-extrabold":s=="extrabold"},{"font-black":s=="black"}),x=hr({"text-center":o=="center"},{"text-left":o=="left"},{"text-right":o=="right"}),l=hr(g,f,x,r?"hover:cursor-pointer hover:underline":"",e??"");return u=="label"?E.jsx("label",{hidden:t,className:l,dangerouslySetInnerHTML:h?{__html:n}:void 0,onClick:r,children:h?void 0:n}):u=="span"?E.jsx("span",{hidden:t,className:l,dangerouslySetInnerHTML:h?{__html:n}:void 0,onClick:r,children:h?void 0:n}):E.jsx("p",{hidden:t,className:l,dangerouslySetInnerHTML:h?{__html:n}:void 0,onClick:r,children:h?void 0:n})}function Hh(e){const{onClick:t,elements:n}=e;return E.jsx("div",{className:"flex w-full cursor-pointer rounded-lg border border-gray-200 bg-white",children:n.map(r=>E.jsx("div",{onClick:()=>t(r.key),className:`grow border-r border-gray-200 p-2 first-of-type:rounded-l-lg last-of-type:rounded-r-lg last-of-type:border-r-0 ${r.active?"bg-primary-50":"bg-white"}`,children:E.jsx(qe,{className:"mx-2",align:"center",children:r.label})},r.label))})}function Mi(e){return E.jsx("div",{className:"relative mb-2 w-full border-b border-gray-100 pt-3",children:E.jsxs("div",{className:"pb-1 pl-1 pt-1",children:[E.jsx(qe,{weight:"normal",color:"text-gray-500",size:"xs",children:e.label}),E.jsx("div",{className:"min-h-[1.7rem]",children:e.children})]})})}function zh(e){return E.jsx(Mi,{label:e.label,children:E.jsx(qe,{weight:"extralight",children:e.value})})}function qh(e){const t=n=>E.jsx("div",{className:"mt-1 flex w-fit rounded border border-primary-200 bg-primary-100 px-2 py-px",children:E.jsx(qe,{render_as:"span",size:"sm",weight:"normal",color:"text-primary-800",children:n.value})});return E.jsx(Mi,{label:e.label,children:Array.isArray(e.value)?E.jsx("div",{className:"flex max-w-full gap-1 overflow-x-scroll",children:e.value.map((n,r)=>E.jsx(t,{value:n},r))}):e.value&&E.jsx(t,{value:e.value})})}function Kh(e){switch(e){case!0:case"true":case 1:case"1":case"on":case"yes":return!0;default:return!1}}function Wh(e){return E.jsx(Mi,{label:e.label,children:E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsx("div",{className:`h-fit rounded-full p-1 ${e.underlying_value&&Kh(e.underlying_value)?"bg-green-500":"bg-red-600"}`}),E.jsx(qe,{children:e.value})]})})}function Gh(e){const{type:t,value:n,label:r,underlying_value:o}=e;return t==="select"||t=="multi_select"?E.jsx(qh,{label:r,value:n}):t==="checkbox"?E.jsx(Wh,{label:r,value:n,underlying_value:o}):E.jsx(zh,{label:r,value:n})}function Xh(e){const{searchable:t,hide_label:n,...r}=e;return e.type==="select"?E.jsx(ep,{...r,onChange:(o,a)=>e.onChange&&e.onChange(o,a)}):e.type==="multi_select"?E.jsx(Zh,{...r,onChange:(o,a)=>e.onChange&&e.onChange(o,a)}):E.jsx(Dn,{...r,onChange:(o,a)=>e.onChange&&e.onChange(o,a)})}var bl={exports:{}};/*!
55
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var a="",s=0;s<arguments.length;s++){var u=arguments[s];u&&(a=o(a,r(u)))}return a}function r(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return n.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var s="";for(var u in a)t.call(a,u)&&a[u]&&(s=o(s,u));return s}function o(a,s){return s?a?a+" "+s:a+s:a}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(vl);var $h=vl.exports;const pr=Xo($h);function Vh(e){return E.jsxs("svg",{...e,"aria-hidden":"true",role:"status",className:pr("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:[E.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"}),E.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"})]})}function Ye({label:e,...t}){const[n,r]=H.useState(!1),o=a=>{t.onClick&&!n&&(r(!0),Promise.resolve(t.onClick(a)).finally(()=>r(!1)))};return E.jsxs("button",{...t,disabled:t.disabled||n,onClick:o,className:"relative flex h-[40px] items-center justify-center rounded-lg border bg-primary-600 px-3 font-normal text-white hover:border-[#101028] hover:bg-primary-700 active:bg-primary-800 disabled:cursor-not-allowed disabled:border-gray-900/[.1] disabled:bg-gray-50 disabled:text-[#353454]",children:[E.jsx("p",{className:`text-sm ${n&&"opacity-0"}`,children:e}),n&&E.jsx(Vh,{className:"absolute"})]})}function qe({className:e,hidden:t,children:n,onClick:r,align:o,size:a="md",weight:s="light",render_as:u="p",dangerously_set_inner_html:h=!1}){const g=pr({"text-xs":a=="xs"},{"text-sm":a=="sm"},{"text-base":a=="md"},{"text-lg":a=="lg"},{"text-xl":a=="xl"},{"text-2xl":a=="2xl"},{"text-3xl":a=="3xl"},{"text-4xl":a=="4xl"},{"text-5xl":a=="5xl"}),f=pr({"font-thin":s=="thin"},{"font-extralight":s=="extralight"},{"font-light":s=="light"},{"font-normal":s=="normal"},{"font-medium":s=="medium"},{"font-semibold":s=="semibold"},{"font-bold":s=="bold"},{"font-extrabold":s=="extrabold"},{"font-black":s=="black"}),x=pr({"text-center":o=="center"},{"text-left":o=="left"},{"text-right":o=="right"}),l=pr(g,f,x,r?"hover:cursor-pointer hover:underline":"",e??"");return u=="label"?E.jsx("label",{hidden:t,className:l,dangerouslySetInnerHTML:h?{__html:n}:void 0,onClick:r,children:h?void 0:n}):u=="span"?E.jsx("span",{hidden:t,className:l,dangerouslySetInnerHTML:h?{__html:n}:void 0,onClick:r,children:h?void 0:n}):E.jsx("p",{hidden:t,className:l,dangerouslySetInnerHTML:h?{__html:n}:void 0,onClick:r,children:h?void 0:n})}function Hh(e){const{onClick:t,elements:n}=e;return E.jsx("div",{className:"flex w-full cursor-pointer rounded-lg border border-gray-200 bg-white",children:n.map(r=>E.jsx("div",{onClick:()=>t(r.key),className:`grow border-r border-gray-200 p-2 first-of-type:rounded-l-lg last-of-type:rounded-r-lg last-of-type:border-r-0 ${r.active?"bg-primary-50":"bg-white"}`,children:E.jsx(qe,{className:"mx-2",align:"center",children:r.label})},r.label))})}function Fi(e){return E.jsx("div",{className:"relative mb-2 w-full border-b border-gray-100 pt-3",children:E.jsxs("div",{className:"pb-1 pl-1 pt-1",children:[E.jsx(qe,{weight:"normal",color:"text-gray-500",size:"xs",children:e.label}),E.jsx("div",{className:"min-h-[1.7rem]",children:e.children})]})})}function zh(e){return E.jsx(Fi,{label:e.label,children:E.jsx(qe,{weight:"extralight",children:e.value})})}function qh(e){const t=n=>E.jsx("div",{className:"mt-1 flex w-fit rounded border border-primary-200 bg-primary-100 px-2 py-px",children:E.jsx(qe,{render_as:"span",size:"sm",weight:"normal",color:"text-primary-800",children:n.value})});return E.jsx(Fi,{label:e.label,children:Array.isArray(e.value)?E.jsx("div",{className:"flex max-w-full gap-1 overflow-x-scroll",children:e.value.map((n,r)=>E.jsx(t,{value:n},r))}):e.value&&E.jsx(t,{value:e.value})})}function Kh(e){switch(e){case!0:case"true":case 1:case"1":case"on":case"yes":return!0;default:return!1}}function Wh(e){return E.jsx(Fi,{label:e.label,children:E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsx("div",{className:`h-fit rounded-full p-1 ${e.underlying_value&&Kh(e.underlying_value)?"bg-green-500":"bg-red-600"}`}),E.jsx(qe,{children:e.value})]})})}function Gh(e){const{type:t,value:n,label:r,underlying_value:o}=e;return t==="select"||t=="multi_select"?E.jsx(qh,{label:r,value:n}):t==="checkbox"?E.jsx(Wh,{label:r,value:n,underlying_value:o}):E.jsx(zh,{label:r,value:n})}function Xh(e){const{searchable:t,hide_label:n,...r}=e;return e.type==="select"?E.jsx(ep,{...r,onChange:(o,a)=>e.onChange&&e.onChange(o,a)}):e.type==="multi_select"?E.jsx(Zh,{...r,onChange:(o,a)=>e.onChange&&e.onChange(o,a)}):E.jsx(Dn,{...r,onChange:(o,a)=>e.onChange&&e.onChange(o,a)})}var bl={exports:{}};/*!
56
56
  *
57
57
  * react-simple-keyboard v3.7.121
58
58
  * https://github.com/hodgef/react-simple-keyboard
@@ -62,15 +62,15 @@ React keys must be passed directly to JSX without using spread:
62
62
  * This source code is licensed under the MIT license found in the
63
63
  * LICENSE file in the root directory of this source tree.
64
64
  *
65
- */(function(e,t){(function(n,r){e.exports=r(H)})(_n,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(u){if("Element"in u){var h="classList",g="prototype",f=u.Element[g],x=Object,l=String[g].trim||function(){return this.replace(/^\s+|\s+$/g,"")},y=Array[g].indexOf||function(b){for(var C=0,S=this.length;C<S;C++)if(C in this&&this[C]===b)return C;return-1},i=function(b,C){this.name=b,this.code=DOMException[b],this.message=C},c=function(b,C){if(C==="")throw new i("SYNTAX_ERR","The token must not be empty.");if(/\s/.test(C))throw new i("INVALID_CHARACTER_ERR","The token must not contain space characters.");return y.call(b,C)},p=function(b){for(var C=l.call(b.getAttribute("class")||""),S=C?C.split(/\s+/):[],k=0,B=S.length;k<B;k++)this.push(S[k]);this._updateClassName=function(){b.setAttribute("class",this.toString())}},d=p[g]=[],m=function(){return new p(this)};if(i[g]=Error[g],d.item=function(b){return this[b]||null},d.contains=function(b){return~c(this,b+"")},d.add=function(){var b,C=arguments,S=0,k=C.length,B=!1;do~c(this,b=C[S]+"")||(this.push(b),B=!0);while(++S<k);B&&this._updateClassName()},d.remove=function(){var b,C,S=arguments,k=0,B=S.length,O=!1;do for(C=c(this,b=S[k]+"");~C;)this.splice(C,1),O=!0,C=c(this,b);while(++k<B);O&&this._updateClassName()},d.toggle=function(b,C){var S=this.contains(b),k=S?C!==!0&&"remove":C!==!1&&"add";return k&&this[k](b),C===!0||C===!1?C:!S},d.replace=function(b,C){var S=c(b+"");~S&&(this.splice(S,1,C),this._updateClassName())},d.toString=function(){return this.join(" ")},x.defineProperty){var v={get:m,enumerable:!0,configurable:!0};try{x.defineProperty(f,h,v)}catch(b){b.number!==void 0&&b.number!==-2146823252||(v.enumerable=!1,x.defineProperty(f,h,v))}}else x[g].__defineGetter__&&f.__defineGetter__(h,m)}}(self),function(){var u=document.createElement("_");if(u.classList.add("c1","c2"),!u.classList.contains("c2")){var h=function(f){var x=DOMTokenList.prototype[f];DOMTokenList.prototype[f]=function(l){var y,i=arguments.length;for(y=0;y<i;y++)l=arguments[y],x.call(this,l)}};h("add"),h("remove")}if(u.classList.toggle("c3",!1),u.classList.contains("c3")){var g=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(f,x){return 1 in arguments&&!this.contains(f)==!x?x:g.call(this,f)}}"replace"in document.createElement("_").classList||(DOMTokenList.prototype.replace=function(f,x){var l=this.toString().split(" "),y=l.indexOf(f+"");~y&&(l=l.slice(y),this.remove.apply(this,l),this.add(x),this.add.apply(this,l.slice(1)))}),u=null}())},548:function(u){u.exports=function(){var h={9306:function(l,y,i){var c=i(4901),p=i(6823),d=TypeError;l.exports=function(m){if(c(m))return m;throw new d(p(m)+" is not a function")}},5548:function(l,y,i){var c=i(3517),p=i(6823),d=TypeError;l.exports=function(m){if(c(m))return m;throw new d(p(m)+" is not a constructor")}},3506:function(l,y,i){var c=i(3925),p=String,d=TypeError;l.exports=function(m){if(c(m))return m;throw new d("Can't set "+p(m)+" as a prototype")}},6469:function(l,y,i){var c=i(8227),p=i(2360),d=i(4913).f,m=c("unscopables"),v=Array.prototype;v[m]===void 0&&d(v,m,{configurable:!0,value:p(null)}),l.exports=function(b){v[m][b]=!0}},7829:function(l,y,i){var c=i(8183).charAt;l.exports=function(p,d,m){return d+(m?c(p,d).length:1)}},8551:function(l,y,i){var c=i(34),p=String,d=TypeError;l.exports=function(m){if(c(m))return m;throw new d(p(m)+" is not an object")}},235:function(l,y,i){var c=i(9213).forEach,p=i(4598)("forEach");l.exports=p?[].forEach:function(d){return c(this,d,arguments.length>1?arguments[1]:void 0)}},7916:function(l,y,i){var c=i(6080),p=i(9565),d=i(8981),m=i(6319),v=i(4209),b=i(3517),C=i(6198),S=i(4659),k=i(81),B=i(851),O=Array;l.exports=function(j){var I=d(j),D=b(this),M=arguments.length,$=M>1?arguments[1]:void 0,P=$!==void 0;P&&($=c($,M>2?arguments[2]:void 0));var L,q,K,Q,Z,ee,ue=B(I),ne=0;if(!ue||this===O&&v(ue))for(L=C(I),q=D?new this(L):O(L);L>ne;ne++)ee=P?$(I[ne],ne):I[ne],S(q,ne,ee);else for(q=D?new this:[],Z=(Q=k(I,ue)).next;!(K=p(Z,Q)).done;ne++)ee=P?m(Q,$,[K.value,ne],!0):K.value,S(q,ne,ee);return q.length=ne,q}},9617:function(l,y,i){var c=i(5397),p=i(5610),d=i(6198),m=function(v){return function(b,C,S){var k=c(b),B=d(k);if(B===0)return!v&&-1;var O,j=p(S,B);if(v&&C!=C){for(;B>j;)if((O=k[j++])!=O)return!0}else for(;B>j;j++)if((v||j in k)&&k[j]===C)return v||j||0;return!v&&-1}};l.exports={includes:m(!0),indexOf:m(!1)}},9213:function(l,y,i){var c=i(6080),p=i(9504),d=i(7055),m=i(8981),v=i(6198),b=i(1469),C=p([].push),S=function(k){var B=k===1,O=k===2,j=k===3,I=k===4,D=k===6,M=k===7,$=k===5||D;return function(P,L,q,K){for(var Q,Z,ee=m(P),ue=d(ee),ne=v(ue),me=c(L,q),de=0,V=K||b,U=B?V(P,ne):O||M?V(P,0):void 0;ne>de;de++)if(($||de in ue)&&(Z=me(Q=ue[de],de,ee),k))if(B)U[de]=Z;else if(Z)switch(k){case 3:return!0;case 5:return Q;case 6:return de;case 2:C(U,Q)}else switch(k){case 4:return!1;case 7:C(U,Q)}return D?-1:j||I?I:U}};l.exports={forEach:S(0),map:S(1),filter:S(2),some:S(3),every:S(4),find:S(5),findIndex:S(6),filterReject:S(7)}},597:function(l,y,i){var c=i(9039),p=i(8227),d=i(7388),m=p("species");l.exports=function(v){return d>=51||!c(function(){var b=[];return(b.constructor={})[m]=function(){return{foo:1}},b[v](Boolean).foo!==1})}},4598:function(l,y,i){var c=i(9039);l.exports=function(p,d){var m=[][p];return!!m&&c(function(){m.call(null,d||function(){return 1},1)})}},926:function(l,y,i){var c=i(9306),p=i(8981),d=i(7055),m=i(6198),v=TypeError,b="Reduce of empty array with no initial value",C=function(S){return function(k,B,O,j){var I=p(k),D=d(I),M=m(I);if(c(B),M===0&&O<2)throw new v(b);var $=S?M-1:0,P=S?-1:1;if(O<2)for(;;){if($ in D){j=D[$],$+=P;break}if($+=P,S?$<0:M<=$)throw new v(b)}for(;S?$>=0:M>$;$+=P)$ in D&&(j=B(j,D[$],$,I));return j}};l.exports={left:C(!1),right:C(!0)}},4527:function(l,y,i){var c=i(3724),p=i(4376),d=TypeError,m=Object.getOwnPropertyDescriptor,v=c&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(b){return b instanceof TypeError}}();l.exports=v?function(b,C){if(p(b)&&!m(b,"length").writable)throw new d("Cannot set read only .length");return b.length=C}:function(b,C){return b.length=C}},7680:function(l,y,i){var c=i(9504);l.exports=c([].slice)},4488:function(l,y,i){var c=i(7680),p=Math.floor,d=function(m,v){var b=m.length;if(b<8)for(var C,S,k=1;k<b;){for(S=k,C=m[k];S&&v(m[S-1],C)>0;)m[S]=m[--S];S!==k++&&(m[S]=C)}else for(var B=p(b/2),O=d(c(m,0,B),v),j=d(c(m,B),v),I=O.length,D=j.length,M=0,$=0;M<I||$<D;)m[M+$]=M<I&&$<D?v(O[M],j[$])<=0?O[M++]:j[$++]:M<I?O[M++]:j[$++];return m};l.exports=d},7433:function(l,y,i){var c=i(4376),p=i(3517),d=i(34),m=i(8227)("species"),v=Array;l.exports=function(b){var C;return c(b)&&(C=b.constructor,(p(C)&&(C===v||c(C.prototype))||d(C)&&(C=C[m])===null)&&(C=void 0)),C===void 0?v:C}},1469:function(l,y,i){var c=i(7433);l.exports=function(p,d){return new(c(p))(d===0?0:d)}},6319:function(l,y,i){var c=i(8551),p=i(9539);l.exports=function(d,m,v,b){try{return b?m(c(v)[0],v[1]):m(v)}catch(C){p(d,"throw",C)}}},4428:function(l,y,i){var c=i(8227)("iterator"),p=!1;try{var d=0,m={next:function(){return{done:!!d++}},return:function(){p=!0}};m[c]=function(){return this},Array.from(m,function(){throw 2})}catch{}l.exports=function(v,b){try{if(!b&&!p)return!1}catch{return!1}var C=!1;try{var S={};S[c]=function(){return{next:function(){return{done:C=!0}}}},v(S)}catch{}return C}},4576:function(l,y,i){var c=i(9504),p=c({}.toString),d=c("".slice);l.exports=function(m){return d(p(m),8,-1)}},6955:function(l,y,i){var c=i(2140),p=i(4901),d=i(4576),m=i(8227)("toStringTag"),v=Object,b=d(function(){return arguments}())==="Arguments";l.exports=c?d:function(C){var S,k,B;return C===void 0?"Undefined":C===null?"Null":typeof(k=function(O,j){try{return O[j]}catch{}}(S=v(C),m))=="string"?k:b?d(S):(B=d(S))==="Object"&&p(S.callee)?"Arguments":B}},7740:function(l,y,i){var c=i(9297),p=i(5031),d=i(7347),m=i(4913);l.exports=function(v,b,C){for(var S=p(b),k=m.f,B=d.f,O=0;O<S.length;O++){var j=S[O];c(v,j)||C&&c(C,j)||k(v,j,B(b,j))}}},1436:function(l,y,i){var c=i(8227)("match");l.exports=function(p){var d=/./;try{"/./"[p](d)}catch{try{return d[c]=!1,"/./"[p](d)}catch{}}return!1}},2211:function(l,y,i){var c=i(9039);l.exports=!c(function(){function p(){}return p.prototype.constructor=null,Object.getPrototypeOf(new p)!==p.prototype})},2529:function(l){l.exports=function(y,i){return{value:y,done:i}}},6699:function(l,y,i){var c=i(3724),p=i(4913),d=i(6980);l.exports=c?function(m,v,b){return p.f(m,v,d(1,b))}:function(m,v,b){return m[v]=b,m}},6980:function(l){l.exports=function(y,i){return{enumerable:!(1&y),configurable:!(2&y),writable:!(4&y),value:i}}},4659:function(l,y,i){var c=i(3724),p=i(4913),d=i(6980);l.exports=function(m,v,b){c?p.f(m,v,d(0,b)):m[v]=b}},3640:function(l,y,i){var c=i(8551),p=i(4270),d=TypeError;l.exports=function(m){if(c(this),m==="string"||m==="default")m="string";else if(m!=="number")throw new d("Incorrect hint");return p(this,m)}},2106:function(l,y,i){var c=i(283),p=i(4913);l.exports=function(d,m,v){return v.get&&c(v.get,m,{getter:!0}),v.set&&c(v.set,m,{setter:!0}),p.f(d,m,v)}},6840:function(l,y,i){var c=i(4901),p=i(4913),d=i(283),m=i(9433);l.exports=function(v,b,C,S){S||(S={});var k=S.enumerable,B=S.name!==void 0?S.name:b;if(c(C)&&d(C,B,S),S.global)k?v[b]=C:m(b,C);else{try{S.unsafe?v[b]&&(k=!0):delete v[b]}catch{}k?v[b]=C:p.f(v,b,{value:C,enumerable:!1,configurable:!S.nonConfigurable,writable:!S.nonWritable})}return v}},9433:function(l,y,i){var c=i(4475),p=Object.defineProperty;l.exports=function(d,m){try{p(c,d,{value:m,configurable:!0,writable:!0})}catch{c[d]=m}return m}},4606:function(l,y,i){var c=i(6823),p=TypeError;l.exports=function(d,m){if(!delete d[m])throw new p("Cannot delete property "+c(m)+" of "+c(d))}},3724:function(l,y,i){var c=i(9039);l.exports=!c(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})},4055:function(l,y,i){var c=i(4475),p=i(34),d=c.document,m=p(d)&&p(d.createElement);l.exports=function(v){return m?d.createElement(v):{}}},6837:function(l){var y=TypeError;l.exports=function(i){if(i>9007199254740991)throw y("Maximum allowed index exceeded");return i}},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,y,i){var c=i(4055)("span").classList,p=c&&c.constructor&&c.constructor.prototype;l.exports=p===Object.prototype?void 0:p},8834:function(l,y,i){var c=i(9392).match(/firefox\/(\d+)/i);l.exports=!!c&&+c[1]},3202:function(l,y,i){var c=i(9392);l.exports=/MSIE|Trident/.test(c)},9088:function(l,y,i){var c=i(4475),p=i(4576);l.exports=p(c.process)==="process"},9392:function(l){l.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},7388:function(l,y,i){var c,p,d=i(4475),m=i(9392),v=d.process,b=d.Deno,C=v&&v.versions||b&&b.version,S=C&&C.v8;S&&(p=(c=S.split("."))[0]>0&&c[0]<4?1:+(c[0]+c[1])),!p&&m&&(!(c=m.match(/Edge\/(\d+)/))||c[1]>=74)&&(c=m.match(/Chrome\/(\d+)/))&&(p=+c[1]),l.exports=p},9160:function(l,y,i){var c=i(9392).match(/AppleWebKit\/(\d+)\./);l.exports=!!c&&+c[1]},8727:function(l){l.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6518:function(l,y,i){var c=i(4475),p=i(7347).f,d=i(6699),m=i(6840),v=i(9433),b=i(7740),C=i(2796);l.exports=function(S,k){var B,O,j,I,D,M=S.target,$=S.global,P=S.stat;if(B=$?c:P?c[M]||v(M,{}):c[M]&&c[M].prototype)for(O in k){if(I=k[O],j=S.dontCallGetSet?(D=p(B,O))&&D.value:B[O],!C($?O:M+(P?".":"#")+O,S.forced)&&j!==void 0){if(typeof I==typeof j)continue;b(I,j)}(S.sham||j&&j.sham)&&d(I,"sham",!0),m(B,O,I,S)}}},9039:function(l){l.exports=function(y){try{return!!y()}catch{return!0}}},9228:function(l,y,i){i(7495);var c=i(9565),p=i(6840),d=i(7323),m=i(9039),v=i(8227),b=i(6699),C=v("species"),S=RegExp.prototype;l.exports=function(k,B,O,j){var I=v(k),D=!m(function(){var L={};return L[I]=function(){return 7},""[k](L)!==7}),M=D&&!m(function(){var L=!1,q=/a/;return k==="split"&&((q={}).constructor={},q.constructor[C]=function(){return q},q.flags="",q[I]=/./[I]),q.exec=function(){return L=!0,null},q[I](""),!L});if(!D||!M||O){var $=/./[I],P=B(I,""[k],function(L,q,K,Q,Z){var ee=q.exec;return ee===d||ee===S.exec?D&&!Z?{done:!0,value:c($,q,K,Q)}:{done:!0,value:c(L,K,q,Q)}:{done:!1}});p(String.prototype,k,P[0]),p(S,I,P[1])}j&&b(S[I],"sham",!0)}},8745:function(l,y,i){var c=i(616),p=Function.prototype,d=p.apply,m=p.call;l.exports=typeof Reflect=="object"&&Reflect.apply||(c?m.bind(d):function(){return m.apply(d,arguments)})},6080:function(l,y,i){var c=i(7476),p=i(9306),d=i(616),m=c(c.bind);l.exports=function(v,b){return p(v),b===void 0?v:d?m(v,b):function(){return v.apply(b,arguments)}}},616:function(l,y,i){var c=i(9039);l.exports=!c(function(){var p=(function(){}).bind();return typeof p!="function"||p.hasOwnProperty("prototype")})},9565:function(l,y,i){var c=i(616),p=Function.prototype.call;l.exports=c?p.bind(p):function(){return p.apply(p,arguments)}},350:function(l,y,i){var c=i(3724),p=i(9297),d=Function.prototype,m=c&&Object.getOwnPropertyDescriptor,v=p(d,"name"),b=v&&(function(){}).name==="something",C=v&&(!c||c&&m(d,"name").configurable);l.exports={EXISTS:v,PROPER:b,CONFIGURABLE:C}},6706:function(l,y,i){var c=i(9504),p=i(9306);l.exports=function(d,m,v){try{return c(p(Object.getOwnPropertyDescriptor(d,m)[v]))}catch{}}},7476:function(l,y,i){var c=i(4576),p=i(9504);l.exports=function(d){if(c(d)==="Function")return p(d)}},9504:function(l,y,i){var c=i(616),p=Function.prototype,d=p.call,m=c&&p.bind.bind(d,d);l.exports=c?m:function(v){return function(){return d.apply(v,arguments)}}},7751:function(l,y,i){var c=i(4475),p=i(4901);l.exports=function(d,m){return arguments.length<2?(v=c[d],p(v)?v:void 0):c[d]&&c[d][m];var v}},851:function(l,y,i){var c=i(6955),p=i(5966),d=i(4117),m=i(6269),v=i(8227)("iterator");l.exports=function(b){if(!d(b))return p(b,v)||p(b,"@@iterator")||m[c(b)]}},81:function(l,y,i){var c=i(9565),p=i(9306),d=i(8551),m=i(6823),v=i(851),b=TypeError;l.exports=function(C,S){var k=arguments.length<2?v(C):S;if(p(k))return d(c(k,C));throw new b(m(C)+" is not iterable")}},6933:function(l,y,i){var c=i(9504),p=i(4376),d=i(4901),m=i(4576),v=i(655),b=c([].push);l.exports=function(C){if(d(C))return C;if(p(C)){for(var S=C.length,k=[],B=0;B<S;B++){var O=C[B];typeof O=="string"?b(k,O):typeof O!="number"&&m(O)!=="Number"&&m(O)!=="String"||b(k,v(O))}var j=k.length,I=!0;return function(D,M){if(I)return I=!1,M;if(p(this))return M;for(var $=0;$<j;$++)if(k[$]===D)return M}}}},5966:function(l,y,i){var c=i(9306),p=i(4117);l.exports=function(d,m){var v=d[m];return p(v)?void 0:c(v)}},2478:function(l,y,i){var c=i(9504),p=i(8981),d=Math.floor,m=c("".charAt),v=c("".replace),b=c("".slice),C=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,S=/\$([$&'`]|\d{1,2})/g;l.exports=function(k,B,O,j,I,D){var M=O+k.length,$=j.length,P=S;return I!==void 0&&(I=p(I),P=C),v(D,P,function(L,q){var K;switch(m(q,0)){case"$":return"$";case"&":return k;case"`":return b(B,0,O);case"'":return b(B,M);case"<":K=I[b(q,1,-1)];break;default:var Q=+q;if(Q===0)return L;if(Q>$){var Z=d(Q/10);return Z===0?L:Z<=$?j[Z-1]===void 0?m(q,1):j[Z-1]+m(q,1):L}K=j[Q-1]}return K===void 0?"":K})}},4475:function(l,y,i){var c=function(p){return p&&p.Math===Math&&p};l.exports=c(typeof globalThis=="object"&&globalThis)||c(typeof window=="object"&&window)||c(typeof self=="object"&&self)||c(typeof i.g=="object"&&i.g)||c(typeof this=="object"&&this)||function(){return this}()||Function("return this")()},9297:function(l,y,i){var c=i(9504),p=i(8981),d=c({}.hasOwnProperty);l.exports=Object.hasOwn||function(m,v){return d(p(m),v)}},421:function(l){l.exports={}},397:function(l,y,i){var c=i(7751);l.exports=c("document","documentElement")},5917:function(l,y,i){var c=i(3724),p=i(9039),d=i(4055);l.exports=!c&&!p(function(){return Object.defineProperty(d("div"),"a",{get:function(){return 7}}).a!==7})},7055:function(l,y,i){var c=i(9504),p=i(9039),d=i(4576),m=Object,v=c("".split);l.exports=p(function(){return!m("z").propertyIsEnumerable(0)})?function(b){return d(b)==="String"?v(b,""):m(b)}:m},3167:function(l,y,i){var c=i(4901),p=i(34),d=i(2967);l.exports=function(m,v,b){var C,S;return d&&c(C=v.constructor)&&C!==b&&p(S=C.prototype)&&S!==b.prototype&&d(m,S),m}},3706:function(l,y,i){var c=i(9504),p=i(4901),d=i(7629),m=c(Function.toString);p(d.inspectSource)||(d.inspectSource=function(v){return m(v)}),l.exports=d.inspectSource},1181:function(l,y,i){var c,p,d,m=i(8622),v=i(4475),b=i(34),C=i(6699),S=i(9297),k=i(7629),B=i(6119),O=i(421),j="Object already initialized",I=v.TypeError,D=v.WeakMap;if(m||k.state){var M=k.state||(k.state=new D);M.get=M.get,M.has=M.has,M.set=M.set,c=function(P,L){if(M.has(P))throw new I(j);return L.facade=P,M.set(P,L),L},p=function(P){return M.get(P)||{}},d=function(P){return M.has(P)}}else{var $=B("state");O[$]=!0,c=function(P,L){if(S(P,$))throw new I(j);return L.facade=P,C(P,$,L),L},p=function(P){return S(P,$)?P[$]:{}},d=function(P){return S(P,$)}}l.exports={set:c,get:p,has:d,enforce:function(P){return d(P)?p(P):c(P,{})},getterFor:function(P){return function(L){var q;if(!b(L)||(q=p(L)).type!==P)throw new I("Incompatible receiver, "+P+" required");return q}}}},4209:function(l,y,i){var c=i(8227),p=i(6269),d=c("iterator"),m=Array.prototype;l.exports=function(v){return v!==void 0&&(p.Array===v||m[d]===v)}},4376:function(l,y,i){var c=i(4576);l.exports=Array.isArray||function(p){return c(p)==="Array"}},4901:function(l){var y=typeof document=="object"&&document.all;l.exports=y===void 0&&y!==void 0?function(i){return typeof i=="function"||i===y}:function(i){return typeof i=="function"}},3517:function(l,y,i){var c=i(9504),p=i(9039),d=i(4901),m=i(6955),v=i(7751),b=i(3706),C=function(){},S=v("Reflect","construct"),k=/^\s*(?:class|function)\b/,B=c(k.exec),O=!k.test(C),j=function(D){if(!d(D))return!1;try{return S(C,[],D),!0}catch{return!1}},I=function(D){if(!d(D))return!1;switch(m(D)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return O||!!B(k,b(D))}catch{return!0}};I.sham=!0,l.exports=!S||p(function(){var D;return j(j.call)||!j(Object)||!j(function(){D=!0})||D})?I:j},2796:function(l,y,i){var c=i(9039),p=i(4901),d=/#|\.prototype\./,m=function(k,B){var O=b[v(k)];return O===S||O!==C&&(p(B)?c(B):!!B)},v=m.normalize=function(k){return String(k).replace(d,".").toLowerCase()},b=m.data={},C=m.NATIVE="N",S=m.POLYFILL="P";l.exports=m},2087:function(l,y,i){var c=i(34),p=Math.floor;l.exports=Number.isInteger||function(d){return!c(d)&&isFinite(d)&&p(d)===d}},4117:function(l){l.exports=function(y){return y==null}},34:function(l,y,i){var c=i(4901);l.exports=function(p){return typeof p=="object"?p!==null:c(p)}},3925:function(l,y,i){var c=i(34);l.exports=function(p){return c(p)||p===null}},6395:function(l){l.exports=!1},788:function(l,y,i){var c=i(34),p=i(4576),d=i(8227)("match");l.exports=function(m){var v;return c(m)&&((v=m[d])!==void 0?!!v:p(m)==="RegExp")}},757:function(l,y,i){var c=i(7751),p=i(4901),d=i(1625),m=i(7040),v=Object;l.exports=m?function(b){return typeof b=="symbol"}:function(b){var C=c("Symbol");return p(C)&&d(C.prototype,v(b))}},9539:function(l,y,i){var c=i(9565),p=i(8551),d=i(5966);l.exports=function(m,v,b){var C,S;p(m);try{if(!(C=d(m,"return"))){if(v==="throw")throw b;return b}C=c(C,m)}catch(k){S=!0,C=k}if(v==="throw")throw b;if(S)throw C;return p(C),b}},3994:function(l,y,i){var c=i(7657).IteratorPrototype,p=i(2360),d=i(6980),m=i(687),v=i(6269),b=function(){return this};l.exports=function(C,S,k,B){var O=S+" Iterator";return C.prototype=p(c,{next:d(+!B,k)}),m(C,O,!1,!0),v[O]=b,C}},1088:function(l,y,i){var c=i(6518),p=i(9565),d=i(6395),m=i(350),v=i(4901),b=i(3994),C=i(2787),S=i(2967),k=i(687),B=i(6699),O=i(6840),j=i(8227),I=i(6269),D=i(7657),M=m.PROPER,$=m.CONFIGURABLE,P=D.IteratorPrototype,L=D.BUGGY_SAFARI_ITERATORS,q=j("iterator"),K="keys",Q="values",Z="entries",ee=function(){return this};l.exports=function(ue,ne,me,de,V,U,J){b(me,ne,de);var w,_,N,R=function(re){if(re===V&&ce)return ce;if(!L&&re&&re in X)return X[re];switch(re){case K:case Q:case Z:return function(){return new me(this,re)}}return function(){return new me(this)}},W=ne+" Iterator",G=!1,X=ue.prototype,F=X[q]||X["@@iterator"]||V&&X[V],ce=!L&&F||R(V),fe=ne==="Array"&&X.entries||F;if(fe&&(w=C(fe.call(new ue)))!==Object.prototype&&w.next&&(d||C(w)===P||(S?S(w,P):v(w[q])||O(w,q,ee)),k(w,W,!0,!0),d&&(I[W]=ee)),M&&V===Q&&F&&F.name!==Q&&(!d&&$?B(X,"name",Q):(G=!0,ce=function(){return p(F,this)})),V)if(_={values:R(Q),keys:U?ce:R(K),entries:R(Z)},J)for(N in _)(L||G||!(N in X))&&O(X,N,_[N]);else c({target:ne,proto:!0,forced:L||G},_);return d&&!J||X[q]===ce||O(X,q,ce,{name:V}),I[ne]=ce,_}},7657:function(l,y,i){var c,p,d,m=i(9039),v=i(4901),b=i(34),C=i(2360),S=i(2787),k=i(6840),B=i(8227),O=i(6395),j=B("iterator"),I=!1;[].keys&&("next"in(d=[].keys())?(p=S(S(d)))!==Object.prototype&&(c=p):I=!0),!b(c)||m(function(){var D={};return c[j].call(D)!==D})?c={}:O&&(c=C(c)),v(c[j])||k(c,j,function(){return this}),l.exports={IteratorPrototype:c,BUGGY_SAFARI_ITERATORS:I}},6269:function(l){l.exports={}},6198:function(l,y,i){var c=i(8014);l.exports=function(p){return c(p.length)}},283:function(l,y,i){var c=i(9504),p=i(9039),d=i(4901),m=i(9297),v=i(3724),b=i(350).CONFIGURABLE,C=i(3706),S=i(1181),k=S.enforce,B=S.get,O=String,j=Object.defineProperty,I=c("".slice),D=c("".replace),M=c([].join),$=v&&!p(function(){return j(function(){},"length",{value:8}).length!==8}),P=String(String).split("String"),L=l.exports=function(q,K,Q){I(O(K),0,7)==="Symbol("&&(K="["+D(O(K),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),Q&&Q.getter&&(K="get "+K),Q&&Q.setter&&(K="set "+K),(!m(q,"name")||b&&q.name!==K)&&(v?j(q,"name",{value:K,configurable:!0}):q.name=K),$&&Q&&m(Q,"arity")&&q.length!==Q.arity&&j(q,"length",{value:Q.arity});try{Q&&m(Q,"constructor")&&Q.constructor?v&&j(q,"prototype",{writable:!1}):q.prototype&&(q.prototype=void 0)}catch{}var Z=k(q);return m(Z,"source")||(Z.source=M(P,typeof K=="string"?K:"")),q};Function.prototype.toString=L(function(){return d(this)&&B(this).source||C(this)},"toString")},741:function(l){var y=Math.ceil,i=Math.floor;l.exports=Math.trunc||function(c){var p=+c;return(p>0?i:y)(p)}},5749:function(l,y,i){var c=i(788),p=TypeError;l.exports=function(d){if(c(d))throw new p("The method doesn't accept regular expressions");return d}},4213:function(l,y,i){var c=i(3724),p=i(9504),d=i(9565),m=i(9039),v=i(1072),b=i(3717),C=i(8773),S=i(8981),k=i(7055),B=Object.assign,O=Object.defineProperty,j=p([].concat);l.exports=!B||m(function(){if(c&&B({b:1},B(O({},"a",{enumerable:!0,get:function(){O(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var I={},D={},M=Symbol("assign detection"),$="abcdefghijklmnopqrst";return I[M]=7,$.split("").forEach(function(P){D[P]=P}),B({},I)[M]!==7||v(B({},D)).join("")!==$})?function(I,D){for(var M=S(I),$=arguments.length,P=1,L=b.f,q=C.f;$>P;)for(var K,Q=k(arguments[P++]),Z=L?j(v(Q),L(Q)):v(Q),ee=Z.length,ue=0;ee>ue;)K=Z[ue++],c&&!d(q,Q,K)||(M[K]=Q[K]);return M}:B},2360:function(l,y,i){var c,p=i(8551),d=i(6801),m=i(8727),v=i(421),b=i(397),C=i(4055),S=i(6119),k="prototype",B="script",O=S("IE_PROTO"),j=function(){},I=function($){return"<"+B+">"+$+"</"+B+">"},D=function($){$.write(I("")),$.close();var P=$.parentWindow.Object;return $=null,P},M=function(){try{c=new ActiveXObject("htmlfile")}catch{}var $,P,L;M=typeof document<"u"?document.domain&&c?D(c):(P=C("iframe"),L="java"+B+":",P.style.display="none",b.appendChild(P),P.src=String(L),($=P.contentWindow.document).open(),$.write(I("document.F=Object")),$.close(),$.F):D(c);for(var q=m.length;q--;)delete M[k][m[q]];return M()};v[O]=!0,l.exports=Object.create||function($,P){var L;return $!==null?(j[k]=p($),L=new j,j[k]=null,L[O]=$):L=M(),P===void 0?L:d.f(L,P)}},6801:function(l,y,i){var c=i(3724),p=i(8686),d=i(4913),m=i(8551),v=i(5397),b=i(1072);y.f=c&&!p?Object.defineProperties:function(C,S){m(C);for(var k,B=v(S),O=b(S),j=O.length,I=0;j>I;)d.f(C,k=O[I++],B[k]);return C}},4913:function(l,y,i){var c=i(3724),p=i(5917),d=i(8686),m=i(8551),v=i(6969),b=TypeError,C=Object.defineProperty,S=Object.getOwnPropertyDescriptor,k="enumerable",B="configurable",O="writable";y.f=c?d?function(j,I,D){if(m(j),I=v(I),m(D),typeof j=="function"&&I==="prototype"&&"value"in D&&O in D&&!D[O]){var M=S(j,I);M&&M[O]&&(j[I]=D.value,D={configurable:B in D?D[B]:M[B],enumerable:k in D?D[k]:M[k],writable:!1})}return C(j,I,D)}:C:function(j,I,D){if(m(j),I=v(I),m(D),p)try{return C(j,I,D)}catch{}if("get"in D||"set"in D)throw new b("Accessors not supported");return"value"in D&&(j[I]=D.value),j}},7347:function(l,y,i){var c=i(3724),p=i(9565),d=i(8773),m=i(6980),v=i(5397),b=i(6969),C=i(9297),S=i(5917),k=Object.getOwnPropertyDescriptor;y.f=c?k:function(B,O){if(B=v(B),O=b(O),S)try{return k(B,O)}catch{}if(C(B,O))return m(!p(d.f,B,O),B[O])}},298:function(l,y,i){var c=i(4576),p=i(5397),d=i(8480).f,m=i(7680),v=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];l.exports.f=function(b){return v&&c(b)==="Window"?function(C){try{return d(C)}catch{return m(v)}}(b):d(p(b))}},8480:function(l,y,i){var c=i(1828),p=i(8727).concat("length","prototype");y.f=Object.getOwnPropertyNames||function(d){return c(d,p)}},3717:function(l,y){y.f=Object.getOwnPropertySymbols},2787:function(l,y,i){var c=i(9297),p=i(4901),d=i(8981),m=i(6119),v=i(2211),b=m("IE_PROTO"),C=Object,S=C.prototype;l.exports=v?C.getPrototypeOf:function(k){var B=d(k);if(c(B,b))return B[b];var O=B.constructor;return p(O)&&B instanceof O?O.prototype:B instanceof C?S:null}},1625:function(l,y,i){var c=i(9504);l.exports=c({}.isPrototypeOf)},1828:function(l,y,i){var c=i(9504),p=i(9297),d=i(5397),m=i(9617).indexOf,v=i(421),b=c([].push);l.exports=function(C,S){var k,B=d(C),O=0,j=[];for(k in B)!p(v,k)&&p(B,k)&&b(j,k);for(;S.length>O;)p(B,k=S[O++])&&(~m(j,k)||b(j,k));return j}},1072:function(l,y,i){var c=i(1828),p=i(8727);l.exports=Object.keys||function(d){return c(d,p)}},8773:function(l,y){var i={}.propertyIsEnumerable,c=Object.getOwnPropertyDescriptor,p=c&&!i.call({1:2},1);y.f=p?function(d){var m=c(this,d);return!!m&&m.enumerable}:i},2551:function(l,y,i){var c=i(6395),p=i(4475),d=i(9039),m=i(9160);l.exports=c||!d(function(){if(!(m&&m<535)){var v=Math.random();__defineSetter__.call(null,v,function(){}),delete p[v]}})},2967:function(l,y,i){var c=i(6706),p=i(34),d=i(7750),m=i(3506);l.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var v,b=!1,C={};try{(v=c(Object.prototype,"__proto__","set"))(C,[]),b=C instanceof Array}catch{}return function(S,k){return d(S),m(k),p(S)&&(b?v(S,k):S.__proto__=k),S}}():void 0)},3179:function(l,y,i){var c=i(2140),p=i(6955);l.exports=c?{}.toString:function(){return"[object "+p(this)+"]"}},4270:function(l,y,i){var c=i(9565),p=i(4901),d=i(34),m=TypeError;l.exports=function(v,b){var C,S;if(b==="string"&&p(C=v.toString)&&!d(S=c(C,v))||p(C=v.valueOf)&&!d(S=c(C,v))||b!=="string"&&p(C=v.toString)&&!d(S=c(C,v)))return S;throw new m("Can't convert object to primitive value")}},5031:function(l,y,i){var c=i(7751),p=i(9504),d=i(8480),m=i(3717),v=i(8551),b=p([].concat);l.exports=c("Reflect","ownKeys")||function(C){var S=d.f(v(C)),k=m.f;return k?b(S,k(C)):S}},9167:function(l,y,i){var c=i(4475);l.exports=c},1056:function(l,y,i){var c=i(4913).f;l.exports=function(p,d,m){m in p||c(p,m,{configurable:!0,get:function(){return d[m]},set:function(v){d[m]=v}})}},6682:function(l,y,i){var c=i(9565),p=i(8551),d=i(4901),m=i(4576),v=i(7323),b=TypeError;l.exports=function(C,S){var k=C.exec;if(d(k)){var B=c(k,C,S);return B!==null&&p(B),B}if(m(C)==="RegExp")return c(v,C,S);throw new b("RegExp#exec called on incompatible receiver")}},7323:function(l,y,i){var c,p,d=i(9565),m=i(9504),v=i(655),b=i(7979),C=i(8429),S=i(5745),k=i(2360),B=i(1181).get,O=i(3635),j=i(8814),I=S("native-string-replace",String.prototype.replace),D=RegExp.prototype.exec,M=D,$=m("".charAt),P=m("".indexOf),L=m("".replace),q=m("".slice),K=(p=/b*/g,d(D,c=/a/,"a"),d(D,p,"a"),c.lastIndex!==0||p.lastIndex!==0),Q=C.BROKEN_CARET,Z=/()??/.exec("")[1]!==void 0;(K||Z||Q||O||j)&&(M=function(ee){var ue,ne,me,de,V,U,J,w=this,_=B(w),N=v(ee),R=_.raw;if(R)return R.lastIndex=w.lastIndex,ue=d(M,R,N),w.lastIndex=R.lastIndex,ue;var W=_.groups,G=Q&&w.sticky,X=d(b,w),F=w.source,ce=0,fe=N;if(G&&(X=L(X,"y",""),P(X,"g")===-1&&(X+="g"),fe=q(N,w.lastIndex),w.lastIndex>0&&(!w.multiline||w.multiline&&$(N,w.lastIndex-1)!==`
65
+ */(function(e,t){(function(n,r){e.exports=r(H)})(Rn,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(u){if("Element"in u){var h="classList",g="prototype",f=u.Element[g],x=Object,l=String[g].trim||function(){return this.replace(/^\s+|\s+$/g,"")},y=Array[g].indexOf||function(b){for(var C=0,S=this.length;C<S;C++)if(C in this&&this[C]===b)return C;return-1},i=function(b,C){this.name=b,this.code=DOMException[b],this.message=C},c=function(b,C){if(C==="")throw new i("SYNTAX_ERR","The token must not be empty.");if(/\s/.test(C))throw new i("INVALID_CHARACTER_ERR","The token must not contain space characters.");return y.call(b,C)},p=function(b){for(var C=l.call(b.getAttribute("class")||""),S=C?C.split(/\s+/):[],k=0,B=S.length;k<B;k++)this.push(S[k]);this._updateClassName=function(){b.setAttribute("class",this.toString())}},d=p[g]=[],m=function(){return new p(this)};if(i[g]=Error[g],d.item=function(b){return this[b]||null},d.contains=function(b){return~c(this,b+"")},d.add=function(){var b,C=arguments,S=0,k=C.length,B=!1;do~c(this,b=C[S]+"")||(this.push(b),B=!0);while(++S<k);B&&this._updateClassName()},d.remove=function(){var b,C,S=arguments,k=0,B=S.length,O=!1;do for(C=c(this,b=S[k]+"");~C;)this.splice(C,1),O=!0,C=c(this,b);while(++k<B);O&&this._updateClassName()},d.toggle=function(b,C){var S=this.contains(b),k=S?C!==!0&&"remove":C!==!1&&"add";return k&&this[k](b),C===!0||C===!1?C:!S},d.replace=function(b,C){var S=c(b+"");~S&&(this.splice(S,1,C),this._updateClassName())},d.toString=function(){return this.join(" ")},x.defineProperty){var v={get:m,enumerable:!0,configurable:!0};try{x.defineProperty(f,h,v)}catch(b){b.number!==void 0&&b.number!==-2146823252||(v.enumerable=!1,x.defineProperty(f,h,v))}}else x[g].__defineGetter__&&f.__defineGetter__(h,m)}}(self),function(){var u=document.createElement("_");if(u.classList.add("c1","c2"),!u.classList.contains("c2")){var h=function(f){var x=DOMTokenList.prototype[f];DOMTokenList.prototype[f]=function(l){var y,i=arguments.length;for(y=0;y<i;y++)l=arguments[y],x.call(this,l)}};h("add"),h("remove")}if(u.classList.toggle("c3",!1),u.classList.contains("c3")){var g=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(f,x){return 1 in arguments&&!this.contains(f)==!x?x:g.call(this,f)}}"replace"in document.createElement("_").classList||(DOMTokenList.prototype.replace=function(f,x){var l=this.toString().split(" "),y=l.indexOf(f+"");~y&&(l=l.slice(y),this.remove.apply(this,l),this.add(x),this.add.apply(this,l.slice(1)))}),u=null}())},548:function(u){u.exports=function(){var h={9306:function(l,y,i){var c=i(4901),p=i(6823),d=TypeError;l.exports=function(m){if(c(m))return m;throw new d(p(m)+" is not a function")}},5548:function(l,y,i){var c=i(3517),p=i(6823),d=TypeError;l.exports=function(m){if(c(m))return m;throw new d(p(m)+" is not a constructor")}},3506:function(l,y,i){var c=i(3925),p=String,d=TypeError;l.exports=function(m){if(c(m))return m;throw new d("Can't set "+p(m)+" as a prototype")}},6469:function(l,y,i){var c=i(8227),p=i(2360),d=i(4913).f,m=c("unscopables"),v=Array.prototype;v[m]===void 0&&d(v,m,{configurable:!0,value:p(null)}),l.exports=function(b){v[m][b]=!0}},7829:function(l,y,i){var c=i(8183).charAt;l.exports=function(p,d,m){return d+(m?c(p,d).length:1)}},8551:function(l,y,i){var c=i(34),p=String,d=TypeError;l.exports=function(m){if(c(m))return m;throw new d(p(m)+" is not an object")}},235:function(l,y,i){var c=i(9213).forEach,p=i(4598)("forEach");l.exports=p?[].forEach:function(d){return c(this,d,arguments.length>1?arguments[1]:void 0)}},7916:function(l,y,i){var c=i(6080),p=i(9565),d=i(8981),m=i(6319),v=i(4209),b=i(3517),C=i(6198),S=i(4659),k=i(81),B=i(851),O=Array;l.exports=function(j){var I=d(j),D=b(this),M=arguments.length,$=M>1?arguments[1]:void 0,P=$!==void 0;P&&($=c($,M>2?arguments[2]:void 0));var L,q,K,Q,Z,ee,ue=B(I),ne=0;if(!ue||this===O&&v(ue))for(L=C(I),q=D?new this(L):O(L);L>ne;ne++)ee=P?$(I[ne],ne):I[ne],S(q,ne,ee);else for(q=D?new this:[],Z=(Q=k(I,ue)).next;!(K=p(Z,Q)).done;ne++)ee=P?m(Q,$,[K.value,ne],!0):K.value,S(q,ne,ee);return q.length=ne,q}},9617:function(l,y,i){var c=i(5397),p=i(5610),d=i(6198),m=function(v){return function(b,C,S){var k=c(b),B=d(k);if(B===0)return!v&&-1;var O,j=p(S,B);if(v&&C!=C){for(;B>j;)if((O=k[j++])!=O)return!0}else for(;B>j;j++)if((v||j in k)&&k[j]===C)return v||j||0;return!v&&-1}};l.exports={includes:m(!0),indexOf:m(!1)}},9213:function(l,y,i){var c=i(6080),p=i(9504),d=i(7055),m=i(8981),v=i(6198),b=i(1469),C=p([].push),S=function(k){var B=k===1,O=k===2,j=k===3,I=k===4,D=k===6,M=k===7,$=k===5||D;return function(P,L,q,K){for(var Q,Z,ee=m(P),ue=d(ee),ne=v(ue),me=c(L,q),de=0,V=K||b,U=B?V(P,ne):O||M?V(P,0):void 0;ne>de;de++)if(($||de in ue)&&(Z=me(Q=ue[de],de,ee),k))if(B)U[de]=Z;else if(Z)switch(k){case 3:return!0;case 5:return Q;case 6:return de;case 2:C(U,Q)}else switch(k){case 4:return!1;case 7:C(U,Q)}return D?-1:j||I?I:U}};l.exports={forEach:S(0),map:S(1),filter:S(2),some:S(3),every:S(4),find:S(5),findIndex:S(6),filterReject:S(7)}},597:function(l,y,i){var c=i(9039),p=i(8227),d=i(7388),m=p("species");l.exports=function(v){return d>=51||!c(function(){var b=[];return(b.constructor={})[m]=function(){return{foo:1}},b[v](Boolean).foo!==1})}},4598:function(l,y,i){var c=i(9039);l.exports=function(p,d){var m=[][p];return!!m&&c(function(){m.call(null,d||function(){return 1},1)})}},926:function(l,y,i){var c=i(9306),p=i(8981),d=i(7055),m=i(6198),v=TypeError,b="Reduce of empty array with no initial value",C=function(S){return function(k,B,O,j){var I=p(k),D=d(I),M=m(I);if(c(B),M===0&&O<2)throw new v(b);var $=S?M-1:0,P=S?-1:1;if(O<2)for(;;){if($ in D){j=D[$],$+=P;break}if($+=P,S?$<0:M<=$)throw new v(b)}for(;S?$>=0:M>$;$+=P)$ in D&&(j=B(j,D[$],$,I));return j}};l.exports={left:C(!1),right:C(!0)}},4527:function(l,y,i){var c=i(3724),p=i(4376),d=TypeError,m=Object.getOwnPropertyDescriptor,v=c&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(b){return b instanceof TypeError}}();l.exports=v?function(b,C){if(p(b)&&!m(b,"length").writable)throw new d("Cannot set read only .length");return b.length=C}:function(b,C){return b.length=C}},7680:function(l,y,i){var c=i(9504);l.exports=c([].slice)},4488:function(l,y,i){var c=i(7680),p=Math.floor,d=function(m,v){var b=m.length;if(b<8)for(var C,S,k=1;k<b;){for(S=k,C=m[k];S&&v(m[S-1],C)>0;)m[S]=m[--S];S!==k++&&(m[S]=C)}else for(var B=p(b/2),O=d(c(m,0,B),v),j=d(c(m,B),v),I=O.length,D=j.length,M=0,$=0;M<I||$<D;)m[M+$]=M<I&&$<D?v(O[M],j[$])<=0?O[M++]:j[$++]:M<I?O[M++]:j[$++];return m};l.exports=d},7433:function(l,y,i){var c=i(4376),p=i(3517),d=i(34),m=i(8227)("species"),v=Array;l.exports=function(b){var C;return c(b)&&(C=b.constructor,(p(C)&&(C===v||c(C.prototype))||d(C)&&(C=C[m])===null)&&(C=void 0)),C===void 0?v:C}},1469:function(l,y,i){var c=i(7433);l.exports=function(p,d){return new(c(p))(d===0?0:d)}},6319:function(l,y,i){var c=i(8551),p=i(9539);l.exports=function(d,m,v,b){try{return b?m(c(v)[0],v[1]):m(v)}catch(C){p(d,"throw",C)}}},4428:function(l,y,i){var c=i(8227)("iterator"),p=!1;try{var d=0,m={next:function(){return{done:!!d++}},return:function(){p=!0}};m[c]=function(){return this},Array.from(m,function(){throw 2})}catch{}l.exports=function(v,b){try{if(!b&&!p)return!1}catch{return!1}var C=!1;try{var S={};S[c]=function(){return{next:function(){return{done:C=!0}}}},v(S)}catch{}return C}},4576:function(l,y,i){var c=i(9504),p=c({}.toString),d=c("".slice);l.exports=function(m){return d(p(m),8,-1)}},6955:function(l,y,i){var c=i(2140),p=i(4901),d=i(4576),m=i(8227)("toStringTag"),v=Object,b=d(function(){return arguments}())==="Arguments";l.exports=c?d:function(C){var S,k,B;return C===void 0?"Undefined":C===null?"Null":typeof(k=function(O,j){try{return O[j]}catch{}}(S=v(C),m))=="string"?k:b?d(S):(B=d(S))==="Object"&&p(S.callee)?"Arguments":B}},7740:function(l,y,i){var c=i(9297),p=i(5031),d=i(7347),m=i(4913);l.exports=function(v,b,C){for(var S=p(b),k=m.f,B=d.f,O=0;O<S.length;O++){var j=S[O];c(v,j)||C&&c(C,j)||k(v,j,B(b,j))}}},1436:function(l,y,i){var c=i(8227)("match");l.exports=function(p){var d=/./;try{"/./"[p](d)}catch{try{return d[c]=!1,"/./"[p](d)}catch{}}return!1}},2211:function(l,y,i){var c=i(9039);l.exports=!c(function(){function p(){}return p.prototype.constructor=null,Object.getPrototypeOf(new p)!==p.prototype})},2529:function(l){l.exports=function(y,i){return{value:y,done:i}}},6699:function(l,y,i){var c=i(3724),p=i(4913),d=i(6980);l.exports=c?function(m,v,b){return p.f(m,v,d(1,b))}:function(m,v,b){return m[v]=b,m}},6980:function(l){l.exports=function(y,i){return{enumerable:!(1&y),configurable:!(2&y),writable:!(4&y),value:i}}},4659:function(l,y,i){var c=i(3724),p=i(4913),d=i(6980);l.exports=function(m,v,b){c?p.f(m,v,d(0,b)):m[v]=b}},3640:function(l,y,i){var c=i(8551),p=i(4270),d=TypeError;l.exports=function(m){if(c(this),m==="string"||m==="default")m="string";else if(m!=="number")throw new d("Incorrect hint");return p(this,m)}},2106:function(l,y,i){var c=i(283),p=i(4913);l.exports=function(d,m,v){return v.get&&c(v.get,m,{getter:!0}),v.set&&c(v.set,m,{setter:!0}),p.f(d,m,v)}},6840:function(l,y,i){var c=i(4901),p=i(4913),d=i(283),m=i(9433);l.exports=function(v,b,C,S){S||(S={});var k=S.enumerable,B=S.name!==void 0?S.name:b;if(c(C)&&d(C,B,S),S.global)k?v[b]=C:m(b,C);else{try{S.unsafe?v[b]&&(k=!0):delete v[b]}catch{}k?v[b]=C:p.f(v,b,{value:C,enumerable:!1,configurable:!S.nonConfigurable,writable:!S.nonWritable})}return v}},9433:function(l,y,i){var c=i(4475),p=Object.defineProperty;l.exports=function(d,m){try{p(c,d,{value:m,configurable:!0,writable:!0})}catch{c[d]=m}return m}},4606:function(l,y,i){var c=i(6823),p=TypeError;l.exports=function(d,m){if(!delete d[m])throw new p("Cannot delete property "+c(m)+" of "+c(d))}},3724:function(l,y,i){var c=i(9039);l.exports=!c(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})},4055:function(l,y,i){var c=i(4475),p=i(34),d=c.document,m=p(d)&&p(d.createElement);l.exports=function(v){return m?d.createElement(v):{}}},6837:function(l){var y=TypeError;l.exports=function(i){if(i>9007199254740991)throw y("Maximum allowed index exceeded");return i}},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,y,i){var c=i(4055)("span").classList,p=c&&c.constructor&&c.constructor.prototype;l.exports=p===Object.prototype?void 0:p},8834:function(l,y,i){var c=i(9392).match(/firefox\/(\d+)/i);l.exports=!!c&&+c[1]},3202:function(l,y,i){var c=i(9392);l.exports=/MSIE|Trident/.test(c)},9088:function(l,y,i){var c=i(4475),p=i(4576);l.exports=p(c.process)==="process"},9392:function(l){l.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},7388:function(l,y,i){var c,p,d=i(4475),m=i(9392),v=d.process,b=d.Deno,C=v&&v.versions||b&&b.version,S=C&&C.v8;S&&(p=(c=S.split("."))[0]>0&&c[0]<4?1:+(c[0]+c[1])),!p&&m&&(!(c=m.match(/Edge\/(\d+)/))||c[1]>=74)&&(c=m.match(/Chrome\/(\d+)/))&&(p=+c[1]),l.exports=p},9160:function(l,y,i){var c=i(9392).match(/AppleWebKit\/(\d+)\./);l.exports=!!c&&+c[1]},8727:function(l){l.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6518:function(l,y,i){var c=i(4475),p=i(7347).f,d=i(6699),m=i(6840),v=i(9433),b=i(7740),C=i(2796);l.exports=function(S,k){var B,O,j,I,D,M=S.target,$=S.global,P=S.stat;if(B=$?c:P?c[M]||v(M,{}):c[M]&&c[M].prototype)for(O in k){if(I=k[O],j=S.dontCallGetSet?(D=p(B,O))&&D.value:B[O],!C($?O:M+(P?".":"#")+O,S.forced)&&j!==void 0){if(typeof I==typeof j)continue;b(I,j)}(S.sham||j&&j.sham)&&d(I,"sham",!0),m(B,O,I,S)}}},9039:function(l){l.exports=function(y){try{return!!y()}catch{return!0}}},9228:function(l,y,i){i(7495);var c=i(9565),p=i(6840),d=i(7323),m=i(9039),v=i(8227),b=i(6699),C=v("species"),S=RegExp.prototype;l.exports=function(k,B,O,j){var I=v(k),D=!m(function(){var L={};return L[I]=function(){return 7},""[k](L)!==7}),M=D&&!m(function(){var L=!1,q=/a/;return k==="split"&&((q={}).constructor={},q.constructor[C]=function(){return q},q.flags="",q[I]=/./[I]),q.exec=function(){return L=!0,null},q[I](""),!L});if(!D||!M||O){var $=/./[I],P=B(I,""[k],function(L,q,K,Q,Z){var ee=q.exec;return ee===d||ee===S.exec?D&&!Z?{done:!0,value:c($,q,K,Q)}:{done:!0,value:c(L,K,q,Q)}:{done:!1}});p(String.prototype,k,P[0]),p(S,I,P[1])}j&&b(S[I],"sham",!0)}},8745:function(l,y,i){var c=i(616),p=Function.prototype,d=p.apply,m=p.call;l.exports=typeof Reflect=="object"&&Reflect.apply||(c?m.bind(d):function(){return m.apply(d,arguments)})},6080:function(l,y,i){var c=i(7476),p=i(9306),d=i(616),m=c(c.bind);l.exports=function(v,b){return p(v),b===void 0?v:d?m(v,b):function(){return v.apply(b,arguments)}}},616:function(l,y,i){var c=i(9039);l.exports=!c(function(){var p=(function(){}).bind();return typeof p!="function"||p.hasOwnProperty("prototype")})},9565:function(l,y,i){var c=i(616),p=Function.prototype.call;l.exports=c?p.bind(p):function(){return p.apply(p,arguments)}},350:function(l,y,i){var c=i(3724),p=i(9297),d=Function.prototype,m=c&&Object.getOwnPropertyDescriptor,v=p(d,"name"),b=v&&(function(){}).name==="something",C=v&&(!c||c&&m(d,"name").configurable);l.exports={EXISTS:v,PROPER:b,CONFIGURABLE:C}},6706:function(l,y,i){var c=i(9504),p=i(9306);l.exports=function(d,m,v){try{return c(p(Object.getOwnPropertyDescriptor(d,m)[v]))}catch{}}},7476:function(l,y,i){var c=i(4576),p=i(9504);l.exports=function(d){if(c(d)==="Function")return p(d)}},9504:function(l,y,i){var c=i(616),p=Function.prototype,d=p.call,m=c&&p.bind.bind(d,d);l.exports=c?m:function(v){return function(){return d.apply(v,arguments)}}},7751:function(l,y,i){var c=i(4475),p=i(4901);l.exports=function(d,m){return arguments.length<2?(v=c[d],p(v)?v:void 0):c[d]&&c[d][m];var v}},851:function(l,y,i){var c=i(6955),p=i(5966),d=i(4117),m=i(6269),v=i(8227)("iterator");l.exports=function(b){if(!d(b))return p(b,v)||p(b,"@@iterator")||m[c(b)]}},81:function(l,y,i){var c=i(9565),p=i(9306),d=i(8551),m=i(6823),v=i(851),b=TypeError;l.exports=function(C,S){var k=arguments.length<2?v(C):S;if(p(k))return d(c(k,C));throw new b(m(C)+" is not iterable")}},6933:function(l,y,i){var c=i(9504),p=i(4376),d=i(4901),m=i(4576),v=i(655),b=c([].push);l.exports=function(C){if(d(C))return C;if(p(C)){for(var S=C.length,k=[],B=0;B<S;B++){var O=C[B];typeof O=="string"?b(k,O):typeof O!="number"&&m(O)!=="Number"&&m(O)!=="String"||b(k,v(O))}var j=k.length,I=!0;return function(D,M){if(I)return I=!1,M;if(p(this))return M;for(var $=0;$<j;$++)if(k[$]===D)return M}}}},5966:function(l,y,i){var c=i(9306),p=i(4117);l.exports=function(d,m){var v=d[m];return p(v)?void 0:c(v)}},2478:function(l,y,i){var c=i(9504),p=i(8981),d=Math.floor,m=c("".charAt),v=c("".replace),b=c("".slice),C=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,S=/\$([$&'`]|\d{1,2})/g;l.exports=function(k,B,O,j,I,D){var M=O+k.length,$=j.length,P=S;return I!==void 0&&(I=p(I),P=C),v(D,P,function(L,q){var K;switch(m(q,0)){case"$":return"$";case"&":return k;case"`":return b(B,0,O);case"'":return b(B,M);case"<":K=I[b(q,1,-1)];break;default:var Q=+q;if(Q===0)return L;if(Q>$){var Z=d(Q/10);return Z===0?L:Z<=$?j[Z-1]===void 0?m(q,1):j[Z-1]+m(q,1):L}K=j[Q-1]}return K===void 0?"":K})}},4475:function(l,y,i){var c=function(p){return p&&p.Math===Math&&p};l.exports=c(typeof globalThis=="object"&&globalThis)||c(typeof window=="object"&&window)||c(typeof self=="object"&&self)||c(typeof i.g=="object"&&i.g)||c(typeof this=="object"&&this)||function(){return this}()||Function("return this")()},9297:function(l,y,i){var c=i(9504),p=i(8981),d=c({}.hasOwnProperty);l.exports=Object.hasOwn||function(m,v){return d(p(m),v)}},421:function(l){l.exports={}},397:function(l,y,i){var c=i(7751);l.exports=c("document","documentElement")},5917:function(l,y,i){var c=i(3724),p=i(9039),d=i(4055);l.exports=!c&&!p(function(){return Object.defineProperty(d("div"),"a",{get:function(){return 7}}).a!==7})},7055:function(l,y,i){var c=i(9504),p=i(9039),d=i(4576),m=Object,v=c("".split);l.exports=p(function(){return!m("z").propertyIsEnumerable(0)})?function(b){return d(b)==="String"?v(b,""):m(b)}:m},3167:function(l,y,i){var c=i(4901),p=i(34),d=i(2967);l.exports=function(m,v,b){var C,S;return d&&c(C=v.constructor)&&C!==b&&p(S=C.prototype)&&S!==b.prototype&&d(m,S),m}},3706:function(l,y,i){var c=i(9504),p=i(4901),d=i(7629),m=c(Function.toString);p(d.inspectSource)||(d.inspectSource=function(v){return m(v)}),l.exports=d.inspectSource},1181:function(l,y,i){var c,p,d,m=i(8622),v=i(4475),b=i(34),C=i(6699),S=i(9297),k=i(7629),B=i(6119),O=i(421),j="Object already initialized",I=v.TypeError,D=v.WeakMap;if(m||k.state){var M=k.state||(k.state=new D);M.get=M.get,M.has=M.has,M.set=M.set,c=function(P,L){if(M.has(P))throw new I(j);return L.facade=P,M.set(P,L),L},p=function(P){return M.get(P)||{}},d=function(P){return M.has(P)}}else{var $=B("state");O[$]=!0,c=function(P,L){if(S(P,$))throw new I(j);return L.facade=P,C(P,$,L),L},p=function(P){return S(P,$)?P[$]:{}},d=function(P){return S(P,$)}}l.exports={set:c,get:p,has:d,enforce:function(P){return d(P)?p(P):c(P,{})},getterFor:function(P){return function(L){var q;if(!b(L)||(q=p(L)).type!==P)throw new I("Incompatible receiver, "+P+" required");return q}}}},4209:function(l,y,i){var c=i(8227),p=i(6269),d=c("iterator"),m=Array.prototype;l.exports=function(v){return v!==void 0&&(p.Array===v||m[d]===v)}},4376:function(l,y,i){var c=i(4576);l.exports=Array.isArray||function(p){return c(p)==="Array"}},4901:function(l){var y=typeof document=="object"&&document.all;l.exports=y===void 0&&y!==void 0?function(i){return typeof i=="function"||i===y}:function(i){return typeof i=="function"}},3517:function(l,y,i){var c=i(9504),p=i(9039),d=i(4901),m=i(6955),v=i(7751),b=i(3706),C=function(){},S=v("Reflect","construct"),k=/^\s*(?:class|function)\b/,B=c(k.exec),O=!k.test(C),j=function(D){if(!d(D))return!1;try{return S(C,[],D),!0}catch{return!1}},I=function(D){if(!d(D))return!1;switch(m(D)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return O||!!B(k,b(D))}catch{return!0}};I.sham=!0,l.exports=!S||p(function(){var D;return j(j.call)||!j(Object)||!j(function(){D=!0})||D})?I:j},2796:function(l,y,i){var c=i(9039),p=i(4901),d=/#|\.prototype\./,m=function(k,B){var O=b[v(k)];return O===S||O!==C&&(p(B)?c(B):!!B)},v=m.normalize=function(k){return String(k).replace(d,".").toLowerCase()},b=m.data={},C=m.NATIVE="N",S=m.POLYFILL="P";l.exports=m},2087:function(l,y,i){var c=i(34),p=Math.floor;l.exports=Number.isInteger||function(d){return!c(d)&&isFinite(d)&&p(d)===d}},4117:function(l){l.exports=function(y){return y==null}},34:function(l,y,i){var c=i(4901);l.exports=function(p){return typeof p=="object"?p!==null:c(p)}},3925:function(l,y,i){var c=i(34);l.exports=function(p){return c(p)||p===null}},6395:function(l){l.exports=!1},788:function(l,y,i){var c=i(34),p=i(4576),d=i(8227)("match");l.exports=function(m){var v;return c(m)&&((v=m[d])!==void 0?!!v:p(m)==="RegExp")}},757:function(l,y,i){var c=i(7751),p=i(4901),d=i(1625),m=i(7040),v=Object;l.exports=m?function(b){return typeof b=="symbol"}:function(b){var C=c("Symbol");return p(C)&&d(C.prototype,v(b))}},9539:function(l,y,i){var c=i(9565),p=i(8551),d=i(5966);l.exports=function(m,v,b){var C,S;p(m);try{if(!(C=d(m,"return"))){if(v==="throw")throw b;return b}C=c(C,m)}catch(k){S=!0,C=k}if(v==="throw")throw b;if(S)throw C;return p(C),b}},3994:function(l,y,i){var c=i(7657).IteratorPrototype,p=i(2360),d=i(6980),m=i(687),v=i(6269),b=function(){return this};l.exports=function(C,S,k,B){var O=S+" Iterator";return C.prototype=p(c,{next:d(+!B,k)}),m(C,O,!1,!0),v[O]=b,C}},1088:function(l,y,i){var c=i(6518),p=i(9565),d=i(6395),m=i(350),v=i(4901),b=i(3994),C=i(2787),S=i(2967),k=i(687),B=i(6699),O=i(6840),j=i(8227),I=i(6269),D=i(7657),M=m.PROPER,$=m.CONFIGURABLE,P=D.IteratorPrototype,L=D.BUGGY_SAFARI_ITERATORS,q=j("iterator"),K="keys",Q="values",Z="entries",ee=function(){return this};l.exports=function(ue,ne,me,de,V,U,J){b(me,ne,de);var w,_,N,R=function(re){if(re===V&&ce)return ce;if(!L&&re&&re in X)return X[re];switch(re){case K:case Q:case Z:return function(){return new me(this,re)}}return function(){return new me(this)}},W=ne+" Iterator",G=!1,X=ue.prototype,F=X[q]||X["@@iterator"]||V&&X[V],ce=!L&&F||R(V),fe=ne==="Array"&&X.entries||F;if(fe&&(w=C(fe.call(new ue)))!==Object.prototype&&w.next&&(d||C(w)===P||(S?S(w,P):v(w[q])||O(w,q,ee)),k(w,W,!0,!0),d&&(I[W]=ee)),M&&V===Q&&F&&F.name!==Q&&(!d&&$?B(X,"name",Q):(G=!0,ce=function(){return p(F,this)})),V)if(_={values:R(Q),keys:U?ce:R(K),entries:R(Z)},J)for(N in _)(L||G||!(N in X))&&O(X,N,_[N]);else c({target:ne,proto:!0,forced:L||G},_);return d&&!J||X[q]===ce||O(X,q,ce,{name:V}),I[ne]=ce,_}},7657:function(l,y,i){var c,p,d,m=i(9039),v=i(4901),b=i(34),C=i(2360),S=i(2787),k=i(6840),B=i(8227),O=i(6395),j=B("iterator"),I=!1;[].keys&&("next"in(d=[].keys())?(p=S(S(d)))!==Object.prototype&&(c=p):I=!0),!b(c)||m(function(){var D={};return c[j].call(D)!==D})?c={}:O&&(c=C(c)),v(c[j])||k(c,j,function(){return this}),l.exports={IteratorPrototype:c,BUGGY_SAFARI_ITERATORS:I}},6269:function(l){l.exports={}},6198:function(l,y,i){var c=i(8014);l.exports=function(p){return c(p.length)}},283:function(l,y,i){var c=i(9504),p=i(9039),d=i(4901),m=i(9297),v=i(3724),b=i(350).CONFIGURABLE,C=i(3706),S=i(1181),k=S.enforce,B=S.get,O=String,j=Object.defineProperty,I=c("".slice),D=c("".replace),M=c([].join),$=v&&!p(function(){return j(function(){},"length",{value:8}).length!==8}),P=String(String).split("String"),L=l.exports=function(q,K,Q){I(O(K),0,7)==="Symbol("&&(K="["+D(O(K),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),Q&&Q.getter&&(K="get "+K),Q&&Q.setter&&(K="set "+K),(!m(q,"name")||b&&q.name!==K)&&(v?j(q,"name",{value:K,configurable:!0}):q.name=K),$&&Q&&m(Q,"arity")&&q.length!==Q.arity&&j(q,"length",{value:Q.arity});try{Q&&m(Q,"constructor")&&Q.constructor?v&&j(q,"prototype",{writable:!1}):q.prototype&&(q.prototype=void 0)}catch{}var Z=k(q);return m(Z,"source")||(Z.source=M(P,typeof K=="string"?K:"")),q};Function.prototype.toString=L(function(){return d(this)&&B(this).source||C(this)},"toString")},741:function(l){var y=Math.ceil,i=Math.floor;l.exports=Math.trunc||function(c){var p=+c;return(p>0?i:y)(p)}},5749:function(l,y,i){var c=i(788),p=TypeError;l.exports=function(d){if(c(d))throw new p("The method doesn't accept regular expressions");return d}},4213:function(l,y,i){var c=i(3724),p=i(9504),d=i(9565),m=i(9039),v=i(1072),b=i(3717),C=i(8773),S=i(8981),k=i(7055),B=Object.assign,O=Object.defineProperty,j=p([].concat);l.exports=!B||m(function(){if(c&&B({b:1},B(O({},"a",{enumerable:!0,get:function(){O(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var I={},D={},M=Symbol("assign detection"),$="abcdefghijklmnopqrst";return I[M]=7,$.split("").forEach(function(P){D[P]=P}),B({},I)[M]!==7||v(B({},D)).join("")!==$})?function(I,D){for(var M=S(I),$=arguments.length,P=1,L=b.f,q=C.f;$>P;)for(var K,Q=k(arguments[P++]),Z=L?j(v(Q),L(Q)):v(Q),ee=Z.length,ue=0;ee>ue;)K=Z[ue++],c&&!d(q,Q,K)||(M[K]=Q[K]);return M}:B},2360:function(l,y,i){var c,p=i(8551),d=i(6801),m=i(8727),v=i(421),b=i(397),C=i(4055),S=i(6119),k="prototype",B="script",O=S("IE_PROTO"),j=function(){},I=function($){return"<"+B+">"+$+"</"+B+">"},D=function($){$.write(I("")),$.close();var P=$.parentWindow.Object;return $=null,P},M=function(){try{c=new ActiveXObject("htmlfile")}catch{}var $,P,L;M=typeof document<"u"?document.domain&&c?D(c):(P=C("iframe"),L="java"+B+":",P.style.display="none",b.appendChild(P),P.src=String(L),($=P.contentWindow.document).open(),$.write(I("document.F=Object")),$.close(),$.F):D(c);for(var q=m.length;q--;)delete M[k][m[q]];return M()};v[O]=!0,l.exports=Object.create||function($,P){var L;return $!==null?(j[k]=p($),L=new j,j[k]=null,L[O]=$):L=M(),P===void 0?L:d.f(L,P)}},6801:function(l,y,i){var c=i(3724),p=i(8686),d=i(4913),m=i(8551),v=i(5397),b=i(1072);y.f=c&&!p?Object.defineProperties:function(C,S){m(C);for(var k,B=v(S),O=b(S),j=O.length,I=0;j>I;)d.f(C,k=O[I++],B[k]);return C}},4913:function(l,y,i){var c=i(3724),p=i(5917),d=i(8686),m=i(8551),v=i(6969),b=TypeError,C=Object.defineProperty,S=Object.getOwnPropertyDescriptor,k="enumerable",B="configurable",O="writable";y.f=c?d?function(j,I,D){if(m(j),I=v(I),m(D),typeof j=="function"&&I==="prototype"&&"value"in D&&O in D&&!D[O]){var M=S(j,I);M&&M[O]&&(j[I]=D.value,D={configurable:B in D?D[B]:M[B],enumerable:k in D?D[k]:M[k],writable:!1})}return C(j,I,D)}:C:function(j,I,D){if(m(j),I=v(I),m(D),p)try{return C(j,I,D)}catch{}if("get"in D||"set"in D)throw new b("Accessors not supported");return"value"in D&&(j[I]=D.value),j}},7347:function(l,y,i){var c=i(3724),p=i(9565),d=i(8773),m=i(6980),v=i(5397),b=i(6969),C=i(9297),S=i(5917),k=Object.getOwnPropertyDescriptor;y.f=c?k:function(B,O){if(B=v(B),O=b(O),S)try{return k(B,O)}catch{}if(C(B,O))return m(!p(d.f,B,O),B[O])}},298:function(l,y,i){var c=i(4576),p=i(5397),d=i(8480).f,m=i(7680),v=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];l.exports.f=function(b){return v&&c(b)==="Window"?function(C){try{return d(C)}catch{return m(v)}}(b):d(p(b))}},8480:function(l,y,i){var c=i(1828),p=i(8727).concat("length","prototype");y.f=Object.getOwnPropertyNames||function(d){return c(d,p)}},3717:function(l,y){y.f=Object.getOwnPropertySymbols},2787:function(l,y,i){var c=i(9297),p=i(4901),d=i(8981),m=i(6119),v=i(2211),b=m("IE_PROTO"),C=Object,S=C.prototype;l.exports=v?C.getPrototypeOf:function(k){var B=d(k);if(c(B,b))return B[b];var O=B.constructor;return p(O)&&B instanceof O?O.prototype:B instanceof C?S:null}},1625:function(l,y,i){var c=i(9504);l.exports=c({}.isPrototypeOf)},1828:function(l,y,i){var c=i(9504),p=i(9297),d=i(5397),m=i(9617).indexOf,v=i(421),b=c([].push);l.exports=function(C,S){var k,B=d(C),O=0,j=[];for(k in B)!p(v,k)&&p(B,k)&&b(j,k);for(;S.length>O;)p(B,k=S[O++])&&(~m(j,k)||b(j,k));return j}},1072:function(l,y,i){var c=i(1828),p=i(8727);l.exports=Object.keys||function(d){return c(d,p)}},8773:function(l,y){var i={}.propertyIsEnumerable,c=Object.getOwnPropertyDescriptor,p=c&&!i.call({1:2},1);y.f=p?function(d){var m=c(this,d);return!!m&&m.enumerable}:i},2551:function(l,y,i){var c=i(6395),p=i(4475),d=i(9039),m=i(9160);l.exports=c||!d(function(){if(!(m&&m<535)){var v=Math.random();__defineSetter__.call(null,v,function(){}),delete p[v]}})},2967:function(l,y,i){var c=i(6706),p=i(34),d=i(7750),m=i(3506);l.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var v,b=!1,C={};try{(v=c(Object.prototype,"__proto__","set"))(C,[]),b=C instanceof Array}catch{}return function(S,k){return d(S),m(k),p(S)&&(b?v(S,k):S.__proto__=k),S}}():void 0)},3179:function(l,y,i){var c=i(2140),p=i(6955);l.exports=c?{}.toString:function(){return"[object "+p(this)+"]"}},4270:function(l,y,i){var c=i(9565),p=i(4901),d=i(34),m=TypeError;l.exports=function(v,b){var C,S;if(b==="string"&&p(C=v.toString)&&!d(S=c(C,v))||p(C=v.valueOf)&&!d(S=c(C,v))||b!=="string"&&p(C=v.toString)&&!d(S=c(C,v)))return S;throw new m("Can't convert object to primitive value")}},5031:function(l,y,i){var c=i(7751),p=i(9504),d=i(8480),m=i(3717),v=i(8551),b=p([].concat);l.exports=c("Reflect","ownKeys")||function(C){var S=d.f(v(C)),k=m.f;return k?b(S,k(C)):S}},9167:function(l,y,i){var c=i(4475);l.exports=c},1056:function(l,y,i){var c=i(4913).f;l.exports=function(p,d,m){m in p||c(p,m,{configurable:!0,get:function(){return d[m]},set:function(v){d[m]=v}})}},6682:function(l,y,i){var c=i(9565),p=i(8551),d=i(4901),m=i(4576),v=i(7323),b=TypeError;l.exports=function(C,S){var k=C.exec;if(d(k)){var B=c(k,C,S);return B!==null&&p(B),B}if(m(C)==="RegExp")return c(v,C,S);throw new b("RegExp#exec called on incompatible receiver")}},7323:function(l,y,i){var c,p,d=i(9565),m=i(9504),v=i(655),b=i(7979),C=i(8429),S=i(5745),k=i(2360),B=i(1181).get,O=i(3635),j=i(8814),I=S("native-string-replace",String.prototype.replace),D=RegExp.prototype.exec,M=D,$=m("".charAt),P=m("".indexOf),L=m("".replace),q=m("".slice),K=(p=/b*/g,d(D,c=/a/,"a"),d(D,p,"a"),c.lastIndex!==0||p.lastIndex!==0),Q=C.BROKEN_CARET,Z=/()??/.exec("")[1]!==void 0;(K||Z||Q||O||j)&&(M=function(ee){var ue,ne,me,de,V,U,J,w=this,_=B(w),N=v(ee),R=_.raw;if(R)return R.lastIndex=w.lastIndex,ue=d(M,R,N),w.lastIndex=R.lastIndex,ue;var W=_.groups,G=Q&&w.sticky,X=d(b,w),F=w.source,ce=0,fe=N;if(G&&(X=L(X,"y",""),P(X,"g")===-1&&(X+="g"),fe=q(N,w.lastIndex),w.lastIndex>0&&(!w.multiline||w.multiline&&$(N,w.lastIndex-1)!==`
66
66
  `)&&(F="(?: "+F+")",fe=" "+fe,ce++),ne=new RegExp("^(?:"+F+")",X)),Z&&(ne=new RegExp("^"+F+"$(?!\\s)",X)),K&&(me=w.lastIndex),de=d(D,G?ne:w,fe),G?de?(de.input=q(de.input,ce),de[0]=q(de[0],ce),de.index=w.lastIndex,w.lastIndex+=de[0].length):w.lastIndex=0:K&&de&&(w.lastIndex=w.global?de.index+de[0].length:me),Z&&de&&de.length>1&&d(I,de[0],ne,function(){for(V=1;V<arguments.length-2;V++)arguments[V]===void 0&&(de[V]=void 0)}),de&&W)for(de.groups=U=k(null),V=0;V<W.length;V++)U[(J=W[V])[0]]=de[J[1]];return de}),l.exports=M},7979:function(l,y,i){var c=i(8551);l.exports=function(){var p=c(this),d="";return p.hasIndices&&(d+="d"),p.global&&(d+="g"),p.ignoreCase&&(d+="i"),p.multiline&&(d+="m"),p.dotAll&&(d+="s"),p.unicode&&(d+="u"),p.unicodeSets&&(d+="v"),p.sticky&&(d+="y"),d}},1034:function(l,y,i){var c=i(9565),p=i(9297),d=i(1625),m=i(7979),v=RegExp.prototype;l.exports=function(b){var C=b.flags;return C!==void 0||"flags"in v||p(b,"flags")||!d(v,b)?C:c(m,b)}},8429:function(l,y,i){var c=i(9039),p=i(4475).RegExp,d=c(function(){var b=p("a","y");return b.lastIndex=2,b.exec("abcd")!==null}),m=d||c(function(){return!p("a","y").sticky}),v=d||c(function(){var b=p("^r","gy");return b.lastIndex=2,b.exec("str")!==null});l.exports={BROKEN_CARET:v,MISSED_STICKY:m,UNSUPPORTED_Y:d}},3635:function(l,y,i){var c=i(9039),p=i(4475).RegExp;l.exports=c(function(){var d=p(".","s");return!(d.dotAll&&d.test(`
67
67
  `)&&d.flags==="s")})},8814:function(l,y,i){var c=i(9039),p=i(4475).RegExp;l.exports=c(function(){var d=p("(?<a>b)","g");return d.exec("b").groups.a!=="b"||"b".replace(d,"$<a>c")!=="bc"})},7750:function(l,y,i){var c=i(4117),p=TypeError;l.exports=function(d){if(c(d))throw new p("Can't call method on "+d);return d}},7633:function(l,y,i){var c=i(7751),p=i(2106),d=i(8227),m=i(3724),v=d("species");l.exports=function(b){var C=c(b);m&&C&&!C[v]&&p(C,v,{configurable:!0,get:function(){return this}})}},687:function(l,y,i){var c=i(4913).f,p=i(9297),d=i(8227)("toStringTag");l.exports=function(m,v,b){m&&!b&&(m=m.prototype),m&&!p(m,d)&&c(m,d,{configurable:!0,value:v})}},6119:function(l,y,i){var c=i(5745),p=i(3392),d=c("keys");l.exports=function(m){return d[m]||(d[m]=p(m))}},7629:function(l,y,i){var c=i(6395),p=i(4475),d=i(9433),m="__core-js_shared__",v=l.exports=p[m]||d(m,{});(v.versions||(v.versions=[])).push({version:"3.37.1",mode:c?"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,y,i){var c=i(7629);l.exports=function(p,d){return c[p]||(c[p]=d||{})}},2293:function(l,y,i){var c=i(8551),p=i(5548),d=i(4117),m=i(8227)("species");l.exports=function(v,b){var C,S=c(v).constructor;return S===void 0||d(C=c(S)[m])?b:p(C)}},8183:function(l,y,i){var c=i(9504),p=i(1291),d=i(655),m=i(7750),v=c("".charAt),b=c("".charCodeAt),C=c("".slice),S=function(k){return function(B,O){var j,I,D=d(m(B)),M=p(O),$=D.length;return M<0||M>=$?k?"":void 0:(j=b(D,M))<55296||j>56319||M+1===$||(I=b(D,M+1))<56320||I>57343?k?v(D,M):j:k?C(D,M,M+2):I-56320+(j-55296<<10)+65536}};l.exports={codeAt:S(!1),charAt:S(!0)}},706:function(l,y,i){var c=i(350).PROPER,p=i(9039),d=i(7452);l.exports=function(m){return p(function(){return!!d[m]()||"​…᠎"[m]()!=="​…᠎"||c&&d[m].name!==m})}},3802:function(l,y,i){var c=i(9504),p=i(7750),d=i(655),m=i(7452),v=c("".replace),b=RegExp("^["+m+"]+"),C=RegExp("(^|[^"+m+"])["+m+"]+$"),S=function(k){return function(B){var O=d(p(B));return 1&k&&(O=v(O,b,"")),2&k&&(O=v(O,C,"$1")),O}};l.exports={start:S(1),end:S(2),trim:S(3)}},4495:function(l,y,i){var c=i(7388),p=i(9039),d=i(4475).String;l.exports=!!Object.getOwnPropertySymbols&&!p(function(){var m=Symbol("symbol detection");return!d(m)||!(Object(m)instanceof Symbol)||!Symbol.sham&&c&&c<41})},8242:function(l,y,i){var c=i(9565),p=i(7751),d=i(8227),m=i(6840);l.exports=function(){var v=p("Symbol"),b=v&&v.prototype,C=b&&b.valueOf,S=d("toPrimitive");b&&!b[S]&&m(b,S,function(k){return c(C,this)},{arity:1})}},1296:function(l,y,i){var c=i(4495);l.exports=c&&!!Symbol.for&&!!Symbol.keyFor},1240:function(l,y,i){var c=i(9504);l.exports=c(1 .valueOf)},5610:function(l,y,i){var c=i(1291),p=Math.max,d=Math.min;l.exports=function(m,v){var b=c(m);return b<0?p(b+v,0):d(b,v)}},5397:function(l,y,i){var c=i(7055),p=i(7750);l.exports=function(d){return c(p(d))}},1291:function(l,y,i){var c=i(741);l.exports=function(p){var d=+p;return d!=d||d===0?0:c(d)}},8014:function(l,y,i){var c=i(1291),p=Math.min;l.exports=function(d){var m=c(d);return m>0?p(m,9007199254740991):0}},8981:function(l,y,i){var c=i(7750),p=Object;l.exports=function(d){return p(c(d))}},2777:function(l,y,i){var c=i(9565),p=i(34),d=i(757),m=i(5966),v=i(4270),b=i(8227),C=TypeError,S=b("toPrimitive");l.exports=function(k,B){if(!p(k)||d(k))return k;var O,j=m(k,S);if(j){if(B===void 0&&(B="default"),O=c(j,k,B),!p(O)||d(O))return O;throw new C("Can't convert object to primitive value")}return B===void 0&&(B="number"),v(k,B)}},6969:function(l,y,i){var c=i(2777),p=i(757);l.exports=function(d){var m=c(d,"string");return p(m)?m:m+""}},2140:function(l,y,i){var c={};c[i(8227)("toStringTag")]="z",l.exports=String(c)==="[object z]"},655:function(l,y,i){var c=i(6955),p=String;l.exports=function(d){if(c(d)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return p(d)}},6823:function(l){var y=String;l.exports=function(i){try{return y(i)}catch{return"Object"}}},3392:function(l,y,i){var c=i(9504),p=0,d=Math.random(),m=c(1 .toString);l.exports=function(v){return"Symbol("+(v===void 0?"":v)+")_"+m(++p+d,36)}},7040:function(l,y,i){var c=i(4495);l.exports=c&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},8686:function(l,y,i){var c=i(3724),p=i(9039);l.exports=c&&p(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})},8622:function(l,y,i){var c=i(4475),p=i(4901),d=c.WeakMap;l.exports=p(d)&&/native code/.test(String(d))},511:function(l,y,i){var c=i(9167),p=i(9297),d=i(1951),m=i(4913).f;l.exports=function(v){var b=c.Symbol||(c.Symbol={});p(b,v)||m(b,v,{value:d.f(v)})}},1951:function(l,y,i){var c=i(8227);y.f=c},8227:function(l,y,i){var c=i(4475),p=i(5745),d=i(9297),m=i(3392),v=i(4495),b=i(7040),C=c.Symbol,S=p("wks"),k=b?C.for||C:C&&C.withoutSetter||m;l.exports=function(B){return d(S,B)||(S[B]=v&&d(C,B)?C[B]:k("Symbol."+B)),S[B]}},7452:function(l){l.exports=`
68
- \v\f\r                 \u2028\u2029\uFEFF`},8706:function(l,y,i){var c=i(6518),p=i(9039),d=i(4376),m=i(34),v=i(8981),b=i(6198),C=i(6837),S=i(4659),k=i(1469),B=i(597),O=i(8227),j=i(7388),I=O("isConcatSpreadable"),D=j>=51||!p(function(){var $=[];return $[I]=!1,$.concat()[0]!==$}),M=function($){if(!m($))return!1;var P=$[I];return P!==void 0?!!P:d($)};c({target:"Array",proto:!0,arity:1,forced:!D||!B("concat")},{concat:function($){var P,L,q,K,Q,Z=v(this),ee=k(Z,0),ue=0;for(P=-1,q=arguments.length;P<q;P++)if(M(Q=P===-1?Z:arguments[P]))for(K=b(Q),C(ue+K),L=0;L<K;L++,ue++)L in Q&&S(ee,ue,Q[L]);else C(ue+1),S(ee,ue++,Q);return ee.length=ue,ee}})},2008:function(l,y,i){var c=i(6518),p=i(9213).filter;c({target:"Array",proto:!0,forced:!i(597)("filter")},{filter:function(d){return p(this,d,arguments.length>1?arguments[1]:void 0)}})},3418:function(l,y,i){var c=i(6518),p=i(7916);c({target:"Array",stat:!0,forced:!i(4428)(function(d){Array.from(d)})},{from:p})},4423:function(l,y,i){var c=i(6518),p=i(9617).includes,d=i(9039),m=i(6469);c({target:"Array",proto:!0,forced:d(function(){return!Array(1).includes()})},{includes:function(v){return p(this,v,arguments.length>1?arguments[1]:void 0)}}),m("includes")},5276:function(l,y,i){var c=i(6518),p=i(7476),d=i(9617).indexOf,m=i(4598),v=p([].indexOf),b=!!v&&1/v([1],1,-0)<0;c({target:"Array",proto:!0,forced:b||!m("indexOf")},{indexOf:function(C){var S=arguments.length>1?arguments[1]:void 0;return b?v(this,C,S)||0:d(this,C,S)}})},3792:function(l,y,i){var c=i(5397),p=i(6469),d=i(6269),m=i(1181),v=i(4913).f,b=i(1088),C=i(2529),S=i(6395),k=i(3724),B="Array Iterator",O=m.set,j=m.getterFor(B);l.exports=b(Array,"Array",function(D,M){O(this,{type:B,target:c(D),index:0,kind:M})},function(){var D=j(this),M=D.target,$=D.index++;if(!M||$>=M.length)return D.target=void 0,C(void 0,!0);switch(D.kind){case"keys":return C($,!1);case"values":return C(M[$],!1)}return C([$,M[$]],!1)},"values");var I=d.Arguments=d.Array;if(p("keys"),p("values"),p("entries"),!S&&k&&I.name!=="values")try{v(I,"name",{value:"values"})}catch{}},8598:function(l,y,i){var c=i(6518),p=i(9504),d=i(7055),m=i(5397),v=i(4598),b=p([].join);c({target:"Array",proto:!0,forced:d!==Object||!v("join",",")},{join:function(C){return b(m(this),C===void 0?",":C)}})},2062:function(l,y,i){var c=i(6518),p=i(9213).map;c({target:"Array",proto:!0,forced:!i(597)("map")},{map:function(d){return p(this,d,arguments.length>1?arguments[1]:void 0)}})},2712:function(l,y,i){var c=i(6518),p=i(926).left,d=i(4598),m=i(7388);c({target:"Array",proto:!0,forced:!i(9088)&&m>79&&m<83||!d("reduce")},{reduce:function(v){var b=arguments.length;return p(this,v,b,b>1?arguments[1]:void 0)}})},4782:function(l,y,i){var c=i(6518),p=i(4376),d=i(3517),m=i(34),v=i(5610),b=i(6198),C=i(5397),S=i(4659),k=i(8227),B=i(597),O=i(7680),j=B("slice"),I=k("species"),D=Array,M=Math.max;c({target:"Array",proto:!0,forced:!j},{slice:function($,P){var L,q,K,Q=C(this),Z=b(Q),ee=v($,Z),ue=v(P===void 0?Z:P,Z);if(p(Q)&&(L=Q.constructor,(d(L)&&(L===D||p(L.prototype))||m(L)&&(L=L[I])===null)&&(L=void 0),L===D||L===void 0))return O(Q,ee,ue);for(q=new(L===void 0?D:L)(M(ue-ee,0)),K=0;ee<ue;ee++,K++)ee in Q&&S(q,K,Q[ee]);return q.length=K,q}})},6910:function(l,y,i){var c=i(6518),p=i(9504),d=i(9306),m=i(8981),v=i(6198),b=i(4606),C=i(655),S=i(9039),k=i(4488),B=i(4598),O=i(8834),j=i(3202),I=i(7388),D=i(9160),M=[],$=p(M.sort),P=p(M.push),L=S(function(){M.sort(void 0)}),q=S(function(){M.sort(null)}),K=B("sort"),Q=!S(function(){if(I)return I<70;if(!(O&&O>3)){if(j)return!0;if(D)return D<603;var Z,ee,ue,ne,me="";for(Z=65;Z<76;Z++){switch(ee=String.fromCharCode(Z),Z){case 66:case 69:case 70:case 72:ue=3;break;case 68:case 71:ue=4;break;default:ue=2}for(ne=0;ne<47;ne++)M.push({k:ee+ne,v:ue})}for(M.sort(function(de,V){return V.v-de.v}),ne=0;ne<M.length;ne++)ee=M[ne].k.charAt(0),me.charAt(me.length-1)!==ee&&(me+=ee);return me!=="DGBEFHACIJK"}});c({target:"Array",proto:!0,forced:L||!q||!K||!Q},{sort:function(Z){Z!==void 0&&d(Z);var ee=m(this);if(Q)return Z===void 0?$(ee):$(ee,Z);var ue,ne,me=[],de=v(ee);for(ne=0;ne<de;ne++)ne in ee&&P(me,ee[ne]);for(k(me,function(V){return function(U,J){return J===void 0?-1:U===void 0?1:V!==void 0?+V(U,J)||0:C(U)>C(J)?1:-1}}(Z)),ue=v(me),ne=0;ne<ue;)ee[ne]=me[ne++];for(;ne<de;)b(ee,ne++);return ee}})},4554:function(l,y,i){var c=i(6518),p=i(8981),d=i(5610),m=i(1291),v=i(6198),b=i(4527),C=i(6837),S=i(1469),k=i(4659),B=i(4606),O=i(597)("splice"),j=Math.max,I=Math.min;c({target:"Array",proto:!0,forced:!O},{splice:function(D,M){var $,P,L,q,K,Q,Z=p(this),ee=v(Z),ue=d(D,ee),ne=arguments.length;for(ne===0?$=P=0:ne===1?($=0,P=ee-ue):($=ne-2,P=I(j(m(M),0),ee-ue)),C(ee+$-P),L=S(Z,P),q=0;q<P;q++)(K=ue+q)in Z&&k(L,q,Z[K]);if(L.length=P,$<P){for(q=ue;q<ee-P;q++)Q=q+$,(K=q+P)in Z?Z[Q]=Z[K]:B(Z,Q);for(q=ee;q>ee-P+$;q--)B(Z,q-1)}else if($>P)for(q=ee-P;q>ue;q--)Q=q+$-1,(K=q+P-1)in Z?Z[Q]=Z[K]:B(Z,Q);for(q=0;q<$;q++)Z[q+ue]=arguments[q+2];return b(Z,ee-P+$),L}})},739:function(l,y,i){var c=i(6518),p=i(9039),d=i(8981),m=i(2777);c({target:"Date",proto:!0,arity:1,forced:p(function(){return new Date(NaN).toJSON()!==null||Date.prototype.toJSON.call({toISOString:function(){return 1}})!==1})},{toJSON:function(v){var b=d(this),C=m(b,"number");return typeof C!="number"||isFinite(C)?b.toISOString():null}})},9572:function(l,y,i){var c=i(9297),p=i(6840),d=i(3640),m=i(8227)("toPrimitive"),v=Date.prototype;c(v,m)||p(v,m,d)},2010:function(l,y,i){var c=i(3724),p=i(350).EXISTS,d=i(9504),m=i(2106),v=Function.prototype,b=d(v.toString),C=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,S=d(C.exec);c&&!p&&m(v,"name",{configurable:!0,get:function(){try{return S(C,b(this))[1]}catch{return""}}})},3110:function(l,y,i){var c=i(6518),p=i(7751),d=i(8745),m=i(9565),v=i(9504),b=i(9039),C=i(4901),S=i(757),k=i(7680),B=i(6933),O=i(4495),j=String,I=p("JSON","stringify"),D=v(/./.exec),M=v("".charAt),$=v("".charCodeAt),P=v("".replace),L=v(1 .toString),q=/[\uD800-\uDFFF]/g,K=/^[\uD800-\uDBFF]$/,Q=/^[\uDC00-\uDFFF]$/,Z=!O||b(function(){var me=p("Symbol")("stringify detection");return I([me])!=="[null]"||I({a:me})!=="{}"||I(Object(me))!=="{}"}),ee=b(function(){return I("\uDF06\uD834")!=='"\\udf06\\ud834"'||I("\uDEAD")!=='"\\udead"'}),ue=function(me,de){var V=k(arguments),U=B(de);if(C(U)||me!==void 0&&!S(me))return V[1]=function(J,w){if(C(U)&&(w=m(U,this,j(J),w)),!S(w))return w},d(I,null,V)},ne=function(me,de,V){var U=M(V,de-1),J=M(V,de+1);return D(K,me)&&!D(Q,J)||D(Q,me)&&!D(K,U)?"\\u"+L($(me,0),16):me};I&&c({target:"JSON",stat:!0,arity:3,forced:Z||ee},{stringify:function(me,de,V){var U=k(arguments),J=d(Z?ue:I,null,U);return ee&&typeof J=="string"?P(J,q,ne):J}})},2892:function(l,y,i){var c=i(6518),p=i(6395),d=i(3724),m=i(4475),v=i(9167),b=i(9504),C=i(2796),S=i(9297),k=i(3167),B=i(1625),O=i(757),j=i(2777),I=i(9039),D=i(8480).f,M=i(7347).f,$=i(4913).f,P=i(1240),L=i(3802).trim,q="Number",K=m[q],Q=v[q],Z=K.prototype,ee=m.TypeError,ue=b("".slice),ne=b("".charCodeAt),me=function(J){var w,_,N,R,W,G,X,F,ce=j(J,"number");if(O(ce))throw new ee("Cannot convert a Symbol value to a number");if(typeof ce=="string"&&ce.length>2){if(ce=L(ce),(w=ne(ce,0))===43||w===45){if((_=ne(ce,2))===88||_===120)return NaN}else if(w===48){switch(ne(ce,1)){case 66:case 98:N=2,R=49;break;case 79:case 111:N=8,R=55;break;default:return+ce}for(G=(W=ue(ce,2)).length,X=0;X<G;X++)if((F=ne(W,X))<48||F>R)return NaN;return parseInt(W,N)}}return+ce},de=C(q,!K(" 0o1")||!K("0b1")||K("+0x1")),V=function(J){var w,_=arguments.length<1?0:K(function(N){var R=j(N,"number");return typeof R=="bigint"?R:me(R)}(J));return B(Z,w=this)&&I(function(){P(w)})?k(Object(_),this,V):_};V.prototype=Z,de&&!p&&(Z.constructor=V),c({global:!0,constructor:!0,wrap:!0,forced:de},{Number:V});var U=function(J,w){for(var _,N=d?D(w):"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(","),R=0;N.length>R;R++)S(w,_=N[R])&&!S(J,_)&&$(J,_,M(w,_))};p&&Q&&U(v[q],Q),(de||p)&&U(v[q],K)},2637:function(l,y,i){i(6518)({target:"Number",stat:!0},{isInteger:i(2087)})},9085:function(l,y,i){var c=i(6518),p=i(4213);c({target:"Object",stat:!0,arity:2,forced:Object.assign!==p},{assign:p})},7427:function(l,y,i){var c=i(6518),p=i(3724),d=i(2551),m=i(9306),v=i(8981),b=i(4913);p&&c({target:"Object",proto:!0,forced:d},{__defineGetter__:function(C,S){b.f(v(this),C,{get:m(S),enumerable:!0,configurable:!0})}})},3851:function(l,y,i){var c=i(6518),p=i(9039),d=i(5397),m=i(7347).f,v=i(3724);c({target:"Object",stat:!0,forced:!v||p(function(){m(1)}),sham:!v},{getOwnPropertyDescriptor:function(b,C){return m(d(b),C)}})},1278:function(l,y,i){var c=i(6518),p=i(3724),d=i(5031),m=i(5397),v=i(7347),b=i(4659);c({target:"Object",stat:!0,sham:!p},{getOwnPropertyDescriptors:function(C){for(var S,k,B=m(C),O=v.f,j=d(B),I={},D=0;j.length>D;)(k=O(B,S=j[D++]))!==void 0&&b(I,S,k);return I}})},1480:function(l,y,i){var c=i(6518),p=i(9039),d=i(298).f;c({target:"Object",stat:!0,forced:p(function(){return!Object.getOwnPropertyNames(1)})},{getOwnPropertyNames:d})},9773:function(l,y,i){var c=i(6518),p=i(4495),d=i(9039),m=i(3717),v=i(8981);c({target:"Object",stat:!0,forced:!p||d(function(){m.f(1)})},{getOwnPropertySymbols:function(b){var C=m.f;return C?C(v(b)):[]}})},9432:function(l,y,i){var c=i(6518),p=i(8981),d=i(1072);c({target:"Object",stat:!0,forced:i(9039)(function(){d(1)})},{keys:function(m){return d(p(m))}})},6099:function(l,y,i){var c=i(2140),p=i(6840),d=i(3179);c||p(Object.prototype,"toString",d,{unsafe:!0})},4864:function(l,y,i){var c=i(3724),p=i(4475),d=i(9504),m=i(2796),v=i(3167),b=i(6699),C=i(2360),S=i(8480).f,k=i(1625),B=i(788),O=i(655),j=i(1034),I=i(8429),D=i(1056),M=i(6840),$=i(9039),P=i(9297),L=i(1181).enforce,q=i(7633),K=i(8227),Q=i(3635),Z=i(8814),ee=K("match"),ue=p.RegExp,ne=ue.prototype,me=p.SyntaxError,de=d(ne.exec),V=d("".charAt),U=d("".replace),J=d("".indexOf),w=d("".slice),_=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,N=/a/g,R=/a/g,W=new ue(N)!==N,G=I.MISSED_STICKY,X=I.UNSUPPORTED_Y;if(m("RegExp",c&&(!W||G||Q||Z||$(function(){return R[ee]=!1,ue(N)!==N||ue(R)===R||String(ue(N,"i"))!=="/a/i"})))){for(var F=function(re,oe){var ge,ae,be,Ce,Fe,Ae,Ve=k(ne,this),ze=B(re),bt=oe===void 0,Ke=[],et=re;if(!Ve&&ze&&bt&&re.constructor===F)return re;if((ze||k(ne,re))&&(re=re.source,bt&&(oe=j(et))),re=re===void 0?"":O(re),oe=oe===void 0?"":O(oe),et=re,Q&&"dotAll"in N&&(ae=!!oe&&J(oe,"s")>-1)&&(oe=U(oe,/s/g,"")),ge=oe,G&&"sticky"in N&&(be=!!oe&&J(oe,"y")>-1)&&X&&(oe=U(oe,/y/g,"")),Z&&(Ce=function(We){for(var Ee,Lt=We.length,ut=0,mt="",ht=[],Wt=C(null),gt=!1,Bt=!1,yt=0,wt="";ut<=Lt;ut++){if((Ee=V(We,ut))==="\\")Ee+=V(We,++ut);else if(Ee==="]")gt=!1;else if(!gt)switch(!0){case Ee==="[":gt=!0;break;case Ee==="(":de(_,w(We,ut+1))&&(ut+=2,Bt=!0),mt+=Ee,yt++;continue;case(Ee===">"&&Bt):if(wt===""||P(Wt,wt))throw new me("Invalid capture group name");Wt[wt]=!0,ht[ht.length]=[wt,yt],Bt=!1,wt="";continue}Bt?wt+=Ee:mt+=Ee}return[mt,ht]}(re),re=Ce[0],Ke=Ce[1]),Fe=v(ue(re,oe),Ve?this:ne,F),(ae||be||Ke.length)&&(Ae=L(Fe),ae&&(Ae.dotAll=!0,Ae.raw=F(function(We){for(var Ee,Lt=We.length,ut=0,mt="",ht=!1;ut<=Lt;ut++)(Ee=V(We,ut))!=="\\"?ht||Ee!=="."?(Ee==="["?ht=!0:Ee==="]"&&(ht=!1),mt+=Ee):mt+="[\\s\\S]":mt+=Ee+V(We,++ut);return mt}(re),ge)),be&&(Ae.sticky=!0),Ke.length&&(Ae.groups=Ke)),re!==et)try{b(Fe,"source",et===""?"(?:)":et)}catch{}return Fe},ce=S(ue),fe=0;ce.length>fe;)D(F,ue,ce[fe++]);ne.constructor=F,F.prototype=ne,M(p,"RegExp",F,{constructor:!0})}q("RegExp")},7495:function(l,y,i){var c=i(6518),p=i(7323);c({target:"RegExp",proto:!0,forced:/./.exec!==p},{exec:p})},8781:function(l,y,i){var c=i(350).PROPER,p=i(6840),d=i(8551),m=i(655),v=i(9039),b=i(1034),C="toString",S=RegExp.prototype,k=S[C],B=v(function(){return k.call({source:"a",flags:"b"})!=="/a/b"}),O=c&&k.name!==C;(B||O)&&p(S,C,function(){var j=d(this);return"/"+m(j.source)+"/"+m(b(j))},{unsafe:!0})},1699:function(l,y,i){var c=i(6518),p=i(9504),d=i(5749),m=i(7750),v=i(655),b=i(1436),C=p("".indexOf);c({target:"String",proto:!0,forced:!b("includes")},{includes:function(S){return!!~C(v(m(this)),v(d(S)),arguments.length>1?arguments[1]:void 0)}})},7764:function(l,y,i){var c=i(8183).charAt,p=i(655),d=i(1181),m=i(1088),v=i(2529),b="String Iterator",C=d.set,S=d.getterFor(b);m(String,"String",function(k){C(this,{type:b,string:p(k),index:0})},function(){var k,B=S(this),O=B.string,j=B.index;return j>=O.length?v(void 0,!0):(k=c(O,j),B.index+=k.length,v(k,!1))})},8543:function(l,y,i){var c=i(6518),p=i(9565),d=i(7476),m=i(3994),v=i(2529),b=i(7750),C=i(8014),S=i(655),k=i(8551),B=i(4117),O=i(4576),j=i(788),I=i(1034),D=i(5966),M=i(6840),$=i(9039),P=i(8227),L=i(2293),q=i(7829),K=i(6682),Q=i(1181),Z=i(6395),ee=P("matchAll"),ue="RegExp String",ne=ue+" Iterator",me=Q.set,de=Q.getterFor(ne),V=RegExp.prototype,U=TypeError,J=d("".indexOf),w=d("".matchAll),_=!!w&&!$(function(){w("a",/./)}),N=m(function(W,G,X,F){me(this,{type:ne,regexp:W,string:G,global:X,unicode:F,done:!1})},ue,function(){var W=de(this);if(W.done)return v(void 0,!0);var G=W.regexp,X=W.string,F=K(G,X);return F===null?(W.done=!0,v(void 0,!0)):W.global?(S(F[0])===""&&(G.lastIndex=q(X,C(G.lastIndex),W.unicode)),v(F,!1)):(W.done=!0,v(F,!1))}),R=function(W){var G,X,F,ce=k(this),fe=S(W),re=L(ce,RegExp),oe=S(I(ce));return G=new re(re===RegExp?ce.source:ce,oe),X=!!~J(oe,"g"),F=!!~J(oe,"u"),G.lastIndex=C(ce.lastIndex),new N(G,fe,X,F)};c({target:"String",proto:!0,forced:_},{matchAll:function(W){var G,X,F,ce,fe=b(this);if(B(W)){if(_)return w(fe,W)}else{if(j(W)&&(G=S(b(I(W))),!~J(G,"g")))throw new U("`.matchAll` does not allow non-global regexes");if(_)return w(fe,W);if((F=D(W,ee))===void 0&&Z&&O(W)==="RegExp"&&(F=R),F)return p(F,W,fe)}return X=S(fe),ce=new RegExp(W,"g"),Z?p(R,ce,X):ce[ee](X)}}),Z||ee in V||M(V,ee,R)},1761:function(l,y,i){var c=i(9565),p=i(9228),d=i(8551),m=i(4117),v=i(8014),b=i(655),C=i(7750),S=i(5966),k=i(7829),B=i(6682);p("match",function(O,j,I){return[function(D){var M=C(this),$=m(D)?void 0:S(D,O);return $?c($,D,M):new RegExp(D)[O](b(M))},function(D){var M=d(this),$=b(D),P=I(j,M,$);if(P.done)return P.value;if(!M.global)return B(M,$);var L=M.unicode;M.lastIndex=0;for(var q,K=[],Q=0;(q=B(M,$))!==null;){var Z=b(q[0]);K[Q]=Z,Z===""&&(M.lastIndex=k($,v(M.lastIndex),L)),Q++}return Q===0?null:K}]})},5440:function(l,y,i){var c=i(8745),p=i(9565),d=i(9504),m=i(9228),v=i(9039),b=i(8551),C=i(4901),S=i(4117),k=i(1291),B=i(8014),O=i(655),j=i(7750),I=i(7829),D=i(5966),M=i(2478),$=i(6682),P=i(8227)("replace"),L=Math.max,q=Math.min,K=d([].concat),Q=d([].push),Z=d("".indexOf),ee=d("".slice),ue="a".replace(/./,"$0")==="$0",ne=!!/./[P]&&/./[P]("a","$0")==="";m("replace",function(me,de,V){var U=ne?"$":"$0";return[function(J,w){var _=j(this),N=S(J)?void 0:D(J,P);return N?p(N,J,_,w):p(de,O(_),J,w)},function(J,w){var _=b(this),N=O(J);if(typeof w=="string"&&Z(w,U)===-1&&Z(w,"$<")===-1){var R=V(de,_,N,w);if(R.done)return R.value}var W=C(w);W||(w=O(w));var G,X=_.global;X&&(G=_.unicode,_.lastIndex=0);for(var F,ce=[];(F=$(_,N))!==null&&(Q(ce,F),X);)O(F[0])===""&&(_.lastIndex=I(N,B(_.lastIndex),G));for(var fe,re="",oe=0,ge=0;ge<ce.length;ge++){for(var ae,be=O((F=ce[ge])[0]),Ce=L(q(k(F.index),N.length),0),Fe=[],Ae=1;Ae<F.length;Ae++)Q(Fe,(fe=F[Ae])===void 0?fe:String(fe));var Ve=F.groups;if(W){var ze=K([be],Fe,Ce,N);Ve!==void 0&&Q(ze,Ve),ae=O(c(w,void 0,ze))}else ae=M(be,N,Ce,Fe,Ve,w);Ce>=oe&&(re+=ee(N,oe,Ce)+ae,oe=Ce+be.length)}return re+ee(N,oe)}]},!!v(function(){var me=/./;return me.exec=function(){var de=[];return de.groups={a:"7"},de},"".replace(me,"$<a>")!=="7"})||!ue||ne)},744:function(l,y,i){var c=i(9565),p=i(9504),d=i(9228),m=i(8551),v=i(4117),b=i(7750),C=i(2293),S=i(7829),k=i(8014),B=i(655),O=i(5966),j=i(6682),I=i(8429),D=i(9039),M=I.UNSUPPORTED_Y,$=Math.min,P=p([].push),L=p("".slice),q=!D(function(){var Q=/(?:)/,Z=Q.exec;Q.exec=function(){return Z.apply(this,arguments)};var ee="ab".split(Q);return ee.length!==2||ee[0]!=="a"||ee[1]!=="b"}),K="abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length;d("split",function(Q,Z,ee){var ue="0".split(void 0,0).length?function(ne,me){return ne===void 0&&me===0?[]:c(Z,this,ne,me)}:Z;return[function(ne,me){var de=b(this),V=v(ne)?void 0:O(ne,Q);return V?c(V,ne,de,me):c(ue,B(de),ne,me)},function(ne,me){var de=m(this),V=B(ne);if(!K){var U=ee(ue,de,V,me,ue!==Z);if(U.done)return U.value}var J=C(de,RegExp),w=de.unicode,_=(de.ignoreCase?"i":"")+(de.multiline?"m":"")+(de.unicode?"u":"")+(M?"g":"y"),N=new J(M?"^(?:"+de.source+")":de,_),R=me===void 0?4294967295:me>>>0;if(R===0)return[];if(V.length===0)return j(N,V)===null?[V]:[];for(var W=0,G=0,X=[];G<V.length;){N.lastIndex=M?0:G;var F,ce=j(N,M?L(V,G):V);if(ce===null||(F=$(k(N.lastIndex+(M?G:0)),V.length))===W)G=S(V,G,w);else{if(P(X,L(V,W,G)),X.length===R)return X;for(var fe=1;fe<=ce.length-1;fe++)if(P(X,ce[fe]),X.length===R)return X;G=W=F}}return P(X,L(V,W)),X}]},K||!q,M)},2762:function(l,y,i){var c=i(6518),p=i(3802).trim;c({target:"String",proto:!0,forced:i(706)("trim")},{trim:function(){return p(this)}})},6761:function(l,y,i){var c=i(6518),p=i(4475),d=i(9565),m=i(9504),v=i(6395),b=i(3724),C=i(4495),S=i(9039),k=i(9297),B=i(1625),O=i(8551),j=i(5397),I=i(6969),D=i(655),M=i(6980),$=i(2360),P=i(1072),L=i(8480),q=i(298),K=i(3717),Q=i(7347),Z=i(4913),ee=i(6801),ue=i(8773),ne=i(6840),me=i(2106),de=i(5745),V=i(6119),U=i(421),J=i(3392),w=i(8227),_=i(1951),N=i(511),R=i(8242),W=i(687),G=i(1181),X=i(9213).forEach,F=V("hidden"),ce="Symbol",fe="prototype",re=G.set,oe=G.getterFor(ce),ge=Object[fe],ae=p.Symbol,be=ae&&ae[fe],Ce=p.RangeError,Fe=p.TypeError,Ae=p.QObject,Ve=Q.f,ze=Z.f,bt=q.f,Ke=ue.f,et=m([].push),We=de("symbols"),Ee=de("op-symbols"),Lt=de("wks"),ut=!Ae||!Ae[fe]||!Ae[fe].findChild,mt=function(A,z,Y){var ie=Ve(ge,z);ie&&delete ge[z],ze(A,z,Y),ie&&A!==ge&&ze(ge,z,ie)},ht=b&&S(function(){return $(ze({},"a",{get:function(){return ze(this,"a",{value:7}).a}})).a!==7})?mt:ze,Wt=function(A,z){var Y=We[A]=$(be);return re(Y,{type:ce,tag:A,description:z}),b||(Y.description=z),Y},gt=function(A,z,Y){A===ge&&gt(Ee,z,Y),O(A);var ie=I(z);return O(Y),k(We,ie)?(Y.enumerable?(k(A,F)&&A[F][ie]&&(A[F][ie]=!1),Y=$(Y,{enumerable:M(0,!1)})):(k(A,F)||ze(A,F,M(1,$(null))),A[F][ie]=!0),ht(A,ie,Y)):ze(A,ie,Y)},Bt=function(A,z){O(A);var Y=j(z),ie=P(Y).concat(On(Y));return X(ie,function(he){b&&!d(yt,Y,he)||gt(A,he,Y[he])}),A},yt=function(A){var z=I(A),Y=d(Ke,this,z);return!(this===ge&&k(We,z)&&!k(Ee,z))&&(!(Y||!k(this,z)||!k(We,z)||k(this,F)&&this[F][z])||Y)},wt=function(A,z){var Y=j(A),ie=I(z);if(Y!==ge||!k(We,ie)||k(Ee,ie)){var he=Ve(Y,ie);return!he||!k(We,ie)||k(Y,F)&&Y[F][ie]||(he.enumerable=!0),he}},on=function(A){var z=bt(j(A)),Y=[];return X(z,function(ie){k(We,ie)||k(U,ie)||et(Y,ie)}),Y},On=function(A){var z=A===ge,Y=bt(z?Ee:j(A)),ie=[];return X(Y,function(he){!k(We,he)||z&&!k(ge,he)||et(ie,We[he])}),ie};C||(ae=function(){if(B(be,this))throw new Fe("Symbol is not a constructor");var A=arguments.length&&arguments[0]!==void 0?D(arguments[0]):void 0,z=J(A),Y=function(ie){var he=this===void 0?p:this;he===ge&&d(Y,Ee,ie),k(he,F)&&k(he[F],z)&&(he[F][z]=!1);var Pe=M(1,ie);try{ht(he,z,Pe)}catch(we){if(!(we instanceof Ce))throw we;mt(he,z,Pe)}};return b&&ut&&ht(ge,z,{configurable:!0,set:Y}),Wt(z,A)},ne(be=ae[fe],"toString",function(){return oe(this).tag}),ne(ae,"withoutSetter",function(A){return Wt(J(A),A)}),ue.f=yt,Z.f=gt,ee.f=Bt,Q.f=wt,L.f=q.f=on,K.f=On,_.f=function(A){return Wt(w(A),A)},b&&(me(be,"description",{configurable:!0,get:function(){return oe(this).description}}),v||ne(ge,"propertyIsEnumerable",yt,{unsafe:!0}))),c({global:!0,constructor:!0,wrap:!0,forced:!C,sham:!C},{Symbol:ae}),X(P(Lt),function(A){N(A)}),c({target:ce,stat:!0,forced:!C},{useSetter:function(){ut=!0},useSimple:function(){ut=!1}}),c({target:"Object",stat:!0,forced:!C,sham:!b},{create:function(A,z){return z===void 0?$(A):Bt($(A),z)},defineProperty:gt,defineProperties:Bt,getOwnPropertyDescriptor:wt}),c({target:"Object",stat:!0,forced:!C},{getOwnPropertyNames:on}),R(),W(ae,ce),U[F]=!0},9463:function(l,y,i){var c=i(6518),p=i(3724),d=i(4475),m=i(9504),v=i(9297),b=i(4901),C=i(1625),S=i(655),k=i(2106),B=i(7740),O=d.Symbol,j=O&&O.prototype;if(p&&b(O)&&(!("description"in j)||O().description!==void 0)){var I={},D=function(){var Q=arguments.length<1||arguments[0]===void 0?void 0:S(arguments[0]),Z=C(j,this)?new O(Q):Q===void 0?O():O(Q);return Q===""&&(I[Z]=!0),Z};B(D,O),D.prototype=j,j.constructor=D;var M=String(O("description detection"))==="Symbol(description detection)",$=m(j.valueOf),P=m(j.toString),L=/^Symbol\((.*)\)[^)]+$/,q=m("".replace),K=m("".slice);k(j,"description",{configurable:!0,get:function(){var Q=$(this);if(v(I,Q))return"";var Z=P(Q),ee=M?K(Z,7,-1):q(Z,L,"$1");return ee===""?void 0:ee}}),c({global:!0,constructor:!0,forced:!0},{Symbol:D})}},1510:function(l,y,i){var c=i(6518),p=i(7751),d=i(9297),m=i(655),v=i(5745),b=i(1296),C=v("string-to-symbol-registry"),S=v("symbol-to-string-registry");c({target:"Symbol",stat:!0,forced:!b},{for:function(k){var B=m(k);if(d(C,B))return C[B];var O=p("Symbol")(B);return C[B]=O,S[O]=B,O}})},2259:function(l,y,i){i(511)("iterator")},2675:function(l,y,i){i(6761),i(1510),i(7812),i(3110),i(9773)},7812:function(l,y,i){var c=i(6518),p=i(9297),d=i(757),m=i(6823),v=i(5745),b=i(1296),C=v("symbol-to-string-registry");c({target:"Symbol",stat:!0,forced:!b},{keyFor:function(S){if(!d(S))throw new TypeError(m(S)+" is not a symbol");if(p(C,S))return C[S]}})},5700:function(l,y,i){var c=i(511),p=i(8242);c("toPrimitive"),p()},8344:function(l,y,i){i(8543)},3500:function(l,y,i){var c=i(4475),p=i(7400),d=i(9296),m=i(235),v=i(6699),b=function(S){if(S&&S.forEach!==m)try{v(S,"forEach",m)}catch{S.forEach=m}};for(var C in p)p[C]&&b(c[C]&&c[C].prototype);b(d)},2953:function(l,y,i){var c=i(4475),p=i(7400),d=i(9296),m=i(3792),v=i(6699),b=i(687),C=i(8227)("iterator"),S=m.values,k=function(O,j){if(O){if(O[C]!==S)try{v(O,C,S)}catch{O[C]=S}if(b(O,j,!0),p[j]){for(var I in m)if(O[I]!==m[I])try{v(O,I,m[I])}catch{O[I]=m[I]}}}};for(var B in p)k(c[B]&&c[B].prototype,B);k(d,"DOMTokenList")}},g={};function f(l){var y=g[l];if(y!==void 0)return y.exports;var i=g[l]={exports:{}};return h[l].call(i.exports,i,i.exports,f),i.exports}f.d=function(l,y){for(var i in y)f.o(y,i)&&!f.o(l,i)&&Object.defineProperty(l,i,{enumerable:!0,get:y[i]})},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,y){return Object.prototype.hasOwnProperty.call(l,y)},f.r=function(l){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})};var x={};return function(){function l(V){return function(U){if(Array.isArray(U))return i(U)}(V)||function(U){if(typeof Symbol<"u"&&U[Symbol.iterator]!=null||U["@@iterator"]!=null)return Array.from(U)}(V)||y(V)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
68
+ \v\f\r                 \u2028\u2029\uFEFF`},8706:function(l,y,i){var c=i(6518),p=i(9039),d=i(4376),m=i(34),v=i(8981),b=i(6198),C=i(6837),S=i(4659),k=i(1469),B=i(597),O=i(8227),j=i(7388),I=O("isConcatSpreadable"),D=j>=51||!p(function(){var $=[];return $[I]=!1,$.concat()[0]!==$}),M=function($){if(!m($))return!1;var P=$[I];return P!==void 0?!!P:d($)};c({target:"Array",proto:!0,arity:1,forced:!D||!B("concat")},{concat:function($){var P,L,q,K,Q,Z=v(this),ee=k(Z,0),ue=0;for(P=-1,q=arguments.length;P<q;P++)if(M(Q=P===-1?Z:arguments[P]))for(K=b(Q),C(ue+K),L=0;L<K;L++,ue++)L in Q&&S(ee,ue,Q[L]);else C(ue+1),S(ee,ue++,Q);return ee.length=ue,ee}})},2008:function(l,y,i){var c=i(6518),p=i(9213).filter;c({target:"Array",proto:!0,forced:!i(597)("filter")},{filter:function(d){return p(this,d,arguments.length>1?arguments[1]:void 0)}})},3418:function(l,y,i){var c=i(6518),p=i(7916);c({target:"Array",stat:!0,forced:!i(4428)(function(d){Array.from(d)})},{from:p})},4423:function(l,y,i){var c=i(6518),p=i(9617).includes,d=i(9039),m=i(6469);c({target:"Array",proto:!0,forced:d(function(){return!Array(1).includes()})},{includes:function(v){return p(this,v,arguments.length>1?arguments[1]:void 0)}}),m("includes")},5276:function(l,y,i){var c=i(6518),p=i(7476),d=i(9617).indexOf,m=i(4598),v=p([].indexOf),b=!!v&&1/v([1],1,-0)<0;c({target:"Array",proto:!0,forced:b||!m("indexOf")},{indexOf:function(C){var S=arguments.length>1?arguments[1]:void 0;return b?v(this,C,S)||0:d(this,C,S)}})},3792:function(l,y,i){var c=i(5397),p=i(6469),d=i(6269),m=i(1181),v=i(4913).f,b=i(1088),C=i(2529),S=i(6395),k=i(3724),B="Array Iterator",O=m.set,j=m.getterFor(B);l.exports=b(Array,"Array",function(D,M){O(this,{type:B,target:c(D),index:0,kind:M})},function(){var D=j(this),M=D.target,$=D.index++;if(!M||$>=M.length)return D.target=void 0,C(void 0,!0);switch(D.kind){case"keys":return C($,!1);case"values":return C(M[$],!1)}return C([$,M[$]],!1)},"values");var I=d.Arguments=d.Array;if(p("keys"),p("values"),p("entries"),!S&&k&&I.name!=="values")try{v(I,"name",{value:"values"})}catch{}},8598:function(l,y,i){var c=i(6518),p=i(9504),d=i(7055),m=i(5397),v=i(4598),b=p([].join);c({target:"Array",proto:!0,forced:d!==Object||!v("join",",")},{join:function(C){return b(m(this),C===void 0?",":C)}})},2062:function(l,y,i){var c=i(6518),p=i(9213).map;c({target:"Array",proto:!0,forced:!i(597)("map")},{map:function(d){return p(this,d,arguments.length>1?arguments[1]:void 0)}})},2712:function(l,y,i){var c=i(6518),p=i(926).left,d=i(4598),m=i(7388);c({target:"Array",proto:!0,forced:!i(9088)&&m>79&&m<83||!d("reduce")},{reduce:function(v){var b=arguments.length;return p(this,v,b,b>1?arguments[1]:void 0)}})},4782:function(l,y,i){var c=i(6518),p=i(4376),d=i(3517),m=i(34),v=i(5610),b=i(6198),C=i(5397),S=i(4659),k=i(8227),B=i(597),O=i(7680),j=B("slice"),I=k("species"),D=Array,M=Math.max;c({target:"Array",proto:!0,forced:!j},{slice:function($,P){var L,q,K,Q=C(this),Z=b(Q),ee=v($,Z),ue=v(P===void 0?Z:P,Z);if(p(Q)&&(L=Q.constructor,(d(L)&&(L===D||p(L.prototype))||m(L)&&(L=L[I])===null)&&(L=void 0),L===D||L===void 0))return O(Q,ee,ue);for(q=new(L===void 0?D:L)(M(ue-ee,0)),K=0;ee<ue;ee++,K++)ee in Q&&S(q,K,Q[ee]);return q.length=K,q}})},6910:function(l,y,i){var c=i(6518),p=i(9504),d=i(9306),m=i(8981),v=i(6198),b=i(4606),C=i(655),S=i(9039),k=i(4488),B=i(4598),O=i(8834),j=i(3202),I=i(7388),D=i(9160),M=[],$=p(M.sort),P=p(M.push),L=S(function(){M.sort(void 0)}),q=S(function(){M.sort(null)}),K=B("sort"),Q=!S(function(){if(I)return I<70;if(!(O&&O>3)){if(j)return!0;if(D)return D<603;var Z,ee,ue,ne,me="";for(Z=65;Z<76;Z++){switch(ee=String.fromCharCode(Z),Z){case 66:case 69:case 70:case 72:ue=3;break;case 68:case 71:ue=4;break;default:ue=2}for(ne=0;ne<47;ne++)M.push({k:ee+ne,v:ue})}for(M.sort(function(de,V){return V.v-de.v}),ne=0;ne<M.length;ne++)ee=M[ne].k.charAt(0),me.charAt(me.length-1)!==ee&&(me+=ee);return me!=="DGBEFHACIJK"}});c({target:"Array",proto:!0,forced:L||!q||!K||!Q},{sort:function(Z){Z!==void 0&&d(Z);var ee=m(this);if(Q)return Z===void 0?$(ee):$(ee,Z);var ue,ne,me=[],de=v(ee);for(ne=0;ne<de;ne++)ne in ee&&P(me,ee[ne]);for(k(me,function(V){return function(U,J){return J===void 0?-1:U===void 0?1:V!==void 0?+V(U,J)||0:C(U)>C(J)?1:-1}}(Z)),ue=v(me),ne=0;ne<ue;)ee[ne]=me[ne++];for(;ne<de;)b(ee,ne++);return ee}})},4554:function(l,y,i){var c=i(6518),p=i(8981),d=i(5610),m=i(1291),v=i(6198),b=i(4527),C=i(6837),S=i(1469),k=i(4659),B=i(4606),O=i(597)("splice"),j=Math.max,I=Math.min;c({target:"Array",proto:!0,forced:!O},{splice:function(D,M){var $,P,L,q,K,Q,Z=p(this),ee=v(Z),ue=d(D,ee),ne=arguments.length;for(ne===0?$=P=0:ne===1?($=0,P=ee-ue):($=ne-2,P=I(j(m(M),0),ee-ue)),C(ee+$-P),L=S(Z,P),q=0;q<P;q++)(K=ue+q)in Z&&k(L,q,Z[K]);if(L.length=P,$<P){for(q=ue;q<ee-P;q++)Q=q+$,(K=q+P)in Z?Z[Q]=Z[K]:B(Z,Q);for(q=ee;q>ee-P+$;q--)B(Z,q-1)}else if($>P)for(q=ee-P;q>ue;q--)Q=q+$-1,(K=q+P-1)in Z?Z[Q]=Z[K]:B(Z,Q);for(q=0;q<$;q++)Z[q+ue]=arguments[q+2];return b(Z,ee-P+$),L}})},739:function(l,y,i){var c=i(6518),p=i(9039),d=i(8981),m=i(2777);c({target:"Date",proto:!0,arity:1,forced:p(function(){return new Date(NaN).toJSON()!==null||Date.prototype.toJSON.call({toISOString:function(){return 1}})!==1})},{toJSON:function(v){var b=d(this),C=m(b,"number");return typeof C!="number"||isFinite(C)?b.toISOString():null}})},9572:function(l,y,i){var c=i(9297),p=i(6840),d=i(3640),m=i(8227)("toPrimitive"),v=Date.prototype;c(v,m)||p(v,m,d)},2010:function(l,y,i){var c=i(3724),p=i(350).EXISTS,d=i(9504),m=i(2106),v=Function.prototype,b=d(v.toString),C=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,S=d(C.exec);c&&!p&&m(v,"name",{configurable:!0,get:function(){try{return S(C,b(this))[1]}catch{return""}}})},3110:function(l,y,i){var c=i(6518),p=i(7751),d=i(8745),m=i(9565),v=i(9504),b=i(9039),C=i(4901),S=i(757),k=i(7680),B=i(6933),O=i(4495),j=String,I=p("JSON","stringify"),D=v(/./.exec),M=v("".charAt),$=v("".charCodeAt),P=v("".replace),L=v(1 .toString),q=/[\uD800-\uDFFF]/g,K=/^[\uD800-\uDBFF]$/,Q=/^[\uDC00-\uDFFF]$/,Z=!O||b(function(){var me=p("Symbol")("stringify detection");return I([me])!=="[null]"||I({a:me})!=="{}"||I(Object(me))!=="{}"}),ee=b(function(){return I("\uDF06\uD834")!=='"\\udf06\\ud834"'||I("\uDEAD")!=='"\\udead"'}),ue=function(me,de){var V=k(arguments),U=B(de);if(C(U)||me!==void 0&&!S(me))return V[1]=function(J,w){if(C(U)&&(w=m(U,this,j(J),w)),!S(w))return w},d(I,null,V)},ne=function(me,de,V){var U=M(V,de-1),J=M(V,de+1);return D(K,me)&&!D(Q,J)||D(Q,me)&&!D(K,U)?"\\u"+L($(me,0),16):me};I&&c({target:"JSON",stat:!0,arity:3,forced:Z||ee},{stringify:function(me,de,V){var U=k(arguments),J=d(Z?ue:I,null,U);return ee&&typeof J=="string"?P(J,q,ne):J}})},2892:function(l,y,i){var c=i(6518),p=i(6395),d=i(3724),m=i(4475),v=i(9167),b=i(9504),C=i(2796),S=i(9297),k=i(3167),B=i(1625),O=i(757),j=i(2777),I=i(9039),D=i(8480).f,M=i(7347).f,$=i(4913).f,P=i(1240),L=i(3802).trim,q="Number",K=m[q],Q=v[q],Z=K.prototype,ee=m.TypeError,ue=b("".slice),ne=b("".charCodeAt),me=function(J){var w,_,N,R,W,G,X,F,ce=j(J,"number");if(O(ce))throw new ee("Cannot convert a Symbol value to a number");if(typeof ce=="string"&&ce.length>2){if(ce=L(ce),(w=ne(ce,0))===43||w===45){if((_=ne(ce,2))===88||_===120)return NaN}else if(w===48){switch(ne(ce,1)){case 66:case 98:N=2,R=49;break;case 79:case 111:N=8,R=55;break;default:return+ce}for(G=(W=ue(ce,2)).length,X=0;X<G;X++)if((F=ne(W,X))<48||F>R)return NaN;return parseInt(W,N)}}return+ce},de=C(q,!K(" 0o1")||!K("0b1")||K("+0x1")),V=function(J){var w,_=arguments.length<1?0:K(function(N){var R=j(N,"number");return typeof R=="bigint"?R:me(R)}(J));return B(Z,w=this)&&I(function(){P(w)})?k(Object(_),this,V):_};V.prototype=Z,de&&!p&&(Z.constructor=V),c({global:!0,constructor:!0,wrap:!0,forced:de},{Number:V});var U=function(J,w){for(var _,N=d?D(w):"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(","),R=0;N.length>R;R++)S(w,_=N[R])&&!S(J,_)&&$(J,_,M(w,_))};p&&Q&&U(v[q],Q),(de||p)&&U(v[q],K)},2637:function(l,y,i){i(6518)({target:"Number",stat:!0},{isInteger:i(2087)})},9085:function(l,y,i){var c=i(6518),p=i(4213);c({target:"Object",stat:!0,arity:2,forced:Object.assign!==p},{assign:p})},7427:function(l,y,i){var c=i(6518),p=i(3724),d=i(2551),m=i(9306),v=i(8981),b=i(4913);p&&c({target:"Object",proto:!0,forced:d},{__defineGetter__:function(C,S){b.f(v(this),C,{get:m(S),enumerable:!0,configurable:!0})}})},3851:function(l,y,i){var c=i(6518),p=i(9039),d=i(5397),m=i(7347).f,v=i(3724);c({target:"Object",stat:!0,forced:!v||p(function(){m(1)}),sham:!v},{getOwnPropertyDescriptor:function(b,C){return m(d(b),C)}})},1278:function(l,y,i){var c=i(6518),p=i(3724),d=i(5031),m=i(5397),v=i(7347),b=i(4659);c({target:"Object",stat:!0,sham:!p},{getOwnPropertyDescriptors:function(C){for(var S,k,B=m(C),O=v.f,j=d(B),I={},D=0;j.length>D;)(k=O(B,S=j[D++]))!==void 0&&b(I,S,k);return I}})},1480:function(l,y,i){var c=i(6518),p=i(9039),d=i(298).f;c({target:"Object",stat:!0,forced:p(function(){return!Object.getOwnPropertyNames(1)})},{getOwnPropertyNames:d})},9773:function(l,y,i){var c=i(6518),p=i(4495),d=i(9039),m=i(3717),v=i(8981);c({target:"Object",stat:!0,forced:!p||d(function(){m.f(1)})},{getOwnPropertySymbols:function(b){var C=m.f;return C?C(v(b)):[]}})},9432:function(l,y,i){var c=i(6518),p=i(8981),d=i(1072);c({target:"Object",stat:!0,forced:i(9039)(function(){d(1)})},{keys:function(m){return d(p(m))}})},6099:function(l,y,i){var c=i(2140),p=i(6840),d=i(3179);c||p(Object.prototype,"toString",d,{unsafe:!0})},4864:function(l,y,i){var c=i(3724),p=i(4475),d=i(9504),m=i(2796),v=i(3167),b=i(6699),C=i(2360),S=i(8480).f,k=i(1625),B=i(788),O=i(655),j=i(1034),I=i(8429),D=i(1056),M=i(6840),$=i(9039),P=i(9297),L=i(1181).enforce,q=i(7633),K=i(8227),Q=i(3635),Z=i(8814),ee=K("match"),ue=p.RegExp,ne=ue.prototype,me=p.SyntaxError,de=d(ne.exec),V=d("".charAt),U=d("".replace),J=d("".indexOf),w=d("".slice),_=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,N=/a/g,R=/a/g,W=new ue(N)!==N,G=I.MISSED_STICKY,X=I.UNSUPPORTED_Y;if(m("RegExp",c&&(!W||G||Q||Z||$(function(){return R[ee]=!1,ue(N)!==N||ue(R)===R||String(ue(N,"i"))!=="/a/i"})))){for(var F=function(re,oe){var ge,ae,be,Ce,Fe,Ae,Ve=k(ne,this),ze=B(re),bt=oe===void 0,Ke=[],et=re;if(!Ve&&ze&&bt&&re.constructor===F)return re;if((ze||k(ne,re))&&(re=re.source,bt&&(oe=j(et))),re=re===void 0?"":O(re),oe=oe===void 0?"":O(oe),et=re,Q&&"dotAll"in N&&(ae=!!oe&&J(oe,"s")>-1)&&(oe=U(oe,/s/g,"")),ge=oe,G&&"sticky"in N&&(be=!!oe&&J(oe,"y")>-1)&&X&&(oe=U(oe,/y/g,"")),Z&&(Ce=function(We){for(var Ee,Lt=We.length,ut=0,mt="",ht=[],Wt=C(null),gt=!1,Bt=!1,yt=0,wt="";ut<=Lt;ut++){if((Ee=V(We,ut))==="\\")Ee+=V(We,++ut);else if(Ee==="]")gt=!1;else if(!gt)switch(!0){case Ee==="[":gt=!0;break;case Ee==="(":de(_,w(We,ut+1))&&(ut+=2,Bt=!0),mt+=Ee,yt++;continue;case(Ee===">"&&Bt):if(wt===""||P(Wt,wt))throw new me("Invalid capture group name");Wt[wt]=!0,ht[ht.length]=[wt,yt],Bt=!1,wt="";continue}Bt?wt+=Ee:mt+=Ee}return[mt,ht]}(re),re=Ce[0],Ke=Ce[1]),Fe=v(ue(re,oe),Ve?this:ne,F),(ae||be||Ke.length)&&(Ae=L(Fe),ae&&(Ae.dotAll=!0,Ae.raw=F(function(We){for(var Ee,Lt=We.length,ut=0,mt="",ht=!1;ut<=Lt;ut++)(Ee=V(We,ut))!=="\\"?ht||Ee!=="."?(Ee==="["?ht=!0:Ee==="]"&&(ht=!1),mt+=Ee):mt+="[\\s\\S]":mt+=Ee+V(We,++ut);return mt}(re),ge)),be&&(Ae.sticky=!0),Ke.length&&(Ae.groups=Ke)),re!==et)try{b(Fe,"source",et===""?"(?:)":et)}catch{}return Fe},ce=S(ue),fe=0;ce.length>fe;)D(F,ue,ce[fe++]);ne.constructor=F,F.prototype=ne,M(p,"RegExp",F,{constructor:!0})}q("RegExp")},7495:function(l,y,i){var c=i(6518),p=i(7323);c({target:"RegExp",proto:!0,forced:/./.exec!==p},{exec:p})},8781:function(l,y,i){var c=i(350).PROPER,p=i(6840),d=i(8551),m=i(655),v=i(9039),b=i(1034),C="toString",S=RegExp.prototype,k=S[C],B=v(function(){return k.call({source:"a",flags:"b"})!=="/a/b"}),O=c&&k.name!==C;(B||O)&&p(S,C,function(){var j=d(this);return"/"+m(j.source)+"/"+m(b(j))},{unsafe:!0})},1699:function(l,y,i){var c=i(6518),p=i(9504),d=i(5749),m=i(7750),v=i(655),b=i(1436),C=p("".indexOf);c({target:"String",proto:!0,forced:!b("includes")},{includes:function(S){return!!~C(v(m(this)),v(d(S)),arguments.length>1?arguments[1]:void 0)}})},7764:function(l,y,i){var c=i(8183).charAt,p=i(655),d=i(1181),m=i(1088),v=i(2529),b="String Iterator",C=d.set,S=d.getterFor(b);m(String,"String",function(k){C(this,{type:b,string:p(k),index:0})},function(){var k,B=S(this),O=B.string,j=B.index;return j>=O.length?v(void 0,!0):(k=c(O,j),B.index+=k.length,v(k,!1))})},8543:function(l,y,i){var c=i(6518),p=i(9565),d=i(7476),m=i(3994),v=i(2529),b=i(7750),C=i(8014),S=i(655),k=i(8551),B=i(4117),O=i(4576),j=i(788),I=i(1034),D=i(5966),M=i(6840),$=i(9039),P=i(8227),L=i(2293),q=i(7829),K=i(6682),Q=i(1181),Z=i(6395),ee=P("matchAll"),ue="RegExp String",ne=ue+" Iterator",me=Q.set,de=Q.getterFor(ne),V=RegExp.prototype,U=TypeError,J=d("".indexOf),w=d("".matchAll),_=!!w&&!$(function(){w("a",/./)}),N=m(function(W,G,X,F){me(this,{type:ne,regexp:W,string:G,global:X,unicode:F,done:!1})},ue,function(){var W=de(this);if(W.done)return v(void 0,!0);var G=W.regexp,X=W.string,F=K(G,X);return F===null?(W.done=!0,v(void 0,!0)):W.global?(S(F[0])===""&&(G.lastIndex=q(X,C(G.lastIndex),W.unicode)),v(F,!1)):(W.done=!0,v(F,!1))}),R=function(W){var G,X,F,ce=k(this),fe=S(W),re=L(ce,RegExp),oe=S(I(ce));return G=new re(re===RegExp?ce.source:ce,oe),X=!!~J(oe,"g"),F=!!~J(oe,"u"),G.lastIndex=C(ce.lastIndex),new N(G,fe,X,F)};c({target:"String",proto:!0,forced:_},{matchAll:function(W){var G,X,F,ce,fe=b(this);if(B(W)){if(_)return w(fe,W)}else{if(j(W)&&(G=S(b(I(W))),!~J(G,"g")))throw new U("`.matchAll` does not allow non-global regexes");if(_)return w(fe,W);if((F=D(W,ee))===void 0&&Z&&O(W)==="RegExp"&&(F=R),F)return p(F,W,fe)}return X=S(fe),ce=new RegExp(W,"g"),Z?p(R,ce,X):ce[ee](X)}}),Z||ee in V||M(V,ee,R)},1761:function(l,y,i){var c=i(9565),p=i(9228),d=i(8551),m=i(4117),v=i(8014),b=i(655),C=i(7750),S=i(5966),k=i(7829),B=i(6682);p("match",function(O,j,I){return[function(D){var M=C(this),$=m(D)?void 0:S(D,O);return $?c($,D,M):new RegExp(D)[O](b(M))},function(D){var M=d(this),$=b(D),P=I(j,M,$);if(P.done)return P.value;if(!M.global)return B(M,$);var L=M.unicode;M.lastIndex=0;for(var q,K=[],Q=0;(q=B(M,$))!==null;){var Z=b(q[0]);K[Q]=Z,Z===""&&(M.lastIndex=k($,v(M.lastIndex),L)),Q++}return Q===0?null:K}]})},5440:function(l,y,i){var c=i(8745),p=i(9565),d=i(9504),m=i(9228),v=i(9039),b=i(8551),C=i(4901),S=i(4117),k=i(1291),B=i(8014),O=i(655),j=i(7750),I=i(7829),D=i(5966),M=i(2478),$=i(6682),P=i(8227)("replace"),L=Math.max,q=Math.min,K=d([].concat),Q=d([].push),Z=d("".indexOf),ee=d("".slice),ue="a".replace(/./,"$0")==="$0",ne=!!/./[P]&&/./[P]("a","$0")==="";m("replace",function(me,de,V){var U=ne?"$":"$0";return[function(J,w){var _=j(this),N=S(J)?void 0:D(J,P);return N?p(N,J,_,w):p(de,O(_),J,w)},function(J,w){var _=b(this),N=O(J);if(typeof w=="string"&&Z(w,U)===-1&&Z(w,"$<")===-1){var R=V(de,_,N,w);if(R.done)return R.value}var W=C(w);W||(w=O(w));var G,X=_.global;X&&(G=_.unicode,_.lastIndex=0);for(var F,ce=[];(F=$(_,N))!==null&&(Q(ce,F),X);)O(F[0])===""&&(_.lastIndex=I(N,B(_.lastIndex),G));for(var fe,re="",oe=0,ge=0;ge<ce.length;ge++){for(var ae,be=O((F=ce[ge])[0]),Ce=L(q(k(F.index),N.length),0),Fe=[],Ae=1;Ae<F.length;Ae++)Q(Fe,(fe=F[Ae])===void 0?fe:String(fe));var Ve=F.groups;if(W){var ze=K([be],Fe,Ce,N);Ve!==void 0&&Q(ze,Ve),ae=O(c(w,void 0,ze))}else ae=M(be,N,Ce,Fe,Ve,w);Ce>=oe&&(re+=ee(N,oe,Ce)+ae,oe=Ce+be.length)}return re+ee(N,oe)}]},!!v(function(){var me=/./;return me.exec=function(){var de=[];return de.groups={a:"7"},de},"".replace(me,"$<a>")!=="7"})||!ue||ne)},744:function(l,y,i){var c=i(9565),p=i(9504),d=i(9228),m=i(8551),v=i(4117),b=i(7750),C=i(2293),S=i(7829),k=i(8014),B=i(655),O=i(5966),j=i(6682),I=i(8429),D=i(9039),M=I.UNSUPPORTED_Y,$=Math.min,P=p([].push),L=p("".slice),q=!D(function(){var Q=/(?:)/,Z=Q.exec;Q.exec=function(){return Z.apply(this,arguments)};var ee="ab".split(Q);return ee.length!==2||ee[0]!=="a"||ee[1]!=="b"}),K="abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length;d("split",function(Q,Z,ee){var ue="0".split(void 0,0).length?function(ne,me){return ne===void 0&&me===0?[]:c(Z,this,ne,me)}:Z;return[function(ne,me){var de=b(this),V=v(ne)?void 0:O(ne,Q);return V?c(V,ne,de,me):c(ue,B(de),ne,me)},function(ne,me){var de=m(this),V=B(ne);if(!K){var U=ee(ue,de,V,me,ue!==Z);if(U.done)return U.value}var J=C(de,RegExp),w=de.unicode,_=(de.ignoreCase?"i":"")+(de.multiline?"m":"")+(de.unicode?"u":"")+(M?"g":"y"),N=new J(M?"^(?:"+de.source+")":de,_),R=me===void 0?4294967295:me>>>0;if(R===0)return[];if(V.length===0)return j(N,V)===null?[V]:[];for(var W=0,G=0,X=[];G<V.length;){N.lastIndex=M?0:G;var F,ce=j(N,M?L(V,G):V);if(ce===null||(F=$(k(N.lastIndex+(M?G:0)),V.length))===W)G=S(V,G,w);else{if(P(X,L(V,W,G)),X.length===R)return X;for(var fe=1;fe<=ce.length-1;fe++)if(P(X,ce[fe]),X.length===R)return X;G=W=F}}return P(X,L(V,W)),X}]},K||!q,M)},2762:function(l,y,i){var c=i(6518),p=i(3802).trim;c({target:"String",proto:!0,forced:i(706)("trim")},{trim:function(){return p(this)}})},6761:function(l,y,i){var c=i(6518),p=i(4475),d=i(9565),m=i(9504),v=i(6395),b=i(3724),C=i(4495),S=i(9039),k=i(9297),B=i(1625),O=i(8551),j=i(5397),I=i(6969),D=i(655),M=i(6980),$=i(2360),P=i(1072),L=i(8480),q=i(298),K=i(3717),Q=i(7347),Z=i(4913),ee=i(6801),ue=i(8773),ne=i(6840),me=i(2106),de=i(5745),V=i(6119),U=i(421),J=i(3392),w=i(8227),_=i(1951),N=i(511),R=i(8242),W=i(687),G=i(1181),X=i(9213).forEach,F=V("hidden"),ce="Symbol",fe="prototype",re=G.set,oe=G.getterFor(ce),ge=Object[fe],ae=p.Symbol,be=ae&&ae[fe],Ce=p.RangeError,Fe=p.TypeError,Ae=p.QObject,Ve=Q.f,ze=Z.f,bt=q.f,Ke=ue.f,et=m([].push),We=de("symbols"),Ee=de("op-symbols"),Lt=de("wks"),ut=!Ae||!Ae[fe]||!Ae[fe].findChild,mt=function(A,z,Y){var ie=Ve(ge,z);ie&&delete ge[z],ze(A,z,Y),ie&&A!==ge&&ze(ge,z,ie)},ht=b&&S(function(){return $(ze({},"a",{get:function(){return ze(this,"a",{value:7}).a}})).a!==7})?mt:ze,Wt=function(A,z){var Y=We[A]=$(be);return re(Y,{type:ce,tag:A,description:z}),b||(Y.description=z),Y},gt=function(A,z,Y){A===ge&&gt(Ee,z,Y),O(A);var ie=I(z);return O(Y),k(We,ie)?(Y.enumerable?(k(A,F)&&A[F][ie]&&(A[F][ie]=!1),Y=$(Y,{enumerable:M(0,!1)})):(k(A,F)||ze(A,F,M(1,$(null))),A[F][ie]=!0),ht(A,ie,Y)):ze(A,ie,Y)},Bt=function(A,z){O(A);var Y=j(z),ie=P(Y).concat(_n(Y));return X(ie,function(he){b&&!d(yt,Y,he)||gt(A,he,Y[he])}),A},yt=function(A){var z=I(A),Y=d(Ke,this,z);return!(this===ge&&k(We,z)&&!k(Ee,z))&&(!(Y||!k(this,z)||!k(We,z)||k(this,F)&&this[F][z])||Y)},wt=function(A,z){var Y=j(A),ie=I(z);if(Y!==ge||!k(We,ie)||k(Ee,ie)){var he=Ve(Y,ie);return!he||!k(We,ie)||k(Y,F)&&Y[F][ie]||(he.enumerable=!0),he}},on=function(A){var z=bt(j(A)),Y=[];return X(z,function(ie){k(We,ie)||k(U,ie)||et(Y,ie)}),Y},_n=function(A){var z=A===ge,Y=bt(z?Ee:j(A)),ie=[];return X(Y,function(he){!k(We,he)||z&&!k(ge,he)||et(ie,We[he])}),ie};C||(ae=function(){if(B(be,this))throw new Fe("Symbol is not a constructor");var A=arguments.length&&arguments[0]!==void 0?D(arguments[0]):void 0,z=J(A),Y=function(ie){var he=this===void 0?p:this;he===ge&&d(Y,Ee,ie),k(he,F)&&k(he[F],z)&&(he[F][z]=!1);var Pe=M(1,ie);try{ht(he,z,Pe)}catch(we){if(!(we instanceof Ce))throw we;mt(he,z,Pe)}};return b&&ut&&ht(ge,z,{configurable:!0,set:Y}),Wt(z,A)},ne(be=ae[fe],"toString",function(){return oe(this).tag}),ne(ae,"withoutSetter",function(A){return Wt(J(A),A)}),ue.f=yt,Z.f=gt,ee.f=Bt,Q.f=wt,L.f=q.f=on,K.f=_n,_.f=function(A){return Wt(w(A),A)},b&&(me(be,"description",{configurable:!0,get:function(){return oe(this).description}}),v||ne(ge,"propertyIsEnumerable",yt,{unsafe:!0}))),c({global:!0,constructor:!0,wrap:!0,forced:!C,sham:!C},{Symbol:ae}),X(P(Lt),function(A){N(A)}),c({target:ce,stat:!0,forced:!C},{useSetter:function(){ut=!0},useSimple:function(){ut=!1}}),c({target:"Object",stat:!0,forced:!C,sham:!b},{create:function(A,z){return z===void 0?$(A):Bt($(A),z)},defineProperty:gt,defineProperties:Bt,getOwnPropertyDescriptor:wt}),c({target:"Object",stat:!0,forced:!C},{getOwnPropertyNames:on}),R(),W(ae,ce),U[F]=!0},9463:function(l,y,i){var c=i(6518),p=i(3724),d=i(4475),m=i(9504),v=i(9297),b=i(4901),C=i(1625),S=i(655),k=i(2106),B=i(7740),O=d.Symbol,j=O&&O.prototype;if(p&&b(O)&&(!("description"in j)||O().description!==void 0)){var I={},D=function(){var Q=arguments.length<1||arguments[0]===void 0?void 0:S(arguments[0]),Z=C(j,this)?new O(Q):Q===void 0?O():O(Q);return Q===""&&(I[Z]=!0),Z};B(D,O),D.prototype=j,j.constructor=D;var M=String(O("description detection"))==="Symbol(description detection)",$=m(j.valueOf),P=m(j.toString),L=/^Symbol\((.*)\)[^)]+$/,q=m("".replace),K=m("".slice);k(j,"description",{configurable:!0,get:function(){var Q=$(this);if(v(I,Q))return"";var Z=P(Q),ee=M?K(Z,7,-1):q(Z,L,"$1");return ee===""?void 0:ee}}),c({global:!0,constructor:!0,forced:!0},{Symbol:D})}},1510:function(l,y,i){var c=i(6518),p=i(7751),d=i(9297),m=i(655),v=i(5745),b=i(1296),C=v("string-to-symbol-registry"),S=v("symbol-to-string-registry");c({target:"Symbol",stat:!0,forced:!b},{for:function(k){var B=m(k);if(d(C,B))return C[B];var O=p("Symbol")(B);return C[B]=O,S[O]=B,O}})},2259:function(l,y,i){i(511)("iterator")},2675:function(l,y,i){i(6761),i(1510),i(7812),i(3110),i(9773)},7812:function(l,y,i){var c=i(6518),p=i(9297),d=i(757),m=i(6823),v=i(5745),b=i(1296),C=v("symbol-to-string-registry");c({target:"Symbol",stat:!0,forced:!b},{keyFor:function(S){if(!d(S))throw new TypeError(m(S)+" is not a symbol");if(p(C,S))return C[S]}})},5700:function(l,y,i){var c=i(511),p=i(8242);c("toPrimitive"),p()},8344:function(l,y,i){i(8543)},3500:function(l,y,i){var c=i(4475),p=i(7400),d=i(9296),m=i(235),v=i(6699),b=function(S){if(S&&S.forEach!==m)try{v(S,"forEach",m)}catch{S.forEach=m}};for(var C in p)p[C]&&b(c[C]&&c[C].prototype);b(d)},2953:function(l,y,i){var c=i(4475),p=i(7400),d=i(9296),m=i(3792),v=i(6699),b=i(687),C=i(8227)("iterator"),S=m.values,k=function(O,j){if(O){if(O[C]!==S)try{v(O,C,S)}catch{O[C]=S}if(b(O,j,!0),p[j]){for(var I in m)if(O[I]!==m[I])try{v(O,I,m[I])}catch{O[I]=m[I]}}}};for(var B in p)k(c[B]&&c[B].prototype,B);k(d,"DOMTokenList")}},g={};function f(l){var y=g[l];if(y!==void 0)return y.exports;var i=g[l]={exports:{}};return h[l].call(i.exports,i,i.exports,f),i.exports}f.d=function(l,y){for(var i in y)f.o(y,i)&&!f.o(l,i)&&Object.defineProperty(l,i,{enumerable:!0,get:y[i]})},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,y){return Object.prototype.hasOwnProperty.call(l,y)},f.r=function(l){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})};var x={};return function(){function l(V){return function(U){if(Array.isArray(U))return i(U)}(V)||function(U){if(typeof Symbol<"u"&&U[Symbol.iterator]!=null||U["@@iterator"]!=null)return Array.from(U)}(V)||y(V)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
69
69
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function y(V,U){if(V){if(typeof V=="string")return i(V,U);var J=Object.prototype.toString.call(V).slice(8,-1);return J==="Object"&&V.constructor&&(J=V.constructor.name),J==="Map"||J==="Set"?Array.from(V):J==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(J)?i(V,U):void 0}}function i(V,U){(U==null||U>V.length)&&(U=V.length);for(var J=0,w=new Array(U);J<U;J++)w[J]=V[J];return w}function c(V){return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(U){return typeof U}:function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},c(V)}function p(V,U){for(var J=0;J<U.length;J++){var w=U[J];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(V,m(w.key),w)}}function d(V,U,J){return(U=m(U))in V?Object.defineProperty(V,U,{value:J,enumerable:!0,configurable:!0,writable:!0}):V[U]=J,V}function m(V){var U=function(J,w){if(c(J)!="object"||!J)return J;var _=J[Symbol.toPrimitive];if(_!==void 0){var N=_.call(J,w||"default");if(c(N)!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return(w==="string"?String:Number)(J)}(V,"string");return c(U)=="symbol"?U:U+""}f.r(x),f.d(x,{SimpleKeyboard:function(){return me},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(V){if("Element"in V){var U="classList",J="prototype",w=V.Element[J],_=Object,N=String[J].trim||function(){return this.replace(/^\s+|\s+$/g,"")},R=Array[J].indexOf||function(re){for(var oe=0,ge=this.length;oe<ge;oe++)if(oe in this&&this[oe]===re)return oe;return-1},W=function(re,oe){this.name=re,this.code=DOMException[re],this.message=oe},G=function(re,oe){if(oe==="")throw new W("SYNTAX_ERR","The token must not be empty.");if(/\s/.test(oe))throw new W("INVALID_CHARACTER_ERR","The token must not contain space characters.");return R.call(re,oe)},X=function(re){for(var oe=N.call(re.getAttribute("class")||""),ge=oe?oe.split(/\s+/):[],ae=0,be=ge.length;ae<be;ae++)this.push(ge[ae]);this._updateClassName=function(){re.setAttribute("class",this.toString())}},F=X[J]=[],ce=function(){return new X(this)};if(W[J]=Error[J],F.item=function(re){return this[re]||null},F.contains=function(re){return~G(this,re+"")},F.add=function(){var re,oe=arguments,ge=0,ae=oe.length,be=!1;do~G(this,re=oe[ge]+"")||(this.push(re),be=!0);while(++ge<ae);be&&this._updateClassName()},F.remove=function(){var re,oe,ge=arguments,ae=0,be=ge.length,Ce=!1;do for(oe=G(this,re=ge[ae]+"");~oe;)this.splice(oe,1),Ce=!0,oe=G(this,re);while(++ae<be);Ce&&this._updateClassName()},F.toggle=function(re,oe){var ge=this.contains(re),ae=ge?oe!==!0&&"remove":oe!==!1&&"add";return ae&&this[ae](re),oe===!0||oe===!1?oe:!ge},F.replace=function(re,oe){var ge=G(re+"");~ge&&(this.splice(ge,1,oe),this._updateClassName())},F.toString=function(){return this.join(" ")},_.defineProperty){var fe={get:ce,enumerable:!0,configurable:!0};try{_.defineProperty(w,U,fe)}catch(re){re.number!==void 0&&re.number!==-2146823252||(fe.enumerable=!1,_.defineProperty(w,U,fe))}}else _[J].__defineGetter__&&w.__defineGetter__(U,ce)}}(self),function(){var V=document.createElement("_");if(V.classList.add("c1","c2"),!V.classList.contains("c2")){var U=function(w){var _=DOMTokenList.prototype[w];DOMTokenList.prototype[w]=function(N){var R,W=arguments.length;for(R=0;R<W;R++)N=arguments[R],_.call(this,N)}};U("add"),U("remove")}if(V.classList.toggle("c3",!1),V.classList.contains("c3")){var J=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(w,_){return 1 in arguments&&!this.contains(w)==!_?_:J.call(this,w)}}"replace"in document.createElement("_").classList||(DOMTokenList.prototype.replace=function(w,_){var N=this.toString().split(" "),R=N.indexOf(w+"");~R&&(N=N.slice(R),this.remove.apply(this,N),this.add(_),this.add.apply(this,N.slice(1)))}),V=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 v=function(){return V=function w(_){var N=_.getOptions,R=_.getCaretPosition,W=_.getCaretPositionEnd,G=_.dispatch;(function(X,F){if(!(X instanceof F))throw new TypeError("Cannot call a class as a function")})(this,w),d(this,"getOptions",void 0),d(this,"getCaretPosition",void 0),d(this,"getCaretPositionEnd",void 0),d(this,"dispatch",void 0),d(this,"maxLengthReached",void 0),d(this,"isStandardButton",function(X){return X&&!(X[0]==="{"&&X[X.length-1]==="}")}),this.getOptions=N,this.getCaretPosition=R,this.getCaretPositionEnd=W,this.dispatch=G,w.bindMethods(w,this)},U=[{key:"getButtonType",value:function(w){return w.includes("{")&&w.includes("}")&&w!=="{//}"?"functionBtn":"standardBtn"}},{key:"getButtonClass",value:function(w){var _=this.getButtonType(w),N=w.replace("{","").replace("}",""),R="";return _!=="standardBtn"&&(R=" hg-button-".concat(N)),"hg-".concat(_).concat(R)}},{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(w,_){return(_=arguments.length>2&&arguments[2]!==void 0&&arguments[2]?Object.assign({},this.getDefaultDiplay(),_):_||this.getDefaultDiplay())[w]||w}},{key:"getUpdatedInput",value:function(w,_,N){var R=arguments.length>3&&arguments[3]!==void 0?arguments[3]:N,W=arguments.length>4&&arguments[4]!==void 0&&arguments[4],G=this.getOptions(),X=[N,R,W],F=_;return(w==="{bksp}"||w==="{backspace}")&&F.length>0?F=this.removeAt.apply(this,[F].concat(X)):(w==="{delete}"||w==="{forwarddelete}")&&F.length>0?F=this.removeForwardsAt.apply(this,[F].concat(X)):w==="{space}"?F=this.addStringAt.apply(this,[F," "].concat(X)):w!=="{tab}"||typeof G.tabCharOnTab=="boolean"&&G.tabCharOnTab===!1?w!=="{enter}"&&w!=="{numpadenter}"||!G.newLineOnEnter?w.includes("numpad")&&Number.isInteger(Number(w[w.length-2]))?F=this.addStringAt.apply(this,[F,w[w.length-2]].concat(X)):w==="{numpaddivide}"?F=this.addStringAt.apply(this,[F,"/"].concat(X)):w==="{numpadmultiply}"?F=this.addStringAt.apply(this,[F,"*"].concat(X)):w==="{numpadsubtract}"?F=this.addStringAt.apply(this,[F,"-"].concat(X)):w==="{numpadadd}"?F=this.addStringAt.apply(this,[F,"+"].concat(X)):w==="{numpaddecimal}"?F=this.addStringAt.apply(this,[F,"."].concat(X)):w==="{"||w==="}"?F=this.addStringAt.apply(this,[F,w].concat(X)):w.includes("{")||w.includes("}")||(F=this.addStringAt.apply(this,[F,w].concat(X))):F=this.addStringAt.apply(this,[F,`
70
70
  `].concat(X)):F=this.addStringAt.apply(this,[F," "].concat(X)),G.debug&&console.log("Input will be: "+F),F}},{key:"updateCaretPos",value:function(w){var _=arguments.length>1&&arguments[1]!==void 0&&arguments[1],N=this.updateCaretPosAction(w,_);this.dispatch(function(R){R.setCaretPosition(N)})}},{key:"updateCaretPosAction",value:function(w){var _=arguments.length>1&&arguments[1]!==void 0&&arguments[1],N=this.getOptions(),R=this.getCaretPosition();return R!=null&&(_?R>0&&(R-=w):R+=w),N.debug&&console.log("Caret at:",R),R}},{key:"addStringAt",value:function(w,_){var N,R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:w.length,W=arguments.length>3&&arguments[3]!==void 0?arguments[3]:w.length,G=arguments.length>4&&arguments[4]!==void 0&&arguments[4];return R||R===0?(N=[w.slice(0,R),_,w.slice(W)].join(""),this.isMaxLengthReached()||G&&this.updateCaretPos(_.length)):N=w+_,N}},{key:"removeAt",value:function(w){var _,N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:w.length,R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:w.length,W=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(N===0&&R===0)return w;if(N===R){var G=/([\uD800-\uDBFF][\uDC00-\uDFFF])/g;N&&N>=0?w.substring(N-2,N).match(G)?(_=w.substr(0,N-2)+w.substr(N),W&&this.updateCaretPos(2,!0)):(_=w.substr(0,N-1)+w.substr(N),W&&this.updateCaretPos(1,!0)):w.slice(-2).match(G)?(_=w.slice(0,-2),W&&this.updateCaretPos(2,!0)):(_=w.slice(0,-1),W&&this.updateCaretPos(1,!0))}else _=w.slice(0,N)+w.slice(R),W&&this.dispatch(function(X){X.setCaretPosition(N)});return _}},{key:"removeForwardsAt",value:function(w){var _,N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:w.length,R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:w.length,W=arguments.length>3&&arguments[3]!==void 0&&arguments[3];return w!=null&&w.length&&N!==null?(N===R?_=w.substring(N,N+2).match(/([\uD800-\uDBFF][\uDC00-\uDFFF])/g)?w.substr(0,N)+w.substr(N+2):w.substr(0,N)+w.substr(N+1):(_=w.slice(0,N)+w.slice(R),W&&this.dispatch(function(G){G.setCaretPosition(N)})),_):w}},{key:"handleMaxLength",value:function(w,_){var N=this.getOptions(),R=N.maxLength,W=w[N.inputName||"default"],G=_.length-1>=R;if(_.length<=W.length)return!1;if(Number.isInteger(R))return N.debug&&console.log("maxLength (num) reached:",G),G?(this.maxLengthReached=!0,!0):(this.maxLengthReached=!1,!1);if(c(R)==="object"){var X=_.length-1>=R[N.inputName||"default"];return N.debug&&console.log("maxLength (obj) reached:",X),X?(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(w){return w?w.toLowerCase().trim().split(/[.\-_\s]/g).reduce(function(_,N){return N.length?_+N[0].toUpperCase()+N.slice(1):_}):""}},{key:"chunkArray",value:function(w,_){return l(Array(Math.ceil(w.length/_))).map(function(N,R){return w.slice(_*R,_+_*R)})}},{key:"escapeRegex",value:function(w){return w.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}},{key:"getRtlOffset",value:function(w,_){var N=w,R=_.indexOf("‫");return R<w&&R!=-1&&N--,_.indexOf("‬")<w&&R!=-1&&N--,N<0?0:N}}],J=[{key:"bindMethods",value:function(w,_){var N,R=function(G,X){var F=typeof Symbol<"u"&&G[Symbol.iterator]||G["@@iterator"];if(!F){if(Array.isArray(G)||(F=y(G))||X){F&&(G=F);var ce=0,fe=function(){};return{s:fe,n:function(){return ce>=G.length?{done:!0}:{done:!1,value:G[ce++]}},e:function(ae){throw ae},f:fe}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
71
71
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var re,oe=!0,ge=!1;return{s:function(){F=F.call(G)},n:function(){var ae=F.next();return oe=ae.done,ae},e:function(ae){ge=!0,re=ae},f:function(){try{oe||F.return==null||F.return()}finally{if(ge)throw re}}}}(Object.getOwnPropertyNames(w.prototype));try{for(R.s();!(N=R.n()).done;){var W=N.value;W==="constructor"||W==="bindMethods"||(_[W]=_[W].bind(_))}}catch(G){R.e(G)}finally{R.f()}}}],U&&p(V.prototype,U),J&&p(V,J),Object.defineProperty(V,"prototype",{writable:!1}),V;var V,U,J}();d(v,"noop",function(){});var b=v;function C(V){return C=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(U){return typeof U}:function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},C(V)}function S(V,U){for(var J=0;J<U.length;J++){var w=U[J];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(V,B(w.key),w)}}function k(V,U,J){return(U=B(U))in V?Object.defineProperty(V,U,{value:J,enumerable:!0,configurable:!0,writable:!0}):V[U]=J,V}function B(V){var U=function(J,w){if(C(J)!="object"||!J)return J;var _=J[Symbol.toPrimitive];if(_!==void 0){var N=_.call(J,w);if(C(N)!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(J)}(V,"string");return C(U)=="symbol"?U:U+""}var O=function(){return V=function w(_){var N=this,R=_.dispatch,W=_.getOptions;(function(G,X){if(!(G instanceof X))throw new TypeError("Cannot call a class as a function")})(this,w),k(this,"getOptions",void 0),k(this,"dispatch",void 0),k(this,"isModifierKey",function(G){return G.altKey||G.ctrlKey||G.shiftKey||["Tab","CapsLock","Esc","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(G.code||G.key||N.keyCodeToKey(G==null?void 0:G.keyCode))}),this.dispatch=R,this.getOptions=W,b.bindMethods(w,this)},(U=[{key:"handleHighlightKeyDown",value:function(w){var _=this.getOptions();_.physicalKeyboardHighlightPreventDefault&&this.isModifierKey(w)&&(w.preventDefault(),w.stopImmediatePropagation());var N=this.getSimpleKeyboardLayoutKey(w);this.dispatch(function(R){var W,G,X=R.getButtonElement(N),F=R.getButtonElement("{".concat(N,"}"));if(X)W=X,G=N;else{if(!F)return;W=F,G="{".concat(N,"}")}var ce,fe,re,oe,ge=function(be){be.style.background=_.physicalKeyboardHighlightBgColor||"#dadce4",be.style.color=_.physicalKeyboardHighlightTextColor||"black"};if(W)if(Array.isArray(W)){if(W.forEach(function(be){return ge(be)}),_.physicalKeyboardHighlightPress)if(_.physicalKeyboardHighlightPressUsePointerEvents)(ce=W[0])===null||ce===void 0||(fe=ce.onpointerdown)===null||fe===void 0||fe.call(ce,w);else if(_.physicalKeyboardHighlightPressUseClick){var ae;(ae=W[0])===null||ae===void 0||ae.click()}else R.handleButtonClicked(G,w)}else ge(W),_.physicalKeyboardHighlightPress&&(_.physicalKeyboardHighlightPressUsePointerEvents?(re=W)===null||re===void 0||(oe=re.onpointerdown)===null||oe===void 0||oe.call(re,w):_.physicalKeyboardHighlightPressUseClick?W.click():R.handleButtonClicked(G,w))})}},{key:"handleHighlightKeyUp",value:function(w){var _=this.getOptions();_.physicalKeyboardHighlightPreventDefault&&this.isModifierKey(w)&&(w.preventDefault(),w.stopImmediatePropagation());var N=this.getSimpleKeyboardLayoutKey(w);this.dispatch(function(R){var W,G,X,F=R.getButtonElement(N)||R.getButtonElement("{".concat(N,"}")),ce=function(fe){fe.removeAttribute&&fe.removeAttribute("style")};F&&(Array.isArray(F)?(F.forEach(function(fe){return ce(fe)}),_.physicalKeyboardHighlightPressUsePointerEvents&&((W=F[0])===null||W===void 0||(G=W.onpointerup)===null||G===void 0||G.call(W,w))):(ce(F),_.physicalKeyboardHighlightPressUsePointerEvents&&(F==null||(X=F.onpointerup)===null||X===void 0||X.call(F,w))))})}},{key:"getSimpleKeyboardLayoutKey",value:function(w){var _,N="",R=w.code||w.key||this.keyCodeToKey(w==null?void 0:w.keyCode);return(N=R!=null&&R.includes("Numpad")||R!=null&&R.includes("Shift")||R!=null&&R.includes("Space")||R!=null&&R.includes("Backspace")||R!=null&&R.includes("Control")||R!=null&&R.includes("Alt")||R!=null&&R.includes("Meta")?w.code||"":w.key||this.keyCodeToKey(w==null?void 0:w.keyCode)||"").length>1?(_=N)===null||_===void 0?void 0:_.toLowerCase():N}},{key:"keyCodeToKey",value:function(w){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:"'"}[w]||""}}])&&S(V.prototype,U),J&&S(V,J),Object.defineProperty(V,"prototype",{writable:!1}),V;var V,U,J}();function j(V){return j=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(U){return typeof U}:function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},j(V)}function I(V,U){for(var J=0;J<U.length;J++){var w=U[J];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(V,M(w.key),w)}}function D(V,U,J){return(U=M(U))in V?Object.defineProperty(V,U,{value:J,enumerable:!0,configurable:!0,writable:!0}):V[U]=J,V}function M(V){var U=function(J,w){if(j(J)!="object"||!J)return J;var _=J[Symbol.toPrimitive];if(_!==void 0){var N=_.call(J,w);if(j(N)!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(J)}(V,"string");return j(U)=="symbol"?U:U+""}var $=function(){return V=function w(_){var N=_.utilities,R=_.options;(function(W,G){if(!(W instanceof G))throw new TypeError("Cannot call a class as a function")})(this,w),D(this,"utilities",void 0),D(this,"options",void 0),D(this,"candidateBoxElement",void 0),D(this,"pageIndex",0),D(this,"pageSize",void 0),this.utilities=N,this.options=R,b.bindMethods(w,this),this.pageSize=this.utilities.getOptions().layoutCandidatesPageSize||5},U=[{key:"destroy",value:function(){this.candidateBoxElement&&(this.candidateBoxElement.remove(),this.pageIndex=0)}},{key:"show",value:function(w){var _=this,N=w.candidateValue,R=w.targetElement,W=w.onSelect;if(N&&N.length){var G=this.utilities.chunkArray(N.split(" "),this.pageSize);this.renderPage({candidateListPages:G,targetElement:R,pageIndex:this.pageIndex,nbPages:G.length,onItemSelected:function(X,F){W(X,F),_.destroy()}})}}},{key:"renderPage",value:function(w){var _,N=this,R=w.candidateListPages,W=w.targetElement,G=w.pageIndex,X=w.nbPages,F=w.onItemSelected;(_=this.candidateBoxElement)===null||_===void 0||_.remove(),this.candidateBoxElement=document.createElement("div"),this.candidateBoxElement.className="hg-candidate-box";var ce=document.createElement("ul");ce.className="hg-candidate-box-list",R[G].forEach(function(Ce){var Fe,Ae=document.createElement("li"),Ve=function(){var ze=new(N.options.useTouchEvents?TouchEvent:MouseEvent)("click");return Object.defineProperty(ze,"target",{value:Ae}),ze};Ae.className="hg-candidate-box-list-item",Ae.innerHTML=((Fe=N.options.display)===null||Fe===void 0?void 0:Fe[Ce])||Ce,N.options.useTouchEvents?Ae.ontouchstart=function(ze){return F(Ce,ze||Ve())}:Ae.onclick=function(){var ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ve();return F(Ce,ze)},ce.appendChild(Ae)});var fe=G>0,re=document.createElement("div");re.classList.add("hg-candidate-box-prev"),fe&&re.classList.add("hg-candidate-box-btn-active");var oe=function(){fe&&N.renderPage({candidateListPages:R,targetElement:W,pageIndex:G-1,nbPages:X,onItemSelected:F})};this.options.useTouchEvents?re.ontouchstart=oe:re.onclick=oe,this.candidateBoxElement.appendChild(re),this.candidateBoxElement.appendChild(ce);var ge=G<X-1,ae=document.createElement("div");ae.classList.add("hg-candidate-box-next"),ge&&ae.classList.add("hg-candidate-box-btn-active");var be=function(){ge&&N.renderPage({candidateListPages:R,targetElement:W,pageIndex:G+1,nbPages:X,onItemSelected:F})};this.options.useTouchEvents?ae.ontouchstart=be:ae.onclick=be,this.candidateBoxElement.appendChild(ae),W.prepend(this.candidateBoxElement)}}],U&&I(V.prototype,U),J&&I(V,J),Object.defineProperty(V,"prototype",{writable:!1}),V;var V,U,J}(),P=$;function L(V){return function(U){if(Array.isArray(U))return q(U)}(V)||function(U){if(typeof Symbol<"u"&&U[Symbol.iterator]!=null||U["@@iterator"]!=null)return Array.from(U)}(V)||function(U,J){if(U){if(typeof U=="string")return q(U,J);var w=Object.prototype.toString.call(U).slice(8,-1);return w==="Object"&&U.constructor&&(w=U.constructor.name),w==="Map"||w==="Set"?Array.from(U):w==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(w)?q(U,J):void 0}}(V)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
72
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function q(V,U){(U==null||U>V.length)&&(U=V.length);for(var J=0,w=new Array(U);J<U;J++)w[J]=V[J];return w}function K(V){return K=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(U){return typeof U}:function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},K(V)}function Q(V,U){var J=Object.keys(V);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(V);U&&(w=w.filter(function(_){return Object.getOwnPropertyDescriptor(V,_).enumerable})),J.push.apply(J,w)}return J}function Z(V,U){for(var J=0;J<U.length;J++){var w=U[J];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(V,ue(w.key),w)}}function ee(V,U,J){return(U=ue(U))in V?Object.defineProperty(V,U,{value:J,enumerable:!0,configurable:!0,writable:!0}):V[U]=J,V}function ue(V){var U=function(J,w){if(K(J)!="object"||!J)return J;var _=J[Symbol.toPrimitive];if(_!==void 0){var N=_.call(J,w);if(K(N)!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(J)}(V,"string");return K(U)=="symbol"?U:U+""}var ne=function(){return V=function w(_,N){var R=this;if(function(oe,ge){if(!(oe instanceof ge))throw new TypeError("Cannot call a class as a function")}(this,w),ee(this,"input",void 0),ee(this,"options",void 0),ee(this,"utilities",void 0),ee(this,"caretPosition",void 0),ee(this,"caretPositionEnd",void 0),ee(this,"keyboardDOM",void 0),ee(this,"keyboardPluginClasses",void 0),ee(this,"keyboardDOMClass",void 0),ee(this,"buttonElements",void 0),ee(this,"currentInstanceName",void 0),ee(this,"allKeyboardInstances",void 0),ee(this,"keyboardInstanceNames",void 0),ee(this,"isFirstKeyboardInstance",void 0),ee(this,"physicalKeyboard",void 0),ee(this,"modules",void 0),ee(this,"activeButtonClass",void 0),ee(this,"holdInteractionTimeout",void 0),ee(this,"holdTimeout",void 0),ee(this,"isMouseHold",void 0),ee(this,"initialized",void 0),ee(this,"candidateBox",void 0),ee(this,"keyboardRowsDOM",void 0),ee(this,"defaultName","default"),ee(this,"activeInputElement",null),ee(this,"handleParams",function(oe,ge){var ae,be,Ce;if(typeof oe=="string")ae=oe.split(".").join(""),be=document.querySelector(".".concat(ae)),Ce=ge;else if(oe instanceof HTMLDivElement){if(!oe.className)throw console.warn("Any DOM element passed as parameter must have a class."),new Error("KEYBOARD_DOM_CLASS_ERROR");ae=oe.className.split(" ")[0],be=oe,Ce=ge}else ae="simple-keyboard",be=document.querySelector(".".concat(ae)),Ce=oe;return{keyboardDOMClass:ae,keyboardDOM:be,options:Ce}}),ee(this,"getOptions",function(){return R.options}),ee(this,"getCaretPosition",function(){return R.caretPosition}),ee(this,"getCaretPositionEnd",function(){return R.caretPositionEnd}),ee(this,"registerModule",function(oe,ge){R.modules[oe]||(R.modules[oe]={}),ge(R.modules[oe])}),ee(this,"getKeyboardClassString",function(){for(var oe=arguments.length,ge=new Array(oe),ae=0;ae<oe;ae++)ge[ae]=arguments[ae];return[R.keyboardDOMClass].concat(ge).filter(function(be){return!!be}).join(" ")}),typeof window<"u"){var W=this.handleParams(_,N),G=W.keyboardDOMClass,X=W.keyboardDOM,F=W.options,ce=F===void 0?{}:F;this.utilities=new b({getOptions:this.getOptions,getCaretPosition:this.getCaretPosition,getCaretPositionEnd:this.getCaretPositionEnd,dispatch:this.dispatch}),this.caretPosition=null,this.caretPositionEnd=null,this.keyboardDOM=X,this.options=function(oe){for(var ge=1;ge<arguments.length;ge++){var ae=arguments[ge]!=null?arguments[ge]:{};ge%2?Q(Object(ae),!0).forEach(function(be){ee(oe,be,ae[be])}):Object.getOwnPropertyDescriptors?Object.defineProperties(oe,Object.getOwnPropertyDescriptors(ae)):Q(Object(ae)).forEach(function(be){Object.defineProperty(oe,be,Object.getOwnPropertyDescriptor(ae,be))})}return oe}({layoutName:"default",theme:"hg-theme-default",inputName:"default",preventMouseDownDefault:!1,enableLayoutCandidates:!0,excludeFromLayout:{}},ce),this.keyboardPluginClasses="",b.bindMethods(w,this);var fe=this.options.inputName,re=fe===void 0?this.defaultName:fe;if(this.input={},this.input[re]="",this.keyboardDOMClass=G,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 O({dispatch:this.dispatch,getOptions:this.getOptions}),this.candidateBox=this.options.enableLayoutCandidates?new P({utilities:this.utilities,options:this.options}):null,!this.keyboardDOM)throw console.warn('".'.concat(G,'" was not found in the DOM.')),new Error("KEYBOARD_DOM_ERROR");this.render(),this.modules={},this.loadModules()}},U=[{key:"setCaretPosition",value:function(w){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:w;this.caretPosition=w,this.caretPositionEnd=_}},{key:"getInputCandidates",value:function(w){var _=this,N=this.options,R=N.layoutCandidates,W=N.layoutCandidatesCaseSensitiveMatch;if(!R||K(R)!=="object")return{};var G=Object.keys(R).filter(function(ce){var fe=w.substring(0,_.getCaretPositionEnd()||0)||w,re=new RegExp("".concat(_.utilities.escapeRegex(ce),"$"),W?"g":"gi");return!!L(fe.matchAll(re)).length});if(G.length>1){var X=G.sort(function(ce,fe){return fe.length-ce.length})[0];return{candidateKey:X,candidateValue:R[X]}}if(G.length){var F=G[0];return{candidateKey:F,candidateValue:R[F]}}return{}}},{key:"showCandidatesBox",value:function(w,_,N){var R=this;this.candidateBox&&this.candidateBox.show({candidateValue:_,targetElement:N,onSelect:function(W,G){var X=R.options,F=X.layoutCandidatesCaseSensitiveMatch,ce=X.disableCandidateNormalization,fe=X.enableLayoutCandidatesKeyPress,re=W;ce||(re=W.normalize("NFD")),typeof R.options.beforeInputUpdate=="function"&&R.options.beforeInputUpdate(R);var oe=R.getInput(R.options.inputName,!0),ge=R.getCaretPositionEnd()||0,ae=oe.substring(0,ge||0)||oe,be=new RegExp("".concat(R.utilities.escapeRegex(w),"$"),F?"g":"gi"),Ce=ae.replace(be,re),Fe=oe.replace(ae,Ce),Ae=Ce.length-ae.length,Ve=(ge||oe.length)+Ae;Ve<0&&(Ve=0),R.setInput(Fe,R.options.inputName,!0),R.setCaretPosition(Ve),fe&&typeof R.options.onKeyPress=="function"&&R.options.onKeyPress(W,G),typeof R.options.onChange=="function"&&R.options.onChange(R.getInput(R.options.inputName,!0),G),typeof R.options.onChangeAll=="function"&&R.options.onChangeAll(R.getAllInputs(),G)}})}},{key:"handleButtonClicked",value:function(w,_){var N=this.options,R=N.inputName,W=R===void 0?this.defaultName:R,G=N.debug;if(w!=="{//}"){this.input[W]||(this.input[W]=""),typeof this.options.beforeInputUpdate=="function"&&this.options.beforeInputUpdate(this);var X=this.utilities.getUpdatedInput(w,this.input[W],this.caretPosition,this.caretPositionEnd);if(this.utilities.isStandardButton(w)&&this.activeInputElement&&this.input[W]&&this.input[W]===X&&this.caretPosition===0&&this.caretPositionEnd===X.length)return this.setInput("",this.options.inputName,!0),this.setCaretPosition(0),this.activeInputElement.value="",this.activeInputElement.setSelectionRange(0,0),void this.handleButtonClicked(w,_);if(typeof this.options.onKeyPress=="function"&&this.options.onKeyPress(w,_),this.input[W]!==X&&(!this.options.inputPattern||this.options.inputPattern&&this.inputPatternIsValid(X))){if(this.options.maxLength&&this.utilities.handleMaxLength(this.input,X))return;var F=this.utilities.getUpdatedInput(w,this.input[W],this.caretPosition,this.caretPositionEnd,!0);if(this.setInput(F,this.options.inputName,!0),G&&console.log("Input changed:",this.getAllInputs()),this.options.debug&&console.log("Caret at: ",this.getCaretPosition(),this.getCaretPositionEnd(),"(".concat(this.keyboardDOMClass,")"),_==null?void 0:_.type),this.options.syncInstanceInputs&&this.syncInstanceInputs(),typeof this.options.onChange=="function"&&this.options.onChange(this.getInput(this.options.inputName,!0),_),typeof this.options.onChangeAll=="function"&&this.options.onChangeAll(this.getAllInputs(),_),_!=null&&_.target&&this.options.enableLayoutCandidates){var ce,fe=this.getInputCandidates(X),re=fe.candidateKey,oe=fe.candidateValue;re&&oe?this.showCandidatesBox(re,oe,this.keyboardDOM):(ce=this.candidateBox)===null||ce===void 0||ce.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)),G&&console.log("Key pressed:",w)}}},{key:"getMouseHold",value:function(){return this.isMouseHold}},{key:"setMouseHold",value:function(w){this.options.syncInstanceInputs?this.dispatch(function(_){_.isMouseHold=w}):this.isMouseHold=w}},{key:"handleButtonMouseDown",value:function(w,_){var N=this;_&&(this.options.preventMouseDownDefault&&_.preventDefault(),this.options.stopMouseDownPropagation&&_.stopPropagation(),_.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(){(N.getMouseHold()&&(!w.includes("{")&&!w.includes("}")||w==="{delete}"||w==="{backspace}"||w==="{bksp}"||w==="{space}"||w==="{tab}")||w==="{arrowright}"||w==="{arrowleft}"||w==="{arrowup}"||w==="{arrowdown}")&&(N.options.debug&&console.log("Button held:",w),N.handleButtonHold(w)),clearTimeout(N.holdTimeout)},500))}},{key:"handleButtonMouseUp",value:function(w,_){var N=this;_&&(this.options.preventMouseUpDefault&&_.preventDefault&&_.preventDefault(),this.options.stopMouseUpPropagation&&_.stopPropagation&&_.stopPropagation(),!(_.target===this.keyboardDOM||_.target&&this.keyboardDOM.contains(_.target)||this.candidateBox&&this.candidateBox.candidateBoxElement&&(_.target===this.candidateBox.candidateBoxElement||_.target&&this.candidateBox.candidateBoxElement.contains(_.target)))&&this.candidateBox&&this.candidateBox.destroy()),this.recurseButtons(function(R){R.classList.remove(N.activeButtonClass)}),this.setMouseHold(!1),this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),w&&typeof this.options.onKeyReleased=="function"&&this.options.onKeyReleased(w,_)}},{key:"handleKeyboardContainerMouseDown",value:function(w){this.options.preventMouseDownDefault&&w.preventDefault()}},{key:"handleButtonHold",value:function(w){var _=this;this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),this.holdInteractionTimeout=window.setTimeout(function(){_.getMouseHold()?(_.handleButtonClicked(w),_.handleButtonHold(w)):clearTimeout(_.holdInteractionTimeout)},100)}},{key:"syncInstanceInputs",value:function(){var w=this;this.dispatch(function(_){_.replaceInput(w.input),_.setCaretPosition(w.caretPosition,w.caretPositionEnd)})}},{key:"clearInput",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.inputName||this.defaultName;this.input[w]="",this.setCaretPosition(0),this.options.syncInstanceInputs&&this.syncInstanceInputs()}},{key:"getInput",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.inputName||this.defaultName,_=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return this.options.syncInstanceInputs&&!_&&this.syncInstanceInputs(),this.options.rtl?"‫"+this.input[w].replace("‫","").replace("‬","")+"‬":this.input[w]}},{key:"getAllInputs",value:function(){var w=this,_={};return Object.keys(this.input).forEach(function(N){_[N]=w.getInput(N,!0)}),_}},{key:"setInput",value:function(w){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.inputName||this.defaultName,N=arguments.length>2?arguments[2]:void 0;this.input[_]=w,!N&&this.options.syncInstanceInputs&&this.syncInstanceInputs()}},{key:"replaceInput",value:function(w){this.input=w}},{key:"setOptions",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},_=this.changedOptions(w);this.options=Object.assign(this.options,w),_.length&&(this.options.debug&&console.log("changedOptions",_),this.onSetOptions(_),this.render())}},{key:"changedOptions",value:function(w){var _=this;return Object.keys(w).filter(function(N){return JSON.stringify(w[N])!==JSON.stringify(_.options[N])})}},{key:"onSetOptions",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];w.includes("layoutName")&&this.candidateBox&&this.candidateBox.destroy(),(w.includes("layoutCandidatesPageSize")||w.includes("layoutCandidates"))&&this.candidateBox&&(this.candidateBox.destroy(),this.candidateBox=new P({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(w){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(_){w(window.SimpleKeyboardInstances[_],_)})}},{key:"addButtonTheme",value:function(w,_){var N=this;_&&w&&(w.split(" ").forEach(function(R){_.split(" ").forEach(function(W){N.options.buttonTheme||(N.options.buttonTheme=[]);var G=!1;N.options.buttonTheme.map(function(X){if(X!=null&&X.class.split(" ").includes(W)){G=!0;var F=X.buttons.split(" ");F.includes(R)||(G=!0,F.push(R),X.buttons=F.join(" "))}return X}),G||N.options.buttonTheme.push({class:W,buttons:w})})}),this.render())}},{key:"removeButtonTheme",value:function(w,_){var N=this;if(!w&&!_)return this.options.buttonTheme=[],void this.render();w&&Array.isArray(this.options.buttonTheme)&&this.options.buttonTheme.length&&(w.split(" ").forEach(function(R){var W;(W=N.options)===null||W===void 0||(W=W.buttonTheme)===null||W===void 0||W.map(function(G,X){if(G&&_&&_.includes(G.class)||!_){var F,ce,fe=(F=G)===null||F===void 0?void 0:F.buttons.split(" ").filter(function(re){return re!==R});G&&fe!=null&&fe.length?G.buttons=fe.join(" "):((ce=N.options.buttonTheme)===null||ce===void 0||ce.splice(X,1),G=null)}return G})}),this.render())}},{key:"getButtonElement",value:function(w){var _,N=this.buttonElements[w];return N&&(_=N.length>1?N:N[0]),_}},{key:"inputPatternIsValid",value:function(w){var _,N=this.options.inputPattern;if((_=N instanceof RegExp?N:N[this.options.inputName||this.defaultName])&&w){var R=_.test(w);return this.options.debug&&console.log('inputPattern ("'.concat(_,'"): ').concat(R?"passed":"did not pass!")),R}return!0}},{key:"setEventListeners",value:function(){if(this.isFirstKeyboardInstance||!this.allKeyboardInstances){this.options.debug&&console.log("Caret handling started (".concat(this.keyboardDOMClass,")"));var w=this.options.physicalKeyboardHighlightPreventDefault,_=w!==void 0&&w;document.addEventListener("keyup",this.handleKeyUp,_),document.addEventListener("keydown",this.handleKeyDown,_),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("touchend",this.handleTouchEnd),document.addEventListener("selectionchange",this.handleSelectionChange),document.addEventListener("select",this.handleSelect)}}},{key:"handleKeyUp",value:function(w){this.caretEventHandler(w),this.options.physicalKeyboardHighlight&&this.physicalKeyboard.handleHighlightKeyUp(w)}},{key:"handleKeyDown",value:function(w){this.options.physicalKeyboardHighlight&&this.physicalKeyboard.handleHighlightKeyDown(w)}},{key:"handleMouseUp",value:function(w){this.caretEventHandler(w)}},{key:"handleTouchEnd",value:function(w){this.caretEventHandler(w)}},{key:"handleSelect",value:function(w){this.caretEventHandler(w)}},{key:"handleSelectionChange",value:function(w){navigator.userAgent.includes("Firefox")||this.caretEventHandler(w)}},{key:"caretEventHandler",value:function(w){var _,N=this;w.target.tagName&&(_=w.target.tagName.toLowerCase()),this.dispatch(function(R){var W=w.target===R.keyboardDOM||w.target&&R.keyboardDOM.contains(w.target);if(N.options.syncInstanceInputs&&Array.isArray(w.path)&&(W=w.path.some(function(F){var ce;return F==null||(ce=F.hasAttribute)===null||ce===void 0?void 0:ce.call(F,"data-skInstance")})),(_==="textarea"||_==="input"&&["text","search","url","tel","password"].includes(w.target.type))&&!R.options.disableCaretPositioning){var G=w.target.selectionStart,X=w.target.selectionEnd;R.options.rtl&&(G=R.utilities.getRtlOffset(G,R.getInput()),X=R.utilities.getRtlOffset(X,R.getInput())),R.setCaretPosition(G,X),N.activeInputElement=w.target,R.options.debug&&console.log("Caret at: ",R.getCaretPosition(),R.getCaretPositionEnd(),w&&w.target.tagName.toLowerCase(),"(".concat(R.keyboardDOMClass,")"),w==null?void 0:w.type)}else!R.options.disableCaretPositioning&&W||(w==null?void 0:w.type)==="selectionchange"||(R.setCaretPosition(null),N.activeInputElement=null,R.options.debug&&console.log('Caret position reset due to "'.concat(w==null?void 0:w.type,'" event'),w))})}},{key:"recurseButtons",value:function(w){var _=this;w&&Object.keys(this.buttonElements).forEach(function(N){return _.buttonElements[N].forEach(w)})}},{key:"destroy",value:function(){this.options.debug&&console.log("Destroying simple-keyboard instance: ".concat(this.currentInstanceName));var w=this.options.physicalKeyboardHighlightPreventDefault,_=w!==void 0&&w;document.removeEventListener("keyup",this.handleKeyUp,_),document.removeEventListener("keydown",this.handleKeyDown,_),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(N){N&&(N.onpointerdown=null,N.onpointerup=null,N.onpointercancel=null,N.ontouchstart=null,N.ontouchend=null,N.ontouchcancel=null,N.onclick=null,N.onmousedown=null,N.onmouseup=null,N.remove(),N=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(w){var _=this.options.buttonTheme,N=[];return Array.isArray(_)&&_.forEach(function(R){if(R&&R.class&&typeof R.class=="string"&&R.buttons&&typeof R.buttons=="string"){var W=R.class.split(" ");R.buttons.split(" ").includes(w)&&(N=[].concat(L(N),L(W)))}else console.warn('Incorrect "buttonTheme". Please check the documentation.',R)}),N}},{key:"setDOMButtonAttributes",value:function(w,_){var N=this.options.buttonAttributes;Array.isArray(N)&&N.forEach(function(R){R.attribute&&typeof R.attribute=="string"&&R.value&&typeof R.value=="string"&&R.buttons&&typeof R.buttons=="string"?R.buttons.split(" ").includes(w)&&_(R.attribute,R.value):console.warn('Incorrect "buttonAttributes". Please check the documentation.',R)})}},{key:"onTouchDeviceDetected",value:function(){this.processAutoTouchEvents(),this.disableContextualWindow()}},{key:"disableContextualWindow",value:function(){window.oncontextmenu=function(w){if(w.target.classList.contains("hg-button"))return w.preventDefault(),w.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 w=this;Array.isArray(this.options.modules)&&(this.options.modules.forEach(function(_){var N=new _(w);N.init&&N.init(w)}),this.keyboardPluginClasses="modules-loaded",this.render(),this.onModulesLoaded())}},{key:"getModuleProp",value:function(w,_){return!!this.modules[w]&&this.modules[w][_]}},{key:"getModulesList",value:function(){return Object.keys(this.modules)}},{key:"parseRowDOMContainers",value:function(w,_,N,R){var W=this,G=Array.from(w.children),X=0;return G.length&&N.forEach(function(F,ce){var fe=R[ce];if(!(fe&&fe>F))return!1;var re=F-X,oe=fe-X,ge=document.createElement("div");ge.className+="hg-button-container";var ae="".concat(W.options.layoutName,"-r").concat(_,"c").concat(ce);ge.setAttribute("data-skUID",ae);var be=G.splice(re,oe-re+1);X=oe-re,be.forEach(function(Ce){return ge.appendChild(Ce)}),G.splice(re,0,ge),w.innerHTML="",G.forEach(function(Ce){return w.appendChild(Ce)}),W.options.debug&&console.log("rowDOMContainer",be,re,oe,X+1)}),w}},{key:"render",value:function(){var w=this;this.resetRows(),this.initialized||this.beforeFirstRender(),this.beforeRender();var _="hg-layout-".concat(this.options.layoutName),N=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}"]},R=this.options.useTouchEvents||!1,W=R?"hg-touch-events":"",G=this.options.useMouseEvents||!1,X=this.options.disableRowButtonContainers;this.keyboardDOM.className=this.getKeyboardClassString(this.options.theme,_,this.keyboardPluginClasses,W),this.keyboardDOM.setAttribute("data-skInstance",this.currentInstanceName),this.keyboardRowsDOM=document.createElement("div"),this.keyboardRowsDOM.className="hg-rows",N[this.options.layoutName||this.defaultName].forEach(function(F,ce){var fe=F.split(" ");w.options.excludeFromLayout&&w.options.excludeFromLayout[w.options.layoutName||w.defaultName]&&(fe=fe.filter(function(ae){return w.options.excludeFromLayout&&!w.options.excludeFromLayout[w.options.layoutName||w.defaultName].includes(ae)}));var re=document.createElement("div");re.className+="hg-row";var oe=[],ge=[];fe.forEach(function(ae,be){var Ce,Fe=!X&&typeof ae=="string"&&ae.length>1&&ae.indexOf("[")===0,Ae=!X&&typeof ae=="string"&&ae.length>1&&ae.indexOf("]")===ae.length-1;Fe&&(oe.push(be),ae=ae.replace(/\[/g,"")),Ae&&(ge.push(be),ae=ae.replace(/\]/g,""));var Ve=w.utilities.getButtonClass(ae),ze=w.utilities.getButtonDisplayName(ae,w.options.display,w.options.mergeDisplay),bt=w.options.useButtonTag?"button":"div",Ke=document.createElement(bt);Ke.className+="hg-button ".concat(Ve),(Ce=Ke.classList).add.apply(Ce,L(w.getButtonThemeClasses(ae))),w.setDOMButtonAttributes(ae,function(Ee,Lt){Ke.setAttribute(Ee,Lt)}),w.activeButtonClass="hg-activeButton",!w.utilities.pointerEventsSupported()||R||G?R?(Ke.ontouchstart=function(Ee){w.handleButtonClicked(ae,Ee),w.handleButtonMouseDown(ae,Ee)},Ke.ontouchend=function(Ee){w.handleButtonMouseUp(ae,Ee)},Ke.ontouchcancel=function(Ee){w.handleButtonMouseUp(ae,Ee)}):(Ke.onclick=function(Ee){w.setMouseHold(!1),typeof w.options.onKeyReleased!="function"&&w.handleButtonClicked(ae,Ee)},Ke.onmousedown=function(Ee){typeof w.options.onKeyReleased!="function"||w.isMouseHold||w.handleButtonClicked(ae,Ee),w.handleButtonMouseDown(ae,Ee)},Ke.onmouseup=function(Ee){w.handleButtonMouseUp(ae,Ee)}):(Ke.onpointerdown=function(Ee){w.handleButtonClicked(ae,Ee),w.handleButtonMouseDown(ae,Ee)},Ke.onpointerup=function(Ee){w.handleButtonMouseUp(ae,Ee)},Ke.onpointercancel=function(Ee){w.handleButtonMouseUp(ae,Ee)}),Ke.setAttribute("data-skBtn",ae);var et="".concat(w.options.layoutName,"-r").concat(ce,"b").concat(be);Ke.setAttribute("data-skBtnUID",et);var We=document.createElement("span");We.innerHTML=ze,Ke.appendChild(We),w.buttonElements[ae]||(w.buttonElements[ae]=[]),w.buttonElements[ae].push(Ke),re.appendChild(Ke)}),re=w.parseRowDOMContainers(re,ce,oe,ge),w.keyboardRowsDOM.appendChild(re)}),this.keyboardDOM.appendChild(this.keyboardRowsDOM),this.onRender(),this.initialized||(this.initialized=!0,!this.utilities.pointerEventsSupported()||R||G?R?(document.ontouchend=function(F){return w.handleButtonMouseUp(void 0,F)},document.ontouchcancel=function(F){return w.handleButtonMouseUp(void 0,F)},this.keyboardDOM.ontouchstart=function(F){return w.handleKeyboardContainerMouseDown(F)}):R||(document.onmouseup=function(F){return w.handleButtonMouseUp(void 0,F)},this.keyboardDOM.onmousedown=function(F){return w.handleKeyboardContainerMouseDown(F)}):(document.onpointerup=function(F){return w.handleButtonMouseUp(void 0,F)},this.keyboardDOM.onpointerdown=function(F){return w.handleKeyboardContainerMouseDown(F)}),this.onInit())}}],U&&Z(V.prototype,U),J&&Z(V,J),Object.defineProperty(V,"prototype",{writable:!1}),V;var V,U,J}(),me=ne,de=ne}(),x}()},442:function(u){u.exports=n}},o={};function a(u){var h=o[u];if(h!==void 0)return h.exports;var g=o[u]={exports:{}};return r[u].call(g.exports,g,g.exports,a),g.exports}a.n=function(u){var h=u&&u.__esModule?function(){return u.default}:function(){return u};return a.d(h,{a:h}),h},a.d=function(u,h){for(var g in h)a.o(h,g)&&!a.o(u,g)&&Object.defineProperty(u,g,{enumerable:!0,get:h[g]})},a.o=function(u,h){return Object.prototype.hasOwnProperty.call(u,h)},a.r=function(u){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})};var s={};return function(){a.r(s),a.d(s,{KeyboardReact:function(){return c},default:function(){return p}}),a(981);var u=a(442),h=a(548),g=a.n(h);function f(d){return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},f(d)}function x(d,m){var v=Object.keys(d);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(d);m&&(b=b.filter(function(C){return Object.getOwnPropertyDescriptor(d,C).enumerable})),v.push.apply(v,b)}return v}function l(d){for(var m=1;m<arguments.length;m++){var v=arguments[m]!=null?arguments[m]:{};m%2?x(Object(v),!0).forEach(function(b){y(d,b,v[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(v)):x(Object(v)).forEach(function(b){Object.defineProperty(d,b,Object.getOwnPropertyDescriptor(v,b))})}return d}function y(d,m,v){var b;return b=function(C,S){if(f(C)!="object"||!C)return C;var k=C[Symbol.toPrimitive];if(k!==void 0){var B=k.call(C,S||"default");if(f(B)!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return(S==="string"?String:Number)(C)}(m,"string"),(m=f(b)=="symbol"?b:b+"")in d?Object.defineProperty(d,m,{value:v,enumerable:!0,configurable:!0,writable:!0}):d[m]=v,d}var i=function(d){return l(l({},d),{},{keyboardRef:null})},c=function(d){var m=d.baseClass||"react-simple-keyboard",v=u.useRef(null),b=u.useRef(null),C=u.useRef(null),S=u.useRef(d);return u.useEffect(function(){return function(){C.current&&C.current.destroy(),v.current=!1}},[]),u.useEffect(function(){var k=function(D){return l(l({},D),{},{theme:"simple-keyboard ".concat(D.theme||"hg-theme-default")})}(d);if(!v.current){v.current=!0,k.debug&&console.log("ReactSimpleKeyboard: Init");var B=b.current,O=".".concat(m);C.current=new(g())(B||O,k),k.keyboardRef&&k.keyboardRef(C.current)}var j=function(D,M){var $=i(M),P=i(D);return Object.keys($).filter(function(L){return $[L]!==P[L]})}(S.current,k);if(j.length){var I=C.current;S.current=k,I==null||I.setOptions(k),k.debug&&console.log("ReactSimpleKeyboard - setOptions called due to updated props:",j)}},[v,m,S,d]),u.createElement("div",{className:m,ref:b})},p=c}(),s}()})})(bl);var Jh=bl.exports;const Yh=Xo(Jh);function wl({onChange:e,keyboardRef:t,layout:n,theme:r}){const[o,a]=H.useState("default"),s=u=>{(u==="{shift}"||u==="{lock}")&&a(o==="default"?"shift":"default")};return E.jsx(Yh,{keyboardRef:u=>t.current=u,layoutName:o,layout:n,theme:r,onChange:e,onKeyPress:s,preventMouseDownDefault:!0})}function Qh(){return{subscribe:(r,o)=>{document.addEventListener(r,o)},unsubscribe:(r,o)=>{document.removeEventListener(r,o)},publish:(r,o)=>{const a=new CustomEvent(r,{detail:o});document.dispatchEvent(a)}}}function xl(){const{subscribe:e,unsubscribe:t,publish:n}=Qh();return{initialize:(u,h)=>{e("openKeyboard",u),e("closeKeyboard",h)},terminate:(u,h)=>{t("openKeyboard",u),t("closeKeyboard",h)},open:u=>{n("openKeyboard",{inputId:u.target.id,inputValue:u.target.value})},close:()=>{n("closeKeyboard")}}}function kl(){const[e,t]=H.useState(!1),n=H.useRef(null),r=H.useRef(null),{session:o}=Ct(),{initialize:a,terminate:s}=xl(),u=x=>{var l,y;r.current=document.getElementById(x.detail.inputId),(l=n.current)==null||l.setInput(x.detail.inputValue),(y=r.current)==null||y.addEventListener("input",i=>{var p;const c=i.target;(p=n.current)==null||p.setInput(c==null?void 0:c.value)}),t(!0)},h=()=>t(!1);H.useEffect(()=>(a(u,h),()=>{s(u,h)}),[a,s,e]);const g=x=>{var l,y;if(r&&r.current){f(r.current,x);const i=(l=n.current)==null?void 0:l.getCaretPosition();i&&((y=r.current)==null||y.setSelectionRange(i,i))}},f=(x,l)=>{var c;const y=(c=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:c.set;y==null||y.call(x,l);const i=new Event("input",{bubbles:!0});x.dispatchEvent(i)};return!o||!+(o.input_data.enable_on_screen_keyboard??!1)?E.jsx(E.Fragment,{}):E.jsx("div",{className:`mobile:hidden absolute bottom-2 left-2 right-2 z-50 mx-auto max-w-[1200px] ${!e&&"hidden"}`,children:E.jsx(wl,{keyboardRef:n,onChange:g})})}function Fi({value:e,valueSetter:t}){const n=H.useRef(null),r=o=>{const a=o?(parseFloat(o)/100).toFixed(2):"";t(a)};return E.jsxs("div",{children:[E.jsx("input",{type:"number",readOnly:!0,className:"mb-4 h-full w-full rounded border-gray-200 p-4 text-center text-4xl text-gray-500 focus:ring-0 focus:ring-offset-0",value:e,placeholder:"0,00",onChange:o=>r(o.target.value)}),E.jsx(wl,{keyboardRef:n,layout:{default:["1 2 3","4 5 6","7 8 9","00 0 {bksp}"]},theme:"hg-theme-default hg-layout-numeric numeric-theme",onChange:r})]})}function Dn(e){const{open:t,close:n}=xl(),r=a=>{t(a)},o=()=>{n()};return E.jsxs("div",{className:"relative",onFocus:r,onBlur:o,children:[E.jsx("input",{...e,type:e.type==="date_time"?"datetime-local":e.type==="birth_date"?"date":e.type,placeholder:" ",className:"peer m-0 block max-h-[58px] w-full rounded border border-solid border-gray-300 bg-white bg-clip-padding px-3 py-4 text-base font-normal leading-tight text-gray-700 transition duration-200 ease-linear placeholder:text-transparent focus:border-2 focus:border-primary-600 focus:pb-[0.625rem] focus:pt-[1.625rem] focus:text-neutral-700 focus:outline-none peer-focus:text-primary-600 [&:not(:placeholder-shown)]:pb-[0.625rem] [&:not(:placeholder-shown)]:pt-[1.625rem]",onChange:a=>e.onChange&&e.onChange(a.target.name,a.target.value)}),E.jsx("label",{htmlFor:`${e.label}-id`,className:"pointer-events-none absolute left-0 top-0 w-max origin-[0_0] whitespace-nowrap border border-solid border-transparent px-3 py-4 text-gray-500 transition-[opacity,_transform] duration-200 ease-linear peer-focus:-translate-y-2 peer-focus:translate-x-[0.15rem] peer-focus:scale-[0.85] peer-focus:text-primary-600 peer-[:not(:placeholder-shown)]:-translate-y-2 peer-[:not(:placeholder-shown)]:translate-x-[0.15rem] peer-[:not(:placeholder-shown)]:scale-[0.85] motion-reduce:transition-none",children:e.label})]})}function Zh(e){const t=H.useRef(null),[n,r]=H.useState(!1),[o,a]=H.useState(""),[s,u]=H.useState(e.defaultValue.split(";")),{name:h,onChange:g}=e;return H.useEffect(()=>{function f(x){t.current&&!t.current.contains(x.target)&&r(!1)}return document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f)}},[]),H.useEffect(()=>{g&&g(h,s.join(";"))},[s]),E.jsxs("div",{ref:t,className:"relative w-full",children:[E.jsx("div",{onClick:()=>r(!n),className:`flex h-[54px] w-full cursor-pointer gap-2 truncate rounded border bg-white p-3 leading-[2.75rem] text-gray-700 ${n?"border-2 border-blue-600":"border-gray-300"}`,children:s.sort().reduce((f,x)=>f+=x+(x===s[s.length-1]?"":", "),"")}),E.jsx("div",{className:`pointer-events-none absolute left-0 top-0 origin-[0_0] border border-solid border-transparent px-3 py-4 transition-[opacity,_transform] duration-200 ease-linear motion-reduce:transition-none ${n?"-translate-y-2 translate-x-[0.15rem] scale-[0.85] text-blue-600":"text-gray-500"} ${s.length&&"-translate-y-2 translate-x-[0.15rem] scale-[0.85]"}`,children:e.label}),n&&E.jsxs("div",{className:"absolute z-20 mt-2 flex w-full flex-col gap-3 rounded bg-white p-3 shadow-md",children:[E.jsx("input",{placeholder:"Search",className:"rounded border border-solid border-gray-300 bg-transparent p-3 outline-none",type:"text",onChange:f=>a(f.target.value)}),E.jsx("hr",{}),!e.options.filter(f=>f.label.toLowerCase().includes(o.toLowerCase())).length&&E.jsx("p",{className:"text-center text-sm font-normal text-neutral-400",children:"No results found"}),e.options.map(f=>{if(!(o&&!f.label.toLowerCase().includes(o.toLowerCase())))return E.jsxs("div",{className:"flex items-center",children:[E.jsx("input",{id:f.value,type:"checkbox",value:f.value,checked:s.includes(f.value),readOnly:!0,className:"h-4 w-4 rounded border-gray-300 bg-gray-100 text-blue-600 focus:ring-blue-500",onClick:x=>{x.target.checked?u([...s,x.target.value]):u(s.filter(l=>l!==x.target.value))}}),E.jsx("label",{htmlFor:f.value,className:"text-md ml-2 flex-grow font-normal text-gray-700",children:f.label})]},f.value)})]})]})}function ep(e){return E.jsxs("div",{className:"relative",children:[E.jsx("select",{...e,id:e.id,className:"peer m-0 block max-h-[58px] w-full rounded border border-solid border-gray-300 bg-white bg-clip-padding px-2 py-4 text-base font-normal leading-tight text-gray-700 transition duration-200 ease-linear placeholder:text-transparent focus:border-2 focus:border-primary-600 focus:pb-[0.625rem] focus:pt-[1.625rem] focus:text-neutral-700 focus:outline-none peer-focus:text-primary-600 [&:not(:placeholder-shown)]:pb-[0.625rem] [&:not(:placeholder-shown)]:pt-[1.625rem]",onChange:t=>e.onChange&&e.onChange(t.target.name,t.target.value),children:e.options.map(t=>E.jsx("option",{value:t.value,children:t.label},t.value))}),E.jsx("label",{htmlFor:`${e.label}-id`,className:"pointer-events-none absolute left-0 top-0 w-max origin-[0_0] whitespace-nowrap border border-solid border-transparent px-3 py-4 text-gray-500 transition-[opacity,_transform] duration-200 ease-linear peer-focus:-translate-y-2 peer-focus:translate-x-[0.15rem] peer-focus:scale-[0.85] peer-focus:text-primary-600 peer-[:not(:placeholder-shown)]:-translate-y-2 peer-[:not(:placeholder-shown)]:translate-x-[0.15rem] peer-[:not(:placeholder-shown)]:scale-[0.85] motion-reduce:transition-none",children:e.label})]})}function _t({children:e}){return E.jsx("div",{className:"h-full w-full rounded-lg border border-gray-200 bg-white p-4 shadow sm:p-6 md:p-8",children:e})}function Cl({children:e}){return E.jsxs(_t,{children:[E.jsx("div",{className:"flex items-center justify-center",children:E.jsxs("svg",{className:"stroke h-36 w-36 animate-[scale_.3s_ease-in-out_.9s_both] fill-none stroke-green-600 stroke-2 shadow-[inset_0px_0px_0px_#7ac142]",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 52 52",children:[E.jsx("circle",{className:"animate-[stroke_.6s_linear_forwards] fill-none stroke-green-600 stroke-2",style:{strokeDasharray:166,strokeDashoffset:166},cx:"26",cy:"26",r:"25",fill:"none"}),E.jsx("path",{className:"origin-[50%_50%] animate-[stroke_.3s_linear_.8s_forwards]",style:{strokeDasharray:48,strokeDashoffset:48},fill:"none",d:"M14.1 27.2l7.1 7.2 16.7-16.8"})]})}),e]})}const tp="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4.7002%204.70016L11.2999%2011.2998'%20stroke='%23000'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.2998%204.70016L4.70014%2011.2998'%20stroke='%23000'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";function Mn({title:e,isOpen:t,onClose:n,children:r}){const[o,a]=H.useState(t),s=H.useRef(null);H.useEffect(()=>{a(t)},[t]),H.useEffect(()=>{const g=s.current;g&&(o?g.show():g.close())},[o]);const u=()=>{n&&n(),a(!1)},h=g=>{g.key==="Escape"&&u()};return E.jsx("div",{className:`fixed inset-0 z-40 min-h-screen items-center bg-gray-500 bg-opacity-25 ${o?"flex":"hidden"}`,children:E.jsxs("dialog",{ref:s,onKeyDown:h,className:"scrollbar-hide absolute overflow-auto rounded-lg drop-shadow-md",children:[E.jsxs("div",{className:"flex w-full justify-between bg-gray-50 p-4",children:[E.jsx("p",{className:"truncate text-lg",children:e}),E.jsx("img",{src:tp,alt:"closeButton",className:"h-[25px] w-[25px] cursor-pointer opacity-50 hover:opacity-90",onClick:u})]}),E.jsx("div",{className:"p-6",children:r})]})})}function np(){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 El={};function Ui(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];typeof t[0]=="string"&&El[t[0]]||(typeof t[0]=="string"&&(El[t[0]]=new Date),np(...t))}const Sl=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}};function Pl(e,t,n){e.loadNamespaces(t,Sl(e,n))}function Bl(e,t,n,r){typeof n=="string"&&(n=[n]),n.forEach(o=>{e.options.ns.indexOf(o)<0&&e.options.ns.push(o)}),e.loadLanguages(t,Sl(e,r))}function rp(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=t.languages[0],o=t.options?t.options.fallbackLng:!1,a=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(u,h)=>{const g=t.services.backendConnector.state[`${u}|${h}`];return g===-1||g===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!s(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||s(r,e)&&(!o||s(a,e)))}function op(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!t.languages||!t.languages.length?(Ui("i18n.languages were undefined or empty",t.languages),!0):t.options.ignoreJSONStructure!==void 0?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(o,a)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!a(o.isLanguageChangingTo,e))return!1}}):rp(e,t,n)}const ip=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,ap={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},sp=e=>ap[e];let $i={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(ip,sp)};function lp(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};$i={...$i,...e}}function cp(){return $i}let Ol;function up(e){Ol=e}function dp(){return Ol}const fp={type:"3rdParty",init(e){lp(e.options.react),up(e)}},hp=H.createContext();class pp{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const mp=(e,t)=>{const n=H.useRef();return H.useEffect(()=>{n.current=e},[e,t]),n.current};function _l(e,t,n,r){return e.getFixedT(t,n,r)}function gp(e,t,n,r){return H.useCallback(_l(e,t,n,r),[e,t,n,r])}function Ye(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=t,{i18n:r,defaultNS:o}=H.useContext(hp)||{},a=n||r||dp();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new pp),!a){Ui("You will need to pass in an i18next instance by using initReactI18next");const b=(S,k)=>typeof k=="string"?k:k&&typeof k=="object"&&typeof k.defaultValue=="string"?k.defaultValue:Array.isArray(S)?S[S.length-1]:S,C=[b,{},!1];return C.t=b,C.i18n={},C.ready=!1,C}a.options.react&&a.options.react.wait!==void 0&&Ui("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const s={...cp(),...a.options.react,...t},{useSuspense:u,keyPrefix:h}=s;let g=o||a.options&&a.options.defaultNS;g=typeof g=="string"?[g]:g||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(g);const f=(a.isInitialized||a.initializedStoreOnce)&&g.every(b=>op(b,a,s)),x=gp(a,t.lng||null,s.nsMode==="fallback"?g:g[0],h),l=()=>x,y=()=>_l(a,t.lng||null,s.nsMode==="fallback"?g:g[0],h),[i,c]=H.useState(l);let p=g.join();t.lng&&(p=`${t.lng}${p}`);const d=mp(p),m=H.useRef(!0);H.useEffect(()=>{const{bindI18n:b,bindI18nStore:C}=s;m.current=!0,!f&&!u&&(t.lng?Bl(a,t.lng,g,()=>{m.current&&c(y)}):Pl(a,g,()=>{m.current&&c(y)})),f&&d&&d!==p&&m.current&&c(y);function S(){m.current&&c(y)}return b&&a&&a.on(b,S),C&&a&&a.store.on(C,S),()=>{m.current=!1,b&&a&&b.split(" ").forEach(k=>a.off(k,S)),C&&a&&C.split(" ").forEach(k=>a.store.off(k,S))}},[a,p]),H.useEffect(()=>{m.current&&f&&c(l)},[a,h,f]);const v=[i,a,f];if(v.t=i,v.i18n=a,v.ready=f,f||!f&&!u)return v;throw new Promise(b=>{t.lng?Bl(a,t.lng,g,()=>b()):Pl(a,g,()=>b())})}function Vi({callback:e}){const{t}=Ye(),[n,r]=H.useState(""),[o,a]=H.useState(!1),[s,u]=H.useState(!1),{session:h,mutate:g}=Ct(),f=h==null?void 0:h.input_data.scanner_type,[x,l]=H.useState(""),y=H.useCallback(()=>{h&&(a(!0),vo.setContact(h.uuid,{contact_identifier_value:n}).then(()=>{g().then(()=>{De.success(t("contactSavedToSession")),e&&e()})}).catch(()=>u(!0)).finally(()=>a(!1)))},[e,n,g,h,t]),i=()=>{a(!0),dl.linkIdentifier(n,x).then(y).finally(()=>a(!1))};return H.useEffect(()=>{f===Mt.CAMERA&&n&&!o&&y()},[n,o,f,h,y]),E.jsxs(E.Fragment,{children:[E.jsx(wo,{dataSetter:r,type:f,label:t("contactIdentifier")}),f===Mt.HAND_SCANNER&&E.jsx("div",{className:"pt-3",children:E.jsx(Je,{type:"submit",label:t("submit"),onClick:y,disabled:o})}),E.jsx(Mn,{isOpen:s,title:t("linkContact"),onClose:()=>u(!1),children:E.jsxs("div",{className:"min-w-[600px] flex flex-col gap-3",children:[E.jsx("p",{children:t("fillInXBelow",{x:t("emailAddress").toLowerCase()})}),E.jsx(Dn,{autoFocus:!0,id:"email-input",name:"email",label:t("emailAddress"),type:"email",onChange:(c,p)=>l(p)}),E.jsx("div",{children:E.jsx(Je,{type:"submit",label:t("linkContact"),onClick:i,disabled:o})})]})})]})}function wo({dataSetter:e,type:t=Mt.CAMERA,label:n=""}){const{t:r}=Ye(),o=a=>{e(a.data)};return t===Mt.HAND_SCANNER?E.jsxs("div",{className:"flex flex-col gap-3",children:[E.jsx("p",{children:r("fillInXBelow",{x:n.toLowerCase()})}),E.jsx(Dn,{id:`${n}-input`,name:n,label:n,type:"text",onChange:(a,s)=>e(s),autoFocus:!0})]}):E.jsx(yp,{label:n,onDecode:o})}class Le{constructor(t,n,r,o,a){this._legacyCanvasSize=Le.DEFAULT_CANVAS_SIZE,this._preferredCamera="environment",this._maxScansPerSecond=25,this._lastScanTimestamp=-1,this._destroyed=this._flashOn=this._paused=this._active=!1,this.$video=t,this.$canvas=document.createElement("canvas"),r&&typeof r=="object"?this._onDecode=n:(console.warn(r||o||a?"You're using a deprecated version of the QrScanner constructor which will be removed in the future":"Note that the type of the scan result passed to onDecode will change in the future. To already switch to the new api today, you can pass returnDetailedScanResult: true."),this._legacyOnDecode=n),n=typeof r=="object"?r:{},this._onDecodeError=n.onDecodeError||(typeof r=="function"?r:this._onDecodeError),this._calculateScanRegion=n.calculateScanRegion||(typeof o=="function"?o:this._calculateScanRegion),this._preferredCamera=n.preferredCamera||a||this._preferredCamera,this._legacyCanvasSize=typeof r=="number"?r:typeof o=="number"?o:this._legacyCanvasSize,this._maxScansPerSecond=n.maxScansPerSecond||this._maxScansPerSecond,this._onPlay=this._onPlay.bind(this),this._onLoadedMetaData=this._onLoadedMetaData.bind(this),this._onVisibilityChange=this._onVisibilityChange.bind(this),this._updateOverlay=this._updateOverlay.bind(this),t.disablePictureInPicture=!0,t.playsInline=!0,t.muted=!0;let s=!1;if(t.hidden&&(t.hidden=!1,s=!0),document.body.contains(t)||(document.body.appendChild(t),s=!0),r=t.parentElement,n.highlightScanRegion||n.highlightCodeOutline){if(o=!!n.overlay,this.$overlay=n.overlay||document.createElement("div"),a=this.$overlay.style,a.position="absolute",a.display="none",a.pointerEvents="none",this.$overlay.classList.add("scan-region-highlight"),!o&&n.highlightScanRegion){this.$overlay.innerHTML='<svg class="scan-region-highlight-svg" viewBox="0 0 238 238" preserveAspectRatio="none" style="position:absolute;width:100%;height:100%;left:0;top:0;fill:none;stroke:#e9b213;stroke-width:4;stroke-linecap:round;stroke-linejoin:round"><path d="M31 2H10a8 8 0 0 0-8 8v21M207 2h21a8 8 0 0 1 8 8v21m0 176v21a8 8 0 0 1-8 8h-21m-176 0H10a8 8 0 0 1-8-8v-21"/></svg>';try{this.$overlay.firstElementChild.animate({transform:["scale(.98)","scale(1.01)"]},{duration:400,iterations:1/0,direction:"alternate",easing:"ease-in-out"})}catch{}r.insertBefore(this.$overlay,this.$video.nextSibling)}n.highlightCodeOutline&&(this.$overlay.insertAdjacentHTML("beforeend",'<svg class="code-outline-highlight" preserveAspectRatio="none" style="display:none;width:100%;height:100%;fill:none;stroke:#e9b213;stroke-width:5;stroke-dasharray:25;stroke-linecap:round;stroke-linejoin:round"><polygon/></svg>'),this.$codeOutlineHighlight=this.$overlay.lastElementChild)}this._scanRegion=this._calculateScanRegion(t),requestAnimationFrame(()=>{let u=window.getComputedStyle(t);u.display==="none"&&(t.style.setProperty("display","block","important"),s=!0),u.visibility!=="visible"&&(t.style.setProperty("visibility","visible","important"),s=!0),s&&(console.warn("QrScanner has overwritten the video hiding style to avoid Safari stopping the playback."),t.style.opacity="0",t.style.width="0",t.style.height="0",this.$overlay&&this.$overlay.parentElement&&this.$overlay.parentElement.removeChild(this.$overlay),delete this.$overlay,delete this.$codeOutlineHighlight),this.$overlay&&this._updateOverlay()}),t.addEventListener("play",this._onPlay),t.addEventListener("loadedmetadata",this._onLoadedMetaData),document.addEventListener("visibilitychange",this._onVisibilityChange),window.addEventListener("resize",this._updateOverlay),this._qrEnginePromise=Le.createQrEngine()}static set WORKER_PATH(t){console.warn("Setting QrScanner.WORKER_PATH is not required and not supported anymore. Have a look at the README for new setup instructions.")}static async hasCamera(){try{return!!(await Le.listCameras(!1)).length}catch{return!1}}static async listCameras(t=!1){if(!navigator.mediaDevices)return[];let n=async()=>(await navigator.mediaDevices.enumerateDevices()).filter(o=>o.kind==="videoinput"),r;try{t&&(await n()).every(o=>!o.label)&&(r=await navigator.mediaDevices.getUserMedia({audio:!1,video:!0}))}catch{}try{return(await n()).map((o,a)=>({id:o.deviceId,label:o.label||(a===0?"Default Camera":`Camera ${a+1}`)}))}finally{r&&(console.warn("Call listCameras after successfully starting a QR scanner to avoid creating a temporary video stream"),Le._stopVideoStream(r))}}async hasFlash(){let t;try{if(this.$video.srcObject){if(!(this.$video.srcObject instanceof MediaStream))return!1;t=this.$video.srcObject}else t=(await this._getCameraStream()).stream;return"torch"in t.getVideoTracks()[0].getSettings()}catch{return!1}finally{t&&t!==this.$video.srcObject&&(console.warn("Call hasFlash after successfully starting the scanner to avoid creating a temporary video stream"),Le._stopVideoStream(t))}}isFlashOn(){return this._flashOn}async toggleFlash(){this._flashOn?await this.turnFlashOff():await this.turnFlashOn()}async turnFlashOn(){if(!this._flashOn&&!this._destroyed&&(this._flashOn=!0,this._active&&!this._paused))try{if(!await this.hasFlash())throw"No flash available";await this.$video.srcObject.getVideoTracks()[0].applyConstraints({advanced:[{torch:!0}]})}catch(t){throw this._flashOn=!1,t}}async turnFlashOff(){this._flashOn&&(this._flashOn=!1,await this._restartVideoStream())}destroy(){this.$video.removeEventListener("loadedmetadata",this._onLoadedMetaData),this.$video.removeEventListener("play",this._onPlay),document.removeEventListener("visibilitychange",this._onVisibilityChange),window.removeEventListener("resize",this._updateOverlay),this._destroyed=!0,this._flashOn=!1,this.stop(),Le._postWorkerMessage(this._qrEnginePromise,"close")}async start(){if(this._destroyed)throw Error("The QR scanner can not be started as it had been destroyed.");if((!this._active||this._paused)&&(window.location.protocol!=="https:"&&console.warn("The camera stream is only accessible if the page is transferred via https."),this._active=!0,!document.hidden))if(this._paused=!1,this.$video.srcObject)await this.$video.play();else try{let{stream:t,facingMode:n}=await this._getCameraStream();!this._active||this._paused?Le._stopVideoStream(t):(this._setVideoMirror(n),this.$video.srcObject=t,await this.$video.play(),this._flashOn&&(this._flashOn=!1,this.turnFlashOn().catch(()=>{})))}catch(t){if(!this._paused)throw this._active=!1,t}}stop(){this.pause(),this._active=!1}async pause(t=!1){if(this._paused=!0,!this._active)return!0;this.$video.pause(),this.$overlay&&(this.$overlay.style.display="none");let n=()=>{this.$video.srcObject instanceof MediaStream&&(Le._stopVideoStream(this.$video.srcObject),this.$video.srcObject=null)};return t?(n(),!0):(await new Promise(r=>setTimeout(r,300)),this._paused?(n(),!0):!1)}async setCamera(t){t!==this._preferredCamera&&(this._preferredCamera=t,await this._restartVideoStream())}static async scanImage(t,n,r,o,a=!1,s=!1){let u,h=!1;n&&("scanRegion"in n||"qrEngine"in n||"canvas"in n||"disallowCanvasResizing"in n||"alsoTryWithoutScanRegion"in n||"returnDetailedScanResult"in n)?(u=n.scanRegion,r=n.qrEngine,o=n.canvas,a=n.disallowCanvasResizing||!1,s=n.alsoTryWithoutScanRegion||!1,h=!0):console.warn(n||r||o||a||s?"You're using a deprecated api for scanImage which will be removed in the future.":"Note that the return type of scanImage will change in the future. To already switch to the new api today, you can pass returnDetailedScanResult: true."),n=!!r;try{let g,f;[r,g]=await Promise.all([r||Le.createQrEngine(),Le._loadImage(t)]),[o,f]=Le._drawToCanvas(g,u,o,a);let x;if(r instanceof Worker){let l=r;n||Le._postWorkerMessageSync(l,"inversionMode","both"),x=await new Promise((y,i)=>{let c,p,d,m=-1;p=b=>{b.data.id===m&&(l.removeEventListener("message",p),l.removeEventListener("error",d),clearTimeout(c),b.data.data!==null?y({data:b.data.data,cornerPoints:Le._convertPoints(b.data.cornerPoints,u)}):i(Le.NO_QR_CODE_FOUND))},d=b=>{l.removeEventListener("message",p),l.removeEventListener("error",d),clearTimeout(c),i("Scanner error: "+(b?b.message||b:"Unknown Error"))},l.addEventListener("message",p),l.addEventListener("error",d),c=setTimeout(()=>d("timeout"),1e4);let v=f.getImageData(0,0,o.width,o.height);m=Le._postWorkerMessageSync(l,"decode",v,[v.data.buffer])})}else x=await Promise.race([new Promise((l,y)=>window.setTimeout(()=>y("Scanner error: timeout"),1e4)),(async()=>{try{var[l]=await r.detect(o);if(!l)throw Le.NO_QR_CODE_FOUND;return{data:l.rawValue,cornerPoints:Le._convertPoints(l.cornerPoints,u)}}catch(y){if(l=y.message||y,/not implemented|service unavailable/.test(l))return Le._disableBarcodeDetector=!0,Le.scanImage(t,{scanRegion:u,canvas:o,disallowCanvasResizing:a,alsoTryWithoutScanRegion:s});throw`Scanner error: ${l}`}})()]);return h?x:x.data}catch(g){if(!u||!s)throw g;let f=await Le.scanImage(t,{qrEngine:r,canvas:o,disallowCanvasResizing:a});return h?f:f.data}finally{n||Le._postWorkerMessage(r,"close")}}setGrayscaleWeights(t,n,r,o=!0){Le._postWorkerMessage(this._qrEnginePromise,"grayscaleWeights",{red:t,green:n,blue:r,useIntegerApproximation:o})}setInversionMode(t){Le._postWorkerMessage(this._qrEnginePromise,"inversionMode",t)}static async createQrEngine(t){if(t&&console.warn("Specifying a worker path is not required and not supported anymore."),t=()=>Promise.resolve().then(()=>C0).then(r=>r.createWorker()),!(!Le._disableBarcodeDetector&&"BarcodeDetector"in window&&BarcodeDetector.getSupportedFormats&&(await BarcodeDetector.getSupportedFormats()).includes("qr_code")))return t();let n=navigator.userAgentData;return n&&n.brands.some(({brand:r})=>/Chromium/i.test(r))&&/mac ?OS/i.test(n.platform)&&await n.getHighEntropyValues(["architecture","platformVersion"]).then(({architecture:r,platformVersion:o})=>/arm/i.test(r||"arm")&&13<=parseInt(o||"13")).catch(()=>!0)?t():new BarcodeDetector({formats:["qr_code"]})}_onPlay(){this._scanRegion=this._calculateScanRegion(this.$video),this._updateOverlay(),this.$overlay&&(this.$overlay.style.display=""),this._scanFrame()}_onLoadedMetaData(){this._scanRegion=this._calculateScanRegion(this.$video),this._updateOverlay()}_onVisibilityChange(){document.hidden?this.pause():this._active&&this.start()}_calculateScanRegion(t){let n=Math.round(.6666666666666666*Math.min(t.videoWidth,t.videoHeight));return{x:Math.round((t.videoWidth-n)/2),y:Math.round((t.videoHeight-n)/2),width:n,height:n,downScaledWidth:this._legacyCanvasSize,downScaledHeight:this._legacyCanvasSize}}_updateOverlay(){requestAnimationFrame(()=>{if(this.$overlay){var t=this.$video,n=t.videoWidth,r=t.videoHeight,o=t.offsetWidth,a=t.offsetHeight,s=t.offsetLeft,u=t.offsetTop,h=window.getComputedStyle(t),g=h.objectFit,f=n/r,x=o/a;switch(g){case"none":var l=n,y=r;break;case"fill":l=o,y=a;break;default:(g==="cover"?f>x:f<x)?(y=a,l=y*f):(l=o,y=l/f),g==="scale-down"&&(l=Math.min(l,n),y=Math.min(y,r))}var[i,c]=h.objectPosition.split(" ").map((d,m)=>{const v=parseFloat(d);return d.endsWith("%")?(m?a-y:o-l)*v/100:v});h=this._scanRegion.width||n,x=this._scanRegion.height||r,g=this._scanRegion.x||0;var p=this._scanRegion.y||0;f=this.$overlay.style,f.width=`${h/n*l}px`,f.height=`${x/r*y}px`,f.top=`${u+c+p/r*y}px`,r=/scaleX\(-1\)/.test(t.style.transform),f.left=`${s+(r?o-i-l:i)+(r?n-g-h:g)/n*l}px`,f.transform=t.style.transform}})}static _convertPoints(t,n){if(!n)return t;let r=n.x||0,o=n.y||0,a=n.width&&n.downScaledWidth?n.width/n.downScaledWidth:1;n=n.height&&n.downScaledHeight?n.height/n.downScaledHeight:1;for(let s of t)s.x=s.x*a+r,s.y=s.y*n+o;return t}_scanFrame(){!this._active||this.$video.paused||this.$video.ended||("requestVideoFrameCallback"in this.$video?this.$video.requestVideoFrameCallback.bind(this.$video):requestAnimationFrame)(async()=>{if(!(1>=this.$video.readyState)){var t=Date.now()-this._lastScanTimestamp,n=1e3/this._maxScansPerSecond;t<n&&await new Promise(o=>setTimeout(o,n-t)),this._lastScanTimestamp=Date.now();try{var r=await Le.scanImage(this.$video,{scanRegion:this._scanRegion,qrEngine:this._qrEnginePromise,canvas:this.$canvas})}catch(o){if(!this._active)return;this._onDecodeError(o)}!Le._disableBarcodeDetector||await this._qrEnginePromise instanceof Worker||(this._qrEnginePromise=Le.createQrEngine()),r?(this._onDecode?this._onDecode(r):this._legacyOnDecode&&this._legacyOnDecode(r.data),this.$codeOutlineHighlight&&(clearTimeout(this._codeOutlineHighlightRemovalTimeout),this._codeOutlineHighlightRemovalTimeout=void 0,this.$codeOutlineHighlight.setAttribute("viewBox",`${this._scanRegion.x||0} ${this._scanRegion.y||0} ${this._scanRegion.width||this.$video.videoWidth} ${this._scanRegion.height||this.$video.videoHeight}`),this.$codeOutlineHighlight.firstElementChild.setAttribute("points",r.cornerPoints.map(({x:o,y:a})=>`${o},${a}`).join(" ")),this.$codeOutlineHighlight.style.display="")):this.$codeOutlineHighlight&&!this._codeOutlineHighlightRemovalTimeout&&(this._codeOutlineHighlightRemovalTimeout=setTimeout(()=>this.$codeOutlineHighlight.style.display="none",100))}this._scanFrame()})}_onDecodeError(t){t!==Le.NO_QR_CODE_FOUND&&console.log(t)}async _getCameraStream(){if(!navigator.mediaDevices)throw"Camera not found.";let t=/^(environment|user)$/.test(this._preferredCamera)?"facingMode":"deviceId",n=[{width:{min:1024}},{width:{min:768}},{}],r=n.map(o=>Object.assign({},o,{[t]:{exact:this._preferredCamera}}));for(let o of[...r,...n])try{let a=await navigator.mediaDevices.getUserMedia({video:o,audio:!1}),s=this._getFacingMode(a)||(o.facingMode?this._preferredCamera:this._preferredCamera==="environment"?"user":"environment");return{stream:a,facingMode:s}}catch{}throw"Camera not found."}async _restartVideoStream(){let t=this._paused;await this.pause(!0)&&!t&&this._active&&await this.start()}static _stopVideoStream(t){for(let n of t.getTracks())n.stop(),t.removeTrack(n)}_setVideoMirror(t){this.$video.style.transform="scaleX("+(t==="user"?-1:1)+")"}_getFacingMode(t){return(t=t.getVideoTracks()[0])?/rear|back|environment/i.test(t.label)?"environment":/front|user|face/i.test(t.label)?"user":null:null}static _drawToCanvas(t,n,r,o=!1){r=r||document.createElement("canvas");let a=n&&n.x?n.x:0,s=n&&n.y?n.y:0,u=n&&n.width?n.width:t.videoWidth||t.width,h=n&&n.height?n.height:t.videoHeight||t.height;return o||(o=n&&n.downScaledWidth?n.downScaledWidth:u,n=n&&n.downScaledHeight?n.downScaledHeight:h,r.width!==o&&(r.width=o),r.height!==n&&(r.height=n)),n=r.getContext("2d",{alpha:!1}),n.imageSmoothingEnabled=!1,n.drawImage(t,a,s,u,h,0,0,r.width,r.height),[r,n]}static async _loadImage(t){if(t instanceof Image)return await Le._awaitImageLoad(t),t;if(t instanceof HTMLVideoElement||t instanceof HTMLCanvasElement||t instanceof SVGImageElement||"OffscreenCanvas"in window&&t instanceof OffscreenCanvas||"ImageBitmap"in window&&t instanceof ImageBitmap)return t;if(t instanceof File||t instanceof Blob||t instanceof URL||typeof t=="string"){let n=new Image;n.src=t instanceof File||t instanceof Blob?URL.createObjectURL(t):t.toString();try{return await Le._awaitImageLoad(n),n}finally{(t instanceof File||t instanceof Blob)&&URL.revokeObjectURL(n.src)}}else throw"Unsupported image type."}static async _awaitImageLoad(t){t.complete&&t.naturalWidth!==0||await new Promise((n,r)=>{let o=a=>{t.removeEventListener("load",o),t.removeEventListener("error",o),a instanceof ErrorEvent?r("Image load error"):n()};t.addEventListener("load",o),t.addEventListener("error",o)})}static async _postWorkerMessage(t,n,r,o){return Le._postWorkerMessageSync(await t,n,r,o)}static _postWorkerMessageSync(t,n,r,o){if(!(t instanceof Worker))return-1;let a=Le._workerMessageId++;return t.postMessage({id:a,type:n,data:r},o),a}}Le.DEFAULT_CANVAS_SIZE=400,Le.NO_QR_CODE_FOUND="No QR code found",Le._disableBarcodeDetector=!1,Le._workerMessageId=0;function yp({label:e="",onDecode:t}){const n=H.useRef(),r=H.useRef(null),[o,a]=H.useState([]);return H.useEffect(()=>(r.current&&!n.current&&(n.current=new Le(r.current,t??(s=>console.log("decoded qr code:",s)),{returnDetailedScanResult:!0,highlightScanRegion:!0,highlightCodeOutline:!0}),Le.listCameras(!0).then(s=>a(s)),n.current.start()),()=>{var s;r.current||(s=n.current)==null||s.stop()}),[t]),E.jsxs("div",{className:"flex flex-col gap-1",children:[E.jsxs("div",{className:"flex flex-col items-center justify-between text-gray-700 sm:flex-row",children:[E.jsx("p",{children:`Scan ${e==null?void 0:e.toLowerCase()}`}),E.jsx("select",{id:"select",className:"appearance-none rounded border bg-transparent px-2.5 py-2 text-sm",onChange:s=>{var u;return(u=n.current)==null?void 0:u.setCamera(s.target.value)},children:o.map(s=>E.jsx("option",{value:s.id,children:s.label},s.id))})]}),E.jsx("video",{className:"h-full w-full rounded border object-cover",ref:r})]})}function Rl(){return E.jsxs("div",{children:[E.jsx("div",{className:"flex animate-pulse justify-end space-y-4",children:E.jsx("div",{className:"h-8 w-32 rounded bg-gray-100"})},"skeleton-item-"),E.jsx("div",{className:"my-6 h-px w-full bg-gray-100"}),E.jsx("div",{className:"space-y-4",children:E.jsx("div",{className:"animate-pulse space-y-4",children:E.jsxs("div",{className:"grid grid-cols-2 gap-x-6 gap-y-2",children:[E.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),E.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),E.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),E.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),E.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),E.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),E.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),E.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),E.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),E.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),E.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),E.jsx("div",{className:"h-12 w-full rounded bg-gray-100"})]})},"skeleton-item-")})]})}var vp=Object.defineProperty,bp=(e,t)=>{for(var n in t)vp(e,n,{get:t[n],enumerable:!0})},Ft={};bp(Ft,{assign:()=>kp,colors:()=>mn,createStringInterpolator:()=>Yi,skipAnimation:()=>Dl,to:()=>Il,willAdvance:()=>Qi});var Hi=mr(),Te=e=>pr(e,Hi),zi=mr();Te.write=e=>pr(e,zi);var xo=mr();Te.onStart=e=>pr(e,xo);var qi=mr();Te.onFrame=e=>pr(e,qi);var Ki=mr();Te.onFinish=e=>pr(e,Ki);var Fn=[];Te.setTimeout=(e,t)=>{const n=Te.now()+t,r=()=>{const a=Fn.findIndex(s=>s.cancel==r);~a&&Fn.splice(a,1),pn-=~a?1:0},o={time:n,handler:e,cancel:r};return Fn.splice(Tl(n),0,o),pn+=1,Nl(),o};var Tl=e=>~(~Fn.findIndex(t=>t.time>e)||~Fn.length);Te.cancel=e=>{xo.delete(e),qi.delete(e),Ki.delete(e),Hi.delete(e),zi.delete(e)},Te.sync=e=>{Gi=!0,Te.batchedUpdates(e),Gi=!1},Te.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...o){t=o,Te.onStart(n)}return r.handler=e,r.cancel=()=>{xo.delete(n),t=null},r};var Wi=typeof window<"u"?window.requestAnimationFrame:()=>{};Te.use=e=>Wi=e,Te.now=typeof performance<"u"?()=>performance.now():Date.now,Te.batchedUpdates=e=>e(),Te.catch=console.error,Te.frameLoop="always",Te.advance=()=>{Te.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Al()};var hn=-1,pn=0,Gi=!1;function pr(e,t){Gi?(t.delete(e),e(0)):(t.add(e),Nl())}function Nl(){hn<0&&(hn=0,Te.frameLoop!=="demand"&&Wi(jl))}function wp(){hn=-1}function jl(){~hn&&(Wi(jl),Te.batchedUpdates(Al))}function Al(){const e=hn;hn=Te.now();const t=Tl(hn);if(t&&(Ll(Fn.splice(0,t),n=>n.handler()),pn-=t),!pn){wp();return}xo.flush(),Hi.flush(e?Math.min(64,hn-e):16.667),qi.flush(),zi.flush(),Ki.flush()}function mr(){let e=new Set,t=e;return{add(n){pn+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return pn-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,pn-=t.size,Ll(t,r=>r(n)&&e.add(r)),pn+=e.size,t=e)}}}function Ll(e,t){e.forEach(n=>{try{t(n)}catch(r){Te.catch(r)}})}function Xi(){}var xp=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),pe={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 tn(e,t){if(pe.arr(e)){if(!pe.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 Me=(e,t)=>e.forEach(t);function Jt(e,t,n){if(pe.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 Pt=e=>pe.und(e)?[]:pe.arr(e)?e:[e];function gr(e,t){if(e.size){const n=Array.from(e);e.clear(),Me(n,t)}}var yr=(e,...t)=>gr(e,n=>n(...t)),Ji=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Yi,Il,mn=null,Dl=!1,Qi=Xi,kp=e=>{e.to&&(Il=e.to),e.now&&(Te.now=e.now),e.colors!==void 0&&(mn=e.colors),e.skipAnimation!=null&&(Dl=e.skipAnimation),e.createStringInterpolator&&(Yi=e.createStringInterpolator),e.requestAnimationFrame&&Te.use(e.requestAnimationFrame),e.batchedUpdates&&(Te.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Qi=e.willAdvance),e.frameLoop&&(Te.frameLoop=e.frameLoop)},vr=new Set,Rt=[],Zi=[],ko=0,Co={get idle(){return!vr.size&&!Rt.length},start(e){ko>e.priority?(vr.add(e),Te.onStart(Cp)):(Ml(e),Te(ea))},advance:ea,sort(e){if(ko)Te.onFrame(()=>Co.sort(e));else{const t=Rt.indexOf(e);~t&&(Rt.splice(t,1),Fl(e))}},clear(){Rt=[],vr.clear()}};function Cp(){vr.forEach(Ml),vr.clear(),Te(ea)}function Ml(e){Rt.includes(e)||Fl(e)}function Fl(e){Rt.splice(Ep(Rt,t=>t.priority>e.priority),0,e)}function ea(e){const t=Zi;for(let n=0;n<Rt.length;n++){const r=Rt[n];ko=r.priority,r.idle||(Qi(r),r.advance(e),r.idle||t.push(r))}return ko=0,Zi=Rt,Zi.length=0,Rt=t,Rt.length>0}function Ep(e,t){const n=e.findIndex(t);return n<0?e.length:n}var Sp=(e,t,n)=>Math.min(Math.max(n,e),t),Pp={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},Ut="[-+]?\\d*\\.?\\d+",Eo=Ut+"%";function So(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Bp=new RegExp("rgb"+So(Ut,Ut,Ut)),Op=new RegExp("rgba"+So(Ut,Ut,Ut,Ut)),_p=new RegExp("hsl"+So(Ut,Eo,Eo)),Rp=new RegExp("hsla"+So(Ut,Eo,Eo,Ut)),Tp=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Np=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,jp=/^#([0-9a-fA-F]{6})$/,Ap=/^#([0-9a-fA-F]{8})$/;function Lp(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=jp.exec(e))?parseInt(t[1]+"ff",16)>>>0:mn&&mn[e]!==void 0?mn[e]:(t=Bp.exec(e))?(Un(t[1])<<24|Un(t[2])<<16|Un(t[3])<<8|255)>>>0:(t=Op.exec(e))?(Un(t[1])<<24|Un(t[2])<<16|Un(t[3])<<8|Vl(t[4]))>>>0:(t=Tp.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Ap.exec(e))?parseInt(t[1],16)>>>0:(t=Np.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=_p.exec(e))?(Ul($l(t[1]),Po(t[2]),Po(t[3]))|255)>>>0:(t=Rp.exec(e))?(Ul($l(t[1]),Po(t[2]),Po(t[3]))|Vl(t[4]))>>>0:null}function ta(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 Ul(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,a=ta(o,r,e+1/3),s=ta(o,r,e),u=ta(o,r,e-1/3);return Math.round(a*255)<<24|Math.round(s*255)<<16|Math.round(u*255)<<8}function Un(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function $l(e){return(parseFloat(e)%360+360)%360/360}function Vl(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function Po(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Hl(e){let t=Lp(e);if(t===null)return e;t=t||0;const n=(t&4278190080)>>>24,r=(t&16711680)>>>16,o=(t&65280)>>>8,a=(t&255)/255;return`rgba(${n}, ${r}, ${o}, ${a})`}var br=(e,t,n)=>{if(pe.fun(e))return e;if(pe.arr(e))return br({range:e,output:t,extrapolate:n});if(pe.str(e.output[0]))return Yi(e);const r=e,o=r.output,a=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",u=r.extrapolateRight||r.extrapolate||"extend",h=r.easing||(g=>g);return g=>{const f=Dp(g,a);return Ip(g,a[f],a[f+1],o[f],o[f+1],h,s,u,r.map)}};function Ip(e,t,n,r,o,a,s,u,h){let g=h?h(e):e;if(g<t){if(s==="identity")return g;s==="clamp"&&(g=t)}if(g>n){if(u==="identity")return g;u==="clamp"&&(g=n)}return r===o?r:t===n?e<=t?r:o:(t===-1/0?g=-g:n===1/0?g=g-t:g=(g-t)/(n-t),g=a(g),r===-1/0?g=-g:o===1/0?g=g+r:g=g*(o-r)+r,g)}function Dp(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var Mp=(e,t="end")=>n=>{n=t==="end"?Math.min(n,.999):Math.max(n,.001);const r=n*e,o=t==="end"?Math.floor(r):Math.ceil(r);return Sp(0,1,o/e)},Bo=1.70158,Oo=Bo*1.525,zl=Bo+1,ql=2*Math.PI/3,Kl=2*Math.PI/4.5,_o=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,Fp={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=>zl*e*e*e-Bo*e*e,easeOutBack:e=>1+zl*Math.pow(e-1,3)+Bo*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((Oo+1)*2*e-Oo)/2:(Math.pow(2*e-2,2)*((Oo+1)*(e*2-2)+Oo)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*ql),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*ql)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Kl))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Kl)/2+1,easeInBounce:e=>1-_o(1-e),easeOutBounce:_o,easeInOutBounce:e=>e<.5?(1-_o(1-2*e))/2:(1+_o(2*e-1))/2,steps:Mp},wr=Symbol.for("FluidValue.get"),$n=Symbol.for("FluidValue.observers"),Tt=e=>!!(e&&e[wr]),Et=e=>e&&e[wr]?e[wr]():e,Wl=e=>e[$n]||null;function Up(e,t){e.eventObserved?e.eventObserved(t):e(t)}function xr(e,t){const n=e[$n];n&&n.forEach(r=>{Up(r,t)})}var Gl=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");$p(this,e)}},$p=(e,t)=>Xl(e,wr,t);function Vn(e,t){if(e[wr]){let n=e[$n];n||Xl(e,$n,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function kr(e,t){const n=e[$n];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[$n]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var Xl=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Ro=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Vp=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Jl=new RegExp(`(${Ro.source})(%|[a-z]+)`,"i"),Hp=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,To=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Yl=e=>{const[t,n]=zp(e);if(!t||Ji())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const o=window.getComputedStyle(document.documentElement).getPropertyValue(n);return o||e}else{if(n&&To.test(n))return Yl(n);if(n)return n}return e},zp=e=>{const t=To.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},na,qp=(e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`,Ql=e=>{na||(na=mn?new RegExp(`(${Object.keys(mn).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(a=>Et(a).replace(To,Yl).replace(Vp,Hl).replace(na,Hl)),n=t.map(a=>a.match(Ro).map(Number)),o=n[0].map((a,s)=>n.map(u=>{if(!(s in u))throw Error('The arity of each "output" value must be equal');return u[s]})).map(a=>br({...e,output:a}));return a=>{var h;const s=!Jl.test(t[0])&&((h=t.find(g=>Jl.test(g)))==null?void 0:h.replace(Ro,""));let u=0;return t[0].replace(Ro,()=>`${o[u++](a)}${s||""}`).replace(Hp,qp)}},ra="react-spring: ",Zl=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${ra}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},Kp=Zl(console.warn);function Wp(){Kp(`${ra}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var Gp=Zl(console.warn);function Xp(){Gp(`${ra}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 No(e){return pe.str(e)&&(e[0]=="#"||/\d/.test(e)||!Ji()&&To.test(e)||e in(mn||{}))}var oa=Ji()?H.useEffect:H.useLayoutEffect,Jp=()=>{const e=H.useRef(!1);return oa(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function ec(){const e=H.useState()[1],t=Jp();return()=>{t.current&&e(Math.random())}}function Yp(e,t){const[n]=H.useState(()=>({inputs:t,result:e()})),r=H.useRef(),o=r.current;let a=o;return a?t&&a.inputs&&Qp(t,a.inputs)||(a={inputs:t,result:e()}):a=n,H.useEffect(()=>{r.current=a,o==n&&(n.inputs=n.result=void 0)},[a]),a.result}function Qp(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 tc=e=>H.useEffect(e,Zp),Zp=[];function nc(e){const t=H.useRef();return H.useEffect(()=>{t.current=e}),t.current}var Cr=Symbol.for("Animated:node"),em=e=>!!e&&e[Cr]===e,Yt=e=>e&&e[Cr],ia=(e,t)=>xp(e,Cr,t),jo=e=>e&&e[Cr]&&e[Cr].getPayload(),rc=class{constructor(){ia(this,this)}getPayload(){return this.payload||[]}},Er=class extends rc{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,pe.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new Er(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return pe.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,pe.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},Sr=class extends Er{constructor(e){super(0),this._string=null,this._toString=br({output:[e,e]})}static create(e){return new Sr(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(pe.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=br({output:[this.getValue(),e]})),this._value=0,super.reset()}},Ao={dependencies:null},Lo=class extends rc{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return Jt(this.source,(n,r)=>{em(n)?t[r]=n.getValue(e):Tt(n)?t[r]=Et(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Me(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return Jt(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Ao.dependencies&&Tt(e)&&Ao.dependencies.add(e);const t=jo(e);t&&Me(t,n=>this.add(n))}},oc=class extends Lo{constructor(e){super(e)}static create(e){return new oc(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(tm)),!0)}};function tm(e){return(No(e)?Sr:Er).create(e)}function aa(e){const t=Yt(e);return t?t.constructor:pe.arr(e)?oc:No(e)?Sr:Er}var ic=(e,t)=>{const n=!pe.fun(e)||e.prototype&&e.prototype.isReactComponent;return H.forwardRef((r,o)=>{const a=H.useRef(null),s=n&&H.useCallback(i=>{a.current=om(o,i)},[o]),[u,h]=rm(r,t),g=ec(),f=()=>{const i=a.current;if(n&&!i)return;(i?t.applyAnimatedValues(i,u.getValue(!0)):!1)===!1&&g()},x=new nm(f,h),l=H.useRef();oa(()=>(l.current=x,Me(h,i=>Vn(i,x)),()=>{l.current&&(Me(l.current.deps,i=>kr(i,l.current)),Te.cancel(l.current.update))})),H.useEffect(f,[]),tc(()=>()=>{const i=l.current;Me(i.deps,c=>kr(c,i))});const y=t.getComponentProps(u.getValue());return le.createElement(e,{...y,ref:s})})},nm=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&Te.write(this.update)}};function rm(e,t){const n=new Set;return Ao.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Lo(e),Ao.dependencies=null,[e,n]}function om(e,t){return e&&(pe.fun(e)?e(t):e.current=t),t}var ac=Symbol.for("AnimatedComponent"),im=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=o=>new Lo(o),getComponentProps:r=o=>o}={})=>{const o={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},a=s=>{const u=sc(s)||"Anonymous";return pe.str(s)?s=a[s]||(a[s]=ic(s,o)):s=s[ac]||(s[ac]=ic(s,o)),s.displayName=`Animated(${u})`,s};return Jt(e,(s,u)=>{pe.arr(e)&&(u=sc(s)),a[u]=a(s)}),{animated:a}},sc=e=>pe.str(e)?e:e&&pe.str(e.displayName)?e.displayName:pe.fun(e)&&e.name||null;function kn(e,...t){return pe.fun(e)?e(...t):e}var Pr=(e,t)=>e===!0||!!(t&&e&&(pe.fun(e)?e(t):Pt(e).includes(t))),lc=(e,t)=>pe.obj(e)?t&&e[t]:e,cc=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,am=e=>e,sa=(e,t=am)=>{let n=sm;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));const r={};for(const o of n){const a=t(e[o],o);pe.und(a)||(r[o]=a)}return r},sm=["config","onProps","onStart","onChange","onPause","onResume","onRest"],lm={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 cm(e){const t={};let n=0;if(Jt(e,(r,o)=>{lm[o]||(t[o]=r,n++)}),n)return t}function uc(e){const t=cm(e);if(t){const n={to:t};return Jt(e,(r,o)=>o in t||(n[o]=r)),n}return{...e}}function Br(e){return e=Et(e),pe.arr(e)?e.map(Br):No(e)?Ft.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function um(e){for(const t in e)return!0;return!1}function la(e){return pe.fun(e)||pe.arr(e)&&pe.obj(e[0])}function dm(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function fm(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var hm={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}},ca={...hm.default,mass:1,damping:1,easing:Fp.linear,clamp:!1},pm=class{constructor(){this.velocity=0,Object.assign(this,ca)}};function mm(e,t,n){n&&(n={...n},dc(n,t),t={...n,...t}),dc(e,t),Object.assign(e,t);for(const s in ca)e[s]==null&&(e[s]=ca[s]);let{frequency:r,damping:o}=e;const{mass:a}=e;return pe.und(r)||(r<.01&&(r=.01),o<0&&(o=0),e.tension=Math.pow(2*Math.PI/r,2)*a,e.friction=4*Math.PI*o*a/r),e}function dc(e,t){if(!pe.und(t.decay))e.duration=void 0;else{const n=!pe.und(t.tension)||!pe.und(t.friction);(n||!pe.und(t.frequency)||!pe.und(t.damping)||!pe.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var fc=[],gm=class{constructor(){this.changed=!1,this.values=fc,this.toValues=null,this.fromValues=fc,this.config=new pm,this.immediate=!1}};function hc(e,{key:t,props:n,defaultProps:r,state:o,actions:a}){return new Promise((s,u)=>{let h,g,f=Pr(n.cancel??(r==null?void 0:r.cancel),t);if(f)y();else{pe.und(n.pause)||(o.paused=Pr(n.pause,t));let i=r==null?void 0:r.pause;i!==!0&&(i=o.paused||Pr(i,t)),h=kn(n.delay||0,t),i?(o.resumeQueue.add(l),a.pause()):(a.resume(),l())}function x(){o.resumeQueue.add(l),o.timeouts.delete(g),g.cancel(),h=g.time-Te.now()}function l(){h>0&&!Ft.skipAnimation?(o.delayed=!0,g=Te.setTimeout(y,h),o.pauseQueue.add(x),o.timeouts.add(g)):y()}function y(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(x),o.timeouts.delete(g),e<=(o.cancelId||0)&&(f=!0);try{a.start({...n,callId:e,cancel:f},s)}catch(i){u(i)}}})}var ua=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?Hn(e.get()):t.every(n=>n.noop)?pc(e.get()):$t(e.get(),t.every(n=>n.finished)),pc=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),$t=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Hn=e=>({value:e,cancelled:!0,finished:!1});function mc(e,t,n,r){const{callId:o,parentId:a,onRest:s}=t,{asyncTo:u,promise:h}=n;return!a&&e===u&&!t.reset?h:n.promise=(async()=>{n.asyncId=o,n.asyncTo=e;const g=sa(t,(p,d)=>d==="onRest"?void 0:p);let f,x;const l=new Promise((p,d)=>(f=p,x=d)),y=p=>{const d=o<=(n.cancelId||0)&&Hn(r)||o!==n.asyncId&&$t(r,!1);if(d)throw p.result=d,x(p),p},i=(p,d)=>{const m=new gc,v=new yc;return(async()=>{if(Ft.skipAnimation)throw Or(n),v.result=$t(r,!1),x(v),v;y(m);const b=pe.obj(p)?{...p}:{...d,to:p};b.parentId=o,Jt(g,(S,k)=>{pe.und(b[k])&&(b[k]=S)});const C=await r.start(b);return y(m),n.paused&&await new Promise(S=>{n.resumeQueue.add(S)}),C})()};let c;if(Ft.skipAnimation)return Or(n),$t(r,!1);try{let p;pe.arr(e)?p=(async d=>{for(const m of d)await i(m)})(e):p=Promise.resolve(e(i,r.stop.bind(r))),await Promise.all([p.then(f),l]),c=$t(r.get(),!0,!1)}catch(p){if(p instanceof gc)c=p.result;else if(p instanceof yc)c=p.result;else throw p}finally{o==n.asyncId&&(n.asyncId=a,n.asyncTo=a?u:void 0,n.promise=a?h:void 0)}return pe.fun(s)&&Te.batchedUpdates(()=>{s(c,r,r.item)}),c})()}function Or(e,t){gr(e.timeouts,n=>n.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var gc=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.")}},yc=class extends Error{constructor(){super("SkipAnimationSignal")}},da=e=>e instanceof fa,ym=1,fa=class extends Gl{constructor(){super(...arguments),this.id=ym++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Yt(this);return e&&e.getValue()}to(...e){return Ft.to(this,e)}interpolate(...e){return Wp(),Ft.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){xr(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||Co.sort(this),xr(this,{type:"priority",parent:this,priority:e})}},Cn=Symbol.for("SpringPhase"),vc=1,ha=2,pa=4,ma=e=>(e[Cn]&vc)>0,gn=e=>(e[Cn]&ha)>0,_r=e=>(e[Cn]&pa)>0,bc=(e,t)=>t?e[Cn]|=ha|vc:e[Cn]&=~ha,wc=(e,t)=>t?e[Cn]|=pa:e[Cn]&=~pa,vm=class extends fa{constructor(e,t){if(super(),this.animation=new gm,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,!pe.und(e)||!pe.und(t)){const n=pe.obj(e)?{...e}:{...t,from:e};pe.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(gn(this)||this._state.asyncTo)||_r(this)}get goal(){return Et(this.animation.to)}get velocity(){const e=Yt(this);return e instanceof Er?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return ma(this)}get isAnimating(){return gn(this)}get isPaused(){return _r(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:o}=r;const{config:a}=r,s=jo(r.to);!s&&Tt(r.to)&&(o=Pt(Et(r.to))),r.values.forEach((g,f)=>{if(g.done)return;const x=g.constructor==Sr?1:s?s[f].lastPosition:o[f];let l=r.immediate,y=x;if(!l){if(y=g.lastPosition,a.tension<=0){g.done=!0;return}let i=g.elapsedTime+=e;const c=r.fromValues[f],p=g.v0!=null?g.v0:g.v0=pe.arr(a.velocity)?a.velocity[f]:a.velocity;let d;const m=a.precision||(c==x?.005:Math.min(1,Math.abs(x-c)*.001));if(pe.und(a.duration))if(a.decay){const v=a.decay===!0?.998:a.decay,b=Math.exp(-(1-v)*i);y=c+p/(1-v)*(1-b),l=Math.abs(g.lastPosition-y)<=m,d=p*b}else{d=g.lastVelocity==null?p:g.lastVelocity;const v=a.restVelocity||m/10,b=a.clamp?0:a.bounce,C=!pe.und(b),S=c==x?g.v0>0:c<x;let k,B=!1;const O=1,j=Math.ceil(e/O);for(let I=0;I<j&&(k=Math.abs(d)>v,!(!k&&(l=Math.abs(x-y)<=m,l)));++I){C&&(B=y==x||y>x==S,B&&(d=-d*b,y=x));const D=-a.tension*1e-6*(y-x),M=-a.friction*.001*d,$=(D+M)/a.mass;d=d+$*O,y=y+d*O}}else{let v=1;a.duration>0&&(this._memoizedDuration!==a.duration&&(this._memoizedDuration=a.duration,g.durationProgress>0&&(g.elapsedTime=a.duration*g.durationProgress,i=g.elapsedTime+=e)),v=(a.progress||0)+i/this._memoizedDuration,v=v>1?1:v<0?0:v,g.durationProgress=v),y=c+a.easing(v)*(x-c),d=(y-g.lastPosition)/e,l=v==1}g.lastVelocity=d,Number.isNaN(y)&&(console.warn("Got NaN while animating:",this),l=!0)}s&&!s[f].done&&(l=!1),l?g.done=!0:t=!1,g.setValue(y,a.round)&&(n=!0)});const u=Yt(this),h=u.getValue();if(t){const g=Et(r.to);(h!==g||n)&&!a.decay?(u.setValue(g),this._onChange(g)):n&&a.decay&&this._onChange(h),this._stop()}else n&&this._onChange(h)}set(e){return Te.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(gn(this)){const{to:e,config:t}=this.animation;Te.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 pe.und(e)?(n=this.queue||[],this.queue=[]):n=[pe.obj(e)?e:{...t,to:e}],Promise.all(n.map(r=>this._update(r))).then(r=>ua(this,r))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Or(this._state,e&&this._lastCallId),Te.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=pe.obj(n)?n[t]:n,(n==null||la(n))&&(n=void 0),r=pe.obj(r)?r[t]:r,r==null&&(r=void 0);const o={to:n,from:r};return ma(this)||(e.reverse&&([n,r]=[r,n]),r=Et(r),pe.und(r)?Yt(this)||this._set(n):this._set(r)),o}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,sa(e,(s,u)=>/^on/.test(u)?lc(s,n):s)),Cc(this,e,"onProps"),Nr(this,"onProps",e,this);const o=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 a=this._state;return hc(++this._lastCallId,{key:n,props:e,defaultProps:r,state:a,actions:{pause:()=>{_r(this)||(wc(this,!0),yr(a.pauseQueue),Nr(this,"onPause",$t(this,Rr(this,this.animation.to)),this))},resume:()=>{_r(this)&&(wc(this,!1),gn(this)&&this._resume(),yr(a.resumeQueue),Nr(this,"onResume",$t(this,Rr(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then(s=>{if(e.loop&&s.finished&&!(t&&s.noop)){const u=xc(e);if(u)return this._update(u,!0)}return s})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Hn(this));const r=!pe.und(e.to),o=!pe.und(e.from);if(r||o)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(Hn(this));const{key:a,defaultProps:s,animation:u}=this,{to:h,from:g}=u;let{to:f=h,from:x=g}=e;o&&!r&&(!t.default||pe.und(f))&&(f=x),t.reverse&&([f,x]=[x,f]);const l=!tn(x,g);l&&(u.from=x),x=Et(x);const y=!tn(f,h);y&&this._focus(f);const i=la(t.to),{config:c}=u,{decay:p,velocity:d}=c;(r||o)&&(c.velocity=0),t.config&&!i&&mm(c,kn(t.config,a),t.config!==s.config?kn(s.config,a):void 0);let m=Yt(this);if(!m||pe.und(f))return n($t(this,!0));const v=pe.und(t.reset)?o&&!t.default:!pe.und(x)&&Pr(t.reset,a),b=v?x:this.get(),C=Br(f),S=pe.num(C)||pe.arr(C)||No(C),k=!i&&(!S||Pr(s.immediate||t.immediate,a));if(y){const I=aa(f);if(I!==m.constructor)if(k)m=this._set(C);else throw Error(`Cannot animate between ${m.constructor.name} and ${I.name}, as the "to" prop suggests`)}const B=m.constructor;let O=Tt(f),j=!1;if(!O){const I=v||!ma(this)&&l;(y||I)&&(j=tn(Br(b),C),O=!j),(!tn(u.immediate,k)&&!k||!tn(c.decay,p)||!tn(c.velocity,d))&&(O=!0)}if(j&&gn(this)&&(u.changed&&!v?O=!0:O||this._stop(h)),!i&&((O||Tt(h))&&(u.values=m.getPayload(),u.toValues=Tt(f)?null:B==Sr?[1]:Pt(C)),u.immediate!=k&&(u.immediate=k,!k&&!v&&this._set(h)),O)){const{onRest:I}=u;Me(wm,M=>Cc(this,t,M));const D=$t(this,Rr(this,h));yr(this._pendingCalls,D),this._pendingCalls.add(n),u.changed&&Te.batchedUpdates(()=>{var M;u.changed=!v,I==null||I(D,this),v?kn(s.onRest,D):(M=u.onStart)==null||M.call(u,D,this)})}v&&this._set(b),i?n(mc(t.to,t,this._state,this)):O?this._start():gn(this)&&!y?this._pendingCalls.add(n):n(pc(b))}_focus(e){const t=this.animation;e!==t.to&&(Wl(this)&&this._detach(),t.to=e,Wl(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Tt(t)&&(Vn(t,this),da(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Tt(e)&&kr(e,this)}_set(e,t=!0){const n=Et(e);if(!pe.und(n)){const r=Yt(this);if(!r||!tn(n,r.getValue())){const o=aa(n);!r||r.constructor!=o?ia(this,o.create(n)):r.setValue(n),r&&Te.batchedUpdates(()=>{this._onChange(n,t)})}}return Yt(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,Nr(this,"onStart",$t(this,Rr(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),kn(this.animation.onChange,e,this)),kn(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Yt(this).reset(Et(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),gn(this)||(bc(this,!0),_r(this)||this._resume())}_resume(){Ft.skipAnimation?this.finish():Co.start(this)}_stop(e,t){if(gn(this)){bc(this,!1);const n=this.animation;Me(n.values,o=>{o.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),xr(this,{type:"idle",parent:this});const r=t?Hn(this.get()):$t(this.get(),Rr(this,e??n.to));yr(this._pendingCalls,r),n.changed&&(n.changed=!1,Nr(this,"onRest",r,this))}}};function Rr(e,t){const n=Br(t),r=Br(e.get());return tn(r,n)}function xc(e,t=e.loop,n=e.to){const r=kn(t);if(r){const o=r!==!0&&uc(r),a=(o||e).reverse,s=!o||o.reset;return Tr({...e,loop:t,default:!1,pause:void 0,to:!a||la(n)?n:void 0,from:s?e.from:void 0,reset:s,...o})}}function Tr(e){const{to:t,from:n}=e=uc(e),r=new Set;return pe.obj(t)&&kc(t,r),pe.obj(n)&&kc(n,r),e.keys=r.size?Array.from(r):null,e}function bm(e){const t=Tr(e);return pe.und(t.default)&&(t.default=sa(t)),t}function kc(e,t){Jt(e,(n,r)=>n!=null&&t.add(r))}var wm=["onStart","onRest","onChange","onPause","onResume"];function Cc(e,t,n){e.animation[n]=t[n]!==cc(t,n)?lc(t[n],e.key):void 0}function Nr(e,t,...n){var r,o,a,s;(o=(r=e.animation)[t])==null||o.call(r,...n),(s=(a=e.defaultProps)[t])==null||s.call(a,...n)}var xm=["onStart","onChange","onRest"],km=1,Cm=class{constructor(e,t){this.id=km++,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];pe.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Tr(e)),this}start(e){let{queue:t}=this;return e?t=Pt(e).map(Tr):this.queue=[],this._flush?this._flush(this,t):(_c(this,t),ga(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;Me(Pt(t),r=>n[r].stop(!!e))}else Or(this._state,this._lastAsyncId),this.each(n=>n.stop(!!e));return this}pause(e){if(pe.und(e))this.start({pause:!0});else{const t=this.springs;Me(Pt(e),n=>t[n].pause())}return this}resume(e){if(pe.und(e))this.start({pause:!1});else{const t=this.springs;Me(Pt(e),n=>t[n].resume())}return this}each(e){Jt(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,o=this._changed.size>0;(r&&!this._started||o&&!this._started)&&(this._started=!0,gr(e,([u,h])=>{h.value=this.get(),u(h,this,this._item)}));const a=!r&&this._started,s=o||a&&n.size?this.get():null;o&&t.size&&gr(t,([u,h])=>{h.value=s,u(h,this,this._item)}),a&&(this._started=!1,gr(n,([u,h])=>{h.value=s,u(h,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;Te.onFrame(this._onFrame)}};function ga(e,t){return Promise.all(t.map(n=>Ec(e,n))).then(n=>ua(e,n))}async function Ec(e,t,n){const{keys:r,to:o,from:a,loop:s,onRest:u,onResolve:h}=t,g=pe.obj(t.default)&&t.default;s&&(t.loop=!1),o===!1&&(t.to=null),a===!1&&(t.from=null);const f=pe.arr(o)||pe.fun(o)?o:void 0;f?(t.to=void 0,t.onRest=void 0,g&&(g.onRest=void 0)):Me(xm,c=>{const p=t[c];if(pe.fun(p)){const d=e._events[c];t[c]=({finished:m,cancelled:v})=>{const b=d.get(p);b?(m||(b.finished=!1),v&&(b.cancelled=!0)):d.set(p,{value:null,finished:m||!1,cancelled:v||!1})},g&&(g[c]=t[c])}});const x=e._state;t.pause===!x.paused?(x.paused=t.pause,yr(t.pause?x.pauseQueue:x.resumeQueue)):x.paused&&(t.pause=!0);const l=(r||Object.keys(e.springs)).map(c=>e.springs[c].start(t)),y=t.cancel===!0||cc(t,"cancel")===!0;(f||y&&x.asyncId)&&l.push(hc(++e._lastAsyncId,{props:t,state:x,actions:{pause:Xi,resume:Xi,start(c,p){y?(Or(x,e._lastAsyncId),p(Hn(e))):(c.onRest=u,p(mc(f,c,x,e)))}}})),x.paused&&await new Promise(c=>{x.resumeQueue.add(c)});const i=ua(e,await Promise.all(l));if(s&&i.finished&&!(n&&i.noop)){const c=xc(t,s,o);if(c)return _c(e,[c]),Ec(e,c,!0)}return h&&Te.batchedUpdates(()=>h(i,e,e.item)),i}function Sc(e,t){const n={...e.springs};return t&&Me(Pt(t),r=>{pe.und(r.keys)&&(r=Tr(r)),pe.obj(r.to)||(r={...r,to:void 0}),Oc(n,r,o=>Bc(o))}),Pc(e,n),n}function Pc(e,t){Jt(t,(n,r)=>{e.springs[r]||(e.springs[r]=n,Vn(n,e))})}function Bc(e,t){const n=new vm;return n.key=e,t&&Vn(n,t),n}function Oc(e,t,n){t.keys&&Me(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function _c(e,t){Me(t,n=>{Oc(e.springs,n,r=>Bc(r,e))})}var Io=({children:e,...t})=>{const n=H.useContext(Do),r=t.pause||!!n.pause,o=t.immediate||!!n.immediate;t=Yp(()=>({pause:r,immediate:o}),[r,o]);const{Provider:a}=Do;return le.createElement(a,{value:t},e)},Do=Em(Io,{});Io.Provider=Do.Provider,Io.Consumer=Do.Consumer;function Em(e,t){return Object.assign(e,le.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var Sm=()=>{const e=[],t=function(r){Xp();const o=[];return Me(e,(a,s)=>{if(pe.und(r))o.push(a.start());else{const u=n(r,a,s);u&&o.push(a.start(u))}}),o};t.current=e,t.add=function(r){e.includes(r)||e.push(r)},t.delete=function(r){const o=e.indexOf(r);~o&&e.splice(o,1)},t.pause=function(){return Me(e,r=>r.pause(...arguments)),this},t.resume=function(){return Me(e,r=>r.resume(...arguments)),this},t.set=function(r){Me(e,(o,a)=>{const s=pe.fun(r)?r(a,o):r;s&&o.set(s)})},t.start=function(r){const o=[];return Me(e,(a,s)=>{if(pe.und(r))o.push(a.start());else{const u=this._getProps(r,a,s);u&&o.push(a.start(u))}}),o},t.stop=function(){return Me(e,r=>r.stop(...arguments)),this},t.update=function(r){return Me(e,(o,a)=>o.update(this._getProps(r,o,a))),this};const n=function(r,o,a){return pe.fun(r)?r(a,o):r};return t._getProps=n,t};function Pm(e,t,n){const r=pe.fun(t)&&t;r&&!n&&(n=[]);const o=H.useMemo(()=>r||arguments.length==3?Sm():void 0,[]),a=H.useRef(0),s=ec(),u=H.useMemo(()=>({ctrls:[],queue:[],flush(d,m){const v=Sc(d,m);return a.current>0&&!u.queue.length&&!Object.keys(v).some(C=>!d.springs[C])?ga(d,m):new Promise(C=>{Pc(d,v),u.queue.push(()=>{C(ga(d,m))}),s()})}}),[]),h=H.useRef([...u.ctrls]),g=[],f=nc(e)||0;H.useMemo(()=>{Me(h.current.slice(e,f),d=>{dm(d,o),d.stop(!0)}),h.current.length=e,x(f,e)},[e]),H.useMemo(()=>{x(0,Math.min(f,e))},n);function x(d,m){for(let v=d;v<m;v++){const b=h.current[v]||(h.current[v]=new Cm(null,u.flush)),C=r?r(v,b):t[v];C&&(g[v]=bm(C))}}const l=h.current.map((d,m)=>Sc(d,g[m])),y=H.useContext(Io),i=nc(y),c=y!==i&&um(y);oa(()=>{a.current++,u.ctrls=h.current;const{queue:d}=u;d.length&&(u.queue=[],Me(d,m=>m())),Me(h.current,(m,v)=>{o==null||o.add(m),c&&m.start({default:y});const b=g[v];b&&(fm(m,b.ref),m.ref?m.queue.push(b):m.start(b))})}),tc(()=>()=>{Me(u.ctrls,d=>d.stop(!0))});const p=l.map(d=>({...d}));return o?[p,o]:p}function Bm(e,t){const n=pe.fun(e),[[r],o]=Pm(1,n?e:[e],n?[]:t);return n||arguments.length==2?[r,o]:r}var Om=class extends fa{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=br(...t);const n=this._get(),r=aa(n);ia(this,r.create(n))}advance(e){const t=this._get(),n=this.get();tn(t,n)||(Yt(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Rc(this._active)&&ya(this)}_get(){const e=pe.arr(this.source)?this.source.map(Et):Pt(Et(this.source));return this.calc(...e)}_start(){this.idle&&!Rc(this._active)&&(this.idle=!1,Me(jo(this),e=>{e.done=!1}),Ft.skipAnimation?(Te.batchedUpdates(()=>this.advance()),ya(this)):Co.start(this))}_attach(){let e=1;Me(Pt(this.source),t=>{Tt(t)&&Vn(t,this),da(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){Me(Pt(this.source),e=>{Tt(e)&&kr(e,this)}),this._active.clear(),ya(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=Pt(this.source).reduce((t,n)=>Math.max(t,(da(n)?n.priority:0)+1),0))}};function _m(e){return e.idle!==!1}function Rc(e){return!e.size||Array.from(e).every(_m)}function ya(e){e.idle||(e.idle=!0,Me(jo(e),t=>{t.done=!0}),xr(e,{type:"idle",parent:e}))}Ft.assign({createStringInterpolator:Ql,to:(e,t)=>new Om(e,t)});var Tc=/^--/;function Rm(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!Tc.test(e)&&!(jr.hasOwnProperty(e)&&jr[e])?t+"px":(""+t).trim()}var Nc={};function Tm(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{style:r,children:o,scrollTop:a,scrollLeft:s,viewBox:u,...h}=t,g=Object.values(h),f=Object.keys(h).map(x=>n||e.hasAttribute(x)?x:Nc[x]||(Nc[x]=x.replace(/([A-Z])/g,l=>"-"+l.toLowerCase())));o!==void 0&&(e.textContent=o);for(const x in r)if(r.hasOwnProperty(x)){const l=Rm(x,r[x]);Tc.test(x)?e.style.setProperty(x,l):e.style[x]=l}f.forEach((x,l)=>{e.setAttribute(x,g[l])}),a!==void 0&&(e.scrollTop=a),s!==void 0&&(e.scrollLeft=s),u!==void 0&&e.setAttribute("viewBox",u)}var jr={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},Nm=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),jm=["Webkit","Ms","Moz","O"];jr=Object.keys(jr).reduce((e,t)=>(jm.forEach(n=>e[Nm(n,t)]=e[t]),e),jr);var Am=/^(matrix|translate|scale|rotate|skew)/,Lm=/^(translate)/,Im=/^(rotate|skew)/,va=(e,t)=>pe.num(e)&&e!==0?e+t:e,Mo=(e,t)=>pe.arr(e)?e.every(n=>Mo(n,t)):pe.num(e)?e===t:parseFloat(e)===t,Dm=class extends Lo{constructor({x:e,y:t,z:n,...r}){const o=[],a=[];(e||t||n)&&(o.push([e||0,t||0,n||0]),a.push(s=>[`translate3d(${s.map(u=>va(u,"px")).join(",")})`,Mo(s,0)])),Jt(r,(s,u)=>{if(u==="transform")o.push([s||""]),a.push(h=>[h,h===""]);else if(Am.test(u)){if(delete r[u],pe.und(s))return;const h=Lm.test(u)?"px":Im.test(u)?"deg":"";o.push(Pt(s)),a.push(u==="rotate3d"?([g,f,x,l])=>[`rotate3d(${g},${f},${x},${va(l,h)})`,Mo(l,0)]:g=>[`${u}(${g.map(f=>va(f,h)).join(",")})`,Mo(g,u.startsWith("scale")?1:0)])}}),o.length&&(r.transform=new Mm(o,a)),super(r)}},Mm=class extends Gl{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 Me(this.inputs,(n,r)=>{const o=Et(n[0]),[a,s]=this.transforms[r](pe.arr(o)?o:n.map(Et));e+=" "+a,t=t&&s}),t?"none":e}observerAdded(e){e==1&&Me(this.inputs,t=>Me(t,n=>Tt(n)&&Vn(n,this)))}observerRemoved(e){e==0&&Me(this.inputs,t=>Me(t,n=>Tt(n)&&kr(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),xr(this,e)}},Fm=["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"];Ft.assign({batchedUpdates:sn.unstable_batchedUpdates,createStringInterpolator:Ql,colors:Pp});var Um=im(Fm,{applyAnimatedValues:Tm,createAnimatedStyle:e=>new Dm(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),$m=Um.animated;function jc(e){const{rows:t}=e,n=Bm({from:{opacity:0},to:{opacity:1}});return E.jsxs($m.div,{style:n,className:"flex w-full animate-pulse flex-col items-start space-y-3",children:[[...Array(t)].map((r,o)=>E.jsx("div",{className:"h-16 w-full rounded-lg bg-gray-100 p-5"},`skeleton_rows_${o}`)),E.jsx("span",{className:"sr-only",children:"Loading..."})]})}function Vm({item:e}){return E.jsx("th",{className:`h-10 min-w-max items-center px-4 ${e.align==="left"?"text-start":e.align==="center"?"text-center":"text-end"}`,children:E.jsx(qe,{size:"xs",weight:"normal",color:"text-gray-700",children:e&&e.value})})}function Hm({row:e,onClick:t}){return E.jsx("tr",{children:e.columns.map((n,r)=>E.jsx("td",{children:E.jsx("div",{className:`my-auto flex h-12 w-full items-center ${n.align==="left"?"justify-start":n.align==="center"?"justify-center":"justify-end"} truncate px-4 font-thin`,children:n.value.type==="button_component"?E.jsx(Je,{label:n.value.label??"",disabled:n.value.disabled,onClick:()=>t&&t(n.value.id)}):E.jsx(qe,{size:"sm",weight:"light",color:"text-gray-700",children:n.value.title})})},`${n.value}-${r}`))})}function zm(e){return E.jsx(E.Fragment,{children:[...Array(e.rows)].map((t,n)=>E.jsx("tr",{className:"border-b border-gray-50",children:[...Array(e.columns)].map((r,o)=>E.jsx("td",{className:"table-cell animate-pulse",children:E.jsx("div",{className:`flex grow items-center ${e.type=="double"?"h-[72px]":"h-12"}`,children:E.jsx("div",{className:"m-2 h-8 w-28 rounded-lg bg-gray-50"})})},`form_element_skeleton_col_${o}`))},`form_element_skeleton_${n}`))})}function Ac({header:e=[],rows:t=[],pending:n,onClick:r}){const{t:o}=Ye();return E.jsxs("div",{className:"relative overflow-auto rounded-lg rounded-b-lg rounded-t-lg border border-gray-900/10",children:[E.jsxs("table",{className:"table w-full table-auto",children:[E.jsx("thead",{className:"sticky top-0 table-header-group w-full bg-gray-50",children:E.jsx("tr",{children:e.map((a,s)=>E.jsx(Vm,{item:a},`${a.value}-${s}`))})}),E.jsx("tbody",{children:n?E.jsx(zm,{columns:e.length??5,rows:t.length??10}):t.map((a,s)=>E.jsx(Hm,{row:a,onClick:r},s))})]}),!t.length&&E.jsx("div",{className:"p-6",children:E.jsx(qe,{color:"text-gray-200",className:"text-center",size:"sm",children:o("noData")})})]})}function ba(e){"@babel/helpers - typeof";return ba=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},ba(e)}function Lc(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":ba(XMLHttpRequest))==="object"}function qm(e){return!!e&&typeof e.then=="function"}function Km(e){return qm(e)?e:Promise.resolve(e)}function Wm(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 wa={exports:{}},Fo={exports:{}},Ic;function Gm(){return Ic||(Ic=1,function(e,t){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof _n<"u"&&_n,r=function(){function a(){this.fetch=!1,this.DOMException=n.DOMException}return a.prototype=n,new a}();(function(a){(function(s){var u=typeof a<"u"&&a||typeof self<"u"&&self||typeof u<"u"&&u,h={searchParams:"URLSearchParams"in u,iterable:"Symbol"in u&&"iterator"in Symbol,blob:"FileReader"in u&&"Blob"in u&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in u,arrayBuffer:"ArrayBuffer"in u};function g(P){return P&&DataView.prototype.isPrototypeOf(P)}if(h.arrayBuffer)var f=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],x=ArrayBuffer.isView||function(P){return P&&f.indexOf(Object.prototype.toString.call(P))>-1};function l(P){if(typeof P!="string"&&(P=String(P)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(P)||P==="")throw new TypeError('Invalid character in header field name: "'+P+'"');return P.toLowerCase()}function y(P){return typeof P!="string"&&(P=String(P)),P}function i(P){var L={next:function(){var q=P.shift();return{done:q===void 0,value:q}}};return h.iterable&&(L[Symbol.iterator]=function(){return L}),L}function c(P){this.map={},P instanceof c?P.forEach(function(L,q){this.append(q,L)},this):Array.isArray(P)?P.forEach(function(L){this.append(L[0],L[1])},this):P&&Object.getOwnPropertyNames(P).forEach(function(L){this.append(L,P[L])},this)}c.prototype.append=function(P,L){P=l(P),L=y(L);var q=this.map[P];this.map[P]=q?q+", "+L:L},c.prototype.delete=function(P){delete this.map[l(P)]},c.prototype.get=function(P){return P=l(P),this.has(P)?this.map[P]:null},c.prototype.has=function(P){return this.map.hasOwnProperty(l(P))},c.prototype.set=function(P,L){this.map[l(P)]=y(L)},c.prototype.forEach=function(P,L){for(var q in this.map)this.map.hasOwnProperty(q)&&P.call(L,this.map[q],q,this)},c.prototype.keys=function(){var P=[];return this.forEach(function(L,q){P.push(q)}),i(P)},c.prototype.values=function(){var P=[];return this.forEach(function(L){P.push(L)}),i(P)},c.prototype.entries=function(){var P=[];return this.forEach(function(L,q){P.push([q,L])}),i(P)},h.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);function p(P){if(P.bodyUsed)return Promise.reject(new TypeError("Already read"));P.bodyUsed=!0}function d(P){return new Promise(function(L,q){P.onload=function(){L(P.result)},P.onerror=function(){q(P.error)}})}function m(P){var L=new FileReader,q=d(L);return L.readAsArrayBuffer(P),q}function v(P){var L=new FileReader,q=d(L);return L.readAsText(P),q}function b(P){for(var L=new Uint8Array(P),q=new Array(L.length),K=0;K<L.length;K++)q[K]=String.fromCharCode(L[K]);return q.join("")}function C(P){if(P.slice)return P.slice(0);var L=new Uint8Array(P.byteLength);return L.set(new Uint8Array(P)),L.buffer}function S(){return this.bodyUsed=!1,this._initBody=function(P){this.bodyUsed=this.bodyUsed,this._bodyInit=P,P?typeof P=="string"?this._bodyText=P:h.blob&&Blob.prototype.isPrototypeOf(P)?this._bodyBlob=P:h.formData&&FormData.prototype.isPrototypeOf(P)?this._bodyFormData=P:h.searchParams&&URLSearchParams.prototype.isPrototypeOf(P)?this._bodyText=P.toString():h.arrayBuffer&&h.blob&&g(P)?(this._bodyArrayBuffer=C(P.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):h.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(P)||x(P))?this._bodyArrayBuffer=C(P):this._bodyText=P=Object.prototype.toString.call(P):this._bodyText="",this.headers.get("content-type")||(typeof P=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):h.searchParams&&URLSearchParams.prototype.isPrototypeOf(P)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},h.blob&&(this.blob=function(){var P=p(this);if(P)return P;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 P=p(this);return P||(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(m)}),this.text=function(){var P=p(this);if(P)return P;if(this._bodyBlob)return v(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(b(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},h.formData&&(this.formData=function(){return this.text().then(j)}),this.json=function(){return this.text().then(JSON.parse)},this}var k=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function B(P){var L=P.toUpperCase();return k.indexOf(L)>-1?L:P}function O(P,L){if(!(this instanceof O))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');L=L||{};var q=L.body;if(P instanceof O){if(P.bodyUsed)throw new TypeError("Already read");this.url=P.url,this.credentials=P.credentials,L.headers||(this.headers=new c(P.headers)),this.method=P.method,this.mode=P.mode,this.signal=P.signal,!q&&P._bodyInit!=null&&(q=P._bodyInit,P.bodyUsed=!0)}else this.url=String(P);if(this.credentials=L.credentials||this.credentials||"same-origin",(L.headers||!this.headers)&&(this.headers=new c(L.headers)),this.method=B(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")&&q)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(q),(this.method==="GET"||this.method==="HEAD")&&(L.cache==="no-store"||L.cache==="no-cache")){var K=/([?&])_=[^&]*/;if(K.test(this.url))this.url=this.url.replace(K,"$1_="+new Date().getTime());else{var Q=/\?/;this.url+=(Q.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}O.prototype.clone=function(){return new O(this,{body:this._bodyInit})};function j(P){var L=new FormData;return P.trim().split("&").forEach(function(q){if(q){var K=q.split("="),Q=K.shift().replace(/\+/g," "),Z=K.join("=").replace(/\+/g," ");L.append(decodeURIComponent(Q),decodeURIComponent(Z))}}),L}function I(P){var L=new c,q=P.replace(/\r?\n[\t ]+/g," ");return q.split("\r").map(function(K){return K.indexOf(`
73
- `)===0?K.substr(1,K.length):K}).forEach(function(K){var Q=K.split(":"),Z=Q.shift().trim();if(Z){var ee=Q.join(":").trim();L.append(Z,ee)}}),L}S.call(O.prototype);function D(P,L){if(!(this instanceof D))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 c(L.headers),this.url=L.url||"",this._initBody(P)}S.call(D.prototype),D.prototype.clone=function(){return new D(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},D.error=function(){var P=new D(null,{status:0,statusText:""});return P.type="error",P};var M=[301,302,303,307,308];D.redirect=function(P,L){if(M.indexOf(L)===-1)throw new RangeError("Invalid status code");return new D(null,{status:L,headers:{location:P}})},s.DOMException=u.DOMException;try{new s.DOMException}catch{s.DOMException=function(L,q){this.message=L,this.name=q;var K=Error(L);this.stack=K.stack},s.DOMException.prototype=Object.create(Error.prototype),s.DOMException.prototype.constructor=s.DOMException}function $(P,L){return new Promise(function(q,K){var Q=new O(P,L);if(Q.signal&&Q.signal.aborted)return K(new s.DOMException("Aborted","AbortError"));var Z=new XMLHttpRequest;function ee(){Z.abort()}Z.onload=function(){var ne={status:Z.status,statusText:Z.statusText,headers:I(Z.getAllResponseHeaders()||"")};ne.url="responseURL"in Z?Z.responseURL:ne.headers.get("X-Request-URL");var me="response"in Z?Z.response:Z.responseText;setTimeout(function(){q(new D(me,ne))},0)},Z.onerror=function(){setTimeout(function(){K(new TypeError("Network request failed"))},0)},Z.ontimeout=function(){setTimeout(function(){K(new TypeError("Network request failed"))},0)},Z.onabort=function(){setTimeout(function(){K(new s.DOMException("Aborted","AbortError"))},0)};function ue(ne){try{return ne===""&&u.location.href?u.location.href:ne}catch{return ne}}Z.open(Q.method,ue(Q.url),!0),Q.credentials==="include"?Z.withCredentials=!0:Q.credentials==="omit"&&(Z.withCredentials=!1),"responseType"in Z&&(h.blob?Z.responseType="blob":h.arrayBuffer&&Q.headers.get("Content-Type")&&Q.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(Z.responseType="arraybuffer")),L&&typeof L.headers=="object"&&!(L.headers instanceof c)?Object.getOwnPropertyNames(L.headers).forEach(function(ne){Z.setRequestHeader(ne,y(L.headers[ne]))}):Q.headers.forEach(function(ne,me){Z.setRequestHeader(me,ne)}),Q.signal&&(Q.signal.addEventListener("abort",ee),Z.onreadystatechange=function(){Z.readyState===4&&Q.signal.removeEventListener("abort",ee)}),Z.send(typeof Q._bodyInit>"u"?null:Q._bodyInit)})}return $.polyfill=!0,u.fetch||(u.fetch=$,u.Headers=c,u.Request=O,u.Response=D),s.Headers=c,s.Request=O,s.Response=D,s.fetch=$,s})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=n.fetch?n:r;t=o.fetch,t.default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t}(Fo,Fo.exports)),Fo.exports}(function(e,t){var n;if(typeof fetch=="function"&&(typeof _n<"u"&&_n.fetch?n=_n.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof Wm<"u"&&typeof window>"u"){var r=n||Gm();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(wa,wa.exports);var Dc=wa.exports;const Mc=Xo(Dc),Fc=Xu({__proto__:null,default:Mc},[Dc]);function Uc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function $c(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Uc(Object(n),!0).forEach(function(r){Xm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uc(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xm(e,t,n){return t=Jm(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jm(e){var t=Ym(e,"string");return En(t)=="symbol"?t:t+""}function Ym(e,t){if(En(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(En(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function En(e){"@babel/helpers - typeof";return En=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},En(e)}var nn;typeof fetch=="function"&&(typeof global<"u"&&global.fetch?nn=global.fetch:typeof window<"u"&&window.fetch?nn=window.fetch:nn=fetch);var Ar;Lc()&&(typeof global<"u"&&global.XMLHttpRequest?Ar=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(Ar=window.XMLHttpRequest));var Uo;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?Uo=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(Uo=window.ActiveXObject)),!nn&&Fc&&!Ar&&!Uo&&(nn=Mc||Fc),typeof nn!="function"&&(nn=void 0);var xa=function(t,n){if(n&&En(n)==="object"){var r="";for(var o in n)r+="&"+encodeURIComponent(o)+"="+encodeURIComponent(n[o]);if(!r)return t;t=t+(t.indexOf("?")!==-1?"&":"?")+r.slice(1)}return t},Vc=function(t,n,r,o){var a=function(h){if(!h.ok)return r(h.statusText||"Error",{status:h.status});h.text().then(function(g){r(null,{status:h.status,data:g})}).catch(r)};if(o){var s=o(t,n);if(s instanceof Promise){s.then(a).catch(r);return}}typeof fetch=="function"?fetch(t,n).then(a).catch(r):nn(t,n).then(a).catch(r)},Hc=!1,Qm=function(t,n,r,o){t.queryStringParams&&(n=xa(n,t.queryStringParams));var a=$c({},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&&(a["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(a["Content-Type"]="application/json");var s=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,u=$c({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:a},Hc?{}:s),h=typeof t.alternateFetch=="function"&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{Vc(n,u,o,h)}catch(g){if(!s||Object.keys(s).length===0||!g.message||g.message.indexOf("not implemented")<0)return o(g);try{Object.keys(s).forEach(function(f){delete u[f]}),Vc(n,u,o,h),Hc=!0}catch(f){o(f)}}},Zm=function(t,n,r,o){r&&En(r)==="object"&&(r=xa("",r).slice(1)),t.queryStringParams&&(n=xa(n,t.queryStringParams));try{var a;Ar?a=new Ar:a=new Uo("MSXML2.XMLHTTP.3.0"),a.open(r?"POST":"GET",n,1),t.crossDomain||a.setRequestHeader("X-Requested-With","XMLHttpRequest"),a.withCredentials=!!t.withCredentials,r&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.overrideMimeType&&a.overrideMimeType("application/json");var s=t.customHeaders;if(s=typeof s=="function"?s():s,s)for(var u in s)a.setRequestHeader(u,s[u]);a.onreadystatechange=function(){a.readyState>3&&o(a.status>=400?a.statusText:null,{status:a.status,data:a.responseText})},a.send(r)}catch(h){console&&console.log(h)}},eg=function(t,n,r,o){if(typeof r=="function"&&(o=r,r=void 0),o=o||function(){},nn&&n.indexOf("file:")!==0)return Qm(t,n,r,o);if(Lc()||typeof ActiveXObject=="function")return Zm(t,n,r,o);o(new Error("No fetch and no xhr implementation found!"))};function zn(e){"@babel/helpers - typeof";return zn=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},zn(e)}function zc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function ka(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zc(Object(n),!0).forEach(function(r){qc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zc(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ng(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,Kc(r.key),r)}}function rg(e,t,n){return t&&ng(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function qc(e,t,n){return t=Kc(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kc(e){var t=og(e,"string");return zn(t)=="symbol"?t:t+""}function og(e,t){if(zn(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(zn(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ig=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,o){return qc({},r,o||"")},parseLoadPayload:function(n,r){},request:eg,reloadInterval:typeof window<"u"?!1:60*60*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},Wc=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]:{};tg(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return rg(e,[{key:"init",value:function(n){var r=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=n,this.options=ka(ka(ka({},ig()),this.options||{}),o),this.allOptions=a,this.services&&this.options.reloadInterval){var s=setInterval(function(){return r.reload()},this.options.reloadInterval);zn(s)==="object"&&typeof s.unref=="function"&&s.unref()}}},{key:"readMulti",value:function(n,r,o){this._readAny(n,n,r,r,o)}},{key:"read",value:function(n,r,o){this._readAny([n],n,[r],r,o)}},{key:"_readAny",value:function(n,r,o,a,s){var u=this,h=this.options.loadPath;typeof this.options.loadPath=="function"&&(h=this.options.loadPath(n,o)),h=Km(h),h.then(function(g){if(!g)return s(null,{});var f=u.services.interpolator.interpolate(g,{lng:n.join("+"),ns:o.join("+")});u.loadUrl(f,s,r,a)})}},{key:"loadUrl",value:function(n,r,o,a){var s=this,u=typeof o=="string"?[o]:o,h=typeof a=="string"?[a]:a,g=this.options.parseLoadPayload(u,h);this.options.request(this.options,n,g,function(f,x){if(x&&(x.status>=500&&x.status<600||!x.status))return r("failed loading "+n+"; status code: "+x.status,!0);if(x&&x.status>=400&&x.status<500)return r("failed loading "+n+"; status code: "+x.status,!1);if(!x&&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,y;try{typeof x.data=="string"?l=s.options.parse(x.data,o,a):l=x.data}catch{y="failed parsing "+n+" to json"}if(y)return r(y,!1);r(null,l)})}},{key:"create",value:function(n,r,o,a,s){var u=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var h=this.options.parsePayload(r,o,a),g=0,f=[],x=[];n.forEach(function(l){var y=u.options.addPath;typeof u.options.addPath=="function"&&(y=u.options.addPath(l,r));var i=u.services.interpolator.interpolate(y,{lng:l,ns:r});u.options.request(u.options,i,h,function(c,p){g+=1,f.push(c),x.push(p),g===n.length&&typeof s=="function"&&s(f,x)})})}}},{key:"reload",value:function(){var n=this,r=this.services,o=r.backendConnector,a=r.languageUtils,s=r.logger,u=o.language;if(!(u&&u.toLowerCase()==="cimode")){var h=[],g=function(x){var l=a.toResolveHierarchy(x);l.forEach(function(y){h.indexOf(y)<0&&h.push(y)})};g(u),this.allOptions.preload&&this.allOptions.preload.forEach(function(f){return g(f)}),h.forEach(function(f){n.allOptions.ns.forEach(function(x){o.read(f,x,"read",null,null,function(l,y){l&&s.warn("loading namespace ".concat(x," for language ").concat(f," failed"),l),!l&&y&&s.log("loaded namespace ".concat(x," for language ").concat(f),y),o.loaded("".concat(f,"|").concat(x),l,y)})})})}}}])}();Wc.type="backend";const{slice:ag,forEach:sg}=[];function lg(e){return sg.call(ag.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const Gc=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,cg=(e,t,n)=>{const r=n||{};r.path=r.path||"/";const o=encodeURIComponent(t);let a=`${e}=${o}`;if(r.maxAge>0){const s=r.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");a+=`; Max-Age=${Math.floor(s)}`}if(r.domain){if(!Gc.test(r.domain))throw new TypeError("option domain is invalid");a+=`; Domain=${r.domain}`}if(r.path){if(!Gc.test(r.path))throw new TypeError("option path is invalid");a+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(a+="; HttpOnly"),r.secure&&(a+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return a},Xc={create(e,t,n,r){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+n*60*1e3)),r&&(o.domain=r),document.cookie=cg(e,encodeURIComponent(t),o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let o=n[r];for(;o.charAt(0)===" ";)o=o.substring(1,o.length);if(o.indexOf(t)===0)return o.substring(t.length,o.length)}return null},remove(e){this.create(e,"",-1)}};var ug={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return Xc.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:a}=t;n&&typeof document<"u"&&Xc.create(n,e,r,o,a)}},dg={name:"querystring",lookup(e){var r;let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:o}=window.location;!window.location.search&&((r=window.location.hash)==null?void 0:r.indexOf("?"))>-1&&(o=window.location.hash.substring(window.location.hash.indexOf("?")));const s=o.substring(1).split("&");for(let u=0;u<s.length;u++){const h=s[u].indexOf("=");h>0&&s[u].substring(0,h)===t&&(n=s[u].substring(h+1))}}return n}};let Lr=null;const Jc=()=>{if(Lr!==null)return Lr;try{Lr=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Lr=!1}return Lr};var fg={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&Jc())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&Jc()&&window.localStorage.setItem(n,e)}};let Ir=null;const Yc=()=>{if(Ir!==null)return Ir;try{Ir=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Ir=!1}return Ir};var hg={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&Yc())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&Yc()&&window.sessionStorage.setItem(n,e)}},pg={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:o}=navigator;if(n)for(let a=0;a<n.length;a++)t.push(n[a]);r&&t.push(r),o&&t.push(o)}return t.length>0?t:void 0}},mg={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}},gg={name:"path",lookup(e){var o;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(o=n[typeof t=="number"?t:0])==null?void 0:o.replace("/",""):void 0}},yg={name:"subdomain",lookup(e){var o,a;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((a=(o=window.location)==null?void 0:o.hostname)==null?void 0:a.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};function vg(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class Qc{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=lg(n,this.options||{},vg()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(ug),this.addDetector(dg),this.addDetector(fg),this.addDetector(hg),this.addDetector(pg),this.addDetector(mg),this.addDetector(gg),this.addDetector(yg)}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 o=this.detectors[r].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(n=n.concat(o))}}),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)}))}}Qc.type="languageDetector",pt.use(Wc).use(Qc).use(fp).init({fallbackLng:"en",interpolation:{escapeValue:!1},backend:{loadPath:"https://translations.piggy.eu/portal-sessions/{{lng}}.json"}});function bg({children:e,config:t,payload:n}){const[r,o]=H.useState("");return H.useEffect(()=>{r||(it.initialize(t.apiKey,t.host),localStorage.setItem("apiKey",JSON.stringify(t.apiKey)),(async()=>{const a=await vo.create(n);o(a.data.data.uuid)})())},[t,n,r]),r?E.jsxs(H.StrictMode,{children:[E.jsx(pl,{...t,sessionUuid:r,children:E.jsxs("div",{className:"flex h-screen w-screen bg-primary-50",children:[r&&E.jsx(kl,{}),e]})}),E.jsx(hs,{position:"bottom-center"})]}):E.jsx(E.Fragment,{children:"Loading..."})}/**
72
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function q(V,U){(U==null||U>V.length)&&(U=V.length);for(var J=0,w=new Array(U);J<U;J++)w[J]=V[J];return w}function K(V){return K=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(U){return typeof U}:function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},K(V)}function Q(V,U){var J=Object.keys(V);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(V);U&&(w=w.filter(function(_){return Object.getOwnPropertyDescriptor(V,_).enumerable})),J.push.apply(J,w)}return J}function Z(V,U){for(var J=0;J<U.length;J++){var w=U[J];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(V,ue(w.key),w)}}function ee(V,U,J){return(U=ue(U))in V?Object.defineProperty(V,U,{value:J,enumerable:!0,configurable:!0,writable:!0}):V[U]=J,V}function ue(V){var U=function(J,w){if(K(J)!="object"||!J)return J;var _=J[Symbol.toPrimitive];if(_!==void 0){var N=_.call(J,w);if(K(N)!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(J)}(V,"string");return K(U)=="symbol"?U:U+""}var ne=function(){return V=function w(_,N){var R=this;if(function(oe,ge){if(!(oe instanceof ge))throw new TypeError("Cannot call a class as a function")}(this,w),ee(this,"input",void 0),ee(this,"options",void 0),ee(this,"utilities",void 0),ee(this,"caretPosition",void 0),ee(this,"caretPositionEnd",void 0),ee(this,"keyboardDOM",void 0),ee(this,"keyboardPluginClasses",void 0),ee(this,"keyboardDOMClass",void 0),ee(this,"buttonElements",void 0),ee(this,"currentInstanceName",void 0),ee(this,"allKeyboardInstances",void 0),ee(this,"keyboardInstanceNames",void 0),ee(this,"isFirstKeyboardInstance",void 0),ee(this,"physicalKeyboard",void 0),ee(this,"modules",void 0),ee(this,"activeButtonClass",void 0),ee(this,"holdInteractionTimeout",void 0),ee(this,"holdTimeout",void 0),ee(this,"isMouseHold",void 0),ee(this,"initialized",void 0),ee(this,"candidateBox",void 0),ee(this,"keyboardRowsDOM",void 0),ee(this,"defaultName","default"),ee(this,"activeInputElement",null),ee(this,"handleParams",function(oe,ge){var ae,be,Ce;if(typeof oe=="string")ae=oe.split(".").join(""),be=document.querySelector(".".concat(ae)),Ce=ge;else if(oe instanceof HTMLDivElement){if(!oe.className)throw console.warn("Any DOM element passed as parameter must have a class."),new Error("KEYBOARD_DOM_CLASS_ERROR");ae=oe.className.split(" ")[0],be=oe,Ce=ge}else ae="simple-keyboard",be=document.querySelector(".".concat(ae)),Ce=oe;return{keyboardDOMClass:ae,keyboardDOM:be,options:Ce}}),ee(this,"getOptions",function(){return R.options}),ee(this,"getCaretPosition",function(){return R.caretPosition}),ee(this,"getCaretPositionEnd",function(){return R.caretPositionEnd}),ee(this,"registerModule",function(oe,ge){R.modules[oe]||(R.modules[oe]={}),ge(R.modules[oe])}),ee(this,"getKeyboardClassString",function(){for(var oe=arguments.length,ge=new Array(oe),ae=0;ae<oe;ae++)ge[ae]=arguments[ae];return[R.keyboardDOMClass].concat(ge).filter(function(be){return!!be}).join(" ")}),typeof window<"u"){var W=this.handleParams(_,N),G=W.keyboardDOMClass,X=W.keyboardDOM,F=W.options,ce=F===void 0?{}:F;this.utilities=new b({getOptions:this.getOptions,getCaretPosition:this.getCaretPosition,getCaretPositionEnd:this.getCaretPositionEnd,dispatch:this.dispatch}),this.caretPosition=null,this.caretPositionEnd=null,this.keyboardDOM=X,this.options=function(oe){for(var ge=1;ge<arguments.length;ge++){var ae=arguments[ge]!=null?arguments[ge]:{};ge%2?Q(Object(ae),!0).forEach(function(be){ee(oe,be,ae[be])}):Object.getOwnPropertyDescriptors?Object.defineProperties(oe,Object.getOwnPropertyDescriptors(ae)):Q(Object(ae)).forEach(function(be){Object.defineProperty(oe,be,Object.getOwnPropertyDescriptor(ae,be))})}return oe}({layoutName:"default",theme:"hg-theme-default",inputName:"default",preventMouseDownDefault:!1,enableLayoutCandidates:!0,excludeFromLayout:{}},ce),this.keyboardPluginClasses="",b.bindMethods(w,this);var fe=this.options.inputName,re=fe===void 0?this.defaultName:fe;if(this.input={},this.input[re]="",this.keyboardDOMClass=G,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 O({dispatch:this.dispatch,getOptions:this.getOptions}),this.candidateBox=this.options.enableLayoutCandidates?new P({utilities:this.utilities,options:this.options}):null,!this.keyboardDOM)throw console.warn('".'.concat(G,'" was not found in the DOM.')),new Error("KEYBOARD_DOM_ERROR");this.render(),this.modules={},this.loadModules()}},U=[{key:"setCaretPosition",value:function(w){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:w;this.caretPosition=w,this.caretPositionEnd=_}},{key:"getInputCandidates",value:function(w){var _=this,N=this.options,R=N.layoutCandidates,W=N.layoutCandidatesCaseSensitiveMatch;if(!R||K(R)!=="object")return{};var G=Object.keys(R).filter(function(ce){var fe=w.substring(0,_.getCaretPositionEnd()||0)||w,re=new RegExp("".concat(_.utilities.escapeRegex(ce),"$"),W?"g":"gi");return!!L(fe.matchAll(re)).length});if(G.length>1){var X=G.sort(function(ce,fe){return fe.length-ce.length})[0];return{candidateKey:X,candidateValue:R[X]}}if(G.length){var F=G[0];return{candidateKey:F,candidateValue:R[F]}}return{}}},{key:"showCandidatesBox",value:function(w,_,N){var R=this;this.candidateBox&&this.candidateBox.show({candidateValue:_,targetElement:N,onSelect:function(W,G){var X=R.options,F=X.layoutCandidatesCaseSensitiveMatch,ce=X.disableCandidateNormalization,fe=X.enableLayoutCandidatesKeyPress,re=W;ce||(re=W.normalize("NFD")),typeof R.options.beforeInputUpdate=="function"&&R.options.beforeInputUpdate(R);var oe=R.getInput(R.options.inputName,!0),ge=R.getCaretPositionEnd()||0,ae=oe.substring(0,ge||0)||oe,be=new RegExp("".concat(R.utilities.escapeRegex(w),"$"),F?"g":"gi"),Ce=ae.replace(be,re),Fe=oe.replace(ae,Ce),Ae=Ce.length-ae.length,Ve=(ge||oe.length)+Ae;Ve<0&&(Ve=0),R.setInput(Fe,R.options.inputName,!0),R.setCaretPosition(Ve),fe&&typeof R.options.onKeyPress=="function"&&R.options.onKeyPress(W,G),typeof R.options.onChange=="function"&&R.options.onChange(R.getInput(R.options.inputName,!0),G),typeof R.options.onChangeAll=="function"&&R.options.onChangeAll(R.getAllInputs(),G)}})}},{key:"handleButtonClicked",value:function(w,_){var N=this.options,R=N.inputName,W=R===void 0?this.defaultName:R,G=N.debug;if(w!=="{//}"){this.input[W]||(this.input[W]=""),typeof this.options.beforeInputUpdate=="function"&&this.options.beforeInputUpdate(this);var X=this.utilities.getUpdatedInput(w,this.input[W],this.caretPosition,this.caretPositionEnd);if(this.utilities.isStandardButton(w)&&this.activeInputElement&&this.input[W]&&this.input[W]===X&&this.caretPosition===0&&this.caretPositionEnd===X.length)return this.setInput("",this.options.inputName,!0),this.setCaretPosition(0),this.activeInputElement.value="",this.activeInputElement.setSelectionRange(0,0),void this.handleButtonClicked(w,_);if(typeof this.options.onKeyPress=="function"&&this.options.onKeyPress(w,_),this.input[W]!==X&&(!this.options.inputPattern||this.options.inputPattern&&this.inputPatternIsValid(X))){if(this.options.maxLength&&this.utilities.handleMaxLength(this.input,X))return;var F=this.utilities.getUpdatedInput(w,this.input[W],this.caretPosition,this.caretPositionEnd,!0);if(this.setInput(F,this.options.inputName,!0),G&&console.log("Input changed:",this.getAllInputs()),this.options.debug&&console.log("Caret at: ",this.getCaretPosition(),this.getCaretPositionEnd(),"(".concat(this.keyboardDOMClass,")"),_==null?void 0:_.type),this.options.syncInstanceInputs&&this.syncInstanceInputs(),typeof this.options.onChange=="function"&&this.options.onChange(this.getInput(this.options.inputName,!0),_),typeof this.options.onChangeAll=="function"&&this.options.onChangeAll(this.getAllInputs(),_),_!=null&&_.target&&this.options.enableLayoutCandidates){var ce,fe=this.getInputCandidates(X),re=fe.candidateKey,oe=fe.candidateValue;re&&oe?this.showCandidatesBox(re,oe,this.keyboardDOM):(ce=this.candidateBox)===null||ce===void 0||ce.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)),G&&console.log("Key pressed:",w)}}},{key:"getMouseHold",value:function(){return this.isMouseHold}},{key:"setMouseHold",value:function(w){this.options.syncInstanceInputs?this.dispatch(function(_){_.isMouseHold=w}):this.isMouseHold=w}},{key:"handleButtonMouseDown",value:function(w,_){var N=this;_&&(this.options.preventMouseDownDefault&&_.preventDefault(),this.options.stopMouseDownPropagation&&_.stopPropagation(),_.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(){(N.getMouseHold()&&(!w.includes("{")&&!w.includes("}")||w==="{delete}"||w==="{backspace}"||w==="{bksp}"||w==="{space}"||w==="{tab}")||w==="{arrowright}"||w==="{arrowleft}"||w==="{arrowup}"||w==="{arrowdown}")&&(N.options.debug&&console.log("Button held:",w),N.handleButtonHold(w)),clearTimeout(N.holdTimeout)},500))}},{key:"handleButtonMouseUp",value:function(w,_){var N=this;_&&(this.options.preventMouseUpDefault&&_.preventDefault&&_.preventDefault(),this.options.stopMouseUpPropagation&&_.stopPropagation&&_.stopPropagation(),!(_.target===this.keyboardDOM||_.target&&this.keyboardDOM.contains(_.target)||this.candidateBox&&this.candidateBox.candidateBoxElement&&(_.target===this.candidateBox.candidateBoxElement||_.target&&this.candidateBox.candidateBoxElement.contains(_.target)))&&this.candidateBox&&this.candidateBox.destroy()),this.recurseButtons(function(R){R.classList.remove(N.activeButtonClass)}),this.setMouseHold(!1),this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),w&&typeof this.options.onKeyReleased=="function"&&this.options.onKeyReleased(w,_)}},{key:"handleKeyboardContainerMouseDown",value:function(w){this.options.preventMouseDownDefault&&w.preventDefault()}},{key:"handleButtonHold",value:function(w){var _=this;this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),this.holdInteractionTimeout=window.setTimeout(function(){_.getMouseHold()?(_.handleButtonClicked(w),_.handleButtonHold(w)):clearTimeout(_.holdInteractionTimeout)},100)}},{key:"syncInstanceInputs",value:function(){var w=this;this.dispatch(function(_){_.replaceInput(w.input),_.setCaretPosition(w.caretPosition,w.caretPositionEnd)})}},{key:"clearInput",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.inputName||this.defaultName;this.input[w]="",this.setCaretPosition(0),this.options.syncInstanceInputs&&this.syncInstanceInputs()}},{key:"getInput",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.inputName||this.defaultName,_=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return this.options.syncInstanceInputs&&!_&&this.syncInstanceInputs(),this.options.rtl?"‫"+this.input[w].replace("‫","").replace("‬","")+"‬":this.input[w]}},{key:"getAllInputs",value:function(){var w=this,_={};return Object.keys(this.input).forEach(function(N){_[N]=w.getInput(N,!0)}),_}},{key:"setInput",value:function(w){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.inputName||this.defaultName,N=arguments.length>2?arguments[2]:void 0;this.input[_]=w,!N&&this.options.syncInstanceInputs&&this.syncInstanceInputs()}},{key:"replaceInput",value:function(w){this.input=w}},{key:"setOptions",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},_=this.changedOptions(w);this.options=Object.assign(this.options,w),_.length&&(this.options.debug&&console.log("changedOptions",_),this.onSetOptions(_),this.render())}},{key:"changedOptions",value:function(w){var _=this;return Object.keys(w).filter(function(N){return JSON.stringify(w[N])!==JSON.stringify(_.options[N])})}},{key:"onSetOptions",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];w.includes("layoutName")&&this.candidateBox&&this.candidateBox.destroy(),(w.includes("layoutCandidatesPageSize")||w.includes("layoutCandidates"))&&this.candidateBox&&(this.candidateBox.destroy(),this.candidateBox=new P({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(w){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(_){w(window.SimpleKeyboardInstances[_],_)})}},{key:"addButtonTheme",value:function(w,_){var N=this;_&&w&&(w.split(" ").forEach(function(R){_.split(" ").forEach(function(W){N.options.buttonTheme||(N.options.buttonTheme=[]);var G=!1;N.options.buttonTheme.map(function(X){if(X!=null&&X.class.split(" ").includes(W)){G=!0;var F=X.buttons.split(" ");F.includes(R)||(G=!0,F.push(R),X.buttons=F.join(" "))}return X}),G||N.options.buttonTheme.push({class:W,buttons:w})})}),this.render())}},{key:"removeButtonTheme",value:function(w,_){var N=this;if(!w&&!_)return this.options.buttonTheme=[],void this.render();w&&Array.isArray(this.options.buttonTheme)&&this.options.buttonTheme.length&&(w.split(" ").forEach(function(R){var W;(W=N.options)===null||W===void 0||(W=W.buttonTheme)===null||W===void 0||W.map(function(G,X){if(G&&_&&_.includes(G.class)||!_){var F,ce,fe=(F=G)===null||F===void 0?void 0:F.buttons.split(" ").filter(function(re){return re!==R});G&&fe!=null&&fe.length?G.buttons=fe.join(" "):((ce=N.options.buttonTheme)===null||ce===void 0||ce.splice(X,1),G=null)}return G})}),this.render())}},{key:"getButtonElement",value:function(w){var _,N=this.buttonElements[w];return N&&(_=N.length>1?N:N[0]),_}},{key:"inputPatternIsValid",value:function(w){var _,N=this.options.inputPattern;if((_=N instanceof RegExp?N:N[this.options.inputName||this.defaultName])&&w){var R=_.test(w);return this.options.debug&&console.log('inputPattern ("'.concat(_,'"): ').concat(R?"passed":"did not pass!")),R}return!0}},{key:"setEventListeners",value:function(){if(this.isFirstKeyboardInstance||!this.allKeyboardInstances){this.options.debug&&console.log("Caret handling started (".concat(this.keyboardDOMClass,")"));var w=this.options.physicalKeyboardHighlightPreventDefault,_=w!==void 0&&w;document.addEventListener("keyup",this.handleKeyUp,_),document.addEventListener("keydown",this.handleKeyDown,_),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("touchend",this.handleTouchEnd),document.addEventListener("selectionchange",this.handleSelectionChange),document.addEventListener("select",this.handleSelect)}}},{key:"handleKeyUp",value:function(w){this.caretEventHandler(w),this.options.physicalKeyboardHighlight&&this.physicalKeyboard.handleHighlightKeyUp(w)}},{key:"handleKeyDown",value:function(w){this.options.physicalKeyboardHighlight&&this.physicalKeyboard.handleHighlightKeyDown(w)}},{key:"handleMouseUp",value:function(w){this.caretEventHandler(w)}},{key:"handleTouchEnd",value:function(w){this.caretEventHandler(w)}},{key:"handleSelect",value:function(w){this.caretEventHandler(w)}},{key:"handleSelectionChange",value:function(w){navigator.userAgent.includes("Firefox")||this.caretEventHandler(w)}},{key:"caretEventHandler",value:function(w){var _,N=this;w.target.tagName&&(_=w.target.tagName.toLowerCase()),this.dispatch(function(R){var W=w.target===R.keyboardDOM||w.target&&R.keyboardDOM.contains(w.target);if(N.options.syncInstanceInputs&&Array.isArray(w.path)&&(W=w.path.some(function(F){var ce;return F==null||(ce=F.hasAttribute)===null||ce===void 0?void 0:ce.call(F,"data-skInstance")})),(_==="textarea"||_==="input"&&["text","search","url","tel","password"].includes(w.target.type))&&!R.options.disableCaretPositioning){var G=w.target.selectionStart,X=w.target.selectionEnd;R.options.rtl&&(G=R.utilities.getRtlOffset(G,R.getInput()),X=R.utilities.getRtlOffset(X,R.getInput())),R.setCaretPosition(G,X),N.activeInputElement=w.target,R.options.debug&&console.log("Caret at: ",R.getCaretPosition(),R.getCaretPositionEnd(),w&&w.target.tagName.toLowerCase(),"(".concat(R.keyboardDOMClass,")"),w==null?void 0:w.type)}else!R.options.disableCaretPositioning&&W||(w==null?void 0:w.type)==="selectionchange"||(R.setCaretPosition(null),N.activeInputElement=null,R.options.debug&&console.log('Caret position reset due to "'.concat(w==null?void 0:w.type,'" event'),w))})}},{key:"recurseButtons",value:function(w){var _=this;w&&Object.keys(this.buttonElements).forEach(function(N){return _.buttonElements[N].forEach(w)})}},{key:"destroy",value:function(){this.options.debug&&console.log("Destroying simple-keyboard instance: ".concat(this.currentInstanceName));var w=this.options.physicalKeyboardHighlightPreventDefault,_=w!==void 0&&w;document.removeEventListener("keyup",this.handleKeyUp,_),document.removeEventListener("keydown",this.handleKeyDown,_),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(N){N&&(N.onpointerdown=null,N.onpointerup=null,N.onpointercancel=null,N.ontouchstart=null,N.ontouchend=null,N.ontouchcancel=null,N.onclick=null,N.onmousedown=null,N.onmouseup=null,N.remove(),N=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(w){var _=this.options.buttonTheme,N=[];return Array.isArray(_)&&_.forEach(function(R){if(R&&R.class&&typeof R.class=="string"&&R.buttons&&typeof R.buttons=="string"){var W=R.class.split(" ");R.buttons.split(" ").includes(w)&&(N=[].concat(L(N),L(W)))}else console.warn('Incorrect "buttonTheme". Please check the documentation.',R)}),N}},{key:"setDOMButtonAttributes",value:function(w,_){var N=this.options.buttonAttributes;Array.isArray(N)&&N.forEach(function(R){R.attribute&&typeof R.attribute=="string"&&R.value&&typeof R.value=="string"&&R.buttons&&typeof R.buttons=="string"?R.buttons.split(" ").includes(w)&&_(R.attribute,R.value):console.warn('Incorrect "buttonAttributes". Please check the documentation.',R)})}},{key:"onTouchDeviceDetected",value:function(){this.processAutoTouchEvents(),this.disableContextualWindow()}},{key:"disableContextualWindow",value:function(){window.oncontextmenu=function(w){if(w.target.classList.contains("hg-button"))return w.preventDefault(),w.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 w=this;Array.isArray(this.options.modules)&&(this.options.modules.forEach(function(_){var N=new _(w);N.init&&N.init(w)}),this.keyboardPluginClasses="modules-loaded",this.render(),this.onModulesLoaded())}},{key:"getModuleProp",value:function(w,_){return!!this.modules[w]&&this.modules[w][_]}},{key:"getModulesList",value:function(){return Object.keys(this.modules)}},{key:"parseRowDOMContainers",value:function(w,_,N,R){var W=this,G=Array.from(w.children),X=0;return G.length&&N.forEach(function(F,ce){var fe=R[ce];if(!(fe&&fe>F))return!1;var re=F-X,oe=fe-X,ge=document.createElement("div");ge.className+="hg-button-container";var ae="".concat(W.options.layoutName,"-r").concat(_,"c").concat(ce);ge.setAttribute("data-skUID",ae);var be=G.splice(re,oe-re+1);X=oe-re,be.forEach(function(Ce){return ge.appendChild(Ce)}),G.splice(re,0,ge),w.innerHTML="",G.forEach(function(Ce){return w.appendChild(Ce)}),W.options.debug&&console.log("rowDOMContainer",be,re,oe,X+1)}),w}},{key:"render",value:function(){var w=this;this.resetRows(),this.initialized||this.beforeFirstRender(),this.beforeRender();var _="hg-layout-".concat(this.options.layoutName),N=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}"]},R=this.options.useTouchEvents||!1,W=R?"hg-touch-events":"",G=this.options.useMouseEvents||!1,X=this.options.disableRowButtonContainers;this.keyboardDOM.className=this.getKeyboardClassString(this.options.theme,_,this.keyboardPluginClasses,W),this.keyboardDOM.setAttribute("data-skInstance",this.currentInstanceName),this.keyboardRowsDOM=document.createElement("div"),this.keyboardRowsDOM.className="hg-rows",N[this.options.layoutName||this.defaultName].forEach(function(F,ce){var fe=F.split(" ");w.options.excludeFromLayout&&w.options.excludeFromLayout[w.options.layoutName||w.defaultName]&&(fe=fe.filter(function(ae){return w.options.excludeFromLayout&&!w.options.excludeFromLayout[w.options.layoutName||w.defaultName].includes(ae)}));var re=document.createElement("div");re.className+="hg-row";var oe=[],ge=[];fe.forEach(function(ae,be){var Ce,Fe=!X&&typeof ae=="string"&&ae.length>1&&ae.indexOf("[")===0,Ae=!X&&typeof ae=="string"&&ae.length>1&&ae.indexOf("]")===ae.length-1;Fe&&(oe.push(be),ae=ae.replace(/\[/g,"")),Ae&&(ge.push(be),ae=ae.replace(/\]/g,""));var Ve=w.utilities.getButtonClass(ae),ze=w.utilities.getButtonDisplayName(ae,w.options.display,w.options.mergeDisplay),bt=w.options.useButtonTag?"button":"div",Ke=document.createElement(bt);Ke.className+="hg-button ".concat(Ve),(Ce=Ke.classList).add.apply(Ce,L(w.getButtonThemeClasses(ae))),w.setDOMButtonAttributes(ae,function(Ee,Lt){Ke.setAttribute(Ee,Lt)}),w.activeButtonClass="hg-activeButton",!w.utilities.pointerEventsSupported()||R||G?R?(Ke.ontouchstart=function(Ee){w.handleButtonClicked(ae,Ee),w.handleButtonMouseDown(ae,Ee)},Ke.ontouchend=function(Ee){w.handleButtonMouseUp(ae,Ee)},Ke.ontouchcancel=function(Ee){w.handleButtonMouseUp(ae,Ee)}):(Ke.onclick=function(Ee){w.setMouseHold(!1),typeof w.options.onKeyReleased!="function"&&w.handleButtonClicked(ae,Ee)},Ke.onmousedown=function(Ee){typeof w.options.onKeyReleased!="function"||w.isMouseHold||w.handleButtonClicked(ae,Ee),w.handleButtonMouseDown(ae,Ee)},Ke.onmouseup=function(Ee){w.handleButtonMouseUp(ae,Ee)}):(Ke.onpointerdown=function(Ee){w.handleButtonClicked(ae,Ee),w.handleButtonMouseDown(ae,Ee)},Ke.onpointerup=function(Ee){w.handleButtonMouseUp(ae,Ee)},Ke.onpointercancel=function(Ee){w.handleButtonMouseUp(ae,Ee)}),Ke.setAttribute("data-skBtn",ae);var et="".concat(w.options.layoutName,"-r").concat(ce,"b").concat(be);Ke.setAttribute("data-skBtnUID",et);var We=document.createElement("span");We.innerHTML=ze,Ke.appendChild(We),w.buttonElements[ae]||(w.buttonElements[ae]=[]),w.buttonElements[ae].push(Ke),re.appendChild(Ke)}),re=w.parseRowDOMContainers(re,ce,oe,ge),w.keyboardRowsDOM.appendChild(re)}),this.keyboardDOM.appendChild(this.keyboardRowsDOM),this.onRender(),this.initialized||(this.initialized=!0,!this.utilities.pointerEventsSupported()||R||G?R?(document.ontouchend=function(F){return w.handleButtonMouseUp(void 0,F)},document.ontouchcancel=function(F){return w.handleButtonMouseUp(void 0,F)},this.keyboardDOM.ontouchstart=function(F){return w.handleKeyboardContainerMouseDown(F)}):R||(document.onmouseup=function(F){return w.handleButtonMouseUp(void 0,F)},this.keyboardDOM.onmousedown=function(F){return w.handleKeyboardContainerMouseDown(F)}):(document.onpointerup=function(F){return w.handleButtonMouseUp(void 0,F)},this.keyboardDOM.onpointerdown=function(F){return w.handleKeyboardContainerMouseDown(F)}),this.onInit())}}],U&&Z(V.prototype,U),J&&Z(V,J),Object.defineProperty(V,"prototype",{writable:!1}),V;var V,U,J}(),me=ne,de=ne}(),x}()},442:function(u){u.exports=n}},o={};function a(u){var h=o[u];if(h!==void 0)return h.exports;var g=o[u]={exports:{}};return r[u].call(g.exports,g,g.exports,a),g.exports}a.n=function(u){var h=u&&u.__esModule?function(){return u.default}:function(){return u};return a.d(h,{a:h}),h},a.d=function(u,h){for(var g in h)a.o(h,g)&&!a.o(u,g)&&Object.defineProperty(u,g,{enumerable:!0,get:h[g]})},a.o=function(u,h){return Object.prototype.hasOwnProperty.call(u,h)},a.r=function(u){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})};var s={};return function(){a.r(s),a.d(s,{KeyboardReact:function(){return c},default:function(){return p}}),a(981);var u=a(442),h=a(548),g=a.n(h);function f(d){return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},f(d)}function x(d,m){var v=Object.keys(d);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(d);m&&(b=b.filter(function(C){return Object.getOwnPropertyDescriptor(d,C).enumerable})),v.push.apply(v,b)}return v}function l(d){for(var m=1;m<arguments.length;m++){var v=arguments[m]!=null?arguments[m]:{};m%2?x(Object(v),!0).forEach(function(b){y(d,b,v[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(v)):x(Object(v)).forEach(function(b){Object.defineProperty(d,b,Object.getOwnPropertyDescriptor(v,b))})}return d}function y(d,m,v){var b;return b=function(C,S){if(f(C)!="object"||!C)return C;var k=C[Symbol.toPrimitive];if(k!==void 0){var B=k.call(C,S||"default");if(f(B)!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return(S==="string"?String:Number)(C)}(m,"string"),(m=f(b)=="symbol"?b:b+"")in d?Object.defineProperty(d,m,{value:v,enumerable:!0,configurable:!0,writable:!0}):d[m]=v,d}var i=function(d){return l(l({},d),{},{keyboardRef:null})},c=function(d){var m=d.baseClass||"react-simple-keyboard",v=u.useRef(null),b=u.useRef(null),C=u.useRef(null),S=u.useRef(d);return u.useEffect(function(){return function(){C.current&&C.current.destroy(),v.current=!1}},[]),u.useEffect(function(){var k=function(D){return l(l({},D),{},{theme:"simple-keyboard ".concat(D.theme||"hg-theme-default")})}(d);if(!v.current){v.current=!0,k.debug&&console.log("ReactSimpleKeyboard: Init");var B=b.current,O=".".concat(m);C.current=new(g())(B||O,k),k.keyboardRef&&k.keyboardRef(C.current)}var j=function(D,M){var $=i(M),P=i(D);return Object.keys($).filter(function(L){return $[L]!==P[L]})}(S.current,k);if(j.length){var I=C.current;S.current=k,I==null||I.setOptions(k),k.debug&&console.log("ReactSimpleKeyboard - setOptions called due to updated props:",j)}},[v,m,S,d]),u.createElement("div",{className:m,ref:b})},p=c}(),s}()})})(bl);var Jh=bl.exports;const Yh=Xo(Jh);function wl({onChange:e,keyboardRef:t,layout:n,theme:r}){const[o,a]=H.useState("default"),s=u=>{(u==="{shift}"||u==="{lock}")&&a(o==="default"?"shift":"default")};return E.jsx(Yh,{keyboardRef:u=>t.current=u,layoutName:o,layout:n,theme:r,onChange:e,onKeyPress:s,preventMouseDownDefault:!0})}function Qh(){return{subscribe:(r,o)=>{document.addEventListener(r,o)},unsubscribe:(r,o)=>{document.removeEventListener(r,o)},publish:(r,o)=>{const a=new CustomEvent(r,{detail:o});document.dispatchEvent(a)}}}function xl(){const{subscribe:e,unsubscribe:t,publish:n}=Qh();return{initialize:(u,h)=>{e("openKeyboard",u),e("closeKeyboard",h)},terminate:(u,h)=>{t("openKeyboard",u),t("closeKeyboard",h)},open:u=>{n("openKeyboard",{inputId:u.target.id,inputValue:u.target.value})},close:()=>{n("closeKeyboard")}}}function kl(){const[e,t]=H.useState(!1),n=H.useRef(null),r=H.useRef(null),{session:o}=Ct(),{initialize:a,terminate:s}=xl(),u=x=>{var l,y;r.current=document.getElementById(x.detail.inputId),(l=n.current)==null||l.setInput(x.detail.inputValue),(y=r.current)==null||y.addEventListener("input",i=>{var p;const c=i.target;(p=n.current)==null||p.setInput(c==null?void 0:c.value)}),t(!0)},h=()=>t(!1);H.useEffect(()=>(a(u,h),()=>{s(u,h)}),[a,s,e]);const g=x=>{var l,y;if(r&&r.current){f(r.current,x);const i=(l=n.current)==null?void 0:l.getCaretPosition();i&&((y=r.current)==null||y.setSelectionRange(i,i))}},f=(x,l)=>{var c;const y=(c=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:c.set;y==null||y.call(x,l);const i=new Event("input",{bubbles:!0});x.dispatchEvent(i)};return!o||!+(o.input_data.enable_on_screen_keyboard??!1)?E.jsx(E.Fragment,{}):E.jsx("div",{className:`mobile:hidden absolute bottom-2 left-2 right-2 z-50 mx-auto max-w-[1200px] ${!e&&"hidden"}`,children:E.jsx(wl,{keyboardRef:n,onChange:g})})}function Ui({value:e,valueSetter:t}){const n=H.useRef(null),r=o=>{const a=o?(parseFloat(o)/100).toFixed(2):"";t(a)};return E.jsxs("div",{children:[E.jsx("input",{type:"number",readOnly:!0,className:"mb-4 h-full w-full rounded border-gray-200 p-4 text-center text-4xl text-gray-500 focus:ring-0 focus:ring-offset-0",value:e,placeholder:"0,00",onChange:o=>r(o.target.value)}),E.jsx(wl,{keyboardRef:n,layout:{default:["1 2 3","4 5 6","7 8 9","00 0 {bksp}"]},theme:"hg-theme-default hg-layout-numeric numeric-theme",onChange:r})]})}function Dn(e){const{open:t,close:n}=xl(),r=a=>{t(a)},o=()=>{n()};return E.jsxs("div",{className:"relative",onFocus:r,onBlur:o,children:[E.jsx("input",{...e,type:e.type==="date_time"?"datetime-local":e.type==="birth_date"?"date":e.type,placeholder:" ",className:"peer m-0 block max-h-[58px] w-full rounded border border-solid border-gray-300 bg-white bg-clip-padding px-3 py-4 text-base font-normal leading-tight text-gray-700 transition duration-200 ease-linear placeholder:text-transparent focus:border-2 focus:border-primary-600 focus:pb-[0.625rem] focus:pt-[1.625rem] focus:text-neutral-700 focus:outline-none peer-focus:text-primary-600 [&:not(:placeholder-shown)]:pb-[0.625rem] [&:not(:placeholder-shown)]:pt-[1.625rem]",onChange:a=>e.onChange&&e.onChange(a.target.name,a.target.value)}),E.jsx("label",{htmlFor:`${e.label}-id`,className:"pointer-events-none absolute left-0 top-0 w-max origin-[0_0] whitespace-nowrap border border-solid border-transparent px-3 py-4 text-gray-500 transition-[opacity,_transform] duration-200 ease-linear peer-focus:-translate-y-2 peer-focus:translate-x-[0.15rem] peer-focus:scale-[0.85] peer-focus:text-primary-600 peer-[:not(:placeholder-shown)]:-translate-y-2 peer-[:not(:placeholder-shown)]:translate-x-[0.15rem] peer-[:not(:placeholder-shown)]:scale-[0.85] motion-reduce:transition-none",children:e.label})]})}function Zh(e){const t=H.useRef(null),[n,r]=H.useState(!1),[o,a]=H.useState(""),[s,u]=H.useState(e.defaultValue.split(";")),{name:h,onChange:g}=e;return H.useEffect(()=>{function f(x){t.current&&!t.current.contains(x.target)&&r(!1)}return document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f)}},[]),H.useEffect(()=>{g&&g(h,s.join(";"))},[s]),E.jsxs("div",{ref:t,className:"relative w-full",children:[E.jsx("div",{onClick:()=>r(!n),className:`flex h-[54px] w-full cursor-pointer gap-2 truncate rounded border bg-white p-3 leading-[2.75rem] text-gray-700 ${n?"border-2 border-blue-600":"border-gray-300"}`,children:s.sort().reduce((f,x)=>f+=x+(x===s[s.length-1]?"":", "),"")}),E.jsx("div",{className:`pointer-events-none absolute left-0 top-0 origin-[0_0] border border-solid border-transparent px-3 py-4 transition-[opacity,_transform] duration-200 ease-linear motion-reduce:transition-none ${n?"-translate-y-2 translate-x-[0.15rem] scale-[0.85] text-blue-600":"text-gray-500"} ${s.length&&"-translate-y-2 translate-x-[0.15rem] scale-[0.85]"}`,children:e.label}),n&&E.jsxs("div",{className:"absolute z-20 mt-2 flex w-full flex-col gap-3 rounded bg-white p-3 shadow-md",children:[E.jsx("input",{placeholder:"Search",className:"rounded border border-solid border-gray-300 bg-transparent p-3 outline-none",type:"text",onChange:f=>a(f.target.value)}),E.jsx("hr",{}),!e.options.filter(f=>f.label.toLowerCase().includes(o.toLowerCase())).length&&E.jsx("p",{className:"text-center text-sm font-normal text-neutral-400",children:"No results found"}),e.options.map(f=>{if(!(o&&!f.label.toLowerCase().includes(o.toLowerCase())))return E.jsxs("div",{className:"flex items-center",children:[E.jsx("input",{id:f.value,type:"checkbox",value:f.value,checked:s.includes(f.value),readOnly:!0,className:"h-4 w-4 rounded border-gray-300 bg-gray-100 text-blue-600 focus:ring-blue-500",onClick:x=>{x.target.checked?u([...s,x.target.value]):u(s.filter(l=>l!==x.target.value))}}),E.jsx("label",{htmlFor:f.value,className:"text-md ml-2 flex-grow font-normal text-gray-700",children:f.label})]},f.value)})]})]})}function ep(e){return E.jsxs("div",{className:"relative",children:[E.jsx("select",{...e,id:e.id,className:"peer m-0 block max-h-[58px] w-full rounded border border-solid border-gray-300 bg-white bg-clip-padding px-2 py-4 text-base font-normal leading-tight text-gray-700 transition duration-200 ease-linear placeholder:text-transparent focus:border-2 focus:border-primary-600 focus:pb-[0.625rem] focus:pt-[1.625rem] focus:text-neutral-700 focus:outline-none peer-focus:text-primary-600 [&:not(:placeholder-shown)]:pb-[0.625rem] [&:not(:placeholder-shown)]:pt-[1.625rem]",onChange:t=>e.onChange&&e.onChange(t.target.name,t.target.value),children:e.options.map(t=>E.jsx("option",{value:t.value,children:t.label},t.value))}),E.jsx("label",{htmlFor:`${e.label}-id`,className:"pointer-events-none absolute left-0 top-0 w-max origin-[0_0] whitespace-nowrap border border-solid border-transparent px-3 py-4 text-gray-500 transition-[opacity,_transform] duration-200 ease-linear peer-focus:-translate-y-2 peer-focus:translate-x-[0.15rem] peer-focus:scale-[0.85] peer-focus:text-primary-600 peer-[:not(:placeholder-shown)]:-translate-y-2 peer-[:not(:placeholder-shown)]:translate-x-[0.15rem] peer-[:not(:placeholder-shown)]:scale-[0.85] motion-reduce:transition-none",children:e.label})]})}function _t({children:e}){return E.jsx("div",{className:"h-full w-full rounded-lg border border-gray-200 bg-white p-4 shadow sm:p-6 md:p-8",children:e})}function Cl({children:e}){return E.jsxs(_t,{children:[E.jsx("div",{className:"flex items-center justify-center",children:E.jsxs("svg",{className:"stroke h-36 w-36 animate-[scale_.3s_ease-in-out_.9s_both] fill-none stroke-green-600 stroke-2 shadow-[inset_0px_0px_0px_#7ac142]",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 52 52",children:[E.jsx("circle",{className:"animate-[stroke_.6s_linear_forwards] fill-none stroke-green-600 stroke-2",style:{strokeDasharray:166,strokeDashoffset:166},cx:"26",cy:"26",r:"25",fill:"none"}),E.jsx("path",{className:"origin-[50%_50%] animate-[stroke_.3s_linear_.8s_forwards]",style:{strokeDasharray:48,strokeDashoffset:48},fill:"none",d:"M14.1 27.2l7.1 7.2 16.7-16.8"})]})}),e]})}const tp="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4.7002%204.70016L11.2999%2011.2998'%20stroke='%23000'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.2998%204.70016L4.70014%2011.2998'%20stroke='%23000'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";function Mn({title:e,isOpen:t,onClose:n,children:r}){const[o,a]=H.useState(t),s=H.useRef(null);H.useEffect(()=>{a(t)},[t]),H.useEffect(()=>{const g=s.current;g&&(o?g.show():g.close())},[o]);const u=()=>{n&&n(),a(!1)},h=g=>{g.key==="Escape"&&u()};return E.jsx("div",{className:`fixed inset-0 z-40 min-h-screen items-center bg-gray-500 bg-opacity-25 ${o?"flex":"hidden"}`,children:E.jsxs("dialog",{ref:s,onKeyDown:h,className:"scrollbar-hide absolute overflow-auto rounded-lg drop-shadow-md",children:[E.jsxs("div",{className:"flex w-full justify-between bg-gray-50 p-4",children:[E.jsx("p",{className:"truncate text-lg",children:e}),E.jsx("img",{src:tp,alt:"closeButton",className:"h-[25px] w-[25px] cursor-pointer opacity-50 hover:opacity-90",onClick:u})]}),E.jsx("div",{className:"p-6",children:r})]})})}function np(){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 El={};function $i(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];typeof t[0]=="string"&&El[t[0]]||(typeof t[0]=="string"&&(El[t[0]]=new Date),np(...t))}const Sl=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}};function Pl(e,t,n){e.loadNamespaces(t,Sl(e,n))}function Bl(e,t,n,r){typeof n=="string"&&(n=[n]),n.forEach(o=>{e.options.ns.indexOf(o)<0&&e.options.ns.push(o)}),e.loadLanguages(t,Sl(e,r))}function rp(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=t.languages[0],o=t.options?t.options.fallbackLng:!1,a=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(u,h)=>{const g=t.services.backendConnector.state[`${u}|${h}`];return g===-1||g===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!s(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||s(r,e)&&(!o||s(a,e)))}function op(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!t.languages||!t.languages.length?($i("i18n.languages were undefined or empty",t.languages),!0):t.options.ignoreJSONStructure!==void 0?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(o,a)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!a(o.isLanguageChangingTo,e))return!1}}):rp(e,t,n)}const ip=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,ap={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},sp=e=>ap[e];let Vi={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(ip,sp)};function lp(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Vi={...Vi,...e}}function cp(){return Vi}let Ol;function up(e){Ol=e}function dp(){return Ol}const fp={type:"3rdParty",init(e){lp(e.options.react),up(e)}},hp=H.createContext();class pp{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const mp=(e,t)=>{const n=H.useRef();return H.useEffect(()=>{n.current=e},[e,t]),n.current};function _l(e,t,n,r){return e.getFixedT(t,n,r)}function gp(e,t,n,r){return H.useCallback(_l(e,t,n,r),[e,t,n,r])}function Qe(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=t,{i18n:r,defaultNS:o}=H.useContext(hp)||{},a=n||r||dp();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new pp),!a){$i("You will need to pass in an i18next instance by using initReactI18next");const b=(S,k)=>typeof k=="string"?k:k&&typeof k=="object"&&typeof k.defaultValue=="string"?k.defaultValue:Array.isArray(S)?S[S.length-1]:S,C=[b,{},!1];return C.t=b,C.i18n={},C.ready=!1,C}a.options.react&&a.options.react.wait!==void 0&&$i("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const s={...cp(),...a.options.react,...t},{useSuspense:u,keyPrefix:h}=s;let g=o||a.options&&a.options.defaultNS;g=typeof g=="string"?[g]:g||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(g);const f=(a.isInitialized||a.initializedStoreOnce)&&g.every(b=>op(b,a,s)),x=gp(a,t.lng||null,s.nsMode==="fallback"?g:g[0],h),l=()=>x,y=()=>_l(a,t.lng||null,s.nsMode==="fallback"?g:g[0],h),[i,c]=H.useState(l);let p=g.join();t.lng&&(p=`${t.lng}${p}`);const d=mp(p),m=H.useRef(!0);H.useEffect(()=>{const{bindI18n:b,bindI18nStore:C}=s;m.current=!0,!f&&!u&&(t.lng?Bl(a,t.lng,g,()=>{m.current&&c(y)}):Pl(a,g,()=>{m.current&&c(y)})),f&&d&&d!==p&&m.current&&c(y);function S(){m.current&&c(y)}return b&&a&&a.on(b,S),C&&a&&a.store.on(C,S),()=>{m.current=!1,b&&a&&b.split(" ").forEach(k=>a.off(k,S)),C&&a&&C.split(" ").forEach(k=>a.store.off(k,S))}},[a,p]),H.useEffect(()=>{m.current&&f&&c(l)},[a,h,f]);const v=[i,a,f];if(v.t=i,v.i18n=a,v.ready=f,f||!f&&!u)return v;throw new Promise(b=>{t.lng?Bl(a,t.lng,g,()=>b()):Pl(a,g,()=>b())})}function Hi({callback:e}){const t=kn(),{t:n}=Qe(),[r,o]=H.useState(""),[a,s]=H.useState(!1),[u,h]=H.useState(!1),{session:g,mutate:f}=Ct(),x=g==null?void 0:g.input_data.scanner_type,[l,y]=H.useState(""),i=async d=>{if(t.onContactLink){const{data:{data:m}}=await ji.get(d);m&&t.onContactLink(m)}},c=H.useCallback(()=>{g&&(s(!0),vo.setContact(g.uuid,{contact_identifier_value:r}).then(d=>{i(d.data.data.contact.uuid).then(),f().then(()=>{De.success(n("contactSavedToSession")),e&&e()})}).catch(()=>h(!0)).finally(()=>s(!1)))},[e,r,f,g,n]),p=()=>{s(!0),ji.linkIdentifier(r,l).then(c).finally(()=>s(!1))};return H.useEffect(()=>{x===Mt.CAMERA&&r&&!a&&c()},[r,a,x,g,c]),E.jsxs(E.Fragment,{children:[E.jsx(wo,{dataSetter:o,type:x,label:n("contactIdentifier")}),x===Mt.HAND_SCANNER&&E.jsx("div",{className:"pt-3",children:E.jsx(Ye,{type:"submit",label:n("submit"),onClick:c,disabled:a})}),E.jsx(Mn,{isOpen:u,title:n("linkContact"),onClose:()=>h(!1),children:E.jsxs("div",{className:"flex min-w-[600px] flex-col gap-3",children:[E.jsx("p",{children:n("fillInXBelow",{x:n("emailAddress").toLowerCase()})}),E.jsx(Dn,{autoFocus:!0,id:"email-input",name:"email",label:n("emailAddress"),type:"email",onChange:(d,m)=>y(m)}),E.jsx("div",{children:E.jsx(Ye,{type:"submit",label:n("linkContact"),onClick:p,disabled:a})})]})})]})}function wo({dataSetter:e,type:t=Mt.CAMERA,label:n=""}){const{t:r}=Qe(),o=a=>{e(a.data)};return t===Mt.HAND_SCANNER?E.jsxs("div",{className:"flex flex-col gap-3",children:[E.jsx("p",{children:r("fillInXBelow",{x:n.toLowerCase()})}),E.jsx(Dn,{id:`${n}-input`,name:n,label:n,type:"text",onChange:(a,s)=>e(s),autoFocus:!0})]}):E.jsx(yp,{label:n,onDecode:o})}class Le{constructor(t,n,r,o,a){this._legacyCanvasSize=Le.DEFAULT_CANVAS_SIZE,this._preferredCamera="environment",this._maxScansPerSecond=25,this._lastScanTimestamp=-1,this._destroyed=this._flashOn=this._paused=this._active=!1,this.$video=t,this.$canvas=document.createElement("canvas"),r&&typeof r=="object"?this._onDecode=n:(console.warn(r||o||a?"You're using a deprecated version of the QrScanner constructor which will be removed in the future":"Note that the type of the scan result passed to onDecode will change in the future. To already switch to the new api today, you can pass returnDetailedScanResult: true."),this._legacyOnDecode=n),n=typeof r=="object"?r:{},this._onDecodeError=n.onDecodeError||(typeof r=="function"?r:this._onDecodeError),this._calculateScanRegion=n.calculateScanRegion||(typeof o=="function"?o:this._calculateScanRegion),this._preferredCamera=n.preferredCamera||a||this._preferredCamera,this._legacyCanvasSize=typeof r=="number"?r:typeof o=="number"?o:this._legacyCanvasSize,this._maxScansPerSecond=n.maxScansPerSecond||this._maxScansPerSecond,this._onPlay=this._onPlay.bind(this),this._onLoadedMetaData=this._onLoadedMetaData.bind(this),this._onVisibilityChange=this._onVisibilityChange.bind(this),this._updateOverlay=this._updateOverlay.bind(this),t.disablePictureInPicture=!0,t.playsInline=!0,t.muted=!0;let s=!1;if(t.hidden&&(t.hidden=!1,s=!0),document.body.contains(t)||(document.body.appendChild(t),s=!0),r=t.parentElement,n.highlightScanRegion||n.highlightCodeOutline){if(o=!!n.overlay,this.$overlay=n.overlay||document.createElement("div"),a=this.$overlay.style,a.position="absolute",a.display="none",a.pointerEvents="none",this.$overlay.classList.add("scan-region-highlight"),!o&&n.highlightScanRegion){this.$overlay.innerHTML='<svg class="scan-region-highlight-svg" viewBox="0 0 238 238" preserveAspectRatio="none" style="position:absolute;width:100%;height:100%;left:0;top:0;fill:none;stroke:#e9b213;stroke-width:4;stroke-linecap:round;stroke-linejoin:round"><path d="M31 2H10a8 8 0 0 0-8 8v21M207 2h21a8 8 0 0 1 8 8v21m0 176v21a8 8 0 0 1-8 8h-21m-176 0H10a8 8 0 0 1-8-8v-21"/></svg>';try{this.$overlay.firstElementChild.animate({transform:["scale(.98)","scale(1.01)"]},{duration:400,iterations:1/0,direction:"alternate",easing:"ease-in-out"})}catch{}r.insertBefore(this.$overlay,this.$video.nextSibling)}n.highlightCodeOutline&&(this.$overlay.insertAdjacentHTML("beforeend",'<svg class="code-outline-highlight" preserveAspectRatio="none" style="display:none;width:100%;height:100%;fill:none;stroke:#e9b213;stroke-width:5;stroke-dasharray:25;stroke-linecap:round;stroke-linejoin:round"><polygon/></svg>'),this.$codeOutlineHighlight=this.$overlay.lastElementChild)}this._scanRegion=this._calculateScanRegion(t),requestAnimationFrame(()=>{let u=window.getComputedStyle(t);u.display==="none"&&(t.style.setProperty("display","block","important"),s=!0),u.visibility!=="visible"&&(t.style.setProperty("visibility","visible","important"),s=!0),s&&(console.warn("QrScanner has overwritten the video hiding style to avoid Safari stopping the playback."),t.style.opacity="0",t.style.width="0",t.style.height="0",this.$overlay&&this.$overlay.parentElement&&this.$overlay.parentElement.removeChild(this.$overlay),delete this.$overlay,delete this.$codeOutlineHighlight),this.$overlay&&this._updateOverlay()}),t.addEventListener("play",this._onPlay),t.addEventListener("loadedmetadata",this._onLoadedMetaData),document.addEventListener("visibilitychange",this._onVisibilityChange),window.addEventListener("resize",this._updateOverlay),this._qrEnginePromise=Le.createQrEngine()}static set WORKER_PATH(t){console.warn("Setting QrScanner.WORKER_PATH is not required and not supported anymore. Have a look at the README for new setup instructions.")}static async hasCamera(){try{return!!(await Le.listCameras(!1)).length}catch{return!1}}static async listCameras(t=!1){if(!navigator.mediaDevices)return[];let n=async()=>(await navigator.mediaDevices.enumerateDevices()).filter(o=>o.kind==="videoinput"),r;try{t&&(await n()).every(o=>!o.label)&&(r=await navigator.mediaDevices.getUserMedia({audio:!1,video:!0}))}catch{}try{return(await n()).map((o,a)=>({id:o.deviceId,label:o.label||(a===0?"Default Camera":`Camera ${a+1}`)}))}finally{r&&(console.warn("Call listCameras after successfully starting a QR scanner to avoid creating a temporary video stream"),Le._stopVideoStream(r))}}async hasFlash(){let t;try{if(this.$video.srcObject){if(!(this.$video.srcObject instanceof MediaStream))return!1;t=this.$video.srcObject}else t=(await this._getCameraStream()).stream;return"torch"in t.getVideoTracks()[0].getSettings()}catch{return!1}finally{t&&t!==this.$video.srcObject&&(console.warn("Call hasFlash after successfully starting the scanner to avoid creating a temporary video stream"),Le._stopVideoStream(t))}}isFlashOn(){return this._flashOn}async toggleFlash(){this._flashOn?await this.turnFlashOff():await this.turnFlashOn()}async turnFlashOn(){if(!this._flashOn&&!this._destroyed&&(this._flashOn=!0,this._active&&!this._paused))try{if(!await this.hasFlash())throw"No flash available";await this.$video.srcObject.getVideoTracks()[0].applyConstraints({advanced:[{torch:!0}]})}catch(t){throw this._flashOn=!1,t}}async turnFlashOff(){this._flashOn&&(this._flashOn=!1,await this._restartVideoStream())}destroy(){this.$video.removeEventListener("loadedmetadata",this._onLoadedMetaData),this.$video.removeEventListener("play",this._onPlay),document.removeEventListener("visibilitychange",this._onVisibilityChange),window.removeEventListener("resize",this._updateOverlay),this._destroyed=!0,this._flashOn=!1,this.stop(),Le._postWorkerMessage(this._qrEnginePromise,"close")}async start(){if(this._destroyed)throw Error("The QR scanner can not be started as it had been destroyed.");if((!this._active||this._paused)&&(window.location.protocol!=="https:"&&console.warn("The camera stream is only accessible if the page is transferred via https."),this._active=!0,!document.hidden))if(this._paused=!1,this.$video.srcObject)await this.$video.play();else try{let{stream:t,facingMode:n}=await this._getCameraStream();!this._active||this._paused?Le._stopVideoStream(t):(this._setVideoMirror(n),this.$video.srcObject=t,await this.$video.play(),this._flashOn&&(this._flashOn=!1,this.turnFlashOn().catch(()=>{})))}catch(t){if(!this._paused)throw this._active=!1,t}}stop(){this.pause(),this._active=!1}async pause(t=!1){if(this._paused=!0,!this._active)return!0;this.$video.pause(),this.$overlay&&(this.$overlay.style.display="none");let n=()=>{this.$video.srcObject instanceof MediaStream&&(Le._stopVideoStream(this.$video.srcObject),this.$video.srcObject=null)};return t?(n(),!0):(await new Promise(r=>setTimeout(r,300)),this._paused?(n(),!0):!1)}async setCamera(t){t!==this._preferredCamera&&(this._preferredCamera=t,await this._restartVideoStream())}static async scanImage(t,n,r,o,a=!1,s=!1){let u,h=!1;n&&("scanRegion"in n||"qrEngine"in n||"canvas"in n||"disallowCanvasResizing"in n||"alsoTryWithoutScanRegion"in n||"returnDetailedScanResult"in n)?(u=n.scanRegion,r=n.qrEngine,o=n.canvas,a=n.disallowCanvasResizing||!1,s=n.alsoTryWithoutScanRegion||!1,h=!0):console.warn(n||r||o||a||s?"You're using a deprecated api for scanImage which will be removed in the future.":"Note that the return type of scanImage will change in the future. To already switch to the new api today, you can pass returnDetailedScanResult: true."),n=!!r;try{let g,f;[r,g]=await Promise.all([r||Le.createQrEngine(),Le._loadImage(t)]),[o,f]=Le._drawToCanvas(g,u,o,a);let x;if(r instanceof Worker){let l=r;n||Le._postWorkerMessageSync(l,"inversionMode","both"),x=await new Promise((y,i)=>{let c,p,d,m=-1;p=b=>{b.data.id===m&&(l.removeEventListener("message",p),l.removeEventListener("error",d),clearTimeout(c),b.data.data!==null?y({data:b.data.data,cornerPoints:Le._convertPoints(b.data.cornerPoints,u)}):i(Le.NO_QR_CODE_FOUND))},d=b=>{l.removeEventListener("message",p),l.removeEventListener("error",d),clearTimeout(c),i("Scanner error: "+(b?b.message||b:"Unknown Error"))},l.addEventListener("message",p),l.addEventListener("error",d),c=setTimeout(()=>d("timeout"),1e4);let v=f.getImageData(0,0,o.width,o.height);m=Le._postWorkerMessageSync(l,"decode",v,[v.data.buffer])})}else x=await Promise.race([new Promise((l,y)=>window.setTimeout(()=>y("Scanner error: timeout"),1e4)),(async()=>{try{var[l]=await r.detect(o);if(!l)throw Le.NO_QR_CODE_FOUND;return{data:l.rawValue,cornerPoints:Le._convertPoints(l.cornerPoints,u)}}catch(y){if(l=y.message||y,/not implemented|service unavailable/.test(l))return Le._disableBarcodeDetector=!0,Le.scanImage(t,{scanRegion:u,canvas:o,disallowCanvasResizing:a,alsoTryWithoutScanRegion:s});throw`Scanner error: ${l}`}})()]);return h?x:x.data}catch(g){if(!u||!s)throw g;let f=await Le.scanImage(t,{qrEngine:r,canvas:o,disallowCanvasResizing:a});return h?f:f.data}finally{n||Le._postWorkerMessage(r,"close")}}setGrayscaleWeights(t,n,r,o=!0){Le._postWorkerMessage(this._qrEnginePromise,"grayscaleWeights",{red:t,green:n,blue:r,useIntegerApproximation:o})}setInversionMode(t){Le._postWorkerMessage(this._qrEnginePromise,"inversionMode",t)}static async createQrEngine(t){if(t&&console.warn("Specifying a worker path is not required and not supported anymore."),t=()=>Promise.resolve().then(()=>C0).then(r=>r.createWorker()),!(!Le._disableBarcodeDetector&&"BarcodeDetector"in window&&BarcodeDetector.getSupportedFormats&&(await BarcodeDetector.getSupportedFormats()).includes("qr_code")))return t();let n=navigator.userAgentData;return n&&n.brands.some(({brand:r})=>/Chromium/i.test(r))&&/mac ?OS/i.test(n.platform)&&await n.getHighEntropyValues(["architecture","platformVersion"]).then(({architecture:r,platformVersion:o})=>/arm/i.test(r||"arm")&&13<=parseInt(o||"13")).catch(()=>!0)?t():new BarcodeDetector({formats:["qr_code"]})}_onPlay(){this._scanRegion=this._calculateScanRegion(this.$video),this._updateOverlay(),this.$overlay&&(this.$overlay.style.display=""),this._scanFrame()}_onLoadedMetaData(){this._scanRegion=this._calculateScanRegion(this.$video),this._updateOverlay()}_onVisibilityChange(){document.hidden?this.pause():this._active&&this.start()}_calculateScanRegion(t){let n=Math.round(.6666666666666666*Math.min(t.videoWidth,t.videoHeight));return{x:Math.round((t.videoWidth-n)/2),y:Math.round((t.videoHeight-n)/2),width:n,height:n,downScaledWidth:this._legacyCanvasSize,downScaledHeight:this._legacyCanvasSize}}_updateOverlay(){requestAnimationFrame(()=>{if(this.$overlay){var t=this.$video,n=t.videoWidth,r=t.videoHeight,o=t.offsetWidth,a=t.offsetHeight,s=t.offsetLeft,u=t.offsetTop,h=window.getComputedStyle(t),g=h.objectFit,f=n/r,x=o/a;switch(g){case"none":var l=n,y=r;break;case"fill":l=o,y=a;break;default:(g==="cover"?f>x:f<x)?(y=a,l=y*f):(l=o,y=l/f),g==="scale-down"&&(l=Math.min(l,n),y=Math.min(y,r))}var[i,c]=h.objectPosition.split(" ").map((d,m)=>{const v=parseFloat(d);return d.endsWith("%")?(m?a-y:o-l)*v/100:v});h=this._scanRegion.width||n,x=this._scanRegion.height||r,g=this._scanRegion.x||0;var p=this._scanRegion.y||0;f=this.$overlay.style,f.width=`${h/n*l}px`,f.height=`${x/r*y}px`,f.top=`${u+c+p/r*y}px`,r=/scaleX\(-1\)/.test(t.style.transform),f.left=`${s+(r?o-i-l:i)+(r?n-g-h:g)/n*l}px`,f.transform=t.style.transform}})}static _convertPoints(t,n){if(!n)return t;let r=n.x||0,o=n.y||0,a=n.width&&n.downScaledWidth?n.width/n.downScaledWidth:1;n=n.height&&n.downScaledHeight?n.height/n.downScaledHeight:1;for(let s of t)s.x=s.x*a+r,s.y=s.y*n+o;return t}_scanFrame(){!this._active||this.$video.paused||this.$video.ended||("requestVideoFrameCallback"in this.$video?this.$video.requestVideoFrameCallback.bind(this.$video):requestAnimationFrame)(async()=>{if(!(1>=this.$video.readyState)){var t=Date.now()-this._lastScanTimestamp,n=1e3/this._maxScansPerSecond;t<n&&await new Promise(o=>setTimeout(o,n-t)),this._lastScanTimestamp=Date.now();try{var r=await Le.scanImage(this.$video,{scanRegion:this._scanRegion,qrEngine:this._qrEnginePromise,canvas:this.$canvas})}catch(o){if(!this._active)return;this._onDecodeError(o)}!Le._disableBarcodeDetector||await this._qrEnginePromise instanceof Worker||(this._qrEnginePromise=Le.createQrEngine()),r?(this._onDecode?this._onDecode(r):this._legacyOnDecode&&this._legacyOnDecode(r.data),this.$codeOutlineHighlight&&(clearTimeout(this._codeOutlineHighlightRemovalTimeout),this._codeOutlineHighlightRemovalTimeout=void 0,this.$codeOutlineHighlight.setAttribute("viewBox",`${this._scanRegion.x||0} ${this._scanRegion.y||0} ${this._scanRegion.width||this.$video.videoWidth} ${this._scanRegion.height||this.$video.videoHeight}`),this.$codeOutlineHighlight.firstElementChild.setAttribute("points",r.cornerPoints.map(({x:o,y:a})=>`${o},${a}`).join(" ")),this.$codeOutlineHighlight.style.display="")):this.$codeOutlineHighlight&&!this._codeOutlineHighlightRemovalTimeout&&(this._codeOutlineHighlightRemovalTimeout=setTimeout(()=>this.$codeOutlineHighlight.style.display="none",100))}this._scanFrame()})}_onDecodeError(t){t!==Le.NO_QR_CODE_FOUND&&console.log(t)}async _getCameraStream(){if(!navigator.mediaDevices)throw"Camera not found.";let t=/^(environment|user)$/.test(this._preferredCamera)?"facingMode":"deviceId",n=[{width:{min:1024}},{width:{min:768}},{}],r=n.map(o=>Object.assign({},o,{[t]:{exact:this._preferredCamera}}));for(let o of[...r,...n])try{let a=await navigator.mediaDevices.getUserMedia({video:o,audio:!1}),s=this._getFacingMode(a)||(o.facingMode?this._preferredCamera:this._preferredCamera==="environment"?"user":"environment");return{stream:a,facingMode:s}}catch{}throw"Camera not found."}async _restartVideoStream(){let t=this._paused;await this.pause(!0)&&!t&&this._active&&await this.start()}static _stopVideoStream(t){for(let n of t.getTracks())n.stop(),t.removeTrack(n)}_setVideoMirror(t){this.$video.style.transform="scaleX("+(t==="user"?-1:1)+")"}_getFacingMode(t){return(t=t.getVideoTracks()[0])?/rear|back|environment/i.test(t.label)?"environment":/front|user|face/i.test(t.label)?"user":null:null}static _drawToCanvas(t,n,r,o=!1){r=r||document.createElement("canvas");let a=n&&n.x?n.x:0,s=n&&n.y?n.y:0,u=n&&n.width?n.width:t.videoWidth||t.width,h=n&&n.height?n.height:t.videoHeight||t.height;return o||(o=n&&n.downScaledWidth?n.downScaledWidth:u,n=n&&n.downScaledHeight?n.downScaledHeight:h,r.width!==o&&(r.width=o),r.height!==n&&(r.height=n)),n=r.getContext("2d",{alpha:!1}),n.imageSmoothingEnabled=!1,n.drawImage(t,a,s,u,h,0,0,r.width,r.height),[r,n]}static async _loadImage(t){if(t instanceof Image)return await Le._awaitImageLoad(t),t;if(t instanceof HTMLVideoElement||t instanceof HTMLCanvasElement||t instanceof SVGImageElement||"OffscreenCanvas"in window&&t instanceof OffscreenCanvas||"ImageBitmap"in window&&t instanceof ImageBitmap)return t;if(t instanceof File||t instanceof Blob||t instanceof URL||typeof t=="string"){let n=new Image;n.src=t instanceof File||t instanceof Blob?URL.createObjectURL(t):t.toString();try{return await Le._awaitImageLoad(n),n}finally{(t instanceof File||t instanceof Blob)&&URL.revokeObjectURL(n.src)}}else throw"Unsupported image type."}static async _awaitImageLoad(t){t.complete&&t.naturalWidth!==0||await new Promise((n,r)=>{let o=a=>{t.removeEventListener("load",o),t.removeEventListener("error",o),a instanceof ErrorEvent?r("Image load error"):n()};t.addEventListener("load",o),t.addEventListener("error",o)})}static async _postWorkerMessage(t,n,r,o){return Le._postWorkerMessageSync(await t,n,r,o)}static _postWorkerMessageSync(t,n,r,o){if(!(t instanceof Worker))return-1;let a=Le._workerMessageId++;return t.postMessage({id:a,type:n,data:r},o),a}}Le.DEFAULT_CANVAS_SIZE=400,Le.NO_QR_CODE_FOUND="No QR code found",Le._disableBarcodeDetector=!1,Le._workerMessageId=0;function yp({label:e="",onDecode:t}){const n=H.useRef(),r=H.useRef(null),[o,a]=H.useState([]);return H.useEffect(()=>(r.current&&!n.current&&(n.current=new Le(r.current,t??(s=>console.log("decoded qr code:",s)),{returnDetailedScanResult:!0,highlightScanRegion:!0,highlightCodeOutline:!0}),Le.listCameras(!0).then(s=>a(s)),n.current.start()),()=>{var s;r.current||(s=n.current)==null||s.stop()}),[t]),E.jsxs("div",{className:"flex flex-col gap-1",children:[E.jsxs("div",{className:"flex flex-col items-center justify-between text-gray-700 sm:flex-row",children:[E.jsx("p",{children:`Scan ${e==null?void 0:e.toLowerCase()}`}),E.jsx("select",{id:"select",className:"appearance-none rounded border bg-transparent px-2.5 py-2 text-sm",onChange:s=>{var u;return(u=n.current)==null?void 0:u.setCamera(s.target.value)},children:o.map(s=>E.jsx("option",{value:s.id,children:s.label},s.id))})]}),E.jsx("video",{className:"h-full w-full rounded border object-cover",ref:r})]})}function Rl(){return E.jsxs("div",{children:[E.jsx("div",{className:"flex animate-pulse justify-end space-y-4",children:E.jsx("div",{className:"h-8 w-32 rounded bg-gray-100"})},"skeleton-item-"),E.jsx("div",{className:"my-6 h-px w-full bg-gray-100"}),E.jsx("div",{className:"space-y-4",children:E.jsx("div",{className:"animate-pulse space-y-4",children:E.jsxs("div",{className:"grid grid-cols-2 gap-x-6 gap-y-2",children:[E.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),E.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),E.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),E.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),E.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),E.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),E.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),E.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),E.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),E.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),E.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),E.jsx("div",{className:"h-12 w-full rounded bg-gray-100"})]})},"skeleton-item-")})]})}var vp=Object.defineProperty,bp=(e,t)=>{for(var n in t)vp(e,n,{get:t[n],enumerable:!0})},Ft={};bp(Ft,{assign:()=>kp,colors:()=>mn,createStringInterpolator:()=>Qi,skipAnimation:()=>Dl,to:()=>Il,willAdvance:()=>Zi});var zi=gr(),Te=e=>mr(e,zi),qi=gr();Te.write=e=>mr(e,qi);var xo=gr();Te.onStart=e=>mr(e,xo);var Ki=gr();Te.onFrame=e=>mr(e,Ki);var Wi=gr();Te.onFinish=e=>mr(e,Wi);var Fn=[];Te.setTimeout=(e,t)=>{const n=Te.now()+t,r=()=>{const a=Fn.findIndex(s=>s.cancel==r);~a&&Fn.splice(a,1),pn-=~a?1:0},o={time:n,handler:e,cancel:r};return Fn.splice(Tl(n),0,o),pn+=1,Nl(),o};var Tl=e=>~(~Fn.findIndex(t=>t.time>e)||~Fn.length);Te.cancel=e=>{xo.delete(e),Ki.delete(e),Wi.delete(e),zi.delete(e),qi.delete(e)},Te.sync=e=>{Xi=!0,Te.batchedUpdates(e),Xi=!1},Te.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...o){t=o,Te.onStart(n)}return r.handler=e,r.cancel=()=>{xo.delete(n),t=null},r};var Gi=typeof window<"u"?window.requestAnimationFrame:()=>{};Te.use=e=>Gi=e,Te.now=typeof performance<"u"?()=>performance.now():Date.now,Te.batchedUpdates=e=>e(),Te.catch=console.error,Te.frameLoop="always",Te.advance=()=>{Te.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Al()};var hn=-1,pn=0,Xi=!1;function mr(e,t){Xi?(t.delete(e),e(0)):(t.add(e),Nl())}function Nl(){hn<0&&(hn=0,Te.frameLoop!=="demand"&&Gi(jl))}function wp(){hn=-1}function jl(){~hn&&(Gi(jl),Te.batchedUpdates(Al))}function Al(){const e=hn;hn=Te.now();const t=Tl(hn);if(t&&(Ll(Fn.splice(0,t),n=>n.handler()),pn-=t),!pn){wp();return}xo.flush(),zi.flush(e?Math.min(64,hn-e):16.667),Ki.flush(),qi.flush(),Wi.flush()}function gr(){let e=new Set,t=e;return{add(n){pn+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return pn-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,pn-=t.size,Ll(t,r=>r(n)&&e.add(r)),pn+=e.size,t=e)}}}function Ll(e,t){e.forEach(n=>{try{t(n)}catch(r){Te.catch(r)}})}function Ji(){}var xp=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),pe={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 tn(e,t){if(pe.arr(e)){if(!pe.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 Me=(e,t)=>e.forEach(t);function Jt(e,t,n){if(pe.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 Pt=e=>pe.und(e)?[]:pe.arr(e)?e:[e];function yr(e,t){if(e.size){const n=Array.from(e);e.clear(),Me(n,t)}}var vr=(e,...t)=>yr(e,n=>n(...t)),Yi=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Qi,Il,mn=null,Dl=!1,Zi=Ji,kp=e=>{e.to&&(Il=e.to),e.now&&(Te.now=e.now),e.colors!==void 0&&(mn=e.colors),e.skipAnimation!=null&&(Dl=e.skipAnimation),e.createStringInterpolator&&(Qi=e.createStringInterpolator),e.requestAnimationFrame&&Te.use(e.requestAnimationFrame),e.batchedUpdates&&(Te.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Zi=e.willAdvance),e.frameLoop&&(Te.frameLoop=e.frameLoop)},br=new Set,Rt=[],ea=[],ko=0,Co={get idle(){return!br.size&&!Rt.length},start(e){ko>e.priority?(br.add(e),Te.onStart(Cp)):(Ml(e),Te(ta))},advance:ta,sort(e){if(ko)Te.onFrame(()=>Co.sort(e));else{const t=Rt.indexOf(e);~t&&(Rt.splice(t,1),Fl(e))}},clear(){Rt=[],br.clear()}};function Cp(){br.forEach(Ml),br.clear(),Te(ta)}function Ml(e){Rt.includes(e)||Fl(e)}function Fl(e){Rt.splice(Ep(Rt,t=>t.priority>e.priority),0,e)}function ta(e){const t=ea;for(let n=0;n<Rt.length;n++){const r=Rt[n];ko=r.priority,r.idle||(Zi(r),r.advance(e),r.idle||t.push(r))}return ko=0,ea=Rt,ea.length=0,Rt=t,Rt.length>0}function Ep(e,t){const n=e.findIndex(t);return n<0?e.length:n}var Sp=(e,t,n)=>Math.min(Math.max(n,e),t),Pp={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},Ut="[-+]?\\d*\\.?\\d+",Eo=Ut+"%";function So(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Bp=new RegExp("rgb"+So(Ut,Ut,Ut)),Op=new RegExp("rgba"+So(Ut,Ut,Ut,Ut)),_p=new RegExp("hsl"+So(Ut,Eo,Eo)),Rp=new RegExp("hsla"+So(Ut,Eo,Eo,Ut)),Tp=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Np=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,jp=/^#([0-9a-fA-F]{6})$/,Ap=/^#([0-9a-fA-F]{8})$/;function Lp(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=jp.exec(e))?parseInt(t[1]+"ff",16)>>>0:mn&&mn[e]!==void 0?mn[e]:(t=Bp.exec(e))?(Un(t[1])<<24|Un(t[2])<<16|Un(t[3])<<8|255)>>>0:(t=Op.exec(e))?(Un(t[1])<<24|Un(t[2])<<16|Un(t[3])<<8|Vl(t[4]))>>>0:(t=Tp.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Ap.exec(e))?parseInt(t[1],16)>>>0:(t=Np.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=_p.exec(e))?(Ul($l(t[1]),Po(t[2]),Po(t[3]))|255)>>>0:(t=Rp.exec(e))?(Ul($l(t[1]),Po(t[2]),Po(t[3]))|Vl(t[4]))>>>0:null}function na(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 Ul(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,a=na(o,r,e+1/3),s=na(o,r,e),u=na(o,r,e-1/3);return Math.round(a*255)<<24|Math.round(s*255)<<16|Math.round(u*255)<<8}function Un(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function $l(e){return(parseFloat(e)%360+360)%360/360}function Vl(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function Po(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Hl(e){let t=Lp(e);if(t===null)return e;t=t||0;const n=(t&4278190080)>>>24,r=(t&16711680)>>>16,o=(t&65280)>>>8,a=(t&255)/255;return`rgba(${n}, ${r}, ${o}, ${a})`}var wr=(e,t,n)=>{if(pe.fun(e))return e;if(pe.arr(e))return wr({range:e,output:t,extrapolate:n});if(pe.str(e.output[0]))return Qi(e);const r=e,o=r.output,a=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",u=r.extrapolateRight||r.extrapolate||"extend",h=r.easing||(g=>g);return g=>{const f=Dp(g,a);return Ip(g,a[f],a[f+1],o[f],o[f+1],h,s,u,r.map)}};function Ip(e,t,n,r,o,a,s,u,h){let g=h?h(e):e;if(g<t){if(s==="identity")return g;s==="clamp"&&(g=t)}if(g>n){if(u==="identity")return g;u==="clamp"&&(g=n)}return r===o?r:t===n?e<=t?r:o:(t===-1/0?g=-g:n===1/0?g=g-t:g=(g-t)/(n-t),g=a(g),r===-1/0?g=-g:o===1/0?g=g+r:g=g*(o-r)+r,g)}function Dp(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var Mp=(e,t="end")=>n=>{n=t==="end"?Math.min(n,.999):Math.max(n,.001);const r=n*e,o=t==="end"?Math.floor(r):Math.ceil(r);return Sp(0,1,o/e)},Bo=1.70158,Oo=Bo*1.525,zl=Bo+1,ql=2*Math.PI/3,Kl=2*Math.PI/4.5,_o=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,Fp={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=>zl*e*e*e-Bo*e*e,easeOutBack:e=>1+zl*Math.pow(e-1,3)+Bo*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((Oo+1)*2*e-Oo)/2:(Math.pow(2*e-2,2)*((Oo+1)*(e*2-2)+Oo)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*ql),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*ql)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Kl))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Kl)/2+1,easeInBounce:e=>1-_o(1-e),easeOutBounce:_o,easeInOutBounce:e=>e<.5?(1-_o(1-2*e))/2:(1+_o(2*e-1))/2,steps:Mp},xr=Symbol.for("FluidValue.get"),$n=Symbol.for("FluidValue.observers"),Tt=e=>!!(e&&e[xr]),Et=e=>e&&e[xr]?e[xr]():e,Wl=e=>e[$n]||null;function Up(e,t){e.eventObserved?e.eventObserved(t):e(t)}function kr(e,t){const n=e[$n];n&&n.forEach(r=>{Up(r,t)})}var Gl=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");$p(this,e)}},$p=(e,t)=>Xl(e,xr,t);function Vn(e,t){if(e[xr]){let n=e[$n];n||Xl(e,$n,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Cr(e,t){const n=e[$n];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[$n]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var Xl=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Ro=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Vp=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Jl=new RegExp(`(${Ro.source})(%|[a-z]+)`,"i"),Hp=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,To=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Yl=e=>{const[t,n]=zp(e);if(!t||Yi())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const o=window.getComputedStyle(document.documentElement).getPropertyValue(n);return o||e}else{if(n&&To.test(n))return Yl(n);if(n)return n}return e},zp=e=>{const t=To.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},ra,qp=(e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`,Ql=e=>{ra||(ra=mn?new RegExp(`(${Object.keys(mn).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(a=>Et(a).replace(To,Yl).replace(Vp,Hl).replace(ra,Hl)),n=t.map(a=>a.match(Ro).map(Number)),o=n[0].map((a,s)=>n.map(u=>{if(!(s in u))throw Error('The arity of each "output" value must be equal');return u[s]})).map(a=>wr({...e,output:a}));return a=>{var h;const s=!Jl.test(t[0])&&((h=t.find(g=>Jl.test(g)))==null?void 0:h.replace(Ro,""));let u=0;return t[0].replace(Ro,()=>`${o[u++](a)}${s||""}`).replace(Hp,qp)}},oa="react-spring: ",Zl=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${oa}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},Kp=Zl(console.warn);function Wp(){Kp(`${oa}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var Gp=Zl(console.warn);function Xp(){Gp(`${oa}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 No(e){return pe.str(e)&&(e[0]=="#"||/\d/.test(e)||!Yi()&&To.test(e)||e in(mn||{}))}var ia=Yi()?H.useEffect:H.useLayoutEffect,Jp=()=>{const e=H.useRef(!1);return ia(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function ec(){const e=H.useState()[1],t=Jp();return()=>{t.current&&e(Math.random())}}function Yp(e,t){const[n]=H.useState(()=>({inputs:t,result:e()})),r=H.useRef(),o=r.current;let a=o;return a?t&&a.inputs&&Qp(t,a.inputs)||(a={inputs:t,result:e()}):a=n,H.useEffect(()=>{r.current=a,o==n&&(n.inputs=n.result=void 0)},[a]),a.result}function Qp(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 tc=e=>H.useEffect(e,Zp),Zp=[];function nc(e){const t=H.useRef();return H.useEffect(()=>{t.current=e}),t.current}var Er=Symbol.for("Animated:node"),em=e=>!!e&&e[Er]===e,Yt=e=>e&&e[Er],aa=(e,t)=>xp(e,Er,t),jo=e=>e&&e[Er]&&e[Er].getPayload(),rc=class{constructor(){aa(this,this)}getPayload(){return this.payload||[]}},Sr=class extends rc{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,pe.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new Sr(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return pe.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,pe.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},Pr=class extends Sr{constructor(e){super(0),this._string=null,this._toString=wr({output:[e,e]})}static create(e){return new Pr(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(pe.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=wr({output:[this.getValue(),e]})),this._value=0,super.reset()}},Ao={dependencies:null},Lo=class extends rc{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return Jt(this.source,(n,r)=>{em(n)?t[r]=n.getValue(e):Tt(n)?t[r]=Et(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Me(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return Jt(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Ao.dependencies&&Tt(e)&&Ao.dependencies.add(e);const t=jo(e);t&&Me(t,n=>this.add(n))}},oc=class extends Lo{constructor(e){super(e)}static create(e){return new oc(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(tm)),!0)}};function tm(e){return(No(e)?Pr:Sr).create(e)}function sa(e){const t=Yt(e);return t?t.constructor:pe.arr(e)?oc:No(e)?Pr:Sr}var ic=(e,t)=>{const n=!pe.fun(e)||e.prototype&&e.prototype.isReactComponent;return H.forwardRef((r,o)=>{const a=H.useRef(null),s=n&&H.useCallback(i=>{a.current=om(o,i)},[o]),[u,h]=rm(r,t),g=ec(),f=()=>{const i=a.current;if(n&&!i)return;(i?t.applyAnimatedValues(i,u.getValue(!0)):!1)===!1&&g()},x=new nm(f,h),l=H.useRef();ia(()=>(l.current=x,Me(h,i=>Vn(i,x)),()=>{l.current&&(Me(l.current.deps,i=>Cr(i,l.current)),Te.cancel(l.current.update))})),H.useEffect(f,[]),tc(()=>()=>{const i=l.current;Me(i.deps,c=>Cr(c,i))});const y=t.getComponentProps(u.getValue());return le.createElement(e,{...y,ref:s})})},nm=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&Te.write(this.update)}};function rm(e,t){const n=new Set;return Ao.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Lo(e),Ao.dependencies=null,[e,n]}function om(e,t){return e&&(pe.fun(e)?e(t):e.current=t),t}var ac=Symbol.for("AnimatedComponent"),im=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=o=>new Lo(o),getComponentProps:r=o=>o}={})=>{const o={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},a=s=>{const u=sc(s)||"Anonymous";return pe.str(s)?s=a[s]||(a[s]=ic(s,o)):s=s[ac]||(s[ac]=ic(s,o)),s.displayName=`Animated(${u})`,s};return Jt(e,(s,u)=>{pe.arr(e)&&(u=sc(s)),a[u]=a(s)}),{animated:a}},sc=e=>pe.str(e)?e:e&&pe.str(e.displayName)?e.displayName:pe.fun(e)&&e.name||null;function Cn(e,...t){return pe.fun(e)?e(...t):e}var Br=(e,t)=>e===!0||!!(t&&e&&(pe.fun(e)?e(t):Pt(e).includes(t))),lc=(e,t)=>pe.obj(e)?t&&e[t]:e,cc=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,am=e=>e,la=(e,t=am)=>{let n=sm;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));const r={};for(const o of n){const a=t(e[o],o);pe.und(a)||(r[o]=a)}return r},sm=["config","onProps","onStart","onChange","onPause","onResume","onRest"],lm={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 cm(e){const t={};let n=0;if(Jt(e,(r,o)=>{lm[o]||(t[o]=r,n++)}),n)return t}function uc(e){const t=cm(e);if(t){const n={to:t};return Jt(e,(r,o)=>o in t||(n[o]=r)),n}return{...e}}function Or(e){return e=Et(e),pe.arr(e)?e.map(Or):No(e)?Ft.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function um(e){for(const t in e)return!0;return!1}function ca(e){return pe.fun(e)||pe.arr(e)&&pe.obj(e[0])}function dm(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function fm(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var hm={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}},ua={...hm.default,mass:1,damping:1,easing:Fp.linear,clamp:!1},pm=class{constructor(){this.velocity=0,Object.assign(this,ua)}};function mm(e,t,n){n&&(n={...n},dc(n,t),t={...n,...t}),dc(e,t),Object.assign(e,t);for(const s in ua)e[s]==null&&(e[s]=ua[s]);let{frequency:r,damping:o}=e;const{mass:a}=e;return pe.und(r)||(r<.01&&(r=.01),o<0&&(o=0),e.tension=Math.pow(2*Math.PI/r,2)*a,e.friction=4*Math.PI*o*a/r),e}function dc(e,t){if(!pe.und(t.decay))e.duration=void 0;else{const n=!pe.und(t.tension)||!pe.und(t.friction);(n||!pe.und(t.frequency)||!pe.und(t.damping)||!pe.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var fc=[],gm=class{constructor(){this.changed=!1,this.values=fc,this.toValues=null,this.fromValues=fc,this.config=new pm,this.immediate=!1}};function hc(e,{key:t,props:n,defaultProps:r,state:o,actions:a}){return new Promise((s,u)=>{let h,g,f=Br(n.cancel??(r==null?void 0:r.cancel),t);if(f)y();else{pe.und(n.pause)||(o.paused=Br(n.pause,t));let i=r==null?void 0:r.pause;i!==!0&&(i=o.paused||Br(i,t)),h=Cn(n.delay||0,t),i?(o.resumeQueue.add(l),a.pause()):(a.resume(),l())}function x(){o.resumeQueue.add(l),o.timeouts.delete(g),g.cancel(),h=g.time-Te.now()}function l(){h>0&&!Ft.skipAnimation?(o.delayed=!0,g=Te.setTimeout(y,h),o.pauseQueue.add(x),o.timeouts.add(g)):y()}function y(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(x),o.timeouts.delete(g),e<=(o.cancelId||0)&&(f=!0);try{a.start({...n,callId:e,cancel:f},s)}catch(i){u(i)}}})}var da=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?Hn(e.get()):t.every(n=>n.noop)?pc(e.get()):$t(e.get(),t.every(n=>n.finished)),pc=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),$t=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Hn=e=>({value:e,cancelled:!0,finished:!1});function mc(e,t,n,r){const{callId:o,parentId:a,onRest:s}=t,{asyncTo:u,promise:h}=n;return!a&&e===u&&!t.reset?h:n.promise=(async()=>{n.asyncId=o,n.asyncTo=e;const g=la(t,(p,d)=>d==="onRest"?void 0:p);let f,x;const l=new Promise((p,d)=>(f=p,x=d)),y=p=>{const d=o<=(n.cancelId||0)&&Hn(r)||o!==n.asyncId&&$t(r,!1);if(d)throw p.result=d,x(p),p},i=(p,d)=>{const m=new gc,v=new yc;return(async()=>{if(Ft.skipAnimation)throw _r(n),v.result=$t(r,!1),x(v),v;y(m);const b=pe.obj(p)?{...p}:{...d,to:p};b.parentId=o,Jt(g,(S,k)=>{pe.und(b[k])&&(b[k]=S)});const C=await r.start(b);return y(m),n.paused&&await new Promise(S=>{n.resumeQueue.add(S)}),C})()};let c;if(Ft.skipAnimation)return _r(n),$t(r,!1);try{let p;pe.arr(e)?p=(async d=>{for(const m of d)await i(m)})(e):p=Promise.resolve(e(i,r.stop.bind(r))),await Promise.all([p.then(f),l]),c=$t(r.get(),!0,!1)}catch(p){if(p instanceof gc)c=p.result;else if(p instanceof yc)c=p.result;else throw p}finally{o==n.asyncId&&(n.asyncId=a,n.asyncTo=a?u:void 0,n.promise=a?h:void 0)}return pe.fun(s)&&Te.batchedUpdates(()=>{s(c,r,r.item)}),c})()}function _r(e,t){yr(e.timeouts,n=>n.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var gc=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.")}},yc=class extends Error{constructor(){super("SkipAnimationSignal")}},fa=e=>e instanceof ha,ym=1,ha=class extends Gl{constructor(){super(...arguments),this.id=ym++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Yt(this);return e&&e.getValue()}to(...e){return Ft.to(this,e)}interpolate(...e){return Wp(),Ft.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){kr(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||Co.sort(this),kr(this,{type:"priority",parent:this,priority:e})}},En=Symbol.for("SpringPhase"),vc=1,pa=2,ma=4,ga=e=>(e[En]&vc)>0,gn=e=>(e[En]&pa)>0,Rr=e=>(e[En]&ma)>0,bc=(e,t)=>t?e[En]|=pa|vc:e[En]&=~pa,wc=(e,t)=>t?e[En]|=ma:e[En]&=~ma,vm=class extends ha{constructor(e,t){if(super(),this.animation=new gm,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,!pe.und(e)||!pe.und(t)){const n=pe.obj(e)?{...e}:{...t,from:e};pe.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(gn(this)||this._state.asyncTo)||Rr(this)}get goal(){return Et(this.animation.to)}get velocity(){const e=Yt(this);return e instanceof Sr?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return ga(this)}get isAnimating(){return gn(this)}get isPaused(){return Rr(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:o}=r;const{config:a}=r,s=jo(r.to);!s&&Tt(r.to)&&(o=Pt(Et(r.to))),r.values.forEach((g,f)=>{if(g.done)return;const x=g.constructor==Pr?1:s?s[f].lastPosition:o[f];let l=r.immediate,y=x;if(!l){if(y=g.lastPosition,a.tension<=0){g.done=!0;return}let i=g.elapsedTime+=e;const c=r.fromValues[f],p=g.v0!=null?g.v0:g.v0=pe.arr(a.velocity)?a.velocity[f]:a.velocity;let d;const m=a.precision||(c==x?.005:Math.min(1,Math.abs(x-c)*.001));if(pe.und(a.duration))if(a.decay){const v=a.decay===!0?.998:a.decay,b=Math.exp(-(1-v)*i);y=c+p/(1-v)*(1-b),l=Math.abs(g.lastPosition-y)<=m,d=p*b}else{d=g.lastVelocity==null?p:g.lastVelocity;const v=a.restVelocity||m/10,b=a.clamp?0:a.bounce,C=!pe.und(b),S=c==x?g.v0>0:c<x;let k,B=!1;const O=1,j=Math.ceil(e/O);for(let I=0;I<j&&(k=Math.abs(d)>v,!(!k&&(l=Math.abs(x-y)<=m,l)));++I){C&&(B=y==x||y>x==S,B&&(d=-d*b,y=x));const D=-a.tension*1e-6*(y-x),M=-a.friction*.001*d,$=(D+M)/a.mass;d=d+$*O,y=y+d*O}}else{let v=1;a.duration>0&&(this._memoizedDuration!==a.duration&&(this._memoizedDuration=a.duration,g.durationProgress>0&&(g.elapsedTime=a.duration*g.durationProgress,i=g.elapsedTime+=e)),v=(a.progress||0)+i/this._memoizedDuration,v=v>1?1:v<0?0:v,g.durationProgress=v),y=c+a.easing(v)*(x-c),d=(y-g.lastPosition)/e,l=v==1}g.lastVelocity=d,Number.isNaN(y)&&(console.warn("Got NaN while animating:",this),l=!0)}s&&!s[f].done&&(l=!1),l?g.done=!0:t=!1,g.setValue(y,a.round)&&(n=!0)});const u=Yt(this),h=u.getValue();if(t){const g=Et(r.to);(h!==g||n)&&!a.decay?(u.setValue(g),this._onChange(g)):n&&a.decay&&this._onChange(h),this._stop()}else n&&this._onChange(h)}set(e){return Te.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(gn(this)){const{to:e,config:t}=this.animation;Te.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 pe.und(e)?(n=this.queue||[],this.queue=[]):n=[pe.obj(e)?e:{...t,to:e}],Promise.all(n.map(r=>this._update(r))).then(r=>da(this,r))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),_r(this._state,e&&this._lastCallId),Te.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=pe.obj(n)?n[t]:n,(n==null||ca(n))&&(n=void 0),r=pe.obj(r)?r[t]:r,r==null&&(r=void 0);const o={to:n,from:r};return ga(this)||(e.reverse&&([n,r]=[r,n]),r=Et(r),pe.und(r)?Yt(this)||this._set(n):this._set(r)),o}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,la(e,(s,u)=>/^on/.test(u)?lc(s,n):s)),Cc(this,e,"onProps"),jr(this,"onProps",e,this);const o=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 a=this._state;return hc(++this._lastCallId,{key:n,props:e,defaultProps:r,state:a,actions:{pause:()=>{Rr(this)||(wc(this,!0),vr(a.pauseQueue),jr(this,"onPause",$t(this,Tr(this,this.animation.to)),this))},resume:()=>{Rr(this)&&(wc(this,!1),gn(this)&&this._resume(),vr(a.resumeQueue),jr(this,"onResume",$t(this,Tr(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then(s=>{if(e.loop&&s.finished&&!(t&&s.noop)){const u=xc(e);if(u)return this._update(u,!0)}return s})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Hn(this));const r=!pe.und(e.to),o=!pe.und(e.from);if(r||o)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(Hn(this));const{key:a,defaultProps:s,animation:u}=this,{to:h,from:g}=u;let{to:f=h,from:x=g}=e;o&&!r&&(!t.default||pe.und(f))&&(f=x),t.reverse&&([f,x]=[x,f]);const l=!tn(x,g);l&&(u.from=x),x=Et(x);const y=!tn(f,h);y&&this._focus(f);const i=ca(t.to),{config:c}=u,{decay:p,velocity:d}=c;(r||o)&&(c.velocity=0),t.config&&!i&&mm(c,Cn(t.config,a),t.config!==s.config?Cn(s.config,a):void 0);let m=Yt(this);if(!m||pe.und(f))return n($t(this,!0));const v=pe.und(t.reset)?o&&!t.default:!pe.und(x)&&Br(t.reset,a),b=v?x:this.get(),C=Or(f),S=pe.num(C)||pe.arr(C)||No(C),k=!i&&(!S||Br(s.immediate||t.immediate,a));if(y){const I=sa(f);if(I!==m.constructor)if(k)m=this._set(C);else throw Error(`Cannot animate between ${m.constructor.name} and ${I.name}, as the "to" prop suggests`)}const B=m.constructor;let O=Tt(f),j=!1;if(!O){const I=v||!ga(this)&&l;(y||I)&&(j=tn(Or(b),C),O=!j),(!tn(u.immediate,k)&&!k||!tn(c.decay,p)||!tn(c.velocity,d))&&(O=!0)}if(j&&gn(this)&&(u.changed&&!v?O=!0:O||this._stop(h)),!i&&((O||Tt(h))&&(u.values=m.getPayload(),u.toValues=Tt(f)?null:B==Pr?[1]:Pt(C)),u.immediate!=k&&(u.immediate=k,!k&&!v&&this._set(h)),O)){const{onRest:I}=u;Me(wm,M=>Cc(this,t,M));const D=$t(this,Tr(this,h));vr(this._pendingCalls,D),this._pendingCalls.add(n),u.changed&&Te.batchedUpdates(()=>{var M;u.changed=!v,I==null||I(D,this),v?Cn(s.onRest,D):(M=u.onStart)==null||M.call(u,D,this)})}v&&this._set(b),i?n(mc(t.to,t,this._state,this)):O?this._start():gn(this)&&!y?this._pendingCalls.add(n):n(pc(b))}_focus(e){const t=this.animation;e!==t.to&&(Wl(this)&&this._detach(),t.to=e,Wl(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Tt(t)&&(Vn(t,this),fa(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Tt(e)&&Cr(e,this)}_set(e,t=!0){const n=Et(e);if(!pe.und(n)){const r=Yt(this);if(!r||!tn(n,r.getValue())){const o=sa(n);!r||r.constructor!=o?aa(this,o.create(n)):r.setValue(n),r&&Te.batchedUpdates(()=>{this._onChange(n,t)})}}return Yt(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,jr(this,"onStart",$t(this,Tr(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Cn(this.animation.onChange,e,this)),Cn(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Yt(this).reset(Et(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),gn(this)||(bc(this,!0),Rr(this)||this._resume())}_resume(){Ft.skipAnimation?this.finish():Co.start(this)}_stop(e,t){if(gn(this)){bc(this,!1);const n=this.animation;Me(n.values,o=>{o.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),kr(this,{type:"idle",parent:this});const r=t?Hn(this.get()):$t(this.get(),Tr(this,e??n.to));vr(this._pendingCalls,r),n.changed&&(n.changed=!1,jr(this,"onRest",r,this))}}};function Tr(e,t){const n=Or(t),r=Or(e.get());return tn(r,n)}function xc(e,t=e.loop,n=e.to){const r=Cn(t);if(r){const o=r!==!0&&uc(r),a=(o||e).reverse,s=!o||o.reset;return Nr({...e,loop:t,default:!1,pause:void 0,to:!a||ca(n)?n:void 0,from:s?e.from:void 0,reset:s,...o})}}function Nr(e){const{to:t,from:n}=e=uc(e),r=new Set;return pe.obj(t)&&kc(t,r),pe.obj(n)&&kc(n,r),e.keys=r.size?Array.from(r):null,e}function bm(e){const t=Nr(e);return pe.und(t.default)&&(t.default=la(t)),t}function kc(e,t){Jt(e,(n,r)=>n!=null&&t.add(r))}var wm=["onStart","onRest","onChange","onPause","onResume"];function Cc(e,t,n){e.animation[n]=t[n]!==cc(t,n)?lc(t[n],e.key):void 0}function jr(e,t,...n){var r,o,a,s;(o=(r=e.animation)[t])==null||o.call(r,...n),(s=(a=e.defaultProps)[t])==null||s.call(a,...n)}var xm=["onStart","onChange","onRest"],km=1,Cm=class{constructor(e,t){this.id=km++,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];pe.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Nr(e)),this}start(e){let{queue:t}=this;return e?t=Pt(e).map(Nr):this.queue=[],this._flush?this._flush(this,t):(_c(this,t),ya(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;Me(Pt(t),r=>n[r].stop(!!e))}else _r(this._state,this._lastAsyncId),this.each(n=>n.stop(!!e));return this}pause(e){if(pe.und(e))this.start({pause:!0});else{const t=this.springs;Me(Pt(e),n=>t[n].pause())}return this}resume(e){if(pe.und(e))this.start({pause:!1});else{const t=this.springs;Me(Pt(e),n=>t[n].resume())}return this}each(e){Jt(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,o=this._changed.size>0;(r&&!this._started||o&&!this._started)&&(this._started=!0,yr(e,([u,h])=>{h.value=this.get(),u(h,this,this._item)}));const a=!r&&this._started,s=o||a&&n.size?this.get():null;o&&t.size&&yr(t,([u,h])=>{h.value=s,u(h,this,this._item)}),a&&(this._started=!1,yr(n,([u,h])=>{h.value=s,u(h,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;Te.onFrame(this._onFrame)}};function ya(e,t){return Promise.all(t.map(n=>Ec(e,n))).then(n=>da(e,n))}async function Ec(e,t,n){const{keys:r,to:o,from:a,loop:s,onRest:u,onResolve:h}=t,g=pe.obj(t.default)&&t.default;s&&(t.loop=!1),o===!1&&(t.to=null),a===!1&&(t.from=null);const f=pe.arr(o)||pe.fun(o)?o:void 0;f?(t.to=void 0,t.onRest=void 0,g&&(g.onRest=void 0)):Me(xm,c=>{const p=t[c];if(pe.fun(p)){const d=e._events[c];t[c]=({finished:m,cancelled:v})=>{const b=d.get(p);b?(m||(b.finished=!1),v&&(b.cancelled=!0)):d.set(p,{value:null,finished:m||!1,cancelled:v||!1})},g&&(g[c]=t[c])}});const x=e._state;t.pause===!x.paused?(x.paused=t.pause,vr(t.pause?x.pauseQueue:x.resumeQueue)):x.paused&&(t.pause=!0);const l=(r||Object.keys(e.springs)).map(c=>e.springs[c].start(t)),y=t.cancel===!0||cc(t,"cancel")===!0;(f||y&&x.asyncId)&&l.push(hc(++e._lastAsyncId,{props:t,state:x,actions:{pause:Ji,resume:Ji,start(c,p){y?(_r(x,e._lastAsyncId),p(Hn(e))):(c.onRest=u,p(mc(f,c,x,e)))}}})),x.paused&&await new Promise(c=>{x.resumeQueue.add(c)});const i=da(e,await Promise.all(l));if(s&&i.finished&&!(n&&i.noop)){const c=xc(t,s,o);if(c)return _c(e,[c]),Ec(e,c,!0)}return h&&Te.batchedUpdates(()=>h(i,e,e.item)),i}function Sc(e,t){const n={...e.springs};return t&&Me(Pt(t),r=>{pe.und(r.keys)&&(r=Nr(r)),pe.obj(r.to)||(r={...r,to:void 0}),Oc(n,r,o=>Bc(o))}),Pc(e,n),n}function Pc(e,t){Jt(t,(n,r)=>{e.springs[r]||(e.springs[r]=n,Vn(n,e))})}function Bc(e,t){const n=new vm;return n.key=e,t&&Vn(n,t),n}function Oc(e,t,n){t.keys&&Me(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function _c(e,t){Me(t,n=>{Oc(e.springs,n,r=>Bc(r,e))})}var Io=({children:e,...t})=>{const n=H.useContext(Do),r=t.pause||!!n.pause,o=t.immediate||!!n.immediate;t=Yp(()=>({pause:r,immediate:o}),[r,o]);const{Provider:a}=Do;return le.createElement(a,{value:t},e)},Do=Em(Io,{});Io.Provider=Do.Provider,Io.Consumer=Do.Consumer;function Em(e,t){return Object.assign(e,le.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var Sm=()=>{const e=[],t=function(r){Xp();const o=[];return Me(e,(a,s)=>{if(pe.und(r))o.push(a.start());else{const u=n(r,a,s);u&&o.push(a.start(u))}}),o};t.current=e,t.add=function(r){e.includes(r)||e.push(r)},t.delete=function(r){const o=e.indexOf(r);~o&&e.splice(o,1)},t.pause=function(){return Me(e,r=>r.pause(...arguments)),this},t.resume=function(){return Me(e,r=>r.resume(...arguments)),this},t.set=function(r){Me(e,(o,a)=>{const s=pe.fun(r)?r(a,o):r;s&&o.set(s)})},t.start=function(r){const o=[];return Me(e,(a,s)=>{if(pe.und(r))o.push(a.start());else{const u=this._getProps(r,a,s);u&&o.push(a.start(u))}}),o},t.stop=function(){return Me(e,r=>r.stop(...arguments)),this},t.update=function(r){return Me(e,(o,a)=>o.update(this._getProps(r,o,a))),this};const n=function(r,o,a){return pe.fun(r)?r(a,o):r};return t._getProps=n,t};function Pm(e,t,n){const r=pe.fun(t)&&t;r&&!n&&(n=[]);const o=H.useMemo(()=>r||arguments.length==3?Sm():void 0,[]),a=H.useRef(0),s=ec(),u=H.useMemo(()=>({ctrls:[],queue:[],flush(d,m){const v=Sc(d,m);return a.current>0&&!u.queue.length&&!Object.keys(v).some(C=>!d.springs[C])?ya(d,m):new Promise(C=>{Pc(d,v),u.queue.push(()=>{C(ya(d,m))}),s()})}}),[]),h=H.useRef([...u.ctrls]),g=[],f=nc(e)||0;H.useMemo(()=>{Me(h.current.slice(e,f),d=>{dm(d,o),d.stop(!0)}),h.current.length=e,x(f,e)},[e]),H.useMemo(()=>{x(0,Math.min(f,e))},n);function x(d,m){for(let v=d;v<m;v++){const b=h.current[v]||(h.current[v]=new Cm(null,u.flush)),C=r?r(v,b):t[v];C&&(g[v]=bm(C))}}const l=h.current.map((d,m)=>Sc(d,g[m])),y=H.useContext(Io),i=nc(y),c=y!==i&&um(y);ia(()=>{a.current++,u.ctrls=h.current;const{queue:d}=u;d.length&&(u.queue=[],Me(d,m=>m())),Me(h.current,(m,v)=>{o==null||o.add(m),c&&m.start({default:y});const b=g[v];b&&(fm(m,b.ref),m.ref?m.queue.push(b):m.start(b))})}),tc(()=>()=>{Me(u.ctrls,d=>d.stop(!0))});const p=l.map(d=>({...d}));return o?[p,o]:p}function Bm(e,t){const n=pe.fun(e),[[r],o]=Pm(1,n?e:[e],n?[]:t);return n||arguments.length==2?[r,o]:r}var Om=class extends ha{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=wr(...t);const n=this._get(),r=sa(n);aa(this,r.create(n))}advance(e){const t=this._get(),n=this.get();tn(t,n)||(Yt(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Rc(this._active)&&va(this)}_get(){const e=pe.arr(this.source)?this.source.map(Et):Pt(Et(this.source));return this.calc(...e)}_start(){this.idle&&!Rc(this._active)&&(this.idle=!1,Me(jo(this),e=>{e.done=!1}),Ft.skipAnimation?(Te.batchedUpdates(()=>this.advance()),va(this)):Co.start(this))}_attach(){let e=1;Me(Pt(this.source),t=>{Tt(t)&&Vn(t,this),fa(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){Me(Pt(this.source),e=>{Tt(e)&&Cr(e,this)}),this._active.clear(),va(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=Pt(this.source).reduce((t,n)=>Math.max(t,(fa(n)?n.priority:0)+1),0))}};function _m(e){return e.idle!==!1}function Rc(e){return!e.size||Array.from(e).every(_m)}function va(e){e.idle||(e.idle=!0,Me(jo(e),t=>{t.done=!0}),kr(e,{type:"idle",parent:e}))}Ft.assign({createStringInterpolator:Ql,to:(e,t)=>new Om(e,t)});var Tc=/^--/;function Rm(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!Tc.test(e)&&!(Ar.hasOwnProperty(e)&&Ar[e])?t+"px":(""+t).trim()}var Nc={};function Tm(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{style:r,children:o,scrollTop:a,scrollLeft:s,viewBox:u,...h}=t,g=Object.values(h),f=Object.keys(h).map(x=>n||e.hasAttribute(x)?x:Nc[x]||(Nc[x]=x.replace(/([A-Z])/g,l=>"-"+l.toLowerCase())));o!==void 0&&(e.textContent=o);for(const x in r)if(r.hasOwnProperty(x)){const l=Rm(x,r[x]);Tc.test(x)?e.style.setProperty(x,l):e.style[x]=l}f.forEach((x,l)=>{e.setAttribute(x,g[l])}),a!==void 0&&(e.scrollTop=a),s!==void 0&&(e.scrollLeft=s),u!==void 0&&e.setAttribute("viewBox",u)}var Ar={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},Nm=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),jm=["Webkit","Ms","Moz","O"];Ar=Object.keys(Ar).reduce((e,t)=>(jm.forEach(n=>e[Nm(n,t)]=e[t]),e),Ar);var Am=/^(matrix|translate|scale|rotate|skew)/,Lm=/^(translate)/,Im=/^(rotate|skew)/,ba=(e,t)=>pe.num(e)&&e!==0?e+t:e,Mo=(e,t)=>pe.arr(e)?e.every(n=>Mo(n,t)):pe.num(e)?e===t:parseFloat(e)===t,Dm=class extends Lo{constructor({x:e,y:t,z:n,...r}){const o=[],a=[];(e||t||n)&&(o.push([e||0,t||0,n||0]),a.push(s=>[`translate3d(${s.map(u=>ba(u,"px")).join(",")})`,Mo(s,0)])),Jt(r,(s,u)=>{if(u==="transform")o.push([s||""]),a.push(h=>[h,h===""]);else if(Am.test(u)){if(delete r[u],pe.und(s))return;const h=Lm.test(u)?"px":Im.test(u)?"deg":"";o.push(Pt(s)),a.push(u==="rotate3d"?([g,f,x,l])=>[`rotate3d(${g},${f},${x},${ba(l,h)})`,Mo(l,0)]:g=>[`${u}(${g.map(f=>ba(f,h)).join(",")})`,Mo(g,u.startsWith("scale")?1:0)])}}),o.length&&(r.transform=new Mm(o,a)),super(r)}},Mm=class extends Gl{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 Me(this.inputs,(n,r)=>{const o=Et(n[0]),[a,s]=this.transforms[r](pe.arr(o)?o:n.map(Et));e+=" "+a,t=t&&s}),t?"none":e}observerAdded(e){e==1&&Me(this.inputs,t=>Me(t,n=>Tt(n)&&Vn(n,this)))}observerRemoved(e){e==0&&Me(this.inputs,t=>Me(t,n=>Tt(n)&&Cr(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),kr(this,e)}},Fm=["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"];Ft.assign({batchedUpdates:sn.unstable_batchedUpdates,createStringInterpolator:Ql,colors:Pp});var Um=im(Fm,{applyAnimatedValues:Tm,createAnimatedStyle:e=>new Dm(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),$m=Um.animated;function jc(e){const{rows:t}=e,n=Bm({from:{opacity:0},to:{opacity:1}});return E.jsxs($m.div,{style:n,className:"flex w-full animate-pulse flex-col items-start space-y-3",children:[[...Array(t)].map((r,o)=>E.jsx("div",{className:"h-16 w-full rounded-lg bg-gray-100 p-5"},`skeleton_rows_${o}`)),E.jsx("span",{className:"sr-only",children:"Loading..."})]})}function Vm({item:e}){return E.jsx("th",{className:`h-10 min-w-max items-center px-4 ${e.align==="left"?"text-start":e.align==="center"?"text-center":"text-end"}`,children:E.jsx(qe,{size:"xs",weight:"normal",color:"text-gray-700",children:e&&e.value})})}function Hm({row:e,onClick:t}){return E.jsx("tr",{children:e.columns.map((n,r)=>E.jsx("td",{children:E.jsx("div",{className:`my-auto flex h-12 w-full items-center ${n.align==="left"?"justify-start":n.align==="center"?"justify-center":"justify-end"} truncate px-4 font-thin`,children:n.value.type==="button_component"?E.jsx(Ye,{label:n.value.label??"",disabled:n.value.disabled,onClick:()=>t&&t(n.value.id)}):E.jsx(qe,{size:"sm",weight:"light",color:"text-gray-700",children:n.value.title})})},`${n.value}-${r}`))})}function zm(e){return E.jsx(E.Fragment,{children:[...Array(e.rows)].map((t,n)=>E.jsx("tr",{className:"border-b border-gray-50",children:[...Array(e.columns)].map((r,o)=>E.jsx("td",{className:"table-cell animate-pulse",children:E.jsx("div",{className:`flex grow items-center ${e.type=="double"?"h-[72px]":"h-12"}`,children:E.jsx("div",{className:"m-2 h-8 w-28 rounded-lg bg-gray-50"})})},`form_element_skeleton_col_${o}`))},`form_element_skeleton_${n}`))})}function Ac({header:e=[],rows:t=[],pending:n,onClick:r}){const{t:o}=Qe();return E.jsxs("div",{className:"relative overflow-auto rounded-lg rounded-b-lg rounded-t-lg border border-gray-900/10",children:[E.jsxs("table",{className:"table w-full table-auto",children:[E.jsx("thead",{className:"sticky top-0 table-header-group w-full bg-gray-50",children:E.jsx("tr",{children:e.map((a,s)=>E.jsx(Vm,{item:a},`${a.value}-${s}`))})}),E.jsx("tbody",{children:n?E.jsx(zm,{columns:e.length??5,rows:t.length??10}):t.map((a,s)=>E.jsx(Hm,{row:a,onClick:r},s))})]}),!t.length&&E.jsx("div",{className:"p-6",children:E.jsx(qe,{color:"text-gray-200",className:"text-center",size:"sm",children:o("noData")})})]})}function wa(e){"@babel/helpers - typeof";return wa=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},wa(e)}function Lc(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":wa(XMLHttpRequest))==="object"}function qm(e){return!!e&&typeof e.then=="function"}function Km(e){return qm(e)?e:Promise.resolve(e)}function Wm(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 xa={exports:{}},Fo={exports:{}},Ic;function Gm(){return Ic||(Ic=1,function(e,t){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof Rn<"u"&&Rn,r=function(){function a(){this.fetch=!1,this.DOMException=n.DOMException}return a.prototype=n,new a}();(function(a){(function(s){var u=typeof a<"u"&&a||typeof self<"u"&&self||typeof u<"u"&&u,h={searchParams:"URLSearchParams"in u,iterable:"Symbol"in u&&"iterator"in Symbol,blob:"FileReader"in u&&"Blob"in u&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in u,arrayBuffer:"ArrayBuffer"in u};function g(P){return P&&DataView.prototype.isPrototypeOf(P)}if(h.arrayBuffer)var f=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],x=ArrayBuffer.isView||function(P){return P&&f.indexOf(Object.prototype.toString.call(P))>-1};function l(P){if(typeof P!="string"&&(P=String(P)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(P)||P==="")throw new TypeError('Invalid character in header field name: "'+P+'"');return P.toLowerCase()}function y(P){return typeof P!="string"&&(P=String(P)),P}function i(P){var L={next:function(){var q=P.shift();return{done:q===void 0,value:q}}};return h.iterable&&(L[Symbol.iterator]=function(){return L}),L}function c(P){this.map={},P instanceof c?P.forEach(function(L,q){this.append(q,L)},this):Array.isArray(P)?P.forEach(function(L){this.append(L[0],L[1])},this):P&&Object.getOwnPropertyNames(P).forEach(function(L){this.append(L,P[L])},this)}c.prototype.append=function(P,L){P=l(P),L=y(L);var q=this.map[P];this.map[P]=q?q+", "+L:L},c.prototype.delete=function(P){delete this.map[l(P)]},c.prototype.get=function(P){return P=l(P),this.has(P)?this.map[P]:null},c.prototype.has=function(P){return this.map.hasOwnProperty(l(P))},c.prototype.set=function(P,L){this.map[l(P)]=y(L)},c.prototype.forEach=function(P,L){for(var q in this.map)this.map.hasOwnProperty(q)&&P.call(L,this.map[q],q,this)},c.prototype.keys=function(){var P=[];return this.forEach(function(L,q){P.push(q)}),i(P)},c.prototype.values=function(){var P=[];return this.forEach(function(L){P.push(L)}),i(P)},c.prototype.entries=function(){var P=[];return this.forEach(function(L,q){P.push([q,L])}),i(P)},h.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);function p(P){if(P.bodyUsed)return Promise.reject(new TypeError("Already read"));P.bodyUsed=!0}function d(P){return new Promise(function(L,q){P.onload=function(){L(P.result)},P.onerror=function(){q(P.error)}})}function m(P){var L=new FileReader,q=d(L);return L.readAsArrayBuffer(P),q}function v(P){var L=new FileReader,q=d(L);return L.readAsText(P),q}function b(P){for(var L=new Uint8Array(P),q=new Array(L.length),K=0;K<L.length;K++)q[K]=String.fromCharCode(L[K]);return q.join("")}function C(P){if(P.slice)return P.slice(0);var L=new Uint8Array(P.byteLength);return L.set(new Uint8Array(P)),L.buffer}function S(){return this.bodyUsed=!1,this._initBody=function(P){this.bodyUsed=this.bodyUsed,this._bodyInit=P,P?typeof P=="string"?this._bodyText=P:h.blob&&Blob.prototype.isPrototypeOf(P)?this._bodyBlob=P:h.formData&&FormData.prototype.isPrototypeOf(P)?this._bodyFormData=P:h.searchParams&&URLSearchParams.prototype.isPrototypeOf(P)?this._bodyText=P.toString():h.arrayBuffer&&h.blob&&g(P)?(this._bodyArrayBuffer=C(P.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):h.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(P)||x(P))?this._bodyArrayBuffer=C(P):this._bodyText=P=Object.prototype.toString.call(P):this._bodyText="",this.headers.get("content-type")||(typeof P=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):h.searchParams&&URLSearchParams.prototype.isPrototypeOf(P)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},h.blob&&(this.blob=function(){var P=p(this);if(P)return P;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 P=p(this);return P||(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(m)}),this.text=function(){var P=p(this);if(P)return P;if(this._bodyBlob)return v(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(b(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},h.formData&&(this.formData=function(){return this.text().then(j)}),this.json=function(){return this.text().then(JSON.parse)},this}var k=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function B(P){var L=P.toUpperCase();return k.indexOf(L)>-1?L:P}function O(P,L){if(!(this instanceof O))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');L=L||{};var q=L.body;if(P instanceof O){if(P.bodyUsed)throw new TypeError("Already read");this.url=P.url,this.credentials=P.credentials,L.headers||(this.headers=new c(P.headers)),this.method=P.method,this.mode=P.mode,this.signal=P.signal,!q&&P._bodyInit!=null&&(q=P._bodyInit,P.bodyUsed=!0)}else this.url=String(P);if(this.credentials=L.credentials||this.credentials||"same-origin",(L.headers||!this.headers)&&(this.headers=new c(L.headers)),this.method=B(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")&&q)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(q),(this.method==="GET"||this.method==="HEAD")&&(L.cache==="no-store"||L.cache==="no-cache")){var K=/([?&])_=[^&]*/;if(K.test(this.url))this.url=this.url.replace(K,"$1_="+new Date().getTime());else{var Q=/\?/;this.url+=(Q.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}O.prototype.clone=function(){return new O(this,{body:this._bodyInit})};function j(P){var L=new FormData;return P.trim().split("&").forEach(function(q){if(q){var K=q.split("="),Q=K.shift().replace(/\+/g," "),Z=K.join("=").replace(/\+/g," ");L.append(decodeURIComponent(Q),decodeURIComponent(Z))}}),L}function I(P){var L=new c,q=P.replace(/\r?\n[\t ]+/g," ");return q.split("\r").map(function(K){return K.indexOf(`
73
+ `)===0?K.substr(1,K.length):K}).forEach(function(K){var Q=K.split(":"),Z=Q.shift().trim();if(Z){var ee=Q.join(":").trim();L.append(Z,ee)}}),L}S.call(O.prototype);function D(P,L){if(!(this instanceof D))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 c(L.headers),this.url=L.url||"",this._initBody(P)}S.call(D.prototype),D.prototype.clone=function(){return new D(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},D.error=function(){var P=new D(null,{status:0,statusText:""});return P.type="error",P};var M=[301,302,303,307,308];D.redirect=function(P,L){if(M.indexOf(L)===-1)throw new RangeError("Invalid status code");return new D(null,{status:L,headers:{location:P}})},s.DOMException=u.DOMException;try{new s.DOMException}catch{s.DOMException=function(L,q){this.message=L,this.name=q;var K=Error(L);this.stack=K.stack},s.DOMException.prototype=Object.create(Error.prototype),s.DOMException.prototype.constructor=s.DOMException}function $(P,L){return new Promise(function(q,K){var Q=new O(P,L);if(Q.signal&&Q.signal.aborted)return K(new s.DOMException("Aborted","AbortError"));var Z=new XMLHttpRequest;function ee(){Z.abort()}Z.onload=function(){var ne={status:Z.status,statusText:Z.statusText,headers:I(Z.getAllResponseHeaders()||"")};ne.url="responseURL"in Z?Z.responseURL:ne.headers.get("X-Request-URL");var me="response"in Z?Z.response:Z.responseText;setTimeout(function(){q(new D(me,ne))},0)},Z.onerror=function(){setTimeout(function(){K(new TypeError("Network request failed"))},0)},Z.ontimeout=function(){setTimeout(function(){K(new TypeError("Network request failed"))},0)},Z.onabort=function(){setTimeout(function(){K(new s.DOMException("Aborted","AbortError"))},0)};function ue(ne){try{return ne===""&&u.location.href?u.location.href:ne}catch{return ne}}Z.open(Q.method,ue(Q.url),!0),Q.credentials==="include"?Z.withCredentials=!0:Q.credentials==="omit"&&(Z.withCredentials=!1),"responseType"in Z&&(h.blob?Z.responseType="blob":h.arrayBuffer&&Q.headers.get("Content-Type")&&Q.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(Z.responseType="arraybuffer")),L&&typeof L.headers=="object"&&!(L.headers instanceof c)?Object.getOwnPropertyNames(L.headers).forEach(function(ne){Z.setRequestHeader(ne,y(L.headers[ne]))}):Q.headers.forEach(function(ne,me){Z.setRequestHeader(me,ne)}),Q.signal&&(Q.signal.addEventListener("abort",ee),Z.onreadystatechange=function(){Z.readyState===4&&Q.signal.removeEventListener("abort",ee)}),Z.send(typeof Q._bodyInit>"u"?null:Q._bodyInit)})}return $.polyfill=!0,u.fetch||(u.fetch=$,u.Headers=c,u.Request=O,u.Response=D),s.Headers=c,s.Request=O,s.Response=D,s.fetch=$,s})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=n.fetch?n:r;t=o.fetch,t.default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t}(Fo,Fo.exports)),Fo.exports}(function(e,t){var n;if(typeof fetch=="function"&&(typeof Rn<"u"&&Rn.fetch?n=Rn.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof Wm<"u"&&typeof window>"u"){var r=n||Gm();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(xa,xa.exports);var Dc=xa.exports;const Mc=Xo(Dc),Fc=Xu({__proto__:null,default:Mc},[Dc]);function Uc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function $c(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Uc(Object(n),!0).forEach(function(r){Xm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uc(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xm(e,t,n){return t=Jm(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jm(e){var t=Ym(e,"string");return Sn(t)=="symbol"?t:t+""}function Ym(e,t){if(Sn(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Sn(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Sn(e){"@babel/helpers - typeof";return Sn=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},Sn(e)}var nn;typeof fetch=="function"&&(typeof global<"u"&&global.fetch?nn=global.fetch:typeof window<"u"&&window.fetch?nn=window.fetch:nn=fetch);var Lr;Lc()&&(typeof global<"u"&&global.XMLHttpRequest?Lr=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(Lr=window.XMLHttpRequest));var Uo;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?Uo=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(Uo=window.ActiveXObject)),!nn&&Fc&&!Lr&&!Uo&&(nn=Mc||Fc),typeof nn!="function"&&(nn=void 0);var ka=function(t,n){if(n&&Sn(n)==="object"){var r="";for(var o in n)r+="&"+encodeURIComponent(o)+"="+encodeURIComponent(n[o]);if(!r)return t;t=t+(t.indexOf("?")!==-1?"&":"?")+r.slice(1)}return t},Vc=function(t,n,r,o){var a=function(h){if(!h.ok)return r(h.statusText||"Error",{status:h.status});h.text().then(function(g){r(null,{status:h.status,data:g})}).catch(r)};if(o){var s=o(t,n);if(s instanceof Promise){s.then(a).catch(r);return}}typeof fetch=="function"?fetch(t,n).then(a).catch(r):nn(t,n).then(a).catch(r)},Hc=!1,Qm=function(t,n,r,o){t.queryStringParams&&(n=ka(n,t.queryStringParams));var a=$c({},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&&(a["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(a["Content-Type"]="application/json");var s=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,u=$c({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:a},Hc?{}:s),h=typeof t.alternateFetch=="function"&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{Vc(n,u,o,h)}catch(g){if(!s||Object.keys(s).length===0||!g.message||g.message.indexOf("not implemented")<0)return o(g);try{Object.keys(s).forEach(function(f){delete u[f]}),Vc(n,u,o,h),Hc=!0}catch(f){o(f)}}},Zm=function(t,n,r,o){r&&Sn(r)==="object"&&(r=ka("",r).slice(1)),t.queryStringParams&&(n=ka(n,t.queryStringParams));try{var a;Lr?a=new Lr:a=new Uo("MSXML2.XMLHTTP.3.0"),a.open(r?"POST":"GET",n,1),t.crossDomain||a.setRequestHeader("X-Requested-With","XMLHttpRequest"),a.withCredentials=!!t.withCredentials,r&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.overrideMimeType&&a.overrideMimeType("application/json");var s=t.customHeaders;if(s=typeof s=="function"?s():s,s)for(var u in s)a.setRequestHeader(u,s[u]);a.onreadystatechange=function(){a.readyState>3&&o(a.status>=400?a.statusText:null,{status:a.status,data:a.responseText})},a.send(r)}catch(h){console&&console.log(h)}},eg=function(t,n,r,o){if(typeof r=="function"&&(o=r,r=void 0),o=o||function(){},nn&&n.indexOf("file:")!==0)return Qm(t,n,r,o);if(Lc()||typeof ActiveXObject=="function")return Zm(t,n,r,o);o(new Error("No fetch and no xhr implementation found!"))};function zn(e){"@babel/helpers - typeof";return zn=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},zn(e)}function zc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Ca(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zc(Object(n),!0).forEach(function(r){qc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zc(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ng(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,Kc(r.key),r)}}function rg(e,t,n){return t&&ng(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function qc(e,t,n){return t=Kc(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kc(e){var t=og(e,"string");return zn(t)=="symbol"?t:t+""}function og(e,t){if(zn(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(zn(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ig=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,o){return qc({},r,o||"")},parseLoadPayload:function(n,r){},request:eg,reloadInterval:typeof window<"u"?!1:60*60*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},Wc=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]:{};tg(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return rg(e,[{key:"init",value:function(n){var r=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=n,this.options=Ca(Ca(Ca({},ig()),this.options||{}),o),this.allOptions=a,this.services&&this.options.reloadInterval){var s=setInterval(function(){return r.reload()},this.options.reloadInterval);zn(s)==="object"&&typeof s.unref=="function"&&s.unref()}}},{key:"readMulti",value:function(n,r,o){this._readAny(n,n,r,r,o)}},{key:"read",value:function(n,r,o){this._readAny([n],n,[r],r,o)}},{key:"_readAny",value:function(n,r,o,a,s){var u=this,h=this.options.loadPath;typeof this.options.loadPath=="function"&&(h=this.options.loadPath(n,o)),h=Km(h),h.then(function(g){if(!g)return s(null,{});var f=u.services.interpolator.interpolate(g,{lng:n.join("+"),ns:o.join("+")});u.loadUrl(f,s,r,a)})}},{key:"loadUrl",value:function(n,r,o,a){var s=this,u=typeof o=="string"?[o]:o,h=typeof a=="string"?[a]:a,g=this.options.parseLoadPayload(u,h);this.options.request(this.options,n,g,function(f,x){if(x&&(x.status>=500&&x.status<600||!x.status))return r("failed loading "+n+"; status code: "+x.status,!0);if(x&&x.status>=400&&x.status<500)return r("failed loading "+n+"; status code: "+x.status,!1);if(!x&&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,y;try{typeof x.data=="string"?l=s.options.parse(x.data,o,a):l=x.data}catch{y="failed parsing "+n+" to json"}if(y)return r(y,!1);r(null,l)})}},{key:"create",value:function(n,r,o,a,s){var u=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var h=this.options.parsePayload(r,o,a),g=0,f=[],x=[];n.forEach(function(l){var y=u.options.addPath;typeof u.options.addPath=="function"&&(y=u.options.addPath(l,r));var i=u.services.interpolator.interpolate(y,{lng:l,ns:r});u.options.request(u.options,i,h,function(c,p){g+=1,f.push(c),x.push(p),g===n.length&&typeof s=="function"&&s(f,x)})})}}},{key:"reload",value:function(){var n=this,r=this.services,o=r.backendConnector,a=r.languageUtils,s=r.logger,u=o.language;if(!(u&&u.toLowerCase()==="cimode")){var h=[],g=function(x){var l=a.toResolveHierarchy(x);l.forEach(function(y){h.indexOf(y)<0&&h.push(y)})};g(u),this.allOptions.preload&&this.allOptions.preload.forEach(function(f){return g(f)}),h.forEach(function(f){n.allOptions.ns.forEach(function(x){o.read(f,x,"read",null,null,function(l,y){l&&s.warn("loading namespace ".concat(x," for language ").concat(f," failed"),l),!l&&y&&s.log("loaded namespace ".concat(x," for language ").concat(f),y),o.loaded("".concat(f,"|").concat(x),l,y)})})})}}}])}();Wc.type="backend";const{slice:ag,forEach:sg}=[];function lg(e){return sg.call(ag.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const Gc=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,cg=(e,t,n)=>{const r=n||{};r.path=r.path||"/";const o=encodeURIComponent(t);let a=`${e}=${o}`;if(r.maxAge>0){const s=r.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");a+=`; Max-Age=${Math.floor(s)}`}if(r.domain){if(!Gc.test(r.domain))throw new TypeError("option domain is invalid");a+=`; Domain=${r.domain}`}if(r.path){if(!Gc.test(r.path))throw new TypeError("option path is invalid");a+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(a+="; HttpOnly"),r.secure&&(a+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return a},Xc={create(e,t,n,r){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+n*60*1e3)),r&&(o.domain=r),document.cookie=cg(e,encodeURIComponent(t),o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let o=n[r];for(;o.charAt(0)===" ";)o=o.substring(1,o.length);if(o.indexOf(t)===0)return o.substring(t.length,o.length)}return null},remove(e){this.create(e,"",-1)}};var ug={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return Xc.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:a}=t;n&&typeof document<"u"&&Xc.create(n,e,r,o,a)}},dg={name:"querystring",lookup(e){var r;let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:o}=window.location;!window.location.search&&((r=window.location.hash)==null?void 0:r.indexOf("?"))>-1&&(o=window.location.hash.substring(window.location.hash.indexOf("?")));const s=o.substring(1).split("&");for(let u=0;u<s.length;u++){const h=s[u].indexOf("=");h>0&&s[u].substring(0,h)===t&&(n=s[u].substring(h+1))}}return n}};let Ir=null;const Jc=()=>{if(Ir!==null)return Ir;try{Ir=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Ir=!1}return Ir};var fg={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&Jc())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&Jc()&&window.localStorage.setItem(n,e)}};let Dr=null;const Yc=()=>{if(Dr!==null)return Dr;try{Dr=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Dr=!1}return Dr};var hg={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&Yc())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&Yc()&&window.sessionStorage.setItem(n,e)}},pg={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:o}=navigator;if(n)for(let a=0;a<n.length;a++)t.push(n[a]);r&&t.push(r),o&&t.push(o)}return t.length>0?t:void 0}},mg={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}},gg={name:"path",lookup(e){var o;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(o=n[typeof t=="number"?t:0])==null?void 0:o.replace("/",""):void 0}},yg={name:"subdomain",lookup(e){var o,a;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((a=(o=window.location)==null?void 0:o.hostname)==null?void 0:a.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};function vg(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class Qc{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=lg(n,this.options||{},vg()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(ug),this.addDetector(dg),this.addDetector(fg),this.addDetector(hg),this.addDetector(pg),this.addDetector(mg),this.addDetector(gg),this.addDetector(yg)}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 o=this.detectors[r].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(n=n.concat(o))}}),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)}))}}Qc.type="languageDetector",pt.use(Wc).use(Qc).use(fp).init({fallbackLng:"en",interpolation:{escapeValue:!1},backend:{loadPath:"https://translations.piggy.eu/portal-sessions/{{lng}}.json"}});function bg({children:e,config:t,payload:n}){const[r,o]=H.useState("");return H.useEffect(()=>{r||(tt.initialize(t.apiKey,t.host),localStorage.setItem("apiKey",JSON.stringify(t.apiKey)),(async()=>{const a=await vo.create(n);o(a.data.data.uuid)})())},[t,n,r]),r?E.jsxs(H.StrictMode,{children:[E.jsx(pl,{...t,sessionUuid:r,children:E.jsxs("div",{className:"flex h-screen w-screen bg-primary-50",children:[r&&E.jsx(kl,{}),e]})}),E.jsx(ps,{position:"bottom-center"})]}):E.jsx(E.Fragment,{children:"Loading..."})}/**
74
74
  * @remix-run/router v1.16.1
75
75
  *
76
76
  * Copyright (c) Remix Software Inc.
@@ -79,8 +79,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
79
79
  * LICENSE.md file in the root directory of this source tree.
80
80
  *
81
81
  * @license MIT
82
- */function tt(){return tt=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},tt.apply(this,arguments)}var at;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(at||(at={}));function wg(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:n,v5Compat:r=!1}=e,o;o=t.map((y,i)=>f(y,typeof y=="string"?null:y.state,i===0?"default":void 0));let a=h(n??o.length-1),s=at.Pop,u=null;function h(y){return Math.min(Math.max(y,0),o.length-1)}function g(){return o[a]}function f(y,i,c){i===void 0&&(i=null);let p=Ca(o?g().pathname:"/",y,i,c);return ct(p.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(y)),p}function x(y){return typeof y=="string"?y:Sn(y)}return{get index(){return a},get action(){return s},get location(){return g()},createHref:x,createURL(y){return new URL(x(y),"http://localhost")},encodeLocation(y){let i=typeof y=="string"?rn(y):y;return{pathname:i.pathname||"",search:i.search||"",hash:i.hash||""}},push(y,i){s=at.Push;let c=f(y,i);a+=1,o.splice(a,o.length,c),r&&u&&u({action:s,location:c,delta:1})},replace(y,i){s=at.Replace;let c=f(y,i);o[a]=c,r&&u&&u({action:s,location:c,delta:0})},go(y){s=at.Pop;let i=h(a+y),c=o[i];a=i,u&&u({action:s,location:c,delta:y})},listen(y){return u=y,()=>{u=null}}}}function ke(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ct(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function xg(){return Math.random().toString(36).substr(2,8)}function Ca(e,t,n,r){return n===void 0&&(n=null),tt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?rn(t):t,{state:n,key:t&&t.key||r||xg()})}function Sn(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 rn(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 Qe;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Qe||(Qe={}));const kg=new Set(["lazy","caseSensitive","path","id","index","children"]);function Cg(e){return e.index===!0}function Ea(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((o,a)=>{let s=[...n,a],u=typeof o.id=="string"?o.id:s.join("-");if(ke(o.index!==!0||!o.children,"Cannot specify children on an index route"),ke(!r[u],'Found a route id collision on id "'+u+`". Route id's must be globally unique within Data Router usages`),Cg(o)){let h=tt({},o,t(o),{id:u});return r[u]=h,h}else{let h=tt({},o,t(o),{id:u,children:void 0});return r[u]=h,o.children&&(h.children=Ea(o.children,t,s,r)),h}})}function qn(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?rn(t):t,o=Vt(r.pathname||"/",n);if(o==null)return null;let a=Zc(e);Sg(a);let s=null;for(let u=0;s==null&&u<a.length;++u){let h=Ig(o);s=Ag(a[u],h)}return s}function Eg(e,t){let{route:n,pathname:r,params:o}=e;return{id:n.id,pathname:r,params:o,data:t[n.id],handle:n.handle}}function Zc(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let o=(a,s,u)=>{let h={relativePath:u===void 0?a.path||"":u,caseSensitive:a.caseSensitive===!0,childrenIndex:s,route:a};h.relativePath.startsWith("/")&&(ke(h.relativePath.startsWith(r),'Absolute route path "'+h.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),h.relativePath=h.relativePath.slice(r.length));let g=Qt([r,h.relativePath]),f=n.concat(h);a.children&&a.children.length>0&&(ke(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+g+'".')),Zc(a.children,t,f,g)),!(a.path==null&&!a.index)&&t.push({path:g,score:Ng(g,a.index),routesMeta:f})};return e.forEach((a,s)=>{var u;if(a.path===""||!((u=a.path)!=null&&u.includes("?")))o(a,s);else for(let h of eu(a.path))o(a,s,h)}),t}function eu(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return o?[a,""]:[a];let s=eu(r.join("/")),u=[];return u.push(...s.map(h=>h===""?a:[a,h].join("/"))),o&&u.push(...s),u.map(h=>e.startsWith("/")&&h===""?"/":h)}function Sg(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:jg(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Pg=/^:[\w-]+$/,Bg=3,Og=2,_g=1,Rg=10,Tg=-2,tu=e=>e==="*";function Ng(e,t){let n=e.split("/"),r=n.length;return n.some(tu)&&(r+=Tg),t&&(r+=Og),n.filter(o=>!tu(o)).reduce((o,a)=>o+(Pg.test(a)?Bg:a===""?_g:Rg),r)}function jg(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function Ag(e,t){let{routesMeta:n}=e,r={},o="/",a=[];for(let s=0;s<n.length;++s){let u=n[s],h=s===n.length-1,g=o==="/"?t:t.slice(o.length)||"/",f=Sa({path:u.relativePath,caseSensitive:u.caseSensitive,end:h},g);if(!f)return null;Object.assign(r,f.params);let x=u.route;a.push({params:r,pathname:Qt([o,f.pathname]),pathnameBase:Fg(Qt([o,f.pathnameBase])),route:x}),f.pathnameBase!=="/"&&(o=Qt([o,f.pathnameBase]))}return a}function Sa(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Lg(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let a=o[0],s=a.replace(/(.)\/+$/,"$1"),u=o.slice(1);return{params:r.reduce((g,f,x)=>{let{paramName:l,isOptional:y}=f;if(l==="*"){let c=u[x]||"";s=a.slice(0,a.length-c.length).replace(/(.)\/+$/,"$1")}const i=u[x];return y&&!i?g[l]=void 0:g[l]=(i||"").replace(/%2F/g,"/"),g},{}),pathname:a,pathnameBase:s,pattern:e}}function Lg(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),ct(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=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,u,h)=>(r.push({paramName:u,isOptional:h!=null}),h?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function Ig(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ct(!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 Vt(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 Dg(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?rn(e):e;return{pathname:n?n.startsWith("/")?n:Mg(n,t):t,search:Ug(r),hash:$g(o)}}function Mg(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Pa(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 nu(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Ba(e,t){let n=nu(e);return t?n.map((r,o)=>o===e.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Oa(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=rn(e):(o=tt({},e),ke(!o.pathname||!o.pathname.includes("?"),Pa("?","pathname","search",o)),ke(!o.pathname||!o.pathname.includes("#"),Pa("#","pathname","hash",o)),ke(!o.search||!o.search.includes("#"),Pa("#","search","hash",o)));let a=e===""||o.pathname==="",s=a?"/":o.pathname,u;if(s==null)u=n;else{let x=t.length-1;if(!r&&s.startsWith("..")){let l=s.split("/");for(;l[0]==="..";)l.shift(),x-=1;o.pathname=l.join("/")}u=x>=0?t[x]:"/"}let h=Dg(o,u),g=s&&s!=="/"&&s.endsWith("/"),f=(a||s===".")&&n.endsWith("/");return!h.pathname.endsWith("/")&&(g||f)&&(h.pathname+="/"),h}const Qt=e=>e.join("/").replace(/\/\/+/g,"/"),Fg=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Ug=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,$g=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class ru{constructor(t,n,r,o){o===void 0&&(o=!1),this.status=t,this.statusText=n||"",this.internal=o,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function _a(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const ou=["post","put","patch","delete"],Vg=new Set(ou),Hg=["get",...ou],zg=new Set(Hg),qg=new Set([301,302,303,307,308]),Kg=new Set([307,308]),Ra={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Wg={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Dr={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Ta=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Gg=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),iu="remix-router-transitions";function Xg(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;ke(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let o;if(e.mapRouteProperties)o=e.mapRouteProperties;else if(e.detectErrorBoundary){let A=e.detectErrorBoundary;o=z=>({hasErrorBoundary:A(z)})}else o=Gg;let a={},s=Ea(e.routes,o,void 0,a),u,h=e.basename||"/",g=e.unstable_dataStrategy||Zg,f=tt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,unstable_skipActionErrorRevalidation:!1},e.future),x=null,l=new Set,y=null,i=null,c=null,p=e.hydrationData!=null,d=qn(s,e.history.location,h),m=null;if(d==null){let A=Nt(404,{pathname:e.history.location.pathname}),{matches:z,route:Y}=gu(s);d=z,m={[Y.id]:A}}let v,b=d.some(A=>A.route.lazy),C=d.some(A=>A.route.loader);if(b)v=!1;else if(!C)v=!0;else if(f.v7_partialHydration){let A=e.hydrationData?e.hydrationData.loaderData:null,z=e.hydrationData?e.hydrationData.errors:null,Y=ie=>ie.route.loader?typeof ie.route.loader=="function"&&ie.route.loader.hydrate===!0?!1:A&&A[ie.route.id]!==void 0||z&&z[ie.route.id]!==void 0:!0;if(z){let ie=d.findIndex(he=>z[he.route.id]!==void 0);v=d.slice(0,ie+1).every(Y)}else v=d.every(Y)}else v=e.hydrationData!=null;let S,k={historyAction:e.history.action,location:e.history.location,matches:d,initialized:v,navigation:Ra,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||m,fetchers:new Map,blockers:new Map},B=at.Pop,O=!1,j,I=!1,D=new Map,M=null,$=!1,P=!1,L=[],q=[],K=new Map,Q=0,Z=-1,ee=new Map,ue=new Set,ne=new Map,me=new Map,de=new Set,V=new Map,U=new Map,J=!1;function w(){if(x=e.history.listen(A=>{let{action:z,location:Y,delta:ie}=A;if(J){J=!1;return}ct(U.size===0||ie!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let he=Wt({currentLocation:k.location,nextLocation:Y,historyAction:z});if(he&&ie!=null){J=!0,e.history.go(ie*-1),ht(he,{state:"blocked",location:Y,proceed(){ht(he,{state:"proceeding",proceed:void 0,reset:void 0,location:Y}),e.history.go(ie)},reset(){let Pe=new Map(k.blockers);Pe.set(he,Dr),R({blockers:Pe})}});return}return F(z,Y)}),n){dy(t,D);let A=()=>fy(t,D);t.addEventListener("pagehide",A),M=()=>t.removeEventListener("pagehide",A)}return k.initialized||F(at.Pop,k.location,{initialHydration:!0}),S}function _(){x&&x(),M&&M(),l.clear(),j&&j.abort(),k.fetchers.forEach((A,z)=>bt(z)),k.blockers.forEach((A,z)=>mt(z))}function N(A){return l.add(A),()=>l.delete(A)}function R(A,z){z===void 0&&(z={}),k=tt({},k,A);let Y=[],ie=[];f.v7_fetcherPersist&&k.fetchers.forEach((he,Pe)=>{he.state==="idle"&&(de.has(Pe)?ie.push(Pe):Y.push(Pe))}),[...l].forEach(he=>he(k,{deletedFetchers:ie,unstable_viewTransitionOpts:z.viewTransitionOpts,unstable_flushSync:z.flushSync===!0})),f.v7_fetcherPersist&&(Y.forEach(he=>k.fetchers.delete(he)),ie.forEach(he=>bt(he)))}function W(A,z,Y){var ie,he;let{flushSync:Pe}=Y===void 0?{}:Y,we=k.actionData!=null&&k.navigation.formMethod!=null&&Ht(k.navigation.formMethod)&&k.navigation.state==="loading"&&((ie=A.state)==null?void 0:ie._isRedirect)!==!0,ve;z.actionData?Object.keys(z.actionData).length>0?ve=z.actionData:ve=null:we?ve=k.actionData:ve=null;let Re=z.loaderData?pu(k.loaderData,z.loaderData,z.matches||[],z.errors):k.loaderData,_e=k.blockers;_e.size>0&&(_e=new Map(_e),_e.forEach((Se,T)=>_e.set(T,Dr)));let dt=O===!0||k.navigation.formMethod!=null&&Ht(k.navigation.formMethod)&&((he=A.state)==null?void 0:he._isRedirect)!==!0;u&&(s=u,u=void 0),$||B===at.Pop||(B===at.Push?e.history.push(A,A.state):B===at.Replace&&e.history.replace(A,A.state));let ft;if(B===at.Pop){let Se=D.get(k.location.pathname);Se&&Se.has(A.pathname)?ft={currentLocation:k.location,nextLocation:A}:D.has(A.pathname)&&(ft={currentLocation:A,nextLocation:k.location})}else if(I){let Se=D.get(k.location.pathname);Se?Se.add(A.pathname):(Se=new Set([A.pathname]),D.set(k.location.pathname,Se)),ft={currentLocation:k.location,nextLocation:A}}R(tt({},z,{actionData:ve,loaderData:Re,historyAction:B,location:A,initialized:!0,navigation:Ra,revalidation:"idle",restoreScrollPosition:on(A,z.matches||k.matches),preventScrollReset:dt,blockers:_e}),{viewTransitionOpts:ft,flushSync:Pe===!0}),B=at.Pop,O=!1,I=!1,$=!1,P=!1,L=[],q=[]}async function G(A,z){if(typeof A=="number"){e.history.go(A);return}let Y=Na(k.location,k.matches,h,f.v7_prependBasename,A,f.v7_relativeSplatPath,z==null?void 0:z.fromRouteId,z==null?void 0:z.relative),{path:ie,submission:he,error:Pe}=au(f.v7_normalizeFormMethod,!1,Y,z),we=k.location,ve=Ca(k.location,ie,z&&z.state);ve=tt({},ve,e.history.encodeLocation(ve));let Re=z&&z.replace!=null?z.replace:void 0,_e=at.Push;Re===!0?_e=at.Replace:Re===!1||he!=null&&Ht(he.formMethod)&&he.formAction===k.location.pathname+k.location.search&&(_e=at.Replace);let dt=z&&"preventScrollReset"in z?z.preventScrollReset===!0:void 0,ft=(z&&z.unstable_flushSync)===!0,Se=Wt({currentLocation:we,nextLocation:ve,historyAction:_e});if(Se){ht(Se,{state:"blocked",location:ve,proceed(){ht(Se,{state:"proceeding",proceed:void 0,reset:void 0,location:ve}),G(A,z)},reset(){let T=new Map(k.blockers);T.set(Se,Dr),R({blockers:T})}});return}return await F(_e,ve,{submission:he,pendingError:Pe,preventScrollReset:dt,replace:z&&z.replace,enableViewTransition:z&&z.unstable_viewTransition,flushSync:ft})}function X(){if(Fe(),R({revalidation:"loading"}),k.navigation.state!=="submitting"){if(k.navigation.state==="idle"){F(k.historyAction,k.location,{startUninterruptedRevalidation:!0});return}F(B||k.historyAction,k.navigation.location,{overrideNavigation:k.navigation})}}async function F(A,z,Y){j&&j.abort(),j=null,B=A,$=(Y&&Y.startUninterruptedRevalidation)===!0,wt(k.location,k.matches),O=(Y&&Y.preventScrollReset)===!0,I=(Y&&Y.enableViewTransition)===!0;let ie=u||s,he=Y&&Y.overrideNavigation,Pe=qn(ie,z,h),we=(Y&&Y.flushSync)===!0;if(!Pe){let Se=Nt(404,{pathname:z.pathname}),{matches:T,route:se}=gu(ie);gt(),W(z,{matches:T,loaderData:{},errors:{[se.id]:Se}},{flushSync:we});return}if(k.initialized&&!P&&iy(k.location,z)&&!(Y&&Y.submission&&Ht(Y.submission.formMethod))){W(z,{matches:Pe},{flushSync:we});return}j=new AbortController;let ve=Kn(e.history,z,j.signal,Y&&Y.submission),Re;if(Y&&Y.pendingError)Re=[Mr(Pe).route.id,{type:Qe.error,error:Y.pendingError}];else if(Y&&Y.submission&&Ht(Y.submission.formMethod)){let Se=await ce(ve,z,Y.submission,Pe,{replace:Y.replace,flushSync:we});if(Se.shortCircuited)return;Re=Se.pendingActionResult,he=Ia(z,Y.submission),we=!1,ve=Kn(e.history,ve.url,ve.signal)}let{shortCircuited:_e,loaderData:dt,errors:ft}=await fe(ve,z,Pe,he,Y&&Y.submission,Y&&Y.fetcherSubmission,Y&&Y.replace,Y&&Y.initialHydration===!0,we,Re);_e||(j=null,W(z,tt({matches:Pe},mu(Re),{loaderData:dt,errors:ft})))}async function ce(A,z,Y,ie,he){he===void 0&&(he={}),Fe();let Pe=cy(z,Y);R({navigation:Pe},{flushSync:he.flushSync===!0});let we,ve=La(ie,z);if(!ve.route.action&&!ve.route.lazy)we={type:Qe.error,error:Nt(405,{method:A.method,pathname:z.pathname,routeId:ve.route.id})};else if(we=(await be("action",A,[ve],ie))[0],A.signal.aborted)return{shortCircuited:!0};if(Bn(we)){let Re;return he&&he.replace!=null?Re=he.replace:Re=du(we.response.headers.get("Location"),new URL(A.url),h)===k.location.pathname+k.location.search,await ae(A,we,{submission:Y,replace:Re}),{shortCircuited:!0}}if(Pn(we))throw Nt(400,{type:"defer-action"});if(jt(we)){let Re=Mr(ie,ve.route.id);return(he&&he.replace)!==!0&&(B=at.Push),{pendingActionResult:[Re.route.id,we]}}return{pendingActionResult:[ve.route.id,we]}}async function fe(A,z,Y,ie,he,Pe,we,ve,Re,_e){let dt=ie||Ia(z,he),ft=he||Pe||ku(dt),Se=u||s,[T,se]=su(e.history,k,Y,ft,z,f.v7_partialHydration&&ve===!0,f.unstable_skipActionErrorRevalidation,P,L,q,de,ne,ue,Se,h,_e);if(gt(Oe=>!(Y&&Y.some(nt=>nt.route.id===Oe))||T&&T.some(nt=>nt.route.id===Oe)),Z=++Q,T.length===0&&se.length===0){let Oe=Ee();return W(z,tt({matches:Y,loaderData:{},errors:_e&&jt(_e[1])?{[_e[0]]:_e[1].error}:null},mu(_e),Oe?{fetchers:new Map(k.fetchers)}:{}),{flushSync:Re}),{shortCircuited:!0}}if(!$&&(!f.v7_partialHydration||!ve)){se.forEach(nt=>{let lt=k.fetchers.get(nt.key),He=Fr(void 0,lt?lt.data:void 0);k.fetchers.set(nt.key,He)});let Oe;_e&&!jt(_e[1])?Oe={[_e[0]]:_e[1].data}:k.actionData&&(Object.keys(k.actionData).length===0?Oe=null:Oe=k.actionData),R(tt({navigation:dt},Oe!==void 0?{actionData:Oe}:{},se.length>0?{fetchers:new Map(k.fetchers)}:{}),{flushSync:Re})}se.forEach(Oe=>{K.has(Oe.key)&&et(Oe.key),Oe.controller&&K.set(Oe.key,Oe.controller)});let ye=()=>se.forEach(Oe=>et(Oe.key));j&&j.signal.addEventListener("abort",ye);let{loaderResults:xe,fetcherResults:Ie}=await Ce(k.matches,Y,T,se,A);if(A.signal.aborted)return{shortCircuited:!0};j&&j.signal.removeEventListener("abort",ye),se.forEach(Oe=>K.delete(Oe.key));let Ue=yu([...xe,...Ie]);if(Ue){if(Ue.idx>=T.length){let Oe=se[Ue.idx-T.length].key;ue.add(Oe)}return await ae(A,Ue.result,{replace:we}),{shortCircuited:!0}}let{loaderData:je,errors:Be}=hu(k,Y,T,xe,_e,se,Ie,V);V.forEach((Oe,nt)=>{Oe.subscribe(lt=>{(lt||Oe.done)&&V.delete(nt)})}),f.v7_partialHydration&&ve&&k.errors&&Object.entries(k.errors).filter(Oe=>{let[nt]=Oe;return!T.some(lt=>lt.route.id===nt)}).forEach(Oe=>{let[nt,lt]=Oe;Be=Object.assign(Be||{},{[nt]:lt})});let st=Ee(),Ge=Lt(Z),Xe=st||Ge||se.length>0;return tt({loaderData:je,errors:Be},Xe?{fetchers:new Map(k.fetchers)}:{})}function re(A,z,Y,ie){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");K.has(A)&&et(A);let he=(ie&&ie.unstable_flushSync)===!0,Pe=u||s,we=Na(k.location,k.matches,h,f.v7_prependBasename,Y,f.v7_relativeSplatPath,z,ie==null?void 0:ie.relative),ve=qn(Pe,we,h);if(!ve){Ve(A,z,Nt(404,{pathname:we}),{flushSync:he});return}let{path:Re,submission:_e,error:dt}=au(f.v7_normalizeFormMethod,!0,we,ie);if(dt){Ve(A,z,dt,{flushSync:he});return}let ft=La(ve,Re);if(O=(ie&&ie.preventScrollReset)===!0,_e&&Ht(_e.formMethod)){oe(A,z,Re,ft,ve,he,_e);return}ne.set(A,{routeId:z,path:Re}),ge(A,z,Re,ft,ve,he,_e)}async function oe(A,z,Y,ie,he,Pe,we){if(Fe(),ne.delete(A),!ie.route.action&&!ie.route.lazy){let He=Nt(405,{method:we.formMethod,pathname:Y,routeId:z});Ve(A,z,He,{flushSync:Pe});return}let ve=k.fetchers.get(A);Ae(A,uy(we,ve),{flushSync:Pe});let Re=new AbortController,_e=Kn(e.history,Y,Re.signal,we);K.set(A,Re);let dt=Q,Se=(await be("action",_e,[ie],he))[0];if(_e.signal.aborted){K.get(A)===Re&&K.delete(A);return}if(f.v7_fetcherPersist&&de.has(A)){if(Bn(Se)||jt(Se)){Ae(A,yn(void 0));return}}else{if(Bn(Se))if(K.delete(A),Z>dt){Ae(A,yn(void 0));return}else return ue.add(A),Ae(A,Fr(we)),ae(_e,Se,{fetcherSubmission:we});if(jt(Se)){Ve(A,z,Se.error);return}}if(Pn(Se))throw Nt(400,{type:"defer-action"});let T=k.navigation.location||k.location,se=Kn(e.history,T,Re.signal),ye=u||s,xe=k.navigation.state!=="idle"?qn(ye,k.navigation.location,h):k.matches;ke(xe,"Didn't find any matches after fetcher action");let Ie=++Q;ee.set(A,Ie);let Ue=Fr(we,Se.data);k.fetchers.set(A,Ue);let[je,Be]=su(e.history,k,xe,we,T,!1,f.unstable_skipActionErrorRevalidation,P,L,q,de,ne,ue,ye,h,[ie.route.id,Se]);Be.filter(He=>He.key!==A).forEach(He=>{let an=He.key,Go=k.fetchers.get(an),qa=Fr(void 0,Go?Go.data:void 0);k.fetchers.set(an,qa),K.has(an)&&et(an),He.controller&&K.set(an,He.controller)}),R({fetchers:new Map(k.fetchers)});let st=()=>Be.forEach(He=>et(He.key));Re.signal.addEventListener("abort",st);let{loaderResults:Ge,fetcherResults:Xe}=await Ce(k.matches,xe,je,Be,se);if(Re.signal.aborted)return;Re.signal.removeEventListener("abort",st),ee.delete(A),K.delete(A),Be.forEach(He=>K.delete(He.key));let Oe=yu([...Ge,...Xe]);if(Oe){if(Oe.idx>=je.length){let He=Be[Oe.idx-je.length].key;ue.add(He)}return ae(se,Oe.result)}let{loaderData:nt,errors:lt}=hu(k,k.matches,je,Ge,void 0,Be,Xe,V);if(k.fetchers.has(A)){let He=yn(Se.data);k.fetchers.set(A,He)}Lt(Ie),k.navigation.state==="loading"&&Ie>Z?(ke(B,"Expected pending action"),j&&j.abort(),W(k.navigation.location,{matches:xe,loaderData:nt,errors:lt,fetchers:new Map(k.fetchers)})):(R({errors:lt,loaderData:pu(k.loaderData,nt,xe,lt),fetchers:new Map(k.fetchers)}),P=!1)}async function ge(A,z,Y,ie,he,Pe,we){let ve=k.fetchers.get(A);Ae(A,Fr(we,ve?ve.data:void 0),{flushSync:Pe});let Re=new AbortController,_e=Kn(e.history,Y,Re.signal);K.set(A,Re);let dt=Q,Se=(await be("loader",_e,[ie],he))[0];if(Pn(Se)&&(Se=await xu(Se,_e.signal,!0)||Se),K.get(A)===Re&&K.delete(A),!_e.signal.aborted){if(de.has(A)){Ae(A,yn(void 0));return}if(Bn(Se))if(Z>dt){Ae(A,yn(void 0));return}else{ue.add(A),await ae(_e,Se);return}if(jt(Se)){Ve(A,z,Se.error);return}ke(!Pn(Se),"Unhandled fetcher deferred data"),Ae(A,yn(Se.data))}}async function ae(A,z,Y){let{submission:ie,fetcherSubmission:he,replace:Pe}=Y===void 0?{}:Y;z.response.headers.has("X-Remix-Revalidate")&&(P=!0);let we=z.response.headers.get("Location");ke(we,"Expected a Location header on the redirect Response"),we=du(we,new URL(A.url),h);let ve=Ca(k.location,we,{_isRedirect:!0});if(n){let T=!1;if(z.response.headers.has("X-Remix-Reload-Document"))T=!0;else if(Ta.test(we)){const se=e.history.createURL(we);T=se.origin!==t.location.origin||Vt(se.pathname,h)==null}if(T){Pe?t.location.replace(we):t.location.assign(we);return}}j=null;let Re=Pe===!0?at.Replace:at.Push,{formMethod:_e,formAction:dt,formEncType:ft}=k.navigation;!ie&&!he&&_e&&dt&&ft&&(ie=ku(k.navigation));let Se=ie||he;if(Kg.has(z.response.status)&&Se&&Ht(Se.formMethod))await F(Re,ve,{submission:tt({},Se,{formAction:we}),preventScrollReset:O});else{let T=Ia(ve,ie);await F(Re,ve,{overrideNavigation:T,fetcherSubmission:he,preventScrollReset:O})}}async function be(A,z,Y,ie){try{let he=await ey(g,A,z,Y,ie,a,o);return await Promise.all(he.map((Pe,we)=>{if(ay(Pe)){let ve=Pe.result;return{type:Qe.redirect,response:ry(ve,z,Y[we].route.id,ie,h,f.v7_relativeSplatPath)}}return ny(Pe)}))}catch(he){return Y.map(()=>({type:Qe.error,error:he}))}}async function Ce(A,z,Y,ie,he){let[Pe,...we]=await Promise.all([Y.length?be("loader",he,Y,z):[],...ie.map(ve=>{if(ve.matches&&ve.match&&ve.controller){let Re=Kn(e.history,ve.path,ve.controller.signal);return be("loader",Re,[ve.match],ve.matches).then(_e=>_e[0])}else return Promise.resolve({type:Qe.error,error:Nt(404,{pathname:ve.path})})})]);return await Promise.all([wu(A,Y,Pe,Pe.map(()=>he.signal),!1,k.loaderData),wu(A,ie.map(ve=>ve.match),we,ie.map(ve=>ve.controller?ve.controller.signal:null),!0)]),{loaderResults:Pe,fetcherResults:we}}function Fe(){P=!0,L.push(...gt()),ne.forEach((A,z)=>{K.has(z)&&(q.push(z),et(z))})}function Ae(A,z,Y){Y===void 0&&(Y={}),k.fetchers.set(A,z),R({fetchers:new Map(k.fetchers)},{flushSync:(Y&&Y.flushSync)===!0})}function Ve(A,z,Y,ie){ie===void 0&&(ie={});let he=Mr(k.matches,z);bt(A),R({errors:{[he.route.id]:Y},fetchers:new Map(k.fetchers)},{flushSync:(ie&&ie.flushSync)===!0})}function ze(A){return f.v7_fetcherPersist&&(me.set(A,(me.get(A)||0)+1),de.has(A)&&de.delete(A)),k.fetchers.get(A)||Wg}function bt(A){let z=k.fetchers.get(A);K.has(A)&&!(z&&z.state==="loading"&&ee.has(A))&&et(A),ne.delete(A),ee.delete(A),ue.delete(A),de.delete(A),k.fetchers.delete(A)}function Ke(A){if(f.v7_fetcherPersist){let z=(me.get(A)||0)-1;z<=0?(me.delete(A),de.add(A)):me.set(A,z)}else bt(A);R({fetchers:new Map(k.fetchers)})}function et(A){let z=K.get(A);ke(z,"Expected fetch controller: "+A),z.abort(),K.delete(A)}function We(A){for(let z of A){let Y=ze(z),ie=yn(Y.data);k.fetchers.set(z,ie)}}function Ee(){let A=[],z=!1;for(let Y of ue){let ie=k.fetchers.get(Y);ke(ie,"Expected fetcher: "+Y),ie.state==="loading"&&(ue.delete(Y),A.push(Y),z=!0)}return We(A),z}function Lt(A){let z=[];for(let[Y,ie]of ee)if(ie<A){let he=k.fetchers.get(Y);ke(he,"Expected fetcher: "+Y),he.state==="loading"&&(et(Y),ee.delete(Y),z.push(Y))}return We(z),z.length>0}function ut(A,z){let Y=k.blockers.get(A)||Dr;return U.get(A)!==z&&U.set(A,z),Y}function mt(A){k.blockers.delete(A),U.delete(A)}function ht(A,z){let Y=k.blockers.get(A)||Dr;ke(Y.state==="unblocked"&&z.state==="blocked"||Y.state==="blocked"&&z.state==="blocked"||Y.state==="blocked"&&z.state==="proceeding"||Y.state==="blocked"&&z.state==="unblocked"||Y.state==="proceeding"&&z.state==="unblocked","Invalid blocker state transition: "+Y.state+" -> "+z.state);let ie=new Map(k.blockers);ie.set(A,z),R({blockers:ie})}function Wt(A){let{currentLocation:z,nextLocation:Y,historyAction:ie}=A;if(U.size===0)return;U.size>1&&ct(!1,"A router only supports one blocker at a time");let he=Array.from(U.entries()),[Pe,we]=he[he.length-1],ve=k.blockers.get(Pe);if(!(ve&&ve.state==="proceeding")&&we({currentLocation:z,nextLocation:Y,historyAction:ie}))return Pe}function gt(A){let z=[];return V.forEach((Y,ie)=>{(!A||A(ie))&&(Y.cancel(),z.push(ie),V.delete(ie))}),z}function Bt(A,z,Y){if(y=A,c=z,i=Y||null,!p&&k.navigation===Ra){p=!0;let ie=on(k.location,k.matches);ie!=null&&R({restoreScrollPosition:ie})}return()=>{y=null,c=null,i=null}}function yt(A,z){return i&&i(A,z.map(ie=>Eg(ie,k.loaderData)))||A.key}function wt(A,z){if(y&&c){let Y=yt(A,z);y[Y]=c()}}function on(A,z){if(y){let Y=yt(A,z),ie=y[Y];if(typeof ie=="number")return ie}return null}function On(A){a={},u=Ea(A,o,void 0,a)}return S={get basename(){return h},get future(){return f},get state(){return k},get routes(){return s},get window(){return t},initialize:w,subscribe:N,enableScrollRestoration:Bt,navigate:G,fetch:re,revalidate:X,createHref:A=>e.history.createHref(A),encodeLocation:A=>e.history.encodeLocation(A),getFetcher:ze,deleteFetcher:Ke,dispose:_,getBlocker:ut,deleteBlocker:mt,_internalFetchControllers:K,_internalActiveDeferreds:V,_internalSetRoutes:On},S}function Jg(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Na(e,t,n,r,o,a,s,u){let h,g;if(s){h=[];for(let x of t)if(h.push(x),x.route.id===s){g=x;break}}else h=t,g=t[t.length-1];let f=Oa(o||".",Ba(h,a),Vt(e.pathname,n)||e.pathname,u==="path");return o==null&&(f.search=e.search,f.hash=e.hash),(o==null||o===""||o===".")&&g&&g.route.index&&!Aa(f.search)&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(f.pathname=f.pathname==="/"?n:Qt([n,f.pathname])),Sn(f)}function au(e,t,n,r){if(!r||!Jg(r))return{path:n};if(r.formMethod&&!ly(r.formMethod))return{path:n,error:Nt(405,{method:r.formMethod})};let o=()=>({path:n,error:Nt(400,{type:"invalid-body"})}),a=r.formMethod||"get",s=e?a.toUpperCase():a.toLowerCase(),u=vu(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Ht(s))return o();let l=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((y,i)=>{let[c,p]=i;return""+y+c+"="+p+`
83
- `},""):String(r.body);return{path:n,submission:{formMethod:s,formAction:u,formEncType:r.formEncType,formData:void 0,json:void 0,text:l}}}else if(r.formEncType==="application/json"){if(!Ht(s))return o();try{let l=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:s,formAction:u,formEncType:r.formEncType,formData:void 0,json:l,text:void 0}}}catch{return o()}}}ke(typeof FormData=="function","FormData is not available in this environment");let h,g;if(r.formData)h=ja(r.formData),g=r.formData;else if(r.body instanceof FormData)h=ja(r.body),g=r.body;else if(r.body instanceof URLSearchParams)h=r.body,g=fu(h);else if(r.body==null)h=new URLSearchParams,g=new FormData;else try{h=new URLSearchParams(r.body),g=fu(h)}catch{return o()}let f={formMethod:s,formAction:u,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:g,json:void 0,text:void 0};if(Ht(f.formMethod))return{path:n,submission:f};let x=rn(n);return t&&x.search&&Aa(x.search)&&h.append("index",""),x.search="?"+h,{path:Sn(x),submission:f}}function Yg(e,t){let n=e;if(t){let r=e.findIndex(o=>o.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function su(e,t,n,r,o,a,s,u,h,g,f,x,l,y,i,c){let p=c?jt(c[1])?c[1].error:c[1].data:void 0,d=e.createURL(t.location),m=e.createURL(o),v=c&&jt(c[1])?c[0]:void 0,b=v?Yg(n,v):n,C=c?c[1].statusCode:void 0,S=s&&C&&C>=400,k=b.filter((O,j)=>{let{route:I}=O;if(I.lazy)return!0;if(I.loader==null)return!1;if(a)return typeof I.loader!="function"||I.loader.hydrate?!0:t.loaderData[I.id]===void 0&&(!t.errors||t.errors[I.id]===void 0);if(Qg(t.loaderData,t.matches[j],O)||h.some($=>$===O.route.id))return!0;let D=t.matches[j],M=O;return cu(O,tt({currentUrl:d,currentParams:D.params,nextUrl:m,nextParams:M.params},r,{actionResult:p,unstable_actionStatus:C,defaultShouldRevalidate:S?!1:u||d.pathname+d.search===m.pathname+m.search||d.search!==m.search||lu(D,M)}))}),B=[];return x.forEach((O,j)=>{if(a||!n.some(P=>P.route.id===O.routeId)||f.has(j))return;let I=qn(y,O.path,i);if(!I){B.push({key:j,routeId:O.routeId,path:O.path,matches:null,match:null,controller:null});return}let D=t.fetchers.get(j),M=La(I,O.path),$=!1;l.has(j)?$=!1:g.includes(j)?$=!0:D&&D.state!=="idle"&&D.data===void 0?$=u:$=cu(M,tt({currentUrl:d,currentParams:t.matches[t.matches.length-1].params,nextUrl:m,nextParams:n[n.length-1].params},r,{actionResult:p,unstable_actionStatus:C,defaultShouldRevalidate:S?!1:u})),$&&B.push({key:j,routeId:O.routeId,path:O.path,matches:I,match:M,controller:new AbortController})}),[k,B]}function Qg(e,t,n){let r=!t||n.route.id!==t.route.id,o=e[n.route.id]===void 0;return r||o}function lu(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function cu(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function uu(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let o=n[e.id];ke(o,"No route found in manifest");let a={};for(let s in r){let h=o[s]!==void 0&&s!=="hasErrorBoundary";ct(!h,'Route "'+o.id+'" has a static property "'+s+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+s+'" will be ignored.')),!h&&!kg.has(s)&&(a[s]=r[s])}Object.assign(o,a),Object.assign(o,tt({},t(o),{lazy:void 0}))}function Zg(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function ey(e,t,n,r,o,a,s,u){let h=r.reduce((x,l)=>x.add(l.route.id),new Set),g=new Set,f=await e({matches:o.map(x=>{let l=h.has(x.route.id);return tt({},x,{shouldLoad:l,resolve:i=>(g.add(x.route.id),l?ty(t,n,x,a,s,i,u):Promise.resolve({type:Qe.data,result:void 0}))})}),request:n,params:o[0].params,context:u});return o.forEach(x=>ke(g.has(x.route.id),'`match.resolve()` was not called for route id "'+x.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),f.filter((x,l)=>h.has(o[l].route.id))}async function ty(e,t,n,r,o,a,s){let u,h,g=f=>{let x,l=new Promise((c,p)=>x=p);h=()=>x(),t.signal.addEventListener("abort",h);let y=c=>typeof f!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):f({request:t,params:n.params,context:s},...c!==void 0?[c]:[]),i;return a?i=a(c=>y(c)):i=(async()=>{try{return{type:"data",result:await y()}}catch(c){return{type:"error",result:c}}})(),Promise.race([i,l])};try{let f=n.route[e];if(n.route.lazy)if(f){let x,[l]=await Promise.all([g(f).catch(y=>{x=y}),uu(n.route,o,r)]);if(x!==void 0)throw x;u=l}else if(await uu(n.route,o,r),f=n.route[e],f)u=await g(f);else if(e==="action"){let x=new URL(t.url),l=x.pathname+x.search;throw Nt(405,{method:t.method,pathname:l,routeId:n.route.id})}else return{type:Qe.data,result:void 0};else if(f)u=await g(f);else{let x=new URL(t.url),l=x.pathname+x.search;throw Nt(404,{pathname:l})}ke(u.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(f){return{type:Qe.error,result:f}}finally{h&&t.signal.removeEventListener("abort",h)}return u}async function ny(e){let{result:t,type:n,status:r}=e;if(bu(t)){let s;try{let u=t.headers.get("Content-Type");u&&/\bapplication\/json\b/.test(u)?t.body==null?s=null:s=await t.json():s=await t.text()}catch(u){return{type:Qe.error,error:u}}return n===Qe.error?{type:Qe.error,error:new ru(t.status,t.statusText,s),statusCode:t.status,headers:t.headers}:{type:Qe.data,data:s,statusCode:t.status,headers:t.headers}}if(n===Qe.error)return{type:Qe.error,error:t,statusCode:_a(t)?t.status:r};if(sy(t)){var o,a;return{type:Qe.deferred,deferredData:t,statusCode:(o=t.init)==null?void 0:o.status,headers:((a=t.init)==null?void 0:a.headers)&&new Headers(t.init.headers)}}return{type:Qe.data,data:t,statusCode:r}}function ry(e,t,n,r,o,a){let s=e.headers.get("Location");if(ke(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!Ta.test(s)){let u=r.slice(0,r.findIndex(h=>h.route.id===n)+1);s=Na(new URL(t.url),u,o,!0,s,a),e.headers.set("Location",s)}return e}function du(e,t,n){if(Ta.test(e)){let r=e,o=r.startsWith("//")?new URL(t.protocol+r):new URL(r),a=Vt(o.pathname,n)!=null;if(o.origin===t.origin&&a)return o.pathname+o.search+o.hash}return e}function Kn(e,t,n,r){let o=e.createURL(vu(t)).toString(),a={signal:n};if(r&&Ht(r.formMethod)){let{formMethod:s,formEncType:u}=r;a.method=s.toUpperCase(),u==="application/json"?(a.headers=new Headers({"Content-Type":u}),a.body=JSON.stringify(r.json)):u==="text/plain"?a.body=r.text:u==="application/x-www-form-urlencoded"&&r.formData?a.body=ja(r.formData):a.body=r.formData}return new Request(o,a)}function ja(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function fu(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function oy(e,t,n,r,o,a){let s={},u=null,h,g=!1,f={},x=r&&jt(r[1])?r[1].error:void 0;return n.forEach((l,y)=>{let i=t[y].route.id;if(ke(!Bn(l),"Cannot handle redirect results in processLoaderData"),jt(l)){let c=l.error;x!==void 0&&(c=x,x=void 0),u=u||{};{let p=Mr(e,i);u[p.route.id]==null&&(u[p.route.id]=c)}s[i]=void 0,g||(g=!0,h=_a(l.error)?l.error.status:500),l.headers&&(f[i]=l.headers)}else Pn(l)?(o.set(i,l.deferredData),s[i]=l.deferredData.data,l.statusCode!=null&&l.statusCode!==200&&!g&&(h=l.statusCode),l.headers&&(f[i]=l.headers)):(s[i]=l.data,l.statusCode&&l.statusCode!==200&&!g&&(h=l.statusCode),l.headers&&(f[i]=l.headers))}),x!==void 0&&r&&(u={[r[0]]:x},s[r[0]]=void 0),{loaderData:s,errors:u,statusCode:h||200,loaderHeaders:f}}function hu(e,t,n,r,o,a,s,u){let{loaderData:h,errors:g}=oy(t,n,r,o,u);for(let f=0;f<a.length;f++){let{key:x,match:l,controller:y}=a[f];ke(s!==void 0&&s[f]!==void 0,"Did not find corresponding fetcher result");let i=s[f];if(!(y&&y.signal.aborted))if(jt(i)){let c=Mr(e.matches,l==null?void 0:l.route.id);g&&g[c.route.id]||(g=tt({},g,{[c.route.id]:i.error})),e.fetchers.delete(x)}else if(Bn(i))ke(!1,"Unhandled fetcher revalidation redirect");else if(Pn(i))ke(!1,"Unhandled fetcher deferred data");else{let c=yn(i.data);e.fetchers.set(x,c)}}return{loaderData:h,errors:g}}function pu(e,t,n,r){let o=tt({},t);for(let a of n){let s=a.route.id;if(t.hasOwnProperty(s)?t[s]!==void 0&&(o[s]=t[s]):e[s]!==void 0&&a.route.loader&&(o[s]=e[s]),r&&r.hasOwnProperty(s))break}return o}function mu(e){return e?jt(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Mr(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function gu(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Nt(e,t){let{pathname:n,routeId:r,method:o,type:a}=t===void 0?{}:t,s="Unknown Server Error",u="Unknown @remix-run/router error";return e===400?(s="Bad Request",o&&n&&r?u="You made a "+o+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":a==="defer-action"?u="defer() is not supported in actions":a==="invalid-body"&&(u="Unable to encode submission body")):e===403?(s="Forbidden",u='Route "'+r+'" does not match URL "'+n+'"'):e===404?(s="Not Found",u='No route matches URL "'+n+'"'):e===405&&(s="Method Not Allowed",o&&n&&r?u="You made a "+o.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":o&&(u='Invalid request method "'+o.toUpperCase()+'"')),new ru(e||500,s,new Error(u),!0)}function yu(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(Bn(n))return{result:n,idx:t}}}function vu(e){let t=typeof e=="string"?rn(e):e;return Sn(tt({},t,{hash:""}))}function iy(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function ay(e){return bu(e.result)&&qg.has(e.result.status)}function Pn(e){return e.type===Qe.deferred}function jt(e){return e.type===Qe.error}function Bn(e){return(e&&e.type)===Qe.redirect}function sy(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function bu(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function ly(e){return zg.has(e.toLowerCase())}function Ht(e){return Vg.has(e.toLowerCase())}async function wu(e,t,n,r,o,a){for(let s=0;s<n.length;s++){let u=n[s],h=t[s];if(!h)continue;let g=e.find(x=>x.route.id===h.route.id),f=g!=null&&!lu(g,h)&&(a&&a[h.route.id])!==void 0;if(Pn(u)&&(o||f)){let x=r[s];ke(x,"Expected an AbortSignal for revalidating fetcher deferred result"),await xu(u,x,o).then(l=>{l&&(n[s]=l||n[s])})}}}async function xu(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:Qe.data,data:e.deferredData.unwrappedData}}catch(o){return{type:Qe.error,error:o}}return{type:Qe.data,data:e.deferredData.data}}}function Aa(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function La(e,t){let n=typeof t=="string"?rn(t).search:t.search;if(e[e.length-1].route.index&&Aa(n||""))return e[e.length-1];let r=nu(e);return r[r.length-1]}function ku(e){let{formMethod:t,formAction:n,formEncType:r,text:o,formData:a,json:s}=e;if(!(!t||!n||!r)){if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:o};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(s!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:s,text:void 0}}}function Ia(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function cy(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Fr(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function uy(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function yn(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function dy(e,t){try{let n=e.sessionStorage.getItem(iu);if(n){let r=JSON.parse(n);for(let[o,a]of Object.entries(r||{}))a&&Array.isArray(a)&&t.set(o,new Set(a||[]))}}catch{}}function fy(e,t){if(t.size>0){let n={};for(let[r,o]of t)n[r]=[...o];try{e.sessionStorage.setItem(iu,JSON.stringify(n))}catch(r){ct(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/**
82
+ */function nt(){return nt=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},nt.apply(this,arguments)}var at;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(at||(at={}));function wg(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:n,v5Compat:r=!1}=e,o;o=t.map((y,i)=>f(y,typeof y=="string"?null:y.state,i===0?"default":void 0));let a=h(n??o.length-1),s=at.Pop,u=null;function h(y){return Math.min(Math.max(y,0),o.length-1)}function g(){return o[a]}function f(y,i,c){i===void 0&&(i=null);let p=Ea(o?g().pathname:"/",y,i,c);return ct(p.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(y)),p}function x(y){return typeof y=="string"?y:Pn(y)}return{get index(){return a},get action(){return s},get location(){return g()},createHref:x,createURL(y){return new URL(x(y),"http://localhost")},encodeLocation(y){let i=typeof y=="string"?rn(y):y;return{pathname:i.pathname||"",search:i.search||"",hash:i.hash||""}},push(y,i){s=at.Push;let c=f(y,i);a+=1,o.splice(a,o.length,c),r&&u&&u({action:s,location:c,delta:1})},replace(y,i){s=at.Replace;let c=f(y,i);o[a]=c,r&&u&&u({action:s,location:c,delta:0})},go(y){s=at.Pop;let i=h(a+y),c=o[i];a=i,u&&u({action:s,location:c,delta:y})},listen(y){return u=y,()=>{u=null}}}}function ke(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ct(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function xg(){return Math.random().toString(36).substr(2,8)}function Ea(e,t,n,r){return n===void 0&&(n=null),nt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?rn(t):t,{state:n,key:t&&t.key||r||xg()})}function Pn(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 rn(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 Ze;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Ze||(Ze={}));const kg=new Set(["lazy","caseSensitive","path","id","index","children"]);function Cg(e){return e.index===!0}function Sa(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((o,a)=>{let s=[...n,a],u=typeof o.id=="string"?o.id:s.join("-");if(ke(o.index!==!0||!o.children,"Cannot specify children on an index route"),ke(!r[u],'Found a route id collision on id "'+u+`". Route id's must be globally unique within Data Router usages`),Cg(o)){let h=nt({},o,t(o),{id:u});return r[u]=h,h}else{let h=nt({},o,t(o),{id:u,children:void 0});return r[u]=h,o.children&&(h.children=Sa(o.children,t,s,r)),h}})}function qn(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?rn(t):t,o=Vt(r.pathname||"/",n);if(o==null)return null;let a=Zc(e);Sg(a);let s=null;for(let u=0;s==null&&u<a.length;++u){let h=Ig(o);s=Ag(a[u],h)}return s}function Eg(e,t){let{route:n,pathname:r,params:o}=e;return{id:n.id,pathname:r,params:o,data:t[n.id],handle:n.handle}}function Zc(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let o=(a,s,u)=>{let h={relativePath:u===void 0?a.path||"":u,caseSensitive:a.caseSensitive===!0,childrenIndex:s,route:a};h.relativePath.startsWith("/")&&(ke(h.relativePath.startsWith(r),'Absolute route path "'+h.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),h.relativePath=h.relativePath.slice(r.length));let g=Qt([r,h.relativePath]),f=n.concat(h);a.children&&a.children.length>0&&(ke(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+g+'".')),Zc(a.children,t,f,g)),!(a.path==null&&!a.index)&&t.push({path:g,score:Ng(g,a.index),routesMeta:f})};return e.forEach((a,s)=>{var u;if(a.path===""||!((u=a.path)!=null&&u.includes("?")))o(a,s);else for(let h of eu(a.path))o(a,s,h)}),t}function eu(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return o?[a,""]:[a];let s=eu(r.join("/")),u=[];return u.push(...s.map(h=>h===""?a:[a,h].join("/"))),o&&u.push(...s),u.map(h=>e.startsWith("/")&&h===""?"/":h)}function Sg(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:jg(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Pg=/^:[\w-]+$/,Bg=3,Og=2,_g=1,Rg=10,Tg=-2,tu=e=>e==="*";function Ng(e,t){let n=e.split("/"),r=n.length;return n.some(tu)&&(r+=Tg),t&&(r+=Og),n.filter(o=>!tu(o)).reduce((o,a)=>o+(Pg.test(a)?Bg:a===""?_g:Rg),r)}function jg(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function Ag(e,t){let{routesMeta:n}=e,r={},o="/",a=[];for(let s=0;s<n.length;++s){let u=n[s],h=s===n.length-1,g=o==="/"?t:t.slice(o.length)||"/",f=Pa({path:u.relativePath,caseSensitive:u.caseSensitive,end:h},g);if(!f)return null;Object.assign(r,f.params);let x=u.route;a.push({params:r,pathname:Qt([o,f.pathname]),pathnameBase:Fg(Qt([o,f.pathnameBase])),route:x}),f.pathnameBase!=="/"&&(o=Qt([o,f.pathnameBase]))}return a}function Pa(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Lg(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let a=o[0],s=a.replace(/(.)\/+$/,"$1"),u=o.slice(1);return{params:r.reduce((g,f,x)=>{let{paramName:l,isOptional:y}=f;if(l==="*"){let c=u[x]||"";s=a.slice(0,a.length-c.length).replace(/(.)\/+$/,"$1")}const i=u[x];return y&&!i?g[l]=void 0:g[l]=(i||"").replace(/%2F/g,"/"),g},{}),pathname:a,pathnameBase:s,pattern:e}}function Lg(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),ct(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=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,u,h)=>(r.push({paramName:u,isOptional:h!=null}),h?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function Ig(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ct(!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 Vt(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 Dg(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?rn(e):e;return{pathname:n?n.startsWith("/")?n:Mg(n,t):t,search:Ug(r),hash:$g(o)}}function Mg(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Ba(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 nu(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Oa(e,t){let n=nu(e);return t?n.map((r,o)=>o===e.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function _a(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=rn(e):(o=nt({},e),ke(!o.pathname||!o.pathname.includes("?"),Ba("?","pathname","search",o)),ke(!o.pathname||!o.pathname.includes("#"),Ba("#","pathname","hash",o)),ke(!o.search||!o.search.includes("#"),Ba("#","search","hash",o)));let a=e===""||o.pathname==="",s=a?"/":o.pathname,u;if(s==null)u=n;else{let x=t.length-1;if(!r&&s.startsWith("..")){let l=s.split("/");for(;l[0]==="..";)l.shift(),x-=1;o.pathname=l.join("/")}u=x>=0?t[x]:"/"}let h=Dg(o,u),g=s&&s!=="/"&&s.endsWith("/"),f=(a||s===".")&&n.endsWith("/");return!h.pathname.endsWith("/")&&(g||f)&&(h.pathname+="/"),h}const Qt=e=>e.join("/").replace(/\/\/+/g,"/"),Fg=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Ug=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,$g=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class ru{constructor(t,n,r,o){o===void 0&&(o=!1),this.status=t,this.statusText=n||"",this.internal=o,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Ra(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const ou=["post","put","patch","delete"],Vg=new Set(ou),Hg=["get",...ou],zg=new Set(Hg),qg=new Set([301,302,303,307,308]),Kg=new Set([307,308]),Ta={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Wg={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Mr={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Na=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Gg=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),iu="remix-router-transitions";function Xg(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;ke(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let o;if(e.mapRouteProperties)o=e.mapRouteProperties;else if(e.detectErrorBoundary){let A=e.detectErrorBoundary;o=z=>({hasErrorBoundary:A(z)})}else o=Gg;let a={},s=Sa(e.routes,o,void 0,a),u,h=e.basename||"/",g=e.unstable_dataStrategy||Zg,f=nt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,unstable_skipActionErrorRevalidation:!1},e.future),x=null,l=new Set,y=null,i=null,c=null,p=e.hydrationData!=null,d=qn(s,e.history.location,h),m=null;if(d==null){let A=Nt(404,{pathname:e.history.location.pathname}),{matches:z,route:Y}=gu(s);d=z,m={[Y.id]:A}}let v,b=d.some(A=>A.route.lazy),C=d.some(A=>A.route.loader);if(b)v=!1;else if(!C)v=!0;else if(f.v7_partialHydration){let A=e.hydrationData?e.hydrationData.loaderData:null,z=e.hydrationData?e.hydrationData.errors:null,Y=ie=>ie.route.loader?typeof ie.route.loader=="function"&&ie.route.loader.hydrate===!0?!1:A&&A[ie.route.id]!==void 0||z&&z[ie.route.id]!==void 0:!0;if(z){let ie=d.findIndex(he=>z[he.route.id]!==void 0);v=d.slice(0,ie+1).every(Y)}else v=d.every(Y)}else v=e.hydrationData!=null;let S,k={historyAction:e.history.action,location:e.history.location,matches:d,initialized:v,navigation:Ta,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||m,fetchers:new Map,blockers:new Map},B=at.Pop,O=!1,j,I=!1,D=new Map,M=null,$=!1,P=!1,L=[],q=[],K=new Map,Q=0,Z=-1,ee=new Map,ue=new Set,ne=new Map,me=new Map,de=new Set,V=new Map,U=new Map,J=!1;function w(){if(x=e.history.listen(A=>{let{action:z,location:Y,delta:ie}=A;if(J){J=!1;return}ct(U.size===0||ie!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let he=Wt({currentLocation:k.location,nextLocation:Y,historyAction:z});if(he&&ie!=null){J=!0,e.history.go(ie*-1),ht(he,{state:"blocked",location:Y,proceed(){ht(he,{state:"proceeding",proceed:void 0,reset:void 0,location:Y}),e.history.go(ie)},reset(){let Pe=new Map(k.blockers);Pe.set(he,Mr),R({blockers:Pe})}});return}return F(z,Y)}),n){dy(t,D);let A=()=>fy(t,D);t.addEventListener("pagehide",A),M=()=>t.removeEventListener("pagehide",A)}return k.initialized||F(at.Pop,k.location,{initialHydration:!0}),S}function _(){x&&x(),M&&M(),l.clear(),j&&j.abort(),k.fetchers.forEach((A,z)=>bt(z)),k.blockers.forEach((A,z)=>mt(z))}function N(A){return l.add(A),()=>l.delete(A)}function R(A,z){z===void 0&&(z={}),k=nt({},k,A);let Y=[],ie=[];f.v7_fetcherPersist&&k.fetchers.forEach((he,Pe)=>{he.state==="idle"&&(de.has(Pe)?ie.push(Pe):Y.push(Pe))}),[...l].forEach(he=>he(k,{deletedFetchers:ie,unstable_viewTransitionOpts:z.viewTransitionOpts,unstable_flushSync:z.flushSync===!0})),f.v7_fetcherPersist&&(Y.forEach(he=>k.fetchers.delete(he)),ie.forEach(he=>bt(he)))}function W(A,z,Y){var ie,he;let{flushSync:Pe}=Y===void 0?{}:Y,we=k.actionData!=null&&k.navigation.formMethod!=null&&Ht(k.navigation.formMethod)&&k.navigation.state==="loading"&&((ie=A.state)==null?void 0:ie._isRedirect)!==!0,ve;z.actionData?Object.keys(z.actionData).length>0?ve=z.actionData:ve=null:we?ve=k.actionData:ve=null;let Re=z.loaderData?pu(k.loaderData,z.loaderData,z.matches||[],z.errors):k.loaderData,_e=k.blockers;_e.size>0&&(_e=new Map(_e),_e.forEach((Se,T)=>_e.set(T,Mr)));let dt=O===!0||k.navigation.formMethod!=null&&Ht(k.navigation.formMethod)&&((he=A.state)==null?void 0:he._isRedirect)!==!0;u&&(s=u,u=void 0),$||B===at.Pop||(B===at.Push?e.history.push(A,A.state):B===at.Replace&&e.history.replace(A,A.state));let ft;if(B===at.Pop){let Se=D.get(k.location.pathname);Se&&Se.has(A.pathname)?ft={currentLocation:k.location,nextLocation:A}:D.has(A.pathname)&&(ft={currentLocation:A,nextLocation:k.location})}else if(I){let Se=D.get(k.location.pathname);Se?Se.add(A.pathname):(Se=new Set([A.pathname]),D.set(k.location.pathname,Se)),ft={currentLocation:k.location,nextLocation:A}}R(nt({},z,{actionData:ve,loaderData:Re,historyAction:B,location:A,initialized:!0,navigation:Ta,revalidation:"idle",restoreScrollPosition:on(A,z.matches||k.matches),preventScrollReset:dt,blockers:_e}),{viewTransitionOpts:ft,flushSync:Pe===!0}),B=at.Pop,O=!1,I=!1,$=!1,P=!1,L=[],q=[]}async function G(A,z){if(typeof A=="number"){e.history.go(A);return}let Y=ja(k.location,k.matches,h,f.v7_prependBasename,A,f.v7_relativeSplatPath,z==null?void 0:z.fromRouteId,z==null?void 0:z.relative),{path:ie,submission:he,error:Pe}=au(f.v7_normalizeFormMethod,!1,Y,z),we=k.location,ve=Ea(k.location,ie,z&&z.state);ve=nt({},ve,e.history.encodeLocation(ve));let Re=z&&z.replace!=null?z.replace:void 0,_e=at.Push;Re===!0?_e=at.Replace:Re===!1||he!=null&&Ht(he.formMethod)&&he.formAction===k.location.pathname+k.location.search&&(_e=at.Replace);let dt=z&&"preventScrollReset"in z?z.preventScrollReset===!0:void 0,ft=(z&&z.unstable_flushSync)===!0,Se=Wt({currentLocation:we,nextLocation:ve,historyAction:_e});if(Se){ht(Se,{state:"blocked",location:ve,proceed(){ht(Se,{state:"proceeding",proceed:void 0,reset:void 0,location:ve}),G(A,z)},reset(){let T=new Map(k.blockers);T.set(Se,Mr),R({blockers:T})}});return}return await F(_e,ve,{submission:he,pendingError:Pe,preventScrollReset:dt,replace:z&&z.replace,enableViewTransition:z&&z.unstable_viewTransition,flushSync:ft})}function X(){if(Fe(),R({revalidation:"loading"}),k.navigation.state!=="submitting"){if(k.navigation.state==="idle"){F(k.historyAction,k.location,{startUninterruptedRevalidation:!0});return}F(B||k.historyAction,k.navigation.location,{overrideNavigation:k.navigation})}}async function F(A,z,Y){j&&j.abort(),j=null,B=A,$=(Y&&Y.startUninterruptedRevalidation)===!0,wt(k.location,k.matches),O=(Y&&Y.preventScrollReset)===!0,I=(Y&&Y.enableViewTransition)===!0;let ie=u||s,he=Y&&Y.overrideNavigation,Pe=qn(ie,z,h),we=(Y&&Y.flushSync)===!0;if(!Pe){let Se=Nt(404,{pathname:z.pathname}),{matches:T,route:se}=gu(ie);gt(),W(z,{matches:T,loaderData:{},errors:{[se.id]:Se}},{flushSync:we});return}if(k.initialized&&!P&&iy(k.location,z)&&!(Y&&Y.submission&&Ht(Y.submission.formMethod))){W(z,{matches:Pe},{flushSync:we});return}j=new AbortController;let ve=Kn(e.history,z,j.signal,Y&&Y.submission),Re;if(Y&&Y.pendingError)Re=[Fr(Pe).route.id,{type:Ze.error,error:Y.pendingError}];else if(Y&&Y.submission&&Ht(Y.submission.formMethod)){let Se=await ce(ve,z,Y.submission,Pe,{replace:Y.replace,flushSync:we});if(Se.shortCircuited)return;Re=Se.pendingActionResult,he=Da(z,Y.submission),we=!1,ve=Kn(e.history,ve.url,ve.signal)}let{shortCircuited:_e,loaderData:dt,errors:ft}=await fe(ve,z,Pe,he,Y&&Y.submission,Y&&Y.fetcherSubmission,Y&&Y.replace,Y&&Y.initialHydration===!0,we,Re);_e||(j=null,W(z,nt({matches:Pe},mu(Re),{loaderData:dt,errors:ft})))}async function ce(A,z,Y,ie,he){he===void 0&&(he={}),Fe();let Pe=cy(z,Y);R({navigation:Pe},{flushSync:he.flushSync===!0});let we,ve=Ia(ie,z);if(!ve.route.action&&!ve.route.lazy)we={type:Ze.error,error:Nt(405,{method:A.method,pathname:z.pathname,routeId:ve.route.id})};else if(we=(await be("action",A,[ve],ie))[0],A.signal.aborted)return{shortCircuited:!0};if(On(we)){let Re;return he&&he.replace!=null?Re=he.replace:Re=du(we.response.headers.get("Location"),new URL(A.url),h)===k.location.pathname+k.location.search,await ae(A,we,{submission:Y,replace:Re}),{shortCircuited:!0}}if(Bn(we))throw Nt(400,{type:"defer-action"});if(jt(we)){let Re=Fr(ie,ve.route.id);return(he&&he.replace)!==!0&&(B=at.Push),{pendingActionResult:[Re.route.id,we]}}return{pendingActionResult:[ve.route.id,we]}}async function fe(A,z,Y,ie,he,Pe,we,ve,Re,_e){let dt=ie||Da(z,he),ft=he||Pe||ku(dt),Se=u||s,[T,se]=su(e.history,k,Y,ft,z,f.v7_partialHydration&&ve===!0,f.unstable_skipActionErrorRevalidation,P,L,q,de,ne,ue,Se,h,_e);if(gt(Oe=>!(Y&&Y.some(rt=>rt.route.id===Oe))||T&&T.some(rt=>rt.route.id===Oe)),Z=++Q,T.length===0&&se.length===0){let Oe=Ee();return W(z,nt({matches:Y,loaderData:{},errors:_e&&jt(_e[1])?{[_e[0]]:_e[1].error}:null},mu(_e),Oe?{fetchers:new Map(k.fetchers)}:{}),{flushSync:Re}),{shortCircuited:!0}}if(!$&&(!f.v7_partialHydration||!ve)){se.forEach(rt=>{let lt=k.fetchers.get(rt.key),He=Ur(void 0,lt?lt.data:void 0);k.fetchers.set(rt.key,He)});let Oe;_e&&!jt(_e[1])?Oe={[_e[0]]:_e[1].data}:k.actionData&&(Object.keys(k.actionData).length===0?Oe=null:Oe=k.actionData),R(nt({navigation:dt},Oe!==void 0?{actionData:Oe}:{},se.length>0?{fetchers:new Map(k.fetchers)}:{}),{flushSync:Re})}se.forEach(Oe=>{K.has(Oe.key)&&et(Oe.key),Oe.controller&&K.set(Oe.key,Oe.controller)});let ye=()=>se.forEach(Oe=>et(Oe.key));j&&j.signal.addEventListener("abort",ye);let{loaderResults:xe,fetcherResults:Ie}=await Ce(k.matches,Y,T,se,A);if(A.signal.aborted)return{shortCircuited:!0};j&&j.signal.removeEventListener("abort",ye),se.forEach(Oe=>K.delete(Oe.key));let Ue=yu([...xe,...Ie]);if(Ue){if(Ue.idx>=T.length){let Oe=se[Ue.idx-T.length].key;ue.add(Oe)}return await ae(A,Ue.result,{replace:we}),{shortCircuited:!0}}let{loaderData:je,errors:Be}=hu(k,Y,T,xe,_e,se,Ie,V);V.forEach((Oe,rt)=>{Oe.subscribe(lt=>{(lt||Oe.done)&&V.delete(rt)})}),f.v7_partialHydration&&ve&&k.errors&&Object.entries(k.errors).filter(Oe=>{let[rt]=Oe;return!T.some(lt=>lt.route.id===rt)}).forEach(Oe=>{let[rt,lt]=Oe;Be=Object.assign(Be||{},{[rt]:lt})});let st=Ee(),Ge=Lt(Z),Xe=st||Ge||se.length>0;return nt({loaderData:je,errors:Be},Xe?{fetchers:new Map(k.fetchers)}:{})}function re(A,z,Y,ie){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");K.has(A)&&et(A);let he=(ie&&ie.unstable_flushSync)===!0,Pe=u||s,we=ja(k.location,k.matches,h,f.v7_prependBasename,Y,f.v7_relativeSplatPath,z,ie==null?void 0:ie.relative),ve=qn(Pe,we,h);if(!ve){Ve(A,z,Nt(404,{pathname:we}),{flushSync:he});return}let{path:Re,submission:_e,error:dt}=au(f.v7_normalizeFormMethod,!0,we,ie);if(dt){Ve(A,z,dt,{flushSync:he});return}let ft=Ia(ve,Re);if(O=(ie&&ie.preventScrollReset)===!0,_e&&Ht(_e.formMethod)){oe(A,z,Re,ft,ve,he,_e);return}ne.set(A,{routeId:z,path:Re}),ge(A,z,Re,ft,ve,he,_e)}async function oe(A,z,Y,ie,he,Pe,we){if(Fe(),ne.delete(A),!ie.route.action&&!ie.route.lazy){let He=Nt(405,{method:we.formMethod,pathname:Y,routeId:z});Ve(A,z,He,{flushSync:Pe});return}let ve=k.fetchers.get(A);Ae(A,uy(we,ve),{flushSync:Pe});let Re=new AbortController,_e=Kn(e.history,Y,Re.signal,we);K.set(A,Re);let dt=Q,Se=(await be("action",_e,[ie],he))[0];if(_e.signal.aborted){K.get(A)===Re&&K.delete(A);return}if(f.v7_fetcherPersist&&de.has(A)){if(On(Se)||jt(Se)){Ae(A,yn(void 0));return}}else{if(On(Se))if(K.delete(A),Z>dt){Ae(A,yn(void 0));return}else return ue.add(A),Ae(A,Ur(we)),ae(_e,Se,{fetcherSubmission:we});if(jt(Se)){Ve(A,z,Se.error);return}}if(Bn(Se))throw Nt(400,{type:"defer-action"});let T=k.navigation.location||k.location,se=Kn(e.history,T,Re.signal),ye=u||s,xe=k.navigation.state!=="idle"?qn(ye,k.navigation.location,h):k.matches;ke(xe,"Didn't find any matches after fetcher action");let Ie=++Q;ee.set(A,Ie);let Ue=Ur(we,Se.data);k.fetchers.set(A,Ue);let[je,Be]=su(e.history,k,xe,we,T,!1,f.unstable_skipActionErrorRevalidation,P,L,q,de,ne,ue,ye,h,[ie.route.id,Se]);Be.filter(He=>He.key!==A).forEach(He=>{let an=He.key,Go=k.fetchers.get(an),Ka=Ur(void 0,Go?Go.data:void 0);k.fetchers.set(an,Ka),K.has(an)&&et(an),He.controller&&K.set(an,He.controller)}),R({fetchers:new Map(k.fetchers)});let st=()=>Be.forEach(He=>et(He.key));Re.signal.addEventListener("abort",st);let{loaderResults:Ge,fetcherResults:Xe}=await Ce(k.matches,xe,je,Be,se);if(Re.signal.aborted)return;Re.signal.removeEventListener("abort",st),ee.delete(A),K.delete(A),Be.forEach(He=>K.delete(He.key));let Oe=yu([...Ge,...Xe]);if(Oe){if(Oe.idx>=je.length){let He=Be[Oe.idx-je.length].key;ue.add(He)}return ae(se,Oe.result)}let{loaderData:rt,errors:lt}=hu(k,k.matches,je,Ge,void 0,Be,Xe,V);if(k.fetchers.has(A)){let He=yn(Se.data);k.fetchers.set(A,He)}Lt(Ie),k.navigation.state==="loading"&&Ie>Z?(ke(B,"Expected pending action"),j&&j.abort(),W(k.navigation.location,{matches:xe,loaderData:rt,errors:lt,fetchers:new Map(k.fetchers)})):(R({errors:lt,loaderData:pu(k.loaderData,rt,xe,lt),fetchers:new Map(k.fetchers)}),P=!1)}async function ge(A,z,Y,ie,he,Pe,we){let ve=k.fetchers.get(A);Ae(A,Ur(we,ve?ve.data:void 0),{flushSync:Pe});let Re=new AbortController,_e=Kn(e.history,Y,Re.signal);K.set(A,Re);let dt=Q,Se=(await be("loader",_e,[ie],he))[0];if(Bn(Se)&&(Se=await xu(Se,_e.signal,!0)||Se),K.get(A)===Re&&K.delete(A),!_e.signal.aborted){if(de.has(A)){Ae(A,yn(void 0));return}if(On(Se))if(Z>dt){Ae(A,yn(void 0));return}else{ue.add(A),await ae(_e,Se);return}if(jt(Se)){Ve(A,z,Se.error);return}ke(!Bn(Se),"Unhandled fetcher deferred data"),Ae(A,yn(Se.data))}}async function ae(A,z,Y){let{submission:ie,fetcherSubmission:he,replace:Pe}=Y===void 0?{}:Y;z.response.headers.has("X-Remix-Revalidate")&&(P=!0);let we=z.response.headers.get("Location");ke(we,"Expected a Location header on the redirect Response"),we=du(we,new URL(A.url),h);let ve=Ea(k.location,we,{_isRedirect:!0});if(n){let T=!1;if(z.response.headers.has("X-Remix-Reload-Document"))T=!0;else if(Na.test(we)){const se=e.history.createURL(we);T=se.origin!==t.location.origin||Vt(se.pathname,h)==null}if(T){Pe?t.location.replace(we):t.location.assign(we);return}}j=null;let Re=Pe===!0?at.Replace:at.Push,{formMethod:_e,formAction:dt,formEncType:ft}=k.navigation;!ie&&!he&&_e&&dt&&ft&&(ie=ku(k.navigation));let Se=ie||he;if(Kg.has(z.response.status)&&Se&&Ht(Se.formMethod))await F(Re,ve,{submission:nt({},Se,{formAction:we}),preventScrollReset:O});else{let T=Da(ve,ie);await F(Re,ve,{overrideNavigation:T,fetcherSubmission:he,preventScrollReset:O})}}async function be(A,z,Y,ie){try{let he=await ey(g,A,z,Y,ie,a,o);return await Promise.all(he.map((Pe,we)=>{if(ay(Pe)){let ve=Pe.result;return{type:Ze.redirect,response:ry(ve,z,Y[we].route.id,ie,h,f.v7_relativeSplatPath)}}return ny(Pe)}))}catch(he){return Y.map(()=>({type:Ze.error,error:he}))}}async function Ce(A,z,Y,ie,he){let[Pe,...we]=await Promise.all([Y.length?be("loader",he,Y,z):[],...ie.map(ve=>{if(ve.matches&&ve.match&&ve.controller){let Re=Kn(e.history,ve.path,ve.controller.signal);return be("loader",Re,[ve.match],ve.matches).then(_e=>_e[0])}else return Promise.resolve({type:Ze.error,error:Nt(404,{pathname:ve.path})})})]);return await Promise.all([wu(A,Y,Pe,Pe.map(()=>he.signal),!1,k.loaderData),wu(A,ie.map(ve=>ve.match),we,ie.map(ve=>ve.controller?ve.controller.signal:null),!0)]),{loaderResults:Pe,fetcherResults:we}}function Fe(){P=!0,L.push(...gt()),ne.forEach((A,z)=>{K.has(z)&&(q.push(z),et(z))})}function Ae(A,z,Y){Y===void 0&&(Y={}),k.fetchers.set(A,z),R({fetchers:new Map(k.fetchers)},{flushSync:(Y&&Y.flushSync)===!0})}function Ve(A,z,Y,ie){ie===void 0&&(ie={});let he=Fr(k.matches,z);bt(A),R({errors:{[he.route.id]:Y},fetchers:new Map(k.fetchers)},{flushSync:(ie&&ie.flushSync)===!0})}function ze(A){return f.v7_fetcherPersist&&(me.set(A,(me.get(A)||0)+1),de.has(A)&&de.delete(A)),k.fetchers.get(A)||Wg}function bt(A){let z=k.fetchers.get(A);K.has(A)&&!(z&&z.state==="loading"&&ee.has(A))&&et(A),ne.delete(A),ee.delete(A),ue.delete(A),de.delete(A),k.fetchers.delete(A)}function Ke(A){if(f.v7_fetcherPersist){let z=(me.get(A)||0)-1;z<=0?(me.delete(A),de.add(A)):me.set(A,z)}else bt(A);R({fetchers:new Map(k.fetchers)})}function et(A){let z=K.get(A);ke(z,"Expected fetch controller: "+A),z.abort(),K.delete(A)}function We(A){for(let z of A){let Y=ze(z),ie=yn(Y.data);k.fetchers.set(z,ie)}}function Ee(){let A=[],z=!1;for(let Y of ue){let ie=k.fetchers.get(Y);ke(ie,"Expected fetcher: "+Y),ie.state==="loading"&&(ue.delete(Y),A.push(Y),z=!0)}return We(A),z}function Lt(A){let z=[];for(let[Y,ie]of ee)if(ie<A){let he=k.fetchers.get(Y);ke(he,"Expected fetcher: "+Y),he.state==="loading"&&(et(Y),ee.delete(Y),z.push(Y))}return We(z),z.length>0}function ut(A,z){let Y=k.blockers.get(A)||Mr;return U.get(A)!==z&&U.set(A,z),Y}function mt(A){k.blockers.delete(A),U.delete(A)}function ht(A,z){let Y=k.blockers.get(A)||Mr;ke(Y.state==="unblocked"&&z.state==="blocked"||Y.state==="blocked"&&z.state==="blocked"||Y.state==="blocked"&&z.state==="proceeding"||Y.state==="blocked"&&z.state==="unblocked"||Y.state==="proceeding"&&z.state==="unblocked","Invalid blocker state transition: "+Y.state+" -> "+z.state);let ie=new Map(k.blockers);ie.set(A,z),R({blockers:ie})}function Wt(A){let{currentLocation:z,nextLocation:Y,historyAction:ie}=A;if(U.size===0)return;U.size>1&&ct(!1,"A router only supports one blocker at a time");let he=Array.from(U.entries()),[Pe,we]=he[he.length-1],ve=k.blockers.get(Pe);if(!(ve&&ve.state==="proceeding")&&we({currentLocation:z,nextLocation:Y,historyAction:ie}))return Pe}function gt(A){let z=[];return V.forEach((Y,ie)=>{(!A||A(ie))&&(Y.cancel(),z.push(ie),V.delete(ie))}),z}function Bt(A,z,Y){if(y=A,c=z,i=Y||null,!p&&k.navigation===Ta){p=!0;let ie=on(k.location,k.matches);ie!=null&&R({restoreScrollPosition:ie})}return()=>{y=null,c=null,i=null}}function yt(A,z){return i&&i(A,z.map(ie=>Eg(ie,k.loaderData)))||A.key}function wt(A,z){if(y&&c){let Y=yt(A,z);y[Y]=c()}}function on(A,z){if(y){let Y=yt(A,z),ie=y[Y];if(typeof ie=="number")return ie}return null}function _n(A){a={},u=Sa(A,o,void 0,a)}return S={get basename(){return h},get future(){return f},get state(){return k},get routes(){return s},get window(){return t},initialize:w,subscribe:N,enableScrollRestoration:Bt,navigate:G,fetch:re,revalidate:X,createHref:A=>e.history.createHref(A),encodeLocation:A=>e.history.encodeLocation(A),getFetcher:ze,deleteFetcher:Ke,dispose:_,getBlocker:ut,deleteBlocker:mt,_internalFetchControllers:K,_internalActiveDeferreds:V,_internalSetRoutes:_n},S}function Jg(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function ja(e,t,n,r,o,a,s,u){let h,g;if(s){h=[];for(let x of t)if(h.push(x),x.route.id===s){g=x;break}}else h=t,g=t[t.length-1];let f=_a(o||".",Oa(h,a),Vt(e.pathname,n)||e.pathname,u==="path");return o==null&&(f.search=e.search,f.hash=e.hash),(o==null||o===""||o===".")&&g&&g.route.index&&!La(f.search)&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(f.pathname=f.pathname==="/"?n:Qt([n,f.pathname])),Pn(f)}function au(e,t,n,r){if(!r||!Jg(r))return{path:n};if(r.formMethod&&!ly(r.formMethod))return{path:n,error:Nt(405,{method:r.formMethod})};let o=()=>({path:n,error:Nt(400,{type:"invalid-body"})}),a=r.formMethod||"get",s=e?a.toUpperCase():a.toLowerCase(),u=vu(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Ht(s))return o();let l=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((y,i)=>{let[c,p]=i;return""+y+c+"="+p+`
83
+ `},""):String(r.body);return{path:n,submission:{formMethod:s,formAction:u,formEncType:r.formEncType,formData:void 0,json:void 0,text:l}}}else if(r.formEncType==="application/json"){if(!Ht(s))return o();try{let l=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:s,formAction:u,formEncType:r.formEncType,formData:void 0,json:l,text:void 0}}}catch{return o()}}}ke(typeof FormData=="function","FormData is not available in this environment");let h,g;if(r.formData)h=Aa(r.formData),g=r.formData;else if(r.body instanceof FormData)h=Aa(r.body),g=r.body;else if(r.body instanceof URLSearchParams)h=r.body,g=fu(h);else if(r.body==null)h=new URLSearchParams,g=new FormData;else try{h=new URLSearchParams(r.body),g=fu(h)}catch{return o()}let f={formMethod:s,formAction:u,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:g,json:void 0,text:void 0};if(Ht(f.formMethod))return{path:n,submission:f};let x=rn(n);return t&&x.search&&La(x.search)&&h.append("index",""),x.search="?"+h,{path:Pn(x),submission:f}}function Yg(e,t){let n=e;if(t){let r=e.findIndex(o=>o.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function su(e,t,n,r,o,a,s,u,h,g,f,x,l,y,i,c){let p=c?jt(c[1])?c[1].error:c[1].data:void 0,d=e.createURL(t.location),m=e.createURL(o),v=c&&jt(c[1])?c[0]:void 0,b=v?Yg(n,v):n,C=c?c[1].statusCode:void 0,S=s&&C&&C>=400,k=b.filter((O,j)=>{let{route:I}=O;if(I.lazy)return!0;if(I.loader==null)return!1;if(a)return typeof I.loader!="function"||I.loader.hydrate?!0:t.loaderData[I.id]===void 0&&(!t.errors||t.errors[I.id]===void 0);if(Qg(t.loaderData,t.matches[j],O)||h.some($=>$===O.route.id))return!0;let D=t.matches[j],M=O;return cu(O,nt({currentUrl:d,currentParams:D.params,nextUrl:m,nextParams:M.params},r,{actionResult:p,unstable_actionStatus:C,defaultShouldRevalidate:S?!1:u||d.pathname+d.search===m.pathname+m.search||d.search!==m.search||lu(D,M)}))}),B=[];return x.forEach((O,j)=>{if(a||!n.some(P=>P.route.id===O.routeId)||f.has(j))return;let I=qn(y,O.path,i);if(!I){B.push({key:j,routeId:O.routeId,path:O.path,matches:null,match:null,controller:null});return}let D=t.fetchers.get(j),M=Ia(I,O.path),$=!1;l.has(j)?$=!1:g.includes(j)?$=!0:D&&D.state!=="idle"&&D.data===void 0?$=u:$=cu(M,nt({currentUrl:d,currentParams:t.matches[t.matches.length-1].params,nextUrl:m,nextParams:n[n.length-1].params},r,{actionResult:p,unstable_actionStatus:C,defaultShouldRevalidate:S?!1:u})),$&&B.push({key:j,routeId:O.routeId,path:O.path,matches:I,match:M,controller:new AbortController})}),[k,B]}function Qg(e,t,n){let r=!t||n.route.id!==t.route.id,o=e[n.route.id]===void 0;return r||o}function lu(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function cu(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function uu(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let o=n[e.id];ke(o,"No route found in manifest");let a={};for(let s in r){let h=o[s]!==void 0&&s!=="hasErrorBoundary";ct(!h,'Route "'+o.id+'" has a static property "'+s+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+s+'" will be ignored.')),!h&&!kg.has(s)&&(a[s]=r[s])}Object.assign(o,a),Object.assign(o,nt({},t(o),{lazy:void 0}))}function Zg(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function ey(e,t,n,r,o,a,s,u){let h=r.reduce((x,l)=>x.add(l.route.id),new Set),g=new Set,f=await e({matches:o.map(x=>{let l=h.has(x.route.id);return nt({},x,{shouldLoad:l,resolve:i=>(g.add(x.route.id),l?ty(t,n,x,a,s,i,u):Promise.resolve({type:Ze.data,result:void 0}))})}),request:n,params:o[0].params,context:u});return o.forEach(x=>ke(g.has(x.route.id),'`match.resolve()` was not called for route id "'+x.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),f.filter((x,l)=>h.has(o[l].route.id))}async function ty(e,t,n,r,o,a,s){let u,h,g=f=>{let x,l=new Promise((c,p)=>x=p);h=()=>x(),t.signal.addEventListener("abort",h);let y=c=>typeof f!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):f({request:t,params:n.params,context:s},...c!==void 0?[c]:[]),i;return a?i=a(c=>y(c)):i=(async()=>{try{return{type:"data",result:await y()}}catch(c){return{type:"error",result:c}}})(),Promise.race([i,l])};try{let f=n.route[e];if(n.route.lazy)if(f){let x,[l]=await Promise.all([g(f).catch(y=>{x=y}),uu(n.route,o,r)]);if(x!==void 0)throw x;u=l}else if(await uu(n.route,o,r),f=n.route[e],f)u=await g(f);else if(e==="action"){let x=new URL(t.url),l=x.pathname+x.search;throw Nt(405,{method:t.method,pathname:l,routeId:n.route.id})}else return{type:Ze.data,result:void 0};else if(f)u=await g(f);else{let x=new URL(t.url),l=x.pathname+x.search;throw Nt(404,{pathname:l})}ke(u.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(f){return{type:Ze.error,result:f}}finally{h&&t.signal.removeEventListener("abort",h)}return u}async function ny(e){let{result:t,type:n,status:r}=e;if(bu(t)){let s;try{let u=t.headers.get("Content-Type");u&&/\bapplication\/json\b/.test(u)?t.body==null?s=null:s=await t.json():s=await t.text()}catch(u){return{type:Ze.error,error:u}}return n===Ze.error?{type:Ze.error,error:new ru(t.status,t.statusText,s),statusCode:t.status,headers:t.headers}:{type:Ze.data,data:s,statusCode:t.status,headers:t.headers}}if(n===Ze.error)return{type:Ze.error,error:t,statusCode:Ra(t)?t.status:r};if(sy(t)){var o,a;return{type:Ze.deferred,deferredData:t,statusCode:(o=t.init)==null?void 0:o.status,headers:((a=t.init)==null?void 0:a.headers)&&new Headers(t.init.headers)}}return{type:Ze.data,data:t,statusCode:r}}function ry(e,t,n,r,o,a){let s=e.headers.get("Location");if(ke(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!Na.test(s)){let u=r.slice(0,r.findIndex(h=>h.route.id===n)+1);s=ja(new URL(t.url),u,o,!0,s,a),e.headers.set("Location",s)}return e}function du(e,t,n){if(Na.test(e)){let r=e,o=r.startsWith("//")?new URL(t.protocol+r):new URL(r),a=Vt(o.pathname,n)!=null;if(o.origin===t.origin&&a)return o.pathname+o.search+o.hash}return e}function Kn(e,t,n,r){let o=e.createURL(vu(t)).toString(),a={signal:n};if(r&&Ht(r.formMethod)){let{formMethod:s,formEncType:u}=r;a.method=s.toUpperCase(),u==="application/json"?(a.headers=new Headers({"Content-Type":u}),a.body=JSON.stringify(r.json)):u==="text/plain"?a.body=r.text:u==="application/x-www-form-urlencoded"&&r.formData?a.body=Aa(r.formData):a.body=r.formData}return new Request(o,a)}function Aa(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function fu(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function oy(e,t,n,r,o,a){let s={},u=null,h,g=!1,f={},x=r&&jt(r[1])?r[1].error:void 0;return n.forEach((l,y)=>{let i=t[y].route.id;if(ke(!On(l),"Cannot handle redirect results in processLoaderData"),jt(l)){let c=l.error;x!==void 0&&(c=x,x=void 0),u=u||{};{let p=Fr(e,i);u[p.route.id]==null&&(u[p.route.id]=c)}s[i]=void 0,g||(g=!0,h=Ra(l.error)?l.error.status:500),l.headers&&(f[i]=l.headers)}else Bn(l)?(o.set(i,l.deferredData),s[i]=l.deferredData.data,l.statusCode!=null&&l.statusCode!==200&&!g&&(h=l.statusCode),l.headers&&(f[i]=l.headers)):(s[i]=l.data,l.statusCode&&l.statusCode!==200&&!g&&(h=l.statusCode),l.headers&&(f[i]=l.headers))}),x!==void 0&&r&&(u={[r[0]]:x},s[r[0]]=void 0),{loaderData:s,errors:u,statusCode:h||200,loaderHeaders:f}}function hu(e,t,n,r,o,a,s,u){let{loaderData:h,errors:g}=oy(t,n,r,o,u);for(let f=0;f<a.length;f++){let{key:x,match:l,controller:y}=a[f];ke(s!==void 0&&s[f]!==void 0,"Did not find corresponding fetcher result");let i=s[f];if(!(y&&y.signal.aborted))if(jt(i)){let c=Fr(e.matches,l==null?void 0:l.route.id);g&&g[c.route.id]||(g=nt({},g,{[c.route.id]:i.error})),e.fetchers.delete(x)}else if(On(i))ke(!1,"Unhandled fetcher revalidation redirect");else if(Bn(i))ke(!1,"Unhandled fetcher deferred data");else{let c=yn(i.data);e.fetchers.set(x,c)}}return{loaderData:h,errors:g}}function pu(e,t,n,r){let o=nt({},t);for(let a of n){let s=a.route.id;if(t.hasOwnProperty(s)?t[s]!==void 0&&(o[s]=t[s]):e[s]!==void 0&&a.route.loader&&(o[s]=e[s]),r&&r.hasOwnProperty(s))break}return o}function mu(e){return e?jt(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Fr(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function gu(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Nt(e,t){let{pathname:n,routeId:r,method:o,type:a}=t===void 0?{}:t,s="Unknown Server Error",u="Unknown @remix-run/router error";return e===400?(s="Bad Request",o&&n&&r?u="You made a "+o+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":a==="defer-action"?u="defer() is not supported in actions":a==="invalid-body"&&(u="Unable to encode submission body")):e===403?(s="Forbidden",u='Route "'+r+'" does not match URL "'+n+'"'):e===404?(s="Not Found",u='No route matches URL "'+n+'"'):e===405&&(s="Method Not Allowed",o&&n&&r?u="You made a "+o.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":o&&(u='Invalid request method "'+o.toUpperCase()+'"')),new ru(e||500,s,new Error(u),!0)}function yu(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(On(n))return{result:n,idx:t}}}function vu(e){let t=typeof e=="string"?rn(e):e;return Pn(nt({},t,{hash:""}))}function iy(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function ay(e){return bu(e.result)&&qg.has(e.result.status)}function Bn(e){return e.type===Ze.deferred}function jt(e){return e.type===Ze.error}function On(e){return(e&&e.type)===Ze.redirect}function sy(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function bu(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function ly(e){return zg.has(e.toLowerCase())}function Ht(e){return Vg.has(e.toLowerCase())}async function wu(e,t,n,r,o,a){for(let s=0;s<n.length;s++){let u=n[s],h=t[s];if(!h)continue;let g=e.find(x=>x.route.id===h.route.id),f=g!=null&&!lu(g,h)&&(a&&a[h.route.id])!==void 0;if(Bn(u)&&(o||f)){let x=r[s];ke(x,"Expected an AbortSignal for revalidating fetcher deferred result"),await xu(u,x,o).then(l=>{l&&(n[s]=l||n[s])})}}}async function xu(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:Ze.data,data:e.deferredData.unwrappedData}}catch(o){return{type:Ze.error,error:o}}return{type:Ze.data,data:e.deferredData.data}}}function La(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Ia(e,t){let n=typeof t=="string"?rn(t).search:t.search;if(e[e.length-1].route.index&&La(n||""))return e[e.length-1];let r=nu(e);return r[r.length-1]}function ku(e){let{formMethod:t,formAction:n,formEncType:r,text:o,formData:a,json:s}=e;if(!(!t||!n||!r)){if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:o};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(s!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:s,text:void 0}}}function Da(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function cy(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Ur(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function uy(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function yn(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function dy(e,t){try{let n=e.sessionStorage.getItem(iu);if(n){let r=JSON.parse(n);for(let[o,a]of Object.entries(r||{}))a&&Array.isArray(a)&&t.set(o,new Set(a||[]))}}catch{}}function fy(e,t){if(t.size>0){let n={};for(let[r,o]of t)n[r]=[...o];try{e.sessionStorage.setItem(iu,JSON.stringify(n))}catch(r){ct(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/**
84
84
  * React Router v6.23.1
85
85
  *
86
86
  * Copyright (c) Remix Software Inc.
@@ -89,9 +89,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
89
89
  * LICENSE.md file in the root directory of this source tree.
90
90
  *
91
91
  * @license MIT
92
- */function Ur(){return Ur=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},Ur.apply(this,arguments)}const Wn=le.createContext(null);process.env.NODE_ENV!=="production"&&(Wn.displayName="DataRouter");const $o=le.createContext(null);process.env.NODE_ENV!=="production"&&($o.displayName="DataRouterState");const hy=le.createContext(null);process.env.NODE_ENV!=="production"&&(hy.displayName="Await");const zt=le.createContext(null);process.env.NODE_ENV!=="production"&&(zt.displayName="Navigation");const Vo=le.createContext(null);process.env.NODE_ENV!=="production"&&(Vo.displayName="Location");const qt=le.createContext({outlet:null,matches:[],isDataRoute:!1});process.env.NODE_ENV!=="production"&&(qt.displayName="Route");const Da=le.createContext(null);process.env.NODE_ENV!=="production"&&(Da.displayName="RouteError");function py(e,t){let{relative:n}=t===void 0?{}:t;$r()||(process.env.NODE_ENV!=="production"?ke(!1,"useHref() may be used only in the context of a <Router> component."):ke(!1));let{basename:r,navigator:o}=le.useContext(zt),{hash:a,pathname:s,search:u}=Vr(e,{relative:n}),h=s;return r!=="/"&&(h=s==="/"?r:Qt([r,s])),o.createHref({pathname:h,search:u,hash:a})}function $r(){return le.useContext(Vo)!=null}function vn(){return $r()||(process.env.NODE_ENV!=="production"?ke(!1,"useLocation() may be used only in the context of a <Router> component."):ke(!1)),le.useContext(Vo).location}const Cu="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Eu(e){le.useContext(zt).static||le.useLayoutEffect(e)}function At(){let{isDataRoute:e}=le.useContext(qt);return e?_y():my()}function my(){$r()||(process.env.NODE_ENV!=="production"?ke(!1,"useNavigate() may be used only in the context of a <Router> component."):ke(!1));let e=le.useContext(Wn),{basename:t,future:n,navigator:r}=le.useContext(zt),{matches:o}=le.useContext(qt),{pathname:a}=vn(),s=JSON.stringify(Ba(o,n.v7_relativeSplatPath)),u=le.useRef(!1);return Eu(()=>{u.current=!0}),le.useCallback(function(g,f){if(f===void 0&&(f={}),process.env.NODE_ENV!=="production"&&ct(u.current,Cu),!u.current)return;if(typeof g=="number"){r.go(g);return}let x=Oa(g,JSON.parse(s),a,f.relative==="path");e==null&&t!=="/"&&(x.pathname=x.pathname==="/"?t:Qt([t,x.pathname])),(f.replace?r.replace:r.push)(x,f.state,f)},[t,r,s,a,e])}const gy=le.createContext(null);function yy(e){let t=le.useContext(qt).outlet;return t&&le.createElement(gy.Provider,{value:e},t)}function Su(){let{matches:e}=le.useContext(qt),t=e[e.length-1];return t?t.params:{}}function Vr(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=le.useContext(zt),{matches:o}=le.useContext(qt),{pathname:a}=vn(),s=JSON.stringify(Ba(o,r.v7_relativeSplatPath));return le.useMemo(()=>Oa(e,JSON.parse(s),a,n==="path"),[e,s,a,n])}function vy(e,t,n,r){$r()||(process.env.NODE_ENV!=="production"?ke(!1,"useRoutes() may be used only in the context of a <Router> component."):ke(!1));let{navigator:o}=le.useContext(zt),{matches:a}=le.useContext(qt),s=a[a.length-1],u=s?s.params:{},h=s?s.pathname:"/",g=s?s.pathnameBase:"/",f=s&&s.route;if(process.env.NODE_ENV!=="production"){let d=f&&f.path||"";Ou(h,!f||d.endsWith("*"),"You rendered descendant <Routes> (or called `useRoutes()`) at "+('"'+h+'" (under <Route path="'+d+'">) 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.
92
+ */function $r(){return $r=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},$r.apply(this,arguments)}const Wn=le.createContext(null);process.env.NODE_ENV!=="production"&&(Wn.displayName="DataRouter");const $o=le.createContext(null);process.env.NODE_ENV!=="production"&&($o.displayName="DataRouterState");const hy=le.createContext(null);process.env.NODE_ENV!=="production"&&(hy.displayName="Await");const zt=le.createContext(null);process.env.NODE_ENV!=="production"&&(zt.displayName="Navigation");const Vo=le.createContext(null);process.env.NODE_ENV!=="production"&&(Vo.displayName="Location");const qt=le.createContext({outlet:null,matches:[],isDataRoute:!1});process.env.NODE_ENV!=="production"&&(qt.displayName="Route");const Ma=le.createContext(null);process.env.NODE_ENV!=="production"&&(Ma.displayName="RouteError");function py(e,t){let{relative:n}=t===void 0?{}:t;Vr()||(process.env.NODE_ENV!=="production"?ke(!1,"useHref() may be used only in the context of a <Router> component."):ke(!1));let{basename:r,navigator:o}=le.useContext(zt),{hash:a,pathname:s,search:u}=Hr(e,{relative:n}),h=s;return r!=="/"&&(h=s==="/"?r:Qt([r,s])),o.createHref({pathname:h,search:u,hash:a})}function Vr(){return le.useContext(Vo)!=null}function vn(){return Vr()||(process.env.NODE_ENV!=="production"?ke(!1,"useLocation() may be used only in the context of a <Router> component."):ke(!1)),le.useContext(Vo).location}const Cu="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Eu(e){le.useContext(zt).static||le.useLayoutEffect(e)}function At(){let{isDataRoute:e}=le.useContext(qt);return e?_y():my()}function my(){Vr()||(process.env.NODE_ENV!=="production"?ke(!1,"useNavigate() may be used only in the context of a <Router> component."):ke(!1));let e=le.useContext(Wn),{basename:t,future:n,navigator:r}=le.useContext(zt),{matches:o}=le.useContext(qt),{pathname:a}=vn(),s=JSON.stringify(Oa(o,n.v7_relativeSplatPath)),u=le.useRef(!1);return Eu(()=>{u.current=!0}),le.useCallback(function(g,f){if(f===void 0&&(f={}),process.env.NODE_ENV!=="production"&&ct(u.current,Cu),!u.current)return;if(typeof g=="number"){r.go(g);return}let x=_a(g,JSON.parse(s),a,f.relative==="path");e==null&&t!=="/"&&(x.pathname=x.pathname==="/"?t:Qt([t,x.pathname])),(f.replace?r.replace:r.push)(x,f.state,f)},[t,r,s,a,e])}const gy=le.createContext(null);function yy(e){let t=le.useContext(qt).outlet;return t&&le.createElement(gy.Provider,{value:e},t)}function Su(){let{matches:e}=le.useContext(qt),t=e[e.length-1];return t?t.params:{}}function Hr(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=le.useContext(zt),{matches:o}=le.useContext(qt),{pathname:a}=vn(),s=JSON.stringify(Oa(o,r.v7_relativeSplatPath));return le.useMemo(()=>_a(e,JSON.parse(s),a,n==="path"),[e,s,a,n])}function vy(e,t,n,r){Vr()||(process.env.NODE_ENV!=="production"?ke(!1,"useRoutes() may be used only in the context of a <Router> component."):ke(!1));let{navigator:o}=le.useContext(zt),{matches:a}=le.useContext(qt),s=a[a.length-1],u=s?s.params:{},h=s?s.pathname:"/",g=s?s.pathnameBase:"/",f=s&&s.route;if(process.env.NODE_ENV!=="production"){let d=f&&f.path||"";Ou(h,!f||d.endsWith("*"),"You rendered descendant <Routes> (or called `useRoutes()`) at "+('"'+h+'" (under <Route path="'+d+'">) 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.
93
93
 
94
- `+('Please change the parent <Route path="'+d+'"> to <Route ')+('path="'+(d==="/"?"*":d+"/*")+'">.'))}let x=vn(),l;l=x;let y=l.pathname||"/",i=y;if(g!=="/"){let d=g.replace(/^\//,"").split("/");i="/"+y.replace(/^\//,"").split("/").slice(d.length).join("/")}let c=qn(e,{pathname:i});return process.env.NODE_ENV!=="production"&&(process.env.NODE_ENV!=="production"&&ct(f||c!=null,'No routes matched location "'+l.pathname+l.search+l.hash+'" '),process.env.NODE_ENV!=="production"&&ct(c==null||c[c.length-1].route.element!==void 0||c[c.length-1].route.Component!==void 0||c[c.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.')),Cy(c&&c.map(d=>Object.assign({},d,{params:Object.assign({},u,d.params),pathname:Qt([g,o.encodeLocation?o.encodeLocation(d.pathname).pathname:d.pathname]),pathnameBase:d.pathnameBase==="/"?g:Qt([g,o.encodeLocation?o.encodeLocation(d.pathnameBase).pathname:d.pathnameBase])})),a,n,r)}function by(){let e=Oy(),t=_a(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)",o={padding:"0.5rem",backgroundColor:r},a={padding:"2px 4px",backgroundColor:r},s=null;return process.env.NODE_ENV!=="production"&&(console.error("Error handled by React Router default ErrorBoundary:",e),s=le.createElement(le.Fragment,null,le.createElement("p",null,"💿 Hey developer 👋"),le.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",le.createElement("code",{style:a},"ErrorBoundary")," or"," ",le.createElement("code",{style:a},"errorElement")," prop on your route."))),le.createElement(le.Fragment,null,le.createElement("h2",null,"Unexpected Application Error!"),le.createElement("h3",{style:{fontStyle:"italic"}},t),n?le.createElement("pre",{style:o},n):null,s)}const wy=le.createElement(by,null);class xy extends le.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?le.createElement(qt.Provider,{value:this.props.routeContext},le.createElement(Da.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ky(e){let{routeContext:t,match:n,children:r}=e,o=le.useContext(Wn);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),le.createElement(qt.Provider,{value:t},r)}function Cy(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var a;if((a=n)!=null&&a.errors)e=n.matches;else return null}let s=e,u=(o=n)==null?void 0:o.errors;if(u!=null){let f=s.findIndex(x=>x.route.id&&(u==null?void 0:u[x.route.id])!==void 0);f>=0||(process.env.NODE_ENV!=="production"?ke(!1,"Could not find a matching route for errors on route IDs: "+Object.keys(u).join(",")):ke(!1)),s=s.slice(0,Math.min(s.length,f+1))}let h=!1,g=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f<s.length;f++){let x=s[f];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(g=f),x.route.id){let{loaderData:l,errors:y}=n,i=x.route.loader&&l[x.route.id]===void 0&&(!y||y[x.route.id]===void 0);if(x.route.lazy||i){h=!0,g>=0?s=s.slice(0,g+1):s=[s[0]];break}}}return s.reduceRight((f,x,l)=>{let y,i=!1,c=null,p=null;n&&(y=u&&x.route.id?u[x.route.id]:void 0,c=x.route.errorElement||wy,h&&(g<0&&l===0?(Ou("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),i=!0,p=null):g===l&&(i=!0,p=x.route.hydrateFallbackElement||null)));let d=t.concat(s.slice(0,l+1)),m=()=>{let v;return y?v=c:i?v=p:x.route.Component?v=le.createElement(x.route.Component,null):x.route.element?v=x.route.element:v=f,le.createElement(ky,{match:x,routeContext:{outlet:f,matches:d,isDataRoute:n!=null},children:v})};return n&&(x.route.ErrorBoundary||x.route.errorElement||l===0)?le.createElement(xy,{location:n.location,revalidation:n.revalidation,component:c,error:y,children:m(),routeContext:{outlet:null,matches:d,isDataRoute:!0}}):m()},null)}var Pu=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Pu||{}),Hr=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}(Hr||{});function Ma(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function Ey(e){let t=le.useContext(Wn);return t||(process.env.NODE_ENV!=="production"?ke(!1,Ma(e)):ke(!1)),t}function Sy(e){let t=le.useContext($o);return t||(process.env.NODE_ENV!=="production"?ke(!1,Ma(e)):ke(!1)),t}function Py(e){let t=le.useContext(qt);return t||(process.env.NODE_ENV!=="production"?ke(!1,Ma(e)):ke(!1)),t}function Fa(e){let t=Py(e),n=t.matches[t.matches.length-1];return n.route.id||(process.env.NODE_ENV!=="production"?ke(!1,e+' can only be used on routes that contain a unique "id"'):ke(!1)),n.route.id}function By(){return Fa(Hr.UseRouteId)}function Oy(){var e;let t=le.useContext(Da),n=Sy(Hr.UseRouteError),r=Fa(Hr.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function _y(){let{router:e}=Ey(Pu.UseNavigateStable),t=Fa(Hr.UseNavigateStable),n=le.useRef(!1);return Eu(()=>{n.current=!0}),le.useCallback(function(o,a){a===void 0&&(a={}),process.env.NODE_ENV!=="production"&&ct(n.current,Cu),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,Ur({fromRouteId:t},a)))},[e,t])}const Bu={};function Ou(e,t,n){!t&&!Bu[e]&&(Bu[e]=!0,process.env.NODE_ENV!=="production"&&ct(!1,n))}function Kt(e){return yy(e.context)}function Ry(e){let{basename:t="/",children:n=null,location:r,navigationType:o=at.Pop,navigator:a,static:s=!1,future:u}=e;$r()&&(process.env.NODE_ENV!=="production"?ke(!1,"You cannot render a <Router> inside another <Router>. You should never have more than one in your app."):ke(!1));let h=t.replace(/^\/*/,"/"),g=le.useMemo(()=>({basename:h,navigator:a,static:s,future:Ur({v7_relativeSplatPath:!1},u)}),[h,u,a,s]);typeof r=="string"&&(r=rn(r));let{pathname:f="/",search:x="",hash:l="",state:y=null,key:i="default"}=r,c=le.useMemo(()=>{let p=Vt(f,h);return p==null?null:{location:{pathname:p,search:x,hash:l,state:y,key:i},navigationType:o}},[h,f,x,l,y,i,o]);return process.env.NODE_ENV!=="production"&&ct(c!=null,'<Router basename="'+h+'"> is not able to match the URL '+('"'+f+x+l+'" because it does not start with the ')+"basename, so the <Router> won't render anything."),c==null?null:le.createElement(zt.Provider,{value:g},le.createElement(Vo.Provider,{children:n,value:c}))}new Promise(()=>{});function Ty(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(process.env.NODE_ENV!=="production"&&e.element&&process.env.NODE_ENV!=="production"&&ct(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:le.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(process.env.NODE_ENV!=="production"&&e.hydrateFallbackElement&&process.env.NODE_ENV!=="production"&&ct(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:le.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(process.env.NODE_ENV!=="production"&&e.errorElement&&process.env.NODE_ENV!=="production"&&ct(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:le.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}function Gn(e,t){return Xg({basename:void 0,future:Ur({},void 0,{v7_prependBasename:!0}),history:wg({initialEntries:void 0,initialIndex:void 0}),hydrationData:void 0,routes:e,mapRouteProperties:Ty,unstable_dataStrategy:void 0}).initialize()}/**
94
+ `+('Please change the parent <Route path="'+d+'"> to <Route ')+('path="'+(d==="/"?"*":d+"/*")+'">.'))}let x=vn(),l;l=x;let y=l.pathname||"/",i=y;if(g!=="/"){let d=g.replace(/^\//,"").split("/");i="/"+y.replace(/^\//,"").split("/").slice(d.length).join("/")}let c=qn(e,{pathname:i});return process.env.NODE_ENV!=="production"&&(process.env.NODE_ENV!=="production"&&ct(f||c!=null,'No routes matched location "'+l.pathname+l.search+l.hash+'" '),process.env.NODE_ENV!=="production"&&ct(c==null||c[c.length-1].route.element!==void 0||c[c.length-1].route.Component!==void 0||c[c.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.')),Cy(c&&c.map(d=>Object.assign({},d,{params:Object.assign({},u,d.params),pathname:Qt([g,o.encodeLocation?o.encodeLocation(d.pathname).pathname:d.pathname]),pathnameBase:d.pathnameBase==="/"?g:Qt([g,o.encodeLocation?o.encodeLocation(d.pathnameBase).pathname:d.pathnameBase])})),a,n,r)}function by(){let e=Oy(),t=Ra(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)",o={padding:"0.5rem",backgroundColor:r},a={padding:"2px 4px",backgroundColor:r},s=null;return process.env.NODE_ENV!=="production"&&(console.error("Error handled by React Router default ErrorBoundary:",e),s=le.createElement(le.Fragment,null,le.createElement("p",null,"💿 Hey developer 👋"),le.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",le.createElement("code",{style:a},"ErrorBoundary")," or"," ",le.createElement("code",{style:a},"errorElement")," prop on your route."))),le.createElement(le.Fragment,null,le.createElement("h2",null,"Unexpected Application Error!"),le.createElement("h3",{style:{fontStyle:"italic"}},t),n?le.createElement("pre",{style:o},n):null,s)}const wy=le.createElement(by,null);class xy extends le.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?le.createElement(qt.Provider,{value:this.props.routeContext},le.createElement(Ma.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ky(e){let{routeContext:t,match:n,children:r}=e,o=le.useContext(Wn);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),le.createElement(qt.Provider,{value:t},r)}function Cy(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var a;if((a=n)!=null&&a.errors)e=n.matches;else return null}let s=e,u=(o=n)==null?void 0:o.errors;if(u!=null){let f=s.findIndex(x=>x.route.id&&(u==null?void 0:u[x.route.id])!==void 0);f>=0||(process.env.NODE_ENV!=="production"?ke(!1,"Could not find a matching route for errors on route IDs: "+Object.keys(u).join(",")):ke(!1)),s=s.slice(0,Math.min(s.length,f+1))}let h=!1,g=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f<s.length;f++){let x=s[f];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(g=f),x.route.id){let{loaderData:l,errors:y}=n,i=x.route.loader&&l[x.route.id]===void 0&&(!y||y[x.route.id]===void 0);if(x.route.lazy||i){h=!0,g>=0?s=s.slice(0,g+1):s=[s[0]];break}}}return s.reduceRight((f,x,l)=>{let y,i=!1,c=null,p=null;n&&(y=u&&x.route.id?u[x.route.id]:void 0,c=x.route.errorElement||wy,h&&(g<0&&l===0?(Ou("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),i=!0,p=null):g===l&&(i=!0,p=x.route.hydrateFallbackElement||null)));let d=t.concat(s.slice(0,l+1)),m=()=>{let v;return y?v=c:i?v=p:x.route.Component?v=le.createElement(x.route.Component,null):x.route.element?v=x.route.element:v=f,le.createElement(ky,{match:x,routeContext:{outlet:f,matches:d,isDataRoute:n!=null},children:v})};return n&&(x.route.ErrorBoundary||x.route.errorElement||l===0)?le.createElement(xy,{location:n.location,revalidation:n.revalidation,component:c,error:y,children:m(),routeContext:{outlet:null,matches:d,isDataRoute:!0}}):m()},null)}var Pu=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Pu||{}),zr=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}(zr||{});function Fa(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function Ey(e){let t=le.useContext(Wn);return t||(process.env.NODE_ENV!=="production"?ke(!1,Fa(e)):ke(!1)),t}function Sy(e){let t=le.useContext($o);return t||(process.env.NODE_ENV!=="production"?ke(!1,Fa(e)):ke(!1)),t}function Py(e){let t=le.useContext(qt);return t||(process.env.NODE_ENV!=="production"?ke(!1,Fa(e)):ke(!1)),t}function Ua(e){let t=Py(e),n=t.matches[t.matches.length-1];return n.route.id||(process.env.NODE_ENV!=="production"?ke(!1,e+' can only be used on routes that contain a unique "id"'):ke(!1)),n.route.id}function By(){return Ua(zr.UseRouteId)}function Oy(){var e;let t=le.useContext(Ma),n=Sy(zr.UseRouteError),r=Ua(zr.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function _y(){let{router:e}=Ey(Pu.UseNavigateStable),t=Ua(zr.UseNavigateStable),n=le.useRef(!1);return Eu(()=>{n.current=!0}),le.useCallback(function(o,a){a===void 0&&(a={}),process.env.NODE_ENV!=="production"&&ct(n.current,Cu),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,$r({fromRouteId:t},a)))},[e,t])}const Bu={};function Ou(e,t,n){!t&&!Bu[e]&&(Bu[e]=!0,process.env.NODE_ENV!=="production"&&ct(!1,n))}function Kt(e){return yy(e.context)}function Ry(e){let{basename:t="/",children:n=null,location:r,navigationType:o=at.Pop,navigator:a,static:s=!1,future:u}=e;Vr()&&(process.env.NODE_ENV!=="production"?ke(!1,"You cannot render a <Router> inside another <Router>. You should never have more than one in your app."):ke(!1));let h=t.replace(/^\/*/,"/"),g=le.useMemo(()=>({basename:h,navigator:a,static:s,future:$r({v7_relativeSplatPath:!1},u)}),[h,u,a,s]);typeof r=="string"&&(r=rn(r));let{pathname:f="/",search:x="",hash:l="",state:y=null,key:i="default"}=r,c=le.useMemo(()=>{let p=Vt(f,h);return p==null?null:{location:{pathname:p,search:x,hash:l,state:y,key:i},navigationType:o}},[h,f,x,l,y,i,o]);return process.env.NODE_ENV!=="production"&&ct(c!=null,'<Router basename="'+h+'"> is not able to match the URL '+('"'+f+x+l+'" because it does not start with the ')+"basename, so the <Router> won't render anything."),c==null?null:le.createElement(zt.Provider,{value:g},le.createElement(Vo.Provider,{children:n,value:c}))}new Promise(()=>{});function Ty(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(process.env.NODE_ENV!=="production"&&e.element&&process.env.NODE_ENV!=="production"&&ct(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:le.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(process.env.NODE_ENV!=="production"&&e.hydrateFallbackElement&&process.env.NODE_ENV!=="production"&&ct(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:le.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(process.env.NODE_ENV!=="production"&&e.errorElement&&process.env.NODE_ENV!=="production"&&ct(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:le.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}function Gn(e,t){return Xg({basename:void 0,future:$r({},void 0,{v7_prependBasename:!0}),history:wg({initialEntries:void 0,initialIndex:void 0}),hydrationData:void 0,routes:e,mapRouteProperties:Ty,unstable_dataStrategy:void 0}).initialize()}/**
95
95
  * React Router DOM v6.23.1
96
96
  *
97
97
  * Copyright (c) Remix Software Inc.
@@ -100,7 +100,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
100
100
  * LICENSE.md file in the root directory of this source tree.
101
101
  *
102
102
  * @license MIT
103
- */function Xn(){return Xn=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},Xn.apply(this,arguments)}function Ua(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}const Ho="get",zo="application/x-www-form-urlencoded";function qo(e){return e!=null&&typeof e.tagName=="string"}function Ny(e){return qo(e)&&e.tagName.toLowerCase()==="button"}function jy(e){return qo(e)&&e.tagName.toLowerCase()==="form"}function Ay(e){return qo(e)&&e.tagName.toLowerCase()==="input"}function Ly(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Iy(e,t){return e.button===0&&(!t||t==="_self")&&!Ly(e)}let Ko=null;function Dy(){if(Ko===null)try{new FormData(document.createElement("form"),0),Ko=!1}catch{Ko=!0}return Ko}const My=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function $a(e){return e!=null&&!My.has(e)?(process.env.NODE_ENV!=="production"&&ct(!1,'"'+e+'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` '+('and will default to "'+zo+'"')),null):e}function Fy(e,t){let n,r,o,a,s;if(jy(e)){let u=e.getAttribute("action");r=u?Vt(u,t):null,n=e.getAttribute("method")||Ho,o=$a(e.getAttribute("enctype"))||zo,a=new FormData(e)}else if(Ny(e)||Ay(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let h=e.getAttribute("formaction")||u.getAttribute("action");if(r=h?Vt(h,t):null,n=e.getAttribute("formmethod")||u.getAttribute("method")||Ho,o=$a(e.getAttribute("formenctype"))||$a(u.getAttribute("enctype"))||zo,a=new FormData(u,e),!Dy()){let{name:g,type:f,value:x}=e;if(f==="image"){let l=g?g+".":"";a.append(l+"x","0"),a.append(l+"y","0")}else g&&a.append(g,x)}}else{if(qo(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Ho,r=null,o=zo,s=e}return a&&o==="text/plain"&&(s=a,a=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:a,body:s}}const Uy=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],$y=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],Vy=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","unstable_viewTransition"],Hy="6";try{window.__reactRouterVersion=Hy}catch{}const Va=le.createContext({isTransitioning:!1});process.env.NODE_ENV!=="production"&&(Va.displayName="ViewTransition");const _u=le.createContext(new Map);process.env.NODE_ENV!=="production"&&(_u.displayName="Fetchers");const Ru=le["startTransition"],Tu=Ju["flushSync"];function zy(e){Ru?Ru(e):e()}function zr(e){Tu?Tu(e):e()}class qy{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function Ky(e){let{fallbackElement:t,router:n,future:r}=e,[o,a]=le.useState(n.state),[s,u]=le.useState(),[h,g]=le.useState({isTransitioning:!1}),[f,x]=le.useState(),[l,y]=le.useState(),[i,c]=le.useState(),p=le.useRef(new Map),{v7_startTransition:d}=r||{},m=le.useCallback(k=>{d?zy(k):k()},[d]),v=le.useCallback((k,B)=>{let{deletedFetchers:O,unstable_flushSync:j,unstable_viewTransitionOpts:I}=B;O.forEach(M=>p.current.delete(M)),k.fetchers.forEach((M,$)=>{M.data!==void 0&&p.current.set($,M.data)});let D=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!I||D){j?zr(()=>a(k)):m(()=>a(k));return}if(j){zr(()=>{l&&(f&&f.resolve(),l.skipTransition()),g({isTransitioning:!0,flushSync:!0,currentLocation:I.currentLocation,nextLocation:I.nextLocation})});let M=n.window.document.startViewTransition(()=>{zr(()=>a(k))});M.finished.finally(()=>{zr(()=>{x(void 0),y(void 0),u(void 0),g({isTransitioning:!1})})}),zr(()=>y(M));return}l?(f&&f.resolve(),l.skipTransition(),c({state:k,currentLocation:I.currentLocation,nextLocation:I.nextLocation})):(u(k),g({isTransitioning:!0,flushSync:!1,currentLocation:I.currentLocation,nextLocation:I.nextLocation}))},[n.window,l,f,p,m]);le.useLayoutEffect(()=>n.subscribe(v),[n,v]),le.useEffect(()=>{h.isTransitioning&&!h.flushSync&&x(new qy)},[h]),le.useEffect(()=>{if(f&&s&&n.window){let k=s,B=f.promise,O=n.window.document.startViewTransition(async()=>{m(()=>a(k)),await B});O.finished.finally(()=>{x(void 0),y(void 0),u(void 0),g({isTransitioning:!1})}),y(O)}},[m,s,f,n.window]),le.useEffect(()=>{f&&s&&o.location.key===s.location.key&&f.resolve()},[f,l,o.location,s]),le.useEffect(()=>{!h.isTransitioning&&i&&(u(i.state),g({isTransitioning:!0,flushSync:!1,currentLocation:i.currentLocation,nextLocation:i.nextLocation}),c(void 0))},[h.isTransitioning,i]),le.useEffect(()=>{process.env.NODE_ENV!=="production"&&ct(t==null||!n.future.v7_partialHydration,"`<RouterProvider fallbackElement>` is deprecated when using `v7_partialHydration`, use a `HydrateFallback` component instead")},[]);let b=le.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:k=>n.navigate(k),push:(k,B,O)=>n.navigate(k,{state:B,preventScrollReset:O==null?void 0:O.preventScrollReset}),replace:(k,B,O)=>n.navigate(k,{replace:!0,state:B,preventScrollReset:O==null?void 0:O.preventScrollReset})}),[n]),C=n.basename||"/",S=le.useMemo(()=>({router:n,navigator:b,static:!1,basename:C}),[n,b,C]);return le.createElement(le.Fragment,null,le.createElement(Wn.Provider,{value:S},le.createElement($o.Provider,{value:o},le.createElement(_u.Provider,{value:p.current},le.createElement(Va.Provider,{value:h},le.createElement(Ry,{basename:C,location:o.location,navigationType:o.historyAction,navigator:b,future:{v7_relativeSplatPath:n.future.v7_relativeSplatPath}},o.initialized||n.future.v7_partialHydration?le.createElement(Wy,{routes:n.routes,future:n.future,state:o}):t))))),null)}function Wy(e){let{routes:t,future:n,state:r}=e;return vy(t,void 0,r,n)}process.env.NODE_ENV;const Gy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Xy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Nu=le.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:a,replace:s,state:u,target:h,to:g,preventScrollReset:f,unstable_viewTransition:x}=t,l=Ua(t,Uy),{basename:y}=le.useContext(zt),i,c=!1;if(typeof g=="string"&&Xy.test(g)&&(i=g,Gy))try{let v=new URL(window.location.href),b=g.startsWith("//")?new URL(v.protocol+g):new URL(g),C=Vt(b.pathname,y);b.origin===v.origin&&C!=null?g=C+b.search+b.hash:c=!0}catch{process.env.NODE_ENV!=="production"&&ct(!1,'<Link to="'+g+'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.')}let p=py(g,{relative:o}),d=Zy(g,{replace:s,state:u,target:h,preventScrollReset:f,relative:o,unstable_viewTransition:x});function m(v){r&&r(v),v.defaultPrevented||d(v)}return le.createElement("a",Xn({},l,{href:i||p,onClick:c||a?r:m,ref:n,target:h}))});process.env.NODE_ENV!=="production"&&(Nu.displayName="Link");const Jy=le.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:o=!1,className:a="",end:s=!1,style:u,to:h,unstable_viewTransition:g,children:f}=t,x=Ua(t,$y),l=Vr(h,{relative:x.relative}),y=vn(),i=le.useContext($o),{navigator:c,basename:p}=le.useContext(zt),d=i!=null&&i0(l)&&g===!0,m=c.encodeLocation?c.encodeLocation(l).pathname:l.pathname,v=y.pathname,b=i&&i.navigation&&i.navigation.location?i.navigation.location.pathname:null;o||(v=v.toLowerCase(),b=b?b.toLowerCase():null,m=m.toLowerCase()),b&&p&&(b=Vt(b,p)||b);const C=m!=="/"&&m.endsWith("/")?m.length-1:m.length;let S=v===m||!s&&v.startsWith(m)&&v.charAt(C)==="/",k=b!=null&&(b===m||!s&&b.startsWith(m)&&b.charAt(m.length)==="/"),B={isActive:S,isPending:k,isTransitioning:d},O=S?r:void 0,j;typeof a=="function"?j=a(B):j=[a,S?"active":null,k?"pending":null,d?"transitioning":null].filter(Boolean).join(" ");let I=typeof u=="function"?u(B):u;return le.createElement(Nu,Xn({},x,{"aria-current":O,className:j,ref:n,style:I,to:h,unstable_viewTransition:g}),typeof f=="function"?f(B):f)});process.env.NODE_ENV!=="production"&&(Jy.displayName="NavLink");const Yy=le.forwardRef((e,t)=>{let{fetcherKey:n,navigate:r,reloadDocument:o,replace:a,state:s,method:u=Ho,action:h,onSubmit:g,relative:f,preventScrollReset:x,unstable_viewTransition:l}=e,y=Ua(e,Vy),i=r0(),c=o0(h,{relative:f}),p=u.toLowerCase()==="get"?"get":"post",d=m=>{if(g&&g(m),m.defaultPrevented)return;m.preventDefault();let v=m.nativeEvent.submitter,b=(v==null?void 0:v.getAttribute("formmethod"))||u;i(v||m.currentTarget,{fetcherKey:n,method:b,navigate:r,replace:a,state:s,relative:f,preventScrollReset:x,unstable_viewTransition:l})};return le.createElement("form",Xn({ref:t,method:p,action:c,onSubmit:o?g:d},y))});process.env.NODE_ENV!=="production"&&(Yy.displayName="Form"),process.env.NODE_ENV;var Wo;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Wo||(Wo={}));var ju;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(ju||(ju={}));function Qy(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function Au(e){let t=le.useContext(Wn);return t||(process.env.NODE_ENV!=="production"?ke(!1,Qy(e)):ke(!1)),t}function Zy(e,t){let{target:n,replace:r,state:o,preventScrollReset:a,relative:s,unstable_viewTransition:u}=t===void 0?{}:t,h=At(),g=vn(),f=Vr(e,{relative:s});return le.useCallback(x=>{if(Iy(x,n)){x.preventDefault();let l=r!==void 0?r:Sn(g)===Sn(f);h(e,{replace:l,state:o,preventScrollReset:a,relative:s,unstable_viewTransition:u})}},[g,h,f,r,o,n,e,a,s,u])}function e0(){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 t0=0,n0=()=>"__"+String(++t0)+"__";function r0(){let{router:e}=Au(Wo.UseSubmit),{basename:t}=le.useContext(zt),n=By();return le.useCallback(function(r,o){o===void 0&&(o={}),e0();let{action:a,method:s,encType:u,formData:h,body:g}=Fy(r,t);if(o.navigate===!1){let f=o.fetcherKey||n0();e.fetch(f,n,o.action||a,{preventScrollReset:o.preventScrollReset,formData:h,body:g,formMethod:o.method||s,formEncType:o.encType||u,unstable_flushSync:o.unstable_flushSync})}else e.navigate(o.action||a,{preventScrollReset:o.preventScrollReset,formData:h,body:g,formMethod:o.method||s,formEncType:o.encType||u,replace:o.replace,state:o.state,fromRouteId:n,unstable_flushSync:o.unstable_flushSync,unstable_viewTransition:o.unstable_viewTransition})},[e,t,n])}function o0(e,t){let{relative:n}=t===void 0?{}:t,{basename:r}=le.useContext(zt),o=le.useContext(qt);o||(process.env.NODE_ENV!=="production"?ke(!1,"useFormAction must be used inside a RouteContext"):ke(!1));let[a]=o.matches.slice(-1),s=Xn({},Vr(e||".",{relative:n})),u=vn();if(e==null){s.search=u.search;let h=new URLSearchParams(s.search);h.has("index")&&h.get("index")===""&&(h.delete("index"),s.search=h.toString()?"?"+h.toString():"")}return(!e||e===".")&&a.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(s.pathname=s.pathname==="/"?r:Qt([r,s.pathname])),Sn(s)}function i0(e,t){t===void 0&&(t={});let n=le.useContext(Va);n==null&&(process.env.NODE_ENV!=="production"?ke(!1,"`unstable_useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"):ke(!1));let{basename:r}=Au(Wo.useViewTransitionState),o=Vr(e,{relative:t.relative});if(!n.isTransitioning)return!1;let a=Vt(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=Vt(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Sa(o.pathname,s)!=null||Sa(o.pathname,a)!=null}const a0="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 s0(){const e=At(),{t}=Ye(),n=Ln();return H.useEffect(()=>{n.sessionUuid&&e(`/${n.sessionUuid}`)},[n.sessionUuid,e]),E.jsxs("div",{className:"relative flex w-full flex-col items-center justify-center gap-12 text-center",children:[E.jsxs("div",{className:"flex items-center justify-center gap-3",children:[E.jsx("img",{alt:"logo",src:a0,className:"z-10 h-16 w-16 hover:animate-spin"}),E.jsxs("p",{className:"z-10 text-7xl font-semibold tracking-wide text-gray-600",children:["Welcome to ",E.jsx("span",{className:"italic",children:"PortalSessions"})]})]}),n.sessionUuid?E.jsx(Je,{style:{padding:"1.5rem 2rem"},label:t("continue"),onClick:()=>e(`/${n.sessionUuid}`)}):E.jsx("p",{className:"text-error-600",children:`${t("somethingWentWrong")} ${t("portalSessionNotFound")}.`})]})}function l0(){const e=At(),{t}=Ye(),{sessionUuid:n}=Ln(),{session:r,isLoading:o,mutate:a}=Ct();return H.useEffect(()=>{if(!o&&r){const s=r.type in Zt?`/${r.type.toLowerCase()}`:"/";e(s)}},[o,a,e,r]),o?E.jsx(Rl,{}):E.jsx("div",{className:"flex w-full items-center justify-center text-error-600",children:`${t("portalSessionNotFound")} (${n})`})}Gn([{path:"/",element:E.jsx(Kt,{}),children:[{index:!0,element:E.jsx(Ha,{})},{path:"/top-up/:hash",element:E.jsx(Iu,{})},{path:"/redeem/:hash",element:E.jsx(Lu,{})}]}]);function Ha(){const{t:e}=Ye(),[t,n]=H.useState(""),[r,o]=H.useState(!1),{session:a}=Ct(),s=At(),u=a==null?void 0:a.input_data.scanner_type,h=H.useCallback(()=>{let f;return a==null||a.events.forEach(x=>{x.type==="remaining_amount"&&(f=x.data.amount_in_cents)}),f??(a==null?void 0:a.input_data.amount_in_cents)},[a]),g=H.useCallback(async()=>{o(!0);const{data:{data:f}}=await Ai.get(t);s(`${a.type===Rn.REDEEM_GIFTCARD?"redeem":"top-up"}/${f.hash}`)},[t,s,a]);return H.useEffect(()=>{u===Mt.CAMERA&&t&&!r&&g().then()},[t,r,u,g]),(a==null?void 0:a.type)===Rn.REDEEM_GIFTCARD&&!(a!=null&&a.input_data.amount_in_cents)?E.jsx(E.Fragment,{children:e("xIsRequired",{x:"Amount in cents"})}):E.jsx("div",{className:"container m-auto",children:E.jsx(_t,{children:E.jsxs("div",{className:"flex flex-col gap-3",children:[E.jsx(qe,{size:"sm",weight:"extralight",children:e("scanGiftcard")}),(a==null?void 0:a.type)===Rn.REDEEM_GIFTCARD&&E.jsx(qe,{size:"lg",children:`${e("amountToBePaid")}: ${tr(h())}`}),E.jsx(wo,{dataSetter:n,type:u,label:e("hash")}),u===Mt.HAND_SCANNER&&E.jsx("div",{children:E.jsx(Je,{type:"submit",label:e("submit"),onClick:g})})]})})})}function Lu(){const{t:e}=Ye(),{hash:t}=Su(),{giftcard:n,mutate:r}=fl(t),{session:o,mutate:a}=Ct(),{onUseGiftcard:s}=Ln(),u=At(),h=(o==null?void 0:o.input_data.amount_in_cents)??0,g=(o==null?void 0:o.input_data.allow_multiple_giftcards)??!0;if(!n)return E.jsx(E.Fragment,{children:e("giftcardNotFound")});const f=async()=>{const y=await Ai.transaction(n.uuid,-l());await r(),await a(),De.success(`${e("transactionSuccessful")}!`),s&&s(y.data.data)},x=()=>{let y;return o==null||o.events.forEach(i=>{i.type==="remaining_amount"&&(y=i.data.amount_in_cents)}),y??h},l=()=>Math.min(x(),n.amount_in_cents);return E.jsx("div",{className:"container m-auto",children:E.jsx(_t,{children:E.jsxs("div",{className:"flex h-96 flex-col items-center justify-between",children:[E.jsxs("div",{children:[E.jsxs(qe,{size:"md",align:"center",children:[e("giftcard"),": ",n.hash]}),E.jsx(qe,{size:"sm",align:"center",weight:"light",className:"text-gray-500",children:n.expiration_date?e("expiresAtDate",{date:n.formatted_expiration_date}):n.formatted_expiration_date})]}),E.jsxs("div",{children:[E.jsx(qe,{size:"lg",align:"center",children:e("balance")}),E.jsx(qe,{size:"4xl",align:"center",children:n.display_amount})]}),E.jsx("div",{className:"mx-auto flex gap-2",children:l()?E.jsx(Je,{label:e("confirmAndPay",{amount:tr(l(),o==null?void 0:o.currency)}),onClick:f}):E.jsxs("div",{className:"flex flex-col gap-4",children:[E.jsx(qe,{size:"lg",align:"center",className:"text-gray-500",children:e("xOfYPaid",{x:x()?tr(h-x(),o==null?void 0:o.currency):e("fullAmount"),y:tr(h,o==null?void 0:o.currency)})}),g&&x()?E.jsx(Je,{label:e("useAnotherGiftcard"),onClick:()=>u("../")}):null]})})]})})})}function Iu(){const{t:e}=Ye(),{hash:t}=Su(),{giftcard:n,mutate:r}=fl(t),[o,a]=H.useState(!1),[s,u]=H.useState("");if(!n)return E.jsx(E.Fragment,{children:e("giftcardNotFound")});const h=async()=>{const g=await Ai.transaction(n.uuid,parseFloat(s)*100);await r(),De.success(`${e("transactionSuccessful")}! ${e("totalUpgradedAmount")}: ${tr(g.data.data.amount_in_cents)}`),a(!1)};return E.jsxs("div",{className:"container m-auto",children:[E.jsx(_t,{children:E.jsxs("div",{className:"flex h-96 flex-col items-center justify-between",children:[E.jsxs("div",{children:[E.jsxs(qe,{size:"md",align:"center",children:[e("giftcard"),": ",n.hash]}),E.jsx(qe,{size:"sm",align:"center",weight:"light",className:"text-gray-500",children:n.expiration_date?e("expiresAtDate",{date:n.formatted_expiration_date}):n.formatted_expiration_date})]}),E.jsxs("div",{children:[E.jsx(qe,{size:"lg",align:"center",children:e("balance")}),E.jsx(qe,{size:"4xl",align:"center",children:n.display_amount})]}),E.jsx("div",{className:"mx-auto flex gap-2",children:E.jsx(Je,{label:e("topUp"),onClick:()=>a(!0)})})]})}),E.jsx(Mn,{isOpen:o,onClose:()=>a(!1),children:E.jsxs("div",{className:"flex flex-col gap-4",children:[E.jsx(Fi,{value:s,valueSetter:u}),E.jsx(Je,{label:e("submit"),onClick:h})]})})]})}Gn([{path:"/",element:E.jsx(Kt,{}),children:[{index:!0,element:E.jsx(Mu,{})},{path:"email",element:E.jsx(Fu,{})},{path:"identifier",element:E.jsx(za,{})},{path:"register",element:E.jsx(Uu,{})}]}]);function c0(){const{t:e}=Ye(),{contact:t,isLoading:n,mutate:r}=yo(),[o,a]=H.useState(),[s,u]=H.useState();H.useEffect(()=>{o||(async()=>{const{data:f}=await ul.get();a(f.data.elements)})()},[t,o]);const h=(f,x)=>{u({...s,[f]:x})},g=async()=>{s&&(await ul.update(s),await r(),De.success(e("contactAttributesUpdated")))};return!o||n?E.jsx(Rl,{}):E.jsxs("div",{className:"flex h-full flex-col gap-6",children:[E.jsx("div",{className:"flex justify-end",children:E.jsx(Je,{label:e("saveChanges"),onClick:g})}),E.jsx("hr",{}),E.jsx("div",{className:"grid h-full grid-cols-2 gap-x-6 gap-y-2 overflow-y-auto p-1",children:o.map(f=>{if(f.type==="media_upload")return;const x=f.disabled?E.jsx(Gh,{type:f.type,value:t.current_display_values[f.name],label:f.label,underlying_value:t.current_values[f.name]}):E.jsx(Xh,{...f,onChange:h});return E.jsx("div",{children:x},f.id)})})]})}function u0(){const{t:e}=Ye(),{data:t,isLoading:n,mutate:r}=Fh(),o=async s=>{await Mh.update({subscription_type_id:s.subscription_type.id}),await r()},a=s=>{const u=s.subscription_type.strategy,h=s.status;if(u===In.FUNCTIONAL)return e("disabled");switch(h){case fr.SUBSCRIBED:return e("unsubscribe");case fr.UNSUBSCRIBED:return u===In.OPT_IN||In.OPT_OUT?e("subscribe"):e("sendConfirmationEmail");case fr.PENDING_CONFIRMATION:return e("sendReminder");default:return""}};return n?E.jsx(jc,{rows:5}):E.jsx("div",{children:t.data.data.map(s=>E.jsxs("div",{className:"mb-4 flex justify-between rounded-lg border border-gray-200 px-6 py-4 bg-white",children:[E.jsxs("div",{children:[E.jsxs("div",{className:"flex gap-3",children:[E.jsx(qe,{weight:"normal",children:s.subscription_type.name}),E.jsx("span",{className:`flex gap-2 rounded-full px-2 py-0.5 text-sm font-light ${s.is_subscribed?"bg-[#03985515] text-[#039855]":"bg-[#E0273115] text-[#E02731]"}`,children:s.status.charAt(0)+s.status.substring(1).toLowerCase()})]}),E.jsx(qe,{color:"text-gray-400",size:"sm",children:s.subscription_type.description})]}),E.jsx(Je,{style:{color:"inherit",backgroundColor:"white",border:"1px solid rgb(229 231 235)"},disabled:s.subscription_type.strategy===In.FUNCTIONAL,onClick:()=>o(s),label:a(s)})]},s.subscription_type.uuid))})}const Du="contact-identifiers",d0={create:e=>it.instance.post(Ze(Du),e)},f0=()=>{const{data:e,error:t,isLoading:n,isValidating:r,mutate:o}=fn(Ze(Du));return{identifiers:e==null?void 0:e.data.data,data:e,error:t,isLoading:n,isValidating:r,mutate:o}};function h0(){const{t:e}=Ye(),{data:t,isLoading:n,mutate:r}=f0(),[o,a]=H.useState(!1),[s,u]=H.useState(""),[h,g]=H.useState(!1),f=()=>{g(!0),d0.create({value:s}).then(()=>{r(),a(!1)}).catch(x=>De.error(x)).finally(()=>g(!1))};return n?E.jsx(jc,{rows:5}):E.jsxs("div",{className:"flex flex-col gap-2",children:[E.jsx("div",{className:"flex justify-end",children:E.jsx(Je,{label:e("addIdentifier"),onClick:()=>a(!0)})}),t.data.data.map(x=>E.jsx("div",{className:"flex justify-between rounded-lg border border-gray-200 px-6 py-4 bg-white",children:E.jsxs("div",{children:[E.jsx(qe,{weight:"semibold",children:x.name}),E.jsx(qe,{children:x.value})]})},x.value)),E.jsx(Mn,{isOpen:o,onClose:()=>a(!1),title:e("addIdentifier"),children:E.jsxs("div",{className:"flex flex-col gap-4 min-w-96",children:[E.jsx(Dn,{id:"add-identifier",name:"identifier",label:"Identifier value",type:"text",onChange:(x,l)=>u(l),autoFocus:!0}),E.jsx(Je,{label:e("addIdentifier"),onClick:f,disabled:h})]})})]})}function p0(){const{t:e}=Ye(),[t,n]=H.useState(),r=H.useMemo(()=>[{id:0,label:e("contactDetails"),icon:E.jsx("path",{d:"M10 0a10 10 0 1 0 10 10A10.011 10.011 0 0 0 10 0Zm0 5a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm0 13a8.949 8.949 0 0 1-4.951-1.488A3.987 3.987 0 0 1 9 13h2a3.987 3.987 0 0 1 3.951 3.512A8.949 8.949 0 0 1 10 18Z"}),content:E.jsx(c0,{})},{id:1,label:e("subscriptions"),icon:E.jsx("path",{d:"M18 7.5h-.423l-.452-1.09.3-.3a1.5 1.5 0 0 0 0-2.121L16.01 2.575a1.5 1.5 0 0 0-2.121 0l-.3.3-1.089-.452V2A1.5 1.5 0 0 0 11 .5H9A1.5 1.5 0 0 0 7.5 2v.423l-1.09.452-.3-.3a1.5 1.5 0 0 0-2.121 0L2.576 3.99a1.5 1.5 0 0 0 0 2.121l.3.3L2.423 7.5H2A1.5 1.5 0 0 0 .5 9v2A1.5 1.5 0 0 0 2 12.5h.423l.452 1.09-.3.3a1.5 1.5 0 0 0 0 2.121l1.415 1.413a1.5 1.5 0 0 0 2.121 0l.3-.3 1.09.452V18A1.5 1.5 0 0 0 9 19.5h2a1.5 1.5 0 0 0 1.5-1.5v-.423l1.09-.452.3.3a1.5 1.5 0 0 0 2.121 0l1.415-1.414a1.5 1.5 0 0 0 0-2.121l-.3-.3.452-1.09H18a1.5 1.5 0 0 0 1.5-1.5V9A1.5 1.5 0 0 0 18 7.5Zm-8 6a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7Z"}),content:E.jsx(u0,{})},{id:2,label:e("identifiers"),icon:E.jsx("path",{d:"M18 7.5h-.423l-.452-1.09.3-.3a1.5 1.5 0 0 0 0-2.121L16.01 2.575a1.5 1.5 0 0 0-2.121 0l-.3.3-1.089-.452V2A1.5 1.5 0 0 0 11 .5H9A1.5 1.5 0 0 0 7.5 2v.423l-1.09.452-.3-.3a1.5 1.5 0 0 0-2.121 0L2.576 3.99a1.5 1.5 0 0 0 0 2.121l.3.3L2.423 7.5H2A1.5 1.5 0 0 0 .5 9v2A1.5 1.5 0 0 0 2 12.5h.423l.452 1.09-.3.3a1.5 1.5 0 0 0 0 2.121l1.415 1.413a1.5 1.5 0 0 0 2.121 0l.3-.3 1.09.452V18A1.5 1.5 0 0 0 9 19.5h2a1.5 1.5 0 0 0 1.5-1.5v-.423l1.09-.452.3.3a1.5 1.5 0 0 0 2.121 0l1.415-1.414a1.5 1.5 0 0 0 0-2.121l-.3-.3.452-1.09H18a1.5 1.5 0 0 0 1.5-1.5V9A1.5 1.5 0 0 0 18 7.5Zm-8 6a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7Z"}),content:E.jsx(h0,{})}],[e]);return H.useEffect(()=>{t||n(r[0])},[r,t]),E.jsxs("div",{className:"h-full sm:flex",children:[E.jsx("ul",{className:"flex-column space-y mb-4 space-y-4 text-sm font-medium text-gray-500 md:mb-0 md:me-4",children:r.map(o=>E.jsx("li",{children:E.jsxs("div",{className:`inline-flex w-full cursor-pointer items-center rounded-lg px-4 py-3 ${o.id===(t==null?void 0:t.id)?"bg-primary-600 text-white":"bg-gray-50 hover:bg-gray-100 hover:text-gray-900"}`,onClick:()=>n(o),children:[E.jsx("svg",{className:`me-2 h-4 w-4 ${o.id===(t==null?void 0:t.id)?"text-white":"text-gray-500"}`,"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20",children:o.icon}),E.jsx("p",{className:"truncate",children:o.label})]})},o.id))}),E.jsx("div",{className:"text-medium h-full w-full rounded-lg bg-gray-50 p-6",children:t&&t.content})]})}function m0(){const{data:e,isLoading:t,mutate:n}=Dh(),{mutate:r}=yo(),{onClaimReward:o}=Ln(),{t:a}=Ye(),s=async u=>{const h=await Ih.claim(u);await n(),await r(),De.success(a("rewardClaimed",{name:h.data.data.title})),o&&o(h.data.data)};return E.jsx(Ac,{header:t?[]:e.data.data.header.items,rows:t?[]:e.data.data.rows,pending:t,onClick:s})}function g0(){const{data:e,isLoading:t,mutate:n}=Uh(),{onRedeemVoucher:r}=Ln(),{t:o}=Ye(),a=async s=>{const u=await Di.redeemById(s);await n(),De.success(o("voucherSuccessfullyRedeemed")),r&&r(u.data.data)};return E.jsx(Ac,{header:t?[]:e.data.data.header.items,rows:t?[]:e.data.data.rows,pending:t,onClick:a})}function y0(){const{t:e}=Ye(),{session:{loyalty_program:t}}=Ct(),{contact:n,isLoading:r}=yo();if(r)return E.jsx(E.Fragment,{});const o=[{value:n.credit_balance.balance,label:t.custom_credit_name||e("points")},{value:n.current_display_values.loyalty_number_of_transactions,label:e("transactions")},{value:n.tier?n.tier.name:"-",label:e("tier")}];return E.jsxs("div",{className:"flex w-full justify-between text-inherit",children:[E.jsxs("div",{children:[E.jsx("p",{className:"text-md font-medium",children:`${n.current_display_values.firstname} ${n.current_display_values.lastname}`}),E.jsx("p",{className:"text-sm",children:n.current_display_values.email})]}),E.jsx("div",{className:"flex gap-8",children:o.map(a=>E.jsxs("div",{className:"flex flex-col items-center",children:[E.jsx("p",{className:"text-md font-medium",children:a.value}),E.jsx("p",{className:"text-sm",children:a.label})]},a.label))})]})}function v0(){const{t:e}=Ye(),{session:t}=Ct(),n=t.contact,[r,o]=H.useState("rewards");if(!n)return E.jsx(E.Fragment,{children:e("contactNotFound")});const a=()=>{switch(r){case"profile":return E.jsx(p0,{});case"rewards":return E.jsx(m0,{});case"vouchers":return E.jsx(g0,{})}};return E.jsx("div",{className:"container m-auto flex h-full p-8",children:E.jsx(_t,{children:E.jsxs("div",{className:"flex h-full flex-col gap-6 overflow-hidden",children:[E.jsx(y0,{}),E.jsx("hr",{}),E.jsx("div",{children:E.jsx(Hh,{elements:[{key:"profile",label:e("profile"),active:r==="profile"},{key:"rewards",label:e("rewards"),active:r==="rewards"},{key:"vouchers",label:e("vouchers"),active:r==="vouchers"}],onClick:s=>o(s)})}),a()]})})})}function b0(){const{session:e}=Ct(),t=At(),{t:n}=Ye();return E.jsxs("div",{className:"m-auto flex flex-col items-center gap-4",children:[E.jsx("p",{children:n("noContactLinked")}),E.jsxs("div",{className:"flex gap-4",children:[e.input_data.enable_registration&&E.jsx(Je,{label:n("registerNewContact"),onClick:()=>t("register")}),e.input_data.enable_email_identification&&E.jsx(Je,{label:n("linkViaEmail"),onClick:()=>t("email")}),E.jsx(Je,{label:n("linkViaCard"),onClick:()=>t("identifier")})]})]})}function za(){const e=At();return E.jsx("div",{className:"container m-auto",children:E.jsx(_t,{children:E.jsx(Vi,{callback:()=>e("../")})})})}function Mu(){const{session:e}=Ct();return e&&(e.contact?E.jsx(v0,{}):!e.input_data.enable_registration&&!e.input_data.enable_email_identification?E.jsx(za,{}):E.jsx(b0,{}))}function Fu(){const[e,t]=H.useState(""),{session:n,mutate:r}=Ct(),o=At(),{t:a}=Ye(),s=async()=>{n&&(await vo.setContact(n.uuid,{email:e}),await r(),De.success(a("contactSavedToSession")),o("../"))};return E.jsx("div",{className:"container m-auto",children:E.jsx(_t,{children:E.jsxs("div",{className:"flex flex-col gap-3",children:[E.jsx("p",{children:a("fillInXBelow",{x:a("emailAddress").toLowerCase()})}),E.jsx(Dn,{autoFocus:!0,id:"email-input",name:"email",label:a("emailAddress"),type:"email",onChange:(u,h)=>t(h)}),E.jsx("div",{children:E.jsx(Je,{type:"submit",label:a("linkContact"),onClick:s})})]})})})}function Uu(){const[e,t]=H.useState(""),{session:n,mutate:r}=Ct(),o=At(),{t:a}=Ye(),s=async()=>{n&&(await dl.create(e),await r(),De.success(a("contactSavedToSession")),o("../"))};return E.jsx("div",{className:"container m-auto",children:E.jsx(_t,{children:E.jsxs("div",{className:"flex flex-col gap-3",children:[E.jsx("p",{children:a("fillInXBelow",{x:a("emailAddress").toLowerCase()})}),E.jsx(Dn,{autoFocus:!0,id:"email-input",name:"email",label:a("emailAddress"),type:"email",onChange:(u,h)=>t(h)}),E.jsx("div",{children:E.jsx(Je,{type:"submit",label:a("register"),onClick:s})})]})})})}Gn([{path:"/",element:E.jsx(Kt,{}),children:[{index:!0,element:E.jsx($u,{})},{path:"balance",element:E.jsx(Vu,{})}]}]);function $u(){const e=At();return E.jsx("div",{className:"container m-auto",children:E.jsx(_t,{children:E.jsx(Vi,{callback:()=>e("balance")})})})}function Vu(){const{t:e}=Ye(),{balance:t,mutate:n}=Lh(),[r,o]=H.useState(""),[a,s]=H.useState(1),[u,h]=H.useState(!1),g=async()=>{r&&(await Ah.transaction({amount_in_cents:parseFloat(r)*100*a}),await n(),De.success(e("prepaidTransactionCreated")),h(!1))};return E.jsxs("div",{className:"container m-auto",children:[E.jsxs(_t,{children:[E.jsxs(qe,{size:"lg",align:"center",weight:"normal",children:[e("prepaidBalance"),": ",t==null?void 0:t.balance]}),E.jsx("div",{className:"mt-6 flex justify-center",children:E.jsxs("div",{className:"grid w-1/3 grid-cols-2 gap-x-2",children:[E.jsx(Je,{label:e("upgrade"),onClick:()=>{h(!0),s(1)}}),E.jsx(Je,{label:e("depreciate"),onClick:()=>{h(!0),s(-1)}})]})})]}),E.jsx(Mn,{isOpen:u,onClose:()=>h(!1),children:E.jsxs("div",{className:"flex flex-col gap-4",children:[E.jsx(Fi,{value:r,valueSetter:o}),E.jsx(Je,{label:e("submit"),onClick:g})]})})]})}Gn([{path:"/",element:E.jsx(Kt,{}),children:[{index:!0,element:E.jsx(Hu,{})},{path:"success",element:E.jsx(zu,{})}]}]);function Hu(){const{t:e}=Ye(),[t,n]=H.useState(""),[r,o]=H.useState(!1),{session:a,mutate:s}=Ct(),u=At(),h=async()=>{if(t){const{data:{data:g}}=await jh.create({unit_value:parseFloat(t)});await s(),u("success",{state:{transaction:g}})}};return H.useEffect(()=>{a&&a.contact&&o(!0)},[u,a]),E.jsxs("div",{className:"container m-auto",children:[E.jsx(_t,{children:E.jsx(Vi,{})}),E.jsx(Mn,{isOpen:r,children:E.jsxs("div",{className:"flex flex-col gap-4",children:[E.jsxs("p",{className:"text-center",children:[e("unitValue"),":"]}),E.jsx(Fi,{value:t,valueSetter:n}),E.jsx(Je,{label:e("submit"),onClick:h})]})})]})}function zu(){const{state:e}=vn(),{t}=Ye(),{session:{loyalty_program:n}}=Ct(),{contact:r}=yo();return E.jsx("div",{className:"m-auto",children:E.jsx(Cl,{children:E.jsxs("div",{className:"mt-8 flex w-96 flex-col gap-4",children:[E.jsxs(qe,{size:"lg",weight:"bold",align:"center",children:[t("creditReceptionCreated"),"!"]}),e&&e.transaction&&E.jsxs(qe,{color:"text-gray-500",align:"center",children:["+",e.transaction.credits," ",n.custom_credit_name||t("points").toLowerCase()]}),E.jsx("div",{className:"h-24"}),r&&E.jsxs("div",{className:"flex justify-between",children:[E.jsxs(qe,{color:"text-gray-200",children:[t("currentCreditBalance"),":"]}),E.jsxs(qe,{color:"text-gray-200",children:[r.credit_balance.balance," ",n.custom_credit_name||t("points").toLowerCase()]})]})]})})})}Gn([{path:"/",element:E.jsx(Kt,{}),children:[{index:!0,element:E.jsx(qu,{})},{path:"success",element:E.jsx(Ku,{})}]}]);function qu(){const{t:e}=Ye(),[t,n]=H.useState(""),[r,o]=H.useState(""),[a,s]=H.useState(!1),[u,h]=H.useState(!1),{session:g}=Ct(),f=g==null?void 0:g.input_data.scanner_type,x=At(),l=H.useCallback(async()=>{r&&await vo.setContact(g.uuid,{contact_identifier_value:r});const{data:{data:i}}=await Di.redeemByCode(t);x("success",{state:{voucher:i}})},[t,r,x,g]),y=H.useCallback(async()=>{if(g){s(!0);const{data:{data:i}}=await Di.get(t);i.contact||g.contact?await l():h(!0),s(!1)}},[t,l,g]);return H.useEffect(()=>{f===Mt.CAMERA&&t&&!a&&(async()=>await y())()},[t,a,f,y,u]),E.jsxs("div",{className:"container m-auto",children:[E.jsxs(_t,{children:[E.jsx(wo,{dataSetter:n,type:f,label:e("voucherCode")}),f===Mt.HAND_SCANNER&&E.jsx("div",{className:"pt-3",children:E.jsx(Je,{type:"submit",label:e("redeemVoucher"),onClick:y})})]}),E.jsxs(Mn,{isOpen:u,onClose:()=>h(!1),children:[E.jsx("p",{className:"pb-4 text-error-600",children:e("noContactLinkedToVoucher")}),E.jsx(wo,{dataSetter:o,type:f,label:e("contactIdentifier")}),f===Mt.HAND_SCANNER&&E.jsx("div",{className:"pt-3",children:E.jsx(Je,{type:"submit",label:e("redeemVoucher"),onClick:l})})]})]})}function Ku(){const{t:e}=Ye(),{state:t}=vn();return E.jsx("div",{className:"m-auto",children:E.jsx(Cl,{children:E.jsx(qe,{size:"lg",align:"center",className:"pt-6",children:e("voucherWithCodeSuccessfullyRedeemed",{code:t.voucher.code})})})})}const w0=Gn([{path:"/",element:E.jsx(s0,{})},{path:":portalSessionUuid",element:E.jsx(l0,{}),errorElement:E.jsx("div",{children:"No session UUID"})},{path:Zt.REDEEM_GIFTCARD,element:E.jsx(Kt,{}),children:[{index:!0,element:E.jsx(Ha,{})},{path:"redeem/:hash",element:E.jsx(Lu,{})}]},{path:Zt.TOP_UP_GIFTCARD,element:E.jsx(Kt,{}),children:[{index:!0,element:E.jsx(Ha,{})},{path:"top-up/:hash",element:E.jsx(Iu,{})}]},{path:Zt.PORTAL,element:E.jsx(Kt,{}),children:[{index:!0,element:E.jsx(Mu,{})},{path:"email",element:E.jsx(Fu,{})},{path:"identifier",element:E.jsx(za,{})},{path:"register",element:E.jsx(Uu,{})}]},{path:Zt.PREPAID,element:E.jsx(Kt,{}),children:[{index:!0,element:E.jsx($u,{})},{path:"balance",element:E.jsx(Vu,{})}]},{path:Zt.SAVE,element:E.jsx(Kt,{}),children:[{index:!0,element:E.jsx(Hu,{})},{path:"success",element:E.jsx(zu,{})}]},{path:Zt.VOUCHER,element:E.jsx(Kt,{}),children:[{index:!0,element:E.jsx(qu,{})},{path:"success",element:E.jsx(Ku,{})}]}]),Wu=()=>E.jsx(Ky,{router:w0});function x0(e){return E.jsx(bg,{config:e,payload:{type:e.type??Rn.PORTAL,api_key:e.apiKey,shop_uuid:e.shopUuid,...e.amountInCents&&{amount_in_cents:e.amountInCents},...e.allowMultipleGiftcards&&{allow_multiple_giftcards:e.allowMultipleGiftcards},...e.scannerType&&{scanner_type:e.scannerType},...e.enableRegistration&&{enable_registration:e.enableRegistration},...e.enableEmailIdentification&&{enable_email_identification:e.enableEmailIdentification},...e.enableOnScreenKeyboard&&{enable_on_screen_keyboard:e.enableOnScreenKeyboard}},children:E.jsx(Wu,{})})}function k0({uuid:e,host:t}){const[n,r]=H.useState(!1);return H.useEffect(()=>{n||(it.initialize(void 0,t),r(!0))},[t,n]),n?E.jsxs(H.StrictMode,{children:[E.jsx(pl,{sessionUuid:e,children:E.jsxs("div",{className:"flex h-screen w-screen bg-primary-50",children:[e&&E.jsx(kl,{}),E.jsx(Wu,{})]})}),E.jsx(hs,{position:"bottom-center"})]}):E.jsx(E.Fragment,{children:"Initializing..."})}const C0=Object.freeze(Object.defineProperty({__proto__:null,createWorker:()=>new Worker(URL.createObjectURL(new Blob([`class x{constructor(a,b){this.width=b;this.height=a.length/b;this.data=a}static createEmpty(a,b){return new x(new Uint8ClampedArray(a*b),a)}get(a,b){return 0>a||a>=this.width||0>b||b>=this.height?!1:!!this.data[b*this.width+a]}set(a,b,c){this.data[b*this.width+a]=c?1:0}setRegion(a,b,c,d,e){for(let f=b;f<b+d;f++)for(let g=a;g<a+c;g++)this.set(g,f,!!e)}}
103
+ */function Xn(){return Xn=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},Xn.apply(this,arguments)}function $a(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}const Ho="get",zo="application/x-www-form-urlencoded";function qo(e){return e!=null&&typeof e.tagName=="string"}function Ny(e){return qo(e)&&e.tagName.toLowerCase()==="button"}function jy(e){return qo(e)&&e.tagName.toLowerCase()==="form"}function Ay(e){return qo(e)&&e.tagName.toLowerCase()==="input"}function Ly(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Iy(e,t){return e.button===0&&(!t||t==="_self")&&!Ly(e)}let Ko=null;function Dy(){if(Ko===null)try{new FormData(document.createElement("form"),0),Ko=!1}catch{Ko=!0}return Ko}const My=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Va(e){return e!=null&&!My.has(e)?(process.env.NODE_ENV!=="production"&&ct(!1,'"'+e+'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` '+('and will default to "'+zo+'"')),null):e}function Fy(e,t){let n,r,o,a,s;if(jy(e)){let u=e.getAttribute("action");r=u?Vt(u,t):null,n=e.getAttribute("method")||Ho,o=Va(e.getAttribute("enctype"))||zo,a=new FormData(e)}else if(Ny(e)||Ay(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let h=e.getAttribute("formaction")||u.getAttribute("action");if(r=h?Vt(h,t):null,n=e.getAttribute("formmethod")||u.getAttribute("method")||Ho,o=Va(e.getAttribute("formenctype"))||Va(u.getAttribute("enctype"))||zo,a=new FormData(u,e),!Dy()){let{name:g,type:f,value:x}=e;if(f==="image"){let l=g?g+".":"";a.append(l+"x","0"),a.append(l+"y","0")}else g&&a.append(g,x)}}else{if(qo(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Ho,r=null,o=zo,s=e}return a&&o==="text/plain"&&(s=a,a=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:a,body:s}}const Uy=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],$y=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],Vy=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","unstable_viewTransition"],Hy="6";try{window.__reactRouterVersion=Hy}catch{}const Ha=le.createContext({isTransitioning:!1});process.env.NODE_ENV!=="production"&&(Ha.displayName="ViewTransition");const _u=le.createContext(new Map);process.env.NODE_ENV!=="production"&&(_u.displayName="Fetchers");const Ru=le["startTransition"],Tu=Ju["flushSync"];function zy(e){Ru?Ru(e):e()}function qr(e){Tu?Tu(e):e()}class qy{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function Ky(e){let{fallbackElement:t,router:n,future:r}=e,[o,a]=le.useState(n.state),[s,u]=le.useState(),[h,g]=le.useState({isTransitioning:!1}),[f,x]=le.useState(),[l,y]=le.useState(),[i,c]=le.useState(),p=le.useRef(new Map),{v7_startTransition:d}=r||{},m=le.useCallback(k=>{d?zy(k):k()},[d]),v=le.useCallback((k,B)=>{let{deletedFetchers:O,unstable_flushSync:j,unstable_viewTransitionOpts:I}=B;O.forEach(M=>p.current.delete(M)),k.fetchers.forEach((M,$)=>{M.data!==void 0&&p.current.set($,M.data)});let D=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!I||D){j?qr(()=>a(k)):m(()=>a(k));return}if(j){qr(()=>{l&&(f&&f.resolve(),l.skipTransition()),g({isTransitioning:!0,flushSync:!0,currentLocation:I.currentLocation,nextLocation:I.nextLocation})});let M=n.window.document.startViewTransition(()=>{qr(()=>a(k))});M.finished.finally(()=>{qr(()=>{x(void 0),y(void 0),u(void 0),g({isTransitioning:!1})})}),qr(()=>y(M));return}l?(f&&f.resolve(),l.skipTransition(),c({state:k,currentLocation:I.currentLocation,nextLocation:I.nextLocation})):(u(k),g({isTransitioning:!0,flushSync:!1,currentLocation:I.currentLocation,nextLocation:I.nextLocation}))},[n.window,l,f,p,m]);le.useLayoutEffect(()=>n.subscribe(v),[n,v]),le.useEffect(()=>{h.isTransitioning&&!h.flushSync&&x(new qy)},[h]),le.useEffect(()=>{if(f&&s&&n.window){let k=s,B=f.promise,O=n.window.document.startViewTransition(async()=>{m(()=>a(k)),await B});O.finished.finally(()=>{x(void 0),y(void 0),u(void 0),g({isTransitioning:!1})}),y(O)}},[m,s,f,n.window]),le.useEffect(()=>{f&&s&&o.location.key===s.location.key&&f.resolve()},[f,l,o.location,s]),le.useEffect(()=>{!h.isTransitioning&&i&&(u(i.state),g({isTransitioning:!0,flushSync:!1,currentLocation:i.currentLocation,nextLocation:i.nextLocation}),c(void 0))},[h.isTransitioning,i]),le.useEffect(()=>{process.env.NODE_ENV!=="production"&&ct(t==null||!n.future.v7_partialHydration,"`<RouterProvider fallbackElement>` is deprecated when using `v7_partialHydration`, use a `HydrateFallback` component instead")},[]);let b=le.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:k=>n.navigate(k),push:(k,B,O)=>n.navigate(k,{state:B,preventScrollReset:O==null?void 0:O.preventScrollReset}),replace:(k,B,O)=>n.navigate(k,{replace:!0,state:B,preventScrollReset:O==null?void 0:O.preventScrollReset})}),[n]),C=n.basename||"/",S=le.useMemo(()=>({router:n,navigator:b,static:!1,basename:C}),[n,b,C]);return le.createElement(le.Fragment,null,le.createElement(Wn.Provider,{value:S},le.createElement($o.Provider,{value:o},le.createElement(_u.Provider,{value:p.current},le.createElement(Ha.Provider,{value:h},le.createElement(Ry,{basename:C,location:o.location,navigationType:o.historyAction,navigator:b,future:{v7_relativeSplatPath:n.future.v7_relativeSplatPath}},o.initialized||n.future.v7_partialHydration?le.createElement(Wy,{routes:n.routes,future:n.future,state:o}):t))))),null)}function Wy(e){let{routes:t,future:n,state:r}=e;return vy(t,void 0,r,n)}process.env.NODE_ENV;const Gy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Xy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Nu=le.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:a,replace:s,state:u,target:h,to:g,preventScrollReset:f,unstable_viewTransition:x}=t,l=$a(t,Uy),{basename:y}=le.useContext(zt),i,c=!1;if(typeof g=="string"&&Xy.test(g)&&(i=g,Gy))try{let v=new URL(window.location.href),b=g.startsWith("//")?new URL(v.protocol+g):new URL(g),C=Vt(b.pathname,y);b.origin===v.origin&&C!=null?g=C+b.search+b.hash:c=!0}catch{process.env.NODE_ENV!=="production"&&ct(!1,'<Link to="'+g+'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.')}let p=py(g,{relative:o}),d=Zy(g,{replace:s,state:u,target:h,preventScrollReset:f,relative:o,unstable_viewTransition:x});function m(v){r&&r(v),v.defaultPrevented||d(v)}return le.createElement("a",Xn({},l,{href:i||p,onClick:c||a?r:m,ref:n,target:h}))});process.env.NODE_ENV!=="production"&&(Nu.displayName="Link");const Jy=le.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:o=!1,className:a="",end:s=!1,style:u,to:h,unstable_viewTransition:g,children:f}=t,x=$a(t,$y),l=Hr(h,{relative:x.relative}),y=vn(),i=le.useContext($o),{navigator:c,basename:p}=le.useContext(zt),d=i!=null&&i0(l)&&g===!0,m=c.encodeLocation?c.encodeLocation(l).pathname:l.pathname,v=y.pathname,b=i&&i.navigation&&i.navigation.location?i.navigation.location.pathname:null;o||(v=v.toLowerCase(),b=b?b.toLowerCase():null,m=m.toLowerCase()),b&&p&&(b=Vt(b,p)||b);const C=m!=="/"&&m.endsWith("/")?m.length-1:m.length;let S=v===m||!s&&v.startsWith(m)&&v.charAt(C)==="/",k=b!=null&&(b===m||!s&&b.startsWith(m)&&b.charAt(m.length)==="/"),B={isActive:S,isPending:k,isTransitioning:d},O=S?r:void 0,j;typeof a=="function"?j=a(B):j=[a,S?"active":null,k?"pending":null,d?"transitioning":null].filter(Boolean).join(" ");let I=typeof u=="function"?u(B):u;return le.createElement(Nu,Xn({},x,{"aria-current":O,className:j,ref:n,style:I,to:h,unstable_viewTransition:g}),typeof f=="function"?f(B):f)});process.env.NODE_ENV!=="production"&&(Jy.displayName="NavLink");const Yy=le.forwardRef((e,t)=>{let{fetcherKey:n,navigate:r,reloadDocument:o,replace:a,state:s,method:u=Ho,action:h,onSubmit:g,relative:f,preventScrollReset:x,unstable_viewTransition:l}=e,y=$a(e,Vy),i=r0(),c=o0(h,{relative:f}),p=u.toLowerCase()==="get"?"get":"post",d=m=>{if(g&&g(m),m.defaultPrevented)return;m.preventDefault();let v=m.nativeEvent.submitter,b=(v==null?void 0:v.getAttribute("formmethod"))||u;i(v||m.currentTarget,{fetcherKey:n,method:b,navigate:r,replace:a,state:s,relative:f,preventScrollReset:x,unstable_viewTransition:l})};return le.createElement("form",Xn({ref:t,method:p,action:c,onSubmit:o?g:d},y))});process.env.NODE_ENV!=="production"&&(Yy.displayName="Form"),process.env.NODE_ENV;var Wo;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Wo||(Wo={}));var ju;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(ju||(ju={}));function Qy(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function Au(e){let t=le.useContext(Wn);return t||(process.env.NODE_ENV!=="production"?ke(!1,Qy(e)):ke(!1)),t}function Zy(e,t){let{target:n,replace:r,state:o,preventScrollReset:a,relative:s,unstable_viewTransition:u}=t===void 0?{}:t,h=At(),g=vn(),f=Hr(e,{relative:s});return le.useCallback(x=>{if(Iy(x,n)){x.preventDefault();let l=r!==void 0?r:Pn(g)===Pn(f);h(e,{replace:l,state:o,preventScrollReset:a,relative:s,unstable_viewTransition:u})}},[g,h,f,r,o,n,e,a,s,u])}function e0(){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 t0=0,n0=()=>"__"+String(++t0)+"__";function r0(){let{router:e}=Au(Wo.UseSubmit),{basename:t}=le.useContext(zt),n=By();return le.useCallback(function(r,o){o===void 0&&(o={}),e0();let{action:a,method:s,encType:u,formData:h,body:g}=Fy(r,t);if(o.navigate===!1){let f=o.fetcherKey||n0();e.fetch(f,n,o.action||a,{preventScrollReset:o.preventScrollReset,formData:h,body:g,formMethod:o.method||s,formEncType:o.encType||u,unstable_flushSync:o.unstable_flushSync})}else e.navigate(o.action||a,{preventScrollReset:o.preventScrollReset,formData:h,body:g,formMethod:o.method||s,formEncType:o.encType||u,replace:o.replace,state:o.state,fromRouteId:n,unstable_flushSync:o.unstable_flushSync,unstable_viewTransition:o.unstable_viewTransition})},[e,t,n])}function o0(e,t){let{relative:n}=t===void 0?{}:t,{basename:r}=le.useContext(zt),o=le.useContext(qt);o||(process.env.NODE_ENV!=="production"?ke(!1,"useFormAction must be used inside a RouteContext"):ke(!1));let[a]=o.matches.slice(-1),s=Xn({},Hr(e||".",{relative:n})),u=vn();if(e==null){s.search=u.search;let h=new URLSearchParams(s.search);h.has("index")&&h.get("index")===""&&(h.delete("index"),s.search=h.toString()?"?"+h.toString():"")}return(!e||e===".")&&a.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(s.pathname=s.pathname==="/"?r:Qt([r,s.pathname])),Pn(s)}function i0(e,t){t===void 0&&(t={});let n=le.useContext(Ha);n==null&&(process.env.NODE_ENV!=="production"?ke(!1,"`unstable_useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"):ke(!1));let{basename:r}=Au(Wo.useViewTransitionState),o=Hr(e,{relative:t.relative});if(!n.isTransitioning)return!1;let a=Vt(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=Vt(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Pa(o.pathname,s)!=null||Pa(o.pathname,a)!=null}const a0="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 s0(){const e=At(),{t}=Qe(),n=kn();return H.useEffect(()=>{n.sessionUuid&&e(`/${n.sessionUuid}`)},[n.sessionUuid,e]),E.jsxs("div",{className:"relative flex w-full flex-col items-center justify-center gap-12 text-center",children:[E.jsxs("div",{className:"flex items-center justify-center gap-3",children:[E.jsx("img",{alt:"logo",src:a0,className:"z-10 h-16 w-16 hover:animate-spin"}),E.jsxs("p",{className:"z-10 text-7xl font-semibold tracking-wide text-gray-600",children:["Welcome to ",E.jsx("span",{className:"italic",children:"PortalSessions"})]})]}),n.sessionUuid?E.jsx(Ye,{style:{padding:"1.5rem 2rem"},label:t("continue"),onClick:()=>e(`/${n.sessionUuid}`)}):E.jsx("p",{className:"text-error-600",children:`${t("somethingWentWrong")} ${t("portalSessionNotFound")}.`})]})}function l0(){const e=At(),{t}=Qe(),{sessionUuid:n}=kn(),{session:r,isLoading:o,mutate:a}=Ct();return H.useEffect(()=>{if(!o&&r){const s=r.type in Zt?`/${r.type.toLowerCase()}`:"/";e(s)}},[o,a,e,r]),o?E.jsx(Rl,{}):E.jsx("div",{className:"flex w-full items-center justify-center text-error-600",children:`${t("portalSessionNotFound")} (${n})`})}Gn([{path:"/",element:E.jsx(Kt,{}),children:[{index:!0,element:E.jsx(za,{})},{path:"/top-up/:hash",element:E.jsx(Iu,{})},{path:"/redeem/:hash",element:E.jsx(Lu,{})}]}]);function za(){const{t:e}=Qe(),[t,n]=H.useState(""),[r,o]=H.useState(!1),{session:a}=Ct(),s=At(),u=a==null?void 0:a.input_data.scanner_type,h=H.useCallback(()=>{let f;return a==null||a.events.forEach(x=>{x.type==="remaining_amount"&&(f=x.data.amount_in_cents)}),f??(a==null?void 0:a.input_data.amount_in_cents)},[a]),g=H.useCallback(async()=>{o(!0);const{data:{data:f}}=await Li.get(t);s(`${a.type===Tn.REDEEM_GIFTCARD?"redeem":"top-up"}/${f.hash}`)},[t,s,a]);return H.useEffect(()=>{u===Mt.CAMERA&&t&&!r&&g().then()},[t,r,u,g]),(a==null?void 0:a.type)===Tn.REDEEM_GIFTCARD&&!(a!=null&&a.input_data.amount_in_cents)?E.jsx(E.Fragment,{children:e("xIsRequired",{x:"Amount in cents"})}):E.jsx("div",{className:"container m-auto",children:E.jsx(_t,{children:E.jsxs("div",{className:"flex flex-col gap-3",children:[E.jsx(qe,{size:"sm",weight:"extralight",children:e("scanGiftcard")}),(a==null?void 0:a.type)===Tn.REDEEM_GIFTCARD&&E.jsx(qe,{size:"lg",children:`${e("amountToBePaid")}: ${tr(h())}`}),E.jsx(wo,{dataSetter:n,type:u,label:e("hash")}),u===Mt.HAND_SCANNER&&E.jsx("div",{children:E.jsx(Ye,{type:"submit",label:e("submit"),onClick:g})})]})})})}function Lu(){const{t:e}=Qe(),{hash:t}=Su(),{giftcard:n,mutate:r}=fl(t),{session:o,mutate:a}=Ct(),{onUseGiftcard:s}=kn(),u=At(),h=(o==null?void 0:o.input_data.amount_in_cents)??0,g=(o==null?void 0:o.input_data.allow_multiple_giftcards)??!0;if(!n)return E.jsx(E.Fragment,{children:e("giftcardNotFound")});const f=async()=>{const y=await Li.transaction(n.uuid,-l());await r(),await a(),De.success(`${e("transactionSuccessful")}!`),s&&s(y.data.data)},x=()=>{let y;return o==null||o.events.forEach(i=>{i.type==="remaining_amount"&&(y=i.data.amount_in_cents)}),y??h},l=()=>Math.min(x(),n.amount_in_cents);return E.jsx("div",{className:"container m-auto",children:E.jsx(_t,{children:E.jsxs("div",{className:"flex h-96 flex-col items-center justify-between",children:[E.jsxs("div",{children:[E.jsxs(qe,{size:"md",align:"center",children:[e("giftcard"),": ",n.hash]}),E.jsx(qe,{size:"sm",align:"center",weight:"light",className:"text-gray-500",children:n.expiration_date?e("expiresAtDate",{date:n.formatted_expiration_date}):n.formatted_expiration_date})]}),E.jsxs("div",{children:[E.jsx(qe,{size:"lg",align:"center",children:e("balance")}),E.jsx(qe,{size:"4xl",align:"center",children:n.display_amount})]}),E.jsx("div",{className:"mx-auto flex gap-2",children:l()?E.jsx(Ye,{label:e("confirmAndPay",{amount:tr(l(),o==null?void 0:o.currency)}),onClick:f}):E.jsxs("div",{className:"flex flex-col gap-4",children:[E.jsx(qe,{size:"lg",align:"center",className:"text-gray-500",children:e("xOfYPaid",{x:x()?tr(h-x(),o==null?void 0:o.currency):e("fullAmount"),y:tr(h,o==null?void 0:o.currency)})}),g&&x()?E.jsx(Ye,{label:e("useAnotherGiftcard"),onClick:()=>u("../")}):null]})})]})})})}function Iu(){const{t:e}=Qe(),{hash:t}=Su(),{giftcard:n,mutate:r}=fl(t),[o,a]=H.useState(!1),[s,u]=H.useState("");if(!n)return E.jsx(E.Fragment,{children:e("giftcardNotFound")});const h=async()=>{const g=await Li.transaction(n.uuid,parseFloat(s)*100);await r(),De.success(`${e("transactionSuccessful")}! ${e("totalUpgradedAmount")}: ${tr(g.data.data.amount_in_cents)}`),a(!1)};return E.jsxs("div",{className:"container m-auto",children:[E.jsx(_t,{children:E.jsxs("div",{className:"flex h-96 flex-col items-center justify-between",children:[E.jsxs("div",{children:[E.jsxs(qe,{size:"md",align:"center",children:[e("giftcard"),": ",n.hash]}),E.jsx(qe,{size:"sm",align:"center",weight:"light",className:"text-gray-500",children:n.expiration_date?e("expiresAtDate",{date:n.formatted_expiration_date}):n.formatted_expiration_date})]}),E.jsxs("div",{children:[E.jsx(qe,{size:"lg",align:"center",children:e("balance")}),E.jsx(qe,{size:"4xl",align:"center",children:n.display_amount})]}),E.jsx("div",{className:"mx-auto flex gap-2",children:E.jsx(Ye,{label:e("topUp"),onClick:()=>a(!0)})})]})}),E.jsx(Mn,{isOpen:o,onClose:()=>a(!1),children:E.jsxs("div",{className:"flex flex-col gap-4",children:[E.jsx(Ui,{value:s,valueSetter:u}),E.jsx(Ye,{label:e("submit"),onClick:h})]})})]})}Gn([{path:"/",element:E.jsx(Kt,{}),children:[{index:!0,element:E.jsx(Mu,{})},{path:"email",element:E.jsx(Fu,{})},{path:"identifier",element:E.jsx(qa,{})},{path:"register",element:E.jsx(Uu,{})}]}]);function c0(){const{t:e}=Qe(),{contact:t,isLoading:n,mutate:r}=yo(),[o,a]=H.useState(),[s,u]=H.useState();H.useEffect(()=>{o||(async()=>{const{data:f}=await dl.get();a(f.data.elements)})()},[t,o]);const h=(f,x)=>{u({...s,[f]:x})},g=async()=>{s&&(await dl.update(s),await r(),De.success(e("contactAttributesUpdated")))};return!o||n?E.jsx(Rl,{}):E.jsxs("div",{className:"flex h-full flex-col gap-6",children:[E.jsx("div",{className:"flex justify-end",children:E.jsx(Ye,{label:e("saveChanges"),onClick:g})}),E.jsx("hr",{}),E.jsx("div",{className:"grid h-full grid-cols-2 gap-x-6 gap-y-2 overflow-y-auto p-1",children:o.map(f=>{if(f.type==="media_upload")return;const x=f.disabled?E.jsx(Gh,{type:f.type,value:t.current_display_values[f.name],label:f.label,underlying_value:t.current_values[f.name]}):E.jsx(Xh,{...f,onChange:h});return E.jsx("div",{children:x},f.id)})})]})}function u0(){const{t:e}=Qe(),{data:t,isLoading:n,mutate:r}=Fh(),o=async s=>{await Mh.update({subscription_type_id:s.subscription_type.id}),await r()},a=s=>{const u=s.subscription_type.strategy,h=s.status;if(u===In.FUNCTIONAL)return e("disabled");switch(h){case hr.SUBSCRIBED:return e("unsubscribe");case hr.UNSUBSCRIBED:return u===In.OPT_IN||In.OPT_OUT?e("subscribe"):e("sendConfirmationEmail");case hr.PENDING_CONFIRMATION:return e("sendReminder");default:return""}};return n?E.jsx(jc,{rows:5}):E.jsx("div",{children:t.data.data.map(s=>E.jsxs("div",{className:"mb-4 flex justify-between rounded-lg border border-gray-200 px-6 py-4 bg-white",children:[E.jsxs("div",{children:[E.jsxs("div",{className:"flex gap-3",children:[E.jsx(qe,{weight:"normal",children:s.subscription_type.name}),E.jsx("span",{className:`flex gap-2 rounded-full px-2 py-0.5 text-sm font-light ${s.is_subscribed?"bg-[#03985515] text-[#039855]":"bg-[#E0273115] text-[#E02731]"}`,children:s.status.charAt(0)+s.status.substring(1).toLowerCase()})]}),E.jsx(qe,{color:"text-gray-400",size:"sm",children:s.subscription_type.description})]}),E.jsx(Ye,{style:{color:"inherit",backgroundColor:"white",border:"1px solid rgb(229 231 235)"},disabled:s.subscription_type.strategy===In.FUNCTIONAL,onClick:()=>o(s),label:a(s)})]},s.subscription_type.uuid))})}const Du="contact-identifiers",d0={create:e=>tt.instance.post(Je(Du),e)},f0=()=>{const{data:e,error:t,isLoading:n,isValidating:r,mutate:o}=fn(Je(Du));return{identifiers:e==null?void 0:e.data.data,data:e,error:t,isLoading:n,isValidating:r,mutate:o}};function h0(){const{t:e}=Qe(),{data:t,isLoading:n,mutate:r}=f0(),[o,a]=H.useState(!1),[s,u]=H.useState(""),[h,g]=H.useState(!1),f=()=>{g(!0),d0.create({value:s}).then(()=>{r(),a(!1)}).catch(x=>De.error(x)).finally(()=>g(!1))};return n?E.jsx(jc,{rows:5}):E.jsxs("div",{className:"flex flex-col gap-2",children:[E.jsx("div",{className:"flex justify-end",children:E.jsx(Ye,{label:e("addIdentifier"),onClick:()=>a(!0)})}),t.data.data.map(x=>E.jsx("div",{className:"flex justify-between rounded-lg border border-gray-200 px-6 py-4 bg-white",children:E.jsxs("div",{children:[E.jsx(qe,{weight:"semibold",children:x.name}),E.jsx(qe,{children:x.value})]})},x.value)),E.jsx(Mn,{isOpen:o,onClose:()=>a(!1),title:e("addIdentifier"),children:E.jsxs("div",{className:"flex flex-col gap-4 min-w-96",children:[E.jsx(Dn,{id:"add-identifier",name:"identifier",label:"Identifier value",type:"text",onChange:(x,l)=>u(l),autoFocus:!0}),E.jsx(Ye,{label:e("addIdentifier"),onClick:f,disabled:h})]})})]})}function p0(){const{t:e}=Qe(),[t,n]=H.useState(),r=H.useMemo(()=>[{id:0,label:e("contactDetails"),icon:E.jsx("path",{d:"M10 0a10 10 0 1 0 10 10A10.011 10.011 0 0 0 10 0Zm0 5a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm0 13a8.949 8.949 0 0 1-4.951-1.488A3.987 3.987 0 0 1 9 13h2a3.987 3.987 0 0 1 3.951 3.512A8.949 8.949 0 0 1 10 18Z"}),content:E.jsx(c0,{})},{id:1,label:e("subscriptions"),icon:E.jsx("path",{d:"M18 7.5h-.423l-.452-1.09.3-.3a1.5 1.5 0 0 0 0-2.121L16.01 2.575a1.5 1.5 0 0 0-2.121 0l-.3.3-1.089-.452V2A1.5 1.5 0 0 0 11 .5H9A1.5 1.5 0 0 0 7.5 2v.423l-1.09.452-.3-.3a1.5 1.5 0 0 0-2.121 0L2.576 3.99a1.5 1.5 0 0 0 0 2.121l.3.3L2.423 7.5H2A1.5 1.5 0 0 0 .5 9v2A1.5 1.5 0 0 0 2 12.5h.423l.452 1.09-.3.3a1.5 1.5 0 0 0 0 2.121l1.415 1.413a1.5 1.5 0 0 0 2.121 0l.3-.3 1.09.452V18A1.5 1.5 0 0 0 9 19.5h2a1.5 1.5 0 0 0 1.5-1.5v-.423l1.09-.452.3.3a1.5 1.5 0 0 0 2.121 0l1.415-1.414a1.5 1.5 0 0 0 0-2.121l-.3-.3.452-1.09H18a1.5 1.5 0 0 0 1.5-1.5V9A1.5 1.5 0 0 0 18 7.5Zm-8 6a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7Z"}),content:E.jsx(u0,{})},{id:2,label:e("identifiers"),icon:E.jsx("path",{d:"M18 7.5h-.423l-.452-1.09.3-.3a1.5 1.5 0 0 0 0-2.121L16.01 2.575a1.5 1.5 0 0 0-2.121 0l-.3.3-1.089-.452V2A1.5 1.5 0 0 0 11 .5H9A1.5 1.5 0 0 0 7.5 2v.423l-1.09.452-.3-.3a1.5 1.5 0 0 0-2.121 0L2.576 3.99a1.5 1.5 0 0 0 0 2.121l.3.3L2.423 7.5H2A1.5 1.5 0 0 0 .5 9v2A1.5 1.5 0 0 0 2 12.5h.423l.452 1.09-.3.3a1.5 1.5 0 0 0 0 2.121l1.415 1.413a1.5 1.5 0 0 0 2.121 0l.3-.3 1.09.452V18A1.5 1.5 0 0 0 9 19.5h2a1.5 1.5 0 0 0 1.5-1.5v-.423l1.09-.452.3.3a1.5 1.5 0 0 0 2.121 0l1.415-1.414a1.5 1.5 0 0 0 0-2.121l-.3-.3.452-1.09H18a1.5 1.5 0 0 0 1.5-1.5V9A1.5 1.5 0 0 0 18 7.5Zm-8 6a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7Z"}),content:E.jsx(h0,{})}],[e]);return H.useEffect(()=>{t||n(r[0])},[r,t]),E.jsxs("div",{className:"h-full sm:flex",children:[E.jsx("ul",{className:"flex-column space-y mb-4 space-y-4 text-sm font-medium text-gray-500 md:mb-0 md:me-4",children:r.map(o=>E.jsx("li",{children:E.jsxs("div",{className:`inline-flex w-full cursor-pointer items-center rounded-lg px-4 py-3 ${o.id===(t==null?void 0:t.id)?"bg-primary-600 text-white":"bg-gray-50 hover:bg-gray-100 hover:text-gray-900"}`,onClick:()=>n(o),children:[E.jsx("svg",{className:`me-2 h-4 w-4 ${o.id===(t==null?void 0:t.id)?"text-white":"text-gray-500"}`,"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20",children:o.icon}),E.jsx("p",{className:"truncate",children:o.label})]})},o.id))}),E.jsx("div",{className:"text-medium h-full w-full rounded-lg bg-gray-50 p-6",children:t&&t.content})]})}function m0(){const{data:e,isLoading:t,mutate:n}=Dh(),{mutate:r}=yo(),{onClaimReward:o}=kn(),{t:a}=Qe(),s=async u=>{const h=await Ih.claim(u);await n(),await r(),De.success(a("rewardClaimed",{name:h.data.data.title})),o&&o(h.data.data)};return E.jsx(Ac,{header:t?[]:e.data.data.header.items,rows:t?[]:e.data.data.rows,pending:t,onClick:s})}function g0(){const{data:e,isLoading:t,mutate:n}=Uh(),{onRedeemVoucher:r}=kn(),{t:o}=Qe(),a=async s=>{const u=await Mi.redeemById(s);await n(),De.success(o("voucherSuccessfullyRedeemed")),r&&r(u.data.data)};return E.jsx(Ac,{header:t?[]:e.data.data.header.items,rows:t?[]:e.data.data.rows,pending:t,onClick:a})}function y0(){const{t:e}=Qe(),{session:{loyalty_program:t}}=Ct(),{contact:n,isLoading:r}=yo();if(r)return E.jsx(E.Fragment,{});const o=[{value:n.credit_balance.balance,label:t.custom_credit_name||e("points")},{value:n.current_display_values.loyalty_number_of_transactions,label:e("transactions")},{value:n.tier?n.tier.name:"-",label:e("tier")}];return E.jsxs("div",{className:"flex w-full justify-between text-inherit",children:[E.jsxs("div",{children:[E.jsx("p",{className:"text-md font-medium",children:`${n.current_display_values.firstname} ${n.current_display_values.lastname}`}),E.jsx("p",{className:"text-sm",children:n.current_display_values.email})]}),E.jsx("div",{className:"flex gap-8",children:o.map(a=>E.jsxs("div",{className:"flex flex-col items-center",children:[E.jsx("p",{className:"text-md font-medium",children:a.value}),E.jsx("p",{className:"text-sm",children:a.label})]},a.label))})]})}function v0(){const{t:e}=Qe(),{session:t}=Ct(),n=t.contact,[r,o]=H.useState("rewards");if(!n)return E.jsx(E.Fragment,{children:e("contactNotFound")});const a=()=>{switch(r){case"profile":return E.jsx(p0,{});case"rewards":return E.jsx(m0,{});case"vouchers":return E.jsx(g0,{})}};return E.jsx("div",{className:"container m-auto flex h-full p-8",children:E.jsx(_t,{children:E.jsxs("div",{className:"flex h-full flex-col gap-6 overflow-hidden",children:[E.jsx(y0,{}),E.jsx("hr",{}),E.jsx("div",{children:E.jsx(Hh,{elements:[{key:"profile",label:e("profile"),active:r==="profile"},{key:"rewards",label:e("rewards"),active:r==="rewards"},{key:"vouchers",label:e("vouchers"),active:r==="vouchers"}],onClick:s=>o(s)})}),a()]})})})}function b0(){const{session:e}=Ct(),t=At(),{t:n}=Qe();return E.jsxs("div",{className:"m-auto flex flex-col items-center gap-4",children:[E.jsx("p",{children:n("noContactLinked")}),E.jsxs("div",{className:"flex gap-4",children:[e.input_data.enable_registration&&E.jsx(Ye,{label:n("registerNewContact"),onClick:()=>t("register")}),e.input_data.enable_email_identification&&E.jsx(Ye,{label:n("linkViaEmail"),onClick:()=>t("email")}),E.jsx(Ye,{label:n("linkViaCard"),onClick:()=>t("identifier")})]})]})}function qa(){const e=At();return E.jsx("div",{className:"container m-auto",children:E.jsx(_t,{children:E.jsx(Hi,{callback:()=>e("../")})})})}function Mu(){const{session:e}=Ct();return e&&(e.contact?E.jsx(v0,{}):!e.input_data.enable_registration&&!e.input_data.enable_email_identification?E.jsx(qa,{}):E.jsx(b0,{}))}function Fu(){const[e,t]=H.useState(""),{session:n,mutate:r}=Ct(),o=At(),{t:a}=Qe(),s=async()=>{n&&(await vo.setContact(n.uuid,{email:e}),await r(),De.success(a("contactSavedToSession")),o("../"))};return E.jsx("div",{className:"container m-auto",children:E.jsx(_t,{children:E.jsxs("div",{className:"flex flex-col gap-3",children:[E.jsx("p",{children:a("fillInXBelow",{x:a("emailAddress").toLowerCase()})}),E.jsx(Dn,{autoFocus:!0,id:"email-input",name:"email",label:a("emailAddress"),type:"email",onChange:(u,h)=>t(h)}),E.jsx("div",{children:E.jsx(Ye,{type:"submit",label:a("linkContact"),onClick:s})})]})})})}function Uu(){const[e,t]=H.useState(""),{session:n,mutate:r}=Ct(),o=At(),{t:a}=Qe(),s=async()=>{n&&(await ji.create(e),await r(),De.success(a("contactSavedToSession")),o("../"))};return E.jsx("div",{className:"container m-auto",children:E.jsx(_t,{children:E.jsxs("div",{className:"flex flex-col gap-3",children:[E.jsx("p",{children:a("fillInXBelow",{x:a("emailAddress").toLowerCase()})}),E.jsx(Dn,{autoFocus:!0,id:"email-input",name:"email",label:a("emailAddress"),type:"email",onChange:(u,h)=>t(h)}),E.jsx("div",{children:E.jsx(Ye,{type:"submit",label:a("register"),onClick:s})})]})})})}Gn([{path:"/",element:E.jsx(Kt,{}),children:[{index:!0,element:E.jsx($u,{})},{path:"balance",element:E.jsx(Vu,{})}]}]);function $u(){const e=At();return E.jsx("div",{className:"container m-auto",children:E.jsx(_t,{children:E.jsx(Hi,{callback:()=>e("balance")})})})}function Vu(){const{t:e}=Qe(),{balance:t,mutate:n}=Lh(),[r,o]=H.useState(""),[a,s]=H.useState(1),[u,h]=H.useState(!1),g=async()=>{r&&(await Ah.transaction({amount_in_cents:parseFloat(r)*100*a}),await n(),De.success(e("prepaidTransactionCreated")),h(!1))};return E.jsxs("div",{className:"container m-auto",children:[E.jsxs(_t,{children:[E.jsxs(qe,{size:"lg",align:"center",weight:"normal",children:[e("prepaidBalance"),": ",t==null?void 0:t.balance]}),E.jsx("div",{className:"mt-6 flex justify-center",children:E.jsxs("div",{className:"grid w-1/3 grid-cols-2 gap-x-2",children:[E.jsx(Ye,{label:e("upgrade"),onClick:()=>{h(!0),s(1)}}),E.jsx(Ye,{label:e("depreciate"),onClick:()=>{h(!0),s(-1)}})]})})]}),E.jsx(Mn,{isOpen:u,onClose:()=>h(!1),children:E.jsxs("div",{className:"flex flex-col gap-4",children:[E.jsx(Ui,{value:r,valueSetter:o}),E.jsx(Ye,{label:e("submit"),onClick:g})]})})]})}Gn([{path:"/",element:E.jsx(Kt,{}),children:[{index:!0,element:E.jsx(Hu,{})},{path:"success",element:E.jsx(zu,{})}]}]);function Hu(){const{t:e}=Qe(),[t,n]=H.useState(""),[r,o]=H.useState(!1),{session:a,mutate:s}=Ct(),u=At(),h=async()=>{if(t){const{data:{data:g}}=await jh.create({unit_value:parseFloat(t)});await s(),u("success",{state:{transaction:g}})}};return H.useEffect(()=>{a&&a.contact&&o(!0)},[u,a]),E.jsxs("div",{className:"container m-auto",children:[E.jsx(_t,{children:E.jsx(Hi,{})}),E.jsx(Mn,{isOpen:r,children:E.jsxs("div",{className:"flex flex-col gap-4",children:[E.jsxs("p",{className:"text-center",children:[e("unitValue"),":"]}),E.jsx(Ui,{value:t,valueSetter:n}),E.jsx(Ye,{label:e("submit"),onClick:h})]})})]})}function zu(){const{state:e}=vn(),{t}=Qe(),{session:{loyalty_program:n}}=Ct(),{contact:r}=yo();return E.jsx("div",{className:"m-auto",children:E.jsx(Cl,{children:E.jsxs("div",{className:"mt-8 flex w-96 flex-col gap-4",children:[E.jsxs(qe,{size:"lg",weight:"bold",align:"center",children:[t("creditReceptionCreated"),"!"]}),e&&e.transaction&&E.jsxs(qe,{color:"text-gray-500",align:"center",children:["+",e.transaction.credits," ",n.custom_credit_name||t("points").toLowerCase()]}),E.jsx("div",{className:"h-24"}),r&&E.jsxs("div",{className:"flex justify-between",children:[E.jsxs(qe,{color:"text-gray-200",children:[t("currentCreditBalance"),":"]}),E.jsxs(qe,{color:"text-gray-200",children:[r.credit_balance.balance," ",n.custom_credit_name||t("points").toLowerCase()]})]})]})})})}Gn([{path:"/",element:E.jsx(Kt,{}),children:[{index:!0,element:E.jsx(qu,{})},{path:"success",element:E.jsx(Ku,{})}]}]);function qu(){const{t:e}=Qe(),[t,n]=H.useState(""),[r,o]=H.useState(""),[a,s]=H.useState(!1),[u,h]=H.useState(!1),{session:g}=Ct(),f=g==null?void 0:g.input_data.scanner_type,x=At(),l=H.useCallback(async()=>{r&&await vo.setContact(g.uuid,{contact_identifier_value:r});const{data:{data:i}}=await Mi.redeemByCode(t);x("success",{state:{voucher:i}})},[t,r,x,g]),y=H.useCallback(async()=>{if(g){s(!0);const{data:{data:i}}=await Mi.get(t);i.contact||g.contact?await l():h(!0),s(!1)}},[t,l,g]);return H.useEffect(()=>{f===Mt.CAMERA&&t&&!a&&(async()=>await y())()},[t,a,f,y,u]),E.jsxs("div",{className:"container m-auto",children:[E.jsxs(_t,{children:[E.jsx(wo,{dataSetter:n,type:f,label:e("voucherCode")}),f===Mt.HAND_SCANNER&&E.jsx("div",{className:"pt-3",children:E.jsx(Ye,{type:"submit",label:e("redeemVoucher"),onClick:y})})]}),E.jsxs(Mn,{isOpen:u,onClose:()=>h(!1),children:[E.jsx("p",{className:"pb-4 text-error-600",children:e("noContactLinkedToVoucher")}),E.jsx(wo,{dataSetter:o,type:f,label:e("contactIdentifier")}),f===Mt.HAND_SCANNER&&E.jsx("div",{className:"pt-3",children:E.jsx(Ye,{type:"submit",label:e("redeemVoucher"),onClick:l})})]})]})}function Ku(){const{t:e}=Qe(),{state:t}=vn();return E.jsx("div",{className:"m-auto",children:E.jsx(Cl,{children:E.jsx(qe,{size:"lg",align:"center",className:"pt-6",children:e("voucherWithCodeSuccessfullyRedeemed",{code:t.voucher.code})})})})}const w0=Gn([{path:"/",element:E.jsx(s0,{})},{path:":portalSessionUuid",element:E.jsx(l0,{}),errorElement:E.jsx("div",{children:"No session UUID"})},{path:Zt.REDEEM_GIFTCARD,element:E.jsx(Kt,{}),children:[{index:!0,element:E.jsx(za,{})},{path:"redeem/:hash",element:E.jsx(Lu,{})}]},{path:Zt.TOP_UP_GIFTCARD,element:E.jsx(Kt,{}),children:[{index:!0,element:E.jsx(za,{})},{path:"top-up/:hash",element:E.jsx(Iu,{})}]},{path:Zt.PORTAL,element:E.jsx(Kt,{}),children:[{index:!0,element:E.jsx(Mu,{})},{path:"email",element:E.jsx(Fu,{})},{path:"identifier",element:E.jsx(qa,{})},{path:"register",element:E.jsx(Uu,{})}]},{path:Zt.PREPAID,element:E.jsx(Kt,{}),children:[{index:!0,element:E.jsx($u,{})},{path:"balance",element:E.jsx(Vu,{})}]},{path:Zt.SAVE,element:E.jsx(Kt,{}),children:[{index:!0,element:E.jsx(Hu,{})},{path:"success",element:E.jsx(zu,{})}]},{path:Zt.VOUCHER,element:E.jsx(Kt,{}),children:[{index:!0,element:E.jsx(qu,{})},{path:"success",element:E.jsx(Ku,{})}]}]),Wu=()=>E.jsx(Ky,{router:w0});function x0(e){return E.jsx(bg,{config:e,payload:{type:e.type??Tn.PORTAL,api_key:e.apiKey,shop_uuid:e.shopUuid,...e.amountInCents&&{amount_in_cents:e.amountInCents},...e.allowMultipleGiftcards&&{allow_multiple_giftcards:e.allowMultipleGiftcards},...e.scannerType&&{scanner_type:e.scannerType},...e.enableRegistration&&{enable_registration:e.enableRegistration},...e.enableEmailIdentification&&{enable_email_identification:e.enableEmailIdentification},...e.enableOnScreenKeyboard&&{enable_on_screen_keyboard:e.enableOnScreenKeyboard}},children:E.jsx(Wu,{})})}function k0({uuid:e,host:t}){const[n,r]=H.useState(!1);return H.useEffect(()=>{n||(tt.initialize(void 0,t),r(!0))},[t,n]),n?E.jsxs(H.StrictMode,{children:[E.jsx(pl,{sessionUuid:e,children:E.jsxs("div",{className:"flex h-screen w-screen bg-primary-50",children:[e&&E.jsx(kl,{}),E.jsx(Wu,{})]})}),E.jsx(ps,{position:"bottom-center"})]}):E.jsx(E.Fragment,{children:"Initializing..."})}const C0=Object.freeze(Object.defineProperty({__proto__:null,createWorker:()=>new Worker(URL.createObjectURL(new Blob([`class x{constructor(a,b){this.width=b;this.height=a.length/b;this.data=a}static createEmpty(a,b){return new x(new Uint8ClampedArray(a*b),a)}get(a,b){return 0>a||a>=this.width||0>b||b>=this.height?!1:!!this.data[b*this.width+a]}set(a,b,c){this.data[b*this.width+a]=c?1:0}setRegion(a,b,c,d,e){for(let f=b;f<b+d;f++)for(let g=a;g<a+c;g++)this.set(g,f,!!e)}}
104
104
  class A{constructor(a,b,c){this.width=a;a*=b;if(c&&c.length!==a)throw Error("Wrong buffer size");this.data=c||new Uint8ClampedArray(a)}get(a,b){return this.data[b*this.width+a]}set(a,b,c){this.data[b*this.width+a]=c}}
105
105
  class ba{constructor(a){this.bitOffset=this.byteOffset=0;this.bytes=a}readBits(a){if(1>a||32<a||a>this.available())throw Error("Cannot read "+a.toString()+" bits");var b=0;if(0<this.bitOffset){b=8-this.bitOffset;var c=a<b?a:b;b-=c;b=(this.bytes[this.byteOffset]&255>>8-c<<b)>>b;a-=c;this.bitOffset+=c;8===this.bitOffset&&(this.bitOffset=0,this.byteOffset++)}if(0<a){for(;8<=a;)b=b<<8|this.bytes[this.byteOffset]&255,this.byteOffset++,a-=8;0<a&&(c=8-a,b=b<<a|(this.bytes[this.byteOffset]&255>>c<<c)>>c,
106
106
  this.bitOffset+=a)}return b}available(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset}}var B,C=B||(B={});C.Numeric="numeric";C.Alphanumeric="alphanumeric";C.Byte="byte";C.Kanji="kanji";C.ECI="eci";C.StructuredAppend="structuredappend";var D,E=D||(D={});E[E.Terminator=0]="Terminator";E[E.Numeric=1]="Numeric";E[E.Alphanumeric=2]="Alphanumeric";E[E.Byte=4]="Byte";E[E.Kanji=8]="Kanji";E[E.ECI=7]="ECI";E[E.StructuredAppend=3]="StructuredAppend";let F="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:".split("");
@@ -197,4 +197,4 @@ u.set(r,q,v)}h?(q=new Uint8ClampedArray(a.buffer,m,k),m+=k,q=new x(q,b)):q=x.cre
197
197
  y:z))||"attemptBoth"!==e.inversionAttempts&&"invertFirst"!==e.inversionAttempts||(f=V(d?z:y));return f}X.default=X;let Y="dontInvert",Z={red:77,green:150,blue:29,useIntegerApproximation:!0};
198
198
  self.onmessage=a=>{let b=a.data.id,c=a.data.data;switch(a.data.type){case "decode":(a=X(c.data,c.width,c.height,{inversionAttempts:Y,greyScaleWeights:Z}))?self.postMessage({id:b,type:"qrResult",data:a.data,cornerPoints:[a.location.topLeftCorner,a.location.topRightCorner,a.location.bottomRightCorner,a.location.bottomLeftCorner]}):self.postMessage({id:b,type:"qrResult",data:null});break;case "grayscaleWeights":Z.red=c.red;Z.green=c.green;Z.blue=c.blue;Z.useIntegerApproximation=c.useIntegerApproximation;
199
199
  break;case "inversionMode":switch(c){case "original":Y="dontInvert";break;case "invert":Y="onlyInvert";break;case "both":Y="attemptBoth";break;default:throw Error("Invalid inversion mode");}break;case "close":self.close()}}
200
- `]),{type:"application/javascript"}))},Symbol.toStringTag,{value:"Module"}));rt.DefaultSession=k0,rt.PortalRoute=Zt,rt.PortalSession=x0,rt.PortalType=Rn,rt.ScannerType=Mt,rt.SubscriptionStatus=fr,rt.SubscriptionStrategy=In,rt.VoucherStatus=yl,Object.defineProperty(rt,Symbol.toStringTag,{value:"Module"})});
200
+ `]),{type:"application/javascript"}))},Symbol.toStringTag,{value:"Module"}));ot.DefaultSession=k0,ot.PortalRoute=Zt,ot.PortalSession=x0,ot.PortalType=Tn,ot.ScannerType=Mt,ot.SubscriptionStatus=hr,ot.SubscriptionStrategy=In,ot.VoucherStatus=yl,Object.defineProperty(ot,Symbol.toStringTag,{value:"Module"})});