react-luminus-components 2.0.30 → 2.0.32

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.
Files changed (46) hide show
  1. package/dist/.vite/manifest.json +40 -40
  2. package/dist/{FormDisabledProvider-BdVAJaqG.js → FormDisabledProvider-CknAF8EI.js} +1 -1
  3. package/dist/{FormDisabledProvider-DyO7R2kE.cjs → FormDisabledProvider-DoGy2C4j.cjs} +1 -1
  4. package/dist/components/common/NotificationCenter/Actions/NotificationActions.d.ts +23 -0
  5. package/dist/components/{NotifCenter → common/NotificationCenter}/Actions/components/ActionTemplates/ActionTemplates.d.ts +1 -1
  6. package/dist/components/{NotifCenter → common/NotificationCenter}/Actions/components/ActionTemplates/comps/Recipients/NotificationRecipients.d.ts +1 -1
  7. package/dist/components/{NotifCenter → common/NotificationCenter}/Actions/components/ActionTemplates/comps/modals/NotificationTargetModal.d.ts +1 -1
  8. package/dist/components/{NotifCenter → common/NotificationCenter}/Actions/components/HistoryTable/NotificationHistoryTable.d.ts +3 -3
  9. package/dist/components/{NotifCenter → common/NotificationCenter}/Actions/components/modals/NotificationActionAddModal.d.ts +1 -1
  10. package/dist/components/{NotifCenter → common/NotificationCenter}/Actions/components/modals/NotificationTemplateAddModal.d.ts +2 -2
  11. package/dist/components/{NotifCenter → common/NotificationCenter}/Actions/components/modals/NotificationTemplateEditModal.d.ts +2 -2
  12. package/dist/components/common/NotificationCenter/NotifStyles/NotifStyles.d.ts +8 -0
  13. package/dist/components/common/NotificationCenter/Users/NotificationUsers.d.ts +12 -0
  14. package/dist/components/{NotifCenter → common/NotificationCenter}/Users/components/EmployeeNotifTable/EmployeeNotifHistoryTable.d.ts +2 -2
  15. package/dist/components/{NotifCenter → common/NotificationCenter}/index.d.ts +1 -1
  16. package/dist/components/common/index.d.ts +3 -0
  17. package/dist/contexts.cjs.js +1 -1
  18. package/dist/contexts.es.js +598 -598
  19. package/dist/hooks.cjs.js +1 -1
  20. package/dist/hooks.es.js +31 -31
  21. package/dist/layout.cjs.js +1 -1
  22. package/dist/layout.es.js +216 -210
  23. package/dist/{localStorageUtils-D2opn367.js → localStorageUtils-CZ4HDRzi.js} +2 -2
  24. package/dist/main.cjs.js +8 -8
  25. package/dist/main.d.ts +1 -3
  26. package/dist/main.es.js +8616 -8582
  27. package/dist/{nivo-bar-CdrSgzV1.cjs → nivo-bar-BkpPCncR.cjs} +1 -1
  28. package/dist/{nivo-bar-BsmDtzXw.js → nivo-bar-wBsr2P1t.js} +65 -65
  29. package/dist/style.css +1 -1
  30. package/dist/{useIsFormDirty-Pdd8CdTQ.js → useIsFormDirty-CTuj9_Nd.js} +1 -1
  31. package/dist/{useIsFormDirty-CzwHpad1.cjs → useIsFormDirty-Cb4GEBID.cjs} +1 -1
  32. package/dist/{useLocalStorageState-Byzo2ssr.js → useLocalStorageState-DBd2vOH1.js} +1 -1
  33. package/dist/{useLocalStorageState-CbsbIUSp.cjs → useLocalStorageState-gKbms6va.cjs} +1 -1
  34. package/dist/utils.cjs.js +1 -1
  35. package/dist/utils.es.js +16 -16
  36. package/package.json +1 -1
  37. package/dist/components/NotifCenter/Actions/NotificationActions.d.ts +0 -22
  38. package/dist/components/NotifCenter/NotifStyles/NotifStyles.d.ts +0 -10
  39. package/dist/components/NotifCenter/NotifStyles/hooks/useNotifStyleFormSchema.d.ts +0 -20
  40. package/dist/components/NotifCenter/NotifStyles/hooks/useNotifStyleTableColumns.d.ts +0 -7
  41. package/dist/components/NotifCenter/Users/NotificationUsers.d.ts +0 -10
  42. /package/dist/components/{NotifCenter → common/NotificationCenter}/Actions/components/ActionTemplates/comps/index.d.ts +0 -0
  43. /package/dist/components/{NotifCenter → common/NotificationCenter}/Actions/components/index.d.ts +0 -0
  44. /package/dist/components/{NotifCenter → common/NotificationCenter}/Actions/hooks/useNotifTemplateUtils.d.ts +0 -0
  45. /package/dist/components/{NotifCenter → common/NotificationCenter}/Actions/types/NotificationKindFullModel.d.ts +0 -0
  46. /package/dist/components/{NotifCenter → common/NotificationCenter}/Users/components/index.d.ts +0 -0
@@ -241,7 +241,7 @@ to {
241
241
  *
242
242
  * This source code is licensed under the MIT license found in the
243
243
  * LICENSE file in the root directory of this source tree.
244
- */var _b;function YA(){return _b||(_b=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,_=e?Symbol.for("react.scope"):60119;function w(P){return typeof P=="string"||typeof P=="function"||P===r||P===c||P===o||P===i||P===d||P===f||typeof P=="object"&&P!==null&&(P.$$typeof===p||P.$$typeof===h||P.$$typeof===a||P.$$typeof===s||P.$$typeof===u||P.$$typeof===g||P.$$typeof===x||P.$$typeof===_||P.$$typeof===m)}function C(P){if(typeof P=="object"&&P!==null){var te=P.$$typeof;switch(te){case t:var K=P.type;switch(K){case l:case c:case r:case o:case i:case d:return K;default:var G=K&&K.$$typeof;switch(G){case s:case u:case p:case h:case a:return G;default:return te}}case n:return te}}}var b=l,S=c,M=s,$=a,k=t,R=u,T=r,E=p,A=h,I=n,j=o,D=i,O=d,L=!1;function z(P){return L||(L=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),N(P)||C(P)===l}function N(P){return C(P)===c}function H(P){return C(P)===s}function Y(P){return C(P)===a}function q(P){return typeof P=="object"&&P!==null&&P.$$typeof===t}function Z(P){return C(P)===u}function X(P){return C(P)===r}function J(P){return C(P)===p}function ee(P){return C(P)===h}function W(P){return C(P)===n}function F(P){return C(P)===o}function B(P){return C(P)===i}function V(P){return C(P)===d}Pt.AsyncMode=b,Pt.ConcurrentMode=S,Pt.ContextConsumer=M,Pt.ContextProvider=$,Pt.Element=k,Pt.ForwardRef=R,Pt.Fragment=T,Pt.Lazy=E,Pt.Memo=A,Pt.Portal=I,Pt.Profiler=j,Pt.StrictMode=D,Pt.Suspense=O,Pt.isAsyncMode=z,Pt.isConcurrentMode=N,Pt.isContextConsumer=H,Pt.isContextProvider=Y,Pt.isElement=q,Pt.isForwardRef=Z,Pt.isFragment=X,Pt.isLazy=J,Pt.isMemo=ee,Pt.isPortal=W,Pt.isProfiler=F,Pt.isStrictMode=B,Pt.isSuspense=V,Pt.isValidElementType=w,Pt.typeOf=C}()),Pt}var Cb;function GA(){return Cb||(Cb=1,process.env.NODE_ENV==="production"?tu.exports=qA():tu.exports=YA()),tu.exports}var Qh,Sb;function ZA(){if(Sb)return Qh;Sb=1;var e=GA(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};o[e.ForwardRef]=r,o[e.Memo]=i;function a(p){return e.isMemo(p)?i:o[p.$$typeof]||t}var s=Object.defineProperty,l=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,f=Object.prototype;function h(p,m,g){if(typeof m!="string"){if(f){var x=d(m);x&&x!==f&&h(p,x,g)}var _=l(m);c&&(_=_.concat(c(m)));for(var w=a(p),C=a(m),b=0;b<_.length;++b){var S=_[b];if(!n[S]&&!(g&&g[S])&&!(C&&C[S])&&!(w&&w[S])){var M=u(m,S);try{s(p,S,M)}catch{}}}}return p}return Qh=h,Qh}ZA();function XA(){return typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"}function o0(e,t){const n=v.useContext(H4);if(!n)throw new Error("Missing <CookiesProvider>");const i=Object.assign(Object.assign({},{doNotUpdate:!0}),t),[o,a]=v.useState(()=>n.getAll(i));XA()&&v.useLayoutEffect(()=>{function u(){const d=n.getAll(i);KA(e||null,d,o)&&a(d)}return n.addChangeListener(u),()=>{n.removeChangeListener(u)}},[n,o]);const s=v.useMemo(()=>n.set.bind(n),[n]),l=v.useMemo(()=>n.remove.bind(n),[n]),c=v.useMemo(()=>n.update.bind(n),[n]);return[o,s,l,c]}function KA(e,t,n){if(!e)return!0;for(let r of e)if(t[r]!==n[r])return!0;return!1}const JA=()=>{const e=je.c(12),{axiosOptions:t,cookieDomain:n}=v.useContext(rn);let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=["Authorization"],e[0]=r):r=e[0];const[,i,o]=o0(r);let a;e[1]!==t?(a=Zt.create(t),e[1]=t,e[2]=a):a=e[2];const s=a,l=QA;let c;e[3]!==s||e[4]!==n||e[5]!==i?(c=async(p,m)=>s.post("/user/login",{kid:p,password:m}).then(g=>(localStorage.setItem("token",g.data),window.dispatchEvent(new Event("dev-auth-change")),i("Authorization",g.data,{path:"/",secure:!0,sameSite:"none",domain:n,expires:rw(new Date(Date.now()),24)}),g.data)).catch(eR),e[3]=s,e[4]=n,e[5]=i,e[6]=c):c=e[6];const u=c;let d;e[7]!==o?(d=()=>{localStorage.removeItem("token"),localStorage.removeItem("user"),window.dispatchEvent(new Event("dev-auth-change")),o("Authorization")},e[7]=o,e[8]=d):d=e[8];const f=d;let h;return e[9]!==u||e[10]!==f?(h={isAuthenticated:l,login:u,logout:f},e[9]=u,e[10]=f,e[11]=h):h=e[11],h};function QA(){const e=localStorage.getItem("token");return e!==null&&e.length>0}function eR(e){return console.log(e),null}const tR=()=>{const e=je.c(18);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=["Authorization"],e[0]=t):t=e[0];const[,,n]=o0(t),{msalScopes:r,msalExtraScopes:i}=v.useContext(Yd),{instance:o,inProgress:a}=d1.useMsal(),s=d1.useIsAuthenticated();let l;e[1]!==s?(l=()=>s,e[1]=s,e[2]=l):l=e[2];const c=l;let u;e[3]!==c||e[4]!==a?(u=()=>!c()&&a!==wT.InteractionStatus.None,e[3]=c,e[4]=a,e[5]=u):u=e[5];const d=u;let f;e[6]!==o||e[7]!==i||e[8]!==r?(f=async()=>o.loginRedirect({scopes:r,extraScopesToConsent:i}).then(nR).catch(rR),e[6]=o,e[7]=i,e[8]=r,e[9]=f):f=e[9];const h=f;let p;e[10]!==o||e[11]!==n?(p=()=>{o.logout(),localStorage.removeItem("user"),n("Authorization")},e[10]=o,e[11]=n,e[12]=p):p=e[12];const m=p;let g;return e[13]!==c||e[14]!==d||e[15]!==h||e[16]!==m?(g={isAuthenticated:c,isAuthenticating:d,login:h,logout:m},e[13]=c,e[14]=d,e[15]=h,e[16]=m,e[17]=g):g=e[17],g};function nR(){return""}function rR(){return null}const V4=()=>{const e=je.c(12),{useMsal:t}=v.useContext(Yd),n=JA(),r=tR();let i;e[0]!==n||e[1]!==r||e[2]!==t?(i=(u,d)=>t?r.login():n.login(u,d),e[0]=n,e[1]=r,e[2]=t,e[3]=i):i=e[3];const o=i,a=t?r.isAuthenticated:n.isAuthenticated;let s;e[4]!==r||e[5]!==t?(s=t?r.isAuthenticating:iR,e[4]=r,e[5]=t,e[6]=s):s=e[6];const l=t?r.logout:n.logout;let c;return e[7]!==a||e[8]!==s||e[9]!==l||e[10]!==o?(c={isAuthenticated:a,isAuthenticating:s,login:o,logout:l},e[7]=a,e[8]=s,e[9]=l,e[10]=o,e[11]=c):c=e[11],c};function iR(){return!1}const oR="_toast_1s57i_1",Ws={toast:oR},aR=e=>{switch(e){case"success":return 5e3;case"info":return 5e3;case"danger":return 1e4;case"warning":return 1e4;case"prompt":return 1e4;default:return 5e3}},tf=()=>{const e=je.c(1),t=sR;let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n={addNotification:t},e[0]=n):n=e[0],n};function sR(e,t){const n=u4(e),r=aR(t),i=y.jsxs(y.Fragment,{children:[n,y.jsx(H_,{onClick:()=>ga.dismiss(n),type:"button",style:{position:"absolute",fontSize:"12px",top:"calc(50% - 6px)",right:"8px"}})]});e:switch(t){case"success":{ga(i,{id:n,duration:r,position:"top-center",icon:y.jsx(F8,{size:12}),className:se("luminus-toast-success rounded shadow bg-success",Ws.toast)});break e}case"danger":{ga(i,{id:n,duration:r,position:"top-center",icon:y.jsx(k8,{size:12}),className:se("luminus-toast-danger rounded shadow bg-danger",Ws.toast)});break e}case"warning":{ga(i,{id:n,duration:r,position:"top-center",icon:y.jsx(_8,{size:12}),className:se("luminus-toast-warning rounded shadow bg-warning",Ws.toast)});break e}case"info":{ga(i,{id:n,duration:r,position:"top-center",icon:y.jsx(S8,{size:12}),className:se("luminus-toast-info rounded shadow bg-info",Ws.toast)});break e}case"prompt":{ga(i,{id:n,duration:r,position:"top-center",icon:y.jsx($8,{size:12}),className:se("luminus-toast-prompt rounded shadow bg-light",Ws.toast)});break e}}}const lR=Zt.CancelToken,nf=e=>{const{authenticated:t=!0,differentBaseUrl:n,silent:r=!1,customToken:i,ignoreDelegation:o,noToastOnStatus:a}={...e},{language:s,axiosOptions:l,texts:{axios:c}}=v.useContext(rn),{delegation:u}=v.useContext(i4),{getToken:d}=v.useContext(Yd),f=v.useMemo(()=>(u==null?void 0:u.id)??null,[u==null?void 0:u.id]),{addNotification:h}=tf(),{isAuthenticating:p,isAuthenticated:m}=V4(),g=v.useMemo(()=>Zt.create(l),[l]),x=v.useCallback(async b=>{var M,$,k;if(t&&!b.headers.Authorization){if(p())return Promise.reject(new Error("Authentication in progress"));if(!m())return Promise.reject(new Error("Not authenticated"));const R=i?{token:i,expiresOn:rw(new Date(Date.now()),1)}:await d();if(!R)return console.log("No bearer token"),Promise.reject(new Error("No bearer token"));if(lw(R.expiresOn))return console.log("Token expired"),Promise.reject(new Error("Token expired"));b.headers.Authorization=`Bearer ${R.token}`}f!==null&&!o&&(b.headers.DelegationId=f.toString());const S=localStorage.getItem("search-use-asterisk")!=="false";return b.headers["Search-Use-Asterisk"]=S?"true":"false",(M=b.url)!=null&&M.includes("culture=")?b.url=($=b.url)==null?void 0:$.replace(/culture=[a-z]{2}/,`culture=${s}`):b.url=`${b.url}${(k=b.url)!=null&&k.includes("?")?"&":"?"}culture=${s}`,b},[t,d,s,i,f,o,p,m]),_=v.useCallback(async b=>{var $,k;if(Zt.isCancel(b)||b.message==="Authentication in progress"||b.message==="No bearer token"||b.message==="Token expired")return Promise.reject(b);let S;if(b.response.data instanceof Blob?S=await s4(b.response.data):S=Gd(b.response.data),S.length>0){const R=S.find(T=>T.name.toLowerCase()==="others");return R?(!r&&h(R.errors,"danger"),Promise.reject(b)):(!r&&h(c.validationError,"warning"),Promise.reject(b))}const M=l4(b);return M!==null?(!r&&h(`${c.permissionError}: ${Qg(", ",...M)}`,"danger"),Promise.reject(b)):(a??[]).includes(($=b.response)==null?void 0:$.status)?Promise.reject(b):((k=b.response)==null?void 0:k.status)===403?(!r&&h(c.forbiddenError,"danger"),Promise.reject(b)):b.message&&b.message==="Network Error"?(!r&&h(c.networkError,"danger"),Promise.reject(b)):(Zt.isCancel(b)||(!r&&h(c.unexpectedError,"danger"),(b.response||b.request)&&!r&&h(c.unexpectedError,"danger")),Promise.reject(b))},[h,c.forbiddenError,c.networkError,c.permissionError,c.unexpectedError,c.validationError,r,a]),[w,C]=v.useState(!1);return v.useEffect(()=>{n&&(g.defaults.baseURL=n)},[n,g.defaults]),v.useEffect(()=>{g.interceptors.request.clear();const b=g.interceptors.request.use(x,S=>Promise.reject(S));return C(!0),console.log("useAxios: setting interceptors"),()=>{C(!1),console.log("useAxios: ejecting interceptors"),g.interceptors.request.eject(b)}},[g.interceptors.request,x]),v.useEffect(()=>{g.interceptors.response.clear();const b=g.interceptors.response.use(S=>S,_);return()=>{g.interceptors.response.eject(b)}},[g.interceptors.response,_]),g.interceptorsUsed=w,g};let ol;const a0=()=>{const e=je.c(15),{show:t,text:n,showConfirm:r,hideConfirm:i,textSm:o}=v.useContext(q_);let a;e[0]!==i?(a=()=>{i()},e[0]=i,e[1]=a):a=e[1];const s=a;let l;e[2]!==s?(l=()=>{s(),ol&&ol(!0)},e[2]=s,e[3]=l):l=e[3];const c=l;let u;e[4]!==s?(u=()=>{s(),ol&&ol(!1)},e[4]=s,e[5]=u):u=e[5];const d=u;let f;e[6]!==r?(f=async(m,g)=>(r(m,g),new Promise(cR)),e[6]=r,e[7]=f):f=e[7];const h=f;let p;return e[8]!==h||e[9]!==d||e[10]!==c||e[11]!==t||e[12]!==n||e[13]!==o?(p={confirm:h,onConfirm:c,onCancel:d,show:t,text:n,textSm:o},e[8]=h,e[9]=d,e[10]=c,e[11]=t,e[12]=n,e[13]=o,e[14]=p):p=e[14],p};function cR(e){ol=e}var wt;(function(e){e.assertEqual=i=>{};function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const o={};for(const a of i)o[a]=a;return o},e.getValidEnumValues=i=>{const o=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),a={};for(const s of o)a[s]=i[s];return e.objectValues(a)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},e.find=(i,o)=>{for(const a of i)if(o(a))return a},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(wt||(wt={}));var vm;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(vm||(vm={}));const Se=wt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),di=e=>{switch(typeof e){case"undefined":return Se.undefined;case"string":return Se.string;case"number":return Number.isNaN(e)?Se.nan:Se.number;case"boolean":return Se.boolean;case"function":return Se.function;case"bigint":return Se.bigint;case"symbol":return Se.symbol;case"object":return Array.isArray(e)?Se.array:e===null?Se.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Se.promise:typeof Map<"u"&&e instanceof Map?Se.map:typeof Set<"u"&&e instanceof Set?Se.set:typeof Date<"u"&&e instanceof Date?Se.date:Se.object;default:return Se.unknown}},he=wt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),uR=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class er extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(o){return o.message},r={_errors:[]},i=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,l=0;for(;l<a.path.length;){const c=a.path[l];l===a.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(n(a))):s[c]=s[c]||{_errors:[]},s=s[c],l++}}};return i(this),r}static assert(t){if(!(t instanceof er))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,wt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)if(i.path.length>0){const o=i.path[0];n[o]=n[o]||[],n[o].push(t(i))}else r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}er.create=e=>new er(e);const Qa=(e,t)=>{let n;switch(e.code){case he.invalid_type:e.received===Se.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case he.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,wt.jsonStringifyReplacer)}`;break;case he.unrecognized_keys:n=`Unrecognized key(s) in object: ${wt.joinValues(e.keys,", ")}`;break;case he.invalid_union:n="Invalid input";break;case he.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${wt.joinValues(e.options)}`;break;case he.invalid_enum_value:n=`Invalid enum value. Expected ${wt.joinValues(e.options)}, received '${e.received}'`;break;case he.invalid_arguments:n="Invalid function arguments";break;case he.invalid_return_type:n="Invalid function return type";break;case he.invalid_date:n="Invalid date";break;case he.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:wt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case he.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case he.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case he.custom:n="Invalid input";break;case he.invalid_intersection_types:n="Intersection results could not be merged";break;case he.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case he.not_finite:n="Number must be finite";break;default:n=t.defaultError,wt.assertNever(e)}return{message:n}};let q4=Qa;function dR(e){q4=e}function Yu(){return q4}const Gu=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],a={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let s="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)s=c(a,{data:t,defaultError:s}).message;return{...i,path:o,message:s}},fR=[];function _e(e,t){const n=Yu(),r=Gu({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Qa?void 0:Qa].filter(i=>!!i)});e.common.issues.push(r)}class On{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return He;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const o=await i.key,a=await i.value;r.push({key:o,value:a})}return On.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return He;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(r[o.value]=a.value)}return{status:t.value,value:r}}}const He=Object.freeze({status:"aborted"}),Ea=e=>({status:"dirty",value:e}),Nn=e=>({status:"valid",value:e}),bm=e=>e.status==="aborted",ym=e=>e.status==="dirty",Bo=e=>e.status==="valid",Tl=e=>typeof Promise<"u"&&e instanceof Promise;var Oe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Oe||(Oe={}));class Ur{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Tb=(e,t)=>{if(Bo(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new er(e.common.issues);return this._error=n,this._error}}};function ct(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(a,s)=>{const{message:l}=e;return a.code==="invalid_enum_value"?{message:l??s.defaultError}:typeof s.data>"u"?{message:l??r??s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:l??n??s.defaultError}},description:i}}class pt{get description(){return this._def.description}_getType(t){return di(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:di(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new On,ctx:{common:t.parent.common,data:t.data,parsedType:di(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Tl(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:di(t)},i=this._parseSync({data:t,path:r.path,parent:r});return Tb(r,i)}"~validate"(t){var r,i;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:di(t)};if(!this["~standard"].async)try{const o=this._parseSync({data:t,path:[],parent:n});return Bo(o)?{value:o.value}:{issues:n.common.issues}}catch(o){(i=(r=o==null?void 0:o.message)==null?void 0:r.toLowerCase())!=null&&i.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(o=>Bo(o)?{value:o.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:di(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(Tl(i)?i:Promise.resolve(i));return Tb(r,o)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,o)=>{const a=t(i),s=()=>o.addIssue({code:he.custom,...r(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new $r({schema:this,typeName:qe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Br.create(this,this._def)}nullable(){return Ji.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Sr.create(this)}promise(){return ts.create(this,this._def)}or(t){return El.create([this,t],this._def)}and(t){return Ol.create(this,t,this._def)}transform(t){return new $r({...ct(this._def),schema:this,typeName:qe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new jl({...ct(this._def),innerType:this,defaultValue:n,typeName:qe.ZodDefault})}brand(){return new s0({typeName:qe.ZodBranded,type:this,...ct(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Pl({...ct(this._def),innerType:this,catchValue:n,typeName:qe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return _c.create(this,t)}readonly(){return Nl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const hR=/^c[^\s-]{8,}$/i,pR=/^[0-9a-z]+$/,mR=/^[0-9A-HJKMNP-TV-Z]{26}$/i,gR=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,vR=/^[a-z0-9_-]{21}$/i,bR=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,yR=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,xR=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,wR="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ep;const _R=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,CR=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,SR=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,TR=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,$R=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,kR=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Y4="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",MR=new RegExp(`^${Y4}$`);function G4(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function ER(e){return new RegExp(`^${G4(e)}$`)}function Z4(e){let t=`${Y4}T${G4(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function OR(e,t){return!!((t==="v4"||!t)&&_R.test(e)||(t==="v6"||!t)&&SR.test(e))}function AR(e,t){if(!bR.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||"typ"in i&&(i==null?void 0:i.typ)!=="JWT"||!i.alg||t&&i.alg!==t)}catch{return!1}}function RR(e,t){return!!((t==="v4"||!t)&&CR.test(e)||(t==="v6"||!t)&&TR.test(e))}class _r extends pt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Se.string){const o=this._getOrReturnCtx(t);return _e(o,{code:he.invalid_type,expected:Se.string,received:o.parsedType}),He}const r=new On;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:he.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")t.data.length>o.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:he.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const a=t.data.length>o.value,s=t.data.length<o.value;(a||s)&&(i=this._getOrReturnCtx(t,i),a?_e(i,{code:he.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):s&&_e(i,{code:he.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")xR.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"email",code:he.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")ep||(ep=new RegExp(wR,"u")),ep.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"emoji",code:he.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")gR.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"uuid",code:he.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")vR.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"nanoid",code:he.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")hR.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"cuid",code:he.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")pR.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"cuid2",code:he.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")mR.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"ulid",code:he.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),_e(i,{validation:"url",code:he.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"regex",code:he.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(t,i),_e(i,{code:he.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(i=this._getOrReturnCtx(t,i),_e(i,{code:he.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(i=this._getOrReturnCtx(t,i),_e(i,{code:he.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?Z4(o).test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{code:he.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?MR.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{code:he.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?ER(o).test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{code:he.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?yR.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"duration",code:he.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?OR(t.data,o.version)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"ip",code:he.invalid_string,message:o.message}),r.dirty()):o.kind==="jwt"?AR(t.data,o.alg)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"jwt",code:he.invalid_string,message:o.message}),r.dirty()):o.kind==="cidr"?RR(t.data,o.version)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"cidr",code:he.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?$R.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"base64",code:he.invalid_string,message:o.message}),r.dirty()):o.kind==="base64url"?kR.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"base64url",code:he.invalid_string,message:o.message}),r.dirty()):wt.assertNever(o);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:he.invalid_string,...Oe.errToObj(r)})}_addCheck(t){return new _r({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Oe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Oe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Oe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Oe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Oe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Oe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Oe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Oe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Oe.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Oe.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Oe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Oe.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Oe.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...Oe.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Oe.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Oe.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Oe.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Oe.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Oe.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Oe.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Oe.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Oe.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Oe.errToObj(n)})}nonempty(t){return this.min(1,Oe.errToObj(t))}trim(){return new _r({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new _r({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new _r({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}_r.create=e=>new _r({checks:[],typeName:qe.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...ct(e)});function DR(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,o=Number.parseInt(e.toFixed(i).replace(".","")),a=Number.parseInt(t.toFixed(i).replace(".",""));return o%a/10**i}class Zi extends pt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Se.number){const o=this._getOrReturnCtx(t);return _e(o,{code:he.invalid_type,expected:Se.number,received:o.parsedType}),He}let r;const i=new On;for(const o of this._def.checks)o.kind==="int"?wt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),_e(r,{code:he.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:he.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:he.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?DR(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),_e(r,{code:he.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),_e(r,{code:he.not_finite,message:o.message}),i.dirty()):wt.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Oe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Oe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Oe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Oe.toString(n))}setLimit(t,n,r,i){return new Zi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Oe.toString(i)}]})}_addCheck(t){return new Zi({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Oe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Oe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Oe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Oe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Oe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Oe.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Oe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Oe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Oe.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&wt.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Zi.create=e=>new Zi({checks:[],typeName:qe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ct(e)});class Xi extends pt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Se.bigint)return this._getInvalidInput(t);let r;const i=new On;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:he.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:he.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:he.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):wt.assertNever(o);return{status:i.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return _e(n,{code:he.invalid_type,expected:Se.bigint,received:n.parsedType}),He}gte(t,n){return this.setLimit("min",t,!0,Oe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Oe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Oe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Oe.toString(n))}setLimit(t,n,r,i){return new Xi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Oe.toString(i)}]})}_addCheck(t){return new Xi({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Oe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Oe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Oe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Oe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Oe.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Xi.create=e=>new Xi({checks:[],typeName:qe.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...ct(e)});class $l extends pt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Se.boolean){const r=this._getOrReturnCtx(t);return _e(r,{code:he.invalid_type,expected:Se.boolean,received:r.parsedType}),He}return Nn(t.data)}}$l.create=e=>new $l({typeName:qe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ct(e)});class zo extends pt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Se.date){const o=this._getOrReturnCtx(t);return _e(o,{code:he.invalid_type,expected:Se.date,received:o.parsedType}),He}if(Number.isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return _e(o,{code:he.invalid_date}),He}const r=new On;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:he.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:he.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):wt.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new zo({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Oe.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Oe.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}zo.create=e=>new zo({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:qe.ZodDate,...ct(e)});class Zu extends pt{_parse(t){if(this._getType(t)!==Se.symbol){const r=this._getOrReturnCtx(t);return _e(r,{code:he.invalid_type,expected:Se.symbol,received:r.parsedType}),He}return Nn(t.data)}}Zu.create=e=>new Zu({typeName:qe.ZodSymbol,...ct(e)});class kl extends pt{_parse(t){if(this._getType(t)!==Se.undefined){const r=this._getOrReturnCtx(t);return _e(r,{code:he.invalid_type,expected:Se.undefined,received:r.parsedType}),He}return Nn(t.data)}}kl.create=e=>new kl({typeName:qe.ZodUndefined,...ct(e)});class Ml extends pt{_parse(t){if(this._getType(t)!==Se.null){const r=this._getOrReturnCtx(t);return _e(r,{code:he.invalid_type,expected:Se.null,received:r.parsedType}),He}return Nn(t.data)}}Ml.create=e=>new Ml({typeName:qe.ZodNull,...ct(e)});class es extends pt{constructor(){super(...arguments),this._any=!0}_parse(t){return Nn(t.data)}}es.create=e=>new es({typeName:qe.ZodAny,...ct(e)});class Io extends pt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Nn(t.data)}}Io.create=e=>new Io({typeName:qe.ZodUnknown,...ct(e)});class _i extends pt{_parse(t){const n=this._getOrReturnCtx(t);return _e(n,{code:he.invalid_type,expected:Se.never,received:n.parsedType}),He}}_i.create=e=>new _i({typeName:qe.ZodNever,...ct(e)});class Xu extends pt{_parse(t){if(this._getType(t)!==Se.undefined){const r=this._getOrReturnCtx(t);return _e(r,{code:he.invalid_type,expected:Se.void,received:r.parsedType}),He}return Nn(t.data)}}Xu.create=e=>new Xu({typeName:qe.ZodVoid,...ct(e)});class Sr extends pt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==Se.array)return _e(n,{code:he.invalid_type,expected:Se.array,received:n.parsedType}),He;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(a||s)&&(_e(n,{code:a?he.too_big:he.too_small,minimum:s?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(_e(n,{code:he.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(_e(n,{code:he.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>i.type._parseAsync(new Ur(n,a,n.path,s)))).then(a=>On.mergeArray(r,a));const o=[...n.data].map((a,s)=>i.type._parseSync(new Ur(n,a,n.path,s)));return On.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Sr({...this._def,minLength:{value:t,message:Oe.toString(n)}})}max(t,n){return new Sr({...this._def,maxLength:{value:t,message:Oe.toString(n)}})}length(t,n){return new Sr({...this._def,exactLength:{value:t,message:Oe.toString(n)}})}nonempty(t){return this.min(1,t)}}Sr.create=(e,t)=>new Sr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:qe.ZodArray,...ct(t)});function Ma(e){if(e instanceof tn){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Br.create(Ma(r))}return new tn({...e._def,shape:()=>t})}else return e instanceof Sr?new Sr({...e._def,type:Ma(e.element)}):e instanceof Br?Br.create(Ma(e.unwrap())):e instanceof Ji?Ji.create(Ma(e.unwrap())):e instanceof Hr?Hr.create(e.items.map(t=>Ma(t))):e}class tn extends pt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=wt.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Se.object){const c=this._getOrReturnCtx(t);return _e(c,{code:he.invalid_type,expected:Se.object,received:c.parsedType}),He}const{status:r,ctx:i}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof _i&&this._def.unknownKeys==="strip"))for(const c in i.data)a.includes(c)||s.push(c);const l=[];for(const c of a){const u=o[c],d=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Ur(i,d,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof _i){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(c==="strict")s.length>0&&(_e(i,{code:he.unrecognized_keys,keys:s}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of s){const d=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Ur(i,d,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>On.mergeObjectSync(r,c)):On.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return Oe.errToObj,new tn({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,a;const i=((a=(o=this._def).errorMap)==null?void 0:a.call(o,n,r).message)??r.defaultError;return n.code==="unrecognized_keys"?{message:Oe.errToObj(t).message??i}:{message:i}}}:{}})}strip(){return new tn({...this._def,unknownKeys:"strip"})}passthrough(){return new tn({...this._def,unknownKeys:"passthrough"})}extend(t){return new tn({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new tn({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:qe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new tn({...this._def,catchall:t})}pick(t){const n={};for(const r of wt.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new tn({...this._def,shape:()=>n})}omit(t){const n={};for(const r of wt.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new tn({...this._def,shape:()=>n})}deepPartial(){return Ma(this)}partial(t){const n={};for(const r of wt.objectKeys(this.shape)){const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}return new tn({...this._def,shape:()=>n})}required(t){const n={};for(const r of wt.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Br;)o=o._def.innerType;n[r]=o}return new tn({...this._def,shape:()=>n})}keyof(){return X4(wt.objectKeys(this.shape))}}tn.create=(e,t)=>new tn({shape:()=>e,unknownKeys:"strip",catchall:_i.create(),typeName:qe.ZodObject,...ct(t)});tn.strictCreate=(e,t)=>new tn({shape:()=>e,unknownKeys:"strict",catchall:_i.create(),typeName:qe.ZodObject,...ct(t)});tn.lazycreate=(e,t)=>new tn({shape:e,unknownKeys:"strip",catchall:_i.create(),typeName:qe.ZodObject,...ct(t)});class El extends pt{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(o){for(const s of o)if(s.result.status==="valid")return s.result;for(const s of o)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=o.map(s=>new er(s.ctx.common.issues));return _e(n,{code:he.invalid_union,unionErrors:a}),He}if(n.common.async)return Promise.all(r.map(async o=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let o;const a=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!o&&(o={result:u,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const s=a.map(l=>new er(l));return _e(n,{code:he.invalid_union,unionErrors:s}),He}}get options(){return this._def.options}}El.create=(e,t)=>new El({options:e,typeName:qe.ZodUnion,...ct(t)});const ai=e=>e instanceof Rl?ai(e.schema):e instanceof $r?ai(e.innerType()):e instanceof Dl?[e.value]:e instanceof Ki?e.options:e instanceof Il?wt.objectValues(e.enum):e instanceof jl?ai(e._def.innerType):e instanceof kl?[void 0]:e instanceof Ml?[null]:e instanceof Br?[void 0,...ai(e.unwrap())]:e instanceof Ji?[null,...ai(e.unwrap())]:e instanceof s0||e instanceof Nl?ai(e.unwrap()):e instanceof Pl?ai(e._def.innerType):[];class rf extends pt{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Se.object)return _e(n,{code:he.invalid_type,expected:Se.object,received:n.parsedType}),He;const r=this.discriminator,i=n.data[r],o=this.optionsMap.get(i);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(_e(n,{code:he.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),He)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const o of n){const a=ai(o.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,o)}}return new rf({typeName:qe.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...ct(r)})}}function xm(e,t){const n=di(e),r=di(t);if(e===t)return{valid:!0,data:e};if(n===Se.object&&r===Se.object){const i=wt.objectKeys(t),o=wt.objectKeys(e).filter(s=>i.indexOf(s)!==-1),a={...e,...t};for(const s of o){const l=xm(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===Se.array&&r===Se.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let o=0;o<e.length;o++){const a=e[o],s=t[o],l=xm(a,s);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return n===Se.date&&r===Se.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Ol extends pt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(o,a)=>{if(bm(o)||bm(a))return He;const s=xm(o.value,a.value);return s.valid?((ym(o)||ym(a))&&n.dirty(),{status:n.value,value:s.data}):(_e(r,{code:he.invalid_intersection_types}),He)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Ol.create=(e,t,n)=>new Ol({left:e,right:t,typeName:qe.ZodIntersection,...ct(n)});class Hr extends pt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Se.array)return _e(r,{code:he.invalid_type,expected:Se.array,received:r.parsedType}),He;if(r.data.length<this._def.items.length)return _e(r,{code:he.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),He;!this._def.rest&&r.data.length>this._def.items.length&&(_e(r,{code:he.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((a,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new Ur(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>On.mergeArray(n,a)):On.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new Hr({...this._def,rest:t})}}Hr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Hr({items:e,typeName:qe.ZodTuple,rest:null,...ct(t)})};class Al extends pt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Se.object)return _e(r,{code:he.invalid_type,expected:Se.object,received:r.parsedType}),He;const i=[],o=this._def.keyType,a=this._def.valueType;for(const s in r.data)i.push({key:o._parse(new Ur(r,s,r.path,s)),value:a._parse(new Ur(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?On.mergeObjectAsync(n,i):On.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof pt?new Al({keyType:t,valueType:n,typeName:qe.ZodRecord,...ct(r)}):new Al({keyType:_r.create(),valueType:t,typeName:qe.ZodRecord,...ct(n)})}}class Ku extends pt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Se.map)return _e(r,{code:he.invalid_type,expected:Se.map,received:r.parsedType}),He;const i=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:i._parse(new Ur(r,s,r.path,[c,"key"])),value:o._parse(new Ur(r,l,r.path,[c,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of a){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return He;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const l of a){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return He;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}Ku.create=(e,t,n)=>new Ku({valueType:t,keyType:e,typeName:qe.ZodMap,...ct(n)});class Wo extends pt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Se.set)return _e(r,{code:he.invalid_type,expected:Se.set,received:r.parsedType}),He;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(_e(r,{code:he.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(_e(r,{code:he.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const o=this._def.valueType;function a(l){const c=new Set;for(const u of l){if(u.status==="aborted")return He;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const s=[...r.data.values()].map((l,c)=>o._parse(new Ur(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new Wo({...this._def,minSize:{value:t,message:Oe.toString(n)}})}max(t,n){return new Wo({...this._def,maxSize:{value:t,message:Oe.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Wo.create=(e,t)=>new Wo({valueType:e,minSize:null,maxSize:null,typeName:qe.ZodSet,...ct(t)});class ja extends pt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Se.function)return _e(n,{code:he.invalid_type,expected:Se.function,received:n.parsedType}),He;function r(s,l){return Gu({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Yu(),Qa].filter(c=>!!c),issueData:{code:he.invalid_arguments,argumentsError:l}})}function i(s,l){return Gu({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Yu(),Qa].filter(c=>!!c),issueData:{code:he.invalid_return_type,returnTypeError:l}})}const o={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof ts){const s=this;return Nn(async function(...l){const c=new er([]),u=await s._def.args.parseAsync(l,o).catch(h=>{throw c.addIssue(r(l,h)),c}),d=await Reflect.apply(a,this,u);return await s._def.returns._def.type.parseAsync(d,o).catch(h=>{throw c.addIssue(i(d,h)),c})})}else{const s=this;return Nn(function(...l){const c=s._def.args.safeParse(l,o);if(!c.success)throw new er([r(l,c.error)]);const u=Reflect.apply(a,this,c.data),d=s._def.returns.safeParse(u,o);if(!d.success)throw new er([i(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new ja({...this._def,args:Hr.create(t).rest(Io.create())})}returns(t){return new ja({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new ja({args:t||Hr.create([]).rest(Io.create()),returns:n||Io.create(),typeName:qe.ZodFunction,...ct(r)})}}class Rl extends pt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Rl.create=(e,t)=>new Rl({getter:e,typeName:qe.ZodLazy,...ct(t)});class Dl extends pt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return _e(n,{received:n.data,code:he.invalid_literal,expected:this._def.value}),He}return{status:"valid",value:t.data}}get value(){return this._def.value}}Dl.create=(e,t)=>new Dl({value:e,typeName:qe.ZodLiteral,...ct(t)});function X4(e,t){return new Ki({values:e,typeName:qe.ZodEnum,...ct(t)})}class Ki extends pt{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return _e(n,{expected:wt.joinValues(r),received:n.parsedType,code:he.invalid_type}),He}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return _e(n,{received:n.data,code:he.invalid_enum_value,options:r}),He}return Nn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Ki.create(t,{...this._def,...n})}exclude(t,n=this._def){return Ki.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ki.create=X4;class Il extends pt{_parse(t){const n=wt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Se.string&&r.parsedType!==Se.number){const i=wt.objectValues(n);return _e(r,{expected:wt.joinValues(i),received:r.parsedType,code:he.invalid_type}),He}if(this._cache||(this._cache=new Set(wt.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const i=wt.objectValues(n);return _e(r,{received:r.data,code:he.invalid_enum_value,options:i}),He}return Nn(t.data)}get enum(){return this._def.values}}Il.create=(e,t)=>new Il({values:e,typeName:qe.ZodNativeEnum,...ct(t)});class ts extends pt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Se.promise&&n.common.async===!1)return _e(n,{code:he.invalid_type,expected:Se.promise,received:n.parsedType}),He;const r=n.parsedType===Se.promise?n.data:Promise.resolve(n.data);return Nn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}ts.create=(e,t)=>new ts({type:e,typeName:qe.ZodPromise,...ct(t)});class $r extends pt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===qe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,o={addIssue:a=>{_e(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){const a=i.transform(r.data,o);if(r.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return He;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?He:l.status==="dirty"||n.value==="dirty"?Ea(l.value):l});{if(n.value==="aborted")return He;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?He:s.status==="dirty"||n.value==="dirty"?Ea(s.value):s}}if(i.type==="refinement"){const a=s=>{const l=i.refinement(s,o);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?He:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?He:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Bo(a))return He;const s=i.transform(a.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>Bo(a)?Promise.resolve(i.transform(a.value,o)).then(s=>({status:n.value,value:s})):He);wt.assertNever(i)}}$r.create=(e,t,n)=>new $r({schema:e,typeName:qe.ZodEffects,effect:t,...ct(n)});$r.createWithPreprocess=(e,t,n)=>new $r({schema:t,effect:{type:"preprocess",transform:e},typeName:qe.ZodEffects,...ct(n)});class Br extends pt{_parse(t){return this._getType(t)===Se.undefined?Nn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Br.create=(e,t)=>new Br({innerType:e,typeName:qe.ZodOptional,...ct(t)});class Ji extends pt{_parse(t){return this._getType(t)===Se.null?Nn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ji.create=(e,t)=>new Ji({innerType:e,typeName:qe.ZodNullable,...ct(t)});class jl extends pt{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Se.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}jl.create=(e,t)=>new jl({innerType:e,typeName:qe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ct(t)});class Pl extends pt{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Tl(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new er(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new er(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Pl.create=(e,t)=>new Pl({innerType:e,typeName:qe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ct(t)});class Ju extends pt{_parse(t){if(this._getType(t)!==Se.nan){const r=this._getOrReturnCtx(t);return _e(r,{code:he.invalid_type,expected:Se.nan,received:r.parsedType}),He}return{status:"valid",value:t.data}}}Ju.create=e=>new Ju({typeName:qe.ZodNaN,...ct(e)});const IR=Symbol("zod_brand");class s0 extends pt{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class _c extends pt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?He:o.status==="dirty"?(n.dirty(),Ea(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?He:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new _c({in:t,out:n,typeName:qe.ZodPipeline})}}class Nl extends pt{_parse(t){const n=this._def.innerType._parse(t),r=i=>(Bo(i)&&(i.value=Object.freeze(i.value)),i);return Tl(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}Nl.create=(e,t)=>new Nl({innerType:e,typeName:qe.ZodReadonly,...ct(t)});function $b(e,t){const n=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof n=="string"?{message:n}:n}function K4(e,t={},n){return e?es.create().superRefine((r,i)=>{const o=e(r);if(o instanceof Promise)return o.then(a=>{if(!a){const s=$b(t,r),l=s.fatal??n??!0;i.addIssue({code:"custom",...s,fatal:l})}});if(!o){const a=$b(t,r),s=a.fatal??n??!0;i.addIssue({code:"custom",...a,fatal:s})}}):es.create()}const jR={object:tn.lazycreate};var qe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(qe||(qe={}));const PR=(e,t={message:`Input not instance of ${e.name}`})=>K4(n=>n instanceof e,t),l0=_r.create,J4=Zi.create,NR=Ju.create,LR=Xi.create,Q4=$l.create,FR=zo.create,BR=Zu.create,zR=kl.create,WR=Ml.create,eC=es.create,UR=Io.create,HR=_i.create,VR=Xu.create,tC=Sr.create,hi=tn.create,qR=tn.strictCreate,YR=El.create,GR=rf.create,ZR=Ol.create,XR=Hr.create,KR=Al.create,JR=Ku.create,QR=Wo.create,e9=ja.create,t9=Rl.create,n9=Dl.create,nC=Ki.create,r9=Il.create,i9=ts.create,kb=$r.create,o9=Br.create,a9=Ji.create,rC=$r.createWithPreprocess,s9=_c.create,l9=()=>l0().optional(),c9=()=>J4().optional(),u9=()=>Q4().optional(),al={string:e=>_r.create({...e,coerce:!0}),number:e=>Zi.create({...e,coerce:!0}),boolean:e=>$l.create({...e,coerce:!0}),bigint:e=>Xi.create({...e,coerce:!0}),date:e=>zo.create({...e,coerce:!0})},d9=He,sl=Object.freeze(Object.defineProperty({__proto__:null,BRAND:IR,DIRTY:Ea,EMPTY_PATH:fR,INVALID:He,NEVER:d9,OK:Nn,ParseStatus:On,Schema:pt,ZodAny:es,ZodArray:Sr,ZodBigInt:Xi,ZodBoolean:$l,ZodBranded:s0,ZodCatch:Pl,ZodDate:zo,ZodDefault:jl,ZodDiscriminatedUnion:rf,ZodEffects:$r,ZodEnum:Ki,ZodError:er,get ZodFirstPartyTypeKind(){return qe},ZodFunction:ja,ZodIntersection:Ol,ZodIssueCode:he,ZodLazy:Rl,ZodLiteral:Dl,ZodMap:Ku,ZodNaN:Ju,ZodNativeEnum:Il,ZodNever:_i,ZodNull:Ml,ZodNullable:Ji,ZodNumber:Zi,ZodObject:tn,ZodOptional:Br,ZodParsedType:Se,ZodPipeline:_c,ZodPromise:ts,ZodReadonly:Nl,ZodRecord:Al,ZodSchema:pt,ZodSet:Wo,ZodString:_r,ZodSymbol:Zu,ZodTransformer:$r,ZodTuple:Hr,ZodType:pt,ZodUndefined:kl,ZodUnion:El,ZodUnknown:Io,ZodVoid:Xu,addIssueToContext:_e,any:eC,array:tC,bigint:LR,boolean:Q4,coerce:al,custom:K4,date:FR,datetimeRegex:Z4,defaultErrorMap:Qa,discriminatedUnion:GR,effect:kb,enum:nC,function:e9,getErrorMap:Yu,getParsedType:di,instanceof:PR,intersection:ZR,isAborted:bm,isAsync:Tl,isDirty:ym,isValid:Bo,late:jR,lazy:t9,literal:n9,makeIssue:Gu,map:JR,nan:NR,nativeEnum:r9,never:HR,null:WR,nullable:a9,number:J4,object:hi,get objectUtil(){return vm},oboolean:u9,onumber:c9,optional:o9,ostring:l9,pipeline:s9,preprocess:rC,promise:i9,quotelessJson:uR,record:KR,set:QR,setErrorMap:dR,strictObject:qR,string:l0,symbol:BR,transformer:kb,tuple:XR,undefined:zR,union:YR,unknown:UR,get util(){return wt},void:VR},Symbol.toStringTag,{value:"Module"})),of=()=>{const e=je.c(43),{texts:t}=v.useContext(rn),{formValidation:n}=t;let r;e[0]!==n?(r=(O,L)=>{const z=L===void 0?!1:L;let N=(O!=null&&O.useCoerce?al:sl).string({invalid_type_error:n.required,required_error:n.required});return z||(N=N.min(1,n.required)),O!=null&&O.email&&(N=N.email(n.invalidEmail)),O!=null&&O.length&&(N=N.min(O.length,n.length(O.length))),O!=null&&O.minLength&&(N=N.min(O.minLength,n.minLength(O.minLength))),O!=null&&O.maxLength&&(N=N.max(O.maxLength,n.maxLength(O.maxLength))),O!=null&&O.numeric&&(N=N.regex(/^\d+$/,n.noCharactersOtherThanNumbers)),O!=null&&O.regex&&(N=N.regex(O.regex,n.invalidFormat)),N.transform(f9)},e[0]=n,e[1]=r):r=e[1];const i=r;let o;e[2]!==i?(o=O=>i(O,!1),e[2]=i,e[3]=o):o=e[3];const a=o;let s;e[4]!==i?(s=O=>i(O,!0).nullable().optional().transform(h9),e[4]=i,e[5]=s):s=e[5];const l=s;let c;e[6]!==n?(c=O=>{const L=(O==null?void 0:O.min)??Number.MIN_SAFE_INTEGER,z=(O==null?void 0:O.max)??Number.MAX_SAFE_INTEGER,N=(O!=null&&O.useCoerce?al:sl).number({invalid_type_error:n.required,required_error:n.required}).min(L,n.lessThanMin(L)).max(z,n.moreThanMax(z));return N.transform(p9),N},e[6]=n,e[7]=c):c=e[7];const u=c;let d;e[8]!==u?(d=O=>u(O).nullable().optional().transform(m9),e[8]=u,e[9]=d):d=e[9];const f=d;let h;e[10]!==n.required?(h=O=>((O==null?void 0:O.useCoerce)===!1?sl:al).boolean({invalid_type_error:n.required,required_error:n.required}).transform(g9),e[10]=n.required,e[11]=h):h=e[11];const p=h;let m;e[12]!==n.invalidDate||e[13]!==n.required?(m=O=>(O!=null&&O.useCoerce?al:sl).string({invalid_type_error:n.required,required_error:n.required}).refine(h4,{message:n.invalidDate}).transform(v9),e[12]=n.invalidDate,e[13]=n.required,e[14]=m):m=e[14];const g=m;let x;e[15]!==g?(x=O=>rC(b9,g(O).nullable().optional()).transform(y9),e[15]=g,e[16]=x):x=e[16];const _=x;let w;e[17]!==n.required?(w=(O,L)=>nC(O,{invalid_type_error:n.required,required_error:n.required}).transform(x9),e[17]=n.required,e[18]=w):w=e[18];const C=w;let b;e[19]!==C?(b=(O,L)=>C(O,L).nullable().transform(w9),e[19]=C,e[20]=b):b=e[20];const S=b;let M;e[21]!==f?(M=O=>hi({id:f({useCoerce:!0})}).nullable().transform(_9),e[21]=f,e[22]=M):M=e[22];const $=M;let k;e[23]!==u?(k=O=>hi({id:u()}).transform(C9),e[23]=u,e[24]=k):k=e[24];const R=k;let T;e[25]!==l?(T=O=>hi({id:l({useCoerce:!0})}).nullable().transform(S9),e[25]=l,e[26]=T):T=e[26];const E=T;let A;e[27]!==a?(A=O=>hi({id:a()}).transform(T9),e[27]=a,e[28]=A):A=e[28];const I=A,j=k9;let D;return e[29]!==p||e[30]!==_||e[31]!==g||e[32]!==S||e[33]!==C||e[34]!==f||e[35]!==u||e[36]!==$||e[37]!==R||e[38]!==E||e[39]!==I||e[40]!==l||e[41]!==a?(D={zString:l,zStringRequired:a,zNumber:f,zNumberRequired:u,zBool:p,zDate:_,zDateRequired:g,zEnum:S,zEnumRequired:C,zObjectIdInt:$,zObjectIdIntRequired:R,zObjectIdStr:E,zObjectIdStrRequired:I,zFile:j},e[29]=p,e[30]=_,e[31]=g,e[32]=S,e[33]=C,e[34]=f,e[35]=u,e[36]=$,e[37]=R,e[38]=E,e[39]=I,e[40]=l,e[41]=a,e[42]=D):D=e[42],D};function f9(e){return e??null}function h9(e){return e??null}function p9(e){return e??null}function m9(e){return e??null}function g9(e){return e??null}function v9(e){return e??null}function b9(e){return e===""?null:e}function y9(e){return e??null}function x9(e){return e??null}function w9(e){return e??null}function _9(e){return e??null}function C9(e){return e??null}function S9(e){return e??null}function T9(e){return e??null}function $9(e){return Array.from(e??[])}function k9(e){const{required:t,multiple:n,maxFileSize:r}=e;return eC().transform($9).refine(o=>!t||(o==null?void 0:o.length)>0,"File is required.").refine(o=>n||(o==null?void 0:o.length)<=1,"Multiple files not allowed.").refine(o=>o.every(a=>a.size<=r),`Maximum file size is ${Xa(r)}.`).transform(o=>(n?o:o==null?void 0:o[0])??null)}const iC=(e,t)=>{const n=je.c(4);let r,i;n[0]!==t||n[1]!==e?(r=()=>{const o=a=>{e.some(s=>s.current&&s.current.contains(a.target))||t()};return document.addEventListener("mouseup",o),()=>{document.removeEventListener("mouseup",o)}},i=[e,t],n[0]=t,n[1]=e,n[2]=r,n[3]=i):(r=n[2],i=n[3]),v.useEffect(r,i)},oC=()=>{const e=je.c(4),{user:t}=v.useContext(r4);let n;e[0]!==(t==null?void 0:t.permissions)?(n=(o,a)=>{const s=a===void 0?"any":a;return o.length===0?!0:s==="any"?o.some(l=>{var c;return(c=t==null?void 0:t.permissions)==null?void 0:c.includes(l)}):o.every(l=>{var c;return(c=t==null?void 0:t.permissions)==null?void 0:c.includes(l)})},e[0]=t==null?void 0:t.permissions,e[1]=n):n=e[1];const r=n;let i;return e[2]!==r?(i={checkUserHasPermissions:r},e[2]=r,e[3]=i):i=e[3],i},aC=(e,t)=>{const n=je.c(6);let r,i;n[0]!==e?(r=()=>(document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}),i=[e],n[0]=e,n[1]=r,n[2]=i):(r=n[1],i=n[2]),v.useEffect(r,i);let o,a;n[3]!==t?(o=()=>t===void 0?M9:(document.addEventListener("keyup",t),()=>{document.removeEventListener("keyup",t)}),a=[t],n[3]=t,n[4]=o,n[5]=a):(o=n[4],a=n[5]),v.useEffect(o,a)};function M9(){}const c0=(e,t,n)=>{let r;e:{if(n){r=e;break e}if(e!=="date"&&e!=="datetime-local"&&e!=="time"){r=e;break e}if(!t){r="text";break e}r=e}return r},sC=()=>{const{addNotification:e}=tf(),{texts:{clipboard:t}}=v.useContext(rn);return{copyToClipboard:v.useCallback(async r=>{var i;try{await((i=navigator.clipboard)==null?void 0:i.writeText(r)),e(t.copySuccess(r),"prompt")}catch(o){console.error(o),e(t.copyError,"danger")}},[e,t])}},Cc=()=>{const e=je.c(7),[t,n]=v.useState(window.innerWidth),[r,i]=v.useState(window.innerHeight);let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{n(window.innerWidth),i(window.innerHeight)},e[0]=o):o=e[0];const a=o;let s,l;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=()=>(window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)),l=[],e[1]=s,e[2]=l):(s=e[1],l=e[2]),v.useEffect(s,l);const c=t<992;let u;return e[3]!==r||e[4]!==c||e[5]!==t?(u={width:t,height:r,isMobile:c},e[3]=r,e[4]=c,e[5]=t,e[6]=u):u=e[6],u},lC=v.createContext({addHelmet:e=>{},removeHelmet:()=>{}}),cC=v.createContext(void 0),Mb={falseIfNotInit:!1},af=e=>{const{falseIfNotInit:t}=e===void 0?Mb:e,n=t===void 0?Mb.falseIfNotInit:t,r=v.useContext(cC);if(!n&&r===void 0)throw new Error("FormDisabledProvider not initilized. Probably tried to use useFormDisabledContext outside FormDisabledProvider.");return r??!1};class E9 extends Error{constructor(t,n){const r=new.target.prototype;super(`${t}: Status code '${n}'`),this.statusCode=n,this.__proto__=r}}class O9 extends Error{constructor(t="A timeout occurred."){const n=new.target.prototype;super(t),this.__proto__=n}}class wm extends Error{constructor(t="An abort occurred."){const n=new.target.prototype;super(t),this.__proto__=n}}class A9 extends Error{constructor(t,n){const r=new.target.prototype;super(t),this.transport=n,this.errorType="UnsupportedTransportError",this.__proto__=r}}class R9 extends Error{constructor(t,n){const r=new.target.prototype;super(t),this.transport=n,this.errorType="DisabledTransportError",this.__proto__=r}}class D9 extends Error{constructor(t,n){const r=new.target.prototype;super(t),this.transport=n,this.errorType="FailedToStartTransportError",this.__proto__=r}}class I9 extends Error{constructor(t){const n=new.target.prototype;super(t),this.errorType="FailedToNegotiateWithServerError",this.__proto__=n}}class j9 extends Error{constructor(t,n){const r=new.target.prototype;super(t),this.innerErrors=n,this.__proto__=r}}exports.LogLevel=void 0;(function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"})(exports.LogLevel||(exports.LogLevel={}));class Qu{constructor(){}log(t,n){}}Qu.instance=new Qu;const P9="10.0.0";class ku{static isRequired(t,n){if(t==null)throw new Error(`The '${n}' argument is required.`)}static isNotEmpty(t,n){if(!t||t.match(/^\s*$/))throw new Error(`The '${n}' argument should not be empty.`)}static isIn(t,n,r){if(!(t in n))throw new Error(`Unknown ${r} value: ${t}.`)}}class Tr{static get isBrowser(){return!Tr.isNode&&typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return!Tr.isNode&&typeof self=="object"&&"importScripts"in self}static get isReactNative(){return!Tr.isNode&&typeof window=="object"&&typeof window.document>"u"}static get isNode(){return typeof process<"u"&&process.release&&process.release.name==="node"}}function uC(e,t){let n="";return ns(e)?(n=`Binary data of length ${e.byteLength}`,t&&(n+=`. Content: '${N9(e)}'`)):typeof e=="string"&&(n=`String data of length ${e.length}`,t&&(n+=`. Content: '${e}'`)),n}function N9(e){const t=new Uint8Array(e);let n="";return t.forEach(r=>{const i=r<16?"0":"";n+=`0x${i}${r.toString(16)} `}),n.substring(0,n.length-1)}function ns(e){return e&&typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||e.constructor&&e.constructor.name==="ArrayBuffer")}async function L9(e,t,n,r,i,o){const a={},[s,l]=dC();a[s]=l,e.log(exports.LogLevel.Trace,`(${t} transport) sending data. ${uC(i,o.logMessageContent)}.`);const c=ns(i)?"arraybuffer":"text",u=await n.post(r,{content:i,headers:{...a,...o.headers},responseType:c,timeout:o.timeout,withCredentials:o.withCredentials});e.log(exports.LogLevel.Trace,`(${t} transport) request complete. Response status: ${u.statusCode}.`)}function F9(e){return e===void 0?new _m(exports.LogLevel.Information):e===null?Qu.instance:e.log!==void 0?e:new _m(e)}class B9{constructor(t,n){this._subject=t,this._observer=n}dispose(){const t=this._subject.observers.indexOf(this._observer);t>-1&&this._subject.observers.splice(t,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(n=>{})}}class _m{constructor(t){this._minLevel=t,this.out=console}log(t,n){if(t>=this._minLevel){const r=`[${new Date().toISOString()}] ${exports.LogLevel[t]}: ${n}`;switch(t){case exports.LogLevel.Critical:case exports.LogLevel.Error:this.out.error(r);break;case exports.LogLevel.Warning:this.out.warn(r);break;case exports.LogLevel.Information:this.out.info(r);break;default:this.out.log(r);break}}}}function dC(){let e="X-SignalR-User-Agent";return Tr.isNode&&(e="User-Agent"),[e,z9(P9,W9(),H9(),U9())]}function z9(e,t,n,r){let i="Microsoft SignalR/";const o=e.split(".");return i+=`${o[0]}.${o[1]}`,i+=` (${e}; `,t&&t!==""?i+=`${t}; `:i+="Unknown OS; ",i+=`${n}`,r?i+=`; ${r}`:i+="; Unknown Runtime Version",i+=")",i}function W9(){if(Tr.isNode)switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}else return""}function U9(){if(Tr.isNode)return process.versions.node}function H9(){return Tr.isNode?"NodeJS":"Browser"}function tp(e){return e.stack?e.stack:e.message?e.message:`${e}`}function V9(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("could not find global")}class cr{static write(t){return`${t}${cr.RecordSeparator}`}static parse(t){if(t[t.length-1]!==cr.RecordSeparator)throw new Error("Message is incomplete.");const n=t.split(cr.RecordSeparator);return n.pop(),n}}cr.RecordSeparatorCode=30;cr.RecordSeparator=String.fromCharCode(cr.RecordSeparatorCode);class q9{writeHandshakeRequest(t){return cr.write(JSON.stringify(t))}parseHandshakeResponse(t){let n,r;if(ns(t)){const s=new Uint8Array(t),l=s.indexOf(cr.RecordSeparatorCode);if(l===-1)throw new Error("Message is incomplete.");const c=l+1;n=String.fromCharCode.apply(null,Array.prototype.slice.call(s.slice(0,c))),r=s.byteLength>c?s.slice(c).buffer:null}else{const s=t,l=s.indexOf(cr.RecordSeparator);if(l===-1)throw new Error("Message is incomplete.");const c=l+1;n=s.substring(0,c),r=s.length>c?s.substring(c):null}const i=cr.parse(n),o=JSON.parse(i[0]);if(o.type)throw new Error("Expected a handshake response from the server.");return[r,o]}}exports.MessageType=void 0;(function(e){e[e.Invocation=1]="Invocation",e[e.StreamItem=2]="StreamItem",e[e.Completion=3]="Completion",e[e.StreamInvocation=4]="StreamInvocation",e[e.CancelInvocation=5]="CancelInvocation",e[e.Ping=6]="Ping",e[e.Close=7]="Close",e[e.Ack=8]="Ack",e[e.Sequence=9]="Sequence"})(exports.MessageType||(exports.MessageType={}));class Y9{constructor(){this.observers=[]}next(t){for(const n of this.observers)n.next(t)}error(t){for(const n of this.observers)n.error&&n.error(t)}complete(){for(const t of this.observers)t.complete&&t.complete()}subscribe(t){return this.observers.push(t),new B9(this,t)}}class G9{constructor(t,n,r){this._bufferSize=1e5,this._messages=[],this._totalMessageCount=0,this._waitForSequenceMessage=!1,this._nextReceivingSequenceId=1,this._latestReceivedSequenceId=0,this._bufferedByteCount=0,this._reconnectInProgress=!1,this._protocol=t,this._connection=n,this._bufferSize=r}async _send(t){const n=this._protocol.writeMessage(t);let r=Promise.resolve();if(this._isInvocationMessage(t)){this._totalMessageCount++;let i=()=>{},o=()=>{};ns(n)?this._bufferedByteCount+=n.byteLength:this._bufferedByteCount+=n.length,this._bufferedByteCount>=this._bufferSize&&(r=new Promise((a,s)=>{i=a,o=s})),this._messages.push(new Z9(n,this._totalMessageCount,i,o))}try{this._reconnectInProgress||await this._connection.send(n)}catch{this._disconnected()}await r}_ack(t){let n=-1;for(let r=0;r<this._messages.length;r++){const i=this._messages[r];if(i._id<=t.sequenceId)n=r,ns(i._message)?this._bufferedByteCount-=i._message.byteLength:this._bufferedByteCount-=i._message.length,i._resolver();else if(this._bufferedByteCount<this._bufferSize)i._resolver();else break}n!==-1&&(this._messages=this._messages.slice(n+1))}_shouldProcessMessage(t){if(this._waitForSequenceMessage)return t.type!==exports.MessageType.Sequence?!1:(this._waitForSequenceMessage=!1,!0);if(!this._isInvocationMessage(t))return!0;const n=this._nextReceivingSequenceId;return this._nextReceivingSequenceId++,n<=this._latestReceivedSequenceId?(n===this._latestReceivedSequenceId&&this._ackTimer(),!1):(this._latestReceivedSequenceId=n,this._ackTimer(),!0)}_resetSequence(t){if(t.sequenceId>this._nextReceivingSequenceId){this._connection.stop(new Error("Sequence ID greater than amount of messages we've received."));return}this._nextReceivingSequenceId=t.sequenceId}_disconnected(){this._reconnectInProgress=!0,this._waitForSequenceMessage=!0}async _resend(){const t=this._messages.length!==0?this._messages[0]._id:this._totalMessageCount+1;await this._connection.send(this._protocol.writeMessage({type:exports.MessageType.Sequence,sequenceId:t}));const n=this._messages;for(const r of n)await this._connection.send(r._message);this._reconnectInProgress=!1}_dispose(t){t??(t=new Error("Unable to reconnect to server."));for(const n of this._messages)n._rejector(t)}_isInvocationMessage(t){switch(t.type){case exports.MessageType.Invocation:case exports.MessageType.StreamItem:case exports.MessageType.Completion:case exports.MessageType.StreamInvocation:case exports.MessageType.CancelInvocation:return!0;case exports.MessageType.Close:case exports.MessageType.Sequence:case exports.MessageType.Ping:case exports.MessageType.Ack:return!1}}_ackTimer(){this._ackTimerHandle===void 0&&(this._ackTimerHandle=setTimeout(async()=>{try{this._reconnectInProgress||await this._connection.send(this._protocol.writeMessage({type:exports.MessageType.Ack,sequenceId:this._latestReceivedSequenceId}))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0},1e3))}}class Z9{constructor(t,n,r,i){this._message=t,this._id=n,this._resolver=r,this._rejector=i}}const X9=30*1e3,K9=15*1e3,J9=1e5;exports.HubConnectionState=void 0;(function(e){e.Disconnected="Disconnected",e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Reconnecting="Reconnecting"})(exports.HubConnectionState||(exports.HubConnectionState={}));class u0{static create(t,n,r,i,o,a,s){return new u0(t,n,r,i,o,a,s)}constructor(t,n,r,i,o,a,s){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(exports.LogLevel.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},ku.isRequired(t,"connection"),ku.isRequired(n,"logger"),ku.isRequired(r,"protocol"),this.serverTimeoutInMilliseconds=o??X9,this.keepAliveIntervalInMilliseconds=a??K9,this._statefulReconnectBufferSize=s??J9,this._logger=n,this._protocol=r,this.connection=t,this._reconnectPolicy=i,this._handshakeProtocol=new q9,this.connection.onreceive=l=>this._processIncomingData(l),this.connection.onclose=l=>this._connectionClosed(l),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=exports.HubConnectionState.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:exports.MessageType.Ping})}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(t){if(this._connectionState!==exports.HubConnectionState.Disconnected&&this._connectionState!==exports.HubConnectionState.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!t)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=t}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}async _startWithStateTransitions(){if(this._connectionState!==exports.HubConnectionState.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=exports.HubConnectionState.Connecting,this._logger.log(exports.LogLevel.Debug,"Starting HubConnection.");try{await this._startInternal(),Tr.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=exports.HubConnectionState.Connected,this._connectionStarted=!0,this._logger.log(exports.LogLevel.Debug,"HubConnection connected successfully.")}catch(t){return this._connectionState=exports.HubConnectionState.Disconnected,this._logger.log(exports.LogLevel.Debug,`HubConnection failed to start successfully because of error '${t}'.`),Promise.reject(t)}}async _startInternal(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;const t=new Promise((n,r)=>{this._handshakeResolver=n,this._handshakeRejecter=r});await this.connection.start(this._protocol.transferFormat);try{let n=this._protocol.version;this.connection.features.reconnect||(n=1);const r={protocol:this._protocol.name,version:n};if(this._logger.log(exports.LogLevel.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(r)),this._logger.log(exports.LogLevel.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),await t,this._stopDuringStartError)throw this._stopDuringStartError;(this.connection.features.reconnect||!1)&&(this._messageBuffer=new G9(this._protocol,this.connection,this._statefulReconnectBufferSize),this.connection.features.disconnected=this._messageBuffer._disconnected.bind(this._messageBuffer),this.connection.features.resend=()=>{if(this._messageBuffer)return this._messageBuffer._resend()}),this.connection.features.inherentKeepAlive||await this._sendMessage(this._cachedPingMessage)}catch(n){throw this._logger.log(exports.LogLevel.Debug,`Hub handshake failed with error '${n}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(n),n}}async stop(){const t=this._startPromise;this.connection.features.reconnect=!1,this._stopPromise=this._stopInternal(),await this._stopPromise;try{await t}catch{}}_stopInternal(t){if(this._connectionState===exports.HubConnectionState.Disconnected)return this._logger.log(exports.LogLevel.Debug,`Call to HubConnection.stop(${t}) ignored because it is already in the disconnected state.`),Promise.resolve();if(this._connectionState===exports.HubConnectionState.Disconnecting)return this._logger.log(exports.LogLevel.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;const n=this._connectionState;return this._connectionState=exports.HubConnectionState.Disconnecting,this._logger.log(exports.LogLevel.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(exports.LogLevel.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(n===exports.HubConnectionState.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=t||new wm("The connection was stopped before the hub handshake could complete."),this.connection.stop(t))}async _sendCloseMessage(){try{await this._sendWithProtocol(this._createCloseMessage())}catch{}}stream(t,...n){const[r,i]=this._replaceStreamingParams(n),o=this._createStreamInvocation(t,n,i);let a;const s=new Y9;return s.cancelCallback=()=>{const l=this._createCancelInvocation(o.invocationId);return delete this._callbacks[o.invocationId],a.then(()=>this._sendWithProtocol(l))},this._callbacks[o.invocationId]=(l,c)=>{if(c){s.error(c);return}else l&&(l.type===exports.MessageType.Completion?l.error?s.error(new Error(l.error)):s.complete():s.next(l.item))},a=this._sendWithProtocol(o).catch(l=>{s.error(l),delete this._callbacks[o.invocationId]}),this._launchStreams(r,a),s}_sendMessage(t){return this._resetKeepAliveInterval(),this.connection.send(t)}_sendWithProtocol(t){return this._messageBuffer?this._messageBuffer._send(t):this._sendMessage(this._protocol.writeMessage(t))}send(t,...n){const[r,i]=this._replaceStreamingParams(n),o=this._sendWithProtocol(this._createInvocation(t,n,!0,i));return this._launchStreams(r,o),o}invoke(t,...n){const[r,i]=this._replaceStreamingParams(n),o=this._createInvocation(t,n,!1,i);return new Promise((s,l)=>{this._callbacks[o.invocationId]=(u,d)=>{if(d){l(d);return}else u&&(u.type===exports.MessageType.Completion?u.error?l(new Error(u.error)):s(u.result):l(new Error(`Unexpected message type: ${u.type}`)))};const c=this._sendWithProtocol(o).catch(u=>{l(u),delete this._callbacks[o.invocationId]});this._launchStreams(r,c)})}on(t,n){!t||!n||(t=t.toLowerCase(),this._methods[t]||(this._methods[t]=[]),this._methods[t].indexOf(n)===-1&&this._methods[t].push(n))}off(t,n){if(!t)return;t=t.toLowerCase();const r=this._methods[t];if(r)if(n){const i=r.indexOf(n);i!==-1&&(r.splice(i,1),r.length===0&&delete this._methods[t])}else delete this._methods[t]}onclose(t){t&&this._closedCallbacks.push(t)}onreconnecting(t){t&&this._reconnectingCallbacks.push(t)}onreconnected(t){t&&this._reconnectedCallbacks.push(t)}_processIncomingData(t){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(t=this._processHandshakeResponse(t),this._receivedHandshakeResponse=!0),t){const n=this._protocol.parseMessages(t,this._logger);for(const r of n)if(!(this._messageBuffer&&!this._messageBuffer._shouldProcessMessage(r)))switch(r.type){case exports.MessageType.Invocation:this._invokeClientMethod(r).catch(i=>{this._logger.log(exports.LogLevel.Error,`Invoke client method threw error: ${tp(i)}`)});break;case exports.MessageType.StreamItem:case exports.MessageType.Completion:{const i=this._callbacks[r.invocationId];if(i){r.type===exports.MessageType.Completion&&delete this._callbacks[r.invocationId];try{i(r)}catch(o){this._logger.log(exports.LogLevel.Error,`Stream callback threw error: ${tp(o)}`)}}break}case exports.MessageType.Ping:break;case exports.MessageType.Close:{this._logger.log(exports.LogLevel.Information,"Close message received from server.");const i=r.error?new Error("Server returned an error on close: "+r.error):void 0;r.allowReconnect===!0?this.connection.stop(i):this._stopPromise=this._stopInternal(i);break}case exports.MessageType.Ack:this._messageBuffer&&this._messageBuffer._ack(r);break;case exports.MessageType.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(r);break;default:this._logger.log(exports.LogLevel.Warning,`Invalid message type: ${r.type}.`);break}}this._resetTimeoutPeriod()}_processHandshakeResponse(t){let n,r;try{[r,n]=this._handshakeProtocol.parseHandshakeResponse(t)}catch(i){const o="Error parsing handshake response: "+i;this._logger.log(exports.LogLevel.Error,o);const a=new Error(o);throw this._handshakeRejecter(a),a}if(n.error){const i="Server returned handshake error: "+n.error;this._logger.log(exports.LogLevel.Error,i);const o=new Error(i);throw this._handshakeRejecter(o),o}else this._logger.log(exports.LogLevel.Debug,"Server handshake complete.");return this._handshakeResolver(),r}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if(!this.connection.features||!this.connection.features.inherentKeepAlive){this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds);let t=this._nextKeepAlive-new Date().getTime();if(t<0){this._connectionState===exports.HubConnectionState.Connected&&this._trySendPingMessage();return}this._pingServerHandle===void 0&&(t<0&&(t=0),this._pingServerHandle=setTimeout(async()=>{this._connectionState===exports.HubConnectionState.Connected&&await this._trySendPingMessage()},t))}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}async _invokeClientMethod(t){const n=t.target.toLowerCase(),r=this._methods[n];if(!r){this._logger.log(exports.LogLevel.Warning,`No client method with the name '${n}' found.`),t.invocationId&&(this._logger.log(exports.LogLevel.Warning,`No result given for '${n}' method and invocation ID '${t.invocationId}'.`),await this._sendWithProtocol(this._createCompletionMessage(t.invocationId,"Client didn't provide a result.",null)));return}const i=r.slice(),o=!!t.invocationId;let a,s,l;for(const c of i)try{const u=a;a=await c.apply(this,t.arguments),o&&a&&u&&(this._logger.log(exports.LogLevel.Error,`Multiple results provided for '${n}'. Sending error to server.`),l=this._createCompletionMessage(t.invocationId,"Client provided multiple results.",null)),s=void 0}catch(u){s=u,this._logger.log(exports.LogLevel.Error,`A callback for the method '${n}' threw error '${u}'.`)}l?await this._sendWithProtocol(l):o?(s?l=this._createCompletionMessage(t.invocationId,`${s}`,null):a!==void 0?l=this._createCompletionMessage(t.invocationId,null,a):(this._logger.log(exports.LogLevel.Warning,`No result given for '${n}' method and invocation ID '${t.invocationId}'.`),l=this._createCompletionMessage(t.invocationId,"Client didn't provide a result.",null)),await this._sendWithProtocol(l)):a&&this._logger.log(exports.LogLevel.Error,`Result given for '${n}' method but server is not expecting a result.`)}_connectionClosed(t){this._logger.log(exports.LogLevel.Debug,`HubConnection.connectionClosed(${t}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||t||new wm("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(t||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===exports.HubConnectionState.Disconnecting?this._completeClose(t):this._connectionState===exports.HubConnectionState.Connected&&this._reconnectPolicy?this._reconnect(t):this._connectionState===exports.HubConnectionState.Connected&&this._completeClose(t)}_completeClose(t){if(this._connectionStarted){this._connectionState=exports.HubConnectionState.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(t??new Error("Connection closed.")),this._messageBuffer=void 0),Tr.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(n=>n.apply(this,[t]))}catch(n){this._logger.log(exports.LogLevel.Error,`An onclose callback called with error '${t}' threw error '${n}'.`)}}}async _reconnect(t){const n=Date.now();let r=0,i=t!==void 0?t:new Error("Attempting to reconnect due to a unknown error."),o=this._getNextRetryDelay(r,0,i);if(o===null){this._logger.log(exports.LogLevel.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(t);return}if(this._connectionState=exports.HubConnectionState.Reconnecting,t?this._logger.log(exports.LogLevel.Information,`Connection reconnecting because of error '${t}'.`):this._logger.log(exports.LogLevel.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(a=>a.apply(this,[t]))}catch(a){this._logger.log(exports.LogLevel.Error,`An onreconnecting callback called with error '${t}' threw error '${a}'.`)}if(this._connectionState!==exports.HubConnectionState.Reconnecting){this._logger.log(exports.LogLevel.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;o!==null;){if(this._logger.log(exports.LogLevel.Information,`Reconnect attempt number ${r+1} will start in ${o} ms.`),await new Promise(a=>{this._reconnectDelayHandle=setTimeout(a,o)}),this._reconnectDelayHandle=void 0,this._connectionState!==exports.HubConnectionState.Reconnecting){this._logger.log(exports.LogLevel.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(await this._startInternal(),this._connectionState=exports.HubConnectionState.Connected,this._logger.log(exports.LogLevel.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(a=>a.apply(this,[this.connection.connectionId]))}catch(a){this._logger.log(exports.LogLevel.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${a}'.`)}return}catch(a){if(this._logger.log(exports.LogLevel.Information,`Reconnect attempt failed because of error '${a}'.`),this._connectionState!==exports.HubConnectionState.Reconnecting){this._logger.log(exports.LogLevel.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),this._connectionState===exports.HubConnectionState.Disconnecting&&this._completeClose();return}r++,i=a instanceof Error?a:new Error(a.toString()),o=this._getNextRetryDelay(r,Date.now()-n,i)}}this._logger.log(exports.LogLevel.Information,`Reconnect retries have been exhausted after ${Date.now()-n} ms and ${r} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(t,n,r){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:n,previousRetryCount:t,retryReason:r})}catch(i){return this._logger.log(exports.LogLevel.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${t}, ${n}) threw error '${i}'.`),null}}_cancelCallbacksWithError(t){const n=this._callbacks;this._callbacks={},Object.keys(n).forEach(r=>{const i=n[r];try{i(null,t)}catch(o){this._logger.log(exports.LogLevel.Error,`Stream 'error' callback called with '${t}' threw error: ${tp(o)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(t,n,r,i){if(r)return i.length!==0?{target:t,arguments:n,streamIds:i,type:exports.MessageType.Invocation}:{target:t,arguments:n,type:exports.MessageType.Invocation};{const o=this._invocationId;return this._invocationId++,i.length!==0?{target:t,arguments:n,invocationId:o.toString(),streamIds:i,type:exports.MessageType.Invocation}:{target:t,arguments:n,invocationId:o.toString(),type:exports.MessageType.Invocation}}}_launchStreams(t,n){if(t.length!==0){n||(n=Promise.resolve());for(const r in t)t[r].subscribe({complete:()=>{n=n.then(()=>this._sendWithProtocol(this._createCompletionMessage(r)))},error:i=>{let o;i instanceof Error?o=i.message:i&&i.toString?o=i.toString():o="Unknown error",n=n.then(()=>this._sendWithProtocol(this._createCompletionMessage(r,o)))},next:i=>{n=n.then(()=>this._sendWithProtocol(this._createStreamItemMessage(r,i)))}})}}_replaceStreamingParams(t){const n=[],r=[];for(let i=0;i<t.length;i++){const o=t[i];if(this._isObservable(o)){const a=this._invocationId;this._invocationId++,n[a]=o,r.push(a.toString()),t.splice(i,1)}}return[n,r]}_isObservable(t){return t&&t.subscribe&&typeof t.subscribe=="function"}_createStreamInvocation(t,n,r){const i=this._invocationId;return this._invocationId++,r.length!==0?{target:t,arguments:n,invocationId:i.toString(),streamIds:r,type:exports.MessageType.StreamInvocation}:{target:t,arguments:n,invocationId:i.toString(),type:exports.MessageType.StreamInvocation}}_createCancelInvocation(t){return{invocationId:t,type:exports.MessageType.CancelInvocation}}_createStreamItemMessage(t,n){return{invocationId:t,item:n,type:exports.MessageType.StreamItem}}_createCompletionMessage(t,n,r){return n?{error:n,invocationId:t,type:exports.MessageType.Completion}:{invocationId:t,result:r,type:exports.MessageType.Completion}}_createCloseMessage(){return{type:exports.MessageType.Close}}async _trySendPingMessage(){try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}}}const Q9=v.createContext({isAlive:!1,shouldBeAlive:!1,connectionState:exports.HubConnectionState.Disconnected,hasLastConnectionEnded:!1}),eD="_button_1wjon_1",tD="_filled_1wjon_7",nD="_sm_1wjon_13",rD="_md_1wjon_18",iD="_lg_1wjon_23",va={button:eD,filled:tD,sm:nD,md:rD,lg:iD},Uo=e=>{const t=je.c(24);let n,r,i,o,a,s;t[0]!==e?({variant:o,color:a,size:s,className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s):(n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6]);const l=o===void 0?"filled":o,c=a===void 0?"primary":a,u=s===void 0?"md":s;if(i.as==="link"){const d=i.href??"/",f=`luminus-primary-button ${c} btn ${l==="outlined"?`btn-outline-${c}`:`btn-${c}`} ${r??""}`,h=va[l],p=va[u];let m;t[7]!==f||t[8]!==h||t[9]!==p?(m=se(f,va.button,h,p),t[7]=f,t[8]=h,t[9]=p,t[10]=m):m=t[10];let g;return t[11]!==n||t[12]!==i||t[13]!==d||t[14]!==m?(g=y.jsx(us.Link,{to:d,className:m,...i,children:n}),t[11]=n,t[12]=i,t[13]=d,t[14]=m,t[15]=g):g=t[15],g}if(i.as==="button"||i.as===void 0){const d=`luminus-primary-button ${c} btn ${l==="outlined"?`btn-outline-${c}`:`btn-${c}`} ${r??""}`,f=va[l],h=va[u];let p;t[16]!==d||t[17]!==f||t[18]!==h?(p=se(d,va.button,f,h),t[16]=d,t[17]=f,t[18]=h,t[19]=p):p=t[19];let m;return t[20]!==n||t[21]!==i||t[22]!==p?(m=y.jsx("button",{type:"button",className:p,...i,children:n}),t[20]=n,t[21]=i,t[22]=p,t[23]=m):m=t[23],m}return null},oD="_button_1r3i0_1",Cm={button:oD},sf=e=>{const t=je.c(21);let n,r,i,o,a;t[0]!==e?({color:a,icon:i,className:r,children:n,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a):(n=t[1],r=t[2],i=t[3],o=t[4],a=t[5]);const s=a===void 0?"primary":a;if(o.as==="link"){const l=o.href??"/",c=`luminus-context-button btn text-${s} ${r??""}`;let u;t[6]!==c?(u=se(c,Cm.button),t[6]=c,t[7]=u):u=t[7];let d;return t[8]!==n||t[9]!==i||t[10]!==o||t[11]!==l||t[12]!==u?(d=y.jsxs(us.Link,{to:l,className:u,...o,children:[i,n]}),t[8]=n,t[9]=i,t[10]=o,t[11]=l,t[12]=u,t[13]=d):d=t[13],d}if(o.as==="button"||o.as===void 0){const l=`luminus-context-button btn text-${s} ${r??""}`;let c;t[14]!==l?(c=se(l,Cm.button),t[14]=l,t[15]=c):c=t[15];let u;return t[16]!==n||t[17]!==i||t[18]!==o||t[19]!==c?(u=y.jsxs("button",{type:"button",className:c,...o,children:[i,n]}),t[16]=n,t[17]=i,t[18]=o,t[19]=c,t[20]=u):u=t[20],u}return null},aD="_icon-button_15e26_1",sD="_sm_15e26_14",lD="_md_15e26_23",cD="_lg_15e26_32",nu={"icon-button":"_icon-button_15e26_1",iconButton:aD,sm:sD,md:lD,lg:cD},Sc=e=>{const t=je.c(23);let n,r,i,o,a,s;t[0]!==e?({type:o,color:a,size:s,children:n,className:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s):(n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6]);const l=o===void 0?"button":o,c=a===void 0?"primary":a,u=s===void 0?"md":s;if(i.as==="link"){const d=i.href??"/",f=`luminus-icon-button btn text-${c} ${r??""}`,h=nu[u];let p;t[7]!==f||t[8]!==h?(p=se(f,nu.iconButton,h),t[7]=f,t[8]=h,t[9]=p):p=t[9];let m;return t[10]!==n||t[11]!==i||t[12]!==d||t[13]!==p?(m=y.jsx(us.Link,{to:d,className:p,...i,children:n}),t[10]=n,t[11]=i,t[12]=d,t[13]=p,t[14]=m):m=t[14],m}if(i.as==="button"||i.as===void 0){const d=`luminus-icon-button btn text-${c} ${r??""}`,f=nu[u];let h;t[15]!==d||t[16]!==f?(h=se(d,nu.iconButton,f),t[15]=d,t[16]=f,t[17]=h):h=t[17];let p;return t[18]!==n||t[19]!==i||t[20]!==h||t[21]!==l?(p=y.jsx("button",{type:l,className:h,...i,children:n}),t[18]=n,t[19]=i,t[20]=h,t[21]=l,t[22]=p):p=t[22],p}return null};var d0={},ed={exports:{}};ed.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=1,o=2,a=9007199254740991,s="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",f="[object Error]",h="[object Function]",p="[object GeneratorFunction]",m="[object Map]",g="[object Number]",x="[object Null]",_="[object Object]",w="[object Promise]",C="[object Proxy]",b="[object RegExp]",S="[object Set]",M="[object String]",$="[object Symbol]",k="[object Undefined]",R="[object WeakMap]",T="[object ArrayBuffer]",E="[object DataView]",A="[object Float32Array]",I="[object Float64Array]",j="[object Int8Array]",D="[object Int16Array]",O="[object Int32Array]",L="[object Uint8Array]",z="[object Uint8ClampedArray]",N="[object Uint16Array]",H="[object Uint32Array]",Y=/[\\^$.*+?()[\]{}|]/g,q=/^\[object .+?Constructor\]$/,Z=/^(?:0|[1-9]\d*)$/,X={};X[A]=X[I]=X[j]=X[D]=X[O]=X[L]=X[z]=X[N]=X[H]=!0,X[s]=X[l]=X[T]=X[u]=X[E]=X[d]=X[f]=X[h]=X[m]=X[g]=X[_]=X[b]=X[S]=X[M]=X[R]=!1;var J=typeof Hn=="object"&&Hn&&Hn.Object===Object&&Hn,ee=typeof self=="object"&&self&&self.Object===Object&&self,W=J||ee||Function("return this")(),F=t&&!t.nodeType&&t,B=F&&!0&&e&&!e.nodeType&&e,V=B&&B.exports===F,P=V&&J.process,te=function(){try{return P&&P.binding&&P.binding("util")}catch{}}(),K=te&&te.isTypedArray;function G(U,Q){for(var ue=-1,ke=U==null?0:U.length,Xt=0,dt=[];++ue<ke;){var an=U[ue];Q(an,ue,U)&&(dt[Xt++]=an)}return dt}function ae(U,Q){for(var ue=-1,ke=Q.length,Xt=U.length;++ue<ke;)U[Xt+ue]=Q[ue];return U}function ne(U,Q){for(var ue=-1,ke=U==null?0:U.length;++ue<ke;)if(Q(U[ue],ue,U))return!0;return!1}function re(U,Q){for(var ue=-1,ke=Array(U);++ue<U;)ke[ue]=Q(ue);return ke}function oe(U){return function(Q){return U(Q)}}function le(U,Q){return U.has(Q)}function ye(U,Q){return U==null?void 0:U[Q]}function ge(U){var Q=-1,ue=Array(U.size);return U.forEach(function(ke,Xt){ue[++Q]=[Xt,ke]}),ue}function be(U,Q){return function(ue){return U(Q(ue))}}function Me(U){var Q=-1,ue=Array(U.size);return U.forEach(function(ke){ue[++Q]=ke}),ue}var ce=Array.prototype,de=Function.prototype,Ce=Object.prototype,Ge=W["__core-js_shared__"],we=de.toString,ve=Ce.hasOwnProperty,Ne=function(){var U=/[^.]+$/.exec(Ge&&Ge.keys&&Ge.keys.IE_PROTO||"");return U?"Symbol(src)_1."+U:""}(),Ze=Ce.toString,_t=RegExp("^"+we.call(ve).replace(Y,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Te=V?W.Buffer:void 0,Re=W.Symbol,ot=W.Uint8Array,Ue=Ce.propertyIsEnumerable,mt=ce.splice,ut=Re?Re.toStringTag:void 0,At=Object.getOwnPropertySymbols,Ke=Te?Te.isBuffer:void 0,Le=be(Object.keys,Object),Ve=fa(W,"DataView"),et=fa(W,"Map"),Fe=fa(W,"Promise"),tt=fa(W,"Set"),vt=fa(W,"WeakMap"),at=fa(Object,"create"),Pe=fo(Ve),Ee=fo(et),Ye=fo(Fe),xt=fo(tt),nt=fo(vt),bt=Re?Re.prototype:void 0,Jt=bt?bt.valueOf:void 0;function Ft(U){var Q=-1,ue=U==null?0:U.length;for(this.clear();++Q<ue;){var ke=U[Q];this.set(ke[0],ke[1])}}function zt(){this.__data__=at?at(null):{},this.size=0}function fn(U){var Q=this.has(U)&&delete this.__data__[U];return this.size-=Q?1:0,Q}function qt(U){var Q=this.__data__;if(at){var ue=Q[U];return ue===r?void 0:ue}return ve.call(Q,U)?Q[U]:void 0}function $e(U){var Q=this.__data__;return at?Q[U]!==void 0:ve.call(Q,U)}function Je(U,Q){var ue=this.__data__;return this.size+=this.has(U)?0:1,ue[U]=at&&Q===void 0?r:Q,this}Ft.prototype.clear=zt,Ft.prototype.delete=fn,Ft.prototype.get=qt,Ft.prototype.has=$e,Ft.prototype.set=Je;function St(U){var Q=-1,ue=U==null?0:U.length;for(this.clear();++Q<ue;){var ke=U[Q];this.set(ke[0],ke[1])}}function on(){this.__data__=[],this.size=0}function Yt(U){var Q=this.__data__,ue=ei(Q,U);if(ue<0)return!1;var ke=Q.length-1;return ue==ke?Q.pop():mt.call(Q,ue,1),--this.size,!0}function Be(U){var Q=this.__data__,ue=ei(Q,U);return ue<0?void 0:Q[ue][1]}function ze(U){return ei(this.__data__,U)>-1}function ht(U,Q){var ue=this.__data__,ke=ei(ue,U);return ke<0?(++this.size,ue.push([U,Q])):ue[ke][1]=Q,this}St.prototype.clear=on,St.prototype.delete=Yt,St.prototype.get=Be,St.prototype.has=ze,St.prototype.set=ht;function Rt(U){var Q=-1,ue=U==null?0:U.length;for(this.clear();++Q<ue;){var ke=U[Q];this.set(ke[0],ke[1])}}function Tt(){this.size=0,this.__data__={hash:new Ft,map:new(et||St),string:new Ft}}function Qe(U){var Q=Mi(this,U).delete(U);return this.size-=Q?1:0,Q}function $t(U){return Mi(this,U).get(U)}function br(U){return Mi(this,U).has(U)}function ln(U,Q){var ue=Mi(this,U),ke=ue.size;return ue.set(U,Q),this.size+=ue.size==ke?0:1,this}Rt.prototype.clear=Tt,Rt.prototype.delete=Qe,Rt.prototype.get=$t,Rt.prototype.has=br,Rt.prototype.set=ln;function cn(U){var Q=-1,ue=U==null?0:U.length;for(this.__data__=new Rt;++Q<ue;)this.add(U[Q])}function An(U){return this.__data__.set(U,r),this}function ao(U){return this.__data__.has(U)}cn.prototype.add=cn.prototype.push=An,cn.prototype.has=ao;function Ct(U){var Q=this.__data__=new St(U);this.size=Q.size}function so(){this.__data__=new St,this.size=0}function Ae(U){var Q=this.__data__,ue=Q.delete(U);return this.size=Q.size,ue}function Ar(U){return this.__data__.get(U)}function lo(U){return this.__data__.has(U)}function ua(U,Q){var ue=this.__data__;if(ue instanceof St){var ke=ue.__data__;if(!et||ke.length<n-1)return ke.push([U,Q]),this.size=++ue.size,this;ue=this.__data__=new Rt(ke)}return ue.set(U,Q),this.size=ue.size,this}Ct.prototype.clear=so,Ct.prototype.delete=Ae,Ct.prototype.get=Ar,Ct.prototype.has=lo,Ct.prototype.set=ua;function da(U,Q){var ue=Hc(U),ke=!ue&&mT(U),Xt=!ue&&!ke&&Rh(U),dt=!ue&&!ke&&!Xt&&c1(U),an=ue||ke||Xt||dt,vn=an?re(U.length,String):[],wn=vn.length;for(var Qt in U)ve.call(U,Qt)&&!(an&&(Qt=="length"||Xt&&(Qt=="offset"||Qt=="parent")||dt&&(Qt=="buffer"||Qt=="byteLength"||Qt=="byteOffset")||uT(Qt,wn)))&&vn.push(Qt);return vn}function ei(U,Q){for(var ue=U.length;ue--;)if(o1(U[ue][0],Q))return ue;return-1}function zc(U,Q,ue){var ke=Q(U);return Hc(U)?ke:ae(ke,ue(U))}function ti(U){return U==null?U===void 0?k:x:ut&&ut in Object(U)?lT(U):pT(U)}function Is(U){return Ps(U)&&ti(U)==s}function co(U,Q,ue,ke,Xt){return U===Q?!0:U==null||Q==null||!Ps(U)&&!Ps(Q)?U!==U&&Q!==Q:js(U,Q,ue,ke,co,Xt)}function js(U,Q,ue,ke,Xt,dt){var an=Hc(U),vn=Hc(Q),wn=an?l:Ei(U),Qt=vn?l:Ei(Q);wn=wn==s?_:wn,Qt=Qt==s?_:Qt;var Jn=wn==_,yr=Qt==_,Cn=wn==Qt;if(Cn&&Rh(U)){if(!Rh(Q))return!1;an=!0,Jn=!1}if(Cn&&!Jn)return dt||(dt=new Ct),an||c1(U)?Rn(U,Q,ue,ke,Xt,dt):Oh(U,Q,wn,ue,ke,Xt,dt);if(!(ue&i)){var rr=Jn&&ve.call(U,"__wrapped__"),ir=yr&&ve.call(Q,"__wrapped__");if(rr||ir){var Oi=rr?U.value():U,ni=ir?Q.value():Q;return dt||(dt=new Ct),Xt(Oi,ni,ue,ke,dt)}}return Cn?(dt||(dt=new Ct),Ah(U,Q,ue,ke,Xt,dt)):!1}function Wc(U){if(!l1(U)||fT(U))return!1;var Q=a1(U)?_t:q;return Q.test(fo(U))}function uo(U){return Ps(U)&&s1(U.length)&&!!X[ti(U)]}function Uc(U){if(!hT(U))return Le(U);var Q=[];for(var ue in Object(U))ve.call(U,ue)&&ue!="constructor"&&Q.push(ue);return Q}function Rn(U,Q,ue,ke,Xt,dt){var an=ue&i,vn=U.length,wn=Q.length;if(vn!=wn&&!(an&&wn>vn))return!1;var Qt=dt.get(U);if(Qt&&dt.get(Q))return Qt==Q;var Jn=-1,yr=!0,Cn=ue&o?new cn:void 0;for(dt.set(U,Q),dt.set(Q,U);++Jn<vn;){var rr=U[Jn],ir=Q[Jn];if(ke)var Oi=an?ke(ir,rr,Jn,Q,U,dt):ke(rr,ir,Jn,U,Q,dt);if(Oi!==void 0){if(Oi)continue;yr=!1;break}if(Cn){if(!ne(Q,function(ni,ho){if(!le(Cn,ho)&&(rr===ni||Xt(rr,ni,ue,ke,dt)))return Cn.push(ho)})){yr=!1;break}}else if(!(rr===ir||Xt(rr,ir,ue,ke,dt))){yr=!1;break}}return dt.delete(U),dt.delete(Q),yr}function Oh(U,Q,ue,ke,Xt,dt,an){switch(ue){case E:if(U.byteLength!=Q.byteLength||U.byteOffset!=Q.byteOffset)return!1;U=U.buffer,Q=Q.buffer;case T:return!(U.byteLength!=Q.byteLength||!dt(new ot(U),new ot(Q)));case u:case d:case g:return o1(+U,+Q);case f:return U.name==Q.name&&U.message==Q.message;case b:case M:return U==Q+"";case m:var vn=ge;case S:var wn=ke&i;if(vn||(vn=Me),U.size!=Q.size&&!wn)return!1;var Qt=an.get(U);if(Qt)return Qt==Q;ke|=o,an.set(U,Q);var Jn=Rn(vn(U),vn(Q),ke,Xt,dt,an);return an.delete(U),Jn;case $:if(Jt)return Jt.call(U)==Jt.call(Q)}return!1}function Ah(U,Q,ue,ke,Xt,dt){var an=ue&i,vn=Rr(U),wn=vn.length,Qt=Rr(Q),Jn=Qt.length;if(wn!=Jn&&!an)return!1;for(var yr=wn;yr--;){var Cn=vn[yr];if(!(an?Cn in Q:ve.call(Q,Cn)))return!1}var rr=dt.get(U);if(rr&&dt.get(Q))return rr==Q;var ir=!0;dt.set(U,Q),dt.set(Q,U);for(var Oi=an;++yr<wn;){Cn=vn[yr];var ni=U[Cn],ho=Q[Cn];if(ke)var u1=an?ke(ho,ni,Cn,Q,U,dt):ke(ni,ho,Cn,U,Q,dt);if(!(u1===void 0?ni===ho||Xt(ni,ho,ue,ke,dt):u1)){ir=!1;break}Oi||(Oi=Cn=="constructor")}if(ir&&!Oi){var Vc=U.constructor,qc=Q.constructor;Vc!=qc&&"constructor"in U&&"constructor"in Q&&!(typeof Vc=="function"&&Vc instanceof Vc&&typeof qc=="function"&&qc instanceof qc)&&(ir=!1)}return dt.delete(U),dt.delete(Q),ir}function Rr(U){return zc(U,bT,cT)}function Mi(U,Q){var ue=U.__data__;return dT(Q)?ue[typeof Q=="string"?"string":"hash"]:ue.map}function fa(U,Q){var ue=ye(U,Q);return Wc(ue)?ue:void 0}function lT(U){var Q=ve.call(U,ut),ue=U[ut];try{U[ut]=void 0;var ke=!0}catch{}var Xt=Ze.call(U);return ke&&(Q?U[ut]=ue:delete U[ut]),Xt}var cT=At?function(U){return U==null?[]:(U=Object(U),G(At(U),function(Q){return Ue.call(U,Q)}))}:yT,Ei=ti;(Ve&&Ei(new Ve(new ArrayBuffer(1)))!=E||et&&Ei(new et)!=m||Fe&&Ei(Fe.resolve())!=w||tt&&Ei(new tt)!=S||vt&&Ei(new vt)!=R)&&(Ei=function(U){var Q=ti(U),ue=Q==_?U.constructor:void 0,ke=ue?fo(ue):"";if(ke)switch(ke){case Pe:return E;case Ee:return m;case Ye:return w;case xt:return S;case nt:return R}return Q});function uT(U,Q){return Q=Q??a,!!Q&&(typeof U=="number"||Z.test(U))&&U>-1&&U%1==0&&U<Q}function dT(U){var Q=typeof U;return Q=="string"||Q=="number"||Q=="symbol"||Q=="boolean"?U!=="__proto__":U===null}function fT(U){return!!Ne&&Ne in U}function hT(U){var Q=U&&U.constructor,ue=typeof Q=="function"&&Q.prototype||Ce;return U===ue}function pT(U){return Ze.call(U)}function fo(U){if(U!=null){try{return we.call(U)}catch{}try{return U+""}catch{}}return""}function o1(U,Q){return U===Q||U!==U&&Q!==Q}var mT=Is(function(){return arguments}())?Is:function(U){return Ps(U)&&ve.call(U,"callee")&&!Ue.call(U,"callee")},Hc=Array.isArray;function gT(U){return U!=null&&s1(U.length)&&!a1(U)}var Rh=Ke||xT;function vT(U,Q){return co(U,Q)}function a1(U){if(!l1(U))return!1;var Q=ti(U);return Q==h||Q==p||Q==c||Q==C}function s1(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function l1(U){var Q=typeof U;return U!=null&&(Q=="object"||Q=="function")}function Ps(U){return U!=null&&typeof U=="object"}var c1=K?oe(K):uo;function bT(U){return gT(U)?da(U):Uc(U)}function yT(){return[]}function xT(){return!1}e.exports=vT})(ed,ed.exports);var uD=ed.exports,fC={exports:{}};(function(e,t){var n=function(){var r=function(b,S){var M=236,$=17,k=b,R=o[S],T=null,E=0,A=null,I=[],j={},D=function(W,F){E=k*4+17,T=function(B){for(var V=new Array(B),P=0;P<B;P+=1){V[P]=new Array(B);for(var te=0;te<B;te+=1)V[P][te]=null}return V}(E),O(0,0),O(E-7,0),O(0,E-7),N(),z(),Y(W,F),k>=7&&H(W),A==null&&(A=X(k,R,I)),q(A,F)},O=function(W,F){for(var B=-1;B<=7;B+=1)if(!(W+B<=-1||E<=W+B))for(var V=-1;V<=7;V+=1)F+V<=-1||E<=F+V||(0<=B&&B<=6&&(V==0||V==6)||0<=V&&V<=6&&(B==0||B==6)||2<=B&&B<=4&&2<=V&&V<=4?T[W+B][F+V]=!0:T[W+B][F+V]=!1)},L=function(){for(var W=0,F=0,B=0;B<8;B+=1){D(!0,B);var V=s.getLostPoint(j);(B==0||W>V)&&(W=V,F=B)}return F},z=function(){for(var W=8;W<E-8;W+=1)T[W][6]==null&&(T[W][6]=W%2==0);for(var F=8;F<E-8;F+=1)T[6][F]==null&&(T[6][F]=F%2==0)},N=function(){for(var W=s.getPatternPosition(k),F=0;F<W.length;F+=1)for(var B=0;B<W.length;B+=1){var V=W[F],P=W[B];if(T[V][P]==null)for(var te=-2;te<=2;te+=1)for(var K=-2;K<=2;K+=1)te==-2||te==2||K==-2||K==2||te==0&&K==0?T[V+te][P+K]=!0:T[V+te][P+K]=!1}},H=function(W){for(var F=s.getBCHTypeNumber(k),B=0;B<18;B+=1){var V=!W&&(F>>B&1)==1;T[Math.floor(B/3)][B%3+E-8-3]=V}for(var B=0;B<18;B+=1){var V=!W&&(F>>B&1)==1;T[B%3+E-8-3][Math.floor(B/3)]=V}},Y=function(W,F){for(var B=R<<3|F,V=s.getBCHTypeInfo(B),P=0;P<15;P+=1){var te=!W&&(V>>P&1)==1;P<6?T[P][8]=te:P<8?T[P+1][8]=te:T[E-15+P][8]=te}for(var P=0;P<15;P+=1){var te=!W&&(V>>P&1)==1;P<8?T[8][E-P-1]=te:P<9?T[8][15-P-1+1]=te:T[8][15-P-1]=te}T[E-8][8]=!W},q=function(W,F){for(var B=-1,V=E-1,P=7,te=0,K=s.getMaskFunction(F),G=E-1;G>0;G-=2)for(G==6&&(G-=1);;){for(var ae=0;ae<2;ae+=1)if(T[V][G-ae]==null){var ne=!1;te<W.length&&(ne=(W[te]>>>P&1)==1);var re=K(V,G-ae);re&&(ne=!ne),T[V][G-ae]=ne,P-=1,P==-1&&(te+=1,P=7)}if(V+=B,V<0||E<=V){V-=B,B=-B;break}}},Z=function(W,F){for(var B=0,V=0,P=0,te=new Array(F.length),K=new Array(F.length),G=0;G<F.length;G+=1){var ae=F[G].dataCount,ne=F[G].totalCount-ae;V=Math.max(V,ae),P=Math.max(P,ne),te[G]=new Array(ae);for(var re=0;re<te[G].length;re+=1)te[G][re]=255&W.getBuffer()[re+B];B+=ae;var oe=s.getErrorCorrectPolynomial(ne),le=c(te[G],oe.getLength()-1),ye=le.mod(oe);K[G]=new Array(oe.getLength()-1);for(var re=0;re<K[G].length;re+=1){var ge=re+ye.getLength()-K[G].length;K[G][re]=ge>=0?ye.getAt(ge):0}}for(var be=0,re=0;re<F.length;re+=1)be+=F[re].totalCount;for(var Me=new Array(be),ce=0,re=0;re<V;re+=1)for(var G=0;G<F.length;G+=1)re<te[G].length&&(Me[ce]=te[G][re],ce+=1);for(var re=0;re<P;re+=1)for(var G=0;G<F.length;G+=1)re<K[G].length&&(Me[ce]=K[G][re],ce+=1);return Me},X=function(W,F,B){for(var V=u.getRSBlocks(W,F),P=d(),te=0;te<B.length;te+=1){var K=B[te];P.put(K.getMode(),4),P.put(K.getLength(),s.getLengthInBits(K.getMode(),W)),K.write(P)}for(var G=0,te=0;te<V.length;te+=1)G+=V[te].dataCount;if(P.getLengthInBits()>G*8)throw"code length overflow. ("+P.getLengthInBits()+">"+G*8+")";for(P.getLengthInBits()+4<=G*8&&P.put(0,4);P.getLengthInBits()%8!=0;)P.putBit(!1);for(;!(P.getLengthInBits()>=G*8||(P.put(M,8),P.getLengthInBits()>=G*8));)P.put($,8);return Z(P,V)};j.addData=function(W,F){F=F||"Byte";var B=null;switch(F){case"Numeric":B=f(W);break;case"Alphanumeric":B=h(W);break;case"Byte":B=p(W);break;case"Kanji":B=m(W);break;default:throw"mode:"+F}I.push(B),A=null},j.isDark=function(W,F){if(W<0||E<=W||F<0||E<=F)throw W+","+F;return T[W][F]},j.getModuleCount=function(){return E},j.make=function(){if(k<1){for(var W=1;W<40;W++){for(var F=u.getRSBlocks(W,R),B=d(),V=0;V<I.length;V++){var P=I[V];B.put(P.getMode(),4),B.put(P.getLength(),s.getLengthInBits(P.getMode(),W)),P.write(B)}for(var te=0,V=0;V<F.length;V++)te+=F[V].dataCount;if(B.getLengthInBits()<=te*8)break}k=W}D(!1,L())},j.createTableTag=function(W,F){W=W||2,F=typeof F>"u"?W*4:F;var B="";B+='<table style="',B+=" border-width: 0px; border-style: none;",B+=" border-collapse: collapse;",B+=" padding: 0px; margin: "+F+"px;",B+='">',B+="<tbody>";for(var V=0;V<j.getModuleCount();V+=1){B+="<tr>";for(var P=0;P<j.getModuleCount();P+=1)B+='<td style="',B+=" border-width: 0px; border-style: none;",B+=" border-collapse: collapse;",B+=" padding: 0px; margin: 0px;",B+=" width: "+W+"px;",B+=" height: "+W+"px;",B+=" background-color: ",B+=j.isDark(V,P)?"#000000":"#ffffff",B+=";",B+='"/>';B+="</tr>"}return B+="</tbody>",B+="</table>",B},j.createSvgTag=function(W,F,B,V){var P={};typeof arguments[0]=="object"&&(P=arguments[0],W=P.cellSize,F=P.margin,B=P.alt,V=P.title),W=W||2,F=typeof F>"u"?W*4:F,B=typeof B=="string"?{text:B}:B||{},B.text=B.text||null,B.id=B.text?B.id||"qrcode-description":null,V=typeof V=="string"?{text:V}:V||{},V.text=V.text||null,V.id=V.text?V.id||"qrcode-title":null;var te=j.getModuleCount()*W+F*2,K,G,ae,ne,re="",oe;for(oe="l"+W+",0 0,"+W+" -"+W+",0 0,-"+W+"z ",re+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',re+=P.scalable?"":' width="'+te+'px" height="'+te+'px"',re+=' viewBox="0 0 '+te+" "+te+'" ',re+=' preserveAspectRatio="xMinYMin meet"',re+=V.text||B.text?' role="img" aria-labelledby="'+J([V.id,B.id].join(" ").trim())+'"':"",re+=">",re+=V.text?'<title id="'+J(V.id)+'">'+J(V.text)+"</title>":"",re+=B.text?'<description id="'+J(B.id)+'">'+J(B.text)+"</description>":"",re+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',re+='<path d="',ae=0;ae<j.getModuleCount();ae+=1)for(ne=ae*W+F,K=0;K<j.getModuleCount();K+=1)j.isDark(ae,K)&&(G=K*W+F,re+="M"+G+","+ne+oe);return re+='" stroke="transparent" fill="black"/>',re+="</svg>",re},j.createDataURL=function(W,F){W=W||2,F=typeof F>"u"?W*4:F;var B=j.getModuleCount()*W+F*2,V=F,P=B-F;return C(B,B,function(te,K){if(V<=te&&te<P&&V<=K&&K<P){var G=Math.floor((te-V)/W),ae=Math.floor((K-V)/W);return j.isDark(ae,G)?0:1}else return 1})},j.createImgTag=function(W,F,B){W=W||2,F=typeof F>"u"?W*4:F;var V=j.getModuleCount()*W+F*2,P="";return P+="<img",P+=' src="',P+=j.createDataURL(W,F),P+='"',P+=' width="',P+=V,P+='"',P+=' height="',P+=V,P+='"',B&&(P+=' alt="',P+=J(B),P+='"'),P+="/>",P};var J=function(W){for(var F="",B=0;B<W.length;B+=1){var V=W.charAt(B);switch(V){case"<":F+="&lt;";break;case">":F+="&gt;";break;case"&":F+="&amp;";break;case'"':F+="&quot;";break;default:F+=V;break}}return F},ee=function(W){var F=1;W=typeof W>"u"?F*2:W;var B=j.getModuleCount()*F+W*2,V=W,P=B-W,te,K,G,ae,ne,re={"██":"█","█ ":"▀"," █":"▄"," ":" "},oe={"██":"▀","█ ":"▀"," █":" "," ":" "},le="";for(te=0;te<B;te+=2){for(G=Math.floor((te-V)/F),ae=Math.floor((te+1-V)/F),K=0;K<B;K+=1)ne="█",V<=K&&K<P&&V<=te&&te<P&&j.isDark(G,Math.floor((K-V)/F))&&(ne=" "),V<=K&&K<P&&V<=te+1&&te+1<P&&j.isDark(ae,Math.floor((K-V)/F))?ne+=" ":ne+="█",le+=W<1&&te+1>=P?oe[ne]:re[ne];le+=`
244
+ */var _b;function YA(){return _b||(_b=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,_=e?Symbol.for("react.scope"):60119;function w(P){return typeof P=="string"||typeof P=="function"||P===r||P===c||P===o||P===i||P===d||P===f||typeof P=="object"&&P!==null&&(P.$$typeof===p||P.$$typeof===h||P.$$typeof===a||P.$$typeof===s||P.$$typeof===u||P.$$typeof===g||P.$$typeof===x||P.$$typeof===_||P.$$typeof===m)}function C(P){if(typeof P=="object"&&P!==null){var te=P.$$typeof;switch(te){case t:var K=P.type;switch(K){case l:case c:case r:case o:case i:case d:return K;default:var G=K&&K.$$typeof;switch(G){case s:case u:case p:case h:case a:return G;default:return te}}case n:return te}}}var b=l,S=c,M=s,$=a,k=t,R=u,T=r,E=p,A=h,I=n,j=o,D=i,O=d,L=!1;function z(P){return L||(L=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),N(P)||C(P)===l}function N(P){return C(P)===c}function H(P){return C(P)===s}function Y(P){return C(P)===a}function q(P){return typeof P=="object"&&P!==null&&P.$$typeof===t}function Z(P){return C(P)===u}function X(P){return C(P)===r}function J(P){return C(P)===p}function ee(P){return C(P)===h}function W(P){return C(P)===n}function F(P){return C(P)===o}function B(P){return C(P)===i}function V(P){return C(P)===d}Pt.AsyncMode=b,Pt.ConcurrentMode=S,Pt.ContextConsumer=M,Pt.ContextProvider=$,Pt.Element=k,Pt.ForwardRef=R,Pt.Fragment=T,Pt.Lazy=E,Pt.Memo=A,Pt.Portal=I,Pt.Profiler=j,Pt.StrictMode=D,Pt.Suspense=O,Pt.isAsyncMode=z,Pt.isConcurrentMode=N,Pt.isContextConsumer=H,Pt.isContextProvider=Y,Pt.isElement=q,Pt.isForwardRef=Z,Pt.isFragment=X,Pt.isLazy=J,Pt.isMemo=ee,Pt.isPortal=W,Pt.isProfiler=F,Pt.isStrictMode=B,Pt.isSuspense=V,Pt.isValidElementType=w,Pt.typeOf=C}()),Pt}var Cb;function GA(){return Cb||(Cb=1,process.env.NODE_ENV==="production"?tu.exports=qA():tu.exports=YA()),tu.exports}var Qh,Sb;function ZA(){if(Sb)return Qh;Sb=1;var e=GA(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};o[e.ForwardRef]=r,o[e.Memo]=i;function a(p){return e.isMemo(p)?i:o[p.$$typeof]||t}var s=Object.defineProperty,l=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,f=Object.prototype;function h(p,m,g){if(typeof m!="string"){if(f){var x=d(m);x&&x!==f&&h(p,x,g)}var _=l(m);c&&(_=_.concat(c(m)));for(var w=a(p),C=a(m),b=0;b<_.length;++b){var S=_[b];if(!n[S]&&!(g&&g[S])&&!(C&&C[S])&&!(w&&w[S])){var M=u(m,S);try{s(p,S,M)}catch{}}}}return p}return Qh=h,Qh}ZA();function XA(){return typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"}function o0(e,t){const n=v.useContext(H4);if(!n)throw new Error("Missing <CookiesProvider>");const i=Object.assign(Object.assign({},{doNotUpdate:!0}),t),[o,a]=v.useState(()=>n.getAll(i));XA()&&v.useLayoutEffect(()=>{function u(){const d=n.getAll(i);KA(e||null,d,o)&&a(d)}return n.addChangeListener(u),()=>{n.removeChangeListener(u)}},[n,o]);const s=v.useMemo(()=>n.set.bind(n),[n]),l=v.useMemo(()=>n.remove.bind(n),[n]),c=v.useMemo(()=>n.update.bind(n),[n]);return[o,s,l,c]}function KA(e,t,n){if(!e)return!0;for(let r of e)if(t[r]!==n[r])return!0;return!1}const JA=()=>{const e=je.c(12),{axiosOptions:t,cookieDomain:n}=v.useContext(rn);let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=["Authorization"],e[0]=r):r=e[0];const[,i,o]=o0(r);let a;e[1]!==t?(a=Zt.create(t),e[1]=t,e[2]=a):a=e[2];const s=a,l=QA;let c;e[3]!==s||e[4]!==n||e[5]!==i?(c=async(p,m)=>s.post("/user/login",{kid:p,password:m}).then(g=>(localStorage.setItem("token",g.data),window.dispatchEvent(new Event("dev-auth-change")),i("Authorization",g.data,{path:"/",secure:window.location.protocol==="https:",sameSite:"none",domain:n,expires:rw(new Date(Date.now()),24)}),g.data)).catch(eR),e[3]=s,e[4]=n,e[5]=i,e[6]=c):c=e[6];const u=c;let d;e[7]!==o?(d=()=>{localStorage.removeItem("token"),localStorage.removeItem("user"),window.dispatchEvent(new Event("dev-auth-change")),o("Authorization")},e[7]=o,e[8]=d):d=e[8];const f=d;let h;return e[9]!==u||e[10]!==f?(h={isAuthenticated:l,login:u,logout:f},e[9]=u,e[10]=f,e[11]=h):h=e[11],h};function QA(){const e=localStorage.getItem("token");return e!==null&&e.length>0}function eR(e){return console.log(e),null}const tR=()=>{const e=je.c(18);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=["Authorization"],e[0]=t):t=e[0];const[,,n]=o0(t),{msalScopes:r,msalExtraScopes:i}=v.useContext(Yd),{instance:o,inProgress:a}=d1.useMsal(),s=d1.useIsAuthenticated();let l;e[1]!==s?(l=()=>s,e[1]=s,e[2]=l):l=e[2];const c=l;let u;e[3]!==c||e[4]!==a?(u=()=>!c()&&a!==wT.InteractionStatus.None,e[3]=c,e[4]=a,e[5]=u):u=e[5];const d=u;let f;e[6]!==o||e[7]!==i||e[8]!==r?(f=async()=>o.loginRedirect({scopes:r,extraScopesToConsent:i}).then(nR).catch(rR),e[6]=o,e[7]=i,e[8]=r,e[9]=f):f=e[9];const h=f;let p;e[10]!==o||e[11]!==n?(p=()=>{o.logout(),localStorage.removeItem("user"),n("Authorization")},e[10]=o,e[11]=n,e[12]=p):p=e[12];const m=p;let g;return e[13]!==c||e[14]!==d||e[15]!==h||e[16]!==m?(g={isAuthenticated:c,isAuthenticating:d,login:h,logout:m},e[13]=c,e[14]=d,e[15]=h,e[16]=m,e[17]=g):g=e[17],g};function nR(){return""}function rR(){return null}const V4=()=>{const e=je.c(12),{useMsal:t}=v.useContext(Yd),n=JA(),r=tR();let i;e[0]!==n||e[1]!==r||e[2]!==t?(i=(u,d)=>t?r.login():n.login(u,d),e[0]=n,e[1]=r,e[2]=t,e[3]=i):i=e[3];const o=i,a=t?r.isAuthenticated:n.isAuthenticated;let s;e[4]!==r||e[5]!==t?(s=t?r.isAuthenticating:iR,e[4]=r,e[5]=t,e[6]=s):s=e[6];const l=t?r.logout:n.logout;let c;return e[7]!==a||e[8]!==s||e[9]!==l||e[10]!==o?(c={isAuthenticated:a,isAuthenticating:s,login:o,logout:l},e[7]=a,e[8]=s,e[9]=l,e[10]=o,e[11]=c):c=e[11],c};function iR(){return!1}const oR="_toast_1s57i_1",Ws={toast:oR},aR=e=>{switch(e){case"success":return 5e3;case"info":return 5e3;case"danger":return 1e4;case"warning":return 1e4;case"prompt":return 1e4;default:return 5e3}},tf=()=>{const e=je.c(1),t=sR;let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n={addNotification:t},e[0]=n):n=e[0],n};function sR(e,t){const n=u4(e),r=aR(t),i=y.jsxs(y.Fragment,{children:[n,y.jsx(H_,{onClick:()=>ga.dismiss(n),type:"button",style:{position:"absolute",fontSize:"12px",top:"calc(50% - 6px)",right:"8px"}})]});e:switch(t){case"success":{ga(i,{id:n,duration:r,position:"top-center",icon:y.jsx(F8,{size:12}),className:se("luminus-toast-success rounded shadow bg-success",Ws.toast)});break e}case"danger":{ga(i,{id:n,duration:r,position:"top-center",icon:y.jsx(k8,{size:12}),className:se("luminus-toast-danger rounded shadow bg-danger",Ws.toast)});break e}case"warning":{ga(i,{id:n,duration:r,position:"top-center",icon:y.jsx(_8,{size:12}),className:se("luminus-toast-warning rounded shadow bg-warning",Ws.toast)});break e}case"info":{ga(i,{id:n,duration:r,position:"top-center",icon:y.jsx(S8,{size:12}),className:se("luminus-toast-info rounded shadow bg-info",Ws.toast)});break e}case"prompt":{ga(i,{id:n,duration:r,position:"top-center",icon:y.jsx($8,{size:12}),className:se("luminus-toast-prompt rounded shadow bg-light",Ws.toast)});break e}}}const lR=Zt.CancelToken,nf=e=>{const{authenticated:t=!0,differentBaseUrl:n,silent:r=!1,customToken:i,ignoreDelegation:o,noToastOnStatus:a}={...e},{language:s,axiosOptions:l,texts:{axios:c}}=v.useContext(rn),{delegation:u}=v.useContext(i4),{getToken:d}=v.useContext(Yd),f=v.useMemo(()=>(u==null?void 0:u.id)??null,[u==null?void 0:u.id]),{addNotification:h}=tf(),{isAuthenticating:p,isAuthenticated:m}=V4(),g=v.useMemo(()=>Zt.create(l),[l]),x=v.useCallback(async b=>{var M,$,k;if(t&&!b.headers.Authorization){if(p())return Promise.reject(new Error("Authentication in progress"));if(!m())return Promise.reject(new Error("Not authenticated"));const R=i?{token:i,expiresOn:rw(new Date(Date.now()),1)}:await d();if(!R)return console.log("No bearer token"),Promise.reject(new Error("No bearer token"));if(lw(R.expiresOn))return console.log("Token expired"),Promise.reject(new Error("Token expired"));b.headers.Authorization=`Bearer ${R.token}`}f!==null&&!o&&(b.headers.DelegationId=f.toString());const S=localStorage.getItem("search-use-asterisk")!=="false";return b.headers["Search-Use-Asterisk"]=S?"true":"false",(M=b.url)!=null&&M.includes("culture=")?b.url=($=b.url)==null?void 0:$.replace(/culture=[a-z]{2}/,`culture=${s}`):b.url=`${b.url}${(k=b.url)!=null&&k.includes("?")?"&":"?"}culture=${s}`,b},[t,d,s,i,f,o,p,m]),_=v.useCallback(async b=>{var $,k;if(Zt.isCancel(b)||b.message==="Authentication in progress"||b.message==="No bearer token"||b.message==="Token expired")return Promise.reject(b);let S;if(b.response.data instanceof Blob?S=await s4(b.response.data):S=Gd(b.response.data),S.length>0){const R=S.find(T=>T.name.toLowerCase()==="others");return R?(!r&&h(R.errors,"danger"),Promise.reject(b)):(!r&&h(c.validationError,"warning"),Promise.reject(b))}const M=l4(b);return M!==null?(!r&&h(`${c.permissionError}: ${Qg(", ",...M)}`,"danger"),Promise.reject(b)):(a??[]).includes(($=b.response)==null?void 0:$.status)?Promise.reject(b):((k=b.response)==null?void 0:k.status)===403?(!r&&h(c.forbiddenError,"danger"),Promise.reject(b)):b.message&&b.message==="Network Error"?(!r&&h(c.networkError,"danger"),Promise.reject(b)):(Zt.isCancel(b)||(!r&&h(c.unexpectedError,"danger"),(b.response||b.request)&&!r&&h(c.unexpectedError,"danger")),Promise.reject(b))},[h,c.forbiddenError,c.networkError,c.permissionError,c.unexpectedError,c.validationError,r,a]),[w,C]=v.useState(!1);return v.useEffect(()=>{n&&(g.defaults.baseURL=n)},[n,g.defaults]),v.useEffect(()=>{g.interceptors.request.clear();const b=g.interceptors.request.use(x,S=>Promise.reject(S));return C(!0),console.log("useAxios: setting interceptors"),()=>{C(!1),console.log("useAxios: ejecting interceptors"),g.interceptors.request.eject(b)}},[g.interceptors.request,x]),v.useEffect(()=>{g.interceptors.response.clear();const b=g.interceptors.response.use(S=>S,_);return()=>{g.interceptors.response.eject(b)}},[g.interceptors.response,_]),g.interceptorsUsed=w,g};let ol;const a0=()=>{const e=je.c(15),{show:t,text:n,showConfirm:r,hideConfirm:i,textSm:o}=v.useContext(q_);let a;e[0]!==i?(a=()=>{i()},e[0]=i,e[1]=a):a=e[1];const s=a;let l;e[2]!==s?(l=()=>{s(),ol&&ol(!0)},e[2]=s,e[3]=l):l=e[3];const c=l;let u;e[4]!==s?(u=()=>{s(),ol&&ol(!1)},e[4]=s,e[5]=u):u=e[5];const d=u;let f;e[6]!==r?(f=async(m,g)=>(r(m,g),new Promise(cR)),e[6]=r,e[7]=f):f=e[7];const h=f;let p;return e[8]!==h||e[9]!==d||e[10]!==c||e[11]!==t||e[12]!==n||e[13]!==o?(p={confirm:h,onConfirm:c,onCancel:d,show:t,text:n,textSm:o},e[8]=h,e[9]=d,e[10]=c,e[11]=t,e[12]=n,e[13]=o,e[14]=p):p=e[14],p};function cR(e){ol=e}var wt;(function(e){e.assertEqual=i=>{};function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const o={};for(const a of i)o[a]=a;return o},e.getValidEnumValues=i=>{const o=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),a={};for(const s of o)a[s]=i[s];return e.objectValues(a)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},e.find=(i,o)=>{for(const a of i)if(o(a))return a},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(wt||(wt={}));var vm;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(vm||(vm={}));const Se=wt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),di=e=>{switch(typeof e){case"undefined":return Se.undefined;case"string":return Se.string;case"number":return Number.isNaN(e)?Se.nan:Se.number;case"boolean":return Se.boolean;case"function":return Se.function;case"bigint":return Se.bigint;case"symbol":return Se.symbol;case"object":return Array.isArray(e)?Se.array:e===null?Se.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Se.promise:typeof Map<"u"&&e instanceof Map?Se.map:typeof Set<"u"&&e instanceof Set?Se.set:typeof Date<"u"&&e instanceof Date?Se.date:Se.object;default:return Se.unknown}},he=wt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),uR=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class er extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(o){return o.message},r={_errors:[]},i=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,l=0;for(;l<a.path.length;){const c=a.path[l];l===a.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(n(a))):s[c]=s[c]||{_errors:[]},s=s[c],l++}}};return i(this),r}static assert(t){if(!(t instanceof er))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,wt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)if(i.path.length>0){const o=i.path[0];n[o]=n[o]||[],n[o].push(t(i))}else r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}er.create=e=>new er(e);const Qa=(e,t)=>{let n;switch(e.code){case he.invalid_type:e.received===Se.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case he.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,wt.jsonStringifyReplacer)}`;break;case he.unrecognized_keys:n=`Unrecognized key(s) in object: ${wt.joinValues(e.keys,", ")}`;break;case he.invalid_union:n="Invalid input";break;case he.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${wt.joinValues(e.options)}`;break;case he.invalid_enum_value:n=`Invalid enum value. Expected ${wt.joinValues(e.options)}, received '${e.received}'`;break;case he.invalid_arguments:n="Invalid function arguments";break;case he.invalid_return_type:n="Invalid function return type";break;case he.invalid_date:n="Invalid date";break;case he.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:wt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case he.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case he.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case he.custom:n="Invalid input";break;case he.invalid_intersection_types:n="Intersection results could not be merged";break;case he.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case he.not_finite:n="Number must be finite";break;default:n=t.defaultError,wt.assertNever(e)}return{message:n}};let q4=Qa;function dR(e){q4=e}function Yu(){return q4}const Gu=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],a={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let s="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)s=c(a,{data:t,defaultError:s}).message;return{...i,path:o,message:s}},fR=[];function _e(e,t){const n=Yu(),r=Gu({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Qa?void 0:Qa].filter(i=>!!i)});e.common.issues.push(r)}class On{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return He;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const o=await i.key,a=await i.value;r.push({key:o,value:a})}return On.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return He;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(r[o.value]=a.value)}return{status:t.value,value:r}}}const He=Object.freeze({status:"aborted"}),Ea=e=>({status:"dirty",value:e}),Nn=e=>({status:"valid",value:e}),bm=e=>e.status==="aborted",ym=e=>e.status==="dirty",Bo=e=>e.status==="valid",Tl=e=>typeof Promise<"u"&&e instanceof Promise;var Oe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Oe||(Oe={}));class Ur{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Tb=(e,t)=>{if(Bo(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new er(e.common.issues);return this._error=n,this._error}}};function ct(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(a,s)=>{const{message:l}=e;return a.code==="invalid_enum_value"?{message:l??s.defaultError}:typeof s.data>"u"?{message:l??r??s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:l??n??s.defaultError}},description:i}}class pt{get description(){return this._def.description}_getType(t){return di(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:di(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new On,ctx:{common:t.parent.common,data:t.data,parsedType:di(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Tl(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:di(t)},i=this._parseSync({data:t,path:r.path,parent:r});return Tb(r,i)}"~validate"(t){var r,i;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:di(t)};if(!this["~standard"].async)try{const o=this._parseSync({data:t,path:[],parent:n});return Bo(o)?{value:o.value}:{issues:n.common.issues}}catch(o){(i=(r=o==null?void 0:o.message)==null?void 0:r.toLowerCase())!=null&&i.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(o=>Bo(o)?{value:o.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:di(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(Tl(i)?i:Promise.resolve(i));return Tb(r,o)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,o)=>{const a=t(i),s=()=>o.addIssue({code:he.custom,...r(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new $r({schema:this,typeName:qe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Br.create(this,this._def)}nullable(){return Ji.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Sr.create(this)}promise(){return ts.create(this,this._def)}or(t){return El.create([this,t],this._def)}and(t){return Ol.create(this,t,this._def)}transform(t){return new $r({...ct(this._def),schema:this,typeName:qe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new jl({...ct(this._def),innerType:this,defaultValue:n,typeName:qe.ZodDefault})}brand(){return new s0({typeName:qe.ZodBranded,type:this,...ct(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Pl({...ct(this._def),innerType:this,catchValue:n,typeName:qe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return _c.create(this,t)}readonly(){return Nl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const hR=/^c[^\s-]{8,}$/i,pR=/^[0-9a-z]+$/,mR=/^[0-9A-HJKMNP-TV-Z]{26}$/i,gR=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,vR=/^[a-z0-9_-]{21}$/i,bR=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,yR=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,xR=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,wR="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ep;const _R=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,CR=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,SR=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,TR=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,$R=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,kR=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Y4="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",MR=new RegExp(`^${Y4}$`);function G4(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function ER(e){return new RegExp(`^${G4(e)}$`)}function Z4(e){let t=`${Y4}T${G4(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function OR(e,t){return!!((t==="v4"||!t)&&_R.test(e)||(t==="v6"||!t)&&SR.test(e))}function AR(e,t){if(!bR.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||"typ"in i&&(i==null?void 0:i.typ)!=="JWT"||!i.alg||t&&i.alg!==t)}catch{return!1}}function RR(e,t){return!!((t==="v4"||!t)&&CR.test(e)||(t==="v6"||!t)&&TR.test(e))}class _r extends pt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Se.string){const o=this._getOrReturnCtx(t);return _e(o,{code:he.invalid_type,expected:Se.string,received:o.parsedType}),He}const r=new On;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:he.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")t.data.length>o.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:he.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const a=t.data.length>o.value,s=t.data.length<o.value;(a||s)&&(i=this._getOrReturnCtx(t,i),a?_e(i,{code:he.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):s&&_e(i,{code:he.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")xR.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"email",code:he.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")ep||(ep=new RegExp(wR,"u")),ep.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"emoji",code:he.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")gR.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"uuid",code:he.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")vR.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"nanoid",code:he.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")hR.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"cuid",code:he.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")pR.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"cuid2",code:he.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")mR.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"ulid",code:he.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),_e(i,{validation:"url",code:he.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"regex",code:he.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(t,i),_e(i,{code:he.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(i=this._getOrReturnCtx(t,i),_e(i,{code:he.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(i=this._getOrReturnCtx(t,i),_e(i,{code:he.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?Z4(o).test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{code:he.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?MR.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{code:he.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?ER(o).test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{code:he.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?yR.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"duration",code:he.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?OR(t.data,o.version)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"ip",code:he.invalid_string,message:o.message}),r.dirty()):o.kind==="jwt"?AR(t.data,o.alg)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"jwt",code:he.invalid_string,message:o.message}),r.dirty()):o.kind==="cidr"?RR(t.data,o.version)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"cidr",code:he.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?$R.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"base64",code:he.invalid_string,message:o.message}),r.dirty()):o.kind==="base64url"?kR.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"base64url",code:he.invalid_string,message:o.message}),r.dirty()):wt.assertNever(o);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:he.invalid_string,...Oe.errToObj(r)})}_addCheck(t){return new _r({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Oe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Oe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Oe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Oe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Oe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Oe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Oe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Oe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Oe.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Oe.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Oe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Oe.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Oe.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...Oe.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Oe.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Oe.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Oe.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Oe.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Oe.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Oe.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Oe.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Oe.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Oe.errToObj(n)})}nonempty(t){return this.min(1,Oe.errToObj(t))}trim(){return new _r({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new _r({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new _r({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}_r.create=e=>new _r({checks:[],typeName:qe.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...ct(e)});function DR(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,o=Number.parseInt(e.toFixed(i).replace(".","")),a=Number.parseInt(t.toFixed(i).replace(".",""));return o%a/10**i}class Zi extends pt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Se.number){const o=this._getOrReturnCtx(t);return _e(o,{code:he.invalid_type,expected:Se.number,received:o.parsedType}),He}let r;const i=new On;for(const o of this._def.checks)o.kind==="int"?wt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),_e(r,{code:he.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:he.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:he.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?DR(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),_e(r,{code:he.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),_e(r,{code:he.not_finite,message:o.message}),i.dirty()):wt.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Oe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Oe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Oe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Oe.toString(n))}setLimit(t,n,r,i){return new Zi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Oe.toString(i)}]})}_addCheck(t){return new Zi({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Oe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Oe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Oe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Oe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Oe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Oe.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Oe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Oe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Oe.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&wt.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Zi.create=e=>new Zi({checks:[],typeName:qe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ct(e)});class Xi extends pt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Se.bigint)return this._getInvalidInput(t);let r;const i=new On;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:he.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:he.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:he.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):wt.assertNever(o);return{status:i.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return _e(n,{code:he.invalid_type,expected:Se.bigint,received:n.parsedType}),He}gte(t,n){return this.setLimit("min",t,!0,Oe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Oe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Oe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Oe.toString(n))}setLimit(t,n,r,i){return new Xi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Oe.toString(i)}]})}_addCheck(t){return new Xi({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Oe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Oe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Oe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Oe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Oe.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Xi.create=e=>new Xi({checks:[],typeName:qe.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...ct(e)});class $l extends pt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Se.boolean){const r=this._getOrReturnCtx(t);return _e(r,{code:he.invalid_type,expected:Se.boolean,received:r.parsedType}),He}return Nn(t.data)}}$l.create=e=>new $l({typeName:qe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ct(e)});class zo extends pt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Se.date){const o=this._getOrReturnCtx(t);return _e(o,{code:he.invalid_type,expected:Se.date,received:o.parsedType}),He}if(Number.isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return _e(o,{code:he.invalid_date}),He}const r=new On;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:he.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:he.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):wt.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new zo({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Oe.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Oe.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}zo.create=e=>new zo({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:qe.ZodDate,...ct(e)});class Zu extends pt{_parse(t){if(this._getType(t)!==Se.symbol){const r=this._getOrReturnCtx(t);return _e(r,{code:he.invalid_type,expected:Se.symbol,received:r.parsedType}),He}return Nn(t.data)}}Zu.create=e=>new Zu({typeName:qe.ZodSymbol,...ct(e)});class kl extends pt{_parse(t){if(this._getType(t)!==Se.undefined){const r=this._getOrReturnCtx(t);return _e(r,{code:he.invalid_type,expected:Se.undefined,received:r.parsedType}),He}return Nn(t.data)}}kl.create=e=>new kl({typeName:qe.ZodUndefined,...ct(e)});class Ml extends pt{_parse(t){if(this._getType(t)!==Se.null){const r=this._getOrReturnCtx(t);return _e(r,{code:he.invalid_type,expected:Se.null,received:r.parsedType}),He}return Nn(t.data)}}Ml.create=e=>new Ml({typeName:qe.ZodNull,...ct(e)});class es extends pt{constructor(){super(...arguments),this._any=!0}_parse(t){return Nn(t.data)}}es.create=e=>new es({typeName:qe.ZodAny,...ct(e)});class Io extends pt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Nn(t.data)}}Io.create=e=>new Io({typeName:qe.ZodUnknown,...ct(e)});class _i extends pt{_parse(t){const n=this._getOrReturnCtx(t);return _e(n,{code:he.invalid_type,expected:Se.never,received:n.parsedType}),He}}_i.create=e=>new _i({typeName:qe.ZodNever,...ct(e)});class Xu extends pt{_parse(t){if(this._getType(t)!==Se.undefined){const r=this._getOrReturnCtx(t);return _e(r,{code:he.invalid_type,expected:Se.void,received:r.parsedType}),He}return Nn(t.data)}}Xu.create=e=>new Xu({typeName:qe.ZodVoid,...ct(e)});class Sr extends pt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==Se.array)return _e(n,{code:he.invalid_type,expected:Se.array,received:n.parsedType}),He;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(a||s)&&(_e(n,{code:a?he.too_big:he.too_small,minimum:s?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(_e(n,{code:he.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(_e(n,{code:he.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>i.type._parseAsync(new Ur(n,a,n.path,s)))).then(a=>On.mergeArray(r,a));const o=[...n.data].map((a,s)=>i.type._parseSync(new Ur(n,a,n.path,s)));return On.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Sr({...this._def,minLength:{value:t,message:Oe.toString(n)}})}max(t,n){return new Sr({...this._def,maxLength:{value:t,message:Oe.toString(n)}})}length(t,n){return new Sr({...this._def,exactLength:{value:t,message:Oe.toString(n)}})}nonempty(t){return this.min(1,t)}}Sr.create=(e,t)=>new Sr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:qe.ZodArray,...ct(t)});function Ma(e){if(e instanceof tn){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Br.create(Ma(r))}return new tn({...e._def,shape:()=>t})}else return e instanceof Sr?new Sr({...e._def,type:Ma(e.element)}):e instanceof Br?Br.create(Ma(e.unwrap())):e instanceof Ji?Ji.create(Ma(e.unwrap())):e instanceof Hr?Hr.create(e.items.map(t=>Ma(t))):e}class tn extends pt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=wt.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Se.object){const c=this._getOrReturnCtx(t);return _e(c,{code:he.invalid_type,expected:Se.object,received:c.parsedType}),He}const{status:r,ctx:i}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof _i&&this._def.unknownKeys==="strip"))for(const c in i.data)a.includes(c)||s.push(c);const l=[];for(const c of a){const u=o[c],d=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Ur(i,d,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof _i){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(c==="strict")s.length>0&&(_e(i,{code:he.unrecognized_keys,keys:s}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of s){const d=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Ur(i,d,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>On.mergeObjectSync(r,c)):On.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return Oe.errToObj,new tn({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,a;const i=((a=(o=this._def).errorMap)==null?void 0:a.call(o,n,r).message)??r.defaultError;return n.code==="unrecognized_keys"?{message:Oe.errToObj(t).message??i}:{message:i}}}:{}})}strip(){return new tn({...this._def,unknownKeys:"strip"})}passthrough(){return new tn({...this._def,unknownKeys:"passthrough"})}extend(t){return new tn({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new tn({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:qe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new tn({...this._def,catchall:t})}pick(t){const n={};for(const r of wt.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new tn({...this._def,shape:()=>n})}omit(t){const n={};for(const r of wt.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new tn({...this._def,shape:()=>n})}deepPartial(){return Ma(this)}partial(t){const n={};for(const r of wt.objectKeys(this.shape)){const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}return new tn({...this._def,shape:()=>n})}required(t){const n={};for(const r of wt.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Br;)o=o._def.innerType;n[r]=o}return new tn({...this._def,shape:()=>n})}keyof(){return X4(wt.objectKeys(this.shape))}}tn.create=(e,t)=>new tn({shape:()=>e,unknownKeys:"strip",catchall:_i.create(),typeName:qe.ZodObject,...ct(t)});tn.strictCreate=(e,t)=>new tn({shape:()=>e,unknownKeys:"strict",catchall:_i.create(),typeName:qe.ZodObject,...ct(t)});tn.lazycreate=(e,t)=>new tn({shape:e,unknownKeys:"strip",catchall:_i.create(),typeName:qe.ZodObject,...ct(t)});class El extends pt{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(o){for(const s of o)if(s.result.status==="valid")return s.result;for(const s of o)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=o.map(s=>new er(s.ctx.common.issues));return _e(n,{code:he.invalid_union,unionErrors:a}),He}if(n.common.async)return Promise.all(r.map(async o=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let o;const a=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!o&&(o={result:u,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const s=a.map(l=>new er(l));return _e(n,{code:he.invalid_union,unionErrors:s}),He}}get options(){return this._def.options}}El.create=(e,t)=>new El({options:e,typeName:qe.ZodUnion,...ct(t)});const ai=e=>e instanceof Rl?ai(e.schema):e instanceof $r?ai(e.innerType()):e instanceof Dl?[e.value]:e instanceof Ki?e.options:e instanceof Il?wt.objectValues(e.enum):e instanceof jl?ai(e._def.innerType):e instanceof kl?[void 0]:e instanceof Ml?[null]:e instanceof Br?[void 0,...ai(e.unwrap())]:e instanceof Ji?[null,...ai(e.unwrap())]:e instanceof s0||e instanceof Nl?ai(e.unwrap()):e instanceof Pl?ai(e._def.innerType):[];class rf extends pt{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Se.object)return _e(n,{code:he.invalid_type,expected:Se.object,received:n.parsedType}),He;const r=this.discriminator,i=n.data[r],o=this.optionsMap.get(i);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(_e(n,{code:he.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),He)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const o of n){const a=ai(o.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,o)}}return new rf({typeName:qe.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...ct(r)})}}function xm(e,t){const n=di(e),r=di(t);if(e===t)return{valid:!0,data:e};if(n===Se.object&&r===Se.object){const i=wt.objectKeys(t),o=wt.objectKeys(e).filter(s=>i.indexOf(s)!==-1),a={...e,...t};for(const s of o){const l=xm(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===Se.array&&r===Se.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let o=0;o<e.length;o++){const a=e[o],s=t[o],l=xm(a,s);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return n===Se.date&&r===Se.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Ol extends pt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(o,a)=>{if(bm(o)||bm(a))return He;const s=xm(o.value,a.value);return s.valid?((ym(o)||ym(a))&&n.dirty(),{status:n.value,value:s.data}):(_e(r,{code:he.invalid_intersection_types}),He)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Ol.create=(e,t,n)=>new Ol({left:e,right:t,typeName:qe.ZodIntersection,...ct(n)});class Hr extends pt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Se.array)return _e(r,{code:he.invalid_type,expected:Se.array,received:r.parsedType}),He;if(r.data.length<this._def.items.length)return _e(r,{code:he.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),He;!this._def.rest&&r.data.length>this._def.items.length&&(_e(r,{code:he.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((a,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new Ur(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>On.mergeArray(n,a)):On.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new Hr({...this._def,rest:t})}}Hr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Hr({items:e,typeName:qe.ZodTuple,rest:null,...ct(t)})};class Al extends pt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Se.object)return _e(r,{code:he.invalid_type,expected:Se.object,received:r.parsedType}),He;const i=[],o=this._def.keyType,a=this._def.valueType;for(const s in r.data)i.push({key:o._parse(new Ur(r,s,r.path,s)),value:a._parse(new Ur(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?On.mergeObjectAsync(n,i):On.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof pt?new Al({keyType:t,valueType:n,typeName:qe.ZodRecord,...ct(r)}):new Al({keyType:_r.create(),valueType:t,typeName:qe.ZodRecord,...ct(n)})}}class Ku extends pt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Se.map)return _e(r,{code:he.invalid_type,expected:Se.map,received:r.parsedType}),He;const i=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:i._parse(new Ur(r,s,r.path,[c,"key"])),value:o._parse(new Ur(r,l,r.path,[c,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of a){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return He;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const l of a){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return He;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}Ku.create=(e,t,n)=>new Ku({valueType:t,keyType:e,typeName:qe.ZodMap,...ct(n)});class Wo extends pt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Se.set)return _e(r,{code:he.invalid_type,expected:Se.set,received:r.parsedType}),He;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(_e(r,{code:he.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(_e(r,{code:he.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const o=this._def.valueType;function a(l){const c=new Set;for(const u of l){if(u.status==="aborted")return He;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const s=[...r.data.values()].map((l,c)=>o._parse(new Ur(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new Wo({...this._def,minSize:{value:t,message:Oe.toString(n)}})}max(t,n){return new Wo({...this._def,maxSize:{value:t,message:Oe.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Wo.create=(e,t)=>new Wo({valueType:e,minSize:null,maxSize:null,typeName:qe.ZodSet,...ct(t)});class ja extends pt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Se.function)return _e(n,{code:he.invalid_type,expected:Se.function,received:n.parsedType}),He;function r(s,l){return Gu({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Yu(),Qa].filter(c=>!!c),issueData:{code:he.invalid_arguments,argumentsError:l}})}function i(s,l){return Gu({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Yu(),Qa].filter(c=>!!c),issueData:{code:he.invalid_return_type,returnTypeError:l}})}const o={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof ts){const s=this;return Nn(async function(...l){const c=new er([]),u=await s._def.args.parseAsync(l,o).catch(h=>{throw c.addIssue(r(l,h)),c}),d=await Reflect.apply(a,this,u);return await s._def.returns._def.type.parseAsync(d,o).catch(h=>{throw c.addIssue(i(d,h)),c})})}else{const s=this;return Nn(function(...l){const c=s._def.args.safeParse(l,o);if(!c.success)throw new er([r(l,c.error)]);const u=Reflect.apply(a,this,c.data),d=s._def.returns.safeParse(u,o);if(!d.success)throw new er([i(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new ja({...this._def,args:Hr.create(t).rest(Io.create())})}returns(t){return new ja({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new ja({args:t||Hr.create([]).rest(Io.create()),returns:n||Io.create(),typeName:qe.ZodFunction,...ct(r)})}}class Rl extends pt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Rl.create=(e,t)=>new Rl({getter:e,typeName:qe.ZodLazy,...ct(t)});class Dl extends pt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return _e(n,{received:n.data,code:he.invalid_literal,expected:this._def.value}),He}return{status:"valid",value:t.data}}get value(){return this._def.value}}Dl.create=(e,t)=>new Dl({value:e,typeName:qe.ZodLiteral,...ct(t)});function X4(e,t){return new Ki({values:e,typeName:qe.ZodEnum,...ct(t)})}class Ki extends pt{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return _e(n,{expected:wt.joinValues(r),received:n.parsedType,code:he.invalid_type}),He}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return _e(n,{received:n.data,code:he.invalid_enum_value,options:r}),He}return Nn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Ki.create(t,{...this._def,...n})}exclude(t,n=this._def){return Ki.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ki.create=X4;class Il extends pt{_parse(t){const n=wt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Se.string&&r.parsedType!==Se.number){const i=wt.objectValues(n);return _e(r,{expected:wt.joinValues(i),received:r.parsedType,code:he.invalid_type}),He}if(this._cache||(this._cache=new Set(wt.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const i=wt.objectValues(n);return _e(r,{received:r.data,code:he.invalid_enum_value,options:i}),He}return Nn(t.data)}get enum(){return this._def.values}}Il.create=(e,t)=>new Il({values:e,typeName:qe.ZodNativeEnum,...ct(t)});class ts extends pt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Se.promise&&n.common.async===!1)return _e(n,{code:he.invalid_type,expected:Se.promise,received:n.parsedType}),He;const r=n.parsedType===Se.promise?n.data:Promise.resolve(n.data);return Nn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}ts.create=(e,t)=>new ts({type:e,typeName:qe.ZodPromise,...ct(t)});class $r extends pt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===qe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,o={addIssue:a=>{_e(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){const a=i.transform(r.data,o);if(r.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return He;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?He:l.status==="dirty"||n.value==="dirty"?Ea(l.value):l});{if(n.value==="aborted")return He;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?He:s.status==="dirty"||n.value==="dirty"?Ea(s.value):s}}if(i.type==="refinement"){const a=s=>{const l=i.refinement(s,o);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?He:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?He:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Bo(a))return He;const s=i.transform(a.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>Bo(a)?Promise.resolve(i.transform(a.value,o)).then(s=>({status:n.value,value:s})):He);wt.assertNever(i)}}$r.create=(e,t,n)=>new $r({schema:e,typeName:qe.ZodEffects,effect:t,...ct(n)});$r.createWithPreprocess=(e,t,n)=>new $r({schema:t,effect:{type:"preprocess",transform:e},typeName:qe.ZodEffects,...ct(n)});class Br extends pt{_parse(t){return this._getType(t)===Se.undefined?Nn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Br.create=(e,t)=>new Br({innerType:e,typeName:qe.ZodOptional,...ct(t)});class Ji extends pt{_parse(t){return this._getType(t)===Se.null?Nn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ji.create=(e,t)=>new Ji({innerType:e,typeName:qe.ZodNullable,...ct(t)});class jl extends pt{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Se.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}jl.create=(e,t)=>new jl({innerType:e,typeName:qe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ct(t)});class Pl extends pt{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Tl(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new er(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new er(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Pl.create=(e,t)=>new Pl({innerType:e,typeName:qe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ct(t)});class Ju extends pt{_parse(t){if(this._getType(t)!==Se.nan){const r=this._getOrReturnCtx(t);return _e(r,{code:he.invalid_type,expected:Se.nan,received:r.parsedType}),He}return{status:"valid",value:t.data}}}Ju.create=e=>new Ju({typeName:qe.ZodNaN,...ct(e)});const IR=Symbol("zod_brand");class s0 extends pt{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class _c extends pt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?He:o.status==="dirty"?(n.dirty(),Ea(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?He:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new _c({in:t,out:n,typeName:qe.ZodPipeline})}}class Nl extends pt{_parse(t){const n=this._def.innerType._parse(t),r=i=>(Bo(i)&&(i.value=Object.freeze(i.value)),i);return Tl(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}Nl.create=(e,t)=>new Nl({innerType:e,typeName:qe.ZodReadonly,...ct(t)});function $b(e,t){const n=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof n=="string"?{message:n}:n}function K4(e,t={},n){return e?es.create().superRefine((r,i)=>{const o=e(r);if(o instanceof Promise)return o.then(a=>{if(!a){const s=$b(t,r),l=s.fatal??n??!0;i.addIssue({code:"custom",...s,fatal:l})}});if(!o){const a=$b(t,r),s=a.fatal??n??!0;i.addIssue({code:"custom",...a,fatal:s})}}):es.create()}const jR={object:tn.lazycreate};var qe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(qe||(qe={}));const PR=(e,t={message:`Input not instance of ${e.name}`})=>K4(n=>n instanceof e,t),l0=_r.create,J4=Zi.create,NR=Ju.create,LR=Xi.create,Q4=$l.create,FR=zo.create,BR=Zu.create,zR=kl.create,WR=Ml.create,eC=es.create,UR=Io.create,HR=_i.create,VR=Xu.create,tC=Sr.create,hi=tn.create,qR=tn.strictCreate,YR=El.create,GR=rf.create,ZR=Ol.create,XR=Hr.create,KR=Al.create,JR=Ku.create,QR=Wo.create,e9=ja.create,t9=Rl.create,n9=Dl.create,nC=Ki.create,r9=Il.create,i9=ts.create,kb=$r.create,o9=Br.create,a9=Ji.create,rC=$r.createWithPreprocess,s9=_c.create,l9=()=>l0().optional(),c9=()=>J4().optional(),u9=()=>Q4().optional(),al={string:e=>_r.create({...e,coerce:!0}),number:e=>Zi.create({...e,coerce:!0}),boolean:e=>$l.create({...e,coerce:!0}),bigint:e=>Xi.create({...e,coerce:!0}),date:e=>zo.create({...e,coerce:!0})},d9=He,sl=Object.freeze(Object.defineProperty({__proto__:null,BRAND:IR,DIRTY:Ea,EMPTY_PATH:fR,INVALID:He,NEVER:d9,OK:Nn,ParseStatus:On,Schema:pt,ZodAny:es,ZodArray:Sr,ZodBigInt:Xi,ZodBoolean:$l,ZodBranded:s0,ZodCatch:Pl,ZodDate:zo,ZodDefault:jl,ZodDiscriminatedUnion:rf,ZodEffects:$r,ZodEnum:Ki,ZodError:er,get ZodFirstPartyTypeKind(){return qe},ZodFunction:ja,ZodIntersection:Ol,ZodIssueCode:he,ZodLazy:Rl,ZodLiteral:Dl,ZodMap:Ku,ZodNaN:Ju,ZodNativeEnum:Il,ZodNever:_i,ZodNull:Ml,ZodNullable:Ji,ZodNumber:Zi,ZodObject:tn,ZodOptional:Br,ZodParsedType:Se,ZodPipeline:_c,ZodPromise:ts,ZodReadonly:Nl,ZodRecord:Al,ZodSchema:pt,ZodSet:Wo,ZodString:_r,ZodSymbol:Zu,ZodTransformer:$r,ZodTuple:Hr,ZodType:pt,ZodUndefined:kl,ZodUnion:El,ZodUnknown:Io,ZodVoid:Xu,addIssueToContext:_e,any:eC,array:tC,bigint:LR,boolean:Q4,coerce:al,custom:K4,date:FR,datetimeRegex:Z4,defaultErrorMap:Qa,discriminatedUnion:GR,effect:kb,enum:nC,function:e9,getErrorMap:Yu,getParsedType:di,instanceof:PR,intersection:ZR,isAborted:bm,isAsync:Tl,isDirty:ym,isValid:Bo,late:jR,lazy:t9,literal:n9,makeIssue:Gu,map:JR,nan:NR,nativeEnum:r9,never:HR,null:WR,nullable:a9,number:J4,object:hi,get objectUtil(){return vm},oboolean:u9,onumber:c9,optional:o9,ostring:l9,pipeline:s9,preprocess:rC,promise:i9,quotelessJson:uR,record:KR,set:QR,setErrorMap:dR,strictObject:qR,string:l0,symbol:BR,transformer:kb,tuple:XR,undefined:zR,union:YR,unknown:UR,get util(){return wt},void:VR},Symbol.toStringTag,{value:"Module"})),of=()=>{const e=je.c(43),{texts:t}=v.useContext(rn),{formValidation:n}=t;let r;e[0]!==n?(r=(O,L)=>{const z=L===void 0?!1:L;let N=(O!=null&&O.useCoerce?al:sl).string({invalid_type_error:n.required,required_error:n.required});return z||(N=N.min(1,n.required)),O!=null&&O.email&&(N=N.email(n.invalidEmail)),O!=null&&O.length&&(N=N.min(O.length,n.length(O.length))),O!=null&&O.minLength&&(N=N.min(O.minLength,n.minLength(O.minLength))),O!=null&&O.maxLength&&(N=N.max(O.maxLength,n.maxLength(O.maxLength))),O!=null&&O.numeric&&(N=N.regex(/^\d+$/,n.noCharactersOtherThanNumbers)),O!=null&&O.regex&&(N=N.regex(O.regex,n.invalidFormat)),N.transform(f9)},e[0]=n,e[1]=r):r=e[1];const i=r;let o;e[2]!==i?(o=O=>i(O,!1),e[2]=i,e[3]=o):o=e[3];const a=o;let s;e[4]!==i?(s=O=>i(O,!0).nullable().optional().transform(h9),e[4]=i,e[5]=s):s=e[5];const l=s;let c;e[6]!==n?(c=O=>{const L=(O==null?void 0:O.min)??Number.MIN_SAFE_INTEGER,z=(O==null?void 0:O.max)??Number.MAX_SAFE_INTEGER,N=(O!=null&&O.useCoerce?al:sl).number({invalid_type_error:n.required,required_error:n.required}).min(L,n.lessThanMin(L)).max(z,n.moreThanMax(z));return N.transform(p9),N},e[6]=n,e[7]=c):c=e[7];const u=c;let d;e[8]!==u?(d=O=>u(O).nullable().optional().transform(m9),e[8]=u,e[9]=d):d=e[9];const f=d;let h;e[10]!==n.required?(h=O=>((O==null?void 0:O.useCoerce)===!1?sl:al).boolean({invalid_type_error:n.required,required_error:n.required}).transform(g9),e[10]=n.required,e[11]=h):h=e[11];const p=h;let m;e[12]!==n.invalidDate||e[13]!==n.required?(m=O=>(O!=null&&O.useCoerce?al:sl).string({invalid_type_error:n.required,required_error:n.required}).refine(h4,{message:n.invalidDate}).transform(v9),e[12]=n.invalidDate,e[13]=n.required,e[14]=m):m=e[14];const g=m;let x;e[15]!==g?(x=O=>rC(b9,g(O).nullable().optional()).transform(y9),e[15]=g,e[16]=x):x=e[16];const _=x;let w;e[17]!==n.required?(w=(O,L)=>nC(O,{invalid_type_error:n.required,required_error:n.required}).transform(x9),e[17]=n.required,e[18]=w):w=e[18];const C=w;let b;e[19]!==C?(b=(O,L)=>C(O,L).nullable().transform(w9),e[19]=C,e[20]=b):b=e[20];const S=b;let M;e[21]!==f?(M=O=>hi({id:f({useCoerce:!0})}).nullable().transform(_9),e[21]=f,e[22]=M):M=e[22];const $=M;let k;e[23]!==u?(k=O=>hi({id:u()}).transform(C9),e[23]=u,e[24]=k):k=e[24];const R=k;let T;e[25]!==l?(T=O=>hi({id:l({useCoerce:!0})}).nullable().transform(S9),e[25]=l,e[26]=T):T=e[26];const E=T;let A;e[27]!==a?(A=O=>hi({id:a()}).transform(T9),e[27]=a,e[28]=A):A=e[28];const I=A,j=k9;let D;return e[29]!==p||e[30]!==_||e[31]!==g||e[32]!==S||e[33]!==C||e[34]!==f||e[35]!==u||e[36]!==$||e[37]!==R||e[38]!==E||e[39]!==I||e[40]!==l||e[41]!==a?(D={zString:l,zStringRequired:a,zNumber:f,zNumberRequired:u,zBool:p,zDate:_,zDateRequired:g,zEnum:S,zEnumRequired:C,zObjectIdInt:$,zObjectIdIntRequired:R,zObjectIdStr:E,zObjectIdStrRequired:I,zFile:j},e[29]=p,e[30]=_,e[31]=g,e[32]=S,e[33]=C,e[34]=f,e[35]=u,e[36]=$,e[37]=R,e[38]=E,e[39]=I,e[40]=l,e[41]=a,e[42]=D):D=e[42],D};function f9(e){return e??null}function h9(e){return e??null}function p9(e){return e??null}function m9(e){return e??null}function g9(e){return e??null}function v9(e){return e??null}function b9(e){return e===""?null:e}function y9(e){return e??null}function x9(e){return e??null}function w9(e){return e??null}function _9(e){return e??null}function C9(e){return e??null}function S9(e){return e??null}function T9(e){return e??null}function $9(e){return Array.from(e??[])}function k9(e){const{required:t,multiple:n,maxFileSize:r}=e;return eC().transform($9).refine(o=>!t||(o==null?void 0:o.length)>0,"File is required.").refine(o=>n||(o==null?void 0:o.length)<=1,"Multiple files not allowed.").refine(o=>o.every(a=>a.size<=r),`Maximum file size is ${Xa(r)}.`).transform(o=>(n?o:o==null?void 0:o[0])??null)}const iC=(e,t)=>{const n=je.c(4);let r,i;n[0]!==t||n[1]!==e?(r=()=>{const o=a=>{e.some(s=>s.current&&s.current.contains(a.target))||t()};return document.addEventListener("mouseup",o),()=>{document.removeEventListener("mouseup",o)}},i=[e,t],n[0]=t,n[1]=e,n[2]=r,n[3]=i):(r=n[2],i=n[3]),v.useEffect(r,i)},oC=()=>{const e=je.c(4),{user:t}=v.useContext(r4);let n;e[0]!==(t==null?void 0:t.permissions)?(n=(o,a)=>{const s=a===void 0?"any":a;return o.length===0?!0:s==="any"?o.some(l=>{var c;return(c=t==null?void 0:t.permissions)==null?void 0:c.includes(l)}):o.every(l=>{var c;return(c=t==null?void 0:t.permissions)==null?void 0:c.includes(l)})},e[0]=t==null?void 0:t.permissions,e[1]=n):n=e[1];const r=n;let i;return e[2]!==r?(i={checkUserHasPermissions:r},e[2]=r,e[3]=i):i=e[3],i},aC=(e,t)=>{const n=je.c(6);let r,i;n[0]!==e?(r=()=>(document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}),i=[e],n[0]=e,n[1]=r,n[2]=i):(r=n[1],i=n[2]),v.useEffect(r,i);let o,a;n[3]!==t?(o=()=>t===void 0?M9:(document.addEventListener("keyup",t),()=>{document.removeEventListener("keyup",t)}),a=[t],n[3]=t,n[4]=o,n[5]=a):(o=n[4],a=n[5]),v.useEffect(o,a)};function M9(){}const c0=(e,t,n)=>{let r;e:{if(n){r=e;break e}if(e!=="date"&&e!=="datetime-local"&&e!=="time"){r=e;break e}if(!t){r="text";break e}r=e}return r},sC=()=>{const{addNotification:e}=tf(),{texts:{clipboard:t}}=v.useContext(rn);return{copyToClipboard:v.useCallback(async r=>{var i;try{await((i=navigator.clipboard)==null?void 0:i.writeText(r)),e(t.copySuccess(r),"prompt")}catch(o){console.error(o),e(t.copyError,"danger")}},[e,t])}},Cc=()=>{const e=je.c(7),[t,n]=v.useState(window.innerWidth),[r,i]=v.useState(window.innerHeight);let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{n(window.innerWidth),i(window.innerHeight)},e[0]=o):o=e[0];const a=o;let s,l;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=()=>(window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)),l=[],e[1]=s,e[2]=l):(s=e[1],l=e[2]),v.useEffect(s,l);const c=t<992;let u;return e[3]!==r||e[4]!==c||e[5]!==t?(u={width:t,height:r,isMobile:c},e[3]=r,e[4]=c,e[5]=t,e[6]=u):u=e[6],u},lC=v.createContext({addHelmet:e=>{},removeHelmet:()=>{}}),cC=v.createContext(void 0),Mb={falseIfNotInit:!1},af=e=>{const{falseIfNotInit:t}=e===void 0?Mb:e,n=t===void 0?Mb.falseIfNotInit:t,r=v.useContext(cC);if(!n&&r===void 0)throw new Error("FormDisabledProvider not initilized. Probably tried to use useFormDisabledContext outside FormDisabledProvider.");return r??!1};class E9 extends Error{constructor(t,n){const r=new.target.prototype;super(`${t}: Status code '${n}'`),this.statusCode=n,this.__proto__=r}}class O9 extends Error{constructor(t="A timeout occurred."){const n=new.target.prototype;super(t),this.__proto__=n}}class wm extends Error{constructor(t="An abort occurred."){const n=new.target.prototype;super(t),this.__proto__=n}}class A9 extends Error{constructor(t,n){const r=new.target.prototype;super(t),this.transport=n,this.errorType="UnsupportedTransportError",this.__proto__=r}}class R9 extends Error{constructor(t,n){const r=new.target.prototype;super(t),this.transport=n,this.errorType="DisabledTransportError",this.__proto__=r}}class D9 extends Error{constructor(t,n){const r=new.target.prototype;super(t),this.transport=n,this.errorType="FailedToStartTransportError",this.__proto__=r}}class I9 extends Error{constructor(t){const n=new.target.prototype;super(t),this.errorType="FailedToNegotiateWithServerError",this.__proto__=n}}class j9 extends Error{constructor(t,n){const r=new.target.prototype;super(t),this.innerErrors=n,this.__proto__=r}}exports.LogLevel=void 0;(function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"})(exports.LogLevel||(exports.LogLevel={}));class Qu{constructor(){}log(t,n){}}Qu.instance=new Qu;const P9="10.0.0";class ku{static isRequired(t,n){if(t==null)throw new Error(`The '${n}' argument is required.`)}static isNotEmpty(t,n){if(!t||t.match(/^\s*$/))throw new Error(`The '${n}' argument should not be empty.`)}static isIn(t,n,r){if(!(t in n))throw new Error(`Unknown ${r} value: ${t}.`)}}class Tr{static get isBrowser(){return!Tr.isNode&&typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return!Tr.isNode&&typeof self=="object"&&"importScripts"in self}static get isReactNative(){return!Tr.isNode&&typeof window=="object"&&typeof window.document>"u"}static get isNode(){return typeof process<"u"&&process.release&&process.release.name==="node"}}function uC(e,t){let n="";return ns(e)?(n=`Binary data of length ${e.byteLength}`,t&&(n+=`. Content: '${N9(e)}'`)):typeof e=="string"&&(n=`String data of length ${e.length}`,t&&(n+=`. Content: '${e}'`)),n}function N9(e){const t=new Uint8Array(e);let n="";return t.forEach(r=>{const i=r<16?"0":"";n+=`0x${i}${r.toString(16)} `}),n.substring(0,n.length-1)}function ns(e){return e&&typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||e.constructor&&e.constructor.name==="ArrayBuffer")}async function L9(e,t,n,r,i,o){const a={},[s,l]=dC();a[s]=l,e.log(exports.LogLevel.Trace,`(${t} transport) sending data. ${uC(i,o.logMessageContent)}.`);const c=ns(i)?"arraybuffer":"text",u=await n.post(r,{content:i,headers:{...a,...o.headers},responseType:c,timeout:o.timeout,withCredentials:o.withCredentials});e.log(exports.LogLevel.Trace,`(${t} transport) request complete. Response status: ${u.statusCode}.`)}function F9(e){return e===void 0?new _m(exports.LogLevel.Information):e===null?Qu.instance:e.log!==void 0?e:new _m(e)}class B9{constructor(t,n){this._subject=t,this._observer=n}dispose(){const t=this._subject.observers.indexOf(this._observer);t>-1&&this._subject.observers.splice(t,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(n=>{})}}class _m{constructor(t){this._minLevel=t,this.out=console}log(t,n){if(t>=this._minLevel){const r=`[${new Date().toISOString()}] ${exports.LogLevel[t]}: ${n}`;switch(t){case exports.LogLevel.Critical:case exports.LogLevel.Error:this.out.error(r);break;case exports.LogLevel.Warning:this.out.warn(r);break;case exports.LogLevel.Information:this.out.info(r);break;default:this.out.log(r);break}}}}function dC(){let e="X-SignalR-User-Agent";return Tr.isNode&&(e="User-Agent"),[e,z9(P9,W9(),H9(),U9())]}function z9(e,t,n,r){let i="Microsoft SignalR/";const o=e.split(".");return i+=`${o[0]}.${o[1]}`,i+=` (${e}; `,t&&t!==""?i+=`${t}; `:i+="Unknown OS; ",i+=`${n}`,r?i+=`; ${r}`:i+="; Unknown Runtime Version",i+=")",i}function W9(){if(Tr.isNode)switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}else return""}function U9(){if(Tr.isNode)return process.versions.node}function H9(){return Tr.isNode?"NodeJS":"Browser"}function tp(e){return e.stack?e.stack:e.message?e.message:`${e}`}function V9(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("could not find global")}class cr{static write(t){return`${t}${cr.RecordSeparator}`}static parse(t){if(t[t.length-1]!==cr.RecordSeparator)throw new Error("Message is incomplete.");const n=t.split(cr.RecordSeparator);return n.pop(),n}}cr.RecordSeparatorCode=30;cr.RecordSeparator=String.fromCharCode(cr.RecordSeparatorCode);class q9{writeHandshakeRequest(t){return cr.write(JSON.stringify(t))}parseHandshakeResponse(t){let n,r;if(ns(t)){const s=new Uint8Array(t),l=s.indexOf(cr.RecordSeparatorCode);if(l===-1)throw new Error("Message is incomplete.");const c=l+1;n=String.fromCharCode.apply(null,Array.prototype.slice.call(s.slice(0,c))),r=s.byteLength>c?s.slice(c).buffer:null}else{const s=t,l=s.indexOf(cr.RecordSeparator);if(l===-1)throw new Error("Message is incomplete.");const c=l+1;n=s.substring(0,c),r=s.length>c?s.substring(c):null}const i=cr.parse(n),o=JSON.parse(i[0]);if(o.type)throw new Error("Expected a handshake response from the server.");return[r,o]}}exports.MessageType=void 0;(function(e){e[e.Invocation=1]="Invocation",e[e.StreamItem=2]="StreamItem",e[e.Completion=3]="Completion",e[e.StreamInvocation=4]="StreamInvocation",e[e.CancelInvocation=5]="CancelInvocation",e[e.Ping=6]="Ping",e[e.Close=7]="Close",e[e.Ack=8]="Ack",e[e.Sequence=9]="Sequence"})(exports.MessageType||(exports.MessageType={}));class Y9{constructor(){this.observers=[]}next(t){for(const n of this.observers)n.next(t)}error(t){for(const n of this.observers)n.error&&n.error(t)}complete(){for(const t of this.observers)t.complete&&t.complete()}subscribe(t){return this.observers.push(t),new B9(this,t)}}class G9{constructor(t,n,r){this._bufferSize=1e5,this._messages=[],this._totalMessageCount=0,this._waitForSequenceMessage=!1,this._nextReceivingSequenceId=1,this._latestReceivedSequenceId=0,this._bufferedByteCount=0,this._reconnectInProgress=!1,this._protocol=t,this._connection=n,this._bufferSize=r}async _send(t){const n=this._protocol.writeMessage(t);let r=Promise.resolve();if(this._isInvocationMessage(t)){this._totalMessageCount++;let i=()=>{},o=()=>{};ns(n)?this._bufferedByteCount+=n.byteLength:this._bufferedByteCount+=n.length,this._bufferedByteCount>=this._bufferSize&&(r=new Promise((a,s)=>{i=a,o=s})),this._messages.push(new Z9(n,this._totalMessageCount,i,o))}try{this._reconnectInProgress||await this._connection.send(n)}catch{this._disconnected()}await r}_ack(t){let n=-1;for(let r=0;r<this._messages.length;r++){const i=this._messages[r];if(i._id<=t.sequenceId)n=r,ns(i._message)?this._bufferedByteCount-=i._message.byteLength:this._bufferedByteCount-=i._message.length,i._resolver();else if(this._bufferedByteCount<this._bufferSize)i._resolver();else break}n!==-1&&(this._messages=this._messages.slice(n+1))}_shouldProcessMessage(t){if(this._waitForSequenceMessage)return t.type!==exports.MessageType.Sequence?!1:(this._waitForSequenceMessage=!1,!0);if(!this._isInvocationMessage(t))return!0;const n=this._nextReceivingSequenceId;return this._nextReceivingSequenceId++,n<=this._latestReceivedSequenceId?(n===this._latestReceivedSequenceId&&this._ackTimer(),!1):(this._latestReceivedSequenceId=n,this._ackTimer(),!0)}_resetSequence(t){if(t.sequenceId>this._nextReceivingSequenceId){this._connection.stop(new Error("Sequence ID greater than amount of messages we've received."));return}this._nextReceivingSequenceId=t.sequenceId}_disconnected(){this._reconnectInProgress=!0,this._waitForSequenceMessage=!0}async _resend(){const t=this._messages.length!==0?this._messages[0]._id:this._totalMessageCount+1;await this._connection.send(this._protocol.writeMessage({type:exports.MessageType.Sequence,sequenceId:t}));const n=this._messages;for(const r of n)await this._connection.send(r._message);this._reconnectInProgress=!1}_dispose(t){t??(t=new Error("Unable to reconnect to server."));for(const n of this._messages)n._rejector(t)}_isInvocationMessage(t){switch(t.type){case exports.MessageType.Invocation:case exports.MessageType.StreamItem:case exports.MessageType.Completion:case exports.MessageType.StreamInvocation:case exports.MessageType.CancelInvocation:return!0;case exports.MessageType.Close:case exports.MessageType.Sequence:case exports.MessageType.Ping:case exports.MessageType.Ack:return!1}}_ackTimer(){this._ackTimerHandle===void 0&&(this._ackTimerHandle=setTimeout(async()=>{try{this._reconnectInProgress||await this._connection.send(this._protocol.writeMessage({type:exports.MessageType.Ack,sequenceId:this._latestReceivedSequenceId}))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0},1e3))}}class Z9{constructor(t,n,r,i){this._message=t,this._id=n,this._resolver=r,this._rejector=i}}const X9=30*1e3,K9=15*1e3,J9=1e5;exports.HubConnectionState=void 0;(function(e){e.Disconnected="Disconnected",e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Reconnecting="Reconnecting"})(exports.HubConnectionState||(exports.HubConnectionState={}));class u0{static create(t,n,r,i,o,a,s){return new u0(t,n,r,i,o,a,s)}constructor(t,n,r,i,o,a,s){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(exports.LogLevel.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},ku.isRequired(t,"connection"),ku.isRequired(n,"logger"),ku.isRequired(r,"protocol"),this.serverTimeoutInMilliseconds=o??X9,this.keepAliveIntervalInMilliseconds=a??K9,this._statefulReconnectBufferSize=s??J9,this._logger=n,this._protocol=r,this.connection=t,this._reconnectPolicy=i,this._handshakeProtocol=new q9,this.connection.onreceive=l=>this._processIncomingData(l),this.connection.onclose=l=>this._connectionClosed(l),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=exports.HubConnectionState.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:exports.MessageType.Ping})}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(t){if(this._connectionState!==exports.HubConnectionState.Disconnected&&this._connectionState!==exports.HubConnectionState.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!t)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=t}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}async _startWithStateTransitions(){if(this._connectionState!==exports.HubConnectionState.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=exports.HubConnectionState.Connecting,this._logger.log(exports.LogLevel.Debug,"Starting HubConnection.");try{await this._startInternal(),Tr.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=exports.HubConnectionState.Connected,this._connectionStarted=!0,this._logger.log(exports.LogLevel.Debug,"HubConnection connected successfully.")}catch(t){return this._connectionState=exports.HubConnectionState.Disconnected,this._logger.log(exports.LogLevel.Debug,`HubConnection failed to start successfully because of error '${t}'.`),Promise.reject(t)}}async _startInternal(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;const t=new Promise((n,r)=>{this._handshakeResolver=n,this._handshakeRejecter=r});await this.connection.start(this._protocol.transferFormat);try{let n=this._protocol.version;this.connection.features.reconnect||(n=1);const r={protocol:this._protocol.name,version:n};if(this._logger.log(exports.LogLevel.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(r)),this._logger.log(exports.LogLevel.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),await t,this._stopDuringStartError)throw this._stopDuringStartError;(this.connection.features.reconnect||!1)&&(this._messageBuffer=new G9(this._protocol,this.connection,this._statefulReconnectBufferSize),this.connection.features.disconnected=this._messageBuffer._disconnected.bind(this._messageBuffer),this.connection.features.resend=()=>{if(this._messageBuffer)return this._messageBuffer._resend()}),this.connection.features.inherentKeepAlive||await this._sendMessage(this._cachedPingMessage)}catch(n){throw this._logger.log(exports.LogLevel.Debug,`Hub handshake failed with error '${n}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(n),n}}async stop(){const t=this._startPromise;this.connection.features.reconnect=!1,this._stopPromise=this._stopInternal(),await this._stopPromise;try{await t}catch{}}_stopInternal(t){if(this._connectionState===exports.HubConnectionState.Disconnected)return this._logger.log(exports.LogLevel.Debug,`Call to HubConnection.stop(${t}) ignored because it is already in the disconnected state.`),Promise.resolve();if(this._connectionState===exports.HubConnectionState.Disconnecting)return this._logger.log(exports.LogLevel.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;const n=this._connectionState;return this._connectionState=exports.HubConnectionState.Disconnecting,this._logger.log(exports.LogLevel.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(exports.LogLevel.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(n===exports.HubConnectionState.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=t||new wm("The connection was stopped before the hub handshake could complete."),this.connection.stop(t))}async _sendCloseMessage(){try{await this._sendWithProtocol(this._createCloseMessage())}catch{}}stream(t,...n){const[r,i]=this._replaceStreamingParams(n),o=this._createStreamInvocation(t,n,i);let a;const s=new Y9;return s.cancelCallback=()=>{const l=this._createCancelInvocation(o.invocationId);return delete this._callbacks[o.invocationId],a.then(()=>this._sendWithProtocol(l))},this._callbacks[o.invocationId]=(l,c)=>{if(c){s.error(c);return}else l&&(l.type===exports.MessageType.Completion?l.error?s.error(new Error(l.error)):s.complete():s.next(l.item))},a=this._sendWithProtocol(o).catch(l=>{s.error(l),delete this._callbacks[o.invocationId]}),this._launchStreams(r,a),s}_sendMessage(t){return this._resetKeepAliveInterval(),this.connection.send(t)}_sendWithProtocol(t){return this._messageBuffer?this._messageBuffer._send(t):this._sendMessage(this._protocol.writeMessage(t))}send(t,...n){const[r,i]=this._replaceStreamingParams(n),o=this._sendWithProtocol(this._createInvocation(t,n,!0,i));return this._launchStreams(r,o),o}invoke(t,...n){const[r,i]=this._replaceStreamingParams(n),o=this._createInvocation(t,n,!1,i);return new Promise((s,l)=>{this._callbacks[o.invocationId]=(u,d)=>{if(d){l(d);return}else u&&(u.type===exports.MessageType.Completion?u.error?l(new Error(u.error)):s(u.result):l(new Error(`Unexpected message type: ${u.type}`)))};const c=this._sendWithProtocol(o).catch(u=>{l(u),delete this._callbacks[o.invocationId]});this._launchStreams(r,c)})}on(t,n){!t||!n||(t=t.toLowerCase(),this._methods[t]||(this._methods[t]=[]),this._methods[t].indexOf(n)===-1&&this._methods[t].push(n))}off(t,n){if(!t)return;t=t.toLowerCase();const r=this._methods[t];if(r)if(n){const i=r.indexOf(n);i!==-1&&(r.splice(i,1),r.length===0&&delete this._methods[t])}else delete this._methods[t]}onclose(t){t&&this._closedCallbacks.push(t)}onreconnecting(t){t&&this._reconnectingCallbacks.push(t)}onreconnected(t){t&&this._reconnectedCallbacks.push(t)}_processIncomingData(t){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(t=this._processHandshakeResponse(t),this._receivedHandshakeResponse=!0),t){const n=this._protocol.parseMessages(t,this._logger);for(const r of n)if(!(this._messageBuffer&&!this._messageBuffer._shouldProcessMessage(r)))switch(r.type){case exports.MessageType.Invocation:this._invokeClientMethod(r).catch(i=>{this._logger.log(exports.LogLevel.Error,`Invoke client method threw error: ${tp(i)}`)});break;case exports.MessageType.StreamItem:case exports.MessageType.Completion:{const i=this._callbacks[r.invocationId];if(i){r.type===exports.MessageType.Completion&&delete this._callbacks[r.invocationId];try{i(r)}catch(o){this._logger.log(exports.LogLevel.Error,`Stream callback threw error: ${tp(o)}`)}}break}case exports.MessageType.Ping:break;case exports.MessageType.Close:{this._logger.log(exports.LogLevel.Information,"Close message received from server.");const i=r.error?new Error("Server returned an error on close: "+r.error):void 0;r.allowReconnect===!0?this.connection.stop(i):this._stopPromise=this._stopInternal(i);break}case exports.MessageType.Ack:this._messageBuffer&&this._messageBuffer._ack(r);break;case exports.MessageType.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(r);break;default:this._logger.log(exports.LogLevel.Warning,`Invalid message type: ${r.type}.`);break}}this._resetTimeoutPeriod()}_processHandshakeResponse(t){let n,r;try{[r,n]=this._handshakeProtocol.parseHandshakeResponse(t)}catch(i){const o="Error parsing handshake response: "+i;this._logger.log(exports.LogLevel.Error,o);const a=new Error(o);throw this._handshakeRejecter(a),a}if(n.error){const i="Server returned handshake error: "+n.error;this._logger.log(exports.LogLevel.Error,i);const o=new Error(i);throw this._handshakeRejecter(o),o}else this._logger.log(exports.LogLevel.Debug,"Server handshake complete.");return this._handshakeResolver(),r}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if(!this.connection.features||!this.connection.features.inherentKeepAlive){this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds);let t=this._nextKeepAlive-new Date().getTime();if(t<0){this._connectionState===exports.HubConnectionState.Connected&&this._trySendPingMessage();return}this._pingServerHandle===void 0&&(t<0&&(t=0),this._pingServerHandle=setTimeout(async()=>{this._connectionState===exports.HubConnectionState.Connected&&await this._trySendPingMessage()},t))}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}async _invokeClientMethod(t){const n=t.target.toLowerCase(),r=this._methods[n];if(!r){this._logger.log(exports.LogLevel.Warning,`No client method with the name '${n}' found.`),t.invocationId&&(this._logger.log(exports.LogLevel.Warning,`No result given for '${n}' method and invocation ID '${t.invocationId}'.`),await this._sendWithProtocol(this._createCompletionMessage(t.invocationId,"Client didn't provide a result.",null)));return}const i=r.slice(),o=!!t.invocationId;let a,s,l;for(const c of i)try{const u=a;a=await c.apply(this,t.arguments),o&&a&&u&&(this._logger.log(exports.LogLevel.Error,`Multiple results provided for '${n}'. Sending error to server.`),l=this._createCompletionMessage(t.invocationId,"Client provided multiple results.",null)),s=void 0}catch(u){s=u,this._logger.log(exports.LogLevel.Error,`A callback for the method '${n}' threw error '${u}'.`)}l?await this._sendWithProtocol(l):o?(s?l=this._createCompletionMessage(t.invocationId,`${s}`,null):a!==void 0?l=this._createCompletionMessage(t.invocationId,null,a):(this._logger.log(exports.LogLevel.Warning,`No result given for '${n}' method and invocation ID '${t.invocationId}'.`),l=this._createCompletionMessage(t.invocationId,"Client didn't provide a result.",null)),await this._sendWithProtocol(l)):a&&this._logger.log(exports.LogLevel.Error,`Result given for '${n}' method but server is not expecting a result.`)}_connectionClosed(t){this._logger.log(exports.LogLevel.Debug,`HubConnection.connectionClosed(${t}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||t||new wm("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(t||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===exports.HubConnectionState.Disconnecting?this._completeClose(t):this._connectionState===exports.HubConnectionState.Connected&&this._reconnectPolicy?this._reconnect(t):this._connectionState===exports.HubConnectionState.Connected&&this._completeClose(t)}_completeClose(t){if(this._connectionStarted){this._connectionState=exports.HubConnectionState.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(t??new Error("Connection closed.")),this._messageBuffer=void 0),Tr.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(n=>n.apply(this,[t]))}catch(n){this._logger.log(exports.LogLevel.Error,`An onclose callback called with error '${t}' threw error '${n}'.`)}}}async _reconnect(t){const n=Date.now();let r=0,i=t!==void 0?t:new Error("Attempting to reconnect due to a unknown error."),o=this._getNextRetryDelay(r,0,i);if(o===null){this._logger.log(exports.LogLevel.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(t);return}if(this._connectionState=exports.HubConnectionState.Reconnecting,t?this._logger.log(exports.LogLevel.Information,`Connection reconnecting because of error '${t}'.`):this._logger.log(exports.LogLevel.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(a=>a.apply(this,[t]))}catch(a){this._logger.log(exports.LogLevel.Error,`An onreconnecting callback called with error '${t}' threw error '${a}'.`)}if(this._connectionState!==exports.HubConnectionState.Reconnecting){this._logger.log(exports.LogLevel.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;o!==null;){if(this._logger.log(exports.LogLevel.Information,`Reconnect attempt number ${r+1} will start in ${o} ms.`),await new Promise(a=>{this._reconnectDelayHandle=setTimeout(a,o)}),this._reconnectDelayHandle=void 0,this._connectionState!==exports.HubConnectionState.Reconnecting){this._logger.log(exports.LogLevel.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(await this._startInternal(),this._connectionState=exports.HubConnectionState.Connected,this._logger.log(exports.LogLevel.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(a=>a.apply(this,[this.connection.connectionId]))}catch(a){this._logger.log(exports.LogLevel.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${a}'.`)}return}catch(a){if(this._logger.log(exports.LogLevel.Information,`Reconnect attempt failed because of error '${a}'.`),this._connectionState!==exports.HubConnectionState.Reconnecting){this._logger.log(exports.LogLevel.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),this._connectionState===exports.HubConnectionState.Disconnecting&&this._completeClose();return}r++,i=a instanceof Error?a:new Error(a.toString()),o=this._getNextRetryDelay(r,Date.now()-n,i)}}this._logger.log(exports.LogLevel.Information,`Reconnect retries have been exhausted after ${Date.now()-n} ms and ${r} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(t,n,r){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:n,previousRetryCount:t,retryReason:r})}catch(i){return this._logger.log(exports.LogLevel.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${t}, ${n}) threw error '${i}'.`),null}}_cancelCallbacksWithError(t){const n=this._callbacks;this._callbacks={},Object.keys(n).forEach(r=>{const i=n[r];try{i(null,t)}catch(o){this._logger.log(exports.LogLevel.Error,`Stream 'error' callback called with '${t}' threw error: ${tp(o)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(t,n,r,i){if(r)return i.length!==0?{target:t,arguments:n,streamIds:i,type:exports.MessageType.Invocation}:{target:t,arguments:n,type:exports.MessageType.Invocation};{const o=this._invocationId;return this._invocationId++,i.length!==0?{target:t,arguments:n,invocationId:o.toString(),streamIds:i,type:exports.MessageType.Invocation}:{target:t,arguments:n,invocationId:o.toString(),type:exports.MessageType.Invocation}}}_launchStreams(t,n){if(t.length!==0){n||(n=Promise.resolve());for(const r in t)t[r].subscribe({complete:()=>{n=n.then(()=>this._sendWithProtocol(this._createCompletionMessage(r)))},error:i=>{let o;i instanceof Error?o=i.message:i&&i.toString?o=i.toString():o="Unknown error",n=n.then(()=>this._sendWithProtocol(this._createCompletionMessage(r,o)))},next:i=>{n=n.then(()=>this._sendWithProtocol(this._createStreamItemMessage(r,i)))}})}}_replaceStreamingParams(t){const n=[],r=[];for(let i=0;i<t.length;i++){const o=t[i];if(this._isObservable(o)){const a=this._invocationId;this._invocationId++,n[a]=o,r.push(a.toString()),t.splice(i,1)}}return[n,r]}_isObservable(t){return t&&t.subscribe&&typeof t.subscribe=="function"}_createStreamInvocation(t,n,r){const i=this._invocationId;return this._invocationId++,r.length!==0?{target:t,arguments:n,invocationId:i.toString(),streamIds:r,type:exports.MessageType.StreamInvocation}:{target:t,arguments:n,invocationId:i.toString(),type:exports.MessageType.StreamInvocation}}_createCancelInvocation(t){return{invocationId:t,type:exports.MessageType.CancelInvocation}}_createStreamItemMessage(t,n){return{invocationId:t,item:n,type:exports.MessageType.StreamItem}}_createCompletionMessage(t,n,r){return n?{error:n,invocationId:t,type:exports.MessageType.Completion}:{invocationId:t,result:r,type:exports.MessageType.Completion}}_createCloseMessage(){return{type:exports.MessageType.Close}}async _trySendPingMessage(){try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}}}const Q9=v.createContext({isAlive:!1,shouldBeAlive:!1,connectionState:exports.HubConnectionState.Disconnected,hasLastConnectionEnded:!1}),eD="_button_1wjon_1",tD="_filled_1wjon_7",nD="_sm_1wjon_13",rD="_md_1wjon_18",iD="_lg_1wjon_23",va={button:eD,filled:tD,sm:nD,md:rD,lg:iD},Uo=e=>{const t=je.c(24);let n,r,i,o,a,s;t[0]!==e?({variant:o,color:a,size:s,className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s):(n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6]);const l=o===void 0?"filled":o,c=a===void 0?"primary":a,u=s===void 0?"md":s;if(i.as==="link"){const d=i.href??"/",f=`luminus-primary-button ${c} btn ${l==="outlined"?`btn-outline-${c}`:`btn-${c}`} ${r??""}`,h=va[l],p=va[u];let m;t[7]!==f||t[8]!==h||t[9]!==p?(m=se(f,va.button,h,p),t[7]=f,t[8]=h,t[9]=p,t[10]=m):m=t[10];let g;return t[11]!==n||t[12]!==i||t[13]!==d||t[14]!==m?(g=y.jsx(us.Link,{to:d,className:m,...i,children:n}),t[11]=n,t[12]=i,t[13]=d,t[14]=m,t[15]=g):g=t[15],g}if(i.as==="button"||i.as===void 0){const d=`luminus-primary-button ${c} btn ${l==="outlined"?`btn-outline-${c}`:`btn-${c}`} ${r??""}`,f=va[l],h=va[u];let p;t[16]!==d||t[17]!==f||t[18]!==h?(p=se(d,va.button,f,h),t[16]=d,t[17]=f,t[18]=h,t[19]=p):p=t[19];let m;return t[20]!==n||t[21]!==i||t[22]!==p?(m=y.jsx("button",{type:"button",className:p,...i,children:n}),t[20]=n,t[21]=i,t[22]=p,t[23]=m):m=t[23],m}return null},oD="_button_1r3i0_1",Cm={button:oD},sf=e=>{const t=je.c(21);let n,r,i,o,a;t[0]!==e?({color:a,icon:i,className:r,children:n,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a):(n=t[1],r=t[2],i=t[3],o=t[4],a=t[5]);const s=a===void 0?"primary":a;if(o.as==="link"){const l=o.href??"/",c=`luminus-context-button btn text-${s} ${r??""}`;let u;t[6]!==c?(u=se(c,Cm.button),t[6]=c,t[7]=u):u=t[7];let d;return t[8]!==n||t[9]!==i||t[10]!==o||t[11]!==l||t[12]!==u?(d=y.jsxs(us.Link,{to:l,className:u,...o,children:[i,n]}),t[8]=n,t[9]=i,t[10]=o,t[11]=l,t[12]=u,t[13]=d):d=t[13],d}if(o.as==="button"||o.as===void 0){const l=`luminus-context-button btn text-${s} ${r??""}`;let c;t[14]!==l?(c=se(l,Cm.button),t[14]=l,t[15]=c):c=t[15];let u;return t[16]!==n||t[17]!==i||t[18]!==o||t[19]!==c?(u=y.jsxs("button",{type:"button",className:c,...o,children:[i,n]}),t[16]=n,t[17]=i,t[18]=o,t[19]=c,t[20]=u):u=t[20],u}return null},aD="_icon-button_15e26_1",sD="_sm_15e26_14",lD="_md_15e26_23",cD="_lg_15e26_32",nu={"icon-button":"_icon-button_15e26_1",iconButton:aD,sm:sD,md:lD,lg:cD},Sc=e=>{const t=je.c(23);let n,r,i,o,a,s;t[0]!==e?({type:o,color:a,size:s,children:n,className:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s):(n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6]);const l=o===void 0?"button":o,c=a===void 0?"primary":a,u=s===void 0?"md":s;if(i.as==="link"){const d=i.href??"/",f=`luminus-icon-button btn text-${c} ${r??""}`,h=nu[u];let p;t[7]!==f||t[8]!==h?(p=se(f,nu.iconButton,h),t[7]=f,t[8]=h,t[9]=p):p=t[9];let m;return t[10]!==n||t[11]!==i||t[12]!==d||t[13]!==p?(m=y.jsx(us.Link,{to:d,className:p,...i,children:n}),t[10]=n,t[11]=i,t[12]=d,t[13]=p,t[14]=m):m=t[14],m}if(i.as==="button"||i.as===void 0){const d=`luminus-icon-button btn text-${c} ${r??""}`,f=nu[u];let h;t[15]!==d||t[16]!==f?(h=se(d,nu.iconButton,f),t[15]=d,t[16]=f,t[17]=h):h=t[17];let p;return t[18]!==n||t[19]!==i||t[20]!==h||t[21]!==l?(p=y.jsx("button",{type:l,className:h,...i,children:n}),t[18]=n,t[19]=i,t[20]=h,t[21]=l,t[22]=p):p=t[22],p}return null};var d0={},ed={exports:{}};ed.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=1,o=2,a=9007199254740991,s="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",f="[object Error]",h="[object Function]",p="[object GeneratorFunction]",m="[object Map]",g="[object Number]",x="[object Null]",_="[object Object]",w="[object Promise]",C="[object Proxy]",b="[object RegExp]",S="[object Set]",M="[object String]",$="[object Symbol]",k="[object Undefined]",R="[object WeakMap]",T="[object ArrayBuffer]",E="[object DataView]",A="[object Float32Array]",I="[object Float64Array]",j="[object Int8Array]",D="[object Int16Array]",O="[object Int32Array]",L="[object Uint8Array]",z="[object Uint8ClampedArray]",N="[object Uint16Array]",H="[object Uint32Array]",Y=/[\\^$.*+?()[\]{}|]/g,q=/^\[object .+?Constructor\]$/,Z=/^(?:0|[1-9]\d*)$/,X={};X[A]=X[I]=X[j]=X[D]=X[O]=X[L]=X[z]=X[N]=X[H]=!0,X[s]=X[l]=X[T]=X[u]=X[E]=X[d]=X[f]=X[h]=X[m]=X[g]=X[_]=X[b]=X[S]=X[M]=X[R]=!1;var J=typeof Hn=="object"&&Hn&&Hn.Object===Object&&Hn,ee=typeof self=="object"&&self&&self.Object===Object&&self,W=J||ee||Function("return this")(),F=t&&!t.nodeType&&t,B=F&&!0&&e&&!e.nodeType&&e,V=B&&B.exports===F,P=V&&J.process,te=function(){try{return P&&P.binding&&P.binding("util")}catch{}}(),K=te&&te.isTypedArray;function G(U,Q){for(var ue=-1,ke=U==null?0:U.length,Xt=0,dt=[];++ue<ke;){var an=U[ue];Q(an,ue,U)&&(dt[Xt++]=an)}return dt}function ae(U,Q){for(var ue=-1,ke=Q.length,Xt=U.length;++ue<ke;)U[Xt+ue]=Q[ue];return U}function ne(U,Q){for(var ue=-1,ke=U==null?0:U.length;++ue<ke;)if(Q(U[ue],ue,U))return!0;return!1}function re(U,Q){for(var ue=-1,ke=Array(U);++ue<U;)ke[ue]=Q(ue);return ke}function oe(U){return function(Q){return U(Q)}}function le(U,Q){return U.has(Q)}function ye(U,Q){return U==null?void 0:U[Q]}function ge(U){var Q=-1,ue=Array(U.size);return U.forEach(function(ke,Xt){ue[++Q]=[Xt,ke]}),ue}function be(U,Q){return function(ue){return U(Q(ue))}}function Me(U){var Q=-1,ue=Array(U.size);return U.forEach(function(ke){ue[++Q]=ke}),ue}var ce=Array.prototype,de=Function.prototype,Ce=Object.prototype,Ge=W["__core-js_shared__"],we=de.toString,ve=Ce.hasOwnProperty,Ne=function(){var U=/[^.]+$/.exec(Ge&&Ge.keys&&Ge.keys.IE_PROTO||"");return U?"Symbol(src)_1."+U:""}(),Ze=Ce.toString,_t=RegExp("^"+we.call(ve).replace(Y,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Te=V?W.Buffer:void 0,Re=W.Symbol,ot=W.Uint8Array,Ue=Ce.propertyIsEnumerable,mt=ce.splice,ut=Re?Re.toStringTag:void 0,At=Object.getOwnPropertySymbols,Ke=Te?Te.isBuffer:void 0,Le=be(Object.keys,Object),Ve=fa(W,"DataView"),et=fa(W,"Map"),Fe=fa(W,"Promise"),tt=fa(W,"Set"),vt=fa(W,"WeakMap"),at=fa(Object,"create"),Pe=fo(Ve),Ee=fo(et),Ye=fo(Fe),xt=fo(tt),nt=fo(vt),bt=Re?Re.prototype:void 0,Jt=bt?bt.valueOf:void 0;function Ft(U){var Q=-1,ue=U==null?0:U.length;for(this.clear();++Q<ue;){var ke=U[Q];this.set(ke[0],ke[1])}}function zt(){this.__data__=at?at(null):{},this.size=0}function fn(U){var Q=this.has(U)&&delete this.__data__[U];return this.size-=Q?1:0,Q}function qt(U){var Q=this.__data__;if(at){var ue=Q[U];return ue===r?void 0:ue}return ve.call(Q,U)?Q[U]:void 0}function $e(U){var Q=this.__data__;return at?Q[U]!==void 0:ve.call(Q,U)}function Je(U,Q){var ue=this.__data__;return this.size+=this.has(U)?0:1,ue[U]=at&&Q===void 0?r:Q,this}Ft.prototype.clear=zt,Ft.prototype.delete=fn,Ft.prototype.get=qt,Ft.prototype.has=$e,Ft.prototype.set=Je;function St(U){var Q=-1,ue=U==null?0:U.length;for(this.clear();++Q<ue;){var ke=U[Q];this.set(ke[0],ke[1])}}function on(){this.__data__=[],this.size=0}function Yt(U){var Q=this.__data__,ue=ei(Q,U);if(ue<0)return!1;var ke=Q.length-1;return ue==ke?Q.pop():mt.call(Q,ue,1),--this.size,!0}function Be(U){var Q=this.__data__,ue=ei(Q,U);return ue<0?void 0:Q[ue][1]}function ze(U){return ei(this.__data__,U)>-1}function ht(U,Q){var ue=this.__data__,ke=ei(ue,U);return ke<0?(++this.size,ue.push([U,Q])):ue[ke][1]=Q,this}St.prototype.clear=on,St.prototype.delete=Yt,St.prototype.get=Be,St.prototype.has=ze,St.prototype.set=ht;function Rt(U){var Q=-1,ue=U==null?0:U.length;for(this.clear();++Q<ue;){var ke=U[Q];this.set(ke[0],ke[1])}}function Tt(){this.size=0,this.__data__={hash:new Ft,map:new(et||St),string:new Ft}}function Qe(U){var Q=Mi(this,U).delete(U);return this.size-=Q?1:0,Q}function $t(U){return Mi(this,U).get(U)}function br(U){return Mi(this,U).has(U)}function ln(U,Q){var ue=Mi(this,U),ke=ue.size;return ue.set(U,Q),this.size+=ue.size==ke?0:1,this}Rt.prototype.clear=Tt,Rt.prototype.delete=Qe,Rt.prototype.get=$t,Rt.prototype.has=br,Rt.prototype.set=ln;function cn(U){var Q=-1,ue=U==null?0:U.length;for(this.__data__=new Rt;++Q<ue;)this.add(U[Q])}function An(U){return this.__data__.set(U,r),this}function ao(U){return this.__data__.has(U)}cn.prototype.add=cn.prototype.push=An,cn.prototype.has=ao;function Ct(U){var Q=this.__data__=new St(U);this.size=Q.size}function so(){this.__data__=new St,this.size=0}function Ae(U){var Q=this.__data__,ue=Q.delete(U);return this.size=Q.size,ue}function Ar(U){return this.__data__.get(U)}function lo(U){return this.__data__.has(U)}function ua(U,Q){var ue=this.__data__;if(ue instanceof St){var ke=ue.__data__;if(!et||ke.length<n-1)return ke.push([U,Q]),this.size=++ue.size,this;ue=this.__data__=new Rt(ke)}return ue.set(U,Q),this.size=ue.size,this}Ct.prototype.clear=so,Ct.prototype.delete=Ae,Ct.prototype.get=Ar,Ct.prototype.has=lo,Ct.prototype.set=ua;function da(U,Q){var ue=Hc(U),ke=!ue&&mT(U),Xt=!ue&&!ke&&Rh(U),dt=!ue&&!ke&&!Xt&&c1(U),an=ue||ke||Xt||dt,vn=an?re(U.length,String):[],wn=vn.length;for(var Qt in U)ve.call(U,Qt)&&!(an&&(Qt=="length"||Xt&&(Qt=="offset"||Qt=="parent")||dt&&(Qt=="buffer"||Qt=="byteLength"||Qt=="byteOffset")||uT(Qt,wn)))&&vn.push(Qt);return vn}function ei(U,Q){for(var ue=U.length;ue--;)if(o1(U[ue][0],Q))return ue;return-1}function zc(U,Q,ue){var ke=Q(U);return Hc(U)?ke:ae(ke,ue(U))}function ti(U){return U==null?U===void 0?k:x:ut&&ut in Object(U)?lT(U):pT(U)}function Is(U){return Ps(U)&&ti(U)==s}function co(U,Q,ue,ke,Xt){return U===Q?!0:U==null||Q==null||!Ps(U)&&!Ps(Q)?U!==U&&Q!==Q:js(U,Q,ue,ke,co,Xt)}function js(U,Q,ue,ke,Xt,dt){var an=Hc(U),vn=Hc(Q),wn=an?l:Ei(U),Qt=vn?l:Ei(Q);wn=wn==s?_:wn,Qt=Qt==s?_:Qt;var Jn=wn==_,yr=Qt==_,Cn=wn==Qt;if(Cn&&Rh(U)){if(!Rh(Q))return!1;an=!0,Jn=!1}if(Cn&&!Jn)return dt||(dt=new Ct),an||c1(U)?Rn(U,Q,ue,ke,Xt,dt):Oh(U,Q,wn,ue,ke,Xt,dt);if(!(ue&i)){var rr=Jn&&ve.call(U,"__wrapped__"),ir=yr&&ve.call(Q,"__wrapped__");if(rr||ir){var Oi=rr?U.value():U,ni=ir?Q.value():Q;return dt||(dt=new Ct),Xt(Oi,ni,ue,ke,dt)}}return Cn?(dt||(dt=new Ct),Ah(U,Q,ue,ke,Xt,dt)):!1}function Wc(U){if(!l1(U)||fT(U))return!1;var Q=a1(U)?_t:q;return Q.test(fo(U))}function uo(U){return Ps(U)&&s1(U.length)&&!!X[ti(U)]}function Uc(U){if(!hT(U))return Le(U);var Q=[];for(var ue in Object(U))ve.call(U,ue)&&ue!="constructor"&&Q.push(ue);return Q}function Rn(U,Q,ue,ke,Xt,dt){var an=ue&i,vn=U.length,wn=Q.length;if(vn!=wn&&!(an&&wn>vn))return!1;var Qt=dt.get(U);if(Qt&&dt.get(Q))return Qt==Q;var Jn=-1,yr=!0,Cn=ue&o?new cn:void 0;for(dt.set(U,Q),dt.set(Q,U);++Jn<vn;){var rr=U[Jn],ir=Q[Jn];if(ke)var Oi=an?ke(ir,rr,Jn,Q,U,dt):ke(rr,ir,Jn,U,Q,dt);if(Oi!==void 0){if(Oi)continue;yr=!1;break}if(Cn){if(!ne(Q,function(ni,ho){if(!le(Cn,ho)&&(rr===ni||Xt(rr,ni,ue,ke,dt)))return Cn.push(ho)})){yr=!1;break}}else if(!(rr===ir||Xt(rr,ir,ue,ke,dt))){yr=!1;break}}return dt.delete(U),dt.delete(Q),yr}function Oh(U,Q,ue,ke,Xt,dt,an){switch(ue){case E:if(U.byteLength!=Q.byteLength||U.byteOffset!=Q.byteOffset)return!1;U=U.buffer,Q=Q.buffer;case T:return!(U.byteLength!=Q.byteLength||!dt(new ot(U),new ot(Q)));case u:case d:case g:return o1(+U,+Q);case f:return U.name==Q.name&&U.message==Q.message;case b:case M:return U==Q+"";case m:var vn=ge;case S:var wn=ke&i;if(vn||(vn=Me),U.size!=Q.size&&!wn)return!1;var Qt=an.get(U);if(Qt)return Qt==Q;ke|=o,an.set(U,Q);var Jn=Rn(vn(U),vn(Q),ke,Xt,dt,an);return an.delete(U),Jn;case $:if(Jt)return Jt.call(U)==Jt.call(Q)}return!1}function Ah(U,Q,ue,ke,Xt,dt){var an=ue&i,vn=Rr(U),wn=vn.length,Qt=Rr(Q),Jn=Qt.length;if(wn!=Jn&&!an)return!1;for(var yr=wn;yr--;){var Cn=vn[yr];if(!(an?Cn in Q:ve.call(Q,Cn)))return!1}var rr=dt.get(U);if(rr&&dt.get(Q))return rr==Q;var ir=!0;dt.set(U,Q),dt.set(Q,U);for(var Oi=an;++yr<wn;){Cn=vn[yr];var ni=U[Cn],ho=Q[Cn];if(ke)var u1=an?ke(ho,ni,Cn,Q,U,dt):ke(ni,ho,Cn,U,Q,dt);if(!(u1===void 0?ni===ho||Xt(ni,ho,ue,ke,dt):u1)){ir=!1;break}Oi||(Oi=Cn=="constructor")}if(ir&&!Oi){var Vc=U.constructor,qc=Q.constructor;Vc!=qc&&"constructor"in U&&"constructor"in Q&&!(typeof Vc=="function"&&Vc instanceof Vc&&typeof qc=="function"&&qc instanceof qc)&&(ir=!1)}return dt.delete(U),dt.delete(Q),ir}function Rr(U){return zc(U,bT,cT)}function Mi(U,Q){var ue=U.__data__;return dT(Q)?ue[typeof Q=="string"?"string":"hash"]:ue.map}function fa(U,Q){var ue=ye(U,Q);return Wc(ue)?ue:void 0}function lT(U){var Q=ve.call(U,ut),ue=U[ut];try{U[ut]=void 0;var ke=!0}catch{}var Xt=Ze.call(U);return ke&&(Q?U[ut]=ue:delete U[ut]),Xt}var cT=At?function(U){return U==null?[]:(U=Object(U),G(At(U),function(Q){return Ue.call(U,Q)}))}:yT,Ei=ti;(Ve&&Ei(new Ve(new ArrayBuffer(1)))!=E||et&&Ei(new et)!=m||Fe&&Ei(Fe.resolve())!=w||tt&&Ei(new tt)!=S||vt&&Ei(new vt)!=R)&&(Ei=function(U){var Q=ti(U),ue=Q==_?U.constructor:void 0,ke=ue?fo(ue):"";if(ke)switch(ke){case Pe:return E;case Ee:return m;case Ye:return w;case xt:return S;case nt:return R}return Q});function uT(U,Q){return Q=Q??a,!!Q&&(typeof U=="number"||Z.test(U))&&U>-1&&U%1==0&&U<Q}function dT(U){var Q=typeof U;return Q=="string"||Q=="number"||Q=="symbol"||Q=="boolean"?U!=="__proto__":U===null}function fT(U){return!!Ne&&Ne in U}function hT(U){var Q=U&&U.constructor,ue=typeof Q=="function"&&Q.prototype||Ce;return U===ue}function pT(U){return Ze.call(U)}function fo(U){if(U!=null){try{return we.call(U)}catch{}try{return U+""}catch{}}return""}function o1(U,Q){return U===Q||U!==U&&Q!==Q}var mT=Is(function(){return arguments}())?Is:function(U){return Ps(U)&&ve.call(U,"callee")&&!Ue.call(U,"callee")},Hc=Array.isArray;function gT(U){return U!=null&&s1(U.length)&&!a1(U)}var Rh=Ke||xT;function vT(U,Q){return co(U,Q)}function a1(U){if(!l1(U))return!1;var Q=ti(U);return Q==h||Q==p||Q==c||Q==C}function s1(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function l1(U){var Q=typeof U;return U!=null&&(Q=="object"||Q=="function")}function Ps(U){return U!=null&&typeof U=="object"}var c1=K?oe(K):uo;function bT(U){return gT(U)?da(U):Uc(U)}function yT(){return[]}function xT(){return!1}e.exports=vT})(ed,ed.exports);var uD=ed.exports,fC={exports:{}};(function(e,t){var n=function(){var r=function(b,S){var M=236,$=17,k=b,R=o[S],T=null,E=0,A=null,I=[],j={},D=function(W,F){E=k*4+17,T=function(B){for(var V=new Array(B),P=0;P<B;P+=1){V[P]=new Array(B);for(var te=0;te<B;te+=1)V[P][te]=null}return V}(E),O(0,0),O(E-7,0),O(0,E-7),N(),z(),Y(W,F),k>=7&&H(W),A==null&&(A=X(k,R,I)),q(A,F)},O=function(W,F){for(var B=-1;B<=7;B+=1)if(!(W+B<=-1||E<=W+B))for(var V=-1;V<=7;V+=1)F+V<=-1||E<=F+V||(0<=B&&B<=6&&(V==0||V==6)||0<=V&&V<=6&&(B==0||B==6)||2<=B&&B<=4&&2<=V&&V<=4?T[W+B][F+V]=!0:T[W+B][F+V]=!1)},L=function(){for(var W=0,F=0,B=0;B<8;B+=1){D(!0,B);var V=s.getLostPoint(j);(B==0||W>V)&&(W=V,F=B)}return F},z=function(){for(var W=8;W<E-8;W+=1)T[W][6]==null&&(T[W][6]=W%2==0);for(var F=8;F<E-8;F+=1)T[6][F]==null&&(T[6][F]=F%2==0)},N=function(){for(var W=s.getPatternPosition(k),F=0;F<W.length;F+=1)for(var B=0;B<W.length;B+=1){var V=W[F],P=W[B];if(T[V][P]==null)for(var te=-2;te<=2;te+=1)for(var K=-2;K<=2;K+=1)te==-2||te==2||K==-2||K==2||te==0&&K==0?T[V+te][P+K]=!0:T[V+te][P+K]=!1}},H=function(W){for(var F=s.getBCHTypeNumber(k),B=0;B<18;B+=1){var V=!W&&(F>>B&1)==1;T[Math.floor(B/3)][B%3+E-8-3]=V}for(var B=0;B<18;B+=1){var V=!W&&(F>>B&1)==1;T[B%3+E-8-3][Math.floor(B/3)]=V}},Y=function(W,F){for(var B=R<<3|F,V=s.getBCHTypeInfo(B),P=0;P<15;P+=1){var te=!W&&(V>>P&1)==1;P<6?T[P][8]=te:P<8?T[P+1][8]=te:T[E-15+P][8]=te}for(var P=0;P<15;P+=1){var te=!W&&(V>>P&1)==1;P<8?T[8][E-P-1]=te:P<9?T[8][15-P-1+1]=te:T[8][15-P-1]=te}T[E-8][8]=!W},q=function(W,F){for(var B=-1,V=E-1,P=7,te=0,K=s.getMaskFunction(F),G=E-1;G>0;G-=2)for(G==6&&(G-=1);;){for(var ae=0;ae<2;ae+=1)if(T[V][G-ae]==null){var ne=!1;te<W.length&&(ne=(W[te]>>>P&1)==1);var re=K(V,G-ae);re&&(ne=!ne),T[V][G-ae]=ne,P-=1,P==-1&&(te+=1,P=7)}if(V+=B,V<0||E<=V){V-=B,B=-B;break}}},Z=function(W,F){for(var B=0,V=0,P=0,te=new Array(F.length),K=new Array(F.length),G=0;G<F.length;G+=1){var ae=F[G].dataCount,ne=F[G].totalCount-ae;V=Math.max(V,ae),P=Math.max(P,ne),te[G]=new Array(ae);for(var re=0;re<te[G].length;re+=1)te[G][re]=255&W.getBuffer()[re+B];B+=ae;var oe=s.getErrorCorrectPolynomial(ne),le=c(te[G],oe.getLength()-1),ye=le.mod(oe);K[G]=new Array(oe.getLength()-1);for(var re=0;re<K[G].length;re+=1){var ge=re+ye.getLength()-K[G].length;K[G][re]=ge>=0?ye.getAt(ge):0}}for(var be=0,re=0;re<F.length;re+=1)be+=F[re].totalCount;for(var Me=new Array(be),ce=0,re=0;re<V;re+=1)for(var G=0;G<F.length;G+=1)re<te[G].length&&(Me[ce]=te[G][re],ce+=1);for(var re=0;re<P;re+=1)for(var G=0;G<F.length;G+=1)re<K[G].length&&(Me[ce]=K[G][re],ce+=1);return Me},X=function(W,F,B){for(var V=u.getRSBlocks(W,F),P=d(),te=0;te<B.length;te+=1){var K=B[te];P.put(K.getMode(),4),P.put(K.getLength(),s.getLengthInBits(K.getMode(),W)),K.write(P)}for(var G=0,te=0;te<V.length;te+=1)G+=V[te].dataCount;if(P.getLengthInBits()>G*8)throw"code length overflow. ("+P.getLengthInBits()+">"+G*8+")";for(P.getLengthInBits()+4<=G*8&&P.put(0,4);P.getLengthInBits()%8!=0;)P.putBit(!1);for(;!(P.getLengthInBits()>=G*8||(P.put(M,8),P.getLengthInBits()>=G*8));)P.put($,8);return Z(P,V)};j.addData=function(W,F){F=F||"Byte";var B=null;switch(F){case"Numeric":B=f(W);break;case"Alphanumeric":B=h(W);break;case"Byte":B=p(W);break;case"Kanji":B=m(W);break;default:throw"mode:"+F}I.push(B),A=null},j.isDark=function(W,F){if(W<0||E<=W||F<0||E<=F)throw W+","+F;return T[W][F]},j.getModuleCount=function(){return E},j.make=function(){if(k<1){for(var W=1;W<40;W++){for(var F=u.getRSBlocks(W,R),B=d(),V=0;V<I.length;V++){var P=I[V];B.put(P.getMode(),4),B.put(P.getLength(),s.getLengthInBits(P.getMode(),W)),P.write(B)}for(var te=0,V=0;V<F.length;V++)te+=F[V].dataCount;if(B.getLengthInBits()<=te*8)break}k=W}D(!1,L())},j.createTableTag=function(W,F){W=W||2,F=typeof F>"u"?W*4:F;var B="";B+='<table style="',B+=" border-width: 0px; border-style: none;",B+=" border-collapse: collapse;",B+=" padding: 0px; margin: "+F+"px;",B+='">',B+="<tbody>";for(var V=0;V<j.getModuleCount();V+=1){B+="<tr>";for(var P=0;P<j.getModuleCount();P+=1)B+='<td style="',B+=" border-width: 0px; border-style: none;",B+=" border-collapse: collapse;",B+=" padding: 0px; margin: 0px;",B+=" width: "+W+"px;",B+=" height: "+W+"px;",B+=" background-color: ",B+=j.isDark(V,P)?"#000000":"#ffffff",B+=";",B+='"/>';B+="</tr>"}return B+="</tbody>",B+="</table>",B},j.createSvgTag=function(W,F,B,V){var P={};typeof arguments[0]=="object"&&(P=arguments[0],W=P.cellSize,F=P.margin,B=P.alt,V=P.title),W=W||2,F=typeof F>"u"?W*4:F,B=typeof B=="string"?{text:B}:B||{},B.text=B.text||null,B.id=B.text?B.id||"qrcode-description":null,V=typeof V=="string"?{text:V}:V||{},V.text=V.text||null,V.id=V.text?V.id||"qrcode-title":null;var te=j.getModuleCount()*W+F*2,K,G,ae,ne,re="",oe;for(oe="l"+W+",0 0,"+W+" -"+W+",0 0,-"+W+"z ",re+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',re+=P.scalable?"":' width="'+te+'px" height="'+te+'px"',re+=' viewBox="0 0 '+te+" "+te+'" ',re+=' preserveAspectRatio="xMinYMin meet"',re+=V.text||B.text?' role="img" aria-labelledby="'+J([V.id,B.id].join(" ").trim())+'"':"",re+=">",re+=V.text?'<title id="'+J(V.id)+'">'+J(V.text)+"</title>":"",re+=B.text?'<description id="'+J(B.id)+'">'+J(B.text)+"</description>":"",re+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',re+='<path d="',ae=0;ae<j.getModuleCount();ae+=1)for(ne=ae*W+F,K=0;K<j.getModuleCount();K+=1)j.isDark(ae,K)&&(G=K*W+F,re+="M"+G+","+ne+oe);return re+='" stroke="transparent" fill="black"/>',re+="</svg>",re},j.createDataURL=function(W,F){W=W||2,F=typeof F>"u"?W*4:F;var B=j.getModuleCount()*W+F*2,V=F,P=B-F;return C(B,B,function(te,K){if(V<=te&&te<P&&V<=K&&K<P){var G=Math.floor((te-V)/W),ae=Math.floor((K-V)/W);return j.isDark(ae,G)?0:1}else return 1})},j.createImgTag=function(W,F,B){W=W||2,F=typeof F>"u"?W*4:F;var V=j.getModuleCount()*W+F*2,P="";return P+="<img",P+=' src="',P+=j.createDataURL(W,F),P+='"',P+=' width="',P+=V,P+='"',P+=' height="',P+=V,P+='"',B&&(P+=' alt="',P+=J(B),P+='"'),P+="/>",P};var J=function(W){for(var F="",B=0;B<W.length;B+=1){var V=W.charAt(B);switch(V){case"<":F+="&lt;";break;case">":F+="&gt;";break;case"&":F+="&amp;";break;case'"':F+="&quot;";break;default:F+=V;break}}return F},ee=function(W){var F=1;W=typeof W>"u"?F*2:W;var B=j.getModuleCount()*F+W*2,V=W,P=B-W,te,K,G,ae,ne,re={"██":"█","█ ":"▀"," █":"▄"," ":" "},oe={"██":"▀","█ ":"▀"," █":" "," ":" "},le="";for(te=0;te<B;te+=2){for(G=Math.floor((te-V)/F),ae=Math.floor((te+1-V)/F),K=0;K<B;K+=1)ne="█",V<=K&&K<P&&V<=te&&te<P&&j.isDark(G,Math.floor((K-V)/F))&&(ne=" "),V<=K&&K<P&&V<=te+1&&te+1<P&&j.isDark(ae,Math.floor((K-V)/F))?ne+=" ":ne+="█",le+=W<1&&te+1>=P?oe[ne]:re[ne];le+=`
245
245
  `}return B%2&&W>0?le.substring(0,le.length-B-1)+Array(B+1).join("▀"):le.substring(0,le.length-1)};return j.createASCII=function(W,F){if(W=W||1,W<2)return ee(F);W-=1,F=typeof F>"u"?W*2:F;var B=j.getModuleCount()*W+F*2,V=F,P=B-F,te,K,G,ae,ne=Array(W+1).join("██"),re=Array(W+1).join(" "),oe="",le="";for(te=0;te<B;te+=1){for(G=Math.floor((te-V)/W),le="",K=0;K<B;K+=1)ae=1,V<=K&&K<P&&V<=te&&te<P&&j.isDark(G,Math.floor((K-V)/W))&&(ae=0),le+=ae?ne:re;for(G=0;G<W;G+=1)oe+=le+`
246
246
  `}return oe.substring(0,oe.length-1)},j.renderTo2dContext=function(W,F){F=F||2;for(var B=j.getModuleCount(),V=0;V<B;V++)for(var P=0;P<B;P++)W.fillStyle=j.isDark(V,P)?"black":"white",W.fillRect(V*F,P*F,F,F)},j};r.stringToBytesFuncs={default:function(b){for(var S=[],M=0;M<b.length;M+=1){var $=b.charCodeAt(M);S.push($&255)}return S}},r.stringToBytes=r.stringToBytesFuncs.default,r.createStringToBytes=function(b,S){var M=function(){for(var k=_(b),R=function(){var z=k.read();if(z==-1)throw"eof";return z},T=0,E={};;){var A=k.read();if(A==-1)break;var I=R(),j=R(),D=R(),O=String.fromCharCode(A<<8|I),L=j<<8|D;E[O]=L,T+=1}if(T!=S)throw T+" != "+S;return E}(),$=63;return function(k){for(var R=[],T=0;T<k.length;T+=1){var E=k.charCodeAt(T);if(E<128)R.push(E);else{var A=M[k.charAt(T)];typeof A=="number"?(A&255)==A?R.push(A):(R.push(A>>>8),R.push(A&255)):R.push($)}}return R}};var i={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},o={L:1,M:0,Q:3,H:2},a={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},s=function(){var b=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],S=1335,M=7973,$=21522,k={},R=function(T){for(var E=0;T!=0;)E+=1,T>>>=1;return E};return k.getBCHTypeInfo=function(T){for(var E=T<<10;R(E)-R(S)>=0;)E^=S<<R(E)-R(S);return(T<<10|E)^$},k.getBCHTypeNumber=function(T){for(var E=T<<12;R(E)-R(M)>=0;)E^=M<<R(E)-R(M);return T<<12|E},k.getPatternPosition=function(T){return b[T-1]},k.getMaskFunction=function(T){switch(T){case a.PATTERN000:return function(E,A){return(E+A)%2==0};case a.PATTERN001:return function(E,A){return E%2==0};case a.PATTERN010:return function(E,A){return A%3==0};case a.PATTERN011:return function(E,A){return(E+A)%3==0};case a.PATTERN100:return function(E,A){return(Math.floor(E/2)+Math.floor(A/3))%2==0};case a.PATTERN101:return function(E,A){return E*A%2+E*A%3==0};case a.PATTERN110:return function(E,A){return(E*A%2+E*A%3)%2==0};case a.PATTERN111:return function(E,A){return(E*A%3+(E+A)%2)%2==0};default:throw"bad maskPattern:"+T}},k.getErrorCorrectPolynomial=function(T){for(var E=c([1],0),A=0;A<T;A+=1)E=E.multiply(c([1,l.gexp(A)],0));return E},k.getLengthInBits=function(T,E){if(1<=E&&E<10)switch(T){case i.MODE_NUMBER:return 10;case i.MODE_ALPHA_NUM:return 9;case i.MODE_8BIT_BYTE:return 8;case i.MODE_KANJI:return 8;default:throw"mode:"+T}else if(E<27)switch(T){case i.MODE_NUMBER:return 12;case i.MODE_ALPHA_NUM:return 11;case i.MODE_8BIT_BYTE:return 16;case i.MODE_KANJI:return 10;default:throw"mode:"+T}else if(E<41)switch(T){case i.MODE_NUMBER:return 14;case i.MODE_ALPHA_NUM:return 13;case i.MODE_8BIT_BYTE:return 16;case i.MODE_KANJI:return 12;default:throw"mode:"+T}else throw"type:"+E},k.getLostPoint=function(T){for(var E=T.getModuleCount(),A=0,I=0;I<E;I+=1)for(var j=0;j<E;j+=1){for(var D=0,O=T.isDark(I,j),L=-1;L<=1;L+=1)if(!(I+L<0||E<=I+L))for(var z=-1;z<=1;z+=1)j+z<0||E<=j+z||L==0&&z==0||O==T.isDark(I+L,j+z)&&(D+=1);D>5&&(A+=3+D-5)}for(var I=0;I<E-1;I+=1)for(var j=0;j<E-1;j+=1){var N=0;T.isDark(I,j)&&(N+=1),T.isDark(I+1,j)&&(N+=1),T.isDark(I,j+1)&&(N+=1),T.isDark(I+1,j+1)&&(N+=1),(N==0||N==4)&&(A+=3)}for(var I=0;I<E;I+=1)for(var j=0;j<E-6;j+=1)T.isDark(I,j)&&!T.isDark(I,j+1)&&T.isDark(I,j+2)&&T.isDark(I,j+3)&&T.isDark(I,j+4)&&!T.isDark(I,j+5)&&T.isDark(I,j+6)&&(A+=40);for(var j=0;j<E;j+=1)for(var I=0;I<E-6;I+=1)T.isDark(I,j)&&!T.isDark(I+1,j)&&T.isDark(I+2,j)&&T.isDark(I+3,j)&&T.isDark(I+4,j)&&!T.isDark(I+5,j)&&T.isDark(I+6,j)&&(A+=40);for(var H=0,j=0;j<E;j+=1)for(var I=0;I<E;I+=1)T.isDark(I,j)&&(H+=1);var Y=Math.abs(100*H/E/E-50)/5;return A+=Y*10,A},k}(),l=function(){for(var b=new Array(256),S=new Array(256),M=0;M<8;M+=1)b[M]=1<<M;for(var M=8;M<256;M+=1)b[M]=b[M-4]^b[M-5]^b[M-6]^b[M-8];for(var M=0;M<255;M+=1)S[b[M]]=M;var $={};return $.glog=function(k){if(k<1)throw"glog("+k+")";return S[k]},$.gexp=function(k){for(;k<0;)k+=255;for(;k>=256;)k-=255;return b[k]},$}();function c(b,S){if(typeof b.length>"u")throw b.length+"/"+S;var M=function(){for(var k=0;k<b.length&&b[k]==0;)k+=1;for(var R=new Array(b.length-k+S),T=0;T<b.length-k;T+=1)R[T]=b[T+k];return R}(),$={};return $.getAt=function(k){return M[k]},$.getLength=function(){return M.length},$.multiply=function(k){for(var R=new Array($.getLength()+k.getLength()-1),T=0;T<$.getLength();T+=1)for(var E=0;E<k.getLength();E+=1)R[T+E]^=l.gexp(l.glog($.getAt(T))+l.glog(k.getAt(E)));return c(R,0)},$.mod=function(k){if($.getLength()-k.getLength()<0)return $;for(var R=l.glog($.getAt(0))-l.glog(k.getAt(0)),T=new Array($.getLength()),E=0;E<$.getLength();E+=1)T[E]=$.getAt(E);for(var E=0;E<k.getLength();E+=1)T[E]^=l.gexp(l.glog(k.getAt(E))+R);return c(T,0).mod(k)},$}var u=function(){var b=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],S=function(k,R){var T={};return T.totalCount=k,T.dataCount=R,T},M={},$=function(k,R){switch(R){case o.L:return b[(k-1)*4+0];case o.M:return b[(k-1)*4+1];case o.Q:return b[(k-1)*4+2];case o.H:return b[(k-1)*4+3];default:return}};return M.getRSBlocks=function(k,R){var T=$(k,R);if(typeof T>"u")throw"bad rs block @ typeNumber:"+k+"/errorCorrectionLevel:"+R;for(var E=T.length/3,A=[],I=0;I<E;I+=1)for(var j=T[I*3+0],D=T[I*3+1],O=T[I*3+2],L=0;L<j;L+=1)A.push(S(D,O));return A},M}(),d=function(){var b=[],S=0,M={};return M.getBuffer=function(){return b},M.getAt=function($){var k=Math.floor($/8);return(b[k]>>>7-$%8&1)==1},M.put=function($,k){for(var R=0;R<k;R+=1)M.putBit(($>>>k-R-1&1)==1)},M.getLengthInBits=function(){return S},M.putBit=function($){var k=Math.floor(S/8);b.length<=k&&b.push(0),$&&(b[k]|=128>>>S%8),S+=1},M},f=function(b){var S=i.MODE_NUMBER,M=b,$={};$.getMode=function(){return S},$.getLength=function(T){return M.length},$.write=function(T){for(var E=M,A=0;A+2<E.length;)T.put(k(E.substring(A,A+3)),10),A+=3;A<E.length&&(E.length-A==1?T.put(k(E.substring(A,A+1)),4):E.length-A==2&&T.put(k(E.substring(A,A+2)),7))};var k=function(T){for(var E=0,A=0;A<T.length;A+=1)E=E*10+R(T.charAt(A));return E},R=function(T){if("0"<=T&&T<="9")return T.charCodeAt(0)-48;throw"illegal char :"+T};return $},h=function(b){var S=i.MODE_ALPHA_NUM,M=b,$={};$.getMode=function(){return S},$.getLength=function(R){return M.length},$.write=function(R){for(var T=M,E=0;E+1<T.length;)R.put(k(T.charAt(E))*45+k(T.charAt(E+1)),11),E+=2;E<T.length&&R.put(k(T.charAt(E)),6)};var k=function(R){if("0"<=R&&R<="9")return R.charCodeAt(0)-48;if("A"<=R&&R<="Z")return R.charCodeAt(0)-65+10;switch(R){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+R}};return $},p=function(b){var S=i.MODE_8BIT_BYTE,M=r.stringToBytes(b),$={};return $.getMode=function(){return S},$.getLength=function(k){return M.length},$.write=function(k){for(var R=0;R<M.length;R+=1)k.put(M[R],8)},$},m=function(b){var S=i.MODE_KANJI,M=r.stringToBytesFuncs.SJIS;if(!M)throw"sjis not supported.";(function(R,T){var E=M(R);if(E.length!=2||(E[0]<<8|E[1])!=T)throw"sjis not supported."})("友",38726);var $=M(b),k={};return k.getMode=function(){return S},k.getLength=function(R){return~~($.length/2)},k.write=function(R){for(var T=$,E=0;E+1<T.length;){var A=(255&T[E])<<8|255&T[E+1];if(33088<=A&&A<=40956)A-=33088;else if(57408<=A&&A<=60351)A-=49472;else throw"illegal char at "+(E+1)+"/"+A;A=(A>>>8&255)*192+(A&255),R.put(A,13),E+=2}if(E<T.length)throw"illegal char at "+(E+1)},k},g=function(){var b=[],S={};return S.writeByte=function(M){b.push(M&255)},S.writeShort=function(M){S.writeByte(M),S.writeByte(M>>>8)},S.writeBytes=function(M,$,k){$=$||0,k=k||M.length;for(var R=0;R<k;R+=1)S.writeByte(M[R+$])},S.writeString=function(M){for(var $=0;$<M.length;$+=1)S.writeByte(M.charCodeAt($))},S.toByteArray=function(){return b},S.toString=function(){var M="";M+="[";for(var $=0;$<b.length;$+=1)$>0&&(M+=","),M+=b[$];return M+="]",M},S},x=function(){var b=0,S=0,M=0,$="",k={},R=function(E){$+=String.fromCharCode(T(E&63))},T=function(E){if(!(E<0)){if(E<26)return 65+E;if(E<52)return 97+(E-26);if(E<62)return 48+(E-52);if(E==62)return 43;if(E==63)return 47}throw"n:"+E};return k.writeByte=function(E){for(b=b<<8|E&255,S+=8,M+=1;S>=6;)R(b>>>S-6),S-=6},k.flush=function(){if(S>0&&(R(b<<6-S),b=0,S=0),M%3!=0)for(var E=3-M%3,A=0;A<E;A+=1)$+="="},k.toString=function(){return $},k},_=function(b){var S=b,M=0,$=0,k=0,R={};R.read=function(){for(;k<8;){if(M>=S.length){if(k==0)return-1;throw"unexpected end of file./"+k}var E=S.charAt(M);if(M+=1,E=="=")return k=0,-1;if(E.match(/^\s$/))continue;$=$<<6|T(E.charCodeAt(0)),k+=6}var A=$>>>k-8&255;return k-=8,A};var T=function(E){if(65<=E&&E<=90)return E-65;if(97<=E&&E<=122)return E-97+26;if(48<=E&&E<=57)return E-48+52;if(E==43)return 62;if(E==47)return 63;throw"c:"+E};return R},w=function(b,S){var M=b,$=S,k=new Array(b*S),R={};R.setPixel=function(I,j,D){k[j*M+I]=D},R.write=function(I){I.writeString("GIF87a"),I.writeShort(M),I.writeShort($),I.writeByte(128),I.writeByte(0),I.writeByte(0),I.writeByte(0),I.writeByte(0),I.writeByte(0),I.writeByte(255),I.writeByte(255),I.writeByte(255),I.writeString(","),I.writeShort(0),I.writeShort(0),I.writeShort(M),I.writeShort($),I.writeByte(0);var j=2,D=E(j);I.writeByte(j);for(var O=0;D.length-O>255;)I.writeByte(255),I.writeBytes(D,O,255),O+=255;I.writeByte(D.length-O),I.writeBytes(D,O,D.length-O),I.writeByte(0),I.writeString(";")};var T=function(I){var j=I,D=0,O=0,L={};return L.write=function(z,N){if(z>>>N)throw"length over";for(;D+N>=8;)j.writeByte(255&(z<<D|O)),N-=8-D,z>>>=8-D,O=0,D=0;O=z<<D|O,D=D+N},L.flush=function(){D>0&&j.writeByte(O)},L},E=function(I){for(var j=1<<I,D=(1<<I)+1,O=I+1,L=A(),z=0;z<j;z+=1)L.add(String.fromCharCode(z));L.add(String.fromCharCode(j)),L.add(String.fromCharCode(D));var N=g(),H=T(N);H.write(j,O);var Y=0,q=String.fromCharCode(k[Y]);for(Y+=1;Y<k.length;){var Z=String.fromCharCode(k[Y]);Y+=1,L.contains(q+Z)?q=q+Z:(H.write(L.indexOf(q),O),L.size()<4095&&(L.size()==1<<O&&(O+=1),L.add(q+Z)),q=Z)}return H.write(L.indexOf(q),O),H.write(D,O),H.flush(),N.toByteArray()},A=function(){var I={},j=0,D={};return D.add=function(O){if(D.contains(O))throw"dup key:"+O;I[O]=j,j+=1},D.size=function(){return j},D.indexOf=function(O){return I[O]},D.contains=function(O){return typeof I[O]<"u"},D};return R},C=function(b,S,M){for(var $=w(b,S),k=0;k<S;k+=1)for(var R=0;R<b;R+=1)$.setPixel(R,k,M(R,k));var T=g();$.write(T);for(var E=x(),A=T.toByteArray(),I=0;I<A.length;I+=1)E.writeByte(A[I]);return E.flush(),"data:image/gif;base64,"+E};return r}();(function(){n.stringToBytesFuncs["UTF-8"]=function(r){function i(o){for(var a=[],s=0;s<o.length;s++){var l=o.charCodeAt(s);l<128?a.push(l):l<2048?a.push(192|l>>6,128|l&63):l<55296||l>=57344?a.push(224|l>>12,128|l>>6&63,128|l&63):(s++,l=65536+((l&1023)<<10|o.charCodeAt(s)&1023),a.push(240|l>>18,128|l>>12&63,128|l>>6&63,128|l&63))}return a}return i(r)}})(),function(r){e.exports=r()}(function(){return n})})(fC);var dD=fC.exports,fD=Hn&&Hn.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Sm=Hn&&Hn.__assign||function(){return Sm=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Sm.apply(this,arguments)};Object.defineProperty(d0,"__esModule",{value:!0});exports.QRCode_1=d0.QRCode=void 0;var hD=uD,pD=dD,np=v,mD=function(e){fD(t,e);function t(n){var r=e.call(this,n)||this;return r.canvasRef=np.createRef(),r}return t.prototype.download=function(n,r){if(this.canvasRef.current){var i=void 0;switch(n){case"jpg":i="image/jpeg";break;case"webp":i="image/webp";break;case"png":default:i="image/png";break}var o=this.canvasRef.current.toDataURL(i,1),a=document.createElement("a");a.download=r??"react-qrcode-logo",a.href=o,a.click()}},t.prototype.utf16to8=function(n){var r="",i,o,a=n.length;for(i=0;i<a;i++)o=n.charCodeAt(i),o>=1&&o<=127?r+=n.charAt(i):o>2047?(r+=String.fromCharCode(224|o>>12&15),r+=String.fromCharCode(128|o>>6&63),r+=String.fromCharCode(128|o>>0&63)):(r+=String.fromCharCode(192|o>>6&31),r+=String.fromCharCode(128|o>>0&63));return r},t.prototype.drawRoundedSquare=function(n,r,i,o,a,s,l,c){c.lineWidth=n,c.fillStyle=a,c.strokeStyle=a,i+=n/2,r+=n/2,o-=n,Array.isArray(s)||(s=[s,s,s,s]),s=s.map(function(p){return p=Math.min(p,o/2),p<0?0:p});var u=s[0]||0,d=s[1]||0,f=s[2]||0,h=s[3]||0;c.beginPath(),c.moveTo(r+u,i),c.lineTo(r+o-d,i),d&&c.quadraticCurveTo(r+o,i,r+o,i+d),c.lineTo(r+o,i+o-f),f&&c.quadraticCurveTo(r+o,i+o,r+o-f,i+o),c.lineTo(r+h,i+o),h&&c.quadraticCurveTo(r,i+o,r,i+o-h),c.lineTo(r,i+u),u&&c.quadraticCurveTo(r,i,r+u,i),c.closePath(),c.stroke(),l&&c.fill()},t.prototype.drawPositioningPattern=function(n,r,i,o,a,s,l){l===void 0&&(l=[0,0,0,0]);var c=Math.ceil(r),u,d;typeof l!="number"&&!Array.isArray(l)?(u=l.outer||0,d=l.inner||0):(u=l,d=u);var f,h;typeof s!="string"?(f=s.outer,h=s.inner):(f=s,h=s);var p=o*r+i,m=a*r+i,g=r*7;this.drawRoundedSquare(c,m,p,g,f,u,!1,n),g=r*3,p+=r*2,m+=r*2,this.drawRoundedSquare(c,m,p,g,h,d,!0,n)},t.prototype.isInPositioninZone=function(n,r,i){return i.some(function(o){return r>=o.row&&r<=o.row+7&&n>=o.col&&n<=o.col+7})},t.prototype.transformPixelLengthIntoNumberOfCells=function(n,r){return n/r},t.prototype.isCoordinateInImage=function(n,r,i,o,a,s,l,c){if(c){var u=2,d=this.transformPixelLengthIntoNumberOfCells(a,l),f=this.transformPixelLengthIntoNumberOfCells(s,l),h=this.transformPixelLengthIntoNumberOfCells(i,l)-1,p=this.transformPixelLengthIntoNumberOfCells(o,l)-1;return r>=d-u&&r<=d+h+u&&n>=f-u&&n<=f+p+u}else return!1},t.prototype.shouldComponentUpdate=function(n){return!hD(this.props,n)},t.prototype.componentDidMount=function(){this.update()},t.prototype.componentDidUpdate=function(){this.update()},t.prototype.update=function(){var n,r=this.props,i=r.value,o=r.ecLevel,a=r.enableCORS,s=r.bgColor,l=r.fgColor,c=r.logoImage,u=r.logoOpacity,d=r.logoOnLoad,f=r.removeQrCodeBehindLogo,h=r.qrStyle,p=r.eyeRadius,m=r.eyeColor,g=r.logoPaddingStyle,x=+this.props.size,_=+this.props.quietZone,w=this.props.logoWidth?+this.props.logoWidth:0,C=this.props.logoHeight?+this.props.logoHeight:0,b=this.props.logoPadding?+this.props.logoPadding:0,S=pD(0,o);S.addData(this.utf16to8(i)),S.make();var M=(n=this.canvasRef)===null||n===void 0?void 0:n.current,$=M.getContext("2d"),k=x+2*_,R=S.getModuleCount(),T=x/R,E=window.devicePixelRatio||1;M.height=M.width=k*E,$.scale(E,E),$.fillStyle=s,$.fillRect(0,0,k,k);var A=_,I=[{row:0,col:0},{row:0,col:R-7},{row:R-7,col:0}];if($.strokeStyle=l,h==="dots"){$.fillStyle=l;for(var j=T/2,D=0;D<R;D++)for(var O=0;O<R;O++)S.isDark(D,O)&&!this.isInPositioninZone(D,O,I)&&($.beginPath(),$.arc(Math.round(O*T)+j+A,Math.round(D*T)+j+A,j/100*75,0,2*Math.PI,!1),$.closePath(),$.fill())}else if(h==="fluid"){for(var j=Math.ceil(T/2),D=0;D<R;D++)for(var O=0;O<R;O++)if(S.isDark(D,O)&&!this.isInPositioninZone(D,O,I)){var L=[!1,!1,!1,!1];D>0&&!S.isDark(D-1,O)&&O>0&&!S.isDark(D,O-1)&&(L[0]=!0),D>0&&!S.isDark(D-1,O)&&O<R-1&&!S.isDark(D,O+1)&&(L[1]=!0),D<R-1&&!S.isDark(D+1,O)&&O<R-1&&!S.isDark(D,O+1)&&(L[2]=!0),D<R-1&&!S.isDark(D+1,O)&&O>0&&!S.isDark(D,O-1)&&(L[3]=!0);var z=Math.ceil((O+1)*T)-Math.floor(O*T),N=Math.ceil((D+1)*T)-Math.floor(D*T);$.fillStyle=l,$.beginPath(),$.arc(Math.round(O*T)+j+A,Math.round(D*T)+j+A,j,0,2*Math.PI,!1),$.closePath(),$.fill(),L[0]||$.fillRect(Math.round(O*T)+A,Math.round(D*T)+A,z/2,N/2),L[1]||$.fillRect(Math.round(O*T)+A+Math.floor(z/2),Math.round(D*T)+A,z/2,N/2),L[2]||$.fillRect(Math.round(O*T)+A+Math.floor(z/2),Math.round(D*T)+A+Math.floor(N/2),z/2,N/2),L[3]||$.fillRect(Math.round(O*T)+A,Math.round(D*T)+A+Math.floor(N/2),z/2,N/2)}}else for(var D=0;D<R;D++)for(var O=0;O<R;O++)if(S.isDark(D,O)&&!this.isInPositioninZone(D,O,I)){$.fillStyle=l;var z=Math.ceil((O+1)*T)-Math.floor(O*T),N=Math.ceil((D+1)*T)-Math.floor(D*T);$.fillRect(Math.round(O*T)+A,Math.round(D*T)+A,z,N)}for(var H=0;H<3;H++){var Y=I[H],D=Y.row,O=Y.col,q=p,Z=void 0;Array.isArray(q)&&(q=q[H]),typeof q=="number"&&(q=[q,q,q,q]),m?Array.isArray(m)?Z=m[H]:Z=m:Z=l,this.drawPositioningPattern($,T,A,D,O,Z,q)}if(c){var X=new Image;a&&(X.crossOrigin="Anonymous"),X.onload=function(J){$.save();var ee=w||x*.2,W=C||ee,F=(x-ee)/2,B=(x-W)/2;if(f||b){$.beginPath(),$.strokeStyle=s,$.fillStyle=s;var V=ee+2*b,P=W+2*b,te=F+A-b,K=B+A-b;if(g==="circle"){var G=te+V/2,ae=K+P/2;$.ellipse(G,ae,V/2,P/2,0,0,2*Math.PI),$.stroke(),$.fill()}else $.fillRect(te,K,V,P)}$.globalAlpha=u,$.drawImage(X,F+A,B+A,ee,W),$.restore(),d&&d(J)},X.src=c}},t.prototype.render=function(){var n,r=+this.props.size+2*+this.props.quietZone;return np.createElement("canvas",{id:(n=this.props.id)!==null&&n!==void 0?n:"react-qrcode-logo",height:r,width:r,style:Sm({height:r+"px",width:r+"px"},this.props.style),ref:this.canvasRef})},t.defaultProps={value:"https://reactjs.org/",ecLevel:"M",enableCORS:!1,size:150,quietZone:10,bgColor:"#FFFFFF",fgColor:"#000000",logoOpacity:1,qrStyle:"squares",eyeRadius:[0,0,0],logoPaddingStyle:"square"},t}(np.Component);exports.QRCode_1=d0.QRCode=mD;const gD="_floating-label_3xm9u_1",vD="_without-label_3xm9u_21",bD="_floating-label-check_3xm9u_184",rp={floatingLabel:gD,withoutLabel:vD,floatingLabelCheck:bD},yD=e=>{const t=je.c(3),{hint:n,children:r}=e;let i;return t[0]!==r||t[1]!==n?(i=n?y.jsx(Jg,{text:n,placement:"top",children:r}):r,t[0]=r,t[1]=n,t[2]=i):i=t[2],i},lf=({ref:e,hidden:t,children:n,className:r,isInvalid:i,isForRadioInput:o,inputContainerClassName:a,isForCheckInput:s,hint:l,required:c,disabled:u,...d})=>{const{ProjectIconComponent:f}=v.useContext(rn),h=d.withoutLabel?"":y.jsxs("div",{className:"d-flex gap-1 align-items-center",children:[d.label,c?y.jsx("span",{className:se("fw-bold",{"text-danger":!u}),style:{fontSize:"16px"},children:"*"}):null,l?y.jsx("div",{className:"d-flex align-items-center",children:y.jsx(f,{icon:"info"})}):null]});return s?y.jsx("div",{className:se("luminus-floating-label-check",rp.floatingLabelCheck),children:n}):y.jsx(yD,{hint:l,children:y.jsx(Ug,{ref:e,label:y.jsx("div",{className:"d-flex gap-1 align-items-center",children:h}),hidden:t??!1,className:se(`luminus-floating-label ${r??""}`,rp.floatingLabel,{[a??""]:a},{[rp.withoutLabel]:d.withoutLabel}),children:n})})};lf.displayName="FloatingLabelInput";const xD="_row-label-input_i295l_1",wD="_label_i295l_4",_D="_input-container_i295l_9",CD="_keep-check-label_i295l_132",SD="_is-invalid_i295l_160",Us={rowLabelInput:xD,label:wD,inputContainer:_D,keepCheckLabel:CD,isInvalid:SD},Tc=({ref:e,hidden:t,children:n,required:r,disabled:i,className:o,isInvalid:a,isForRadioInput:s,isForTextAreaInput:l,inputContainerClassName:c,hint:u,...d})=>{const{ProjectIconComponent:f}=v.useContext(rn),h=d.withoutLabel?y.jsx(y.Fragment,{}):y.jsx("label",{className:se("label col-6",{"col-12":l},Us.label),children:y.jsxs(jn,{variant:"form-label",className:se("d-flex gap-1 align-items-center",a?"text-danger":""),children:[d.label,r?y.jsx("span",{className:se("fw-bold",{"text-danger":!i}),style:{fontSize:"16px"},children:"*"}):null,u?y.jsx("div",{className:"d-flex align-items-center",style:{paddingTop:"2px"},children:y.jsx(f,{icon:"info"})}):null]})});return y.jsxs("div",{ref:e,className:se("luminus-row-label row gx-0 gy-0",{"is-invalid":a},{[Us.isInvalid]:a},{[o??""]:o},{"d-none":t},Us.rowLabelInput),children:[u?y.jsx(Jg,{text:u,placement:"top",children:h}):h,y.jsx("div",{className:se("input-container",Us.inputContainer,{"col-6":!d.withoutLabel&&!l},{"col-12":d.withoutLabel||l},{[Us.keepCheckLabel]:s},{[c??""]:c}),children:n})]})};Tc.displayName="RowLabelInput";const hC=e=>{const t=je.c(4),{ref:n,children:r,className:i,hidden:o}=e,a=`${o?"d-none":""} ${i}`;let s;return t[0]!==r||t[1]!==n||t[2]!==a?(s=y.jsx("div",{ref:n,className:a,children:r}),t[0]=r,t[1]=n,t[2]=a,t[3]=s):s=t[3],s};hC.displayName="NoInputContainer";const pC=e=>{const t=je.c(8),{currentSelection:n,selectedItemNavigateTo:r,children:i}=e;if(!n||!n.id||!r){let l;return t[0]!==i?(l=y.jsx("div",{className:"luminus-input-container position-relative w-100",children:i}),t[0]=i,t[1]=l):l=t[1],l}let o;t[2]!==n||t[3]!==r?(o=r(n),t[2]=n,t[3]=r,t[4]=o):o=t[4];const a=o;let s;return t[5]!==i||t[6]!==a?(s=y.jsx(us.Link,{to:a,className:"luminus-input-container position-relative w-100 text-decoration-none",children:i}),t[5]=i,t[6]=a,t[7]=s):s=t[7],s},mC=({InputContainer:e=lf,type:t,value:n,onChange:r,debounceMs:i,label:o,withoutLabel:a,placeholder:s,size:l,hidden:c,disabled:u,showClearIcon:d,clearValue:f,list:h,className:p,step:m,minLength:g,maxLength:x,noSelectOnFocus:_,hint:w,onConfirm:C,autoComplete:b})=>{var N,H,Y;const S=t==="number",M=v.useCallback(()=>{if(!r)return;const q=f??null;r(S?q?Number(q):null:(q==null?void 0:q.toString())??"")},[f,S,r]),$=v.useRef(null),[k,R]=v.useState((n==null?void 0:n.toString())??""),T=v.useCallback(q=>{const Z=q;r&&r(S?Z==null||Z===""?null:Number(Z):Z||null)},[S,r]),E=v.useCallback(q=>{var X;const Z=(X=q.target)==null?void 0:X.value;if(!i){T(Z);return}R(Z),$.current!==null&&window.clearTimeout($.current),$.current=window.setTimeout(()=>{T(Z)},i)},[i,T]),A=v.useMemo(()=>{if(C!==void 0)return q=>{q.key==="Enter"&&C&&C()}},[C]);v.useEffect(()=>{R(n===null?"":n.toString())},[n]);const[I,j]=v.useState(!1),D=c0(t,n?n.toString()??null:null,I),O=v.useRef(null),L=(((N=O.current)==null?void 0:N.scrollWidth)??0)>(((H=O.current)==null?void 0:H.clientWidth)??0),z=(Y=O.current)==null?void 0:Y.getBoundingClientRect();return y.jsxs(e,{withoutLabel:a,label:o??"",hidden:c,className:p,hint:w,disabled:u,children:[y.jsx(Xr.Control,{type:D,placeholder:s??o,size:l,value:i?k:(n==null?void 0:n.toString())??"",onChange:E,className:p??"",hidden:c,disabled:u??!1,list:h,onFocus:q=>{j(!0),!_&&q.target.select()},onBlur:()=>j(!1),onKeyDown:A,step:m,minLength:g,maxLength:x,autoComplete:b,ref:O}),d&&n!==null&&r&&!u&&y.jsx("div",{className:`luminus-input-remove-icon ${t!=="text"?"inset":""}`,children:y.jsx(Sc,{color:"secondary",size:"sm",onClick:M,children:y.jsx(gc,{})})}),L?y.jsx("div",{className:"luminus-overflow-tooltip",style:{opacity:0,position:"fixed",top:((z==null?void 0:z.top)??0)+((z==null?void 0:z.height)??0),left:(z==null?void 0:z.left)??0},children:i?k:(n==null?void 0:n.toString())??""}):null]})},gC=e=>{const t=je.c(7),{value:n,MiniDetailComponent:r,children:i,miniDetailPlacement:o}=e;if(!n||!r)return i;let a;t[0]!==n?(a=n.toString(),t[0]=n,t[1]=a):a=t[1];let s;return t[2]!==r||t[3]!==i||t[4]!==o||t[5]!==a?(s=y.jsx(r,{id:a,placement:o,children:i}),t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s):s=t[6],s},vC=({InputContainer:e=lf,value:t,options:n,onChange:r,label:i,withoutLabel:o,isNumber:a,size:s,hidden:l,disabled:c,noSortOptions:u,className:d,suffixIdToName:f,noEmptyOption:h,appendCurrentSelectionWithName:p,dropdownWidth:m,hint:g,addNewOptionPath:x,refreshOptions:_,MiniDetailComponent:w,miniDetailPlacement:C,selectedItemNavigateTo:b,noRemoveButton:S})=>{const{texts:{customSelect:M}}=v.useContext(rn),[$,k]=v.useState(!1),[R,T]=v.useState(""),E=v.useCallback(z=>{T(z)},[]),A=v.useMemo(()=>n.find(z=>z.id===t)??null,[n,t]),I=v.useCallback(z=>{var N;return z===null?"":!z.name||z.name.length===0?((N=z.id)==null?void 0:N.toString())??"":f?`${z.name} (${z.id})`:z.name},[f]),j=v.useMemo(()=>{const z=n?[...n]:[];return p!==void 0&&t!==void 0&&t!==null&&(z.some(N=>N.id===t)||z.push({id:t,name:p})),z.map(N=>({id:N.id,name:I(N)})).filter(N=>e0(N.name,R)).sort((N,H)=>u?0:(N.name??"").localeCompare(H.name??""))},[n,u,R,I,p,t]),D=v.useCallback(z=>{var N;r&&r((z==null?void 0:z.id)===void 0||(z==null?void 0:z.id)===null?null:a?Number(z.id):(N=z.id)==null?void 0:N.toString())},[r,a]),O=v.useCallback(z=>{k(!1),D(z)},[D]),L=v.useRef(null);return y.jsx(y.Fragment,{children:y.jsxs(e,{withoutLabel:o,label:i??"",hidden:l,inputContainerClassName:se({"luminus-dropdown-select-open":$}),className:d,hint:g,disabled:c,children:[y.jsx(pC,{currentSelection:A,selectedItemNavigateTo:b,children:y.jsx(gC,{value:t,MiniDetailComponent:w,miniDetailPlacement:C,children:y.jsxs(Xr.Select,{ref:L,size:s,value:t??"",onMouseDown:z=>{z.currentTarget.focus(),z.preventDefault()},onClick:()=>{!c&&k(!0)},onChange:()=>{},className:se("w-100",{"luminus-dropdown-picker-disabled":c}),hidden:l,children:[h&&!(t==null||t==="")?void 0:y.jsx("option",{value:""}),t!=null&&y.jsx("option",{value:t,children:I(A)})]})})}),L.current&&y.jsx(x3,{show:$,onCancel:()=>k(!1),items:j,currentSelection:A??null,onSelectionChange:O,onSearchQueryChange:E,texts:M,disabled:c,inputRef:L,autoHideSearch:!0,allItemsLength:n.length,itemsNameWidth:m,addNewOptionPath:x,refreshOptions:_,noRemoveButton:S})]})})};function TD(e){return it({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(e)}function $D(e){return it({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(e)}function kD(e){return it({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"},child:[]}]})(e)}function MD(e){return it({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm250.2-143.7c-12.2-12-47-8.7-64.4-6.5-17.2-10.5-28.7-25-36.8-46.3 3.9-16.1 10.1-40.6 5.4-56-4.2-26.2-37.8-23.6-42.6-5.9-4.4 16.1-.4 38.5 7 67.1-10 23.9-24.9 56-35.4 74.4-20 10.3-47 26.2-51 46.2-3.3 15.8 26 55.2 76.1-31.2 22.4-7.4 46.8-16.5 68.4-20.1 18.9 10.2 41 17 55.8 17 25.5 0 28-28.2 17.5-38.7zm-198.1 77.8c5.1-13.7 24.5-29.5 30.4-35-19 30.3-30.4 35.7-30.4 35zm81.6-190.6c7.4 0 6.7 32.1 1.8 40.8-4.4-13.9-4.3-40.8-1.8-40.8zm-24.4 136.6c9.7-16.9 18-37 24.7-54.7 8.3 15.1 18.9 27.2 30.1 35.5-20.8 4.3-38.9 13.1-54.8 19.2zm131.6-5s-5 6-37.3-7.8c35.1-2.6 40.9 5.4 37.3 7.8z"},child:[]}]})(e)}const cf=e=>{const t=je.c(66),{InputContainer:n,formField:r,label:i,resetsFields:o,options:a,isNumber:s,size:l,showClearIcon:c,clearValue:u,noSortOptions:d,required:f,hidden:h,disabled:p,withoutLabel:m,hint:g,className:x}=e,_=n===void 0?Tc:n,{control:w,getValues:C,setValue:b}=sn.useFormContext(),{isSubmitted:S}=sn.useFormState();let M;t[0]===Symbol.for("react.memo_cache_sentinel")?(M={falseIfNotInit:!0},t[0]=M):M=t[0];const $=af(M);let k;t[1]!==w||t[2]!==r?(k={name:r,control:w},t[1]=w,t[2]=r,t[3]=k):k=t[3];const{field:R,fieldState:T}=sn.useController(k),{value:E,onChange:A,onBlur:I,ref:j,name:D}=R,{error:O}=T,[L,z]=v.useState(!1);let N;if(t[4]!==d||t[5]!==a){let le;t[7]!==d?(le=(ye,ge)=>d?0:(ye.name??"").localeCompare(ge.name??""),t[7]=d,t[8]=le):le=t[8],N=a.toSorted(le),t[4]=d,t[5]=a,t[6]=N}else N=t[6];const H=N;let Y;t[9]!==u||t[10]!==r||t[11]!==s||t[12]!==b||t[13]!==L?(Y=()=>{const le=u??null;s?b(r,le===null?null:Number(le),{shouldDirty:!0,shouldValidate:L}):b(r,(le==null?void 0:le.toString())??"",{shouldDirty:!0,shouldValidate:L})},t[9]=u,t[10]=r,t[11]=s,t[12]=b,t[13]=L,t[14]=Y):Y=t[14];const q=Y,Z=p||$;let X;t[15]!==r||t[16]!==C||t[17]!==b?(X=()=>{b(r,C(r))},t[15]=r,t[16]=C,t[17]=b,t[18]=X):X=t[18];let J;t[19]!==r||t[20]!==C||t[21]!==H||t[22]!==b?(J=[H,r,C,b],t[19]=r,t[20]=C,t[21]=H,t[22]=b,t[23]=J):J=t[23],v.useEffect(X,J);let ee,W;t[24]!==S?(ee=()=>{S&&z(!0)},W=[S],t[24]=S,t[25]=ee,t[26]=W):(ee=t[25],W=t[26]),v.useEffect(ee,W);const F=O!==void 0;let B;t[27]!==A||t[28]!==s||t[29]!==o||t[30]!==b||t[31]!==L?(B=le=>{const ye=le.target.value;let ge;s?ge=ye===""?null:parseInt(ye,10):ge=ye===""?null:ye,A(ge),o&&o.forEach(be=>b(be,null,{shouldDirty:!0,shouldValidate:L}))},t[27]=A,t[28]=s,t[29]=o,t[30]=b,t[31]=L,t[32]=B):B=t[32];const V=B,P=i??"",te=E??"";let K;t[33]===Symbol.for("react.memo_cache_sentinel")?(K=y.jsx("option",{value:""}),t[33]=K):K=t[33];let G;t[34]!==H?(G=H.map(ED),t[34]=H,t[35]=G):G=t[35];let ae;t[36]!==Z||t[37]!==D||t[38]!==I||t[39]!==j||t[40]!==V||t[41]!==h||t[42]!==F||t[43]!==l||t[44]!==te||t[45]!==G?(ae=y.jsxs(Xr.Select,{size:l,name:D,value:te,onChange:V,onBlur:I,ref:j,isInvalid:F,hidden:h,disabled:Z,className:"w-100",children:[K,G]}),t[36]=Z,t[37]=D,t[38]=I,t[39]=j,t[40]=V,t[41]=h,t[42]=F,t[43]=l,t[44]=te,t[45]=G,t[46]=ae):ae=t[46];let ne;t[47]!==q||t[48]!==E||t[49]!==c?(ne=c&&E!=null&&y.jsx("div",{className:"luminus-input-remove-icon inset",children:y.jsx(Sc,{color:"secondary",size:"sm",onClick:q,children:y.jsx(gc,{})})}),t[47]=q,t[48]=E,t[49]=c,t[50]=ne):ne=t[50];let re;t[51]!==O?(re=O&&y.jsx(gf,{message:O.message}),t[51]=O,t[52]=re):re=t[52];let oe;return t[53]!==_||t[54]!==Z||t[55]!==x||t[56]!==h||t[57]!==g||t[58]!==F||t[59]!==f||t[60]!==P||t[61]!==ae||t[62]!==ne||t[63]!==re||t[64]!==m?(oe=y.jsx(y.Fragment,{children:y.jsxs(_,{label:P,required:f,disabled:Z,hidden:h,withoutLabel:m,isInvalid:F,hint:g,className:x,children:[ae,ne,re]})}),t[53]=_,t[54]=Z,t[55]=x,t[56]=h,t[57]=g,t[58]=F,t[59]=f,t[60]=P,t[61]=ae,t[62]=ne,t[63]=re,t[64]=m,t[65]=oe):oe=t[65],oe};function ED(e){return y.jsx("option",{value:e.id??"",children:e.name},e.id)}const f0=e=>{const t=je.c(61),{InputContainer:n,formField:r,label:i,resetsFields:o,size:a,showClearIcon:s,clearValue:l,required:c,hidden:u,disabled:d,rows:f,withoutLabel:h,customFormControlProps:p,minLength:m,maxLength:g,hint:x,onChange:_,className:w}=e,C=n===void 0?Tc:n,{control:b,setValue:S}=sn.useFormContext(),{isSubmitted:M}=sn.useFormState();let $;t[0]===Symbol.for("react.memo_cache_sentinel")?($={falseIfNotInit:!0},t[0]=$):$=t[0];const k=af($),[R,T]=v.useState(!1);let E;t[1]!==b||t[2]!==r?(E={name:r,control:b},t[1]=b,t[2]=r,t[3]=E):E=t[3];const{field:A,fieldState:I}=sn.useController(E),{onChange:j,onBlur:D,ref:O,value:L,name:z}=A,{error:N}=I;let H;t[4]!==p?(H=p??{},t[4]=p,t[5]=H):H=t[5];let Y,q,Z;t[6]!==H?({onChange:q,onBlur:Y,...Z}=H,t[6]=H,t[7]=Y,t[8]=q,t[9]=Z):(Y=t[7],q=t[8],Z=t[9]);let X;t[10]!==l||t[11]!==r||t[12]!==S||t[13]!==R?(X=()=>{const be=l??null,Me=be==null||be===""?null:be.toString();S(r,Me,{shouldDirty:!0,shouldValidate:R})},t[10]=l,t[11]=r,t[12]=S,t[13]=R,t[14]=X):X=t[14];const J=X,ee=d||k;let W,F;t[15]!==M?(W=()=>{M&&T(!0)},F=[M],t[15]=M,t[16]=W,t[17]=F):(W=t[16],F=t[17]),v.useEffect(W,F);const B=N!==void 0;let V;t[18]!==q||t[19]!==j||t[20]!==_||t[21]!==o||t[22]!==S||t[23]!==R?(V=be=>{const Me=be.target.value,ce=Me==null||Me===""?null:Me;j(ce),o&&o.forEach(de=>S(de,null,{shouldDirty:!0,shouldValidate:R})),_&&_(ce),q&&q(be)},t[18]=q,t[19]=j,t[20]=_,t[21]=o,t[22]=S,t[23]=R,t[24]=V):V=t[24];const P=V;let te;t[25]!==Y||t[26]!==D?(te=be=>{D(),Y&&Y(be)},t[25]=Y,t[26]=D,t[27]=te):te=t[27];const K=te,G=L!=null&&L!=="",ae=i??"",ne=L??"",re=f??2;let oe;t[28]!==ee||t[29]!==z||t[30]!==O||t[31]!==K||t[32]!==P||t[33]!==u||t[34]!==B||t[35]!==g||t[36]!==m||t[37]!==Z||t[38]!==a||t[39]!==ne||t[40]!==re?(oe=y.jsx(Xr.Control,{as:"textarea",name:z,size:a,value:ne,onChange:P,onBlur:K,ref:O,isInvalid:B,hidden:u,disabled:ee,rows:re,className:"w-100",minLength:m,maxLength:g,...Z}),t[28]=ee,t[29]=z,t[30]=O,t[31]=K,t[32]=P,t[33]=u,t[34]=B,t[35]=g,t[36]=m,t[37]=Z,t[38]=a,t[39]=ne,t[40]=re,t[41]=oe):oe=t[41];let le;t[42]!==J||t[43]!==G||t[44]!==s?(le=s&&G&&y.jsx("div",{className:"luminus-input-remove-icon",children:y.jsx(Sc,{color:"secondary",size:"sm",onClick:J,children:y.jsx(gc,{})})}),t[42]=J,t[43]=G,t[44]=s,t[45]=le):le=t[45];let ye;t[46]!==N?(ye=N&&y.jsx(gf,{message:N.message}),t[46]=N,t[47]=ye):ye=t[47];let ge;return t[48]!==C||t[49]!==ee||t[50]!==w||t[51]!==u||t[52]!==x||t[53]!==B||t[54]!==c||t[55]!==ae||t[56]!==oe||t[57]!==le||t[58]!==ye||t[59]!==h?(ge=y.jsxs(C,{label:ae,required:c,disabled:ee,hidden:u,withoutLabel:h,isInvalid:B,className:w,hint:x,isForTextAreaInput:!0,children:[oe,le,ye]}),t[48]=C,t[49]=ee,t[50]=w,t[51]=u,t[52]=x,t[53]=B,t[54]=c,t[55]=ae,t[56]=oe,t[57]=le,t[58]=ye,t[59]=h,t[60]=ge):ge=t[60],ge},rs=({ref:e,InputContainer:t=Tc,type:n,formField:r,label:i,placeholder:o,size:a,resetsFields:s,showClearIcon:l,clearValue:c,required:u,hidden:d,disabled:f,withoutLabel:h,list:p,step:m,CustomOnChangeComponent:g,noSelectOnFocus:x,minLength:_,maxLength:w,hint:C,onChange:b,className:S,autoComplete:M})=>{var V,P,te,K;const{control:$,setValue:k}=sn.useFormContext(),{isSubmitted:R}=sn.useFormState(),T=af({falseIfNotInit:!0}),{field:{value:E,onChange:A,onBlur:I,ref:j,name:D},fieldState:{error:O}}=sn.useController({name:r,control:$}),[L,z]=v.useState(!1),N=v.useCallback(()=>{const G=c??null;n==="number"?k(r,G!==null?Number(G):null,{shouldDirty:!0,shouldValidate:L}):k(r,(G==null?void 0:G.toString())??"",{shouldDirty:!0,shouldValidate:L})},[c,n,k,r,L]),H=v.useMemo(()=>f||T,[f,T]),Y=O!==void 0,[q,Z]=v.useState(!1),X=c0(n,E??null,q),J=v.useCallback(G=>{const ae=G.target.value;let ne=ae;n==="number"?ne=ae===""?null:Number(ae):ne=ae===""?null:ae,A(ne),s&&s.forEach(re=>k(re,null,{shouldDirty:!0,shouldValidate:L})),b&&b(ne===null?null:n==="number"?ne??null:ne.toString())},[A,b,s,k,L,n]),ee=v.useCallback(()=>{Z(!1),I()},[I]),W=v.useRef(null),F=(((V=W.current)==null?void 0:V.scrollWidth)??0)>(((P=W.current)==null?void 0:P.clientWidth)??0),B=(te=W.current)==null?void 0:te.getBoundingClientRect();return v.useImperativeHandle(e,()=>W.current,[W]),v.useEffect(()=>{R&&z(!0)},[R]),y.jsxs(t,{label:i,required:u,disabled:H,hidden:d,withoutLabel:h??!1,isInvalid:Y,hint:C,className:S,children:[y.jsxs("div",{className:"luminus-input-container position-relative w-100",children:[y.jsx(Xr.Control,{type:X,placeholder:o??i,size:a,name:D,value:E??"",onChange:J,onBlur:ee,onFocus:G=>{Z(!0),!x&&G.target.select()},ref:G=>{j(G),W.current=G},isInvalid:Y,hidden:d,disabled:H,list:p,className:"w-100",step:m,minLength:_,maxLength:w,autoComplete:M}),g&&y.jsx("div",{className:"custom-picker-button",children:g})]}),l&&E!=null&&y.jsx("div",{className:`luminus-input-remove-icon ${n!=="text"?"inset":""}`,children:y.jsx(Sc,{color:"secondary",size:"sm",onClick:N,children:y.jsx(gc,{})})}),F?y.jsx("div",{className:"luminus-overflow-tooltip",style:{opacity:0,position:"fixed",top:((B==null?void 0:B.top)??0)+((B==null?void 0:B.height)??0),left:(B==null?void 0:B.left)??0,pointerEvents:"none"},children:((K=W.current)==null?void 0:K.value)??""}):null,O&&y.jsx(gf,{message:O.message})]})},OD="_item_1dy8x_1",bC={item:OD},$o=e=>{const t=je.c(17);let n,r,i,o,a,s,l;t[0]!==e?({color:s,icon:i,className:r,children:n,to:l,as:o,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=l):(n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],l=t[7]);const u=`btn luminus-dropdown-item text-nowrap rounded text-${s===void 0?"primary":s} ${r??""}`;let d;t[8]!==u?(d=se(u,bC.item),t[8]=u,t[9]=d):d=t[9];const f=o==="link"?us.Link:void 0,h=l??"";let p;return t[10]!==n||t[11]!==i||t[12]!==a||t[13]!==d||t[14]!==f||t[15]!==h?(p=y.jsxs(Za.Item,{className:d,as:f,to:h,...a,children:[i,n]}),t[10]=n,t[11]=i,t[12]=a,t[13]=d,t[14]=f,t[15]=h,t[16]=p):p=t[16],p},AD="_button_qhwih_1",RD={button:AD},h0=({ref:e,color:t="primary",icon:n=y.jsx(V_,{size:21}),text:r,onClick:i,className:o,children:a,...s})=>y.jsxs("button",{type:"button",ref:e,onClick:l=>{l.preventDefault(),i(l)},"aria-label":"dropdown toggle",className:se(`btn luminus-context-button text-${t} ${o??""}`,RD.button),...s,children:[n,r]}),p0=e=>{const t=je.c(2);let n;return t[0]!==e?(n=y.jsx(Za.Toggle,{...e}),t[0]=e,t[1]=n):n=t[1],n},DD="_divider_1e6rk_1",ID={divider:DD},Tm=e=>{const t=je.c(4),{className:n}=e;let r;t[0]!==n?(r=se("luminus-dropdown-divider",n,ID.divider),t[0]=n,t[1]=r):r=t[1];let i;return t[2]!==r?(i=y.jsx(Za.Divider,{className:r}),t[2]=r,t[3]=i):i=t[3],i},jD="_dropdown_1lk66_1",PD={dropdown:jD},m0=e=>{const t=je.c(23);let n,r,i,o,a,s,l,c,u,d;if(t[0]!==e){const{toggle:m,children:g,align:x,..._}=e;o=g,i=x;const{menuAlign:w,menuClassName:C,...b}=_.menuProps||{};a=w,s=b,r=Za,c=_,u=i,d=m,n=Za.Menu,l=se("luminus-dropdown rounded shadow",PD.dropdown,C),t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=l,t[8]=c,t[9]=u,t[10]=d}else n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],l=t[7],c=t[8],u=t[9],d=t[10];const f=i||a;let h;t[11]!==n||t[12]!==o||t[13]!==s||t[14]!==l||t[15]!==f?(h=y.jsx(n,{className:l,align:f,...s,children:o}),t[11]=n,t[12]=o,t[13]=s,t[14]=l,t[15]=f,t[16]=h):h=t[16];let p;return t[17]!==r||t[18]!==c||t[19]!==u||t[20]!==d||t[21]!==h?(p=y.jsxs(r,{...c,align:u,children:[d,h]}),t[17]=r,t[18]=c,t[19]=u,t[20]=d,t[21]=h,t[22]=p):p=t[22],p},ND="_wrapper_1tb6d_1",LD="_controls_1tb6d_16",FD="_explorerWindow_1tb6d_20",BD="_folderList_1tb6d_28",zD="_fileList_1tb6d_35",WD="_dndText_1tb6d_61",po={wrapper:ND,controls:LD,explorerWindow:FD,folderList:BD,fileList:zD,dndText:WD},mn=v.createContext({apiActions:{},loadDocuments(){throw new Error("DocumentsContext was not initialized.")},reducer:[{},{}],entityType:"",entityId:-1}),UD="_defaultFolder_8tlxv_1",HD="_names_8tlxv_5",VD="_folderType_8tlxv_9",ip={defaultFolder:UD,names:HD,folderType:VD},yC=e=>{const t=je.c(19),{isActive:n,isDefault:r,folderName:i,typeName:o}=e,{ProjectIconComponent:a}=v.useContext(rn),s=`folder${n?"-filled":""}`,l=r?ip.defaultFolder:"text-primary";let c;t[0]!==l?(c=se("d-inline-block",l),t[0]=l,t[1]=c):c=t[1];let u;t[2]===Symbol.for("react.memo_cache_sentinel")?(u={className:"d-block"},t[2]=u):u=t[2];let d;t[3]!==a||t[4]!==s||t[5]!==c?(d=y.jsx(a,{icon:s,className:c,iconProps:u,size:18}),t[3]=a,t[4]=s,t[5]=c,t[6]=d):d=t[6];let f;t[7]===Symbol.for("react.memo_cache_sentinel")?(f=se("d-flex flex-column gap-0 align-items-start",ip.names),t[7]=f):f=t[7];const h=n?"fw-bold":"";let p;t[8]!==i||t[9]!==h?(p=y.jsx("span",{className:h,children:i}),t[8]=i,t[9]=h,t[10]=p):p=t[10];let m;t[11]!==o?(m=o?y.jsxs("span",{className:ip.folderType,children:["(",o,")"]}):null,t[11]=o,t[12]=m):m=t[12];let g;t[13]!==p||t[14]!==m?(g=y.jsxs("div",{className:f,children:[p,m]}),t[13]=p,t[14]=m,t[15]=g):g=t[15];let x;return t[16]!==g||t[17]!==d?(x=y.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[d,g]}),t[16]=g,t[17]=d,t[18]=x):x=t[18],x},qD=e=>{const t=je.c(9),{customText:n}=e,{reducer:r}=v.useContext(mn),[i,o]=r;let a;t[0]!==o?(a=()=>{o({type:"select-folder",folderId:"root"})},t[0]=o,t[1]=a):a=t[1];const s=a;let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=se("border-0 bg-transparent"),t[2]=l):l=t[2];const c=n??"root",u=i.activeFolder==="root";let d;t[3]!==c||t[4]!==u?(d=y.jsx(yC,{folderName:c,isActive:u,typeName:"",isDefault:!0}),t[3]=c,t[4]=u,t[5]=d):d=t[5];let f;return t[6]!==s||t[7]!==d?(f=y.jsx("li",{children:y.jsx("button",{onClick:s,type:"button",className:l,children:d})}),t[6]=s,t[7]=d,t[8]=f):f=t[8],f};function YD(e){if(e.state!=="openned-modal")throw new Error('Not in "openned-modal" state!')}const xC=()=>{const e=nf(),{startLoading:t,stopLoading:n}=v.useContext(qd),{reducer:[,r]}=v.useContext(mn),i=v.useCallback(async(a,s)=>{t("documents-renameFolder");try{await e.put("/documents/folder/rename",{folderId:a,name:s}),r({type:"update-folders",folderIds:[a],newProperties:{name:s}})}finally{n("documents-renameFolder")}},[e,r,t,n]),o=v.useCallback(async a=>{t("documentsFolderCreate");try{const s=await e.post("/documents/folder",a);r({type:"create-folder",folderData:a,folderId:s.data.id,isOnlyRead:s.data.onlyRead})}finally{n("documentsFolderCreate")}},[e,r,t,n]);return{renameFolder:i,createFolder:o}},Eb=(e,t,n)=>{if(e&&"reportValidity"in e){const r=sn.get(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},wC=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?Eb(r.ref,n,e):r.refs&&r.refs.forEach(i=>Eb(i,n,e))}},GD=(e,t)=>{t.shouldUseNativeValidation&&wC(e,t);const n={};for(const r in e){const i=sn.get(t.fields,r),o=Object.assign(e[r]||{},{ref:i&&i.ref});if(ZD(t.names||Object.keys(e),r)){const a=Object.assign({},sn.get(n,r));sn.set(a,"root",o),sn.set(n,r,a)}else sn.set(n,r,o)}return n},ZD=(e,t)=>e.some(n=>n.startsWith(t+"."));var XD=function(e,t){for(var n={};e.length;){var r=e[0],i=r.code,o=r.message,a=r.path.join(".");if(!n[a])if("unionErrors"in r){var s=r.unionErrors[0].errors[0];n[a]={message:s.message,type:s.code}}else n[a]={message:o,type:i};if("unionErrors"in r&&r.unionErrors.forEach(function(u){return u.errors.forEach(function(d){return e.push(d)})}),t){var l=n[a].types,c=l&&l[r.code];n[a]=sn.appendErrors(a,t,n,i,c?[].concat(c,r.message):r.message)}e.shift()}return n},uf=function(e,t,n){return n===void 0&&(n={}),function(r,i,o){try{return Promise.resolve(function(a,s){try{var l=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(c){return o.shouldUseNativeValidation&&wC({},o),{errors:{},values:n.raw?r:c}})}catch(c){return s(c)}return l&&l.then?l.then(void 0,s):l}(0,function(a){if(function(s){return Array.isArray(s==null?void 0:s.errors)}(a))return{values:{},errors:GD(XD(a.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw a}))}catch(a){return Promise.reject(a)}}};const KD=()=>{const e=je.c(14),{reducer:t,entityId:n,entityType:r}=v.useContext(mn),[i]=t,{zNumberRequired:o,zStringRequired:a}=of(),{createFolder:s}=xC();let l,c;if(e[0]!==o||e[1]!==a){const m=hi({name:a(),documentTypeId:o()});c=sn.useForm,l=uf(m),e[0]=o,e[1]=a,e[2]=l,e[3]=c}else l=e[2],c=e[3];let u;e[4]!==l?(u={resolver:l},e[4]=l,e[5]=u):u=e[5];const d=c(u);let f;e[6]!==s||e[7]!==n||e[8]!==r||e[9]!==i.activeFolder?(f=async m=>{const g={...m,dbObjectId:n.toString(),entity:r,parentFolderId:i.activeFolder==="root"?null:i.activeFolder};await s(g)},e[6]=s,e[7]=n,e[8]=r,e[9]=i.activeFolder,e[10]=f):f=e[10];const h=f;let p;return e[11]!==d||e[12]!==h?(p={formMethods:d,onSubmit:h},e[11]=d,e[12]=h,e[13]=p):p=e[13],p},JD=e=>{var b;const t=je.c(38),{handleClose:n}=e,{texts:r}=v.useContext(rn),{documents:i}=r,{reducer:o,entityType:a}=v.useContext(mn),[s]=o;if(YD(s),s.modalType!=="create-folder")throw new Error("Tried to render CreateFolderModal without create-folder modal type reducer state.");const{onSubmit:l,formMethods:c}=KD();let u;t[0]!==c||t[1]!==l?(u=c.handleSubmit(l),t[0]=c,t[1]=l,t[2]=u):u=t[2];let d;if(t[3]!==i||t[4]!==a||t[5]!==s.chosenFolderId||t[6]!==s.foldersMap){let S;t[8]!==a||t[9]!==s.chosenFolderId||t[10]!==s.foldersMap?(S=((b=s.foldersMap.get(s.chosenFolderId))==null?void 0:b.name)??a,t[8]=a,t[9]=s.chosenFolderId,t[10]=s.foldersMap,t[11]=S):S=t[11],d=i.createFolderInFolder(S),t[3]=i,t[4]=a,t[5]=s.chosenFolderId,t[6]=s.foldersMap,t[7]=d}else d=t[7];let f;t[12]!==d?(f=y.jsx(Vn.Header,{closeButton:!0,children:y.jsx(Vn.Title,{children:d})}),t[12]=d,t[13]=f):f=t[13];let h;t[14]!==i.name?(h=y.jsx(rs,{formField:"name",type:"text",label:i.name,required:!0}),t[14]=i.name,t[15]=h):h=t[15];let p;t[16]!==i.folderType||t[17]!==s.documentTypes?(p=y.jsx(cf,{options:s.documentTypes,formField:"documentTypeId",label:i.folderType,isNumber:!0,required:!0}),t[16]=i.folderType,t[17]=s.documentTypes,t[18]=p):p=t[18];let m;t[19]!==h||t[20]!==p?(m=y.jsxs(Vn.Body,{children:[h,p]}),t[19]=h,t[20]=p,t[21]=m):m=t[21];let g;t[22]!==i.cancel||t[23]!==n?(g=y.jsx(Uo,{onClick:n,variant:"outlined",color:"secondary",children:i.cancel}),t[22]=i.cancel,t[23]=n,t[24]=g):g=t[24];let x;t[25]!==i.createFolder?(x=y.jsx(Uo,{type:"submit",children:i.createFolder}),t[25]=i.createFolder,t[26]=x):x=t[26];let _;t[27]!==x||t[28]!==g?(_=y.jsxs(Vn.Footer,{children:[g,x]}),t[27]=x,t[28]=g,t[29]=_):_=t[29];let w;t[30]!==_||t[31]!==u||t[32]!==f||t[33]!==m?(w=y.jsxs(Xr,{onSubmit:u,children:[f,m,_]}),t[30]=_,t[31]=u,t[32]=f,t[33]=m,t[34]=w):w=t[34];let C;return t[35]!==c||t[36]!==w?(C=y.jsx(y.Fragment,{children:y.jsx(sn.FormProvider,{...c,children:w})}),t[35]=c,t[36]=w,t[37]=C):C=t[37],C},_C=100,QD=(e,t)=>{const n=nf(),{startLoading:r,stopLoading:i}=v.useContext(qd),{loadDocuments:o}=v.useContext(mn),{zStringRequired:a,zString:s,zNumberRequired:l,zDateRequired:c}=of(),u=hi({name:a(),description:s(),validToDate:c(),documentTypeId:l()}),d=sn.useForm({resolver:uf(u),defaultValues:{...e,validToDate:Zd(e.validToDate)}}),f=v.useCallback(async h=>{r("documents-updateProperties");try{await n.put(`/documents/${e.id}/update-info`,h),await o(),t()}finally{i("documents-updateProperties")}},[n,e.id,t,o,r,i]);return{formMethods:d,onSubmit:f}},eI=e=>{const t=je.c(38),{handleClose:n,file:r}=e,{texts:i}=v.useContext(rn),{documents:o}=i,{reducer:a}=v.useContext(mn),[s]=a,{formMethods:l,onSubmit:c}=QD(r,n);let u;t[0]!==o.editFileProperties?(u=y.jsx(Vn.Header,{closeButton:!0,children:y.jsx(Vn.Title,{children:o.editFileProperties})}),t[0]=o.editFileProperties,t[1]=u):u=t[1];let d;t[2]!==l||t[3]!==c?(d=l.handleSubmit(c),t[2]=l,t[3]=c,t[4]=d):d=t[4];let f;t[5]!==o.name?(f=y.jsx(rs,{formField:"name",type:"text",label:o.name,required:!0}),t[5]=o.name,t[6]=f):f=t[6];let h;t[7]!==o.validSince?(h=y.jsx(rs,{formField:"validToDate",type:"date",label:o.validSince,required:!0}),t[7]=o.validSince,t[8]=h):h=t[8];let p;t[9]!==o.category||t[10]!==s.documentTypes?(p=y.jsx(cf,{formField:"documentTypeId",label:o.category,options:s.documentTypes,isNumber:!0,required:!0}),t[9]=o.category,t[10]=s.documentTypes,t[11]=p):p=t[11];let m;t[12]===Symbol.for("react.memo_cache_sentinel")?(m={maxLength:_C},t[12]=m):m=t[12];let g;t[13]!==o.description?(g=y.jsx(f0,{formField:"description",label:o.description,customFormControlProps:m}),t[13]=o.description,t[14]=g):g=t[14];let x;t[15]!==f||t[16]!==h||t[17]!==p||t[18]!==g?(x=y.jsxs(Vn.Body,{children:[f,h,p,g]}),t[15]=f,t[16]=h,t[17]=p,t[18]=g,t[19]=x):x=t[19];let _;t[20]!==o.cancel||t[21]!==n?(_=y.jsx(Uo,{onClick:n,color:"secondary",variant:"outlined",children:o.cancel}),t[20]=o.cancel,t[21]=n,t[22]=_):_=t[22];let w;t[23]!==o.save?(w=y.jsx(Uo,{type:"submit",children:o.save}),t[23]=o.save,t[24]=w):w=t[24];let C;t[25]!==_||t[26]!==w?(C=y.jsxs(Vn.Footer,{children:[_,w]}),t[25]=_,t[26]=w,t[27]=C):C=t[27];let b;t[28]!==x||t[29]!==C||t[30]!==d?(b=y.jsxs(Xr,{onSubmit:d,children:[x,C]}),t[28]=x,t[29]=C,t[30]=d,t[31]=b):b=t[31];let S;t[32]!==l||t[33]!==b?(S=y.jsx(sn.FormProvider,{...l,children:b}),t[32]=l,t[33]=b,t[34]=S):S=t[34];let M;return t[35]!==S||t[36]!==u?(M=y.jsxs(y.Fragment,{children:[u,S]}),t[35]=S,t[36]=u,t[37]=M):M=t[37],M},tI=e=>{const t=je.c(9),{handleClose:n}=e,{reducer:r}=v.useContext(mn),[i]=r;let o;e:{if(i.markedFiles.length!==1){o=void 0;break e}let l;if(t[0]!==i.constantFiles||t[1]!==i.markedFiles[0]){let c;t[3]!==i.markedFiles[0]?(c=u=>u.id===i.markedFiles[0],t[3]=i.markedFiles[0],t[4]=c):c=t[4],l=i.constantFiles.find(c),t[0]=i.constantFiles,t[1]=i.markedFiles[0],t[2]=l}else l=t[2];o=l}const a=o;if(a===void 0){n();let l;return t[5]===Symbol.for("react.memo_cache_sentinel")?(l=y.jsx(y.Fragment,{}),t[5]=l):l=t[5],l}let s;return t[6]!==a||t[7]!==n?(s=y.jsx(eI,{file:a,handleClose:n}),t[6]=a,t[7]=n,t[8]=s):s=t[8],s},nI=()=>{const{reducer:[e,t]}=v.useContext(mn),n=v.useCallback(()=>{t({type:"close-modal"})},[t]),r=v.useMemo(()=>{if(e.state!=="openned-modal")return null;switch(e.modalType){case"create-folder":return y.jsx(JD,{handleClose:n});case"edit-file-properties":return y.jsx(tI,{handleClose:n});default:return null}},[e.state,e.modalType]);return y.jsx(Vn,{show:e.state==="openned-modal",onHide:n,children:r})},Ob="documents_drag_image_element",td="drop-container-highlight-class",Ab="data-drop-container-id",Rb="data-draggable-id",rI=()=>{const e=document.getElementById(Ob);if(e!==null)return e;const t=document.createElement("div");return t.id=Ob,t.style.position="absolute",t.style.top=`${-window.outerHeight}px`,t.style.left=`${-window.outerWidth}px`,t.style.width="50px",t.style.height="50px",t.style.backgroundColor="rgba(0, 0, 0, 0.5)",t.style.color="white",t.style.display="flex",t.style.alignItems="center",t.style.justifyContent="center",t.style.fontSize="16px",t.style.borderRadius="5px",document.body.appendChild(t),t},g0=()=>{const e=je.c(12),{apiActions:t,reducer:n}=v.useContext(mn),{moveDocuments:r}=t,[i]=n;let o;e[0]!==i.markedFiles?(o=x=>{var _;if(i.markedFiles.length>0){const w=rI();w.innerHTML=i.markedFiles.length.toString(),x.dataTransfer.setDragImage(w,0,0),x.dataTransfer.clearData(),x.dataTransfer.setData("application/json",JSON.stringify(i.markedFiles)),x.dataTransfer.dropEffect="none",x.dataTransfer.effectAllowed="move"}else x.dataTransfer.setData("application/json",JSON.stringify([parseInt(((_=x.currentTarget.attributes.getNamedItem(Rb))==null?void 0:_.nodeValue)??"",10)])),x.dataTransfer.dropEffect="none",x.dataTransfer.effectAllowed="move"},e[0]=i.markedFiles,e[1]=o):o=e[1];const a=o;let s;e[2]!==a||e[3]!==i.markedFiles?(s=x=>({[Rb]:x,draggable:i.markedFiles.length===0||i.markedFiles.includes(x),onDragStart:a}),e[2]=a,e[3]=i.markedFiles,e[4]=s):s=e[4];const l=s;let c;e[5]!==r?(c=x=>_=>{var b;_.preventDefault(),_.stopPropagation(),_.currentTarget.classList.remove(td);const w=_.dataTransfer.files;if(x&&w&&w.length>0){x(w);return}const C=_.dataTransfer.getData("application/json");if(C){const S=JSON.parse(C),M=parseInt(((b=_.currentTarget.attributes.getNamedItem(Ab))==null?void 0:b.value)??"",10);r(M,S)}},e[5]=r,e[6]=c):c=e[6];const u=c,d=oI,f=aI,h=sI;let p;e[7]!==u?(p=(x,_)=>({onDrop:u(_==null?void 0:_.onFilesDrop),onDragOver:d(),onDragEnter:f(_==null?void 0:_.ignoreInner),onDragLeave:h,[Ab]:x}),e[7]=u,e[8]=p):p=e[8];const m=p;let g;return e[9]!==l||e[10]!==m?(g={getDraggableProps:l,getDropProps:m},e[9]=l,e[10]=m,e[11]=g):g=e[11],g};function iI(e){e.preventDefault(),e.stopPropagation()}function oI(){return iI}function aI(e){return t=>{t.preventDefault(),t.stopPropagation(),t.dataTransfer.types.includes("Files")?(t.dataTransfer.dropEffect="copy",t.currentTarget.classList.add(td)):!e&&t.dataTransfer.types.includes("application/json")?(t.dataTransfer.dropEffect="move",t.currentTarget.classList.add(td)):t.dataTransfer.dropEffect="none"}}function sI(e){e.preventDefault(),e.stopPropagation(),e.target===e.currentTarget&&(e.dataTransfer.dropEffect="none",e.currentTarget.classList.remove(td))}function CC(e,t,n){for(let r=0;r<e.childrenIds.length;r++){const i=e.childrenIds[r];if(i===t)return!0;const o=n.get(i);if(o&&CC(o,t,n))return!0}return!1}function lI(e){if(e.activeFolder==="root")return!1;const t=e.foldersMap.get(e.activeFolder);return!(t!=null&&t.onlyRead)}function SC(e,t){const n=t.get(e);return n===void 0?"":n.parentId===null?n.name:`${SC(n.parentId,t)}/${n.name}`}const cI=()=>{const e=je.c(6),{zString:t,zStringRequired:n,zNumberRequired:r}=of();let i;e[0]!==r||e[1]!==t||e[2]!==n?(i=hi({validToDate:n(),description:t(),name:t(),documentTypeId:r()}),e[0]=r,e[1]=t,e[2]=n,e[3]=i):i=e[3];const o=i;let a;return e[4]!==o?(a={formSchema:o},e[4]=o,e[5]=a):a=e[5],a},v0=e=>{var X;const t=je.c(69),{handleClose:n,files:r,targetFolderId:i}=e,{texts:o}=v.useContext(rn),{documents:a}=o,{reducer:s,apiActions:l}=v.useContext(mn),[c]=s,{uploadFiles:u}=l;let d;t[0]!==r?(d=[...r],t[0]=r,t[1]=d):d=t[1];const f=d,h=i??c.activeFolder;let p;t[2]!==h||t[3]!==c.foldersMap?(p=h==="root"?void 0:c.foldersMap.get(h),t[2]=h,t[3]=c.foldersMap,t[4]=p):p=t[4];const m=p,{formSchema:g}=cI();let x;t[5]!==g?(x=uf(g),t[5]=g,t[6]=x):x=t[6];let _;t[7]===Symbol.for("react.memo_cache_sentinel")?(_=Zd(new Date().toISOString()),t[7]=_):_=t[7];let w;t[8]!==h||t[9]!==c.documentTypes||t[10]!==c.foldersMap?(w=(X=c.documentTypes.find(J=>{var ee;return J.name===((ee=c.foldersMap.get(h))==null?void 0:ee.defaultDocType)}))==null?void 0:X.id,t[8]=h,t[9]=c.documentTypes,t[10]=c.foldersMap,t[11]=w):w=t[11];let C;t[12]!==w?(C={validToDate:_,documentTypeId:w},t[12]=w,t[13]=C):C=t[13];let b;t[14]!==x||t[15]!==C?(b={resolver:x,defaultValues:C},t[14]=x,t[15]=C,t[16]=b):b=t[16];const S=sn.useForm(b);let M;t[17]!==r||t[18]!==h||t[19]!==n||t[20]!==u?(M=async J=>{h!=="root"&&(await u(r,{folderId:h,...J}),n())},t[17]=r,t[18]=h,t[19]=n,t[20]=u,t[21]=M):M=t[21];const $=M;let k;t[22]!==a||t[23]!==r.length||t[24]!==m.name?(k=a.uploadFilesPrompt(r.length,m.name),t[22]=a,t[23]=r.length,t[24]=m.name,t[25]=k):k=t[25];let R;t[26]!==f?(R=y.jsx("ul",{children:f.map(uI)}),t[26]=f,t[27]=R):R=t[27];let T;t[28]!==k||t[29]!==R?(T=y.jsx(Vn.Header,{closeButton:!0,children:y.jsxs("div",{children:[k,R]})}),t[28]=k,t[29]=R,t[30]=T):T=t[30];let E;t[31]!==S||t[32]!==$?(E=S.handleSubmit($),t[31]=S,t[32]=$,t[33]=E):E=t[33];let A;t[34]!==a.documentType||t[35]!==c.documentTypes?(A=y.jsx(cf,{formField:"documentTypeId",label:a.documentType,options:c.documentTypes,isNumber:!0,required:!0}),t[34]=a.documentType,t[35]=c.documentTypes,t[36]=A):A=t[36];let I;t[37]!==a.validSince?(I=y.jsx(rs,{formField:"validToDate",label:a.validSince,type:"date",required:!0}),t[37]=a.validSince,t[38]=I):I=t[38];let j;t[39]!==a.name||t[40]!==f.length?(j=f.length===1?y.jsx(rs,{formField:"name",label:a.name,type:"text"}):null,t[39]=a.name,t[40]=f.length,t[41]=j):j=t[41];let D;t[42]===Symbol.for("react.memo_cache_sentinel")?(D={maxLength:_C},t[42]=D):D=t[42];let O;t[43]!==a.description?(O=y.jsx(f0,{formField:"description",label:a.description,customFormControlProps:D}),t[43]=a.description,t[44]=O):O=t[44];let L;t[45]!==A||t[46]!==I||t[47]!==j||t[48]!==O?(L=y.jsxs(Vn.Body,{children:[A,I,j,O]}),t[45]=A,t[46]=I,t[47]=j,t[48]=O,t[49]=L):L=t[49];let z;t[50]!==a.cancel||t[51]!==n?(z=y.jsx(Uo,{variant:"outlined",color:"secondary",onClick:n,children:a.cancel}),t[50]=a.cancel,t[51]=n,t[52]=z):z=t[52];let N;t[53]!==a.upload?(N=y.jsx(Uo,{type:"submit",children:a.upload}),t[53]=a.upload,t[54]=N):N=t[54];let H;t[55]!==z||t[56]!==N?(H=y.jsxs(Vn.Footer,{children:[z,N]}),t[55]=z,t[56]=N,t[57]=H):H=t[57];let Y;t[58]!==E||t[59]!==L||t[60]!==H?(Y=y.jsxs(Xr,{onSubmit:E,children:[L,H]}),t[58]=E,t[59]=L,t[60]=H,t[61]=Y):Y=t[61];let q;t[62]!==S||t[63]!==Y?(q=y.jsx(sn.FormProvider,{...S,children:Y}),t[62]=S,t[63]=Y,t[64]=q):q=t[64];let Z;return t[65]!==n||t[66]!==T||t[67]!==q?(Z=y.jsxs(Vn,{show:!0,onHide:n,children:[T,q]}),t[65]=n,t[66]=T,t[67]=q,t[68]=Z):Z=t[68],Z};function uI(e,t){return y.jsxs("li",{children:[e.name," - ",Xa(e.size)]},`${e.name}-${t}`)}const dI="_folder_1cktt_1",fI="_collapseArrowDiv_1cktt_8",hI="_button_1cktt_20",pI="_nestedList_1cktt_24",mI="_numberOfFiles_1cktt_31",gI="_collapseArrow_1cktt_8",mo={folder:dI,collapseArrowDiv:fI,button:hI,nestedList:pI,numberOfFiles:mI,collapseArrow:gI},TC=e=>{const t=je.c(59),{dirId:n,writePermissions:r}=e,{ProjectIconComponent:i}=v.useContext(rn),{reducer:o}=v.useContext(mn),[a,s]=o,{getDropProps:l}=g0(),[c,u]=v.useState(null),[d,f]=v.useState(!0);let h,p;t[0]!==n||t[1]!==a.foldersMap?(p=a.foldersMap.get(n),t[0]=n,t[1]=a.foldersMap,t[2]=p):p=t[2];const m=p;if(m===void 0)throw new Error(`tried to get dir with id ${n}`);h=m;const g=h;let x;t[3]!==n||t[4]!==g||t[5]!==s||t[6]!==a.activeFolder||t[7]!==a.foldersMap?(x=()=>{a.activeFolder!=="root"&&CC(g,a.activeFolder,a.foldersMap)&&s({type:"select-folder",folderId:n}),f(!0)},t[3]=n,t[4]=g,t[5]=s,t[6]=a.activeFolder,t[7]=a.foldersMap,t[8]=x):x=t[8];const _=x,w=g.childrenIds.length>0;let C;t[9]!==n||t[10]!==s?(C=()=>{s({type:"select-folder",folderId:n})},t[9]=n,t[10]=s,t[11]=C):C=t[11];const b=C;let S;if(t[12]!==n||t[13]!==a.filteredFiles){let Y;t[15]!==n?(Y=q=>q.folderId===n&&q.archive===!1,t[15]=n,t[16]=Y):Y=t[16],S=a.filteredFiles.filter(Y),t[12]=n,t[13]=a.filteredFiles,t[14]=S}else S=t[14];const M=S.length;let $;t[17]!==i||t[18]!==_||t[19]!==w||t[20]!==d?($=w?d?y.jsx("button",{onClick:()=>f(!1),type:"button",children:y.jsx(i,{icon:"chevron-right",iconProps:{className:mo.collapseArrow}})}):y.jsx("button",{onClick:_,type:"button",children:y.jsx(i,{icon:"chevron-down",iconProps:{className:mo.collapseArrow}})}):null,t[17]=i,t[18]=_,t[19]=w,t[20]=d,t[21]=$):$=t[21];let k;t[22]!==$?(k=y.jsx("div",{className:mo.collapseArrowDiv,children:$}),t[22]=$,t[23]=k):k=t[23];let R;t[24]===Symbol.for("react.memo_cache_sentinel")?(R=se(mo.button),t[24]=R):R=t[24];let T;t[25]!==n||t[26]!==g.onlyRead||t[27]!==l||t[28]!==r?(T=r&&!g.onlyRead?l(n,{onFilesDrop:Y=>u(Y)}):{},t[25]=n,t[26]=g.onlyRead,t[27]=l,t[28]=r,t[29]=T):T=t[29];const E=g.defaultDocType??"",A=n===a.activeFolder;let I;t[30]!==g.isDefault||t[31]!==g.name||t[32]!==E||t[33]!==A?(I=y.jsx(yC,{isDefault:g.isDefault,folderName:g.name,typeName:E,isActive:A}),t[30]=g.isDefault,t[31]=g.name,t[32]=E,t[33]=A,t[34]=I):I=t[34];let j;t[35]!==M?(j=M>0?y.jsxs("span",{className:mo.numberOfFiles,children:["[",M,"]"]}):void 0,t[35]=M,t[36]=j):j=t[36];let D;t[37]!==I||t[38]!==j?(D=y.jsxs("div",{className:"d-flex align-items-center gap-2",children:[I,j]}),t[37]=I,t[38]=j,t[39]=D):D=t[39];let O;t[40]!==b||t[41]!==T||t[42]!==D?(O=y.jsx("button",{className:R,onClick:b,type:"button",...T,children:D}),t[40]=b,t[41]=T,t[42]=D,t[43]=O):O=t[43];let L;t[44]!==g.childrenIds||t[45]!==w||t[46]!==d||t[47]!==r?(L=w?d?null:y.jsx("ul",{className:mo.nestedList,children:g==null?void 0:g.childrenIds.map(Y=>y.jsx(TC,{dirId:Y,writePermissions:r},Y))}):void 0,t[44]=g.childrenIds,t[45]=w,t[46]=d,t[47]=r,t[48]=L):L=t[48];let z;t[49]!==O||t[50]!==L||t[51]!==k?(z=y.jsxs("li",{className:mo.folder,children:[k,O,L]}),t[49]=O,t[50]=L,t[51]=k,t[52]=z):z=t[52];let N;t[53]!==n||t[54]!==c?(N=c!==null?y.jsx(v0,{files:c,handleClose:()=>u(null),targetFolderId:n}):null,t[53]=n,t[54]=c,t[55]=N):N=t[55];let H;return t[56]!==z||t[57]!==N?(H=y.jsxs(y.Fragment,{children:[z,N]}),t[56]=z,t[57]=N,t[58]=H):H=t[58],H},vI="_wrapper_1th2u_1",bI="_downloadButton_1th2u_9",$m={wrapper:vI,downloadButton:bI},$C=6048e5,yI=864e5,Db=Symbol.for("constructDateFrom");function Ci(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Db in e?e[Db](t):e instanceof Date?new e.constructor(t):new Date(t)}function nr(e,t){return Ci(t||e,e)}function kC(e,t){const n=()=>Ci(t==null?void 0:t.in,NaN),r=CI(e);let i;if(r.date){const l=SI(r.date,2);i=TI(l.restDateString,l.year)}if(!i||isNaN(+i))return n();const o=+i;let a=0,s;if(r.time&&(a=$I(r.time),isNaN(a)))return n();if(r.timezone){if(s=kI(r.timezone),isNaN(s))return n()}else{const l=new Date(o+a),c=nr(0,t==null?void 0:t.in);return c.setFullYear(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()),c.setHours(l.getUTCHours(),l.getUTCMinutes(),l.getUTCSeconds(),l.getUTCMilliseconds()),c}return nr(o+a+s,t==null?void 0:t.in)}const ru={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},xI=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,wI=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,_I=/^([+-])(\d{2})(?::?(\d{2}))?$/;function CI(e){const t={},n=e.split(ru.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],ru.timeZoneDelimiter.test(t.date)&&(t.date=e.split(ru.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const i=ru.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function SI(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const i=r[1]?parseInt(r[1]):null,o=r[2]?parseInt(r[2]):null;return{year:o===null?i:o*100,restDateString:e.slice((r[1]||r[2]).length)}}function TI(e,t){if(t===null)return new Date(NaN);const n=e.match(xI);if(!n)return new Date(NaN);const r=!!n[4],i=Hs(n[1]),o=Hs(n[2])-1,a=Hs(n[3]),s=Hs(n[4]),l=Hs(n[5])-1;if(r)return RI(t,s,l)?MI(t,s,l):new Date(NaN);{const c=new Date(0);return!OI(t,o,a)||!AI(t,i)?new Date(NaN):(c.setUTCFullYear(t,o,Math.max(i,a)),c)}}function Hs(e){return e?parseInt(e):1}function $I(e){const t=e.match(wI);if(!t)return NaN;const n=op(t[1]),r=op(t[2]),i=op(t[3]);return DI(n,r,i)?n*36e5+r*6e4+i*1e3:NaN}function op(e){return e&&parseFloat(e.replace(",","."))||0}function kI(e){if(e==="Z")return 0;const t=e.match(_I);if(!t)return 0;const n=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return II(r,i)?n*(r*36e5+i*6e4):NaN}function MI(e,t,n){const r=new Date(0);r.setUTCFullYear(e,0,4);const i=r.getUTCDay()||7,o=(t-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+o),r}const EI=[31,null,31,30,31,30,31,31,30,31,30,31];function MC(e){return e%400===0||e%4===0&&e%100!==0}function OI(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(EI[t]||(MC(e)?29:28))}function AI(e,t){return t>=1&&t<=(MC(e)?366:365)}function RI(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function DI(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function II(e,t){return t>=0&&t<=59}let jI={};function df(){return jI}function Ll(e,t){var s,l,c,u;const n=df(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,i=nr(e,t==null?void 0:t.in),o=i.getDay(),a=(o<r?7:0)+o-r;return i.setDate(i.getDate()-a),i.setHours(0,0,0,0),i}function nd(e,t){return Ll(e,{...t,weekStartsOn:1})}function EC(e,t){const n=nr(e,t==null?void 0:t.in),r=n.getFullYear(),i=Ci(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const o=nd(i),a=Ci(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=nd(a);return n.getTime()>=o.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Ib(e){const t=nr(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function PI(e,...t){const n=Ci.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function jb(e,t){const n=nr(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function NI(e,t,n){const[r,i]=PI(n==null?void 0:n.in,e,t),o=jb(r),a=jb(i),s=+o-Ib(o),l=+a-Ib(a);return Math.round((s-l)/yI)}function LI(e,t){const n=EC(e,t),r=Ci(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),nd(r)}function FI(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function BI(e){return!(!FI(e)&&typeof e!="number"||isNaN(+nr(e)))}function zI(e,t){const n=nr(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const WI={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},UI=(e,t,n)=>{let r;const i=WI[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function ap(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const HI={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},VI={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},qI={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},YI={date:ap({formats:HI,defaultWidth:"full"}),time:ap({formats:VI,defaultWidth:"full"}),dateTime:ap({formats:qI,defaultWidth:"full"})},GI={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ZI=(e,t,n,r)=>GI[e];function Vs(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):a;i=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[s]||e.values[a]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const XI={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},KI={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},JI={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},QI={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},ej={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},tj={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},nj=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},rj={ordinalNumber:nj,era:Vs({values:XI,defaultWidth:"wide"}),quarter:Vs({values:KI,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Vs({values:JI,defaultWidth:"wide"}),day:Vs({values:QI,defaultWidth:"wide"}),dayPeriod:Vs({values:ej,defaultWidth:"wide",formattingValues:tj,defaultFormattingWidth:"wide"})};function qs(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const a=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?oj(s,d=>d.test(a)):ij(s,d=>d.test(a));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(a.length);return{value:c,rest:u}}}function ij(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function oj(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function aj(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];a=n.valueCallback?n.valueCallback(a):a;const s=t.slice(i.length);return{value:a,rest:s}}}const sj=/^(\d+)(th|st|nd|rd)?/i,lj=/\d+/i,cj={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},uj={any:[/^b/i,/^(a|c)/i]},dj={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},fj={any:[/1/i,/2/i,/3/i,/4/i]},hj={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},pj={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},mj={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},gj={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},vj={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},bj={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},yj={ordinalNumber:aj({matchPattern:sj,parsePattern:lj,valueCallback:e=>parseInt(e,10)}),era:qs({matchPatterns:cj,defaultMatchWidth:"wide",parsePatterns:uj,defaultParseWidth:"any"}),quarter:qs({matchPatterns:dj,defaultMatchWidth:"wide",parsePatterns:fj,defaultParseWidth:"any",valueCallback:e=>e+1}),month:qs({matchPatterns:hj,defaultMatchWidth:"wide",parsePatterns:pj,defaultParseWidth:"any"}),day:qs({matchPatterns:mj,defaultMatchWidth:"wide",parsePatterns:gj,defaultParseWidth:"any"}),dayPeriod:qs({matchPatterns:vj,defaultMatchWidth:"any",parsePatterns:bj,defaultParseWidth:"any"})},xj={code:"en-US",formatDistance:UI,formatLong:YI,formatRelative:ZI,localize:rj,match:yj,options:{weekStartsOn:0,firstWeekContainsDate:1}};function wj(e,t){const n=nr(e,t==null?void 0:t.in);return NI(n,zI(n))+1}function _j(e,t){const n=nr(e,t==null?void 0:t.in),r=+nd(n)-+LI(n);return Math.round(r/$C)+1}function OC(e,t){var u,d,f,h;const n=nr(e,t==null?void 0:t.in),r=n.getFullYear(),i=df(),o=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??i.firstWeekContainsDate??((h=(f=i.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,a=Ci((t==null?void 0:t.in)||e,0);a.setFullYear(r+1,0,o),a.setHours(0,0,0,0);const s=Ll(a,t),l=Ci((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,o),l.setHours(0,0,0,0);const c=Ll(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function Cj(e,t){var a,s,l,c;const n=df(),r=(t==null?void 0:t.firstWeekContainsDate)??((s=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:s.firstWeekContainsDate)??n.firstWeekContainsDate??((c=(l=n.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??1,i=OC(e,t),o=Ci((t==null?void 0:t.in)||e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),Ll(o,t)}function Sj(e,t){const n=nr(e,t==null?void 0:t.in),r=+Ll(n,t)-+Cj(n,t);return Math.round(r/$C)+1}function Bt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Di={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Bt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Bt(n+1,2)},d(e,t){return Bt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Bt(e.getHours()%12||12,t.length)},H(e,t){return Bt(e.getHours(),t.length)},m(e,t){return Bt(e.getMinutes(),t.length)},s(e,t){return Bt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return Bt(i,t.length)}},ba={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Pb={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Di.y(e,t)},Y:function(e,t,n,r){const i=OC(e,r),o=i>0?i:1-i;if(t==="YY"){const a=o%100;return Bt(a,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):Bt(o,t.length)},R:function(e,t){const n=EC(e);return Bt(n,t.length)},u:function(e,t){const n=e.getFullYear();return Bt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Bt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Bt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Di.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Bt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=Sj(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Bt(i,t.length)},I:function(e,t,n){const r=_j(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Bt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Di.d(e,t)},D:function(e,t,n){const r=wj(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Bt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Bt(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Bt(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return Bt(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=ba.noon:r===0?i=ba.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=ba.evening:r>=12?i=ba.afternoon:r>=4?i=ba.morning:i=ba.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Di.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Di.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Bt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Bt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Di.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Di.s(e,t)},S:function(e,t){return Di.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Lb(r);case"XXXX":case"XX":return xo(r);case"XXXXX":case"XXX":default:return xo(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Lb(r);case"xxxx":case"xx":return xo(r);case"xxxxx":case"xxx":default:return xo(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Nb(r,":");case"OOOO":default:return"GMT"+xo(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Nb(r,":");case"zzzz":default:return"GMT"+xo(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Bt(r,t.length)},T:function(e,t,n){return Bt(+e,t.length)}};function Nb(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return o===0?n+String(i):n+String(i)+t+Bt(o,2)}function Lb(e,t){return e%60===0?(e>0?"-":"+")+Bt(Math.abs(e)/60,2):xo(e,t)}function xo(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Bt(Math.trunc(r/60),2),o=Bt(r%60,2);return n+i+t+o}const Fb=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},AC=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Tj=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Fb(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",Fb(r,t)).replace("{{time}}",AC(i,t))},$j={p:AC,P:Tj},kj=/^D+$/,Mj=/^Y+$/,Ej=["D","DD","YY","YYYY"];function Oj(e){return kj.test(e)}function Aj(e){return Mj.test(e)}function Rj(e,t,n){const r=Dj(e,t,n);if(console.warn(r),Ej.includes(e))throw new RangeError(r)}function Dj(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Ij=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,jj=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Pj=/^'([^]*?)'?$/,Nj=/''/g,Lj=/[a-zA-Z]/;function RC(e,t,n){var u,d,f,h;const r=df(),i=r.locale??xj,o=r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,a=r.weekStartsOn??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,s=nr(e,n==null?void 0:n.in);if(!BI(s))throw new RangeError("Invalid time value");let l=t.match(jj).map(p=>{const m=p[0];if(m==="p"||m==="P"){const g=$j[m];return g(p,i.formatLong)}return p}).join("").match(Ij).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:Fj(p)};if(Pb[m])return{isToken:!0,value:p};if(m.match(Lj))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:p}});i.localize.preprocessor&&(l=i.localize.preprocessor(s,l));const c={firstWeekContainsDate:o,weekStartsOn:a,locale:i};return l.map(p=>{if(!p.isToken)return p.value;const m=p.value;(Aj(m)||Oj(m))&&Rj(m,t,String(e));const g=Pb[m[0]];return g(s,m,i.localize,c)}).join("")}function Fj(e){const t=e.match(Pj);return t?t[1].replace(Nj,"'"):e}function DC(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var Fl;(function(e){e.event="event",e.props="prop"})(Fl||(Fl={}));function Bi(){}function Bj(e){var t,n=void 0;return function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return t&&r.length===t.length&&r.every(function(o,a){return o===t[a]})||(t=r,n=e.apply(void 0,r)),n}}function Bl(e){return!!(e||"").match(/\d/)}function Pa(e){return e==null}function zj(e){return typeof e=="number"&&isNaN(e)}function IC(e){return Pa(e)||zj(e)||typeof e=="number"&&!isFinite(e)}function jC(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function Wj(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Uj(e,t,n){var r=Wj(n),i=e.search(/[1-9]/);return i=i===-1?e.length:i,e.substring(0,i)+e.substring(i,e.length).replace(r,"$1"+t)}function Hj(e){var t=v.useRef(e);t.current=e;var n=v.useRef(function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return t.current.apply(t,r)});return n.current}function b0(e,t){t===void 0&&(t=!0);var n=e[0]==="-",r=n&&t;e=e.replace("-","");var i=e.split("."),o=i[0],a=i[1]||"";return{beforeDecimal:o,afterDecimal:a,hasNegation:n,addNegation:r}}function Vj(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var n=e.split("."),r=n[0].replace(/^0+/,"")||"0",i=n[1]||"";return(t?"-":"")+r+(i?"."+i:"")}function PC(e,t,n){for(var r="",i=n?"0":"",o=0;o<=t-1;o++)r+=e[o]||i;return r}function Bb(e,t){return Array(t+1).join(e)}function NC(e){var t=e+"",n=t[0]==="-"?"-":"";n&&(t=t.substring(1));var r=t.split(/[eE]/g),i=r[0],o=r[1];if(o=Number(o),!o)return n+i;i=i.replace(".","");var a=1+o,s=i.length;return a<0?i="0."+Bb("0",Math.abs(a))+i:a>=s?i=i+Bb("0",a-s):i=(i.substring(0,a)||"0")+"."+i.substring(a),n+i}function zb(e,t,n){if(["","-"].indexOf(e)!==-1)return e;var r=(e.indexOf(".")!==-1||n)&&t,i=b0(e),o=i.beforeDecimal,a=i.afterDecimal,s=i.hasNegation,l=parseFloat("0."+(a||"0")),c=a.length<=t?"0."+a:l.toFixed(t),u=c.split("."),d=o;o&&Number(u[0])&&(d=o.split("").reverse().reduce(function(m,g,x){return m.length>x?(Number(m[0])+Number(g)).toString()+m.substring(1,m.length):g+m},u[0]));var f=PC(u[1]||"",t,n),h=s?"-":"",p=r?".":"";return""+h+d+p+f}function Co(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var LC=Bj(function(e,t){for(var n=0,r=0,i=e.length,o=t.length;e[n]===t[n]&&n<i;)n++;for(;e[i-1-r]===t[o-1-r]&&o-r>n&&i-r>n;)r++;return{from:{start:n,end:i-r},to:{start:n,end:o-r}}}),qj=function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}};function Yj(e,t,n){return Math.min(Math.max(e,t),n)}function sp(e){return Math.max(e.selectionStart,e.selectionEnd)}function Gj(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Zj(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function Xj(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,i=e.formattedValueIndex;return t[r]===n[i]}function Kj(e,t,n,r,i,o,a){a===void 0&&(a=Xj);var s=i.findIndex(function(C){return C}),l=e.slice(0,s);!t&&!n.startsWith(l)&&(t=l,n=l+n,r=r+l.length);for(var c=n.length,u=e.length,d={},f=new Array(c),h=0;h<c;h++){f[h]=-1;for(var p=0,m=u;p<m;p++){var g=a({currentValue:n,lastValue:t,formattedValue:e,currentValueIndex:h,formattedValueIndex:p});if(g&&d[p]!==!0){f[h]=p,d[p]=!0;break}}}for(var x=r;x<c&&(f[x]===-1||!o(n[x]));)x++;var _=x===c||f[x]===-1?u:f[x];for(x=r-1;x>0&&f[x]===-1;)x--;var w=x===-1||f[x]===-1?0:f[x]+1;return w>_?_:r-w<_-r?w:_}function Wb(e,t,n,r){var i=e.length;if(t=Yj(t,0,i),r==="left"){for(;t>=0&&!n[t];)t--;t===-1&&(t=n.indexOf(!0))}else{for(;t<=i&&!n[t];)t++;t>i&&(t=n.lastIndexOf(!0))}return t===-1&&(t=i),t}function Jj(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),n=0,r=t.length;n<r;n++)t[n]=!!(Bl(e[n])||Bl(e[n-1]));return t}function FC(e,t,n,r,i,o){o===void 0&&(o=Bi);var a=Hj(function(p,m){var g,x;return IC(p)?(x="",g=""):typeof p=="number"||m?(x=typeof p=="number"?NC(p):p,g=r(x)):(x=i(p,void 0),g=r(x)),{formattedValue:g,numAsString:x}}),s=v.useState(function(){return a(Pa(e)?t:e,n)}),l=s[0],c=s[1],u=function(p,m){p.formattedValue!==l.formattedValue&&c({formattedValue:p.formattedValue,numAsString:p.value}),o(p,m)},d=e,f=n;Pa(e)&&(d=l.numAsString,f=!0);var h=a(d,f);return v.useMemo(function(){c(h)},[h.formattedValue]),[l,u]}function Qj(e){return e.replace(/[^0-9]/g,"")}function eP(e){return e}function tP(e){var t=e.type;t===void 0&&(t="text");var n=e.displayType;n===void 0&&(n="input");var r=e.customInput,i=e.renderText,o=e.getInputRef,a=e.format;a===void 0&&(a=eP);var s=e.removeFormatting;s===void 0&&(s=Qj);var l=e.defaultValue,c=e.valueIsNumericString,u=e.onValueChange,d=e.isAllowed,f=e.onChange;f===void 0&&(f=Bi);var h=e.onKeyDown;h===void 0&&(h=Bi);var p=e.onMouseUp;p===void 0&&(p=Bi);var m=e.onFocus;m===void 0&&(m=Bi);var g=e.onBlur;g===void 0&&(g=Bi);var x=e.value,_=e.getCaretBoundary;_===void 0&&(_=Jj);var w=e.isValidInputCharacter;w===void 0&&(w=Bl);var C=e.isCharacterSame,b=DC(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),S=FC(x,l,!!c,a,s,u),M=S[0],$=M.formattedValue,k=M.numAsString,R=S[1],T=v.useRef(),E=v.useRef({formattedValue:$,numAsString:k}),A=function(ne,re){E.current={formattedValue:ne.formattedValue,numAsString:ne.value},R(ne,re)},I=v.useState(!1),j=I[0],D=I[1],O=v.useRef(null),L=v.useRef({setCaretTimeout:null,focusTimeout:null});v.useEffect(function(){return D(!0),function(){clearTimeout(L.current.setCaretTimeout),clearTimeout(L.current.focusTimeout)}},[]);var z=a,N=function(ne,re){var oe=parseFloat(re);return{formattedValue:ne,value:re,floatValue:isNaN(oe)?void 0:oe}},H=function(ne,re,oe){ne.selectionStart===0&&ne.selectionEnd===ne.value.length||(Co(ne,re),L.current.setCaretTimeout=setTimeout(function(){ne.value===oe&&ne.selectionStart!==re&&Co(ne,re)},0))},Y=function(ne,re,oe){return Wb(ne,re,_(ne),oe)},q=function(ne,re,oe){var le=_(re),ye=Kj(re,$,ne,oe,le,w,C);return ye=Wb(re,ye,le),ye},Z=function(ne){var re=ne.formattedValue;re===void 0&&(re="");var oe=ne.input,le=ne.source,ye=ne.event,ge=ne.numAsString,be;if(oe){var Me=ne.inputValue||oe.value,ce=sp(oe);oe.value=re,be=q(Me,re,ce),be!==void 0&&H(oe,be,re)}re!==$&&A(N(re,ge),{event:ye,source:le})};v.useEffect(function(){var ne=E.current,re=ne.formattedValue,oe=ne.numAsString;($!==re||k!==oe)&&A(N($,k),{event:void 0,source:Fl.props})},[$,k]);var X=O.current?sp(O.current):void 0,J=typeof window<"u"?v.useLayoutEffect:v.useEffect;J(function(){var ne=O.current;if($!==E.current.formattedValue&&ne){var re=q(E.current.formattedValue,$,X);ne.value=$,H(ne,re,$)}},[$]);var ee=function(ne,re,oe){var le=re.target,ye=T.current?qj(T.current,le.selectionEnd):LC($,ne),ge=Object.assign(Object.assign({},ye),{lastValue:$}),be=s(ne,ge),Me=z(be);if(be=s(Me,void 0),d&&!d(N(Me,be))){var ce=re.target,de=sp(ce),Ce=q(ne,$,de);return ce.value=$,H(ce,Ce,$),!1}return Z({formattedValue:Me,numAsString:be,inputValue:ne,event:re,source:oe,input:re.target}),!0},W=function(ne,re){re===void 0&&(re=0);var oe=ne.selectionStart,le=ne.selectionEnd;T.current={selectionStart:oe,selectionEnd:le+re}},F=function(ne){var re=ne.target,oe=re.value,le=ee(oe,ne,Fl.event);le&&f(ne),T.current=void 0},B=function(ne){var re=ne.target,oe=ne.key,le=re.selectionStart,ye=re.selectionEnd,ge=re.value;ge===void 0&&(ge="");var be;oe==="ArrowLeft"||oe==="Backspace"?be=Math.max(le-1,0):oe==="ArrowRight"?be=Math.min(le+1,ge.length):oe==="Delete"&&(be=le);var Me=0;oe==="Delete"&&le===ye&&(Me=1);var ce=oe==="ArrowLeft"||oe==="ArrowRight";if(be===void 0||le!==ye&&!ce){h(ne),W(re,Me);return}var de=be;if(ce){var Ce=oe==="ArrowLeft"?"left":"right";de=Y(ge,be,Ce),de!==be&&ne.preventDefault()}else oe==="Delete"&&!w(ge[be])?de=Y(ge,be,"right"):oe==="Backspace"&&!w(ge[be])&&(de=Y(ge,be,"left"));de!==be&&H(re,de,ge),h(ne),W(re,Me)},V=function(ne){var re=ne.target,oe=function(){var le=re.selectionStart,ye=re.selectionEnd,ge=re.value;if(ge===void 0&&(ge=""),le===ye){var be=Y(ge,le);be!==le&&H(re,be,ge)}};oe(),requestAnimationFrame(function(){oe()}),p(ne),W(re)},P=function(ne){ne.persist&&ne.persist();var re=ne.target,oe=ne.currentTarget;O.current=re,L.current.focusTimeout=setTimeout(function(){var le=re.selectionStart,ye=re.selectionEnd,ge=re.value;ge===void 0&&(ge="");var be=Y(ge,le);be!==le&&!(le===0&&ye===ge.length)&&H(re,be,ge),m(Object.assign(Object.assign({},ne),{currentTarget:oe}))},0)},te=function(ne){O.current=null,clearTimeout(L.current.focusTimeout),clearTimeout(L.current.setCaretTimeout),g(ne)},K=j&&Gj()?"numeric":void 0,G=Object.assign({inputMode:K},b,{type:t,value:$,onChange:F,onKeyDown:B,onMouseUp:V,onFocus:P,onBlur:te});if(n==="text")return i?v.createElement(v.Fragment,null,i($,b)||null):v.createElement("span",Object.assign({},b,{ref:o}),$);if(r){var ae=r;return v.createElement(ae,Object.assign({},G,{ref:o}))}return v.createElement("input",Object.assign({},G,{ref:o}))}function Ub(e,t){var n=t.decimalScale,r=t.fixedDecimalScale,i=t.prefix;i===void 0&&(i="");var o=t.suffix;o===void 0&&(o="");var a=t.allowNegative,s=t.thousandsGroupStyle;if(s===void 0&&(s="thousand"),e===""||e==="-")return e;var l=ff(t),c=l.thousandSeparator,u=l.decimalSeparator,d=n!==0&&e.indexOf(".")!==-1||n&&r,f=b0(e,a),h=f.beforeDecimal,p=f.afterDecimal,m=f.addNegation;return n!==void 0&&(p=PC(p,n,!!r)),c&&(h=Uj(h,c,s)),i&&(h=i+h),o&&(p=p+o),m&&(h="-"+h),e=h+(d&&u||"")+p,e}function ff(e){var t=e.decimalSeparator;t===void 0&&(t=".");var n=e.thousandSeparator,r=e.allowedDecimalSeparators;return n===!0&&(n=","),r||(r=[t,"."]),{decimalSeparator:t,thousandSeparator:n,allowedDecimalSeparators:r}}function nP(e,t){e===void 0&&(e="");var n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),i=n.test(e),o=r.test(e);return e=e.replace(/-/g,""),i&&!o&&t&&(e="-"+e),e}function rP(e,t){return new RegExp("(^-)|[0-9]|"+jC(e),"g")}function iP(e,t,n){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(n!=null&&n.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function oP(e,t,n){var r;t===void 0&&(t=Zj(e));var i=n.allowNegative,o=n.prefix;o===void 0&&(o="");var a=n.suffix;a===void 0&&(a="");var s=n.decimalScale,l=t.from,c=t.to,u=c.start,d=c.end,f=ff(n),h=f.allowedDecimalSeparators,p=f.decimalSeparator,m=e[d]===p;if(Bl(e)&&(e===o||e===a)&&t.lastValue==="")return e;if(d-u===1&&h.indexOf(e[u])!==-1){var g=s===0?"":p;e=e.substring(0,u)+g+e.substring(u+1,e.length)}var x=function(O,L,z){var N=!1,H=!1;o.startsWith("-")?N=!1:O.startsWith("--")?(N=!1,H=!0):a.startsWith("-")&&O.length===a.length?N=!1:O[0]==="-"&&(N=!0);var Y=N?1:0;return H&&(Y=2),Y&&(O=O.substring(Y),L-=Y,z-=Y),{value:O,start:L,end:z,hasNegation:N}},_=x(e,u,d),w=_.hasNegation;r=_,e=r.value,u=r.start,d=r.end;var C=x(t.lastValue,l.start,l.end),b=C.start,S=C.end,M=C.value,$=e.substring(u,d);e.length&&M.length&&(b>M.length-a.length||S<o.length)&&!($&&a.startsWith($))&&(e=M);var k=0;e.startsWith(o)?k+=o.length:u<o.length&&(k=u),e=e.substring(k),d-=k;var R=e.length,T=e.length-a.length;e.endsWith(a)?R=T:(d>T||d>e.length-a.length)&&(R=d),e=e.substring(0,R),e=nP(w?"-"+e:e,i),e=(e.match(rP(p))||[]).join("");var E=e.indexOf(p);e=e.replace(new RegExp(jC(p),"g"),function(O,L){return L===E?".":""});var A=b0(e,i),I=A.beforeDecimal,j=A.afterDecimal,D=A.addNegation;return c.end-c.start<l.end-l.start&&I===""&&m&&!parseFloat(j)&&(e=D?"-":""),e}function aP(e,t){var n=t.prefix;n===void 0&&(n="");var r=t.suffix;r===void 0&&(r="");var i=Array.from({length:e.length+1}).map(function(){return!0}),o=e[0]==="-";i.fill(!1,0,n.length+(o?1:0));var a=e.length;return i.fill(!1,a-r.length+1,a+1),i}function sP(e){var t=ff(e),n=t.thousandSeparator,r=t.decimalSeparator,i=e.prefix;i===void 0&&(i="");var o=e.allowNegative;if(o===void 0&&(o=!0),n===r)throw new Error(`
247
247
  Decimal separator can't be same as thousand separator.