dgz-ui-shared 1.1.19 → 1.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Actions-1AyyAnYT.js → Actions-CKVu3P3q.js} +6 -6
- package/dist/Actions-uGf1oq7E.cjs +1 -0
- package/dist/{DateRangePicker-kaBfJaKY.cjs → DateRangePicker-C1c1mofH.cjs} +3 -3
- package/dist/{DateRangePicker-D57HSCpq.js → DateRangePicker-DFsQ10c7.js} +5 -5
- package/dist/{ExportData-dSwR1N1v.js → ExportData-1xS2UAoq.js} +6 -6
- package/dist/ExportData-ApStkEWC.cjs +1 -0
- package/dist/{FilterWrapper-DeQRSTAc.js → FilterWrapper-Dk18nVPy.js} +31 -31
- package/dist/{FilterWrapper-B6p9fJWb.cjs → FilterWrapper-DvNjUQih.cjs} +5 -5
- package/dist/{MyInput-BzXWiSVj.cjs → MyInput-9MnlVZ4h.cjs} +1 -1
- package/dist/{MyInput-CkiPA3UG.js → MyInput-B-QCpehg.js} +57 -57
- package/dist/{MyLimitSelect-DHyIJawN.cjs → MyLimitSelect-BU1FClXt.cjs} +2 -2
- package/dist/{MyLimitSelect-XMVeSEqs.js → MyLimitSelect-D5ZWDY-s.js} +13 -13
- package/dist/{MySelect-Bmw1Krye.js → MySelect-C5uWRVJh.js} +7 -7
- package/dist/MySelect-DNK997Bi.cjs +1 -0
- package/dist/{button-2punbuN6-BBVynxVj.cjs → button-CdZDBhmr-3yMPCRDo.cjs} +1 -1
- package/dist/{button-2punbuN6-Bxlf8sMg.js → button-CdZDBhmr-BT_j3ig5.js} +7 -7
- package/dist/{chevron-right-HWBijj-I-Bdcofm_0.cjs → chevron-right-HWBijj-I-CZBu0GKg.cjs} +1 -1
- package/dist/{chevron-right-HWBijj-I-Bkp_tbGM.js → chevron-right-HWBijj-I-DsFUufdU.js} +1 -1
- package/dist/components/actions/index.cjs.js +1 -1
- package/dist/components/actions/index.es.js +1 -1
- package/dist/components/confirm/index.cjs.js +1 -1
- package/dist/components/confirm/index.es.js +1 -1
- package/dist/components/datatable/index.cjs.js +5 -5
- package/dist/components/datatable/index.es.js +204 -201
- package/dist/components/datepicker/index.cjs.js +1 -1
- package/dist/components/datepicker/index.es.js +1 -1
- package/dist/components/export/index.cjs.js +1 -1
- package/dist/components/export/index.es.js +1 -1
- package/dist/components/filters/index.cjs.js +1 -1
- package/dist/components/filters/index.es.js +6 -6
- package/dist/components/form/index.cjs.js +2 -2
- package/dist/components/form/index.es.js +33 -33
- package/dist/components/modal/index.cjs.js +2 -2
- package/dist/components/modal/index.es.js +7 -7
- package/dist/components/pagination/index.cjs.js +1 -1
- package/dist/components/pagination/index.es.js +1 -1
- package/dist/components/theme/index.cjs.js +3 -3
- package/dist/components/theme/index.es.js +4 -4
- package/dist/components/tooltip/index.cjs.js +1 -1
- package/dist/components/tooltip/index.es.js +44 -44
- package/dist/{createLucideIcon-B950nf2d-Brk4LIHH.js → createLucideIcon-B950nf2d-9wLYOF5y.js} +1 -1
- package/dist/{createLucideIcon-B950nf2d-BaIaB_Fz.cjs → createLucideIcon-B950nf2d-DrrWmvZU.cjs} +4 -4
- package/dist/dropdown-menu-TWRSm6RK-DQ03CnVw.cjs +1 -0
- package/dist/{dropdown-menu-lArmcWbC-jIg7CHSO.js → dropdown-menu-TWRSm6RK-D_FJpI4C.js} +83 -83
- package/dist/hooks/index.cjs.js +1 -1
- package/dist/hooks/index.es.js +2 -2
- package/dist/{index-CiR6yUKf-BEMUeikM.js → index-BL59b1Bz-C9bJE_xn.js} +90 -90
- package/dist/{index-CiR6yUKf-B1h5S0LB.cjs → index-BL59b1Bz-COeLljOH.cjs} +4 -4
- package/dist/{index-DUK8Bn0m-Clp83x2_.js → index-C4qYhCZt-BZQduTld.js} +29 -29
- package/dist/index-C4qYhCZt-DWBiWQ93.cjs +5 -0
- package/dist/index-CbK6da4c-QXbo5Vgb.cjs +1 -0
- package/dist/{index-Dp0y0FJw-B42jTfO0.js → index-CbK6da4c-d_6FdYZH.js} +1 -1
- package/dist/{index-GjjxAtgk-Dl4JPPHK.js → index-Cths1nBq-BUfZy21E.js} +71 -71
- package/dist/index-Cths1nBq-DzDn15YE.cjs +11 -0
- package/dist/{index-CMHo7s91-D6S6dZoG.cjs → index-ZsCkaYy6-Bjyf2SZs.cjs} +1 -1
- package/dist/{index-CMHo7s91-BRFfxKgJ.js → index-ZsCkaYy6-Cw9HUeiu.js} +1 -1
- package/dist/index.esm-CQEA7FC8.js +1007 -0
- package/dist/index.esm-TI7V1a5F.cjs +1 -0
- package/dist/{input-mask-Chc-UIWX-Br4gXX2T.js → input-mask-DBLFIvhN-BBxoZxnd.js} +3738 -3687
- package/dist/input-mask-DBLFIvhN-C_0RAR2l.cjs +190 -0
- package/dist/{popover-Dvg-QyCn-CJ3lAD8Q.js → popover-OZcfKDD9-C2PVWPLS.js} +17 -17
- package/dist/popover-OZcfKDD9-KUWOsIOs.cjs +1 -0
- package/dist/{react-select-CKazfTiF-1EhjhhlL.js → react-select-DVPHHTAP-D2u3DqGr.js} +2 -2
- package/dist/{react-select-CKazfTiF-Bb-Uf4tM.cjs → react-select-DVPHHTAP-DKDInFsM.cjs} +9 -9
- package/dist/types/components/datatable/DataTable.d.ts +1 -1
- package/dist/types/components/datatable/DataTable.d.ts.map +1 -1
- package/dist/{unstyled-4GbbDand.cjs → unstyled-BFCMBSGZ.cjs} +2 -2
- package/dist/{unstyled-Cmnf9U5U.js → unstyled-BMbrfzye.js} +42 -42
- package/dist/{useFilter-CiORTEHP.cjs → useFilter-Cwz8oftI.cjs} +1 -1
- package/dist/{useFilter-DMpxv27U.js → useFilter-DJunNBm2.js} +1 -1
- package/package.json +2 -2
- package/dist/Actions-Dg5LYo56.cjs +0 -1
- package/dist/ExportData-DUuHYzA-.cjs +0 -1
- package/dist/MySelect-lSICw49W.cjs +0 -1
- package/dist/dropdown-menu-lArmcWbC-DCwGoXng.cjs +0 -1
- package/dist/index-DUK8Bn0m-BIulOZIQ.cjs +0 -5
- package/dist/index-Dp0y0FJw-DVwS4FcV.cjs +0 -1
- package/dist/index-GjjxAtgk-DaxZek3n.cjs +0 -11
- package/dist/index.esm-CpcLzfLZ.cjs +0 -1
- package/dist/index.esm-lbl2HgR1.js +0 -970
- package/dist/input-mask-Chc-UIWX-DimBl_dd.cjs +0 -190
- package/dist/popover-Dvg-QyCn-Dr2o9oAG.cjs +0 -1
|
@@ -149,5 +149,5 @@ export interface DataTableProps<TData, TPaginationData extends PaginationInterfa
|
|
|
149
149
|
* Returns
|
|
150
150
|
* - React element that renders a complete data table experience.
|
|
151
151
|
*/
|
|
152
|
-
export declare const DataTable: <TData, TPaginationData extends PaginationInterface<TData> = PaginationInterface<TData>>({ dataSource, columns, onRowClick, rowKey, hasNumbers, hasSearch, exportOptions, hasCheckbox, hasPagination, isStickyHeader, onParamChange, dataKey, loading, tableKey, filters, actions, handleFilterChange, params, exportLoading, onColumnsUpdate, hasColumnsVisibilityDropdown, }: DataTableProps<TData, TPaginationData>) => import("react/jsx-runtime").JSX.Element;
|
|
152
|
+
export declare const DataTable: <TData, TPaginationData extends PaginationInterface<TData> = PaginationInterface<TData>>({ dataSource, columns, onRowClick, rowKey, hasNumbers, hasSearch, exportOptions, hasCheckbox, hasPagination, isStickyHeader, onParamChange, dataKey, loading, tableKey, filters, actions, handleFilterChange, params, exportLoading, onColumnsUpdate, hasColumnsVisibilityDropdown, onSelectedItemsChange, }: DataTableProps<TData, TPaginationData>) => import("react/jsx-runtime").JSX.Element;
|
|
153
153
|
//# sourceMappingURL=DataTable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../../../src/components/datatable/DataTable.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAEvD,OAAO,EAAE,KAAK,eAAe,EAAyB,MAAM,YAAY,CAAC;AAEzE,OAAO,EAAE,KAAK,eAAe,EAAW,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAc,KAAK,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C;;;;;;;;GAQG;AACH,MAAM,WAAW,mBAAmB,CAAC,KAAK;IACxC,kFAAkF;IAClF,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC;IACf,mFAAmF;IACnF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qCAAqC;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sCAAsC;IACtC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kCAAkC;IAClC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,cAAc,CAC7B,KAAK,EACL,eAAe,SAAS,mBAAmB,CAAC,KAAK,CAAC,CAClD,SAAQ,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACzC,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IACzD,aAAa,CAAC,EAAE,IAAI,CAAC;IACrB,aAAa,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACtC,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAC5B,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAC5B,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IAChE,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,eAAe,CAAC;IAChC,4BAA4B,CAAC,EAAE,IAAI,CAAC;IACpC,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,KAAK,CAAC,EAAE,KAAK,IAAI,CAAC;IACzD,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgGG;AACH,eAAO,MAAM,SAAS,GACpB,KAAK,EACL,eAAe,SACb,mBAAmB,CAAC,KAAK,CAAC,GAAG,mBAAmB,CAAC,KAAK,CAAC,EACzD,
|
|
1
|
+
{"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../../../src/components/datatable/DataTable.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAEvD,OAAO,EAAE,KAAK,eAAe,EAAyB,MAAM,YAAY,CAAC;AAEzE,OAAO,EAAE,KAAK,eAAe,EAAW,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAc,KAAK,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C;;;;;;;;GAQG;AACH,MAAM,WAAW,mBAAmB,CAAC,KAAK;IACxC,kFAAkF;IAClF,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC;IACf,mFAAmF;IACnF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qCAAqC;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sCAAsC;IACtC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kCAAkC;IAClC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,cAAc,CAC7B,KAAK,EACL,eAAe,SAAS,mBAAmB,CAAC,KAAK,CAAC,CAClD,SAAQ,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACzC,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IACzD,aAAa,CAAC,EAAE,IAAI,CAAC;IACrB,aAAa,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACtC,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAC5B,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAC5B,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IAChE,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,eAAe,CAAC;IAChC,4BAA4B,CAAC,EAAE,IAAI,CAAC;IACpC,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,KAAK,CAAC,EAAE,KAAK,IAAI,CAAC;IACzD,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgGG;AACH,eAAO,MAAM,SAAS,GACpB,KAAK,EACL,eAAe,SACb,mBAAmB,CAAC,KAAK,CAAC,GAAG,mBAAmB,CAAC,KAAK,CAAC,EACzD,8SAuBC,cAAc,CAAC,KAAK,EAAE,eAAe,CAAC,4CA8IxC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";const O=require("./jsx-runtime-h4oGeKUK.cjs"),p=require("react"),gt=require("./useTranslation-CZf20ucv.cjs"),N=require("./index-
|
|
1
|
+
"use strict";const O=require("./jsx-runtime-h4oGeKUK.cjs"),p=require("react"),gt=require("./useTranslation-CZf20ucv.cjs"),N=require("./index-BL59b1Bz-COeLljOH.cjs"),B=require("./index-C4qYhCZt-DWBiWQ93.cjs"),yt=require("./button-CdZDBhmr-3yMPCRDo.cjs"),re=require("./utils-B6fNqzRf-BNysSCt9.cjs"),Kt=require("./input-mask-DBLFIvhN-C_0RAR2l.cjs"),es=require("./MyInput-9MnlVZ4h.cjs"),G=require("./index.esm-TI7V1a5F.cjs");function ts(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const r=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,r.get?r:{enumerable:!0,get:()=>t[s]})}}return e.default=t,Object.freeze(e)}const D=ts(p);var vt="AlertDialog",[ss,Rr]=N.j(vt,[B.De]),X=B.De(),_t=t=>{const{__scopeAlertDialog:e,...s}=t,r=X(e);return N.ae.jsx(B.xe,{...r,...s,modal:!0})};_t.displayName=vt;var rs="AlertDialogTrigger",xt=D.forwardRef((t,e)=>{const{__scopeAlertDialog:s,...r}=t,a=X(s);return N.ae.jsx(B.Ce,{...a,...r,ref:e})});xt.displayName=rs;var as="AlertDialogPortal",bt=t=>{const{__scopeAlertDialog:e,...s}=t,r=X(e);return N.ae.jsx(B.Re,{...r,...s})};bt.displayName=as;var ns="AlertDialogOverlay",kt=D.forwardRef((t,e)=>{const{__scopeAlertDialog:s,...r}=t,a=X(s);return N.ae.jsx(B._e,{...a,...r,ref:e})});kt.displayName=ns;var ce="AlertDialogContent",[is,os]=ss(ce),ls=N.j$1("AlertDialogContent"),wt=D.forwardRef((t,e)=>{const{__scopeAlertDialog:s,children:r,...a}=t,n=X(s),i=D.useRef(null),o=N.i(e,i),l=D.useRef(null);return N.ae.jsx(B.ve,{contentName:ce,titleName:Tt,docsSlug:"alert-dialog",children:N.ae.jsx(is,{scope:s,cancelRef:l,children:N.ae.jsxs(B.he,{role:"alertdialog",...n,...a,ref:o,onOpenAutoFocus:N.y$1(a.onOpenAutoFocus,c=>{var f;c.preventDefault(),(f=l.current)==null||f.focus({preventScroll:!0})}),onPointerDownOutside:c=>c.preventDefault(),onInteractOutside:c=>c.preventDefault(),children:[N.ae.jsx(ls,{children:r}),N.ae.jsx(ds,{contentRef:i})]})})})});wt.displayName=ce;var Tt="AlertDialogTitle",Et=D.forwardRef((t,e)=>{const{__scopeAlertDialog:s,...r}=t,a=X(s);return N.ae.jsx(B.Ee,{...a,...r,ref:e})});Et.displayName=Tt;var Ct="AlertDialogDescription",Nt=D.forwardRef((t,e)=>{const{__scopeAlertDialog:s,...r}=t,a=X(s);return N.ae.jsx(B.Pe,{...a,...r,ref:e})});Nt.displayName=Ct;var cs="AlertDialogAction",jt=D.forwardRef((t,e)=>{const{__scopeAlertDialog:s,...r}=t,a=X(s);return N.ae.jsx(B.ye,{...a,...r,ref:e})});jt.displayName=cs;var At="AlertDialogCancel",Rt=D.forwardRef((t,e)=>{const{__scopeAlertDialog:s,...r}=t,{cancelRef:a}=os(At,s),n=X(s),i=N.i(e,a);return N.ae.jsx(B.ye,{...n,...r,ref:i})});Rt.displayName=At;var ds=({contentRef:t})=>{const e=`\`${ce}\` requires a description for the component to be accessible for screen reader users.
|
|
2
2
|
|
|
3
3
|
You can add a description to the \`${ce}\` by passing a \`${Ct}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
4
4
|
|
|
5
5
|
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${ce}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
6
6
|
|
|
7
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return D.useEffect(()=>{var s;document.getElementById((s=t.current)==null?void 0:s.getAttribute("aria-describedby"))||console.warn(e)},[e,t]),null},us=_t,fs=xt,hs=bt,It=kt,Ot=wt,St=At,Zt=Rt,Lt=Et,$t=Nt;const Dt=us,Pt=fs,ms=hs,Mt=D.forwardRef(({className:t,...e},s)=>N.ae.jsx(It,{className:re.mo("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",t),...e,ref:s}));Mt.displayName=It.displayName;const Be=D.forwardRef(({className:t,...e},s)=>N.ae.jsxs(ms,{children:[N.ae.jsx(Mt,{}),N.ae.jsx(Ot,{ref:s,className:re.mo("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg",t),...e})]}));Be.displayName=Ot.displayName;const Ue=({className:t,...e})=>N.ae.jsx("div",{className:re.mo("flex flex-col space-y-2 text-center sm:text-left",t),...e});Ue.displayName="AlertDialogHeader";const Fe=({className:t,...e})=>N.ae.jsx("div",{className:re.mo("flex gap-2 sm:justify-end",t),...e});Fe.displayName="AlertDialogFooter";const qe=D.forwardRef(({className:t,...e},s)=>N.ae.jsx(Lt,{ref:s,className:re.mo("text-lg font-semibold",t),...e}));qe.displayName=Lt.displayName;const Vt=D.forwardRef(({className:t,...e},s)=>N.ae.jsx($t,{ref:s,className:re.mo("text-muted-foreground text-sm",t),...e}));Vt.displayName=$t.displayName;const We=D.forwardRef(({className:t,...e},s)=>N.ae.jsx(St,{ref:s,className:re.mo(yt.g(),t),...e}));We.displayName=St.displayName;const He=D.forwardRef(({className:t,...e},s)=>N.ae.jsx(Zt,{ref:s,className:re.mo(yt.g({variant:"tertiary"}),t),...e}));He.displayName=Zt.displayName;const ps=({title:t,description:e,children:s,onConfirm:r,...a})=>{const{t:n}=gt.useTranslation();return O.jsxRuntimeExports.jsxs(Dt,{...a,children:[s&&O.jsxRuntimeExports.jsx(Pt,{children:s}),O.jsxRuntimeExports.jsxs(Be,{children:[O.jsxRuntimeExports.jsxs(Ue,{children:[O.jsxRuntimeExports.jsx(qe,{children:t||n("Are you absolutely sure?")}),O.jsxRuntimeExports.jsx(Vt,{children:e||n("This action cannot be undone. This will permanently delete your data from our servers.")})]}),O.jsxRuntimeExports.jsxs(Fe,{children:[O.jsxRuntimeExports.jsx(He,{className:"mt-0",children:n("Cancel")}),O.jsxRuntimeExports.jsx(We,{onClick:r,children:n("Confirm")})]})]})]})},Qe=(t,e,s)=>{if(t&&"reportValidity"in t){const r=G.get(s,e);t.setCustomValidity(r&&r.message||""),t.reportValidity()}},zt=(t,e)=>{for(const s in e.fields){const r=e.fields[s];r&&r.ref&&"reportValidity"in r.ref?Qe(r.ref,s,t):r&&r.refs&&r.refs.forEach(a=>Qe(a,s,t))}},gs=(t,e)=>{e.shouldUseNativeValidation&&zt(t,e);const s={};for(const r in t){const a=G.get(e.fields,r),n=Object.assign(t[r]||{},{ref:a&&a.ref});if(ys(e.names||Object.keys(t),r)){const i=Object.assign({},G.get(s,r));G.set(i,"root",n),G.set(s,r,i)}else G.set(s,r,n)}return s},ys=(t,e)=>{const s=Ge(e);return t.some(r=>Ge(r).match(`^${s}\\.\\d+`))};function Ge(t){return t.replace(/\]|\[/g,"")}function vs(t,e){for(var s={};t.length;){var r=t[0],a=r.code,n=r.message,i=r.path.join(".");if(!s[i])if("unionErrors"in r){var o=r.unionErrors[0].errors[0];s[i]={message:o.message,type:o.code}}else s[i]={message:n,type:a};if("unionErrors"in r&&r.unionErrors.forEach(function(f){return f.errors.forEach(function(j){return t.push(j)})}),e){var l=s[i].types,c=l&&l[r.code];s[i]=G.appendErrors(i,e,s,a,c?[].concat(c,r.message):r.message)}t.shift()}return s}function _s(t,e,s){return s===void 0&&(s={}),function(r,a,n){try{return Promise.resolve(function(i,o){try{var l=Promise.resolve(t[s.mode==="sync"?"parse":"parseAsync"](r,e)).then(function(c){return n.shouldUseNativeValidation&&zt({},n),{errors:{},values:s.raw?Object.assign({},r):c}})}catch(c){return o(c)}return l&&l.then?l.then(void 0,o):l}(0,function(i){if(function(o){return Array.isArray(o==null?void 0:o.errors)}(i))return{values:{},errors:gs(vs(i.errors,!n.shouldUseNativeValidation&&n.criteriaMode==="all"),n)};throw i}))}catch(i){return Promise.reject(i)}}}var w;(function(t){t.assertEqual=a=>{};function e(a){}t.assertIs=e;function s(a){throw new Error}t.assertNever=s,t.arrayToEnum=a=>{const n={};for(const i of a)n[i]=i;return n},t.getValidEnumValues=a=>{const n=t.objectKeys(a).filter(o=>typeof a[a[o]]!="number"),i={};for(const o of n)i[o]=a[o];return t.objectValues(i)},t.objectValues=a=>t.objectKeys(a).map(function(n){return a[n]}),t.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const n=[];for(const i in a)Object.prototype.hasOwnProperty.call(a,i)&&n.push(i);return n},t.find=(a,n)=>{for(const i of a)if(n(i))return i},t.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function r(a,n=" | "){return a.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}t.joinValues=r,t.jsonStringifyReplacer=(a,n)=>typeof n=="bigint"?n.toString():n})(w||(w={}));var Ke;(function(t){t.mergeShapes=(e,s)=>({...e,...s})})(Ke||(Ke={}));const h=w.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Q=t=>{switch(typeof t){case"undefined":return h.undefined;case"string":return h.string;case"number":return Number.isNaN(t)?h.nan:h.number;case"boolean":return h.boolean;case"function":return h.function;case"bigint":return h.bigint;case"symbol":return h.symbol;case"object":return Array.isArray(t)?h.array:t===null?h.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?h.promise:typeof Map<"u"&&t instanceof Map?h.map:typeof Set<"u"&&t instanceof Set?h.set:typeof Date<"u"&&t instanceof Date?h.date:h.object;default:return h.unknown}},d=w.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"]);class H extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const s=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,s):this.__proto__=s,this.name="ZodError",this.issues=e}format(e){const s=e||function(n){return n.message},r={_errors:[]},a=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(a);else if(i.code==="invalid_return_type")a(i.returnTypeError);else if(i.code==="invalid_arguments")a(i.argumentsError);else if(i.path.length===0)r._errors.push(s(i));else{let o=r,l=0;for(;l<i.path.length;){const c=i.path[l];l===i.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(s(i))):o[c]=o[c]||{_errors:[]},o=o[c],l++}}};return a(this),r}static assert(e){if(!(e instanceof H))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,w.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=s=>s.message){const s={},r=[];for(const a of this.issues)a.path.length>0?(s[a.path[0]]=s[a.path[0]]||[],s[a.path[0]].push(e(a))):r.push(e(a));return{formErrors:r,fieldErrors:s}}get formErrors(){return this.flatten()}}H.create=t=>new H(t);const Se=(t,e)=>{let s;switch(t.code){case d.invalid_type:t.received===h.undefined?s="Required":s=`Expected ${t.expected}, received ${t.received}`;break;case d.invalid_literal:s=`Invalid literal value, expected ${JSON.stringify(t.expected,w.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:s=`Unrecognized key(s) in object: ${w.joinValues(t.keys,", ")}`;break;case d.invalid_union:s="Invalid input";break;case d.invalid_union_discriminator:s=`Invalid discriminator value. Expected ${w.joinValues(t.options)}`;break;case d.invalid_enum_value:s=`Invalid enum value. Expected ${w.joinValues(t.options)}, received '${t.received}'`;break;case d.invalid_arguments:s="Invalid function arguments";break;case d.invalid_return_type:s="Invalid function return type";break;case d.invalid_date:s="Invalid date";break;case d.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(s=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(s=`${s} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?s=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?s=`Invalid input: must end with "${t.validation.endsWith}"`:w.assertNever(t.validation):t.validation!=="regex"?s=`Invalid ${t.validation}`:s="Invalid";break;case d.too_small:t.type==="array"?s=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?s=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?s=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?s=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:s="Invalid input";break;case d.too_big:t.type==="array"?s=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?s=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?s=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?s=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?s=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:s="Invalid input";break;case d.custom:s="Invalid input";break;case d.invalid_intersection_types:s="Intersection results could not be merged";break;case d.not_multiple_of:s=`Number must be a multiple of ${t.multipleOf}`;break;case d.not_finite:s="Number must be finite";break;default:s=e.defaultError,w.assertNever(t)}return{message:s}};let xs=Se;function bs(){return xs}const ks=t=>{const{data:e,path:s,errorMaps:r,issueData:a}=t,n=[...s,...a.path||[]],i={...a,path:n};if(a.message!==void 0)return{...a,path:n,message:a.message};let o="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)o=c(i,{data:e,defaultError:o}).message;return{...a,path:n,message:o}};function u(t,e){const s=bs(),r=ks({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,s,s===Se?void 0:Se].filter(a=>!!a)});t.common.issues.push(r)}class z{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,s){const r=[];for(const a of s){if(a.status==="aborted")return v;a.status==="dirty"&&e.dirty(),r.push(a.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,s){const r=[];for(const a of s){const n=await a.key,i=await a.value;r.push({key:n,value:i})}return z.mergeObjectSync(e,r)}static mergeObjectSync(e,s){const r={};for(const a of s){const{key:n,value:i}=a;if(n.status==="aborted"||i.status==="aborted")return v;n.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),n.value!=="__proto__"&&(typeof i.value<"u"||a.alwaysSet)&&(r[n.value]=i.value)}return{status:e.value,value:r}}}const v=Object.freeze({status:"aborted"}),me=t=>({status:"dirty",value:t}),U=t=>({status:"valid",value:t}),et=t=>t.status==="aborted",tt=t=>t.status==="dirty",de=t=>t.status==="valid",we=t=>typeof Promise<"u"&&t instanceof Promise;var m;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(m||(m={}));class te{constructor(e,s,r,a){this._cachedPath=[],this.parent=e,this.data=s,this._path=r,this._key=a}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 st=(t,e)=>{if(de(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const s=new H(t.common.issues);return this._error=s,this._error}}};function x(t){if(!t)return{};const{errorMap:e,invalid_type_error:s,required_error:r,description:a}=t;if(e&&(s||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(i,o)=>{const{message:l}=t;return i.code==="invalid_enum_value"?{message:l??o.defaultError}:typeof o.data>"u"?{message:l??r??o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:l??s??o.defaultError}},description:a}}class k{get description(){return this._def.description}_getType(e){return Q(e.data)}_getOrReturnCtx(e,s){return s||{common:e.parent.common,data:e.data,parsedType:Q(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new z,ctx:{common:e.parent.common,data:e.data,parsedType:Q(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const s=this._parse(e);if(we(s))throw new Error("Synchronous parse encountered promise.");return s}_parseAsync(e){const s=this._parse(e);return Promise.resolve(s)}parse(e,s){const r=this.safeParse(e,s);if(r.success)return r.data;throw r.error}safeParse(e,s){const r={common:{issues:[],async:(s==null?void 0:s.async)??!1,contextualErrorMap:s==null?void 0:s.errorMap},path:(s==null?void 0:s.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Q(e)},a=this._parseSync({data:e,path:r.path,parent:r});return st(r,a)}"~validate"(e){var r,a;const s={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Q(e)};if(!this["~standard"].async)try{const n=this._parseSync({data:e,path:[],parent:s});return de(n)?{value:n.value}:{issues:s.common.issues}}catch(n){(a=(r=n==null?void 0:n.message)==null?void 0:r.toLowerCase())!=null&&a.includes("encountered")&&(this["~standard"].async=!0),s.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:s}).then(n=>de(n)?{value:n.value}:{issues:s.common.issues})}async parseAsync(e,s){const r=await this.safeParseAsync(e,s);if(r.success)return r.data;throw r.error}async safeParseAsync(e,s){const r={common:{issues:[],contextualErrorMap:s==null?void 0:s.errorMap,async:!0},path:(s==null?void 0:s.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Q(e)},a=this._parse({data:e,path:r.path,parent:r}),n=await(we(a)?a:Promise.resolve(a));return st(r,n)}refine(e,s){const r=a=>typeof s=="string"||typeof s>"u"?{message:s}:typeof s=="function"?s(a):s;return this._refinement((a,n)=>{const i=e(a),o=()=>n.addIssue({code:d.custom,...r(a)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,s){return this._refinement((r,a)=>e(r)?!0:(a.addIssue(typeof s=="function"?s(r,a):s),!1))}_refinement(e){return new fe({schema:this,typeName:_.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,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:s=>this["~validate"](s)}}optional(){return ee.create(this,this._def)}nullable(){return he.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return q.create(this)}promise(){return Ne.create(this,this._def)}or(e){return Ee.create([this,e],this._def)}and(e){return Ce.create(this,e,this._def)}transform(e){return new fe({...x(this._def),schema:this,typeName:_.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const s=typeof e=="function"?e:()=>e;return new Le({...x(this._def),innerType:this,defaultValue:s,typeName:_.ZodDefault})}brand(){return new qs({typeName:_.ZodBranded,type:this,...x(this._def)})}catch(e){const s=typeof e=="function"?e:()=>e;return new $e({...x(this._def),innerType:this,catchValue:s,typeName:_.ZodCatch})}describe(e){const s=this.constructor;return new s({...this._def,description:e})}pipe(e){return Xe.create(this,e)}readonly(){return De.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const ws=/^c[^\s-]{8,}$/i,Ts=/^[0-9a-z]+$/,Es=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Cs=/^[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,Ns=/^[a-z0-9_-]{21}$/i,As=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,js=/^[-+]?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)?)??$/,Rs=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Is="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Oe;const Os=/^(?:(?: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])$/,Ss=/^(?:(?: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])$/,Zs=/^(([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]))$/,Ls=/^(([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])$/,$s=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ds=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Bt="((\\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])))",Ps=new RegExp(`^${Bt}$`);function Ut(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const s=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${s}`}function Ms(t){return new RegExp(`^${Ut(t)}$`)}function Vs(t){let e=`${Bt}T${Ut(t)}`;const s=[];return s.push(t.local?"Z?":"Z"),t.offset&&s.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${s.join("|")})`,new RegExp(`^${e}$`)}function zs(t,e){return!!((e==="v4"||!e)&&Os.test(t)||(e==="v6"||!e)&&Zs.test(t))}function Bs(t,e){if(!As.test(t))return!1;try{const[s]=t.split("."),r=s.replace(/-/g,"+").replace(/_/g,"/").padEnd(s.length+(4-s.length%4)%4,"="),a=JSON.parse(atob(r));return!(typeof a!="object"||a===null||"typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function Us(t,e){return!!((e==="v4"||!e)&&Ss.test(t)||(e==="v6"||!e)&&Ls.test(t))}class K extends k{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==h.string){const n=this._getOrReturnCtx(e);return u(n,{code:d.invalid_type,expected:h.string,received:n.parsedType}),v}const r=new z;let a;for(const n of this._def.checks)if(n.kind==="min")e.data.length<n.value&&(a=this._getOrReturnCtx(e,a),u(a,{code:d.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),r.dirty());else if(n.kind==="max")e.data.length>n.value&&(a=this._getOrReturnCtx(e,a),u(a,{code:d.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),r.dirty());else if(n.kind==="length"){const i=e.data.length>n.value,o=e.data.length<n.value;(i||o)&&(a=this._getOrReturnCtx(e,a),i?u(a,{code:d.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}):o&&u(a,{code:d.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}),r.dirty())}else if(n.kind==="email")Rs.test(e.data)||(a=this._getOrReturnCtx(e,a),u(a,{validation:"email",code:d.invalid_string,message:n.message}),r.dirty());else if(n.kind==="emoji")Oe||(Oe=new RegExp(Is,"u")),Oe.test(e.data)||(a=this._getOrReturnCtx(e,a),u(a,{validation:"emoji",code:d.invalid_string,message:n.message}),r.dirty());else if(n.kind==="uuid")Cs.test(e.data)||(a=this._getOrReturnCtx(e,a),u(a,{validation:"uuid",code:d.invalid_string,message:n.message}),r.dirty());else if(n.kind==="nanoid")Ns.test(e.data)||(a=this._getOrReturnCtx(e,a),u(a,{validation:"nanoid",code:d.invalid_string,message:n.message}),r.dirty());else if(n.kind==="cuid")ws.test(e.data)||(a=this._getOrReturnCtx(e,a),u(a,{validation:"cuid",code:d.invalid_string,message:n.message}),r.dirty());else if(n.kind==="cuid2")Ts.test(e.data)||(a=this._getOrReturnCtx(e,a),u(a,{validation:"cuid2",code:d.invalid_string,message:n.message}),r.dirty());else if(n.kind==="ulid")Es.test(e.data)||(a=this._getOrReturnCtx(e,a),u(a,{validation:"ulid",code:d.invalid_string,message:n.message}),r.dirty());else if(n.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),u(a,{validation:"url",code:d.invalid_string,message:n.message}),r.dirty()}else n.kind==="regex"?(n.regex.lastIndex=0,n.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),u(a,{validation:"regex",code:d.invalid_string,message:n.message}),r.dirty())):n.kind==="trim"?e.data=e.data.trim():n.kind==="includes"?e.data.includes(n.value,n.position)||(a=this._getOrReturnCtx(e,a),u(a,{code:d.invalid_string,validation:{includes:n.value,position:n.position},message:n.message}),r.dirty()):n.kind==="toLowerCase"?e.data=e.data.toLowerCase():n.kind==="toUpperCase"?e.data=e.data.toUpperCase():n.kind==="startsWith"?e.data.startsWith(n.value)||(a=this._getOrReturnCtx(e,a),u(a,{code:d.invalid_string,validation:{startsWith:n.value},message:n.message}),r.dirty()):n.kind==="endsWith"?e.data.endsWith(n.value)||(a=this._getOrReturnCtx(e,a),u(a,{code:d.invalid_string,validation:{endsWith:n.value},message:n.message}),r.dirty()):n.kind==="datetime"?Vs(n).test(e.data)||(a=this._getOrReturnCtx(e,a),u(a,{code:d.invalid_string,validation:"datetime",message:n.message}),r.dirty()):n.kind==="date"?Ps.test(e.data)||(a=this._getOrReturnCtx(e,a),u(a,{code:d.invalid_string,validation:"date",message:n.message}),r.dirty()):n.kind==="time"?Ms(n).test(e.data)||(a=this._getOrReturnCtx(e,a),u(a,{code:d.invalid_string,validation:"time",message:n.message}),r.dirty()):n.kind==="duration"?js.test(e.data)||(a=this._getOrReturnCtx(e,a),u(a,{validation:"duration",code:d.invalid_string,message:n.message}),r.dirty()):n.kind==="ip"?zs(e.data,n.version)||(a=this._getOrReturnCtx(e,a),u(a,{validation:"ip",code:d.invalid_string,message:n.message}),r.dirty()):n.kind==="jwt"?Bs(e.data,n.alg)||(a=this._getOrReturnCtx(e,a),u(a,{validation:"jwt",code:d.invalid_string,message:n.message}),r.dirty()):n.kind==="cidr"?Us(e.data,n.version)||(a=this._getOrReturnCtx(e,a),u(a,{validation:"cidr",code:d.invalid_string,message:n.message}),r.dirty()):n.kind==="base64"?$s.test(e.data)||(a=this._getOrReturnCtx(e,a),u(a,{validation:"base64",code:d.invalid_string,message:n.message}),r.dirty()):n.kind==="base64url"?Ds.test(e.data)||(a=this._getOrReturnCtx(e,a),u(a,{validation:"base64url",code:d.invalid_string,message:n.message}),r.dirty()):w.assertNever(n);return{status:r.value,value:e.data}}_regex(e,s,r){return this.refinement(a=>e.test(a),{validation:s,code:d.invalid_string,...m.errToObj(r)})}_addCheck(e){return new K({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...m.errToObj(e)})}url(e){return this._addCheck({kind:"url",...m.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...m.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...m.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...m.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...m.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...m.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...m.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...m.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...m.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...m.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...m.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...m.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...m.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...m.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...m.errToObj(e)})}regex(e,s){return this._addCheck({kind:"regex",regex:e,...m.errToObj(s)})}includes(e,s){return this._addCheck({kind:"includes",value:e,position:s==null?void 0:s.position,...m.errToObj(s==null?void 0:s.message)})}startsWith(e,s){return this._addCheck({kind:"startsWith",value:e,...m.errToObj(s)})}endsWith(e,s){return this._addCheck({kind:"endsWith",value:e,...m.errToObj(s)})}min(e,s){return this._addCheck({kind:"min",value:e,...m.errToObj(s)})}max(e,s){return this._addCheck({kind:"max",value:e,...m.errToObj(s)})}length(e,s){return this._addCheck({kind:"length",value:e,...m.errToObj(s)})}nonempty(e){return this.min(1,m.errToObj(e))}trim(){return new K({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new K({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new K({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const s of this._def.checks)s.kind==="min"&&(e===null||s.value>e)&&(e=s.value);return e}get maxLength(){let e=null;for(const s of this._def.checks)s.kind==="max"&&(e===null||s.value<e)&&(e=s.value);return e}}K.create=t=>new K({checks:[],typeName:_.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...x(t)});function Fs(t,e){const s=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,a=s>r?s:r,n=Number.parseInt(t.toFixed(a).replace(".","")),i=Number.parseInt(e.toFixed(a).replace(".",""));return n%i/10**a}class pe extends k{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==h.number){const n=this._getOrReturnCtx(e);return u(n,{code:d.invalid_type,expected:h.number,received:n.parsedType}),v}let r;const a=new z;for(const n of this._def.checks)n.kind==="int"?w.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),u(r,{code:d.invalid_type,expected:"integer",received:"float",message:n.message}),a.dirty()):n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(r=this._getOrReturnCtx(e,r),u(r,{code:d.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(r=this._getOrReturnCtx(e,r),u(r,{code:d.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):n.kind==="multipleOf"?Fs(e.data,n.value)!==0&&(r=this._getOrReturnCtx(e,r),u(r,{code:d.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):n.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),u(r,{code:d.not_finite,message:n.message}),a.dirty()):w.assertNever(n);return{status:a.value,value:e.data}}gte(e,s){return this.setLimit("min",e,!0,m.toString(s))}gt(e,s){return this.setLimit("min",e,!1,m.toString(s))}lte(e,s){return this.setLimit("max",e,!0,m.toString(s))}lt(e,s){return this.setLimit("max",e,!1,m.toString(s))}setLimit(e,s,r,a){return new pe({...this._def,checks:[...this._def.checks,{kind:e,value:s,inclusive:r,message:m.toString(a)}]})}_addCheck(e){return new pe({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:m.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:m.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:m.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:m.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:m.toString(e)})}multipleOf(e,s){return this._addCheck({kind:"multipleOf",value:e,message:m.toString(s)})}finite(e){return this._addCheck({kind:"finite",message:m.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:m.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:m.toString(e)})}get minValue(){let e=null;for(const s of this._def.checks)s.kind==="min"&&(e===null||s.value>e)&&(e=s.value);return e}get maxValue(){let e=null;for(const s of this._def.checks)s.kind==="max"&&(e===null||s.value<e)&&(e=s.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&w.isInteger(e.value))}get isFinite(){let e=null,s=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(s===null||r.value>s)&&(s=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(s)&&Number.isFinite(e)}}pe.create=t=>new pe({checks:[],typeName:_.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...x(t)});class ge extends k{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==h.bigint)return this._getInvalidInput(e);let r;const a=new z;for(const n of this._def.checks)n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(r=this._getOrReturnCtx(e,r),u(r,{code:d.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(r=this._getOrReturnCtx(e,r),u(r,{code:d.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):n.kind==="multipleOf"?e.data%n.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),u(r,{code:d.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):w.assertNever(n);return{status:a.value,value:e.data}}_getInvalidInput(e){const s=this._getOrReturnCtx(e);return u(s,{code:d.invalid_type,expected:h.bigint,received:s.parsedType}),v}gte(e,s){return this.setLimit("min",e,!0,m.toString(s))}gt(e,s){return this.setLimit("min",e,!1,m.toString(s))}lte(e,s){return this.setLimit("max",e,!0,m.toString(s))}lt(e,s){return this.setLimit("max",e,!1,m.toString(s))}setLimit(e,s,r,a){return new ge({...this._def,checks:[...this._def.checks,{kind:e,value:s,inclusive:r,message:m.toString(a)}]})}_addCheck(e){return new ge({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:m.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:m.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:m.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:m.toString(e)})}multipleOf(e,s){return this._addCheck({kind:"multipleOf",value:e,message:m.toString(s)})}get minValue(){let e=null;for(const s of this._def.checks)s.kind==="min"&&(e===null||s.value>e)&&(e=s.value);return e}get maxValue(){let e=null;for(const s of this._def.checks)s.kind==="max"&&(e===null||s.value<e)&&(e=s.value);return e}}ge.create=t=>new ge({checks:[],typeName:_.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...x(t)});class rt extends k{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==h.boolean){const r=this._getOrReturnCtx(e);return u(r,{code:d.invalid_type,expected:h.boolean,received:r.parsedType}),v}return U(e.data)}}rt.create=t=>new rt({typeName:_.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...x(t)});class Te extends k{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==h.date){const n=this._getOrReturnCtx(e);return u(n,{code:d.invalid_type,expected:h.date,received:n.parsedType}),v}if(Number.isNaN(e.data.getTime())){const n=this._getOrReturnCtx(e);return u(n,{code:d.invalid_date}),v}const r=new z;let a;for(const n of this._def.checks)n.kind==="min"?e.data.getTime()<n.value&&(a=this._getOrReturnCtx(e,a),u(a,{code:d.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),r.dirty()):n.kind==="max"?e.data.getTime()>n.value&&(a=this._getOrReturnCtx(e,a),u(a,{code:d.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),r.dirty()):w.assertNever(n);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Te({...this._def,checks:[...this._def.checks,e]})}min(e,s){return this._addCheck({kind:"min",value:e.getTime(),message:m.toString(s)})}max(e,s){return this._addCheck({kind:"max",value:e.getTime(),message:m.toString(s)})}get minDate(){let e=null;for(const s of this._def.checks)s.kind==="min"&&(e===null||s.value>e)&&(e=s.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const s of this._def.checks)s.kind==="max"&&(e===null||s.value<e)&&(e=s.value);return e!=null?new Date(e):null}}Te.create=t=>new Te({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:_.ZodDate,...x(t)});class at extends k{_parse(e){if(this._getType(e)!==h.symbol){const r=this._getOrReturnCtx(e);return u(r,{code:d.invalid_type,expected:h.symbol,received:r.parsedType}),v}return U(e.data)}}at.create=t=>new at({typeName:_.ZodSymbol,...x(t)});class nt extends k{_parse(e){if(this._getType(e)!==h.undefined){const r=this._getOrReturnCtx(e);return u(r,{code:d.invalid_type,expected:h.undefined,received:r.parsedType}),v}return U(e.data)}}nt.create=t=>new nt({typeName:_.ZodUndefined,...x(t)});class it extends k{_parse(e){if(this._getType(e)!==h.null){const r=this._getOrReturnCtx(e);return u(r,{code:d.invalid_type,expected:h.null,received:r.parsedType}),v}return U(e.data)}}it.create=t=>new it({typeName:_.ZodNull,...x(t)});class ot extends k{constructor(){super(...arguments),this._any=!0}_parse(e){return U(e.data)}}ot.create=t=>new ot({typeName:_.ZodAny,...x(t)});class lt extends k{constructor(){super(...arguments),this._unknown=!0}_parse(e){return U(e.data)}}lt.create=t=>new lt({typeName:_.ZodUnknown,...x(t)});class se extends k{_parse(e){const s=this._getOrReturnCtx(e);return u(s,{code:d.invalid_type,expected:h.never,received:s.parsedType}),v}}se.create=t=>new se({typeName:_.ZodNever,...x(t)});class ct extends k{_parse(e){if(this._getType(e)!==h.undefined){const r=this._getOrReturnCtx(e);return u(r,{code:d.invalid_type,expected:h.void,received:r.parsedType}),v}return U(e.data)}}ct.create=t=>new ct({typeName:_.ZodVoid,...x(t)});class q extends k{_parse(e){const{ctx:s,status:r}=this._processInputParams(e),a=this._def;if(s.parsedType!==h.array)return u(s,{code:d.invalid_type,expected:h.array,received:s.parsedType}),v;if(a.exactLength!==null){const i=s.data.length>a.exactLength.value,o=s.data.length<a.exactLength.value;(i||o)&&(u(s,{code:i?d.too_big:d.too_small,minimum:o?a.exactLength.value:void 0,maximum:i?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(a.minLength!==null&&s.data.length<a.minLength.value&&(u(s,{code:d.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),a.maxLength!==null&&s.data.length>a.maxLength.value&&(u(s,{code:d.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),s.common.async)return Promise.all([...s.data].map((i,o)=>a.type._parseAsync(new te(s,i,s.path,o)))).then(i=>z.mergeArray(r,i));const n=[...s.data].map((i,o)=>a.type._parseSync(new te(s,i,s.path,o)));return z.mergeArray(r,n)}get element(){return this._def.type}min(e,s){return new q({...this._def,minLength:{value:e,message:m.toString(s)}})}max(e,s){return new q({...this._def,maxLength:{value:e,message:m.toString(s)}})}length(e,s){return new q({...this._def,exactLength:{value:e,message:m.toString(s)}})}nonempty(e){return this.min(1,e)}}q.create=(t,e)=>new q({type:t,minLength:null,maxLength:null,exactLength:null,typeName:_.ZodArray,...x(e)});function le(t){if(t instanceof S){const e={};for(const s in t.shape){const r=t.shape[s];e[s]=ee.create(le(r))}return new S({...t._def,shape:()=>e})}else return t instanceof q?new q({...t._def,type:le(t.element)}):t instanceof ee?ee.create(le(t.unwrap())):t instanceof he?he.create(le(t.unwrap())):t instanceof ie?ie.create(t.items.map(e=>le(e))):t}class S extends k{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),s=w.objectKeys(e);return this._cached={shape:e,keys:s},this._cached}_parse(e){if(this._getType(e)!==h.object){const c=this._getOrReturnCtx(e);return u(c,{code:d.invalid_type,expected:h.object,received:c.parsedType}),v}const{status:r,ctx:a}=this._processInputParams(e),{shape:n,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof se&&this._def.unknownKeys==="strip"))for(const c in a.data)i.includes(c)||o.push(c);const l=[];for(const c of i){const f=n[c],j=a.data[c];l.push({key:{status:"valid",value:c},value:f._parse(new te(a,j,a.path,c)),alwaysSet:c in a.data})}if(this._def.catchall instanceof se){const c=this._def.unknownKeys;if(c==="passthrough")for(const f of o)l.push({key:{status:"valid",value:f},value:{status:"valid",value:a.data[f]}});else if(c==="strict")o.length>0&&(u(a,{code:d.unrecognized_keys,keys:o}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const f of o){const j=a.data[f];l.push({key:{status:"valid",value:f},value:c._parse(new te(a,j,a.path,f)),alwaysSet:f in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const c=[];for(const f of l){const j=await f.key,L=await f.value;c.push({key:j,value:L,alwaysSet:f.alwaysSet})}return c}).then(c=>z.mergeObjectSync(r,c)):z.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(e){return m.errToObj,new S({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(s,r)=>{var n,i;const a=((i=(n=this._def).errorMap)==null?void 0:i.call(n,s,r).message)??r.defaultError;return s.code==="unrecognized_keys"?{message:m.errToObj(e).message??a}:{message:a}}}:{}})}strip(){return new S({...this._def,unknownKeys:"strip"})}passthrough(){return new S({...this._def,unknownKeys:"passthrough"})}extend(e){return new S({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new S({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:_.ZodObject})}setKey(e,s){return this.augment({[e]:s})}catchall(e){return new S({...this._def,catchall:e})}pick(e){const s={};for(const r of w.objectKeys(e))e[r]&&this.shape[r]&&(s[r]=this.shape[r]);return new S({...this._def,shape:()=>s})}omit(e){const s={};for(const r of w.objectKeys(this.shape))e[r]||(s[r]=this.shape[r]);return new S({...this._def,shape:()=>s})}deepPartial(){return le(this)}partial(e){const s={};for(const r of w.objectKeys(this.shape)){const a=this.shape[r];e&&!e[r]?s[r]=a:s[r]=a.optional()}return new S({...this._def,shape:()=>s})}required(e){const s={};for(const r of w.objectKeys(this.shape))if(e&&!e[r])s[r]=this.shape[r];else{let n=this.shape[r];for(;n instanceof ee;)n=n._def.innerType;s[r]=n}return new S({...this._def,shape:()=>s})}keyof(){return Ft(w.objectKeys(this.shape))}}S.create=(t,e)=>new S({shape:()=>t,unknownKeys:"strip",catchall:se.create(),typeName:_.ZodObject,...x(e)});S.strictCreate=(t,e)=>new S({shape:()=>t,unknownKeys:"strict",catchall:se.create(),typeName:_.ZodObject,...x(e)});S.lazycreate=(t,e)=>new S({shape:t,unknownKeys:"strip",catchall:se.create(),typeName:_.ZodObject,...x(e)});class Ee extends k{_parse(e){const{ctx:s}=this._processInputParams(e),r=this._def.options;function a(n){for(const o of n)if(o.result.status==="valid")return o.result;for(const o of n)if(o.result.status==="dirty")return s.common.issues.push(...o.ctx.common.issues),o.result;const i=n.map(o=>new H(o.ctx.common.issues));return u(s,{code:d.invalid_union,unionErrors:i}),v}if(s.common.async)return Promise.all(r.map(async n=>{const i={...s,common:{...s.common,issues:[]},parent:null};return{result:await n._parseAsync({data:s.data,path:s.path,parent:i}),ctx:i}})).then(a);{let n;const i=[];for(const l of r){const c={...s,common:{...s.common,issues:[]},parent:null},f=l._parseSync({data:s.data,path:s.path,parent:c});if(f.status==="valid")return f;f.status==="dirty"&&!n&&(n={result:f,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(n)return s.common.issues.push(...n.ctx.common.issues),n.result;const o=i.map(l=>new H(l));return u(s,{code:d.invalid_union,unionErrors:o}),v}}get options(){return this._def.options}}Ee.create=(t,e)=>new Ee({options:t,typeName:_.ZodUnion,...x(e)});function Ze(t,e){const s=Q(t),r=Q(e);if(t===e)return{valid:!0,data:t};if(s===h.object&&r===h.object){const a=w.objectKeys(e),n=w.objectKeys(t).filter(o=>a.indexOf(o)!==-1),i={...t,...e};for(const o of n){const l=Ze(t[o],e[o]);if(!l.valid)return{valid:!1};i[o]=l.data}return{valid:!0,data:i}}else if(s===h.array&&r===h.array){if(t.length!==e.length)return{valid:!1};const a=[];for(let n=0;n<t.length;n++){const i=t[n],o=e[n],l=Ze(i,o);if(!l.valid)return{valid:!1};a.push(l.data)}return{valid:!0,data:a}}else return s===h.date&&r===h.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class Ce extends k{_parse(e){const{status:s,ctx:r}=this._processInputParams(e),a=(n,i)=>{if(et(n)||et(i))return v;const o=Ze(n.value,i.value);return o.valid?((tt(n)||tt(i))&&s.dirty(),{status:s.value,value:o.data}):(u(r,{code:d.invalid_intersection_types}),v)};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(([n,i])=>a(n,i)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Ce.create=(t,e,s)=>new Ce({left:t,right:e,typeName:_.ZodIntersection,...x(s)});class ie extends k{_parse(e){const{status:s,ctx:r}=this._processInputParams(e);if(r.parsedType!==h.array)return u(r,{code:d.invalid_type,expected:h.array,received:r.parsedType}),v;if(r.data.length<this._def.items.length)return u(r,{code:d.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),v;!this._def.rest&&r.data.length>this._def.items.length&&(u(r,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),s.dirty());const n=[...r.data].map((i,o)=>{const l=this._def.items[o]||this._def.rest;return l?l._parse(new te(r,i,r.path,o)):null}).filter(i=>!!i);return r.common.async?Promise.all(n).then(i=>z.mergeArray(s,i)):z.mergeArray(s,n)}get items(){return this._def.items}rest(e){return new ie({...this._def,rest:e})}}ie.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ie({items:t,typeName:_.ZodTuple,rest:null,...x(e)})};class dt extends k{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:s,ctx:r}=this._processInputParams(e);if(r.parsedType!==h.map)return u(r,{code:d.invalid_type,expected:h.map,received:r.parsedType}),v;const a=this._def.keyType,n=this._def.valueType,i=[...r.data.entries()].map(([o,l],c)=>({key:a._parse(new te(r,o,r.path,[c,"key"])),value:n._parse(new te(r,l,r.path,[c,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const l of i){const c=await l.key,f=await l.value;if(c.status==="aborted"||f.status==="aborted")return v;(c.status==="dirty"||f.status==="dirty")&&s.dirty(),o.set(c.value,f.value)}return{status:s.value,value:o}})}else{const o=new Map;for(const l of i){const c=l.key,f=l.value;if(c.status==="aborted"||f.status==="aborted")return v;(c.status==="dirty"||f.status==="dirty")&&s.dirty(),o.set(c.value,f.value)}return{status:s.value,value:o}}}}dt.create=(t,e,s)=>new dt({valueType:e,keyType:t,typeName:_.ZodMap,...x(s)});class ye extends k{_parse(e){const{status:s,ctx:r}=this._processInputParams(e);if(r.parsedType!==h.set)return u(r,{code:d.invalid_type,expected:h.set,received:r.parsedType}),v;const a=this._def;a.minSize!==null&&r.data.size<a.minSize.value&&(u(r,{code:d.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),s.dirty()),a.maxSize!==null&&r.data.size>a.maxSize.value&&(u(r,{code:d.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),s.dirty());const n=this._def.valueType;function i(l){const c=new Set;for(const f of l){if(f.status==="aborted")return v;f.status==="dirty"&&s.dirty(),c.add(f.value)}return{status:s.value,value:c}}const o=[...r.data.values()].map((l,c)=>n._parse(new te(r,l,r.path,c)));return r.common.async?Promise.all(o).then(l=>i(l)):i(o)}min(e,s){return new ye({...this._def,minSize:{value:e,message:m.toString(s)}})}max(e,s){return new ye({...this._def,maxSize:{value:e,message:m.toString(s)}})}size(e,s){return this.min(e,s).max(e,s)}nonempty(e){return this.min(1,e)}}ye.create=(t,e)=>new ye({valueType:t,minSize:null,maxSize:null,typeName:_.ZodSet,...x(e)});class ut extends k{get schema(){return this._def.getter()}_parse(e){const{ctx:s}=this._processInputParams(e);return this._def.getter()._parse({data:s.data,path:s.path,parent:s})}}ut.create=(t,e)=>new ut({getter:t,typeName:_.ZodLazy,...x(e)});class ft extends k{_parse(e){if(e.data!==this._def.value){const s=this._getOrReturnCtx(e);return u(s,{received:s.data,code:d.invalid_literal,expected:this._def.value}),v}return{status:"valid",value:e.data}}get value(){return this._def.value}}ft.create=(t,e)=>new ft({value:t,typeName:_.ZodLiteral,...x(e)});function Ft(t,e){return new ue({values:t,typeName:_.ZodEnum,...x(e)})}class ue extends k{_parse(e){if(typeof e.data!="string"){const s=this._getOrReturnCtx(e),r=this._def.values;return u(s,{expected:w.joinValues(r),received:s.parsedType,code:d.invalid_type}),v}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const s=this._getOrReturnCtx(e),r=this._def.values;return u(s,{received:s.data,code:d.invalid_enum_value,options:r}),v}return U(e.data)}get options(){return this._def.values}get enum(){const e={};for(const s of this._def.values)e[s]=s;return e}get Values(){const e={};for(const s of this._def.values)e[s]=s;return e}get Enum(){const e={};for(const s of this._def.values)e[s]=s;return e}extract(e,s=this._def){return ue.create(e,{...this._def,...s})}exclude(e,s=this._def){return ue.create(this.options.filter(r=>!e.includes(r)),{...this._def,...s})}}ue.create=Ft;class ht extends k{_parse(e){const s=w.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==h.string&&r.parsedType!==h.number){const a=w.objectValues(s);return u(r,{expected:w.joinValues(a),received:r.parsedType,code:d.invalid_type}),v}if(this._cache||(this._cache=new Set(w.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const a=w.objectValues(s);return u(r,{received:r.data,code:d.invalid_enum_value,options:a}),v}return U(e.data)}get enum(){return this._def.values}}ht.create=(t,e)=>new ht({values:t,typeName:_.ZodNativeEnum,...x(e)});class Ne extends k{unwrap(){return this._def.type}_parse(e){const{ctx:s}=this._processInputParams(e);if(s.parsedType!==h.promise&&s.common.async===!1)return u(s,{code:d.invalid_type,expected:h.promise,received:s.parsedType}),v;const r=s.parsedType===h.promise?s.data:Promise.resolve(s.data);return U(r.then(a=>this._def.type.parseAsync(a,{path:s.path,errorMap:s.common.contextualErrorMap})))}}Ne.create=(t,e)=>new Ne({type:t,typeName:_.ZodPromise,...x(e)});class fe extends k{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===_.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:s,ctx:r}=this._processInputParams(e),a=this._def.effect||null,n={addIssue:i=>{u(r,i),i.fatal?s.abort():s.dirty()},get path(){return r.path}};if(n.addIssue=n.addIssue.bind(n),a.type==="preprocess"){const i=a.transform(r.data,n);if(r.common.async)return Promise.resolve(i).then(async o=>{if(s.value==="aborted")return v;const l=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return l.status==="aborted"?v:l.status==="dirty"||s.value==="dirty"?me(l.value):l});{if(s.value==="aborted")return v;const o=this._def.schema._parseSync({data:i,path:r.path,parent:r});return o.status==="aborted"?v:o.status==="dirty"||s.value==="dirty"?me(o.value):o}}if(a.type==="refinement"){const i=o=>{const l=a.refinement(o,n);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 o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?v:(o.status==="dirty"&&s.dirty(),i(o.value),{status:s.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?v:(o.status==="dirty"&&s.dirty(),i(o.value).then(()=>({status:s.value,value:o.value}))))}if(a.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!de(i))return v;const o=a.transform(i.value,n);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:s.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>de(i)?Promise.resolve(a.transform(i.value,n)).then(o=>({status:s.value,value:o})):v);w.assertNever(a)}}fe.create=(t,e,s)=>new fe({schema:t,typeName:_.ZodEffects,effect:e,...x(s)});fe.createWithPreprocess=(t,e,s)=>new fe({schema:e,effect:{type:"preprocess",transform:t},typeName:_.ZodEffects,...x(s)});class ee extends k{_parse(e){return this._getType(e)===h.undefined?U(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ee.create=(t,e)=>new ee({innerType:t,typeName:_.ZodOptional,...x(e)});class he extends k{_parse(e){return this._getType(e)===h.null?U(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}he.create=(t,e)=>new he({innerType:t,typeName:_.ZodNullable,...x(e)});class Le extends k{_parse(e){const{ctx:s}=this._processInputParams(e);let r=s.data;return s.parsedType===h.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:s.path,parent:s})}removeDefault(){return this._def.innerType}}Le.create=(t,e)=>new Le({innerType:t,typeName:_.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...x(e)});class $e extends k{_parse(e){const{ctx:s}=this._processInputParams(e),r={...s,common:{...s.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return we(a)?a.then(n=>({status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new H(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new H(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}$e.create=(t,e)=>new $e({innerType:t,typeName:_.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...x(e)});class mt extends k{_parse(e){if(this._getType(e)!==h.nan){const r=this._getOrReturnCtx(e);return u(r,{code:d.invalid_type,expected:h.nan,received:r.parsedType}),v}return{status:"valid",value:e.data}}}mt.create=t=>new mt({typeName:_.ZodNaN,...x(t)});class qs extends k{_parse(e){const{ctx:s}=this._processInputParams(e),r=s.data;return this._def.type._parse({data:r,path:s.path,parent:s})}unwrap(){return this._def.type}}class Xe extends k{_parse(e){const{status:s,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const n=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return n.status==="aborted"?v:n.status==="dirty"?(s.dirty(),me(n.value)):this._def.out._parseAsync({data:n.value,path:r.path,parent:r})})();{const a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?v:a.status==="dirty"?(s.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(e,s){return new Xe({in:e,out:s,typeName:_.ZodPipeline})}}class De extends k{_parse(e){const s=this._def.innerType._parse(e),r=a=>(de(a)&&(a.value=Object.freeze(a.value)),a);return we(s)?s.then(a=>r(a)):r(s)}unwrap(){return this._def.innerType}}De.create=(t,e)=>new De({innerType:t,typeName:_.ZodReadonly,...x(e)});var _;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(_||(_={}));const Ws=K.create;se.create;q.create;const Hs=S.create;Ee.create;Ce.create;ie.create;ue.create;Ne.create;ee.create;he.create;const Xs=t=>Hs({password:Ws().nonempty(t("required",{field:t("Password"),ns:"validation"}))}),Ys=({title:t,description:e,children:s,onSubmit:r,...a})=>{const{t:n}=gt.useTranslation(),i=p.useMemo(()=>Xs(n),[n]),o=G.useForm({resolver:_s(i),defaultValues:{password:""}});return O.jsxRuntimeExports.jsxs(Dt,{...a,children:[s&&O.jsxRuntimeExports.jsx(Pt,{children:s}),O.jsxRuntimeExports.jsx(Be,{children:O.jsxRuntimeExports.jsx(Kt.Ux,{...o,children:O.jsxRuntimeExports.jsxs("form",{onSubmit:o.handleSubmit(r),className:"space-y-3",children:[O.jsxRuntimeExports.jsxs(Ue,{children:[O.jsxRuntimeExports.jsx(qe,{children:t||n("Confirm your password")}),O.jsxRuntimeExports.jsxs("div",{className:"text-secondary text-body-sm-medium space-y-3",children:[e||n("Enter your account password to complete this action"),O.jsxRuntimeExports.jsx(es.MyInput,{required:!0,type:"password",control:o.control,name:"password",placeholder:n("Password")})]})]}),O.jsxRuntimeExports.jsxs(Fe,{children:[O.jsxRuntimeExports.jsx(He,{type:"reset",onClick:()=>o.reset(),children:n("Cancel")}),O.jsxRuntimeExports.jsx(We,{type:"submit",children:n("Confirm")})]})]})})})]})};function qt(t){var e,s,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(e=0;e<a;e++)t[e]&&(s=qt(t[e]))&&(r&&(r+=" "),r+=s)}else for(s in t)t[s]&&(r&&(r+=" "),r+=s);return r}function ne(){for(var t,e,s=0,r="",a=arguments.length;s<a;s++)(t=arguments[s])&&(e=qt(t))&&(r&&(r+=" "),r+=e);return r}var _e=t=>typeof t=="number"&&!isNaN(t),oe=t=>typeof t=="string",X=t=>typeof t=="function",Js=t=>oe(t)||_e(t),Pe=t=>oe(t)||X(t)?t:null,Qs=(t,e)=>t===!1||_e(t)&&t>0?t:e,Me=t=>p.isValidElement(t)||oe(t)||X(t)||_e(t);function Gs(t,e,s=300){let{scrollHeight:r,style:a}=t;requestAnimationFrame(()=>{a.minHeight="initial",a.height=r+"px",a.transition=`all ${s}ms`,requestAnimationFrame(()=>{a.height="0",a.padding="0",a.margin="0",setTimeout(e,s)})})}function Ks({enter:t,exit:e,appendPosition:s=!1,collapse:r=!0,collapseDuration:a=300}){return function({children:n,position:i,preventExitTransition:o,done:l,nodeRef:c,isIn:f,playToast:j}){let L=s?`${t}--${i}`:t,$=s?`${e}--${i}`:e,M=p.useRef(0);return p.useLayoutEffect(()=>{let I=c.current,C=L.split(" "),E=g=>{g.target===c.current&&(j(),I.removeEventListener("animationend",E),I.removeEventListener("animationcancel",E),M.current===0&&g.type!=="animationcancel"&&I.classList.remove(...C))};I.classList.add(...C),I.addEventListener("animationend",E),I.addEventListener("animationcancel",E)},[]),p.useEffect(()=>{let I=c.current,C=()=>{I.removeEventListener("animationend",C),r?Gs(I,l,a):l()};f||(o?C():(M.current=1,I.className+=` ${$}`,I.addEventListener("animationend",C)))},[f]),p.createElement(p.Fragment,null,n)}}function pt(t,e){return{content:Wt(t.content,t.props),containerId:t.props.containerId,id:t.props.toastId,theme:t.props.theme,type:t.props.type,data:t.props.data||{},isLoading:t.props.isLoading,icon:t.props.icon,reason:t.removalReason,status:e}}function Wt(t,e,s=!1){return p.isValidElement(t)&&!oe(t.type)?p.cloneElement(t,{closeToast:e.closeToast,toastProps:e,data:e.data,isPaused:s}):X(t)?t({closeToast:e.closeToast,toastProps:e,data:e.data,isPaused:s}):t}function er({closeToast:t,theme:e,ariaLabel:s="close"}){return p.createElement("button",{className:`Toastify__close-button Toastify__close-button--${e}`,type:"button",onClick:r=>{r.stopPropagation(),t(!0)},"aria-label":s},p.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},p.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function tr({delay:t,isRunning:e,closeToast:s,type:r="default",hide:a,className:n,controlledProgress:i,progress:o,rtl:l,isIn:c,theme:f}){let j=a||i&&o===0,L={animationDuration:`${t}ms`,animationPlayState:e?"running":"paused"};i&&(L.transform=`scaleX(${o})`);let $=ne("Toastify__progress-bar",i?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${f}`,`Toastify__progress-bar--${r}`,{"Toastify__progress-bar--rtl":l}),M=X(n)?n({rtl:l,type:r,defaultClassName:$}):ne($,n),I={[i&&o>=1?"onTransitionEnd":"onAnimationEnd"]:i&&o<1?null:()=>{c&&s()}};return p.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":j},p.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${f} Toastify__progress-bar--${r}`}),p.createElement("div",{role:"progressbar","aria-hidden":j?"true":"false","aria-label":"notification timer",className:M,style:L,...I}))}var sr=1,Ht=()=>`${sr++}`;function rr(t,e,s){let r=1,a=0,n=[],i=[],o=e,l=new Map,c=new Set,f=g=>(c.add(g),()=>c.delete(g)),j=()=>{i=Array.from(l.values()),c.forEach(g=>g())},L=({containerId:g,toastId:y,updateId:b})=>{let Z=g?g!==t:t!==1,V=l.has(y)&&b==null;return Z||V},$=(g,y)=>{l.forEach(b=>{var Z;(y==null||y===b.props.toastId)&&((Z=b.toggle)==null||Z.call(b,g))})},M=g=>{var y,b;(b=(y=g.props)==null?void 0:y.onClose)==null||b.call(y,g.removalReason),g.isActive=!1},I=g=>{if(g==null)l.forEach(M);else{let y=l.get(g);y&&M(y)}j()},C=()=>{a-=n.length,n=[]},E=g=>{var y,b;let{toastId:Z,updateId:V}=g.props,T=V==null;g.staleId&&l.delete(g.staleId),g.isActive=!0,l.set(Z,g),j(),s(pt(g,T?"added":"updated")),T&&((b=(y=g.props).onOpen)==null||b.call(y))};return{id:t,props:o,observe:f,toggle:$,removeToast:I,toasts:l,clearQueue:C,buildToast:(g,y)=>{if(L(y))return;let{toastId:b,updateId:Z,data:V,staleId:T,delay:R}=y,F=Z==null;F&&a++;let J={...o,style:o.toastStyle,key:r++,...Object.fromEntries(Object.entries(y).filter(([ae,be])=>be!=null)),toastId:b,updateId:Z,data:V,isIn:!1,className:Pe(y.className||o.toastClassName),progressClassName:Pe(y.progressClassName||o.progressClassName),autoClose:y.isLoading?!1:Qs(y.autoClose,o.autoClose),closeToast(ae){l.get(b).removalReason=ae,I(b)},deleteToast(){let ae=l.get(b);if(ae!=null){if(s(pt(ae,"removed")),l.delete(b),a--,a<0&&(a=0),n.length>0){E(n.shift());return}j()}}};J.closeButton=o.closeButton,y.closeButton===!1||Me(y.closeButton)?J.closeButton=y.closeButton:y.closeButton===!0&&(J.closeButton=Me(o.closeButton)?o.closeButton:!0);let W={content:g,props:J,staleId:T};o.limit&&o.limit>0&&a>o.limit&&F?n.push(W):_e(R)?setTimeout(()=>{E(W)},R):E(W)},setProps(g){o=g},setToggle:(g,y)=>{let b=l.get(g);b&&(b.toggle=y)},isToastActive:g=>{var y;return(y=l.get(g))==null?void 0:y.isActive},getSnapshot:()=>i}}var P=new Map,ve=[],Ve=new Set,ar=t=>Ve.forEach(e=>e(t)),Xt=()=>P.size>0;function nr(){ve.forEach(t=>Jt(t.content,t.options)),ve=[]}var ir=(t,{containerId:e})=>{var s;return(s=P.get(e||1))==null?void 0:s.toasts.get(t)};function Yt(t,e){var s;if(e)return!!((s=P.get(e))!=null&&s.isToastActive(t));let r=!1;return P.forEach(a=>{a.isToastActive(t)&&(r=!0)}),r}function or(t){if(!Xt()){ve=ve.filter(e=>t!=null&&e.options.toastId!==t);return}if(t==null||Js(t))P.forEach(e=>{e.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){let e=P.get(t.containerId);e?e.removeToast(t.id):P.forEach(s=>{s.removeToast(t.id)})}}var lr=(t={})=>{P.forEach(e=>{e.props.limit&&(!t.containerId||e.id===t.containerId)&&e.clearQueue()})};function Jt(t,e){Me(t)&&(Xt()||ve.push({content:t,options:e}),P.forEach(s=>{s.buildToast(t,e)}))}function cr(t){var e;(e=P.get(t.containerId||1))==null||e.setToggle(t.id,t.fn)}function Qt(t,e){P.forEach(s=>{(e==null||!(e!=null&&e.containerId)||(e==null?void 0:e.containerId)===s.id)&&s.toggle(t,e==null?void 0:e.id)})}function dr(t){let e=t.containerId||1;return{subscribe(s){let r=rr(e,t,ar);P.set(e,r);let a=r.observe(s);return nr(),()=>{a(),P.delete(e)}},setProps(s){var r;(r=P.get(e))==null||r.setProps(s)},getSnapshot(){var s;return(s=P.get(e))==null?void 0:s.getSnapshot()}}}function ur(t){return Ve.add(t),()=>{Ve.delete(t)}}function fr(t){return t&&(oe(t.toastId)||_e(t.toastId))?t.toastId:Ht()}function xe(t,e){return Jt(t,e),e.toastId}function Ae(t,e){return{...e,type:e&&e.type||t,toastId:fr(e)}}function je(t){return(e,s)=>xe(e,Ae(t,s))}function A(t,e){return xe(t,Ae("default",e))}A.loading=(t,e)=>xe(t,Ae("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...e}));function hr(t,{pending:e,error:s,success:r},a){let n;e&&(n=oe(e)?A.loading(e,a):A.loading(e.render,{...a,...e}));let i={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},o=(c,f,j)=>{if(f==null){A.dismiss(n);return}let L={type:c,...i,...a,data:j},$=oe(f)?{render:f}:f;return n?A.update(n,{...L,...$}):A($.render,{...L,...$}),j},l=X(t)?t():t;return l.then(c=>o("success",r,c)).catch(c=>o("error",s,c)),l}A.promise=hr;A.success=je("success");A.info=je("info");A.error=je("error");A.warning=je("warning");A.warn=A.warning;A.dark=(t,e)=>xe(t,Ae("default",{theme:"dark",...e}));function mr(t){or(t)}A.dismiss=mr;A.clearWaitingQueue=lr;A.isActive=Yt;A.update=(t,e={})=>{let s=ir(t,e);if(s){let{props:r,content:a}=s,n={delay:100,...r,...e,toastId:e.toastId||t,updateId:Ht()};n.toastId!==t&&(n.staleId=t);let i=n.render||a;delete n.render,xe(i,n)}};A.done=t=>{A.update(t,{progress:1})};A.onChange=ur;A.play=t=>Qt(!0,t);A.pause=t=>Qt(!1,t);function pr(t){var e;let{subscribe:s,getSnapshot:r,setProps:a}=p.useRef(dr(t)).current;a(t);let n=(e=p.useSyncExternalStore(s,r,r))==null?void 0:e.slice();function i(o){if(!n)return[];let l=new Map;return t.newestOnTop&&n.reverse(),n.forEach(c=>{let{position:f}=c.props;l.has(f)||l.set(f,[]),l.get(f).push(c)}),Array.from(l,c=>o(c[0],c[1]))}return{getToastToRender:i,isToastActive:Yt,count:n==null?void 0:n.length}}function gr(t){let[e,s]=p.useState(!1),[r,a]=p.useState(!1),n=p.useRef(null),i=p.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:o,pauseOnHover:l,closeToast:c,onClick:f,closeOnClick:j}=t;cr({id:t.toastId,containerId:t.containerId,fn:s}),p.useEffect(()=>{if(t.pauseOnFocusLoss)return L(),()=>{$()}},[t.pauseOnFocusLoss]);function L(){document.hasFocus()||E(),window.addEventListener("focus",C),window.addEventListener("blur",E)}function $(){window.removeEventListener("focus",C),window.removeEventListener("blur",E)}function M(T){if(t.draggable===!0||t.draggable===T.pointerType){g();let R=n.current;i.canCloseOnClick=!0,i.canDrag=!0,R.style.transition="none",t.draggableDirection==="x"?(i.start=T.clientX,i.removalDistance=R.offsetWidth*(t.draggablePercent/100)):(i.start=T.clientY,i.removalDistance=R.offsetHeight*(t.draggablePercent===80?t.draggablePercent*1.5:t.draggablePercent)/100)}}function I(T){let{top:R,bottom:F,left:J,right:W}=n.current.getBoundingClientRect();T.nativeEvent.type!=="touchend"&&t.pauseOnHover&&T.clientX>=J&&T.clientX<=W&&T.clientY>=R&&T.clientY<=F?E():C()}function C(){s(!0)}function E(){s(!1)}function g(){i.didMove=!1,document.addEventListener("pointermove",b),document.addEventListener("pointerup",Z)}function y(){document.removeEventListener("pointermove",b),document.removeEventListener("pointerup",Z)}function b(T){let R=n.current;if(i.canDrag&&R){i.didMove=!0,e&&E(),t.draggableDirection==="x"?i.delta=T.clientX-i.start:i.delta=T.clientY-i.start,i.start!==T.clientX&&(i.canCloseOnClick=!1);let F=t.draggableDirection==="x"?`${i.delta}px, var(--y)`:`0, calc(${i.delta}px + var(--y))`;R.style.transform=`translate3d(${F},0)`,R.style.opacity=`${1-Math.abs(i.delta/i.removalDistance)}`}}function Z(){y();let T=n.current;if(i.canDrag&&i.didMove&&T){if(i.canDrag=!1,Math.abs(i.delta)>i.removalDistance){a(!0),t.closeToast(!0),t.collapseAll();return}T.style.transition="transform 0.2s, opacity 0.2s",T.style.removeProperty("transform"),T.style.removeProperty("opacity")}}let V={onPointerDown:M,onPointerUp:I};return o&&l&&(V.onMouseEnter=E,t.stacked||(V.onMouseLeave=C)),j&&(V.onClick=T=>{f&&f(T),i.canCloseOnClick&&c(!0)}),{playToast:C,pauseToast:E,isRunning:e,preventExitTransition:r,toastRef:n,eventHandlers:V}}var yr=typeof window<"u"?p.useLayoutEffect:p.useEffect,Re=({theme:t,type:e,isLoading:s,...r})=>p.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${e})`,...r});function vr(t){return p.createElement(Re,{...t},p.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))}function _r(t){return p.createElement(Re,{...t},p.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))}function xr(t){return p.createElement(Re,{...t},p.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))}function br(t){return p.createElement(Re,{...t},p.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))}function kr(){return p.createElement("div",{className:"Toastify__spinner"})}var ze={info:_r,warning:vr,success:xr,error:br,spinner:kr},wr=t=>t in ze;function Tr({theme:t,type:e,isLoading:s,icon:r}){let a=null,n={theme:t,type:e};return r===!1||(X(r)?a=r({...n,isLoading:s}):p.isValidElement(r)?a=p.cloneElement(r,n):s?a=ze.spinner():wr(e)&&(a=ze[e](n))),a}var Er=t=>{let{isRunning:e,preventExitTransition:s,toastRef:r,eventHandlers:a,playToast:n}=gr(t),{closeButton:i,children:o,autoClose:l,onClick:c,type:f,hideProgressBar:j,closeToast:L,transition:$,position:M,className:I,style:C,progressClassName:E,updateId:g,role:y,progress:b,rtl:Z,toastId:V,deleteToast:T,isIn:R,isLoading:F,closeOnClick:J,theme:W,ariaLabel:ae}=t,be=ne("Toastify__toast",`Toastify__toast-theme--${W}`,`Toastify__toast--${f}`,{"Toastify__toast--rtl":Z},{"Toastify__toast--close-on-click":J}),Gt=X(I)?I({rtl:Z,position:M,type:f,defaultClassName:be}):ne(be,I),Ye=Tr(t),Je=!!b||!l,Ie={closeToast:L,type:f,theme:W},ke=null;return i===!1||(X(i)?ke=i(Ie):p.isValidElement(i)?ke=p.cloneElement(i,Ie):ke=er(Ie)),p.createElement($,{isIn:R,done:T,position:M,preventExitTransition:s,nodeRef:r,playToast:n},p.createElement("div",{id:V,tabIndex:0,onClick:c,"data-in":R,className:Gt,...a,style:C,ref:r,...R&&{role:y,"aria-label":ae}},Ye!=null&&p.createElement("div",{className:ne("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!F})},Ye),Wt(o,t,!e),ke,!t.customProgressBar&&p.createElement(tr,{...g&&!Je?{key:`p-${g}`}:{},rtl:Z,theme:W,delay:l,isRunning:e,isIn:R,closeToast:L,hide:j,type:f,className:E,controlledProgress:Je,progress:b||0})))},Cr=(t,e=!1)=>({enter:`Toastify--animate Toastify__${t}-enter`,exit:`Toastify--animate Toastify__${t}-exit`,appendPosition:e}),Nr=Ks(Cr("bounce",!0)),Ar={position:"top-right",transition:Nr,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light","aria-label":"Notifications Alt+T",hotKeys:t=>t.altKey&&t.code==="KeyT"};function jr(t){let e={...Ar,...t},s=t.stacked,[r,a]=p.useState(!0),n=p.useRef(null),{getToastToRender:i,isToastActive:o,count:l}=pr(e),{className:c,style:f,rtl:j,containerId:L,hotKeys:$}=e;function M(C){let E=ne("Toastify__toast-container",`Toastify__toast-container--${C}`,{"Toastify__toast-container--rtl":j});return X(c)?c({position:C,rtl:j,defaultClassName:E}):ne(E,Pe(c))}function I(){s&&(a(!0),A.play())}return yr(()=>{var C;if(s){let E=n.current.querySelectorAll('[data-in="true"]'),g=12,y=(C=e.position)==null?void 0:C.includes("top"),b=0,Z=0;Array.from(E).reverse().forEach((V,T)=>{let R=V;R.classList.add("Toastify__toast--stacked"),T>0&&(R.dataset.collapsed=`${r}`),R.dataset.pos||(R.dataset.pos=y?"top":"bot");let F=b*(r?.2:1)+(r?0:g*T);R.style.setProperty("--y",`${y?F:F*-1}px`),R.style.setProperty("--g",`${g}`),R.style.setProperty("--s",`${1-(r?Z:0)}`),b+=R.offsetHeight,Z+=.025})}},[r,l,s]),p.useEffect(()=>{function C(E){var g;let y=n.current;$(E)&&((g=y.querySelector('[tabIndex="0"]'))==null||g.focus(),a(!1),A.pause()),E.key==="Escape"&&(document.activeElement===y||y!=null&&y.contains(document.activeElement))&&(a(!0),A.play())}return document.addEventListener("keydown",C),()=>{document.removeEventListener("keydown",C)}},[$]),p.createElement("section",{ref:n,className:"Toastify",id:L,onMouseEnter:()=>{s&&(a(!1),A.pause())},onMouseLeave:I,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text","aria-label":e["aria-label"]},i((C,E)=>{let g=E.length?{...f}:{...f,pointerEvents:"none"};return p.createElement("div",{tabIndex:-1,className:M(C),"data-stacked":s,style:g,key:`c-${C}`},E.map(({content:y,props:b})=>p.createElement(Er,{...b,stacked:s,collapseAll:I,isIn:o(b.toastId,b.containerId),key:`t-${b.key}`},y)))}))}exports.Confirm=ps;exports.Lt=jr;exports.PasswordConfirm=Ys;exports.y=A;
|
|
7
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return D.useEffect(()=>{var s;document.getElementById((s=t.current)==null?void 0:s.getAttribute("aria-describedby"))||console.warn(e)},[e,t]),null},us=_t,fs=xt,hs=bt,It=kt,Ot=wt,St=jt,Zt=Rt,Lt=Et,$t=Nt;const Dt=us,Pt=fs,ms=hs,Mt=D.forwardRef(({className:t,...e},s)=>N.ae.jsx(It,{className:re.mo("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",t),...e,ref:s}));Mt.displayName=It.displayName;const Be=D.forwardRef(({className:t,...e},s)=>N.ae.jsxs(ms,{children:[N.ae.jsx(Mt,{}),N.ae.jsx(Ot,{ref:s,className:re.mo("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg",t),...e})]}));Be.displayName=Ot.displayName;const Fe=({className:t,...e})=>N.ae.jsx("div",{className:re.mo("flex flex-col space-y-2 text-center sm:text-left",t),...e});Fe.displayName="AlertDialogHeader";const Ue=({className:t,...e})=>N.ae.jsx("div",{className:re.mo("flex gap-2 sm:justify-end",t),...e});Ue.displayName="AlertDialogFooter";const qe=D.forwardRef(({className:t,...e},s)=>N.ae.jsx(Lt,{ref:s,className:re.mo("text-lg font-semibold",t),...e}));qe.displayName=Lt.displayName;const zt=D.forwardRef(({className:t,...e},s)=>N.ae.jsx($t,{ref:s,className:re.mo("text-muted-foreground text-sm",t),...e}));zt.displayName=$t.displayName;const We=D.forwardRef(({className:t,...e},s)=>N.ae.jsx(St,{ref:s,className:re.mo(yt.g(),t),...e}));We.displayName=St.displayName;const He=D.forwardRef(({className:t,...e},s)=>N.ae.jsx(Zt,{ref:s,className:re.mo(yt.g({variant:"tertiary"}),t),...e}));He.displayName=Zt.displayName;const ps=({title:t,description:e,children:s,onConfirm:r,...a})=>{const{t:n}=gt.useTranslation();return O.jsxRuntimeExports.jsxs(Dt,{...a,children:[s&&O.jsxRuntimeExports.jsx(Pt,{children:s}),O.jsxRuntimeExports.jsxs(Be,{children:[O.jsxRuntimeExports.jsxs(Fe,{children:[O.jsxRuntimeExports.jsx(qe,{children:t||n("Are you absolutely sure?")}),O.jsxRuntimeExports.jsx(zt,{children:e||n("This action cannot be undone. This will permanently delete your data from our servers.")})]}),O.jsxRuntimeExports.jsxs(Ue,{children:[O.jsxRuntimeExports.jsx(He,{className:"mt-0",children:n("Cancel")}),O.jsxRuntimeExports.jsx(We,{onClick:r,children:n("Confirm")})]})]})]})},Qe=(t,e,s)=>{if(t&&"reportValidity"in t){const r=G.get(s,e);t.setCustomValidity(r&&r.message||""),t.reportValidity()}},Vt=(t,e)=>{for(const s in e.fields){const r=e.fields[s];r&&r.ref&&"reportValidity"in r.ref?Qe(r.ref,s,t):r&&r.refs&&r.refs.forEach(a=>Qe(a,s,t))}},gs=(t,e)=>{e.shouldUseNativeValidation&&Vt(t,e);const s={};for(const r in t){const a=G.get(e.fields,r),n=Object.assign(t[r]||{},{ref:a&&a.ref});if(ys(e.names||Object.keys(t),r)){const i=Object.assign({},G.get(s,r));G.set(i,"root",n),G.set(s,r,i)}else G.set(s,r,n)}return s},ys=(t,e)=>{const s=Ge(e);return t.some(r=>Ge(r).match(`^${s}\\.\\d+`))};function Ge(t){return t.replace(/\]|\[/g,"")}function vs(t,e){for(var s={};t.length;){var r=t[0],a=r.code,n=r.message,i=r.path.join(".");if(!s[i])if("unionErrors"in r){var o=r.unionErrors[0].errors[0];s[i]={message:o.message,type:o.code}}else s[i]={message:n,type:a};if("unionErrors"in r&&r.unionErrors.forEach(function(f){return f.errors.forEach(function(A){return t.push(A)})}),e){var l=s[i].types,c=l&&l[r.code];s[i]=G.appendErrors(i,e,s,a,c?[].concat(c,r.message):r.message)}t.shift()}return s}function _s(t,e,s){return s===void 0&&(s={}),function(r,a,n){try{return Promise.resolve(function(i,o){try{var l=Promise.resolve(t[s.mode==="sync"?"parse":"parseAsync"](r,e)).then(function(c){return n.shouldUseNativeValidation&&Vt({},n),{errors:{},values:s.raw?Object.assign({},r):c}})}catch(c){return o(c)}return l&&l.then?l.then(void 0,o):l}(0,function(i){if(function(o){return Array.isArray(o==null?void 0:o.errors)}(i))return{values:{},errors:gs(vs(i.errors,!n.shouldUseNativeValidation&&n.criteriaMode==="all"),n)};throw i}))}catch(i){return Promise.reject(i)}}}var w;(function(t){t.assertEqual=a=>{};function e(a){}t.assertIs=e;function s(a){throw new Error}t.assertNever=s,t.arrayToEnum=a=>{const n={};for(const i of a)n[i]=i;return n},t.getValidEnumValues=a=>{const n=t.objectKeys(a).filter(o=>typeof a[a[o]]!="number"),i={};for(const o of n)i[o]=a[o];return t.objectValues(i)},t.objectValues=a=>t.objectKeys(a).map(function(n){return a[n]}),t.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const n=[];for(const i in a)Object.prototype.hasOwnProperty.call(a,i)&&n.push(i);return n},t.find=(a,n)=>{for(const i of a)if(n(i))return i},t.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function r(a,n=" | "){return a.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}t.joinValues=r,t.jsonStringifyReplacer=(a,n)=>typeof n=="bigint"?n.toString():n})(w||(w={}));var Ke;(function(t){t.mergeShapes=(e,s)=>({...e,...s})})(Ke||(Ke={}));const h=w.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Q=t=>{switch(typeof t){case"undefined":return h.undefined;case"string":return h.string;case"number":return Number.isNaN(t)?h.nan:h.number;case"boolean":return h.boolean;case"function":return h.function;case"bigint":return h.bigint;case"symbol":return h.symbol;case"object":return Array.isArray(t)?h.array:t===null?h.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?h.promise:typeof Map<"u"&&t instanceof Map?h.map:typeof Set<"u"&&t instanceof Set?h.set:typeof Date<"u"&&t instanceof Date?h.date:h.object;default:return h.unknown}},d=w.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"]);class H extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const s=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,s):this.__proto__=s,this.name="ZodError",this.issues=e}format(e){const s=e||function(n){return n.message},r={_errors:[]},a=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(a);else if(i.code==="invalid_return_type")a(i.returnTypeError);else if(i.code==="invalid_arguments")a(i.argumentsError);else if(i.path.length===0)r._errors.push(s(i));else{let o=r,l=0;for(;l<i.path.length;){const c=i.path[l];l===i.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(s(i))):o[c]=o[c]||{_errors:[]},o=o[c],l++}}};return a(this),r}static assert(e){if(!(e instanceof H))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,w.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=s=>s.message){const s={},r=[];for(const a of this.issues)a.path.length>0?(s[a.path[0]]=s[a.path[0]]||[],s[a.path[0]].push(e(a))):r.push(e(a));return{formErrors:r,fieldErrors:s}}get formErrors(){return this.flatten()}}H.create=t=>new H(t);const Se=(t,e)=>{let s;switch(t.code){case d.invalid_type:t.received===h.undefined?s="Required":s=`Expected ${t.expected}, received ${t.received}`;break;case d.invalid_literal:s=`Invalid literal value, expected ${JSON.stringify(t.expected,w.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:s=`Unrecognized key(s) in object: ${w.joinValues(t.keys,", ")}`;break;case d.invalid_union:s="Invalid input";break;case d.invalid_union_discriminator:s=`Invalid discriminator value. Expected ${w.joinValues(t.options)}`;break;case d.invalid_enum_value:s=`Invalid enum value. Expected ${w.joinValues(t.options)}, received '${t.received}'`;break;case d.invalid_arguments:s="Invalid function arguments";break;case d.invalid_return_type:s="Invalid function return type";break;case d.invalid_date:s="Invalid date";break;case d.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(s=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(s=`${s} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?s=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?s=`Invalid input: must end with "${t.validation.endsWith}"`:w.assertNever(t.validation):t.validation!=="regex"?s=`Invalid ${t.validation}`:s="Invalid";break;case d.too_small:t.type==="array"?s=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?s=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?s=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?s=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:s="Invalid input";break;case d.too_big:t.type==="array"?s=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?s=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?s=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?s=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?s=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:s="Invalid input";break;case d.custom:s="Invalid input";break;case d.invalid_intersection_types:s="Intersection results could not be merged";break;case d.not_multiple_of:s=`Number must be a multiple of ${t.multipleOf}`;break;case d.not_finite:s="Number must be finite";break;default:s=e.defaultError,w.assertNever(t)}return{message:s}};let xs=Se;function bs(){return xs}const ks=t=>{const{data:e,path:s,errorMaps:r,issueData:a}=t,n=[...s,...a.path||[]],i={...a,path:n};if(a.message!==void 0)return{...a,path:n,message:a.message};let o="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)o=c(i,{data:e,defaultError:o}).message;return{...a,path:n,message:o}};function u(t,e){const s=bs(),r=ks({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,s,s===Se?void 0:Se].filter(a=>!!a)});t.common.issues.push(r)}class V{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,s){const r=[];for(const a of s){if(a.status==="aborted")return v;a.status==="dirty"&&e.dirty(),r.push(a.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,s){const r=[];for(const a of s){const n=await a.key,i=await a.value;r.push({key:n,value:i})}return V.mergeObjectSync(e,r)}static mergeObjectSync(e,s){const r={};for(const a of s){const{key:n,value:i}=a;if(n.status==="aborted"||i.status==="aborted")return v;n.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),n.value!=="__proto__"&&(typeof i.value<"u"||a.alwaysSet)&&(r[n.value]=i.value)}return{status:e.value,value:r}}}const v=Object.freeze({status:"aborted"}),me=t=>({status:"dirty",value:t}),F=t=>({status:"valid",value:t}),et=t=>t.status==="aborted",tt=t=>t.status==="dirty",de=t=>t.status==="valid",we=t=>typeof Promise<"u"&&t instanceof Promise;var m;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(m||(m={}));class te{constructor(e,s,r,a){this._cachedPath=[],this.parent=e,this.data=s,this._path=r,this._key=a}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 st=(t,e)=>{if(de(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const s=new H(t.common.issues);return this._error=s,this._error}}};function x(t){if(!t)return{};const{errorMap:e,invalid_type_error:s,required_error:r,description:a}=t;if(e&&(s||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(i,o)=>{const{message:l}=t;return i.code==="invalid_enum_value"?{message:l??o.defaultError}:typeof o.data>"u"?{message:l??r??o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:l??s??o.defaultError}},description:a}}class k{get description(){return this._def.description}_getType(e){return Q(e.data)}_getOrReturnCtx(e,s){return s||{common:e.parent.common,data:e.data,parsedType:Q(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new V,ctx:{common:e.parent.common,data:e.data,parsedType:Q(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const s=this._parse(e);if(we(s))throw new Error("Synchronous parse encountered promise.");return s}_parseAsync(e){const s=this._parse(e);return Promise.resolve(s)}parse(e,s){const r=this.safeParse(e,s);if(r.success)return r.data;throw r.error}safeParse(e,s){const r={common:{issues:[],async:(s==null?void 0:s.async)??!1,contextualErrorMap:s==null?void 0:s.errorMap},path:(s==null?void 0:s.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Q(e)},a=this._parseSync({data:e,path:r.path,parent:r});return st(r,a)}"~validate"(e){var r,a;const s={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Q(e)};if(!this["~standard"].async)try{const n=this._parseSync({data:e,path:[],parent:s});return de(n)?{value:n.value}:{issues:s.common.issues}}catch(n){(a=(r=n==null?void 0:n.message)==null?void 0:r.toLowerCase())!=null&&a.includes("encountered")&&(this["~standard"].async=!0),s.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:s}).then(n=>de(n)?{value:n.value}:{issues:s.common.issues})}async parseAsync(e,s){const r=await this.safeParseAsync(e,s);if(r.success)return r.data;throw r.error}async safeParseAsync(e,s){const r={common:{issues:[],contextualErrorMap:s==null?void 0:s.errorMap,async:!0},path:(s==null?void 0:s.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Q(e)},a=this._parse({data:e,path:r.path,parent:r}),n=await(we(a)?a:Promise.resolve(a));return st(r,n)}refine(e,s){const r=a=>typeof s=="string"||typeof s>"u"?{message:s}:typeof s=="function"?s(a):s;return this._refinement((a,n)=>{const i=e(a),o=()=>n.addIssue({code:d.custom,...r(a)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,s){return this._refinement((r,a)=>e(r)?!0:(a.addIssue(typeof s=="function"?s(r,a):s),!1))}_refinement(e){return new fe({schema:this,typeName:_.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,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:s=>this["~validate"](s)}}optional(){return ee.create(this,this._def)}nullable(){return he.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return q.create(this)}promise(){return Ne.create(this,this._def)}or(e){return Ee.create([this,e],this._def)}and(e){return Ce.create(this,e,this._def)}transform(e){return new fe({...x(this._def),schema:this,typeName:_.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const s=typeof e=="function"?e:()=>e;return new Le({...x(this._def),innerType:this,defaultValue:s,typeName:_.ZodDefault})}brand(){return new qs({typeName:_.ZodBranded,type:this,...x(this._def)})}catch(e){const s=typeof e=="function"?e:()=>e;return new $e({...x(this._def),innerType:this,catchValue:s,typeName:_.ZodCatch})}describe(e){const s=this.constructor;return new s({...this._def,description:e})}pipe(e){return Ye.create(this,e)}readonly(){return De.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const ws=/^c[^\s-]{8,}$/i,Ts=/^[0-9a-z]+$/,Es=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Cs=/^[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,Ns=/^[a-z0-9_-]{21}$/i,js=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,As=/^[-+]?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)?)??$/,Rs=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Is="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Oe;const Os=/^(?:(?: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])$/,Ss=/^(?:(?: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])$/,Zs=/^(([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]))$/,Ls=/^(([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])$/,$s=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ds=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Bt="((\\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])))",Ps=new RegExp(`^${Bt}$`);function Ft(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const s=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${s}`}function Ms(t){return new RegExp(`^${Ft(t)}$`)}function zs(t){let e=`${Bt}T${Ft(t)}`;const s=[];return s.push(t.local?"Z?":"Z"),t.offset&&s.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${s.join("|")})`,new RegExp(`^${e}$`)}function Vs(t,e){return!!((e==="v4"||!e)&&Os.test(t)||(e==="v6"||!e)&&Zs.test(t))}function Bs(t,e){if(!js.test(t))return!1;try{const[s]=t.split("."),r=s.replace(/-/g,"+").replace(/_/g,"/").padEnd(s.length+(4-s.length%4)%4,"="),a=JSON.parse(atob(r));return!(typeof a!="object"||a===null||"typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function Fs(t,e){return!!((e==="v4"||!e)&&Ss.test(t)||(e==="v6"||!e)&&Ls.test(t))}class K extends k{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==h.string){const n=this._getOrReturnCtx(e);return u(n,{code:d.invalid_type,expected:h.string,received:n.parsedType}),v}const r=new V;let a;for(const n of this._def.checks)if(n.kind==="min")e.data.length<n.value&&(a=this._getOrReturnCtx(e,a),u(a,{code:d.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),r.dirty());else if(n.kind==="max")e.data.length>n.value&&(a=this._getOrReturnCtx(e,a),u(a,{code:d.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),r.dirty());else if(n.kind==="length"){const i=e.data.length>n.value,o=e.data.length<n.value;(i||o)&&(a=this._getOrReturnCtx(e,a),i?u(a,{code:d.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}):o&&u(a,{code:d.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}),r.dirty())}else if(n.kind==="email")Rs.test(e.data)||(a=this._getOrReturnCtx(e,a),u(a,{validation:"email",code:d.invalid_string,message:n.message}),r.dirty());else if(n.kind==="emoji")Oe||(Oe=new RegExp(Is,"u")),Oe.test(e.data)||(a=this._getOrReturnCtx(e,a),u(a,{validation:"emoji",code:d.invalid_string,message:n.message}),r.dirty());else if(n.kind==="uuid")Cs.test(e.data)||(a=this._getOrReturnCtx(e,a),u(a,{validation:"uuid",code:d.invalid_string,message:n.message}),r.dirty());else if(n.kind==="nanoid")Ns.test(e.data)||(a=this._getOrReturnCtx(e,a),u(a,{validation:"nanoid",code:d.invalid_string,message:n.message}),r.dirty());else if(n.kind==="cuid")ws.test(e.data)||(a=this._getOrReturnCtx(e,a),u(a,{validation:"cuid",code:d.invalid_string,message:n.message}),r.dirty());else if(n.kind==="cuid2")Ts.test(e.data)||(a=this._getOrReturnCtx(e,a),u(a,{validation:"cuid2",code:d.invalid_string,message:n.message}),r.dirty());else if(n.kind==="ulid")Es.test(e.data)||(a=this._getOrReturnCtx(e,a),u(a,{validation:"ulid",code:d.invalid_string,message:n.message}),r.dirty());else if(n.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),u(a,{validation:"url",code:d.invalid_string,message:n.message}),r.dirty()}else n.kind==="regex"?(n.regex.lastIndex=0,n.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),u(a,{validation:"regex",code:d.invalid_string,message:n.message}),r.dirty())):n.kind==="trim"?e.data=e.data.trim():n.kind==="includes"?e.data.includes(n.value,n.position)||(a=this._getOrReturnCtx(e,a),u(a,{code:d.invalid_string,validation:{includes:n.value,position:n.position},message:n.message}),r.dirty()):n.kind==="toLowerCase"?e.data=e.data.toLowerCase():n.kind==="toUpperCase"?e.data=e.data.toUpperCase():n.kind==="startsWith"?e.data.startsWith(n.value)||(a=this._getOrReturnCtx(e,a),u(a,{code:d.invalid_string,validation:{startsWith:n.value},message:n.message}),r.dirty()):n.kind==="endsWith"?e.data.endsWith(n.value)||(a=this._getOrReturnCtx(e,a),u(a,{code:d.invalid_string,validation:{endsWith:n.value},message:n.message}),r.dirty()):n.kind==="datetime"?zs(n).test(e.data)||(a=this._getOrReturnCtx(e,a),u(a,{code:d.invalid_string,validation:"datetime",message:n.message}),r.dirty()):n.kind==="date"?Ps.test(e.data)||(a=this._getOrReturnCtx(e,a),u(a,{code:d.invalid_string,validation:"date",message:n.message}),r.dirty()):n.kind==="time"?Ms(n).test(e.data)||(a=this._getOrReturnCtx(e,a),u(a,{code:d.invalid_string,validation:"time",message:n.message}),r.dirty()):n.kind==="duration"?As.test(e.data)||(a=this._getOrReturnCtx(e,a),u(a,{validation:"duration",code:d.invalid_string,message:n.message}),r.dirty()):n.kind==="ip"?Vs(e.data,n.version)||(a=this._getOrReturnCtx(e,a),u(a,{validation:"ip",code:d.invalid_string,message:n.message}),r.dirty()):n.kind==="jwt"?Bs(e.data,n.alg)||(a=this._getOrReturnCtx(e,a),u(a,{validation:"jwt",code:d.invalid_string,message:n.message}),r.dirty()):n.kind==="cidr"?Fs(e.data,n.version)||(a=this._getOrReturnCtx(e,a),u(a,{validation:"cidr",code:d.invalid_string,message:n.message}),r.dirty()):n.kind==="base64"?$s.test(e.data)||(a=this._getOrReturnCtx(e,a),u(a,{validation:"base64",code:d.invalid_string,message:n.message}),r.dirty()):n.kind==="base64url"?Ds.test(e.data)||(a=this._getOrReturnCtx(e,a),u(a,{validation:"base64url",code:d.invalid_string,message:n.message}),r.dirty()):w.assertNever(n);return{status:r.value,value:e.data}}_regex(e,s,r){return this.refinement(a=>e.test(a),{validation:s,code:d.invalid_string,...m.errToObj(r)})}_addCheck(e){return new K({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...m.errToObj(e)})}url(e){return this._addCheck({kind:"url",...m.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...m.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...m.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...m.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...m.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...m.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...m.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...m.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...m.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...m.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...m.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...m.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...m.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...m.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...m.errToObj(e)})}regex(e,s){return this._addCheck({kind:"regex",regex:e,...m.errToObj(s)})}includes(e,s){return this._addCheck({kind:"includes",value:e,position:s==null?void 0:s.position,...m.errToObj(s==null?void 0:s.message)})}startsWith(e,s){return this._addCheck({kind:"startsWith",value:e,...m.errToObj(s)})}endsWith(e,s){return this._addCheck({kind:"endsWith",value:e,...m.errToObj(s)})}min(e,s){return this._addCheck({kind:"min",value:e,...m.errToObj(s)})}max(e,s){return this._addCheck({kind:"max",value:e,...m.errToObj(s)})}length(e,s){return this._addCheck({kind:"length",value:e,...m.errToObj(s)})}nonempty(e){return this.min(1,m.errToObj(e))}trim(){return new K({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new K({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new K({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const s of this._def.checks)s.kind==="min"&&(e===null||s.value>e)&&(e=s.value);return e}get maxLength(){let e=null;for(const s of this._def.checks)s.kind==="max"&&(e===null||s.value<e)&&(e=s.value);return e}}K.create=t=>new K({checks:[],typeName:_.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...x(t)});function Us(t,e){const s=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,a=s>r?s:r,n=Number.parseInt(t.toFixed(a).replace(".","")),i=Number.parseInt(e.toFixed(a).replace(".",""));return n%i/10**a}class pe extends k{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==h.number){const n=this._getOrReturnCtx(e);return u(n,{code:d.invalid_type,expected:h.number,received:n.parsedType}),v}let r;const a=new V;for(const n of this._def.checks)n.kind==="int"?w.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),u(r,{code:d.invalid_type,expected:"integer",received:"float",message:n.message}),a.dirty()):n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(r=this._getOrReturnCtx(e,r),u(r,{code:d.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(r=this._getOrReturnCtx(e,r),u(r,{code:d.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):n.kind==="multipleOf"?Us(e.data,n.value)!==0&&(r=this._getOrReturnCtx(e,r),u(r,{code:d.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):n.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),u(r,{code:d.not_finite,message:n.message}),a.dirty()):w.assertNever(n);return{status:a.value,value:e.data}}gte(e,s){return this.setLimit("min",e,!0,m.toString(s))}gt(e,s){return this.setLimit("min",e,!1,m.toString(s))}lte(e,s){return this.setLimit("max",e,!0,m.toString(s))}lt(e,s){return this.setLimit("max",e,!1,m.toString(s))}setLimit(e,s,r,a){return new pe({...this._def,checks:[...this._def.checks,{kind:e,value:s,inclusive:r,message:m.toString(a)}]})}_addCheck(e){return new pe({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:m.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:m.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:m.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:m.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:m.toString(e)})}multipleOf(e,s){return this._addCheck({kind:"multipleOf",value:e,message:m.toString(s)})}finite(e){return this._addCheck({kind:"finite",message:m.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:m.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:m.toString(e)})}get minValue(){let e=null;for(const s of this._def.checks)s.kind==="min"&&(e===null||s.value>e)&&(e=s.value);return e}get maxValue(){let e=null;for(const s of this._def.checks)s.kind==="max"&&(e===null||s.value<e)&&(e=s.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&w.isInteger(e.value))}get isFinite(){let e=null,s=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(s===null||r.value>s)&&(s=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(s)&&Number.isFinite(e)}}pe.create=t=>new pe({checks:[],typeName:_.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...x(t)});class ge extends k{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==h.bigint)return this._getInvalidInput(e);let r;const a=new V;for(const n of this._def.checks)n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(r=this._getOrReturnCtx(e,r),u(r,{code:d.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(r=this._getOrReturnCtx(e,r),u(r,{code:d.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):n.kind==="multipleOf"?e.data%n.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),u(r,{code:d.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):w.assertNever(n);return{status:a.value,value:e.data}}_getInvalidInput(e){const s=this._getOrReturnCtx(e);return u(s,{code:d.invalid_type,expected:h.bigint,received:s.parsedType}),v}gte(e,s){return this.setLimit("min",e,!0,m.toString(s))}gt(e,s){return this.setLimit("min",e,!1,m.toString(s))}lte(e,s){return this.setLimit("max",e,!0,m.toString(s))}lt(e,s){return this.setLimit("max",e,!1,m.toString(s))}setLimit(e,s,r,a){return new ge({...this._def,checks:[...this._def.checks,{kind:e,value:s,inclusive:r,message:m.toString(a)}]})}_addCheck(e){return new ge({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:m.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:m.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:m.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:m.toString(e)})}multipleOf(e,s){return this._addCheck({kind:"multipleOf",value:e,message:m.toString(s)})}get minValue(){let e=null;for(const s of this._def.checks)s.kind==="min"&&(e===null||s.value>e)&&(e=s.value);return e}get maxValue(){let e=null;for(const s of this._def.checks)s.kind==="max"&&(e===null||s.value<e)&&(e=s.value);return e}}ge.create=t=>new ge({checks:[],typeName:_.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...x(t)});class rt extends k{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==h.boolean){const r=this._getOrReturnCtx(e);return u(r,{code:d.invalid_type,expected:h.boolean,received:r.parsedType}),v}return F(e.data)}}rt.create=t=>new rt({typeName:_.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...x(t)});class Te extends k{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==h.date){const n=this._getOrReturnCtx(e);return u(n,{code:d.invalid_type,expected:h.date,received:n.parsedType}),v}if(Number.isNaN(e.data.getTime())){const n=this._getOrReturnCtx(e);return u(n,{code:d.invalid_date}),v}const r=new V;let a;for(const n of this._def.checks)n.kind==="min"?e.data.getTime()<n.value&&(a=this._getOrReturnCtx(e,a),u(a,{code:d.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),r.dirty()):n.kind==="max"?e.data.getTime()>n.value&&(a=this._getOrReturnCtx(e,a),u(a,{code:d.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),r.dirty()):w.assertNever(n);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Te({...this._def,checks:[...this._def.checks,e]})}min(e,s){return this._addCheck({kind:"min",value:e.getTime(),message:m.toString(s)})}max(e,s){return this._addCheck({kind:"max",value:e.getTime(),message:m.toString(s)})}get minDate(){let e=null;for(const s of this._def.checks)s.kind==="min"&&(e===null||s.value>e)&&(e=s.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const s of this._def.checks)s.kind==="max"&&(e===null||s.value<e)&&(e=s.value);return e!=null?new Date(e):null}}Te.create=t=>new Te({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:_.ZodDate,...x(t)});class at extends k{_parse(e){if(this._getType(e)!==h.symbol){const r=this._getOrReturnCtx(e);return u(r,{code:d.invalid_type,expected:h.symbol,received:r.parsedType}),v}return F(e.data)}}at.create=t=>new at({typeName:_.ZodSymbol,...x(t)});class nt extends k{_parse(e){if(this._getType(e)!==h.undefined){const r=this._getOrReturnCtx(e);return u(r,{code:d.invalid_type,expected:h.undefined,received:r.parsedType}),v}return F(e.data)}}nt.create=t=>new nt({typeName:_.ZodUndefined,...x(t)});class it extends k{_parse(e){if(this._getType(e)!==h.null){const r=this._getOrReturnCtx(e);return u(r,{code:d.invalid_type,expected:h.null,received:r.parsedType}),v}return F(e.data)}}it.create=t=>new it({typeName:_.ZodNull,...x(t)});class ot extends k{constructor(){super(...arguments),this._any=!0}_parse(e){return F(e.data)}}ot.create=t=>new ot({typeName:_.ZodAny,...x(t)});class lt extends k{constructor(){super(...arguments),this._unknown=!0}_parse(e){return F(e.data)}}lt.create=t=>new lt({typeName:_.ZodUnknown,...x(t)});class se extends k{_parse(e){const s=this._getOrReturnCtx(e);return u(s,{code:d.invalid_type,expected:h.never,received:s.parsedType}),v}}se.create=t=>new se({typeName:_.ZodNever,...x(t)});class ct extends k{_parse(e){if(this._getType(e)!==h.undefined){const r=this._getOrReturnCtx(e);return u(r,{code:d.invalid_type,expected:h.void,received:r.parsedType}),v}return F(e.data)}}ct.create=t=>new ct({typeName:_.ZodVoid,...x(t)});class q extends k{_parse(e){const{ctx:s,status:r}=this._processInputParams(e),a=this._def;if(s.parsedType!==h.array)return u(s,{code:d.invalid_type,expected:h.array,received:s.parsedType}),v;if(a.exactLength!==null){const i=s.data.length>a.exactLength.value,o=s.data.length<a.exactLength.value;(i||o)&&(u(s,{code:i?d.too_big:d.too_small,minimum:o?a.exactLength.value:void 0,maximum:i?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(a.minLength!==null&&s.data.length<a.minLength.value&&(u(s,{code:d.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),a.maxLength!==null&&s.data.length>a.maxLength.value&&(u(s,{code:d.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),s.common.async)return Promise.all([...s.data].map((i,o)=>a.type._parseAsync(new te(s,i,s.path,o)))).then(i=>V.mergeArray(r,i));const n=[...s.data].map((i,o)=>a.type._parseSync(new te(s,i,s.path,o)));return V.mergeArray(r,n)}get element(){return this._def.type}min(e,s){return new q({...this._def,minLength:{value:e,message:m.toString(s)}})}max(e,s){return new q({...this._def,maxLength:{value:e,message:m.toString(s)}})}length(e,s){return new q({...this._def,exactLength:{value:e,message:m.toString(s)}})}nonempty(e){return this.min(1,e)}}q.create=(t,e)=>new q({type:t,minLength:null,maxLength:null,exactLength:null,typeName:_.ZodArray,...x(e)});function le(t){if(t instanceof S){const e={};for(const s in t.shape){const r=t.shape[s];e[s]=ee.create(le(r))}return new S({...t._def,shape:()=>e})}else return t instanceof q?new q({...t._def,type:le(t.element)}):t instanceof ee?ee.create(le(t.unwrap())):t instanceof he?he.create(le(t.unwrap())):t instanceof ie?ie.create(t.items.map(e=>le(e))):t}class S extends k{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),s=w.objectKeys(e);return this._cached={shape:e,keys:s},this._cached}_parse(e){if(this._getType(e)!==h.object){const c=this._getOrReturnCtx(e);return u(c,{code:d.invalid_type,expected:h.object,received:c.parsedType}),v}const{status:r,ctx:a}=this._processInputParams(e),{shape:n,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof se&&this._def.unknownKeys==="strip"))for(const c in a.data)i.includes(c)||o.push(c);const l=[];for(const c of i){const f=n[c],A=a.data[c];l.push({key:{status:"valid",value:c},value:f._parse(new te(a,A,a.path,c)),alwaysSet:c in a.data})}if(this._def.catchall instanceof se){const c=this._def.unknownKeys;if(c==="passthrough")for(const f of o)l.push({key:{status:"valid",value:f},value:{status:"valid",value:a.data[f]}});else if(c==="strict")o.length>0&&(u(a,{code:d.unrecognized_keys,keys:o}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const f of o){const A=a.data[f];l.push({key:{status:"valid",value:f},value:c._parse(new te(a,A,a.path,f)),alwaysSet:f in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const c=[];for(const f of l){const A=await f.key,L=await f.value;c.push({key:A,value:L,alwaysSet:f.alwaysSet})}return c}).then(c=>V.mergeObjectSync(r,c)):V.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(e){return m.errToObj,new S({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(s,r)=>{var n,i;const a=((i=(n=this._def).errorMap)==null?void 0:i.call(n,s,r).message)??r.defaultError;return s.code==="unrecognized_keys"?{message:m.errToObj(e).message??a}:{message:a}}}:{}})}strip(){return new S({...this._def,unknownKeys:"strip"})}passthrough(){return new S({...this._def,unknownKeys:"passthrough"})}extend(e){return new S({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new S({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:_.ZodObject})}setKey(e,s){return this.augment({[e]:s})}catchall(e){return new S({...this._def,catchall:e})}pick(e){const s={};for(const r of w.objectKeys(e))e[r]&&this.shape[r]&&(s[r]=this.shape[r]);return new S({...this._def,shape:()=>s})}omit(e){const s={};for(const r of w.objectKeys(this.shape))e[r]||(s[r]=this.shape[r]);return new S({...this._def,shape:()=>s})}deepPartial(){return le(this)}partial(e){const s={};for(const r of w.objectKeys(this.shape)){const a=this.shape[r];e&&!e[r]?s[r]=a:s[r]=a.optional()}return new S({...this._def,shape:()=>s})}required(e){const s={};for(const r of w.objectKeys(this.shape))if(e&&!e[r])s[r]=this.shape[r];else{let n=this.shape[r];for(;n instanceof ee;)n=n._def.innerType;s[r]=n}return new S({...this._def,shape:()=>s})}keyof(){return Ut(w.objectKeys(this.shape))}}S.create=(t,e)=>new S({shape:()=>t,unknownKeys:"strip",catchall:se.create(),typeName:_.ZodObject,...x(e)});S.strictCreate=(t,e)=>new S({shape:()=>t,unknownKeys:"strict",catchall:se.create(),typeName:_.ZodObject,...x(e)});S.lazycreate=(t,e)=>new S({shape:t,unknownKeys:"strip",catchall:se.create(),typeName:_.ZodObject,...x(e)});class Ee extends k{_parse(e){const{ctx:s}=this._processInputParams(e),r=this._def.options;function a(n){for(const o of n)if(o.result.status==="valid")return o.result;for(const o of n)if(o.result.status==="dirty")return s.common.issues.push(...o.ctx.common.issues),o.result;const i=n.map(o=>new H(o.ctx.common.issues));return u(s,{code:d.invalid_union,unionErrors:i}),v}if(s.common.async)return Promise.all(r.map(async n=>{const i={...s,common:{...s.common,issues:[]},parent:null};return{result:await n._parseAsync({data:s.data,path:s.path,parent:i}),ctx:i}})).then(a);{let n;const i=[];for(const l of r){const c={...s,common:{...s.common,issues:[]},parent:null},f=l._parseSync({data:s.data,path:s.path,parent:c});if(f.status==="valid")return f;f.status==="dirty"&&!n&&(n={result:f,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(n)return s.common.issues.push(...n.ctx.common.issues),n.result;const o=i.map(l=>new H(l));return u(s,{code:d.invalid_union,unionErrors:o}),v}}get options(){return this._def.options}}Ee.create=(t,e)=>new Ee({options:t,typeName:_.ZodUnion,...x(e)});function Ze(t,e){const s=Q(t),r=Q(e);if(t===e)return{valid:!0,data:t};if(s===h.object&&r===h.object){const a=w.objectKeys(e),n=w.objectKeys(t).filter(o=>a.indexOf(o)!==-1),i={...t,...e};for(const o of n){const l=Ze(t[o],e[o]);if(!l.valid)return{valid:!1};i[o]=l.data}return{valid:!0,data:i}}else if(s===h.array&&r===h.array){if(t.length!==e.length)return{valid:!1};const a=[];for(let n=0;n<t.length;n++){const i=t[n],o=e[n],l=Ze(i,o);if(!l.valid)return{valid:!1};a.push(l.data)}return{valid:!0,data:a}}else return s===h.date&&r===h.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class Ce extends k{_parse(e){const{status:s,ctx:r}=this._processInputParams(e),a=(n,i)=>{if(et(n)||et(i))return v;const o=Ze(n.value,i.value);return o.valid?((tt(n)||tt(i))&&s.dirty(),{status:s.value,value:o.data}):(u(r,{code:d.invalid_intersection_types}),v)};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(([n,i])=>a(n,i)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Ce.create=(t,e,s)=>new Ce({left:t,right:e,typeName:_.ZodIntersection,...x(s)});class ie extends k{_parse(e){const{status:s,ctx:r}=this._processInputParams(e);if(r.parsedType!==h.array)return u(r,{code:d.invalid_type,expected:h.array,received:r.parsedType}),v;if(r.data.length<this._def.items.length)return u(r,{code:d.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),v;!this._def.rest&&r.data.length>this._def.items.length&&(u(r,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),s.dirty());const n=[...r.data].map((i,o)=>{const l=this._def.items[o]||this._def.rest;return l?l._parse(new te(r,i,r.path,o)):null}).filter(i=>!!i);return r.common.async?Promise.all(n).then(i=>V.mergeArray(s,i)):V.mergeArray(s,n)}get items(){return this._def.items}rest(e){return new ie({...this._def,rest:e})}}ie.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ie({items:t,typeName:_.ZodTuple,rest:null,...x(e)})};class dt extends k{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:s,ctx:r}=this._processInputParams(e);if(r.parsedType!==h.map)return u(r,{code:d.invalid_type,expected:h.map,received:r.parsedType}),v;const a=this._def.keyType,n=this._def.valueType,i=[...r.data.entries()].map(([o,l],c)=>({key:a._parse(new te(r,o,r.path,[c,"key"])),value:n._parse(new te(r,l,r.path,[c,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const l of i){const c=await l.key,f=await l.value;if(c.status==="aborted"||f.status==="aborted")return v;(c.status==="dirty"||f.status==="dirty")&&s.dirty(),o.set(c.value,f.value)}return{status:s.value,value:o}})}else{const o=new Map;for(const l of i){const c=l.key,f=l.value;if(c.status==="aborted"||f.status==="aborted")return v;(c.status==="dirty"||f.status==="dirty")&&s.dirty(),o.set(c.value,f.value)}return{status:s.value,value:o}}}}dt.create=(t,e,s)=>new dt({valueType:e,keyType:t,typeName:_.ZodMap,...x(s)});class ye extends k{_parse(e){const{status:s,ctx:r}=this._processInputParams(e);if(r.parsedType!==h.set)return u(r,{code:d.invalid_type,expected:h.set,received:r.parsedType}),v;const a=this._def;a.minSize!==null&&r.data.size<a.minSize.value&&(u(r,{code:d.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),s.dirty()),a.maxSize!==null&&r.data.size>a.maxSize.value&&(u(r,{code:d.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),s.dirty());const n=this._def.valueType;function i(l){const c=new Set;for(const f of l){if(f.status==="aborted")return v;f.status==="dirty"&&s.dirty(),c.add(f.value)}return{status:s.value,value:c}}const o=[...r.data.values()].map((l,c)=>n._parse(new te(r,l,r.path,c)));return r.common.async?Promise.all(o).then(l=>i(l)):i(o)}min(e,s){return new ye({...this._def,minSize:{value:e,message:m.toString(s)}})}max(e,s){return new ye({...this._def,maxSize:{value:e,message:m.toString(s)}})}size(e,s){return this.min(e,s).max(e,s)}nonempty(e){return this.min(1,e)}}ye.create=(t,e)=>new ye({valueType:t,minSize:null,maxSize:null,typeName:_.ZodSet,...x(e)});class ut extends k{get schema(){return this._def.getter()}_parse(e){const{ctx:s}=this._processInputParams(e);return this._def.getter()._parse({data:s.data,path:s.path,parent:s})}}ut.create=(t,e)=>new ut({getter:t,typeName:_.ZodLazy,...x(e)});class ft extends k{_parse(e){if(e.data!==this._def.value){const s=this._getOrReturnCtx(e);return u(s,{received:s.data,code:d.invalid_literal,expected:this._def.value}),v}return{status:"valid",value:e.data}}get value(){return this._def.value}}ft.create=(t,e)=>new ft({value:t,typeName:_.ZodLiteral,...x(e)});function Ut(t,e){return new ue({values:t,typeName:_.ZodEnum,...x(e)})}class ue extends k{_parse(e){if(typeof e.data!="string"){const s=this._getOrReturnCtx(e),r=this._def.values;return u(s,{expected:w.joinValues(r),received:s.parsedType,code:d.invalid_type}),v}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const s=this._getOrReturnCtx(e),r=this._def.values;return u(s,{received:s.data,code:d.invalid_enum_value,options:r}),v}return F(e.data)}get options(){return this._def.values}get enum(){const e={};for(const s of this._def.values)e[s]=s;return e}get Values(){const e={};for(const s of this._def.values)e[s]=s;return e}get Enum(){const e={};for(const s of this._def.values)e[s]=s;return e}extract(e,s=this._def){return ue.create(e,{...this._def,...s})}exclude(e,s=this._def){return ue.create(this.options.filter(r=>!e.includes(r)),{...this._def,...s})}}ue.create=Ut;class ht extends k{_parse(e){const s=w.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==h.string&&r.parsedType!==h.number){const a=w.objectValues(s);return u(r,{expected:w.joinValues(a),received:r.parsedType,code:d.invalid_type}),v}if(this._cache||(this._cache=new Set(w.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const a=w.objectValues(s);return u(r,{received:r.data,code:d.invalid_enum_value,options:a}),v}return F(e.data)}get enum(){return this._def.values}}ht.create=(t,e)=>new ht({values:t,typeName:_.ZodNativeEnum,...x(e)});class Ne extends k{unwrap(){return this._def.type}_parse(e){const{ctx:s}=this._processInputParams(e);if(s.parsedType!==h.promise&&s.common.async===!1)return u(s,{code:d.invalid_type,expected:h.promise,received:s.parsedType}),v;const r=s.parsedType===h.promise?s.data:Promise.resolve(s.data);return F(r.then(a=>this._def.type.parseAsync(a,{path:s.path,errorMap:s.common.contextualErrorMap})))}}Ne.create=(t,e)=>new Ne({type:t,typeName:_.ZodPromise,...x(e)});class fe extends k{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===_.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:s,ctx:r}=this._processInputParams(e),a=this._def.effect||null,n={addIssue:i=>{u(r,i),i.fatal?s.abort():s.dirty()},get path(){return r.path}};if(n.addIssue=n.addIssue.bind(n),a.type==="preprocess"){const i=a.transform(r.data,n);if(r.common.async)return Promise.resolve(i).then(async o=>{if(s.value==="aborted")return v;const l=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return l.status==="aborted"?v:l.status==="dirty"||s.value==="dirty"?me(l.value):l});{if(s.value==="aborted")return v;const o=this._def.schema._parseSync({data:i,path:r.path,parent:r});return o.status==="aborted"?v:o.status==="dirty"||s.value==="dirty"?me(o.value):o}}if(a.type==="refinement"){const i=o=>{const l=a.refinement(o,n);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 o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?v:(o.status==="dirty"&&s.dirty(),i(o.value),{status:s.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?v:(o.status==="dirty"&&s.dirty(),i(o.value).then(()=>({status:s.value,value:o.value}))))}if(a.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!de(i))return v;const o=a.transform(i.value,n);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:s.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>de(i)?Promise.resolve(a.transform(i.value,n)).then(o=>({status:s.value,value:o})):v);w.assertNever(a)}}fe.create=(t,e,s)=>new fe({schema:t,typeName:_.ZodEffects,effect:e,...x(s)});fe.createWithPreprocess=(t,e,s)=>new fe({schema:e,effect:{type:"preprocess",transform:t},typeName:_.ZodEffects,...x(s)});class ee extends k{_parse(e){return this._getType(e)===h.undefined?F(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ee.create=(t,e)=>new ee({innerType:t,typeName:_.ZodOptional,...x(e)});class he extends k{_parse(e){return this._getType(e)===h.null?F(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}he.create=(t,e)=>new he({innerType:t,typeName:_.ZodNullable,...x(e)});class Le extends k{_parse(e){const{ctx:s}=this._processInputParams(e);let r=s.data;return s.parsedType===h.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:s.path,parent:s})}removeDefault(){return this._def.innerType}}Le.create=(t,e)=>new Le({innerType:t,typeName:_.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...x(e)});class $e extends k{_parse(e){const{ctx:s}=this._processInputParams(e),r={...s,common:{...s.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return we(a)?a.then(n=>({status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new H(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new H(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}$e.create=(t,e)=>new $e({innerType:t,typeName:_.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...x(e)});class mt extends k{_parse(e){if(this._getType(e)!==h.nan){const r=this._getOrReturnCtx(e);return u(r,{code:d.invalid_type,expected:h.nan,received:r.parsedType}),v}return{status:"valid",value:e.data}}}mt.create=t=>new mt({typeName:_.ZodNaN,...x(t)});class qs extends k{_parse(e){const{ctx:s}=this._processInputParams(e),r=s.data;return this._def.type._parse({data:r,path:s.path,parent:s})}unwrap(){return this._def.type}}class Ye extends k{_parse(e){const{status:s,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const n=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return n.status==="aborted"?v:n.status==="dirty"?(s.dirty(),me(n.value)):this._def.out._parseAsync({data:n.value,path:r.path,parent:r})})();{const a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?v:a.status==="dirty"?(s.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(e,s){return new Ye({in:e,out:s,typeName:_.ZodPipeline})}}class De extends k{_parse(e){const s=this._def.innerType._parse(e),r=a=>(de(a)&&(a.value=Object.freeze(a.value)),a);return we(s)?s.then(a=>r(a)):r(s)}unwrap(){return this._def.innerType}}De.create=(t,e)=>new De({innerType:t,typeName:_.ZodReadonly,...x(e)});var _;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(_||(_={}));const Ws=K.create;se.create;q.create;const Hs=S.create;Ee.create;Ce.create;ie.create;ue.create;Ne.create;ee.create;he.create;const Ys=t=>Hs({password:Ws().nonempty(t("required",{field:t("Password"),ns:"validation"}))}),Xs=({title:t,description:e,children:s,onSubmit:r,...a})=>{const{t:n}=gt.useTranslation(),i=p.useMemo(()=>Ys(n),[n]),o=G.useForm({resolver:_s(i),defaultValues:{password:""}});return O.jsxRuntimeExports.jsxs(Dt,{...a,children:[s&&O.jsxRuntimeExports.jsx(Pt,{children:s}),O.jsxRuntimeExports.jsx(Be,{children:O.jsxRuntimeExports.jsx(Kt.Gx,{...o,children:O.jsxRuntimeExports.jsxs("form",{onSubmit:o.handleSubmit(r),className:"space-y-3",children:[O.jsxRuntimeExports.jsxs(Fe,{children:[O.jsxRuntimeExports.jsx(qe,{children:t||n("Confirm your password")}),O.jsxRuntimeExports.jsxs("div",{className:"text-secondary text-body-sm-medium space-y-3",children:[e||n("Enter your account password to complete this action"),O.jsxRuntimeExports.jsx(es.MyInput,{required:!0,type:"password",control:o.control,name:"password",placeholder:n("Password")})]})]}),O.jsxRuntimeExports.jsxs(Ue,{children:[O.jsxRuntimeExports.jsx(He,{type:"reset",onClick:()=>o.reset(),children:n("Cancel")}),O.jsxRuntimeExports.jsx(We,{type:"submit",children:n("Confirm")})]})]})})})]})};function qt(t){var e,s,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(e=0;e<a;e++)t[e]&&(s=qt(t[e]))&&(r&&(r+=" "),r+=s)}else for(s in t)t[s]&&(r&&(r+=" "),r+=s);return r}function ne(){for(var t,e,s=0,r="",a=arguments.length;s<a;s++)(t=arguments[s])&&(e=qt(t))&&(r&&(r+=" "),r+=e);return r}var _e=t=>typeof t=="number"&&!isNaN(t),oe=t=>typeof t=="string",Y=t=>typeof t=="function",Js=t=>oe(t)||_e(t),Pe=t=>oe(t)||Y(t)?t:null,Qs=(t,e)=>t===!1||_e(t)&&t>0?t:e,Me=t=>p.isValidElement(t)||oe(t)||Y(t)||_e(t);function Gs(t,e,s=300){let{scrollHeight:r,style:a}=t;requestAnimationFrame(()=>{a.minHeight="initial",a.height=r+"px",a.transition=`all ${s}ms`,requestAnimationFrame(()=>{a.height="0",a.padding="0",a.margin="0",setTimeout(e,s)})})}function Ks({enter:t,exit:e,appendPosition:s=!1,collapse:r=!0,collapseDuration:a=300}){return function({children:n,position:i,preventExitTransition:o,done:l,nodeRef:c,isIn:f,playToast:A}){let L=s?`${t}--${i}`:t,$=s?`${e}--${i}`:e,M=p.useRef(0);return p.useLayoutEffect(()=>{let I=c.current,C=L.split(" "),E=g=>{g.target===c.current&&(A(),I.removeEventListener("animationend",E),I.removeEventListener("animationcancel",E),M.current===0&&g.type!=="animationcancel"&&I.classList.remove(...C))};I.classList.add(...C),I.addEventListener("animationend",E),I.addEventListener("animationcancel",E)},[]),p.useEffect(()=>{let I=c.current,C=()=>{I.removeEventListener("animationend",C),r?Gs(I,l,a):l()};f||(o?C():(M.current=1,I.className+=` ${$}`,I.addEventListener("animationend",C)))},[f]),p.createElement(p.Fragment,null,n)}}function pt(t,e){return{content:Wt(t.content,t.props),containerId:t.props.containerId,id:t.props.toastId,theme:t.props.theme,type:t.props.type,data:t.props.data||{},isLoading:t.props.isLoading,icon:t.props.icon,reason:t.removalReason,status:e}}function Wt(t,e,s=!1){return p.isValidElement(t)&&!oe(t.type)?p.cloneElement(t,{closeToast:e.closeToast,toastProps:e,data:e.data,isPaused:s}):Y(t)?t({closeToast:e.closeToast,toastProps:e,data:e.data,isPaused:s}):t}function er({closeToast:t,theme:e,ariaLabel:s="close"}){return p.createElement("button",{className:`Toastify__close-button Toastify__close-button--${e}`,type:"button",onClick:r=>{r.stopPropagation(),t(!0)},"aria-label":s},p.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},p.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function tr({delay:t,isRunning:e,closeToast:s,type:r="default",hide:a,className:n,controlledProgress:i,progress:o,rtl:l,isIn:c,theme:f}){let A=a||i&&o===0,L={animationDuration:`${t}ms`,animationPlayState:e?"running":"paused"};i&&(L.transform=`scaleX(${o})`);let $=ne("Toastify__progress-bar",i?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${f}`,`Toastify__progress-bar--${r}`,{"Toastify__progress-bar--rtl":l}),M=Y(n)?n({rtl:l,type:r,defaultClassName:$}):ne($,n),I={[i&&o>=1?"onTransitionEnd":"onAnimationEnd"]:i&&o<1?null:()=>{c&&s()}};return p.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":A},p.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${f} Toastify__progress-bar--${r}`}),p.createElement("div",{role:"progressbar","aria-hidden":A?"true":"false","aria-label":"notification timer",className:M,style:L,...I}))}var sr=1,Ht=()=>`${sr++}`;function rr(t,e,s){let r=1,a=0,n=[],i=[],o=e,l=new Map,c=new Set,f=g=>(c.add(g),()=>c.delete(g)),A=()=>{i=Array.from(l.values()),c.forEach(g=>g())},L=({containerId:g,toastId:y,updateId:b})=>{let Z=g?g!==t:t!==1,z=l.has(y)&&b==null;return Z||z},$=(g,y)=>{l.forEach(b=>{var Z;(y==null||y===b.props.toastId)&&((Z=b.toggle)==null||Z.call(b,g))})},M=g=>{var y,b;(b=(y=g.props)==null?void 0:y.onClose)==null||b.call(y,g.removalReason),g.isActive=!1},I=g=>{if(g==null)l.forEach(M);else{let y=l.get(g);y&&M(y)}A()},C=()=>{a-=n.length,n=[]},E=g=>{var y,b;let{toastId:Z,updateId:z}=g.props,T=z==null;g.staleId&&l.delete(g.staleId),g.isActive=!0,l.set(Z,g),A(),s(pt(g,T?"added":"updated")),T&&((b=(y=g.props).onOpen)==null||b.call(y))};return{id:t,props:o,observe:f,toggle:$,removeToast:I,toasts:l,clearQueue:C,buildToast:(g,y)=>{if(L(y))return;let{toastId:b,updateId:Z,data:z,staleId:T,delay:R}=y,U=Z==null;U&&a++;let J={...o,style:o.toastStyle,key:r++,...Object.fromEntries(Object.entries(y).filter(([ae,be])=>be!=null)),toastId:b,updateId:Z,data:z,isIn:!1,className:Pe(y.className||o.toastClassName),progressClassName:Pe(y.progressClassName||o.progressClassName),autoClose:y.isLoading?!1:Qs(y.autoClose,o.autoClose),closeToast(ae){l.get(b).removalReason=ae,I(b)},deleteToast(){let ae=l.get(b);if(ae!=null){if(s(pt(ae,"removed")),l.delete(b),a--,a<0&&(a=0),n.length>0){E(n.shift());return}A()}}};J.closeButton=o.closeButton,y.closeButton===!1||Me(y.closeButton)?J.closeButton=y.closeButton:y.closeButton===!0&&(J.closeButton=Me(o.closeButton)?o.closeButton:!0);let W={content:g,props:J,staleId:T};o.limit&&o.limit>0&&a>o.limit&&U?n.push(W):_e(R)?setTimeout(()=>{E(W)},R):E(W)},setProps(g){o=g},setToggle:(g,y)=>{let b=l.get(g);b&&(b.toggle=y)},isToastActive:g=>{var y;return(y=l.get(g))==null?void 0:y.isActive},getSnapshot:()=>i}}var P=new Map,ve=[],ze=new Set,ar=t=>ze.forEach(e=>e(t)),Yt=()=>P.size>0;function nr(){ve.forEach(t=>Jt(t.content,t.options)),ve=[]}var ir=(t,{containerId:e})=>{var s;return(s=P.get(e||1))==null?void 0:s.toasts.get(t)};function Xt(t,e){var s;if(e)return!!((s=P.get(e))!=null&&s.isToastActive(t));let r=!1;return P.forEach(a=>{a.isToastActive(t)&&(r=!0)}),r}function or(t){if(!Yt()){ve=ve.filter(e=>t!=null&&e.options.toastId!==t);return}if(t==null||Js(t))P.forEach(e=>{e.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){let e=P.get(t.containerId);e?e.removeToast(t.id):P.forEach(s=>{s.removeToast(t.id)})}}var lr=(t={})=>{P.forEach(e=>{e.props.limit&&(!t.containerId||e.id===t.containerId)&&e.clearQueue()})};function Jt(t,e){Me(t)&&(Yt()||ve.push({content:t,options:e}),P.forEach(s=>{s.buildToast(t,e)}))}function cr(t){var e;(e=P.get(t.containerId||1))==null||e.setToggle(t.id,t.fn)}function Qt(t,e){P.forEach(s=>{(e==null||!(e!=null&&e.containerId)||(e==null?void 0:e.containerId)===s.id)&&s.toggle(t,e==null?void 0:e.id)})}function dr(t){let e=t.containerId||1;return{subscribe(s){let r=rr(e,t,ar);P.set(e,r);let a=r.observe(s);return nr(),()=>{a(),P.delete(e)}},setProps(s){var r;(r=P.get(e))==null||r.setProps(s)},getSnapshot(){var s;return(s=P.get(e))==null?void 0:s.getSnapshot()}}}function ur(t){return ze.add(t),()=>{ze.delete(t)}}function fr(t){return t&&(oe(t.toastId)||_e(t.toastId))?t.toastId:Ht()}function xe(t,e){return Jt(t,e),e.toastId}function je(t,e){return{...e,type:e&&e.type||t,toastId:fr(e)}}function Ae(t){return(e,s)=>xe(e,je(t,s))}function j(t,e){return xe(t,je("default",e))}j.loading=(t,e)=>xe(t,je("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...e}));function hr(t,{pending:e,error:s,success:r},a){let n;e&&(n=oe(e)?j.loading(e,a):j.loading(e.render,{...a,...e}));let i={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},o=(c,f,A)=>{if(f==null){j.dismiss(n);return}let L={type:c,...i,...a,data:A},$=oe(f)?{render:f}:f;return n?j.update(n,{...L,...$}):j($.render,{...L,...$}),A},l=Y(t)?t():t;return l.then(c=>o("success",r,c)).catch(c=>o("error",s,c)),l}j.promise=hr;j.success=Ae("success");j.info=Ae("info");j.error=Ae("error");j.warning=Ae("warning");j.warn=j.warning;j.dark=(t,e)=>xe(t,je("default",{theme:"dark",...e}));function mr(t){or(t)}j.dismiss=mr;j.clearWaitingQueue=lr;j.isActive=Xt;j.update=(t,e={})=>{let s=ir(t,e);if(s){let{props:r,content:a}=s,n={delay:100,...r,...e,toastId:e.toastId||t,updateId:Ht()};n.toastId!==t&&(n.staleId=t);let i=n.render||a;delete n.render,xe(i,n)}};j.done=t=>{j.update(t,{progress:1})};j.onChange=ur;j.play=t=>Qt(!0,t);j.pause=t=>Qt(!1,t);function pr(t){var e;let{subscribe:s,getSnapshot:r,setProps:a}=p.useRef(dr(t)).current;a(t);let n=(e=p.useSyncExternalStore(s,r,r))==null?void 0:e.slice();function i(o){if(!n)return[];let l=new Map;return t.newestOnTop&&n.reverse(),n.forEach(c=>{let{position:f}=c.props;l.has(f)||l.set(f,[]),l.get(f).push(c)}),Array.from(l,c=>o(c[0],c[1]))}return{getToastToRender:i,isToastActive:Xt,count:n==null?void 0:n.length}}function gr(t){let[e,s]=p.useState(!1),[r,a]=p.useState(!1),n=p.useRef(null),i=p.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:o,pauseOnHover:l,closeToast:c,onClick:f,closeOnClick:A}=t;cr({id:t.toastId,containerId:t.containerId,fn:s}),p.useEffect(()=>{if(t.pauseOnFocusLoss)return L(),()=>{$()}},[t.pauseOnFocusLoss]);function L(){document.hasFocus()||E(),window.addEventListener("focus",C),window.addEventListener("blur",E)}function $(){window.removeEventListener("focus",C),window.removeEventListener("blur",E)}function M(T){if(t.draggable===!0||t.draggable===T.pointerType){g();let R=n.current;i.canCloseOnClick=!0,i.canDrag=!0,R.style.transition="none",t.draggableDirection==="x"?(i.start=T.clientX,i.removalDistance=R.offsetWidth*(t.draggablePercent/100)):(i.start=T.clientY,i.removalDistance=R.offsetHeight*(t.draggablePercent===80?t.draggablePercent*1.5:t.draggablePercent)/100)}}function I(T){let{top:R,bottom:U,left:J,right:W}=n.current.getBoundingClientRect();T.nativeEvent.type!=="touchend"&&t.pauseOnHover&&T.clientX>=J&&T.clientX<=W&&T.clientY>=R&&T.clientY<=U?E():C()}function C(){s(!0)}function E(){s(!1)}function g(){i.didMove=!1,document.addEventListener("pointermove",b),document.addEventListener("pointerup",Z)}function y(){document.removeEventListener("pointermove",b),document.removeEventListener("pointerup",Z)}function b(T){let R=n.current;if(i.canDrag&&R){i.didMove=!0,e&&E(),t.draggableDirection==="x"?i.delta=T.clientX-i.start:i.delta=T.clientY-i.start,i.start!==T.clientX&&(i.canCloseOnClick=!1);let U=t.draggableDirection==="x"?`${i.delta}px, var(--y)`:`0, calc(${i.delta}px + var(--y))`;R.style.transform=`translate3d(${U},0)`,R.style.opacity=`${1-Math.abs(i.delta/i.removalDistance)}`}}function Z(){y();let T=n.current;if(i.canDrag&&i.didMove&&T){if(i.canDrag=!1,Math.abs(i.delta)>i.removalDistance){a(!0),t.closeToast(!0),t.collapseAll();return}T.style.transition="transform 0.2s, opacity 0.2s",T.style.removeProperty("transform"),T.style.removeProperty("opacity")}}let z={onPointerDown:M,onPointerUp:I};return o&&l&&(z.onMouseEnter=E,t.stacked||(z.onMouseLeave=C)),A&&(z.onClick=T=>{f&&f(T),i.canCloseOnClick&&c(!0)}),{playToast:C,pauseToast:E,isRunning:e,preventExitTransition:r,toastRef:n,eventHandlers:z}}var yr=typeof window<"u"?p.useLayoutEffect:p.useEffect,Re=({theme:t,type:e,isLoading:s,...r})=>p.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${e})`,...r});function vr(t){return p.createElement(Re,{...t},p.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))}function _r(t){return p.createElement(Re,{...t},p.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))}function xr(t){return p.createElement(Re,{...t},p.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))}function br(t){return p.createElement(Re,{...t},p.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))}function kr(){return p.createElement("div",{className:"Toastify__spinner"})}var Ve={info:_r,warning:vr,success:xr,error:br,spinner:kr},wr=t=>t in Ve;function Tr({theme:t,type:e,isLoading:s,icon:r}){let a=null,n={theme:t,type:e};return r===!1||(Y(r)?a=r({...n,isLoading:s}):p.isValidElement(r)?a=p.cloneElement(r,n):s?a=Ve.spinner():wr(e)&&(a=Ve[e](n))),a}var Er=t=>{let{isRunning:e,preventExitTransition:s,toastRef:r,eventHandlers:a,playToast:n}=gr(t),{closeButton:i,children:o,autoClose:l,onClick:c,type:f,hideProgressBar:A,closeToast:L,transition:$,position:M,className:I,style:C,progressClassName:E,updateId:g,role:y,progress:b,rtl:Z,toastId:z,deleteToast:T,isIn:R,isLoading:U,closeOnClick:J,theme:W,ariaLabel:ae}=t,be=ne("Toastify__toast",`Toastify__toast-theme--${W}`,`Toastify__toast--${f}`,{"Toastify__toast--rtl":Z},{"Toastify__toast--close-on-click":J}),Gt=Y(I)?I({rtl:Z,position:M,type:f,defaultClassName:be}):ne(be,I),Xe=Tr(t),Je=!!b||!l,Ie={closeToast:L,type:f,theme:W},ke=null;return i===!1||(Y(i)?ke=i(Ie):p.isValidElement(i)?ke=p.cloneElement(i,Ie):ke=er(Ie)),p.createElement($,{isIn:R,done:T,position:M,preventExitTransition:s,nodeRef:r,playToast:n},p.createElement("div",{id:z,tabIndex:0,onClick:c,"data-in":R,className:Gt,...a,style:C,ref:r,...R&&{role:y,"aria-label":ae}},Xe!=null&&p.createElement("div",{className:ne("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!U})},Xe),Wt(o,t,!e),ke,!t.customProgressBar&&p.createElement(tr,{...g&&!Je?{key:`p-${g}`}:{},rtl:Z,theme:W,delay:l,isRunning:e,isIn:R,closeToast:L,hide:A,type:f,className:E,controlledProgress:Je,progress:b||0})))},Cr=(t,e=!1)=>({enter:`Toastify--animate Toastify__${t}-enter`,exit:`Toastify--animate Toastify__${t}-exit`,appendPosition:e}),Nr=Ks(Cr("bounce",!0)),jr={position:"top-right",transition:Nr,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light","aria-label":"Notifications Alt+T",hotKeys:t=>t.altKey&&t.code==="KeyT"};function Ar(t){let e={...jr,...t},s=t.stacked,[r,a]=p.useState(!0),n=p.useRef(null),{getToastToRender:i,isToastActive:o,count:l}=pr(e),{className:c,style:f,rtl:A,containerId:L,hotKeys:$}=e;function M(C){let E=ne("Toastify__toast-container",`Toastify__toast-container--${C}`,{"Toastify__toast-container--rtl":A});return Y(c)?c({position:C,rtl:A,defaultClassName:E}):ne(E,Pe(c))}function I(){s&&(a(!0),j.play())}return yr(()=>{var C;if(s){let E=n.current.querySelectorAll('[data-in="true"]'),g=12,y=(C=e.position)==null?void 0:C.includes("top"),b=0,Z=0;Array.from(E).reverse().forEach((z,T)=>{let R=z;R.classList.add("Toastify__toast--stacked"),T>0&&(R.dataset.collapsed=`${r}`),R.dataset.pos||(R.dataset.pos=y?"top":"bot");let U=b*(r?.2:1)+(r?0:g*T);R.style.setProperty("--y",`${y?U:U*-1}px`),R.style.setProperty("--g",`${g}`),R.style.setProperty("--s",`${1-(r?Z:0)}`),b+=R.offsetHeight,Z+=.025})}},[r,l,s]),p.useEffect(()=>{function C(E){var g;let y=n.current;$(E)&&((g=y.querySelector('[tabIndex="0"]'))==null||g.focus(),a(!1),j.pause()),E.key==="Escape"&&(document.activeElement===y||y!=null&&y.contains(document.activeElement))&&(a(!0),j.play())}return document.addEventListener("keydown",C),()=>{document.removeEventListener("keydown",C)}},[$]),p.createElement("section",{ref:n,className:"Toastify",id:L,onMouseEnter:()=>{s&&(a(!1),j.pause())},onMouseLeave:I,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text","aria-label":e["aria-label"]},i((C,E)=>{let g=E.length?{...f}:{...f,pointerEvents:"none"};return p.createElement("div",{tabIndex:-1,className:M(C),"data-stacked":s,style:g,key:`c-${C}`},E.map(({content:y,props:b})=>p.createElement(Er,{...b,stacked:s,collapseAll:I,isIn:o(b.toastId,b.containerId),key:`t-${b.key}`},y)))}))}exports.Confirm=ps;exports.Lt=Ar;exports.PasswordConfirm=Xs;exports.y=j;
|